Explorar el Código

【修改】bug

howie hace 3 años
padre
commit
2773b62397

+ 11 - 0
src/api/stock.js

@@ -35,3 +35,14 @@ export function getReservedList(params) {
     params
   })
 }
+
+
+
+// 获取仓库现存列表
+export function getListStockToDay(params) {
+  return request({
+    url: '/stock/manager/listStockToDay',
+    method: 'get',
+    params
+  })
+}

+ 9 - 15
src/layout/components/Navbar.vue

@@ -144,20 +144,14 @@
 </template>
 
 <script>
-import { getRebateOrderMsg } from "@/api/dashboard";
-import { mapGetters } from "vuex";
-import Breadcrumb from "@/components/Breadcrumb";
-import Hamburger from "@/components/Hamburger";
-import Screenfull from "@/components/Screenfull";
-import NavMenu from "@/components/NavMenu";
-import { getNoticeListCount } from "@/api/notice";
-import {
-  checkEngineAccount,
-  bindEngineAccount,
-  delEngineAccount,
-} from "@/api/setting";
-import request from "@/utils/request";
-import { getToken } from '@/utils/auth'
+import { getRebateOrderMsg } from '@/api/dashboard'
+import { mapGetters } from 'vuex'
+import Breadcrumb from '@/components/Breadcrumb'
+import Hamburger from '@/components/Hamburger'
+import Screenfull from '@/components/Screenfull'
+import NavMenu from '@/components/NavMenu'
+import { getNoticeListCount } from '@/api/notice'
+import { bindEngineAccount, checkEngineAccount } from '@/api/setting'
 
 export default {
   data() {
@@ -234,7 +228,7 @@ export default {
     async logout() {
       await this.$store.dispatch("user/logout");
       // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
-      location.reload()
+      this.$store.commit('tagsView/SET_RESET_VIES')
       this.$router.push(`/login`);
 
     },

+ 80 - 78
src/store/modules/tagsView.js

@@ -1,160 +1,162 @@
 const state = {
   visitedViews: [],
-  cachedViews: []
-}
+  cachedViews: [],
+};
 
 const mutations = {
   ADD_VISITED_VIEW: (state, view) => {
-    if (state.visitedViews.some(v => v.path === view.path)) return
+    if (state.visitedViews.some((v) => v.path === view.path)) return;
     state.visitedViews.push(
       Object.assign({}, view, {
-        title: view.meta.title || 'no-name'
+        title: view.meta.title || "no-name",
       })
-    )
+    );
   },
   ADD_CACHED_VIEW: (state, view) => {
-    if (state.cachedViews.includes(view.name)) return
+    if (state.cachedViews.includes(view.name)) return;
     if (!view.meta.noCache) {
-      state.cachedViews.push(view.name)
+      state.cachedViews.push(view.name);
     }
   },
-
+  SET_RESET_VIES: (state, view) => {
+    state.visitedViews = [];
+  },
   DEL_VISITED_VIEW: (state, view) => {
     for (const [i, v] of state.visitedViews.entries()) {
       if (v.path === view.path) {
-        state.visitedViews.splice(i, 1)
-        break
+        state.visitedViews.splice(i, 1);
+        break;
       }
     }
   },
   DEL_CACHED_VIEW: (state, view) => {
-    const index = state.cachedViews.indexOf(view.name)
-    index > -1 && state.cachedViews.splice(index, 1)
+    const index = state.cachedViews.indexOf(view.name);
+    index > -1 && state.cachedViews.splice(index, 1);
   },
 
   DEL_OTHERS_VISITED_VIEWS: (state, view) => {
-    state.visitedViews = state.visitedViews.filter(v => {
-      return v.meta.affix || v.path === view.path
-    })
+    state.visitedViews = state.visitedViews.filter((v) => {
+      return v.meta.affix || v.path === view.path;
+    });
   },
   DEL_OTHERS_CACHED_VIEWS: (state, view) => {
-    const index = state.cachedViews.indexOf(view.name)
+    const index = state.cachedViews.indexOf(view.name);
     if (index > -1) {
-      state.cachedViews = state.cachedViews.slice(index, index + 1)
+      state.cachedViews = state.cachedViews.slice(index, index + 1);
     } else {
       // if index = -1, there is no cached tags
-      state.cachedViews = []
+      state.cachedViews = [];
     }
   },
 
-  DEL_ALL_VISITED_VIEWS: state => {
+  DEL_ALL_VISITED_VIEWS: (state) => {
     // keep affix tags
-    const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
-    state.visitedViews = affixTags
+    const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
+    state.visitedViews = affixTags;
   },
-  DEL_ALL_CACHED_VIEWS: state => {
-    state.cachedViews = []
+  DEL_ALL_CACHED_VIEWS: (state) => {
+    state.cachedViews = [];
   },
 
   UPDATE_VISITED_VIEW: (state, view) => {
     for (let v of state.visitedViews) {
       if (v.path === view.path) {
-        v = Object.assign(v, view)
-        break
+        v = Object.assign(v, view);
+        break;
       }
     }
-  }
-}
+  },
+};
 
 const actions = {
   addView({ dispatch }, view) {
-    dispatch('addVisitedView', view)
-    dispatch('addCachedView', view)
+    dispatch("addVisitedView", view);
+    dispatch("addCachedView", view);
   },
   addVisitedView({ commit }, view) {
-    commit('ADD_VISITED_VIEW', view)
+    commit("ADD_VISITED_VIEW", view);
   },
   addCachedView({ commit }, view) {
-    commit('ADD_CACHED_VIEW', view)
+    commit("ADD_CACHED_VIEW", view);
   },
 
   delView({ dispatch, state }, view) {
-    return new Promise(resolve => {
-      dispatch('delVisitedView', view)
-      dispatch('delCachedView', view)
+    return new Promise((resolve) => {
+      dispatch("delVisitedView", view);
+      dispatch("delCachedView", view);
       resolve({
         visitedViews: [...state.visitedViews],
-        cachedViews: [...state.cachedViews]
-      })
-    })
+        cachedViews: [...state.cachedViews],
+      });
+    });
   },
   delVisitedView({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_VISITED_VIEW', view)
-      resolve([...state.visitedViews])
-    })
+    return new Promise((resolve) => {
+      commit("DEL_VISITED_VIEW", view);
+      resolve([...state.visitedViews]);
+    });
   },
   delCachedView({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_CACHED_VIEW', view)
-      resolve([...state.cachedViews])
-    })
+    return new Promise((resolve) => {
+      commit("DEL_CACHED_VIEW", view);
+      resolve([...state.cachedViews]);
+    });
   },
 
   delOthersViews({ dispatch, state }, view) {
-    return new Promise(resolve => {
-      dispatch('delOthersVisitedViews', view)
-      dispatch('delOthersCachedViews', view)
+    return new Promise((resolve) => {
+      dispatch("delOthersVisitedViews", view);
+      dispatch("delOthersCachedViews", view);
       resolve({
         visitedViews: [...state.visitedViews],
-        cachedViews: [...state.cachedViews]
-      })
-    })
+        cachedViews: [...state.cachedViews],
+      });
+    });
   },
   delOthersVisitedViews({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_OTHERS_VISITED_VIEWS', view)
-      resolve([...state.visitedViews])
-    })
+    return new Promise((resolve) => {
+      commit("DEL_OTHERS_VISITED_VIEWS", view);
+      resolve([...state.visitedViews]);
+    });
   },
   delOthersCachedViews({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_OTHERS_CACHED_VIEWS', view)
-      resolve([...state.cachedViews])
-    })
+    return new Promise((resolve) => {
+      commit("DEL_OTHERS_CACHED_VIEWS", view);
+      resolve([...state.cachedViews]);
+    });
   },
 
   delAllViews({ dispatch, state }, view) {
-    return new Promise(resolve => {
-      dispatch('delAllVisitedViews', view)
-      dispatch('delAllCachedViews', view)
+    return new Promise((resolve) => {
+      dispatch("delAllVisitedViews", view);
+      dispatch("delAllCachedViews", view);
       resolve({
         visitedViews: [...state.visitedViews],
-        cachedViews: [...state.cachedViews]
-      })
-    })
+        cachedViews: [...state.cachedViews],
+      });
+    });
   },
   delAllVisitedViews({ commit, state }) {
-    return new Promise(resolve => {
-      commit('DEL_ALL_VISITED_VIEWS')
-      resolve([...state.visitedViews])
-    })
+    return new Promise((resolve) => {
+      commit("DEL_ALL_VISITED_VIEWS");
+      resolve([...state.visitedViews]);
+    });
   },
   delAllCachedViews({ commit, state }) {
-    return new Promise(resolve => {
-      commit('DEL_ALL_CACHED_VIEWS')
-      resolve([...state.cachedViews])
-    })
+    return new Promise((resolve) => {
+      commit("DEL_ALL_CACHED_VIEWS");
+      resolve([...state.cachedViews]);
+    });
   },
 
   updateVisitedView({ commit }, view) {
-    commit('UPDATE_VISITED_VIEW', view)
-  }
-}
+    commit("UPDATE_VISITED_VIEW", view);
+  },
+};
 
 export default {
   namespaced: true,
   state,
   mutations,
-  actions
-}
+  actions,
+};

+ 15 - 8
src/views/supply/deliver/sum_list.vue

@@ -68,6 +68,11 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货单号" prop="mainOrderId">
+                <el-input v-model="screenForm.mainOrderId" placeholder="请输入发货单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="存货类别" prop="type">
                 <el-select v-model="screenForm.type" placeholder="选择存货类别" style="width: 100%" clearable>
                   <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.name"></el-option>
@@ -179,22 +184,22 @@
             </el-table-column>
             <el-table-column align="right" label="发货折扣金额" prop="discAmount" min-width="110" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.discAmount | numToFixed}}
+                {{scope.row.totalDiscAmount | numToFixed}}
               </template>
             </el-table-column>
             <el-table-column align="right" label="折扣额合计" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.totalDiscAmount | numToFixed}}
+                {{(scope.row.totalDiscAmount + scope.row.payRebateAmount) | numToFixed}}
               </template>
             </el-table-column>
-               <el-table-column align="right" label="含税单价" prop="price" min-width="100" show-overflow-tooltip>
+               <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.price | numToFixed}}
+                {{scope.row.singlePayPrice | numToFixed}}
               </template>
             </el-table-column>
-              <el-table-column align="right" label="含税总额" prop="price" min-width="100" show-overflow-tooltip>
+              <el-table-column align="right" label="含税总额" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.price | numToFixed}}
+                {{scope.row.payAmount | numToFixed}}
               </template>
             </el-table-column>
             <el-table-column align="right" label="发货数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -232,9 +237,9 @@
 </template>
 
 <script>
-import { getSumList } from "@/api/supply/deliver";
+import { getSumList } from '@/api/supply/deliver'
 import { getCategoryList, getSalesmanList } from '@/api/common'
-import SumPrint from "@/views/supply/deliver/components/sum_print";
+import SumPrint from '@/views/supply/deliver/components/sum_print'
 
 export default {
   components: {
@@ -259,6 +264,7 @@ export default {
         orderNum: '',
         type: '',
         salesMan: '',
+        mainOrderId:''
       },
       categoryList: [],
       salesmanList: [],
@@ -338,6 +344,7 @@ export default {
         id: this.screenForm.orderNum,
         categoryName: this.screenForm.type,
         serviceId: this.screenForm.salesMan,
+        mainOrderId:this.screenForm.mainOrderId
       };
       getSumList(params).then((res) => {
         res.data.records.forEach(item => {