Browse Source

Merge remote-tracking branch 'origin/dev' into dev

caojunjie 3 years ago
parent
commit
cb74c7edb2

+ 3 - 0
src/components/bill/billDetailList.vue

@@ -102,6 +102,9 @@
           ...this.params
         }
         params.billType = this.billType
+        if (this.$store.getters.userInfo.tenant_id === "673511") {
+          params.type = "CMY"
+        }
         params.flag = this.flag
         getBillList(page.currentPage, page.pageSize,params).then(res=>{
           this.data = res.data.data.records

+ 5 - 1
src/views/InventoryManagement/inventory/config/customerContact.json

@@ -121,8 +121,12 @@
           "value": "2"
         },
         {
-          "label": "已出库",
+          "label": "待扫描",
           "value": "3"
+        },
+        {
+          "label": "已出库",
+          "value": "4"
         }
       ],
       "width": 100

+ 9 - 9
src/views/InventoryManagement/inventory/detailsPage.vue

@@ -21,7 +21,8 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审核数据</el-dropdown-item>
-            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核
+            </el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
             <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
@@ -58,7 +59,7 @@
             <div style="display:flex;justify-content: center;">
               <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
                 :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
-                <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+              <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
                 :disabled="detailData.status == 1">删除</el-button>
             </div>
           </template>
@@ -93,7 +94,7 @@
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, revokeWarehousing,delItem } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, revokeWarehousing, delItem } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
@@ -177,7 +178,7 @@ export default {
       pageLoading: false,
       batchNo: '',
       storagetreeList: [],
-      roleName:localStorage.getItem("roleName")
+      roleName: localStorage.getItem("roleName")
     };
   },
   props: {
@@ -247,11 +248,7 @@ export default {
       return "padding:0;height:40px;";
     },
     calculateChange(row) {
-      // console.log(row)
       row.surplusLoss = (Number(row.inventory ? row.inventory : 0) - Number(row.storageInQuantity ? row.storageInQuantity : 0)).toFixed(2)
-      // row.balanceNumber = Number(row.inventory ? row.inventory : 0)
-      // row.surplusLoss = Number(row.inventory ? row.inventory : 0) - Number(row.balanceNumber ? row.balanceNumber : 0)
-      // row.balanceMoney = Number(row.price ? row.price : 0) * Number(row.row.balanceNumber)
     },
     getStorage() {
       getStorage({ storageTypeId: this.form.storageId }).then(res => {
@@ -362,7 +359,7 @@ export default {
             delete e.id
           })
           this.form = res.data.data;
-          this.itemsVOList = res.data.data.itemsVOList;
+          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 1);
           this.getStorage()
         })
         .finally(() => {
@@ -374,6 +371,9 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
+          this.itemsVOList.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           this.subLoading = true;
           let data = {
             ...this.form,

+ 1 - 1
src/views/InventoryManagement/inventory/index.vue

@@ -11,7 +11,7 @@
                     </el-button>
                 </template>
                 <template slot-scope="{ row,index}" slot="menu">
-                    <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(row, index)">删除
+                    <el-button type="text" icon="el-icon-delete" size="small" :disabled="row.status>0" @click.stop="rowDel(row, index)">删除
                     </el-button>
                 </template>
                 <template slot-scope="{ row,index}" slot="purchaserId">

+ 35 - 4
src/views/basicData/agreement/detailsPage.vue

@@ -10,7 +10,7 @@
         <div class="add-customer-btn">
           <el-button type="info" @click="getData" size="small">刷新资料
           </el-button>
-          <el-button type="primary" size="small" @click="editCustomer" :disabled="loadingBtn || detailData.status == 1">
+          <el-button type="primary" size="small" @click="editCustomer" :disabled="form.status==0">
             保存数据
           </el-button>
         </div>
@@ -20,7 +20,7 @@
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">
             <crop-select ref="corpId" v-model="form.corpId" corpType="KH" :refresh="false" @getCorpData="getCorpData"
-              :disabled="detailData.status == 1"></crop-select>
+            :disabled="form.status==0"></crop-select>
           </template>
           <template slot-scope="{column}" slot="corpIdLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
@@ -54,9 +54,9 @@
             <span v-else>{{ row.feeName }}</span>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button size="small" type="text" @click="rowCell(row, index)" :disabled="detailData.status == 1">{{
+            <el-button size="small" type="text" @click="rowCell(row, index)" :disabled="form.status==0">{{
             row.$cellEdit ? "保存" : "修改" }}</el-button>
-            <el-button size="small" type="text" @click="rowDel(row, index)" :disabled="detailData.status == 1">删除
+            <el-button size="small" type="text" @click="rowDel(row, index)" :disabled="form.status==0">删除
             </el-button>
           </template>
         </avue-crud>
@@ -143,6 +143,13 @@ export default {
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
             span: 6,
           },
           {
@@ -151,6 +158,13 @@ export default {
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
             span: 6,
           },
           {
@@ -164,6 +178,13 @@ export default {
             },
             dicData: [],
             multiple: true,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
             span: 6,
           },
           {
@@ -177,6 +198,13 @@ export default {
               value: 'id'
             },
             multiple: true,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
             span: 6,
           },
           {
@@ -307,6 +335,9 @@ export default {
           //   res.data.data.warehouseId = res.data.data.warehouseId.split(',')
           // }
           this.form = res.data.data;
+          if(res.data.data.status==0){
+            this.option.disabled=true
+          }
           this.dataList = res.data.data.agreementitemsList;
           this.orderFilesList = res.data.data.orderFilesList
         })

+ 1 - 1
src/views/basicData/agreement/index.vue

@@ -23,7 +23,7 @@
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
         </template>
         <template slot-scope="{ row, index }" slot="menu">
-          <el-button type="text" size="small" @click.stop="rowDel(row, index)">
+          <el-button type="text" size="small" :disabled="row.status==0" @click.stop="rowDel(row, index)">
             删除
           </el-button>
         </template>

+ 3 - 0
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -1777,6 +1777,9 @@ export default {
             costSum,
             paySum
           );
+          this.data.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           this.subLoading = true;
 
           submit({

+ 3 - 0
src/views/exportTrade/invoice/detailsPage.vue

@@ -814,6 +814,9 @@ export default {
               return this.$message.error(`请正确输入第${i + 1}行的数量`);
             }
           }
+          this.data.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           const orderFilesList = this.$refs.uploadFile.submitData();
           if (status == "submit") {
             this.subLoading = true;

+ 3 - 0
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -957,6 +957,9 @@ export default {
               return this.$message.error(`请正确输入第${i + 1}行的数量`);
             }
           }
+          this.data.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           this.subLoading = true;
           submit({
             ...this.form,

+ 60 - 218
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -3,301 +3,139 @@
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
-        <el-button
-          type="danger"
-          style="border: none;background: none;color: red"
-          icon="el-icon-arrow-left"
-          @click="backToList"
-          >返回列表
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList">返回列表
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut">
-        <el-button
-          type="primary"
-          size="small"
-          v-if="detailData.status == 1"
-          class="el-button--small-yh "
-          :disabled="form.ifEnquiry == '询价确认'"
-          @click.stop="openEdit"
-          >编辑
+        <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
+          :disabled="form.ifEnquiry == '询价确认'" @click.stop="openEdit">编辑
         </el-button>
-        <el-button
-          type="primary"
-          :disabled="form.ifEnquiry == '询价确认'"
-          v-if="detailData.status != 1"
-          @click="editCustomer('submit')"
-          size="small"
-          >提交
+        <el-button type="primary" :disabled="form.ifEnquiry == '询价确认'" v-if="detailData.status != 1"
+          @click="editCustomer('submit')" size="small">提交
         </el-button>
-        <el-button
-          type="success"
-          :disabled="!form.id"
-          size="small"
-          @click="copyDoc"
-          >复制单据</el-button
-        >
-        <el-button
-          type="primary"
-          :disabled="form.ifEnquiry == '询价确认'"
-          @click="editCustomer('save')"
-          :loading="subLoading"
-          v-if="detailData.status != 1"
-          size="small"
-          >保存数据
+        <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc">复制单据</el-button>
+        <el-button type="primary" :disabled="form.ifEnquiry == '询价确认'" @click="editCustomer('save')"
+          :loading="subLoading" v-if="detailData.status != 1" size="small">保存数据
         </el-button>
       </div>
     </div>
     <div class="customer-main">
       <trade-card title="基础信息">
-        <avue-form
-          ref="form"
-          class="trading-form"
-          v-model="form"
-          :option="option"
-        >
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">
-            <crop-select
-              v-model="form.corpId"
-              corpType="KH"
-              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'"
-            ></crop-select>
+            <crop-select v-model="form.corpId" corpType="KH"
+              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'"></crop-select>
           </template>
           <template slot="dateValidity">
-            <el-date-picker
-              format="yyyy-MM-dd"
-              value-format="yyyy-MM-dd 00:00:00"
-              v-model="form.dateValidity"
-              type="date"
-              placeholder="选择日期"
-              :disabled="detailData.status == 1"
-              :picker-options="pickerOptions"
-            ></el-date-picker>
+            <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00" v-model="form.dateValidity"
+              type="date" placeholder="选择日期" :disabled="detailData.status == 1" :picker-options="pickerOptions">
+            </el-date-picker>
           </template>
         </avue-form>
       </trade-card>
       <trade-card title="商品信息">
-        <avue-crud
-          ref="crud"
-          :data="data"
-          :option="tableOption"
-          @row-del="rowDel"
-          @saveColumn="saveColumn"
-          @resetColumn="resetColumn"
-          :summary-method="summaryMethod"
-          :cell-style="cellStyle"
-        >
+        <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
+          @resetColumn="resetColumn" :summary-method="summaryMethod" :cell-style="cellStyle">
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
-              <el-select
-                v-model="row.cname"
-                placeholder="请选择"
-                size="small"
-                style="width:60%"
-                @change="cnameChange(row, index)"
-              >
-                <el-option
-                  v-for="item in goodsoptions"
-                  :key="item.id"
-                  :label="item.cname"
-                  :value="item.cname"
-                >
+              <el-select v-model="row.cname" placeholder="请选择" size="small" style="width:60%"
+                @change="cnameChange(row, index)">
+                <el-option v-for="item in goodsoptions" :key="item.id" :label="item.cname" :value="item.cname">
                 </el-option>
               </el-select>
-              <el-button
-                icon="el-icon-search"
-                size="mini"
-                @click="rePick(row, index)"
-              ></el-button>
+              <el-button icon="el-icon-search" size="mini" @click="rePick(row, index)"></el-button>
             </span>
 
             <span v-else> {{ row.cname }}</span>
           </template>
           <template slot="price" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.price"
-              size="small"
+            <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              @change="priceChange(row)"
-            ></el-input>
+              @change="priceChange(row)"></el-input>
             <span v-else>{{ row.price }}</span>
           </template>
           <template slot="taxRate" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.taxRate"
-              size="small"
+            <el-input v-if="row.$cellEdit" v-model="row.taxRate" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              @change="priceChange(row)"
-            ></el-input>
+              @change="priceChange(row)"></el-input>
             <span v-else>{{ row.taxRate ? row.taxRate : 0 }}%</span>
           </template>
           <template slot="coefficient" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.coefficient"
-              size="small"
+            <el-input v-if="row.$cellEdit" v-model="row.coefficient" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              @change="priceChange(row)"
-            ></el-input>
+              @change="priceChange(row)"></el-input>
             <span v-else>{{ row.coefficient ? row.coefficient : 0 }}%</span>
           </template>
           <template slot="orderQuantity" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.orderQuantity"
-              size="small"
-              oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
-              @change="quantityChange(row)"
-            ></el-input>
+            <el-input v-if="row.$cellEdit" v-model="row.orderQuantity" size="small"
+              oninput='this.value=this.value.replace(/[^(\d)]/g,"")' @change="quantityChange(row)"></el-input>
             <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
           </template>
           <template slot="itemType" slot-scope="{ row }">
-            <el-select
-              v-if="row.$cellEdit"
-              v-model="row.itemType"
-              filterable
-              allow-create
-              default-first-option
-              placeholder="请输入"
-              size="small"
-              @focus="itemTypeFocus(row)"
-            >
-              <el-option
-                v-for="(item, index) in itemtypeList"
-                :key="index"
-                :label="item.value"
-                :value="item.value"
-              >
+            <el-select v-if="row.$cellEdit" v-model="row.itemType" filterable allow-create default-first-option
+              placeholder="请输入" size="small" @focus="itemTypeFocus(row)">
+              <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value" :value="item.value">
               </el-option>
             </el-select>
             <span v-else>{{ row.itemType }}</span>
           </template>
           <template slot="priorityReferrer" slot-scope="{ row }">
-            <el-checkbox
-              :disabled="!row.$cellEdit"
-              v-model="row.priorityReferrer"
-              :true-label="1"
-              :false-label="0"
-            />
+            <el-checkbox :disabled="!row.$cellEdit" v-model="row.priorityReferrer" :true-label="1" :false-label="0" />
           </template>
           <template slot="corpId" slot-scope="{ row, index }">
-            <crop-select
-              v-show="row.$cellEdit"
-              v-model="row.corpId"
-              :cropIndex="index"
-              @getCorpData="rowCorpData"
-              gysType="CK"
-              corpType="GYS"
-            ></crop-select>
+            <crop-select v-show="row.$cellEdit" v-model="row.corpId" :cropIndex="index" @getCorpData="rowCorpData"
+              gysType="CK" corpType="GYS"></crop-select>
             <span v-show="!row.$cellEdit">{{ row.corpName }}</span>
           </template>
           <template slot="purchaseAmount" slot-scope="{ row }">
             <span>{{ row.purchaseAmount | micrometerFormat }}</span>
           </template>
           <template slot="menuLeft">
-            <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="small"
-              @click.stop="newDetails"
-              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'"
-              >录入明细</el-button
-            >
-            <el-button
-              type="info"
-              icon="el-icon-printer"
-              size="small"
-              @click.stop="openReport()"
-              >报表打印</el-button
-            >
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
+              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'">录入明细</el-button>
+            <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowCell(row, index)"
-              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'"
-              >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowDel(row)"
-              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'"
-              >删 除</el-button
-            >
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'">{{ row.$cellEdit ? "保存" : "修改" }}
+            </el-button>
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowDel(row)"
+              :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'">删 除</el-button>
           </template>
         </avue-crud>
       </trade-card>
     </div>
-    <el-dialog
-      title="导入商品"
-      append-to-body
-      class="el-dialogDeep"
-      :visible.sync="dialogVisible"
-      width="80%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      @close="closeGoods"
-      top="5vh"
-      v-dialog-drag
-    >
+    <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods"
+      top="5vh" v-dialog-drag>
       <span>
         <el-row>
           <el-col :span="4">
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree
-                    :option="treeOption"
-                    @node-click="nodeClick"
-                    :style="treeStyle"
-                  />
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle" />
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
           <el-col :span="20">
-            <avue-crud
-              :option="goodsOption"
-              :table-loading="loading"
-              :data="goodsList"
-              ref="goodsCrud"
-              :search.sync="search"
-              @search-change="searchChange"
-              @refresh-change="refreshChange"
-              @selection-change="selectionChange"
-              @row-click="rowClick"
-              :page.sync="page"
-              @on-load="onLoad"
-              @saveColumn="saveGoodsColumn"
-              @resetColumn="resetGoodsColumn"
-              :cell-style="cellStyle"
-            ></avue-crud>
+            <avue-crud :option="goodsOption" :table-loading="loading" :data="goodsList" ref="goodsCrud"
+              :search.sync="search" @search-change="searchChange" @refresh-change="refreshChange"
+              @selection-change="selectionChange" @row-click="rowClick" :page.sync="page" @on-load="onLoad"
+              @saveColumn="saveGoodsColumn" @resetColumn="resetGoodsColumn" :cell-style="cellStyle"></avue-crud>
           </el-col>
         </el-row>
       </span>
 
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="importGoods"
-          :disabled="selectionList.length == 0"
-          >导入</el-button
-        >
+        <el-button type="primary" @click="importGoods" :disabled="selectionList.length == 0">导入</el-button>
       </span>
     </el-dialog>
-    <report-dialog
-      :switchDialog="switchDialog"
-      :reportId="form.id"
-      reportName="客户询价"
-      @onClose="onClose()"
-    ></report-dialog>
+    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="客户询价" @onClose="onClose()">
+    </report-dialog>
   </div>
 </template>
 
@@ -441,7 +279,7 @@ export default {
       treeOption: {
         nodeKey: "id",
         lazy: true,
-        treeLoad: function(node, resolve) {
+        treeLoad: function (node, resolve) {
           const parentId = node.level === 0 ? 0 : node.data.id;
           getDeptLazyTree(parentId).then(res => {
             resolve(
@@ -827,7 +665,9 @@ export default {
               }
             }
           }
-
+          this.data.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           if (status == "save") {
             this.subLoading = true;
             submit({
@@ -1053,9 +893,11 @@ export default {
 .trading-form ::v-deep .el-form-item {
   margin-bottom: 8px !important;
 }
+
 ::v-deep .el-form-item__error {
   display: none !important;
 }
+
 ::v-deep .select-component {
   display: flex !important;
 }

+ 3 - 0
src/views/exportTrade/receipt/detailsPage.vue

@@ -807,6 +807,9 @@ export default {
               return this.$message.error(`请正确输入第${i + 1}行的数量`);
             }
           }
+          this.data.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           if (status == "submit") {
             this.subLoading = true;
             submit({

+ 3 - 0
src/views/exportTrade/salesContract/detailsPage.vue

@@ -1852,6 +1852,9 @@ export default {
             costSum,
             paySum
           );
+          this.data.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           this.subLoading = true;
           submit({
             ...this.form,

+ 696 - 768
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -3,30 +3,15 @@
     <div class="customer-head">
       <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-                   @click="backToList">返回列表
+          @click="backToList">返回列表
         </el-button>
         <div class="upper_right_button">
-          <el-button
-            type="primary"
-            size="small"
-            @click="editHandle"
-            v-if="editDisable"
-          >编 辑</el-button>
-          <el-button type="warning"
-                     class="el-button--small-yh"
-                     size="small"
-                     :loading="buttonLoading"
-                     :disabled="!form.id || editDisable"
-                     @click.stop="confirmSettlement"
-          >{{financeDisabled?"付费":"撤销付费"}}
+          <el-button type="primary" size="small" @click="editHandle" v-if="editDisable">编 辑</el-button>
+          <el-button type="warning" class="el-button--small-yh" size="small" :loading="buttonLoading"
+            :disabled="!form.id || editDisable" @click.stop="confirmSettlement">{{financeDisabled?"付费":"撤销付费"}}
           </el-button>
-          <el-button class="el-button--small-yh"
-                     type="primary"
-                     size="small"
-                     :loading="buttonLoading"
-                     @click.stop="saveSettlement"
-                     :disabled="editDisable"
-          >保存数据
+          <el-button class="el-button--small-yh" type="primary" size="small" :loading="buttonLoading"
+            @click.stop="saveSettlement" :disabled="editDisable">保存数据
           </el-button>
         </div>
       </div>
@@ -36,140 +21,76 @@
       <basic-container>
         <avue-form class="trading-form" ref="form" v-model="form" :option="option">
           <template slot="caseOverPayment">
-            <el-input
-              placeholder="请输入"
-              clearable
-              v-model="form.caseOverPayment"
-              @change="caseOverPaymentChange"
-              v-input-limit="2"
-              :disabled="dataList.length == 0 || (!financeDisabled && form.id) || editDisable"
-            ></el-input>
+            <el-input placeholder="请输入" clearable v-model="form.caseOverPayment" @change="caseOverPaymentChange"
+              v-input-limit="2" :disabled="dataList.length == 0 || (!financeDisabled && form.id) || editDisable">
+            </el-input>
           </template>
           <template slot="corpId">
-            <crop-select
-              v-model="form.corpId"
-              corpType="KG"
-              :disabled="(!financeDisabled && form.id) || editDisable"
-              @getCorpData="returnBack"
-              style="width: 100%"
-            ></crop-select>
+            <crop-select v-model="form.corpId" corpType="KG" :disabled="(!financeDisabled && form.id) || editDisable"
+              @getCorpData="returnBack" style="width: 100%"></crop-select>
           </template>
           <template slot="salesCompany">
-            <crop-select
-              v-model="form.salesCompany"
-              corpType="GS"
-              :disabled="(!financeDisabled && form.id) || editDisable"
-              @getCorpData="getGSName"
-              style="width: 100%"
-            ></crop-select>
+            <crop-select v-model="form.salesCompany" corpType="GS"
+              :disabled="(!financeDisabled && form.id) || editDisable" @getCorpData="getGSName" style="width: 100%">
+            </crop-select>
           </template>
           <template slot="accountNo">
-            <el-select v-model="form.accountNo"
-                       placeholder="请选择"
-                       :disabled="(!financeDisabled && form.id) || editDisable"
-                       @change="accountNoChange"
-                       clearable
-                       filterable>
-              <el-option v-for="(item,index) in form.bankList"
-                         :key="index"
-                         :label="item.accountNo"
-                         :value="item.accountNo"
-              >
+            <el-select v-model="form.accountNo" placeholder="请选择"
+              :disabled="(!financeDisabled && form.id) || editDisable" @change="accountNoChange" clearable filterable>
+              <el-option v-for="(item,index) in form.bankList" :key="index" :label="item.accountNo"
+                :value="item.accountNo">
               </el-option>
             </el-select>
           </template>
           <template slot="remark">
-            <el-input type="textarea"
-                      v-model="form.remark"
-                      size="small"
-                      rows="2"
-                      autocomplete="off"
-                      placeholder="">
+            <el-input type="textarea" v-model="form.remark" size="small" rows="2" autocomplete="off" placeholder="">
             </el-input>
           </template>
         </avue-form>
       </basic-container>
       <containerTitle title="明细列表"></containerTitle>
       <basic-container>
-        <avue-crud :option="itemsOption"
-                   :data="dataList"
-                   ref="crud"
-                   v-model="itemsForm"
-                   :page.sync="page"
-                   :cell-style="cellStyle"
-                   @search-reset="searchReset"
-                   @row-update="rowUpdate"
-                   @selection-change="selectionChange"
-                   >
+        <avue-crud :option="itemsOption" :data="dataList" ref="crud" v-model="itemsForm" :page.sync="page"
+          :cell-style="cellStyle" @search-reset="searchReset" @row-update="rowUpdate"
+          @selection-change="selectionChange">
           <template slot="menuLeft">
-            <el-button type="primary"
-                       size="small"
-                       :loading="buttonLoading"
-                       icon="el-icon-shopping-cart-2"
-                       :disabled="!financeButton || editDisable"
-                       @click="selectPurchase">选择采购合同
+            <el-button type="primary" size="small" :loading="buttonLoading" icon="el-icon-shopping-cart-2"
+              :disabled="!financeButton || editDisable" @click="selectPurchase">选择采购合同
             </el-button>
           </template>
           <template slot-scope="scope" slot="menu">
-            <el-button
-              type="text"
-              size="small"
-              icon="el-icon-edit"
-              :disabled="!financeButton || editDisable"
-              @click.stop="rowCell(scope.row,scope.index)"
-            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            <el-button type="text" size="small" icon="el-icon-edit" :disabled="!financeButton || editDisable"
+              @click.stop="rowCell(scope.row,scope.index)"> {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
             </el-button>
-            <el-button
-              type="text"
-              size="small"
-              icon="el-icon-delete"
-              :disabled="!financeButton || editDisable"
-              @click.stop="rowDel(scope.row,scope.index)"
-            >删除
+            <el-button type="text" size="small" icon="el-icon-delete" :disabled="!financeButton || editDisable"
+              @click.stop="rowDel(scope.row,scope.index)">删除
             </el-button>
           </template>
           <template slot="srcOrderno" slot-scope="scope">
-            <span style="color: #409EFF;cursor: pointer" @click="jumpPage(scope.row, scope.index)">{{scope.row.srcOrderno}}</span>
+            <span style="color: #409EFF;cursor: pointer"
+              @click="jumpPage(scope.row, scope.index)">{{scope.row.srcOrderno}}</span>
           </template>
           <template slot-scope="{ row }" slot="currency">
-            <el-select  v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择 币别" clearable filterable>
-              <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+            <el-select v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择 币别" clearable
+              filterable>
+              <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"
+                :value="item.dictValue"></el-option>
             </el-select>
             <span v-else>{{ row.currency }}</span>
           </template>
           <template slot="thisAmount" slot-scope="{ row }">
             <span v-if="row.$cellEdit" class="required_fields">*</span>
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.thisAmount"
-              style="width: 90%"
-              placeholder="请输入"
-              size="small"
+            <el-input v-if="row.$cellEdit" v-model="row.thisAmount" style="width: 90%" placeholder="请输入" size="small"
               @input="thisAmountVerify(row)"
-              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-            ></el-input>
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'></el-input>
             <span v-else>{{ row.thisAmount }}</span>
           </template>
         </avue-crud>
       </basic-container>
-      <el-dialog
-        title="导入采购"
-        append-to-body
-        class="el-dialogDeep"
-        :visible.sync="billDetailDialog"
-        width="60%"
-        :close-on-click-modal="false"
-        :destroy-on-close="true"
-        :close-on-press-escape="false"
-        top="10vh"
-        v-dialog-drag>
-        <bill-detail
-          :params="params"
-          :billType="billType"
-          :flag="1"
-          @closeFun="closeBillDetail"
-          @importProMent="importProMent"
-        >
+      <el-dialog title="导入采购" append-to-body class="el-dialogDeep" :visible.sync="billDetailDialog" width="60%"
+        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" top="10vh" v-dialog-drag>
+        <bill-detail :params="params" :billType="billType" :flag="1" @closeFun="closeBillDetail"
+          @importProMent="importProMent">
         </bill-detail>
       </el-dialog>
     </div>
@@ -177,691 +98,698 @@
 </template>
 
 <script>
-  import option from "./configuration/detailsPage.json";
-  import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
-  import { getDetails,modify,cancelModify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
-  import { contrastObj,contrastList } from "@/util/contrastData";
-  import  billDetail from "@/components/bill/billDetailList";
-  import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
-  import { getlistBankBy as GYSGetBank } from "@/api/basicData/configuration"
-  import _ from "lodash";
-  import {getUserInfo} from "@/api/system/user";
-  import {getCorpDetail} from "@/api/maintenance/overpayment";
+import option from "./configuration/detailsPage.json";
+import { getDetail, editFinance } from "@/api/financialManagement/financialManagement"
+import { getDetails, modify, cancelModify, saveOrEdit } from "@/api/financialManagement/paymentRequest";
+import { contrastObj, contrastList } from "@/util/contrastData";
+import billDetail from "@/components/bill/billDetailList";
+import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
+import { getlistBankBy as GYSGetBank } from "@/api/basicData/configuration"
+import _ from "lodash";
+import { getUserInfo } from "@/api/system/user";
+import { getCorpDetail } from "@/api/maintenance/overpayment";
 
-  export default {
-    name: "paymentDetailsPage",
-    props: {
-      detailData: {
-        type: Object
-      }
-    },
-    data() {
-      return {
-        form: {},
-        itemsForm:{},
-        itemsOption: option,
-        billDetailDialog:false,
-        buttonLoading:false,
-        financeDisabled:false,
-        financeButton:true,
-        billType:"申请",
-        params:{},
-        id:"",
-        dataList: [],
-        currencyDic:[],
-        page: {
-          pageSize: 10,
-          pagerCount: 5,
-          total: 0,
-        },
-        query:{},
-        option: {
-          menuBtn: false,
-          labelWidth: 100,
-          column: [
-            {
-              label: '所属公司',
-              prop: 'salesCompany',
-              sort:true,
-              span: 8,
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '合同号',
-              prop: 'srcOrderno',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '系统号',
-              prop: 'sysNo',
-              span: 8,
-              disabled: true
-            },
-            {
-              label: '银行账号',
-              prop: 'accountNo',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '开户银行',
-              prop: 'accountBank',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '银行户头',
-              prop: 'accountName',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },{
-              label: '科目编码',
-              prop: 'subjectNumber',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '往来单位',
-              prop: 'corpId',
-              sort:true,
-              span: 8,
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '付款日期',
-              prop: 'settlementDate',
-              format:"yyyy-MM-dd",
-              valueFormat:"yyyy-MM-dd 00:00:00",
-              span: 8,
-              type:"date",
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '制单人',
-              prop: 'createUserName',
-              span: 8,
-              disabled:true,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '人民币金额',
-              prop: 'amount',
-              span: 8,
-              rules: [
-                {
-                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                  message: ' ',
-                  trigger: 'blur'
-                },
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '外币金额',
-              prop: 'foreignAmount',
-              span: 8,
-              rules: [
-                {
-                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '使用溢付款',
-              prop: 'caseOverPayment',
-              display: false,
-              span: 8,
-              rules: [
-                {
-                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '溢付款余额',
-              prop: 'overPayment',
-              display: false,
-              disabled: true,
-              span: 8,
-              rules: [
-                {
-                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '制单日期',
-              prop: 'createTime',
-              span: 8,
-              type:"date",
-              disabled:true,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '备注',
-              prop: 'remark',
-              span:24,
-              minRows: 2,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-          ],
-        },
-        financeStatusDic:[{
-          label:'正常',
-          value:0
-        },{
-          label:'停用',
-          value:1
-        }],
-        //顶部from数据
-        oldForm:{},
-        oldDataList:[],
-        category: '',
-        allAmount: 0,
-        editDisable: false,
+export default {
+  name: "paymentDetailsPage",
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  data() {
+    return {
+      form: {},
+      itemsForm: {},
+      itemsOption: option,
+      billDetailDialog: false,
+      buttonLoading: false,
+      financeDisabled: false,
+      financeButton: true,
+      billType: "申请",
+      params: {},
+      id: "",
+      dataList: [],
+      currencyDic: [],
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      },
+      query: {},
+      option: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: '所属公司',
+            prop: 'salesCompany',
+            sort: true,
+            span: 8,
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '合同号',
+            prop: 'srcOrderno',
+            span: 8,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '系统号',
+            prop: 'sysNo',
+            span: 8,
+            disabled: true
+          },
+          {
+            label: '银行账号',
+            prop: 'accountNo',
+            span: 8,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '开户银行',
+            prop: 'accountBank',
+            span: 8,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '银行户头',
+            prop: 'accountName',
+            span: 8,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '科目编码',
+            prop: 'subjectNumber',
+            span: 8,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '往来单位',
+            prop: 'corpId',
+            sort: true,
+            span: 8,
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '付款日期',
+            prop: 'settlementDate',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            span: 8,
+            type: "date",
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '制单人',
+            prop: 'createUserName',
+            span: 8,
+            disabled: true,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '人民币金额',
+            prop: 'amount',
+            span: 8,
+            rules: [
+              {
+                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                message: ' ',
+                trigger: 'blur'
+              },
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '外币金额',
+            prop: 'foreignAmount',
+            span: 8,
+            rules: [
+              {
+                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '使用溢付款',
+            prop: 'caseOverPayment',
+            display: false,
+            span: 8,
+            rules: [
+              {
+                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '溢付款余额',
+            prop: 'overPayment',
+            display: false,
+            disabled: true,
+            span: 8,
+            rules: [
+              {
+                pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '制单日期',
+            prop: 'createTime',
+            span: 8,
+            type: "date",
+            disabled: true,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            span: 24,
+            minRows: 2,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+        ],
+      },
+      financeStatusDic: [{
+        label: '正常',
+        value: 0
+      }, {
+        label: '停用',
+        value: 1
+      }],
+      //顶部from数据
+      oldForm: {},
+      oldDataList: [],
+      category: '',
+      allAmount: 0,
+      editDisable: false,
+    }
+  },
+  components: {
+    billDetail
+  },
+  created() {
+    // 人民币金额默认为0
+    this.$set(this.form, "amount", 0)
+    getUserInfo().then(res => {
+      this.category = res.data.data.billType
+      if (this.category == 2) {
+        this.$set(this.form, "overPayment", 0)
+        this.$set(this.form, "caseOverPayment", 0)
+        this.option.column.forEach(item => {
+          if (item.prop == 'caseOverPayment' || item.prop == 'overPayment') {
+            item.display = true
+          }
+          if (item.prop == 'foreignAmount') {
+            item.display = false
+          }
+        })
       }
-    },
-    components:{
-      billDetail
-    },
-    created() {
-      // 人民币金额默认为0
-      this.$set(this.form,"amount", 0)
-      getUserInfo().then(res=>{
-        this.category = res.data.data.billType
-        if (this.category == 2) {
-          this.$set(this.form,"overPayment", 0)
-          this.$set(this.form,"caseOverPayment", 0)
-          this.option.column.forEach(item => {
-            if (item.prop == 'caseOverPayment' || item.prop == 'overPayment') {
-              item.display = true
-            }
-            if (item.prop == 'foreignAmount') {
-              item.display = false
-            }
-          })
-        }
+    })
+    //币别
+    this.getWorkDicts("currency").then(res => {
+      this.currencyDic = res.data.data
+    })
+    this.detailData.disabled && (this.editDisable = true)
+    if (this.detailData.id) {
+      this.buttonLoading = true
+      this.id = this.detailData.id;//字符串转数字  超长用BigInt
+      getDetail(this.id).then(res => {
+        this.afterEcho(res.data.data)
+      }).finally(() => {
+        this.buttonLoading = false
       })
-      //币别
-      this.getWorkDicts("currency").then(res =>{
-        this.currencyDic = res.data.data
+    } else {
+      this.form.financeStatus = "待结算"
+      this.oldForm.financeStatus = "待结算"
+    }
+
+    if (this.detailData.params) {
+      this.buttonLoading = true
+      getDetails(this.detailData.params).then(res => {
+        delete res.data.data.id;
+        delete res.data.data.sysNo;
+        delete res.data.data.billType;
+        res.data.data.itemsList.map((items) => {
+          delete items.id;
+          items.thisAmount = items.amount
+        })
+        this.afterEcho(res.data.data)
+      }).finally(() => {
+        this.buttonLoading = false
       })
-      this.detailData.disabled && (this.editDisable = true)
-      if (this.detailData.id) {
-        this.buttonLoading = true
-        this.id = this.detailData.id;//字符串转数字  超长用BigInt
-        getDetail(this.id).then(res => {
-          this.afterEcho(res.data.data)
-        }).finally(()=>{
-          this.buttonLoading = false
+    }
+
+  },
+  mounted() {
+
+  },
+  methods: {
+    //选择客户
+    returnBack(corpValue) {
+      this.corpId = corpValue.id
+      if (this.category != 2) {
+        getlistBankBy(corpValue.id).then(res => {
+          this.$set(this.form, "bankList", res.data)
         })
-      }else{
-        this.form.financeStatus = "待结算"
-        this.oldForm.financeStatus = "待结算"
       }
 
-      if(this.detailData.params){
-        this.buttonLoading = true
-        getDetails(this.detailData.params).then(res =>{
-          delete res.data.data.id;
-          delete res.data.data.sysNo;
-          delete res.data.data.billType;
-          res.data.data.itemsList.map((items)=>{
-            delete items.id ;
-            items.thisAmount = items.amount
-          })
-          this.afterEcho(res.data.data)
-        }).finally(()=>{
-          this.buttonLoading = false
+      // 溢付款余额获取
+      if (this.category == 2) {
+        getCorpDetail({ corpId: corpValue.id }).then(res => {
+          this.form.overPayment = res.data.data ? res.data.data.balanceOverpaymen : 0
         })
       }
-
-    },
-    mounted() {
-
     },
-    methods: {
-      //选择客户
-      returnBack(corpValue){
-        this.corpId = corpValue.id
-        if (this.category != 2) {
-          getlistBankBy(corpValue.id).then(res =>{
-            this.$set(this.form,"bankList",res.data)
-          })
-        }
-
-        // 溢付款余额获取
-        if (this.category == 2) {
-          getCorpDetail({corpId:corpValue.id}).then(res => {
-            this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: 0
-          })
+    //选择卡号
+    accountNoChange(value) {
+      let isTrue = false
+      this.form.bankList.forEach(item => {
+        if (item.accountNo == value) {
+          this.$set(this.form, "accountBank", item.accountBank)
+          this.$set(this.form, "accountName", item.accountName)
+          this.$set(this.form, "subjectNumber", item.subjectNumber)
+          isTrue = true
         }
-      },
-      //选择卡号
-      accountNoChange(value){
-        let isTrue = false
-        this.form.bankList.forEach(item => {
-          if(item.accountNo == value){
-            this.$set(this.form,"accountBank",item.accountBank)
-            this.$set(this.form,"accountName",item.accountName)
-            this.$set(this.form,"subjectNumber",item.subjectNumber)
-            isTrue = true
-          }
-        })
-        this.$nextTick(() => {
-          if (!isTrue) {
-            this.$set(this.form, 'accountBank', null)
-            this.$set(this.form, 'accountName', null)
-            this.$set(this.form,"subjectNumber",null)
-          }
-        })
-      },
-      //本次金额验证
-      thisAmountVerify(row){
-        if(parseFloat(row.thisAmount) > parseFloat(row.amount)){
-          this.$message.warning('本次金额不得大于金额!')
-          this.$set(row,'thisAmount','')
-        }
-      },
-      selectPurchase(){
-        if(!this.form.corpId){
-          this.$message.warning("请先选择客户!")
-          return
-        }
-        this.params = {
-          corpId: this.form.corpId
+      })
+      this.$nextTick(() => {
+        if (!isTrue) {
+          this.$set(this.form, 'accountBank', null)
+          this.$set(this.form, 'accountName', null)
+          this.$set(this.form, "subjectNumber", null)
         }
-        this.billDetailDialog = true;
-      },
-      closeBillDetail(){
-        this.billDetailDialog = false;
-      },
-      importProMent(list){
-        list.forEach((item,index) =>{
-          item.accId = item.id;
-          item.srcOrderno  = item.accSysNo
-          item.billNo  = item.srcBillNo
-          item.thisAmount = item.amount
-          delete item.id;
+      })
+    },
+    //本次金额验证
+    thisAmountVerify(row) {
+      if (parseFloat(row.thisAmount) > parseFloat(row.amount)) {
+        this.$message.warning('本次金额不得大于金额!')
+        this.$set(row, 'thisAmount', '')
+      }
+    },
+    selectPurchase() {
+      if (!this.form.corpId) {
+        this.$message.warning("请先选择客户!")
+        return
+      }
+      this.params = {
+        corpId: this.form.corpId
+      }
+      this.billDetailDialog = true;
+    },
+    closeBillDetail() {
+      this.billDetailDialog = false;
+    },
+    importProMent(list) {
+      list.forEach((item, index) => {
+        item.accId = item.id;
+        item.srcOrderno = item.accSysNo
+        item.billNo = item.srcBillNo
+        item.thisAmount = item.amount
+        delete item.id;
 
-          this.$refs.crud.rowCellAdd(item);
-        })
-        this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ if(item.srcOrderno){return item.srcOrderno}}))).join(','))
-        this.billDetailDialog = false;
-      },
-      rowUpdate(row, index, done) {
-        done(row);
-      },
-      rowCell(row,index){
-        this.$refs.crud.rowCell(row, index)
-        // row.$cellEdit = !row.$cellEdit
-      },
-      rowDel(row,index){
-        this.dataList.splice(index, 1);
-      },
-      searchReset() {
-        console.log('1')
-      },
-      selectionChange() {
-        console.log('1')
-      },
-      confirmSettlement(status){
-        this.$refs["form"].validate((valid,done) => {
-          done();
-          if(valid && this.verificationData('付费')){
-            this.$confirm("是否确认" + (this.financeDisabled? '付费': '撤销付费'), "提示", {
-              confirmButtonText: "确认",
-              cancelButtonText: "取消",
-              type: "warning",
-            }).then(()=>{
-              for (let i = 0; i < this.dataList.length; i++) {
-                if (this.dataList[i].thisAmount == null || this.dataList[i].thisAmount == 0) {
-                  return this.$message.error(`第${i + 1}行的本次金额不能为空`);
-                }
+        this.$refs.crud.rowCellAdd(item);
+      })
+      this.$set(this.form, 'srcOrderno', Array.from(new Set(this.dataList.map(item => { if (item.srcOrderno) { return item.srcOrderno } }))).join(','))
+      this.billDetailDialog = false;
+    },
+    rowUpdate(row, index, done) {
+      done(row);
+    },
+    rowCell(row, index) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+      // row.$cellEdit = !row.$cellEdit
+    },
+    rowDel(row, index) {
+      this.dataList.splice(index, 1);
+    },
+    searchReset() {
+      console.log('1')
+    },
+    selectionChange() {
+      console.log('1')
+    },
+    confirmSettlement(status) {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid && this.verificationData('付费')) {
+          this.$confirm("是否确认" + (this.financeDisabled ? '付费' : '撤销付费'), "提示", {
+            confirmButtonText: "确认",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            for (let i = 0; i < this.dataList.length; i++) {
+              if (this.dataList[i].thisAmount == null || this.dataList[i].thisAmount == 0) {
+                return this.$message.error(`第${i + 1}行的本次金额不能为空`);
               }
-              this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+            }
+            this.form.billNo = this.dataList.map(item => { return item.billNo }).join(",")
 
-              if (this.category == 2 && this.financeDisabled) {
-                this.allAmount = 0;
-                this.form.amount = this.form.amount? this.form.amount: 0
-                this.dataList.forEach(e => {
-                  this.allAmount = Number(this.allAmount) + Number(e.thisAmount)
-                })
-                if (this.allAmount == 0 && this.form.amount == 0) {
-                  return this.$message.error('人民币金额不能为空')
-                } else if (Number(this.allAmount) > 0 && (Number(this.form.amount) > Number(this.allAmount))) {
-                  this.form.caseOverPayment = 0;
-                } else if (Number(this.allAmount) > 0 && (Number(this.form.amount) < Number(this.allAmount))) {
-                  this.form.caseOverPayment = Number(this.allAmount) - Number(this.form.amount)
-                  if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
-                    return this.$message.error('溢付款余额不足,无法付费')
-                  }
+            if (this.category == 2 && this.financeDisabled) {
+              this.allAmount = 0;
+              this.form.amount = this.form.amount ? this.form.amount : 0
+              this.dataList.forEach(e => {
+                this.allAmount = Number(this.allAmount) + Number(e.thisAmount)
+              })
+              if (this.allAmount == 0 && this.form.amount == 0) {
+                return this.$message.error('人民币金额不能为空')
+              } else if (Number(this.allAmount) > 0 && (Number(this.form.amount) > Number(this.allAmount))) {
+                this.form.caseOverPayment = 0;
+              } else if (Number(this.allAmount) > 0 && (Number(this.form.amount) < Number(this.allAmount))) {
+                this.form.caseOverPayment = Number(this.allAmount) - Number(this.form.amount)
+                if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
+                  return this.$message.error('溢付款余额不足,无法付费')
                 }
               }
-              const params = {
-                ...this.form,
-                billType:"付费",
-                itemsList:this.dataList
-              }
-              this.buttonLoading = true
-              if(this.financeButton){
-                modify(params).then(res =>{
-                  this.$message.success("操作成功!")
-                  this.afterEcho(res.data.data)
-                }).finally(()=>{
-                  this.buttonLoading = false
-                })
-              }else{
-                cancelModify(params).then(res =>{
-                  this.$message.success("操作成功!")
-                  this.afterEcho(res.data.data)
-                }).finally(()=>{
-                  this.buttonLoading = false
-                })
-              }
-
-            })
-            if(status === true){
-              this.$emit("goBack");
-              this.leaveDetailsKey(this.$route.name)
             }
-          }
-        })
-      },
-      saveSettlement(type){
-        this.$refs["form"].validate((valid,done) => {
-          if(valid){
-            for (let i = 0; i < this.dataList.length; i++) {
-              if (this.dataList[i].thisAmount == (null || "")) {
-                return this.$message.error(`第输入${i + 1}行的本次金额`);
-              }
-            }
-
-            this.buttonLoading = true
-            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
-
             const params = {
               ...this.form,
-              billType:"付费",
-              itemsList:this.dataList,
-              settlementType:1
-            }
-// 如果有id解锁,没有跳过
-//             this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
-            saveOrEdit(params).then(res=>{
-              this.$message.success("操作成功!")
-              // this.detailData.disabled = true
-              // this.editDisable = true
-              this.afterEcho(res.data.data, type)
-              done();
-            }).finally(()=>{
-              this.buttonLoading = false
-            })
-          }})
-      },
-      async afterEcho(data, type){
-        this.form = data;
-        this.financeDisabled =  this.form.financeStatus == "待结算"?true:false;
-        if (this.category == 2) {
-          await getCorpDetail({corpId: this.form.corpId}).then(res => {
-            if (Number(this.form.overPayment) != (res.data.data? res.data.data.balanceOverpaymen: '0.00')) {
-              this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: '0.00'
+              billType: "付费",
+              itemsList: this.dataList
             }
-          })
-        }
-        this.oldForm = Object.assign({},this.form);
-        //审核状态为空时  说明为新单进来
-        if(this.financeDisabled || !this.editDisable){
-          this.financeButton = true
-          this.option.column.forEach(item =>{
-            if( item.prop === "remark" || item.prop === "settlementDate"){
-              this.$set(item,"disabled",false)
-            }else if( item.prop === "createUserName" ||  item.prop === "createTime" ||  item.prop === "sysNo" ){
-              this.$set(item,"disabled",true)
-            }else{
-              this.$set(item,"disabled",false)
+            this.buttonLoading = true
+            if (this.financeButton) {
+              modify(params).then(res => {
+                this.$message.success("操作成功!")
+                this.afterEcho(res.data.data)
+              }).finally(() => {
+                this.buttonLoading = false
+              })
+            } else {
+              cancelModify(params).then(res => {
+                this.$message.success("操作成功!")
+                this.afterEcho(res.data.data)
+              }).finally(() => {
+                this.buttonLoading = false
+              })
             }
+
           })
+          if (status === true) {
+            this.$emit("goBack");
+            this.leaveDetailsKey(this.$route.name)
+          }
         }
-        if (!this.financeDisabled || this.editDisable){
-          this.financeButton = false
-          this.option.column.forEach(item =>{
-            if( item.prop === "remark"){
-              this.$set(item,"disabled",false)
-            }else if( item.prop === "createUserName" ||  item.prop === "createTime" ||  item.prop === "sysNo"){
-              this.$set(item,"disabled",true)
-            }else{
-              this.$set(item,"disabled",true)
+      })
+    },
+    saveSettlement(type) {
+      this.$refs["form"].validate((valid, done) => {
+        if (valid) {
+          for (let i = 0; i < this.dataList.length; i++) {
+            if (this.dataList[i].thisAmount == (null || "")) {
+              return this.$message.error(`第输入${i + 1}行的本次金额`);
             }
-          })
-        }
+          }
 
-        if(data.itemsList){
-          this.dataList = data.itemsList
-          this.oldDataList = this.deepClone(data.itemsList)
-        }
-        if (type == '付费') {
-          this.confirmSettlement()
-        }
-      },
-      verificationData(type){
-        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
-        ){
-          this.$confirm("数据发生变化,请先提交保存!", "提示", {
-            confirmButtonText: "保存",
-            cancelButtonText: "取消",
-            type: "warning",
-          }).then(() => {
-            this.saveSettlement(type)
-          }).catch(()=>{
-            return false
+          this.buttonLoading = true
+          this.form.billNo = this.dataList.map(item => { return item.billNo }).join(",")
+
+          const params = {
+            ...this.form,
+            billType: "付费",
+            itemsList: this.dataList,
+            settlementType: 1
+          }
+          // 如果有id解锁,没有跳过
+          //             this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
+          saveOrEdit(params).then(res => {
+            this.$message.success("操作成功!")
+            // this.detailData.disabled = true
+            // this.editDisable = true
+            this.afterEcho(res.data.data, type)
+            done();
+          }).finally(() => {
+            this.buttonLoading = false
           })
-        }else{
-          return true
         }
-      },
-      backToList() {
-        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
-        ){
-          this.$confirm("是否保存当前页面?", "提示", {
-            confirmButtonText: "保存",
-            cancelButtonText: "取消",
-            type: "warning",
-          }).then(() => {
-            this.saveSettlement()
-          }).catch(()=>{
-            !this.editDisable && this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
-            this.$emit("goBack");
-            this.leaveDetailsKey(this.$route.name)
-          })
-        }else{
-          !this.editDisable && this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
+      })
+    },
+    async afterEcho(data, type) {
+      this.form = data;
+      this.financeDisabled = this.form.financeStatus == "待结算" ? true : false;
+      if (this.category == 2) {
+        await getCorpDetail({ corpId: this.form.corpId }).then(res => {
+          if (Number(this.form.overPayment) != (res.data.data ? res.data.data.balanceOverpaymen : '0.00')) {
+            this.form.overPayment = res.data.data ? res.data.data.balanceOverpaymen : '0.00'
+          }
+        })
+      }
+      this.oldForm = Object.assign({}, this.form);
+      //审核状态为空时  说明为新单进来
+      if (this.financeDisabled || !this.editDisable) {
+        this.financeButton = true
+        this.option.column.forEach(item => {
+          if (item.prop === "remark" || item.prop === "settlementDate") {
+            this.$set(item, "disabled", false)
+          } else if (item.prop === "createUserName" || item.prop === "createTime" || item.prop === "sysNo") {
+            this.$set(item, "disabled", true)
+          } else {
+            this.$set(item, "disabled", false)
+          }
+        })
+      }
+      if (!this.financeDisabled || this.editDisable) {
+        this.financeButton = false
+        this.option.column.forEach(item => {
+          if (item.prop === "remark") {
+            this.$set(item, "disabled", false)
+          } else if (item.prop === "createUserName" || item.prop === "createTime" || item.prop === "sysNo") {
+            this.$set(item, "disabled", true)
+          } else {
+            this.$set(item, "disabled", true)
+          }
+        })
+      }
+
+      if (data.itemsList) {
+        this.dataList = data.itemsList
+        this.oldDataList = this.deepClone(data.itemsList)
+      }
+      if (type == '付费') {
+        this.confirmSettlement()
+      }
+    },
+    verificationData(type) {
+      if (contrastObj(this.form, this.oldForm) || contrastList(this.dataList, this.oldDataList)
+      ) {
+        this.$confirm("数据发生变化,请先提交保存!", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.saveSettlement(type)
+        }).catch(() => {
+          return false
+        })
+      } else {
+        return true
+      }
+    },
+    backToList() {
+      if (contrastObj(this.form, this.oldForm) || contrastList(this.dataList, this.oldDataList)
+      ) {
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.saveSettlement()
+        }).catch(() => {
+          !this.editDisable && this.form.id && this.unLock({ moduleName: 'ff', tableName: 'finance_settlement', billId: this.form.id })
           this.$emit("goBack");
           this.leaveDetailsKey(this.$route.name)
-        }
-      },
-      // 溢付款更改时
-      caseOverPaymentChange() {
-        if (!this.form.caseOverPayment) this.form.caseOverPayment = 0;
-        if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
-          this.form.caseOverPayment = 0;
-          return this.$message.error('本次使用的溢付款不能超过总溢付款')
-        }
-      },
-      editHandle() {
-        const data = {
-          moduleName: 'ff',
-          tableName: 'finance_settlement',
-          billId: this.form.id,
-          no: localStorage.getItem('browserID'),
-          billNo: this.form.srcOrderno
-        }
-        this.checkLock(data).then(res => {
-          if (res.data.code == 200) {
-            this.onLock(data).then(response => {
-            })
-            this.inDetailsKey(this.$route.name, {
-              moduleName: 'ff',
-              tableName: 'finance_settlement',
-              billId: this.form.id,
-            })
-            this.detailData.disabled = false;
-            this.editDisable = false;
-            this.buttonLoading = true
-            getDetail(this.form.id).then(data => {
-              this.afterEcho(data.data.data)
-            }).finally(()=>{
-              this.buttonLoading = false
-            })
-          }
-        }).catch(error => {
-        }).finally(() => {
-          this.buttonLoading = false
         })
-      },
-      getGSName(row) {
-        this.form.belongCompany = row.cname
-        if (this.category == 2) {
-          GYSGetBank(row.id).then(res =>{
-            this.$set(this.form,"bankList",res.data)
-            console.log(res.data)
-            if (this.form.bankList.length > 0) {
-              this.form.accountNo = this.form.bankList[0].accountNo
-              this.form.accountName = this.form.bankList[0].accountName
-              this.form.accountBank = this.form.bankList[0].accountBank
-              this.form.subjectNumber = this.form.bankList[0].subjectNumber
-            }
+      } else {
+        !this.editDisable && this.form.id && this.unLock({ moduleName: 'ff', tableName: 'finance_settlement', billId: this.form.id })
+        this.$emit("goBack");
+        this.leaveDetailsKey(this.$route.name)
+      }
+    },
+    // 溢付款更改时
+    caseOverPaymentChange() {
+      if (!this.form.caseOverPayment) this.form.caseOverPayment = 0;
+      if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
+        this.form.caseOverPayment = 0;
+        return this.$message.error('本次使用的溢付款不能超过总溢付款')
+      }
+    },
+    editHandle() {
+      const data = {
+        moduleName: 'ff',
+        tableName: 'finance_settlement',
+        billId: this.form.id,
+        no: localStorage.getItem('browserID'),
+        billNo: this.form.srcOrderno
+      }
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.inDetailsKey(this.$route.name, {
+            moduleName: 'ff',
+            tableName: 'finance_settlement',
+            billId: this.form.id,
+          })
+          this.detailData.disabled = false;
+          this.editDisable = false;
+          this.buttonLoading = true
+          getDetail(this.form.id).then(data => {
+            this.afterEcho(data.data.data)
+          }).finally(() => {
+            this.buttonLoading = false
           })
         }
-      },
-      cellStyle() {
-        return "padding:0;height:40px;";
-      },
-      // 跳转页面
-      jumpPage(row, index) {
-        if (this.category == 2) {
-          this.$router.$avueRouter.closeTag("/businessManagement/purchaseOrder/index");
-          this.$router.push({
-            path: "/businessManagement/purchaseOrder/index",
-            query: {
-              params: row.srcParentId
-            },
-          });
-        } else if (this.category == 3) {
-          this.$router.$avueRouter.closeTag("/purchase/contract/index");
-          this.$router.push({
-            path: "/purchase/contract/index",
-            query: {
-              params: row.srcParentId
-            },
-          });
-        } else if (this.category == 4) {
-          this.$router.$avueRouter.closeTag("/exportTrade/purchaseContract/index");
-          this.$router.push({
-            path: "/exportTrade/purchaseContract/index",
-            query: {
-              params: row.srcParentId
-            },
-          });
-        }
-      },
-    }
+      }).catch(error => {
+      }).finally(() => {
+        this.buttonLoading = false
+      })
+    },
+    getGSName(row) {
+      this.form.belongCompany = row.cname
+      if (this.category == 2) {
+        GYSGetBank(row.id).then(res => {
+          this.$set(this.form, "bankList", res.data)
+          console.log(res.data)
+          if (this.form.bankList.length > 0) {
+            this.form.accountNo = this.form.bankList[0].accountNo
+            this.form.accountName = this.form.bankList[0].accountName
+            this.form.accountBank = this.form.bankList[0].accountBank
+            this.form.subjectNumber = this.form.bankList[0].subjectNumber
+          }
+        })
+      }
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    // 跳转页面
+    jumpPage(row, index) {
+      if (this.category == 2) {
+        this.$router.$avueRouter.closeTag("/businessManagement/purchaseOrder/index");
+        this.$router.push({
+          path: "/businessManagement/purchaseOrder/index",
+          query: {
+            params: row.srcParentId
+          },
+        });
+      } else if (this.category == 3) {
+        this.$router.$avueRouter.closeTag("/purchase/contract/index");
+        this.$router.push({
+          path: "/purchase/contract/index",
+          query: {
+            params: row.srcParentId
+          },
+        });
+      } else if (this.category == 4) {
+        this.$router.$avueRouter.closeTag("/exportTrade/purchaseContract/index");
+        this.$router.push({
+          path: "/exportTrade/purchaseContract/index",
+          query: {
+            params: row.srcParentId
+          },
+        });
+      }
+    },
   }
+}
 </script>
 
 <style lang="scss" scoped>
-  ::v-deep .el-form-item {
-    margin-bottom: 0;
-  }
+::v-deep .el-form-item {
+  margin-bottom: 0;
+}
 
-  .trading-form ::v-deep .el-form-item {
-    margin-bottom: 8px !important;
-  }
-  .required_fields{
-    color: #F56C6C;
-    display:inline-block;
-    width: 7%
-  }
-  .upper_right_button{
-    display: flex;
-    position: fixed;
-    right: 12px;
-    top: 47px;
-  }
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+.required_fields {
+  color: #F56C6C;
+  display: inline-block;
+  width: 7%
+}
+
+.upper_right_button {
+  display: flex;
+  position: fixed;
+  right: 12px;
+  top: 47px;
+}
 </style>

+ 6 - 1
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -589,8 +589,13 @@
         done(row);
       },
       rowCell(row,index){
-        row.$cellEdit = !row.$cellEdit
+        // row.$cellEdit = !row.$cellEdit
         // this.$refs.crud.rowCell(row, index)
+        if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
       },
       rowDel(row,index){
         if (row.id) {

+ 1 - 1
src/views/financing/financingLedger/js/optionList2.js

@@ -10,7 +10,7 @@ export const option ={
   viewBtn: false,
   editBtn: false,
   delBtn: false,
-  menuWidth: 70,
+  menuWidth: 90,
   searchIcon: true,
   searchIndex: 2,
   column: [

+ 1 - 1
src/views/financing/financingManagement/detailsPage.vue

@@ -11,7 +11,7 @@
           class="el-button--small-yh " @click.stop="openEdit">编辑
         </el-button>
         <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 1"
-          size="small">{{ form.id ? '修改数据' : '保存数据' }}
+          size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
           <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">

+ 5 - 1
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -305,8 +305,12 @@
           "value": "2"
         },
         {
-          "label": "已出库",
+          "label": "待扫描",
           "value": "3"
+        },
+        {
+          "label": "已出库",
+          "value": "4"
         }
       ],
       "width": 100

+ 35 - 6
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -21,7 +21,8 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
-            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核
+            </el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
             <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
@@ -66,7 +67,7 @@
               @click.stop="addRow">录入明细
             </el-button>
             <!--            <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板</el-button>-->
-            <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1"
+            <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1||!form.id"
               @click.stop="excelBox = true">导入
             </el-button>
           </template>
@@ -166,6 +167,7 @@ import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
 import { getToken } from "@/util/auth";
 import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
+import {validatenull } from '@/util/validate'
 import check from "@/components/check/check";
 export default {
   name: "detailsPageEdit",
@@ -312,7 +314,7 @@ export default {
       olditemsVOList: [],
       oldorderFeesList: [],
       oldorderFilesList: [],
-      roleName:localStorage.getItem("roleName")
+      roleName: localStorage.getItem("roleName")
     };
   },
   props: {
@@ -490,10 +492,37 @@ export default {
         done();
         if (valid) {
           for (let i = 0; i < this.itemsVOList.length; i++) {
-            if (this.itemsVOList[i].$cellEdit) {
-              return this.$message.error('请保存明细')
+            if(validatenull(this.itemsVOList[i].storageId)){
+              return this.$message.error('请完善第'+(i+1)+'行的库区')
+            }
+            if(validatenull(this.itemsVOList[i].itemId)){
+              return this.$message.error('请完善第'+(i+1)+'行的品名')
+            }
+            if(validatenull(this.itemsVOList[i].itemType)){
+              return this.$message.error('请完善第'+(i+1)+'行的品牌')
+            }
+            if(validatenull(this.itemsVOList[i].grade)){
+              return this.$message.error('请完善第'+(i+1)+'行的等级')
+            }
+            if(validatenull(this.itemsVOList[i].billNo)){
+              return this.$message.error('请完善第'+(i+1)+'行的捆包号')
+            }
+            if(validatenull(this.itemsVOList[i].sliceNumber)){
+              return this.$message.error('请完善第'+(i+1)+'行的片数')
+            }
+            if(validatenull(this.itemsVOList[i].storageInQuantity)){
+              return this.$message.error('请完善第'+(i+1)+'行的入库量')
+            }
+            if(validatenull(this.itemsVOList[i].unit)){
+              return this.$message.error('请完善第'+(i+1)+'行的入库单位')
+            }
+            if(validatenull(this.itemsVOList[i].price)){
+              return this.$message.error('请完善第'+(i+1)+'行的入库单价')
             }
           }
+          this.itemsVOList.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
           let data = {
@@ -615,7 +644,7 @@ export default {
       })
     },
     calculateChange(row) {
-      row.storageAmount = (row.storageInQuantity ? row.storageInQuantity : 0) * (row.price ? row.price : 0)
+      row.storageAmount = Number((row.storageInQuantity ? row.storageInQuantity : 0) * (row.price ? row.price : 0)).toFixed(2)
     },
     beforeFinance(feesData, callback) {
       let params = {}

+ 5 - 1
src/views/salesManagement/outStock/config/customerContact.json

@@ -260,8 +260,12 @@
           "value": "2"
         },
         {
-          "label": "已出库",
+          "label": "待扫描",
           "value": "3"
+        },
+        {
+          "label": "已出库",
+          "value": "4"
         }
       ],
       "width": 100

+ 33 - 5
src/views/salesManagement/outStock/detailsPage.vue

@@ -155,6 +155,7 @@ import uploadFile from "@/components/upload-file/main";
 import { getToken } from "@/util/auth";
 import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
 import { getCurrentDate } from "@/util/date";
+import {validatenull } from '@/util/validate'
 import check from "@/components/check/check";
 export default {
   name: "detailsPageEdit",
@@ -477,10 +478,37 @@ export default {
         done();
         if (valid) {
           for (let i = 0; i < this.itemsVOList.length; i++) {
-            if (this.itemsVOList[i].$cellEdit) {
-              return this.$message.error('请保存明细')
+            if(validatenull(this.itemsVOList[i].storageId)){
+              return this.$message.error('请完善第'+(i+1)+'行的库区')
+            }
+            if(validatenull(this.itemsVOList[i].itemId)){
+              return this.$message.error('请完善第'+(i+1)+'行的品名')
+            }
+            if(validatenull(this.itemsVOList[i].itemType)){
+              return this.$message.error('请完善第'+(i+1)+'行的品牌')
+            }
+            if(validatenull(this.itemsVOList[i].grade)){
+              return this.$message.error('请完善第'+(i+1)+'行的等级')
+            }
+            if(validatenull(this.itemsVOList[i].billNo)){
+              return this.$message.error('请完善第'+(i+1)+'行的捆包号')
+            }
+            if(validatenull(this.itemsVOList[i].sliceNumber)){
+              return this.$message.error('请完善第'+(i+1)+'行的片数')
+            }
+            if(validatenull(this.itemsVOList[i].storageInQuantity)){
+              return this.$message.error('请完善第'+(i+1)+'行的入库量')
+            }
+            if(validatenull(this.itemsVOList[i].unit)){
+              return this.$message.error('请完善第'+(i+1)+'行的入库单位')
+            }
+            if(validatenull(this.itemsVOList[i].price)){
+              return this.$message.error('请完善第'+(i+1)+'行的入库单价')
             }
           }
+          this.itemsVOList.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
           let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
           let data = {
@@ -552,7 +580,7 @@ export default {
                 })
               })
             } else {
-              this.$confirm("此订单余额不足,是否继续确认提交审核?", {
+              this.$confirm(res.data.data, {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 type: "warning"
@@ -609,7 +637,7 @@ export default {
               this.getDetail(this.form.id)
             })
           } else {
-            this.$confirm("此订单余额不足,是否继续确认提交审核?", {
+            this.$confirm(res.data.data, {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning"
@@ -696,7 +724,7 @@ export default {
       this.$refs.crud.refreshTable();
     },
     calculateChange(row) {
-      row.storageAmount = (row.storageInQuantity ? row.storageInQuantity : 0) * (row.price ? row.price : 0)
+      row.storageAmount = Number((row.storageInQuantity ? row.storageInQuantity : 0) * (row.price ? row.price : 0)).toFixed(2)
     },
     beforeFinance(feesData, callback) {
       let params = {}