Przeglądaj źródła

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 lat temu
rodzic
commit
741b9ce66d

+ 24 - 18
src/components/fee-info/main.vue

@@ -21,8 +21,8 @@
         </template>
         <template slot="menu" slot-scope="{ row, index }">
           <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="disabled">{{
-              row.$cellEdit ? "保存" : "修改"
-          }}</el-button>
+             row.$cellEdit ? "保存" : "修改" 
+            }}</el-button>
           <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="disabled">删 除
           </el-button>
         </template>
@@ -34,14 +34,14 @@
           <span v-if="row.$cellEdit && !inCropId" class="required_fields">*</span>
           <crop-select ref="corp" style="width: 90% !important;display: inline-block" v-if="row.$cellEdit"
             v-model="row.corpId" :cropIndex="index" @getCorpData="getCorpData" corpType="KG"></crop-select>
-          <span v-else>{{ row.corpName }}</span>
+          <span v-else>{{  row.corpName  }}</span>
         </template>
         <template slot="feeName" slot-scope="{ row }">
           <span v-if="row.$cellEdit" class="required_fields">*</span>
           <breakdown-select v-if="row.$cellEdit" v-model="row.itemId" @selectValue="value => selectValue(value, row)"
             :configuration="breakConfiguration">
           </breakdown-select>
-          <span v-else>{{ row.feeName }}</span>
+          <span v-else>{{  row.feeName  }}</span>
         </template>
         <template slot="billNo" slot-scope="{ row }">
           <el-select v-if="row.$cellEdit" v-model="row.billNo" size="small" filterable allow-create default-first-option
@@ -49,25 +49,27 @@
             <el-option v-for="(item, index) in billNoList" :key="index" :label="item" :value="item">
             </el-option>
           </el-select>
-          <span v-else>{{ row.billNo }}</span>
+          <span v-else>{{  row.billNo  }}</span>
         </template>
         <template slot="price" slot-scope="{ row }">
           <el-input-number v-if="row.$cellEdit" v-model="row.price" placeholder="请输入" size="small" :controls="false"
             :precision="2" @input="countChange(row)" style="width: 100%"></el-input-number>
-          <span v-else>{{ row.price | micrometerFormat }}</span>
+          <span v-else>{{  row.price | micrometerFormat  }}</span>
         </template>
         <template slot="quantity" slot-scope="{ row }">
-          <el-input-number v-if="row.$cellEdit" v-model="row.quantity" size="small" placeholder="请输入" :controls="false"
-            :precision="0" @input="countChange(row)" style="width: 100%"></el-input-number>
-          <span v-else>{{ row.quantity | decimalFormat }}</span>
+          <el-input-number v-if="row.$cellEdit && !isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
+            :controls="false" :precision="0" @input="countChange(row)" style="width: 100%"></el-input-number>
+          <el-input-number v-if="row.$cellEdit && isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
+            :controls="false" :precision="6" @input="countChange(row)" style="width: 100%"></el-input-number>
+          <span v-else>{{  row.quantity | decimalFormat  }}</span>
         </template>
         <template slot="amount" slot-scope="{ row }">
-          <span>{{ row.amount | micrometerFormat }}</span>
+          <span>{{  row.amount | micrometerFormat  }}</span>
         </template>
         <template slot="exchangeRate" slot-scope="{ row }">
           <el-input-number v-if="row.$cellEdit" v-model="row.exchangeRate" size="small" :controls="false" :precision="6"
             @change="rateChange(row)" style="width: 100%" placeholder="请输入"></el-input-number>
-          <span v-else>{{ row.exchangeRate }}</span>
+          <span v-else>{{  row.exchangeRate  }}</span>
         </template>
         <template slot="currency" slot-scope="{ row }">
           <el-select v-if="row.$cellEdit" v-model="row.currency" filterable allow-create default-first-option
@@ -76,14 +78,14 @@
               :value="item.dictValue">
             </el-option>
           </el-select>
-          <span v-else>{{ row.currency }}</span>
+          <span v-else>{{  row.currency  }}</span>
         </template>
         <template slot="unit" slot-scope="{ row }">
           <el-select v-if="row.$cellEdit" v-model="row.unit" filterable placeholder="请选择" size="small">
             <el-option v-for="(item, index) in unitList" :key="index" :label="item.dictValue" :value="item.dictValue">
             </el-option>
           </el-select>
-          <span v-else>{{ row.unit }}</span>
+          <span v-else>{{  row.unit  }}</span>
         </template>
       </avue-crud>
     </trade-card>
@@ -122,7 +124,7 @@
 import feeOption from "./config/feeInfo.json";
 import option from "./config/feeList.json";
 import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
-import { delItem,delItem2 } from "@/api/feeInfo/fee-info";
+import { delItem, delItem2 } from "@/api/feeInfo/fee-info";
 import { isPercentage, micrometerFormat, IntegerFormat } from "@/util/validate";
 import cropDialog from "@/components/crop-dialog/main";
 import _ from "lodash";
@@ -256,6 +258,10 @@ export default {
       type: Number,
       default: 1
     },
+    isDecimal: {
+      type: Boolean,
+      default: false
+    },
   },
   filters: {
     isPercentage(val) {
@@ -430,10 +436,10 @@ export default {
               this.feeData.splice(index, 1);
             });
           } else {
-            let data={
-              srcParentId:row.id,
-              billType:this.itemType,
-              tradeType:this.optionType
+            let data = {
+              srcParentId: row.id,
+              billType: this.itemType,
+              tradeType: this.optionType
             }
             delItem2(data, this.feeUrl).then(res => {
               this.$message({

+ 13 - 0
src/router/views/index.js

@@ -670,6 +670,19 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/invoice/index')
   }]
 },
+{
+  path: '/importTrade/receiptSettle/receiptSettle',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/importTrade/receiptSettle/receiptSettle',
+    name: '收款合同',
+    meta: {
+      keepAlive: true
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/receiptSettle/receiptSettle')
+  }]
+},
 // 出口 客户询价
 {
   path: '/exportTrade/customerInquiry/index',

+ 48 - 6
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -12,8 +12,8 @@
         </el-button>
         <el-button type="primary" @click="openFlow" size="small" :disabled="!form.id">审 核
         </el-button>
-        <el-button type="primary" :disabled="disabled" @click="editCustomer" size="small">{{ form.id ? "确认修改" : "确认新增"
-        }}
+        <el-button type="primary" :disabled="disabled" @click="editCustomer" size="small">{{  form.id ? "确认修改" : "确认新增" 
+          }}
         </el-button>
       </div>
     </div>
@@ -204,7 +204,7 @@ import website from "@/config/website";
 import { getRoleTree } from "@/api/system/role";
 import { getDeptTree } from "@/api/system/dept";
 import { getPostList } from "@/api/system/post";
-
+import { contrastObj, contrastList } from "@/util/contrastData";
 export default {
   name: "detailsPage",
   data() {
@@ -320,6 +320,7 @@ export default {
       },
       switchDialog: false,
       form: {},
+
       disabled: false,
       contactsForm: {},
       advantageProjectForm: {},
@@ -796,7 +797,15 @@ export default {
         label: "name",
         multiple: true
       },
-      addressLatLng: []
+      addressLatLng: [],
+      oldform: {
+        creditstatus:'1'
+      },
+      oldcontactsData: [],
+      oldbankOfDepositData: [],
+      oldadvantageProjectData: [],
+      oldaddressLatLng: [],
+      oldaddressData: [],
     };
   },
   props: {
@@ -872,6 +881,12 @@ export default {
         this.advantageProjectData = this.form.corpsItems;
         this.addressLatLng = JSON.parse(this.form.addressLatLng);
         this.addressData = this.form.corpsAddrList;
+        this.oldform = this.deepClone(res.data.data);
+        this.oldcontactsData = this.deepClone(this.form.corpsAttnList);
+        this.oldbankOfDepositData = this.deepClone(this.form.corpsBankList);
+        this.oldadvantageProjectData = this.deepClone(this.form.corpsItems);
+        this.oldaddressLatLng = this.deepClone(JSON.parse(this.form.addressLatLng));
+        this.oldaddressData = this.deepClone(this.form.corpsAddrList);
         if (this.form.belongtoarea) {
           this.form.belongtoarea = this.form.belongtoarea
             .split(",")
@@ -1194,7 +1209,7 @@ export default {
       });
     },
     //修改提交触发
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.corpsAttnList = this.contactsData;
@@ -1243,6 +1258,9 @@ export default {
                   .map(item => item.split("/"));
               }
               this.disabled = false;
+              if (status) {
+                this.$emit("goBack", true);
+              }
             }
           });
         } else {
@@ -1355,10 +1373,34 @@ export default {
       });
     },
     backToList(value) {
+      console.log(value)
       if (value == '0') {
         this.$emit("goBack");
       } else {
-        this.$emit('goBack', true)
+        console.log(this.form, this.oldform)
+        if (
+          contrastObj(this.form, this.oldform) ||
+          contrastList(this.contactsData, this.oldcontactsData) ||
+          contrastList(this.bankOfDepositData, this.oldbankOfDepositData) ||
+          contrastList(this.advantageProjectData, this.oldadvantageProjectData) ||
+          contrastList(this.addressLatLng, this.oldaddressLatLng) ||
+          contrastList(this.addressData, this.oldaddressData)
+        ) {
+          this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(() => {
+              this.editCustomer("goBack");
+            })
+            .catch(() => {
+              this.$emit("goBack", true);
+            });
+        }else{
+          this.$emit("goBack", true);
+        }
+
       }
     },
     openFlow() {

+ 54 - 33
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -29,7 +29,7 @@
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
           </template>
           <template slot-scope="{}" slot="corpIdLabel">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('KH')">客户名称:</span>
           </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
@@ -42,6 +42,9 @@
               </el-option>
             </el-select>
           </template>
+          <template slot-scope="{}" slot="belongToCorpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('GS')">公司主体:</span>
+          </template>
           <template slot="belongToCorpId">
             <crop-select v-model="form.belongToCorpId" corpType="GS" :disabled="detailData.status == 1"></crop-select>
           </template>
@@ -156,7 +159,7 @@
           <template slot="menu" slot-scope="{ row, index }">
             <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>
+                :disabled="disabled || detailData.status == 1">{{  row.$cellEdit ? "保存" : "修改"  }}</el-button>
               <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
                 :disabled="detailData.status == 1">删除</el-button>
               <div v-if="!goodsEditShow"
@@ -177,26 +180,26 @@
               <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>
+            <span v-else>{{  row.itemType  }}</span>
           </template>
           <template slot="ename" slot-scope="{ row, index }">
             <el-input v-if="row.$cellEdit" v-model="row.ename" size="small" placeholder="请点击右边按钮"
               @change="editChange(row)"></el-input>
-            <span v-else>{{ row.ename }}</span>
+            <span v-else>{{  row.ename  }}</span>
           </template>
           <template slot="itemProp" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
               <el-input v-model="row.itemProp" size="small" placeholder="请点击右边按钮" @change="editChange(row)"></el-input>
               <el-button icon="el-icon-edit" size="mini" @click="openProperty(row, index)"></el-button>
             </span>
-            <span v-else>{{ row.itemProp }}</span>
+            <span v-else>{{  row.itemProp  }}</span>
           </template>
           <template slot="itemDescription" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
               <el-input v-model="row.itemDescription" size="small" placeholder="请输入" @change="editChange(row)">
               </el-input>
             </span>
-            <span v-else>{{ row.itemDescription }}</span>
+            <span v-else>{{  row.itemDescription  }}</span>
           </template>
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
@@ -207,7 +210,7 @@
               </el-select>
               <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
             </span>
-            <span v-else> {{ row.cname }}</span>
+            <span v-else> {{  row.cname  }}</span>
           </template>
           <template slot="partsDescribe" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
@@ -215,65 +218,65 @@
               </el-input>
               <el-button icon="el-icon-edit" size="mini" @click="partrePick(row, index)"></el-button>
             </span>
-            <span v-else>{{ row.partsDescribe }}</span>
+            <span v-else>{{  row.partsDescribe  }}</span>
           </template>
           <template slot="priorityReferrer" slot-scope="{ row }">
             <el-checkbox :disabled="!row.$cellEdit" v-model="row.priorityReferrer" :true-label="1" :false-label="0" />
           </template>
           <template slot="corpId" slot-scope="{ row }">
-            <span>{{ row.corpName }}</span>
+            <span>{{  row.corpName  }}</span>
           </template>
           <template slot="purchaseCost" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.purchaseCost" size="small" placeholder="请输入"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
-            <span v-else>{{ row.purchaseCost | micrometerFormat }}</span>
+            <span v-else>{{  row.purchaseCost | micrometerFormat  }}</span>
           </template>
           <template slot="purchaseAmount" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" size="small" placeholder="请输入"
               @change="purchaseAmountChange(row)"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
-            <span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
+            <span v-else>{{  row.purchaseAmount | micrometerFormat  }}</span>
           </template>
           <template slot="price" slot-scope="{ row }">
             <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>
-            <span v-else>{{ row.price | micrometerFormat }}</span>
+            <span v-else>{{  row.price | micrometerFormat  }}</span>
           </template>
           <template slot="amount" slot-scope="{ row }">
-            <span>{{ row.amount | micrometerFormat }}</span>
+            <span>{{  row.amount | micrometerFormat  }}</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="priceChange(row)"></el-input>
-            <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
+            <span v-else>{{  row.orderQuantity | IntegerFormat  }}</span>
           </template>
           <template slot="discount" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.discount" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="discountChange(row)"></el-input>
-            <span v-else>{{ row.discount | isDiscount }}</span>
+            <span v-else>{{  row.discount | isDiscount  }}</span>
           </template>
           <template slot="insurance" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.insurance" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)"></el-input>
-            <span v-else>{{ row.insurance | micrometerFormat }}</span>
+            <span v-else>{{  row.insurance | micrometerFormat  }}</span>
           </template>
           <template slot="freight" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.freight" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)"></el-input>
-            <span v-else>{{ row.freight | micrometerFormat }}</span>
+            <span v-else>{{  row.freight | micrometerFormat  }}</span>
           </template>
           <template slot="taxRate" slot-scope="{ row }">
             <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="taxRateChange(row)"></el-input>
-            <span v-else>{{ row.taxRate | isPercentage }}</span>
+            <span v-else>{{  row.taxRate | isPercentage  }}</span>
           </template>
           <template slot="itemMargin" slot-scope="{ row }">
-            <span>{{ row.itemMargin | isPercentage }}</span>
+            <span>{{  row.itemMargin | isPercentage  }}</span>
           </template>
         </avue-crud>
       </trade-card>
@@ -871,21 +874,39 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
-    khEdit() {
-      if (this.form.corpId) {
-        this.$router.push({
-          path: '/basicData/customerInformation/index', query: {
-            corpId: this.form.corpId,
-            corpName: this.form.corpName
-          }
-        })
-      } else {
-        this.$router.push({
-          path: '/basicData/customerInformation/index', query: {
-            add: "New"
-          }
-        })
+    khEdit(staus) {
+      if (staus == 'KH') {
+        if (this.form.corpId) {
+          this.$router.push({
+            path: '/basicData/customerInformation/index', query: {
+              corpId: this.form.corpId,
+              corpName: this.form.corpName
+            }
+          })
+        } else {
+          this.$router.push({
+            path: '/basicData/customerInformation/index', query: {
+              add: "New"
+            }
+          })
+        }
+      } else if (staus == 'GS') {
+        if (this.form.corpId) {
+          this.$router.push({
+            path: '/basicData/customerManagement/companyMaterial/index', query: {
+              corpId: this.form.corpId,
+              corpName: this.form.corpName
+            }
+          })
+        } else {
+          this.$router.push({
+            path: '/basicData/customerManagement/companyMaterial/index', query: {
+              add: "New"
+            }
+          })
+        }
       }
+
     },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);

+ 86 - 0
src/views/importTrade/receiptSettle/configuration/detailsPage.json

@@ -0,0 +1,86 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "stripe": true,
+  "selection": false,
+  "menuWidth": 150,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "thisAmount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "width": 200,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
+    },
+    {
+      "label": "费用名称",
+      "prop": "itemName",
+      "overHidden": true,
+      "width": 150,
+      "index": 4
+    },
+    {
+      "label": "金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "本次金额",
+      "prop": "thisAmount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "overHidden": true,
+      "index": 13,
+      "cell": true,
+      "width": 540
+    }
+  ]
+}

+ 166 - 0
src/views/importTrade/receiptSettle/configuration/mainList.json

@@ -0,0 +1,166 @@
+{
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 16,
+  "dialogWidth": "60%",
+  "align": "center",
+  "searchSpan": 8,
+  "height": "auto",
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "stripe": true,
+  "headerAlign": "center",
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "search": true,
+      "width": 150,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 3
+    },
+    {
+      "label": "往来单位",
+      "prop": "corpId",
+      "search": true,
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "单据状态",
+      "prop": "financeStatus",
+      "type": "select",
+      "search": true,
+      "overHidden": true,
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "待结算",
+          "value":"待结算"
+        },
+        {
+          "label": "结算完成",
+          "value": "结算完成"
+        }
+      ]
+    },
+    {
+      "label": "人民币金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "外币金额",
+      "prop": "foreignAmount",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "收款日期",
+      "prop": "settlementDate",
+      "overHidden": true,
+      "type": "date",
+      "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "width": 150,
+      "index": 6
+    },
+
+    {
+      "label": "银行名称",
+      "prop": "accountBank",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "银行户头",
+      "prop": "accountName",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 8
+    },
+    {
+      "label": "银行卡号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 9
+    },
+    {
+      "label": "创建人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 10,
+      "width":100
+    },
+    {
+      "label": "创建日期",
+      "prop": "createTime",
+      "type": "date",
+      "format": "yyyy-MM-dd HH:mm:ss",
+      "overHidden": true,
+      "index": 11,
+      "width":160
+    },
+    {
+      "label": "修改人",
+      "prop": "updateUserName",
+      "overHidden": true,
+      "index": 12,
+      "width":100
+    },
+    {
+      "label": "修改日期",
+      "prop": "updateTime",
+      "type": "date",
+      "format": "yyyy-MM-dd HH:mm:ss",
+      "overHidden": true,
+      "index": 13,
+      "width":160
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "search": true,
+      "overHidden": true,
+      "index": 14,
+      "width": 120
+    }
+  ]
+}

+ 251 - 0
src/views/importTrade/receiptSettle/receiptSettle.vue

@@ -0,0 +1,251 @@
+<template>
+  <basic-container v-if="show">
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               :search.sync="search"
+               :table-loading="loading"
+               :cell-style="cellStyle"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @saveColumn="saveColumn"
+               @resetColumn="resetColumn"
+               @on-load="onLoad"
+               @search-criteria-switch="searchCriteriaSwitch">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot="menuLeft">
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-plus"
+                   @click="addReceipt">创建单据
+        </el-button>
+        <el-button size="small"
+                   type="info"
+                   @click.stop="openReport()"
+        >导出报表
+        </el-button>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-delete"
+          @click.stop="rowDel(scope.row, scope.index)"
+        >删除
+        </el-button>
+      </template>
+      <template slot-scope="scope" slot="srcOrderno">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row)">{{ scope.row.srcOrderno }}</span>
+      </template>
+      <template slot-scope="scope" slot="corpId">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row)">{{ scope.row.corpName }}</span>
+      </template>
+    </avue-crud>
+  </basic-container>
+  <detail-page
+    ref="detail"
+    @goBack="goBack"
+    :detailData="detailData"
+    v-else
+  ></detail-page>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+  import {getList ,remove} from "@/api/financialManagement/financialManagement"
+  import detailPage from "./receiptSettleDetailsPage.vue";
+
+  export default {
+    data() {
+      return {
+        loading : false,
+        form: {},
+        search:{},
+        option: {},
+        parentId:0,
+        show:true,
+        detailData:{},
+        dataList: [{
+          canem:""
+        }],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+      }
+    },
+    components:{
+      detailPage
+    },
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(64), option);
+    },
+    mounted() {
+      // this.option.height = window.innerHeight - 200;
+    },
+    methods: {
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 90
+        }else {
+          this.option.height = this.option.height + 90
+        }
+        this.$refs.crud.getTableHeight()
+      },
+      //新单打开
+      addReceipt(row){
+        this.detailData = {
+          id: row.id,
+          status: 1
+        };
+        this.show = false;
+      },
+      //编辑打开
+      editOpen(row){
+        const data = {
+          moduleName: 'sf',
+          tableName: 'finance_settlement',
+          billId: row.id,
+          no: localStorage.getItem('browserID')
+        }
+        this.checkLock(data).then(res => {
+          if (res.data.code == 200) {
+            this.detailData = {
+              disabled: true,
+              id: row.id
+            };
+            this.show = false;
+          }
+        }).catch(error => {
+          this.detailData = {
+            disabled: true,
+            id: row.id
+          };
+          this.show = false;
+        })
+      },
+      rowDel(row, index, done) {
+        if(row.id){
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
+            })
+          });
+        }
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange(val) {
+        this.page.currentPage = val
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange(params) {
+        this.onLoad(this.page,params)
+      },
+      paramsAdjustment(params) {
+        params = Object.assign({}, this.search);
+        if (params.settlementDate &&  params.settlementDate.length !==0 ) {  //合同
+          params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
+          params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
+          this.$delete(params,'settlementDate')
+        }
+        return params
+      },
+      onLoad(page, params) {
+        this.loading = true
+        params = this.paramsAdjustment(params)
+        params.billType = "收费"
+        params.settlementType = 1
+
+        getList(page.currentPage, page.pageSize,params).then(res =>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 240;
+          }
+        }).finally(()=>{
+          this.loading = false
+        })
+      },
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+        this.onLoad(this.page,this.search)
+      },
+      cellStyle() {
+        return "padding:0;height:40px;";
+      },
+      //列保存触发
+      async saveColumn() {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(64),
+          this.option
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      async resetColumn() {
+        const inSave = await this.delColumnData(
+          this.getColumnName(64),
+          option
+        );
+        if (inSave) {
+          this.$message.success("重置成功");
+          this.option = option;
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 923 - 0
src/views/importTrade/receiptSettle/receiptSettleDetailsPage.vue

@@ -0,0 +1,923 @@
+<template>
+  <div class="borderless">
+    <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">返回列表
+        </el-button>
+        <div class="upper_right_button">
+          <el-button
+            type="primary"
+            size="small"
+            @click="editHandle"
+            v-if="editDisable"
+            :loading="buttonLoading"
+          >编 辑</el-button>
+          <el-button type="primary"
+                     size="small"
+                     :disabled="!form.id || editDisable"
+                     @click="postMessage"
+                     :loading="buttonLoading"
+          >发送消息</el-button>
+          <el-button type="warning"
+                     size="small"
+                     class="el-button--small-yh"
+                     :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"
+                     :disabled="!financeDisabled || editDisable"
+                     @click.stop="saveSettlement"
+          >保存数据
+          </el-button>
+        </div>
+      </div>
+    </div>
+    <div class="customer-main">
+      <containerTitle title="基础信息"></containerTitle>
+      <basic-container>
+        <avue-form class="trading-form" ref="form" v-model="form" :option="option">
+          <template slot="corpId">
+            <crop-select
+              v-model="form.corpId"
+              corpType="KG"
+              :disabled="!financeDisabled || editDisable"
+              @getCorpData="returnBack"
+              style="width: 100%"
+            ></crop-select>
+          </template>
+          <template slot="salesCompany">
+            <crop-select
+              v-model="form.salesCompany"
+              corpType="GS"
+              :disabled="!financeDisabled || editDisable"
+              @getCorpData="getGSName"
+              style="width: 100%"
+            ></crop-select>
+          </template>
+          <template slot="accountNo">
+            <el-select v-model="form.accountNo"
+                       placeholder="请选择"
+                       :disabled="!financeDisabled || 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="caseOverPayment">
+            <el-input
+              placeholder="请输入"
+              clearable
+              v-model="form.caseOverPayment"
+              @change="caseOverPaymentChange"
+              v-input-limit="2"
+              :disabled="dataList.length == 0 || !financeDisabled || editDisable"
+            ></el-input>
+          </template>
+          <template slot="remark">
+            <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"
+                   @current-change="currentChange"
+                   @size-change="sizeChange"
+                   @refresh-change="refreshChange">
+          <template slot="menuLeft">
+            <el-button type="primary"
+                       size="small"
+                       icon="el-icon-shopping-cart-2"
+                       :disabled="!financeDisabled || editDisable"
+                       :buttonLoading="buttonLoading"
+                       @click="selectRecipt"
+            >选择销售合同
+            </el-button>
+            <el-button
+              v-if="false && form.id"
+              type="info"
+              size="small"
+              icon="el-icon-printer"
+              @click.stop="openReport"
+            >报表打印</el-button>
+          </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>
+            <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"
+              @input="thisAmountVerify(row)"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+            ></el-input>
+            <span v-else>{{ row.thisAmount }}</span>
+          </template>
+          <template slot-scope="scope" slot="menu">
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-edit"
+              :disabled="!financeDisabled || editDisable"
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-delete"
+              :disabled="!financeDisabled || 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>
+          </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"
+        >
+        </bill-detail>
+      </el-dialog>
+    </div>
+    <messagePost
+      v-if="messageVisble"
+      ref="messagePost"
+      @closeDialog="closeDialog"
+    ></messagePost>
+    <report-dialog
+      :reportId="form.id"
+      :switchDialog="switchDialog"
+      :searchValue="statementData"
+      :reportName="'对账单'"
+      @onClose="onClose()"
+    />
+  </div>
+</template>
+
+<script>
+  import option from "./configuration/detailsPage.json";
+  import { getDetail } from "@/api/financialManagement/financialManagement"
+  import { getDetails,modify,cancelModify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
+  import  billDetail from "@/components/bill/billDetailList";
+  import _ from "lodash";
+  import { getlistBankBy,deleteDetail } from "@/api/financialManagement/paymentRequest";
+  import { contrastObj,contrastList } from "@/util/contrastData";
+  import {getUserInfo} from "@/api/system/user";
+  import {getCorpDetail} from "@/api/maintenance/overpayment";
+  import { getlistBankBy as GYSGetBank } from "@/api/basicData/configuration"
+  import reportDialog from "@/components/report-dialog/main";
+
+  export default {
+    name: "receiptDetailsPage",
+    props: {
+      detailData: {
+        type: Object
+      }
+    },
+    components:{
+      billDetail,
+      reportDialog,
+    },
+    data() {
+      return {
+        category: '',
+        form: {},
+        itemsForm:{},
+        params:{},
+        buttonLoading:false,
+        itemsOption: option,
+        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',
+              display: 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: '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,
+              row:2,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+          ],
+        },
+        id:'',
+        dataList: [],
+        currencyDic:[],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        billDetailDialog:false,
+        financeDisabled:true,
+        billType:"收费",
+        // 明细本次金额总计
+        allAmount: 0,
+        // 消息弹窗
+        messageVisble: false,
+        //新旧数据对比
+        oldForm:{},
+        oldDataList:[],
+        financeStatusDic:[{
+          value: '正常',
+          label: '正常'
+        },
+          {
+            value: '停用',
+            label: '停用'
+          }],
+        editDisable: false, //编辑状态禁用
+        switchDialog: false,
+        statementData: {},
+      }
+    },
+    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
+        })
+      }else{
+        this.form.financeStatus = "待结算"
+        this.oldForm.financeStatus = "待结算"
+      }
+    },
+    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
+          }
+        })
+        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','')
+        }
+      },
+      selectRecipt(){
+        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 =>{ return item.srcOrderno}))).join(','))
+
+        this.billDetailDialog = false;
+      },
+      rowUpdate(row, index, done) {
+        done(row);
+      },
+      rowCell(row,index){
+        row.$cellEdit = !row.$cellEdit
+        // this.$refs.crud.rowCell(row, index)
+      },
+      rowDel(row,index){
+        if (row.id) {
+          deleteDetail({ids: row.id}).then(res => {
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.dataList.splice(index, 1);
+          })
+        } else {
+          this.dataList.splice(index, 1);
+        }
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      confirmSettlement(status){
+        if (!this.form.corpId) return this.$message.error('往来单位不能为空')
+        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(",")
+
+              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.financeDisabled){
+                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) => {
+          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: 'sf',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)
+            }).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'
+            }
+          })
+        }
+        this.oldForm = Object.assign({},this.form);
+
+        if(this.financeDisabled || !this.editDisable){
+          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" || item.prop === "overPayment"){
+              this.$set(item,"disabled",true)
+            }else{
+              this.$set(item,"disabled",false)
+            }
+          })
+        }
+        if(this.financeDisabled === false || this.editDisable){
+          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: 'sf',tableName: 'finance_settlement', billId: this.form.id})
+            this.$emit("goBack");
+            this.leaveDetailsKey(this.$route.name)
+          })
+        }else{
+          !this.editDisable && this.form.id && this.unLock({moduleName: 'sf',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('本次使用的溢付款不能超过总溢付款')
+        }
+      },
+      // 发送消息
+      postMessage() {
+        this.messageVisble = true
+        this.$nextTick(() => {
+          this.$refs.messagePost.init()
+        })
+      },
+      closeDialog() {
+        this.messageVisble = false
+      },
+      editHandle() {
+        const data = {
+          moduleName: 'sf',
+          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: 'sf',
+              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)
+            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;";
+      },
+      openReport() {
+        this.statementData = {...this.search};
+        this.switchDialog = !this.switchDialog;
+      },
+      onClose(val) {
+        this.switchDialog = val;
+      },
+      // 跳转页面
+      jumpPage(row, index) {
+        if (this.category == 2) {
+          this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
+          this.$router.push({
+            path: "/businessManagement/salesOrder/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        } else if (this.category == 3) {
+          this.$router.$avueRouter.closeTag("/salesManagement/salesContract/index");
+          this.$router.push({
+            path: "/salesManagement/salesContract/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        } else if (this.category == 4) {
+          this.$router.$avueRouter.closeTag("/exportTrade/salesContract/index");
+          this.$router.push({
+            path: "/exportTrade/salesContract/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        }
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+::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;
+}
+</style>

+ 2 - 8
src/views/workManagement/main-items/list.vue

@@ -39,8 +39,8 @@
           </el-select>
         </template>
         <template slot="menuLeft">
-          <el-button type="primary" size="small" icon="el-icon-plus" @click="addMainItems">新 单
-          </el-button>
+          <!-- <el-button type="primary" size="small" icon="el-icon-plus" @click="addMainItems">新 单
+          </el-button> -->
           <el-button size="small" icon="el-icon-printer" type="info" :loading="exportLoading"
             @click.stop="openReport()">导 出
           </el-button>
@@ -198,12 +198,6 @@ export default {
             overHidden: true
           },
           {
-            label: "提醒日",
-            prop: "reminderDay",
-            width: 100,
-            overHidden: true
-          },
-          {
             label: "单据状态",
             prop: "taskStatus",
             width: 100,