caojunjie 3 лет назад
Родитель
Сommit
fc027590c5
28 измененных файлов с 2444 добавлено и 212 удалено
  1. 9 0
      src/api/box/archives.js
  2. 16 0
      src/api/boxManagement/index.js
  3. 8 0
      src/api/boxManagement/leaseIn/index.js
  4. 70 22
      src/components/bill/billDetailList.vue
  5. 28 7
      src/components/bill/config/mainList.json
  6. 140 16
      src/components/boxCost/index.vue
  7. 52 9
      src/components/boxInformation/index.vue
  8. 13 0
      src/router/views/index.js
  9. 12 0
      src/views/basicData/container/archives.vue
  10. 155 35
      src/views/boxManagement/buyContainer/detailsPage.vue
  11. 35 39
      src/views/boxManagement/exportShipment/detailsPage.vue
  12. 36 38
      src/views/boxManagement/importReturnTrip/detailsPage.vue
  13. 102 7
      src/views/boxManagement/leaseIn/detailsPage.vue
  14. 67 5
      src/views/boxManagement/leaseOut/detailsPage.vue
  15. 134 15
      src/views/boxManagement/sellingContainers/detailsPage.vue
  16. 1 1
      src/views/boxManagement/stockpilingManage/detailsPage.vue
  17. 15 0
      src/views/financialManagement/billDetails/configuration/mainList.json
  18. 93 0
      src/views/financialManagement/compareBill/configuration/detailsPage.json
  19. 177 0
      src/views/financialManagement/compareBill/configuration/mainList.json
  20. 285 0
      src/views/financialManagement/compareBill/receiptSettle.vue
  21. 958 0
      src/views/financialManagement/compareBill/receiptSettleDetailsPage.vue
  22. 8 1
      src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue
  23. 8 1
      src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue
  24. 2 2
      src/views/purchase/rubberStock/config/mainList.json
  25. 0 1
      src/views/purchase/rubberStock/index.vue
  26. 10 4
      src/views/statisticAnalysis/profitStatistics/index.vue
  27. 10 8
      src/views/statisticAnalysis/specificationsDelivery/index.vue
  28. 0 1
      vue.config.js

+ 9 - 0
src/api/box/archives.js

@@ -46,3 +46,12 @@ export const addUpdate = (row) => {
   })
 }
 
+//查询智能大数据
+export const intelligenceData = (params) => {
+  return request({
+    url: '/api/blade-box-tube/archives/intelligenceData',
+    method: 'get',
+    params: params
+  })
+}
+

+ 16 - 0
src/api/boxManagement/index.js

@@ -19,3 +19,19 @@ export const selectByName = (cname) => {
         }
     })
 }
+// 生成账单
+export function generateBill(data) {
+    return request({
+        url: '/api/blade-box-tube/tradingBoxRent/generateBill',
+        method: 'post',
+        data: data
+    })
+}
+// 撤销账单
+export function revokeBill(data) {
+    return request({
+        url: '/api/blade-box-tube/tradingBoxRent/revokeBill',
+        method: 'post',
+        data: data
+    })
+}

+ 8 - 0
src/api/boxManagement/leaseIn/index.js

@@ -129,3 +129,11 @@ export function revokeRentingOut(data) {
     data:data
   })
 }
+//查询列表
+export const detList = (params) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxItem/listAll',
+    method: 'get',
+    params: params
+  })
+}

+ 70 - 22
src/components/bill/billDetailList.vue

@@ -13,15 +13,43 @@
                @on-load="onLoad">
       <template slot="costTypeSearch">
         <breakdown-select
-          v-model="search.costType"
-          :configuration="breakConfiguration"
+            v-model="search.costType"
+            :configuration="breakConfiguration"
         ></breakdown-select>
       </template>
+      <template slot="menuLeft">
+        <el-tabs v-model="activeName" @tab-click="tabHandle">
+          <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
+          <el-tab-pane
+              label="已选定数据"
+              name="importStaging"
+          ></el-tab-pane>
+        </el-tabs>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button
+            type="text"
+            icon="el-icon-edit"
+            size="small"
+            @click.stop="importStagList(scope.row, scope.index)"
+            v-if="activeName == 'searchList'"
+            :disabled=" goodsListSave.findIndex(item => item.id == scope.row.id) !== -1 "
+        >选择
+        </el-button>
+        <el-button
+            type="text"
+            icon="el-icon-delete"
+            size="small"
+            @click.stop="removeStagList(scope.row, scope.index)"
+            v-else
+        >移除
+        </el-button>
+      </template>
     </avue-crud>
     <div class="dialogButton">
        <span slot="footer" class="dialog-footer" >
            <el-button @click="$emit('closeFun')">取 消</el-button>
-           <el-button type="primary" @click="importProMent" :disabled="selectList.length == 0">导入</el-button>
+           <el-button type="primary" @click="importProMent" :disabled="goodsListSave.length == 0">导入</el-button>
        </span>
     </div>
   </div>
@@ -52,27 +80,30 @@
     },
     data(){
       return {
-        option:option,
-        loading:false,
-        search:{},
-        data:[],
-        selectList:[],
+        activeName: "searchList",
+        option: option,
+        loading: false,
+        search: {},
+        data: [],
+        selectList: [],
         page: {
           pageSize: 20,
           pagerCount: 1,
           total: 0,
           pageSizes: [20, 200, 300, 500, 700, 1000]
         },
-        breakConfiguration:{
-          multipleChoices:false,
-          multiple:false,
-          disabled:false,
-          searchShow:true,
-          collapseTags:false,
-          clearable:true,
-          placeholder:'请点击右边按钮选择',
-          dicData:[]
+        breakConfiguration: {
+          multipleChoices: false,
+          multiple: false,
+          disabled: false,
+          searchShow: true,
+          collapseTags: false,
+          clearable: true,
+          placeholder: '请点击右边按钮选择',
+          dicData: []
         },
+        goodsListShow: [],
+        goodsListSave: []
       }
     },
     watch:{
@@ -85,12 +116,29 @@
     async created() {
       // this.option = await this.getColumnData(this.getColumnName(45), option);
     },
-    methods:{
-      refreshChange(){
+    methods: {
+      importStagList(row, index) {
+        this.goodsListSave.push(row);
+      },
+      removeStagList(row, index) {
+        this.goodsListSave.splice(row.$index, 1);
+      },
+      // 标签页切换
+      tabHandle(data) {
+        if (data.name == "searchList") {
+          this.goodsListSave = this.data;
+          this.data = this.goodsListShow;
+        } else if (data.name == "importStaging") {
+          this.goodsListShow = this.data;
+          this.data = this.goodsListSave;
+          this.page.total = 0;
+        }
+      },
+      refreshChange() {
         this.onLoad(this.page);
       },
-      searchChange(params,done){
-        if (params.createStart){
+      searchChange(params, done) {
+        if (params.createStart) {
           params.createStartDate = params.createStart[0]
           params.createEndDate = params.createStart[1]
         }
@@ -119,7 +167,7 @@
         })
       },
       importProMent(){
-        this.$emit('importProMent',this.selectList);
+        this.$emit('importProMent',this.goodsListSave);
       },
       //列保存触发
       async saveColumn() {

+ 28 - 7
src/components/bill/config/mainList.json

@@ -8,19 +8,19 @@
   "addRowBtn":false,
   "cellBtn":false,
   "cancelBtn":false,
+  "delBtn":false,
   "refreshBtn": false,
   "searchMenuPosition": "right",
   "searchMenuSpan": 24,
   "searchSpan": 8,
+  "menuWidth": "100",
   "align": "center",
-  "delBtn":true,
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
   "index": true,
-  "selection": true,
-  "menu": false,
-  "menuWidth": 0,
+  "selection": false,
+  "menu": true,
   "searchIcon": true,
   "searchIndex": 2,
   "dialogClickModal": false,
@@ -58,13 +58,34 @@
       "index": 2
     },
     {
+      "label": "箱号",
+      "prop": "srcSysno",
+      "overHidden": true,
+      "search": false,
+      "width": 150,
+      "index": 2.1
+    },{
+      "label": "日期",
+      "prop": "rentStartDate",
+      "type": "date",
+      "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "searchDefaultTime": ["00:00:00", "23:59:59"],
+      "width": 100,
+      "index": 2.2
+    },
+    {
       "label": "客户名称",
       "prop": "corpName",
       "overHidden": true,
       "hide": true,
       "search": false,
       "width": 150,
-      "index": 2
+      "index": 2.6
     },
     {
       "label": "费用名称",
@@ -109,15 +130,15 @@
       "width": 250
     },
     {
-      "prop": "createStart",
       "label": "日期",
+      "prop": "createStart",
       "type": "date",
       "searchRange": true,
       "searchDefaultTime": ["00:00:00", "23:59:59"],
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "overHidden": true,
-      "search": true,
+      "search": false,
       "hide": true,
       "showColumn": false,
       "index": 14,

+ 140 - 16
src/components/boxCost/index.vue

@@ -13,14 +13,15 @@
         @row-save="rowSave"
         ref="crud"
         :key="key"
+        @selection-change="selectionChange"
         @row-update="rowUpdate"
         @resetColumn="resetColumn('crud','option','optionBack',codeValue)"
         @saveColumn="saveColumn('crud','option','optionBack',codeValue)">
       <template slot-scope="{type,size,row,index}" slot="menu">
-        <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0"
+        <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0 || row.submitPay > 0"
                    @click="$refs.crud.rowEdit(row,index)">编辑
         </el-button>
-        <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0"
+        <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0 || row.submitPay > 0"
                    @click="rowDel(row,index)">删除
         </el-button>
       </template>
@@ -32,6 +33,22 @@
             :disabled="!id || listData.length === 0"
             @click="openReport">打印
         </el-button>
+        <el-button
+            class="el-icon-download"
+            type="warning"
+            size="small"
+            v-if="type !== 'BG'"
+            :disabled="(selectionList.length === 0 || !(selectionList.findIndex(item => item.submitPay == '1') == -1))"
+            @click="generateBill">生成账单
+        </el-button>
+        <el-button
+            class="el-icon-download"
+            type="danger"
+            size="small"
+            v-if="type !== 'BG'"
+            :disabled="(selectionList.length === 0 || !(selectionList.findIndex(item => item.submitPay == '0') == -1))"
+            @click="revokeBill">撤销账单
+        </el-button>
       </template>
       <template slot="itemNameForm">
         <breakdown-select v-model="form.itemId" @selectValue="selectValue"
@@ -52,8 +69,11 @@
 
 <script>
 
-import {tradingBoxFees} from "@/api/boxManagement";
+import {tradingBoxFees,generateBill, revokeBill} from "@/api/boxManagement";
 import reportDialog from "@/components/report-dialog/main.vue";
+import {getParities} from "@/api/basicData/customerInquiry";
+import {dateFormat} from "@/util/date";
+
 export default {
   name: "index",
   components: {reportDialog},
@@ -61,7 +81,7 @@ export default {
     return {
       code: '',
       switchDialog: false,
-      reportName:'',
+      reportName: '',
       option: {},
       optionBack: {},
       leaseIn: {
@@ -96,16 +116,30 @@ export default {
           decimals: 2
         }],
         column: [{
+          label: '账单状态',
+          prop: 'submitPay',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          display:false,
+          dataType: 'number',
+          type: "select",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=billing_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
+        }, {
           label: '收款对象',
           prop: 'corpName',
           overHidden: true,
           width: 160
         }, {
           label: '箱号',
-        prop: 'code',
-        width: 140,
-        overHidden: true,
-        filterable: true,
+          prop: 'code',
+          width: 140,
+          overHidden: true,
+          filterable: true,
         type: "select",
         dicUrl: `/api/blade-box-tube/archives/selectArchivesByCodeList?code=${this.code}`,
         props: {
@@ -215,10 +249,11 @@ export default {
           width: 200
         }]
     },
-      boxTube:{
+      boxTube: {
         align: 'center',
         index: true,
-        height:500,
+        selection: true,
+        height: 500,
         addBtnText: "录入明细",
         refreshBtn: false,
         addBtn: true,
@@ -333,6 +368,24 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
+          label: '对账金额',
+          prop: 'reconciliationAmount',
+          type: 'number',
+          precision: 2,
+          disabled: true,
+          controls: false,
+          overHidden: true,
+          width: 140
+        }, {
+          label: '对账时间',
+          prop: 'reconciliationDate',
+          width: 100,
+          disabled: true,
+          overHidden: true,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
           label: '业务类型',
           prop: 'billType',
           display:false,
@@ -350,7 +403,8 @@ export default {
       customsList: {
         align: 'center',
         index: true,
-        height:500,
+        selection: true,
+        height: 500,
         addBtnText: "录入明细",
         refreshBtn: false,
         addBtn: true,
@@ -473,6 +527,7 @@ export default {
       key: 0,
       data_one: [],
       data_two: [],
+      selectionList: [],
       breakConfiguration: {
         multipleChoices: false,
         multiple: false,
@@ -558,7 +613,7 @@ export default {
   async created() {
     if (this.type === 'BG'){
       this.optionBack = this.customsList
-    }else if (this.type === 'ZR' || this.type === 'ZC'){
+    }else if (this.type === 'ZR' || this.type === 'ZC' || this.type === 'DCF'){
       this.optionBack = this.leaseIn
     }else {
       this.optionBack = this.boxTube
@@ -584,7 +639,12 @@ export default {
     this.findObject(this.option.column, "currency").change = ({value, column}) => {
       for (let item of this.$refs.crud.DIC.currency) {
         if (item.dictValue == value) {
-          this.form.exchangeRate = item.remark
+          getParities({
+            currency: value,
+            businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+          }).then(res => {
+            this.form.exchangeRate = res.data.data.receiptsParities
+          })
           if (this.form.price && this.form.quantity) {
             this.form.amount = this.form.price * this.form.quantity * item.remark
           }
@@ -603,6 +663,65 @@ export default {
     this.key++
   },
   methods: {
+    //生成账单
+    generateBill(){
+      this.$confirm("您确定要生成账单吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        const data = {
+          id: this.id,
+          type:this.type,
+          transportItemFeesList:this.selectionList,
+          tradingBoxFeesList:this.selectionList
+        }
+        generateBill(data).then(rest => {
+          loading.close();
+          this.$message.success('生成成功')
+          this.$emit("generateBill")
+        }).catch(() => {
+          loading.close();
+        })
+      })
+    },
+    //撤销账单
+    revokeBill(){
+      this.$confirm("您确定要撤销账单吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        const data = {
+          id: this.id,
+          type:this.type,
+          transportItemFeesList:this.selectionList,
+          tradingBoxFeesList:this.selectionList
+        }
+        revokeBill(data).then(rest => {
+          loading.close();
+          this.$message.success('撤销成功')
+          this.$emit("generateBill")
+        }).catch(() => {
+          loading.close();
+        })
+      })
+    },
+    selectionChange(list) {
+      this.selectionList = list
+    },
     openReport() {
       for (let item of this.listData) {
         if (!item.id) {
@@ -611,8 +730,8 @@ export default {
             cancelButtonText: "取消",
             type: "warning"
           }).then(() => {
-            if (this.type === "CK" || this.type === "JK"){
-              if (this.activeNameTwo === "first"){
+            if (this.type === "CK" || this.type === "JK") {
+              if (this.activeNameTwo === "first") {
                 this.reportName = "收款费用详情(进出口)"
               }else {
                 this.reportName = "付款费用详情(进出口)"
@@ -747,7 +866,12 @@ export default {
         this.findObject(this.option.column, "currency").change = ({value, column}) => {
           for (let item of this.$refs.crud.DIC.currency) {
             if (item.dictValue == value) {
-              this.form.exchangeRate = item.remark
+              getParities({
+                currency: value,
+                businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+              }).then(res => {
+                this.form.exchangeRate = res.data.data.receiptsParities
+              })
               if (this.form.price && this.form.quantity) {
                 this.form.amount = this.form.price * this.form.quantity * item.remark
               }

+ 52 - 9
src/components/boxInformation/index.vue

@@ -47,6 +47,12 @@
       <template slot="leasingCompanyId" slot-scope="{row}">
         {{ row.leasingCompany }}
       </template>
+      <template slot-scope="scope" slot="menuLeft">
+        <el-button type="success"
+                   icon="el-icon-plus"
+                   size="small"
+                   @click="extractData()">智能大数据</el-button>
+      </template>
     </avue-crud>
 <!--    <el-dialog title="导入客户" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"-->
 <!--               v-dialog-drag>-->
@@ -66,7 +72,7 @@
 </template>
 
 <script>
-import {addUpdate, boxRemove, getList, remove} from "@/api/box/archives";
+import {addUpdate, boxRemove, getList, remove,intelligenceData} from "@/api/box/archives";
 import {getToken} from "@/util/auth";
 import {getAllBoxs} from "@/api/basicData/portinformation";
 
@@ -80,6 +86,7 @@ export default {
       form: {},
       excelForm: {},
       dataList: [],
+      bigData:false,
       page: {
         pageSize: 20,
         currentPage: 1,
@@ -333,6 +340,9 @@ export default {
     event: "callBack"
   },
   props: {
+    condition:{
+      type:Object
+    },
     listData: {
       type: Array,
       default: function () {
@@ -363,6 +373,23 @@ export default {
     }
   },
   methods: {
+    //智能大数据
+    extractData(){
+      this.bigData = true
+      this.page.currentPage = 1
+      this.loading = true
+      intelligenceData({
+        billNO:this.condition.billNo,
+        current: this.page.currentPage,
+        size: this.page.pageSize,
+      }).then(res=>{
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
     //导出
     outExport() {
       this.$confirm('是否导出当前所有箱档案?', '提示', {
@@ -474,6 +501,8 @@ export default {
       })
     },
     searchChange(params, done) {
+      this.bigData = false
+      this.page.currentPage = 1
       done();
       this.onLoad(this.page, params)
     },
@@ -485,14 +514,28 @@ export default {
         ...Object.assign(params, this.search),
         status:"待使用",
       }
-      this.loading = true
-      getList(params).then(res => {
-        this.dataList = res.data.data.records
-        this.page.total = res.data.data.total
-        this.loading = false
-      }).finally(() => {
-        this.loading = false
-      })
+      if (!this.bigData){
+        this.loading = true
+        getList(params).then(res => {
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false
+        }).finally(() => {
+          this.loading = false
+        })
+      }else {
+        intelligenceData({
+          billNO:this.condition.billNo,
+          current: page.currentPage,
+          size: page.pageSize,
+        }).then(res=>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false
+        }).finally(() => {
+          this.loading = false
+        })
+      }
     },
 
 //自定义列保存

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

@@ -711,6 +711,19 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/receiptSettle/receiptSettle')
   }]
 },
+{
+  path: '/financialManagement/compareBill/receiptSettle',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/financialManagement/compareBill/receiptSettle',
+    name: '对账管理',
+    meta: {
+      keepAlive: true
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/compareBill/receiptSettle')
+  }]
+},
 // 出口 客户询价
 {
   path: '/exportTrade/customerInquiry/index',

+ 12 - 0
src/views/basicData/container/archives.vue

@@ -179,10 +179,22 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
+          label: '客户名称',
+          prop: 'corpName',
+          overHidden: true
+        }, {
+          label: '收款对象',
+          prop: 'corpNameCollect',
+          overHidden: true
+        }, {
           label: '应收',
           prop: 'collect',
           overHidden: true
         }, {
+          label: '付款对象',
+          prop: 'corpNameCollect',
+          overHidden: true
+        }, {
           label: '应付',
           prop: 'pay',
           overHidden: true

+ 155 - 35
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -46,6 +46,7 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          @selection-change="selectionChange"
           :before-open="beforeOpen"
           :upload-delete="uploadDelete"
           @row-save="rowSave"
@@ -71,7 +72,13 @@
           <el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="importBox">
             导入
           </el-button>
-          <el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">报表打印</el-button>
+          <el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">
+            报表打印
+          </el-button>
+          <el-button style="margin-left: 0" type="success" size="small"
+                     :disabled="selectionList.length === 0"
+                     @click="stockpiling()">堆存
+          </el-button>
         </template>
       </avue-crud>
     </trade-card>
@@ -83,7 +90,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :id="form.id" activeName="second" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
+    <box-cost v-model="dataListTwo" :id="form.id" type="BUY" activeName="second" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
           basic
@@ -130,6 +137,33 @@
       <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
       </check>
     </el-dialog>
+    <el-dialog
+        :title="title"
+        :visible.sync="dialogVisible"
+        :append-to-body="true"
+        :destroy-on-close="true"
+        :close-on-click-modal="false"
+        v-if="dialogVisible"
+        width="60%">
+      <span>
+        <avue-form v-if="title == '堆存'" :option="optionStateTwo" v-model="formState" ref="formState">
+          <template slot="addressId" slot-scope="scope">
+            <port-info v-model="formState.addressId" type="id" :disabled="scope.disabled"
+                       @balabalaTow="(val)=>{balabala(val,['formState','address'])}"/>
+          </template>
+          <template slot="purchaseCompanyId" slot-scope="scope">
+          <crop-select v-model="formState.purchaseCompanyId"
+                       @getCorpData="(row)=>{getGSData(row,['formState','purchaseCompanyName'])}"
+                       :disabled="scope.disabled"
+                       corpType="KH"/>
+        </template>
+        </avue-form>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" :disabled="disabledVisible" @click="confirmChange">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -151,16 +185,57 @@ import {selectByName} from "@/api/boxManagement";
 import {getToken} from "@/util/auth";
 import {itemDetails} from "@/api/boxManagement/leaseIn";
 import check from "@/components/check/check";
+import {getParities} from "@/api/basicData/customerInquiry";
+import {dateFormat} from "@/util/date";
+import {generateStack} from "@/api/boxManagement/exportShipment";
+
 export default {
   name: "detailsPage",
   props: {
     onLoad: Object,
     detailData: Object
   },
-  components:{checkSchedule,reportDialog,check},
+  components: {checkSchedule, reportDialog, check},
   data() {
     return {
+      disabledVisible: false,
+      dialogVisible: false,
+      optionStateTwo: {
+        menuBtn: false,
+        span: 12,
+        column: [{
+          label: '堆存地点',
+          prop: 'addressId',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '付费对象',
+          prop: 'purchaseCompanyId',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '堆存日期',
+          prop: 'rentDate',
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }]
+      },
+      formState: {},
       key: 0,
+      title: '',
       checkData: {},
       checkDialog: false,
       switchDialog: false,
@@ -256,6 +331,7 @@ export default {
         addBtnText: "录入明细",
         refreshBtn: false,
         dialogDrag: true,
+        selection: true,
         addBtn: true,
         span: 8,
         addRowBtn: false,
@@ -263,7 +339,7 @@ export default {
         editBtn: false,
         delBtn: false,
         menuWidth: 140,
-        height:500,
+        height: 500,
         dialogTop: 25,
         dialogWidth: "80%",
         showSummary: true,
@@ -541,10 +617,11 @@ export default {
         }]
       },
       dataList: [],
-      dataListTwo:[],
+      dataListTwo: [],
       tradingBoxFilesList: [],
+      selectionList: [],
       disabled: false,
-      costData:{}
+      costData: {}
     }
   },
   async created() {
@@ -586,6 +663,13 @@ export default {
     openReport() {
       this.switchDialog = !this.switchDialog;
     },
+    //堆存
+    stockpiling() {
+      this.title = "堆存"
+      const date = new Date();
+      this.formState.rentDate = dateFormat(date, "yyyy-MM-dd") + " 00:00:00"
+      this.dialogVisible = true
+    },
     // 报表关闭
     onClose(val) {
       this.switchDialog = val;
@@ -907,13 +991,11 @@ export default {
         return loading();
       }
       done(form)
-
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         this.dataListTwo.push({
           corpId: this.form.purchaseCompanyId,
           corpName: this.form.purchaseCompanyName,
@@ -924,21 +1006,20 @@ export default {
           price: form.amount,
           quantity: 1,
           autoGenerate: 1,
-          exchangeRate:form.exchangeRate || 1,
-          feesType:2,
+          exchangeRate: form.exchangeRate || 1,
+          feesType: 2,
           amount: form.amount,
         })
-      });
+      })
     },
     rowUpdate(form, index, done, loading) {
       form.boxType = form.$boxTypeId
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         if (this.dataListTwo.length > 0) {
           for (let item in this.dataListTwo) {
             if (this.dataListTwo[item].code == form.code) {
@@ -950,7 +1031,7 @@ export default {
                   code: form.code,
                   currency: form.currency,
                   price: form.amount,
-                  exchangeRate:form.exchangeRate || 1,
+                  exchangeRate: form.exchangeRate || 1,
                   amount: form.amount
                 })
                 this.key++
@@ -958,17 +1039,20 @@ export default {
             }
           }
         }
-      });
+      })
+    },
+    selectionChange(list) {
+      this.selectionList = list
     },
     //打开表单前
-    beforeOpen(done,type){
-      if (type === "add"){
-        this.formTwo.boxSource = this.$refs.crud.DIC.boxSource.length === 0?"":this.$refs.crud.DIC.boxSource[0].dictKey
-        this.formTwo.status = this.$refs.crud.DIC.status.length === 0?"":this.$refs.crud.DIC.status[0].dictKey
+    beforeOpen(done, type) {
+      if (type === "add") {
+        this.formTwo.boxSource = this.$refs.crud.DIC.boxSource.length === 0 ? "" : this.$refs.crud.DIC.boxSource[0].dictKey
+        this.formTwo.status = this.$refs.crud.DIC.status.length === 0 ? "" : this.$refs.crud.DIC.status[0].dictKey
       }
-      if(['view','edit'].includes(type)){
-        itemDetails({id:this.formTwo.id,type: "BUY"}).then(res=>{
-          if (this.formTwo.tradingBoxFilesList.length === 0){
+      if (['view', 'edit'].includes(type)) {
+        itemDetails({id: this.formTwo.id, type: "BUY"}).then(res => {
+          if (this.formTwo.tradingBoxFilesList.length === 0) {
             this.formTwo.tradingBoxFilesList = res.data.data.tradingBoxFilesList
           }
         })
@@ -995,7 +1079,7 @@ export default {
           } else {
             resolve();
           }
-        }).catch(()=>{
+        }).catch(() => {
           reject();
           this.$message({
             type: "info",
@@ -1004,12 +1088,48 @@ export default {
         })
       })
     },
-    getGSData(row,type) {
+    confirmChange() {
+      if (this.title == "堆存") {
+        this.$refs["formState"].validate((valid, done) => {
+          done()
+          if (valid) {
+            let data = {
+              ...this.form,
+              type: "DCF",
+              source: "BUY",
+              ...this.formState,
+              // tradingBoxItemsList: this.dataList,
+              tradingBoxItemsList: this.selectionList,
+            }
+            // data.tradingBoxItemsList.forEach(item=> delete item.id)
+            delete data.id
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
+            generateStack(data).then(res => {
+              this.$message.success("生成堆存成功")
+              this.dialogVisible = false
+              this.disabledVisible = false
+              this.formState = {}
+              this.selectionList = []
+              loading.close();
+              this.refresh(this.form.id)
+            }).catch(() => {
+              loading.close();
+            })
+          }
+        })
+      }
+    },
+    getGSData(row, type) {
       this[type[0]][type[1]] = row.cname
     },
     backToList(type) {
-      if (type == 0){
-        if (this.detailData.id){
+      if (type == 0) {
+        if (this.detailData.id) {
           this.$router.push({
             path: '/boxManagement/buyContainer/index'
           });

+ 35 - 39
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -174,9 +174,9 @@
         :destroy-on-close="true"
         :close-on-click-modal="false"
         top="1vh"
-        width="70%">
+        width="80%">
       <span>
-        <box-information v-model="importList"></box-information>
+        <box-information v-model="importList" :condition="form"></box-information>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="importOpen = false">取 消</el-button>
@@ -275,6 +275,7 @@ import {getToken} from "@/util/auth";
 import reportDialog from "@/components/report-dialog/main.vue";
 
 import check from "@/components/check/check";
+import {getParities} from "@/api/basicData/customerInquiry";
 export default {
   name: "detailsPage",
   props: {
@@ -937,10 +938,6 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       });
-      let list = []
-      this.getWorkDicts("currency").then(res => {
-        list = res.data.data
-      });
       for (let item in this.importList) {
         for (let li in this.dataList) {
           if (this.importList[item].code === this.dataList[li].code) {
@@ -960,26 +957,27 @@ export default {
           boxTypeId: item.typeId,
           currency: "CNY"
         })
-        for (let li of list) {
-          if (li.dictValue == item.currency) {
-            item.exchangeRate = li.remark
-          }
-        }
-        this.dataListTwo.push({
-          corpId: this.form.corpId,
-          corpName: this.form.corpName,
-          code: item.code,
-          itemId: this.costData.id,
-          itemName: this.costData.cname,
+        getParities({
           currency: "CNY",
-          price: item.amount,
-          quantity: 1,
-          autoGenerate: 1,
-          feesType: 1,
-          exchangeRate: item.exchangeRate || 1,
-          amount: item.amount
+          businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+        }).then(res => {
+          item.exchangeRate = res.data.data.receiptsParities
+          this.dataListTwo.push({
+            corpId: this.form.corpId,
+            corpName: this.form.corpName,
+            code: item.code,
+            itemId: this.costData.id,
+            itemName: this.costData.cname,
+            currency: "CNY",
+            price: item.amount,
+            quantity: 1,
+            autoGenerate: 1,
+            feesType: 1,
+            exchangeRate: item.exchangeRate || 1,
+            amount: item.amount
+          })
+          loading.close();
         })
-        loading.close();
       }
       this.key++
     },
@@ -1390,12 +1388,11 @@ export default {
         return loading();
       }
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         this.dataListTwo.push({
           corpId: this.form.corpId,
           corpName: this.form.corpName,
@@ -1406,11 +1403,11 @@ export default {
           price: form.amount,
           quantity: 1,
           autoGenerate: 1,
-          feesType: 1,
+          feesType: 2,
           exchangeRate:form.exchangeRate || 1,
           amount: form.amount,
         })
-      });
+      })
     },
     rowUpdateTrack(form, index, done, loading) {
       update(form).then(res => {
@@ -1426,12 +1423,11 @@ export default {
       }
       form.boxType = form.$boxTypeId
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data) {
-          if (item.dictValue == form.currency) {
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         if (this.dataListTwo.length > 0) {
           for (let item in this.dataListTwo) {
             if (this.dataListTwo[item].code == form.code) {
@@ -1452,7 +1448,7 @@ export default {
             }
           }
         }
-      });
+      })
     },
     getGSData(row, type) {
       this[type[0]][type[1]] = row.cname

+ 36 - 38
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -173,9 +173,9 @@
         :destroy-on-close="true"
         :close-on-click-modal="false"
         top="1vh"
-        width="70%">
+        width="80%">
       <span>
-        <box-information v-model="importList"></box-information>
+        <box-information v-model="importList" :condition="form"></box-information>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="importOpen = false">取 消</el-button>
@@ -272,6 +272,7 @@ import {dateFormat} from "@/util/date";
 import {getToken} from "@/util/auth";
 import reportDialog from "@/components/report-dialog/main.vue";
 import check from "@/components/check/check.vue";
+import {getParities} from "@/api/basicData/customerInquiry";
 
 export default {
   name: "detailsPage",
@@ -942,10 +943,6 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       });
-      let list = []
-      this.getWorkDicts("currency").then(res => {
-        list = res.data.data
-      });
       for (let item in this.importList) {
         for (let li in this.dataList) {
           if (this.importList[item].code === this.dataList[li].code) {
@@ -965,26 +962,29 @@ export default {
           boxTypeId: item.typeId,
           currency: "CNY"
         })
-        for (let li of list) {
-          if (li.dictValue == item.currency) {
-            item.exchangeRate = li.remark
-          }
-        }
-        this.dataListTwo.push({
-          corpId: this.form.corpId,
-          corpName: this.form.corpName,
-          code: item.code,
-          itemId: this.costData.id,
-          itemName: this.costData.cname,
+        getParities({
           currency: "CNY",
-          price: item.amount,
-          quantity: 1,
-          autoGenerate: 1,
-          feesType: 2,
-          exchangeRate: item.exchangeRate || 1,
-          amount: item.amount
+          businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+        }).then(res => {
+          item.exchangeRate = res.data.data.receiptsParities
+          this.dataListTwo.push({
+            corpId: this.form.corpId,
+            corpName: this.form.corpName,
+            code: item.code,
+            itemId: this.costData.id,
+            itemName: this.costData.cname,
+            currency: "CNY",
+            price: item.amount,
+            quantity: 1,
+            autoGenerate: 1,
+            feesType: 2,
+            exchangeRate: item.exchangeRate || 1,
+            amount: item.amount
+          })
+          loading.close();
+        }).catch(()=>{
+          loading.close();
         })
-        loading.close();
       }
       this.key++
     },
@@ -1395,12 +1395,11 @@ export default {
         return loading();
       }
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         this.dataListTwo.push({
           corpId: this.form.corpId,
           corpName: this.form.corpName,
@@ -1415,7 +1414,7 @@ export default {
           exchangeRate:form.exchangeRate || 1,
           amount: form.amount,
         })
-      });
+      })
     },
     rowUpdateTrack(form, index, done, loading) {
       update(form).then(res => {
@@ -1431,12 +1430,11 @@ export default {
       }
       form.boxType = form.$boxTypeId
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data) {
-          if (item.dictValue == form.currency) {
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         if (this.dataListTwo.length > 0) {
           for (let item in this.dataListTwo) {
             if (this.dataListTwo[item].code == form.code) {
@@ -1457,7 +1455,7 @@ export default {
             }
           }
         }
-      });
+      })
     },
     getGSData(row, type) {
       this[type[0]][type[1]] = row.cname

+ 102 - 7
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -44,6 +44,10 @@
           :option="option"
           :data="dataList"
           v-model="formTwo"
+          :table-loading="loading"
+          :search.sync="search"
+          @search-change="searchChange"
+          @search-reset="resetChange"
           ref="crud"
           :key="key"
           :before-open="beforeOpen"
@@ -209,7 +213,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut
+  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut, detList, getList
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -233,6 +237,7 @@ export default {
       checkData: {},
       checkDialog: false,
       switchDialog:false,
+      loading:false,
       excelOption: {
         submitBtn: false,
         emptyBtn: false,
@@ -391,6 +396,7 @@ export default {
       },
       form: {},
       formTwo: {},
+      search: {},
       optionForm: {
         menuBtn: false,
         span: 6,
@@ -470,6 +476,10 @@ export default {
         cellBtn: false,
         editBtn: false,
         delBtn: false,
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
         menuWidth: 140,
         dialogTop: 25,
         dialogWidth: "80%",
@@ -500,6 +510,7 @@ export default {
           prop: 'code',
           width: 100,
           overHidden: true,
+          search: true,
           // filterable: true,
           // remote: true,
           // allowCreate: true,
@@ -532,7 +543,7 @@ export default {
             trigger: "blur"
           }]
         }, {
-          label: '租金/天',
+          label: '超期租金/天',
           prop: 'price',
           type: 'number',
           controls: false,
@@ -544,9 +555,45 @@ export default {
             trigger: "blur"
           }]
         }, {
+          label: '超期金额',
+          prop: 'overdueAmount',
+          type: 'number',
+          controls: false,
+          overHidden: true,
+          disabled: true,
+          width: 100
+        }, {
+          label: '天数',
+          prop: 'overdueDays',
+          type: 'number',
+          controls: false,
+          overHidden: true,
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '租金金额',
+          prop: 'amount',
+          type: 'number',
+          controls: false,
+          overHidden: true,
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
           label: '起租日期',
           prop: 'leaseCommencementDate',
+          searchProp: 'leaseCommencementDateList',
           overHidden: true,
+          search: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
@@ -554,7 +601,11 @@ export default {
         }, {
           label: '退租日期',
           prop: 'rentingOutDate',
+          searchProp: 'rentingOutDateList',
           overHidden: true,
+          search: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
           type: "date",
           display: false,
           format: "yyyy-MM-dd",
@@ -563,8 +614,13 @@ export default {
         }, {
           label: '当前租金期间',
           prop: 'rentEndDate',
+          searchProp: 'rentEndDateList',
           overHidden: true,
+          search: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
           display: false,
+          searchLabelWidth:100,
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
@@ -573,6 +629,7 @@ export default {
           label: '箱类型',
           prop: 'boxTypeId',
           width: 100,
+          search: true,
           overHidden: true,
           filterable: true,
           type: 'select',
@@ -691,6 +748,7 @@ export default {
           overHidden: true,
           filterable: true,
           disabled: true,
+          search: true,
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_archives_status",
           props: {
@@ -856,7 +914,7 @@ export default {
           this.optionState = this.optionStateFour
           for (let item of this.selectionList) {
             if (!Number(item.price) || Number(item.price) < 0){
-              return this.$message.error('租金/天,不能不能为0或不能为负')
+              return this.$message.error('超期租金/天,不能不能为0或不能为负')
             }
             for (let li of this.selectionList) {
               if (item.rentEndDate !== li.rentEndDate) {
@@ -1023,7 +1081,7 @@ export default {
         //基础资料
         this.$set(this.optionForm, "disabled", true)
         //箱信息
-        this.$set(this.option, "disabled", true)
+        // this.$set(this.option, "disabled", true)
         this.$set(this.option, "addBtn", false)
         this.$set(this.option, "menu", false)
         //费用信息
@@ -1187,6 +1245,42 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+    resetChange(item){
+      this.queryDetails()
+    },
+    searchChange(params, done) {
+      for (let item of this.dataList){
+        if (!item.id){
+          this.$confirm('有未保存明细继续搜索会清空未保存数据?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            done();
+            return this.queryDetails(params)
+          })
+        }
+      }
+      done();
+      this.queryDetails(params)
+    },
+    queryDetails(params = {}) {
+      params = {
+        ...params,
+        type: "ZR",
+        ...Object.assign(params, this.search)
+      }
+      this.loading = true
+      detList({
+        ...params,
+        pid:this.onLoad.id
+      }).then(res=>{
+        this.dataList = res.data.data
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
     refresh(id,type) {
       const loading = this.$loading({
         lock: true,
@@ -1194,6 +1288,7 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       });
+      this.queryDetails()
       detail({id: id}).then(res => {
         this.form = res.data.data
         this.dataList = res.data.data.tradingBoxItemsList
@@ -1208,7 +1303,7 @@ export default {
           //基础资料
           this.$set(this.optionForm, "disabled", true)
           //箱信息
-          this.$set(this.option, "disabled", true)
+          // this.$set(this.option, "disabled", true)
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
           //费用信息
@@ -1222,7 +1317,7 @@ export default {
             //基础资料
             this.$set(this.optionForm, "disabled", true)
             //箱信息
-            this.$set(this.option, "disabled", true)
+            // this.$set(this.option, "disabled", true)
             this.$set(this.option, "addBtn", false)
             this.$set(this.option, "menu", false)
             //费用信息
@@ -1385,7 +1480,7 @@ export default {
           //基础资料
           this.$set(this.optionForm, "disabled", true)
           //箱信息
-          this.$set(this.option, "disabled", true)
+          // this.$set(this.option, "disabled", true)
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
           //费用信息

+ 67 - 5
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -44,6 +44,10 @@
           :option="option"
           :data="dataList"
           v-model="formTwo"
+          :table-loading="loading"
+          :search.sync="search"
+          @search-change="searchChange"
+          @search-reset="resetChange"
           ref="crud"
           :key="key"
           :before-open="beforeOpen"
@@ -205,7 +209,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut
+  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut, detList
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -384,6 +388,8 @@ export default {
       },
       form: {},
       formTwo: {},
+      loading:false,
+      search:{},
       optionForm: {
         menuBtn: false,
         span: 6,
@@ -458,6 +464,10 @@ export default {
         dialogDrag: true,
         addBtn: true,
         span: 8,
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
         selection: true,
         addRowBtn: false,
         cellBtn: false,
@@ -497,6 +507,7 @@ export default {
           filterable: true,
           remote: true,
           allowCreate: true,
+          search: true,
           type: "select",
           dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
           props: {
@@ -540,7 +551,11 @@ export default {
         }, {
           label: '起租日期',
           prop: 'leaseCommencementDate',
+          searchProp: 'leaseCommencementDateList',
           overHidden: true,
+          search: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
@@ -548,7 +563,11 @@ export default {
         }, {
           label: '退租日期',
           prop: 'rentingOutDate',
+          searchProp: 'rentingOutDateList',
           overHidden: true,
+          search: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
           type: "date",
           display: false,
           format: "yyyy-MM-dd",
@@ -557,7 +576,12 @@ export default {
         }, {
           label: '当前租金期间',
           prop: 'rentEndDate',
+          searchProp: 'rentEndDateList',
           overHidden: true,
+          search: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          searchLabelWidth:100,
           display: false,
           type: "date",
           format: "yyyy-MM-dd",
@@ -567,6 +591,7 @@ export default {
           label: '箱类型',
           prop: 'boxTypeId',
           width: 100,
+          search: true,
           overHidden: true,
           filterable: true,
           type: 'select',
@@ -622,6 +647,7 @@ export default {
           width: 100,
           overHidden: true,
           filterable: true,
+          search: true,
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_status",
           props: {
@@ -1028,7 +1054,7 @@ export default {
         //基础资料
         this.$set(this.optionForm, "disabled", true)
         //箱信息
-        this.$set(this.option, "disabled", true)
+        // this.$set(this.option, "disabled", true)
         this.$set(this.option, "addBtn", false)
         this.$set(this.option, "menu", false)
         //费用信息
@@ -1195,6 +1221,42 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+    resetChange(item){
+      this.queryDetails()
+    },
+    searchChange(params, done) {
+      for (let item of this.dataList){
+        if (!item.id){
+          this.$confirm('有未保存明细继续搜索会清空未保存数据?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            done();
+            return this.queryDetails(params)
+          })
+        }
+      }
+      done();
+      this.queryDetails(params)
+    },
+    queryDetails(params = {}) {
+      params = {
+        ...params,
+        type: "ZC",
+        ...Object.assign(params, this.search)
+      }
+      this.loading = true
+      detList({
+        ...params,
+        pid:this.onLoad.id
+      }).then(res=>{
+        this.dataList = res.data.data
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
     refresh(id,type) {
       const loading = this.$loading({
         lock: true,
@@ -1216,7 +1278,7 @@ export default {
           //基础资料
           this.$set(this.optionForm, "disabled", true)
           //箱信息
-          this.$set(this.option, "disabled", true)
+          // this.$set(this.option, "disabled", true)
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
           //费用信息
@@ -1230,7 +1292,7 @@ export default {
             //基础资料
             this.$set(this.optionForm, "disabled", true)
             //箱信息
-            this.$set(this.option, "disabled", true)
+            // this.$set(this.option, "disabled", true)
             this.$set(this.option, "addBtn", false)
             this.$set(this.option, "menu", false)
             //费用信息
@@ -1390,7 +1452,7 @@ export default {
           //基础资料
           this.$set(this.optionForm, "disabled", true)
           //箱信息
-          this.$set(this.option, "disabled", true)
+          // this.$set(this.option, "disabled", true)
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
           //费用信息

+ 134 - 15
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -48,6 +48,7 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          @selection-change="selectionChange"
           :before-open="beforeOpen"
           :upload-delete="uploadDelete"
           @row-save="rowSave"
@@ -74,6 +75,10 @@
             导入
           </el-button>
           <el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">报表打印</el-button>
+          <el-button style="margin-left: 0" type="success" size="small"
+                     :disabled="selectionList.length === 0"
+                     @click="stockpiling()">堆存
+          </el-button>
         </template>
       </avue-crud>
     </trade-card>
@@ -85,7 +90,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :id="form.id" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
+    <box-cost v-model="dataListTwo" :id="form.id" type="SELL" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
           basic
@@ -132,6 +137,33 @@
       <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
       </check>
     </el-dialog>
+    <el-dialog
+        :title="title"
+        :visible.sync="dialogVisible"
+        :append-to-body="true"
+        :destroy-on-close="true"
+        :close-on-click-modal="false"
+        v-if="dialogVisible"
+        width="60%">
+      <span>
+        <avue-form v-if="title == '堆存'" :option="optionStateTwo" v-model="formState" ref="formState">
+          <template slot="addressId" slot-scope="scope">
+            <port-info v-model="formState.addressId" type="id" :disabled="scope.disabled"
+                       @balabalaTow="(val)=>{balabala(val,['formState','address'])}"/>
+          </template>
+          <template slot="purchaseCompanyId" slot-scope="scope">
+          <crop-select v-model="formState.purchaseCompanyId"
+                       @getCorpData="(row)=>{getGSData(row,['formState','purchaseCompanyName'])}"
+                       :disabled="scope.disabled"
+                       corpType="KH"/>
+        </template>
+        </avue-form>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" :disabled="disabledVisible" @click="confirmChange">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -153,6 +185,9 @@ import reportDialog from "@/components/report-dialog/main.vue";
 import {getToken} from "@/util/auth";
 import {itemDetails} from "@/api/boxManagement/leaseIn";
 import check from "@/components/check/check";
+import {getParities} from "@/api/basicData/customerInquiry";
+import {dateFormat} from "@/util/date";
+import {generateStack} from "@/api/boxManagement/exportShipment";
 export default {
   name: "detailsPage",
   props: {
@@ -162,6 +197,43 @@ export default {
   components:{checkSchedule,reportDialog,check},
   data() {
     return {
+      title: '',
+      disabledVisible: false,
+      dialogVisible: false,
+      optionStateTwo: {
+        menuBtn: false,
+        span: 12,
+        column: [{
+          label: '堆存地点',
+          prop: 'addressId',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '付费对象',
+          prop: 'purchaseCompanyId',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '堆存日期',
+          prop: 'rentDate',
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }]
+      },
+      formState: {},
       checkData: {},
       checkDialog: false,
       switchDialog: false,
@@ -261,6 +333,7 @@ export default {
         addBtnText: "录入明细",
         refreshBtn: false,
         dialogDrag: true,
+        selection: true,
         addBtn: true,
         span: 8,
         addRowBtn: false,
@@ -547,6 +620,7 @@ export default {
       dataList: [],
       dataListTwo:[],
       tradingBoxFilesList: [],
+      selectionList: [],
       disabled: false,
       costData:{}
     }
@@ -599,6 +673,13 @@ export default {
     openReport() {
       this.switchDialog = !this.switchDialog;
     },
+    //堆存
+    stockpiling() {
+      this.title = "堆存"
+      const date = new Date();
+      this.formState.rentDate = dateFormat(date, "yyyy-MM-dd") + " 00:00:00"
+      this.dialogVisible = true
+    },
     // 报表关闭
     onClose(val) {
       this.switchDialog = val;
@@ -897,6 +978,9 @@ export default {
         }
       });
     },
+    selectionChange(list) {
+      this.selectionList = list
+    },
     //打开表单前
     beforeOpen(done,type){
       if (type === "add"){
@@ -924,12 +1008,11 @@ export default {
         return loading();
       }
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         this.dataListTwo.push({
           corpId: this.form.purchaseCompanyId,
           corpName: this.form.purchaseCompanyName,
@@ -944,17 +1027,16 @@ export default {
           exchangeRate:form.exchangeRate || 1,
           amount: form.amount,
         })
-      });
+      })
     },
     rowUpdate(form, index, done, loading) {
       form.boxType = form.$boxTypeId
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
-            form.exchangeRate = item.remark
-          }
-        }
+      getParities({
+        currency: form.currency,
+        businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }).then(res => {
+        form.exchangeRate = res.data.data.receiptsParities
         if (this.dataListTwo.length > 0) {
           for (let item in this.dataListTwo) {
             if (this.dataListTwo[item].code == form.code) {
@@ -974,7 +1056,7 @@ export default {
             }
           }
         }
-      });
+      })
     },
     //删除图片
     uploadDelete(file, column) {
@@ -1007,6 +1089,43 @@ export default {
     getGSData(row,type) {
       this[type[0]][type[1]] = row.cname
     },
+    confirmChange() {
+      if (this.title == "堆存") {
+        this.$refs["formState"].validate((valid, done) => {
+          done()
+          if (valid) {
+            let data = {
+              ...this.form,
+              type: "DCF",
+              source: "SELL",
+              ...this.formState,
+              // tradingBoxItemsList: this.dataList,
+              tradingBoxItemsList: this.selectionList,
+            }
+            console.log(this.formState)
+            // data.tradingBoxItemsList.forEach(item=> delete item.id)
+            delete data.id
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
+            generateStack(data).then(res => {
+              this.$message.success("生成堆存成功")
+              this.dialogVisible = false
+              this.disabledVisible = false
+              this.formState = {}
+              this.selectionList = []
+              loading.close();
+              this.refresh(this.form.id)
+            }).catch(() => {
+              loading.close();
+            })
+          }
+        })
+      }
+    },
     backToList(type) {
       if (type == 0){
         if (this.detailData.id){

+ 1 - 1
src/views/boxManagement/stockpilingManage/detailsPage.vue

@@ -102,7 +102,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :id="form.id" type="ZC" activeName="second" :tabShow="3" :codeValue="252.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" type="DCF" activeName="second" :tabShow="3" :codeValue="252.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload

+ 15 - 0
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -45,6 +45,14 @@
       "index": 2
     },
     {
+      "label": "系统号",
+      "prop": "srcRefno",
+      "search": true,
+      "overHidden": true,
+      "width": 120,
+      "index": 2.9
+    },
+    {
       "label": "提单号",
       "prop": "srcBillNo",
       "search": true,
@@ -142,6 +150,13 @@
       "index": 11
     },
     {
+      "label": "对账金额",
+      "prop": "checkAmount",
+      "width": 120,
+      "overHidden": true,
+      "index": 11.1
+    },
+    {
       "label": "开票金额",
       "prop": "invoiceAmount",
       "width": 120,

+ 93 - 0
src/views/financialManagement/compareBill/configuration/detailsPage.json

@@ -0,0 +1,93 @@
+{
+  "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": "checkAmount",
+      "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
+    }
+  ]
+}

+ 177 - 0
src/views/financialManagement/compareBill/configuration/mainList.json

@@ -0,0 +1,177 @@
+{
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 24,
+  "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,
+      "search": 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": "completionTime",
+      "overHidden": true,
+      "type": "date",
+      "search": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "width": 150,
+      "index": 7
+    },{
+      "label": "银行名称",
+      "prop": "accountBank",
+      "overHidden": true,
+      "width": 150,
+      "index": 8
+    },
+    {
+      "label": "银行户头",
+      "prop": "accountName",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 9
+    },
+    {
+      "label": "银行卡号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 10
+    },
+    {
+      "label": "创建人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 11,
+      "width":100
+    },
+    {
+      "label": "创建日期",
+      "prop": "createTime",
+      "type": "date",
+      "format": "yyyy-MM-dd HH:mm:ss",
+      "overHidden": true,
+      "index": 12,
+      "width":160
+    },
+    {
+      "label": "修改人",
+      "prop": "updateUserName",
+      "overHidden": true,
+      "index": 13,
+      "width":100
+    },
+    {
+      "label": "修改日期",
+      "prop": "updateTime",
+      "type": "date",
+      "format": "yyyy-MM-dd HH:mm:ss",
+      "overHidden": true,
+      "index": 14,
+      "width":160
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "search": true,
+      "overHidden": true,
+      "index": 15,
+      "width": 120
+    }
+  ]
+}

+ 285 - 0
src/views/financialManagement/compareBill/receiptSettle.vue

@@ -0,0 +1,285 @@
+<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 type="warning" size="small" icon="el-icon-top" @click.stop="openExport()">导出</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";
+  import {getToken} from "@/util/auth";
+
+  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);
+      let i = 0;
+      this.option.column.forEach(item => {
+        if (item.search) i++
+      })
+      if (i % 3 !== 0) {
+        const num = 3 - Number(i % 3)
+        this.option.searchMenuSpan = num * 8;
+        this.option.searchMenuPosition = "right";
+      }
+    },
+    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')
+        }
+
+        if (params.completionTime &&  params.completionTime.length !==0 ) {
+          params.completionTimeStart = params.completionTime[0]+ " " + "00:00:00";
+          params.completionTimeEnd = params.completionTime[1] + " " + "23:59:59";
+          this.$delete(params,'completionTime')
+        }
+        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;
+        }
+      },
+      openExport() {
+        let params = JSON.parse(JSON.stringify(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')
+        }
+        if (params.completionTime &&  params.completionTime.length !==0 ) {
+          params.completionTimeStart = params.completionTime[0]+ " " + "00:00:00";
+          params.completionTimeEnd = params.completionTime[1] + " " + "23:59:59";
+          this.$delete(params,'completionTime')
+        }
+        params.billType = "对账"
+        params.settlementType = 1
+        const routeData = this.$router.resolve({
+          path: '/api/trade-finance/settlement/expenseExport',      //跳转目标窗口的地址
+          query: {
+            ...params    //括号内是要传递给新窗口的参数
+          }
+        })
+        window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 958 - 0
src/views/financialManagement/compareBill/receiptSettleDetailsPage.vue

@@ -0,0 +1,958 @@
+<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"
+                     v-if="form.id"
+                     @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="type">
+            <el-select v-model="form.type" placeholder="请选择" :disabled="!financeDisabled || editDisable || dataList.length > 0">
+              <el-option label="收费" value="收费"></el-option>
+              <el-option label="付费" value="付费"></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
+                :disabled="!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="80%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :params="params"
+          :billType="form.type"
+          :flag="1"
+          v-if="billDetailDialog"
+          @closeFun="closeBillDetail"
+          @importProMent="importProMent"
+        ></bill-detail>
+      </el-dialog>
+    </div>
+    <messagePost
+      v-if="messageVisble"
+      ref="messagePost"
+      @closeDialog="closeDialog"
+    ></messagePost>
+    <report-dialog
+        :switchDialog="switchDialog"
+        :reportId="form.id"
+        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: 'type',
+              span: 8,
+              rules: [
+                {
+                  required: true,
+                  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
+        }
+        if(!this.form.type){
+          this.$message.warning("请先选择业务类型!")
+          return
+        }
+        this.params = {
+          corpId: this.form.corpId
+        }
+        this.billDetailDialog = true;
+      },
+      closeBillDetail(){
+        this.billDetailDialog = false;
+      },
+      importProMent(list){
+        for (let item of this.dataList){
+          for (let li of list){
+            if (item.srcSysno == li.srcSysno && item.srcRefno == li.srcRefno && new Date(item.rentEndDate) == new Date(li.rentEndDate)){
+              return this.$message.error(`合同号${item.accSysNo}已存在`)
+            }
+          }
+        }
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          item.srcOrderno  = item.accSysNo
+          item.billNo  = item.srcBillNo
+          item.thisAmount = (Number(item.amount) - Number(item.checkAmount))
+          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)
+        if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+      },
+      rowDel(row,index){
+        if (row.id) {
+          deleteDetail({ids: row.id}).then(res => {
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.dataList.splice(index, 1);
+            this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ return item.srcOrderno}))).join(','))
+          })
+        } else {
+          this.dataList.splice(index, 1);
+          this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ return item.srcOrderno}))).join(','))
+        }
+      },
+      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();
+          console.log(valid)
+          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>

+ 8 - 1
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -88,7 +88,7 @@
           </template>
         </avue-crud>
       </basic-container>
-      <el-dialog title="导入采购" append-to-body class="el-dialogDeep" :visible.sync="billDetailDialog" width="60%"
+      <el-dialog title="导入采购" append-to-body class="el-dialogDeep" :visible.sync="billDetailDialog" width="80%"
         :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">
@@ -492,6 +492,13 @@ export default {
       this.billDetailDialog = false;
     },
     importProMent(list) {
+      for (let item of this.dataList){
+        for (let li of list){
+          if (item.srcSysno == li.srcSysno && item.srcRefno == li.srcRefno && new Date(item.rentEndDate) == new Date(li.rentEndDate)){
+            return this.$message.error(`合同号${item.accSysNo}已存在`)
+          }
+        }
+      }
       list.forEach((item, index) => {
         item.accId = item.id;
         item.srcOrderno = item.accSysNo

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

@@ -175,7 +175,7 @@
         append-to-body
         class="el-dialogDeep"
         :visible.sync="billDetailDialog"
-        width="60%"
+        width="80%"
         :close-on-click-modal="false"
         :destroy-on-close="true"
         :close-on-press-escape="false"
@@ -572,6 +572,13 @@
         this.billDetailDialog = false;
       },
       importProMent(list){
+        for (let item of this.dataList){
+          for (let li of list){
+            if (item.srcSysno == li.srcSysno && item.srcRefno == li.srcRefno && new Date(item.rentEndDate) == new Date(li.rentEndDate)){
+              return this.$message.error(`合同号${item.accSysNo}已存在`)
+            }
+          }
+        }
         list.forEach((item,index) =>{
           item.accId = item.id;
           item.srcOrderno  = item.accSysNo

+ 2 - 2
src/views/purchase/rubberStock/config/mainList.json

@@ -6,10 +6,10 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "height": "100%",
+  "height": "auto",
   "searchMenuPosition": "right",
   "searchSpan": 8,
-  "searchMenuSpan":16,
+  "searchMenuSpan":8,
   "tree": true,
   "selection": false,
   "addBtn": false,

+ 0 - 1
src/views/purchase/rubberStock/index.vue

@@ -219,7 +219,6 @@ export default {
       this.onLoad(this.page,this.search);
     },
     onLoad(page, params = {}) {
-      console.log(params,this.search)
       if (this.search.requiredArrivalDateC && this.search.requiredArrivalDateC.length > 0) {
         params = {
           ...params,

+ 10 - 4
src/views/statisticAnalysis/profitStatistics/index.vue

@@ -13,6 +13,9 @@
         <template slot="corpNameSearch" slot-scope="scope">
           <crop-select v-model="search.corpId" corpType="KC"/>
         </template>
+        <template slot="date" slot-scope="scope">
+          <span>{{scope.row.date}}</span>
+        </template>
       </avue-crud>
     </basic-container>
   </div>
@@ -38,7 +41,7 @@ export default {
       },
       form: {},
       search: {
-        date:`${new Date().getFullYear()}-${(new Date().getMonth()+1)}-1 00:00:00`,
+        dateList:[`${new Date().getFullYear()}-${(new Date().getMonth()+1)}-1 00:00:00`,`${new Date().getFullYear()}-${(new Date().getMonth()+2)}-1 23:59:59`],
         whetherStatistics:0,
         show:0
       },
@@ -115,15 +118,18 @@ export default {
         }, {
           label: "日期",
           prop: "date",
+          searchProp:"dateList",
           width: 100,
           search: true,
           // showColumn: false,
           // hide: true,
-          searchValue:`${new Date().getFullYear()}-${(new Date().getMonth()+1)}-1 00:00:00`,
+          searchValue:[`${new Date().getFullYear()}-${(new Date().getMonth()+1)}-1 00:00:00`,`${new Date().getFullYear()}-${(new Date().getMonth()+2)}-1 23:59:59`],
           overHidden: true,
-          type: "month",
+          type: "monthrange",
           format: "yyyy-MM",
-          valueFormat: "yyyy-MM-dd HH:mm:ss"
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"]
         }, {
           label: "应收金额",
           prop: "receivableAmount"

+ 10 - 8
src/views/statisticAnalysis/specificationsDelivery/index.vue

@@ -74,8 +74,9 @@ export default {
         align: "center",
         searchShow: true,
         searchMenuPosition: "right",
+        height:"auto",
         searchSpan: 8,
-        searchMenuSpan: 8,
+        searchMenuSpan: 24,
         border: true,
         index: true,
         addBtn: false,
@@ -197,7 +198,7 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      this.option.height = window.innerHeight - 210;
+      // this.option.height = window.innerHeight - 210;
       this.getWorkDicts('brand').then(res => {
         this.findObject(this.option.column, "brand").dicData =
           res.data.data;
@@ -211,12 +212,13 @@ export default {
       return "padding:0;height:40px;";
     },
     searchCriteriaSwitch(type) {
-      if (type) {
-        this.option.height = this.option.height - 46;
-      } else {
-        this.option.height = this.option.height + 46;
-      }
-      this.$refs.crud.getTableHeight();
+      // if (type) {
+      //   this.option.height = this.option.height - 46;
+      // } else {
+      //   this.option.height = this.option.height + 46;
+      // }
+      // this.$refs.crud.doLayout();
+      this.$refs.crud.getTableHeight()
     },
     //点击搜索按钮触发
     searchChange(params, done) {

+ 0 - 1
vue.config.js

@@ -33,7 +33,6 @@ module.exports = {
         //本地服务接口地址
         // target: 'http://192.168.3.64:1080',
         // target: 'http://192.168.0.105:1080',
-        // target: 'http://124.222.119.174:1080',
         // 打包地址
         target: 'http://121.37.83.47:10004',//服务器ip
         // target: 'http://trade.tubaosoft.com:10004',//服务器域名