Browse Source

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

caojunjie 3 years ago
parent
commit
67d5cb9f55

+ 17 - 5
src/components/crop-select/main.vue

@@ -224,11 +224,23 @@ export default {
       this.corpVisible = false;
     },
     corpChange(row) {
-      this.corpList.forEach(e => {
-        if (row == e.id) {
-          this.$emit("getCorpData", { ...e, index: this.cropIndex });
-        }
-      });
+      if (!this.multiple) {
+        this.corpList.forEach(e => {
+          if (row == e.id) {
+            this.$emit("getCorpData", { ...e, index: this.cropIndex });
+          }
+        });
+      } else {
+        let arr = [];
+        row.forEach(item => {
+          let obj = {id: item};
+          this.$set(obj, 'cname', this.corpList.find(e => e.id == item).cname);
+          arr.push(obj)
+        })
+        this.$nextTick(() => {
+          this.$emit('getCorpList', [...arr]);
+        })
+      }
     },
     refreshChange() {
       this.onLoad(this.page, this.search);

+ 13 - 1
src/enums/column-name.js

@@ -479,7 +479,19 @@ const columnName = [{
   {
     code: 127,
     name: '统计分析数据明细'
-  }
+  },
+  {
+    code: 128,
+    name: '统计分析品牌采购对账'
+  },
+  {
+    code: 129,
+    name: '统计分析包装费用对账'
+  },
+  {
+    code: 130,
+    name: '统计分析销售人员提成'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 38 - 5
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -45,10 +45,28 @@
             <crop-select
               v-model="form.artsVision"
               @getCorpData="getCorpName"
+              @getCorpList="getCorpList"
               corpType="GS"
+              :multiple="true"
+              :collapseTags="true"
             ></crop-select>
           </template>
-          <template slot="cntrVolumn" slot-scope="scope">
+          <template slot="brand">
+            <el-select
+              v-model="form.brand"
+              clearable
+              filterable
+              placeholder="请选择 品牌"
+            >
+              <el-option
+                v-for="(item, index) in brandOption"
+                :key="index"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              />
+            </el-select>
+          </template>
+          <template slot="cntrVolumn">
             <el-input
               v-input-limit="2"
               v-model="form.cntrVolumn"
@@ -56,7 +74,7 @@
               placeholder="请输入 箱立方"
             ></el-input>
           </template>
-          <template slot="cartonWeight" slot-scope="scope">
+          <template slot="cartonWeight">
             <el-input
               v-input-limit="2"
               v-model="form.cartonWeight"
@@ -66,7 +84,7 @@
               <template slot="append">kg</template>
             </el-input>
           </template>
-          <template slot="integralMultiples" slot-scope="scope">
+          <template slot="integralMultiples">
             <el-input
               v-input-limit="2"
               v-model="form.integralMultiples"
@@ -74,7 +92,7 @@
               placeholder="请输入 积分倍数"
             ></el-input>
           </template>
-          <template slot="integral" slot-scope="scope">
+          <template slot="integral">
             <el-input
               v-input-limit="2"
               v-model="form.integral"
@@ -228,7 +246,7 @@ export default {
               {
                 required: true,
                 message: " ",
-                trigger: "blur"
+                trigger: "change"
               }
             ]
           },
@@ -367,6 +385,7 @@ export default {
         ]
       },
       unitOption: [], //计量单位数组
+      brandOption: [], // 品牌数组
     };
   },
   //初始化查询
@@ -374,6 +393,9 @@ export default {
     this.getWorkDicts('unit').then(res => {
       this.unitOption = res.data.data;
     })
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
     this.$set(this.form, 'status', 0)
     getDeptTree().then(res => {
       this.dicData = res.data.data;
@@ -392,6 +414,7 @@ export default {
       this.openFullScreen(false, '正在努力的加载...');
       getDetail(id).then(res => {
         this.form = res.data.data;
+        this.form.artsVision = this.form.artsVision? this.form.artsVision.split(','): null;
       }).finally(() => {
         this.openFullScreen(true);
       });
@@ -427,6 +450,7 @@ export default {
             this.form.goodsTypeId = this.form.goodsTypeId.join(',')
           }
           if (!this.form.artsVision) this.$set(this.form, 'artsVisionName', null);
+          this.form.artsVision = this.form.artsVision.join(',')
           const params = {
             ...this.form,
             type: 0
@@ -463,6 +487,15 @@ export default {
     getCorpName(row) {
       this.$set(this.form, 'artsVisionName', row.cname);
     },
+    getCorpList(list) {
+      let arr = []
+      list.forEach(item => {
+        arr.push(item.cname)
+      })
+      this.$nextTick(() => {
+        this.$set(this.form, 'artsVisionName', arr.join(','));
+      })
+    }
   }
 };
 </script>

+ 3 - 3
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -927,7 +927,7 @@ export default {
         this.form.totalQuantity += Number(item.actualQuantity)
         this.form.totalCost += Number(item.deliveryAmount)
         // 出库数量和出库金额的比例
-        this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
+        // this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
         delete item.id
         delete item.pid
         delete item.createTime
@@ -995,7 +995,7 @@ export default {
           this.form.deliveryAmount += Number(item.deliveryAmount)
           this.form.totalQuantity += Number(item.actualQuantity)
           // 出库金额和出库数量的比例
-          this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
+          // this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
         })
         if (this.form.companyName) {
           this.companyConfiguration.dicData = this.companyConfiguration.dicData.concat(this.form.companyName)
@@ -1599,7 +1599,7 @@ export default {
           if (contrastObj(this.form, this.oldForm) ||
             contrastList(getGoodsList, this.oldGoodsList) ||
             contrastList(getGiftList, this.oldGiftList) ||
-            contrastList(getFeeList, this.oldFeesList) ||
+            // contrastList(getFeeList, this.oldFeesList) ||
             contrastList(this.bankOfDepositData, this.oldUploadList)
           ) {
             this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {

+ 21 - 13
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -338,7 +338,7 @@
             <template slot="shopQuality" slot-scope="{ row }">
               <el-switch
                 v-model="row.shopQuality"
-                :disabled="!row.$cellEdit"
+                :disabled="!row.$cellEdit || shopQualityDisable"
                 :active-value="1"
                 :inactive-value="0"
                 @change="(val) => shopQualityChange(val, row)"
@@ -1585,6 +1585,7 @@ export default {
       messageVisble: false, //消息弹窗开关
       changeApproveVis: false, // 更换审批人弹窗
       arrearsCheck: false, // 是否欠款发货审批
+      shopQualityDisable: false, //质量胎切换禁用
     }
   },
   mounted() {
@@ -1992,6 +1993,7 @@ export default {
             this.$set(item, 'purchaseAmount', '0')
           }
         })
+        this.$set(item, 'integral', Number(item.integralMultiples) * Number(item.orderQuantity))
         this.$set(item, 'actualQuantity', '0')
         this.$set(item, 'purchaseAmount', '0')
         this.$set(item, 'price', '0')
@@ -1999,7 +2001,7 @@ export default {
         this.$set(item, 'sort', this.maxFeeNum + 1)
         this.maxFeeNum++
         let a = {
-          cname: item.cname,
+          ...item,
         }
         goodsData.push(a)
       })
@@ -2226,15 +2228,6 @@ export default {
         return current
       }, [])
     },
-    //
-    receiveList(data){
-      this.configuration.dicData = this.configuration.dicData.concat(data)
-      this.removeRepeat()
-    },
-    receiveGoodList(data) {
-      this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(data)
-      this.removeGoodsRepeat()
-    },
     async getCorpRow(data) {
       khDetail(data.id).then(res => {
         if (res.data.data.adminProfiles) {
@@ -3471,8 +3464,23 @@ export default {
       this.checkScheduleDialog = false
     },
     shopQualityChange(val, row) {
-      (val == 1) && (row.price = 0)
-      this.priceChange(row)
+      // (val == 1) && (row.price = 0)
+      if (val == 0) {
+        this.shopQualityDisable = true;
+        getMarketPrice({code: row.code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
+          if (res.data.data.length > 0) {
+            this.$set(row, 'price', res.data.data[0].salePrice)
+          } else {
+            this.$set(row, 'price', '0')
+          }
+          this.priceChange(row)
+        }).finally(() => {
+          this.shopQualityDisable = false;
+        })
+      } else if(val == 1) {
+        row.price = 0
+        this.priceChange(row)
+      }
     },
     editHandle() {
       const data = {

+ 80 - 0
src/views/dealer/purchaseContract/config/commodity.json

@@ -0,0 +1,80 @@
+{
+  "stripe": true,
+  "border": true,
+  "searchMenuSpan": 16,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": true,
+  "align": "center",
+  "menuWidth": "180",
+  "selection": true,
+  "tip": false,
+  "column": [{
+    "label": "商品编号",
+    "prop": "code",
+    "index": 1,
+    "width": 100,
+    "search": true,
+    "searchSpan": 8,
+    "overHidden": true
+  },
+    {
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 8,
+      "prop": "cname",
+      "index": 2,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 3,
+      "width": 120,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "规格尺寸",
+      "prop": "typeno",
+      "index": 4,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "index": 5,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "负荷指数",
+      "prop": "specsOne",
+      "index": 6,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "速级",
+      "prop": "specsTwo",
+      "index": 7,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "加强型",
+      "prop": "level",
+      "index": 8,
+      "width": 120,
+      "overHidden": true
+    }
+  ]
+}

+ 159 - 0
src/views/dealer/purchaseContract/config/customerContact.json

@@ -0,0 +1,159 @@
+{
+  "searchShow": true,
+  "stripe": true,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "addBtn": false,
+  "delBtn": false,
+  "align": "center",
+  "menuWidth": 120,
+  "refreshBtn": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "indexSlot": true,
+  "sumColumnList": [
+    {
+      "name": "orderQuantity",
+      "type": "sum",
+      "decimals": 0
+    },
+    {
+      "name": "price",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "产品编码",
+      "prop": "code",
+      "index": 1,
+      "width": 200,
+      "overHidden": true
+    },
+    {
+      "label": "商品名称",
+      "prop": "cname",
+      "index": 2,
+      "width": 200,
+      "overHidden": true
+    },
+    {
+      "label": "是否按照批次号",
+      "prop": "batch",
+      "index": 2,
+      "width": 110,
+      "overHidden": true
+    },
+    {
+      "label": "规格",
+      "prop": "typeno",
+      "index": 3,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "index": 4,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "负荷指数",
+      "prop": "specsOne",
+      "index": 5,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "速度级别",
+      "prop": "specsTwo",
+      "index": 6,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "单位",
+      "prop": "unit",
+      "index": 7,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "库存",
+      "prop": "storageQuantity",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "orderQuantity",
+      "index": 9,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "尺寸",
+      "prop": "size",
+      "index": 10,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "价格",
+      "prop": "price",
+      "index": 11,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "库存价格",
+      "prop": "purchaseAmount",
+      "index": 12,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "小计",
+      "prop": "amount",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "最新价格",
+      "prop": "newJob",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "最新日期",
+      "prop": "newDate",
+      "index": 15,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 16,
+      "width": 100,
+      "overHidden": true
+    }
+  ]
+}

+ 154 - 0
src/views/dealer/purchaseContract/config/mainList.json

@@ -0,0 +1,154 @@
+{
+  "stripe": true,
+  "height": "auto",
+  "searchShow": true,
+  "searchMenuSpan": 24,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "align": "center",
+  "menuWidth": "70",
+  "searchIcon": true,
+  "searchIndex": 2,
+  "selection": true,
+  "tip": false,
+  "searchSpan": 8,
+  "showSummary": true,
+  "summaryText": "合计",
+  "expand": true,
+  "expandWidth": 38,
+  "sumColumnList": [
+    {
+      "name": "orderQuantity",
+      "type": "sum",
+      "decimals": 0
+    },
+    {
+      "name": "debitAmount",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "采购订单号",
+      "prop": "orderNo",
+      "search": true,
+      "index": 1,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "供应商",
+      "prop": "strCorpName",
+      "search": true,
+      "index": 2,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "业务时间",
+      "prop": "businesDate",
+      "search": true,
+      "index": 3,
+      "minWidth": 80,
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "type": "date",
+      "unlinkPanels": true,
+      "searchRange": true
+    },
+    {
+      "label": "系统编号",
+      "prop": "sysNo",
+      "search": true,
+      "index": 4,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "电话",
+      "prop": "corpTel",
+      "search": false,
+      "index": 5,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "地址",
+      "prop": "arrivalAddress",
+      "search": false,
+      "index": 6,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "收货仓库",
+      "prop": "storageName",
+      "search": true,
+      "index": 7,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "总数量",
+      "prop": "orderQuantity",
+      "search": false,
+      "index": 8,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "应付金额",
+      "prop": "debitAmount",
+      "search": false,
+      "index": 9,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "总金额",
+      "prop": "amount",
+      "search": false,
+      "index": 10,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "type": "select",
+      "props": {
+        "label": "name",
+        "value": "id"
+      },
+      "label": "制单人",
+      "prop": "createUser",
+      "search": true,
+      "index": 11,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "更改人",
+      "prop": "updateUserName",
+      "search": false,
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "更改时间",
+      "prop": "updateTime",
+      "search": false,
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    }
+  ]
+}

+ 1539 - 0
src/views/dealer/purchaseContract/detail.vue

@@ -0,0 +1,1539 @@
+<template>
+  <div class="borderless" v-loading="pageLoading">
+    <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"
+          :loading="btnLoading"
+        >返回列表</el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button
+          v-if="checker && form.status != 3"
+          type="primary"
+          size="small"
+          class="el-button--small-yh"
+          @click.stop="openCheckDialog">
+          审批
+        </el-button>
+        <el-button
+          v-if="form.status > 0"
+          @click.native="checkScheduleDialog = true,checkId=form.id"
+          type="primary"
+          size="small"
+          class="el-button--small-yh"
+        >审核进度</el-button>
+        <el-button
+          type="primary"
+          size="small"
+          class="el-button--small-yh"
+          @click.stop="openEdit"
+          v-if="form.id && disabled"
+        >编 辑</el-button>
+        <el-button
+          type="primary"
+          v-if="!checkDisabled"
+          :disabled="!form.id || disabled"
+          size="small"
+          @click="pleaseCheck"
+          :loading="btnLoading"
+          style="margin-right: 8px"
+          class="el-button--small-yh"
+        >请核</el-button>
+<!--        <el-button-->
+<!--          type="primary"-->
+<!--          size="small"-->
+<!--          class="el-button&#45;&#45;small-yh"-->
+<!--          style="margin-right: 8px;"-->
+<!--          @click="dealerSubmit"-->
+<!--          :disabled="disabled"-->
+<!--          :loading="btnLoading"-->
+<!--          v-if="form.id"-->
+<!--        >-->
+<!--          {{ form.status == 0? '确认订单': form.status == 3? '撤销订单': '' }}-->
+<!--        </el-button>-->
+        <el-dropdown style="margin-right: 8px;">
+          <el-button type="warning" size="small">账单处理<i class="el-icon-arrow-down el-icon--right"></i></el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item
+              @click.native="applySettlement('申请')"
+              :disabled="disabled">申请货款
+            </el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button
+          type="success"
+          :disabled="!form.id"
+          size="small"
+          @click="copyDoc"
+          :loading="btnLoading"
+        >
+          复制单据
+        </el-button>
+        <el-button
+          type="primary"
+          @click="editCustomer"
+          size="small"
+          :loading="btnLoading"
+          :disabled="disabled"
+        >保存数据
+        </el-button>
+      </div>
+    </div>
+    <div class="customer-main">
+      <containerTitle title="基础信息"/>
+      <basic-container :showBtn="true">
+        <avue-form
+          ref="form"
+          class="trading-form"
+          v-model="form"
+          :option="option"
+        >
+          <template slot="corpId">
+            <crop-select
+              v-model="form.corpId"
+              @getCorpData="getCorpData"
+              corpType="GYS"
+              :disabled="disabled || confirmDisabled || checkDisabled"
+            ></crop-select>
+          </template>
+          <template slot="storageId">
+            <warehouse-select
+              v-model="form.storageId"
+              :configuration="configurationWarehouse"
+              :disabled="disabled || confirmDisabled || checkDisabled"/>
+          </template>
+        </avue-form>
+      </basic-container>
+      <containerTitle title="商品信息"/>
+      <basic-container>
+        <avue-crud
+          ref="crud"
+          :data="dataList"
+          :option="tableOption"
+          :page.sync="goodPage"
+          :table-loading="goodLoading"
+          @current-change="currentChange"
+          @size-change="sizeChange"
+          :cell-style="cellStyle"
+          @saveColumn="saveColumn"
+          @resetColumn="resetColumn"
+        >
+          <template slot="headerSerial" slot-scope="{column}">
+            <el-button
+              type="primary"
+              icon="el-icon-circle-plus-outline"
+              circle
+              size="mini"
+              :disabled="disabled || confirmDisabled ||checkDisabled"
+              @click="$refs.crud.rowCellAdd()"></el-button>
+          </template>
+          <template slot="menuLeft">
+            <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="small"
+              @click.stop="newDetails"
+              :disabled="disabled || confirmDisabled || checkDisabled"
+            >录入明细</el-button>
+            <el-button
+              type="info"
+              icon="el-icon-printer"
+              size="small"
+              @click.stop="openReport()"
+            >报表打印</el-button>
+            <el-button
+              type="primary"
+              size="small"
+              icon="el-icon-download"
+              @click="downloadHandle"
+            >下载模板</el-button>
+            <el-upload
+              :action="baseURL"
+              :headers="headers"
+              :disabled="disabled || confirmDisabled || checkDisabled"
+              :on-progress="uploading"
+              :show-file-list=false
+              accept=".xls,.xlsx"
+              multiple
+              :on-success="importTemplate"
+              :on-error="uploadError"
+              style="float: right"
+            >
+              <el-button
+                type="primary"
+                size="small"
+                icon="el-icon-upload"
+              >导 入</el-button>
+            </el-upload>
+          </template>
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button
+              size="small"
+              icon="el-icon-edit"
+              type="text"
+              @click="rowCell(row, index)"
+              :disabled="disabled || confirmDisabled || checkDisabled"
+            >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
+            >
+            <el-button
+              size="small"
+              icon="el-icon-delete"
+              type="text"
+              @click="rowDel(row, index)"
+              :disabled="disabled || confirmDisabled || checkDisabled"
+            >删除</el-button
+            >
+          </template>
+          <template slot="code" slot-scope="{ row, index }">
+            <span v-if="row.$cellEdit" style="display:flex">
+              <el-select
+                v-model="row.code"
+                placeholder="请选择"
+                filterable
+                size="small"
+                style="width:60%"
+                @change="codeChange(row, index)"
+                :disabled="!form.storageId"
+              >
+                <el-option
+                  v-for="item in goodsoptions"
+                  :key="item.id"
+                  :label="item.code"
+                  :value="item.code"
+                >
+                </el-option>
+              </el-select>
+              <el-button
+                icon="el-icon-search"
+                size="small"
+                @click="rePick(row, index)"
+              ></el-button>
+            </span>
+            <span v-else> {{ row.code }}</span>
+          </template>
+          <template slot="cname" slot-scope="{ row, index }">
+            <span v-if="row.$cellEdit" style="display:flex">
+              <el-select
+                v-model="row.itemId"
+                placeholder="请选择"
+                size="small"
+                style="width:60%"
+                filterable
+                @change="cnameChange(row, index)"
+                :disabled="!form.lotNo"
+              >
+                <el-option
+                  v-for="item in goodsoptions"
+                  :key="item.id"
+                  :label="item.cname"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+              <el-button
+                icon="el-icon-search"
+                size="small"
+                @click="rePick(row, index)"
+              ></el-button>
+            </span>
+            <span v-else> {{ row.cname }}</span>
+          </template>
+          <template slot="batch" slot-scope="{row, index}">
+            <span>{{ row.batch == 0? '否': '是' }}</span>
+          </template>
+          <template slot="orderQuantity" slot-scope="{ row, index }">
+            <el-input-number
+              v-if="row.$cellEdit"
+              v-model="row.orderQuantity"
+              size="small"
+              :controls="false"
+              :precision="0"
+              @input="amountChange(row)"
+              style="width: 100%"
+              :disabled="!form.lotNo"
+            />
+            <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
+          </template>
+          <template slot="price" slot-scope="{ row, index }">
+            <el-input-number
+              v-if="row.$cellEdit"
+              v-model="row.price"
+              size="small"
+              :controls="false"
+              :precision="2"
+              @input="amountChange(row)"
+              style="width: 100%"
+              :disabled="!form.lotNo"
+            ></el-input-number>
+            <span v-else>{{ row.price }}</span>
+          </template>
+          <!--          单位-->
+          <template slot="unit" slot-scope="{ row, index }">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.unit"
+              size="small"
+              :disabled="!form.lotNo"
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in unitOption"
+                :key="index"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              />
+            </el-select>
+            <span v-else>{{ row.unit }}</span>
+          </template>
+          <template slot="amount" slot-scope="{ row, index }">
+            <span>{{ row.amount | decimalFormat }}</span>
+          </template>
+          <template slot="storageQuantity" slot-scope="{ row, index }">
+            <span>{{ row.storageQuantity | IntegerFormat }}</span>
+          </template>
+          <template slot="newJob" slot-scope="{ row, index }">
+            <span style="color: #1e9fff;cursor: pointer" @click="openHistory(row)">{{ row.newJob }}</span>
+          </template>
+          <template slot="remarks" slot-scope="{ row, index }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.remarks"
+              size="small"
+              :disabled="!form.storageId"
+            />
+            <span v-else>{{ row.remarks }}</span>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <containerTitle title="详细信息"/>
+      <basic-container :showBtn="true">
+        <avue-form
+          ref="form1"
+          class="trading-form"
+          v-model="form"
+          :option="detailOption"
+        ></avue-form>
+      </basic-container>
+      <containerTitle title="附件管理"></containerTitle>
+      <c-upload
+        :data="uploadData"
+        deleteUrl="/api/blade-client/corpsbank/update"
+        :enumerationValue="84"
+        :disabled="disabled || confirmDisabled || checkDisabled"
+      />
+    </div>
+    <el-dialog
+      title="导入商品"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="dialogVisible"
+      width="80%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      @close="closeGoods"
+      top="5vh"
+      v-dialog-drag
+    >
+      <span>
+        <el-row>
+          <el-col :span="4">
+            <div>
+              <el-scrollbar>
+                <basic-container>
+                  <avue-tree
+                    :option="treeOption"
+                    @node-click="nodeClick"
+                    :style="treeStyle"
+                  />
+                </basic-container>
+              </el-scrollbar>
+            </div>
+          </el-col>
+          <el-col :span="20">
+            <avue-crud
+              :option="goodsOption"
+              :table-loading="loading"
+              :data="goodsList"
+              ref="goodsCrud"
+              :search.sync="search"
+              @search-change="searchChange"
+              @selection-change="selectionChange"
+              @row-click="rowClick"
+              :page.sync="page"
+              @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
+              @resetColumn="resetGoodsColumn"
+              :cell-style="cellStyle"
+            >
+              <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>
+          </el-col>
+        </el-row>
+      </span>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="importGoods"
+          :disabled="selectionList.length == 0 && goodsListSave.length == 0"
+        >导入</el-button
+        >
+      </span>
+    </el-dialog>
+    <!--    账单-->
+    <el-dialog
+      append-to-body
+      title="账单"
+      class="el-dialogDeep"
+      :visible.sync="financialAccountDialog"
+      width="70%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <financial-account
+        :billType="billType"
+        :billData="{}"
+        :arrList="applyPaymentList"
+        :belongCompany="form.belongToCorpId"
+        :checkData="checkFeeData"
+        @choceFun="choceFun"
+        @submit="feeSubmit"
+      />
+    </el-dialog>
+<!--    历史记录-->
+    <view-history
+      v-if="historyVisible"
+      ref="history"
+      :params="historyParams"
+      @closeDialog="closeDialog"
+    />
+    <el-dialog
+      append-to-body
+      title="审批"
+      class="el-dialogDeep"
+      :visible.sync="checkDialog"
+      width="50%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <check
+        :checkData="checkData"
+        :checkDetail="false"
+        :idList="[]"
+        @choceCheckFun="choceCheckFun"
+      >
+      </check>
+    </el-dialog>
+    <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 tableOption from "./config/customerContact.json";
+import goodsOption from "./config/commodity.json";
+import {getDeptLazyTree,
+  getGoods,} from "@/api/basicData/customerInquiry";
+import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
+import {getUserInfo} from "@/api/system/user"; //登录用户信息
+import {dataDetail, removeGoods, typeSave, dealerSubmit, historyPrice, itemDetail} from "@/api/dealer/purchase";
+import {
+  isDiscount,
+  isPercentage,
+  micrometerFormat,
+  IntegerFormat
+} from "@/util/validate";
+import reportDialog from "@/components/report-dialog/main";
+import financialAccount from "../../../components/finance/financialAccount";
+import check from "@/components/check/check";
+import checkSchedule from "@/components/check/checkSchedule";
+import  billApplication from "@/components/bill/billApplication";
+import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
+import {getDetail} from "@/api/basicData/inventoryAccount";
+import { getToken } from "@/util/auth";
+import { getCurrentDate } from "@/util/date";
+import viewHistory from '../componet/history';
+import { contrastObj, contrastList } from "@/util/contrastData";
+
+export default {
+  name: "detail",
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  components: {
+    reportDialog,
+    billApplication,
+    financialAccount,
+    check,
+    checkSchedule,
+    viewHistory,
+  },
+  data() {
+    return {
+      pageLoading: false,
+      btnLoading: false,
+      disabled: false,
+      confirmDisabled: false, // 确认禁用
+      form: {},
+      option: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "供应商",
+            prop: "corpId",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
+            span: 16,
+            slot: true,
+          },
+          {
+            label: "业务时间",
+            prop: "businesDate",
+            span: 8,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "批次号",
+            prop: "lotNo",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+            span: 8,
+            slot: true
+          },
+          {
+            label: "收货仓库",
+            prop: "storageId",
+            span: 8,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
+          },
+          {
+            label: "电话",
+            prop: "corpTel",
+            span: 8
+          },
+          {
+            label: "地址",
+            prop: "arrivalAddress",
+            span: 8
+          },
+          {
+            label: "备注",
+            prop: "orderRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 24
+          },
+        ],
+      },
+      detailOption: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "系统号",
+            prop: "sysNo",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "打印时间",
+            prop: "printTime",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "打印次数",
+            prop: "printNumber",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "客户欠款",
+            prop: "corpDebt",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "总数量",
+            prop: "orderQuantity",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "应付金额",
+            prop: "debitAmount",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "总金额",
+            prop: "amount",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "制单人",
+            prop: "createUserName",
+            span: 8,
+            disabled: true,
+          },
+        ]
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      dataList: [],
+      tableOption: {},
+      dialogVisible: false,
+      selectionList: [],
+      treeDeptId: null,
+      reData: null,
+      treeOption: {
+        nodeKey: "id",
+        lazy: true,
+        treeLoad: function(node, resolve) {
+          const parentId = node.level === 0 ? 0 : node.data.id;
+          getDeptLazyTree(parentId).then(res => {
+            resolve(
+              res.data.data.map(item => {
+                return {
+                  ...item,
+                  leaf: !item.hasChildren
+                };
+              })
+            );
+          });
+        },
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          label: "title",
+          value: "value",
+          children: "children"
+        }
+      },
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      search: {},
+      goodsList: [],
+      loading: false,
+      goodsOption: {},
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
+      goodsoptions: [],
+      uploadData: [],
+      goodData: [], // 存储所有商品信息
+      activeName: 'searchList',
+      // 商品列表数据合计
+      goodsListShow: [],
+      // 商品列表暂存
+      goodsListSave: [],
+      pageList: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      applyPaymentList: [],
+      billType:"收费",  //账单类型
+      billData:{},     //账单需要数据
+      checkFeeData:{
+        url:"/financialManagement/paymentRequest/index",
+        pageStatus:"this.$store.getters.pqStatus",
+        pageLabel:"付费申请",
+        checkType: 'ffsq'
+      },
+      applySettlementDialog:false,//生成账单组件
+      financialAccountDialog:false,
+      feesOption: [],
+      unitOption: [],
+      baseURL: '/api/blade-purchase-sales/orderitems/importDealerOrder',
+      headers: { "Blade-Auth": 'Bearer ' + getToken()},
+      historyVisible: false,
+      historyParams: {},
+      goodPage: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      goodLoading: false,
+      oldForm: {},
+      oldDataList: [],
+      oldUploadData: [],
+      checkDisabled: false, // 审核状态
+      checker: false,
+      checkId: '',
+      batchNo:'',
+      checkDialog: false,
+      checkScheduleDialog: false,
+      checkData: {},
+    }
+  },
+  async created() {
+    this.tableOption = await this.getColumnData(
+      this.getColumnName(82),
+      tableOption
+    );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(83),
+      goodsOption
+    );
+    this.getWorkDicts('unit').then(res => {
+      this.unitOption = res.data.data;
+    })
+    getGoods(1, 10).then(res => {
+      if (res.data.data.total > 0) {
+        this.goodsoptions = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            getGoods(i, 10).then(e => {
+              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            });
+          }
+        }
+      }
+    });
+    getUserInfo().then(res => {
+      this.$set(this.form, 'createUserName', res.data.data.realName)
+      this.$set(this.form, 'createUser', res.data.data.id)
+    })
+    feeList().then(res => {
+      this.feesOption = res.data.data.records
+    });
+    this.$set(this.form, 'businesDate', getCurrentDate());
+    this.$set(this.form, 'status', 0);
+    if (this.detailData.query) {
+      this.disabled = true;
+      this.option.column.map(e => {
+        this.$set(e, 'disabled', true)
+      })
+      this.queryData(this.detailData.id);
+    } else {
+      this.dataList = [
+        {
+          code: null,
+          cname: null,
+          typeno: null,
+          brandItem: null,
+          specsOne: null,
+          specsTwo: null,
+          unit: null,
+          storageQuantity: 0,
+          orderQuantity: 0,
+          size: null,
+          price: 0,
+          amount: 0,
+          $cellEdit: true
+        }
+      ]
+    }
+  },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    },
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  methods: {
+    // 查询
+    queryData(id) {
+      this.pageLoading = true;
+      dataDetail(id).then(res => {
+        this.form = res.data.data;
+        this.getItemDetail();
+        this.form.amount = Number(this.form.amount).toFixed(2);
+        this.confirmDisabled = this.form.status == 3? true: false;
+        this.checkDisabled = this.form.status == 3? true: false;
+        if (this.confirmDisabled) {
+          // this.option.column.map(e => {
+          //   this.$set(e, 'disabled', true)
+          // })
+        }
+        this.goodData = this.form.orderItemsList? this.form.orderItemsList: [];
+        this.uploadData = this.form.orderFilesList? this.form.orderFilesList: [];
+        delete this.form.orderItemsList;
+        delete this.form.orderFilesList;
+        this.oldForm = {...this.form};
+        // this.oldDataList = [...this.dataList];
+        this.oldUploadData = [...this.uploadData];
+      }).finally(() => {
+        this.pageLoading = false;
+      })
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    openEdit() {
+      this.disabled = false;
+      this.option.column.map(e => {
+        if (this.confirmDisabled || this.checkDisabled) {
+          if (e.prop == 'businesDate' || e.prop == 'lotNo') {
+            this.$set(e, 'disabled', true)
+          } else {
+            this.$set(e, 'disabled', false)
+          }
+        } else {
+          this.$set(e, 'disabled', false)
+        }
+      })
+    },
+    copyDoc() {
+      this.$emit("copyOrder", this.form.id);
+    },
+    getCorpData(row) {},
+    //修改提交触发
+    editCustomer(status) {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          // 总金额计算
+          let amount = 0;
+          this.dataList.forEach(item => {
+            amount = Number(amount) + Number(item.amount)
+          })
+          this.$set(this.form, 'debitAmount', amount.toFixed(2));
+          this.$set(this.form, 'amount', amount.toFixed(2));
+          this.form.billType = 'CG';
+          this.$set(this.form, 'itemsVOList', this.dataList);
+          this.$set(this.form, 'orderFilesList', this.uploadData);
+          this.btnLoading = true;
+          typeSave(this.form).then(res => {
+            this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
+            this.queryData(res.data.data);
+          }).finally(() => {
+            this.btnLoading = false;
+          })
+        }
+      })
+    },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(82),
+        this.tableOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+      }
+    },
+    async resetColumn() {
+      this.tableOption = tableOption;
+      const inSave = await this.delColumnData(
+        this.getColumnName(82),
+        tableOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        setTimeout(() => {
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }, 1000);
+      }
+    },
+    //商品明细导入
+    newDetails() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          this.dialogVisible = !this.dialogVisible;
+        }
+      })
+      // if (!this.form.corpId) {
+      //   return this.$message.error("请选择客户名称");
+      // }
+    },
+    importGoods() {
+      let form = {};
+      if (this.reData) {
+        if (this.selectionList.length != 1) {
+          return this.$message.error("重新选择的时候只能选择一条数据");
+        } else {
+          this.selectionList.forEach(e => {
+            this.dataList.forEach(async (item, index) => {
+              if (index == this.reData.index) {
+                let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+                if (historyData.length > 0) {
+                  e.newJob = historyData[0].price;
+                  e.newDate = historyData[0].businesDate;
+                } else {
+                  e.newJob = null;
+                  e.newDate = null;
+                }
+                form = await this.getStockInfo({
+                  tradeType: 'JXS',
+                  goodsId: e.id,
+                  storageId: this.form.storageId,
+                  lotNo: e.batch == 1? this.form.lotNo: null
+                })
+                item.storageQuantity = form.stock;
+                item.purchaseAmount = form.purchaseAmount;
+                item.itemId = e.id;
+                item.code = e.code;
+                item.cname = e.cname;
+                item.corpId = e.corpId;
+                item.corpName = e.corpName;
+                item.brandItem = e.brandItem;
+                item.specsOne = e.specsOne;
+                item.specsTwo = e.specsTwo;
+                item.typeno = e.typeno;
+                item.unit = e.unit;
+                item.size = e.size;
+                item.lotNo = e.batch == 1? this.form.lotNo: null;
+                item.priceCategory = e.goodsTypeName;
+                item.newJob = e.newJob;
+                item.newDate = e.newDate;
+                item.$cellEdit = true;
+              }
+            });
+          });
+        }
+      } else {
+        if (this.goodsListSave.length > 0) { // 暂存的有数据
+          this.goodsListSave.forEach(async e => {
+            let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+            if (historyData.length > 0) {
+              e.newJob = historyData[0].price;
+              e.newDate = historyData[0].businesDate;
+            } else {
+              e.newJob = null;
+              e.newDate = null;
+            }
+            form = await this.getStockInfo({
+              tradeType: 'JXS',
+              goodsId: e.id,
+              storageId: this.form.storageId,
+              lotNo: e.batch == 1? this.form.lotNo: null
+            })
+            e.storageQuantity = form.stock;
+            e.purchaseAmount = form.purchaseAmount;
+            this.dataList.push({
+              itemId: e.id,
+              code: e.code,
+              cname: e.cname,
+              brandItem: e.brandItem,
+              specsOne: e.specsOne,
+              specsTwo: e.specsTwo,
+              typeno: e.typeno,
+              corpId: e.corpId,
+              corpName: e.corpName,
+              unit: e.unit,
+              size: e.size,
+              price: 0,
+              amount: 0,
+              orderQuantity: 0,
+              storageQuantity: e.storageQuantity,
+              purchaseAmount: e.purchaseAmount,
+              newJob: e.newJob,
+              newDate: e.newDate,
+              lotNo: e.batch == 1? this.form.lotNo: null,
+              $cellEdit: true
+            });
+          });
+        } else {
+          this.selectionList.forEach(async e => {
+            let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+            if (historyData.length > 0) {
+              e.newJob = historyData[0].price;
+              e.newDate = historyData[0].businesDate;
+            } else {
+              e.newJob = null;
+              e.newDate = null;
+            }
+            form = await this.getStockInfo({
+              tradeType: 'JXS',
+              goodsId: e.id,
+              storageId: this.form.storageId,
+              lotNo: e.batch == 1? this.form.lotNo: null
+            })
+            e.storageQuantity = form.stock;
+            e.purchaseAmount = form.purchaseAmount;
+            this.dataList.push({
+              itemId: e.id,
+              code: e.code,
+              cname: e.cname,
+              brandItem: e.brandItem,
+              specsOne: e.specsOne,
+              specsTwo: e.specsTwo,
+              typeno: e.typeno,
+              corpId: e.corpId,
+              corpName: e.corpName,
+              unit: e.unit,
+              size: e.size,
+              price: 0,
+              amount: 0,
+              orderQuantity: 0,
+              storageQuantity: e.storageQuantity,
+              purchaseAmount: e.purchaseAmount,
+              newJob: e.newJob,
+              newDate: e.newDate,
+              lotNo: e.batch == 1? this.form.lotNo: null,
+              $cellEdit: true
+            });
+          });
+        }
+      }
+      this.dialogVisible = false;
+    },
+    closeGoods() {
+      this.selectionList = [];
+      this.treeDeptId = "";
+      this.reData = null;
+      this.activeName = 'searchList';
+      this.goodsListSave = [];
+    },
+    nodeClick(data) {
+      this.treeDeptId = data.id;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    //费用查询
+    onLoad(page, params = {}) {
+      let obj = this.deepClone(Object.assign(params, this.search));
+      this.loading = true;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
+        .then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.goodsList = data.records;
+          if (this.page.total) {
+            this.goodsOption.height = window.innerHeight - 350;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    rowClick(row) {
+      this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(83),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.goodsCrud.doLayout()
+        })
+      }
+    },
+    async resetGoodsColumn() {
+      this.goodsOption = goodsOption;
+      const inSave = await this.delColumnData(
+        this.getColumnName(83),
+        goodsOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.goodsCrud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        setTimeout(() => {
+          this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+        }, 1000);
+      }
+    },
+    openReport() {},
+    rowCell(row, index) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    rowDel(row, index) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          removeGoods(row.id).then(res => {
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            })
+            this.dataList.splice(row.$index, 1);
+          })
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.dataList.splice(row.$index, 1);
+        }
+      });
+    },
+    codeChange(row) {
+      let form = {};
+      this.goodsoptions.forEach(async e => {
+        if (e.code == row.code) {
+          let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+          if (historyData.length > 0) {
+            e.newJob = historyData[0].price;
+            e.newDate = historyData[0].businesDate;
+          } else {
+            e.newJob = null;
+            e.newDate = null;
+          }
+          form = await this.getStockInfo({
+            tradeType: 'JXS',
+            goodsId: e.id,
+            storageId: this.form.storageId,
+            lotNo: e.batch == 1? this.form.lotNo: null
+          })
+          e.storageQuantity = form.stock;
+          e.purchaseAmount = form.purchaseAmount;
+          row.itemId = e.id;
+          row.cname = e.cname;
+          row.code = e.code;
+          row.corpId = e.corpId;
+          row.corpName = e.corpName;
+          row.brandItem = e.brandItem;
+          row.specsOne = e.specsOne;
+          row.specsTwo = e.specsTwo;
+          row.typeno = e.typeno;
+          row.unit = e.unit;
+          row.size = e.size;
+          row.priceCategory = e.goodsTypeName;
+          row.storageQuantity = e.storageQuantity;
+          row.purchaseAmount = e.purchaseAmount;
+          row.lotNo = e.batch == 1? this.form.lotNo: null;
+          row.newJob = e.newJob;
+          row.newDate = e.newDate;
+          // row.amount = 0;
+        }
+      });
+    },
+    cnameChange(row) {
+      let form = {};
+      this.goodsoptions.forEach(async e => {
+        if (e.id == row.itemId) {
+          let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+          if (historyData.length > 0) {
+            e.newJob = historyData[0].price;
+            e.newDate = historyData[0].businesDate;
+          } else {
+            e.newJob = null;
+            e.newDate = null;
+          }
+          form = await this.getStockInfo({
+            tradeType: 'JXS',
+            goodsId: e.id,
+            storageId: this.form.storageId,
+            lotNo: e.batch == 1? this.form.lotNo: null
+          })
+          e.storageQuantity = form.stock;
+          e.purchaseAmount = form.purchaseAmount;
+          row.cname = e.cname;
+          row.code = e.code;
+          row.corpId = e.corpId;
+          row.corpName = e.corpName;
+          row.brandItem = e.brandItem;
+          row.specsOne = e.specsOne;
+          row.specsTwo = e.specsTwo;
+          row.typeno = e.typeno;
+          row.unit = e.unit;
+          row.size = e.size;
+          row.priceCategory = e.goodsTypeName;
+          row.storageQuantity = e.storageQuantity;
+          row.purchaseAmount = e.purchaseAmount;
+          row.lotNo = e.batch == 1? this.form.lotNo: null;
+          row.newJob = e.newJob;
+          row.newDate = e.newDate;
+          // row.amount = 0;
+        }
+      });
+    },
+    rePick(row, index) {
+      this.reData = {
+        ...row,
+        index: index
+      };
+      this.newDetails();
+    },
+    // 商品信息价格计算
+    amountChange(row) {
+      if (!row.orderQuantity) {
+        row.orderQuantity = 0;
+      }
+      if (!row.price) {
+        row.price = 0;
+      }
+      row.amount = Number(row.price) * Number(row.orderQuantity)
+    },
+    // 标签页切换
+    tabHandle(data) {
+      if (data.name == 'searchList') {
+        this.goodsListShow = this.goodsList;
+        this.page.total = this.pageList.total
+      } else if (data.name == 'importStaging') {
+        this.goodsListShow = this.goodsListSave;
+        this.page.total = 0
+      }
+    },
+    removeStagList(row, index) {
+      this.goodsListSave.splice(row.$index, 1)
+    },
+    importStagList(row, index) {
+      this.goodsListSave.push(row);
+    },
+    // 生成结算
+    applySettlement(type) {
+      this.beforeBillData(true,type)
+      this.financialAccountDialog = true;
+    },
+    //生成账单 拿到主表信息
+    beforeBillData(bool,type) {
+      this.billType = type;
+      this.applyPaymentList = [];
+      this.goodData.map(e => {
+        if (e.submitPay != 1) {
+          const form = {
+            srcOrderno:this.form.orderNo,
+            srcParentId: this.form.id,
+            itemType:"采购",
+            corpsName:this.form.corpsName,
+            corpId:this.form.corpId,
+            currency: 'CNY',
+            exchangeRate: '1',
+            taxRate: '0',
+            accDate: this.form.businesDate,
+            srcType: 1,
+            // chargeMember: this.form.chargeMember,
+            parentId: this.form.id,
+            tradeType: 'JXS',
+            optionType: 'JXS',
+            amount: e.amount,
+            costType: this.feesOption.find(item => item.cname == '货款')? this.feesOption.find(item => item.cname == '货款').id: null,
+            srcFeesId: e.id,
+            goodName: e.cname,
+            price: e.price,
+            quantity: e.orderQuantity,
+            unit:e.unit,
+          }
+          this.applyPaymentList.push(form);
+        }
+      })
+    },
+    //关闭账单
+    choceFun(){
+      this.financialAccountDialog  = false
+    },
+    feeSubmit() {
+      this.queryData(this.form.id);
+    },
+    // 获得库存信息
+    async getStockInfo(data) {
+      //tradeType JXS
+      //goodsId
+      //storageId
+      //lotNo 批次号
+      let form = {};
+      await getDetail(data).then(res => {
+        const a = res.data.data? res.data.data: {
+          stock: 0,
+          balanceAmount: 0,
+          balanceQuantity: 0,
+        };
+        this.$set(form, 'purchaseAmount', a.balanceQuantity == 0? 0: (Number(a.balanceAmount) / Number(a.balanceQuantity)).toFixed(2));
+        this.$set(form, 'stock', a.balanceQuantity);
+      })
+      return form;
+    },
+    // 确认或者取消订单
+    dealerSubmit() {
+      if (this.verification()) {
+        let dealer;
+        if (this.form.status == 0) {
+          dealer = 1;
+        } else if (this.form.status == 3) {
+          dealer = 2;
+        }
+        this.btnLoading = true;
+        dealerSubmit({
+          id: this.form.id,
+          dealer
+        }).then(res => {
+          if (res.data.code == 200) {
+            this.$message.success('操作成功')
+            this.queryData(this.form.id)
+          } else {
+            this.$message.error(res.data.msg)
+          }
+        }).finally(() => {
+          this.btnLoading = false;
+        })
+      }
+    },
+    // 下载模板
+    downloadHandle() {
+      this.$confirm('是否下载模板文件?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/blade-purchase-sales/orderitems/exportDealerOrder?${
+            this.website.tokenHeader
+          }=${getToken()}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      })
+    },
+    //文件上传时
+    uploading(event, file, fileList) {
+      this.openFullScreen(false, '文件正在解析中');
+    },
+    importTemplate(res, file) {
+      this.openFullScreen(true)
+      res.data.forEach(item => {
+      })
+      this.dataList = this.dataList.concat(res.data)
+    },
+    uploadError(err, file, fileList) {
+      this.openFullScreen(true)
+      this.$message.error(JSON.parse(err.message).msg)
+    },
+    //遮罩层
+    openFullScreen(res, text) {
+      const loading = this.$loading({
+        lock: true,
+        text: text,
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      if (res === true) loading.close();
+    },
+    // 获得历史数据
+    async getHistoryData(row, typeId = null) {
+      let data;
+      const params = {
+        typeId,
+        tradeType: 'JXS',
+        billType: 'CG',
+        itemId: row.id
+      }
+      await historyPrice(params).then(res => {
+        data = res.data.data? res.data.data: [];
+      })
+      return data;
+    },
+    openHistory(row) {
+      this.historyParams = {
+        tradeType: 'JXS',
+        billType: 'CG',
+        itemId: row.itemId
+      }
+      this.historyVisible = true;
+      this.$nextTick(() => {
+        this.$refs.history.init();
+      })
+    },
+    closeDialog() {
+      this.historyVisible = false;
+    },
+    // 商品明细分页处理
+    currentChange(val) {
+      this.goodPage.currentPage = val;
+      this.getItemDetail();
+    },
+    sizeChange(val) {
+      this.goodPage.currentPage = 1;
+      this.goodPage.pageSize = val;
+      this.getItemDetail();
+    },
+    getItemDetail() {
+      const data = {
+        pid: this.form.id,
+      };
+      this.goodLoading = true;
+      itemDetail(this.goodPage.currentPage, this.goodPage.pageSize, data).then(res => {
+        this.dataList = res.data.data.records;
+        this.goodPage.total = res.data.data.total;
+        this.oldDataList = [...this.dataList];
+      }).finally(() => {
+        this.goodLoading = false;
+      })
+    },
+    // 验证新旧值对比
+    verification() {
+      if (contrastObj(this.form, this.oldForm) ||
+        contrastList(this.dataList, this.oldDataList) ||
+        contrastList(this.uploadData, this.oldUploadData)) {
+        this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.editCustomer();
+        }).catch(() => {
+          return false;   //取消改动数据
+        })
+      } else {
+        return true;
+      }
+    },
+    // 请核
+    pleaseCheck() {
+      if (this.verification()) {
+        // const data = {
+        //   id : this.form.id,
+        //   checkType: 'xsqh',
+        //   url: '/dealer/sales/index',
+        //   pageStatus:"this.$store.getters.dealerSaleStatus",
+        //   pageLabel:"销售订单(D)",
+        //   checkFlag: 2,
+        // }
+        // this.btnLoading = true;
+        // pleaseCheck(data).then(res => {
+        //   this.$message.success('请核成功')
+        //   this.queryData(this.form.id)
+        // }).catch(() => {
+        //   this.$message.error('请核失败')
+        // }).finally(() => {
+        //   this.btnLoading = false;
+        // })
+      }
+    },
+    //打开审核
+    openCheckDialog(){
+      this.checkData  = this.detailData.check
+      this.checkDialog = true;
+    },
+    //关闭审核
+    choceCheckFun(){
+      this.checkDialog = false;
+    },
+    choceScheduleFun(){
+      this.checkScheduleDialog = false
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+::v-deep .select-component {
+  display: flex !important;
+}
+</style>

+ 383 - 0
src/views/dealer/purchaseContract/index.vue

@@ -0,0 +1,383 @@
+<template>
+  <div>
+    <basic-container v-show="show" class="page-crad">
+      <avue-crud
+        ref="crud"
+        :option="option"
+        :data="dataList"
+        v-model="form"
+        :page.sync="page"
+        :search.sync="search"
+        :table-loading="loading"
+        :cell-style="cellStyle"
+        @selection-change="selectionChange"
+        @search-change="searchChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @search-reset="searchReset"
+        @on-load="onLoad"
+        @search-criteria-switch="searchCriteriaSwitch"
+        @saveColumn="saveColumn"
+        @resetColumn="resetColumn"
+        @expand-change="expandChange"
+      >
+        <template slot="orderNo" slot-scope="scope">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
+        </template>
+        <template slot="strCorpName" slot-scope="scope">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.strCorpName }}</span>
+        </template>
+        <template slot="createUser" slot-scope="scope">
+          <span>{{ scope.row.createUserName }}</span>
+        </template>
+        <template slot="amount" slot-scope="scope">
+          <span>{{ scope.row.amount | decimalFormat }}</span>
+        </template>
+        <template slot="strCorpNameSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="GYS"
+          ></crop-select>
+        </template>
+        <template slot="storageNameSearch">
+          <warehouse-select
+            v-model="search.storageId"
+            :configuration="configurationWarehouse"/>
+        </template>
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud
+            :data="row.itemData"
+            :option="itemOption"
+            :table-loading="row.itemLoading"
+            :cell-style="cellStyle"
+            class="itemTable"
+          ></avue-crud>
+        </template>
+        <template slot="menuLeft">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="small"
+            @click.stop="newAdd()"
+          >创建单据</el-button>
+          <el-button
+            type="success"
+            size="small"
+            icon="el-icon-plus"
+            @click.stop="copyDoc()"
+            :disabled="selection.length != 1"
+          >复制单据</el-button>
+        </template>
+        <template slot-scope="scope" slot="menu">
+          <el-button
+            type="text"
+            icon="el-icon-delete"
+            size="small"
+            @click.stop="rowDel(scope.row, scope.index)"
+            :disabled="scope.row.status == 3"
+          >删除
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detail-page
+      @goBack="goBack"
+      @copyOrder="copyOrder"
+      :detailData="detailData"
+      v-if="!show"
+    />
+  </div>
+</template>
+
+<script>
+import option from './config/mainList.json';
+import detailPage from "./detail";
+import { gainUser } from "@/api/basicData/customerInquiry";
+import {getPurchaseList, deleteDetails, dataDetail} from "@/api/dealer/purchase";
+
+export default {
+  name: "index",
+  components: { detailPage },
+  data() {
+    return {
+      option: {},
+      dataList: [],
+      form: {},
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
+      },
+      search: {},
+      show: true,
+      loading: false,
+      selection: [],
+      detailData: {},
+      itemOption: {
+        align: "center",
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: "产品编码",
+            prop: "code",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "商品名称",
+            prop: "cname",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "花纹",
+            prop: "brandItem",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "负荷指数",
+            prop: "specsOne",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "速度级别",
+            prop: "specsTwo",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "单位",
+            prop: "unit",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "尺寸",
+            prop: "size",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "价格",
+            prop: "price",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "小计",
+            prop: "amount",
+            width: 138,
+            overHidden: true
+          },
+        ]
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        clearable: true,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(81), option);
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
+    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";
+    }
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  methods: {
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 70
+      } else {
+        this.option.height = this.option.height + 70
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    newAdd() {
+      this.show = false;
+    },
+    copyDoc() {},
+    selectionChange(list) {
+      this.selection = list;
+    },
+    //删除列表后面的删除按钮触发触发(row, index, done)
+    rowDel(row, index, done) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(res => {
+        return deleteDetails(row.id)
+      }).then(() => {
+        this.dataList.splice(row.$index, 1)
+        this.$message({
+          type: "success",
+          message: "删除成功!"
+        });
+        this.page.currentPage = 1;
+        this.onLoad(this.page)
+      })
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.onLoad(this.page, params);
+      done();
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    searchReset() {
+      this.onLoad(this.page, this.search);
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    onLoad(page, params) {
+      // 重置掉展开
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      let queryParams = Object.assign({}, params, {
+        size: page.pageSize,
+        current: page.currentPage,
+      })
+      if (queryParams.businesDate && queryParams.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          businesStartDate: queryParams.businesDate[0],
+          businesEndDate: queryParams.businesDate[1],
+        }
+      }
+      delete queryParams.businesDate;
+      this.loading = true;
+      getPurchaseList(queryParams).then(res => {
+        res.data.data.records.forEach(e => {
+          e.itemLoading = false;
+          e.itemData = [];
+        });
+        this.dataList = res.data.data.records;
+        this.page.total = res.data.data.total;
+        this.option.height = window.innerHeight - 240;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+      }).finally(() => {
+        this.loading = false;
+      })
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(81),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(81), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    goBack() {
+      if (this.$route.query.id) {
+        this.$router.$avueRouter.closeTag(this.$route.fullPath);
+        this.$router.push({
+          path: "/dealer/sales/index"
+        });
+      }
+      this.detailData = this.$options.data().detailData;
+      this.show = true;
+      this.onLoad(this.page, this.search);
+    },
+    copyOrder(id) {
+      this.show = true;
+      this.detailData = {
+        id: id,
+        status: "copy"
+      };
+      this.$nextTick(() => {
+        this.show = false;
+      });
+    },
+    beforeOpenPage(row, index) {
+      this.show = false;
+      this.detailData = {
+        id: row.id,
+        query: true, // 表示只是查询
+      };
+    },
+    expandChange(row) {
+      if (this.dataList[row.$index].itemLoading == false) {
+        this.dataList[row.$index].itemLoading = true;
+        dataDetail(row.id)
+          .then(res => {
+            this.dataList[row.$index].itemData = res.data.data.orderItemsList? res.data.data.orderItemsList: [];
+          })
+          .finally(() => {
+            this.dataList[row.$index].itemLoading = false;
+          });
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+::v-deep .select-component {
+  display: flex;
+}
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+</style>

+ 11 - 0
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -739,6 +739,7 @@ export default {
               typeno: item.typeno,
               brandItem: item.brandItem,
               corpName: item.corpName,
+              corpId: item.corpId,
               purchasePrice: "",
               salesPrice: "",
               purchaseAmount: "",
@@ -853,6 +854,16 @@ export default {
     editCustomer() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          for (let item in this.contactsData) {
+            if (!this.contactsData[item].corpId) {
+              return this.$message.error('特价明细第' + (Number(item) + 1) + '行供应商不能为空')
+            }
+          }
+          for (let item in this.contactsDataBuyFree) {
+            if (!this.contactsDataBuyFree[item].corpId) {
+              return this.$message.error('买赠明细第' + (Number(item) + 1) + '行供应商不能为空')
+            }
+          }
           this.form.corps = this.form.corps.join(",");
           this.form.specialItemList = this.contactsData;
           this.form.presentItemList = this.contactsDataBuyFree;

+ 305 - 0
src/views/statisticAnalysis/packFeeRecon/index.vue

@@ -0,0 +1,305 @@
+<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"
+            icon="el-icon-printer"
+            size="small"
+            :loading="exportLoading"
+            @click.stop="statement"
+          >报表打印
+          </el-button>
+        </template>
+        <template slot="brandSearch">
+          <el-select
+            v-model="search.brand"
+            filterable
+            clearable
+            multiple
+            collapse-tags
+          >
+            <el-option
+              v-for="(item, index) in brandOption"
+              :key="index"
+              :label="item.dictValue"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <report-dialog
+      :switchDialog="switchDialog"
+      :searchValue="statementData"
+      :reportName="'经销商-可用库存表'"
+      @onClose="onClose()"
+    />
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList, exportExcel } from "@/api/statisticAnalysis/salesReconciliation";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
+import reportDialog from "@/components/report-dialog/main";
+
+export default {
+  name: "index",
+  components: {
+    reportDialog
+  },
+  data() {
+    return {
+      exportLoading:false,
+      switchDialog:false,
+      statementData: {},
+      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: {},
+      defaultOption: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        showSummary: true,
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: '销售订单号',
+            prop: 'orderNo',
+            search: false,
+            overHidden: true
+          },
+          {
+            label: "品牌",
+            prop: "brand",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            search: true,
+            type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            unlinkPanels: true,
+            searchRange: true,
+            overHidden: true,
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "包装费用",
+            prop: "amount",
+            search: false,
+            overHidden: true,
+          },
+        ],
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      brandOption: [],
+    };
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(129), this.defaultOption);
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
+    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: {
+    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() {
+      delete this.search.corpName;
+      delete this.search.storageName
+      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) {
+      this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({}, params);
+      if (queryParams.businesDate && queryParams.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          orderStartDate: queryParams.businesDate[0] + ' 00:00:00',
+          orderEndDate: queryParams.businesDate[1] + ' 23:59:59',
+        }
+        delete queryParams.businesDate;
+      }
+      getList(
+        page.currentPage,
+        page.pageSize,
+        queryParams
+      )
+        .then(res => {
+          if (res.data.data.records) {
+            res.data.data.records.forEach(e => {
+              e.itemLoading = true;
+            });
+          }
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 210;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
+    },
+    statement() {
+      this.statementData = {...this.search};
+      if (this.statementData.createTime && this.statementData.createTime.length > 0) {
+        this.statementData.createStartTime = this.statementData.createTime[0]+ " " + "00:00:00"
+        this.statementData.createEndTime = this.statementData.createTime[1]+ " " + "23:59:59"
+        delete this.statementData.createTime
+      }
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(129),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.defaultOption;
+      const inSave = await this.delColumnData(this.getColumnName(129), this.defaultOption);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>

+ 317 - 0
src/views/statisticAnalysis/purchaseReconciliation/index.vue

@@ -0,0 +1,317 @@
+<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"
+            icon="el-icon-printer"
+            size="small"
+            :loading="exportLoading"
+            @click.stop="statement"
+          >报表打印
+          </el-button>
+        </template>
+        <template slot="brandSearch">
+          <el-select
+            v-model="search.brand"
+            filterable
+            clearable
+            multiple
+            collapse-tags
+          >
+            <el-option
+              v-for="(item, index) in brandOption"
+              :key="index"
+              :label="item.dictValue"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <report-dialog
+      :switchDialog="switchDialog"
+      :searchValue="statementData"
+      :reportName="'经销商-可用库存表'"
+      @onClose="onClose()"
+    />
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList, exportExcel } from "@/api/statisticAnalysis/salesReconciliation";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
+import reportDialog from "@/components/report-dialog/main";
+
+export default {
+  name: "index",
+  components: {
+    reportDialog
+  },
+  data() {
+    return {
+      exportLoading:false,
+      switchDialog:false,
+      statementData: {},
+      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: {},
+      defaultOption: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        showSummary: true,
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "采购单号",
+            prop: "orderNo",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "来源销售单号",
+            prop: "orgOrderNo",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "品牌",
+            prop: "brand",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            search: true,
+            type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            unlinkPanels: true,
+            searchRange: true,
+            overHidden: true,
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "采购金额",
+            prop: "amount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "已付金额",
+            prop: "settlmentAmount",
+            search: false,
+            overHidden: true,
+          },
+        ],
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      brandOption: [],
+    };
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(128), this.defaultOption);
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
+    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: {
+    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() {
+      delete this.search.corpName;
+      delete this.search.storageName
+      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) {
+      this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({}, params);
+      if (queryParams.businesDate && queryParams.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          orderStartDate: queryParams.businesDate[0] + ' 00:00:00',
+          orderEndDate: queryParams.businesDate[1] + ' 23:59:59',
+        }
+        delete queryParams.businesDate;
+      }
+      getList(
+        page.currentPage,
+        page.pageSize,
+        queryParams
+      )
+        .then(res => {
+          if (res.data.data.records) {
+            res.data.data.records.forEach(e => {
+              e.itemLoading = true;
+            });
+          }
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 210;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
+    },
+    statement() {
+      this.statementData = {...this.search};
+      if (this.statementData.createTime && this.statementData.createTime.length > 0) {
+        this.statementData.createStartTime = this.statementData.createTime[0]+ " " + "00:00:00"
+        this.statementData.createEndTime = this.statementData.createTime[1]+ " " + "23:59:59"
+        delete this.statementData.createTime
+      }
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(128),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.defaultOption;
+      const inSave = await this.delColumnData(this.getColumnName(128), this.defaultOption);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>

+ 326 - 0
src/views/statisticAnalysis/salesmanCommission/index.vue

@@ -0,0 +1,326 @@
+<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"
+            icon="el-icon-printer"
+            size="small"
+            :loading="exportLoading"
+            @click.stop="statement"
+          >报表打印
+          </el-button>
+        </template>
+        <template slot="brandSearch">
+          <el-select
+            v-model="search.brand"
+            filterable
+            clearable
+            multiple
+            collapse-tags
+            placeholder="请选择 品牌"
+          >
+            <el-option
+              v-for="(item, index) in brandOption"
+              :key="index"
+              :label="item.dictValue"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </template>
+        <template slot="chargeMemberSearch">
+          <el-select
+            v-model="search.chargeMember"
+            filterable
+            clearable
+            placeholder="请选择 业务员"
+          >
+            <el-option
+              v-for="(item, index) in userList"
+              :key="index"
+              :label="item.realName"
+              :value="item.realName"
+            ></el-option>
+          </el-select>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <report-dialog
+      :switchDialog="switchDialog"
+      :searchValue="statementData"
+      :reportName="'经销商-可用库存表'"
+      @onClose="onClose()"
+    />
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList, exportExcel } from "@/api/statisticAnalysis/salesReconciliation";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
+import reportDialog from "@/components/report-dialog/main";
+import { gainUser } from "@/api/basicData/customerInquiry";
+
+export default {
+  name: "index",
+  components: {
+    reportDialog
+  },
+  data() {
+    return {
+      exportLoading:false,
+      switchDialog:false,
+      statementData: {},
+      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: {},
+      defaultOption: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        showSummary: true,
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "品牌",
+            prop: "brand",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "业务员",
+            prop: "chargeMember",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            search: true,
+            type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            unlinkPanels: true,
+            searchRange: true,
+            overHidden: true,
+          },
+          {
+            label: "尺寸",
+            prop: "size",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            search: false,
+            overHidden: true,
+          },
+        ],
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      brandOption: [],
+      userList: [],
+    };
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(130), this.defaultOption);
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
+    gainUser().then(res => {
+      this.userList = res.data.data;
+    });
+    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: {
+    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() {
+      delete this.search.corpName;
+      delete this.search.storageName
+      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) {
+      this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({}, params);
+      if (queryParams.businesDate && queryParams.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          orderStartDate: queryParams.businesDate[0] + ' 00:00:00',
+          orderEndDate: queryParams.businesDate[1] + ' 23:59:59',
+        }
+        delete queryParams.businesDate;
+      }
+      getList(
+        page.currentPage,
+        page.pageSize,
+        queryParams
+      )
+        .then(res => {
+          if (res.data.data.records) {
+            res.data.data.records.forEach(e => {
+              e.itemLoading = true;
+            });
+          }
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 210;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
+    },
+    statement() {
+      this.statementData = {...this.search};
+      if (this.statementData.createTime && this.statementData.createTime.length > 0) {
+        this.statementData.createStartTime = this.statementData.createTime[0]+ " " + "00:00:00"
+        this.statementData.createEndTime = this.statementData.createTime[1]+ " " + "23:59:59"
+        delete this.statementData.createTime
+      }
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(130),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.defaultOption;
+      const inSave = await this.delColumnData(this.getColumnName(130), this.defaultOption);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>