Browse Source

修改bug

qukaidi 3 năm trước cách đây
mục cha
commit
6a71aab57d

+ 1 - 1
src/components/warehousKH/main.vue

@@ -12,7 +12,7 @@
             </template>
         </el-select>
         <el-tooltip class="item" effect="dark" content="获取最新客户资料" placement="top-start">
-            <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" :disabled="disabled"
+            <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'"
                 @click="refreshData"></el-button>
         </el-tooltip>
     </div>

+ 23 - 6
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -20,6 +20,7 @@
   "searchIcon": true,
   "searchIndex": 2,
   "searchSpan": 8,
+  "searchMenuSpan": 16,
   "showSummary": true,
   "summaryText": "合计",
   "sumColumnList": [
@@ -230,9 +231,24 @@
     {
       "label": "是否生成发货",
       "prop": "createFreight",
-      "search": false,
+      "search": true,
       "index": 21,
       "width": 100,
+      "type": "select",
+      "dicData": [
+        {
+          "id": 1,
+          "name": "是"
+        },
+        {
+          "id": 0,
+          "name": "否"
+        }
+      ],
+      "props": {
+        "label": "name",
+        "value": "id"
+      },
       "overHidden": true
     },
     {
@@ -267,10 +283,11 @@
     },
     {
       "type": "select",
-      "dicData": [{
-        "name": "已付款",
-        "id": "0"
-      },
+      "dicData": [
+        {
+          "name": "已付款",
+          "id": "0"
+        },
         {
           "name": "未付款",
           "id": "1"
@@ -290,4 +307,4 @@
       "overHidden": true
     }
   ]
-}
+}

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

@@ -108,7 +108,7 @@ export default {
       parentId: 0,
       dataList: [],
       page: {
-        pageSize: 10,
+        pageSize: 20,
         currentPage: 1,
         total: 0,
         pageSizes: [10, 50, 100, 200, 300]

+ 67 - 83
src/views/businessManagement/receipt/index.vue

@@ -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>

+ 1 - 1
src/views/maintenance/rebate/config/mainList.json

@@ -10,7 +10,7 @@
   "addBtn": false,
   "align": "center",
   "menuWidth": "120",
-  "menu": true,
+  "menu": false,
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,

+ 95 - 54
src/views/maintenance/rebate/index.vue

@@ -1,26 +1,25 @@
 <template>
   <div>
     <basic-container>
-      <avue-crud
-        :option="option"
-        :data="dataList"
-        ref="crud"
-        v-model="form"
-        :page.sync="page"
-        :search.sync="search"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        :table-loading="loading"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        @expand-change="expandChange"
-        @row-update="rowUpdate"
-      >
-        <template slot-scope="scope" slot="expand">
-          <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
+      <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" @expand-change="expandChange" @row-update="rowUpdate">
+        <template slot-scope="{row,index}" slot="expand">
+          <avue-crud :data="row.insideList" :option="expandOption">
+            <template slot="headerSerial">
+              <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow(row)" circle>
+              </el-button>
+            </template>
+            <template slot="menu">
+              <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowCell(row, index)">
+                {{ row.insideList.length > 0 && row.insideList[index].$cellEdit ?
+                    "保存" :
+                    "修改"
+                }}</el-button>
+            </template>
+          </avue-crud>
+          <!-- <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
             <el-table-column  label="订单号" prop="orderNo" align="center" show-overflow-tooltip width="200"></el-table-column>
             <el-table-column  label="变动总返利" prop="changeProfitReturn" align="center" show-overflow-tooltip width="200"></el-table-column>
             <el-table-column  label="变动已用返利" prop="changeUsedProfit" align="center" show-overflow-tooltip width="200">
@@ -28,42 +27,26 @@
             <el-table-column  label="变动可用返利" prop="changeSurplusProfit" align="center" show-overflow-tooltip width="200"></el-table-column>
             <el-table-column  label="变动本月待到账返利" prop="changeMonthProfit" align="center" show-overflow-tooltip width="200"></el-table-column>
             <el-table-column  label="变动时间" prop="createTime" align="center" show-overflow-tooltip width="200"></el-table-column>
-          </el-table>
-          <el-pagination
+          </el-table> -->
+          <!-- <el-pagination
             :total="page.total"
             small
             hide-on-single-page
             @size-change="insideSizeChange"
             @current-change="insideCurrentChange"
-          ></el-pagination>
+          ></el-pagination> -->
         </template>
         <template slot="corpIdSearch">
-          <crop-select
-            v-model="search.corpId"
-            corpType="KH"
-          ></crop-select>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpName }}
         </template>
         <template slot-scope="{ row, index }" slot="profitReturn">
-          <el-input
-            v-if="row.$cellEdit"
-            v-model="row.profitReturn"
-            placeholder="请输入"
-            size="small"
+          <el-input v-if="row.$cellEdit" v-model="row.profitReturn" placeholder="请输入" size="small"
             oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-            @change="profitChange(row)"
-          ></el-input>
-          <span v-else>{{row.profitReturn}}</span>
-        </template>
-        <template slot="menu" slot-scope="{ row, index }">
-          <el-button
-            size="small"
-            icon="el-icon-edit"
-            type="text"
-            @click="rowCell(row, index)"
-          >{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
+            @change="profitChange(row)"></el-input>
+          <span v-else>{{ row.profitReturn }}</span>
         </template>
       </avue-crud>
     </basic-container>
@@ -72,8 +55,8 @@
 
 <script>
 import option from './config/mainList.json';
-import {customerList,getRebateDetail} from "@/api/basicData/customerInformation";
-import {typeSave} from "@/api/basicData/customerInformation";
+import { customerList, getRebateDetail } from "@/api/basicData/customerInformation";
+import { typeSave } from "@/api/basicData/customerInformation";
 
 export default {
   name: "index",
@@ -95,6 +78,52 @@ export default {
         size: 10,
         current: 1,
       },
+      expandOption: {
+        border: true,
+        align: 'center',
+        menuAlign: 'center',
+        header: false,
+        index: true,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: "80",
+        dialogClickModal: false,
+        indexSlot: true,
+        column: [
+          {
+            label: '订单号',
+            prop: 'orderNo',
+            width: 100,
+            overHidden: true
+          }, {
+            label: '变动总返利',
+            prop: 'changeProfitReturn',
+            overHidden: true,
+            width: 120,
+            cell: true
+          }, {
+            label: '变动已用返利',
+            prop: 'changeUsedProfit',
+            width: 120,
+            overHidden: true
+          }, {
+            label: '变动可用返利',
+            prop: 'changeSurplusProfit',
+            width: 120,
+            overHidden: true
+          }, {
+            label: '变动本月待到账返利',
+            prop: 'changeMonthProfit',
+            width: 160,
+            overHidden: true
+          }, {
+            label: '变动时间',
+            prop: 'createTime',
+            width: 120,
+            overHidden: true
+          }
+        ]
+      },
     }
   },
   async created() {
@@ -104,7 +133,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";
@@ -147,8 +176,8 @@ export default {
           this.option.height = window.innerHeight - 240;
         }
         this.dataList.forEach(item => {
-          this.$set(item,'insideList',[])
-          this.$set(item,'loading', true)
+          this.$set(item, 'insideList', [])
+          this.$set(item, 'loading', true)
         })
       }).finally(() => {
         this.loading = false;
@@ -179,15 +208,23 @@ export default {
     },
     //编辑
     rowCell(row, index) {
-      this.$refs.crud.rowCell(row, index)
-      if (row.$cellEdit) {
-        this.saveProfit = row.profitReturn
+      // this.$refs.crud.rowCell(row, index)
+      console.log(row.insideList)
+      if (row.insideList[index].$cellEdit) {
+        typeSave(row).then(res => {
+          this.$message.success('保存成功')
+          row.insideList[index].$cellEdit = false
+        })
+        // done()
+        // this.saveProfit = row.profitReturn
+      } else {
+        row.insideList[index].$cellEdit = true
       }
     },
     // 修改保存调用
     rowUpdate(row, index, done) {
       typeSave(row).then(res => {
-        this.$message.success(row.id? '修改成功':'新增成功')
+        this.$message.success(row.id ? '修改成功' : '新增成功')
       })
       done()
     },
@@ -207,11 +244,14 @@ export default {
       //   row.loading = false
       // })
     },
+    addRow(row) {
+      row.insideList.push({ $cellEdit: true })
+    },
     // 表格展开触发
     expandChange(row, index) {
       if (row.loading) {
-        getRebateDetail({corpId: row.id}).then(res => {
-          row.insideList = res.data.data? res.data.data.records: []
+        getRebateDetail({ corpId: row.id }).then(res => {
+          row.insideList = res.data.data ? res.data.data.records : []
           row.loading = false
         })
       }
@@ -230,6 +270,7 @@ export default {
 /deep/ .el-table__expanded-cell .el-table__header-wrapper .cell {
   font-size: 8px !important;
 }
+
 /deep/ .el-table__body-wrapper .cell {
   font-size: 8px;
 }

+ 1 - 1
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -147,7 +147,7 @@
       "width": 100
     },
     {
-      "label": "数",
+      "label": "数",
       "prop": "second",
       "overHidden": true,
       "index": 15,

+ 3 - 3
src/views/workManagement/main-items/detailsPage.vue

@@ -129,12 +129,12 @@
             <span v-else>{{ row.frequency | frequencyFormat(frequencyList) }}</span>
           </template>
           <template slot="second" slot-scope="{ row }">
-            <el-select v-if="row.$cellEdit && row.frequency == 4" size="small" v-model="row.second" placeholder="请选择"
-              clearable>
+            <el-select v-if="row.$cellEdit && row.frequency >= 1 && row.frequency < 5" size="small" v-model="row.second"
+              placeholder="请选择" clearable>
               <el-option v-for="item in secondList" :key="item.id" :label="item.dictValue" :value="item.dictKey">
               </el-option>
             </el-select>
-            <span v-else>{{ row.frequency == 4 ? row.second : '-' }}</span>
+            <span v-else>{{ row.frequency !=5 ? row.second : '-' }}</span>
           </template>
           <template slot="amount" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.amount" placeholder="请输入" size="small"