Prechádzať zdrojové kódy

添加显示已完成

Qukatie 1 rok pred
rodič
commit
bc1e335b67

+ 11 - 0
src/views/tirePartsMall/salesManagement/purchaseOrder/index.vue

@@ -24,6 +24,9 @@
         <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>
@@ -419,6 +422,14 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
+        },
+        {
+          label: '显示已完成',
+          prop: 'notComplete',
+          overHidden: true,
+          hide: true,
+          search: true,
+          searchslot: true
         }]
       }
     }

+ 88 - 80
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -7,22 +7,18 @@
         @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 269)"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 269)" :page.sync="page">
         <template slot-scope="{ row }" slot="status">
-          <span  v-for="item in orderStatusList"
-                 :style="{background: item.colour}"
-                 class="bottomBox"
-                 v-if="item.dictKey == row.status">
-              {{ item.dictValue }}
+          <span v-for="item in orderStatusList" :style="{ background: item.colour }" class="bottomBox"
+            v-if="item.dictKey == row.status">
+            {{ item.dictValue }}
           </span>
         </template>
-          <template slot-scope="{ row }" slot="actualPaymentStatus">
-            <span  v-for="item in actualStatusList"
-                   :style="{background: item.colour}"
-                   class="bottomBox"
-                   v-if="item.dictKey == row.actualPaymentStatus">
-              {{ item.dictValue }}
-            </span>
-          </template>
-          <!--actualPaymentStatus-->
+        <template slot-scope="{ row }" slot="actualPaymentStatus">
+          <span v-for="item in actualStatusList" :style="{ background: item.colour }" class="bottomBox"
+            v-if="item.dictKey == row.actualPaymentStatus">
+            {{ item.dictValue }}
+          </span>
+        </template>
+        <!--actualPaymentStatus-->
         <template slot-scope="{ row }" slot="expand">
           <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
             class="itemTable"></avue-crud>
@@ -36,6 +32,9 @@
         <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>
@@ -59,7 +58,7 @@
 import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import detailsPage from "./detailsPage"
 import { getDetails } from "@/api/tirePartsMall/salesManagement/saleOrder";
-import {getToken} from "@/util/auth";
+import { getToken } from "@/util/auth";
 
 export default {
   name: "index",
@@ -69,8 +68,8 @@ export default {
   data() {
     return {
       detailsOpen: false,
-      orderStatusList:[],
-      actualStatusList:[],
+      orderStatusList: [],
+      actualStatusList: [],
       loading: false,
       search: {},
       form: {},
@@ -188,7 +187,7 @@ export default {
         align: "center",
         size: "small",
         menuWidth: 50,
-        searchSpan: 8,
+        searchSpan: 16,
         searchIcon: true,
         expand: true,
         expandWidth: 60,
@@ -279,9 +278,9 @@ export default {
           prop: "numberRows",
           overHidden: true,
         }, {
-            label: '商品名称',
-            prop: "goodsNameJoin",
-            overHidden: true,
+          label: '商品名称',
+          prop: "goodsNameJoin",
+          overHidden: true,
         }, {
           label: '数量',
           prop: "goodsTotalNum",
@@ -291,10 +290,10 @@ export default {
           prop: "totalMoney",
           overHidden: true,
         }, {
-                label: '已收金额',
-                prop: "paymentAmountTl",
-                disabled: true
-            }, {
+          label: '已收金额',
+          prop: "paymentAmountTl",
+          disabled: true
+        }, {
           label: '状态',
           prop: "status",
           search: true,
@@ -305,7 +304,6 @@ export default {
             label: "dictValue",
             value: "dictKey"
           },
-          hide:true
         }, {
           label: '结算状态',
           prop: "actualPaymentStatus",
@@ -354,18 +352,18 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
-        },{
-            label: '收费日期',
-            prop: "paymentDate",
-            searchProp: "paymentDateList",
-            type: "date",
-            overHidden: 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: "paymentDate",
+          searchProp: "paymentDateList",
+          type: "date",
+          overHidden: 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: "createUserName",
@@ -418,18 +416,26 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
+        },
+        {
+          label: '显示已完成',
+          prop: 'notComplete',
+          overHidden: true,
+          hide: true,
+          search: true,
+          searchslot: true
         }]
       }
     }
   },
   activated() {
     setTimeout(() => {
-        console.log(this.$route.query,400)
-        // 主页快捷跳转来的 直接打开新建订单
-        if (this.$route.query.showTrue) {
-            this.$store.commit("IN_LTXS_STATUS");
-            this.detailsOpen = true;
-        }
+      console.log(this.$route.query, 400)
+      // 主页快捷跳转来的 直接打开新建订单
+      if (this.$route.query.showTrue) {
+        this.$store.commit("IN_LTXS_STATUS");
+        this.detailsOpen = true;
+      }
       if (this.$route.query.check) {
         this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
         this.$store.commit("IN_LTXS_STATUS");
@@ -461,42 +467,42 @@ export default {
       this.option.searchMenuPosition = "right";
     }
     this.getWorkDicts("sales_Status").then(res => {
-        this.orderStatusList = res.data.data
-        console.log(this.orderStatusList);
+      this.orderStatusList = res.data.data
+      console.log(this.orderStatusList);
+    });
+    this.getWorkDicts("settlement_Status").then(res => {
+      this.actualStatusList = res.data.data
     });
-      this.getWorkDicts("settlement_Status").then(res => {
-          this.actualStatusList = 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]
-                      }
-                  }
+    // 导出
+    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]
+            }
           }
-          console.log(config,427)
-          config.params.bsType = 'XS'
-          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()}`);
-      },
+        }
+      }
+      console.log(config, 427)
+      config.params.bsType = 'XS'
+      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
@@ -555,7 +561,7 @@ export default {
     },
     searchChange(params, done) {
       this.page.currentPage = 1
-      params.notComplete=1
+      params.notComplete = 1
       this.onLoad(this.page, params)
       done();
     },
@@ -579,6 +585,7 @@ export default {
         }
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+
         this.$nextTick(() => {
           this.$refs.crud.doLayout()
         })
@@ -619,10 +626,11 @@ export default {
   margin-left: 50px;
   width: 100%;
 }
+
 .bottomBox {
-    padding: 3px 6px;
-    border-radius: 12px;
-    color: #fff;
-    font-size: 10px;
+  padding: 3px 6px;
+  border-radius: 12px;
+  color: #fff;
+  font-size: 10px;
 }
 </style>