|
|
|
@ -17,14 +17,24 @@
|
|
|
|
|
<el-option label="仓库" value=false></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-select v-model="query.thirdSysFk" placeholder="请选择第三方系统"
|
|
|
|
|
@change="thirdSysFkChange(query.thirdSysFk)">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in thirdSys"
|
|
|
|
|
:key="item.thirdId"
|
|
|
|
|
:label="item.thirdName"
|
|
|
|
|
:value="item.thirdName">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="getList">查询</el-button>
|
|
|
|
|
<el-button type="primary" @click.native="handleForm(null, null,'addTop')"
|
|
|
|
|
>添加仓库
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
@ -60,6 +70,7 @@
|
|
|
|
|
<!-- <span>{{ enableMap[scope.row.isDefault] }}</span>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column prop="thirdName" label="第三方系统名称"></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
@ -173,7 +184,7 @@
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="formData" :rules="formRules" ref="dataForm">
|
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库编码" prop="title" class="query-form-item">
|
|
|
|
|
<el-form-item label="仓库编码" prop="code" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.code" style="width: 80%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
@ -193,6 +204,17 @@
|
|
|
|
|
<el-option label="仓库" :value='false'></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item" prop="thirdSysFk" label="第三方系统:">
|
|
|
|
|
<el-select v-model="formData.thirdSysFk" placeholder="请选择第三方系统" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in thirdSys"
|
|
|
|
|
:key="item.thirdId"
|
|
|
|
|
:lable="item.thirdName"
|
|
|
|
|
:value="item.thirdName"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="状态:" prop="status" class="query-form-item">
|
|
|
|
|
<el-radio-group v-model="formData.status">
|
|
|
|
|
<el-radio :label="0">禁用</el-radio>
|
|
|
|
@ -200,20 +222,6 @@
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item v-if="formData.pid == 0">-->
|
|
|
|
|
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
|
|
|
|
|
<!-- <el-col :span="4" class="el-col">-->
|
|
|
|
|
<!-- <div class="text item">-->
|
|
|
|
|
<!-- <el-checkbox v-model="formData.advanceType">是否寄售仓库</el-checkbox>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="4" class="el-col">-->
|
|
|
|
|
<!-- <div class="text item">-->
|
|
|
|
|
<!-- <el-checkbox v-model="formData.isDefault">是否设为默认仓库</el-checkbox>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -234,8 +242,9 @@
|
|
|
|
|
import {
|
|
|
|
|
filterThrList,
|
|
|
|
|
saveThrWarehouse,
|
|
|
|
|
deleteThrWarehouse
|
|
|
|
|
deleteThrWarehouse,
|
|
|
|
|
} from "../../api/thrsys/thrInvWarehouse";
|
|
|
|
|
import {getBasicThirdSys} from "../../api/basic/basicThirdSys";
|
|
|
|
|
|
|
|
|
|
const formJson = {
|
|
|
|
|
id: null,
|
|
|
|
@ -287,13 +296,15 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
code: [
|
|
|
|
|
{required: true, message: "请输入仓库货位代码", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
thirdSysFk: [
|
|
|
|
|
{required: true, message: "请选择第三方系统", trigger: "blur"}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
pidData: {}
|
|
|
|
|
,
|
|
|
|
|
deleteLoading: false
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
pidData: {},
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
thirdSys: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/*eslint-disable */
|
|
|
|
@ -341,6 +352,7 @@ export default {
|
|
|
|
|
this.query = {
|
|
|
|
|
name: "",
|
|
|
|
|
status: "",
|
|
|
|
|
thirdSysFk: null
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
@ -349,11 +361,15 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
if (this.query.thirdSysFk != null) {
|
|
|
|
|
this.getQueryThirdSysFk(this.query.thirdSysFk);
|
|
|
|
|
}
|
|
|
|
|
filterThrList(this.query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.mergeList = response.data.list || [];
|
|
|
|
|
this.treeList = response.data.tree_list || [];
|
|
|
|
|
this.getQueryThirdSysFkName(this.query.thirdSysFk);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -361,6 +377,20 @@ export default {
|
|
|
|
|
this.treeList = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getQueryThirdSysFk() {
|
|
|
|
|
this.thirdSys.forEach((item) => {
|
|
|
|
|
if (item.thirdName == this.query.thirdSysFk) {
|
|
|
|
|
this.query.thirdSysFk = item.thirdId;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getQueryThirdSysFkName() {
|
|
|
|
|
this.thirdSys.forEach((item) => {
|
|
|
|
|
if (item.thirdId == this.query.thirdSysFk) {
|
|
|
|
|
this.query.thirdSysFk = item.thirdName;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 刷新表单
|
|
|
|
|
resetForm() {
|
|
|
|
|
if (this.$refs["dataForm"]) {
|
|
|
|
@ -387,6 +417,13 @@ export default {
|
|
|
|
|
this.formData = JSON.parse(JSON.stringify(formJson));
|
|
|
|
|
if (formName === "edit") {
|
|
|
|
|
this.formData = Object.assign({}, data);
|
|
|
|
|
if (this.formData.thirdSysFk != null) {
|
|
|
|
|
this.thirdSys.forEach((item) => {
|
|
|
|
|
if (item.thirdId == this.formData.thirdSysFk) {
|
|
|
|
|
this.formData.thirdSysFk = item.thirdName;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.node = node;
|
|
|
|
|
} else {
|
|
|
|
|
this.formData.code = no;
|
|
|
|
@ -423,6 +460,11 @@ export default {
|
|
|
|
|
this.$refs["dataForm"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.formLoading = true;
|
|
|
|
|
this.thirdSys.forEach((item) => {
|
|
|
|
|
if (this.formData.thirdSysFk == item.thirdName) {
|
|
|
|
|
this.formData.thirdSysFk = item.thirdId;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
let data = Object.assign({}, this.formData);
|
|
|
|
|
saveThrWarehouse(data, this.formName)
|
|
|
|
|
.then((response) => {
|
|
|
|
@ -517,6 +559,22 @@ export default {
|
|
|
|
|
CurrentDate += '0' + Day
|
|
|
|
|
}
|
|
|
|
|
return CurrentDate
|
|
|
|
|
},
|
|
|
|
|
getBasicThirdSys() {
|
|
|
|
|
let query = {
|
|
|
|
|
enabled: true,
|
|
|
|
|
};
|
|
|
|
|
getBasicThirdSys(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.thirdSys = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
thirdSysFkChange(thirdSysFk) {
|
|
|
|
|
console.log(thirdSysFk);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
@ -540,6 +598,7 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
// 加载表格数据
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getBasicThirdSys();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|