소스 검색

配件商城

caojunjie 2 년 전
부모
커밋
c5a1f45421

+ 30 - 3
src/views/Inventory/index.vue

@@ -9,6 +9,8 @@
         <template slot="menuLeft">
           <!-- <el-button type="primary" size="mini" @click.stop="newAdd()">新建产品
           </el-button> -->
+          <el-button type="info" size="small" @click="outExport">导出
+          </el-button>
         </template>
         <!-- <template slot-scope="{ row, index }" slot="id">
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.cname }}
@@ -45,12 +47,13 @@
     <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
   </div>
 </template>
-  
+
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
 import { getList, getAllgoods, submit } from "@/api/basicData/Inventory";
 import { multiply, sum, subtract, divide } from "@/util/calculate";
+import {getToken} from "@/util/auth";
 export default {
   name: "index",
   data() {
@@ -121,6 +124,31 @@ export default {
     newAdd() {
       this.show = false;
     },
+    //导出
+    outExport() {
+      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]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-stock/stockgoods/leading-out',      //跳转目标窗口的地址
+        query: {
+          ...config.params,    //括号内是要传递给新窗口的参数
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    },
     onLoad(page, params = {}) {
       let data = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
@@ -207,7 +235,7 @@ export default {
   }
 }
 </script>
-  
+
 <style  lang="scss"  scoped>
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
@@ -244,4 +272,3 @@ export default {
   }
 }
 </style>
-  

+ 4 - 3
src/views/exportTrade/purchaseContract/index.vue

@@ -160,9 +160,9 @@
             </el-scrollbar>
           </el-col>
           <el-col :span="18">
+<!--            :page.sync="dialogPage"-->
             <avue-crud :data="dialogData"
                    :option="dialogOption"
-                   :page.sync="dialogPage"
                    :search.sync="params"
                    ref="dialogCrud"
                    @resetColumn="resetColumnTwo('dialogCrud','dialogOption','dialogOptionList',2.1)"
@@ -277,7 +277,8 @@ export default {
         searchIcon: true,
         searchIndex: 2,
         tip: false,
-        column: [{
+        column: [
+            {
           label: "销售单号",
           prop: "billNo",
           search: true,
@@ -556,7 +557,7 @@ export default {
       }
       listXS(params).then(res => {
         this.dialogLoading = false
-        this.dialogData = res.data.data.records
+        this.dialogData = res.data.data
         this.dialogPage.total = res.data.data.total
       })
     },

+ 22 - 1
src/views/salesOrder/detailsPage.vue

@@ -205,6 +205,27 @@ export default {
             span: 8,
           },
           {
+            label: "订单来源",
+            prop: "orderSource",
+            disabled: true,
+            type: 'select',
+            dataType:'number',
+            dicData: [
+              {
+                label: "APP/PC",
+                value: 1
+              },
+              {
+                label: "小程序",
+                value: 2
+              }],
+            props: {
+              label: 'label',
+              value: 'value'
+            },
+            span: 8,
+          },
+          {
             label: "送货地址",
             prop: "arrivalAddress",
             type: 'select',
@@ -215,7 +236,7 @@ export default {
             },
             allowCreate: true,
             filterable: true,
-            span: 24,
+            span: 16,
           },
           {
             label: "销售日期",

+ 9 - 0
src/views/salesOrder/index.vue

@@ -350,14 +350,23 @@ export default {
         this.$alert('是否继续发货', '未填写快递单号', {
           confirmButtonText: '确定',
           callback: action => {
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
             delivery({
               id:this.form.id,
               courierNumber:this.form.courierNumber,
               courierCorporation:this.form.courierCorporation
             }).then(res=>{
+              loading.close();
               this.$message.success("发货成功")
               this.dialogVisible = false
               this.onLoad(this.page)
+            }).catch(()=>{
+              loading.close();
             })
           }
         });

+ 2 - 2
src/views/salesOrder/js/optionList.js

@@ -2,7 +2,7 @@ import { number } from "echarts"
 
 export const option = {
   searchShow: true,
-  searchMenuSpan: 8,
+  searchMenuSpan: 24,
   align: "center",
   height:"auto",
   searchSpan: 8,
@@ -57,7 +57,7 @@ export const option = {
     {
       label: "电话",
       prop: "corpTel",
-      // search: true,
+      search: true,
       overHidden: true,
       index: 3
     },