Browse Source

重写返利和溢付款页面,vuex,福达 贸易代理的bug

Qukatie 1 year ago
parent
commit
3d87e752f5

+ 3 - 0
src/page/index/tags.vue

@@ -483,6 +483,9 @@ export default {
         if (tag.label == "融资采购(L)") {
           this.$store.commit("OUT_FINACING_DETAIL")
         }
+        if (tag.label == "贸易代理(T)") {
+          this.$store.commit("OUT_MYDLT_STATUS")
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 2 - 1
src/store/getters.js

@@ -92,6 +92,7 @@ const getters = {
   firstSetStatus:state => state.ifdetail.firstSetStatus,//货款收费(T)
   exchangePurStatus:state => state.ifdetail.exchangePurStatus,//货款付费(T)
   balanceStatus:state => state.ifdetail.balanceStatus,//余额充值(T)
-  financingStatus:state => state.ifdetail.financingStatus//融资采购(L)
+  financingStatus:state => state.ifdetail.financingStatus,//融资采购(L)
+  mydlTStatus:state => state.ifdetail.mydlTStatus
 }
 export default getters

+ 12 - 0
src/store/modules/ifdetail.js

@@ -70,9 +70,18 @@ const ifdetail = {
     exchangePurStatus: false,//货款付费(T)
     balanceStatus: false,
     financingStatus: false,//融资采购(L)
+    mydlTStatus: false,
   },
   actions: {},
   mutations: {
+    //轮胎采购
+    IN_MYDLT_STATUS(state) {
+      state.mydlTStatus = true;
+    },
+    //退出详情页
+    OUT_MYDLT_STATUS(state) {
+      state.mydlTStatus = false;
+    },
     //开启融资采购(L)
     IN_FINACING_DETAIL(state) {
       state.financingStatus = true
@@ -775,6 +784,9 @@ const ifdetail = {
       if (tag.label == '融资采购(L)') {
         state.financingStatus = true
       }
+      if (tag.label == '贸易代理(T)') {
+        state.mydlTStatus = true
+      }
     }
   }
 

+ 12 - 1
src/views/iosBasicData/SeafreightExportF/bills/approvalDetails.vue

@@ -31,7 +31,7 @@
 
         <div style="margin-top: 65px">
             <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">
-                <el-tab-pane label="委托信息" name="wt">
+                <el-tab-pane label="委托1信息" name="wt">
                     <div>
                         <div>
                             <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
@@ -759,6 +759,8 @@ export default {
                         if (item.name == this.form.operatorName) {
                             this.$set(this.form,'accDeptName',item.deptName)
                             this.$set(this.form,'accDeptId',item.deptId)
+                            this.$set(this.form,'operatorDept',item.deptId)
+                            this.$set(this.form,'operatorDeptName',item.deptId)
                         }
                     }
                 }
@@ -869,8 +871,11 @@ export default {
                 // OP 下拉赋值 用户管理列表
                 for(let item of this.columnforfun('operatorName').dicData) {
                     if (item.name == value) {
+                        console.log(item)
                         this.form.operatorName = item.name
                         this.form.operatorId = item.id
+                        this.form.operatorDept=item.deptId
+                        this.form.operatorDeptName=item.deptName
                     }
                 }
             }
@@ -912,6 +917,8 @@ export default {
                         this.$set(this.form,'srcId',item.srcId)
                         this.$set(this.form,'srcCnName',item.srcCnName)
                         this.$set(this.form,'srcEnName',item.srcEnName)
+                        this.$set(this.form,'srcDeptId',item.deptId)
+                        this.$set(this.form,'srcDeptName',item.deptName)
                         this.columnforfun('srcType').disabled = false
                         this.columnforfun('srcCnName').disabled = false
                     }
@@ -965,13 +972,17 @@ export default {
                 }else {}
             }
             else if (name == 'srcCnName'){
+                console.log(11111)
                 for(let item of this.columnforfun('srcCnName').dicData) {
                     if (item[this.columnforfun('srcCnName').forParameter.value] == value) {
                         if (this.form.srcType == 'SALES') {
                             // 业务员
+                            console.log(item)
                             this.$set(this.form,'srcId',item.id)
                             this.$set(this.form,'srcCnName',item.name)
                             this.$set(this.form,'srcEnName',item.name)
+                            this.$set(this.form,'srcDeptId',item.deptId)
+                            this.$set(this.form,'srcDeptName',item.deptName)
                         }else if (this.form.srcType == 'AGENT') {
                             // 代理
                             this.$set(this.form,'srcId',item.id)

+ 8 - 0
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -979,6 +979,8 @@ export default {
                         if (item.name == this.form.operatorName) {
                             this.$set(this.form, 'accDeptName', item.deptName)
                             this.$set(this.form, 'accDept', item.deptId)
+                            this.$set(this.form,'operatorDept',item.deptId)
+                            this.$set(this.form,'operatorDeptName',item.deptId)
                         }
                     }
                 }
@@ -1209,6 +1211,8 @@ export default {
                     if (item.name == value) {
                         this.form.operatorName = item.name
                         this.form.operatorId = item.id
+                        this.form.operatorDept=item.deptId
+                        this.form.operatorDeptName=item.deptName
                     }
                 }
             }
@@ -1261,6 +1265,8 @@ export default {
                         this.$set(this.form, 'srcId', item.srcId)
                         this.$set(this.form, 'srcCnName', item.srcCnName)
                         this.$set(this.form, 'srcEnName', item.srcEnName)
+                        this.$set(this.form,'srcDeptId',item.deptId)
+                        this.$set(this.form,'srcDeptName',item.deptName)
                         this.columnforfun('srcType').disabled = false
                         this.columnforfun('srcCnName').disabled = false
                         // 航线带出往来单位的优势航线
@@ -1322,6 +1328,8 @@ export default {
                             this.$set(this.form, 'srcId', item.id)
                             this.$set(this.form, 'srcCnName', item.name)
                             this.$set(this.form, 'srcEnName', item.name)
+                            this.$set(this.form,'srcDeptId',item.deptId)
+                            this.$set(this.form,'srcDeptName',item.deptName)
                         } else if (this.form.srcType == 'AGENT') {
                             // 代理
                             this.$set(this.form, 'srcId', item.id)

+ 20 - 7
src/views/iosBasicData/costStatistics/index.vue

@@ -104,11 +104,14 @@ export default {
                         search: true,
                         type: 'select',
                         filterable: true,
+                        multiple: true,
+                        tags: true,
+                        dataType: 'string',
                         dicUrl: '/api/blade-los/bfees/listAll',
                         overHidden: true,
                         props: {
                             label: "cnName",
-                            value: "id"
+                            value: "cnName"
                         },
                     },
                     {
@@ -270,12 +273,22 @@ export default {
     methods: {
         rowCell(row) {
             if (row.type == 'MYDL') {
-                this.$router.push({
-                    path: `/tradeAgency/tradeAgency/index`,
-                    query: {
-                        params: row.srcId
-                    }
-                })
+                if (this.$store.getters.mydlTStatus) {
+                    this.$alert("贸易代理(T)页面已存在,请关闭贸易代理(T)再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/tradeAgency/tradeAgency/index`,
+                        query: {
+                            params: row.srcId
+                        }
+                    })
+                }
+
             }
             if (row.type == 'SE') {
                 if (this.$store.getters.seaFEStatus) {

+ 231 - 0
src/views/maintenance/overpayment/detailsPage.vue

@@ -0,0 +1,231 @@
+<template>
+    <div>
+        <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="goBack(0)">返回列表
+                </el-button>
+            </div>
+        </div>
+        <div style="margin-top: 50px">
+            <trade-card title="溢付款明细">
+                <avue-crud :option="option" :data="dataList" id="out-table" ref="crud" :page.sync="page"
+                    @current-change="currentChange" @size-change="sizeChange" @row-save="rowSave"
+                    @row-update="rowUpdate">
+                    <template slot-scope="{type,size,row,index}" slot="menu">
+                        <el-button icon="el-icon-edit" type="text" :disabled="row.identifier==0" @click="rowEdit(row, index)">编
+                            辑</el-button>
+                    </template>
+                </avue-crud>
+            </trade-card>
+        </div>
+    </div>
+</template>
+
+<script>
+import { overpaymentDetail, submit} from '@/api/maintenance/overpayment';
+export default {
+    name: "detailsPage",
+    data() {
+        return {
+            option: {
+                height: 'auto',
+                calcHeight: 30,
+                menuWidth: 60,
+                dialogWidth: '50%',
+                index: true,
+                indexFixed:false,
+                tip: false,
+                border: true,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                refreshBtn:false,
+                columnBtn: false,
+                align: 'center',
+                column: [
+                    {
+                        label: '发货单号',
+                        prop: 'billNo',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    },
+                    {
+                        label: '订单号',
+                        prop: 'orderNo',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    },
+                    {
+                        label: '来源单号',
+                        prop: 'srcOrderNo',
+                        cell: true,
+                        overHidden: true
+                    },
+                    {
+                        label: '金额',
+                        prop: 'overpayment',
+                        type: 'number',
+                        precision: 2,
+                        controls: false,
+                        overHidden: true
+                    },
+                    {
+                        label: '消费类型',
+                        prop: 'overpaymentType',
+                        type: 'select',
+                        dicData: [{
+                            label: '增加',
+                            value: 0
+                        }, {
+                            label: '消费',
+                            value: 1
+                        }],
+                        overHidden: true
+                    },
+                    {
+                        label: '创建时间',
+                        prop: 'createTime',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    },
+                    {
+                        label: '创建人',
+                        prop: 'createUserName',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    }
+                ]
+            },
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            dataList: []
+        }
+    },
+    props: {
+        detailData: Object
+    },
+    async created() {
+        if (this.detailData.id) {
+            this.getDetails(this.detailData.id, this.page)
+        }
+    },
+    activated() {
+        this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+            this.$refs.crud.refreshTable();
+        });
+    },
+    methods: {
+        rowSave(form, done, loading) {
+            if (form.overpayment == null||form.overpaymentType == null) {
+                this.$message.error('请输入变金额和消费类型!')
+                loading()
+                return
+            }
+            submit(form).then(res => {
+                this.$message.success('保存成功')
+                this.page.currentPage = 1
+                this.getDetails(this.detailData.id, this.page)
+                done()
+            }).finally(() => {
+                loading()
+            })
+        },
+        rowEdit(row, index) {
+            this.$refs.crud.rowEdit(row, index)
+        },
+        rowUpdate(form, index, done, loading) {
+            if (form.overpayment == null||form.overpaymentType == null) {
+                this.$message.error('请输入变金额和消费类型!')
+                loading()
+                return
+            }
+            submit(form).then(res => {
+                this.$message.success('修改成功')
+                this.getDetails(this.detailData.id, this.page)
+                done()
+            }).finally(() => {
+                loading()
+            })
+        },
+        currentChange(currentPage) {
+            this.page.currentPage = currentPage;
+            this.getDetails(this.detailData.id, this.page)
+        },
+        sizeChange(pageSize) {
+            this.page.pageSize = pageSize;
+            this.getDetails(this.detailData.id, this.page)
+        },
+        getDetails(id, page) {
+            let obj = {
+                size: this.page.pageSize,
+                current: this.page.currentPage,
+                pid: id
+            }
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            overpaymentDetail(obj).then(res => {
+                this.dataList = res.data.data.records;
+                this.page.total = res.data.data.total;
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                    this.$refs.crud.refreshTable();
+                });
+            }).finally(() => {
+                loading.close()
+            })
+        },
+        goBack(type) {
+            this.$emit("goBack", type);
+        },
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-form-item {
+    margin-bottom: 8px !important;
+}
+
+::v-deep .el-table .cell {
+    padding: 0 2px !important;
+
+    .el-form-item {
+        margin-bottom: 0px !important;
+    }
+
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+    left: -1px;
+}
+
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+}
+
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+}
+
+::v-deep .el-table--small td,
+.el-table--small th {
+    padding: 2px !important;
+}
+
+::v-deep .el-card__body {
+    padding: 3px 10px;
+}
+</style>

+ 140 - 225
src/views/maintenance/overpayment/index.vue

@@ -1,294 +1,209 @@
 <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"
-      >
-        <template slot-scope="scope" slot="expand">
-          <avue-crud :data="scope.row.insideList" :option="expandOption" :table-loading="scope.row.loading">
-            <template slot="headerSerial">
-              <el-button type="primary" icon="el-icon-plus"
-                         v-if="roleName.includes('admin') || roleName.includes('财务')" size="mini"
-                         @click.stop="addRow(scope.row)" circle>
-              </el-button>
-              <span v-else>序号</span>
-            </template>
-            <template slot="menu" slot-scope="{row,index}">
-              <el-button size="small" icon="el-icon-edit" :disabled="row.identifier == 0" type="text"
-                         @click.stop="rowCell(row,scope)">
-                {{ row.$cellEdit ? "保存" : "修改" }}
-              </el-button>
-            </template>
-          </avue-crud>
-<!--          <el-table :data="scope.row.insideList" v-loading="scope.row.loading">-->
-<!--            <el-table-column label="发货单号" prop="billNo" align="center" show-overflow-tooltip-->
-<!--                             width="200"></el-table-column>-->
-<!--            <el-table-column label="订单号" prop="orderNo" align="center" show-overflow-tooltip-->
-<!--                             width="200"></el-table-column>-->
-<!--            <el-table-column label="金额" prop="overpayment" align="center" show-overflow-tooltip-->
-<!--                             width="200"></el-table-column>-->
-<!--            <el-table-column label="消费类型" prop="overpaymentType" align="center" show-overflow-tooltip width="200">-->
-<!--              <template slot-scope="scope">-->
-<!--                <span>{{ scope.row.overpaymentType == 0 ? '增加' : '消费' }}</span>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-<!--            <el-table-column label="创建时间" prop="createTime" align="center" show-overflow-tooltip-->
-<!--                             width="200"></el-table-column>-->
-<!--            <el-table-column  label="创建人" prop="createUserName" align="center" show-overflow-tooltip width="200"></el-table-column>-->
-<!--          </el-table>-->
+    <basic-container v-if="isShow">
+      <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
+        id="out-table" :header-cell-class-name="headerClassName" ref="crud" @row-del="rowDel"
+        @search-change="searchChange" @search-reset="searchReset"
+        @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+        @resetColumn="resetColumn('crud', 'option', 'optionBack', 53)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 53)" @on-load="onLoad">
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
+        </template>
+        <template slot="corpId" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.corpName }}</span>
         </template>
         <template slot="corpIdSearch">
           <crop-select
-            v-model="search.corpId"
+            v-model="query.corpId"
             corpType="KH"
           ></crop-select>
         </template>
-        <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpName }}
-        </template>
       </avue-crud>
     </basic-container>
+    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
   </div>
 </template>
 
 <script>
-import option from './config/mainList.json';
-import {getList, overpaymentDetail, submit} from '@/api/maintenance/overpayment';
-
+import {getList} from '@/api/maintenance/overpayment';
+import detailsPage from "./detailsPage";
 export default {
-  name: "index",
   data() {
     return {
-      option: {},
-      dataList: [],
-      form: {},
+      detailData: {},
+      isShow: true,
+      query: {},
+      loading: false,
       page: {
-        pageSize: 20,
-        pagerCount: 5,
+        pageSize: 10,
         currentPage: 1,
-        total: 0,
-        pageSizes: [20, 30, 40, 50, 100, 200, 300, 400, 500]
+        total: 0
       },
-      expandOption: {
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        menuWidth: 140,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 12,
         border: true,
-        align: 'center',
-        menuAlign: 'center',
-        header: false,
         index: true,
+        addBtn: false,
+        viewBtn: false,
         editBtn: false,
         delBtn: false,
-        menuWidth: "80",
-        dialogClickModal: false,
-        indexSlot: true,
+        searchIcon: true,
+        align: 'center',
+        searchIndex: 3,
         column: [
           {
-            label: '发货单号',
-            prop: 'billNo',
-            overHidden: true
-          },
-          {
-            label: '订单号',
-            prop: 'orderNo',
-            overHidden: true
-          },
-          {
-            label: '来源单号',
-            prop: 'srcOrderNo',
-            cell: true,
-            overHidden: true
+            label: "编码",
+            prop: "corpCode",
+            search: true,
+            searchOrder: 1,
+            overHidden: true,
           },
           {
-            label: '金额',
-            prop: 'overpayment',
-            cell: true,
-            type: 'number',
-            precision: 2,
-            controls: false,
-            overHidden: true
+            label: "客户",
+            prop: "corpId",
+            search: true,
+            searchOrder: 2,
+            overHidden: true,
           },
           {
-            label: '消费类型',
-            prop: 'overpaymentType',
-            width: 80,
-            type: 'select',
-            dicData: [{
-              label: '增加',
-              value: 0
-            }, {
-              label: '消费',
-              value: 1
-            }],
-            cell: true,
-            overHidden: true
+            label: "增加",
+            prop: "inOverpayment",
+            overHidden: true,
           },
           {
-            label: '创建时间',
-            prop: 'createTime',
-            width: 150,
-            overHidden: true
+            label: "使用",
+            prop: "outOverpaymen",
+            overHidden: true,
           },
           {
-            label: '创建人',
-            width: 80,
-            prop: 'createUserName',
-            overHidden: true
+            label: "余额",
+            prop: "balanceOverpaymen",
+            overHidden: true,
           }
         ]
       },
-      search: {},
-      loading: false,
-      roleName: ''
-    }
+      data: [],
+    };
+  },
+  components: {
+    detailsPage
   },
   async created() {
-    // this.option = option
-    // 获取角色
-    this.roleName = localStorage.getItem('roleName')
-    this.option = await this.getColumnData(this.getColumnName(53), option);
-    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";
-    }
+    this.option = await this.getColumnData(this.getColumnName(53), this.optionBack);
   },
   methods: {
-    //明细新增
-    addRow(row) {
-      row.insideList.push({
-        pid: row.id,
-        $cellEdit: true
-      })
+    rowEdit(row) {
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false
     },
-    //编辑
-    rowCell(row,scope) {
-      if (row.$cellEdit) {
-        submit({
-          ...row
-        }).then(res => {
-          this.$message.success('保存成功')
-          // this.$set(row, "$cellEdit", false);
-          const loading = this.$loading({
-            lock: true,
-            text: '加载中',
-            spinner: 'el-icon-loading',
-            background: 'rgba(255,255,255,0.7)'
-          });
-          overpaymentDetail({pid: scope.row.id}).then(res => {
-            scope.row.insideList = res.data.data? res.data.data: []
-            scope.row.loading = false
-            loading.close();
-            this.$nextTick(() => {
-              this.$refs.crud.doLayout();
-            });
-          })
-        })
-      } else {
-        this.$set(row, "$cellEdit", true);
-      }
+    searchReset() {
+      this.query = this.$options.data().query;
+      this.onLoad(this.page);
     },
+    // 搜索按钮点击
     searchChange(params, done) {
-      this.onLoad(this.page, params);
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
       done();
     },
-    currentChange(val) {
-      this.page.currentPage = val;
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
     },
-    sizeChange(val) {
-      this.page.currentPage = 1;
-      this.page.pageSize = val;
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
     },
     refreshChange() {
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false)
-      })
-      this.page.currentPage = 1;
-      this.onLoad(this.page, this.search);
+      this.onLoad(this.page, this.query);
     },
-    onLoad(page, params) {
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false)
-      })
+    onLoad(page, params = {}) {
       this.loading = true;
-      getList(page.currentPage, page.pageSize, params)
-        .then(res => {
-          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 - 240;
-          }
-          this.dataList.forEach(item => {
-            this.$set(item,'insideList',[])
-            this.$set(item,'loading', true)
-          })
-        })
-        .finally(() => {
-          this.loading = false;
+      getList(page.currentPage, page.pageSize,this.query).then(res => {
+        this.data = res.data.data.records;
+        this.page.total = res.data.data.total;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+          this.$refs.crud.dicInit();
         });
+      }).finally(() => {
+        this.loading = false;
+      })
     },
-    // 表格展开触发
-    expandChange(row, index) {
-      if (row.loading) {
-        overpaymentDetail({pid: row.id}).then(res => {
-          row.insideList = res.data.data? res.data.data: []
-          row.loading = false
-          this.$nextTick(() => {
-            this.$refs.crud.doLayout();
-          });
-        })
-      }
+    // 详情的返回列表
+    goBack() {
+      this.detailData = {}
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
     },
-    async saveColumn() {
-      const inSave = await this.saveColumnData(
-        this.getColumnName(53),
-        this.option
-      );
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset()
       }
     },
-    async resetColumn() {
-      this.option = option;
-      const inSave = await this.delColumnData(
-        this.getColumnName(53),
-        option
-      );
+    //自定义列重置
+    async resetColumn(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (inSave) {
         this.$message.success("重置成功");
-        //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset()
       }
     },
-  },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
+        }
+      }
+      return back;
+    },
+
+  }
 }
+
 </script>
 
 <style scoped>
-/deep/ .el-table__expanded-cell .el-table__header-wrapper .cell {
-  //font-size: 8px !important;
-    font-size: 12px !important;
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+.pointerClick {
+  cursor: pointer;
+  color: #1e9fff;
 }
-/deep/ .el-table__body-wrapper .cell {
-  //font-size: 8px;
-    font-size: 12px;
+
+::v-deep .el-col-md-8 {
+  width: 24.33333%;
 }
-</style>
+</style>

+ 0 - 75
src/views/maintenance/rebate/config/mainList.json

@@ -1,75 +0,0 @@
-{
-  "searchShow": true,
-  "searchMenuSpan": 8,
-  "border": true,
-  "stripe": true,
-  "index": true,
-  "viewBtn": false,
-  "editBtn": false,
-  "delBtn": false,
-  "addBtn": false,
-  "align": "center",
-  "menuWidth": "120",
-  "menu": false,
-  "showSummary": true,
-  "searchIcon": true,
-  "searchIndex": 2,
-  "selection": true,
-  "tip":false,
-  "expand": true,
-  "expandWidth": 38,
-  "column": [
-    {
-      "label": "编码",
-      "prop": "code",
-      "search": true,
-      "index": 1,
-      "minWidth": 80,
-      "overHidden": true,
-      "searchSpan": 8
-    },
-    {
-      "label": "客户",
-      "prop": "cname",
-      "search": true,
-      "index": 2,
-      "minWidth": 80,
-      "overHidden": true,
-      "searchSpan": 8
-    },{
-      "label": "总返利",
-      "prop": "profitReturn",
-      "search": false,
-      "index": 3,
-      "minWidth": 80,
-      "overHidden": true,
-      "searchSpan": 8,
-      "cell": false,
-      "slot": true
-    },{
-      "label": "已用返利",
-      "prop": "usedProfit",
-      "search": false,
-      "index": 4,
-      "minWidth": 80,
-      "overHidden": true,
-      "searchSpan": 8
-    },{
-      "label": "可用返利",
-      "prop": "surplusProfit",
-      "search": false,
-      "index": 5,
-      "minWidth": 80,
-      "overHidden": true,
-      "searchSpan": 8
-    },{
-      "label": "本月待到账",
-      "prop": "monthProfit",
-      "search": false,
-      "index": 6,
-      "minWidth": 80,
-      "overHidden": true,
-      "searchSpan": 8
-    }
-  ]
-}

+ 214 - 0
src/views/maintenance/rebate/detailsPage.vue

@@ -0,0 +1,214 @@
+<template>
+    <div>
+        <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="goBack(0)">返回列表
+                </el-button>
+            </div>
+        </div>
+        <div style="margin-top: 50px">
+            <trade-card title="返利明细">
+                <avue-crud :option="option" :data="dataList" id="out-table" ref="crud" :page.sync="page"
+                    @current-change="currentChange" @size-change="sizeChange" @row-save="rowSave"
+                    @row-update="rowUpdate">
+                    <template slot-scope="{type,size,row,index}" slot="menu">
+                        <el-button icon="el-icon-edit" type="text" :disabled="row.id" @click="rowEdit(row, index)">编
+                            辑</el-button>
+                    </template>
+                </avue-crud>
+            </trade-card>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getRebateDetail } from "@/api/basicData/customerInformation";
+import { typeSave2 } from "@/api/basicData/customerInformation";
+export default {
+    name: "detailsPage",
+    data() {
+        return {
+            option: {
+                height: 'auto',
+                calcHeight: 30,
+                menuWidth: 60,
+                dialogWidth: '30%',
+                index: true,
+                indexFixed:false,
+                tip: false,
+                border: true,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                refreshBtn:false,
+                columnBtn: false,
+                align: 'center',
+                column: [
+                    {
+                        label: '订单号',
+                        prop: 'orderNo',
+                        overHidden: true,
+                        span: 24,
+                    }, {
+                        label: '变动总返利',
+                        prop: 'changeProfitReturn',
+                        overHidden: true,
+                        type: 'number',
+                        controls: false,
+                        span: 24,
+                    }, {
+                        label: '变动已用返利',
+                        prop: 'changeUsedProfit',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    }, {
+                        label: '变动可用返利',
+                        prop: 'changeSurplusProfit',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    }, {
+                        label: '变动本月待到账返利',
+                        prop: 'changeMonthProfit',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    }, {
+                        label: '变动时间',
+                        prop: 'createTime',
+                        addDisplay: false,
+                        editDisplay: false,
+                        overHidden: true
+                    }
+                ]
+            },
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            dataList: []
+        }
+    },
+    props: {
+        detailData: Object
+    },
+    async created() {
+        if (this.detailData.id) {
+            this.getDetails(this.detailData.id, this.page)
+        }
+    },
+    activated() {
+        this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+            this.$refs.crud.refreshTable();
+        });
+    },
+    methods: {
+        rowSave(form, done, loading) {
+            if (form.changeProfitReturn == null) {
+                this.$message.error('请输入变动总返利')
+                loading()
+                return
+            }
+            typeSave2(form).then(res => {
+                this.$message.success('保存成功')
+                this.page.currentPage = 1
+                this.getDetails(this.detailData.id, this.page)
+                done()
+            }).finally(() => {
+                loading()
+            })
+        },
+        rowEdit(row, index) {
+            this.$refs.crud.rowEdit(row, index)
+        },
+        rowUpdate(form, index, done, loading) {
+            if (form.changeProfitReturn == null) {
+                this.$message.error('请输入变动总返利')
+                loading()
+                return
+            }
+            typeSave2(form).then(res => {
+                this.$message.success('修改成功')
+                this.getDetails(this.detailData.id, this.page)
+                done()
+            }).finally(() => {
+                loading()
+            })
+        },
+        currentChange(currentPage) {
+            this.page.currentPage = currentPage;
+            this.getDetails(this.detailData.id, this.page)
+        },
+        sizeChange(pageSize) {
+            this.page.pageSize = pageSize;
+            this.getDetails(this.detailData.id, this.page)
+        },
+        getDetails(id, page) {
+            let obj = {
+                size: this.page.pageSize,
+                current: this.page.currentPage,
+                corpId: id
+            }
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            getRebateDetail(obj).then(res => {
+                this.dataList = res.data.data.records;
+                this.page.total = res.data.data.total;
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                    this.$refs.crud.refreshTable();
+                });
+            }).finally(() => {
+                loading.close()
+            })
+        },
+        goBack(type) {
+            this.$emit("goBack", type);
+        },
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-form-item {
+    margin-bottom: 8px !important;
+}
+
+::v-deep .el-table .cell {
+    padding: 0 2px !important;
+
+    .el-form-item {
+        margin-bottom: 0px !important;
+    }
+
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+    left: -1px;
+}
+
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+}
+
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+}
+
+::v-deep .el-table--small td,
+.el-table--small th {
+    padding: 2px !important;
+}
+
+::v-deep .el-card__body {
+    padding: 3px 10px;
+}
+</style>

+ 154 - 216
src/views/maintenance/rebate/index.vue

@@ -1,276 +1,214 @@
 <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="{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" slot-scope="{row,index}">
-              <el-button size="small" icon="el-icon-edit" :disabled="row.id" type="text" @click.stop="rowCell(row)">
-                {{ row.$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">
-            </el-table-column>
-            <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
-            :total="page.total"
-            small
-            hide-on-single-page
-            @size-change="insideSizeChange"
-            @current-change="insideCurrentChange"
-          ></el-pagination> -->
+    <basic-container v-if="isShow">
+      <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
+        id="out-table" :header-cell-class-name="headerClassName" ref="crud" @row-del="rowDel"
+        @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+        @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+        @resetColumn="resetColumn('crud', 'option', 'optionBack', 68)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 68)" @on-load="onLoad">
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
         </template>
-        <template slot="corpIdSearch">
-          <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"
-            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 slot="cname" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.cname }}</span>
         </template>
       </avue-crud>
     </basic-container>
+    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
   </div>
 </template>
 
 <script>
-import option from './config/mainList.json';
-import { customerList, getRebateDetail } from "@/api/basicData/customerInformation";
-import { typeSave2 } from "@/api/basicData/customerInformation";
-
+import { customerList } from "@/api/basicData/customerInformation";
+import detailsPage from "./detailsPage";
 export default {
-  name: "index",
   data() {
     return {
-      option: {},
-      dataList: [],
-      form: {},
+      detailData: {},
+      isShow: true,
+      query: {},
+      loading: false,
       page: {
-        pageSize: 20,
-        pagerCount: 5,
+        pageSize: 10,
         currentPage: 1,
-        total: 0,
-        pageSizes: [20, 30, 40, 50, 100, 200, 300, 400, 500]
-      },
-      search: {},
-      loading: false,
-      saveProfit: 0,
-      insidePage: {
-        total: 0,
-        size: 10,
-        current: 1,
+        total: 0
       },
-      expandOption: {
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        menuWidth: 140,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 12,
         border: true,
-        align: 'center',
-        menuAlign: 'center',
-        header: false,
         index: true,
+        addBtn: false,
+        viewBtn: false,
         editBtn: false,
         delBtn: false,
-        menuWidth: "80",
-        dialogClickModal: false,
-        indexSlot: true,
+        searchIcon: true,
+        align: 'center',
+        searchIndex: 3,
         column: [
           {
-            label: '订单号',
-            prop: 'orderNo',
-            width: 100,
-            cell: true,
-            overHidden: true
-          }, {
-            label: '变动总返利',
-            prop: 'changeProfitReturn',
+            label: "编码",
+            prop: "code",
+            search: true,
+            searchOrder: 1,
+            overHidden: true,
+          },
+          {
+            label: "客户",
+            prop: "cname",
+            search: true,
+            searchOrder: 2,
+            overHidden: true,
+          },
+          {
+            label: "总返利",
+            prop: "profitReturn",
+            overHidden: true,
+          },
+          {
+            label: "已用返利",
+            prop: "usedProfit",
+            overHidden: true,
+          },
+          {
+            label: "可用返利",
+            prop: "surplusProfit",
+            overHidden: true,
+          },
+          {
+            label: "本月待到账",
+            prop: "monthProfit",
             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
           }
         ]
       },
-    }
+      data: [],
+    };
+  },
+  components: {
+    detailsPage
   },
   async created() {
-    // this.option = option
-    this.option = await this.getColumnData(this.getColumnName(68), option);
-    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";
-    }
+    this.option = await this.getColumnData(this.getColumnName(68), this.optionBack);
   },
   methods: {
+    rowEdit(row) {
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false
+    },
+    searchReset() {
+      this.query = this.$options.data().query;
+      this.onLoad(this.page);
+    },
+    // 搜索按钮点击
     searchChange(params, done) {
-      this.onLoad(this.page, params);
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
       done();
     },
-    currentChange(val) {
-      this.page.currentPage = val;
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
     },
-    sizeChange(val) {
-      this.page.currentPage = 1;
-      this.page.pageSize = val;
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
     },
     refreshChange() {
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false)
-      })
-      this.page.currentPage = 1;
-      this.onLoad(this.page, this.search);
+      this.onLoad(this.page, this.query);
     },
-    onLoad(page, params = { parentId: 0 }) {
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false)
-      })
-      let queryParams = Object.assign({}, params, {
-        size: page.pageSize,
-        current: page.currentPage,
-        corpsTypeId: '',
-        corpType: 'KH'
-      });
+    onLoad(page, params = {}) {
+      let obj = {}
+      obj = {
+        size:this.page.pageSize,
+        current:this.page.currentPage,
+        ...Object.assign(params, this.query),
+      }
       this.loading = true;
-      customerList(queryParams).then(res => {
-        this.dataList = res.data.data.records;
+      customerList(obj).then(res => {
+        this.data = res.data.data.records;
         this.page.total = res.data.data.total;
-        if (this.page.total) {
-          this.option.height = window.innerHeight - 240;
-        }
-        this.dataList.forEach(item => {
-          this.$set(item, 'insideList', [])
-          this.$set(item, 'loading', true)
-        })
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+          this.$refs.crud.dicInit();
+        });
       }).finally(() => {
         this.loading = false;
-      });
+      })
+    },
+    // 详情的返回列表
+    goBack() {
+      this.detailData = {}
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
     },
-    async saveColumn() {
-      const inSave = await this.saveColumnData(
-        this.getColumnName(68),
-        this.option
-      );
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset()
       }
     },
-    async resetColumn() {
-      this.option = option;
-      const inSave = await this.delColumnData(
-        this.getColumnName(68),
-        option
-      );
+    //自定义列重置
+    async resetColumn(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (inSave) {
         this.$message.success("重置成功");
-        //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
-      }
-    },
-    //编辑
-    rowCell(row) {
-      if (row.$cellEdit) {
-        typeSave2(row).then(res => {
-          this.$message.success('保存成功')
-          this.$set(row, "$cellEdit", false);
-        })
-      } else {
-        this.$set(row, "$cellEdit", true);
-      }
-    },
-    // 修改保存调用
-    rowUpdate(row, index, done) {
-      typeSave2(row).then(res => {
-        this.$message.success(row.id ? '修改成功' : '新增成功')
-      })
-      done()
-    },
-    profitChange(row) {
-      if (Number(row.profitReturn) < Number(row.usedProfit)) {
-        row.profitReturn = this.saveProfit
-        return this.$message.error('总返利不能小于使用返利')
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset()
       }
-      row.surplusProfit = (Number(row.profitReturn) - Number(row.usedProfit)).toFixed(2)
     },
-    expandGetList() {
-      // const data = {
-      //   corpId: row.id
-      // }
-      // getRebateDetail({corpId: row.id}).then(res => {
-      //   row.insideList = res.data.data? res.data.data.records: []
-      //   row.loading = false
-      // })
-    },
-    addRow(row) {
-      row.insideList.push({corpId:row.id,$cellEdit: true })
-    },
-    // 表格展开触发
-    expandChange(row, index) {
-      if (row.loading) {
-        getRebateDetail({ corpId: row.id }).then(res => {
-          row.insideList = res.data.data ? res.data.data : []
-          row.loading = false
-        })
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
+        }
       }
+      return back;
     },
-    insideSizeChange(val) {
-      this.insidePage.size = val
-    },
-    insideCurrentChange(val) {
-      this.insidePage.current = val
-    },
-  },
+
+  }
 }
+
 </script>
 
 <style scoped>
-/deep/ .el-table__expanded-cell .el-table__header-wrapper .cell {
-  //font-size: 8px !important;
-    font-size: 12px !important;
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+.pointerClick {
+  cursor: pointer;
+  color: #1e9fff;
 }
 
-/deep/ .el-table__body-wrapper .cell {
-  //font-size: 8px;
-    font-size: 12px;
+::v-deep .el-col-md-8 {
+  width: 24.33333%;
 }
-</style>
+</style>

+ 5 - 1
src/views/tradeAgency/exchangePurchasing/detailsPage.vue

@@ -48,6 +48,10 @@
         <div style="margin-top: 50px">
             <trade-card title="基础信息">
                 <avue-form :option="optionForm" v-model="form" ref="form">
+                    <tempalte slot="remarks">
+                        <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks" :disabled="editDisabled">
+                        </el-input>
+                    </tempalte>
                 </avue-form>
             </trade-card>
             <!-- <trade-card title="货物明细">
@@ -65,7 +69,7 @@
             <containerTitle title="上传附件"></containerTitle>
             <c-upload :data="form.filesCenterList" :enumerationValue="76"
                 deleteUrl="/api/blade-los/filescenter/remove" display
-                :disabled="editDisabled || form.orderStatus == '已确认'"></c-upload>
+                :disabled="editDisabled"></c-upload>
             <!--审核弹窗-->
             <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>

+ 4 - 0
src/views/tradeAgency/firstSettlement/detailsPage.vue

@@ -32,6 +32,10 @@
         <div style="margin-top: 50px">
             <trade-card title="基础信息">
                 <avue-form :option="optionForm" v-model="form" ref="form">
+                    <tempalte slot="remarks">
+                        <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks" :disabled="editDisabled">
+                        </el-input>
+                    </tempalte>
                 </avue-form>
             </trade-card>
             <trade-card title="费用明细">

+ 26 - 4
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -16,7 +16,7 @@
                     @click="inEdit">编 辑
                 </el-button>
                 <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
-                    :disabled="isSaveBtn || form.status != 0" @click="submit">保 存
+                    :disabled="isSaveBtn" @click="submit">保 存
                 </el-button>
                 <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success"
                     size="small" :disabled="(form.status != 0 && form.status != 4)" @click="application">单据请核
@@ -167,6 +167,16 @@
                             :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
                             @selectChange="dicChange('mnotifyCntyCode', $event)" :searchShow="true"></dic-select>
                     </tempalte>
+                    <tempalte slot="operatorName">
+                        <dic-select v-model="form.operatorName" placeholder="操作员" key="id" label="realName"
+                            res="records" url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
+                            :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
+                            @selectChange="dicChange('operatorName', $event)"></dic-select>
+                    </tempalte>
+                    <tempalte slot="remarks">
+                        <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks" :disabled="editButton">
+                        </el-input>
+                    </tempalte>
                 </avue-form>
             </trade-card>
             <trade-card title="箱信息">
@@ -386,7 +396,7 @@
             </trade-card>
             <containerTitle title="上传附件"></containerTitle>
             <c-upload :data="form.filesList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                display :disabled="editDisabled"></c-upload>
+                display :disabled="editButton"></c-upload>
         </div>
         <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务" groupCode="销售报告"
             :type="1"></business-reports>
@@ -810,6 +820,10 @@ export default {
                             trigger: "blur"
                         }],
                     },
+                    {
+                        label: '操作员',
+                        prop: 'operatorName',
+                    },
                     // {
                     //     label: '业务员',
                     //     prop: "srcCnName",
@@ -1761,7 +1775,7 @@ export default {
             })
         },
         ckSubmit(row) {
-            if(row.storageFeePriceD==0||row.storageFeePriceD==null||row.storageFeePriceC==0||row.storageFeePriceC==null) return this.$message.success("仓储费单价收和仓储费单价付不能为空或0");
+            if (row.storageFeePriceD == 0 || row.storageFeePriceD == null || row.storageFeePriceC == 0 || row.storageFeePriceC == null) return this.$message.success("仓储费单价收和仓储费单价付不能为空或0");
             const loading = this.$loading({
                 lock: true,
                 text: '加载中',
@@ -1884,6 +1898,13 @@ export default {
                     this.form.mnotifyCntyCode = row.cnName
                 }
             }
+            if (name == 'operatorName') {
+                if (row) {
+                    this.form.operatorId = row.id
+                } else {
+                    this.form.operatorId = null
+                }
+            }
         },
         rowDicChange(name, row, el) {
             if (name == 'hsCode') {
@@ -2403,12 +2424,13 @@ export default {
                 done();
                 if (valid) {
                     for (let row of this.form.preContainersList) {
-                        console.log(row)
                         if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
                             return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
                         }
                     }
+                    console.log(1111)
                     if (this.$refs.feeInfo.submitValidate()) {
+                        console.log(22222)
                         const loading = this.$loading({
                             lock: true,
                             text: '加载中',

+ 6 - 0
src/views/tradeAgency/oceanFreightImport/index.vue

@@ -382,6 +382,12 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: '操作员',
+                        prop: 'operatorName',
+                        width: "80",
+                        overHidden: true
+                    },
+                    {
                         label: "创建日期",
                         prop: "createTime",
                         width: "100",

+ 14 - 6
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -16,7 +16,7 @@
                     @click="inEdit">编 辑
                 </el-button>
                 <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
-                    :disabled="isSaveBtn || form.businessStatus != '录入'" @click="submit">保 存
+                    :disabled="isSaveBtn" @click="submit">保 存
                 </el-button>
                 <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success"
                     size="small" :disabled="form.businessStatus != '录入'" @click="application">单据请核
@@ -188,6 +188,10 @@
                                 @selectChange="dicChange('salesmanName', $event)" :disabled="editDisabled"></dic-select>
                         </div>
                     </tempalte>
+                    <tempalte slot="remarks">
+                        <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks" :disabled="editButton">
+                        </el-input>
+                    </tempalte>
                 </avue-form>
             </trade-card>
             <trade-card title="货物明细">
@@ -371,7 +375,7 @@
             </trade-card>
             <containerTitle title="上传附件"></containerTitle>
             <c-upload :data="form.filesCenterList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                display :disabled="editDisabled"></c-upload>
+                display :disabled="editButton"></c-upload>
         </div>
         <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="MYDL"
             :type="true"></business-reports>
@@ -396,16 +400,14 @@
                 <el-button size="mini" type="primary" @click="wkSubmit">提 交</el-button>
             </span>
         </el-dialog>
-        <el-dialog append-to-body title="生成货代" class="el-dialogDeep" :visible.sync="hdDialog" width="30%" top="30vh"
+        <el-dialog append-to-body title="生成货代" class="el-dialogDeep" :visible.sync="hdDialog" width="400px" top="30vh"
             :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @closed="hdClosed"
             v-dialog-drag>
             <avue-form v-model="hdForm" :option="hdOption">
                 <tempalte slot="operatorName">
-                    <div style="display: flex;">
-                        <dic-select v-model="hdForm.operatorName" placeholder="操作员" key="id" label="realName"
+                    <dic-select v-model="hdForm.operatorName" placeholder="操作员" key="id" label="realName"
                             res="records" url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
                             @selectChange="dicChange('operatorName', $event)"></dic-select>
-                    </div>
                 </tempalte>
             </avue-form>
             <span slot="footer" class="dialog-footer">
@@ -1076,6 +1078,12 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: '操作员',
+                        prop: 'operatorName',
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         width: "120",

+ 5 - 0
src/views/tradeAgency/tradeAgency/index.vue

@@ -599,6 +599,7 @@ export default {
         setTimeout(() => {
             if (this.$route.query.params || this.$route.query.home) {
                 this.isShow = false
+                this.$store.commit("IN_MYDLT_STATUS")
             }
         }, 100);
     },
@@ -675,12 +676,14 @@ export default {
             this.detailData = {
                 new: true
             };
+            this.$store.commit("IN_MYDLT_STATUS")
         },
         copyButton() {
             this.isShow = false
             this.detailData = {
                 copyId: this.selectionList[0].itemId
             };
+            this.$store.commit("IN_MYDLT_STATUS")
         },
         allClick(name) {
             if (name == '生成申请付款') {
@@ -709,6 +712,7 @@ export default {
                 id: row.itemId
             };
             this.isShow = false
+            this.$store.commit("IN_MYDLT_STATUS")
         },
         // 删除
         rowDel(row, index) {
@@ -777,6 +781,7 @@ export default {
             }
             this.detailData = {}
             this.isShow = true;
+            this.$store.commit("OUT_MYDLT_STATUS")
             this.onLoad(this.page, this.query);
         },
         outExport() {