Pārlūkot izejas kodu

修改仓库模块 主表 + 弹窗页面 显示合计去重,品名、品牌

阿伏兔 4 gadi atpakaļ
vecāks
revīzija
5781674a09

+ 3 - 0
src/views/system/auditConfiguration/index.vue

@@ -40,6 +40,7 @@
           <span v-if="scope.row.actId === 120">出库</span>
           <span v-if="scope.row.actId === 130">货转</span>
           <span v-if="scope.row.actId === 140">调拨</span>
+          <span v-if="scope.row.actId === 150">计算仓储费</span>
           <span v-if="scope.row.actId === 210">对账</span>
           <span v-if="scope.row.actId === 220">收费</span>
           <span v-if="scope.row.actId === 230">付费</span>
@@ -116,6 +117,8 @@ export default {
       },{
         name: '调拨', actId: 140
       },{
+        name: '计算仓储费', actId: 150
+      },{
         name: '对账', actId: 210
       },{
         name: '收费', actId: 220

+ 2 - 2
src/views/system/toConfigure/auditPaths-add-or-update.vue

@@ -71,7 +71,7 @@
         align="center"
         label="审核人">
         <template slot-scope="scope">
-          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'T'"
+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'F'"
                      filterable multiple collapse-tags placeholder="审核人" style="width: 100%">
             <el-option
               v-for="item in optionsUsers"
@@ -80,7 +80,7 @@
               :value="item.userId">
             </el-option>
           </el-select>
-          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'F'"
+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'T'"
                      filterable multiple collapse-tags placeholder="审核人" style="width: 100%">
             <el-option
               v-for="item in optionsUsers_s"

+ 11 - 10
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -151,10 +151,10 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="唛头" prop="fMarks">
+      <el-form-item label="品牌" prop="fMarks">
         <el-input
           v-model="queryParams.fMarks"
-          placeholder="请输入唛头"
+          placeholder="请输入品牌"
           clearable
           style="width: 80%"
           size="small"
@@ -231,11 +231,10 @@
         align="center"
         prop="fTocorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno"/>
-      <!-- <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" /> -->
+      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
       <el-table-column
         :show-overflow-tooltip="true"
-        label="唛头"
+        label="品牌"
         align="center"
         prop="fMarks"
       />
@@ -521,12 +520,12 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="唛头" prop="fMarks">
+            <el-form-item label="品牌" prop="fMarks">
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
                 disabled
-                placeholder="唛头"
+                placeholder="品牌"
               />
             </el-form-item>
           </el-col>
@@ -599,7 +598,7 @@
           header-align="center"
           align="center"
           width="140px"
-          label="唛头"
+          label="品牌"
         >
         </el-table-column>
         <el-table-column
@@ -1789,7 +1788,7 @@
         }, 300);
         this.whgenlegVisible = false
       },
-      // 更新主表唛头、品名并去重
+      // 更新主表品牌、品名并去重
       updateDeduplication: function() {
         if (this.dataList.length === 0) {
           return false
@@ -1798,7 +1797,7 @@
         let fProductName = []
         for (let li in this.dataList) {
           fMarks.push(this.dataList[li].fMarks)
-          fProductName.push(this.dataList[li].fProductName)
+          fProductName.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(fProductName)).join(","))
@@ -2213,6 +2212,7 @@
         this.dataListSelection = row
       },
       saveForm() {
+        this.updateDeduplication()
         this.$refs['form'].validate((valid) => {
           if (this.form.fCorpid === this.form.fTocorpid) {
             this.$message.error('新货权方不得与货权方一致')
@@ -2222,6 +2222,7 @@
             this.$message.error('请添加库存明细!')
             return false
           }
+          this.updateDeduplication()
           for (let list in this.dataList) {
             if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
               this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')

+ 34 - 30
src/views/warehouseBusiness/inStock/index.vue

@@ -250,6 +250,7 @@
         prop="fCorpid"
       />
       <el-table-column label="提单号" align="center" prop="fMblno" />
+      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
       <el-table-column label="品牌" align="ceter" prop="fMarks" />
       <el-table-column
         label="入库日期"
@@ -531,16 +532,18 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="品牌" prop="fMarks">
+            <el-form-item label="品牌">
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
-                :disabled="browseStatus || formBrowseStatus"
+                disabled
                 placeholder="品牌"
               />
             </el-form-item>
           </el-col>
-          <el-col :span="15">
+        </el-row>
+        <el-row>
+          <el-col :span="16">
             <el-form-item label="备注" prop="remark">
               <el-input
                 style="width: 100%"
@@ -551,6 +554,16 @@
               />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="品名" prop="fProductName">
+              <el-input
+                v-model="form.fProductName"
+                style="width: 80%"
+                disabled
+                placeholder="品名"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
 
         <div v-if="detailsHidden">
@@ -2571,8 +2584,6 @@ export default {
       fPlanvolumn: "",
       // 司机电话
       fDriverTel: "",
-      // 品名合计
-      fProductName: '',
       fPlanqty: "",
       fPlangrossweight: "",
       fPlannetweight: "",
@@ -2819,7 +2830,7 @@ export default {
 
   methods: {
     //关闭弹框的事件
-    addCloseDialog(){    
+    addCloseDialog(){
       this.getList()
     },
     // 上传成功返回数据
@@ -3170,7 +3181,6 @@ export default {
     getList() {
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
-        console.log(response)
         this.warehousebillsList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -3752,11 +3762,8 @@ export default {
     changefGoodsid(row) {
       for (let corp in this.goodsOptions) {
         if (row.fGoodsid === this.goodsOptions[corp].fId) {
-          this.$set(
-            row,
-            "fPackagespecs",
-            this.goodsOptions[corp].fPackagespecs
-          );
+          this.$set(row, "fGoodsids", this.goodsOptions[corp].fName);
+          this.$set(row, "fPackagespecs", this.goodsOptions[corp].fPackagespecs);
         }
       }
     },
@@ -3782,7 +3789,6 @@ export default {
         );
       }
     },
-
     changefBsdate(row) {
       if (this.dataList.length > 0) {
         for (var i = 0; i < this.dataList.length; i++) {
@@ -4079,28 +4085,29 @@ export default {
     },
     /** 提交按钮 */
     submitForm(status) {
+      this.updateDeduplication()
       if (status === 2) {
         this.preservation();
       } else {
         this.pleaseCheck();
       }
     },
-    // 获取品名字
-    productName() {
-      console.log(!this.dataList)
-       if(this.dataList.length != 0) {
-         let arr = []
-         this.dataList.forEach((item)=>{
-           if(arr.indexOf(item.fGoodsids) == -1){
-             arr.push(item.fGoodsids)
-           }
-         })
-         this.fProductName = arr.toString()
-       }
+    // 更新主表唛头、品名并去重
+    updateDeduplication: function() {
+      if (this.dataList.length === 0) {
+        return false
+      }
+      let fMarks = []
+      let fGoodsid = []
+      for (let li in this.dataList) {
+        fMarks.push(this.dataList[li].fMarks)
+        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(","))
     },
     // 提交保存保存成功
     preservation() {
-      this.productName()
       this.$refs["form"].validate((valid) => {
         if (valid) {
           this.form.fBillstatus = status;
@@ -4114,8 +4121,6 @@ export default {
           let formDatae = new window.FormData();
           // 附件数据
           this.form.fBillingway = this.form.fFeetunit;
-          this.form.fProductName = this.fProductName;
-          console.log(this.form.fProductName)
           formDatae.append("tWarehouseBills", JSON.stringify(this.form));
           // 库存明细
           formDatae.append(
@@ -4166,7 +4171,7 @@ export default {
     },
     // 请核成功
     pleaseCheck() {
-      this.productName()
+      this.updateDeduplication()
       this.$refs["form"].validate((valid) => {
         if (this.dataList.length === 0) {
           this.$message.error("请新增库存明细!");
@@ -4201,7 +4206,6 @@ export default {
           let formData = new window.FormData();
           // 附件数据
           this.form.fBillingway = this.form.fFeetunit;
-          this.form.fProductName = this.fProductName;
           formData.append("tWarehouseBills", JSON.stringify(this.form));
           // 库存明细
           formData.append(

+ 75 - 43
src/views/warehouseBusiness/outStock/index.vue

@@ -237,6 +237,7 @@
         prop="fCorpid"
       />
       <el-table-column label="提单号" align="center" prop="fMblno" />
+      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
       <el-table-column label="品牌" align="center" prop="fMarks" />
       <el-table-column
         label="出库日期"
@@ -555,11 +556,21 @@
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
-                :disabled="browseStatus || formBrowseStatus"
+                disabled
                 placeholder="品牌"
               />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="品名" prop="fProductName">
+              <el-input
+                v-model="form.fProductName"
+                style="width: 80%"
+                disabled
+                placeholder="品名"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
           <el-form-item label="备注" prop="remark">
@@ -2197,6 +2208,7 @@ import {
   updateWarehousebills,
   exportWarehousebills,
 } from "@/api/warehouseBusiness/warehouseOutStock";
+
 import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
 
 import { listAgreements } from "@/api/warehouseBusiness/agreement";
@@ -2470,7 +2482,7 @@ export default {
   },
   methods: {
     //关闭弹框的事件
-    addCloseDialog(){    
+    addCloseDialog(){
       this.getList()
     },
     // 上传成功返回数据
@@ -3517,8 +3529,23 @@ export default {
       this.fCntrtype = selection[0].fCntrtype
       this.fGoodsids = selection[0].fGoodsids
     },
+    // 更新主表品名并去重
+    updateDeduplication: function() {
+      if (this.dataList.length === 0) {
+        return false
+      }
+      let fMarks = []
+      let fGoodsid = []
+      for (let li in this.dataList) {
+        fMarks.push(this.dataList[li].fMarks)
+        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(","))
+    },
     // 保存
     saveForm () {
+      this.updateDeduplication()
       this.$refs['form'].validate((valid) => {
         if (this.dataList.length === 0) {
           this.$message.error('请添加库存明细!')
@@ -3539,30 +3566,33 @@ export default {
           }
         }
         if (valid) {
-          this.form.fBillstatus = 2
-          let formData = new window.FormData()
-          formData.append("warehouseBills", JSON.stringify(this.form));
-          formData.append("warehousebillsitems", JSON.stringify(this.dataList));
-          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
-          formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
-          formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
-          addWarehousebills(formData).then((response) => {
-            this.msgSuccess('保存成功')
-            this.form = response.data.warehouseBills
-            this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
-            this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-            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, 'createTime', Date.parse(this.form.createTime))
-            this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-            this.dataList = response.data.warehousebillsitems
-          })
+          setTimeout(() => {
+            this.form.fBillstatus = 2
+            let formData = new window.FormData()
+            formData.append("warehouseBills", JSON.stringify(this.form));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+            addWarehousebills(formData).then((response) => {
+              this.msgSuccess('保存成功')
+              this.form = response.data.warehouseBills
+              this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+              this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+              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, 'createTime', Date.parse(this.form.createTime))
+              this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+              this.dataList = response.data.warehousebillsitems
+            })
+          }, 200);
         }
       })
     },
     /** 提交按钮 */
     submitForm() {
+      this.updateDeduplication()
       this.$refs['form'].validate((valid) => {
         if (this.dataList.length === 0) {
           this.$message.error('请新增库存明细!')
@@ -3599,29 +3629,31 @@ export default {
           }
         }
         if (valid) {
-          this.form.fBillstatus = status
-          this.form.fNetweight = this.fNetweight
-          this.form.fPlangrossweight = this.fPlangrossweight
-          this.form.fPlannetweight = this.fPlannetweight
-          this.form.fPlanvolumn = this.fPlanvolumn
-          this.form.fPlanqty = this.fPlanqty
-          this.form.fGrossweight = this.fGrossweight
-          this.form.fQty = this.fQty
-          if (!this.form.fId) {
-            this.form.fId = this.fid
-          }
+          setTimeout(() => {
+            this.form.fBillstatus = status
+            this.form.fNetweight = this.fNetweight
+            this.form.fPlangrossweight = this.fPlangrossweight
+            this.form.fPlannetweight = this.fPlannetweight
+            this.form.fPlanvolumn = this.fPlanvolumn
+            this.form.fPlanqty = this.fPlanqty
+            this.form.fGrossweight = this.fGrossweight
+            this.form.fQty = this.fQty
+            if (!this.form.fId) {
+              this.form.fId = this.fid
+            }
+            let formData = new window.FormData()
+            formData.append("warehouseBills", JSON.stringify(this.form));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+            warehouseSubmission(formData).then((response) => {
+              this.msgSuccess('提交成功')
+              this.cancel()
+              this.getList()
+            })
+          }, 200);
         }
-        let formData = new window.FormData()
-        formData.append("warehouseBills", JSON.stringify(this.form));
-        formData.append("warehousebillsitems", JSON.stringify(this.dataList));
-        formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
-        formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
-        formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
-        warehouseSubmission(formData).then((response) => {
-          this.msgSuccess('提交成功')
-          this.cancel()
-          this.getList()
-        })
       })
     },
     /** 删除按钮操作 */

+ 9 - 32
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -403,20 +403,9 @@
             label="业务来源"
           >
             <template slot-scope="scope">
-              <el-select
-                v-model="scope.row.fBilltype"
-                filterable
-                disabled
-                remote
-                placeholder="业务来源"
-              >
-                <el-option
-                  v-for="(dict, index) in billtypeOptions"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              <span v-if="scope.row.fBilltype === 'SJRK'">入库</span>
+              <span v-if="scope.row.fBilltype === 'SJCK'">出库</span>
+              <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -874,17 +863,6 @@
         open: false,
         // 货品名
         goodsOptions: [],
-        // 业务来源
-        billtypeOptions: [{
-          fId: 'SJRK',
-          fName: '入库'
-        }, {
-          fId: 'SJCK',
-          fName: '出库'
-        }, {
-          fId: 'KCZZ',
-          fName: '库存总账'
-        }],
         // 货权方(客户数据)
         fMblnoOptions: [],
         // 操作员
@@ -1187,6 +1165,7 @@
               this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
               this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
             }
+            console.log(this.dataList)
           }
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
@@ -1263,12 +1242,7 @@
             return;
           }
           const values = data.map((item) => Number(item[column.property]));
-          if (
-            column.property === "fUnitprice" ||
-            column.property === "fAmount" ||
-            column.property === "fQty" ||
-            column.property === "fQty"
-          ) {
+          if (column.property === "fAmount") {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr);
               if (!isNaN(value)) {
@@ -1277,6 +1251,9 @@
                 return prev;
               }
             }, 0); // sums[index]
+            sums[index] = sums[index].toFixed(2)
+          } else {
+            sums[index] = '-'
           }
         });
         return sums;
@@ -1371,7 +1348,7 @@
               this.$message({message: '请维护仓储费计算截止日期', type: 'warning'})
               return false
             }
-            if (!this.form.fBillstatus) {
+            if (this.form.fBillstatus !== 6) {
               this.form.fBillstatus = status
             }
             let formData = new window.FormData();