|  | @@ -1,60 +1,39 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  |      <basic-container v-show="isShow">
 | 
	
		
			
				|  |  | -      <avue-crud :option="option"
 | 
	
		
			
				|  |  | -                 :data="dataList"
 | 
	
		
			
				|  |  | -                 ref="crud"
 | 
	
		
			
				|  |  | -                 v-model="form"
 | 
	
		
			
				|  |  | -                 :page.sync="page"
 | 
	
		
			
				|  |  | -                 :search.sync="search"
 | 
	
		
			
				|  |  | -                 :table-loading="loading"
 | 
	
		
			
				|  |  | -                 @row-del="rowDel"
 | 
	
		
			
				|  |  | -                 @row-update="rowUpdate"
 | 
	
		
			
				|  |  | -                 :before-open="beforeOpen"
 | 
	
		
			
				|  |  | -                 :before-close="beforeClose"
 | 
	
		
			
				|  |  | -                 @row-save="rowSave"
 | 
	
		
			
				|  |  | -                 @search-change="searchChange"
 | 
	
		
			
				|  |  | -                 @search-reset="searchReset"
 | 
	
		
			
				|  |  | -                 @selection-change="selectionChange"
 | 
	
		
			
				|  |  | -                 @current-change="currentChange"
 | 
	
		
			
				|  |  | -                 @size-change="sizeChange"
 | 
	
		
			
				|  |  | -                 @refresh-change="refreshChange"
 | 
	
		
			
				|  |  | -                 @on-load="onLoad"
 | 
	
		
			
				|  |  | -                 @tree-load="treeLoad"
 | 
	
		
			
				|  |  | -                 @saveColumn="saveColumn"
 | 
	
		
			
				|  |  | -                 @resetColumn="resetColumn"
 | 
	
		
			
				|  |  | -                 @search-criteria-switch="searchCriteriaSwitch"
 | 
	
		
			
				|  |  | -                 :cell-style="cellStyle">
 | 
	
		
			
				|  |  | +      <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
 | 
	
		
			
				|  |  | +        :table-loading="loading" @row-del="rowDel" @row-update="rowUpdate" :before-open="beforeOpen"
 | 
	
		
			
				|  |  | +        :before-close="beforeClose" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
 | 
	
		
			
				|  |  | +        @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
 | 
	
		
			
				|  |  | +        @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @saveColumn="saveColumn"
 | 
	
		
			
				|  |  | +        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" :cell-style="cellStyle">
 | 
	
		
			
				|  |  |          <template slot="menuLeft" slot-scope="{size}">
 | 
	
		
			
				|  |  |            <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
 | 
	
		
			
				|  |  |            <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="warning" size="small" icon="el-icon-top" @click.stop="openExport()">导出
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="orgOrderNo">
 | 
	
		
			
				|  |  | -          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orgOrderNo }}</span>
 | 
	
		
			
				|  |  | +          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
 | 
	
		
			
				|  |  | +              scope.row.orgOrderNo
 | 
	
		
			
				|  |  | +          }}</span>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot="corpIdSearch">
 | 
	
		
			
				|  |  | -          <crop-select
 | 
	
		
			
				|  |  | -            v-model="search.corpId"
 | 
	
		
			
				|  |  | -            corpType="GYS"
 | 
	
		
			
				|  |  | -          ></crop-select>
 | 
	
		
			
				|  |  | +          <crop-select v-model="search.corpId" corpType="GYS"></crop-select>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="corpId">
 | 
	
		
			
				|  |  | -          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
 | 
	
		
			
				|  |  | +          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
 | 
	
		
			
				|  |  | +              scope.row.corpsName
 | 
	
		
			
				|  |  | +          }}</span>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot="salesCompanySearch">
 | 
	
		
			
				|  |  | -          <select-component
 | 
	
		
			
				|  |  | -            v-model="search.salesCompany"
 | 
	
		
			
				|  |  | -            :configuration="configuration"
 | 
	
		
			
				|  |  | -          ></select-component>
 | 
	
		
			
				|  |  | +          <select-component v-model="search.salesCompany" :configuration="configuration"></select-component>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="salesCompany">
 | 
	
		
			
				|  |  |            {{ scope.row.salesCompanyName }}
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot="storageIdSearch">
 | 
	
		
			
				|  |  | -          <warehouseSelect
 | 
	
		
			
				|  |  | -            v-model="search.storageId"
 | 
	
		
			
				|  |  | -            :configuration="configurationWarehouse"
 | 
	
		
			
				|  |  | -          ></warehouseSelect>
 | 
	
		
			
				|  |  | +          <warehouseSelect v-model="search.storageId" :configuration="configurationWarehouse"></warehouseSelect>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="storageId">
 | 
	
		
			
				|  |  |            {{ scope.row.storageName }}
 | 
	
	
		
			
				|  | @@ -63,41 +42,31 @@
 | 
	
		
			
				|  |  |            {{ scope.row.createUserName }}
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="menu">
 | 
	
		
			
				|  |  | -<!--          <el-button-->
 | 
	
		
			
				|  |  | -<!--            type="text"-->
 | 
	
		
			
				|  |  | -<!--            icon="el-icon-edit"-->
 | 
	
		
			
				|  |  | -<!--            size="small"-->
 | 
	
		
			
				|  |  | -<!--            @click.stop="editOpen(scope.row,scope.index)"-->
 | 
	
		
			
				|  |  | -<!--          >编辑-->
 | 
	
		
			
				|  |  | -<!--          </el-button>-->
 | 
	
		
			
				|  |  | -          <el-button
 | 
	
		
			
				|  |  | -            type="text"
 | 
	
		
			
				|  |  | -            icon="el-icon-delete"
 | 
	
		
			
				|  |  | -            size="small"
 | 
	
		
			
				|  |  | -            :disabled="scope.row.deliveryStatus === '已发货'"
 | 
	
		
			
				|  |  | -            @click.stop="rowDel(scope.row,scope.index)"
 | 
	
		
			
				|  |  | -          >删除
 | 
	
		
			
				|  |  | +          <!--          <el-button-->
 | 
	
		
			
				|  |  | +          <!--            type="text"-->
 | 
	
		
			
				|  |  | +          <!--            icon="el-icon-edit"-->
 | 
	
		
			
				|  |  | +          <!--            size="small"-->
 | 
	
		
			
				|  |  | +          <!--            @click.stop="editOpen(scope.row,scope.index)"-->
 | 
	
		
			
				|  |  | +          <!--          >编辑-->
 | 
	
		
			
				|  |  | +          <!--          </el-button>-->
 | 
	
		
			
				|  |  | +          <el-button type="text" icon="el-icon-delete" size="small" :disabled="scope.row.deliveryStatus === '已发货'"
 | 
	
		
			
				|  |  | +            @click.stop="rowDel(scope.row, scope.index)">删除
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </avue-crud>
 | 
	
		
			
				|  |  |      </basic-container>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <detail-page
 | 
	
		
			
				|  |  | -      ref="detail"
 | 
	
		
			
				|  |  | -      @goBack="goBack"
 | 
	
		
			
				|  |  | -      :detailData="detailData"
 | 
	
		
			
				|  |  | -      v-if="!isShow"
 | 
	
		
			
				|  |  | -    ></detail-page>
 | 
	
		
			
				|  |  | +    <detail-page ref="detail" @goBack="goBack" :detailData="detailData" v-if="!isShow"></detail-page>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import option from "./configuration/mainList.json";
 | 
	
		
			
				|  |  | -import {customerList, typeSave, deleteDetails} from "@/api/basicData/receipt"
 | 
	
		
			
				|  |  | +import { customerList, typeSave, deleteDetails } from "@/api/basicData/receipt"
 | 
	
		
			
				|  |  |  import detailPage from "./detailsPageEdit";
 | 
	
		
			
				|  |  |  import { defaultDate } from "@/util/date";
 | 
	
		
			
				|  |  |  import { gainUser } from "@/api/basicData/customerInquiry";
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +import { getToken } from "@/util/auth";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "customerInformation",
 | 
	
		
			
				|  |  |    components: {
 | 
	
	
		
			
				|  | @@ -131,7 +100,7 @@ export default {
 | 
	
		
			
				|  |  |          pageSize: 10,
 | 
	
		
			
				|  |  |          currentPage: 1,
 | 
	
		
			
				|  |  |          total: 0,
 | 
	
		
			
				|  |  | -        pageSizes: [10,50,100,200,300]
 | 
	
		
			
				|  |  | +        pageSizes: [10, 50, 100, 200, 300]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        // 非单个禁用
 | 
	
		
			
				|  |  |        single: true,
 | 
	
	
		
			
				|  | @@ -158,7 +127,7 @@ export default {
 | 
	
		
			
				|  |  |      this.option.column.forEach(item => {
 | 
	
		
			
				|  |  |        if (item.search) i++
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  | -    if (i % 3 !== 0){
 | 
	
		
			
				|  |  | +    if (i % 3 !== 0) {
 | 
	
		
			
				|  |  |        const num = 3 - Number(i % 3)
 | 
	
		
			
				|  |  |        this.option.searchMenuSpan = num * 8;
 | 
	
		
			
				|  |  |        this.option.searchMenuPosition = "right";
 | 
	
	
		
			
				|  | @@ -211,10 +180,10 @@ export default {
 | 
	
		
			
				|  |  |      cellStyle() {
 | 
	
		
			
				|  |  |        return "padding:0;height:40px;";
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    searchCriteriaSwitch(type){
 | 
	
		
			
				|  |  | -      if (type){
 | 
	
		
			
				|  |  | +    searchCriteriaSwitch(type) {
 | 
	
		
			
				|  |  | +      if (type) {
 | 
	
		
			
				|  |  |          this.option.height = this.option.height - 190
 | 
	
		
			
				|  |  | -      }else {
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  |          this.option.height = this.option.height + 190
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.$refs.crud.getTableHeight()
 | 
	
	
		
			
				|  | @@ -233,7 +202,7 @@ export default {
 | 
	
		
			
				|  |  |            message: "操作成功!"
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |          this.page.currentPage = 1;
 | 
	
		
			
				|  |  | -        this.onLoad(this.page, {parentId: 0});
 | 
	
		
			
				|  |  | +        this.onLoad(this.page, { parentId: 0 });
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //修改时的修改按钮点击触发
 | 
	
	
		
			
				|  | @@ -335,14 +304,14 @@ export default {
 | 
	
		
			
				|  |  |      //点击搜索按钮触发
 | 
	
		
			
				|  |  |      searchChange(params, done) {
 | 
	
		
			
				|  |  |        if (params.businessDate) {
 | 
	
		
			
				|  |  | -        this.$set(params, 'businessStartDate', params.businessDate[0]+ " " + "00:00:00")
 | 
	
		
			
				|  |  | -        this.$set(params, 'businessEndDate', params.businessDate[1]+ " " + "23:59:59")
 | 
	
		
			
				|  |  | -        this.$delete(params,'businessDate')
 | 
	
		
			
				|  |  | +        this.$set(params, 'businessStartDate', params.businessDate[0] + " " + "00:00:00")
 | 
	
		
			
				|  |  | +        this.$set(params, 'businessEndDate', params.businessDate[1] + " " + "23:59:59")
 | 
	
		
			
				|  |  | +        this.$delete(params, 'businessDate')
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if (params.createTime) {
 | 
	
		
			
				|  |  | -        this.$set(params, 'createStartTime', params.createTime[0]+ " " + "00:00:00")
 | 
	
		
			
				|  |  | -        this.$set(params, 'createEndTime', params.createTime[1]+ " " + "23:59:59")
 | 
	
		
			
				|  |  | -        this.$delete(params,'createTime')
 | 
	
		
			
				|  |  | +        this.$set(params, 'createStartTime', params.createTime[0] + " " + "00:00:00")
 | 
	
		
			
				|  |  | +        this.$set(params, 'createEndTime', params.createTime[1] + " " + "23:59:59")
 | 
	
		
			
				|  |  | +        this.$delete(params, 'createTime')
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.page.currentPage = 1;
 | 
	
		
			
				|  |  |        this.onLoad(this.page, params);
 | 
	
	
		
			
				|  | @@ -363,14 +332,30 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      refreshChange() {
 | 
	
		
			
				|  |  |        this.page.currentPage = 1;
 | 
	
		
			
				|  |  | -      this.onLoad(this.page,this.search);
 | 
	
		
			
				|  |  | +      this.onLoad(this.page, this.search);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    openExport() {
 | 
	
		
			
				|  |  | +      let queryParams = this.search
 | 
	
		
			
				|  |  | +      console.log(queryParams)
 | 
	
		
			
				|  |  | +      if (queryParams.createTime) {
 | 
	
		
			
				|  |  | +        queryParams.createStartTime = queryParams.createTime[0]
 | 
	
		
			
				|  |  | +        queryParams.createEndTime = queryParams.createTime[1]
 | 
	
		
			
				|  |  | +        delete queryParams.createTime
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      const routeData = this.$router.resolve({
 | 
	
		
			
				|  |  | +        path: '/api/blade-deliver-goods/reCeVing/exportOutFactoryDelivery',      //跳转目标窗口的地址
 | 
	
		
			
				|  |  | +        query: {
 | 
	
		
			
				|  |  | +          ...queryParams    //括号内是要传递给新窗口的参数
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      window.open(routeData.href.slice(1, routeData.href.length - 1) + '&' + `${this.website.tokenHeader}=${getToken()}`);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onLoad(page, params) {
 | 
	
		
			
				|  |  |        let data = this.gobackSearch(params)
 | 
	
		
			
				|  |  |        let queryParams = Object.assign({}, data, {
 | 
	
		
			
				|  |  |          size: page.pageSize,
 | 
	
		
			
				|  |  |          current: page.currentPage,
 | 
	
		
			
				|  |  | -        billType:'SH',
 | 
	
		
			
				|  |  | +        billType: 'SH',
 | 
	
		
			
				|  |  |          corpsTypeId: this.treeDeptId
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |        this.loading = true;
 | 
	
	
		
			
				|  | @@ -385,12 +370,12 @@ export default {
 | 
	
		
			
				|  |  |      //树桩列点击展开触发
 | 
	
		
			
				|  |  |      treeLoad(tree, treeNode, resolve) {
 | 
	
		
			
				|  |  |        const parentId = tree.id;
 | 
	
		
			
				|  |  | -      customerList({parentId: parentId}).then(res => {
 | 
	
		
			
				|  |  | +      customerList({ parentId: parentId }).then(res => {
 | 
	
		
			
				|  |  |          resolve(res.data.data.records);
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      goBack() {
 | 
	
		
			
				|  |  | -      this.detailData=this.$options.data().detailData
 | 
	
		
			
				|  |  | +      this.detailData = this.$options.data().detailData
 | 
	
		
			
				|  |  |        if (this.$route.query.form) {
 | 
	
		
			
				|  |  |          this.$router.$avueRouter.closeTag();
 | 
	
		
			
				|  |  |          this.$router.push({
 | 
	
	
		
			
				|  | @@ -404,14 +389,14 @@ export default {
 | 
	
		
			
				|  |  |      gobackSearch(params) {
 | 
	
		
			
				|  |  |        params = Object.assign({}, this.search)
 | 
	
		
			
				|  |  |        if (params.businessDate && params.businessDate != '') {
 | 
	
		
			
				|  |  | -        this.$set(params, 'businessStartDate', params.businessDate[0]+ " " + "00:00:00")
 | 
	
		
			
				|  |  | -        this.$set(params, 'businessEndDate', params.businessDate[1]+ " " + "23:59:59")
 | 
	
		
			
				|  |  | -        this.$delete(params,'businessDate')
 | 
	
		
			
				|  |  | +        this.$set(params, 'businessStartDate', params.businessDate[0] + " " + "00:00:00")
 | 
	
		
			
				|  |  | +        this.$set(params, 'businessEndDate', params.businessDate[1] + " " + "23:59:59")
 | 
	
		
			
				|  |  | +        this.$delete(params, 'businessDate')
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if (params.createTime && params.createTime != '') {
 | 
	
		
			
				|  |  | -        this.$set(params, 'createStartTime', params.createTime[0]+ " " + "00:00:00")
 | 
	
		
			
				|  |  | -        this.$set(params, 'createEndTime', params.createTime[1]+ " " + "23:59:59")
 | 
	
		
			
				|  |  | -        this.$delete(params,'createTime')
 | 
	
		
			
				|  |  | +        this.$set(params, 'createStartTime', params.createTime[0] + " " + "00:00:00")
 | 
	
		
			
				|  |  | +        this.$set(params, 'createEndTime', params.createTime[1] + " " + "23:59:59")
 | 
	
		
			
				|  |  | +        this.$delete(params, 'createTime')
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        return params
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -455,5 +440,4 @@ export default {
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <style scoped>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  </style>
 |