1.添加单据类型页面和接口

prod
x_z 3 years ago
parent 1c00769727
commit 29dfed2d46

@ -0,0 +1,59 @@
import axios from "../../utils/request";
export function getBusTypeList(params) {
return axios({
url: "/udiwms/bussinessType/filter",
method: "get",
params: params
});
}
export function insertBusType(data) {
return axios({
url: "/udiwms/bussinessType/insert",
method: "post",
data: data
});
}
export function updateBusType(data) {
return axios({
url: "/udiwms/bussinessType/update",
method: "post",
data: data
});
}
export function deleteBusType(data) {
return axios({
url: "/udiwms/bussinessType/delete",
method: "post",
data: data
});
}
export function candidateBusType(params) {
return axios({
url: "/udiwms/bussinessType/candidateBusType",
method: "get",
params: params
});
}
export function upload(data) {
return axios({
url: "/udiwms/bussinessType/file/upload",
method: "post",
data: data
});
}
export function exportFile(query) {
return axios({
url: "/udiwms/bussinessType/file/export",
method: "post",
data: query,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}

@ -0,0 +1,505 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型:">
<el-input
v-model="filterQuery.name"
placeholder="请输入单据类型"
></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="出入库类型:">
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" label="是否启用:">
<el-select v-model="filterQuery.enable" placeholder="是否启用">
<el-option label="全部" value=""></el-option>
<el-option label="已启用" value=1></el-option>
<el-option label="未启用" value=0></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick">
</el-button
>
<el-button type="primary" icon="el-icon-download" @click="exportJsonFile"></el-button>
<el-upload
:action="uploadFileUrl"
multiple
:limit="3"
:headers="headers"
:show-file-list="false"
:on-success="handleChange"
:file-list="fileList"
>
<el-button icon="el-icon-upload2" type="primary">导入单据类型</el-button>
</el-upload>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" width="60" fixed></el-table-column>
<el-table-column label="单据类型" prop="name" fixed></el-table-column>
<el-table-column label="出入库类型" prop="mainAction" fixed>
<template slot-scope="scope">
<span>{{ mainActionMap[scope.row.mainAction] }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="扫码单据类型代码" prop="action" fixed></el-table-column>-->
<el-table-column label="是否启用" prop="enable" fixed>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.enable] }}</span>
</template>
</el-table-column>
<el-table-column label="一次校验" prop="checkEnable" fixed>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.checkEnable] }}</span>
</template>
</el-table-column>
<el-table-column label="二次核对" prop="secCheckEnable" fixed>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.secCheckEnable] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
:disabled="!configParms.typeScan"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="新增扫码单据类型"
:visible.sync="addDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
class="dialog-two"
width="60%"
top="5vh"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
:disabled="!configParms.typeScan"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-dialog
title="编辑扫码单据类型"
:visible.sync="modifyDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="modifyDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
:disabled="!configParms.typeScan"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
</div>
</template>
<script>
import {getBusTypeList, deleteBusType, updateBusType, insertBusType, exportFile} from "@/api/basic/busType";
import modifyDialog from "./bussinessTypeModify";
import axios from "axios";
import store from "@/store";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
export default {
data() {
return {
filterQuery: {
name: null,
mainAction: null,
enable: "1",
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
action: "",
name: "",
enable: null,
remark: "",
mainAction: "",
thirdSysFk: "",
id: "",
localAction: null,
checkEnable: false,
genUnit: false,
innerOrder: false,
spUse: null,
secCheckEnable: null,
checkUdims: null,
checkPdaEd: null,
checkPdaUn: null,
checkPc: null,
checkWebNew: null,
checkChange: null,
checkCopy: null,
secCheckUdims: null,
secCheckPdaEd: null,
secCheckPdaUn: null,
secCheckPc: null,
secCheckWebNew: null,
secCheckChange: null,
thirdAction: null,
secCheckSp: null,
checkSp: null,
checkBalacne: null,
secCheckBalacne: null,
secCheckCopy: null,
corpType: null,
storageCode: null,
supplementOrderType: null,
defaultUnit: null,
useDyCount: null,
expireTip: true,
prefix: null,
outTospms: null,
ullageFill: null,
scanPreIn: null,
vailInv: null,
entrutSpms: null,
codeFillCheck: null,
defaultInv: null,
defaultSubInv: null,
orderVisibleType: 0,
},
enableMap: {
true: "是",
false: "否",
},
mainActionMap: {
WareHouseIn: "入库",
WareHouseOut: "出库"
},
fileList: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
headers: {},
configParms: {},
loading: false,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: null,
mainAction: null,
enable: "1",
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
getBusTypeList(this.filterQuery)
.then((response) => {
if (response.code === 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
onAddSubmit() {
if (isBlank(this.inputQuery.name)) {
this.$message.error("扫码单据类型名称不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.corpType)) {
this.$message.error("往来信息类型不能为空!");
return;
}
if (this.inputQuery.enable && this.inputQuery.localAction == "") {
this.$message.error("本地单据类型不能为空!");
return;
}
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
insertBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
onModifySubmit() {
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
updateBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
exportJsonFile() {
exportFile().then((response) => {
const binaryData = [];
binaryData.push(response);
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/json"})
);
this.loading = false;
const eleLink = document.createElement('a');
// var timestamp = "yyyy-MM-dd_hh:mm";
eleLink.download = "扫码单据类型导出" + ".json";
eleLink.style.display = 'none';
eleLink.href = url;
document.body.appendChild(eleLink)
eleLink.click()
document.body.removeChild(eleLink)
}).catch(() => {
this.loading = false;
});
},
handleAddClick() {
this.inputQuery = {enable: false, expireTip: true};
this.addDialogVisible = true;
},
handleModifyClick(row) {
this.inputQuery = {
id: row.id,
remark: row.remark,
action: row.action,
name: row.name,
enable: row.enable,
mainAction: row.mainAction,
localAction: row.localAction,
thirdSysFk: row.thirdSysFk,
checkEnable: row.checkEnable,
genUnit: row.genUnit,
innerOrder: row.innerOrder,
spUse: row.spUse,
secCheckEnable: row.secCheckEnable,
checkUdims: row.checkUdims,
checkPdaEd: row.checkPdaEd,
checkPdaUn: row.checkPdaUn,
checkPc: row.checkPc,
checkWebNew: row.checkWebNew,
checkChange: row.checkChange,
secCheckUdims: row.secCheckUdims,
secCheckPdaEd: row.secCheckPdaEd,
secCheckPdaUn: row.secCheckPdaUn,
secCheckPc: row.secCheckPc,
secCheckWebNew: row.secCheckWebNew,
secCheckChange: row.secCheckChange,
thirdAction: row.thirdAction,
corpType: row.corpType + "",
storageCode: row.storageCode,
secCheckSp: row.secCheckSp,
checkSp: row.checkSp,
supplementOrderType: row.supplementOrderType,
checkBalacne: row.checkBalacne,
secCheckBalacne: row.secCheckBalacne,
defaultUnit: row.defaultUnit,
useDyCount: row.useDyCount,
expireTip: row.expireTip,
prefix: row.prefix,
outTospms: row.outTospms,
ullageFill: row.ullageFill,
scanPreIn: row.scanPreIn,
vailInv: row.vailInv,
entrutSpms: row.entrutSpms,
codeFillCheck: row.codeFillCheck,
changeEnable: row.changeEnable,
defaultSubInv: row.defaultSubInv,
defaultInv: row.defaultInv,
orderVisibleType: row.orderVisibleType,
checkCopy: row.checkCopy,
secCheckCopy: row.secCheckCopy,
};
this.modifyDialogVisible = true;
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该扫码类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].localAction === action) {
return this.busTypes[i].localName;
}
}
},
deleteOrders(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deleteBusType(tquery)
.then((response) => {
this.getList();
if (response.code == 20000) {
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleChange(response, files, fileList) {
if (response.code != 20000) {
this.$message.error(response.message);
} else {
this.$message.success(response.data);
this.getList();
}
},
init() {
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/busstiness/file/upload";
});
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
},
getSyncConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configParms = response.data;
}
})
.catch(() => {
});
},
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.init();
this.getSyncConfig();
this.getList();
},
};
</script>

@ -0,0 +1,485 @@
<template>
<div>
<el-form :model="inputQuery" :rules="formRules" ref="dataForm" label-width="180px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="扫码单据类型" prop="name">
<el-input v-model="inputQuery.name" size="small" style="width: 90%"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="单据类型代码" prop="action">
<el-input v-model="inputQuery.action" size="small"
style="width: 90%"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="出入库类型" prop="mainAction">
<el-select v-model="inputQuery.mainAction"
size="small"
style="width: 90%"
placeholder="出入库类型"
@change="getOrderType">
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="往来信息类型" prop="corpType">
<el-select v-model="inputQuery.corpType" placeholder="往来信息" @change="corpTypeChange">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="内部进出平衡补单" prop="supplementOrderType">
<el-select :disabled="inputQuery.corpType !=1"
v-model="inputQuery.supplementOrderType"
clearable
placeholder="单据类型">
<el-option
v-for="item in orderTypeList"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="特殊单据往来" prop="defaultUnit">
<el-select
v-model="inputQuery.defaultUnit"
filterable
remote
:disabled="inputQuery.corpType!=3"
clearable="true"
reserve-keyword
:remote-method="findSpecialMethod"
>
<el-option
v-for="item in fromSpecialOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="单据前缀" prop="prefix">
<el-input v-model="inputQuery.prefix" size="small" style="width: 90%"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="单据详情展示方式" prop="orderVisibleType">
<el-select v-model="inputQuery.orderVisibleType" style="margin-left: 5px"
placeholder="单据详情展示方式"
size="mini">
<el-option label="批次号" :value=0></el-option>
<el-option label="条码清单" :value=1></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" type="flex">
<el-form-item prop="comments">
<label slot="label">&emsp;&emsp;</label>
<el-input v-model="inputQuery.comments" size="small" style="width: 90%" type="textarea"
row="3"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<span>单据设置</span>
<el-row type="flex">
<el-col :span="23" class="el-col">
<div class="text item" style="margin-top: 6px">
<el-checkbox v-model="inputQuery.enable" :disabled="inputQuery.localAction==null"></el-checkbox>
<el-checkbox v-model="inputQuery.genUnit" :disabled="inputQuery.corpType !=2">
</el-checkbox>
<el-checkbox v-model="inputQuery.useDyCount" :disabled="inputQuery.corpType !=2">使
</el-checkbox>
<el-checkbox v-model="inputQuery.outTospms">
</el-checkbox>
<el-checkbox v-model="inputQuery.entrutSpms">
</el-checkbox>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<span>单据默认选项</span>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="24" class="el-col">
<div class="text item" style="margin-top: 12px">
<el-checkbox v-model="inputQuery.ullageFill" :disabled="!inputQuery.changeEnable">
</el-checkbox>
<el-checkbox v-model="inputQuery.scanPreIn" :disabled="inputQuery.corpType!='2'">
</el-checkbox>
<el-checkbox v-model="inputQuery.vailInv" :disabled="inputQuery.mainAction!='WareHouseOut'">
</el-checkbox>
<el-checkbox v-model="inputQuery.codeFillCheck">UDI
</el-checkbox>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkEnable">()</el-checkbox>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-left: 15px">
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkWebNew" :disabled="!inputQuery.checkEnable">web
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkPdaUn" :disabled="!inputQuery.checkEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkPdaEd" :disabled="!inputQuery.checkEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkUdims" :disabled="!inputQuery.checkEnable">UDIMS
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkPc" :disabled="!inputQuery.checkEnable">UDI</el-checkbox>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-left: 15px">
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkSp" :disabled="!inputQuery.checkEnable"></el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkChange" :disabled="!inputQuery.checkEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkBalacne" :disabled="!inputQuery.checkEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkCopy" :disabled="!inputQuery.checkEnable">
</el-checkbox>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckEnable"
:disabled="twoCheck">需要单据复核的单据来源类型(二次复核)
</el-checkbox>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-left: 15px">
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckWebNew" :disabled="!inputQuery.secCheckEnable">web
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckPdaUn" :disabled="!inputQuery.secCheckEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckPdaEd" :disabled="!inputQuery.secCheckEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckUdims" :disabled="!inputQuery.secCheckEnable">UDIMS
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckPc" :disabled="!inputQuery.secCheckEnable">UDI
</el-checkbox>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-left: 15px">
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckSp" :disabled="!inputQuery.secCheckEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckChange" :disabled="!inputQuery.secCheckEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckBalacne" :disabled="!inputQuery.secCheckEnable">
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.secCheckCopy" :disabled="!inputQuery.secCheckEnable">
</el-checkbox>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
</el-form>
</div>
</template>
<script>
import {getCandidateBussinessType} from "@/api/basic/bussinessType";
export default {
name: "BussinessTypeModify",
props: {
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
formRules: {},
filterQuery: {
enabled: true,
isBuType: true,
isFilterBind: true,
},
storageList: [],
subInvList: [],
orderTypeList: [],
fromSpecialOptions: [],
thirdSys: [],
localTypes: [],
originTypes: [],
value: "",
options: [{
value: '0',
label: '供应商信息'
}, {
value: '1',
label: '仓库信息'
},
{
value: '2',
label: '客户信息'
}, {
value: '3',
label: '特殊往来'
}],
twoCheck: false,
}
},
methods: {
getList() {
let originQuery = {
onlyMain: true,
};
getOriginBusType(originQuery)
.then((response) => {
this.originTypes = response.data.list || [];
})
.catch(() => {
});
getBasicThirdSys(this.filterQuery)
.then((response) => {
this.thirdSys = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
});
let query = {
curAction: this.inputQuery.localAction,
};
getLocalJoinNoUse(query)
.then((response) => {
this.localTypes = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.localTypes = [];
});
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
this.findDefaultSubInv();
})
.catch(() => {
});
},
invChange() {
if (this.$isNotBlank(this.inputQuery.defaultSubInv))
this.inputQuery.defaultSubInv = null;
this.findDefaultSubInv();
},
findDefaultSubInv() {
this.subInvList = [];
let query = {
pcode: this.inputQuery.defaultInv
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
findSpecialMethod() {
let query = {
corpType: 4,
};
getBasicUnitMaintains(query).then((response) => {
this.fromSpecialOptions = response.data.page.list || [];
}).catch(() => {
})
},
oneCheck(type) {
console.log(type);
if (!type) {
this.twoCheck = true;
this.inputQuery.secCheckEnable = false;
} else
this.twoCheck = false;
},
corpTypeChange(type) {
if (type != 2) {
this.inputQuery.genUnit = false;
}
}
,
//
getOrderType() {
this.orderTypeList = [];
let query = {
mainAction: this.inputQuery.mainAction,
curAction: this.inputQuery.supplementOrderType,
};
getCandidateBussinessType(query).then((response) => {
this.orderTypeList = response.data || [];
}).catch(() => {
})
},
},
computed: {
corpType() {
return this.inputQuery.corpType;
}
},
watch: {
corpType: function (val) {
if (val != 1) {
this.inputQuery.orderTypeEnable = true;
this.inputQuery.supplementOrderType = null;
} else {
this.inputQuery.orderTypeEnable = false;
}
}
},
created() {
if (this.inputQuery.mainAction != null && this.inputQuery.mainAction != "") {
this.getOrderType();
}
this.getList();
this.getStorage();
this.findSpecialMethod();
},
};
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 20px;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>
Loading…
Cancel
Save