wengyuwen 4 rokov pred
rodič
commit
44fe6ba458

+ 75 - 24
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -433,11 +433,12 @@
               <el-select
                 v-model="form.fWarehouseid"
                 filterable
-                :disabled="notChange || formBrowseStatus"
                 remote
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
-                :remote-method="warehouseRemoteMethod"
-                placeholder="请选择仓库">
+                @keyup.enter.native="handleQuery"
+                placeholder="请选择"
+              >
                 <el-option
                   v-for="(dict, index) in warehouseOptions"
                   :key="index.fId"
@@ -447,6 +448,7 @@
               </el-select>
             </el-form-item>
           </el-col>
+
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -697,17 +699,10 @@
           header-align="center"
           width="150px"
           align="center"
-          label="*仓库"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="fWarehouselocids"
-          header-align="center"
-          width="150px"
-          align="center"
-          label="*库区"
+          label="*库位"
         >
         </el-table-column>
+
         <el-table-column
           prop="fOriginalbillno"
           header-align="center"
@@ -1065,6 +1060,29 @@
           </template>
         </el-table-column>
         <el-table-column
+          prop="fStltypeid"
+          header-align="center"
+          align="center"
+          width="130px"
+          label="结算方式"
+        >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.fStltypeid"
+              placeholder="请选择结算表票结、月结"
+              :disabled="browseStatus"
+            >
+              <el-option
+                v-for="dict in fStltypeidOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="parseInt(dict.dictValue)"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+
+        <el-table-column
           prop="fFeeunitid"
           header-align="center"
           align="center"
@@ -1349,6 +1367,29 @@
           </template>
         </el-table-column>
         <el-table-column
+          prop="fStltypeid"
+          header-align="center"
+          align="center"
+          width="130px"
+          label="结算方式"
+        >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.fStltypeid"
+              placeholder="请选择结算表票结、月结"
+              :disabled="browseStatus"
+            >
+              <el-option
+                v-for="dict in fStltypeidOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="parseInt(dict.dictValue)"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+
+        <el-table-column
           prop="fFeeunitid"
           header-align="center"
           align="center"
@@ -1627,16 +1668,16 @@
             prop="fWarehouseids"
             header-align="center"
             align="center"
-            label="仓库"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="fWarehouseLocationids"
-            header-align="center"
-            align="center"
-            label="库区"
+            label="库位"
           >
           </el-table-column>
+<!--          <el-table-column-->
+<!--            prop="fWarehouseLocationids"-->
+<!--            header-align="center"-->
+<!--            align="center"-->
+<!--            label="库区"-->
+<!--          >-->
+<!--          </el-table-column>-->
         </el-table>
         <pagination
           v-show="whgenlegTotal > 0"
@@ -1672,7 +1713,7 @@
 
   import { listFees } from '@/api/basicdata/fees'
 
-  import { listWarehouse, treeselect } from '@/api/basicdata/warehouse'
+  import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
 
   import { listArea } from '@/api/basicdata/area'
 
@@ -1790,6 +1831,8 @@
         fBilltypeOptions: [],
         // 状态(数据字典),N 入字典
         fBillstatusOptions: [],
+        //结算方式对应字典表
+        fStltypeidOptions:[],
         // 费用名称
         fWbuOptions: [],
         // 查询参数
@@ -1926,6 +1969,9 @@
       this.getDicts('data_unitfees').then((response) => {
         this.fFeetunitOptions = response.data
       })
+      this.getDicts("data_stltype_type").then(response => {
+        this.fStltypeidOptions = response.data;
+      });
       this.register()
     },
     activated(){
@@ -2292,6 +2338,13 @@
           this.loading = false
         })
       },
+      /* 获取所有仓库信息 */
+      warehousesssMethod() {
+        let queryParams = { pageNum: 1, pageSize: 10, fStatus: 0, delFlag: 0 };
+        listWarehousesss(queryParams).then((response) => {
+          this.warehouseOptions = response.rows;
+        });
+      },
       /* 远程模糊查询库区 */
       kqhouseRemoteMethod(name) {
         if (name == null || name === '') {
@@ -2389,11 +2442,11 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.getTreeselect()
         this.reset()
         this.notChange = false
         this.browseStatus = false
         this.queryUser()
+        this.warehousesssMethod()
         this.open = true
         this.dataList = []
         this.warehouseCrList = []
@@ -2402,7 +2455,6 @@
         this.title = '货权转移'
       },
       check_s(row) {
-        this.getTreeselect()
         this.disappear = true
         this.notChange = true
         this.browseStatus = true
@@ -2504,7 +2556,6 @@
 
       /** 修改按钮操作 */
       handleUpdate(row, status) {
-        this.getTreeselect()
         this.reset()
         this.notChange = false
         this.browseStatus = status

+ 67 - 58
src/views/warehouseBusiness/inStock/index.vue

@@ -646,7 +646,7 @@
                 @keyup.enter.native="handleQuery"
                 :remote-method="flabourRemoteMethod"
                 filterable
-                :disabled="browseStatus"
+                :disabled="contrOl"
                 placeholder="请输入劳务公司">
                 <el-option
                   v-for="(dict, index) in fMblnoOptions"
@@ -671,7 +671,7 @@
                 filterable
                 @keyup.enter.native="handleQuery"
                 :remote-method="fleetRemoteMethod"
-                :disabled="browseStatus"
+                :disabled="contrOl"
                 placeholder="请输入车队">
 
                 <el-option
@@ -1852,7 +1852,6 @@
                 />
               </template>
             </el-table-column>
-
             <el-table-column
               prop="fMblno"
               header-align="center"
@@ -1869,7 +1868,6 @@
                 />
               </template>
             </el-table-column>
-
             <el-table-column
               prop="fProductName"
               header-align="center"
@@ -1886,7 +1884,6 @@
                 />
               </template>
             </el-table-column>
-
             <el-table-column
               prop="fMarks"
               header-align="center"
@@ -2137,7 +2134,11 @@
               label="结算方式"
             >
               <template slot-scope="scope">
-                <el-select v-model="scope.row.fStltypeid" style="width: 250px" placeholder="请选择结算表票结、月结">
+                <el-select
+                  v-model="scope.row.fStltypeid"
+                  placeholder="请选择结算表票结、月结"
+                  :disabled="browseStatus"
+                >
                   <el-option
                     v-for="dict in fStltypeidOptions"
                     :key="dict.dictValue"
@@ -2147,6 +2148,7 @@
                 </el-select>
               </template>
             </el-table-column>
+
             <el-table-column
               prop="fCurrency"
               header-align="center"
@@ -2966,9 +2968,8 @@ export default {
       treeselectList:{
         fWarehouselocid:null
       },
-      fWarehouseidOptions:[],
       // 部门树选项
-      warehousesOptions:[],
+      fWarehouseidOptions:[],
       activeNames:['1'],
       isrequired:2,
       isrequired_s:2,
@@ -3930,44 +3931,40 @@ export default {
         for (let whgen in this.dialogWhgenlegList) {
           let feeId = this.dialogWhgenlegList[whgen].feeFId;
           getFees(feeId).then((response) => {
+            console.log(response)
             this.fWbuOptions.push(response.data);
           });
-          let row = {
-            fQty:null,
-            fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
-            fFeeid: feeId,
-            fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
-            fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
-            fCurrency: "RMB",
-            fExrate: "1",
-            fTaxrate: this.fTaxrate,
-            fMblno:this.form.fMblno,
-            fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks,
-            fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
+          let qty = 1;
+          if (this.dialogWhgenlegList[whgen].fFeeUnitid === 1) {
+            qty = this.fQty
+          } else if (this.dialogWhgenlegList[whgen].fFeeUnitid === 2) {
+            qty = (this.fGrossweight/1000).toFixed(2)
+          } else if (this.dialogWhgenlegList[whgen].fFeeUnitid === 3) {
+            qty = (this.fNetweight/1000).toFixed(2)
+          } else if (this.dialogWhgenlegList[whgen].fFeeUnitid === 4) {
+            qty = this.fVolumn
           }
-          if (row.fFeeUnitid === "1") {
-            this.$set(this.row, "fQty", this.fQty.toFixed(2));
-            console.log("111111433543")
-            return
-          } else if (row.fFeeUnitid === "2") {
-            this.$set(row, "fQty", (this.fGrossweight/1000).toFixed(2));
-          } else if (row.fFeeUnitid === "3") {
-            this.$set(row, "fQty", (this.fNetweight/1000).toFixed(2));
-          } else {
-            this.$set(row, "fQty", 0);
-          }
-          this.$set(row, "fAmount", (Number(row.fUnitprice) * Number(row.fQty)).toFixed(2));
-
-          this.warehouseDrList.push(row);
-        }
-
-
-        // for (let list in this.warehouseDrList) {
+          // qty=(qty/1000).toFixed(2);
+          let fAmount = parseFloat(Number(this.dialogWhgenlegList[whgen].fPrice) * Number(qty)).toFixed(2)
 
+            this.warehouseDrList.push({
+              fQty: qty,
+              fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
+              fFeeid: feeId,
+              fFeeunitid: this.dialogWhgenlegList[whgen].fFeeUnitid + '',
+              fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
+              fCurrency: 'RMB',
+              fExrate: 1,
+              fAmount: fAmount,
+              fTaxrate: this.fTaxrate,
+              fMblno:this.form.fMblno,
+              fProductName:this.form.fProductName,
+              fMarks:this.form.fMarks,
+              fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
+            })
         }
         this.warehousingagreement = false;
-      // }
+      }
     },
     zhgenlegData() {
       if (this.dialogWhgenlegList.length === 0) {
@@ -3981,31 +3978,34 @@ export default {
           getFees(feeId).then((response) => {
             this.fWbuOptions.push(response.data);
           });
+          let qty = 1;
+          if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 1) {
+            qty = this.fQty
+          } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 2) {
+            qty = (this.fGrossweight/1000).toFixed(2)
+          } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 3) {
+            qty = (this.fNetweight/1000).toFixed(2)
+          } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 4) {
+            qty = this.fVolumn
+          }
+          // qty=(qty/1000).toFixed(2);
+          let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
+
           this.warehouseCrList.push({
+            fQty: qty,
             fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
             fFeeid: feeId,
-            fFeeUnitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + "",
+            fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
             fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
-            fCurrency: "RMB",
-            fExrate: "1",
+            fCurrency: 'RMB',
+            fExrate: 1,
+            fAmount: fAmount,
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
             fMarks:this.form.fMarks,
             fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
-          });
-        }
-        for (let list in this.warehouseCrList) {
-          if (this.warehouseCrList[list].fFeeUnitid === "1") {
-            this.$set(this.warehouseCrList[list], "fQty", this.fQty.toFixed(2));
-          } else if (this.warehouseCrList[list].fFeeUnitid === "2") {
-            this.$set(this.warehouseCrList[list], "fQty", (this.fGrossweight/1000).toFixed(2));
-          } else if (this.warehouseCrList[list].fFeeUnitid === "3") {
-            this.$set(this.warehouseCrList[list], "fQty", (this.fNetweight/1000).toFixed(2));
-          } else {
-            this.$set(this.warehouseCrList[list], "fQty", 0);
-          }
-          this.$set(this.warehouseCrList[list], "fAmount", (Number(this.warehouseCrList[list].fUnitprice) * Number(this.warehouseCrList[list].fQty)).toFixed(2));
+          })
         }
         this.warehousingagreements = false;
       }
@@ -4117,6 +4117,7 @@ export default {
         fCntrtype: null,
         fCntqty: null
       }
+      this.dataList = []
       this.fMblnoOptions = []
       this.userOptions = [];
       this.warehouseOptions = [];
@@ -4190,6 +4191,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
+      this.reset()
       this.form = {
           fItemsStatus: null,
           fFeetunit:"2"
@@ -4211,18 +4213,22 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
-      this.reset();
-      this.contrOl = true
+      console.log(this.dataList)
+      this.dataList = []
+      this.reset()
+      // this.contrOl = true
       // if (this.dataList.length === 0){
       //
       // }
       this.browseStatus = status;
+      this.contrOl = status;
       this.detailsHidden = false;
       this.formBrowseStatus = false;
       const fId = row.fId || this.ids;
       this.dataList = [];
       this.goodsRemoteMethod()
       getWarehousebills(fId).then((response) => {
+        console.log(response)
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
           this.before = this.form.createBy
@@ -4296,6 +4302,8 @@ export default {
       queryUserVal().then((response)=>{
         this.current = response.user.userName
       })
+
+      console.log(this.dataList)
     },
     // 库存总账多选框
     whgenlegSelectionChange(selection) {
@@ -4740,6 +4748,7 @@ export default {
           // 附件数据
           this.form.fBillingway = this.form.fFeetunit
           console.log(this.form)
+          console.log(this.dataList)
           formDatae.append('tWarehouseBills', JSON.stringify(this.form))
           // 库存明细
           formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))

+ 136 - 39
src/views/warehouseBusiness/outStock/index.vue

@@ -611,7 +611,7 @@
                 v-model="form.fLabour"
                 @keyup.enter.native="handleQuery"
                 :remote-method="flabourRemoteMethod"
-                :disabled="browseStatus"
+                :disabled="contrOl"
                 placeholder="请输入劳务公司"
               >
                 <el-option
@@ -636,7 +636,7 @@
                 v-model="form.fFleet"
                 @keyup.enter.native="handleQuery"
                 :remote-method="fleetRemoteMethod"
-                :disabled="browseStatus"
+                :disabled="contrOl"
                 placeholder="请输入车队"
               >
                 <el-option
@@ -963,14 +963,14 @@
             <el-table-column
               prop="fWarehouseInformation"
               header-align="center"
-              width="140px"
+              width="240px"
               align="center"
               label="*库区"
             >
               <template slot-scope="scope">
                 <el-input
                   placeholder="请选择"
-                  :disabled="!form.fWarehouseid || browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
+                  disabled
                   v-model="scope.row.fWarehouseInformation"
                   @focus="getTreeselect(scope)"
                 >
@@ -978,7 +978,6 @@
               </template>
             </el-table-column>
 
-
             <el-table-column
               prop="fPlanqty"
               header-align="center"
@@ -1490,6 +1489,27 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fBusinessType"
+              header-align="center"
+              align="center"
+              width="180px"
+              label="作业类型"
+            >
+              <el-select
+                style="width: 80%"
+                v-model="warehouseDrList.fBusinessType"
+                filterable
+                disabled
+              >
+                <el-option
+                  v-for="(dict,index) in businessTypeOption"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-table-column>
+            <el-table-column
               prop="fFeeunitid"
               header-align="center"
               align="center"
@@ -1567,6 +1587,28 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fStltypeid"
+              header-align="center"
+              align="center"
+              width="130px"
+              label="结算方式"
+            >
+              <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.fStltypeid"
+                  placeholder="请选择结算表票结、月结"
+                  :disabled="browseStatus"
+                >
+                  <el-option
+                    v-for="dict in fStltypeidOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                  ></el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
               prop="fCurrency"
               header-align="center"
               align="center"
@@ -1614,7 +1656,6 @@
                 />
               </template>
             </el-table-column>
-
             <el-table-column
               prop="fMblno"
               header-align="center"
@@ -1631,7 +1672,6 @@
                 />
               </template>
             </el-table-column>
-
             <el-table-column
               prop="fProductName"
               header-align="center"
@@ -1648,7 +1688,6 @@
                 />
               </template>
             </el-table-column>
-
             <el-table-column
               prop="fMarks"
               header-align="center"
@@ -1794,6 +1833,27 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fBusinessType"
+              header-align="center"
+              align="center"
+              width="180px"
+              label="作业类型"
+            >
+              <el-select
+                style="width: 80%"
+                v-model="warehouseDrList.fBusinessType"
+                filterable
+                disabled
+              >
+                <el-option
+                  v-for="(dict,index) in businessTypeOption"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-table-column>
+            <el-table-column
               prop="fFeeunitid"
               header-align="center"
               align="center"
@@ -1871,6 +1931,28 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fStltypeid"
+              header-align="center"
+              align="center"
+              width="130px"
+              label="结算方式"
+            >
+              <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.fStltypeid"
+                  placeholder="请选择结算表票结、月结"
+                  :disabled="browseStatus"
+                >
+                  <el-option
+                    v-for="dict in fStltypeidOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                  ></el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
               prop="fCurrency"
               header-align="center"
               align="center"
@@ -2086,18 +2168,18 @@
             label="结余数量"
           >
           </el-table-column>
+<!--          <el-table-column-->
+<!--            prop="fWarehouseid"-->
+<!--            header-align="center"-->
+<!--            align="center"-->
+<!--            label="仓库"-->
+<!--          >-->
+<!--          </el-table-column>-->
           <el-table-column
             prop="fWarehouseids"
             header-align="center"
             align="center"
-            label="仓库"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="fWarehouseLocationids"
-            header-align="center"
-            align="center"
-            label="库区"
+            label="库位"
           >
           </el-table-column>
           <el-table-column
@@ -2609,7 +2691,7 @@ import { listCorps } from "@/api/basicdata/corps";
 
 import { listFees, getFees } from "@/api/basicdata/fees";
 
-import { listWarehouse, treeselect } from '@/api/basicdata/warehouse'
+import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
 
 import { listArea } from "@/api/basicdata/area";
 
@@ -2636,13 +2718,17 @@ export default {
   },
   data() {
     return {
+      //控制选择库位弹出
+      choiceWarehouse:false,
+      information:'',
+      informationId:'',
       inDex:'',
       Warehouse:'',
       treeselectList:{
         fWarehouselocid:null
       },
       // 部门树选项
-      warehousesOptions: [],
+      fWarehouseidOptions:[],
       //控制作业类型校验
       isrequired:2,
       isrequired_s:2,
@@ -2756,6 +2842,8 @@ export default {
       fStorageTypeOptions: [],
       // 贸易方式(数据字典),对应t_trademodels 字典
       fTrademodeidOptions: [],
+      //结算方式对应字典表
+      fStltypeidOptions:[],
       // 是否放行
       releaseList: [
         {dictLabel: "已放行",dictValue: "T"},
@@ -2856,6 +2944,7 @@ export default {
           message: " ",
           trigger: "blur",
         },
+        fBusinessType:[{required: true, message: " ", trigger: "blur"}],
         fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
         // fBscorpno: [
         //   { required: true, message: "请输入存货编号", trigger: "blur" },
@@ -2909,6 +2998,9 @@ export default {
     this.getDicts("st_out_type").then((response) => {
       this.businessTypeOption = response.data;
     });
+    this.getDicts("data_stltype_type").then(response => {
+      this.fStltypeidOptions = response.data;
+    });
   },
   activated() {
     this.adoPt()
@@ -2923,38 +3015,28 @@ export default {
     },
     /** 查询部门下拉树结构 */
     getTreeselect(row) {
-      console.log(row)
       this.treeselectList.fWarehouselocid = null
       this.inDex = row.$index
       this.choiceWarehouse = true
       treeselect(this.form.fWarehouseid).then(response => {
-        console.log(response)
         this.fWarehouseidOptions = response.data;
-        console.log(this.fWarehouseidOptions)
-        // console.log(this.dataList.fWarehouseid)
       })
+      this.Warehouse = this.dataList[this.inDex].fWarehouseInformation
     },
-    //树状下拉选中事件
     getAlltree(tree){
-      console.log(tree.id)
-      console.log(this.dataList)
-      this.$set(this.dataList[this.inDex], 'fWarehouseInformation', tree.fWarehouseInformation)
-      this.$set(this.dataList[this.inDex], 'fWarehouselocid', tree.id)
-      this.Warehouse = tree.fWarehouseInformation
-      console.log(this.dataList[this.inDex])
-      console.log(this.dataList[this.inDex].fWarehouseInformation)
-      console.log(this.dataList)
+      this.information = tree.fWarehouseInformation
+      this.informationId = tree.id
     },
     confirm(){
+      this.$set(this.dataList[this.inDex], 'fWarehouseInformation', this.information)
+      this.$set(this.dataList[this.inDex], 'fWarehouselocid', this.informationId)
       this.choiceWarehouse = false
-      // console.log(this.dataList[0].fWarehouseid)
     },
 
     //审批页面跳转
     adoPt(){
       this.approval = this.$route.query.data
       if (this.approval){
-        this.getTreeselect()
         this.reset();
         this.doNot = true
         this.closeButton = false
@@ -3172,8 +3254,10 @@ export default {
         fFeeid:this.dataList[0].fGoodsid
       }
       operationAgreement(data).then((response) => {
+        console.log(response)
         this.tasklegList = response.rows;
         this.whgenlegTotal = response.total;
+        console.log(this.tasklegList)
       });
     },
     revokeTwo(){
@@ -3264,7 +3348,8 @@ export default {
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks
+            fMarks:this.form.fMarks,
+            fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
           })
           console.log(this.fQty)
         } else {
@@ -3280,7 +3365,9 @@ export default {
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks
+            fMarks:this.form.fMarks,
+            fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
+
           })
         }
       }
@@ -3356,6 +3443,7 @@ export default {
         return false;
       }
       for (let whgen in this.dialogWhgenlegList) {
+        console.log(this.dialogWhgenlegList)
         if (!this.form.fMblno || this.form.fMblno === "") {
           this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
         }
@@ -3399,8 +3487,8 @@ export default {
           fDriverName:this.whgenlegList.fDriverName,
           fDriverTel:this.whgenlegList.fDriverTel,
           fDriverIdCar:this.whgenlegList.fDriverIdCar,
-          fBusinessType:this.dialogWhgenlegList[whgen].fBusinessType + ''
-
+          fBusinessType:this.dialogWhgenlegList[whgen].fBusinessType + '',
+          fWarehouseInformation:this.dialogWhgenlegList[whgen].fWarehouseids
         });
       }
       this.whgenlegVisible = false;
@@ -3747,10 +3835,10 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
-      this.getTreeselect();
       this.reset();
       this.browseStatus = status;
       this.queryUser();
+      this.warehousesssMethod()
       this.open = true;
       this.detailsHidden = false;
       this.dataList = [];
@@ -3764,12 +3852,12 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
-      this.getTreeselect();
       this.reset();
       // if (this.dataList.length === 0){
       //   this.contrOl = true
       // }
       this.browseStatus = status;
+      this.contrOl = status
       this.detailsHidden = false;
       this.formBrowseStatus = false;
       const fId = row.fId || this.ids;
@@ -4160,6 +4248,7 @@ export default {
         this.fid = response.data;
         this.formBrowseStatus = false;
         this.msgSuccess("撤销入账成功");
+        this.contrOl = false
         this.$refs.tableList.clearSelection();
         let mun = 0;
         for (let i in this.dataList) {
@@ -4613,6 +4702,14 @@ export default {
         this.warehouseOptions = response.rows;
       });
     },
+    /* 获取所有仓库信息 */
+    warehousesssMethod() {
+      let queryParams = { pageNum: 1, pageSize: 10, fStatus: 0, delFlag: 0 };
+      listWarehousesss(queryParams).then((response) => {
+        this.warehouseOptions = response.rows;
+      });
+    },
+
     /* 远程模糊查询库区 */
     kqhouseRemoteMethod(name) {
       if (name == null || name === "") {

+ 205 - 75
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -430,10 +430,26 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="调入仓库" prop="fWarehouseid">
-              <treeselect :disabled="browseStatus" style="width:80%" v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
+            <el-form-item label="仓库" prop="fWarehouseid">
+              <el-select
+                v-model="form.fWarehouseid"
+                filterable
+                remote
+                :disabled="browseStatus || formBrowseStatus"
+                style="width: 80%"
+                @keyup.enter.native="handleQuery"
+                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>
           </el-col>
+
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -603,7 +619,7 @@
                 v-model="form.fLabour"
                 @keyup.enter.native="handleQuery"
                 :remote-method="flabourRemoteMethod"
-                :disabled="browseStatus"
+                :disabled="contrOl"
                 placeholder="请输入劳务公司"
               >
                 <el-option
@@ -628,7 +644,7 @@
                 v-model="form.fFleet"
                 @keyup.enter.native="handleQuery"
                 :remote-method="fleetRemoteMethod"
-                :disabled="browseStatus"
+                :disabled="contrOl"
                 placeholder="请输入车队"
               >
                 <el-option
@@ -890,50 +906,32 @@
               label="提单号"
             >
             </el-table-column>
+
             <el-table-column
               prop="fWarehouseids"
               header-align="center"
-              width="150px"
               align="center"
-              label="*原仓库"
-            >
-            </el-table-column>
-            <el-table-column
-              prop="fWarehouselocids"
-              header-align="center"
-              width="150px"
-              align="center"
-              label="*原库区"
+              label="库位"
             >
             </el-table-column>
+
             <el-table-column
-              prop="fTransferWarehouselocid"
+              prop="fWarehouseInformation"
               header-align="center"
-              width="150px"
+              width="240px"
               align="center"
-              label="*调入库"
+              label="*调入库"
             >
               <template slot-scope="scope">
-                <el-select
-                  v-model="scope.row.fTransferWarehouselocid"
-                  :disabled="browseStatus || scope.row.fBillstatus === 40 || !form.fWarehouseid"
-                  filterable
-                  remote
-                  style="width: 80%"
-                  @change="kqhouseRemoteMethod"
-                  :remote-method="kqhouseRemoteMethod"
-                  placeholder="请输入模糊查找"
+                <el-input
+                  placeholder="请选择"
+                  :disabled="!form.fWarehouseid || browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
+                  v-model="scope.row.fWarehouseInformation"
+                  @focus="getTreeselect(scope)"
                 >
-                  <el-option
-                    v-for="(dict, index) in kqhouseOptions"
-                    :key="index.fId"
-                    :label="dict.fName"
-                    :value="dict.fId"
-                  ></el-option>
-                </el-select>
+                </el-input>
               </template>
-            </el-table-column>
-            <el-table-column
+            </el-table-column>            <el-table-column
               prop="fPlanqty"
               header-align="center"
               align="center"
@@ -1430,6 +1428,28 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fBusinessType"
+              header-align="center"
+              align="center"
+              width="180px"
+              label="作业类型"
+            >
+              <el-select
+                style="width: 80%"
+                v-model="warehouseDrList.fBusinessType"
+                filterable
+                disabled
+              >
+                <el-option
+                  v-for="(dict,index) in businessTypeOption"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-table-column>
+
+            <el-table-column
               prop="fFeeunitid"
               header-align="center"
               align="center"
@@ -1507,6 +1527,29 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fStltypeid"
+              header-align="center"
+              align="center"
+              width="130px"
+              label="结算方式"
+            >
+              <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.fStltypeid"
+                  placeholder="请选择结算表票结、月结"
+                  :disabled="browseStatus"
+                >
+                  <el-option
+                    v-for="dict in fStltypeidOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                  ></el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+
+            <el-table-column
               prop="fCurrency"
               header-align="center"
               align="center"
@@ -1721,6 +1764,28 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fBusinessType"
+              header-align="center"
+              align="center"
+              width="180px"
+              label="作业类型"
+            >
+              <el-select
+                style="width: 80%"
+                v-model="warehouseDrList.fBusinessType"
+                filterable
+                disabled
+              >
+                <el-option
+                  v-for="(dict,index) in businessTypeOption"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-table-column>
+
+            <el-table-column
               prop="fFeeunitid"
               header-align="center"
               align="center"
@@ -1798,6 +1863,29 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fStltypeid"
+              header-align="center"
+              align="center"
+              width="130px"
+              label="结算方式"
+            >
+              <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.fStltypeid"
+                  placeholder="请选择结算表票结、月结"
+                  :disabled="browseStatus"
+                >
+                  <el-option
+                    v-for="dict in fStltypeidOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                  ></el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+
+            <el-table-column
               prop="fCurrency"
               header-align="center"
               align="center"
@@ -2003,13 +2091,6 @@
           >
           </el-table-column>
           <el-table-column
-            prop="fWarehouseLocationids"
-            header-align="center"
-            align="center"
-            label="库区"
-          >
-          </el-table-column>
-          <el-table-column
             prop="fMarks"
             header-align="center"
             align="center"
@@ -2200,6 +2281,20 @@
         </div>
       </el-dialog>
     </el-dialog>
+    <el-dialog
+      title="选择库位"
+      :data="treeselectList"
+      :visible.sync="choiceWarehouse"
+      width="30%"
+      :before-close="hanDleclose">
+      <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions" :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
+      <div>{{Warehouse}}</div>
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="choiceWarehouse = false">取 消</el-button>
+    <el-button type="primary" @click="confirm">确 定</el-button>
+  </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -2229,7 +2324,7 @@ import { listCorps } from "@/api/basicdata/corps";
 
 import { listFees, getFees } from "@/api/basicdata/fees";
 
-import { listWarehouse, treeselect } from '@/api/basicdata/warehouse'
+import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
 
 import { listArea } from "@/api/basicdata/area";
 
@@ -2256,8 +2351,18 @@ export default {
   },
   data() {
     return {
+      //控制选择库位弹出
+      choiceWarehouse:false,
+      information:'',
+      informationId:'',
+      inDex:'',
+      Warehouse:'',
+      //树状下来库位表
+      treeselectList:{
+        fWarehouselocid:null
+      },
       //仓库树状图
-      warehousesOptions:[],
+      fWarehouseidOptions:[],
       activeNames:['1'],
       //作业类型校验
       isrequired:2,
@@ -2380,6 +2485,8 @@ export default {
       fBilltypeOptions: [],
       // 状态(数据字典),N 入字典
       fBillstatusOptions: [],
+      //结算方式对应字典表
+      fStltypeidOptions:[],
       // 费用名称
       fWbuOptions: [],
       // 计价单位
@@ -2469,6 +2576,7 @@ export default {
         fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
         fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
         fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
+        fBusinessType: [{ required: true, message: " ", trigger: "blur"},],
         fbillingway: [
           {
             required: true,
@@ -2518,6 +2626,9 @@ export default {
     this.getDicts("st_trans_type").then((response) => {
       this.businessTypeOption = response.data;
     });
+    this.getDicts("data_stltype_type").then(response => {
+      this.fStltypeidOptions = response.data;
+    });
     this.register()
   },
   activated(){
@@ -2528,10 +2639,23 @@ export default {
   // },
   methods: {
     /** 查询部门下拉树结构 */
-    getTreeselect() {
-      treeselect().then(response => {
-        this.warehousesOptions = response.data;
-      });
+    getTreeselect(row) {
+      this.treeselectList.fWarehouselocid = null
+      this.inDex = row.$index
+      this.choiceWarehouse = true
+      treeselect(this.form.fWarehouseid).then(response => {
+        this.fWarehouseidOptions = response.data;
+      })
+      this.Warehouse = this.dataList[this.inDex].fWarehouseInformation
+    },
+    getAlltree(tree){
+      this.information = tree.fWarehouseInformation
+      this.informationId = tree.id
+    },
+    confirm(){
+      this.$set(this.dataList[this.inDex], 'fWarehouseInformation', this.information)
+      this.$set(this.dataList[this.inDex], 'fWarehouselocid', this.informationId)
+      this.choiceWarehouse = false
     },
     // 撤销审核
     backrRconciliation(){
@@ -2649,7 +2773,14 @@ export default {
 
       }
     },
-
+    //树状库位下拉关闭询问
+    hanDleclose(done){
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done();
+        })
+        .catch(_ => {});
+    },
     homepaGe(){
       let view = {
         fullPath: "/business/stockTransfer",
@@ -2880,7 +3011,9 @@ export default {
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks
+            fMarks:this.form.fMarks,
+            fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
+
           })
         } else {
           this.warehouseDrList.push({
@@ -2895,7 +3028,8 @@ export default {
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks
+            fMarks:this.form.fMarks,
+            fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
           })
         }
       }
@@ -3057,8 +3191,8 @@ export default {
     showEditDialog_ss() {
       if (this.printinglist.length > 0) {
         for (let warehouseCr in this.printinglist) {
-         if (!this.printinglist[warehouseCr].fTransferWarehouselocid) {
-            this.$message.error('请选择调拨库区')
+         if (!this.printinglist[warehouseCr].fWarehouseInformation) {
+            this.$message.error('请选择调入库位')
             return false
           } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== this.printinglist[0].fDriverName) {
             this.$message.error('请选择相同司机名')
@@ -3273,9 +3407,10 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
-      this.getTreeselect()
+      this.warehousesssMethod()
       this.reset();
       this.browseStatus = status;
+      this.contrOl = status;
       this.notChange = false
       this.queryUser();
       this.open = true;
@@ -3288,10 +3423,10 @@ export default {
       this.formBrowseStatus = false;
     },
     check_s(row,status){
-      this.getTreeselect()
       // this.disappear = true
       // this.notChange = true
       this.reset();
+      this.contrOl = true
       this.browseStatus = status;
       this.detailsHidden = false;
       let data = row || this.ids;
@@ -3371,7 +3506,6 @@ export default {
     },
 
     check(row,status,res){
-      this.getTreeselect()
       this.reset();
       this.disappear = false
       this.notChange = true
@@ -3457,9 +3591,10 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
-      this.getTreeselect()
       this.reset();
+
       this.browseStatus = status;
+      this.contrOl = status
       this.detailsHidden = false;
       this.formBrowseStatus = false;
       let fId = row.fId || this.ids;
@@ -3479,11 +3614,6 @@ export default {
             this.approvalStatus = true
           }
         }
-
-
-
-
-
         if (response.data.corps) {
           this.fMblnoOptions = response.data.corps;
           this.KHblnoOptions = response.data.corps;
@@ -3496,10 +3626,6 @@ export default {
           this.warehouseOptions = response.data.warehouse;
         }
 
-
-
-
-
         if (response.data.warehouseBillsItem) {
           this.dataList = response.data.warehouseBillsItem;
           for (let list in this.dataList) {
@@ -3513,10 +3639,6 @@ export default {
             this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
           }
         }
-
-
-
-
         if (response.data.enclosures) {
           this.relevantAttachments = response.data.enclosures;
         }
@@ -3743,10 +3865,10 @@ export default {
           if (!this.dataListSelection[warehouse].fGrossweight) {
             this.$message.error("请选择调拨毛重");
             return false;
-          } else if (!this.dataListSelection[warehouse].fTransferWarehouselocid) {
-            this.$message.error("请选择调拨库区");
+          } else if (!this.dataListSelection[warehouse].fWarehouseInformation) {
+            this.$message.error("请选择调入库位");
             return false;
-          } else if (this.dataListSelection[warehouse].fTransferWarehouselocid === this.dataListSelection[warehouse].fWarehouselocids) {
+          } else if (this.dataListSelection[warehouse].fWarehouseInformation === this.dataListSelection[warehouse].fWarehouselocids) {
             this.$message.error("调拨库区不得与原库区相同");
             return false;
           } else if (!this.dataListSelection[warehouse].fNetweight) {
@@ -3985,6 +4107,7 @@ export default {
             formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
             formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             addStockTransfer(formData).then((response) => {
+              console.log(response)
               this.msgSuccess('保存成功')
               this.form = response.data.warehouseBills
               this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
@@ -4043,8 +4166,8 @@ export default {
             this.$message.error('请输入调拨毛重!')
             return false
           }
-          if (!this.dataList[list].fTransferWarehouselocid || this.dataList[list].fTransferWarehouselocid === 0) {
-            this.$message.error('请选择调拨毛重!')
+          if (!this.dataList[list].fWarehouseInformation || this.dataList[list].fWarehouseInformation === 0) {
+            this.$message.error('请选择调拨仓库!')
             return false
           }
           if (this.dataList[list].fBillstatus !== 40) {
@@ -4181,6 +4304,13 @@ export default {
         }
       }
     },
+    /* 获取所有仓库信息 */
+    warehousesssMethod() {
+      let queryParams = { pageNum: 1, pageSize: 10, fStatus: 0, delFlag: 0 };
+      listWarehousesss(queryParams).then((response) => {
+        this.warehouseOptions = response.rows;
+      });
+    },
     /* 远程模糊查询劳务公司 */
     flabourRemoteMethod(name) {
       if (name == null || name === "") {