Переглянути джерело

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/warehouseBusiness/agreement/index.vue
wengyuwen 4 роки тому
батько
коміт
bb4a8489f2

+ 7 - 0
src/api/warehouseBusiness/warehouseInStock.js

@@ -93,3 +93,10 @@ export function exportWarehousebills(query) {
     params: query
   })
 }
+// 状态为6撤销(请核)
+export function revoke(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
+    method: 'get',
+  })
+}

+ 4 - 2
src/views/agreement/agreementTask/index.vue

@@ -564,8 +564,8 @@ export default {
     adoPt(){
       this.tablefilter = true
       this.approval = this.$route.query.data
-      this.cancelButton = false
       if (this.approval){
+        this.cancelButton = false
         this.determine = true
         this.prohibit = true
         this.browseStatus = true
@@ -618,6 +618,7 @@ export default {
       this.addOrUpdateVisible = false
     },
     homePage(){
+      console.log(this.cancelButton)
       let view = {
         fullPath: "/agreement/agreementTask",
         hash: "",
@@ -819,6 +820,7 @@ export default {
     },
     // 取消按钮
     cancel() {
+      console.log(this.cancelButton)
       this.open = false
       this.agreementitemsList = []
       this.reset()
@@ -943,9 +945,9 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
+      this.cancelButton = true
       const fId = row.fId || this.ids
       getAgreement(fId).then(response => {
-
         console.log(this.deptName)
         console.log(response)
         this.deptName = response.data.dept.deptName

+ 4 - 4
src/views/finance/charge/index.vue

@@ -1019,14 +1019,14 @@ export default {
     //确认导入
     confirmImport() {
       this.hide = true
+      console.log(this.selection)
       for (let item in this.selection) {
-         this.pass.fAmtcr += Number(this.selection[item].fAmt.toFixed(2))
-         this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2))
+        this.pass.fAmtcr += Number(this.selection[item].fAmt)
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2))
       }
-      console.log(this.pass)
+      this.pass.fAmtcr.toFixed(2)
       if (this.state_s == true) {
         if (this.selection.length == '0') {
-          console.log('未选择')//写入提示
           this.$message.error('未选择导入行')
         } else {
           console.log(this.selection[0].fMblno)

+ 13 - 12
src/views/system/user/index.vue

@@ -227,18 +227,6 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
-              <el-input v-model="form.userName" placeholder="请输入用户名称" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
-              <el-input v-model="form.password" placeholder="请输入用户密码" type="password" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
             <el-form-item label="用户性别">
               <el-select v-model="form.sex" placeholder="请选择">
                 <el-option
@@ -291,12 +279,25 @@
           </el-col>
         </el-row>
         <el-row>
+          <el-col :span="12">
+            <el-form-item  label="用户名称" prop="userName">
+              <el-input v-model="form.userName" placeholder="请输入用户名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
+              <el-input v-model="form.password" placeholder="请输入用户密码" type="password" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="24">
             <el-form-item label="备注">
               <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>

+ 282 - 142
src/views/warehouseBusiness/inStock/index.vue

@@ -168,10 +168,10 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索
+        >搜索
         </el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置
+        >重置
         </el-button>
       </el-form-item>
     </el-form>
@@ -184,7 +184,7 @@
           size="mini"
           @click="handleAdd(false)"
           v-hasPermi="['warehouseBusiness:warehousebills:add']"
-          >新增
+        >新增
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -195,7 +195,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['warehouseBusiness:warehousebills:edit']"
-          >修改
+        >修改
         </el-button>
       </el-col>
       <!-- <el-col :span="1.5">
@@ -216,7 +216,7 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['warehouseBusiness:warehousebills:export']"
-          >导出
+        >导出
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -227,7 +227,7 @@
           @click="handleExport"
           :disabled="multiple"
           v-hasPermi="['warehouseBusiness:warehousebills:export']"
-          >导入
+        >导入
         </el-button>
       </el-col>
       <right-toolbar
@@ -257,9 +257,9 @@
         align="center"
         prop="fBsdate"
         width="180"
-        ><template slot-scope="scope">
-          <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
-        </template>
+      ><template slot-scope="scope">
+        <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
+      </template>
       </el-table-column>
       <!-- <el-table-column
         label="贸易方式"
@@ -315,7 +315,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row, true)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
-            >查看
+          >查看
           </el-button>
           <el-button
             size="mini"
@@ -328,7 +328,7 @@
             "
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
-            >修改
+          >修改
           </el-button>
           <el-button
             size="mini"
@@ -337,7 +337,7 @@
             v-if="scope.row.fBillstatus !== 6 && scope.row.fItemsStatus === 1"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
-            >删除
+          >删除
           </el-button>
         </template>
       </el-table-column>
@@ -354,6 +354,7 @@
       :visible.sync="open"
       :close-on-click-modal="false"
       @close='addCloseDialog'
+      :show-close="closeButton"
       width="80%"
       append-to-body
     >
@@ -549,7 +550,7 @@
                 style="width: 100%"
                 v-model="form.remark"
                 type="textarea"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="browseStatus"
                 placeholder="请输入内容"
               />
             </el-form-item>
@@ -797,13 +798,13 @@
             type="primary"
             :disabled="browseStatus"
             @click.prevent="addRelevant(10)"
-            >新行
+          >新行
           </el-button>
           <el-button
             :disabled="browseStatus"
             type="primary"
             @click="submitForm(2)"
-            >保 存</el-button
+          >保 存</el-button
           >
         </div>
         <div>
@@ -811,27 +812,27 @@
             @click="
               detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
             "
-            >{{ detailsHidden ? "隐藏" : "展开" }}</el-button
+          >{{ detailsHidden ? "隐藏" : "展开" }}</el-button
           >
           <el-button type="info" prop="打印" @click="showEditDialog_sss"
-            >作业单
+          >作业单
           </el-button>
           <el-button @click="discharge">卸货 </el-button>
           <el-button
             :disabled="dataListSelection.length <= 0"
             @click.prevent="creditClick"
-            >入库确认
+          >入库确认
           </el-button>
           <el-button
             :disabled="dataWithdrawList.length <= 0"
             @click.prevent="withdrawClick"
-            >撤回入库</el-button
+          >撤回入库</el-button
           >
           <el-button type="success" prop="打印" @click="showEditDialog_ss"
-            >收货单
+          >收货单
           </el-button>
           <el-button type="warning" prop="打印" @click="showEditDialog_s"
-            >入库单
+          >入库单
           </el-button>
           <!--
           <el-button
@@ -844,15 +845,16 @@
             :disabled="browseStatus"
             style="background-color: #008000; color: #fff"
             @click="submitForm(6)"
-            >请核</el-button
+          >请核</el-button
           >
         </div>
         <div style="font-size: 18px">入库明细</div>
       </div>
       <el-table
         :data="dataList"
-        ref="tableList"
         tooltip-effect="dark"
+        :rules="checkout"
+        ref="checkout"
         border
         stripe
         :summary-method="getSummaries"
@@ -1264,10 +1266,7 @@
               v-model="scope.row.remark"
               placeholder="备注"
               :disabled="
-                browseStatus ||
-                scope.row.fBillstatus === 20 ||
-                scope.row.fBillstatus === 30 ||
-                scope.row.fBillstatus === 40
+                browseStatus
               "
               show-word-limit
             />
@@ -1312,7 +1311,7 @@
               "
               @click.native.prevent="wDeleteRow(scope.$index, dataList)"
               size="small"
-              >移除</el-button
+            >移除</el-button
             >
           </template>
         </el-table-column>
@@ -1331,7 +1330,7 @@
             type="primary"
             :disabled="browseStatus"
             @click.prevent="addRelevt()"
-            >新行
+          >新行
           </el-button>
         </div>
         <div style="font-size: 18px">附件明细</div>
@@ -1424,7 +1423,7 @@
               "
               :disabled="browseStatus"
               size="small"
-              >移除
+            >移除
             </el-button>
           </template>
         </el-table-column>
@@ -1443,15 +1442,15 @@
             type="primary"
             :disabled="browseStatus"
             @click.prevent="addCollection()"
-            >新行
+          >新行
           </el-button>
           <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
         </el-button> -->
-          <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+          <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
           <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
-          <el-button @click.prevent="addAgreement()" type="danger"
-            >作业费协议</el-button
+          <el-button @click.prevent="addAgreement()" :disabled="browseStatus" type="danger"
+          >作业费协议</el-button
           >
         </div>
         <div style="font-size: 18px">收款信息</div>
@@ -1671,7 +1670,7 @@
             <el-button
               @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
               size="small"
-              >移除</el-button
+            >移除</el-button
             >
           </template>
         </el-table-column>
@@ -1690,15 +1689,15 @@
             type="primary"
             :disabled="browseStatus"
             @click.prevent="addpayment()"
-            >新行
+          >新行
           </el-button>
           <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseCrList)"
           >删除
         </el-button> -->
-          <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+          <el-button type="primary" @click="submitForm(2)" :disabled="browseStatus">保 存</el-button>
           <!-- <el-button type="warning">仓储费协议</el-button> -->
-          <el-button type="danger" @click.prevent="addAgreements()"
-            >作业费协议</el-button
+          <el-button type="danger" @click.prevent="addAgreements()" :disabled="browseStatus"
+          >作业费协议</el-button
           >
         </div>
         <div style="font-size: 18px">付款信息</div>
@@ -1920,7 +1919,7 @@
             <el-button
               @click.native.prevent="deleteRoww(scope.$index, warehouseCrList)"
               size="small"
-              >移除</el-button
+            >移除</el-button
             >
           </template>
         </el-table-column>
@@ -1930,14 +1929,12 @@
           type="primary"
           :disabled="approvalStatus"
           @click="addOrUpdateHandle(form)"
-          >查看审批</el-button
-        >
+        >查看审批</el-button>
         <el-button
           type="primary"
-          :disabled="approvalStatus"
+          v-if="approVal === true"
           @click="addOrUpdateHand(form)"
-          >审批弹窗</el-button
-        >
+        >审批</el-button>
         <!-- 弹窗, 新增 / 修改 -->
         <add-or-update
           v-if="addOrUpdateVisible"
@@ -1950,28 +1947,29 @@
           @refreshDataList="returnData"
         ></approval-comments>
         <el-button type="success" prop="打印" @click="showEditDialog_ss"
-          >收货单
+        >收货单
         </el-button>
         <el-button type="warning" prop="打印" @click="showEditDialog_s"
-          >入库单
+        >入库单
         </el-button>
         <el-button @click="discharge">卸货 </el-button>
         <el-button type="info" prop="打印" @click="showEditDialog_sss"
-          >作业单
+        >作业单
         </el-button>
         <el-button
           :disabled="browseStatus"
           type="primary"
           @click="submitForm(2)"
-          >保 存</el-button
+        >保 存</el-button
         >
         <el-button
           :disabled="browseStatus"
           style="background-color: #008000; color: #fff"
           @click="submitForm(6)"
-          >请核</el-button
-        >
-        <el-button @click="cancel">取 消</el-button>
+        >请核</el-button>
+        <el-button type="danger" v-if="form.fBillstatus == '6'" @click="revoke">撤销请核</el-button>
+        <el-button @click="cancelTwo" v-if="approVal === true">取 消</el-button>
+        <el-button @click="cancel" v-else>取 消</el-button>
       </div>
       <!-- 入库新行计划重量导入 -->
       <el-dialog
@@ -2115,7 +2113,7 @@
         />
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="whgenlegData"
-            >导入作业费协议</el-button
+          >导入作业费协议</el-button
           >
           <el-button @click="warehousingagreement = false">取 消</el-button>
         </div>
@@ -2243,7 +2241,7 @@
           </tr>
           <tr>
             <td width="450" colspan="2" class="zzss">
-              货权方:{{ form.fCorpid }}
+              货权方:{{ form.fCorpidName }}
             </td>
             <td width="450" colspan="2" class="zzss">
               仓库:{{ form.fWarehouseid }}
@@ -2519,7 +2517,7 @@
             type="primary"
             :disabled="browseStatus"
             @click="printSomething2"
-            >打印
+          >打印
           </el-button>
           <el-button @click="editDialogVisible_sss = false">取消 </el-button>
         </div>
@@ -2542,6 +2540,7 @@ import {
   addWarehouse,
   updateWarehousebills,
   exportWarehousebills,
+  revoke
 } from "@/api/warehouseBusiness/warehouseInStock";
 import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
 import { listCorps } from "@/api/basicdata/corps";
@@ -2558,6 +2557,8 @@ import { listUser, queryUserVal } from "@/api/system/user";
 import UploadFile from "@/components/Uploadfile";
 import AddOrUpdate from "@/views/viewApproval";
 import ApprovalComments from "@/views/startApproval";
+import { getCharge } from '@/api/finance/charge'
+import Global from '@/layout/components/global'
 export default {
   name: "Warehousebills",
   components: {
@@ -2607,6 +2608,43 @@ export default {
         nickName: null,
         deptId: null,
       },
+      closeButton:true,
+      //表单校验
+      checkout: {
+        fGoodsid:[
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        fMarks: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        fWarehouselocid:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fGrossweight:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fNetweight:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fQty:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fPackagespecs:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fTruckno:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fDriverName:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fDriverTel:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ],
+        fDriverIdCar:[
+          { required: true, message: ' ', trigger: 'blur'}
+        ]
+      },
       queryForm: {},
       // 新增用户对话框
       editDialogVisible_s: false,
@@ -2753,6 +2791,7 @@ export default {
         fPlannetweight: null,
         fPlangrossweight: null,
       },
+      approVal:false,
       // 表单参数
       form: {
         fItemsStatus: null,
@@ -2828,12 +2867,136 @@ export default {
       this.fBillstatusOptions = response.data;
     });
   },
-
+  activated() {
+    this.adoPt()
+  },
   methods: {
+    adoPt(){
+      this.approval = this.$route.query.data
+      if (this.approval){
+        this.closeButton = false
+        this.approval = JSON.parse(this.approval)
+        this.approVal = true
+        this.browseStatus = status;
+        this.reset();
+        this.detailsHidden = false;
+        this.formBrowseStatus = false;
+        this.dataList = [];
+        getWarehousebills(this.approval.billId).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            if (this.form.fBillstatus > 2) {
+              this.approvalStatus = false;
+            } else {
+              this.approvalStatus = true;
+            }
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+              }
+            }
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fSbuOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+          this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+          this.$set(
+            this.form,
+            "fPlannetweight",
+            this.form.fPlannetweight.toFixed(2)
+          );
+          this.$set(
+            this.form,
+            "fPlangrossweight",
+            this.form.fPlangrossweight.toFixed(2)
+          );
+          for (let list in this.dataList) {
+            this.$set(
+              this.dataList[list],
+              "fBsdate",
+              Date.parse(this.dataList[list].fBsdate)
+            );
+          }
+          this.goodsOptions = response.data.goodsList;
+          this.kqhouseOptions = response.data.warehouseAreas;
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+          for (let dr in this.warehouseDrList) {
+            this.$set(
+              this.warehouseDrList[dr],
+              "fFeeUnitid",
+              this.warehouseDrList[dr].fFeeunitid + ""
+            );
+            this.$set(
+              this.warehouseDrList[dr],
+              "fQty",
+              this.warehouseDrList[dr].fQty.toFixed(2)
+            );
+            this.$set(
+              this.warehouseDrList[dr],
+              "fAmount",
+              this.warehouseDrList[dr].fAmount.toFixed(2)
+            );
+          }
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+          for (let cr in this.warehouseCrList) {
+            this.$set(
+              this.warehouseCrList[cr],
+              "fFeeUnitid",
+              this.warehouseCrList[cr].fFeeunitid + ""
+            );
+          }
+          this.userOptions = response.data.sysUser;
+          this.open = true;
+          this.title = "修改仓入库";
+        });
+      }
+    },
     //关闭弹框的事件
     addCloseDialog(){
       this.getList()
     },
+    cancelTwo(){
+      this.open = false
+      let view = {
+        fullPath: "/business/inStock",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "InStock",
+        params: Object,
+        path: "/business/inStock",
+        query: Object,
+        title: "入库"
+      }
+      this.$router.push({ path: '/index'})
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
     // 上传成功返回数据
     showFile(row) {
       for (let list in this.relevantAttachments) {
@@ -2841,6 +3004,14 @@ export default {
         this.$set(this.relevantAttachments[list], "fName", row.fileName);
       }
     },
+    revoke(){
+      revoke(this.form.fId).then(data=>{
+        console.log(data)
+        if (data.code == 200){
+          this.open = false;
+        }
+      })
+    },
     printSomething() {
       // 此处的style即为打印时的样式
       const style =
@@ -2967,10 +3138,10 @@ export default {
         }
         for (let corp in this.fMblnoOptions) {
           if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
-            this.$set(this.form, "fCorpid", this.fMblnoOptions[corp].fName);
+            this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
           }
         }
-
+        console.log(JSON.stringify(this.form))
         for (let sorp in this.warehouseOptions) {
           if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
             this.$set(
@@ -3033,26 +3204,26 @@ export default {
       if (this.Printinglist.length > 0) {
         for (let li in this.Printinglist) {
           if (!this.Printinglist[li].fId) {
-            this.$message.error("请先保存!");
-            return false;
+            this.$message.error('请先保存!')
+            return false
           }
           if (this.dataListSelection.length > 0) {
             console.log(this.dataListSelection)
-            this.fTruckno = this.dataListSelection[0].fTruckno;
-            this.fCntrtype = this.dataListSelection[0].fCntrtype;
-            this.fGoodsids = this.dataListSelection[0].fGoodsids;
-            this.fDriverTel = this.dataListSelection[0].fDriverTel;
-            this.fPackagespecs = this.dataListSelection[0].fPackagespecs;
-            var date = new Date(this.dataListSelection[0].fBsdate);
-            var Y = date.getFullYear() + "-";
+            this.fTruckno = this.dataListSelection[0].fTruckno
+            this.fCntrtype = this.dataListSelection[0].fCntrtype
+            this.fGoodsids = this.dataListSelection[0].fGoodsids
+            this.fDriverTel = this.dataListSelection[0].fDriverTel
+            this.fPackagespecs = this.dataListSelection[0].fPackagespecs
+            var date = new Date(this.dataListSelection[0].fBsdate)
+            var Y = date.getFullYear() + '-'
             var M =
               (date.getMonth() + 1 < 10
-                ? "0" + (date.getMonth() + 1)
-                : date.getMonth() + 1) + "-";
+                ? '0' + (date.getMonth() + 1)
+                : date.getMonth() + 1) + '-'
             var D =
-              (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) +
-              " ";
-            this.fBsdates = Y + M + D;
+              (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) +
+              ' '
+            this.fBsdates = Y + M + D
           }
           for (let list in this.goodsOptions) {
             if (
@@ -3060,9 +3231,9 @@ export default {
             ) {
               this.$set(
                 this.Printinglist[li],
-                "fGoodsids",
+                'fGoodsids',
                 this.goodsOptions[list].fName
-              );
+              )
             }
           }
         }
@@ -3072,61 +3243,61 @@ export default {
               this.Printinglist[warehouseCr].fTruckno !=
               this.Printinglist[0].fTruckno
             ) {
-              this.$message.error("请选择车相同车号");
-              return false;
+              this.$message.error('请选择车相同车号')
+              return false
             }
             if (
               this.Printinglist[warehouseCr].fDriverName !=
               this.Printinglist[0].fDriverName
             ) {
-              this.$message.error("请选择相同司机名");
-              return false;
+              this.$message.error('请选择相同司机名')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fGoodsid) {
-              this.$message.error("请选择品名");
-              return false;
+              this.$message.error('请选择品名')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fWarehouselocid) {
-              this.$message.error("请选择库区");
-              return false;
+              this.$message.error('请选择库区')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fGrossweight) {
-              this.$message.error("请选择入库毛重");
-              return false;
+              this.$message.error('请选择入库毛重')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fNetweight) {
-              this.$message.error("请选择入库净重");
-              return false;
+              this.$message.error('请选择入库净重')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fPackagespecs) {
-              this.$message.error("请输入包装规格");
-              return false;
+              this.$message.error('请输入包装规格')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fMarks) {
-              this.$message.error("请输入品牌");
-              return false;
+              this.$message.error('请输入品牌')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fQty) {
-              this.$message.error("请选择入库件数");
-              return false;
+              this.$message.error('请选择入库件数')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fDriverName) {
-              this.$message.error("请输入司机姓名");
-              return false;
+              this.$message.error('请输入司机姓名')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fDriverTel) {
-              this.$message.error("请输入司机电话");
-              return false;
+              this.$message.error('请输入司机电话')
+              return false
             }
             if (!this.Printinglist[warehouseCr].fTruckno) {
-              this.$message.error("请输入车号");
-              return false;
+              this.$message.error('请输入车号')
+              return false
             }
           }
-          this.editDialogVisible_sss = true;
+          this.editDialogVisible_sss = true
         }
       } else {
-        this.$message.error("请选择需要打印的明细!");
+        this.$message.error('请选择需要打印的明细!')
       }
     },
     // 收款信息
@@ -3925,52 +4096,22 @@ export default {
             "tEnclosure",
             JSON.stringify(this.relevantAttachments)
           );
-
           for (let li in this.dataListSelection) {
             this.dataListSelection[li].fBillstatus = 20;
           }
           addJoblist(formData).then((response) => {
-            this.formBrowseStatus = true;
-            for (let li in this.dataListSelection) {
+            this.formBrowseStatus = true
+            let dataSelection = response.data.warehousebillsitems
+            for (let li in dataSelection) {
               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
-                ) {
-                  this.$set(this.dataList[i], "fBillstatus", 20);
-                  for (let list in response.data.warehousebillsitems) {
-                    this.$set(
-                      this.dataList[i],
-                      "fSerialNumber",
-                      response.data.warehousebillsitems[list].fSerialNumber
-                    );
-                  }
+                if (dataSelection[li].fId === this.dataList[i].fId) {
+                  this.$set(this.dataList[i], 'fBillstatus', 20)
+                  this.$set(this.dataList[i], 'fSerialNumber', dataSelection[li].fSerialNumber)
                 }
               }
             }
-            this.$refs.tableList.clearSelection();
-          });
+            this.$refs.tableList.clearSelection()
+          })
         }
       });
     },
@@ -4072,7 +4213,7 @@ export default {
               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);
+                    this.$set(this.dataList[li], "fBillstatus", 30);
                   }
                 }
               }
@@ -4292,6 +4433,7 @@ export default {
     },
     returnData() {
       this.addOrUpdateVisib = false;
+      this.cancelTwo()
     },
     addOrUpdateHandle(form) {
       this.addOrUpdateVisible = true;
@@ -4303,10 +4445,8 @@ export default {
     },
     addOrUpdateHand(form) {
       this.addOrUpdateVisib = true;
-      let id = form.fId;
-      let actId = "110";
       this.$nextTick(() => {
-        this.$refs.ApprovalComments.init(id, actId);
+        this.$refs.ApprovalComments.init(form.fId, 110);
       });
     },
     /* 远程模糊查询用户 */

+ 98 - 49
src/views/warehouseBusiness/outStock/index.vue

@@ -577,7 +577,7 @@
             <el-input
               style="width: 100%"
               v-model="form.remark"
-              :disabled="browseStatus || formBrowseStatus"
+              :disabled="browseStatus "
               type="textarea"
               placeholder="请输入内容"
             />
@@ -716,6 +716,7 @@
         <div style="font-size: 18px">出库明细</div>
         <!--点击展开-->
       </div>
+      <el-form v-model="dataList" :rules="checkout" ref="checkout">
       <el-table
         :data="dataList"
         ref="tableList"
@@ -750,7 +751,7 @@
           header-align="center"
           width="150px"
           align="center"
-          label="*库区"
+          label="库区"
         >
         </el-table-column>
         <el-table-column
@@ -758,7 +759,7 @@
           header-align="center"
           align="center"
           width="140px"
-          label="*品牌"
+          label="品牌"
         >
         </el-table-column>
         <el-table-column
@@ -766,7 +767,7 @@
           header-align="center"
           align="center"
           width="180px"
-          label="*当前库存"
+          label="当前库存"
         >
         </el-table-column>
         <el-table-column
@@ -777,6 +778,7 @@
           label="*出库件数"
         >
           <template slot-scope="scope">
+            <el-form-item :prop="'dataList.'+scope.$index+'.fQty'" :rules="checkout.fQty">
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "")'
               @change="qtyChange(scope.row)"
@@ -785,6 +787,7 @@
               placeholder="出库件数"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
         <el-table-column
@@ -795,6 +798,7 @@
           label="*出库毛重"
         >
           <template slot-scope="scope">
+            <el-form-item prop="fGrossweight" :rules="checkout.fGrossweight">
             <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")'
@@ -802,6 +806,7 @@
               placeholder="出库毛重"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
         <el-table-column
@@ -812,6 +817,7 @@
           label="*出库净重"
         >
           <template slot-scope="scope">
+            <el-form-item prop="fNetweight" :rules="checkout.fNetweight">
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fNetweight"
@@ -819,6 +825,7 @@
               placeholder="出库净重"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
         <el-table-column
@@ -846,6 +853,7 @@
           label="*包装规格"
         >
           <template slot-scope="scope">
+            <el-form-item prop="fPackagespecs" :rules="checkout.fPackagespecs">
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fPackagespecs"
@@ -853,6 +861,7 @@
               placeholder="包装规格"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
         <el-table-column
@@ -930,12 +939,14 @@
           label="*车号"
         >
           <template slot-scope="scope">
+            <el-form-item prop="ftruckno" :rules="checkout.ftruckno">
             <el-input
               v-model="scope.row.fTruckno"
               placeholder="车号"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
 
@@ -947,12 +958,14 @@
           label="*司机名"
         >
           <template slot-scope="scope">
+            <el-form-item prop="fDriverName" :rules="checkout.fDriverName">
             <el-input
               v-model="scope.row.fDriverName"
               placeholder="司机名"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
 
@@ -964,12 +977,14 @@
           label="*司机电话"
         >
           <template slot-scope="scope">
+            <el-form-item prop="fDriverTel" :rules="checkout.fDriverTel">
             <el-input
               v-model="scope.row.fDriverTel"
               placeholder="司机电话"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
 
@@ -981,12 +996,14 @@
           label="*司机身份证"
         >
           <template slot-scope="scope">
+            <el-form-item prop="fDriverIdCar" :rules="checkout.fDriverIdCar">
             <el-input
               v-model="scope.row.fDriverIdCar"
               placeholder="司机身份证"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               show-word-limit
             />
+            </el-form-item>
           </template>
         </el-table-column>
 
@@ -1033,7 +1050,7 @@
             <el-input
               v-model="scope.row.remark"
               placeholder="备注"
-              :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
+              :disabled="browseStatus"
               show-word-limit
             />
           </template>
@@ -1068,6 +1085,7 @@
           </template>
         </el-table-column>
       </el-table>
+      </el-form>
       <div
         class="dialogTableTitle flex a-center jlr"
         style="
@@ -1389,7 +1407,7 @@
             <el-input
               v-model="scope.row.remarks"
               :disabled="browseStatus"
-              placeholder="备注"
+              placeholder="备1注"
               show-word-limit
             />
           </template>
@@ -2419,6 +2437,33 @@ export default {
         fTrademodeid: null,
         fWarehouseid: null,
       },
+
+      checkout: {
+        fQty:[{
+          type:"string",required: true, message: " ", trigger: "blur"
+        }],
+        fGrossweight:[{
+          required: true, message: " ", trigger: "blur"
+        }],
+        fNetweight:[{
+          required: true, message: " ", trigger: "blur"
+        }],
+        fPackagespecs:[{
+          required: true, message: " ", trigger: "blur"
+        }],
+        ftruckno:[{
+          required: true, message: " ", trigger: "blur"
+        }],
+        fDriverName:[{
+          required: true, message: " ", trigger: "blur"
+        }],
+        fDriverTel:[{
+          required: true, message: " ", trigger: "blur"
+        }],
+        fDriverIdCar:[{
+          required: true, message: " ", trigger: "blur"
+        }]
+      },
       // 表单校验
       rules: {
         fDeptid: [{ required: true, message: " ", trigger: "blur" }],
@@ -3346,7 +3391,7 @@ export default {
           } else if (!this.dataListSelection[warehouseCr].fQty) {
             this.$message.error("请维护出库件数");
             return false;
-          } else if (this.dataListSelection[warehouseCr].fIsPass == this.releaseList.dictValue !== 'T') {
+          } else if (this.dataListSelection[warehouseCr].fIsPass !== 'T') {
             this.$message.error("请放行才能出库");
             return false;
           }
@@ -3552,48 +3597,52 @@ export default {
     },
     // 保存
     saveForm () {
-      this.updateDeduplication()
-      this.$refs['form'].validate((valid) => {
-        if (this.dataList.length === 0) {
-          this.$message.error('请添加库存明细!')
-          return false
-        }
-        for (let list in this.dataList) {
-          if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
-            this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库件数!')
-            return false
-          }
-          if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
-            this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库毛重!')
-            return false
-          }
-          if (!this.dataList[list].fNetweight || Number(this.dataList[list].fNetweight) === 0) {
-            this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库净重!')
-            return false
-          }
-        }
-        if (valid) {
-          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);
+      this.$refs['checkout'].validate(valid => {
+        if (valid){
+          this.updateDeduplication()
+          this.$refs['form'].validate((valid) => {
+            if (this.dataList.length === 0) {
+              this.$message.error('请添加库存明细!')
+              return false
+            }
+            for (let list in this.dataList) {
+              if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
+                this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库件数!')
+                return false
+              }
+              if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
+                this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库毛重!')
+                return false
+              }
+              if (!this.dataList[list].fNetweight || Number(this.dataList[list].fNetweight) === 0) {
+                this.$message.error('请维护序号为' + (Number(list) + 1) + '的出库净重!')
+                return false
+              }
+            }
+            if (valid) {
+              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);
+            }
+          })
         }
       })
     },

+ 8 - 0
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -554,6 +554,14 @@
           >
           </el-table-column>
           <el-table-column
+            prop="fInventoryDays"
+            header-align="center"
+            align="center"
+            width="140px"
+            label="库存天数"
+          >
+          </el-table-column>
+          <el-table-column
             prop="fAmt"
             header-align="center"
             align="center"