Browse Source

处理问题

yangg 1 year ago
parent
commit
f50b0213c4
74 changed files with 285 additions and 149 deletions
  1. 1 1
      manager-admin/dist/index.html
  2. BIN
      manager-admin/dist/static/js/0.2862943b7e7d37bcf250.js.gz
  3. 0 0
      manager-admin/dist/static/js/0.3eec1c14516b20fe9007.js
  4. BIN
      manager-admin/dist/static/js/0.3eec1c14516b20fe9007.js.gz
  5. 0 0
      manager-admin/dist/static/js/1.b0da4816312c42bad6f6.js
  6. 0 0
      manager-admin/dist/static/js/1.b0da4816312c42bad6f6.js.gz
  7. 0 0
      manager-admin/dist/static/js/13.73f94c196fd730fa20ec.js
  8. 0 0
      manager-admin/dist/static/js/13.73f94c196fd730fa20ec.js.gz
  9. 0 0
      manager-admin/dist/static/js/2.09d540c0f3564cc0cf0d.js
  10. BIN
      manager-admin/dist/static/js/2.09d540c0f3564cc0cf0d.js.gz
  11. BIN
      manager-admin/dist/static/js/2.4c4d54cfa3dc113c2c5f.js.gz
  12. BIN
      manager-admin/dist/static/js/35.0282b753de98617c3f16.js.gz
  13. 0 0
      manager-admin/dist/static/js/35.b71927b76f6135128a13.js
  14. BIN
      manager-admin/dist/static/js/35.b71927b76f6135128a13.js.gz
  15. 0 0
      manager-admin/dist/static/js/4.7248ef2a9d9c2b1a8cd6.js
  16. 0 0
      manager-admin/dist/static/js/4.7248ef2a9d9c2b1a8cd6.js.gz
  17. 0 0
      manager-admin/dist/static/js/43.a9f57db7455aead862e3.js
  18. BIN
      manager-admin/dist/static/js/43.a9f57db7455aead862e3.js.gz
  19. 0 0
      manager-admin/dist/static/js/44.dada9c01e6a2c9fa6618.js
  20. BIN
      manager-admin/dist/static/js/44.dada9c01e6a2c9fa6618.js.gz
  21. 0 0
      manager-admin/dist/static/js/45.1b53dc28284dfdc4af8a.js
  22. 0 0
      manager-admin/dist/static/js/45.a99a07d5cc3df9ed68ca.js
  23. BIN
      manager-admin/dist/static/js/45.a99a07d5cc3df9ed68ca.js.gz
  24. 0 0
      manager-admin/dist/static/js/50.6b54958b6424a33f6fb0.js
  25. 0 0
      manager-admin/dist/static/js/50.fc435ebb2de6ef255255.js
  26. BIN
      manager-admin/dist/static/js/50.fc435ebb2de6ef255255.js.gz
  27. 0 0
      manager-admin/dist/static/js/51.cde5c7e57dc7da531827.js
  28. BIN
      manager-admin/dist/static/js/51.cde5c7e57dc7da531827.js.gz
  29. 0 0
      manager-admin/dist/static/js/52.b49c55f162c77c636c11.js
  30. 0 0
      manager-admin/dist/static/js/52.b49c55f162c77c636c11.js.gz
  31. 0 0
      manager-admin/dist/static/js/55.3d31aa1a8f7e9571c96b.js
  32. BIN
      manager-admin/dist/static/js/55.3d31aa1a8f7e9571c96b.js.gz
  33. 0 0
      manager-admin/dist/static/js/55.8c778a01d0ba9e3e90c4.js
  34. 0 0
      manager-admin/dist/static/js/56.78f34000c4a63f153ae6.js
  35. 0 0
      manager-admin/dist/static/js/57.41a1be332f29a03e0069.js
  36. 0 0
      manager-admin/dist/static/js/57.5a0b918a99d7b019e905.js
  37. BIN
      manager-admin/dist/static/js/57.5a0b918a99d7b019e905.js.gz
  38. 0 0
      manager-admin/dist/static/js/58.19e127d18f73c7ce259c.js
  39. BIN
      manager-admin/dist/static/js/58.19e127d18f73c7ce259c.js.gz
  40. 0 0
      manager-admin/dist/static/js/59.41d1d3a4cf3ce608981b.js
  41. BIN
      manager-admin/dist/static/js/59.90ee24c7571f4a4f38d6.js.gz
  42. 0 0
      manager-admin/dist/static/js/6.7dccafff9023d6860fff.js
  43. 0 0
      manager-admin/dist/static/js/6.7dccafff9023d6860fff.js.gz
  44. 0 0
      manager-admin/dist/static/js/60.34233906e25ff5181e9f.js
  45. BIN
      manager-admin/dist/static/js/60.34233906e25ff5181e9f.js.gz
  46. 0 0
      manager-admin/dist/static/js/61.397428520305c029191e.js
  47. BIN
      manager-admin/dist/static/js/61.397428520305c029191e.js.gz
  48. 0 0
      manager-admin/dist/static/js/7.c046ff9c922ae3902b55.js
  49. BIN
      manager-admin/dist/static/js/7.c046ff9c922ae3902b55.js.gz
  50. 0 0
      manager-admin/dist/static/js/7.e50db1975aa5864141da.js
  51. BIN
      manager-admin/dist/static/js/7.e50db1975aa5864141da.js.gz
  52. 0 0
      manager-admin/dist/static/js/8.2d02a946af3c80756619.js
  53. BIN
      manager-admin/dist/static/js/8.2d02a946af3c80756619.js.gz
  54. 0 0
      manager-admin/dist/static/js/8.5a281aab4dab971eedb5.js
  55. BIN
      manager-admin/dist/static/js/8.5a281aab4dab971eedb5.js.gz
  56. 0 0
      manager-admin/dist/static/js/9.a3871bf623f5903a52c1.js
  57. BIN
      manager-admin/dist/static/js/9.a3871bf623f5903a52c1.js.gz
  58. 0 0
      manager-admin/dist/static/js/9.b88ff5e7b0319cb69c2b.js
  59. BIN
      manager-admin/dist/static/js/9.b88ff5e7b0319cb69c2b.js.gz
  60. 0 0
      manager-admin/dist/static/js/app.cd9c4a75a44565901668.js
  61. BIN
      manager-admin/dist/static/js/app.cd9c4a75a44565901668.js.gz
  62. 0 0
      manager-admin/dist/static/js/manifest.c7ac85f199e12e91d99c.js
  63. 9 0
      manager-admin/src/api/goodsExchange.js
  64. 1 1
      manager-admin/src/api/spec.js
  65. 19 5
      manager-admin/src/views/basicSetting/goods/index.vue
  66. 42 18
      manager-admin/src/views/stock/goodsExchange/addInventory.vue
  67. 39 12
      manager-admin/src/views/stock/goodsExchange/goodsExchangeAdd.vue
  68. 32 13
      manager-admin/src/views/stock/goodsInventory/goodsInventoryAdd.vue
  69. 6 6
      manager-admin/src/views/stock/order.vue
  70. 29 17
      manager-admin/src/views/stock/orderAdd.vue
  71. 25 12
      manager-admin/src/views/stock/orderCheck.vue
  72. 54 41
      manager-admin/src/views/stock/orderOutbound.vue
  73. 27 22
      manager-admin/src/views/stock/sendOrder.vue
  74. 1 1
      ui-domain/api.js

+ 1 - 1
manager-admin/dist/index.html

@@ -1,3 +1,3 @@
 <!DOCTYPE html><html><head><meta charset=utf-8><script>var ua = window.navigator.userAgent
     var isIe = /MSIE|Trident/.test(ua)
-    // if (isIe) window.location.href = 'http://support.dmeng.net/upgrade-your-browser.html?referrer=' + encodeURIComponent(window.location.href)</script><script src=/static/js/envs.js></script><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=renderer content=webkit><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>erp</title><link rel="shortcut icon" href=/favicon.ico><link href=/static/css/app.8fe6119a598e09bb33f5a71a79d08750.css rel=stylesheet></head><body><div id=app><div style="display: flex;width: 100vw;height: 100vh;justify-content:center;align-items:center"><img src=/static/img/index.ripple-radio-preloader.gif alt=""></div></div><script src=/static/js/jquery.min.js></script><script src=/static/js/xlsx.full.min.js></script><script src=/static/js/echarts.min.js></script><script src=/static/js/base64.min.js></script><script src=/static/js/psl.min.js></script><script src=/static/UE/ueditor.config.js></script><script src=/static/UE/ueditor.all.js></script><script src=/static/UE/lang/zh-cn/zh-cn.js></script><script src=/static/UE/ueditor.parse.js></script><script src="//webapi.amap.com/maps?v=2.0&key=a4553619077791eb0a6df2f450b9a03b&plugin=AMap.CircleEditor"></script><script src=//webapi.amap.com/ui/1.1/main.js></script><script type=text/javascript src=/static/js/manifest.018fe977b831887feddc.js></script><script type=text/javascript src=/static/js/vendor.e2f2249dec469c77a1dd.js></script><script type=text/javascript src=/static/js/app.94fd5f7c5166acfe6d43.js></script></body></html>
+    // if (isIe) window.location.href = 'http://support.dmeng.net/upgrade-your-browser.html?referrer=' + encodeURIComponent(window.location.href)</script><script src=/static/js/envs.js></script><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=renderer content=webkit><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>erp</title><link rel="shortcut icon" href=/favicon.ico><link href=/static/css/app.8fe6119a598e09bb33f5a71a79d08750.css rel=stylesheet></head><body><div id=app><div style="display: flex;width: 100vw;height: 100vh;justify-content:center;align-items:center"><img src=/static/img/index.ripple-radio-preloader.gif alt=""></div></div><script src=/static/js/jquery.min.js></script><script src=/static/js/xlsx.full.min.js></script><script src=/static/js/echarts.min.js></script><script src=/static/js/base64.min.js></script><script src=/static/js/psl.min.js></script><script src=/static/UE/ueditor.config.js></script><script src=/static/UE/ueditor.all.js></script><script src=/static/UE/lang/zh-cn/zh-cn.js></script><script src=/static/UE/ueditor.parse.js></script><script src="//webapi.amap.com/maps?v=2.0&key=a4553619077791eb0a6df2f450b9a03b&plugin=AMap.CircleEditor"></script><script src=//webapi.amap.com/ui/1.1/main.js></script><script type=text/javascript src=/static/js/manifest.c7ac85f199e12e91d99c.js></script><script type=text/javascript src=/static/js/vendor.e2f2249dec469c77a1dd.js></script><script type=text/javascript src=/static/js/app.cd9c4a75a44565901668.js></script></body></html>

BIN
manager-admin/dist/static/js/0.2862943b7e7d37bcf250.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/0.3eec1c14516b20fe9007.js


BIN
manager-admin/dist/static/js/0.3eec1c14516b20fe9007.js.gz


+ 0 - 0
manager-admin/dist/static/js/1.32a30806cc467da53596.js → manager-admin/dist/static/js/1.b0da4816312c42bad6f6.js


+ 0 - 0
manager-admin/dist/static/js/1.32a30806cc467da53596.js.gz → manager-admin/dist/static/js/1.b0da4816312c42bad6f6.js.gz


+ 0 - 0
manager-admin/dist/static/js/13.e6e205633eb234fa3101.js → manager-admin/dist/static/js/13.73f94c196fd730fa20ec.js


+ 0 - 0
manager-admin/dist/static/js/13.e6e205633eb234fa3101.js.gz → manager-admin/dist/static/js/13.73f94c196fd730fa20ec.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/2.09d540c0f3564cc0cf0d.js


BIN
manager-admin/dist/static/js/2.09d540c0f3564cc0cf0d.js.gz


BIN
manager-admin/dist/static/js/2.4c4d54cfa3dc113c2c5f.js.gz


BIN
manager-admin/dist/static/js/35.0282b753de98617c3f16.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/35.b71927b76f6135128a13.js


BIN
manager-admin/dist/static/js/35.b71927b76f6135128a13.js.gz


+ 0 - 0
manager-admin/dist/static/js/4.dd1a14a02ceb212c667b.js → manager-admin/dist/static/js/4.7248ef2a9d9c2b1a8cd6.js


+ 0 - 0
manager-admin/dist/static/js/4.dd1a14a02ceb212c667b.js.gz → manager-admin/dist/static/js/4.7248ef2a9d9c2b1a8cd6.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/43.a9f57db7455aead862e3.js


BIN
manager-admin/dist/static/js/43.a9f57db7455aead862e3.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/44.dada9c01e6a2c9fa6618.js


BIN
manager-admin/dist/static/js/43.c21fd693da6a52438074.js.gz → manager-admin/dist/static/js/44.dada9c01e6a2c9fa6618.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/45.1b53dc28284dfdc4af8a.js


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/45.a99a07d5cc3df9ed68ca.js


BIN
manager-admin/dist/static/js/45.a99a07d5cc3df9ed68ca.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/50.6b54958b6424a33f6fb0.js


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/50.fc435ebb2de6ef255255.js


BIN
manager-admin/dist/static/js/50.fc435ebb2de6ef255255.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/51.cde5c7e57dc7da531827.js


BIN
manager-admin/dist/static/js/51.cde5c7e57dc7da531827.js.gz


+ 0 - 0
manager-admin/dist/static/js/52.81055a71a891ebf15e15.js → manager-admin/dist/static/js/52.b49c55f162c77c636c11.js


+ 0 - 0
manager-admin/dist/static/js/52.81055a71a891ebf15e15.js.gz → manager-admin/dist/static/js/52.b49c55f162c77c636c11.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/55.3d31aa1a8f7e9571c96b.js


BIN
manager-admin/dist/static/js/55.3d31aa1a8f7e9571c96b.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/55.8c778a01d0ba9e3e90c4.js


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/56.78f34000c4a63f153ae6.js


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/57.41a1be332f29a03e0069.js


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/57.5a0b918a99d7b019e905.js


BIN
manager-admin/dist/static/js/58.5383c0102930721699da.js.gz → manager-admin/dist/static/js/57.5a0b918a99d7b019e905.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/58.19e127d18f73c7ce259c.js


BIN
manager-admin/dist/static/js/58.19e127d18f73c7ce259c.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/59.41d1d3a4cf3ce608981b.js


BIN
manager-admin/dist/static/js/59.90ee24c7571f4a4f38d6.js.gz


+ 0 - 0
manager-admin/dist/static/js/6.bcc80e007139902a30ae.js → manager-admin/dist/static/js/6.7dccafff9023d6860fff.js


+ 0 - 0
manager-admin/dist/static/js/6.bcc80e007139902a30ae.js.gz → manager-admin/dist/static/js/6.7dccafff9023d6860fff.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/60.34233906e25ff5181e9f.js


BIN
manager-admin/dist/static/js/61.b3926a3f1919dd549276.js.gz → manager-admin/dist/static/js/60.34233906e25ff5181e9f.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/61.397428520305c029191e.js


BIN
manager-admin/dist/static/js/61.397428520305c029191e.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/7.c046ff9c922ae3902b55.js


BIN
manager-admin/dist/static/js/7.c046ff9c922ae3902b55.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/7.e50db1975aa5864141da.js


BIN
manager-admin/dist/static/js/7.e50db1975aa5864141da.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/8.2d02a946af3c80756619.js


BIN
manager-admin/dist/static/js/8.2d02a946af3c80756619.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/8.5a281aab4dab971eedb5.js


BIN
manager-admin/dist/static/js/8.5a281aab4dab971eedb5.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/9.a3871bf623f5903a52c1.js


BIN
manager-admin/dist/static/js/9.a3871bf623f5903a52c1.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/9.b88ff5e7b0319cb69c2b.js


BIN
manager-admin/dist/static/js/9.b88ff5e7b0319cb69c2b.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/app.cd9c4a75a44565901668.js


BIN
manager-admin/dist/static/js/app.94fd5f7c5166acfe6d43.js.gz → manager-admin/dist/static/js/app.cd9c4a75a44565901668.js.gz


File diff suppressed because it is too large
+ 0 - 0
manager-admin/dist/static/js/manifest.c7ac85f199e12e91d99c.js


+ 9 - 0
manager-admin/src/api/goodsExchange.js

@@ -291,3 +291,12 @@ export function getOneBySn(orderCode) {
     loaidng: false
   })
 }
+/* 缓存序列号/admin/erp/scancode/skuRedis */
+export function skuRedis(parmas) {
+  return request({
+    url: `/admin/erp/scancode/skuRedis`,
+    method: 'post',
+    headers: { 'Content-Type': 'application/json' },
+    data: parmas
+  })
+}

+ 1 - 1
manager-admin/src/api/spec.js

@@ -62,7 +62,7 @@ export function deleteSpecs(ids) {
  */
 export function getSpecValues(spec_id) {
   return request({
-    url: `admin/goods/specs/${spec_id}/values`,
+    url: `admin/goods/specs/values/${spec_id}`,
     method: 'get'
   })
 }

+ 19 - 5
manager-admin/src/views/basicSetting/goods/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-row>
-      <el-col :span="8" style="padding: 10px 0 0 10px">
+      <el-col :span="6" style="padding: 10px 0 0 10px">
         <div class="toolbar">
           <div class="inner-toolbar">
             <div class="toolbar-btns">
@@ -23,9 +23,9 @@
                 v-if="checkPermission(['category:del'])" @click.stop="handleDeleteCategory(data)"></el-button>
               <el-button type="text" size="mini" icon="el-icon-edit" v-if="checkPermission(['category:edit'])"
                 @click.stop="handleEditCategary(data)"></el-button>
-              <el-button type="text" size="mini" icon="el-icon-setting" v-if="checkPermission(['category:spec'])"
+              <!--  <el-button type="text" size="mini" icon="el-icon-setting" v-if="checkPermission(['category:spec'])"
                 @click.stop="handleEditSpecs(data)">规格</el-button>
-              <!--   <el-button
+               <el-button
                 type="text"
                 size="mini"
                 icon="el-icon-setting"
@@ -37,7 +37,7 @@
           </span>
         </el-tree>
       </el-col>
-      <el-col :span="16">
+      <el-col :span="18">
         <en-table-layout :tableData="tableData.data" class="draggable-table" :row-key="getRowKeys" :loading="loading"
           style="margin: 10px 10px 0 10px">
           <div slot="toolbar" class="inner-toolbar">
@@ -217,12 +217,26 @@ export default {
     },
     //获取类别名称
     categorysName(val) {
-      let name = "";
+      /* let name = "";
       this.categorys.map((el) => {
         if (el.category_id == val) {
           return (name = el.name);
         }
       });
+      return name; */
+      let name = "";
+      const findCategoryName = (categories, categoryId) => {
+        for (const category of categories) {
+          if (category.category_id === categoryId) {
+            name = category.name;
+            break;
+          }
+          if (category.children && category.children.length > 0) {
+            findCategoryName(category.children, categoryId);
+          }
+        }
+      };
+      findCategoryName(this.categorys, val);
       return name;
     },
     getRowKeys(row) {

+ 42 - 18
manager-admin/src/views/stock/goodsExchange/addInventory.vue

@@ -105,7 +105,7 @@
               <template slot-scope="scope">
                 <span v-if="scope.row.order_num">{{
                   scope.row.num - scope.row.order_num || 0
-                  }}</span>
+                }}</span>
               </template>
             </el-table-column>
             <el-table-column width="200" label="操作" v-if="type !== 'detail' && type !== 'audit'">
@@ -166,7 +166,7 @@
     </el-dialog>
     <el-dialog title="入库商品" :visible.sync="goodsVisible" width="1000px" @close="closeGoosData">
       <div style="display: flex;align-items: center; justify-content: flex-end; padding: 10px 0;">
-        <span>搜索商品:</span><el-input v-model="params.keyWord" style="width: 200px;margin-right: 5px;" ></el-input>
+        <span>搜索商品:</span><el-input v-model="params.keyWord" style="width: 200px;margin-right: 5px;"></el-input>
         <el-button @click="searchGoodEvent"> 搜索 </el-button>
       </div>
       <el-table :data="goodsData.records" border style="width: 100%" @selection-change="handleSelectionChange">
@@ -218,7 +218,7 @@
         <el-table-column prop="order_time" label="下单时间">
           <template slot-scope="scope">{{
             scope.row.order_time | unixToDate
-            }}</template>
+          }}</template>
         </el-table-column>
         <el-table-column prop="" label="仓库名称">
           <template slot-scope="scope">
@@ -228,7 +228,7 @@
         <el-table-column prop="" label="配送方式">
           <template slot-scope="scope">{{
             deliveryType(scope.row.send_type)
-            }}</template>
+          }}</template>
         </el-table-column>
         <!-- <el-table-column prop="pay_type" label="付款方式">
           <template slot-scope="scope">{{
@@ -238,7 +238,7 @@
         <el-table-column prop="" label="实付金额">
           <template slot-scope="scope">{{
             "¥" + scope.row.pay_price
-            }}</template>
+          }}</template>
         </el-table-column>
         <!-- <el-table-column prop="" label="订单状态">
           <template slot-scope="scope">
@@ -493,7 +493,7 @@ export default {
   },
   methods: {
     /* 搜索商品 */
-    searchGoodEvent() { 
+    searchGoodEvent() {
       API_GoodsExchange.getGoodsInfo(
         this.params,
         this.goodsExchangeAddForm.warehouse_id
@@ -523,9 +523,9 @@ export default {
       this.snCodeVisible = false;
     },
     //扫序列号goodsExchangeAddForm.product_list[this.index].sn_code_list
-    toSnCode() {
+    async toSnCode() {
       if (this.sku == '') return this.$message.error('请录入正确的sku')
-      API_GoodsExchange.getSnCode("in", this.sku, this.sn_code.replace(/\s+/g, '')).then((res) => {
+      await API_GoodsExchange.getSnCode("in", this.sku, this.sn_code.replace(/\s+/g, '')).then(async (res) => {
         this.sn_code = "";
         // 假设res是一个对象,我们根据res的某个属性(如sn)来检查重复
         let exists = this.goodsExchangeAddForm.product_list[
@@ -534,9 +534,22 @@ export default {
           (item) => item.sn_code === res.sn_code && item.sku === res.sku
         );
         if (!exists) {
-          this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
-            res
-          );
+          if (this.id) {
+            await API_GoodsExchange.skuRedis({
+              send_order_id: this.id, item_id: this.goodsExchangeAddForm.product_list[
+                this.index
+              ].id, sku: res
+            }).then(response => {
+              this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
+                res
+              );
+            })
+          } else {
+            this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
+              res
+            );
+          }
+
         }
         /* this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
           res
@@ -827,7 +840,7 @@ export default {
             this.$refs.sn_input.focus();
           });
         } else {
-          this.goodsExchangeAddForm.product_list[this.index].num = 1
+          this.goodsExchangeAddForm.product_list[this.index].num += 1
           /* this.scanDialogVisible = false; */
         }
       });
@@ -1236,12 +1249,23 @@ export default {
           this.goodsExchangeAddForm.change_time = Math.floor(
             this.goodsExchangeAddForm.change_time * 1000
           );
-          response.product_list.map((el) => {
-            el.return_num = el.num
-            if (!el.sn_code_list) {
-              el.sn_code_list = [];
-            }
-          });
+          /* 获取缓存数据 */
+          API_GoodsExchange.skuRedis({ send_order_id: this.id, type: 'enter' }).then(response => {
+            response.product_list.map((el) => {
+              el.return_num = el.num
+              Object.keys(response).map(item => {
+                if (el.id == item) {
+                  el.sn_code_list = response[item]
+                  el.num = el.sn_code_list.length
+                }
+              })
+              if (!el.sn_code_list) {
+                el.sn_code_list = [];
+              }/*  else {
+                el.num = el.sn_code_list.length
+              } */
+            });
+          })
           this.goodsExchangeAddForm.distribution_name = response.staff_name;
           this.goodsExchangeAddForm.product_list = response.product_list;
           /* .map((item) => {

+ 39 - 12
manager-admin/src/views/stock/goodsExchange/goodsExchangeAdd.vue

@@ -186,9 +186,11 @@
       </el-button>
       <el-button v-if="type === 'audit'" type="danger" @click="dialogVisible = true">审核驳回
       </el-button> -->
-      <el-button v-if="type !== 'audit' && type !== 'detail' && checkPermission(['warehouseOut2:add'])" type="primary" @click="saveGoodsExchangeAddForm">保存
+      <el-button v-if="type !== 'audit' && type !== 'detail' && checkPermission(['warehouseOut2:add'])" type="primary"
+        @click="saveGoodsExchangeAddForm">保存
       </el-button>
-      <el-button v-if="type !== 'audit' && type !== 'detail' && checkPermission(['warehouseOut:update'])" type="primary" @click="submitGoodsExchangeAddForm">出库
+      <el-button v-if="type !== 'audit' && type !== 'detail' && checkPermission(['warehouseOut:update'])" type="primary"
+        @click="submitGoodsExchangeAddForm">出库
       </el-button>
       <el-button @click="printIng" v-if="type == 'audit'">打印</el-button>
       <el-button @click="toBack()">返回</el-button>
@@ -446,7 +448,7 @@ export default {
     },
     //扫序列号goodsExchangeAddForm.product_list[this.index].sn_code_list
     toSnCode() {
-      if(this.sku=='') return this.$message.error('请录入正确的sku')
+      if (this.sku == '') return this.$message.error('请录入正确的sku')
       API_GoodsExchange.getSnCode("out", this.sku, this.sn_code.replace(/\s+/g, '')).then((res) => {
         this.sn_code = "";
         // 假设res是一个对象,我们根据res的某个属性(如sn)来检查重复
@@ -456,9 +458,25 @@ export default {
           (item) => item.sn_code === res.sn_code && item.sku === res.sku
         );
         if (!exists) {
-          this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
+          if (this.id) {
+            API_GoodsExchange.skuRedis({
+              send_order_id: this.id, item_id: this.goodsExchangeAddForm.product_list[
+                this.index
+              ].id, sku: res
+            }).then(response => {
+              this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
+                res
+              );
+            })
+          } else {
+            this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
+              res
+            );
+          }
+
+          /* this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
             res
-          );
+          ); */
         }
         this.goodsExchangeAddForm.product_list[this.index].out_num = this.goodsExchangeAddForm.product_list[this.index].sn_code_list.length
         this.scanGoodsForm.bar_code = "";
@@ -542,7 +560,7 @@ export default {
             this.$refs.sn_input.focus();
           });
         } else {
-          this.goodsExchangeAddForm.product_list[this.index].num = 1
+          this.goodsExchangeAddForm.product_list[this.index].num += 1
           // this.scanDialogVisible = false;
         }
       });
@@ -891,12 +909,21 @@ export default {
           this.goodsExchangeAddForm.change_time = Math.floor(
             this.goodsExchangeAddForm.change_time * 1000
           );
-          response.product_list.map(el => {
-            el.order_num = el.out_num
-            el.out_num = 0
-            if (!el.sn_code_list) {
-              el.sn_code_list = []
-            }
+          /* 获取缓存数据 */
+          API_GoodsExchange.skuRedis({ send_order_id: this.id, type: 'enter' }).then(response => {
+            response.product_list.map(el => {
+              el.order_num = el.out_num
+              el.out_num = 0
+              Object.keys(response).map(item => {
+                if (el.id == item) {
+                  el.sn_code_list = response[item]
+                  el.num = el.sn_code_list.length
+                }
+              })
+              if (!el.sn_code_list) {
+                el.sn_code_list = []
+              }
+            })
           })
           this.goodsExchangeAddForm.distribution_name = response.staff_name;
           this.goodsExchangeAddForm.product_list =

+ 32 - 13
manager-admin/src/views/stock/goodsInventory/goodsInventoryAdd.vue

@@ -111,7 +111,7 @@
             </el-table-column>
             <el-table-column label="差异">
               <template slot-scope="scope">
-                {{scope.row.inventory_num - scope.row.actual_stock  || 0 }}
+                {{ scope.row.inventory_num - scope.row.actual_stock || 0 }}
               </template>
             </el-table-column>
             <!-- <el-table-column label="备注">
@@ -263,13 +263,13 @@ export default {
         }
         this.loading = true
         API_GoodsInventory.getGoodByWarehouseInventory({ page: 1, size: 10000 }, this.goodsInventoryAddForm.warehouse_id).then(res => {
-          res.records.map(el=>{
-            el.sn_code_list=[]
+          res.records.map(el => {
+            el.sn_code_list = []
           })
           this.goodsInventoryAddForm.product_list = res.records
           this.selectBtn = true
           this.loading = false
-        }).catch(()=>{
+        }).catch(() => {
           this.loading = false
         })
       } else {
@@ -278,9 +278,9 @@ export default {
 
     },
     //扫序列号goodsInventoryAddForm.product_list[this.index].sn_code_list
-    toSnCode() {
-      if(this.sku=='') return this.$message.error('请录入正确的sku')
-      API_GoodsExchange.getSnCode("inventory", this.sku, this.sn_code.replace(/\s+/g, '')).then((res) => {
+    async toSnCode() {
+      if (this.sku == '') return this.$message.error('请录入正确的sku')
+      await API_GoodsExchange.getSnCode("inventory", this.sku, this.sn_code.replace(/\s+/g, '')).then(async (res) => {
         this.sn_code = "";
         // 假设res是一个对象,我们根据res的某个属性(如sn)来检查重复
         let exists = this.goodsInventoryAddForm.product_list[
@@ -289,9 +289,22 @@ export default {
           (item) => item.sn_code === res.sn_code && item.sku === res.sku
         );
         if (!exists) {
-          this.goodsInventoryAddForm.product_list[this.index].sn_code_list.push(
-            res
-          );
+          if (this.id) {
+            await API_GoodsExchange.skuRedis({
+              send_order_id: this.id, item_id: this.goodsInventoryAddForm.product_list[
+                this.index
+              ].id, sku: res
+            }).then(response => {
+              this.goodsInventoryAddForm.product_list[this.index].sn_code_list.push(
+                res
+              );
+            })
+          } else {
+            this.goodsInventoryAddForm.product_list[this.index].sn_code_list.push(
+              res
+            );
+          }
+
         }
         /* this.goodsInventoryAddForm.product_list[this.index].sn_code_list.push(
           res
@@ -300,6 +313,9 @@ export default {
           this.goodsInventoryAddForm.product_list[
             this.index
           ].sn_code_list.length;
+        console.log(this.goodsInventoryAddForm.product_list, this.goodsInventoryAddForm.product_list[
+          this.index
+        ].sn_code_list.length);
         this.scanGoodsForm.bar_code = "";
         this.$nextTick(() => {
           this.$refs.input.focus();
@@ -338,7 +354,7 @@ export default {
             this.$refs.sn_input.focus();
           });
         } else {
-          this.goodsInventoryAddForm.product_list[this.index].num = 1
+          this.goodsInventoryAddForm.product_list[this.index].num += 1
           /* this.scanDialogVisible = false; */
         }
       });
@@ -349,7 +365,7 @@ export default {
         this.$message.error("请选择仓库!");
         return;
       }
-      if(!this.goodsInventoryAddForm.inventory_type){
+      if (!this.goodsInventoryAddForm.inventory_type) {
         this.$message.error("请选择盘点类型!");
         return;
       }
@@ -472,7 +488,7 @@ export default {
               unit: item.product_unit,
               remark: item.remark,
               product_stock_id: item.id,
-              sn_code_list:item.sn_code_list
+              sn_code_list: item.sn_code_list
             }
             return query
           })
@@ -597,6 +613,7 @@ export default {
         this.GET_WarehouseList()
         this.goodsInventoryAddForm.distribution_name = response.staff_name
         this.goodsInventoryAddForm.product_list = this.goodsInventoryAddForm.product_list.map(item => {
+          item.inventory_num = item.inventory_num
           item.product_specification = item.specification
           item.product_unit = item.unit
           item.remain_num = item.stock_num
@@ -683,12 +700,14 @@ export default {
     }
   }
 }
+
 .sn-code-container {
   max-height: 100px;
   /* 设置最大高度,超过这个高度将显示滚动条 */
   overflow-y: auto;
   /* 垂直方向上溢出时显示滚动条 */
 }
+
 /deep/ {
   .el-input--suffix .el-input__inner {
     padding-right: 10px;

+ 6 - 6
manager-admin/src/views/stock/order.vue

@@ -310,16 +310,16 @@ export default {
      // this.reimburForm.file_url = URL.createObjectURL(file.raw);
     },
     beforeAvatarUpload(file) {
-      const isJPG = file.type === 'image/jpeg';
-      const isLt2M = file.size / 1024 / 1024 < 2;
+  
+      const isLt2M = file.size / 1024 / 1024 < 10;
 
-      if (!isJPG) {
+      /* if (!isJPG) {isJPG &&    const isJPG = file.type === 'image/jpeg';
         this.$message.error('上传头像图片只能是 JPG 格式!');
-      }
+      } */
       if (!isLt2M) {
-        this.$message.error('上传头像图片大小不能超过 2MB!');
+        this.$message.error('上传头像图片大小不能超过 10MB!');
       }
-      return isJPG && isLt2M;
+      return  isLt2M;
     },
     /* 报销 */
     reimbursement(row) {

+ 29 - 17
manager-admin/src/views/stock/orderAdd.vue

@@ -293,7 +293,8 @@
           </el-form-item>
         </el-col>
         <el-col :span="16" v-if="OrderForm.type == 'TO_C' && id">
-          <el-form-item label="交通费明细:" prop="real_price">
+          <el-form-item label="交通费汇总:" prop="real_price">
+            <span>{{ '¥' + TO_Cmoney }} </span>
             <el-button @click="reimList">查看明细</el-button>
           </el-form-item>
         </el-col>
@@ -766,6 +767,7 @@ export default {
         money: "",
         file_url: ''
       },
+      TO_Cmoney: 0//交通费汇总
     };
   },
   computed: {
@@ -789,6 +791,7 @@ export default {
       API_Order.editOrderCustomerFee(this.reimburForm, this.reimburForm.id).then(res => {
         this.$message.success('修改成功!')
         this.reimburVisible = false
+        this.GET_OrderDetail();
       })
     },
     handleAvatarSuccess(res, file) {
@@ -796,16 +799,14 @@ export default {
       // this.reimburForm.file_url = URL.createObjectURL(file.raw);
     },
     beforeAvatarUpload(file) {
-      const isJPG = file.type === 'image/jpeg';
       const isLt2M = file.size / 1024 / 1024 < 2;
-
-      if (!isJPG) {
-        this.$message.error('上传头像图片只能是 JPG 格式!');
-      }
+      /*  if (!isJPG) {isJPG && const isJPG = file.type === 'image/jpeg';
+         this.$message.error('上传头像图片只能是 JPG 格式!');
+       } */
       if (!isLt2M) {
         this.$message.error('上传头像图片大小不能超过 2MB!');
       }
-      return isJPG && isLt2M;
+      return isLt2M;
     },
     /* 修改 */
     editReim(row) {
@@ -836,10 +837,11 @@ export default {
     },
     // 租赁时间
     timeChange(val) {
+
       let start = new Date(val[1]); // 将起始日期字符串转换为Date对象
       let end = new Date(val[0]); // 将结束日期字符串转换为Date对象
       let timeDiff = Math.abs(end.getTime() - start.getTime()); // 获取时间差(单位:毫秒)
-      this.monthDiff = Math.ceil(timeDiff / (24 * 60 * 60 * 1000));
+      this.monthDiff = Math.ceil(timeDiff / (24 * 60 * 60 * 1000))+1;
       this.OrderForm.product_list.map(el => {
         el.day_num = this.monthDiff
       })
@@ -993,11 +995,11 @@ export default {
       this.customer.dialogVisible = true;
     },
     handleChange(value) {
-     /*  const city = value[value.length - 2]; // 获取当前市的代码
-      const cityName = codeToText[city]; // 根据代码获取市的名称
-      const loc = value.map((code) => codeToText[code]).join(","); // 拼接地址字符串
-      this.OrderForm.province_city_area_address = loc.replace("市辖区", cityName); // 更新地址字段,替换市辖区为市名称*/
-      this.OrderForm.province_city_area = value.join(","); 
+      /*  const city = value[value.length - 2]; // 获取当前市的代码
+       const cityName = codeToText[city]; // 根据代码获取市的名称
+       const loc = value.map((code) => codeToText[code]).join(","); // 拼接地址字符串
+       this.OrderForm.province_city_area_address = loc.replace("市辖区", cityName); // 更新地址字段,替换市辖区为市名称*/
+      this.OrderForm.province_city_area = value.join(",");
       //打印区域码所对应的属性值即中文地址
     },
     /** 初始化 */
@@ -1316,7 +1318,7 @@ export default {
       }
       const { id } = this.OrderForm;
       //设置时间
-      /*  */  delete this.OrderForm.start_time;
+      delete this.OrderForm.start_time;
       delete this.OrderForm.end_time;
       if (this.time) {
         this.OrderForm.start_time = this.time[0];
@@ -1329,7 +1331,7 @@ export default {
       }
       this.OrderForm.province_city_area_address = loc + this.OrderForm.address;
       const params = this.MixinClone(this.OrderForm);
-
+      params.reduction = this.discount
       params.pay_price = this.price;
       params.real_price = Number(params.real_price);
       params.item_list = params.product_list;
@@ -1437,15 +1439,19 @@ export default {
     GET_OrderDetail() {
       API_Order.getOrderDetail(this.id).then((response) => {
         /**/ this.price = response.pay_price;
+        this.discount = response.reduction
         this.barcodeValue = response.sn
         response.product_list = response.item_list.map(el => {
           el.good_vo = el.goods_vo
           return el
         });
         if (response.type == "TO_C") {
+          let moneyToc = 0
           response.order_customer_fees.map(el => {
-            this.totalAmount += el.money + response.real_price
+            moneyToc += el.money
           })
+          this.TO_Cmoney = moneyToc
+          this.totalAmount = moneyToc + response.real_price
         }
 
         this.selectedOptions = response.province_city_area.split(",");
@@ -1459,7 +1465,6 @@ export default {
         if (response.type == "TO_C") {
           this.time.push(response.start_time);
           this.time.push(response.end_time);
-
         }
         /* if (this.OrderForm.payment_time) {
           this.OrderForm.payment_time = Math.floor(
@@ -1563,6 +1568,13 @@ export default {
         this.OrderForm.real_price = this.price * newVal / 10;
       },
     },
+    price: {
+      deep: true,
+      handler(newVal) {
+        this.OrderForm.real_price = newVal * this.discount / 10;
+        this.totalAmount = this.TO_Cmoney + this.OrderForm.real_price
+      },
+    },
     "OrderForm.product_list": {
       deep: true,
       handler(newVal) {

+ 25 - 12
manager-admin/src/views/stock/orderCheck.vue

@@ -3,7 +3,7 @@
         <div class="numOrder">
             <barcode :value="barcodeValue"></barcode>
         </div>
-        <el-form ref="orderFormRef" :rules="rules" :model="OrderForm" label-width="120px" inline :disabled="isDetail">
+        <el-form ref="orderFormRef" :rules="rules" :model="OrderForm" label-width="140px" inline :disabled="isDetail">
             <h3>基本信息</h3>
             <el-row>
                 <el-col :span="10">
@@ -101,7 +101,7 @@
             <div style="margin-bottom: 10px">
                 <h3>商品明细</h3>
                 <div v-if="!isDetail">
-                   <!--  <el-button class="button" size="mini" type="primary" @click="handleSelectGoods">手动选择</el-button>
+                    <!--  <el-button class="button" size="mini" type="primary" @click="handleSelectGoods">手动选择</el-button>
                     <el-button class="button" size="mini" type="primary" @click="handleSelectGrou">选择分组商品</el-button> -->
                 </div>
             </div>
@@ -204,20 +204,20 @@
                             :disabled="type == 'pone'"></el-input>  style="display: flex;justify-content: center;" -->
                     </el-form-item>
                 </el-col>
-                <el-col :span="8">
-                    <el-form-item label="扫码支付:" prop="real_price" :rules="rules.pay_price">
-                        <div id="qrCode" ref="qrCodeDiv"></div>
-                    </el-form-item>
-                </el-col>
                 <el-col :span="8" v-if="OrderForm.type == 'TO_C' && id">
                     <el-form-item label="总金额:" prop="real_price" :rules="rules.pay_price">
                         {{ '¥' + totalAmount }}
                         <!-- <el-input v-model="OrderForm.real_price" placeholder="请输入" :disabled="type == 'pone'"></el-input> -->
                     </el-form-item>
                 </el-col>
+                <el-col :span="8">
+                    <el-form-item label="扫码支付(支付宝):" prop="real_price" :rules="rules.pay_price">
+                        <div id="qrCode" ref="qrCodeDiv"></div>
+                    </el-form-item>
+                </el-col>
             </el-row>
             <div class="footer">
-              <!--   <el-button type="primary" @click="submit" v-if="!isDetail && type == 'pone'"
+                <!--   <el-button type="primary" @click="submit" v-if="!isDetail && type == 'pone'"
                     :loading="formLoading">确认</el-button>
                 <el-button type="primary" @click="submitOrderForm" v-if="!isDetail && type !== 'pone'"
                     :loading="formLoading">保存</el-button>
@@ -572,7 +572,8 @@ export default {
             orderType: '',//条形码查看类型
             payurl: "",
             channList: [],//渠道列表
-            totalAmount: 0
+            totalAmount: 0,
+            TO_Cmoney: 0//交通费汇总
         };
     },
     computed: {
@@ -1189,14 +1190,18 @@ export default {
             API_Order.getOrderDetail(this.id).then((response) => {
           /**/ this.price = response.pay_price;
                 this.barcodeValue = response.sn
+                this.discount = response.reduction
                 response.product_list = response.item_list.map(el => {
                     el.good_vo = el.goods_vo
                     return el
                 });
                 if (response.type == "TO_C") {
+                    let moneyToc = 0
                     response.order_customer_fees.map(el => {
-                        this.totalAmount += el.money + response.real_price
+                        moneyToc += el.money
                     })
+                    this.TO_Cmoney = moneyToc
+                    this.totalAmount = moneyToc + response.real_price
                 }
                 this.selectedOptions = response.province_city_area.split(",");
                 this.OrderForm = response;
@@ -1255,7 +1260,7 @@ export default {
                 }
             },
             set(newValue) {
-                this.OrderForm.real_price = newValue;
+                /* this.OrderForm.real_price = newValue; */
             }
         },
     },
@@ -1263,9 +1268,17 @@ export default {
         discount: {
             deep: true,
             handler(newVal) {
+                console.log(newVal);
                 this.OrderForm.real_price = this.price * newVal / 10;
             },
         },
+        price: {
+            deep: true,
+            handler(newVal) {
+                this.OrderForm.real_price = newVal * this.discount / 10;
+                this.totalAmount = this.TO_Cmoney + this.OrderForm.real_price
+            },
+        },
         "OrderForm.product_list": {
             deep: true,
             handler(newVal) {
@@ -1279,7 +1292,7 @@ export default {
                 if (
                     newVal.name === "orderAdd" ||
                     newVal.name === "orderEdit" ||
-                    newVal.name === "orderDetail"||
+                    newVal.name === "orderDetail" ||
                     newVal.name === "orderCheck"
                 ) {
                     this.init();

+ 54 - 41
manager-admin/src/views/stock/orderOutbound.vue

@@ -16,18 +16,18 @@
               <el-form-item label="预约时间:" prop="" v-if="deliveryForms.appointment_type != 0">
                 <el-date-picker v-model="deliveryForms.appointment_time" type="datetime" placeholder="选择日期时间"
                   :disabled="disabledType" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="{
-                disabledDate(time) {
-                  return (
-                    time.getTime() <=
-                    new Date(
-                      new Date().getFullYear(),
-                      new Date().getMonth(),
-                      new Date().getDate()
-                    ).getTime() -
-                    86400000
-                  );
-                },
-              }"></el-date-picker>
+                    disabledDate(time) {
+                      return (
+                        time.getTime() <=
+                        new Date(
+                          new Date().getFullYear(),
+                          new Date().getMonth(),
+                          new Date().getDate()
+                        ).getTime() -
+                        86400000
+                      );
+                    },
+                  }"></el-date-picker>
               </el-form-item>
             </el-col>
           </el-row>
@@ -169,7 +169,7 @@
           <el-divider></el-divider>
           <h3>商品明细</h3>
           <el-button class="button" size="mini" type="primary" @click="scanCode"
-            :disabled="disabledType">扫码出库</el-button>
+           v-if="deliveryForms.status=='TO_BE_SEND'">扫码出库</el-button>
           <div style="width: 100%; display: block">
             <el-table border :data="goodsExchangeAddForm.product_list" :cell-style="{ textAlign: 'center' }"
               :header-cell-style="{ textAlign: 'center' }" style="width: 100%; margin-top: 20px">
@@ -631,6 +631,7 @@ export default {
         total_volume: "",
         appointment_type: 0,
         total_weight: "",
+        status:'',
         //发货人
         sender: {
           name: "",
@@ -797,7 +798,7 @@ export default {
     /* this.generateMap(regionData); */
   },
   methods: {
-    /* 出库扫码 */
+    /* 扫sku */
     toSearch() {
       API_GoodsExchange.getProduct(
         this.deliveryForms.warehouse_id,
@@ -839,8 +840,9 @@ export default {
             this.$refs.sn_input.focus();
           });
         } else {
-          this.goodsExchangeAddForm.product_list[this.index].num = 1
-          this.scanDialogVisible = false;
+          if (this.goodsExchangeAddForm.product_list[this.index].num >= this.goodsExchangeAddForm.product_list[this.index].orderNum) return this.$message.warning('录入完成,请录入下一条!')
+          this.goodsExchangeAddForm.product_list[this.index].num += 1
+          /*  this.scanDialogVisible = false; */
         }
       });
     },
@@ -863,9 +865,15 @@ export default {
           (item) => item.sn_code === res.sn_code && item.sku === res.sku
         );
         if (!exists) {
-          this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
-            res
-          );
+          API_GoodsExchange.skuRedis({
+            send_order_id: this.id, item_id: this.goodsExchangeAddForm.product_list[
+              this.index
+            ].id, sku: res
+          }).then(response => {
+            this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
+              res
+            );
+          })
         }
         this.goodsExchangeAddForm.product_list[this.index].num = this.goodsExchangeAddForm.product_list[this.index].sn_code_list.length
         const indexs = this.product_list.findIndex((el) => {
@@ -878,7 +886,8 @@ export default {
         this.goodsExchangeAddForm.product_list[this.index].id = this.product_list[indexs].id
         if (this.goodsExchangeAddForm.product_list[this.index].num == this.product_list[indexs].num) {
           this.scanGoodsForm.bar_code = "";
-          this.scanDialogVisible = false;
+          return this.$message.warning('录入完成,请录入下一条!')
+         /*  this.scanDialogVisible = false; */
         } else {
           this.scanGoodsForm.bar_code = "";
           this.$nextTick(() => {
@@ -1233,21 +1242,31 @@ export default {
           params.receiver.address = res.order_vo.address;
 
         }
-        res.order_item_vos.map((el) => {
-          el.orderNum = el.num
-          if (res.kdn_order_code == undefined || res.kdn_order_code == '') {
-            el.num = 0
-          }
-          if (!el.sn_code_list) {
-            el.sn_code_list = []
-          }else{
-            el.num = el.sn_code_list.length
-          }
-
-          this.deliveryForms.total_weight = Number(
-            el.product_vo.weight * el.num
-          );
-        });
+        /* 获取缓存数据 */
+        API_GoodsExchange.skuRedis({ send_order_id: this.id, type: 'enter' }).then(response => {
+          res.order_item_vos.map((el) => {
+            el.orderNum = el.num
+            if (res.kdn_order_code == undefined || res.kdn_order_code == '') {
+              el.num = 0
+            }
+            Object.keys(response).map(item => {
+              if (el.id == item) {
+                el.sn_code_list = response[item]
+                el.num = el.sn_code_list.length
+              }
+            })
+            if (!el.sn_code_list) {
+              el.sn_code_list = []
+            } else {
+              el.num = el.sn_code_list.length
+            }
+            this.deliveryForms.total_weight = Number(
+              el.product_vo.weight * el.num
+            );
+            console.log(el.orderNum);
+          });
+        })
+        this.deliveryForms.status=res.status
         this.deliveryForms.warehouse_id = res.warehouse_id
         this.deliveryForms.declared_value = Number(res.order_vo.real_price);
         this.goodsExchangeAddForm.product_list = res.order_item_vos
@@ -1259,12 +1278,6 @@ export default {
         if (this.send_type == 'EXPRESS_DELIVERY' && res.logistics.length !== 0) {
           this.logistics = res.logistics
         }
-        /* if (res.send_address && res.receiver_address) {
-          this.selectedOptions = res.send_address.split(",");
-          this.receiverOptions = res.receive_address.split(",");
-        } 
-        console.log(this.deliveryForms);
-        this.deliveryForms.sender=res.sender_province_name */
       });
     },
     /** 出库前预览 */

+ 27 - 22
manager-admin/src/views/stock/sendOrder.vue

@@ -79,7 +79,7 @@
         <el-table-column prop="order_time" label="下单时间">
           <template slot-scope="scope">{{
             scope.row.order_vo.order_time | unixToDate
-          }}</template>
+            }}</template>
         </el-table-column>
         <el-table-column prop="warehouse_name" label="仓库名称">
           <template slot-scope="scope">
@@ -89,7 +89,7 @@
         <el-table-column prop="" label="配送方式">
           <template slot-scope="scope">{{
             deliveryType(scope.row.order_vo.send_type)
-          }}</template>
+            }}</template>
         </el-table-column>
         <!--        <el-table-column prop="distribution_name" label="销售经理" />-->
         <el-table-column prop="" label="付款方式">
@@ -101,7 +101,7 @@
         <el-table-column prop="status" label="状态">
           <template slot-scope="scope">{{
             typeName(scope.row.status)
-          }}</template>
+            }}</template>
         </el-table-column>
         <!-- <el-table-column prop="status" label="发货状态">
           <template slot-scope="scope">{{ statusFilter(scope.row.status) }}</template>
@@ -188,7 +188,7 @@
         <el-form-item label="订单编号:" prop="sn">
           <span v-if="warehouseOutForms.order_sn_list">{{
             formatFilter(warehouseOutForms.order_sn_list)
-          }}</span>
+            }}</span>
         </el-form-item>
         <el-form-item label="配送方式:" prop="category_id">
           <el-radio v-model="warehouseOutForms.delivery_type" :label="'express'" :disabled="true">物流配送</el-radio>
@@ -305,8 +305,8 @@ export default {
     },
   },
   methods: {
-      /** 获取支付方式列表 */
-      GET_CollectingAccountList() {
+    /** 获取支付方式列表 */
+    GET_CollectingAccountList() {
       API_CollectingAccount.getList({
         page_no: 1,
         page_size: -1,
@@ -334,12 +334,12 @@ export default {
     //获取付款方式
     payType(val) {
       let name = "";
-        this.collectingAccountList.map((el) => {
-          if (el.id == val) {
-            return (name = el.name);
-          }
-        });
-        return name;
+      this.collectingAccountList.map((el) => {
+        if (el.id == val) {
+          return (name = el.name);
+        }
+      });
+      return name;
     },
     //配送方式查看
     deliveryType(val) {
@@ -353,14 +353,19 @@ export default {
     },
     //获取仓库名称
     warehouseName(val) {
-      let name = [];
-      this.warehouseList.map((el) => {
-          if (el.id == val) {
-            return name.push(el.name);
-          }
- 
-      });
-      return name;
+      /*   let wareName=''
+        let name = [];
+        this.warehouseList.map((el) => {
+            if (el.id == val) {
+              return name.push(el.name);
+            }
+        });
+        name.map(e=>{
+          wareName=e
+        })
+       return wareName */
+      let wareName = this.warehouseList.find(el => el.id === val).name || '';
+      return wareName;
     },
     //获取订单状态大小写转换.toUpperCase()
     typeName(val) {
@@ -385,7 +390,7 @@ export default {
     addWarehouse(row) {
       this.$router.push({
         name: "orderOutboundAdd",
-        params: { id: row.id,send_type:row.order_vo.send_type},
+        params: { id: row.id, send_type: row.order_vo.send_type },
       });
       // this.$router.params{ name: 'orderOutboundDetail', params: { id: scope.row.id } }
     },
@@ -393,7 +398,7 @@ export default {
     handleAuditDialog(row) {
       this.$router.push({
         name: "orderOutboundAdd",
-        params: { id: row.id, type: "check",send_type:row.order_vo.send_type },
+        params: { id: row.id, type: "check", send_type: row.order_vo.send_type },
       });
     },
     /** 审核提交 */

+ 1 - 1
ui-domain/api.js

@@ -9,7 +9,7 @@
 module.exports = {
   // 开发环境 192.168.8.103:9999
   dev: {
-    admin: window.__ENV__.API_ADMIN || 'http://192.168.8.103:9999'//https://apidoc.raycos.net http://192.168.8.103:9999
+    admin: window.__ENV__.API_ADMIN || 'http://192.168.8.107:9999'//https://apidoc.raycos.net http://192.168.8.103:9999
   },
   // 测试环境apidoc.raycos.net 60.204.236.53:9999
   test: {

Some files were not shown because too many files changed in this diff