Quellcode durchsuchen

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

wengyuwen vor 4 Jahren
Ursprung
Commit
8eeb249950

+ 41 - 13
src/views/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container home">
     <div v-if="sysType == 1">
-      <div style="display: flex;margin-bottom: 40px;">
+      <div style="display: flex; margin-bottom: 40px">
         <div style="width: 70%">
           <ul class="block" v-if="sysType == 1">
             <li @click="jump('/business/inStock')">
@@ -120,7 +120,7 @@
           </div>
         </div>
       </div>
-      <div style="display: flex;margin-bottom: 40px;">
+      <div style="display: flex; margin-bottom: 40px">
         <div style="width: 70%">
           <div>
             <div
@@ -141,7 +141,9 @@
               <div class="home_stock_table">业务类型</div>
               <div class="home_stock_table_right">
                 <div>操作</div>
-                <el-link type="primary" @click="jump('/morePage/stock')">更多></el-link>
+                <el-link type="primary" @click="jump('/morePage/stock')"
+                  >更多></el-link
+                >
               </div>
             </div>
             <div v-if="tableData.length > 0">
@@ -154,13 +156,27 @@
                 v-for="(item, index) in tableData"
                 :key="index"
               >
-                <div class="home_stock_table">{{ item.refno1 }}</div>
+                <div class="home_stock_table"> <p>{{ item.refno1 }}</p></div>
                 <div class="home_stock_table">
                   {{ item.auditItem }}
                 </div>
-                <div class="home_stock_table">{{ item.refno3 }}</div>
-                <div class="home_stock_table">{{ item.refno2 }}</div>
-                <div class="home_stock_table">操作</div>
+                <div class="home_stock_table"><p>{{ item.refno1 }}</p></div>
+                <div class="home_stock_table">
+                  <span v-if="item.refno2 === 'SJRK'">入库</span>
+                  <span v-else-if="item.refno2 === 'SJCK'">出库</span>
+                  <span v-else-if="item.refno2 === 'HQZY'">货转</span>
+                  <span v-else-if="item.refno2 === 'CKDB'">调拨</span>
+                  <span v-else-if="item.refno2 === 'CCF'">仓储费</span>
+                  <span v-else-if="item.refno2 === 'HWTG'">货物通关</span>
+                  <span v-else-if="item.refno2 === 'ZYF'">作业费</span>
+                  <span v-else-if="item.refno2 === 'SF'">收费</span>
+                  <span v-else-if="item.refno2 === 'DZ'">对账</span>
+                  <span v-else-if="item.refno2 === 'FF'">付费</span>
+                  <span v-else-if="item.refno2 === 'JSCCF'">计算仓储费</span>
+                </div>
+                <div class="home_stock_table" @click="approval(item.refno2)">
+                  查看详情
+                </div>
               </div>
             </div>
             <div
@@ -254,7 +270,7 @@
           </el-table>
         </div>
       </div>
-      <div style="display: flex;">
+      <div style="display: flex">
         <div style="width: 70%">
           <div
             id="commoDity"
@@ -683,7 +699,7 @@ export default {
     },
     //跳转审批页面
     approval(row) {
-      switch (row.refno2) {
+      switch (row) {
         case "SJRK": {
           this.$router.push({
             path: "/business/inStock",
@@ -771,6 +787,11 @@ export default {
         actId: "",
       };
       inquiry(data).then((res) => {
+        res.data.map(e=>{
+          if(e.auditItem){
+            e.auditItem=e.auditItem.slice(0, 10)
+          }
+        })
         this.tableData = res.data;
       });
     },
@@ -887,9 +908,9 @@ export default {
     getList() {
       this.loading = true;
       listCorps(this.queryParams).then((response) => {
-        if(response.rows.length>0){
+        if (response.rows.length > 0) {
           this.tableDataTwo = response.rows.slice(0, 10);
-        } 
+        }
       });
     },
     //查询仓库
@@ -1268,7 +1289,7 @@ export default {
     padding: 10px;
     justify-content: space-between;
   }
-  .content-bottom:last-child{
+  .content-bottom:last-child {
     border-bottom: 0px;
   }
   .upper-right {
@@ -1298,7 +1319,7 @@ export default {
   }
 }
 </style>
-<style>
+<style lang="scss">
 .text img {
   max-width: 100%;
   height: auto;
@@ -1308,6 +1329,13 @@ export default {
   width: 20%;
   justify-content: center;
   align-self: center;
+  p{
+  display: inline-block;
+  white-space: nowrap; 
+  width: 100%; 
+  overflow: hidden;
+  text-overflow:ellipsis;
+  }
 }
 .home_stock_table_right {
   display: flex;

+ 6 - 2
src/views/warehouseBusiness/cargoClearance/index.vue

@@ -3814,7 +3814,8 @@ export default {
           index === 13 ||
           index === 14 ||
           index === 11 ||
-          index === 12
+          index === 12 ||
+          index === 15
         ) {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
@@ -3826,9 +3827,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 14) {
+                 if (index === 14 || index === 15) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 13) {
+              sums[index] = sums[index];
+            }
           }
         }
       });

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

@@ -714,7 +714,7 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item >
+            <el-form-item>
               <el-table
                 :data="CntrTable"
                 style="width: 80%"
@@ -764,20 +764,28 @@
                       type="text"
                       @click.native.prevent="deleteRow(scope.$index, CntrTable)"
                       icon="el-icon-delete"
-                      ></el-button
-                    >
+                    ></el-button>
                   </template>
                 </el-table-column>
               </el-table>
               <div style="display: flex; justify-content: center; width: 80%">
-                <el-tag class="tag-hover" @click="addRow" style="border-top-left-radius: 0;border-top-right-radius: 0;height: 15px;padding: 0px 4px;line-height: 12px;"
+                <el-tag
+                  class="tag-hover"
+                  @click="addRow"
+                  style="
+                    border-top-left-radius: 0;
+                    border-top-right-radius: 0;
+                    height: 15px;
+                    padding: 0px 4px;
+                    line-height: 12px;
+                  "
                   ><i class="el-icon-plus"></i
                 ></el-tag>
               </div>
             </el-form-item>
           </el-col>
         </el-row>
-        
+
         <el-button type="primary" :disabled="browseStatus" @click="saveForm"
           >保 存</el-button
         >
@@ -2106,7 +2114,7 @@ export default {
   },
   data() {
     return {
-      CntrTable:[{}],
+      CntrTable: [{}],
       idCopy: "",
       //全屏放大
       dialogFull: false,
@@ -2311,7 +2319,7 @@ export default {
           width: 100,
         },
       ],
-      mblnoStatus:"",
+      mblnoStatus: "",
       allCheck: false,
       showSetting: false,
       headers: {
@@ -2662,7 +2670,13 @@ export default {
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "总计";
-        } else if (index === 13 || index === 11 || index === 12) {
+        } else if (
+          index === 13 ||
+          index === 11 ||
+          index === 12 ||
+          index === 14 || 
+          index === 15
+        ) {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
@@ -2673,9 +2687,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 12) {
+            if (index === 14 || index === 15) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 13) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -3193,7 +3210,7 @@ export default {
       this.warehouseOptions = [];
       this.relevantAttachments = [];
       this.mblnoStatus = "";
-      this.CntrTable=[{}];
+      this.CntrTable = [{}];
       this.form = {
         fCorpid: null,
         fTocorpid: null,
@@ -3409,11 +3426,18 @@ export default {
 
     /** 修改按钮操作 */
     handleUpdate(row, status) {
+      if (!this.dataList.length) {
+          this.form.fProductName = "";
+          this.form.fMarks = "";
+      }
       if (status === 2) {
         this.goodsRemoteMethod();
         getGoodsTransfer(this.idCopy).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+             this.form.fProductName = "";
+            this.form.fMarks = "";
+            this.form.fMblno=""
             queryUserVal().then((response) => {
               this.Lander = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -3436,7 +3460,7 @@ export default {
           this.KHblnoOptions = response.data.corps;
           this.fWbuOptions = response.data.feesList;
           this.warehouseOptions = response.data.warehouse;
-          this.dataList = response.data.warehouseBillsItem;
+            this.dataList = [];
           for (let list in this.dataList) {
             // if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
             //   this.formBrowseStatus = true
@@ -4219,6 +4243,10 @@ export default {
     deleteRow(index, rows) {
       rows.splice(index, 1);
       this.updateDeduplication();
+      if(this.dataList.length==0){
+        this.form.fProductName = "";
+        this.form.fMarks = "";
+      }
     },
     // 变更计价单位
     changeFeeUnit(row) {

+ 68 - 26
src/views/warehouseBusiness/inStock/index.vue

@@ -927,7 +927,7 @@
               </el-col>
             </el-row>
           </el-col>
-           <el-col :span="8">
+          <el-col :span="8">
             <el-form-item>
               <el-table
                 :data="CntrTable"
@@ -2626,7 +2626,6 @@
                 />
               </template>
             </el-table-column>
-            d
             <el-table-column
               prop="fProductName"
               header-align="center"
@@ -4635,7 +4634,8 @@ export default {
           index === 13 ||
           index === 10 ||
           index === 11 ||
-          index === 12
+          index === 12 ||
+          index === 14
         ) {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
@@ -4647,9 +4647,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 12) {
+            if (index === 13 || index === 14) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 12) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -5994,6 +5997,9 @@ export default {
           }
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+            this.form.fMblno = "";
             queryUserVal().then((response) => {
               this.userVal = response.user;
               this.current = response.user.userName;
@@ -6032,7 +6038,7 @@ export default {
             );
           }
           if (response.data.warehouseBillsItem) {
-            this.dataList = response.data.warehouseBillsItem;
+            this.dataList = [];
             for (let list in this.dataList) {
               this.$set(this.dataList[list], "fBillstatus", 10);
               this.$set(
@@ -6155,6 +6161,10 @@ export default {
           }
           if (response.data.warehouseBillsItem) {
             this.dataList = response.data.warehouseBillsItem;
+            if (!this.dataList.length) {
+              this.form.fProductName = "";
+              this.form.fMarks = "";
+            }
             for (let list in this.dataList) {
               this.$set(
                 this.dataList[list],
@@ -6192,6 +6202,10 @@ export default {
           }
           if (response.data.warehouseBillsItem) {
             this.dataList = response.data.warehouseBillsItem;
+               if (!this.dataList.length) {
+          this.form.fProductName = "";
+          this.form.fMarks = "";
+      }
             for (let list in this.dataList) {
               if (this.dataList[list].fBillstatus > 10) {
                 this.formBrowseStatus = true;
@@ -7156,6 +7170,8 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           if (!this.dataList.length) {
+            this.form.fProductName = "";
+            this.form.fMarks = "";
             // this.form.fBillstatus = status
             this.form.fNetweight = this.fNetweight;
             this.form.fPlanvolumn = this.fPlanvolumn;
@@ -7302,33 +7318,57 @@ export default {
               "tWarehousebillsfeesDr",
               JSON.stringify(this.warehouseDrList)
             );
+            formDatae.append("mblnoStatus", this.mblnoStatus);
             addWarehousebills(formDatae).then((response) => {
-              this.msgSuccess("保存成功");
-              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, "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.dataList = response.data.warehousebillsitems;
-              for (let list in this.dataList) {
+              if (response.data == false) {
+                this.$confirm(response.msg, "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                })
+                  .then(() => {
+                    this.mblnoStatus = true;
+                    this.preservation();
+                  })
+                  .catch(() => {
+                    this.$message({
+                      type: "info",
+                      message: "已取消",
+                    });
+                  });
+              } else {
+                this.mblnoStatus = "";
+                this.msgSuccess("保存成功");
+                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, "fBsdate", Date.parse(this.form.fBsdate));
                 this.$set(
-                  this.dataList[list],
-                  "fBsdate",
-                  Date.parse(this.dataList[list].fBsdate)
+                  this.form,
+                  "fTrademodeid",
+                  this.form.fTrademodeid + ""
                 );
                 this.$set(
-                  this.dataList[list],
-                  "fBusinessType",
-                  this.dataList[list].fBusinessType + ""
+                  this.form,
+                  "createTime",
+                  Date.parse(this.form.createTime)
                 );
+                this.dataList = response.data.warehousebillsitems;
+                for (let list in this.dataList) {
+                  this.$set(
+                    this.dataList[list],
+                    "fBsdate",
+                    Date.parse(this.dataList[list].fBsdate)
+                  );
+                  this.$set(
+                    this.dataList[list],
+                    "fBusinessType",
+                    this.dataList[list].fBusinessType + ""
+                  );
+                }
+                this.fid = response.data.warehouseBills.fId;
+                this.getList();
               }
-              this.fid = response.data.warehouseBills.fId;
-              this.getList();
             });
           }
         }
@@ -7534,6 +7574,8 @@ export default {
       this.mum = sum;
 
       if (this.dataList.length === 0) {
+        this.form.fProductName = "";
+        this.form.fMarks = "";
         this.formBrowseStatus = false;
         this.contrOl = false;
         return false;

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

@@ -898,8 +898,8 @@
               </el-col>
             </el-row>
           </el-col>
-          <el-col :span="8"> 
-               <el-form-item>
+          <el-col :span="8">
+            <el-form-item>
               <el-table
                 :data="CntrTable"
                 style="width: 80%"
@@ -949,8 +949,7 @@
                       type="text"
                       @click.native.prevent="deleteRow(scope.$index, CntrTable)"
                       icon="el-icon-delete"
-                      ></el-button
-                    >
+                    ></el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -4326,7 +4325,7 @@ export default {
     }
   },
   methods: {
-      addRow() {
+    addRow() {
       var obj = {};
       this.CntrTable.push(obj);
     },
@@ -4466,6 +4465,7 @@ export default {
         if (index === 0) {
           sums[index] = "总计";
         } else if (
+          index === 14 ||
           index === 13 ||
           index === 10 ||
           index === 11 ||
@@ -4481,9 +4481,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 12) {
+            if (index === 13 || index === 14) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 12) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -5559,7 +5562,7 @@ export default {
     },
     // 查询库存总账信息
     getWhgenlegList() {
-      this.whgenlegParams.fMblno = this.form.fMblno;
+      // this.whgenlegParams.fMblno = this.form.fMblno;
       this.whgenlegParams.fCorpid = this.form.fCorpid;
       this.whgenlegParams.fWarehouseid = this.form.fWarehouseid;
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
@@ -5759,6 +5762,9 @@ export default {
         getWarehousebills(this.idCopy).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+            this.form.fMblno = "";
             queryUserVal().then((response) => {
               this.current = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -5784,7 +5790,7 @@ export default {
             this.$set(this.form, "fBillno", null);
           }
           if (response.data.warehouseBillsItem) {
-            this.dataList = response.data.warehouseBillsItem;
+            this.dataList = [];
             for (let list in this.dataList) {
               this.$set(this.dataList[list], "fBillstatus", 10);
               this.$set(
@@ -5900,6 +5906,10 @@ export default {
           }
           if (response.data.warehouseBillsItem) {
             this.dataList = response.data.warehouseBillsItem;
+            if (!this.dataList.length) {
+              this.form.fProductName = "";
+              this.form.fMarks = "";
+            }
             for (let list in this.dataList) {
               this.$set(
                 this.dataList[list],
@@ -6805,6 +6815,10 @@ export default {
         //   }
         // }
         if (valid) {
+          if (!this.dataList.length) {
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+          }
           this.form.fNetweight = this.fNetweight;
           this.form.fGrossweight = this.fGrossweight;
           this.form.fQty = this.fQty;
@@ -7164,6 +7178,8 @@ export default {
     deleteRow(index, rows) {
       rows.splice(index, 1);
       if (this.dataList.length === 0) {
+        this.form.fProductName = "";
+        this.form.fMarks= "";
         this.formBrowseStatus = false;
         this.contrOl = false;
         return false;

+ 15 - 2
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -3998,6 +3998,7 @@ export default {
         if (index === 0) {
           sums[index] = "总计";
         } else if (
+          index === 15 ||
           index === 13 ||
           index === 14 ||
           index === 11 ||
@@ -4013,9 +4014,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 14) {
+            if (index === 14|| index === 15) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 13) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -5365,11 +5369,18 @@ export default {
       listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
+      if (!this.dataList.length) {
+          this.form.fProductName = "";
+          this.form.fMarks = "";
+      }
       if (status === 2) {
         this.goodsRemoteMethod();
         getStockTransfer(this.idCopy).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+            this.form.fMblno=""
             queryUserVal().then((response) => {
               this.Lander = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -5406,7 +5417,7 @@ export default {
           }
 
           if (response.data.warehouseBillsItem) {
-            this.dataList = response.data.warehouseBillsItem;
+            this.dataList = [];
             for (let list in this.dataList) {
               if (!this.form.fMblno) {
                 this.$set(this.form, "fMblno", this.dataList[list].fMblno);
@@ -6704,6 +6715,8 @@ export default {
     deleteRow(index, rows) {
       rows.splice(index, 1);
       if (this.dataList.length === 0) {
+        this.form.fProductName = "";
+        this.form.fMarks = "";
         this.form.fMblno = "";
         this.formBrowseStatus = false;
         return false;