|
@@ -457,25 +457,10 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="仓库" prop="fWarehouseid">
|
|
|
- <el-select
|
|
|
- v-model="form.fWarehouseid"
|
|
|
- filterable
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
- remote
|
|
|
- style="width: 80%"
|
|
|
- @change="changeWarehouse"
|
|
|
- :remote-method="warehouseRemoteMethod"
|
|
|
- placeholder="请输入模糊查找"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(dict, index) in warehouseOptions"
|
|
|
- :key="index.fId"
|
|
|
- :label="dict.fName"
|
|
|
- :value="dict.fId"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="归属库区" prop="fWarehouseid">
|
|
|
+ <treeselect v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -1108,7 +1093,7 @@
|
|
|
header-align="center"
|
|
|
width="140px"
|
|
|
align="center"
|
|
|
- label="*库区"
|
|
|
+ label="*库位"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
@@ -1121,7 +1106,7 @@
|
|
|
scope.row.fBillstatus === 30 ||
|
|
|
scope.row.fBillstatus === 40
|
|
|
"
|
|
|
- :remote-method="kqhouseRemoteMethod"
|
|
|
+ @change="changefWarehouseAreid(scope.row)"
|
|
|
placeholder="请选择库区"
|
|
|
>
|
|
|
<el-option
|
|
@@ -2851,7 +2836,7 @@ import { listCorps } from "@/api/basicdata/corps";
|
|
|
|
|
|
import { listFees, getFees } from "@/api/basicdata/fees";
|
|
|
|
|
|
-import { listWarehouse } from "@/api/basicdata/warehouse";
|
|
|
+import {listWarehouse, treeselect} from "@/api/basicdata/warehouse";
|
|
|
|
|
|
import { listArea } from "@/api/basicdata/area";
|
|
|
|
|
@@ -2863,16 +2848,21 @@ import UploadFile from "@/components/Uploadfile";
|
|
|
import AddOrUpdate from "@/views/viewApproval";
|
|
|
import ApprovalComments from "@/views/startApproval";
|
|
|
import { getCharge } from '@/api/finance/charge'
|
|
|
-import Global from '@/layout/components/global'
|
|
|
+import Global from '@/layout/components/global';
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
export default {
|
|
|
name: "Warehousebills",
|
|
|
components: {
|
|
|
UploadFile,
|
|
|
AddOrUpdate,
|
|
|
ApprovalComments,
|
|
|
+ Treeselect
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 部门树选项
|
|
|
+ warehousesOptions: undefined,
|
|
|
activeNames:['1'],
|
|
|
isrequired:2,
|
|
|
isrequired_s:2,
|
|
@@ -3195,6 +3185,12 @@ export default {
|
|
|
this.adoPt()
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then(response => {
|
|
|
+ this.warehousesOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 出库件数的计算
|
|
|
qtyChange(row) {
|
|
|
if (!row.fQty || row.fQty === "") {
|
|
@@ -4030,6 +4026,7 @@ export default {
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd(status) {
|
|
|
+ this.getTreeselect();
|
|
|
this.form = {
|
|
|
fItemsStatus: null,
|
|
|
fFeetunit:"2"
|
|
@@ -4279,6 +4276,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 库位查询
|
|
|
+ changefWarehouseAreid(row) {
|
|
|
+ for (let corp in this.kqhouseOptions) {
|
|
|
+ if (row.fGoodsid === this.kqhouseOptions[corp].fId) {
|
|
|
+ this.$set(row, "fGoodsids", this.kqhouseOptions[corp].fName);
|
|
|
+ this.$set(row, "fPackagespecs", this.kqhouseOptions[corp].fPackagespecs);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 变更计价单位
|
|
|
changeFeeUnit(row) {
|
|
|
if (!row.fFeeUnitid) {
|