Browse Source

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/components/selectComponent/customerSelect.vue
qinbai 4 years ago
parent
commit
1435e39202
26 changed files with 781 additions and 457 deletions
  1. 0 0
      public/cdn/avue/2.8.18/avue.min.js
  2. 8 0
      src/api/basicData/deliveryNotice.js
  3. 1 1
      src/api/basicData/inventoryAccount.js
  4. 20 0
      src/api/basicData/invoice.js
  5. 21 1
      src/api/exportTrade/receipt.js
  6. 2 2
      src/components/selectComponent/customerSelect.vue
  7. 115 0
      src/main.js
  8. 147 137
      src/page/index/tags.vue
  9. 1 0
      src/store/getters.js
  10. 14 1
      src/store/modules/ifdetail.js
  11. 3 2
      src/views/businessManagement/deliveryNotice/configuration/customerContact.json
  12. 1 1
      src/views/businessManagement/deliveryNotice/configuration/mainList.json
  13. 66 4
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  14. 1 1
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  15. 1 1
      src/views/businessManagement/receipt/configuration/customerContact.json
  16. 1 1
      src/views/businessManagement/receipt/configuration/mainList.json
  17. 1 2
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  18. 34 58
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  19. 105 59
      src/views/exportTrade/invoice/detailsPage.vue
  20. 78 5
      src/views/exportTrade/purchaseContract/detailsPage.vue
  21. 0 7
      src/views/exportTrade/receipt/config/customerContact.json
  22. 99 12
      src/views/exportTrade/receipt/detailsPage.vue
  23. 22 1
      src/views/exportTrade/receipt/index.vue
  24. 11 4
      src/views/exportTrade/salesContract/config/customerContact.json
  25. 13 30
      src/views/exportTrade/salesContract/detailsPage.vue
  26. 16 127
      src/views/exportTrade/shippingInquiry/detailsPage.vue

File diff suppressed because it is too large
+ 0 - 0
public/cdn/avue/2.8.18/avue.min.js


+ 8 - 0
src/api/basicData/deliveryNotice.js

@@ -118,3 +118,11 @@ export function sendOutGoods(data) {
     data: data
   })
 }
+// 撤销发货
+export function revokeOutGoods(data) {
+  return request({
+    url: '/api/blade-deliver-goods/delivery/repeal',
+    method: 'post',
+    data: data
+  })
+}

+ 1 - 1
src/api/basicData/inventoryAccount.js

@@ -32,6 +32,6 @@ export function selectGoodsNum(data) {
   return request({
     url: '/api/blade-stock/client/get_stock',
     method: 'get',
-    data: data
+    params: data
   })
 }

+ 20 - 0
src/api/basicData/invoice.js

@@ -74,4 +74,24 @@ export function getSpecification(query) {
     method: 'get',
     params: query
   })
+}
+/**
+ * 确认发货
+ */
+ export function save(data) {
+  return request({
+    url: '/api/blade-deliver-goods/exportDelivery/save',
+    method: 'post',
+    data: data
+  })
+}
+/**
+ * 撤销发货
+ */
+ export function repeal(data) {
+  return request({
+    url: '/api/blade-deliver-goods/exportDelivery/repeal',
+    method: 'post',
+    data: data
+  })
 }

+ 21 - 1
src/api/exportTrade/receipt.js

@@ -48,7 +48,7 @@ export function remove(data) {
 //获取商品
 export const getGoods = (current, size,goodsTypeId) => {
   return request({
-      url: '/api//blade-client/goodsdesc/selectGoods',
+      url: '/api/blade-client/goodsdesc/selectGoods',
       method: 'get',
       params: {
           current,
@@ -74,4 +74,24 @@ export function getSpecification(query) {
     method: 'get',
     params: query
   })
+}
+/**
+ * 确认发货
+ */
+ export function save(data) {
+  return request({
+    url: '/api/blade-deliver-goods/exportDelivery/comfire',
+    method: 'post',
+    data: data
+  })
+}
+/**
+ * 撤销发货
+ */
+ export function repeal(data) {
+  return request({
+    url: '/api/blade-deliver-goods/exportDelivery/repeal',
+    method: 'post',
+    data: data
+  })
 }

+ 2 - 2
src/components/selectComponent/customerSelect.vue

@@ -1,10 +1,10 @@
 <template>
-  <span class="select-component" style="display:inline-flex;width: 100%">
+  <span class="select-component" style="display:inline-flex;width: 100%;">
     <el-select
         v-model="value"
         size="small"
         :placeholder="configuration.placeholder"
-        style="width: 90%;border-right: none;"
+        style="border-right: none;"
         :disabled="disabled?disabled:false"
         :multiple="configuration.multiple?configuration.multiple:false"
         :collapse-tags="configuration.collapseTags?configuration.collapseTags:false">

+ 115 - 0
src/main.js

@@ -90,3 +90,118 @@ new Vue({
   i18n,
   render: h => h(App)
 }).$mount('#app');
+
+Vue.directive("input-limit", {
+  bind(el, binding) {
+    var wins_0 = /[^\d]/g //整数判断
+    var wins_1 = /[^\d^\.]/g //小数判断
+    var flag = true;
+    var points = 0;
+    var lengths = 0
+    var remainder = 0
+    var no_int = 0
+    const target = el instanceof HTMLInputElement ? el : el.querySelector("input");
+    target.addEventListener("compositionstart", e => {
+      flag = false;
+    });
+    target.addEventListener("compositionend", e => {
+      flag = true;
+    });
+    target.addEventListener("input", e => {
+      setTimeout(function() {
+        if (flag) {
+          if (binding.value == 0) {
+            if (wins_0.test(e.target.value)) {
+              e.target.value = e.target.value.replace(wins_0, "");
+              e.target.dispatchEvent(new Event("input")) //手动更新v-model值
+            }
+          }
+          if (binding.value == 1) {
+            if (wins_0.test(e.target.value.toString().replace(/\d+\.(\d*)/, '$1'))) {
+              remainder = true
+            }
+            if ((e.target.value.split('.')).length - 1 > 1) {
+              points = true
+            }
+            if (e.target.value.toString().split(".")[1] != undefined) {
+              if (e.target.value.toString().split(".")[1].length > 1) {
+                lengths = true
+              }
+            }
+            if (e.target.value.toString().indexOf(".") != -1) {
+              no_int = false
+            } else {
+              no_int = true
+            }
+            if (wins_1.test(e.target.value) || lengths || points || remainder) {
+              if (!no_int) {
+                e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
+                  '$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').substring(0, e.target.value.indexOf(
+                  ".") + 2)
+              } else {
+                e.target.value = e.target.value.replace(wins_0, "")
+              }
+              e.target.dispatchEvent(new Event("input"))
+            }
+          }
+          if (binding.value == 2) {
+            if (wins_0.test(e.target.value.toString().replace(/\d+\.(\d*)/, '$1'))) {
+              remainder = true
+            }
+            if ((e.target.value.split('.')).length - 1 > 1) {
+              points = true
+            }
+            if (e.target.value.toString().split(".")[1] != undefined) {
+              if (e.target.value.toString().split(".")[1].length > 2) {
+                lengths = true
+              }
+            }
+            if (e.target.value.toString().indexOf(".") != -1) {
+              no_int = false
+            } else {
+              no_int = true
+            }
+            if (wins_1.test(e.target.value) || lengths || points || remainder) {
+              if (!no_int) {
+                e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
+                  '$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').substring(0, e.target.value.indexOf(
+                  ".") + 3)
+              } else {
+                e.target.value = e.target.value.replace(wins_0, "")
+              }
+              e.target.dispatchEvent(new Event("input"))
+            }
+          }
+          if (binding.value == 4) {
+            if (wins_0.test(e.target.value.toString().replace(/\d+\.(\d*)/, '$1'))) {
+              remainder = true
+            }
+            if ((e.target.value.split('.')).length - 1 > 1) {
+              points = true
+            }
+            if (e.target.value.toString().split(".")[1] != undefined) {
+              if (e.target.value.toString().split(".")[1].length > 4) {
+                lengths = true
+              }
+            }
+            if (e.target.value.toString().indexOf(".") != -1) {
+              no_int = false
+            } else {
+              no_int = true
+            }
+            if (wins_1.test(e.target.value) || lengths || points || remainder) {
+              if (!no_int) {
+                e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
+                  '$#$', '.').substring(0, e.target.value.indexOf(
+                  ".") + 5)
+              } else {
+                e.target.value = e.target.value.replace(wins_0, "")
+              }
+              e.target.dispatchEvent(new Event("input"))
+            }
+          }
+        }
+      }, 0)
+    })
+  }
+})

+ 147 - 137
src/page/index/tags.vue

@@ -60,85 +60,87 @@
   </div>
 </template>
 <script>
-import {mapGetters, mapState} from "vuex";
-import {clearCache} from "@/api/user";
+import { mapGetters, mapState } from "vuex";
+import { clearCache } from "@/api/user";
 
-  export default {
-    name: "tags",
-    data() {
-      return {
-        active: "",
-        contentmenuX: "",
-        contentmenuY: "",
-        contextmenuFlag: false,
-        data:''
-      };
-    },
-    created() {
-    },
-    mounted() {
+export default {
+  name: "tags",
+  data() {
+    return {
+      active: "",
+      contentmenuX: "",
+      contentmenuY: "",
+      contextmenuFlag: false,
+      data: ""
+    };
+  },
+  created() {},
+  mounted() {
+    this.setActive();
+    this.data = this.active;
+  },
+  watch: {
+    tag() {
       this.setActive();
-      this.data = this.active
     },
-    watch: {
-      tag() {
-        this.setActive();
-      },
-      contextmenuFlag() {
-        window.addEventListener("mousedown", this.watchContextmenu);
+    contextmenuFlag() {
+      window.addEventListener("mousedown", this.watchContextmenu);
+    }
+  },
+  computed: {
+    ...mapGetters(["tagWel", "tagList", "tag", "website"]),
+    ...mapState({
+      showTag: state => state.common.showTag
+    }),
+    tagLen() {
+      return this.tagList.length || 0;
+    }
+  },
+  methods: {
+    generateTitle(item) {
+      return this.$router.$avueRouter.generateTitle(
+        item.label,
+        (item.meta || {}).i18n
+      );
+    },
+    watchContextmenu(event) {
+      if (!this.$el.contains(event.target) || event.button !== 0) {
+        this.contextmenuFlag = false;
       }
+      window.removeEventListener("mousedown", this.watchContextmenu);
     },
-    computed: {
-      ...mapGetters(["tagWel", "tagList", "tag", "website"]),
-      ...mapState({
-        showTag: state => state.common.showTag
-      }),
-      tagLen() {
-        return this.tagList.length || 0;
+    handleContextmenu(event) {
+      let target = event.target;
+      // 解决 https://github.com/d2-projects/d2-admin/issues/54
+      let flag = false;
+      if (target.className.indexOf("el-tabs__item") > -1) flag = true;
+      else if (target.parentNode.className.indexOf("el-tabs__item") > -1) {
+        target = target.parentNode;
+        flag = true;
+      }
+      if (flag) {
+        event.preventDefault();
+        event.stopPropagation();
+        this.contentmenuX = event.clientX;
+        this.contentmenuY = event.clientY;
+        this.tagName = target.getAttribute("aria-controls").slice(5);
+        this.contextmenuFlag = true;
       }
     },
-    methods: {
-      generateTitle(item) {
-        return this.$router.$avueRouter.generateTitle(
-          item.label,
-          (item.meta || {}).i18n
-        );
-      },
-      watchContextmenu(event) {
-        if (!this.$el.contains(event.target) || event.button !== 0) {
-          this.contextmenuFlag = false;
-        }
-        window.removeEventListener("mousedown", this.watchContextmenu);
-      },
-      handleContextmenu(event) {
-        let target = event.target;
-        // 解决 https://github.com/d2-projects/d2-admin/issues/54
-        let flag = false;
-        if (target.className.indexOf("el-tabs__item") > -1) flag = true;
-        else if (target.parentNode.className.indexOf("el-tabs__item") > -1) {
-          target = target.parentNode;
-          flag = true;
+    //激活当前选项
+    setActive() {
+      this.data = this.active;
+      this.active = this.tag.value;
+    },
+    menuTag(value, action) {
+      if (action === "remove") {
+        let { tag, key } = this.findTag(value);
+            if (tag.label == "发货单(E)") {
+          this.$store.commit("OUT_OUT_DETAIL");
         }
-        if (flag) {
-          event.preventDefault();
-          event.stopPropagation();
-          this.contentmenuX = event.clientX;
-          this.contentmenuY = event.clientY;
-          this.tagName = target.getAttribute("aria-controls").slice(5);
-          this.contextmenuFlag = true;
+        if (tag.label == "收货单(E)") {
+          this.$store.commit("REC_OUT_DETAIL");
         }
-      },
-      //激活当前选项
-      setActive() {
-        this.data = this.active
-        this.active = this.tag.value;
-      },
-      menuTag(value, action) {
-        if (action === "remove") {
-          let {tag, key} = this.findTag(value);
-          if(tag.label=="发货单(E)"){
-            this.$store.commit("OUT_OUT_DETAIL");
-          }
             if(tag.label=="国内发货单"){
             this.$store.commit("IN_OUT_DETAIL");
           }
@@ -156,74 +158,82 @@ import {clearCache} from "@/api/user";
             tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个
             this.openTag(tag);
           }
+        this.$store.commit("DEL_TAG", tag);
+        if (tag.value === this.tag.value) {
+          tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个
+          this.openTag(tag);
         }
-      },
-      openTag(item) {
-        // this.$confirm('未保存数据是否确认, 是否继续?', '提示', {
-        //   confirmButtonText: '确定',
-        //   cancelButtonText: '取消',
-        //   type: 'warning'
-        // }).then(() => {
-          let tag;
-          if (item.name) {
-            tag = this.findTag(item.name).tag;
-          } else {
-            tag = item;
-          }
-          this.$router.push({
-            path: this.$router.$avueRouter.getPath({
-              name: tag.label,
-              src: tag.value
-            }, tag.meta),
-            query: tag.query
-          });
-        // }).catch(() => {
-        //   this.active = this.data
-        //   console.log(this.data)
-        //   this.$message({
-        //     type: 'info',
-        //     message: '已取消删除'
-        //   });
-        // });
-      },
-      closeOthersTags() {
-        this.contextmenuFlag = false;
-        this.$store.commit("DEL_TAG_OTHER");
-        this.$store.commit("DEL_OTHER_DETAIL",this.$store.getters.tag);
-     },
-      findTag(value) {
-        let tag, key;
-        this.tagList.map((item, index) => {
-          if (item.value === value) {
-            tag = item;
-            key = index;
-          }
-        });
-        return {tag: tag, key: key};
-      },
-      closeAllTags() {
-        this.contextmenuFlag = false;
-        this.$store.commit("DEL_ALL_TAG");
-        this.$router.push({
-          path: this.$router.$avueRouter.getPath({
-            src: this.tagWel.value
-          }),
-          query: this.tagWel.query
-        });
-        this.$store.commit("DEL_ALL_DETAIL");
-      },
-      clearCacheTags() {
-        this.$confirm("是否需要清除缓存?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          clearCache().then(() => {
-            this.contextmenuFlag = false;
-            this.$message.success('清除完毕');
-          })
-        });
       }
+    },
+    openTag(item) {
+      // this.$confirm('未保存数据是否确认, 是否继续?', '提示', {
+      //   confirmButtonText: '确定',
+      //   cancelButtonText: '取消',
+      //   type: 'warning'
+      // }).then(() => {
+      let tag;
+      if (item.name) {
+        tag = this.findTag(item.name).tag;
+      } else {
+        tag = item;
+      }
+      this.$router.push({
+        path: this.$router.$avueRouter.getPath(
+          {
+            name: tag.label,
+            src: tag.value
+          },
+          tag.meta
+        ),
+        query: tag.query
+      });
+      // }).catch(() => {
+      //   this.active = this.data
+      //   console.log(this.data)
+      //   this.$message({
+      //     type: 'info',
+      //     message: '已取消删除'
+      //   });
+      // });
+    },
+    closeOthersTags() {
+      this.contextmenuFlag = false;
+      this.$store.commit("DEL_TAG_OTHER");
+      this.$store.commit("DEL_OTHER_DETAIL", this.$store.getters.tag);
+    },
+    findTag(value) {
+      let tag, key;
+      this.tagList.map((item, index) => {
+        if (item.value === value) {
+          tag = item;
+          key = index;
+        }
+      });
+      return { tag: tag, key: key };
+    },
+    closeAllTags() {
+      this.contextmenuFlag = false;
+      this.$store.commit("DEL_ALL_TAG");
+      this.$router.push({
+        path: this.$router.$avueRouter.getPath({
+          src: this.tagWel.value
+        }),
+        query: this.tagWel.query
+      });
+      this.$store.commit("DEL_ALL_DETAIL");
+    },
+    clearCacheTags() {
+      this.$confirm("是否需要清除缓存?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        clearCache().then(() => {
+          this.contextmenuFlag = false;
+          this.$message.success("清除完毕");
+        });
+      });
     }
-  };
+  }
+};
 </script>

+ 1 - 0
src/store/getters.js

@@ -30,5 +30,6 @@ const getters = {
   takeStatus: state => state.ifdetail.takeStatus,
   outStatus: state => state.ifdetail.outStatus,
   payStatus: state => state.ifdetail.payStatus,
+  outtaskStatus: state => state.ifdetail.outtaskStatus
 }
 export default getters

+ 14 - 1
src/store/modules/ifdetail.js

@@ -3,7 +3,8 @@ const ifdetail = {
     inStatus: false, //国内
     goStatus: false, //进口发货单
     takeStatus: false, //进口发货单
-    outStatus: false, //出口
+    outStatus: false, //出口发货单
+    outtaskStatus: false, //出口收货单
     payStatus: false //付款
   },
   actions: {},
@@ -44,6 +45,15 @@ const ifdetail = {
     OUT_OUT_DETAIL(state) {
       state.outStatus = false;
     },
+    //出口状态
+    // 进入详情页
+    REC_IN_DETAIL(state) {
+      state.outtaskStatus = true;
+    },
+    //退出详情页
+    REC_OUT_DETAIL(state) {
+      state.outtaskStatus = false;
+    },
     //付款管理
     // 进入详情
     PAY_IN_DETAIL(state) {
@@ -76,6 +86,9 @@ const ifdetail = {
       if (tag.label == '发货单(E)') {
         state.takeStatus = true;
       }
+      if (tag.label == '收货单(E)') {
+        state.outtaskStatus = true;
+      }
       if (tag.label == '付款管理') {
         state.payStatus = true;
       }

+ 3 - 2
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -18,7 +18,7 @@
   "menuWidth": 300,
   "dialogClickModal": false,
   "showSummary": true,
-  "sumText": "合计",
+  "summaryText": "合计",
   "sumColumnList": [
     {
       "name": "deliveryAmount",
@@ -114,7 +114,8 @@
       "prop": "actualQuantity",
       "index": 6,
       "width":100,
-      "cell": true,
+      "cell": false,
+      "slot": true,
       "rules": [
         {
           "required": false,

+ 1 - 1
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -18,7 +18,7 @@
     "showSummary": true,
     "searchIcon": true,
     "searchIndex": 3,
-    "sumText": "合计",
+    "summaryText": "合计",
     "sumColumnList": [
       {
         "name": "deliveryAmount",

+ 66 - 4
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -9,6 +9,20 @@
       </div>
       <el-button
         class="el-button--small-yh add-customer-btn"
+        style="right: 245px;"
+        type="primary"
+        @click="revokeOutGoods"
+        v-if="form.deliveryStatus !== '录入'"
+      >撤销发货</el-button>
+      <el-button
+        class="el-button--small-yh add-customer-btn"
+        style="right: 245px;"
+        type="primary"
+        @click="sendOutGoods"
+        v-if="form.deliveryStatus == '录入'"
+      >确认发货</el-button>
+      <el-button
+        class="el-button--small-yh add-customer-btn"
         type="success" style="right: 140px;" @click="copyOrder">
         复制新单
       </el-button>
@@ -33,7 +47,7 @@
                                 size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled"/>
                 <selectComponent v-else-if="item.prop === 'corpId' || item.prop === 'salesCompany'" v-model="form[item.prop]"
                                  :configuration="configuration" style="width: 100%"/>
-                <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
+                <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="item.disabled">
                   <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue" size="small"></el-option>
                 </el-select>
                 <avue-input-tree
@@ -90,7 +104,15 @@
               >录入明细
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
-              <el-button type="primary" size="small" @click="sendOutGoods">确认发货</el-button>
+            </template>
+            <template slot="actualQuantity" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.actualQuantity"
+                v-input-limit="0"
+                @change="actualQuantityChange(row)"
+              ></el-input>
+              <span v-else>{{ row.actualQuantity }}</span>
             </template>
           </avue-crud>
         </basic-container>
@@ -241,7 +263,8 @@ import {
   corpsbank,
   corpsitem,
   getList,
-  sendOutGoods
+  sendOutGoods,
+  revokeOutGoods
 } from "@/api/basicData/deliveryNotice"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
@@ -381,6 +404,7 @@ export default {
           }, {
             label: '单据状态',
             prop: 'deliveryStatus',
+            disabled: true,
             rules: [
               {
                 required: true,
@@ -431,6 +455,7 @@ export default {
           }, {
             label: '出库金额',
             prop: 'deliveryAmount',
+            disabled: true,
             rules: [
               {
                 required: true,
@@ -441,6 +466,7 @@ export default {
           }, {
             label: '出库数量',
             prop: 'totalQuantity',
+            disabled: true,
             rules: [
               {
                 required: true,
@@ -566,6 +592,8 @@ export default {
         this.form.deliveryAmount += Number(item.deliveryAmount)
         this.form.totalQuantity += Number(item.actualQuantity)
         this.form.totalCost += Number(item.deliveryAmount)
+        // 出库数量和出库金额的比例
+        this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
         delete item.id
         delete item.pid
       })
@@ -585,6 +613,15 @@ export default {
         this.advantageProjectData = this.form.deliveryFeesList
         this.bankOfDepositData = this.form.deliveryFilesList
         this.configuration.dicData = this.form.corpName
+        this.form.deliveryAmount = 0
+        this.form.totalQuantity = 0
+        this.contactsData.forEach(item => {
+          this.form.deliveryAmount += Number(item.deliveryAmount)
+          this.form.totalQuantity += Number(item.actualQuantity)
+          // 出库金额和出库数量的比例
+          this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
+        })
+        console.log(this.contactsData)
         if (this.form.companyName) {
           this.configuration.dicData = this.configuration.dicData.concat(this.form.companyName)
         }
@@ -645,6 +682,10 @@ export default {
         }
       });
     },
+    // 出库数量变化时调用
+    actualQuantityChange(row) {
+      row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
+    },
     // 类别变换时触发
     warehouseTreeChange(id) {
       this.warehouseName = []
@@ -1025,12 +1066,33 @@ export default {
           sendOutGoods(this.form).then(res => {
             console.log(res)
             this.$message.success('发货成功')
+            this.queryData(res.data.data.id)
+          })
+        } else {
+          return false;
+        }
+      });
+    },
+    // 撤销发货
+    revokeOutGoods() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          //商品信息
+          this.form.deliveryItemsList = this.contactsData
+          this.form.deliveryFeesList = this.advantageProjectData
+          this.form.deliveryFilesList = this.bankOfDepositData
+          if (typeof this.form.corpsTypeId == 'object') {
+            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
+          }
+          revokeOutGoods(this.form).then(res => {
+            console.log(res)
+            this.$message.success('撤销成功')
+            this.queryData(res.data.data.id)
           })
         } else {
           return false;
         }
       });
-
     },
     // 保存列设置
     async saveColumn(name) {

+ 1 - 1
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -18,7 +18,7 @@
   "menuWidth": 300,
   "dialogClickModal": false,
   "showSummary": true,
-  "sumText": "合计",
+  "summaryText": "合计",
   "sumColumnList": [
     {
       "name": "amount",

+ 1 - 1
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -18,7 +18,7 @@
   "menuWidth": 300,
   "dialogClickModal": false,
   "showSummary": true,
-  "sumText": "合计",
+  "summaryText": "合计",
   "sumColumnList": [
     {
       "name": "purchaseAmount",

+ 1 - 1
src/views/businessManagement/receipt/configuration/mainList.json

@@ -18,7 +18,7 @@
     "searchIcon": true,
     "searchIndex": 3,
     "showSummary": true,
-    "sumText": "合计",
+    "summaryText": "合计",
     "sumColumnList": [
       {
         "name": "deliveryAmount",

+ 1 - 2
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -18,7 +18,7 @@
   "menuWidth": 300,
   "dialogClickModal": false,
   "showSummary": true,
-  "sumText": "合计",
+  "summaryText": "合计",
   "sumColumnList": [
     {
       "name": "amount",
@@ -139,7 +139,6 @@
       "index": 6,
       "width":100,
       "cell": false,
-      "slot": true,
       "rules": [
         {
           "required": false,

+ 34 - 58
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -98,37 +98,6 @@
               ></el-input>
               <span v-else>{{ row.price }}</span>
             </template>
-            <template slot="storageQuantity" slot-scope="{ row }">
-              <el-input
-                v-if="row.$cellEdit"
-                v-model="row.storageQuantity"
-                size="small"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-              ></el-input>
-              <span v-else>{{ row.storageQuantity }}</span>
-            </template>
-            <template slot="actualQuantity" slot-scope="{ row }">
-              <el-input
-                v-if="row.$cellEdit"
-                v-model="row.actualQuantity"
-                size="small"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-              ></el-input>
-              <span v-else>{{ row.actualQuantity }}</span>
-            </template>
-<!--            <template slot="specificationAndModel" slot-scope="{ row }">-->
-<!--              <el-select-->
-<!--                v-if="row.$cellEdit && row.typeData.length > 0"-->
-<!--                v-model="row.specificationAndModel"-->
-<!--                size="small"-->
-<!--              ></el-select>-->
-<!--              <el-input-->
-<!--                v-else-if="row.$cellEdit && row.typeData.length == 0"-->
-<!--                v-model="row.specificationAndModel"-->
-<!--                size="small"-->
-<!--              ></el-input>-->
-<!--              <span v-else>{{ row.specificationAndModel }}</span>-->
-<!--            </template>-->
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                   type="text"
@@ -1169,6 +1138,7 @@ export default {
     //商品新增触发
     commoditySelection() {
       this.dialogVisible = !this.dialogVisible
+      this.tableData = []
       this.commodityData = false
     },
     //政策价格导入
@@ -1249,9 +1219,12 @@ export default {
         this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specs
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
         this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
-        this.contactsData[this.choiceIndexT].orderQuantity = 0
-        this.contactsData[this.choiceIndexT].price = 0
-        this.contactsData[this.choiceIndexT].amount = 0
+        selectGoodsNum({
+          goodsId: this.tableData[0].id,
+          typeno: this.tableData[0].specs
+        }).then(res => {
+          this.contactsData[this.choiceIndexT].storageQuantity =  res.data.data
+        })
       }
       this.dialogVisible = !this.dialogVisible
       this.commodityData = false
@@ -1291,32 +1264,31 @@ export default {
       // this.contactsData = this.contactsData.concat(this.tableData)
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
-          let data = {
+          // this.$set(this.tableData[item], 'storageQuantity', 0)
+          selectGoodsNum({
             goodsId: this.tableData[item].id,
             typeno: this.tableData[item].specs
-          }
-          selectGoodsNum(data).then(res => {
-            console.log(res.data)
+          }).then(res => {
+            console.log(this.tableData)
+            this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
+            this.tableData[item].storageQuantity =  res.data.data
+            delete this.tableData[item].goodsTypeName
+            this.tableData[item].itemId = this.tableData[item].id
+            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+            this.$set(this.tableData[item], 'priceType', '一般')
+            this.$set(this.tableData[item], 'orderQuantity', 0)
+            this.$set(this.tableData[item], 'actualQuantity', 0)
+            this.tableData[item].price = 0
+            this.tableData[item].amount = 0
+            this.tableData[item].sort = this.maxGoodsNum + 1
+            this.maxGoodsNum++
+            delete this.tableData[item].id
+            this.$refs.crudContact.rowCellAdd(this.tableData[item]);
+            this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
           })
-          this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
-          delete this.tableData[item].goodsTypeName
-          this.tableData[item].itemId = this.tableData[item].id
-          this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
-          this.$set(this.tableData[item], 'priceType', '一般')
-          this.$set(this.tableData[item], 'orderQuantity', 0)
-          this.$set(this.tableData[item], 'actualQuantity', 0)
-          this.$set(this.tableData[item], 'storageQuantity', 0)
-          this.tableData[item].price = 0
-          this.tableData[item].amount = 0
-          this.tableData[item].sort = this.maxGoodsNum + 1
-          this.maxGoodsNum++
-          delete this.tableData[item].id
-          this.$refs.crudContact.rowCellAdd(this.tableData[item]);
-          this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
         }
+        this.dialogVisible = false
       }
-      this.tableData = []
-      this.dialogVisible = false
     },
     closeGoods() {
       this.treeDataGoods = [];
@@ -1399,17 +1371,21 @@ export default {
     importPolicy() {
       let list = this.policyData.concat(this.policyDataTwo)
       for (let item in list) {
-        console.log(list[item])
+        selectGoodsNum({
+          goodsId: list[item].id,
+          typeno: list[item].specs
+        }).then(res => {
+          this.$set(list[item], 'storageQuantity', res.data.data)
+        })
         if (this.policyData.length > 0) {
           this.$set(list[item], 'price', list[item].specialOffer)
         } else {
           this.$set(list[item], 'price', list[item].salesPrice)
         }
         this.$set(list[item], 'actualQuantity', 0)
-        this.$set(list[item], 'storageQuantity', 0)
         this.$set(list[item], 'orderQuantity', 0)
         this.$set(list[item], 'amount', 0)
-        this.$set(list[item], 'priceCategory', this.policyForm.cname)
+        this.$set(list[item], 'priceCategory', list[item].productCategory)
         this.$set(list[item], 'priceType', this.policyForm.cname)
         this.$set(list[item], 'cname', list[item].productCategory)
         this.$set(list[item], 'sort', this.maxGoodsNum + 1)

+ 105 - 59
src/views/exportTrade/invoice/detailsPage.vue

@@ -11,6 +11,20 @@
           >返回列表
         </el-button>
       </div>
+      <el-button
+        type="info"
+        @click.stop="editCustomer('save')"
+        v-if="form.deliveryStatus == '录入'"
+        class="receipt-customer-btn"
+        >确认发货</el-button
+      >
+      <el-button
+        type="info"
+        @click.stop="editCustomer('repeal')"
+        v-if="form.deliveryStatus != '录入'"
+        class="receipt-customer-btn"
+        >撤销发货</el-button
+      >
       <el-button type="success" class="copy-customer-btn" disabled>
         复制新单
       </el-button>
@@ -18,7 +32,7 @@
         class="el-button--small-yh add-customer-btn"
         type="primary"
         :disabled="disabled"
-        @click="editCustomer"
+        @click="editCustomer('submit')"
         >{{ form.id ? "确认修改" : "确认新增" }}
       </el-button>
     </div>
@@ -215,43 +229,17 @@ import {
   delItem,
   getDeptLazyTree,
   getGoods,
-  getSpecification
+  getSpecification,
+  save,
+  repeal
 } from "@/api/basicData/invoice";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
-import {
-  isvalidatemobile,
-  validatename,
-  micrometerFormat
-} from "@/util/validate";
+import { micrometerFormat } from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "detailsPageEdit",
   data() {
-    const validatePhone = (rule, value, callback) => {
-      if (value != "") {
-        if (isvalidatemobile(value)[0]) {
-          this.$message.error("手机号码格式不正确");
-          callback(new Error(isvalidatemobile(value)[1]));
-        } else {
-          callback();
-        }
-      } else {
-        callback();
-      }
-    };
-    const validateName = (rule, value, callback) => {
-      if (value != "") {
-        if (validatename(value)) {
-          this.$message.error("联系人格式不正确");
-          callback(new Error(validatename(value)));
-        } else {
-          callback();
-        }
-      } else {
-        callback();
-      }
-    };
     return {
       configuration: {
         multipleChoices: false,
@@ -261,7 +249,9 @@ export default {
         dicData: []
       },
       switchDialog: false,
-      form: {},
+      form: {
+        deliveryStatus: "录入"
+      },
       disabled: false,
       dialogVisible: false,
       tableOption: {},
@@ -289,13 +279,20 @@ export default {
           },
           {
             label: "销售订单号",
-            prop: "orderNo",
+            prop: "srcOrderNo",
             span: 8
           },
           {
             label: "订单状态",
             prop: "deliveryStatus",
-            span: 8
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            disabled: true
           },
           {
             label: "仓库名称",
@@ -316,14 +313,16 @@ export default {
             valueFormat: "yyyy-MM-dd 00:00:00"
           },
           {
-            label: "出库金额",
-            prop: "deliveryAmount",
-            span: 8
-          },
-          {
             label: "出库数量",
             prop: "totalQuantity",
-            span: 8
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "出库金额",
+            prop: "deliveryAmount",
+            span: 8,
+            disabled: true
           },
           {
             label: "费用合计",
@@ -331,21 +330,19 @@ export default {
             span: 8
           },
           {
-            label: "货地址",
+            label: "货地址",
             prop: "arrivalAddress",
             span: 8
           },
           {
             label: "联系人",
             prop: "arrivalContact",
-            span: 8,
-            rules: [{ validator: validateName, trigger: "blur" }]
+            span: 8
           },
           {
             label: "电话",
             prop: "arrivalTel",
-            span: 8,
-            rules: [{ validator: validatePhone, trigger: "blur" }]
+            span: 8
           },
           {
             label: "制单时间",
@@ -396,7 +393,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption:{},
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -595,7 +592,7 @@ export default {
       this.configuration.dicData = data.corpName;
     },
     //修改提交触发
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
@@ -612,18 +609,60 @@ export default {
             }
           }
           const orderFilesList = this.$refs.uploadFile.submitData();
-          submit({
-            ...this.form,
-            deliveryItemsList: this.data,
-            deliveryFeesList: orderFeesList,
-            deliveryFilesList: orderFilesList
-          }).then(res => {
-            this.$message.success(this.form.id ? "修改成功" : "提交成功");
-            this.form = res.data.data;
-            this.data = res.data.data.deliveryItemsList;
-            this.orderFeesList = res.data.data.deliveryFeesList;
-            this.orderFilesList = res.data.data.deliveryFilesList;
-          });
+          if (status == "submit") {
+            submit({
+              ...this.form,
+              deliveryItemsList: this.data,
+              deliveryFeesList: orderFeesList,
+              deliveryFilesList: orderFilesList
+            }).then(res => {
+              this.$message.success(this.form.id ? "修改成功" : "提交成功");
+              this.form = res.data.data;
+              this.data = res.data.data.deliveryItemsList;
+              this.orderFeesList = res.data.data.deliveryFeesList;
+              this.orderFilesList = res.data.data.deliveryFilesList;
+            });
+          }
+          if (status == "save") {
+            this.$confirm("此操作将确认发货, 是否继续?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              save({
+                ...this.form,
+                deliveryItemsList: this.data,
+                deliveryFeesList: orderFeesList,
+                deliveryFilesList: orderFilesList
+              }).then(res => {
+                this.form = res.data.data;
+                this.data = res.data.data.deliveryItemsList;
+                this.orderFeesList = res.data.data.deliveryFeesList;
+                this.orderFilesList = res.data.data.deliveryFilesList;
+                this.$message.success("提交成功");
+              });
+            });
+          }
+          if (status == "repeal") {
+            this.$confirm("此操作将撤销发货, 是否继续?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              repeal({
+                ...this.form,
+                deliveryItemsList: this.data,
+                deliveryFeesList: orderFeesList,
+                deliveryFilesList: orderFilesList
+              }).then(res => {
+                this.form = res.data.data;
+                this.data = res.data.data.deliveryItemsList;
+                this.orderFeesList = res.data.data.deliveryFeesList;
+                this.orderFilesList = res.data.data.deliveryFilesList;
+                this.$message.success("撤销成功");
+              });
+            });
+          }
         } else {
           return false;
         }
@@ -653,6 +692,8 @@ export default {
             data.forEach(e => {
               qtySum = _.add(qtySum, Number(e.actualQuantity));
               amountSum = _.add(amountSum, Number(e.contractAmount));
+              this.form.totalQuantity = qtySum;
+              this.form.deliveryAmount = amountSum;
             });
             //数量总计
             if (item.property == "actualQuantity") {
@@ -718,6 +759,11 @@ export default {
   font-size: 20px;
   margin-right: 8px;
 }
+.receipt-customer-btn {
+  position: fixed;
+  right: 244px;
+  top: 115px;
+}
 .copy-customer-btn {
   position: fixed;
   right: 140px;

+ 78 - 5
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -113,6 +113,14 @@
                 @click.stop="openReport()"
                 >报 表</el-button
               >
+              <el-button
+                type="warning"
+                icon="el-icon-plus"
+                size="small"
+                :disabled="detailData.status == 1 || orderItemIds.length == 0"
+                @click="getInvoice"
+                >生成收货单
+              </el-button>
             </template>
             <template slot="menu" slot-scope="{ row, index }">
               <el-button
@@ -479,7 +487,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption:{},
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -487,7 +495,8 @@ export default {
       orderFeesList: [],
       orderFilesList: [],
       orderItemIds: [],
-      itemtypeList: []
+      itemtypeList: [],
+      goodsSelections: []
     };
   },
   props: {
@@ -505,7 +514,7 @@ export default {
       this.getColumnName(3),
       tableOption
     );
-        this.goodsOption = await this.getColumnData(
+    this.goodsOption = await this.getColumnData(
       this.getColumnName(27),
       goodsOption
     );
@@ -635,11 +644,11 @@ export default {
       this.treeDeptId = "";
     },
     goodsSelectionChange(list) {
+      this.goodsSelections = list;
       this.orderItemIds = [];
       list.map(e => {
         this.orderItemIds.push(e.id);
       });
-      console.log(this.orderItemIds);
     },
     selectionChange(list) {
       this.selectionList = list;
@@ -742,7 +751,7 @@ export default {
             });
             //数量总计
             if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : '0.00';
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
             }
             //金额总计
             if (item.property == "amount") {
@@ -753,6 +762,70 @@ export default {
       }
       return sums;
     },
+    getInvoice() {
+      if (!this.form.id) {
+        return this.$message.error("数据未提交,请提交数据");
+      }
+      for (let i = 0; i < this.goodsSelections.length; i++) {
+        if (!this.goodsSelections[i].id) {
+          return this.$message.error("明细表未提交数据,请提交数据");
+        }
+      }
+      if (this.$store.getters.outtaskStatus) {
+        this.$alert("出口发货单存在,请保存发货单再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+            console.log(action);
+          }
+        });
+      } else {
+        this.inInvoice();
+      }
+    },
+    inInvoice() {
+      const data = this.deepClone(this.form);
+      data.orderItemsList = this.deepClone(this.goodsSelections);
+      data.orderItemsList.forEach(e => {
+        e.actualQuantity = e.orderQuantity;
+        e.contractAmount = e.amount;
+        e.srcId = e.id;
+        e.packageRemarks = e.itemProp;
+        e.productDesc = e.itemDescription;
+        e.specificationAndModele = e.itemType;
+        delete e.id;
+        delete e.version;
+        delete e.status;
+        delete e.createUser;
+        delete e.createTime;
+        delete e.updateUser;
+        delete e.updateTime;
+        delete e.isDeleted;
+      });
+      delete data.id;
+      delete data.version;
+      delete data.status;
+      delete data.createUser;
+      delete data.createTime;
+      delete data.updateUser;
+      delete data.updateTime;
+      delete data.isDeleted;
+      delete data.orderStatus;
+      data.deliveryStatus = "录入";
+      data.srcOrderNo = data.sysNo;
+      delete data.sysNo;
+      data.corpName = data.corpsName;
+      delete data.corpsName;
+      this.$refs.crud.toggleSelection();
+      this.$router.$avueRouter.closeTag("/exportTrade/receipt/index");
+      this.$router.push({
+        path: "/exportTrade/receipt/index",
+        query: {
+          pageType: "Generate",
+          data: JSON.stringify(data)
+        }
+      });
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(3),

+ 0 - 7
src/views/exportTrade/receipt/config/customerContact.json

@@ -14,13 +14,6 @@
   "showSummary": true,
   "column": [
     {
-      "label": "销售订单号",
-      "prop": "orgOrderNo",
-      "index": 1,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 2,

+ 99 - 12
src/views/exportTrade/receipt/detailsPage.vue

@@ -11,6 +11,20 @@
           >返回列表
         </el-button>
       </div>
+      <el-button
+        type="info"
+        @click.stop="editCustomer('save')"
+        v-if="form.deliveryStatus == '录入'"
+        class="receipt-customer-btn"
+        >确认收货</el-button
+      >
+      <el-button
+        type="info"
+        @click.stop="editCustomer('repeal')"
+        v-if="form.deliveryStatus != '录入'"
+        class="receipt-customer-btn"
+        >撤销收货</el-button
+      >
       <el-button type="success" class="copy-customer-btn" disabled>
         复制新单
       </el-button>
@@ -18,7 +32,7 @@
         class="el-button--small-yh add-customer-btn"
         type="primary"
         :disabled="disabled"
-        @click="editCustomer"
+        @click="editCustomer('submit')"
         >{{ form.id ? "确认修改" : "确认新增" }}
       </el-button>
     </div>
@@ -215,7 +229,9 @@ import {
   delItem,
   getDeptLazyTree,
   getGoods,
-  getSpecification
+  getSpecification,
+  save,
+  repeal
 } from "@/api/exportTrade/receipt";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
@@ -295,7 +311,14 @@ export default {
           {
             label: "订单状态",
             prop: "deliveryStatus",
-            span: 8
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            disabled: true
           },
           {
             label: "仓库名称",
@@ -408,6 +431,9 @@ export default {
       this.getColumnName(29),
       goodsOption
     );
+    if (this.$route.query.pageType == "Generate") {
+      this.getGenerate(JSON.parse(this.$route.query.data));
+    }
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -435,6 +461,12 @@ export default {
     });
   },
   methods: {
+    getGenerate(data) {
+      this.form = data;
+      this.data = data.orderItemsList;
+      this.orderFeesList = data.deliveryFeesList ? data.deliveryFeesList : [];
+      this.configuration.dicData = data.corpName;
+    },
     itemTypeFocus(row) {
       this.itemtypeList = [];
       getSpecification({ goodId: row.itemId }).then(res => {
@@ -569,7 +601,7 @@ export default {
       });
     },
     //修改提交触发
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
@@ -586,14 +618,64 @@ export default {
             }
           }
           const orderFilesList = this.$refs.uploadFile.submitData();
-          submit({
-            ...this.form,
-            deliveryItemsList: this.data,
-            deliveryFeesList: orderFeesList,
-            deliveryFilesList: orderFilesList
-          }).then(res => {
-            this.$message.success(this.form.id ? "修改成功" : "提交成功");
-          });
+          if (status == "submit") {
+            submit({
+              ...this.form,
+              deliveryItemsList: this.data,
+              deliveryFeesList: orderFeesList,
+              deliveryFilesList: orderFilesList
+            }).then(res => {
+              this.form = res.data.data;
+              this.data = res.data.data.deliveryItemsList;
+              this.orderFeesList = res.data.data.deliveryFeesList;
+              this.orderFilesList = res.data.data.deliveryFilesList;
+              this.configuration.dicData = this.form.corpName;
+              this.$message.success(this.form.id ? "修改成功" : "提交成功");
+            });
+          }
+          if (status == "save") {
+            console.log("111111");
+            this.$confirm("此操作将确认收货, 是否继续?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              save({
+                ...this.form,
+                deliveryItemsList: this.data,
+                deliveryFeesList: orderFeesList,
+                deliveryFilesList: orderFilesList
+              }).then(res => {
+                this.form = res.data.data;
+                this.data = res.data.data.deliveryItemsList;
+                this.orderFeesList = res.data.data.deliveryFeesList;
+                this.orderFilesList = res.data.data.deliveryFilesList;
+                this.configuration.dicData = this.form.corpName;
+                this.$message.success("提交成功");
+              });
+            });
+          }
+          if (status == "repeal") {
+            this.$confirm("此操作将撤销收货, 是否继续?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              repeal({
+                ...this.form,
+                deliveryItemsList: this.data,
+                deliveryFeesList: orderFeesList,
+                deliveryFilesList: orderFilesList
+              }).then(res => {
+                this.form = res.data.data;
+                this.data = res.data.data.deliveryItemsList;
+                this.orderFeesList = res.data.data.deliveryFeesList;
+                this.orderFilesList = res.data.data.deliveryFilesList;
+                this.configuration.dicData = this.form.corpName;
+                this.$message.success("撤销成功");
+              });
+            });
+          }
         } else {
           return false;
         }
@@ -688,6 +770,11 @@ export default {
   font-size: 20px;
   margin-right: 8px;
 }
+.receipt-customer-btn {
+  position: fixed;
+  right: 244px;
+  top: 115px;
+}
 .copy-customer-btn {
   position: fixed;
   right: 140px;

+ 22 - 1
src/views/exportTrade/receipt/index.vue

@@ -98,6 +98,9 @@ export default {
   components: { detailPage },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(6), option);
+    if (this.$route.query.pageType == "Generate") {
+      this.newAdd();
+    }
     let _this = this;
     this.option.column.forEach(e => {
       if (e.prop == "exchangeRate") {
@@ -118,6 +121,14 @@ export default {
       }
     });
   },
+  activated() {
+    //当页面已打开并无法重新渲染时,用activated重新激活keepalive组件
+    setTimeout(() => {
+      if (this.$route.query.pageType == "Generate" && this.show) {
+        this.newAdd();
+      }
+    }, 100);
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
@@ -142,6 +153,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("REC_IN_DETAIL");
     },
     editOpen(row, status) {
       this.detailData = {
@@ -149,6 +161,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("REC_IN_DETAIL");
     },
     //点击搜索按钮触发
     searchChange(params, done) {
@@ -183,10 +196,18 @@ export default {
     },
     newAdd() {
       this.show = false;
+      this.$store.commit("REC_IN_DETAIL");
     },
     goBack() {
       this.detailData = this.$options.data().detailData;
+      if (this.$route.query.pageType == "Generate") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/exportTrade/receipt/index"
+        });
+      }
       this.show = true;
+      this.$store.commit("REC_OUT_DETAIL");
     },
     summaryMethod({ columns, data }) {
       const sums = [];
@@ -204,7 +225,7 @@ export default {
             data.forEach(e => {
               qtySum = _.add(qtySum, Number(e.totalQuantity));
               instoreSum = _.add(instoreSum, Number(e.deliveryAmount));
-              totalSum= _.add(totalSum, Number(e.totalCost));
+              totalSum = _.add(totalSum, Number(e.totalCost));
             });
             //数量总计
             if (item.property == "totalQuantity") {

+ 11 - 4
src/views/exportTrade/salesContract/config/customerContact.json

@@ -78,9 +78,16 @@
       "overHidden":true
     },
     {
+      "label": "发货数量",
+      "prop": "actualQuantity",
+      "index": 9,
+      "width": 120,
+      "overHidden":true
+    },
+    {
       "label": "计价单位",
       "prop": "unit",
-      "index": 9,
+      "index": 10,
       "width": 120,
       "overHidden":true,
       "cell": true,
@@ -94,21 +101,21 @@
     {
       "label": "单价",
       "prop": "price",
-      "index": 10,
+      "index": 11,
       "width": 120,
       "overHidden":true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 11,
+      "index": 12,
       "width": 120,
       "overHidden":true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 12,
+      "index": 13,
       "width": 120,
       "overHidden":true,
       "cell": true

+ 13 - 30
src/views/exportTrade/salesContract/detailsPage.vue

@@ -265,34 +265,10 @@ import {
 } from "@/api/basicData/salesContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename,micrometerFormat } from "@/util/validate";
+import { micrometerFormat } from "@/util/validate";
 export default {
   name: "detailsPageEdit",
   data() {
-    const validatePhone = (rule, value, callback) => {
-      if (value != "") {
-        if (isvalidatemobile(value)[0]) {
-          this.$message.error("手机号码格式不正确");
-          callback(new Error(isvalidatemobile(value)[1]));
-        } else {
-          callback();
-        }
-      } else {
-        callback();
-      }
-    };
-    const validateName = (rule, value, callback) => {
-      if (value != "") {
-        if (validatename(value)) {
-          this.$message.error("联系人格式不正确");
-          callback(new Error(validatename(value)));
-        } else {
-          callback();
-        }
-      } else {
-        callback();
-      }
-    };
     return {
       configuration: {
         multipleChoices: false,
@@ -353,14 +329,12 @@ export default {
           {
             label: "联系人",
             prop: "corpAttn",
-            span: 8,
-            rules: [{ validator: validateName, trigger: "blur" }]
+            span: 8
           },
           {
             label: "电话",
             prop: "corpTel",
-            span: 8,
-            rules: [{ validator: validatePhone, trigger: "blur" }]
+            span: 8
           },
           {
             label: "起运港",
@@ -572,7 +546,7 @@ export default {
       this.getColumnName(5),
       tableOption
     );
-    console.log(this.tableOption)
+    console.log(this.tableOption);
     this.goodsOption = await this.getColumnData(
       this.getColumnName(28),
       goodsOption
@@ -640,6 +614,11 @@ export default {
       }
     },
     quantityChange(row) {
+      console.log(row.orderQuantity, row.actualQuantity);
+      if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
+        row.orderQuantity = row.actualQuantity;
+        this.$message.error("修改的数量不能低于发货数量");
+      }
       if (!row.orderQuantity) {
         row.orderQuantity = 0;
       } else {
@@ -821,6 +800,7 @@ export default {
             data.orderItemsList.forEach(e => {
               e.actualQuantity = e.orderQuantity;
               e.contractAmount = e.amount;
+              e.srcId = e.id;
               delete e.id;
               delete e.version;
               delete e.status;
@@ -839,6 +819,9 @@ export default {
             delete data.updateTime;
             delete data.isDeleted;
             delete data.orderStatus;
+            data.deliveryStatus = "录入";
+            data.srcOrderNo = data.sysNo;
+            delete data.sysNo;
             this.$router.$avueRouter.closeTag("/exportTrade/invoice/index");
             this.$router.push({
               path: "/exportTrade/invoice/index",

+ 16 - 127
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -22,26 +22,7 @@
     <div style="margin-top: 60px;margin-bottom:35px">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container style="margin-bottom: 10px">
-        <avue-form ref="form" v-model="form" :option="option">
-          <template slot="corpId">
-            <select-component
-              v-model="form.corpId"
-              :configuration="configuration"
-              :disabled="true"
-            ></select-component>
-          </template>
-          <template slot="exchangeRate">
-            <el-input
-              size="mini"
-              v-model="form.exchangeRate"
-              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-              @change="rateChange"
-              placeholder="请输入 汇率"
-              disabled
-              ><template slot="append">%</template></el-input
-            >
-          </template>
-        </avue-form>
+        <avue-form ref="form" v-model="form" :option="option" />
       </basic-container>
       <containerTitle title="商品信息"></containerTitle>
       <basic-container>
@@ -64,6 +45,16 @@
           </template> -->
         </avue-crud>
       </basic-container>
+      <containerTitle title="运费明细"></containerTitle>
+      <basic-container>
+        <avue-crud
+          ref="freightCrud"
+          :data="freightData"
+          :option="freightOption"
+          @row-del="rowDel"
+          @saveColumn="saveFreightColumn"
+        />
+      </basic-container>
       <fee-info
         ref="feeInfo"
         :orderFeesList="orderFeesList"
@@ -132,6 +123,7 @@
 <script>
 import tableOption from "./config/customerContact.json";
 import goodsOption from "./config/commodity.json";
+import freightOption from "./config/commodity.json";
 import feeInfo from "@/components/fee-info/main";
 import {
   detail,
@@ -186,54 +178,19 @@ export default {
       form: {},
       disabled: false,
       dialogVisible: false,
-      tableOption: tableOption,
+      freightOption:freightOption,
+      tableOption:{},
       option: {
         menuBtn: false,
         labelWidth: 100,
         disabled: true,
         column: [
           {
-            label: "客户名称",
-            prop: "corpId",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8,
-            slot: true
-          },
-          {
             label: "系统号",
             prop: "sysNo",
             span: 8
           },
           {
-            label: "订单状态",
-            prop: "orderStatus",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
-            label: "联系人",
-            prop: "corpAttn",
-            span: 8,
-            rules: [{ validator: validateName, trigger: "blur" }]
-          },
-          {
-            label: "电话",
-            prop: "corpTel",
-            span: 8,
-            rules: [{ validator: validatePhone, trigger: "blur" }]
-          },
-          {
             label: "起运港",
             prop: "portOfLoad",
             span: 8,
@@ -258,42 +215,7 @@ export default {
             }
           },
           {
-            label: "运输方式",
-            prop: "transport",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
-            label: "价格条款",
-            prop: "priceTerms",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=pricing_terms",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
-            label: "条款说明",
-            prop: "priceTermsDescription",
-            span: 8
-          },
-          {
-            label: "订单日期",
-            prop: "businesDate",
-            span: 8,
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00"
-          },
-          {
-            label: "有效日期",
+            label: "计划交期",
             prop: "dateValidity",
             span: 8,
             type: "date",
@@ -301,40 +223,7 @@ export default {
             valueFormat: "yyyy-MM-dd 00:00:00"
           },
           {
-            label: "收款方式",
-            prop: "paymentType",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
-            label: "收款说明",
-            prop: "paymentTypeDescription",
-            span: 8
-          },
-          {
-            label: "币别",
-            prop: "currency",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
-            label: "汇率",
-            prop: "exchangeRate",
-            span: 8,
-            slot: true
-          },
-          {
-            label: "备注",
+            label: "销售指示",
             prop: "orderRemark",
             type: "textarea",
             minRows: 2,

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