瀏覽代碼

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui into master

qukaidi 4 年之前
父節點
當前提交
a298c77e17

+ 3 - 3
src/views/kaihe/containerNews/modifyPage/index.vue

@@ -217,9 +217,9 @@
                 this.select[item].foldFCntrstatus = this.corpsList[li].cntrstatusName
                 this.$set(this.select[item],'FCntrstatus',this.corpsList[li].fCntrstatus)
               }
-              if (!this.select[item].foldtime) {
-                this.select[item].foldtime = this.corpsList[li].fUpdatetime
-              }
+              // if (!this.select[item].foldtime) {
+              //   this.select[item].foldtime = this.corpsList[li].fUpdatetime
+              // }
               this.select[item].fVsl = this.corpsList[li].fVsl
               this.select[item].fVoy = this.corpsList[li].fVoy
               this.select[item].fMblno = this.corpsList[li].fMblno

+ 9 - 6
src/views/track/cabinet/index.vue

@@ -15,7 +15,7 @@
               placeholder="请输入提单号"
               clearable
               size="small"
-              @keyup.enter.native="handleQuery"
+              @keyup.enter.native="handleQuery()"
               style="max-width: 187px"
             />
           </el-form-item>
@@ -125,7 +125,7 @@
                   placeholder="请输入提箱地点"
                   clearable
                   size="small"
-                  @keyup.enter.native="handleQuery"
+                  @keyup.enter.native="handleQuery()"
                   style="max-width: 187px"
                 />
               </el-form-item>
@@ -141,7 +141,7 @@
                   placeholder="请输入装卸货地点"
                   clearable
                   size="small"
-                  @keyup.enter.native="handleQuery"
+                  @keyup.enter.native="handleQuery()"
                   style="max-width: 187px"
                 /> </el-form-item
             ></el-col>
@@ -158,7 +158,7 @@
                   placeholder="请输入卸箱地点"
                   clearable
                   size="small"
-                  @keyup.enter.native="handleQuery"
+                  @keyup.enter.native="handleQuery()"
                   style="max-width: 187px"
                 /> </el-form-item
             ></el-col>
@@ -288,7 +288,7 @@
             type="cyan"
             icon="el-icon-search"
             size="mini"
-            @click="handleQuery"
+            @click="handleQuery()"
             >搜索</el-button
           >
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
@@ -521,6 +521,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         corpId: null,
+        carStatus: null,
         billType: null,
         transType: null,
         transProp: null,
@@ -1100,7 +1101,9 @@ export default {
     /** 搜索按钮操作 */
     handleQuery(Status) {
       this.queryParams.pageNum = 1;
-      this.queryParams.carStatus = Status;
+      if (Status) {
+        this.queryParams.carStatus = Status;
+      }
       this.getList();
     },
     /** 重置按钮操作 */

+ 2 - 2
src/views/track/singleCost/index.vue

@@ -709,8 +709,8 @@ export default {
     getList() {
       this.loading = true;
       listFtmsorderbillsplans(this.queryParams).then((response) => {
-        this.ftmsorderbillsList = response.rows;
-        this.total = response.total;
+        this.ftmsorderbillsList = response.dataTable.rows;
+        this.total = response.dataTable.total;
         this.loading = false;
       });
     },

+ 240 - 107
src/views/warehouseBusiness/cargoClearance/index.vue

@@ -245,6 +245,18 @@
           >导入
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
+
       <div class="tabSetting">
         <right-toolbar
           :showSearch.sync="showSearch"
@@ -2892,6 +2904,7 @@ export default {
   },
   data() {
     return {
+      idCopy:'',
       //全屏放大
       dialogFull:false,
       drag: false,
@@ -3790,13 +3803,17 @@ export default {
           if (response.data.warehousebillsfeesDr) {
             this.warehouseDrList = response.data.warehousebillsfeesDr;
             for (let dr in this.warehouseDrList) {
-              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
             }
           }
           if (response.data.warehousebillsfeesCr) {
             this.warehouseCrList = response.data.warehousebillsfeesCr;
             for (let cr in this.warehouseCrList) {
-              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              if (this.warehouseCrList[cr].fFeeunitid !== null) {
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              }
             }
           }
           // if (response.data.sysUser) {
@@ -4522,9 +4539,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection;
-      // this.ids = selection.map((item) => item.fId);
-
+      // this.ids = selection;
+      this.ids = selection.map((item) => item.fId);
+      this.idCopy = this.ids[0]
       this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
       this.multiple = !selection.length;
     },
@@ -4613,13 +4630,16 @@ export default {
         if (response.data.warehouse) {
           this.warehouseDrList = response.data.warehousebillsfeesDr;
           for (let dr in this.warehouseDrList) {
-            this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
-          }
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            }          }
         }
         if (response.data.warehousebillsfeesCr) {
           this.warehouseCrList = response.data.warehousebillsfeesCr;
           for (let cr in this.warehouseCrList) {
-            this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+            if (this.warehouseCrList[cr].fFeeunitid !== null) {
+              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+            }
           }
         }
         // if (response.data.sysUser) {
@@ -4712,13 +4732,17 @@ export default {
         if (response.data.warehousebillsfeesDr) {
           this.warehouseDrList = response.data.warehousebillsfeesDr;
           for (let dr in this.warehouseDrList) {
-            this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            }
           }
         }
         if (response.data.warehousebillsfeesCr) {
           this.warehouseCrList = response.data.warehousebillsfeesCr;
           for (let cr in this.warehouseCrList) {
-            this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+            if (this.warehouseCrList[cr].fFeeunitid !== null) {
+              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+            }
           }
         }
         if (response.data.sysUser) {
@@ -4755,112 +4779,219 @@ export default {
       listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
-      this.reset();
-      this.browseStatus = status;
-      this.contrOl = status
-      this.detailsHidden = false;
-      this.formBrowseStatus = false;
-      let fId = row.fId || this.ids;
-      if (fId.length === 1){
-        fId = fId[0].fId
-      }
-      this.dataList = [];
-      getStockTransfer(fId).then((response) => {
-        console.log(response)
-        if (response.data.warehousebills) {
-          this.form = response.data.warehousebills;
-          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
-          this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
-          this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
-          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
-          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
-          this.$set(this.form, "fNewTrademodeid",this.form.fNewTrademodeid + '');
-          this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
-          if(this.form.fBillstatus > 2){
-            this.approvalStatus = false
-          }else{
-            this.approvalStatus = true
+      if(status === 2){
+        getStockTransfer(this.idCopy).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            queryUserVal().then((response) => {
+              this.Lander = response.user.userName
+              this.form.fStorekeeper = response.user.nickName
+              this.form.createBy = response.user.userName
+              this.Operator = this.form.createBy
+            })
+            this.form.fId = null
+            this.form.fBillstatus = 1
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
+            this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
+            this.$set(this.form, "fNewTrademodeid", this.form.fNewTrademodeid + '');
+            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+            this.$set(this.form, "fBillno", null);
           }
-        }
-        if (response.data.corps) {
-          this.flabourOptions = response.data.corps;
-          this.fMblnoOptions = response.data.corps;
-          this.KHblnoOptions = response.data.corps;
-          this.fCompanyOptIons = response.data.corps;
-          this.fleetOptions = response.data.corps;
-          this.Operator = response.data.corps[0].createBy
+          if (response.data.corps) {
+            this.flabourOptions = response.data.corps;
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fCompanyOptIons = response.data.corps;
+            this.fleetOptions = response.data.corps;
+            // this.Operator = response.data.corps[0].createBy
 
-        }
-        if (response.data.feesList) {
-          this.fWbuOptions = response.data.feesList;
-        }
-        if (response.data.warehouse) {
-          this.warehouseOptions = response.data.warehouse;
-        }
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
 
-        if (response.data.warehouseBillsItem) {
-          this.dataList = response.data.warehouseBillsItem;
-          for (let list in this.dataList) {
-            if (!this.form.fMblno) {
-              this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (!this.form.fMblno) {
+                this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+              }
+              this.$set(this.dataList[list], 'fBillstatus', 10)
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              this.$set(this.dataList[list], 'fSerialNumber', null)
+              this.$set(this.dataList[list], 'fId', null)
             }
-            if (this.dataList[list].fBillstatus > 10) {
-              this.formBrowseStatus = true;
+          }
+          if (response.data.warehousebillsfeesDr) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+            for (let dr in this.warehouseDrList) {
+              this.$set(this.warehouseDrList[dr], "fBillstatus", 1);
+              this.$set(this.warehouseDrList[dr], "fId", null);
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
             }
-            this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
-            this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
           }
-        }
-        if (response.data.enclosures) {
-          this.relevantAttachments = response.data.enclosures;
-        }
-        if (response.data.warehouse) {
-          this.warehouseDrList = response.data.warehousebillsfeesDr;
-        }
-        if (response.data.warehousebillsfeesDr) {
-          this.warehouseDrList = response.data.warehousebillsfeesDr;
-          for (let dr in this.warehouseDrList) {
-            this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+          if (response.data.warehousebillsfeesCr) {
+            this.warehouseCrList = response.data.warehousebillsfeesCr;
+            for (let cr in this.warehouseCrList) {
+              this.$set(this.warehouseCrList[cr], "fBillstatus", 1);
+              this.$set(this.warehouseCrList[cr], "fId", null);
+              if (this.warehouseCrList[cr].fFeeunitid !== null) {
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              }
+            }
           }
-        }
-        if (response.data.warehousebillsfeesCr) {
-          this.warehouseCrList = response.data.warehousebillsfeesCr;
-          for (let cr in this.warehouseCrList) {
-            this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+          // if (response.data.sysUser) {
+          //   // this.userVal = response.data.sysUser
+          //   this.userOptions = response.data.sysUser;
+          //
+          // }
+          if (response.data.dept) {
+            this.deptOptions = []
+            this.deptOptions.push(response.data.dept)
           }
-        }
-        // if (response.data.sysUser) {
-        //   // this.userVal = response.data.sysUser
-        //   this.userOptions = response.data.sysUser;
-        //
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.goodsList) {
+            this.goodsOptions = response.data.goodsList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseAreas) {
+            this.kqhouseOptions = response.data.warehouseAreas;
+          }
+          this.open = true;
+          this.title = "修改调拨";
+
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1, };
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
+          this.register()
+        });
+
+      }else{
+        this.reset();
+        this.browseStatus = status;
+        this.contrOl = status
+        this.detailsHidden = false;
+        this.formBrowseStatus = false;
+        let fId = row.fId || this.ids;
+        // if (fId.length === 1){
+        //   fId = fId[0].fId
         // }
-        if (response.data.dept) {
-          this.deptOptions = []
-          this.deptOptions.push(response.data.dept)
-        }
-        if (response.data.feesList) {
-          this.fWbuOptions = response.data.feesList;
-        }
-        if (response.data.goodsList) {
-          this.goodsOptions = response.data.goodsList;
-        }
-        if (response.data.warehouse) {
-          this.warehouseOptions = response.data.warehouse;
-        }
-        if (response.data.warehouseAreas) {
-          this.kqhouseOptions = response.data.warehouseAreas;
-        }
-        this.open = true;
-        this.title = "修改调拨";
+        this.dataList = [];
+        getStockTransfer(fId).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
+            this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
+            this.$set(this.form, "fNewTrademodeid",this.form.fNewTrademodeid + '');
+            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+            if(this.form.fBillstatus > 2){
+              this.approvalStatus = false
+            }else{
+              this.approvalStatus = true
+            }
+          }
+          if (response.data.corps) {
+            this.flabourOptions = response.data.corps;
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fCompanyOptIons = response.data.corps;
+            this.fleetOptions = response.data.corps;
+            this.Operator = response.data.corps[0].createBy
 
-        this.warehousesssMethod()
-        this.fWbuOptions = []
-        let queryParams = { pageNum: 1, };
-        listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (!this.form.fMblno) {
+                this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+              }
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+              }
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+            }
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          if (response.data.warehouse) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+          }
+          if (response.data.warehousebillsfeesDr) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+            for (let dr in this.warehouseDrList) {
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }            }
+          }
+          if (response.data.warehousebillsfeesCr) {
+            this.warehouseCrList = response.data.warehousebillsfeesCr;
+            for (let cr in this.warehouseCrList) {
+              if(this.warehouseCrList[cr].fFeeunitid !== null){
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              }            }
+          }
+          // if (response.data.sysUser) {
+          //   // this.userVal = response.data.sysUser
+          //   this.userOptions = response.data.sysUser;
+          //
+          // }
+          if (response.data.dept) {
+            this.deptOptions = []
+            this.deptOptions.push(response.data.dept)
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.goodsList) {
+            this.goodsOptions = response.data.goodsList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseAreas) {
+            this.kqhouseOptions = response.data.warehouseAreas;
+          }
+          this.open = true;
+          this.title = "修改调拨";
+
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1, };
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
+          this.register()
         });
-        this.register()
-      });
+
+      }
     },
     // 数量计算
     changeContractAmt(row) {
@@ -5789,10 +5920,12 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, fName: name };
+      let queryParams = { pageNum: 1, fDc:'C',fName:name};
       listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
         this.fCNameOptions = response.rows;
+      });
+      let query = { pageNum: 1, fDc:'D',fName:name};
+      listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
     },

+ 173 - 68
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -233,6 +233,17 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
       <div class="tabSetting">
         <right-toolbar
           :showSearch.sync="showSearch"
@@ -1908,6 +1919,7 @@
     },
     data() {
       return {
+        idCopy:'',
         //全屏放大
         dialogFull:false,
         drag: false,
@@ -1920,6 +1932,20 @@
             width: 100,
           },
           {
+            surface: "13",
+            label: "fItemsStatus",
+            name: "货转状态",
+            checked: 0,
+            width: 100,
+          },
+          {
+            surface: "14",
+            label: "fBillstatus",
+            name: "费用状态",
+            checked: 0,
+            width: 100,
+          },
+          {
             surface: "2",
             label: "fCorpid",
             name: "货权方",
@@ -1996,6 +2022,16 @@
             checked: 0,
             width: 100,
           },
+
+        ],
+        getRowList: [
+          {
+            surface: "1",
+            label: "createBy",
+            name: "制单人",
+            checked: 0,
+            width: 100,
+          },
           {
             surface: "13",
             label: "fItemsStatus",
@@ -2010,15 +2046,6 @@
             checked: 0,
             width: 100,
           },
-        ],
-        getRowList: [
-          {
-            surface: "1",
-            label: "createBy",
-            name: "制单人",
-            checked: 0,
-            width: 100,
-          },
           {
             surface: "2",
             label: "fCorpid",
@@ -2096,20 +2123,6 @@
             checked: 0,
             width: 100,
           },
-          {
-            surface: "13",
-            label: "fItemsStatus",
-            name: "货转状态",
-            checked: 0,
-            width: 100,
-          },
-          {
-            surface: "14",
-            label: "fBillstatus",
-            name: "费用状态",
-            checked: 0,
-            width: 100,
-          },
         ],
         allCheck: false,
         showSetting:false,
@@ -2359,6 +2372,14 @@
       this.register()
       this.warehousesssMethod()
       this.getRow();
+      let queryParams = { pageNum: 1, fDc:'C'};
+      listFees(queryParams).then((response) => {
+        this.fCNameOptions = response.rows;
+      });
+      let query = { pageNum: 1, fDc:'D'};
+      listFees(query).then((response) => {
+        this.fDNameOptions = response.rows;
+      });
     },
     activated(){
       this.Jump()
@@ -2846,6 +2867,7 @@
       /** 查询仓库主(出入库)列表 */
       getList() {
         this.loading = true
+
         listGoodsTransfer(this.queryParams).then((response) => {
           console.log(response)
           this.goodsTransferList = response.rows
@@ -2980,6 +3002,7 @@
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.ids = selection.map((item) => item.fId)
+        this.idCopy = this.ids[0]
         this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4
         this.multiple = !selection.length
       },
@@ -2998,6 +3021,14 @@
         this.title = '货权转移'
       },
       check_s(row) {
+        let queryParams = { pageNum: 1, fDc:'C'};
+        listFees(queryParams).then((response) => {
+          this.fCNameOptions = response.rows;
+        });
+        let query = { pageNum: 1, fDc:'D'};
+        listFees(query).then((response) => {
+          this.fDNameOptions = response.rows;
+        });
         this.disappear = true
         this.notChange = true
         this.browseStatus = true
@@ -3046,6 +3077,14 @@
 
       // 查看按钮
       check(row) {
+        let queryParams = { pageNum: 1, fDc:'C'};
+        listFees(queryParams).then((response) => {
+          this.fCNameOptions = response.rows;
+        });
+        let query = { pageNum: 1, fDc:'D'};
+        listFees(query).then((response) => {
+          this.fDNameOptions = response.rows;
+        });
         this.disappear = false
         this.notChange = true
         this.browseStatus = true
@@ -3094,51 +3133,115 @@
 
       /** 修改按钮操作 */
       handleUpdate(row, status) {
-        this.reset()
-        this.notChange = false
-        this.browseStatus = status
-        const fId = row.fId || this.ids
-        getGoodsTransfer(fId).then((response) => {
-          this.form = response.data.warehousebills
-          this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-          this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
-          this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-          this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-          this.fMblnoOptions = response.data.corps
-          this.KHblnoOptions = response.data.corps
-          this.fWbuOptions = response.data.feesList
-          this.warehouseOptions = response.data.warehouse
-          this.dataList = response.data.warehouseBillsItem
-          for (let list in this.dataList) {
-            if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
-              this.formBrowseStatus = true
+        if(status === 2){
+          this.goodsRemoteMethod()
+          getGoodsTransfer(this.idCopy).then((response) => {
+            if (response.data.warehousebills) {
+              this.form = response.data.warehousebills
+              queryUserVal().then((response) => {
+                this.Lander = response.user.userName
+                this.form.fStorekeeper = response.user.nickName
+                this.form.createBy = response.user.userName
+                this.Operator = this.form.createBy
+              })
+              this.form.fId = null
+              this.form.fBillstatus = 1
+              this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+              this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
+              this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+              this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+              this.$set(this.form, "fBillno", null);
             }
-            this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
-            this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
-          }
-          this.goodsOptions = response.data.goodsList
-          if (response.data.warehousebillsfeesDr) {
-            this.warehouseDrList = response.data.warehousebillsfeesDr
-            for (let dr in this.warehouseDrList) {
-              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            this.fMblnoOptions = response.data.corps
+            this.KHblnoOptions = response.data.corps
+            this.fWbuOptions = response.data.feesList
+            this.warehouseOptions = response.data.warehouse
+            this.dataList = response.data.warehouseBillsItem
+            for (let list in this.dataList) {
+              // if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
+              //   this.formBrowseStatus = true
+              // }
+              this.$set(this.dataList[list], 'fBillstatus', 1)
+              this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              this.$set(this.dataList[list], 'fId', null)
             }
-          }
-          if (response.data.warehousebillsfeesCr) {
-            this.warehouseCrList = response.data.warehousebillsfeesCr
-            for (let cr in this.warehouseCrList) {
-              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+            this.goodsOptions = response.data.goodsList
+            if (response.data.warehousebillsfeesDr) {
+              this.warehouseDrList = response.data.warehousebillsfeesDr
+              for (let dr in this.warehouseDrList) {
+                this.$set(this.warehouseDrList[dr], "fBillstatus", 1);
+                this.$set(this.warehouseDrList[dr], "fId", null);
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
             }
-          }
-          if (response.data.enclosures) {
-            this.relevantAttachments = response.data.enclosures;
-          }
-          this.userOptions = response.data.sysUser
-          this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
-          this.open = true
-          this.title = '修改货存转移'
+            if (response.data.warehousebillsfeesCr) {
+              this.warehouseCrList = response.data.warehousebillsfeesCr
+              for (let cr in this.warehouseCrList) {
+                this.$set(this.warehouseCrList[cr], "fBillstatus", 1);
+                this.$set(this.warehouseCrList[cr], "fId", null);
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+              }
+            }
+            if (response.data.enclosures) {
+              this.relevantAttachments = response.data.enclosures;
+            }
+            this.userOptions = response.data.sysUser
+            this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+            this.open = true
+            this.title = '修改货存转移'
 
-          this.warehousesssMethod()
-        })
+            this.warehousesssMethod()
+          })
+
+        }else {
+          this.reset()
+          this.notChange = false
+          this.browseStatus = status
+          const fId = row.fId || this.ids
+          getGoodsTransfer(fId).then((response) => {
+            this.form = response.data.warehousebills
+            this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+            this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
+            this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+            this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+            this.fMblnoOptions = response.data.corps
+            this.KHblnoOptions = response.data.corps
+            this.fWbuOptions = response.data.feesList
+            this.warehouseOptions = response.data.warehouse
+            this.dataList = response.data.warehouseBillsItem
+            for (let list in this.dataList) {
+              if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
+                this.formBrowseStatus = true
+              }
+              this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+            }
+            this.goodsOptions = response.data.goodsList
+            if (response.data.warehousebillsfeesDr) {
+              this.warehouseDrList = response.data.warehousebillsfeesDr
+              for (let dr in this.warehouseDrList) {
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
+            }
+            if (response.data.warehousebillsfeesCr) {
+              this.warehouseCrList = response.data.warehousebillsfeesCr
+              for (let cr in this.warehouseCrList) {
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+              }
+            }
+            if (response.data.enclosures) {
+              this.relevantAttachments = response.data.enclosures;
+            }
+            this.userOptions = response.data.sysUser
+            this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+            this.open = true
+            this.title = '修改货存转移'
+
+            this.warehousesssMethod()
+          })
+
+        }
       },
       // 库存明细合计
       getSummaries(param) {
@@ -3714,12 +3817,14 @@
         if (name == null || name === '') {
           return false
         }
-        let queryParams = { pageNum: 1, fName: name }
+        let queryParams = { pageNum: 1, fDc:'C',fName:name};
         listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows
-          this.fDNameOptions = response.rows;
           this.fCNameOptions = response.rows;
-        })
+        });
+        let query = { pageNum: 1, fDc:'D',fName:name};
+        listFees(query).then((response) => {
+          this.fDNameOptions = response.rows;
+        });
       },
       /* 远程模糊查询经营单位 */
       fSbuRemoteMethod(name) {

+ 229 - 138
src/views/warehouseBusiness/inStock/index.vue

@@ -257,6 +257,17 @@
         >导入
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
       <div class="tabSetting">
         <right-toolbar
           :showSearch.sync="showSearch"
@@ -3121,6 +3132,7 @@ export default {
   },
   data() {
     return {
+      idCopy:'',
       //全屏放大
       dialogFull:false,
       //自定义列宽属性
@@ -4577,42 +4589,28 @@ export default {
       if (this.form.fDriverIdCar) {
         fDriverIdCar = this.form.fDriverIdCar
       }
-      console.log(this.goodsOptions)
-      for (let item in this.goodsOptions){
-        if (this.form.fGoodsid == this.goodsOptions[item].fId){
-          this.dataList.push({
-            fBsdate: this.form.fBsdate,
-            fGoodsid: this.form.fGoodsid,
-            fGoodsids:this.goodsOptions[item].fName,
-            fCntrtype: null,
-            fCntqty: 1,
-            fNetweight: this.planningList.fPlannetweight,
-            fPlanvolumn: 0,
-            fGrossweight: this.planningList.fPlangrossweight,
-            fQty: this.planningList.fPlanqty,
-            fPackagespecs: null,
-            fWarehouselocid: null,
-            fBoxno: null,
-            fMarks: null,
-            fGoodsval: null,
-            fTruckno: fTruckno,
-            fDriverTel: fDriverTel,
-            fDriverName: fDriverName,
-            fDriverIdCar: fDriverIdCar,
-            remark: null,
-            fBillstatus: 10,
-            fMblno:this.form.fMblno
-          });
-        }
-      }
-      if(this.dataList[0].fGoodsid){
-        for(let item in this.goodsOptions){
-          if(this.goodsOptions[item].fId == this.dataList[0].fGoodsid){
-            console.log("111")
-            this.form.fProductName = this.goodsOptions[item].fName
-          }
-        }
-      }
+      this.dataList.push({
+        fBsdate: this.form.fBsdate,
+        fGoodsid: this.form.fGoodsid,
+        fCntrtype: null,
+        fCntqty: 1,
+        fNetweight: this.planningList.fPlannetweight,
+        fPlanvolumn: 0,
+        fGrossweight: this.planningList.fPlangrossweight,
+        fQty: this.planningList.fPlanqty,
+        fPackagespecs: null,
+        fWarehouselocid: null,
+        fBoxno: null,
+        fMarks: null,
+        fGoodsval: null,
+        fTruckno: fTruckno,
+        fDriverTel: fDriverTel,
+        fDriverName: fDriverName,
+        fDriverIdCar: fDriverIdCar,
+        remark: null,
+        fBillstatus: 10,
+        fMblno:this.form.fMblno
+      });
       this.weightList = false;
       // this.contrOl = true
       // 查询库区下 所有库位
@@ -4628,7 +4626,9 @@ export default {
       } else {
         for (let zhgen in this.dialogWhgenlegList) {
           let feeId = this.dialogWhgenlegList[zhgen].feeFId;
+
           getFees(feeId).then((response) => {
+            console.log(response)
             this.fWbuOptions = []
             let queryParams = { pageNum: 1,  fDc:'C'};
             listFees(queryParams).then((response) => {
@@ -4638,7 +4638,6 @@ export default {
             listFees(query).then((response) => {
               this.fDNameOptions = response.rows;
             });
-
           });
           let qty = 1;
           if (this.dialogWhgenlegList[zhgen].fFeeUnitid == 1) {
@@ -4670,6 +4669,7 @@ export default {
               fSrcTypeId:this.dialogWhgenlegList[zhgen].fId
             })
           }else{
+            console.log(this.dialogWhgenlegList[zhgen])
             this.warehouseCrList.push({
               fQty: qty,
               fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
@@ -4827,6 +4827,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map((item) => item.fId);
+      this.idCopy = this.ids[0]
       this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
       this.multiple = !selection.length;
     },
@@ -4914,105 +4915,197 @@ export default {
       listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
-      this.dataList = []
-      this.reset()
-      this.browseStatus = status;
-      this.detailsHidden = false;
-      this.formBrowseStatus = false;
-      const fId = row.fId || this.ids;
-      this.goodsRemoteMethod()
-      getWarehousebills(fId).then((response) => {
-        if(response.data.enclosures){
-          for(let item in response.data.enclosures){
-            this.fUrl = response.data.enclosures[item].fUrl
+      if(status === 2){
+        this.goodsRemoteMethod()
+        getWarehousebills(this.idCopy).then((response) => {
+          if(response.data.enclosures){
+            for(let item in response.data.enclosures){
+              this.fUrl = response.data.enclosures[item].fUrl
+            }
           }
-        }
-        if (response.data.warehousebills) {
-          this.form = response.data.warehousebills;
-          this.before = this.form.createBy
-          if (this.form.fBillstatus > 2) {
-            this.approvalStatus = false;
-          } else {
-            this.fMblno = true;
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills
+            queryUserVal().then((response)=>{
+              this.userVal = response.user;
+              this.current = response.user.userName
+              this.form.fStorekeeper = response.user.nickName
+              this.form.createBy = response.user.userName
+              this.before = this.form.createBy
+            })
+            this.form.fId = null
+            this.form.fBillstatus = 1
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+            this.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+            this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+            this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
+            this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
+            this.$set(this.form, "fBillno", null);
+            this.$set(this.form, "fBscorpno", null);
+            this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
           }
-          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
-          this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
-          this.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
-          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
-          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
-          this.$set(this.form, "createTime", Date.parse(this.form.createTime));
-          this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
-          this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
-          this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
-        }
-        if (response.data.warehouseBillsItem) {
-          this.dataList = response.data.warehouseBillsItem;
-          for (let list in this.dataList) {
-            this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
-            if (this.dataList[list].fBillstatus > 10) {
-              this.formBrowseStatus = true;
-              this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
-            }else{
-              this.formBrowseStatus = false;
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              this.$set(this.dataList[list], 'fBillstatus', 10)
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              this.$set(this.dataList[list], 'fSerialNumber', null)
+              this.$set(this.dataList[list], 'fId', null)
             }
-            if(this.dataList[list].fBillstatus === 40){
-              this.contrOl = true
-            }else{
-              this.contrOl = false
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fCompanyOptIons = response.data.corps;
+            this.fleetOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+          for (let dr in this.warehouseDrList) {
+            this.$set(this.warehouseDrList[dr], "fBillstatus", 1);
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
             }
+            this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+            this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+            this.$set(this.warehouseDrList[dr], "fId", null);
+
           }
-        }
-        if (response.data.corps) {
-          this.fMblnoOptions = response.data.corps;
-          this.KHblnoOptions = response.data.corps;
-          this.fCompanyOptIons = response.data.corps;
-          this.fleetOptions = response.data.corps;
-        }
-        if (response.data.feesList) {
-          this.fWbuOptions = response.data.feesList;
-        }
-        if (response.data.warehouse) {
-          this.warehouseOptions = response.data.warehouse;
-        }
-        if (response.data.warehouseBillsItem) {
-          this.dataList = response.data.warehouseBillsItem;
-          for(let list in this.dataList){
-            if (this.dataList[list].fBillstatus > 10) {
-              this.formBrowseStatus = true;
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+          for (let cr in this.warehouseCrList) {
+            this.$set(this.warehouseCrList[cr], "fBillstatus", 1);
+            if(this.warehouseCrList[cr].fFeeunitid !== null){
+              this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
             }
+            this.$set(this.warehouseCrList[cr], "fId", null);
           }
-        }
-        if (response.data.enclosures) {
-          this.relevantAttachments = response.data.enclosures;
-        }
-        for (let list in this.dataList) {
-          this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
-        }
-        // this.kqhouseOptions = response.data.warehouseAreas;
-        this.warehouseDrList = response.data.warehousebillsfeesDr;
-        for (let dr in this.warehouseDrList) {
-          this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
-          this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
-          this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
-        }
-        this.warehouseCrList = response.data.warehousebillsfeesCr;
-        for (let cr in this.warehouseCrList) {
-          this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
-        }
-        this.userOptions = response.data.sysUser;
-        // this.warehouseDrList[0].fBusinessType = this.form.fBusinessType
-        this.open = true;
-        this.title = "修改仓入库";
-        this.warehousesssMethod()
-        this.fWbuOptions = []
-        let queryParams = { pageNum: 1,};
-        listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.userOptions = response.data.sysUser;
+          this.open = true;
+          this.title = "修改仓入库";
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1,};
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
         });
-      });
-      queryUserVal().then((response)=>{
-        this.current = response.user.userName
-      })
+      }else{
+        this.dataList = []
+        this.reset()
+        this.browseStatus = status;
+        this.detailsHidden = false;
+        this.formBrowseStatus = false;
+        const fId = row.fId || this.ids;
+        this.goodsRemoteMethod()
+        getWarehousebills(fId).then((response) => {
+          if(response.data.enclosures){
+            for(let item in response.data.enclosures){
+              this.fUrl = response.data.enclosures[item].fUrl
+            }
+          }
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            this.before = this.form.createBy
+            if (this.form.fBillstatus > 2) {
+              this.approvalStatus = false;
+            } else {
+              this.fMblno = true;
+            }
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+            this.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+            this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+            this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
+            this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
+            this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+                this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+              }else{
+                this.formBrowseStatus = false;
+              }
+              if(this.dataList[list].fBillstatus === 40){
+                this.contrOl = true
+              }else{
+                this.contrOl = false
+              }
+            }
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fCompanyOptIons = response.data.corps;
+            this.fleetOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for(let list in this.dataList){
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+              }
+            }
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          for (let list in this.dataList) {
+            this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+          }
+          // this.kqhouseOptions = response.data.warehouseAreas;
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+          for (let dr in this.warehouseDrList) {
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
+            }
+            this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+            this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+          }
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+          for (let cr in this.warehouseCrList) {
+            if(this.warehouseCrList[cr].fFeeunitid !== null){
+              this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
+            }
+          }
+          this.userOptions = response.data.sysUser;
+          // this.warehouseDrList[0].fBusinessType = this.form.fBusinessType
+          this.open = true;
+          this.title = "修改仓入库";
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1,};
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
+        });
+        queryUserVal().then((response)=>{
+          this.current = response.user.userName
+        })
+      }
+
+    },
+    bugadd(res){
+      this.form.createBy = res
     },
     // 库存总账多选框
     whgenlegSelectionChange(selection) {
@@ -5650,19 +5743,13 @@ export default {
       let fMarks = []
       let fGoodsid = []
       for (let li in this.dataList) {
-        console.log(this.dataList)
         if (this.dataList[li].fMarks) {
           fMarks.push(this.dataList[li].fMarks)
         }
-        if (this.dataList[li].fGoodsids){
-          fGoodsid.push(this.dataList[li].fGoodsids)
-          console.log(fGoodsid)
-        }
-        console.log(this.dataList[li])
+        fGoodsid.push(this.dataList[li].fGoodsids)
       }
       this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
       this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
-      console.log(fGoodsid)
     },
     //作业类型校验
     educationChange() {
@@ -5703,6 +5790,7 @@ export default {
             let formDatae = new window.FormData()
             // 附件数据
             this.form.fBillingway = this.form.fFeetunit
+              console.log(this.warehouseCrList)
             // this.form.fBstime = JSON.stringify(this.form.fBstime)
             formDatae.append('tWarehouseBills', JSON.stringify(this.form))
             // 库存明细
@@ -5992,6 +6080,7 @@ export default {
       listCorps(queryParams).then((response) => {
         this.fMblnoOptions = response.rows;
         this.KHblnoOptions = response.rows;
+        console.log(this.KHblnoOptions)
       });
     },
     /* 远程模糊查询质押银行 */
@@ -6033,11 +6122,13 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, fName: name };
+      let queryParams = { pageNum: 1, fDc:'C',fName:name};
       listFees(queryParams).then((response) => {
-        this.fDNameOptions = response.rows;
         this.fCNameOptions = response.rows;
-        this.fWbuOptions = response.rows
+      });
+      let query = { pageNum: 1, fDc:'D',fName:name};
+      listFees(query).then((response) => {
+        this.fDNameOptions = response.rows;
       });
     },
     /* 远程模糊查询劳务公司 */

+ 196 - 96
src/views/warehouseBusiness/outStock/index.vue

@@ -244,6 +244,17 @@
           >导入
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
       <div class="tabSetting">
         <right-toolbar
           :showSearch.sync="showSearch"
@@ -1318,7 +1329,7 @@
               header-align="center"
               width="130px"
               align="center"
-              label="*司机名"
+              label="司机名"
             >
               <template slot-scope="scope">
                 <el-input
@@ -1335,7 +1346,7 @@
               header-align="center"
               width="130px"
               align="center"
-              label="*司机电话"
+              label="司机电话"
             >
               <template slot-scope="scope">
                 <el-input
@@ -1352,7 +1363,7 @@
               header-align="center"
               width="200px"
               align="center"
-              label="*司机身份证"
+              label="司机身份证"
             >
               <template slot-scope="scope">
                 <el-input
@@ -2995,6 +3006,7 @@ export default {
   },
   data() {
     return {
+      idCopy:'',
       //全屏放大
       dialogFull:false,
       drag: false,
@@ -3577,6 +3589,7 @@ export default {
       this.businessTypeOption = response.data;
     });
     this.getDicts("sys_car_type").then((response) => {
+      console.log(response)
       this.fCartypeOptions = response.data;
     });
 
@@ -3949,12 +3962,14 @@ export default {
       this.costStatus = status
       if (!this.form.fCorpid) {
         this.$message({ message: "请维护货权方", type: "warning", });
-      }else if(this.form.fProductName == undefined) {
-        this.$message({
-          message: "请维护入库明细品名",
-          type: "warning",
-        });
-      } else {
+      }
+      // else if(this.form.fProductName == undefined) {
+      //   this.$message({
+      //     message: "请维护入库明细品名",
+      //     type: "warning",
+      //   });
+      // }
+      else {
         this.whgenlegList = [];
         this.dialogWhgenlegList = [];
         this.whgenlegTotal = 0;
@@ -4602,6 +4617,7 @@ export default {
     },
     // 取消按钮
     cancel() {
+      this.idCopy = null
       this.open = false;
       this.fGrossweight = 0
       this.fNetweight = 0
@@ -4710,8 +4726,11 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection;
-      // this.ids = selection.map((item) => item.fId);
+      // this.ids = selection;
+
+      this.ids = selection.map((item) => item.fId);
+      this.idCopy = this.ids[0]
+      console.log(this.idCopy)
       this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
       this.multiple = !selection.length;
     },
@@ -4752,95 +4771,174 @@ export default {
       listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
-      this.reset();
-      // if (this.dataList.length === 0){
-      //   this.contrOl = true
-      // }
-      this.browseStatus = status;
-      this.contrOl = status
-      this.detailsHidden = false;
-      this.formBrowseStatus = false;
-      let fId = row.fId || this.ids;
-      this.dataList = [];
-      this.goodsRemoteMethod()
-      if (fId.length === 1){
-        fId = fId[0].fId
-      }
-      getWarehousebills(fId).then((response) => {
-        if (response.data.warehousebills) {
-          this.form = response.data.warehousebills;
-          this.before = this.form.createBy
-          this.$set(this.form,'fCartype',response.data.warehousebills.fCartype + '')
-          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
-          this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
-          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
-          this.$set(this.form, "createTime", Date.parse(this.form.createTime));
-          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
-          if (this.form.fBillstatus > 2) {
-            this.approvalStatus = false;
-          } else {
-            this.approvalStatus = true;
+      if(status === 2){
+        this.goodsRemoteMethod()
+        getWarehousebills(this.idCopy).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            queryUserVal().then((response) => {
+              this.current = response.user.userName
+              this.form.fStorekeeper = response.user.nickName
+              this.form.createBy = response.user.userName
+              this.before = this.form.createBy
+            })
+            this.form.fId = null
+            this.form.fBillstatus = 1
+            this.$set(this.form, 'fCartype', response.data.warehousebills.fCartype + '')
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+            this.$set(this.form, "fBillno", null);
           }
-        }
-        if (response.data.warehouseBillsItem) {
-          this.dataList = response.data.warehouseBillsItem;
-          for (let list in this.dataList) {
-            this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
-            if (this.dataList[list].fBillstatus > 10) {
-              this.formBrowseStatus = true;
-              this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              this.$set(this.dataList[list], 'fBillstatus', 10)
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              this.$set(this.dataList[list], 'fSerialNumber', null)
+              this.$set(this.dataList[list], 'fId', null)
             }
-            if(this.dataList[list].fBillstatus === 40){
-              this.contrOl = true
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          this.goodsOptions = response.data.goodsList;
+          this.kqhouseOptions = response.data.warehouseAreas;
+          if(response.data.warehousebillsfeesDr){
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+            for (let dr in this.warehouseDrList) {
+              console.log(this.warehouseDrList[dr])
+              this.$set(this.warehouseDrList[dr], "fBillstatus", 1);
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
+              this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+              this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+              this.$set(this.warehouseDrList[dr], "fId", null);
             }
           }
-        }
-        if (response.data.corps) {
-          this.fMblnoOptions = response.data.corps;
-          this.KHblnoOptions = response.data.corps;
-        }
-        if (response.data.feesList) {
-          this.fWbuOptions = response.data.feesList;
-        }
-        if (response.data.warehouse) {
-          this.warehouseOptions = response.data.warehouse;
-        }
-        if (response.data.warehouseBillsItem) {
-          this.dataList = response.data.warehouseBillsItem;
-          for (let list in this.dataList) {
-            this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+          if(response.data.warehousebillsfeesCr){
+            this.warehouseCrList = response.data.warehousebillsfeesCr;
+            for (let cr in this.warehouseCrList) {
+              this.$set(this.warehouseCrList[cr], "fBillstatus", 1);
+              if(this.warehouseCrList[cr].fFeeunitid !== null){
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+              }
+              this.$set(this.warehouseCrList[cr], "fId", null);
+            }
           }
-        }
-        if (response.data.enclosures) {
-          this.relevantAttachments = response.data.enclosures;
-        }
-        this.goodsOptions = response.data.goodsList;
-        this.kqhouseOptions = response.data.warehouseAreas;
+          this.userOptions = response.data.sysUser;
+          this.open = true;
+          this.title = "修改仓入库";
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1,};
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
+        });
+      }else{
+        this.dataList = [];
+        this.reset();
+        this.browseStatus = status;
+        this.contrOl = status
+        this.detailsHidden = false;
+        this.formBrowseStatus = false;
+        let fId = row.fId || this.ids;
+        this.goodsRemoteMethod()
+        // if (fId.length === 1){
+        //   fId = fId[0].fId
+        // }
+        getWarehousebills(fId).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            this.before = this.form.createBy
+            this.$set(this.form,'fCartype',response.data.warehousebills.fCartype + '')
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+            if (this.form.fBillstatus > 2) {
+              this.approvalStatus = false;
+            } else {
+              this.approvalStatus = true;
+            }
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+                this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+              }
+              if(this.dataList[list].fBillstatus === 40){
+                this.contrOl = true
+              }
+            }
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+            }
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          this.goodsOptions = response.data.goodsList;
+          this.kqhouseOptions = response.data.warehouseAreas;
 
-        this.warehouseDrList = response.data.warehousebillsfeesDr;
-        for (let dr in this.warehouseDrList) {
-          this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
-          this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
-          this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
-        }
-        this.warehouseCrList = response.data.warehousebillsfeesCr;
-        for (let cr in this.warehouseCrList) {
-          this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
-          // this.$set(this.warehouseCrList[cr], "fBusinessType", response.data.warehousebillsfeesCr);
-        }
-        this.userOptions = response.data.sysUser;
-        this.open = true;
-        this.title = "修改仓入库";
-        this.warehousesssMethod()
-        this.fWbuOptions = []
-        let queryParams = { pageNum: 1,};
-        listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+          for (let dr in this.warehouseDrList) {
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            }
+            this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+            this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+          }
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+          for (let cr in this.warehouseCrList) {
+            if(this.warehouseCrList[cr].fFeeunitid !== null){
+              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+            }
+            // this.$set(this.warehouseCrList[cr], "fBusinessType", response.data.warehousebillsfeesCr);
+          }
+          this.userOptions = response.data.sysUser;
+          this.open = true;
+          this.title = "修改仓入库";
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1,};
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
         });
-      });
-      queryUserVal().then((response)=>{
-        this.current = response.user.userName
-      })
+        queryUserVal().then((response)=>{
+          this.current = response.user.userName
+        })
+      }
     },
     // 数量计算
     changeContractAmt(row) {
@@ -5784,11 +5882,13 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, fName: name };
+      let queryParams = { pageNum: 1, fDc:'C',fName:name};
       listFees(queryParams).then((response) => {
-        this.fDNameOptions = response.rows;
         this.fCNameOptions = response.rows;
-        this.fWbuOptions = response.rows
+      });
+      let query = { pageNum: 1, fDc:'D',fName:name};
+      listFees(query).then((response) => {
+        this.fDNameOptions = response.rows;
       });
     },
     /* 远程模糊查询经营单位 */

+ 238 - 105
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -245,6 +245,17 @@
           >导入
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
       <div class="tabSetting">
         <right-toolbar
           :showSearch.sync="showSearch"
@@ -2878,6 +2889,7 @@ export default {
   },
   data() {
     return {
+      idCopy:'',
       //全屏放大
       dialogFull:false,
       drag: false,
@@ -3774,13 +3786,17 @@ export default {
           if (response.data.warehousebillsfeesDr) {
             this.warehouseDrList = response.data.warehousebillsfeesDr;
             for (let dr in this.warehouseDrList) {
-              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
             }
           }
           if (response.data.warehousebillsfeesCr) {
             this.warehouseCrList = response.data.warehousebillsfeesCr;
             for (let cr in this.warehouseCrList) {
-              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              if (this.warehouseCrList[cr].fFeeunitid !== null) {
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              }
             }
           }
           // if (response.data.sysUser) {
@@ -4504,9 +4520,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection;
-      // this.ids = selection.map((item) => item.fId);
-
+      // this.ids = selection;
+      this.ids = selection.map((item) => item.fId);
+      this.idCopy = this.ids[0]
       this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
       this.multiple = !selection.length;
     },
@@ -4594,13 +4610,16 @@ export default {
         if (response.data.warehouse) {
           this.warehouseDrList = response.data.warehousebillsfeesDr;
           for (let dr in this.warehouseDrList) {
-            this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
-          }
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            }          }
         }
         if (response.data.warehousebillsfeesCr) {
           this.warehouseCrList = response.data.warehousebillsfeesCr;
           for (let cr in this.warehouseCrList) {
-            this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+            if (this.warehouseCrList[cr].fFeeunitid !== null) {
+              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+            }
           }
         }
         // if (response.data.sysUser) {
@@ -4693,13 +4712,17 @@ export default {
         if (response.data.warehousebillsfeesDr) {
           this.warehouseDrList = response.data.warehousebillsfeesDr;
           for (let dr in this.warehouseDrList) {
-            this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            if(this.warehouseDrList[dr].fFeeunitid !== null){
+              this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+            }
           }
         }
         if (response.data.warehousebillsfeesCr) {
           this.warehouseCrList = response.data.warehousebillsfeesCr;
           for (let cr in this.warehouseCrList) {
-            this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+            if (this.warehouseCrList[cr].fFeeunitid !== null) {
+              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+            }
           }
         }
         if (response.data.sysUser) {
@@ -4736,109 +4759,217 @@ export default {
       listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
-      this.reset();
-      this.browseStatus = status;
-      this.contrOl = status
-      this.detailsHidden = false;
-      this.formBrowseStatus = false;
-      let fId = row.fId || this.ids;
-      if (fId.length === 1){
-        fId = fId[0].fId
-      }
-      this.dataList = [];
-      getStockTransfer(fId).then((response) => {
-        if (response.data.warehousebills) {
-          this.form = response.data.warehousebills;
-          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
-          this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
-          this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
-          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
-          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
-          this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
-          if(this.form.fBillstatus > 2){
-            this.approvalStatus = false
-          }else{
-            this.approvalStatus = true
+      if(status === 2){
+        this.goodsRemoteMethod()
+        getStockTransfer(this.idCopy).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            queryUserVal().then((response) => {
+              this.Lander = response.user.userName
+              this.form.fStorekeeper = response.user.nickName
+              this.form.createBy = response.user.userName
+              this.Operator = this.form.createBy
+            })
+            this.form.fId = null
+            this.form.fBillstatus = 1
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
+            this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
+            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+            this.$set(this.form, "fBillno", null);
+          }
+          if (response.data.corps) {
+            this.flabourOptions = response.data.corps;
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fCompanyOptIons = response.data.corps;
+            this.fleetOptions = response.data.corps;
+            // this.Operator = response.data.corps[0].createBy
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
           }
-        }
-        if (response.data.corps) {
-          this.flabourOptions = response.data.corps;
-          this.fMblnoOptions = response.data.corps;
-          this.KHblnoOptions = response.data.corps;
-          this.fCompanyOptIons = response.data.corps;
-          this.fleetOptions = response.data.corps;
-          this.Operator = response.data.corps[0].createBy
-        }
-        if (response.data.feesList) {
-          this.fWbuOptions = response.data.feesList;
-        }
-        if (response.data.warehouse) {
-          this.warehouseOptions = response.data.warehouse;
-        }
 
-        if (response.data.warehouseBillsItem) {
-          this.dataList = response.data.warehouseBillsItem;
-          for (let list in this.dataList) {
-            if (!this.form.fMblno) {
-              this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (!this.form.fMblno) {
+                this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+              }
+              this.$set(this.dataList[list], 'fBillstatus', 10)
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              this.$set(this.dataList[list], 'fSerialNumber', null)
+              this.$set(this.dataList[list], 'fId', null)
             }
-            if (this.dataList[list].fBillstatus > 10) {
-              this.formBrowseStatus = true;
+          }
+          if (response.data.warehousebillsfeesDr) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+            for (let dr in this.warehouseDrList) {
+              this.$set(this.warehouseDrList[dr], "fBillstatus", 1);
+              this.$set(this.warehouseDrList[dr], "fId", null);
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
             }
-            this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
-            this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
           }
-        }
-        if (response.data.enclosures) {
-          this.relevantAttachments = response.data.enclosures;
-        }
-        if (response.data.warehouse) {
-          this.warehouseDrList = response.data.warehousebillsfeesDr;
-        }
-        if (response.data.warehousebillsfeesDr) {
-          this.warehouseDrList = response.data.warehousebillsfeesDr;
-          for (let dr in this.warehouseDrList) {
-            this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+          if (response.data.warehousebillsfeesCr) {
+            this.warehouseCrList = response.data.warehousebillsfeesCr;
+            for (let cr in this.warehouseCrList) {
+              this.$set(this.warehouseCrList[cr], "fBillstatus", 1);
+              this.$set(this.warehouseCrList[cr], "fId", null);
+              if(this.warehouseCrList[cr].fFeeunitid !== null){
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              }
+            }
           }
-        }
-        if (response.data.warehousebillsfeesCr) {
-          this.warehouseCrList = response.data.warehousebillsfeesCr;
-          for (let cr in this.warehouseCrList) {
-            this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+          // if (response.data.sysUser) {
+          //   // this.userVal = response.data.sysUser
+          //   this.userOptions = response.data.sysUser;
+          //
+          // }
+          if (response.data.dept) {
+            this.deptOptions = []
+            this.deptOptions.push(response.data.dept)
           }
-        }
-        // if (response.data.sysUser) {
-        //   // this.userVal = response.data.sysUser
-        //   this.userOptions = response.data.sysUser;
-        //
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.goodsList) {
+            this.goodsOptions = response.data.goodsList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseAreas) {
+            this.kqhouseOptions = response.data.warehouseAreas;
+          }
+          this.open = true;
+          this.title = "修改调拨";
+
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1, };
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
+          this.register()
+        });
+      }else{
+        this.reset();
+        this.browseStatus = status;
+        this.contrOl = status
+        this.detailsHidden = false;
+        this.formBrowseStatus = false;
+        let fId = row.fId || this.ids;
+        // if (fId.length === 1){
+        //   fId = fId[0].fId
         // }
-        if (response.data.dept) {
-          this.deptOptions = []
-          this.deptOptions.push(response.data.dept)
-        }
-        if (response.data.feesList) {
-          this.fWbuOptions = response.data.feesList;
-        }
-        if (response.data.goodsList) {
-          this.goodsOptions = response.data.goodsList;
-        }
-        if (response.data.warehouse) {
-          this.warehouseOptions = response.data.warehouse;
-        }
-        if (response.data.warehouseAreas) {
-          this.kqhouseOptions = response.data.warehouseAreas;
-        }
-        this.open = true;
-        this.title = "修改调拨";
+        this.dataList = [];
+        getStockTransfer(fId).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
+            this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
+            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+            if(this.form.fBillstatus > 2){
+              this.approvalStatus = false
+            }else{
+              this.approvalStatus = true
+            }
+          }
+          if (response.data.corps) {
+            this.flabourOptions = response.data.corps;
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fCompanyOptIons = response.data.corps;
+            this.fleetOptions = response.data.corps;
+            this.Operator = response.data.corps[0].createBy
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
 
-        this.warehousesssMethod()
-        this.fWbuOptions = []
-        let queryParams = { pageNum: 1, };
-        listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (!this.form.fMblno) {
+                this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+              }
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+              }
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+            }
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          if (response.data.warehouse) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+          }
+          if (response.data.warehousebillsfeesDr) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+            for (let dr in this.warehouseDrList) {
+              if(this.warehouseDrList[dr].fFeeunitid !== null){
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+              }
+            }
+          }
+          if (response.data.warehousebillsfeesCr) {
+            this.warehouseCrList = response.data.warehousebillsfeesCr;
+            for (let cr in this.warehouseCrList) {
+              if(this.warehouseCrList[cr].fFeeunitid !== null){
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
+              }
+            }
+          }
+          // if (response.data.sysUser) {
+          //   // this.userVal = response.data.sysUser
+          //   this.userOptions = response.data.sysUser;
+          //
+          // }
+          if (response.data.dept) {
+            this.deptOptions = []
+            this.deptOptions.push(response.data.dept)
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.goodsList) {
+            this.goodsOptions = response.data.goodsList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseAreas) {
+            this.kqhouseOptions = response.data.warehouseAreas;
+          }
+          this.open = true;
+          this.title = "修改调拨";
+
+          this.warehousesssMethod()
+          this.fWbuOptions = []
+          let queryParams = { pageNum: 1, };
+          listFees(queryParams).then((response) => {
+            this.fWbuOptions = response.rows;
+          });
+          this.register()
         });
-        this.register()
-      });
+
+      }
     },
     // 数量计算
     changeContractAmt(row) {
@@ -5755,10 +5886,12 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, fName: name };
+      let queryParams = { pageNum: 1, fDc:'C',fName:name};
       listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
         this.fCNameOptions = response.rows;
+      });
+      let query = { pageNum: 1, fDc:'D',fName:name};
+      listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
     },

+ 6 - 1
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -504,7 +504,7 @@
       </el-form>
       <div style="font-size:18px; padding-top:8px">
         计费物资明细
-        <el-button :disabled="browseStatus" @click="calculateCost">计算仓储费</el-button>
+        <el-button :disabled="browseStatus||countstate" @click="calculateCost">{{countstate == false?'计算仓储费':'计算中'}}</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
           type="warning"
@@ -1102,6 +1102,7 @@
       return {
         dialogFull:false,
         drag: false,
+        countstate:false,
         setRowList: [
           {
             surface: "1",
@@ -1582,8 +1583,10 @@
       },
       // 计算仓储费
       calculateCost() {
+        this.countstate = true
         if (!this.form.fCorpid || !this.form.fBillingDeadline) {
           this.$message({message: '请维护货权方以及,仓储费计算截止日期', type: 'warning'})
+          this.countstate = false
           return false
         }
         if (this.dataList.length !== 0) {
@@ -1622,6 +1625,7 @@
       },
       getStorageFee () {
         calculateStorageFees(this.form).then((response) => {
+          console.log(response)
           this.dataList = []
           this.warehouseDrList = []
           this.form.fId = response.data.warehouseBills.fId
@@ -1646,6 +1650,7 @@
           if (response.data.feesList) {
             this.fWbuOptions = response.data.feesList
           }
+          this.countstate = false
         });
       },
       /* 远程模糊查询商品 */