Procházet zdrojové kódy

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

caojunjie před 4 roky
rodič
revize
9b54902e5c
1 změnil soubory, kde provedl 33 přidání a 35 odebrání
  1. 33 35
      src/views/warehouseBusiness/inStock/index.vue

+ 33 - 35
src/views/warehouseBusiness/inStock/index.vue

@@ -831,12 +831,12 @@
           </el-button>
           <el-button @click="discharge" :disabled="browseStatus">卸货 </el-button>
           <el-button
-            :disabled="dataListSelection.length <= 0"
+            :disabled="dataListSelection.length <= 0 || browseStatus"
             @click.prevent="creditClick"
           >入库确认
           </el-button>
           <el-button
-            :disabled="dataWithdrawList.length <= 0"
+            :disabled="dataWithdrawList.length <= 0 || browseStatus"
             @click.prevent="withdrawClick"
           >撤回入库</el-button
           >
@@ -1979,8 +1979,8 @@
           style="background-color: #008000; color: #fff"
           @click="submitForm(6)"
         >请核</el-button>
-        <el-button type="danger" v-if="form.fBillstatus == '6'" @click="revoke">撤销请核</el-button>
-        <el-button type="danger" v-if="form.fBillstatus == '4' && current == before" @click="revokeTwo">撤销请核</el-button>
+        <el-button type="danger" v-if="form.fBillstatus === 6" @click="revoke">撤销请核</el-button>
+        <el-button type="danger" v-if="form.fBillstatus === 4 && current == before" @click="revokeTwo">撤销请核</el-button>
         <el-button @click="cancelTwo" v-if="approVal === true">取 消</el-button>
         <el-button @click="cancel" v-else>取 消</el-button>
       </div>
@@ -2299,17 +2299,17 @@
             <td width="100">{{ indexx + 1 }}</td>
             <td width="100">{{ item.fBsdate }}</td>
             <td width="100">{{ item.fCntqty }}</td>
-            <td width="100">{{ item.fGrossweight }}</td>
+            <td width="100">{{ (item.fGrossweight / 1000).toFixed(2) }}</td>
             <td width="100">{{ item.fPlanqty }}</td>
-            <td width="100">{{ item.fNetweight }}</td>
+            <td width="100">{{ (item.fNetweight / 1000).toFixed(2) }}</td>
             <td width="100">{{ item.fQty }}</td>
           </tr>
           <tr>
             <td width="100" colspan="2">合计:</td>
             <td width="100">{{ fCntqty }}</td>
-            <td width="100">{{ fGrossweight.toFixed(2) }}</td>
+            <td width="100">{{ form.sumFGrossweight }}</td>
             <td width="100">{{ fPlanqty }}</td>
-            <td width="100">{{ fNetweight.toFixed(2) }}</td>
+            <td width="100">{{ form.sumFNetweight}}</td>
             <td width="100">{{ fQty }}</td>
           </tr>
           <tr>
@@ -2340,7 +2340,8 @@
             </td>
           </tr>
         </table>
-        <button @click="printSomething1">打印</button>
+        <el-button @click="printSomething1">打印</el-button>
+        <el-button @click="editDialogVisible_s = false">取消 </el-button>
       </el-dialog>
       <el-dialog
         title=""
@@ -2440,7 +2441,8 @@
           </tr>
           <!-- </div> -->
         </table>
-        <button @click="printSomething">打印</button>
+        <el-button @click="printSomething">打印</el-button>
+        <el-button @click="editDialogVisible_ss = false">取消 </el-button>
       </el-dialog>
       <el-dialog
         title=""
@@ -2487,9 +2489,11 @@
             <td width="200">车号</td>
             <td width="200">{{ item.fTruckno }}</td>
             <td width="200">货物品名</td>
-            <td width="200" colspan="4" class="zzss">
+            <td width="200" class="zzss">
               {{ item.fGoodsids }}
             </td>
+            <td width="200">品牌</td>
+            <td width="200">{{item.fMarks}}</td>
           </tr>
           <tr>
             <td width="1400" colspan="6">&nbsp;</td>
@@ -2534,7 +2538,7 @@
             <td width="290" class="zzss">电话:{{ form.fTel }}</td>
           </tr>
         </table>
-        <div style="display: flex; justify-content: space-between">
+        <div>
           <el-button
             type="primary"
             :disabled="browseStatus"
@@ -3031,7 +3035,8 @@ export default {
     },
     revoke(){
       revoke(this.form.fId).then(data=>{
-        if (data.code == 200){
+        if (data.code === 200){
+          this.reset();
           this.open = false;
         }
       })
@@ -3043,6 +3048,11 @@ export default {
         id:this.form.fId
       }
       revokeTwo(data).then(data =>{
+        if (data.code === 200) {
+          this.msgSuccess("撤销成功");
+          this.open = false;
+          this.reset();
+        }
       })
     },
     printSomething() {
@@ -3158,7 +3168,11 @@ export default {
     showEditDialog_s() {
       if (this.Printinglist.length > 0) {
         this.editDialogVisible_s = true;
+        let sumFNetweight = 0
+        let sumFGrossweight = 0
         for (let aorp in this.Printinglist) {
+          sumFNetweight = Number(sumFNetweight) + Number(this.Printinglist[aorp].fNetweight)
+          sumFGrossweight = Number(sumFGrossweight) + Number(this.Printinglist[aorp].fGrossweight)
           var date = new Date(this.Printinglist[aorp].fBsdate);
           var Y = date.getFullYear() + "-";
           var M =
@@ -3169,6 +3183,8 @@ export default {
             (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
           this.$set(this.Printinglist[aorp], "fBsdate", Y + M + D);
         }
+        this.$set(this.form , 'sumFNetweight', parseFloat(Number(sumFNetweight) / 1000).toFixed(2))
+        this.$set(this.form , 'sumFGrossweight', parseFloat(Number(sumFGrossweight) / 1000).toFixed(2))
         for (let corp in this.fMblnoOptions) {
           if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
             this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
@@ -3176,11 +3192,7 @@ export default {
         }
         for (let sorp in this.warehouseOptions) {
           if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
-            this.$set(
-              this.form,
-              "fWarehouseid",
-              this.warehouseOptions[sorp].fName
-            );
+            this.$set(this.form, "fWarehouseid", this.warehouseOptions[sorp].fName);
           }
         }
       } else {
@@ -3470,27 +3482,13 @@ export default {
           if (this.warehouseDrList[list].fFeeUnitid == 1) {
             this.$set(this.warehouseDrList[list], "fQty", this.fQty.toFixed(2));
           } else if (this.warehouseDrList[list].fFeeUnitid == 2) {
-            this.$set(
-              this.warehouseDrList[list],
-              "fQty",
-              this.fGrossweight.toFixed(2)
-            );
+            this.$set(this.warehouseDrList[list], "fQty", this.fGrossweight.toFixed(2));
           } else if (this.warehouseDrList[list].fFeeUnitid == 3) {
-            this.$set(
-              this.warehouseDrList[list],
-              "fQty",
-              this.fNetweight.toFixed(2)
-            );
+            this.$set(this.warehouseDrList[list], "fQty", this.fNetweight.toFixed(2));
           } else {
             this.$set(this.warehouseDrList[list], "fQty", 0);
           }
-          this.$set(
-            this.warehouseDrList[list],
-            "fAmount",
-            (
-              Number(this.warehouseDrList[list].fUnitprice) *
-              Number(this.warehouseDrList[list].fQty)
-            ).toFixed(2)
+          this.$set(this.warehouseDrList[list], "fAmount", (Number(this.warehouseDrList[list].fUnitprice) * Number(this.warehouseDrList[list].fQty)).toFixed(2)
           );
         }
         this.warehousingagreement = false;