|
@@ -441,6 +441,20 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="仓库">
|
|
|
+ <el-select v-model="form.warehouseIdLsit" placeholder="请选择仓库" multiple>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in fWarehouseidOption"
|
|
|
+ :key="index.fId"
|
|
|
+ :label="item.fName"
|
|
|
+ :value="item.fId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
<div style="display: flex; justify-content: flex-end">
|
|
|
<el-button style="margin: 10px" @click="showForm = !showForm"
|
|
|
>{{ showForm ? "隐藏" : "更多" }}
|
|
@@ -827,6 +841,11 @@ import upLoad from "@/views/Warehousing/components/upLoad";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import Vue from "vue";
|
|
|
+
|
|
|
+// import { listWarehouse, nominateTreeselect } from "@/api/basicdata/warehouse";
|
|
|
+// import { warehouseTreeselect } from "@/api/basicdata/dept";
|
|
|
+import { listWarehousesss } from "@/api/basicdata/warehouse";
|
|
|
+
|
|
|
Vue.directive("dialogDrag", {
|
|
|
bind(el, binding, vnode, oldVnode) {
|
|
|
const dialogHeaderEl = el.querySelector(".el-dialog__header");
|
|
@@ -889,6 +908,8 @@ export default {
|
|
|
components: { draggable, Treeselect, upLoad },
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 当前登录用户所属仓库
|
|
|
+ fWarehouseidOption: [],
|
|
|
treevalue: null,
|
|
|
deptOptions: null,
|
|
|
disCorps: false,
|
|
@@ -1079,6 +1100,18 @@ export default {
|
|
|
this.getRow();
|
|
|
this.getTreeselect();
|
|
|
this.username = Cookies.get("userName");
|
|
|
+
|
|
|
+
|
|
|
+ // // 查询仓库下拉
|
|
|
+ // warehouseTreeselect().then((res) => {
|
|
|
+ // this.fWarehouseidOption = res.data;
|
|
|
+ // console.log(res);
|
|
|
+ // })
|
|
|
+
|
|
|
+ // 查询仓库下拉
|
|
|
+ listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
|
|
|
+ this.fWarehouseidOption = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
getTreeselect() {
|
|
@@ -1308,6 +1341,20 @@ export default {
|
|
|
.replace(/\"/g, "")
|
|
|
.split(",");
|
|
|
}
|
|
|
+
|
|
|
+ // 仓库回显
|
|
|
+ if (response.data.corp.warehouseId != null && response.data.corp.warehouseId != '') {
|
|
|
+ var warehouseIdLsitString = response.data.corp.warehouseId;
|
|
|
+ warehouseIdLsitString = warehouseIdLsitString.split(',');
|
|
|
+ var warehouseIdLsitInt = [];
|
|
|
+ for (const key in warehouseIdLsitString) {
|
|
|
+ let warehouseIdString = parseInt(warehouseIdLsitString[key]);
|
|
|
+ warehouseIdLsitInt.push(warehouseIdString);
|
|
|
+ }
|
|
|
+ response.data.corp.warehouseIdLsit = warehouseIdLsitInt;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
this.relevantAttachments = response.data["attach"]? response.data["attach"]: [];
|
|
|
this.form = response.data["corp"];
|
|
|
console.log(this.form);
|
|
@@ -1353,6 +1400,16 @@ export default {
|
|
|
if (this.contactList.length == 0 && Cookies.get("sysType") == 2) {
|
|
|
return this.$message.error("联系人不能为空");
|
|
|
}
|
|
|
+
|
|
|
+ // 拼接仓库id
|
|
|
+ let warehouseIds = "";
|
|
|
+ for (const key in this.form.warehouseIdLsit) {
|
|
|
+ warehouseIds += this.form.warehouseIdLsit[key];
|
|
|
+ warehouseIds += ',';
|
|
|
+ }
|
|
|
+ warehouseIds = warehouseIds.slice(0, -1);
|
|
|
+ this.form.warehouseId = warehouseIds;
|
|
|
+
|
|
|
formDate.append("corps", JSON.stringify(this.form));
|
|
|
formDate.append(
|
|
|
"customerContacts",
|
|
@@ -1388,6 +1445,16 @@ export default {
|
|
|
if (this.contactList.length == 0 && Cookies.get("sysType") == 2) {
|
|
|
return this.$message.error("联系人不能为空");
|
|
|
}
|
|
|
+
|
|
|
+ // 拼接仓库id
|
|
|
+ let warehouseIds = "";
|
|
|
+ for (const key in this.form.warehouseIdLsit) {
|
|
|
+ warehouseIds += this.form.warehouseIdLsit[key];
|
|
|
+ warehouseIds += ',';
|
|
|
+ }
|
|
|
+ warehouseIds = warehouseIds.slice(0, -1);
|
|
|
+ this.form.warehouseId = warehouseIds;
|
|
|
+
|
|
|
formDate.append("corps", JSON.stringify(this.form));
|
|
|
formDate.append(
|
|
|
"customerContacts",
|