|  | @@ -1,42 +1,20 @@
 | 
	
		
			
				|  |  |  <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"
 | 
	
		
			
				|  |  | -      >
 | 
	
		
			
				|  |  | +      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
 | 
	
		
			
				|  |  | +        :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
 | 
	
		
			
				|  |  | +        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
 | 
	
		
			
				|  |  | +        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
 | 
	
		
			
				|  |  |          <template slot="menuLeft">
 | 
	
		
			
				|  |  | -          <el-button type="info" size="small" @click="outExport"
 | 
	
		
			
				|  |  | -          >导出
 | 
	
		
			
				|  |  | -          </el-button
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | +          <el-button type="info" size="small" @click="outExport">导出
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot="corpIdSearch">
 | 
	
		
			
				|  |  |            <crop-select v-model="search.corpId" corpType="KH"></crop-select>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot="businesDateSearch">
 | 
	
		
			
				|  |  | -          <el-date-picker
 | 
	
		
			
				|  |  | -              v-model="search.businesDate"
 | 
	
		
			
				|  |  | -              type="daterange"
 | 
	
		
			
				|  |  | -              start-placeholder="开始日期"
 | 
	
		
			
				|  |  | -              end-placeholder="结束日期"
 | 
	
		
			
				|  |  | -              format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | -              value-format="yyyy-MM-dd HH:mm:ss"
 | 
	
		
			
				|  |  | -              :default-time="['00:00:00', '23:59:59']"
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | +          <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
 | 
	
		
			
				|  |  | +            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
 | 
	
		
			
				|  |  |            </el-date-picker>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </avue-crud>
 | 
	
	
		
			
				|  | @@ -45,8 +23,8 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import {getToken} from "@/util/auth";
 | 
	
		
			
				|  |  | -import {getList} from "@/api/statisticAnalysis/salesDetails"
 | 
	
		
			
				|  |  | +import { getToken } from "@/util/auth";
 | 
	
		
			
				|  |  | +import { getList } from "@/api/statisticAnalysis/salesDetails"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "index",
 | 
	
	
		
			
				|  | @@ -63,7 +41,7 @@ export default {
 | 
	
		
			
				|  |  |          total: 0,
 | 
	
		
			
				|  |  |          pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      option:{},
 | 
	
		
			
				|  |  | +      option: {},
 | 
	
		
			
				|  |  |        optionBack: {
 | 
	
		
			
				|  |  |          searchShow: true,
 | 
	
		
			
				|  |  |          searchMenuPosition: "right",
 | 
	
	
		
			
				|  | @@ -82,29 +60,33 @@ export default {
 | 
	
		
			
				|  |  |            name: "quantity",
 | 
	
		
			
				|  |  |            type: "sum",
 | 
	
		
			
				|  |  |            decimals: 2
 | 
	
		
			
				|  |  | -        },{
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            name: "amount",
 | 
	
		
			
				|  |  |            type: "sum",
 | 
	
		
			
				|  |  |            decimals: 2
 | 
	
		
			
				|  |  | -        },{
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            name: "price",
 | 
	
		
			
				|  |  |            type: "sum",
 | 
	
		
			
				|  |  |            decimals: 2
 | 
	
		
			
				|  |  | -        },{
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            name: "settlmentAmount",
 | 
	
		
			
				|  |  |            type: "sum",
 | 
	
		
			
				|  |  |            decimals: 2
 | 
	
		
			
				|  |  | -        },{
 | 
	
		
			
				|  |  | +        }, {
 | 
	
		
			
				|  |  |            name: "feesAmount",
 | 
	
		
			
				|  |  |            type: "sum",
 | 
	
		
			
				|  |  |            decimals: 2
 | 
	
		
			
				|  |  |          }],
 | 
	
		
			
				|  |  |          column: [
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | +            label: "订单号",
 | 
	
		
			
				|  |  | +            prop: "orderNo",
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  |              label: "客户名称",
 | 
	
		
			
				|  |  |              prop: "corpId",
 | 
	
		
			
				|  |  |              overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100,
 | 
	
		
			
				|  |  |              search: true,
 | 
	
		
			
				|  |  |              formatter: row => {
 | 
	
		
			
				|  |  |                return row.corpName;
 | 
	
	
		
			
				|  | @@ -128,82 +110,66 @@ export default {
 | 
	
		
			
				|  |  |              searchDefaultTime: ['00:00:00', '23:59:59'],
 | 
	
		
			
				|  |  |              overHidden: true,
 | 
	
		
			
				|  |  |              search: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "业务员",
 | 
	
		
			
				|  |  |              prop: "brand",
 | 
	
		
			
				|  |  |              overHidden: true,
 | 
	
		
			
				|  |  |              search: true,
 | 
	
		
			
				|  |  | -            width: 100,
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "产品编码",
 | 
	
		
			
				|  |  |              prop: "commodityCode",
 | 
	
		
			
				|  |  |              overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "规格",
 | 
	
		
			
				|  |  |              prop: "typeno",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "花纹",
 | 
	
		
			
				|  |  |              prop: "brandItem",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "数量",
 | 
	
		
			
				|  |  |              prop: "quantity",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "金额",
 | 
	
		
			
				|  |  |              prop: "amount",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "单价",
 | 
	
		
			
				|  |  |              prop: "price",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "回款额",
 | 
	
		
			
				|  |  |              prop: "settlmentAmount",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "包装费",
 | 
	
		
			
				|  |  |              prop: "feesAmount",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "特价金额",
 | 
	
		
			
				|  |  |              prop: "fd",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            label: "订单号",
 | 
	
		
			
				|  |  | -            prop: "orderNo",
 | 
	
		
			
				|  |  | -            overHidden: true,
 | 
	
		
			
				|  |  | -            width: 100
 | 
	
		
			
				|  |  | +            overHidden: true
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          ]
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    async created() {
 | 
	
		
			
				|  |  | -    // this.option = await this.getColumnData(this.getColumnName(130.1), this.optionBack);
 | 
	
		
			
				|  |  | -    this.option = this.optionBack
 | 
	
		
			
				|  |  | +    this.option = await this.getColumnData(this.getColumnName(130.1), this.optionBack);
 | 
	
		
			
				|  |  | +    // this.option = this.optionBack
 | 
	
		
			
				|  |  |      console.log(this.option);
 | 
	
		
			
				|  |  |      let i = 0;
 | 
	
		
			
				|  |  |      this.option.column.forEach(item => {
 | 
	
	
		
			
				|  | @@ -252,9 +218,9 @@ export default {
 | 
	
		
			
				|  |  |          delete data.careteTime
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        getList(
 | 
	
		
			
				|  |  | -          page.currentPage,
 | 
	
		
			
				|  |  | -          page.pageSize,
 | 
	
		
			
				|  |  | -          Object.assign(data)
 | 
	
		
			
				|  |  | +        page.currentPage,
 | 
	
		
			
				|  |  | +        page.pageSize,
 | 
	
		
			
				|  |  | +        Object.assign(data)
 | 
	
		
			
				|  |  |        ).then(res => {
 | 
	
		
			
				|  |  |          if (res.data.data.records) {
 | 
	
		
			
				|  |  |            res.data.data.records.forEach(e => {
 | 
	
	
		
			
				|  | @@ -273,7 +239,7 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      //列保存触发
 | 
	
		
			
				|  |  |      async saveColumn() {
 | 
	
		
			
				|  |  | -      const inSave = await this.saveColumnData(this.getColumnName(130.1),this.option);
 | 
	
		
			
				|  |  | +      const inSave = await this.saveColumnData(this.getColumnName(130.1), this.option);
 | 
	
		
			
				|  |  |        if (inSave) {
 | 
	
		
			
				|  |  |          this.$message.success("保存成功");
 | 
	
		
			
				|  |  |          //关闭窗口
 | 
	
	
		
			
				|  | @@ -303,7 +269,7 @@ export default {
 | 
	
		
			
				|  |  |            ...queryParams    //括号内是要传递给新窗口的参数
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  | -      window.open(routeData.href.slice(1,routeData.href.length-1)+'&'+`${this.website.tokenHeader}=${getToken()}`);
 | 
	
		
			
				|  |  | +      window.open(routeData.href.slice(1, routeData.href.length - 1) + '&' + `${this.website.tokenHeader}=${getToken()}`);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  };
 |