Browse Source

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

wengyuwen 4 years ago
parent
commit
6fd957e008

+ 3 - 4
src/views/finance/contrast/index.vue

@@ -941,13 +941,12 @@ export default {
         let formDate = new window.FormData()
         formDate.append('tFee',JSON.stringify(this.queryParams))
         formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
-
         backFee(formDate).then(response=>{
           this.msgSuccess("撤回成功")
-
+          this.open = false
+          this.reset()
+          this.getList()
         })
-        // this.open = false
-      this.getList()
     },
 
     // 打印功能

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

@@ -344,7 +344,7 @@
                 v-model="form.fCorpid"
                 filterable
                 remote
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请选择货权方"
@@ -364,7 +364,7 @@
                 v-model="form.fTocorpid"
                 filterable
                 remote
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
                 @change="changefCorpid(form)"
                 :remote-method="corpsRemoteMethod"
@@ -397,7 +397,7 @@
                 v-model="form.fBsdate"
                 style="width: 80%"
                 type="date"
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 value-format="timestamp"
                 placeholder="货转日期"
               >
@@ -410,7 +410,7 @@
                 v-model="form.fChargedate"
                 style="width: 80%"
                 type="date"
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 value-format="timestamp"
                 placeholder="仓储计费日期">
               </el-date-picker>
@@ -421,7 +421,7 @@
               <el-select
                 v-model="form.fWarehouseid"
                 filterable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 remote
                 style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
@@ -443,7 +443,7 @@
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
                 clearable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -461,7 +461,7 @@
                 v-model="form.fFeetunit"
                 placeholder="请选择计费单位"
                 clearable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -479,7 +479,7 @@
                 v-model="form.fTrademodeid"
                 placeholder="请选择贸易方式"
                 clearable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -497,7 +497,7 @@
             <el-form-item label="提单号" prop="fMblno">
               <el-input
                 v-model="form.fMblno"
-                :disabled="browseStatus"
+                :disabled="notChange"
                 style="width: 80%"
                 placeholder="手工输入"
               />
@@ -508,7 +508,7 @@
               <el-input
                 v-model="form.fOriginalbillno"
                 style="width: 80%"
-                :disabled="browseStatus"
+                :disabled="notChange"
                 placeholder="原始入库单号"
               />
             </el-form-item>
@@ -521,7 +521,7 @@
                 value-format="yyyy-MM-dd"
                 range-separator="至"
                 style="width: 80%"
-                :disabled="browseStatus"
+                :disabled="notChange"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
               >

+ 65 - 43
src/views/warehouseBusiness/inStock/index.vue

@@ -344,7 +344,7 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
-            v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 6"
+            v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
             @click="handleUpdate(scope.row, true)"
           >审核进度
           </el-button>
@@ -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=""
@@ -2369,15 +2370,27 @@
           <!-- <div v-for="{{}}" :key="index"> -->
           <tr>
             <td width="400">车号:</td>
-            <td width="400">{{ fTruckno }}</td>
+            <td width="400" v-if="Printinglist.length === 0"></td>
+            <td width="400" v-else>{{ Printinglist[0].fTruckno }}</td>
             <td
               width="500"
               colspan="4"
               style="padding-bottom: 0px; font-weight: bold; border: none"
               class="zzss"
+              v-if="Printinglist.length === 0"
             >
-              日期:{{ fBsdates }}
+              日期:
             </td>
+            <td
+              width="500"
+              colspan="4"
+              style="padding-bottom: 0px; font-weight: bold; border: none"
+              class="zzss"
+              v-else
+            >
+              日期:{{ Printinglist[0].fOriginalbilldate }}
+            </td>
+
             <!-- <td
               width="500"
               colspan="2"
@@ -2428,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=""
@@ -2461,7 +2475,6 @@
               class="zzss"
               style="font-size: 28px; font-weight: bold"
             >
-              &nbsp;
             </td>
             <td
               width="500"
@@ -2469,16 +2482,18 @@
               style="padding-bottom: 0px; font-weight: bold; border: none"
               class="zzss"
             >
-              入库日期:{{ fBsdates }}
+              入库日期:{{ Printinglist }}
             </td>
           </tr>
           <tr v-for="(item, index) in Printinglist" :key="index">
             <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>
@@ -2523,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"
@@ -3020,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;
         }
       })
@@ -3032,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() {
@@ -3085,7 +3106,12 @@ export default {
           message: "请维护货权方",
           type: "warning",
         });
-      } else {
+      }else if(this.dataList[0].fGoodsid == undefined) {
+        this.$message({
+          message: "请维护入库明细品名",
+          type: "warning",
+        });
+      }else {
         this.whgenlegList = [];
         this.dialogWhgenlegList = [];
         this.whgenlegTotal = 0;
@@ -3147,7 +3173,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 =
@@ -3158,6 +3188,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);
@@ -3165,11 +3197,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 {
@@ -3382,8 +3410,16 @@ export default {
     // 查询作业费信息
     getWhgenlegList() {
       // this.queryParams.fCorpid = this.form.fCorpid;
-      this.queryParams.fLineno = this.form.fCorpid;
-      operationAgreement(this.queryParams).then((response) => {
+      // this.queryParams.fLineno = this.form.fCorpid;
+      // console.log(this.queryParams)
+      // console.log(this.dataList[0].fGoodsid)
+      let data = {
+        pageNum:1,
+        pageSize:10,
+        fLineno:this.form.fCorpid,
+        fFeeid:this.dataList[0].fGoodsid
+      }
+      operationAgreement(data).then((response) => {
         this.tasklegList = response.rows;
         for (let li in this.tasklegList) {
           this.$set(
@@ -3459,27 +3495,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;

+ 38 - 31
src/views/warehouseBusiness/outStock/index.vue

@@ -314,7 +314,7 @@
             type="text"
             icon="el-icon-delete"
             v-show="scope.row.fItemsStatus !== 4"
-            v-if="scope.row.fBillstatus !== 6 && scope.row.fItemsStatus === 1"
+            v-if="scope.row.fBillstatus < 4"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:inStock:remove']"
           >删除
@@ -761,19 +761,19 @@
         >
         </el-table-column>
         <el-table-column
-          prop="fWarehouselocids"
+          prop="fMarks"
           header-align="center"
-          width="150px"
           align="center"
-          label="*库区"
+          width="140px"
+          label="*品牌"
         >
         </el-table-column>
         <el-table-column
-          prop="fMarks"
+          prop="fWarehouselocids"
           header-align="center"
+          width="150px"
           align="center"
-          width="140px"
-          label="*品牌"
+          label="*库区"
         >
         </el-table-column>
         <el-table-column
@@ -781,7 +781,7 @@
           header-align="center"
           align="center"
           width="180px"
-          label="*当前库存"
+          label="*结余库存"
         >
         </el-table-column>
         <el-table-column
@@ -789,7 +789,7 @@
           header-align="center"
           width="180px"
           align="center"
-          label="*出库件数"
+          label="*结余件数"
         >
           <template slot-scope="scope">
             <el-input
@@ -797,7 +797,7 @@
               @change="qtyChange(scope.row)"
               v-model="scope.row.fQty"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
-              placeholder="出库件数"
+              placeholder="结余件数"
               show-word-limit
             />
           </template>
@@ -807,14 +807,14 @@
           header-align="center"
           width="180px"
           align="center"
-          label="*出库毛重"
+          label="*结余毛重"
         >
           <template slot-scope="scope">
             <el-input
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fGrossweight"
-              placeholder="出库毛重"
+              placeholder="结余毛重"
               show-word-limit
             />
           </template>
@@ -824,35 +824,35 @@
           header-align="center"
           width="180px"
           align="center"
-          label="*出库净重"
+          label="*结余净重"
         >
           <template slot-scope="scope">
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fNetweight"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
-              placeholder="出库净重"
-              show-word-limit
-            />
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="fVolumn"
-          header-align="center"
-          width="180px"
-          align="center"
-          label="出库尺码"
-        >
-          <template slot-scope="scope">
-            <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
-              v-model="scope.row.fVolumn"
-              :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
-              placeholder="出库尺码"
+              placeholder="结余净重"
               show-word-limit
             />
           </template>
         </el-table-column>
+<!--        <el-table-column-->
+<!--          prop="fVolumn"-->
+<!--          header-align="center"-->
+<!--          width="180px"-->
+<!--          align="center"-->
+<!--          label="出库尺码"-->
+<!--        >-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-input-->
+<!--              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'-->
+<!--              v-model="scope.row.fVolumn"-->
+<!--              :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"-->
+<!--              placeholder="出库尺码"-->
+<!--              show-word-limit-->
+<!--            />-->
+<!--          </template>-->
+<!--        </el-table-column>-->
         <el-table-column
           prop="fPackagespecs"
           header-align="center"
@@ -2717,6 +2717,11 @@ export default {
       this.costStatus = status
       if (!this.form.fCorpid) {
         this.$message({ message: "请维护货权方", type: "warning", });
+      }else if(this.dataList[0].fGoodsid == undefined) {
+        this.$message({
+          message: "请维护入库明细品名",
+          type: "warning",
+        });
       } else {
         this.whgenlegList = [];
         this.dialogWhgenlegList = [];
@@ -2748,6 +2753,8 @@ export default {
     // 查询作业费信息
     getWhgenlegListt() {
       this.queryParams.fLineno = this.form.fCorpid;
+      console.log(this.dataList[0].fGoodsid)
+      console.log(this.queryParams)
       operationAgreement(this.queryParams).then((response) => {
         this.tasklegList = response.rows;
         this.whgenlegTotal = response.total;

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

@@ -292,7 +292,7 @@
             type="text"
             icon="el-icon-edit"
             @click="check(scope.row, true)"
-            v-hasPermi="['warehouseBusiness:warehousebills:edit']"
+            v-hasPermi="['warehouseBusiness:stockTransfer:query']"
             >查看
           </el-button>
           <el-button
@@ -301,7 +301,7 @@
             icon="el-icon-edit"
             v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
             @click="check(scope.row, true)"
-            v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
+            v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
           >审批进度
           </el-button>
           <el-button