Browse Source

提交箱管买卖和租入

caojunjie 3 years ago
parent
commit
e93387633e

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

@@ -0,0 +1,90 @@
+import request from '@/router/axios';
+//查询箱号
+export const selectArchivesList = (params) => {
+  return request({
+    url: '/api/blade-box-tube/archives/selectArchivesList',
+    method: 'get',
+    params: params
+  })
+}
+//查询列表
+export const getList = (params) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxRent/list',
+    method: 'get',
+    params: params
+  })
+}
+//查询明细
+export const detail = (params) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxRent/detail',
+    method: 'get',
+    params: params
+  })
+}
+//删除
+export const remove = (ids) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxRent/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+//删除图片
+export const tradingBoxFiles = (ids) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxFiles/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+//删除明细
+export const tradingBoxItem = (ids) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxItem/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+//删除费用明细
+export const tradingBoxFees = (ids) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxFees/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+//新增删除
+export function submit(data){
+  return request({
+    url:'/api/blade-box-tube/tradingBox/submit',
+    method:'post',
+    data
+  })
+}
+
+// 请核
+export function pleaseCheck(data) {
+  return request({
+    url: '/api/blade-box-tube/tradingBox/checkTradingBox',
+    method: 'post',
+    data: data
+  })
+}
+// 撤销
+export function repealCancel(data) {
+  return request({
+    url: '/api/blade-box-tube/tradingBox/withdrawTradingBox',
+    method: 'post',
+    data: data
+  })
+}

+ 35 - 0
src/api/statisticAnalysis/analysisOfCoping.js

@@ -0,0 +1,35 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-land/statisticsAnalysis/dataAnalysis',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size
+        }
+    })
+}
+export const getListTwo = (current, size, params) => {
+    return request({
+        url: '/api/blade-land/statisticsAnalysis/detailsList',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size
+        }
+    })
+}
+export const getListThree = (current, size, params) => {
+    return request({
+        url: '/api/blade-purchase-sales/appParts/detailsList',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size
+        }
+    })
+}

+ 12 - 0
src/enums/column-name.js

@@ -1036,6 +1036,18 @@ const columnName = [{
 },{
   code: 243.3,
   name: '箱管理-修箱-附件'
+},{
+  code: 244,
+  name: '应付分析'
+},{
+  code: 244.1,
+  name: '应付分析-应付明细'
+},{
+  code: 244.2,
+  name: '应付分析-平台明细'
+},{
+  code: 245,
+  name: '箱管理-租入'
 }
 ]
 export const getColumnName = (key) => {

+ 99 - 37
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -10,6 +10,9 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" :disabled="form.status>0"
+                   @click="confirmEdit" v-if="optionForm.disabled === true">编辑
+        </el-button>
         <el-dropdown style="margin-right: 10px">
           <el-button type="primary" size="small">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
@@ -499,12 +502,41 @@ export default {
     // }
     this.key++
     if (this.onLoad.id && this.detailData.id) {
-      this.refresh(this.onLoad.id)
+      this.refresh(this.onLoad.id,true)
     }else if (this.onLoad.id){
-      this.refresh(this.onLoad.id)
+      this.refresh(this.onLoad.id,true)
     }
   },
   methods: {
+    confirmEdit() {
+      if (this.form.status > 0) {
+        //基础资料
+        this.$set(this.optionForm, "disabled", true)
+        //箱信息
+        this.$set(this.option, "disabled", true)
+        this.$set(this.option, "addBtn", false)
+        this.$set(this.option, "menu", false)
+        //费用信息
+        this.$set(this.$refs.boxCost.option,"disabled",true)
+        this.$set(this.$refs.boxCost.option,"addBtn",false)
+        this.$set(this.$refs.boxCost.option,"menu",false)
+        //附件和顶部按钮
+        this.disabled = true
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option,"disabled",false)
+        this.$set(this.$refs.boxCost.option,"addBtn",true)
+        this.$set(this.$refs.boxCost.option,"menu",true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
     // 明细删除
     rowDel(row, index, type) {
       this.$confirm("确定将选择数据删除?", {
@@ -655,7 +687,7 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
-    refresh(id) {
+    refresh(id,type) {
       const loading = this.$loading({
         lock: true,
         text: '加载中',
@@ -671,7 +703,7 @@ export default {
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
         loading.close();
-        if (this.form.status > 0) {
+        if (type) {
           //基础资料
           this.$set(this.optionForm, "disabled", true)
           //箱信息
@@ -679,24 +711,39 @@ export default {
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
           //费用信息
-          this.$set(this.$refs.boxCost.option,"disabled",true)
-          this.$set(this.$refs.boxCost.option,"addBtn",false)
-          this.$set(this.$refs.boxCost.option,"menu",false)
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
           //附件和顶部按钮
           this.disabled = true
-        } else {
-          //基础资料
-          this.$set(this.optionForm, "disabled", false)
-          //箱信息
-          this.$set(this.option, "disabled", false)
-          this.$set(this.option, "addBtn", true)
-          this.$set(this.option, "menu", true)
-          //费用信息
-          this.$set(this.$refs.boxCost.option,"disabled",false)
-          this.$set(this.$refs.boxCost.option,"addBtn",true)
-          this.$set(this.$refs.boxCost.option,"menu",true)
-          //附件和顶部按钮
-          this.disabled = false
+        }else {
+          if (this.form.status > 0) {
+            //基础资料
+            this.$set(this.optionForm, "disabled", true)
+            //箱信息
+            this.$set(this.option, "disabled", true)
+            this.$set(this.option, "addBtn", false)
+            this.$set(this.option, "menu", false)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", true)
+            this.$set(this.$refs.boxCost.option, "addBtn", false)
+            this.$set(this.$refs.boxCost.option,"menu",false)
+            //附件和顶部按钮
+            this.disabled = true
+          } else {
+            //基础资料
+            this.$set(this.optionForm, "disabled", false)
+            //箱信息
+            this.$set(this.option, "disabled", false)
+            this.$set(this.option, "addBtn", true)
+            this.$set(this.option, "menu", true)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", false)
+            this.$set(this.$refs.boxCost.option, "addBtn", true)
+            this.$set(this.$refs.boxCost.option, "menu", true)
+            //附件和顶部按钮
+            this.disabled = false
+          }
         }
       })
     },
@@ -865,20 +912,35 @@ export default {
       }
     },
     resetTrigger(){
-      if (this.form.status > 0) {
-        //基础资料
-        this.$set(this.optionForm, "disabled", true)
-        //箱信息
-        this.$set(this.option, "disabled", true)
-        this.$set(this.option, "addBtn", false)
-        this.$set(this.option, "menu", false)
-        //费用信息
-        this.$set(this.$refs.boxCost.option,"disabled",true)
-        this.$set(this.$refs.boxCost.option,"addBtn",false)
-        this.$set(this.$refs.boxCost.option,"menu",false)
-        //附件和顶部按钮
-        this.disabled = true
-      } else {
+      if (this.optionForm.disabled == true) {
+        if (this.form.status > 0) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option,"menu",false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          //基础资料
+          this.$set(this.optionForm, "disabled", false)
+          //箱信息
+          this.$set(this.option, "disabled", false)
+          this.$set(this.option, "addBtn", true)
+          this.$set(this.option, "menu", true)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", false)
+          this.$set(this.$refs.boxCost.option, "addBtn", true)
+          this.$set(this.$refs.boxCost.option, "menu", true)
+          //附件和顶部按钮
+          this.disabled = false
+        }
+      }else {
         //基础资料
         this.$set(this.optionForm, "disabled", false)
         //箱信息
@@ -886,9 +948,9 @@ export default {
         this.$set(this.option, "addBtn", true)
         this.$set(this.option, "menu", true)
         //费用信息
-        this.$set(this.$refs.boxCost.option,"disabled",false)
-        this.$set(this.$refs.boxCost.option,"addBtn",true)
-        this.$set(this.$refs.boxCost.option,"menu",true)
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
         //附件和顶部按钮
         this.disabled = false
       }

+ 1 - 1
src/views/boxManagement/importReturnTrip/index.vue

@@ -230,7 +230,7 @@ export default {
       this.detailsOpen = false
       this.detailData = {
         id: this.$route.query.check.billId,
-        check: this.$route.query.check,
+        check: this.$route.query.check
       };
       this.form = {
         id:this.$route.query.check.billId

+ 998 - 0
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -0,0 +1,998 @@
+<template>
+  <div>
+    <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(0)">返回列表
+        </el-button>
+        <el-button v-if="detailData.id" type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList(1)">返回审核列表
+        </el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" :disabled="form.status>0"
+                   @click="confirmEdit" v-if="optionForm.disabled === true">编辑
+        </el-button>
+        <el-dropdown style="margin-right: 10px" v-if="false">
+          <el-button type="primary" size="small">
+            审核处理<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="pleaseCheck" :disabled="form.status>0">请核数据</el-dropdown-item>
+            <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id">审核进度</el-dropdown-item>
+            <el-dropdown-item @click.native="repealCancel" :disabled="form.status === 0 || !form.status" v-if="!detailData.id">撤销请核</el-dropdown-item>
+            <!--            <el-dropdown-item @click.native="changeApproveOpen">特殊审批</el-dropdown-item>-->
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button class="el-button--small-yh" type="primary" size="small" :disabled="form.status>0"
+                   @click="editCustomer">
+          保存数据
+        </el-button>
+      </div>
+    </div>
+    <trade-card title="基础资料" style="margin-top: 50px">
+      <avue-form :option="optionForm" v-model="form" ref="form">
+        <template slot="purchaseCompanyId" slot-scope="scope">
+          <crop-select v-model="form.purchaseCompanyId" @getCorpData="(row)=>{getGSData(row,['form','purchaseCompanyName'])}" :disabled="scope.disabled"
+                       corpType="KH"/>
+        </template>
+      </avue-form>
+    </trade-card>
+    <trade-card title="箱信息">
+      <avue-crud
+          :option="option"
+          :data="dataList"
+          v-model="formTwo"
+          ref="crud"
+          :key="key"
+          :before-open="beforeOpen"
+          :upload-delete="uploadDelete"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('crud','option','optionBack',235.1)"
+          @saveColumn="saveColumnTwo('crud','option','optionBack',235.1)">
+        <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+          <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
+                     @click="$refs.crud.rowEdit(row,index)">编辑
+          </el-button>
+          <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                     @click="rowDel(row,index,'MX')">删除
+          </el-button>
+        </template>
+        <template slot="addressForm" slot-scope="scope">
+          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="balabala"/>
+        </template>
+<!--        <template slot="boxMakingCompanyForm" slot-scope="scope">-->
+<!--          <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
+<!--                       @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
+<!--        </template>-->
+      </avue-crud>
+    </trade-card>
+<!--    费用信息组件-->
+    <box-cost v-model="dataListTwo" activeName="second" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
+    <trade-card title="附件明细">
+      <c-upload
+          basic
+          :data="tradingBoxFilesList"
+          :disabled="disabled"
+          deleteUrl="/api/blade-box-tube/tradingBoxFiles/remove"
+          :enumerationValue="235.3"
+          display
+      />
+    </trade-card>
+    <el-dialog
+        append-to-body
+        title="审批进度"
+        class="el-dialogDeep"
+        :visible.sync="checkScheduleDialog"
+        width="40%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        v-dialog-drag
+    >
+      <check-schedule
+          :checkId="checkId"
+          :batchNo="batchNo"
+          @choceScheduleFun="choceScheduleFun"
+      ></check-schedule>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  detail,
+  submit,
+  tradingBoxFiles,
+  selectArchivesList,
+  tradingBoxItem,
+  tradingBoxFees,
+  pleaseCheck,
+  repealCancel
+} from "@/api/boxManagement/leaseIn/index.js";
+
+import checkSchedule from "@/components/check/checkSchedule";
+import {selectByName} from "@/api/boxManagement";
+export default {
+  name: "detailsPage",
+  props: {
+    onLoad: Object,
+    detailData: Object
+  },
+  components:{checkSchedule},
+  data() {
+    return {
+      key: 0,
+      checkScheduleDialog: false,
+      checkId: '',
+      batchNo: '',
+      breakConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        clearable: true,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
+      form: {},
+      formTwo: {},
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        column: [{
+          label: '系统号',
+          prop: 'sysNo',
+          disabled: true
+        }, {
+          label: '合同号',
+          prop: 'contractNo',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 170,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '客户',
+          prop: 'purchaseCompanyId',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '合同生效日期',
+          prop: 'effectiveDate',
+          type: "date",
+          format: "yyyy-MM-dd",
+          labelWidth:100,
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '合同失效日期',
+          prop: 'expiryDate',
+          type: "date",
+          format: "yyyy-MM-dd",
+          labelWidth:100,
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          type: 'textarea',
+          minRows: 1,
+          span: 12
+        }]
+      },
+      option: {},
+      optionBack: {
+        align: 'center',
+        index: true,
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        addBtn: true,
+        span: 8,
+        addRowBtn: false,
+        cellBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 140,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'amount',
+          type: 'sum',
+          decimals: 2
+        },{
+          name: 'emptyWeight',
+          type: 'sum',
+          decimals: 2
+        },{
+          name: 'grossWeight',
+          type: 'sum',
+          decimals: 2
+        },{
+          name: 'tare',
+          type: 'sum',
+          decimals: 2
+        },{
+          name: 'loadingWeight',
+          type: 'sum',
+          decimals: 2
+        },{
+          name: 'volume',
+          type: 'sum',
+          decimals: 2
+        }],
+        column: [{
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          allowCreate: true,
+          type: "select",
+          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '币别',
+          prop: 'currency',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          type: "select",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          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: 'boxTypeId',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          props: {
+            label: 'name',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-client/container/listMessage'
+        }, {
+          label: '最新地点',
+          prop: 'address',
+          overHidden: true,
+          formProp: 'addressId',
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '最新日期',
+          prop: 'newDate',
+          overHidden: true,
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '箱来源',
+          prop: 'boxSource',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_source",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '箱状态',
+          prop: 'boxStatus',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '空重(kg)',
+          prop: 'emptyWeight',
+          type: 'number',
+          overHidden: true,
+          controls: false,
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '毛重(kg)',
+          prop: 'grossWeight',
+          type: 'number',
+          overHidden: true,
+          controls: false,
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '皮重(kg)',
+          prop: 'tare',
+          overHidden: true,
+          type: 'number',
+          controls: false,
+          width: 100
+        }, {
+          label: '装载重量(kg)',
+          prop: 'loadingWeight',
+          type: 'number',
+          overHidden: true,
+          controls: false,
+          width: 100
+        }, {
+          label: '容积(m³)',
+          prop: 'volume',
+          type: 'number',
+          overHidden: true,
+          controls: false,
+          width: 100
+        }, {
+          label: '状态',
+          prop: 'status',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_archives_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
+        }, {
+          label: '造箱公司',
+          prop: 'boxMakingCompany',
+          overHidden: true,
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '造箱日期',
+          prop: 'boxMakingDate',
+          width: 100,
+          overHidden: true,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '箱来源日期',
+          prop: 'leaseCommencementDate',
+          width: 100,
+          overHidden: true,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '箱龄',
+          prop: 'boxAge',
+          type: 'number',
+          controls: false,
+          overHidden: true,
+          width: 100,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '照片',
+          prop: 'tradingBoxFilesList',
+          width: 200,
+          overHidden: true,
+          type: 'upload',
+          span: 24,
+          listType: 'picture-card',
+          tip: '只能上传jpg/png文件,且不超过500kb',
+          propsHttp: {
+            url: 'link',
+            name: 'originalName',
+            res: 'data'
+          },
+          action: '/api/blade-resource/oss/endpoint/put-file'
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          overHidden: true,
+          type: 'textarea',
+          minRows: 3,
+          span: 24,
+          width: 200
+        }]
+      },
+      dataList: [],
+      dataListTwo:[],
+      tradingBoxFilesList: [],
+      disabled: false,
+      costData:{}
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(235.1), this.optionBack);
+    selectByName("买箱费").then(res => {
+      this.costData = res.data.data
+    })
+    //下拉箱号带出对应信息
+    // this.findObject(this.option.column, "code").change = ({value, column}) => {
+    //   selectArchivesList({code: value}).then(res => {
+    //     for (let item of res.data.data) {
+    //       if (value == item.code) {
+    //         this.formTwo = {
+    //           boxSource: item.boxSource,
+    //           boxStatus: item.boxStatus,
+    //           emptyWeight: item.emptyWeight,
+    //           grossWeight: item.gorssWeight,
+    //           tare: item.tare,
+    //           loadingWeight: item.loadingWeight,
+    //           volume: item.volume,
+    //         }
+    //       }
+    //     }
+    //   })
+    // }
+    this.key++
+    if (this.onLoad.id && this.detailData.id) {
+      this.refresh(this.onLoad.id,true)
+    }else if (this.onLoad.id){
+      this.refresh(this.onLoad.id,true)
+    }
+  },
+  methods: {
+    confirmEdit() {
+      if (this.form.status > 0) {
+        //基础资料
+        this.$set(this.optionForm, "disabled", true)
+        //箱信息
+        this.$set(this.option, "disabled", true)
+        this.$set(this.option, "addBtn", false)
+        this.$set(this.option, "menu", false)
+        //费用信息
+        this.$set(this.$refs.boxCost.option,"disabled",true)
+        this.$set(this.$refs.boxCost.option,"addBtn",false)
+        this.$set(this.$refs.boxCost.option,"menu",false)
+        //附件和顶部按钮
+        this.disabled = true
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option,"disabled",false)
+        this.$set(this.$refs.boxCost.option,"addBtn",true)
+        this.$set(this.$refs.boxCost.option,"menu",true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
+    // 明细删除
+    rowDel(row, index, type) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+            if (row.id) {
+              tradingBoxItem(row.id).then(res => {
+                if (res.data.success) {
+                  this.$message.success("操作成功!");
+                  this.dataList.splice(index, 1);
+                  if (this.dataListTwo.length > 0) {
+                    for (let item in this.dataListTwo) {
+                      if (this.dataListTwo[item].code == row.code) {
+                        if (this.dataListTwo[item].autoGenerate == 1) {
+                          if (this.dataListTwo[item].id) {
+                            tradingBoxFees(this.dataListTwo[item].id).then(res => {
+                              if (res.data.success) {
+                                this.dataListTwo.splice(index, 1);
+                              }
+                            });
+                          } else {
+                            this.dataListTwo.splice(Number(item), 1);
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+              });
+            } else {
+              this.dataList.splice(index, 1);
+              this.$message.success("操作成功!");
+              if (this.dataListTwo.length > 0) {
+                for (let item in this.dataListTwo) {
+                  if (this.dataListTwo[item].code == row.code) {
+                    if (this.dataListTwo[item].autoGenerate == 1) {
+                      this.dataListTwo.splice(Number(item), 1);
+                    }
+                  }
+                }
+              }
+            }
+          }
+      )
+      ;
+    },
+    balabala(val) {
+      if (val === null) {
+        this.formTwo.address = ''
+      } else {
+        this.formTwo.address = val.name
+      }
+    },
+    //选择费用名称
+    selectValue(value) {
+      this.formThree.itemName = value.cname
+    },
+    //撤销
+    repealCancel(){
+      this.$confirm("您确定撤回此次申请吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const data = {
+          id : this.form.id,
+          pageLabel:"买箱",
+          checkFlag: 1,
+        }
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        repealCancel(data).then(res => {
+          loading.close();
+          this.$message.success('撤回成功')
+          this.refresh(this.form.id)
+        }).catch(()=>{
+          loading.close();
+        })
+      })
+    },
+    // 请核
+    pleaseCheck() {
+      this.$confirm("您确定提交请核申请吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.$refs["form"].validate((valid,done) => {
+          done()
+          if (valid) {
+            if (this.dataList.length === 0) {
+              return this.$message.error("箱信息不能为空")
+            }
+            if (this.$refs.boxCost.dataList.length === 0) {
+              return this.$message.error("费用信息不能为空")
+            }else {
+              for (let item of this.$refs.boxCost.dataList){
+                if (!item.id){
+                  return this.$message.error("费用信息未保存")
+                }
+              }
+            }
+            let data = {
+              ...this.form,
+              tradingBoxItemsList: this.dataList,
+              tradingBoxFeesList: this.dataListTwo,
+              tradingBoxFilesList: this.tradingBoxFilesList,
+              type: "ZR"
+            }
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
+            submit(data).then(res => {
+              const data = {
+                id: res.data.data.id,
+                url: '/boxManagement/buyContainer/index',
+                pageStatus: "this.$store.getters.domSaleStatus",
+                pageLabel: "买箱",
+                checkFlag: 1,
+              }
+              pleaseCheck({
+                ...data,
+                type: "ZR"
+              }).then(rest => {
+                loading.close();
+                this.$message.success('请核成功')
+                this.refresh(res.data.data.id)
+              }).catch(()=>{
+                loading.close();
+              })
+            }).catch(()=>{
+              loading.close();
+            })
+          }
+        });
+      })
+    },
+    //审核关闭
+    choceScheduleFun(){
+      this.checkScheduleDialog = false
+    },
+    refresh(id,type) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      detail({id: id}).then(res => {
+        this.form = res.data.data
+        this.dataList = res.data.data.tradingBoxItemsList
+        this.dataListTwo = res.data.data.tradingBoxFeesList
+        this.tradingBoxFilesList = res.data.data.tradingBoxFilesList
+        delete this.form.tradingBoxItemsList
+        delete this.form.tradingBoxFeesList
+        delete this.form.tradingBoxFilesList
+        loading.close();
+        if (type) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
+          //附件和顶部按钮
+          this.disabled = true
+        }else {
+          if (this.form.status > 0) {
+            //基础资料
+            this.$set(this.optionForm, "disabled", true)
+            //箱信息
+            this.$set(this.option, "disabled", true)
+            this.$set(this.option, "addBtn", false)
+            this.$set(this.option, "menu", false)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", true)
+            this.$set(this.$refs.boxCost.option, "addBtn", false)
+            this.$set(this.$refs.boxCost.option,"menu",false)
+            //附件和顶部按钮
+            this.disabled = true
+          } else {
+            //基础资料
+            this.$set(this.optionForm, "disabled", false)
+            //箱信息
+            this.$set(this.option, "disabled", false)
+            this.$set(this.option, "addBtn", true)
+            this.$set(this.option, "menu", true)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", false)
+            this.$set(this.$refs.boxCost.option, "addBtn", true)
+            this.$set(this.$refs.boxCost.option, "menu", true)
+            //附件和顶部按钮
+            this.disabled = false
+          }
+        }
+      })
+    },
+    //新增修改
+    editCustomer() {
+      this.$refs["form"].validate((valid,done) => {
+        done()
+        if (valid) {
+          let data = {
+            ...this.form,
+            tradingBoxItemsList: this.dataList,
+            tradingBoxFeesList: this.dataListTwo,
+            tradingBoxFilesList: this.tradingBoxFilesList,
+            type: "ZR"
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          submit(data).then(res => {
+            if (this.form.id) {
+              this.$message.success("修改成功")
+            } else {
+              this.$message.success("新增成功")
+            }
+            loading.close();
+            this.refresh(res.data.data.id)
+          }).catch(()=>{
+            loading.close();
+          })
+        }
+      });
+    },
+    rowSave(form,done,loading) {
+      let result = this.dataList.some((item) => {
+        if (item.code == form.code) {
+          return true
+        }
+      })
+      if (result === true) {
+        this.$message.error("已存在此箱号");
+        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
+          }
+        }
+        this.dataListTwo.push({
+          corpId: this.form.purchaseCompanyId,
+          corpName: this.form.purchaseCompanyName,
+          code: form.code,
+          itemId: this.costData.id,
+          itemName: this.costData.cname,
+          currency: form.currency,
+          price: form.amount,
+          quantity: 1,
+          autoGenerate: 1,
+          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
+          }
+        }
+        if (this.dataListTwo.length > 0) {
+          for (let item in this.dataListTwo) {
+            if (this.dataListTwo[item].code == form.code) {
+              if (this.dataListTwo[item].autoGenerate == 1) {
+                this.dataListTwo.splice(Number(item), 1, {
+                  ...this.dataListTwo[item],
+                  corpId: this.form.purchaseCompanyId,
+                  corpName: this.form.purchaseCompanyName,
+                  code: form.code,
+                  currency: form.currency,
+                  price: form.amount,
+                  exchangeRate:form.exchangeRate || 1,
+                  amount: form.amount
+                })
+                this.key++
+              }
+            }
+          }
+        }
+      });
+    },
+    //打开表单前
+    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
+      }
+      done();
+    },
+    //删除图片
+    uploadDelete(file, column) {
+      return new Promise((resolve, reject) => {
+        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          if (this.formTwo.tradingBoxFilesList[file.uid].id) {
+            tradingBoxFiles(this.formTwo.tradingBoxFilesList[file.uid].id).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              });
+              resolve();
+            })
+          } else {
+            resolve();
+          }
+        }).catch(()=>{
+          reject();
+          this.$message({
+            type: "info",
+            message: "已取消删除"
+          });
+        })
+      })
+    },
+    getGSData(row,type) {
+      this[type[0]][type[1]] = row.cname
+    },
+    backToList(type) {
+      if (type == 0){
+        if (this.detailData.id){
+          this.$router.push({
+            path: '/boxManagement/buyContainer/index'
+          });
+        }
+        this.$emit("backToList",type);
+      }else if (type == 1){
+        this.$router.push({
+          path: '/approveData/index'
+        });
+        this.$emit("backToList",type);
+      }
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    resetTrigger(){
+      if (this.optionForm.disabled == true) {
+        if (this.form.status > 0) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option,"menu",false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          //基础资料
+          this.$set(this.optionForm, "disabled", false)
+          //箱信息
+          this.$set(this.option, "disabled", false)
+          this.$set(this.option, "addBtn", true)
+          this.$set(this.option, "menu", true)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", false)
+          this.$set(this.$refs.boxCost.option, "addBtn", true)
+          this.$set(this.$refs.boxCost.option, "menu", true)
+          //附件和顶部按钮
+          this.disabled = false
+        }
+      }else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.resetTrigger()
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+::v-deep .el-form-item {
+  margin-bottom: 8px;
+}
+</style>

+ 266 - 0
src/views/boxManagement/leaseIn/index.vue

@@ -0,0 +1,266 @@
+<template>
+  <div>
+    <basic-container v-show="!detailsOpen">
+      <avue-crud
+          :option="option"
+          :search.sync="search"
+          v-model="form"
+          :table-loading="loading"
+          :data="dataList"
+          ref="crud"
+          :key="key"
+          @on-load="onLoad"
+          @search-change="searchChange"
+          @row-del="rowDel"
+          @refresh-change="refreshChange"
+          @resetColumn="resetColumnTwo('crud','option','optionList',245)"
+          @saveColumn="saveColumnTwo('crud','option','optionList',245)"
+          :page.sync="page">
+        <template slot="purchaseCompanyIdSearch">
+          <crop-select v-model="search.purchaseCompanyId" corpType="GS"/>
+        </template>
+        <template slot="purchaseCompanyId" slot-scope="{row}">
+          {{ row.purchaseCompanyName }}
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menu">
+          <el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>
+          <el-button icon="el-icon-delete" :size="size" v-if="row.status == 0" :type="type" @click="$refs.crud.rowDel(row,$index)">删除
+          </el-button>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">创建单据</el-button>
+          <el-button class="el-icon-document-copy" type="success" size="small">复制单据</el-button>
+          <el-button class="el-icon-download" type="warning" size="small">导出</el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
+  </div>
+</template>
+
+<script>
+import {getList, remove} from "@/api/boxManagement/leaseIn/index.js";
+import detailsPage from "./detailsPage"
+
+export default {
+  name: "index",
+  components: {
+    detailsPage
+  },
+  data() {
+    return {
+      detailsOpen: false,
+      loading: false,
+      search: {},
+      form: {},
+      dataList: [],
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      key:0,
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height:"auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth:140,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        column: [{
+          label: '系统号',
+          prop: 'sysNo',
+          width: 220,
+          search: true,
+        }, {
+          label: '合同号',
+          prop: 'contractNo',
+          width: 170,
+          search: true,
+        }, {
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 170
+        }, {
+          label: '客户',
+          prop: 'purchaseCompanyId',
+          width: 200,
+          search: true,
+        }, {
+          label: '合同生效日期',
+          prop: 'effectiveDate',
+          width: 100,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '合同失效日期',
+          prop: 'expiryDate',
+          width: 100,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '状态',
+          prop: 'status',
+          width: 140,
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          dataType: 'number',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=approval_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          width: 500
+        }, {
+          label: '合同日期',
+          prop: 'effectiveDateList',
+          width: 100,
+          search: true,
+          hide:true,
+          showColumn:false,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }]
+      }
+    }
+  },
+  activated() {
+    if (this.$route.query.check) {
+      this.detailsOpen = false
+      this.detailData = {
+        id: this.$route.query.check.billId,
+        check: this.$route.query.check,
+      };
+      this.form = {
+        id:this.$route.query.check.billId
+      }
+      this.detailsOpen = true
+      this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(245), this.optionList);
+    this.key++
+    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";
+    }
+  },
+  methods: {
+    check(row){
+      this.form = row
+      this.detailsOpen = true
+    },
+    backToList(type) {
+      this.form = {}
+      this.detailsOpen = false
+      if (type === 0){
+        this.detailData = {}
+      }
+      this.onLoad(this.page,this.search)
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    rowDel(form, index) {
+      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        remove(form.id).then(res => {
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        })
+      }).catch(() => {
+      });
+    },
+    searchChange(params, done) {
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        type: "ZR",
+        ...Object.assign(params, this.search)
+      }
+      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
+      })
+    },
+
+//自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+//自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 99 - 37
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -10,6 +10,9 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" :disabled="form.status>0"
+                   @click="confirmEdit" v-if="optionForm.disabled === true">编辑
+        </el-button>
         <el-dropdown style="margin-right: 10px">
           <el-button type="primary" size="small">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
@@ -506,12 +509,41 @@ export default {
     }
     this.key++
     if (this.onLoad.id && this.detailData.id) {
-      this.refresh(this.onLoad.id)
+      this.refresh(this.onLoad.id,true)
     }else if (this.onLoad.id){
-      this.refresh(this.onLoad.id)
+      this.refresh(this.onLoad.id,true)
     }
   },
   methods: {
+    confirmEdit() {
+      if (this.form.status > 0) {
+        //基础资料
+        this.$set(this.optionForm, "disabled", true)
+        //箱信息
+        this.$set(this.option, "disabled", true)
+        this.$set(this.option, "addBtn", false)
+        this.$set(this.option, "menu", false)
+        //费用信息
+        this.$set(this.$refs.boxCost.option,"disabled",true)
+        this.$set(this.$refs.boxCost.option,"addBtn",false)
+        this.$set(this.$refs.boxCost.option,"menu",false)
+        //附件和顶部按钮
+        this.disabled = true
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option,"disabled",false)
+        this.$set(this.$refs.boxCost.option,"addBtn",true)
+        this.$set(this.$refs.boxCost.option,"menu",true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
     // 明细删除
     rowDel(row, index, type) {
       this.$confirm("确定将选择数据删除?", {
@@ -653,7 +685,7 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
-    refresh(id) {
+    refresh(id,type) {
       const loading = this.$loading({
         lock: true,
         text: '加载中',
@@ -669,7 +701,7 @@ export default {
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
         loading.close();
-        if (this.form.status > 0) {
+        if (type) {
           //基础资料
           this.$set(this.optionForm, "disabled", true)
           //箱信息
@@ -677,24 +709,39 @@ export default {
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
           //费用信息
-          this.$set(this.$refs.boxCost.option,"disabled",true)
-          this.$set(this.$refs.boxCost.option,"addBtn",false)
-          this.$set(this.$refs.boxCost.option,"menu",false)
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
           //附件和顶部按钮
           this.disabled = true
-        } else {
-          //基础资料
-          this.$set(this.optionForm, "disabled", false)
-          //箱信息
-          this.$set(this.option, "disabled", false)
-          this.$set(this.option, "addBtn", true)
-          this.$set(this.option, "menu", true)
-          //费用信息
-          this.$set(this.$refs.boxCost.option,"disabled",false)
-          this.$set(this.$refs.boxCost.option,"addBtn",true)
-          this.$set(this.$refs.boxCost.option,"menu",true)
-          //附件和顶部按钮
-          this.disabled = false
+        }else {
+          if (this.form.status > 0) {
+            //基础资料
+            this.$set(this.optionForm, "disabled", true)
+            //箱信息
+            this.$set(this.option, "disabled", true)
+            this.$set(this.option, "addBtn", false)
+            this.$set(this.option, "menu", false)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", true)
+            this.$set(this.$refs.boxCost.option, "addBtn", false)
+            this.$set(this.$refs.boxCost.option,"menu",false)
+            //附件和顶部按钮
+            this.disabled = true
+          } else {
+            //基础资料
+            this.$set(this.optionForm, "disabled", false)
+            //箱信息
+            this.$set(this.option, "disabled", false)
+            this.$set(this.option, "addBtn", true)
+            this.$set(this.option, "menu", true)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", false)
+            this.$set(this.$refs.boxCost.option, "addBtn", true)
+            this.$set(this.$refs.boxCost.option, "menu", true)
+            //附件和顶部按钮
+            this.disabled = false
+          }
         }
       })
     },
@@ -862,20 +909,35 @@ export default {
       }
     },
     resetTrigger(){
-      if (this.form.status > 0) {
-        //基础资料
-        this.$set(this.optionForm, "disabled", true)
-        //箱信息
-        this.$set(this.option, "disabled", true)
-        this.$set(this.option, "addBtn", false)
-        this.$set(this.option, "menu", false)
-        //费用信息
-        this.$set(this.$refs.boxCost.option,"disabled",true)
-        this.$set(this.$refs.boxCost.option,"addBtn",false)
-        this.$set(this.$refs.boxCost.option,"menu",false)
-        //附件和顶部按钮
-        this.disabled = true
-      } else {
+      if (this.optionForm.disabled == true) {
+        if (this.form.status > 0) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option,"menu",false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          //基础资料
+          this.$set(this.optionForm, "disabled", false)
+          //箱信息
+          this.$set(this.option, "disabled", false)
+          this.$set(this.option, "addBtn", true)
+          this.$set(this.option, "menu", true)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", false)
+          this.$set(this.$refs.boxCost.option, "addBtn", true)
+          this.$set(this.$refs.boxCost.option, "menu", true)
+          //附件和顶部按钮
+          this.disabled = false
+        }
+      }else {
         //基础资料
         this.$set(this.optionForm, "disabled", false)
         //箱信息
@@ -883,9 +945,9 @@ export default {
         this.$set(this.option, "addBtn", true)
         this.$set(this.option, "menu", true)
         //费用信息
-        this.$set(this.$refs.boxCost.option,"disabled",false)
-        this.$set(this.$refs.boxCost.option,"addBtn",true)
-        this.$set(this.$refs.boxCost.option,"menu",true)
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
         //附件和顶部按钮
         this.disabled = false
       }

+ 0 - 1
src/views/businessManagement/purchaseOrder/index.vue

@@ -327,7 +327,6 @@ export default {
         type: 'warning'
       }).then(() => {
         let queryParams = JSON.parse(JSON.stringify(this.search))
-        console.log(this.search)
         if (queryParams.requiredArrivalDate) {
           this.$set(queryParams, 'requiredArrivalStartDate', queryParams.requiredArrivalDate[0] + " " + "00:00:00")
           this.$set(queryParams, 'requiredArrivalEndDate', queryParams.requiredArrivalDate[1] + " " + "23:59:59")

+ 217 - 0
src/views/statisticAnalysis/analysisOfCoping/detailPage.vue

@@ -0,0 +1,217 @@
+<template>
+  <div v-if="key>0">
+    <avue-crud ref="crud" :key="key" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+               :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+               @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+      <template slot="menuLeft">
+        <el-button type="info" size="small" @click="outExport">导出
+        </el-button>
+      </template>
+      <template slot="corpNameSearch" slot-scope="scope">
+        <crop-select v-model="search.corpId" corpType="KH"/>
+      </template>
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+import {getToken} from "@/util/auth";
+import {getListTwo} from "@/api/statisticAnalysis/analysisOfCoping"
+
+export default {
+  name: "index",
+  data() {
+    return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      key:0,
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      optionBack: {
+        searchShow: false,
+        searchShowBtn: false,
+        align: "center",
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchMenuSpan: 8,
+        searchLabelWidth: 100,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        highlightCurrentRow: true,
+        menu: false,
+        height: "auto",
+        summaryText: "合计",
+        showSummary: true,
+        sumColumnList: [{
+          name: "freightPay",
+          type: "sum",
+          decimals: 2
+        }],
+        column: [{
+          label: "系统号",
+          prop: "orderNo"
+        }, {
+          label: "合同号",
+          prop: "billNo"
+        }, {
+          label: "客户名称",
+          prop: "corpName"
+        }, {
+          label: "业务日期",
+          prop: "bsDate",
+          searchProp: "bsDateList",
+          width: 100,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "车号",
+          prop: "plateNo"
+        }, {
+          label: "应付金额",
+          prop: "freightPay"
+        }]
+      }
+    };
+  },
+  props:{
+    condition:Object
+  },
+  async created() {
+    this.search = this.condition
+    this.option = await this.getColumnData(this.getColumnName(244.1), this.optionBack);
+    this.key++
+  },
+  methods: {
+    cellStyle() {
+      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();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      this.loading = true;
+      getListTwo(
+          page.currentPage,
+          page.pageSize,
+          Object.assign(data)
+      ).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(this.getColumnName(244.1), this.option);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.optionBack;
+      const inSave = await this.delColumnData(this.getColumnName(244.1), this.optionBack);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    outExport() {
+      let config = {params: {...this.search}}
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-land/statisticsAnalysis/detailsListExport',      //跳转目标窗口的地址
+        query: {
+          ...config.params    //括号内是要传递给新窗口的参数
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-dialog {
+  margin: 0 auto;
+}
+::v-deep .el-dialog__body {
+  padding: 20px 20px;
+}
+
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>

+ 227 - 0
src/views/statisticAnalysis/analysisOfCoping/detailPageTwo.vue

@@ -0,0 +1,227 @@
+<template>
+  <div v-if="key>0">
+    <avue-crud ref="crud"
+               :key="key"
+               :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+               :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+               @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+      <template slot="menuLeft">
+        <el-button type="info" size="small" @click="outExport">导出
+        </el-button>
+      </template>
+      <template slot="corpNameSearch" slot-scope="scope">
+        <crop-select v-model="search.corpId" corpType="KH"/>
+      </template>
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+import {getToken} from "@/util/auth";
+import {getListThree} from "@/api/statisticAnalysis/analysisOfCoping"
+
+export default {
+  name: "index",
+  data() {
+    return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      key:0,
+      optionBack: {
+        searchShow: false,
+        searchShowBtn: false,
+        align: "center",
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchMenuSpan: 8,
+        searchLabelWidth: 100,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        highlightCurrentRow: true,
+        menu: false,
+        height: "auto",
+        summaryText: "合计",
+        showSummary: true,
+        sumColumnList: [{
+          name: "storageQuantity",
+          type: "sum",
+          decimals: 0
+        },{
+          name: "price",
+          type: "sum",
+          decimals: 2
+        },{
+          name: "storageQuantity",
+          type: "sum",
+          decimals: 2
+        }],
+        column: [{
+          label: "系统号",
+          prop: "orderNo"
+        }, {
+          label: "客户名称",
+          prop: "corpName"
+        }, {
+          label: "业务日期",
+          prop: "bsDate",
+          searchProp: "bsDateList",
+          width: 100,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "数量",
+          prop: "storageQuantity"
+        }, {
+          label: "单价",
+          prop: "price"
+        }, {
+          label: "金额",
+          prop: "storageQuantity"
+        }]
+      }
+    };
+  },
+  props:{
+    condition:Object
+  },
+  async created() {
+    this.search = this.condition
+    this.option = await this.getColumnData(this.getColumnName(244.2), this.optionBack);
+    this.key++
+  },
+  methods: {
+    cellStyle() {
+      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();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      this.loading = true;
+      getListThree(
+          page.currentPage,
+          page.pageSize,
+          Object.assign(data)
+      ).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(this.getColumnName(244.2), this.option);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.optionBack;
+      const inSave = await this.delColumnData(this.getColumnName(244.2), this.optionBack);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    outExport() {
+      let config = {params: {...this.search,billType:'XS',tradeType:'YPJ'}}
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-purchase-sales/appParts/detailsListExport',      //跳转目标窗口的地址
+        query: {
+          ...config.params    //括号内是要传递给新窗口的参数
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-dialog {
+  margin: 0 auto;
+}
+::v-deep .el-dialog__body {
+  padding: 20px 20px;
+}
+
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>

+ 259 - 0
src/views/statisticAnalysis/analysisOfCoping/index.vue

@@ -0,0 +1,259 @@
+<template>
+  <div>
+    <basic-container class="page-crad">
+      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+                 :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange"
+                 @size-change="sizeChange"
+                 @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+                 @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+        <template slot="menuLeft">
+          <el-button type="info" size="small" @click="outExport">导出
+          </el-button>
+        </template>
+        <template slot="corpNameSearch" slot-scope="scope">
+          <crop-select v-model="search.corpId" corpType="KH"/>
+        </template>
+        <template slot="freightPay" slot-scope="{row}">
+                <span class="el-button--text" style="cursor: pointer"
+                      @click="openTrack(row,'应付金额明细')">{{ row.freightPay }}</span>
+        </template>
+        <template slot="platformBuy" slot-scope="{row}">
+                <span class="el-button--text" style="cursor: pointer"
+                      @click="openTrack(row,'平台购买明细')">{{ row.platformBuy }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <el-dialog
+        :title="title"
+        :visible.sync="dialogVisible"
+        :append-to-body="true"
+        v-if="dialogVisible"
+        top="0"
+        width="70%">
+      <span>
+        <detail-page v-if="title === '应付金额明细'" :condition="condition"></detail-page>
+        <detail-page-two v-if="title === '平台购买明细'" :condition="condition"></detail-page-two>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {getToken} from "@/util/auth";
+import {getList} from "@/api/statisticAnalysis/analysisOfCoping"
+import detailPage from "./detailPage"
+import detailPageTwo from "./detailPageTwo"
+export default {
+  name: "index",
+  components:{
+    detailPage,
+    detailPageTwo
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      title: "",
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      form: {},
+      search: {},
+      condition: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      optionBack: {
+        searchShow: true,
+        align: "center",
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchMenuSpan: 8,
+        searchLabelWidth: 100,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        menu: false,
+        height: "auto",
+        summaryText: "合计",
+        showSummary: true,
+        sumColumnList: [{
+          name: "freightPay",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "platformBuy",
+          type: "sum",
+          decimals: 0
+        }],
+        column: [{
+          label: "客户",
+          prop: "corpName",
+          search: true
+        }, {
+          label: "应付金额",
+          prop: "freightPay"
+        }, {
+          label: "平台购买数",
+          prop: "platformBuy"
+        }, {
+          label: "业务区间",
+          prop: "bsDateList",
+          width: 100,
+          search: true,
+          showColumn: false,
+          hide: true,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }]
+      }
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(244), this.optionBack);
+  },
+  activated() {
+    this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    openTrack(row,title){
+      this.title = title
+      this.dialogVisible = true
+      this.condition = {
+        bsDateList:this.search.bsDateList,
+        corpId:row.corpId
+      }
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      this.loading = true;
+      getList(
+          page.currentPage,
+          page.pageSize,
+          Object.assign(data)
+      ).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(this.getColumnName(244), this.option);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.optionBack;
+      const inSave = await this.delColumnData(this.getColumnName(244), this.optionBack);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    outExport() {
+      let config = {params: {...this.search}}
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-land/statisticsAnalysis/dataAnalysisExport',      //跳转目标窗口的地址
+        query: {
+          ...config.params    //括号内是要传递给新窗口的参数
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-dialog {
+  margin: 0 auto;
+}
+::v-deep .el-dialog__body {
+  padding: 0px 20px;
+}
+
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>