Browse Source

入库页面修改

liyuan 1 month ago
parent
commit
af07075948
1 changed files with 563 additions and 563 deletions
  1. 563 563
      src/views/storehouse/inStockManage/inStockPlan/index.vue

+ 563 - 563
src/views/storehouse/inStockManage/inStockPlan/index.vue

@@ -1,614 +1,614 @@
 <template>
-  <div>
-    <basic-container v-show="!detailsOpen">
-      <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
-        ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
-        @expand-change="expandChange" @refresh-change="refreshChange"
-        @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 274.4)"
-        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 274.4)" :page.sync="page">
-        <template slot-scope="{ row }" slot="expand">
-          <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
-            class="itemTable"></avue-crud>
-        </template>
-        <template slot-scope="{ row }" slot="status">
+    <div>
+        <basic-container v-show="!detailsOpen">
+            <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+                       ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
+                       @expand-change="expandChange" @refresh-change="refreshChange"
+                       @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 274.4)"
+                       @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 274.4)" :page.sync="page">
+                <template slot-scope="{ row }" slot="expand">
+                    <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading"
+                               :cell-style="cellStyle"
+                               class="itemTable"></avue-crud>
+                </template>
+                <template slot-scope="{ row }" slot="status">
           <span v-for="(item, index) in orderStatusList" :key="index">
             <span v-if="item.dictKey == row.status" :style="{ background: item.colour }" class="bottomBox">
               {{ item.dictValue }}
             </span>
           </span>
-        </template>
-        <template slot-scope="{ row }" slot="actualPaymentStatus">
+                </template>
+                <template slot-scope="{ row }" slot="actualPaymentStatus">
           <span v-for="(item, index) in actualStatusList" :key="index">
             <span v-if="item.dictKey == row.actualPaymentStatus" :style="{ background: item.colour }" class="bottomBox">
               {{ item.dictValue }}
             </span>
           </span>
-        </template>
-        <template slot-scope="{ row }" slot="returnsStatus">
+                </template>
+                <template slot-scope="{ row }" slot="returnsStatus">
           <span v-for="(item, index) in returnStatusList" :key="index">
             <span v-if="item.dictKey == row.returnsStatus" :style="{ background: item.colour }" class="bottomBox">
               {{ item.dictValue }}
             </span>
           </span>
-        </template>
-        <template slot-scope="{type,size,row,index}" slot="menu">
-          <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <!--  判断是否一键采购过 然后展示不同的判断按钮-->
-          <el-button :size="size" :type="type" :disabled="row.status != 0 && row.numberRows >= 1"
-            @click="$refs.crud.rowDel(row, index)">删除</el-button>
-        </template>
-        <template slot="corpNameSearch">
-          <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
-        </template>
-        <template slot="notCompleteSearch">
-          <el-checkbox v-model="search.notComplete" true-label="1"></el-checkbox>
-        </template>
-        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
-          <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
-        </template>
-        <template slot-scope="{ row, index }" slot="ordNo">
+                </template>
+                <template slot-scope="{type,size,row,index}" slot="menu">
+                    <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
+                    <!--  判断是否一键采购过 然后展示不同的判断按钮-->
+                    <el-button :size="size" :type="type" :disabled="row.status != 0 && row.numberRows >= 1"
+                               @click="$refs.crud.rowDel(row, index)">删除
+                    </el-button>
+                </template>
+                <template slot="corpNameSearch">
+                    <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
+                </template>
+                <template slot="notCompleteSearch">
+                    <el-checkbox v-model="search.notComplete" true-label="1"></el-checkbox>
+                </template>
+                <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+                    <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单
+                    </el-button>
+                    <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
+                </template>
+                <template slot-scope="{ row, index }" slot="ordNo">
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.ordNo }}
           </span>
-        </template>
-        <template slot-scope="{ row, index }" slot="srcOrdNo">
+                </template>
+                <template slot-scope="{ row, index }" slot="srcOrdNo">
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 3)">{{ row.srcOrdNo }}
           </span>
-        </template>
+                </template>
 
-      </avue-crud>
-    </basic-container>
-    <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
-  </div>
+            </avue-crud>
+        </basic-container>
+        <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
+    </div>
 </template>
 
 <script>
-import { getList, remove } from "@/api/storehouse/plan.js";
+import {getList, remove} from "@/api/storehouse/plan.js";
 import detailsPage from "./detailsPage"
-import { getDetails } from "@/api/tirePartsMall/salesManagement/saleOrder";
-import { getToken } from "@/util/auth";
+import {getDetails} from "@/api/tirePartsMall/salesManagement/saleOrder";
+import {getToken} from "@/util/auth";
 
 export default {
-  name: "index",
-  components: {
-    detailsPage
-  },
-  data() {
-    return {
-      orderStatusList: [],
-      actualStatusList: [],
-      returnStatusList: [],
-      detailsOpen: false,
-      loading: false,
-      search: {},
-      form: {},
-      dataList: [],
-      detailData: {},
-      page: {
-        pageSize: 20,
-        currentPage: 1,
-        total: 0,
-        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-      },
-      key: 0,
-      itemOption: {
-        align: "center",
-        header: false,
-        border: true,
-        menu: false,
-        column: [
-          {
-            label: '商品名称',
-            prop: 'goodsId',
-            width: 200,
-            overHidden: true,
-          }, {
-            label: '数量',
-            prop: 'goodsNum',
-            overHidden: true,
-            disabled: false,
-            width: 100,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }, {
-              validator: (rule, value, callback) => {
-                console.log(this.formContacts.inventory);
-                if (value < 0) {
-                  callback(new Error("数量不能小于0"));
-                } else {
-                  callback();
+    name: "index",
+    components: {
+        detailsPage
+    },
+    data() {
+        return {
+            orderStatusList: [],
+            actualStatusList: [],
+            returnStatusList: [],
+            detailsOpen: false,
+            loading: false,
+            search: {},
+            form: {},
+            dataList: [],
+            detailData: {},
+            page: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+            },
+            key: 0,
+            itemOption: {
+                align: "center",
+                header: false,
+                border: true,
+                menu: false,
+                column: [
+                    {
+                        label: '商品名称',
+                        prop: 'goodsId',
+                        width: 200,
+                        overHidden: true,
+                    }, {
+                        label: '数量',
+                        prop: 'goodsNum',
+                        overHidden: true,
+                        disabled: false,
+                        width: 100,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }, {
+                            validator: (rule, value, callback) => {
+                                console.log(this.formContacts.inventory);
+                                if (value < 0) {
+                                    callback(new Error("数量不能小于0"));
+                                } else {
+                                    callback();
+                                }
+                            },
+                            trigger: "blur"
+                        }]
+                    },
+                    {
+                        label: '价格',
+                        prop: 'price',
+                        overHidden: true,
+                        width: 100,
+                        disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }, {
+                            validator: (rule, value, callback) => {
+                                if (value < 0) {
+                                    callback(new Error("价格不能小于0"));
+                                } else {
+                                    callback();
+                                }
+                            },
+                            trigger: "blur"
+                        }]
+                    },
+                    {
+                        label: '库存',
+                        prop: 'inventory',
+                        overHidden: true,
+                        hide: true,
+                        width: 100
+                    }, {
+                        label: '批次号',
+                        prop: 'dot',
+                        type: "select",
+                        disabled: true,
+                        allowCreate: true,
+                        filterable: true,
+                        dicData: [],
+                        props: {
+                            label: "dot",
+                            value: "dot"
+                        },
+                        dicUrl: "/api/blade-sales-part/stockDesc/dotList",
+                        overHidden: true,
+                    }, {
+                        label: '商品编码',
+                        prop: 'goodsNo',
+                        overHidden: true,
+                        disabled: false,
+                        width: 100
+                    },
+                    {
+                        label: '品牌',
+                        prop: 'brandName',
+                        overHidden: true,
+                        disabled: false,
+                        width: 100
+                    },
+                    {
+                        label: '规格型号',
+                        prop: 'propertyName',
+                        overHidden: true,
+                        disabled: false,
+                        width: 100
+                    }, {
+                        label: '花纹',
+                        prop: 'pattern',
+                        overHidden: true,
+                        disabled: false,
+                        width: 100
+                    }, {
+                        label: '商品描述',
+                        prop: 'goodsDescription',
+                        disabled: false,
+                        overHidden: true,
+                        width: 100
+                    },
+                    {
+                        label: '收货数量',
+                        prop: 'sendNum',
+                        overHidden: true,
+                        width: 100,
+                        disabled: true,
+                        editDisplay: false,
+                        addDisplay: false
+                    }
+                ]
+            },
+            option: {},
+            optionList: {
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                addBtn: false,
+                index: true,
+                span: 8,
+                border: true,
+                height: "auto",
+                searchMenuPosition: "right",
+                align: "center",
+                size: "small",
+                menuWidth: 50,
+                searchSpan: 6,
+                searchMenuSpan: 12,
+                searchIcon: true,
+                searchIndex: 3,
+                highlightCurrentRow: true,
+                expand: true,
+                expandWidth: 60,
+                dialogWidth: "70%",
+                summaryText: "合计",
+                showSummary: true,
+                sumColumnList: [{
+                    name: 'goodsTotalNum',
+                    type: 'sum',
+                    decimals: 0
+                }, {
+                    name: 'totalMoney',
+                    type: 'sum',
+                    decimals: 2
+                },],
+                column: [{
+                    label: '单据编号',
+                    prop: "ordNo",
+                    search: true,
+                    overHidden: true,
+                },
+                    {
+                        label: '货主',
+                        prop: "customerName",
+                        type: 'select',
+                        search: true,
+                        overHidden: true,
+                        cell: true,
+                        width: 100,
+                        filterable: true,
+                        remote: true,
+                        props: {
+                            label: 'cname',
+                            value: 'cname',
+                            res: 'data.records'
+                        },
+                        dicUrl: '/api/blade-sales-part/corpsDesc/list?current=1&size=20&cname={{key}}',
+                    },
+                    {
+                        label: '仓库',
+                        prop: "storageName",
+                        search: true,
+                        // remote:true,
+                        overHidden: true,
+                        width: 100,
+                        type: 'select',
+                        props: {
+                            label: 'cname',
+                            value: 'cname'
+                        },
+                        dicUrl: '/api/blade-sales-part/tire/center/warehouse/storage/storageSelectedList?cname={{key}}',
+                    }, {
+                        label: '行数',
+                        prop: "numberRows",
+                        overHidden: true,
+                    },
+                    {
+                        label: '数量',
+                        prop: "goodsTotalNum",
+                        overHidden: true,
+                    }, {
+                        label: '业务日期',
+                        prop: "businesDate",
+                        overHidden: true,
+                        searchProp: "businesDateList",
+                        type: "date",
+                        unlinkPanels: true,
+                        search: true,
+                        width: 100,
+                        searchRange: true,
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss"
+                    },
+                    {
+                        label: '状态',
+                        prop: "status",
+                        search: true,
+                        overHidden: true,
+                        type: 'select',
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=center_plan_status",
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey"
+                        }
+                    },
+                    {
+                        label: '结算状态',
+                        prop: "actualPaymentStatus",
+                        searchProp: 'actualPaymentType',
+                        search: true,
+                        overHidden: true,
+                        type: 'select',
+                        dicData: [
+                            {
+                                label: "待付款",
+                                value: 1
+                            },
+                            {
+                                label: "已付款",
+                                value: 2
+                            }
+                        ],
+                        // dicUrl: "/api/blade-system/dict-biz/dictionary?code=settlement_Status",
+                        // props: {
+                        //   label: "dictValue",
+                        //   value: "dictKey"
+                        // }
+                    },
+                    // {
+                    //   label: '应结日期',
+                    //   prop: "dueDate",
+                    //   overHidden: true,
+                    // },
+                    /*        {
+                              label: '备注',
+                              prop: "remarks",
+                              overHidden: true,
+                            },*/
+                    {
+                        label: "制单人",
+                        prop: "createUser",
+                        searchProp: "createUser",
+                        width: 80,
+                        filterable: true,
+                        remote: true,
+                        search: true,
+                        overHidden: true,
+                        type: "select",
+                        dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+                        props: {
+                            label: "account",
+                            value: "id",
+                            res: 'data.records'
+                        }
+                    }, {
+                        label: "制单日期",
+                        prop: "createTime",
+                        searchProp: "createTimeList",
+                        type: "date",
+                        overHidden: true,
+                        width: 100,
+                        searchRange: true,
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss"
+                    }, {
+                        label: "更新人",
+                        prop: "updateUserName",
+                        searchProp: "updateUser",
+                        overHidden: true,
+                        width: 100,
+                        filterable: true,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+                        props: {
+                            label: "account",
+                            value: "id",
+                            res: 'data.records'
+                        }
+                    }, {
+                        label: "更新日期",
+                        prop: "updateTime",
+                        searchProp: "updateTimeList",
+                        type: "date",
+                        overHidden: true,
+                        width: 100,
+                        searchRange: true,
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss"
+                    }]
+            }
+        }
+    },
+    activated() {
+        setTimeout(() => {
+            console.log(this.$route.query, 400);
+            if (this.$route.query.srcId) {
+                this.$store.commit("IN_LTCG_STATUS");
+                this.editOpen({id: this.$route.query.srcId}, 1)
+            }
+            // 主页快捷跳转来的 直接打开新建订单
+            if (this.$route.query.showTrue) {
+                this.$store.commit("IN_LTCG_STATUS");
+                this.detailsOpen = true;
+            }
+            if (this.$route.query.check) {
+                this.editOpen({id: this.$route.query.check.srcBillId}, 1)
+                this.$store.commit("IN_LTCG_STATUS");
+            }
+            if (this.$route.query.type == 'F') {
+                this.editOpen({id: this.$route.query.detail.srcParentId}, 1)
+            }
+            this.detailData = {
+                id: this.$route.query.check.billId,
+                check: this.$route.query.check,
+                auditId: this.$route.query.check.id
+            };
+        }, 100);
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(274.4), this.optionList);
+        this.key++
+        let i = 0;
+        this.option.column.forEach(item => {
+            if (item.search) i++
+        })
+        this.getWorkDicts("center_plan_status").then(res => {
+            this.orderStatusList = res.data.data
+        });
+        this.getWorkDicts("settlement_Status").then(res => {
+            this.actualStatusList = res.data.data
+        });
+        this.getWorkDicts("return_Status").then(res => {
+            this.returnStatusList = res.data.data
+        });
+    },
+    methods: {
+        // 导出
+        outExport() {
+            console.log(this.search, 412)
+            let config = {params: {...this.search}}
+            if (config.params) {
+                for (const propName of Object.keys(config.params)) {
+                    const value = config.params[propName];
+                    if (value !== null && typeof (value) !== "undefined") {
+                        if (value instanceof Array) {
+                            for (const key of Object.keys(value)) {
+                                let params = propName + '[' + key + ']';
+                                config.params[params] = value[key]
+                            }
+                            delete config.params[propName]
+                        }
+                    }
                 }
-              },
-              trigger: "blur"
-            }]
-          },
-          {
-            label: '价格',
-            prop: 'price',
-            overHidden: true,
-            width: 100,
-            disabled: false,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }, {
-              validator: (rule, value, callback) => {
-                if (value < 0) {
-                  callback(new Error("价格不能小于0"));
-                } else {
-                  callback();
+            }
+            console.log(config, 427)
+            const routeData = this.$router.resolve({
+                path: '/api/blade-sales-part/order/listExport',      //跳转目标下载地址
+                query: {
+                    ...config.params    //括号内是要传递给新窗口的参数
                 }
-              },
-              trigger: "blur"
-            }]
-          },
-          {
-            label: '库存',
-            prop: 'inventory',
-            overHidden: true,
-            hide: true,
-            width: 100
-          }, {
-            label: '批次号',
-            prop: 'dot',
-            type: "select",
-            disabled: true,
-            allowCreate: true,
-            filterable: true,
-            dicData: [],
-            props: {
-              label: "dot",
-              value: "dot"
-            },
-            dicUrl: "/api/blade-sales-part/stockDesc/dotList",
-            overHidden: true,
-          }, {
-            label: '商品编码',
-            prop: 'goodsNo',
-            overHidden: true,
-            disabled: false,
-            width: 100
-          },
-          {
-            label: '品牌',
-            prop: 'brandName',
-            overHidden: true,
-            disabled: false,
-            width: 100
-          },
-          {
-            label: '规格型号',
-            prop: 'propertyName',
-            overHidden: true,
-            disabled: false,
-            width: 100
-          }, {
-            label: '花纹',
-            prop: 'pattern',
-            overHidden: true,
-            disabled: false,
-            width: 100
-          }, {
-            label: '商品描述',
-            prop: 'goodsDescription',
-            disabled: false,
-            overHidden: true,
-            width: 100
-          },
-          {
-            label: '收货数量',
-            prop: 'sendNum',
-            overHidden: true,
-            width: 100,
-            disabled: true,
-            editDisplay: false,
-            addDisplay: false
-          }
-        ]
-      },
-      option: {},
-      optionList: {
-        viewBtn: false,
-        editBtn: false,
-        delBtn: false,
-        addBtn: false,
-        index: true,
-        span: 8,
-        border: true,
-        height: "auto",
-        searchMenuPosition: "right",
-        align: "center",
-        size: "small",
-        menuWidth: 50,
-        searchSpan: 6,
-        searchMenuSpan: 12,
-        searchIcon: true,
-        searchIndex: 3,
-        highlightCurrentRow: true,
-        expand: true,
-        expandWidth: 60,
-        dialogWidth: "70%",
-        summaryText: "合计",
-        showSummary: true,
-        sumColumnList: [{
-          name: 'goodsTotalNum',
-          type: 'sum',
-          decimals: 0
-        }, {
-          name: 'totalMoney',
-          type: 'sum',
-          decimals: 2
-        },],
-        column: [{
-          label: '单据编号',
-          prop: "ordNo",
-          search: true,
-          overHidden: true,
+            })
+            window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
         },
-        {
-          label: '货主',
-          prop: "customerName",
-          type: 'select',
-          search: true,
-          overHidden: true,
-          cell: true,
-          width: 140,
-          filterable: true,
-          remote: true,
-          props: {
-            label: 'cname',
-            value: 'cname',
-            res: 'data.records'
-          },
-          dicUrl: '/api/blade-sales-part/corpsDesc/list?current=1&size=20&corpType=GYS&cname={{key}}',
+        check(row) {
+            this.form = row
+            this.detailsOpen = true
         },
-        {
-          label: '仓库',
-          prop: "storageName",
-          search: true,
-          // remote:true,
-          overHidden: true,
-          type: 'select',
-          props: {
-            label: 'cname',
-            value: 'cname'
-          },
-          dicUrl: '/api/blade-sales-part/tire/center/warehouse/storage/storageSelectedList?cname={{key}}',
-        }, {
-          label: '行数',
-          prop: "numberRows",
-          overHidden: true,
+        backToList(type) {
+            this.form = {}
+            this.detailsOpen = false
+            if (type === 0) {
+                this.detailData = {}
+            }
+            if (this.$route.query.srcId) {
+                this.$router.$avueRouter.closeTag(this.$route.fullPath);
+                this.$router.push({
+                    path: "/tirePartsMall/salesManagement/purchaseOrder/index"
+                });
+            }
+            this.$store.commit("OUT_LTCG_STATUS");
+            this.onLoad(this.page, this.search)
         },
-        {
-          label: '数量',
-          prop: "goodsTotalNum",
-          overHidden: true,
+        editOpen(row, status) {
+            this.form = row
+            this.detailData = {
+                id: row.id,
+                status: status
+            };
+            console.log(status);
+            this.$store.commit("IN_LTCG_STATUS");
+            this.detailsOpen = true;
         },
-        {
-          label: '已付金额',
-          prop: "paymentAmountTl",
-          disabled: true
+        //刷新
+        refreshChange() {
+            this.onLoad(this.page, this.search)
         },
-        {
-          label: '状态',
-          prop: "status",
-          search: true,
-          overHidden: true,
-          type: 'select',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=center_plan_status",
-          props: {
-            label: "dictValue",
-            value: "dictKey"
-          }
+        rowDel(form, index) {
+            this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                remove({id: form.id}).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: '删除成功!'
+                    });
+                    this.dataList.splice(index, 1);
+                    this.onLoad(this.page)
+                })
+            }).catch(() => {
+            });
         },
-        {
-          label: '结算状态',
-          prop: "actualPaymentStatus",
-          searchProp: 'actualPaymentType',
-          search: true,
-          overHidden: true,
-          type: 'select',
-          dicData: [
-            {
-              label: "待付款",
-              value: 1
-            },
-            {
-              label: "已付款",
-              value: 2
+        // 点击搜索触发
+        searchChange(params, done) {
+            this.page.currentPage = 1
+            done();
+            this.onLoad(this.page, params)
+        },
+        onLoad(page, params = {}) {
+            params = {
+                ...params,
+                current: page.currentPage,
+                size: page.pageSize,
+                bsType: 'RP',
+                ...Object.assign(params, this.search)
             }
-          ],
-          // dicUrl: "/api/blade-system/dict-biz/dictionary?code=settlement_Status",
-          // props: {
-          //   label: "dictValue",
-          //   value: "dictKey"
-          // }
+            this.loading = true
+            this.dataList.forEach(item => {
+                this.$refs.crud.toggleRowExpansion(item, false);
+            });
+            getList(params).then(res => {
+                if (res.data.data.records) {
+                    res.data.data.records.forEach(e => {
+                        e.itemLoading = true;
+                    });
+                }
+                this.dataList = res.data.data.records
+                this.page.total = res.data.data.total
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout()
+                    this.$refs.crud.dicInit()
+                })
+                this.loading = false
+            }).finally(() => {
+                this.loading = false
+            })
         },
-        // {
-        //   label: '应结日期',
-        //   prop: "dueDate",
-        //   overHidden: true,
-        // },
-        {
-          label: '备注',
-          prop: "remarks",
-          overHidden: true,
+        expandChange(row) {
+            if (!row.itemData) {
+                getDetails({id: row.id})
+                    .then(res => {
+                        this.dataList[row.$index].itemData = res.data.data.orderItemsList;
+                    })
+                    .finally(() => {
+                        this.dataList[row.$index].itemLoading = false;
+                    });
+            }
         },
-        {
-          label: "制单人",
-          prop: "createUserName",
-          searchProp: "createUser",
-          overHidden: true,
-          width: 100,
-          filterable: true,
-          remote: true,
-          type: "select",
-          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
-          props: {
-            label: "account",
-            value: "id",
-            res: 'data.records'
-          }
-        }, {
-          label: "制单日期",
-          prop: "createTime",
-          searchProp: "createTimeList",
-          type: "date",
-          overHidden: true,
-          width: 100,
-          searchRange: true,
-          searchDefaultTime: ["00:00:00", "23:59:59"],
-          format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd HH:mm:ss"
-        }, {
-          label: '业务日期',
-          prop: "businesDate",
-          overHidden: true,
-          searchProp: "businesDateList",
-          type: "date",
-          unlinkPanels: true,
-          search: true,
-          width: 100,
-          searchRange: true,
-          searchDefaultTime: ["00:00:00", "23:59:59"],
-          format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd HH:mm:ss"
-        }, {
-          label: "更新人",
-          prop: "updateUserName",
-          searchProp: "updateUser",
-          overHidden: true,
-          width: 100,
-          filterable: true,
-          remote: true,
-          type: "select",
-          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
-          props: {
-            label: "account",
-            value: "id",
-            res: 'data.records'
-          }
-        }, {
-          label: "更新日期",
-          prop: "updateTime",
-          searchProp: "updateTimeList",
-          type: "date",
-          overHidden: true,
-          width: 100,
-          searchRange: true,
-          searchDefaultTime: ["00:00:00", "23:59:59"],
-          format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd HH:mm:ss"
-        }]
-      }
-    }
-  },
-  activated() {
-    setTimeout(() => {
-      console.log(this.$route.query, 400);
-      if (this.$route.query.srcId) {
-        this.$store.commit("IN_LTCG_STATUS");
-        this.editOpen({ id: this.$route.query.srcId }, 1)
-      }
-      // 主页快捷跳转来的 直接打开新建订单
-      if (this.$route.query.showTrue) {
-        this.$store.commit("IN_LTCG_STATUS");
-        this.detailsOpen = true;
-      }
-      if (this.$route.query.check) {
-        this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
-        this.$store.commit("IN_LTCG_STATUS");
-      }
-      if (this.$route.query.type == 'F') {
-        this.editOpen({ id: this.$route.query.detail.srcParentId }, 1)
-      }
-      this.detailData = {
-        id: this.$route.query.check.billId,
-        check: this.$route.query.check,
-        auditId: this.$route.query.check.id
-      };
-    }, 100);
-  },
-  async created() {
-    this.option = await this.getColumnData(this.getColumnName(274.4), this.optionList);
-    this.key++
-    let i = 0;
-    this.option.column.forEach(item => {
-      if (item.search) i++
-    })
-    this.getWorkDicts("center_plan_status").then(res => {
-      this.orderStatusList = res.data.data
-    });
-    this.getWorkDicts("settlement_Status").then(res => {
-      this.actualStatusList = res.data.data
-    });
-    this.getWorkDicts("return_Status").then(res => {
-      this.returnStatusList = res.data.data
-    });
-  },
-  methods: {
-    // 导出
-    outExport() {
-      console.log(this.search, 412)
-      let config = { params: { ...this.search } }
-      if (config.params) {
-        for (const propName of Object.keys(config.params)) {
-          const value = config.params[propName];
-          if (value !== null && typeof (value) !== "undefined") {
-            if (value instanceof Array) {
-              for (const key of Object.keys(value)) {
-                let params = propName + '[' + key + ']';
-                config.params[params] = value[key]
-              }
-              delete config.params[propName]
+        //自定义列保存
+        async saveColumnTwo(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[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+        //自定义列重置
+        async resetColumnTwo(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[ref].$refs.dialogColumn.columnBox = false;
             }
-          }
-        }
-      }
-      console.log(config, 427)
-      const routeData = this.$router.resolve({
-        path: '/api/blade-sales-part/order/listExport',      //跳转目标下载地址
-        query: {
-          ...config.params    //括号内是要传递给新窗口的参数
-        }
-      })
-      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
-    },
-    check(row) {
-      this.form = row
-      this.detailsOpen = true
-    },
-    backToList(type) {
-      this.form = {}
-      this.detailsOpen = false
-      if (type === 0) {
-        this.detailData = {}
-      }
-      if (this.$route.query.srcId) {
-        this.$router.$avueRouter.closeTag(this.$route.fullPath);
-        this.$router.push({
-          path: "/tirePartsMall/salesManagement/purchaseOrder/index"
-        });
-      }
-      this.$store.commit("OUT_LTCG_STATUS");
-      this.onLoad(this.page, this.search)
-    },
-    editOpen(row, status) {
-      this.form = row
-      this.detailData = {
-        id: row.id,
-        status: status
-      };
-      console.log(status);
-      this.$store.commit("IN_LTCG_STATUS");
-      this.detailsOpen = true;
-    },
-    //刷新
-    refreshChange() {
-      this.onLoad(this.page, this.search)
-    },
-    rowDel(form, index) {
-      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        remove({ id: form.id }).then(res => {
-          this.$message({
-            type: 'success',
-            message: '删除成功!'
-          });
-          this.dataList.splice(index, 1);
-          this.onLoad(this.page)
-        })
-      }).catch(() => {
-      });
-    },
-    // 点击搜索触发
-    searchChange(params, done) {
-      this.page.currentPage = 1
-      done();
-      this.onLoad(this.page, params)
-    },
-    onLoad(page, params = {}) {
-      params = {
-        ...params,
-        current: page.currentPage,
-        size: page.pageSize,
-        bsType: 'RP',
-        ...Object.assign(params, this.search)
-      }
-      this.loading = true
-      this.dataList.forEach(item => {
-        this.$refs.crud.toggleRowExpansion(item, false);
-      });
-      getList(params).then(res => {
-        if (res.data.data.records) {
-          res.data.data.records.forEach(e => {
-            e.itemLoading = true;
-          });
         }
-        this.dataList = res.data.data.records
-        this.page.total = res.data.data.total
-        this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-          this.$refs.crud.dicInit()
-        })
-        this.loading = false
-      }).finally(() => {
-        this.loading = false
-      })
-    },
-    expandChange(row) {
-      if (!row.itemData) {
-        getDetails({ id: row.id })
-          .then(res => {
-            this.dataList[row.$index].itemData = res.data.data.orderItemsList;
-          })
-          .finally(() => {
-            this.dataList[row.$index].itemLoading = false;
-          });
-      }
-    },
-    //自定义列保存
-    async saveColumnTwo(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[ref].$refs.dialogColumn.columnBox = false;
-      }
-    },
-    //自定义列重置
-    async resetColumnTwo(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[ref].$refs.dialogColumn.columnBox = false;
-      }
     }
-  }
 }
 </script>
 
 <style lang="scss" scoped>
 .bottomBox {
-  padding: 3px 6px;
-  border-radius: 12px;
-  color: #fff;
-  font-size: 10px;
+    padding: 3px 6px;
+    border-radius: 12px;
+    color: #fff;
+    font-size: 10px;
 }
 
 ::v-deep .el-col-md-8 {
-  width: 24.33333%;
+    width: 24.33333%;
 }
 </style>