Bläddra i källkod

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

caojunjie 4 år sedan
förälder
incheckning
cf61b811fe

+ 1 - 0
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -1381,6 +1381,7 @@
         :modal="false"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="whgenlegVisible"
+        :close-on-click-modal="false"
         width="70%"
       >
         <el-table

+ 16 - 31
src/views/warehouseBusiness/inStock/index.vue

@@ -352,6 +352,7 @@
     <el-dialog
       :visible.sync="open"
       :close-on-click-modal="false"
+      @close='addCloseDialog'
       width="80%"
       append-to-body
     >
@@ -819,7 +820,7 @@
           <el-button type="warning" prop="打印" @click="showEditDialog_s"
             >入库单
           </el-button>
-          <!-- 
+          <!--
           <el-button
             :disabled="browseStatus"
             type="primary"
@@ -1965,6 +1966,7 @@
         :modal="false"
         style="height: 500px"
         height="50%"
+        :close-on-click-modal="false"
         :visible.sync="weightList"
         @close="closeDialog"
         width="70%"
@@ -2019,6 +2021,7 @@
       <!-- 选择作业费协议数据 -->
       <el-dialog
         title="作业费协议"
+        :close-on-click-modal="false"
         :modal="false"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="warehousingagreement"
@@ -2107,6 +2110,7 @@
       <!-- 选择作业费协议数据 -->
       <el-dialog
         title="作业费协议"
+        :close-on-click-modal="false"
         :modal="false"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="warehousingagreements"
@@ -2194,6 +2198,7 @@
         :modal="false"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="editDialogVisible_s"
+        :close-on-click-modal="false"
         @close="closeDialog"
         width="70%"
       >
@@ -2317,6 +2322,7 @@
         title=""
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="editDialogVisible_ss"
+        :close-on-click-modal="false"
         width="70%"
         :modal="false"
       >
@@ -2405,6 +2411,7 @@
         title=""
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="editDialogVisible_sss"
+        :close-on-click-modal="false"
         width="70%"
         :modal="false"
       >
@@ -2809,6 +2816,10 @@ export default {
   },
 
   methods: {
+    //关闭弹框的事件
+    addCloseDialog(){    
+      this.getList()
+    },
     // 上传成功返回数据
     showFile(row) {
       for (let list in this.relevantAttachments) {
@@ -4043,40 +4054,14 @@ export default {
               "tEnclosure",
               JSON.stringify(this.relevantAttachments)
             );
-            for (let li in this.dataListSelection) {
-              this.dataListSelection[li].fBillstatus = 30;
-            }
+            let dataSelection = JSON.parse(JSON.stringify(this.dataListSelection))
             if (!this.form.fId) {
               this.form.fId = this.fid;
             }
             disChargelist(formData).then((response) => {
-              for (let li in this.dataListSelection) {
-                for (let i in this.dataList) {
-                  let fQty =
-                    this.dataList[i].fQty === this.dataListSelection[li].fQty;
-                  let fBsdate =
-                    this.dataList[i].fBsdate ===
-                    this.dataListSelection[li].fBsdate;
-                  let fGoodsid =
-                    this.dataList[i].fGoodsid ===
-                    this.dataListSelection[li].fGoodsid;
-                  let fcntrtype =
-                    this.dataList[i].fcntrtype ===
-                    this.dataListSelection[li].fcntrtype;
-                  let fNetweight =
-                    this.dataList[i].fNetweight ===
-                    this.dataListSelection[li].fNetweight;
-                  let fGrossweight =
-                    this.dataList[i].fGrossweight ===
-                    this.dataListSelection[li].fGrossweight;
-                  if (
-                    fBsdate &&
-                    fGoodsid &&
-                    fcntrtype &&
-                    fGrossweight &&
-                    fNetweight &&
-                    fQty
-                  ) {
+              for (let dt in dataSelection) {
+                for (let li in this.dataList) {
+                  if (this.dataList[li].fId === dataSelection.fId) {
                     this.$set(this.dataList[i], "fBillstatus", 30);
                   }
                 }

+ 27 - 8
src/views/warehouseBusiness/outStock/index.vue

@@ -261,7 +261,7 @@
         <template slot-scope="scope">
           <span v-if="scope.row.fItemsStatus === 1">计划</span>
           <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
-          <span v-if="scope.row.fItemsStatus === 3">已货</span>
+          <span v-if="scope.row.fItemsStatus === 3">已货</span>
           <span v-if="scope.row.fItemsStatus === 4">已入库</span>
         </template>
       </el-table-column>
@@ -334,6 +334,7 @@
     <el-dialog
       :visible.sync="open"
       :close-on-click-modal="false"
+      @close='addCloseDialog'
       width="80%"
       append-to-body
     >
@@ -1036,7 +1037,7 @@
           <template slot-scope="scope">
             <span v-if="scope.row.fBillstatus === 40">已出库</span>
             <span v-if="scope.row.fBillstatus === 20">卸货中</span>
-            <span v-if="scope.row.fBillstatus === 30">已货</span>
+            <span v-if="scope.row.fBillstatus === 30">已货</span>
             <span v-if="scope.row.fBillstatus === 10">计划</span>
           </template>
         </el-table-column>
@@ -1872,6 +1873,7 @@
         :modal="false"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="editDialogVisible_s"
+        :close-on-click-modal="false"
         width="70%"
       >
         <table
@@ -1998,6 +2000,7 @@
         title="收货单打印"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="editDialogVisible_ss"
+        :close-on-click-modal="false"
         width="70%"
         :modal="false"
       >
@@ -2086,6 +2089,7 @@
         title="出库作业单打印"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="openPrintJobSheet"
+        :close-on-click-modal="false"
         width="70%"
         :modal="false"
       >
@@ -2169,8 +2173,10 @@
             <td width="290" class="zzss">电话:{{ form.fTel }}</td>
           </tr>
         </table>
-        <button @click="printSomething">打印作业单</button>
-        <button @click="closeWindow ">关闭</button>
+        <div style="display: flex; justify-content: space-between">
+        <el-button type="primary" @click="printSomething">打印</el-button>
+        <el-button @click="closeWindow">取消</el-button>
+        </div>
       </el-dialog>
     </el-dialog>
   </div>
@@ -2463,6 +2469,10 @@ export default {
     });
   },
   methods: {
+    //关闭弹框的事件
+    addCloseDialog(){    
+      this.getList()
+    },
     // 上传成功返回数据
     showFile(row) {
       for(let list in this.relevantAttachments) {
@@ -2753,10 +2763,10 @@ export default {
     },
     // 作业单打印
     printJobSheet() {
-      if (this.feelDrSelection.length <= 0) {
-        this.$message.error("请勾选收款信息!");
-        return false;
-      }
+      // if (this.feelDrSelection.length <= 0) {
+      //   this.$message.error("请勾选收款信息!");
+      //   return false;
+      // }
       for (let fee in this.feelDrSelection) {
         if (!this.feelDrSelection[fee].fCorpid) {
           this.$message.error("请维护收款费用客户名称!");
@@ -3341,6 +3351,8 @@ export default {
               this.$set(warehousebillsfees[fees], "fFeeUnitid", warehousebillsfees[fees].fFeeUnitid + "");
               this.warehouseDrList.push(warehousebillsfees[fees]);
             } */
+            this.dataWithdrawList = []
+            this.dataListSelection = []
             this.msgSuccess("出库成功");
             this.$refs.tableList.clearSelection();
             this.formBrowseStatus = true;
@@ -3385,6 +3397,12 @@ export default {
     },
     // 撤回入账
     withdrawClick() {
+      for (let li in this.dataWithdrawList) {
+        if (this.dataWithdrawList[li].fBillstatus < 40) {
+          this.$message.error("所选信息中存在未出库数据!");
+          return false
+        }
+      }
       let formData = new window.FormData();
       // 撤回入库
       let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
@@ -3483,6 +3501,7 @@ export default {
     // 库存明细多选
     selectinventory(selection) {
       this.printinglist = selection;
+      this.dataWithdrawList = [];
       this.dataListSelection = [];
       if (!selection || selection.length === 0) {
         return false

+ 15 - 35
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -212,6 +212,9 @@
         prop="createTime"
         width="180"
       >
+        <template slot-scope="scope">
+          {{scope.row.createTime.slice(0, 10)}}
+        </template>
       </el-table-column>
       <el-table-column
         label="操作"
@@ -794,7 +797,6 @@
             label="操作"
           >
             <template slot-scope="scope">
-              <el-button size="small">审核费用</el-button>
               <el-button
                 @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
                 size="small"
@@ -1182,6 +1184,7 @@
             for (let li in this.dataList) {
               this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
               this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
+              this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
               this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
             }
           }
@@ -1227,50 +1230,27 @@
             sums[index] = "合计";
             return;
           }
-          if (column.property === "fgrossweight") {
-            values = data.map((item) => Number(item["fGrossweight"]));
-          }
-          if (column.property === "fnetweight") {
-            values = data.map((item) => Number(item["fNetweight"]));
+          if (column.property === "fBillingQty") {
+            values = data.map((item) => Number(item["fBillingQty"]));
           }
-          if (column.property === "fqty") {
-            values = data.map((item) => Number(item["fQty"]));
+          if (column.property === "fAmt") {
+            values = data.map((item) => Number(item["fAmt"]));
           }
-          if (column.property === "fCntqty") {
-            values = data.map((item) => Number(item["fCntqty"]));
-          } // const values = data.map(item => Number(item[column.property]))
-          if (
-            column.property === "fgrossweight" ||
-            column.property === "fnetweight" ||
-            column.property === "fqty" ||
-            column.property === "fCntqty"
-          ) {
+          // const values = data.map(item => Number(item[column.property]))
+          if (column.property === "fBillingQty" || column.property === "fAmt") {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr);
               if (!isNaN(value)) {
-                if (column.property === "fgrossweight") {
-                  this.form.fGrossweight = prev + curr;
-                  this.fGrossweight = prev + curr;
-                }
-                if (column.property === "fnetweight") {
-                  this.form.fNetweight = prev + curr;
-                  this.fNetweight = prev + curr;
-                }
-                if (column.property === "fqty") {
-                  this.form.fQty = prev + curr;
-                  this.fQty = prev + curr;
-                }
-                if (column.property === "fCntqty") {
-                  this.fCntqty = prev + curr;
-                }
                 return prev + curr;
               } else {
                 return prev;
               }
-            }, 0); // sums[index]
+            }, 0);
+            sums[index] = sums[index].toFixed(2)
+          } else {
+            sums[index] = '-'
           }
         });
-        this.sums = sums;
         return sums;
       },
       // 付款合计
@@ -1314,7 +1294,7 @@
           }
         )
           .then(function () {
-            return delWarehousebills(fIds);
+            return delStorageFeeCalculation(fIds);
           })
           .then(() => {
             this.getList();