Prechádzať zdrojové kódy

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

QuKatie 3 rokov pred
rodič
commit
e4b322fda3

+ 34 - 0
src/api/basicData/rateManagement.js

@@ -0,0 +1,34 @@
+import request from '@/router/axios';
+//列表查询
+export function getRateList(params) {
+  return request({
+    url: '/api/blade-client/parities/page',
+    method: 'get',
+    params
+  })
+}
+//修改和保存
+export function typeSave(data) {
+  return request({
+    url: '/api/blade-client/parities/submit',
+    method: 'post',
+    data
+  })
+}
+//查看详情
+export function dataDetail(data) {
+  return request({
+    url: '/api/blade-client/parities/detail?id='+data,
+    method: 'get'
+  })
+}
+//列表删除
+export function deleteDetails(data) {
+  return request({
+    url: '/api/blade-client/parities/remove',
+    method: 'post',
+    params: {
+      ids: data
+    }
+  })
+}

+ 195 - 33
src/views/basicData/rateManagement/detailsPage.vue

@@ -38,7 +38,32 @@
           ref="form"
           v-model="form"
           :option="option"
-        />
+        >
+          <template slot="parities">
+            <el-input-number
+              v-model="form.parities"
+              size="small"
+              :controls="false"
+              style="width: 100%"
+              placeholder="请输入 默认汇率"
+            ></el-input-number>
+          </template>
+          <template slot="standardMoney">
+            <el-switch
+              v-model="form.standardMoney"
+              :active-value="1"
+              :inactive-value="0"
+            >
+            </el-switch>
+          </template>
+          <template slot="button">
+            <el-button
+              size="small"
+              type="primary"
+              @click="createExRate"
+            >产生汇率项目</el-button>
+          </template>
+        </avue-form>
       </basic-container>
       <containerTitle title="基础明细"></containerTitle>
       <basic-container>
@@ -59,7 +84,7 @@
 <script>
 import { getToken } from "@/util/auth";
 import { dateFormat } from "@/util/date";
-import { detail, submit, delItem } from "@/api/salaryManagement/primarySchool";
+import { typeSave, dataDetail } from "@/api/basicData/rateManagement";
 import { optionList } from "./js/optionList";
 import reportDialog from "@/components/report-dialog/main";
 export default {
@@ -80,15 +105,71 @@ export default {
         labelWidth: 100,
         column: [
           {
+            label: "货币代码",
+            prop: "code",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
             label: "货币名称",
-            prop: "a",
-            span: 6
+            prop: "cname",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
+            label: "默认汇率",
+            prop: "parities",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
+            label: "本位币",
+            prop: "standardMoney",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
+            label: "符号",
+            prop: "symbol",
+            span: 6,
+            rules: [
+              {
+                required: false,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
           },
           {
             label: "汇率类型",
-            prop: "b",
+            prop: "paritiesType",
             type: "select",
             filterable: true,
+            clearable:false,
             props: {
               label: "dictValue",
               value: "dictValue"
@@ -107,18 +188,32 @@ export default {
                 dictKey: 2
               }
             ],
-            span: 6
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
           },
           {
             label: "汇率年度",
-            prop: "c",
+            prop: "annual",
             type: "year",
             valueFormat: "yyyy",
-            span: 6
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
           },
           {
             label: "月份",
-            prop: "d",
+            prop: "moon",
             type: "select",
             filterable: true,
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=month",
@@ -127,8 +222,19 @@ export default {
               value: "dictKey"
             },
             span: 6,
-            display: false
-          }
+            display: false,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
+          },
+          {
+            prop: "button",
+            span: 6
+          },
         ]
       },
       optionList: optionList
@@ -143,6 +249,7 @@ export default {
     reportDialog
   },
   created() {
+    this.$set(this.form,'standardMoney', 0);
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -156,15 +263,14 @@ export default {
       return "padding:0;height:40px;";
     },
     getDetail(id) {
-      // detail(id)
-      //   .then(res => {
-      //     this.form = res.data.data;
-      //     this.getItemDetail();
-      //     this.getitemAnnex();
-      //   })
-      //   .finally(() => {
-      //     this.allloading = false;
-      //   });
+      dataDetail(id)
+        .then(res => {
+          this.form = res.data.data;
+          this.dataList = res.data.data.paritiesItemList? res.data.data.paritiesItemList: [];
+        })
+        .finally(() => {
+          this.allloading = false;
+        });
     },
     rowDel(row) {
       this.$confirm("确定删除数据?", {
@@ -178,7 +284,6 @@ export default {
               type: "success",
               message: "删除成功!"
             });
-            this.getItemDetail();
           });
         } else {
           this.$message({
@@ -195,15 +300,14 @@ export default {
         done();
         if (valid) {
           this.loadingBtn = true;
-          submit({
+          typeSave({
             ...this.form,
-            salaryType: "小学部",
-            salaryItemList: this.dataList
+            paritiesItemList: this.dataList
           })
             .then(res => {
               this.$message.success("保存成功");
-              this.form = res.data.data;
-              this.getItemDetail();
+              // this.form = res.data.data;
+              this.getDetail(res.data.data.id)
             })
             .finally(() => {
               this.loadingBtn = false;
@@ -244,17 +348,75 @@ export default {
       }
       this.$emit("goBack");
       this.leaveDetailsKey(this.$route.name);
-    }
+    },
+    // 产生汇率项目
+    createExRate() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          this.dataList = [];
+          if (this.form.paritiesType == '年汇率') {
+            const data = {
+              annual: this.form.annual,
+              receivableParities: this.form.parities,
+              handleParities: this.form.parities,
+              receiptsParities: this.form.parities,
+              actuallyParities: this.form.parities,
+            }
+            this.dataList.push(data)
+          } else if (this.form.paritiesType == '月汇率') {
+            for (let i = 1;i <= 12;i++) {
+              const data = {
+                annual: this.form.annual,
+                moon: i + '月',
+                receivableParities: this.form.parities,
+                handleParities: this.form.parities,
+                receiptsParities: this.form.parities,
+                actuallyParities: this.form.parities,
+              }
+              this.dataList.push(data)
+            }
+          } else if (this.form.paritiesType == '日汇率') {
+            const days = this.getCountDays(this.form.annual, this.form.moon)
+            for (let i = 1;i <= days;i++) {
+              const data = {
+                annual: this.form.annual,
+                moon: this.form.moon + '月',
+                national: i + '号',
+                receivableParities: this.form.parities,
+                handleParities: this.form.parities,
+                receiptsParities: this.form.parities,
+                actuallyParities: this.form.parities,
+              }
+              this.dataList.push(data)
+              console.log(this.dataList)
+            }
+          }
+        }
+      })
+    },
+    // 获取一个月的天数
+    getCountDays(curDate, month) {
+      let date = new Date(curDate);
+      date.setMonth(month);
+      date.setDate(0);
+      return date.getDate();
+    },
   },
   watch: {
-    "form.b": function(row) {
-      console.log(row);
+    "form.paritiesType": function(row) {
       if (row == "日汇率") {
-        this.findObject(this.option.column, "d").display = true;
-        this.findObject(this.optionList.column, "DAY").hide = false;
+        this.findObject(this.option.column, "moon").display = true;
+        this.findObject(this.optionList.column, "national").hide = false;
+        this.findObject(this.optionList.column, "moon").hide = false;
+      } else if (row == "月汇率") {
+        this.findObject(this.option.column, "moon").display = false;
+        this.findObject(this.optionList.column, "national").hide = true;
+        this.findObject(this.optionList.column, "moon").hide = false;
       } else {
-        this.findObject(this.option.column, "d").display = false;
-        this.findObject(this.optionList.column, "DAY").hide = true;
+        this.findObject(this.option.column, "moon").display = false;
+        this.findObject(this.optionList.column, "national").hide = true;
+        this.findObject(this.optionList.column, "moon").hide = true;
       }
     }
   }

+ 17 - 12
src/views/basicData/rateManagement/index.vue

@@ -53,7 +53,8 @@
 
 <script>
 import detailPage from "./detailsPage";
-import { getList, remove } from "@/api/salaryManagement/primarySchool";
+import { getRateList, deleteDetails } from "@/api/basicData/rateManagement";
+
 export default {
   name: "index",
   components: {
@@ -67,6 +68,7 @@ export default {
       loading: false,
       isShow: true,
       detailData: {},
+      search: {},
       page: {
         pageSize: 10,
         currentPage: 1
@@ -91,28 +93,28 @@ export default {
         column: [
           {
             label: "货币代码",
-            prop: "A",
+            prop: "code",
             overHidden: true,
             search:true
           },
           {
             label: "名称",
-            prop: "B",
+            prop: "cname",
             overHidden: true
           },
           {
             label: "符号",
-            prop: "C",
+            prop: "symbol",
             overHidden: true
           },
           {
             label: "本位币",
-            prop: "D",
+            prop: "standardMoney",
             overHidden: true
           },
           {
             label: "默认汇率",
-            prop: "E",
+            prop: "parities",
             overHidden: true
           },
           {
@@ -168,11 +170,14 @@ export default {
     },
     onLoad(page, params = {}) {
       this.loading = true;
-      params.salaryType = "小学部";
-      getList(
-        page.currentPage,
-        page.pageSize,
-        Object.assign(params, this.search)
+      let queryParams = {
+        ...params,
+        ...this.search,
+        size: page.pageSize,
+        current: page.currentPage,
+      }
+      getRateList(
+        queryParams
       )
         .then(res => {
           this.dataList = res.data.data.records ? res.data.data.records : [];
@@ -199,7 +204,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        remove(row.id).then(res => {
+        deleteDetails(row.id).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",

+ 9 - 8
src/views/basicData/rateManagement/js/optionList.js

@@ -38,39 +38,40 @@ export const optionList = {
   dialogFullscreen: true,
   column: [{
     label: "年",
-    prop: "A",
+    prop: "annual",
     width: 150,
     overHidden: true,
   }, {
     label: "月",
-    prop: "B",
+    prop: "moon",
     width: 150,
+    hide:true,
     overHidden: true,
   },{
     label: "日",
-    prop: "DAY",
+    prop: "national",
     width: 150,
     overHidden: true,
     hide:true,
     showColumn:false,
   }, {
     label: "应收汇率",
-    prop: "C",
+    prop: "receivableParities",
     width: 150,
     overHidden: true,
   }, {
     label: "应付汇率",
-    prop: "D",
+    prop: "handleParities",
     width: 150,
     overHidden: true,
   }, {
-    label: "实汇率",
-    prop: "E",
+    label: "实汇率",
+    prop: "receiptsParities",
     width: 150,
     overHidden: true,
   }, {
     label: "实付汇率",
-    prop: "F",
+    prop: "actuallyParities",
     width: 150,
     overHidden: true,
   }]

+ 50 - 3
src/views/dealer/purchase/config/mainList.json

@@ -18,7 +18,22 @@
   "searchSpan": 8,
   "showSummary": true,
   "summaryText": "合计",
-  "sumColumnList": [],
+  "expand": true,
+  "expandWidth": 38,
+  "sumColumnList": [
+    {
+      "name": "orderQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "debitAmount",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "采购订单号",
@@ -30,7 +45,7 @@
     },
     {
       "label": "供应商",
-      "prop": "corpId",
+      "prop": "strCorpName",
       "search": true,
       "index": 2,
       "minWidth": 80,
@@ -74,6 +89,38 @@
       "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",
@@ -82,7 +129,7 @@
       "label": "制单人",
       "prop": "createUser",
       "search": true,
-      "index": 7,
+      "index": 11,
       "width": 100,
       "overHidden": true
     }

+ 118 - 3
src/views/dealer/purchase/index.vue

@@ -20,22 +20,40 @@
         @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="corpId" slot-scope="scope">
+        <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="corpIdSearch">
+        <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"
@@ -76,7 +94,7 @@
 import option from './config/mainList.json';
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getPurchaseList, deleteDetails} from "@/api/dealer/purchase";
+import {getPurchaseList, deleteDetails, dataDetail} from "@/api/dealer/purchase";
 
 export default {
   name: "index",
@@ -97,6 +115,82 @@ export default {
       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() {
@@ -114,6 +208,11 @@ export default {
       this.option.searchMenuPosition = "right";
     }
   },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
@@ -188,6 +287,10 @@ export default {
       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;
@@ -251,6 +354,18 @@ export default {
         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>

+ 44 - 5
src/views/dealer/sales/config/mainList.json

@@ -17,7 +17,22 @@
   "searchSpan": 8,
   "showSummary": true,
   "summaryText": "合计",
-  "sumColumnList": [],
+  "expand": true,
+  "expandWidth": 38,
+  "sumColumnList": [
+    {
+      "name": "orderQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "debitAmount",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "销售订单号",
@@ -29,7 +44,7 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpId",
+      "prop": "corpsName",
       "search": true,
       "index": 2,
       "minWidth": 80,
@@ -103,17 +118,41 @@
     },
     {
       "label": "发货仓库",
-      "prop": "storageId",
+      "prop": "storageName",
       "search": true,
       "index": 10,
       "minWidth": 80,
       "overHidden": true
     },
     {
+      "label": "总数量",
+      "prop": "orderQuantity",
+      "search": true,
+      "index": 11,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "总金额",
+      "prop": "amount",
+      "search": true,
+      "index": 12,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "应收金额",
+      "prop": "debitAmount",
+      "search": true,
+      "index": 13,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
       "label": "系统编号",
       "prop": "sysNo",
       "search": true,
-      "index": 11,
+      "index": 14,
       "minWidth": 80,
       "overHidden": true
     },
@@ -126,7 +165,7 @@
       "label": "制单人",
       "prop": "createUser",
       "search": true,
-      "index": 12,
+      "index": 15,
       "width": 100,
       "overHidden": true
     }

+ 113 - 5
src/views/dealer/sales/index.vue

@@ -19,30 +19,43 @@
         @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="corpId" slot-scope="scope">
+        <template slot="corpsName" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
         </template>
-        <template slot="storageId" slot-scope="scope">
+        <template slot="storageName" slot-scope="scope">
           <span>{{ scope.row.storageName }}</span>
         </template>
         <template slot="createUser" slot-scope="scope">
           <span>{{ scope.row.createUserName }}</span>
         </template>
-        <template slot="storageIdSearch">
+        <template slot="amount" slot-scope="scope">
+          <span>{{ scope.row.amount | decimalFormat }}</span>
+        </template>
+        <template slot="storageNameSearch">
           <warehouse-select
             v-model="search.storageId"
             :configuration="configurationWarehouse"/>
         </template>
-        <template slot="corpIdSearch">
+        <template slot="corpsNameSearch">
           <crop-select
             v-model="search.corpId"
             corpType="KH"
           ></crop-select>
         </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"
@@ -83,7 +96,7 @@
 import option from './config/mainList.json';
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getSalesList, detail, deleteDetails} from "@/api/dealer/sales";
+import {getSalesList, dataDetail, deleteDetails} from "@/api/dealer/sales";
 
 export default {
   name: "index",
@@ -110,8 +123,82 @@ export default {
         multiple: false,
         collapseTags: false,
         placeholder: "请点击右边按钮选择",
+        clearable: true,
         dicData: [],
       },
+      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: "lotNo",
+            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
+          },
+        ]
+      },
     }
   },
   async created() {
@@ -133,6 +220,11 @@ export default {
       this.option.searchMenuPosition = "right";
     }
   },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
   methods: {
     searchCriteriaSwitch(type) {
       if (type){
@@ -204,6 +296,10 @@ export default {
       }
       delete queryParams.businesDate;
       getSalesList(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;
@@ -267,6 +363,18 @@ export default {
         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>