Ver código fonte

功能提交

qinbai 3 anos atrás
pai
commit
bd44f37a6a
28 arquivos alterados com 396 adições e 446 exclusões
  1. 8 0
      src/api/basicData/customerInformation.js
  2. 149 150
      src/page/index/tags.vue
  3. 2 2
      src/router/views/index.js
  4. 1 1
      src/store/modules/ifdetail.js
  5. 7 7
      src/views/basicData/commodityCategory/configuration/mainList.json
  6. 6 16
      src/views/basicData/commodityCategory/index.vue
  7. 9 18
      src/views/basicData/commodityType/index.vue
  8. 0 1
      src/views/basicData/customerCategory/index.vue
  9. 18 3
      src/views/basicData/customerInformation/detailsPageEdit.vue
  10. 10 19
      src/views/basicData/customerInformation/index.vue
  11. 9 18
      src/views/basicData/productInformation/index.vue
  12. 1 0
      src/views/financialManagement/payment.vue
  13. 9 1
      src/views/financialManagement/receiptDetailsPage.vue
  14. 37 10
      src/views/importTrade/invoice/detailsPageEdit.vue
  15. 3 0
      src/views/importTrade/invoice/index.vue
  16. 37 10
      src/views/importTrade/receipt/detailsPageEdit.vue
  17. 1 0
      src/views/importTrade/receipt/index.vue
  18. 2 2
      src/views/purchase/contract/config/customerContact.json
  19. 2 2
      src/views/purchase/contract/config/mainList.json
  20. 10 161
      src/views/purchase/contract/detailsPage.vue
  21. 1 1
      src/views/purchase/contract/index.vue
  22. 8 1
      src/views/salesManagement/salesContract/config/importInventory.json
  23. 5 0
      src/views/salesManagement/salesContract/config/mainList.json
  24. 52 18
      src/views/salesManagement/salesContract/detailsPage.vue
  25. 6 1
      src/views/salesManagement/salesContract/index.vue
  26. 2 2
      src/views/workManagement/main-items/detailsPage.vue
  27. 1 1
      src/views/workManagement/service-items/configuration/projectOption.json
  28. 0 1
      src/views/workManagement/service-items/project.vue

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

@@ -91,3 +91,11 @@ export function corpstypeTree() {
         method: 'get'
     })
 }
+
+//查询区域下拉
+export function areaTypeTree() {
+  return request({
+    url: '/api/blade-system/region/lazy-list',
+    method: 'get'
+  })
+}

+ 149 - 150
src/page/index/tags.vue

@@ -63,168 +63,167 @@
 import {mapGetters, mapState} from "vuex";
 import {clearCache} from "@/api/user";
 
-export default {
-  name: "tags",
-  data() {
-    return {
-      active: "",
-      contentmenuX: "",
-      contentmenuY: "",
-      contextmenuFlag: false,
-      data:''
-    };
-  },
-  created() {
-  },
-  mounted() {
-    this.setActive();
-    this.data = this.active
-  },
-  watch: {
-    tag() {
-      this.setActive();
+  export default {
+    name: "tags",
+    data() {
+      return {
+        active: "",
+        contentmenuX: "",
+        contentmenuY: "",
+        contextmenuFlag: false,
+        data:''
+      };
     },
-    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
-      );
+    created() {
     },
-    watchContextmenu(event) {
-      if (!this.$el.contains(event.target) || event.button !== 0) {
-        this.contextmenuFlag = false;
-      }
-      window.removeEventListener("mousedown", this.watchContextmenu);
+    mounted() {
+      this.setActive();
+      this.data = this.active
     },
-    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;
+    watch: {
+      tag() {
+        this.setActive();
+      },
+      contextmenuFlag() {
+        window.addEventListener("mousedown", this.watchContextmenu);
       }
     },
-    //激活当前选项
-    setActive() {
-      this.data = this.active
-      this.active = this.tag.value;
+    computed: {
+      ...mapGetters(["tagWel", "tagList", "tag", "website"]),
+      ...mapState({
+        showTag: state => state.common.showTag
+      }),
+      tagLen() {
+        return this.tagList.length || 0;
+      }
     },
-    menuTag(value, action) {
-      if (action === "remove") {
-        let {tag, key} = this.findTag(value);
-        if(tag.label=="出口发货单"){
-          this.$store.commit("OUT_OUT_DETAIL");
-        }
-          if(tag.label=="国内发货单"){
-          this.$store.commit("IN_OUT_DETAIL");
-        }
-          if(tag.label=="进口发货单"){
-          this.$store.commit("GO_OUT_DETAIL");
+    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;
         }
-        if(tag.label=="进口收货单"){
-          this.$store.commit("TAKE_OUT_DETAIL");
+        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;
         }
-        if(tag.label=="付款管理"){
-          this.$store.commit("PAY_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;
         }
-        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;
+      },
+      //激活当前选项
+      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=="出口发货单"){
+            this.$store.commit("OUT_OUT_DETAIL");
+          }
+            if(tag.label=="国内发货单"){
+            this.$store.commit("IN_OUT_DETAIL");
+          }
+            if(tag.label=="发货单"){
+            this.$store.commit("GO_OUT_DETAIL");
+          }
+          if(tag.label=="收货单"){
+            this.$store.commit("TAKE_OUT_DETAIL");
+          }
+          if(tag.label=="付款管理"){
+            this.$store.commit("PAY_OUT_DETAIL");
+          }
+          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({
-            name: tag.label,
-            src: tag.value
-          }, tag.meta),
-          query: tag.query
+            src: this.tagWel.value
+          }),
+          query: this.tagWel.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");
-              console.log(this.$store.getters.tag)
-      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('清除完毕');
-        })
-      });
+        this.$store.commit("DEL_ALL_DETAIL");
+      },
+      clearCacheTags() {
+        this.$confirm("是否需要清除缓存?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          clearCache().then(() => {
+            this.contextmenuFlag = false;
+            this.$message.success('清除完毕');
+          })
+        });
+      }
     }
-  }
-};
+  };
 </script>

+ 2 - 2
src/router/views/index.js

@@ -273,7 +273,7 @@ export default [{
     children: [
       {
         path: '/importTrade/receipt/index',
-        name:'进口收货单',
+        name:'收货单',
         meta: {
           i18n: '/importTrade/receipt/index',
           keepAlive: true
@@ -290,7 +290,7 @@ export default [{
     children: [
       {
         path: '/importTrade/invoice/index',
-        name:'进口发货单',
+        name:'发货单',
         meta: {
           i18n: 'importTrade/invoice/index',
           keepAlive: true

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

@@ -45,7 +45,7 @@ const ifdetail = {
       state.outStatus = false;
     },
     //付款管理
-    // 进入详情payment
+    // 进入详情
     PAY_IN_DETAIL(state) {
       state.payStatus = true;
     },

+ 7 - 7
src/views/basicData/commodityCategory/configuration/mainList.json

@@ -1,6 +1,4 @@
 {
-  "headerAlign": "center",
-  "align": "center",
   "border": true,
   "index": true,
   "lazy": true,
@@ -8,17 +6,18 @@
   "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": true,
-  "menuWidth": 300,
+  "menuWidth": 400,
   "column": [
     {
       "label": "类别名称",
       "prop": "cname",
       "search": true,
       "index": 1,
-      "width": 100,
+      "width": 400,
       "rules": [
         {
           "required": true,
@@ -38,7 +37,7 @@
       "addDisplay": false,
       "editDisplay":false,
       "index": 2,
-      "width": 100,
+      "width": 250,
       "rules": [
         {
           "required": true,
@@ -69,7 +68,7 @@
       "prop": "sort",
       "type": "number",
       "index": 5,
-      "width": 60,
+      "width": 200,
       "rules": [{
         "required": true,
         "message": "请输入排序",
@@ -82,7 +81,8 @@
       "prop": "status",
       "search": true,
       "index": 4,
-      "width": 100,
+      "width": 200,
+      "value":0,
       "dicData": [{
         "label": "正常",
         "value": 0

+ 6 - 16
src/views/basicData/commodityCategory/index.vue

@@ -52,10 +52,10 @@ export default {
     }
   },
   created() {
-    // customerList({parentId:0}).then(res => {
-    //   console.log(res.data.data.records)
-    //   this.dataList = res.data.data.records
-    // })
+    customerList({parentId:0}).then(res => {
+      const column = this.findObject(this.option.column, "parentId");
+      column.dicData = res.data.data.records;
+    });
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
@@ -92,33 +92,23 @@ export default {
     //新增修改时保存触发
     rowSave(row, done, loading) {
       typeSave(row).then(res => {
-        console.log(res)
         this.page.currentPage = 1;
         this.onLoad(this.page, {parentId: 0});
         done()
       })
     },
-    //查询全部
-    initData(){
-      customerList({parentId:0}).then(res => {
-        console.log(this.form);
-        const column = this.findObject(this.option.column, "parentId");
-        column.dicData = res.data.data.records;
-      });
-    },
     //新增子项触发
     handleAdd(row) {
       this.parentId = row.id;
       const column = this.findObject(this.option.column, "parentId");
-      column.value = row.id;
+      this.$set(this.form,"parentId",row.id)
       column.addDisabled = true;
       this.$refs.crud.rowAdd();
     },
     //新增子项和新增触发查询所有
     beforeOpen(done, type) {
-      console.log('1111')
       if (["add", "edit"].includes(type)) {
-        this.initData();
+
       }
       if (["edit", "view"].includes(type)) {
         detail(this.form.id).then(res => {

+ 9 - 18
src/views/basicData/commodityType/index.vue

@@ -31,7 +31,7 @@
               type="primary"
               size="small"
               icon="el-icon-bottom"
-              @click="commodityImport()"
+              @click="excelBox = true"
             >导入
             </el-button>
           </template>
@@ -148,6 +148,7 @@
               </el-button>
             </template>
           </avue-form>
+          <p style="text-align: center;color: rgba(165,164,164,0.64)">温馨提示 请先下载模板再上传附件</p>
         </el-dialog>
       </basic-container>
     </el-col>
@@ -327,6 +328,12 @@ export default {
         emptyBtn: false,
         column: [
           {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
+          },
+          {
             label: '模板上传',
             prop: 'excelFile',
             type: 'upload',
@@ -337,14 +344,8 @@ export default {
               res: 'data',
             },
             tip: '请上传 .xls,.xlsx 标准格式文件',
-            action: "",
+            action: "/api/blade-client/goodsdesc/import-desc",
           },
-          {
-            label: '模板下载',
-            prop: 'excelTemplate',
-            formslot: true,
-            span: 24,
-          }
         ]
       }
     };
@@ -390,16 +391,6 @@ export default {
     }
   },
   methods: {
-    //导入
-    commodityImport(){
-      if(this.treeDeptId === ''){
-        this.$message.warning("请选择商品类型")
-      }else{
-        this.excelBox = !this.excelBox
-        const column = this.findObject(this.excelOption.column, "excelFile");
-        column.action = "/api/blade-client/goodsdesc/import-desc?typeId="+this.treeDeptId+"";
-      }
-    },
     derivation() {
       window.open(`/api/blade-client/goodsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },

+ 0 - 1
src/views/basicData/customerCategory/index.vue

@@ -107,7 +107,6 @@ export default {
     //查询全部
     initData(){
       customerList().then(res => {
-        console.log(this.form);
         const column = this.findObject(this.option.column, "parentId");
         column.dicData = res.data.data.records;
       });

+ 18 - 3
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -51,10 +51,21 @@
                   size="small"
                   :props="{ label: 'title' }"
                   v-model="form[item.prop]"
-                  placeholder="请选择内容"
+                  placeholder=" "
                   type="tree"
                   :dic="dic"
                 ></avue-input-tree>
+                <avue-input-tree
+                  v-else-if="item.prop === 'belongtoarea'"
+                  leaf-only
+                  style="width: 100%;"
+                  size="small"
+                  :props="{ label: 'name',value:'name' }"
+                  v-model="form[item.prop]"
+                  placeholder=" "
+                  type="tree"
+                  :dic="dicArea"
+                ></avue-input-tree>
                 <el-input
                   type="age"
                   v-else
@@ -178,7 +189,8 @@ import {
   corpsattn,
   corpsbank,
   corpsfiles,
-  corpsitem
+  corpsitem,
+  areaTypeTree
 } from "@/api/basicData/customerInformation";
 import customerContact from "./configuration/customerContact.json";
 import advantageProject from "./configuration/advantageProject.json";
@@ -198,6 +210,7 @@ export default {
       advantageProjectData: [],
       bankOfDepositData: [],
       dic: [],
+      dicArea:[],
       customerContact: customerContact,
       advantageProject: advantageProject,
       bankOfDeposit: bankOfDeposit,
@@ -466,7 +479,6 @@ export default {
           },
           {
             label: "代理区域",
-            span: 24,
             prop: "belongtoarea",
             mock: {
               type: "county"
@@ -483,6 +495,9 @@ export default {
     corpstypeTree().then(res => {
       this.dic = res.data.data;
     });
+    areaTypeTree().then(res =>{
+      this.dicArea = res.data.data;
+    })
     if (this.$route.query.id) {
       let id = this.$route.query.id.replace(/\"/g, "");
       // let id = parseInt(this.$route.query.id)

+ 10 - 19
src/views/basicData/customerInformation/index.vue

@@ -40,7 +40,7 @@
               type="primary"
               size="small"
               icon="el-icon-bottom"
-              @click="commodityImport()"
+              @click="excelBox = true"
             >导入
             </el-button>
             <el-button
@@ -92,6 +92,7 @@
               </el-button>
             </template>
           </avue-form>
+          <p style="text-align: center;color: rgba(165,164,164,0.64)">温馨提示 请先下载模板再上传附件</p>
         </el-dialog>
       </basic-container>
     </el-col>
@@ -158,6 +159,12 @@ export default {
         emptyBtn: false,
         column: [
           {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
+          },
+          {
             label: '模板上传',
             prop: 'excelFile',
             type: 'upload',
@@ -168,14 +175,8 @@ export default {
               res: 'data',
             },
             tip: '请上传 .xls,.xlsx 标准格式文件',
-            action: "",
+            action: "/api/blade-client/corpsdesc/import-desc",
           },
-          {
-            label: '模板下载',
-            prop: 'excelTemplate',
-            formslot: true,
-            span: 24,
-          }
         ]
       }
     };
@@ -184,19 +185,9 @@ export default {
     reportDialog
   },
   created() {
-    console.log("wangbadan");
-    // this.onLoad()
+
   },
   methods: {
-    commodityImport(){
-      if(this.treeDeptId === ''){
-        this.$message.warning("请选择客户类型")
-      }else{
-        this.excelBox = !this.excelBox
-        const column = this.findObject(this.excelOption.column, "excelFile");
-        column.action = "/api/blade-client/corpsdesc/import-desc?typeId="+this.treeDeptId+"";
-      }
-    },
     derivation() {
       window.open(`/api/blade-client/corpsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },

+ 9 - 18
src/views/basicData/productInformation/index.vue

@@ -30,7 +30,7 @@
               type="primary"
               size="small"
               icon="el-icon-bottom"
-              @click="commodityImport()"
+              @click="excelBox = true"
             >导入
             </el-button>
           </template>
@@ -69,6 +69,7 @@
               </el-button>
             </template>
           </avue-form>
+          <p style="text-align: center;color: rgba(165,164,164,0.64)">温馨提示 请先下载模板再上传附件</p>
         </el-dialog>
       </basic-container>
     </el-col>
@@ -152,6 +153,12 @@ export default {
         emptyBtn: false,
         column: [
           {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
+          },
+          {
             label: '模板上传',
             prop: 'excelFile',
             type: 'upload',
@@ -162,29 +169,13 @@ export default {
               res: 'data',
             },
             tip: '请上传 .xls,.xlsx 标准格式文件',
-            action: "",
+            action: "/api/blade-client/goodsdesc/import-desc",
           },
-          {
-            label: '模板下载',
-            prop: 'excelTemplate',
-            formslot: true,
-            span: 24,
-          }
         ]
       }
     };
   },
   methods: {
-    //导入
-    commodityImport(){
-      if(this.treeDeptId === ''){
-        this.$message.warning("请选择产品类型")
-      }else{
-        this.excelBox = !this.excelBox
-        const column = this.findObject(this.excelOption.column, "excelFile");
-        column.action = "/api/blade-client/goodsdesc/import-desc?typeId="+this.treeDeptId+"";
-      }
-    },
     derivation() {
       window.open(`/api/blade-client/goodsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },

+ 1 - 0
src/views/financialManagement/payment.vue

@@ -88,6 +88,7 @@
           params:this.$route.query.params
         }
         this.show = false;
+        this.$store.commit("PAY_IN_DETAIL");
       }
     },
     components:{

+ 9 - 1
src/views/financialManagement/receiptDetailsPage.vue

@@ -105,6 +105,7 @@
   import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
   import {getSysNo} from "@/api/importTrade/purchase";
   import { getUserInfo } from "@/api/system/user";
+  import { contrastObj,contrastList } from "@/util/contrastData";
 
   export default {
     name: "receiptDetailsPage",
@@ -126,6 +127,9 @@
           total: 0,
         },
         query:{},
+        //新旧数据对比
+        oldForm:{},
+        oldItemList:[],
         //客户组件配置控制
         configuration:{
           multipleChoices:false,
@@ -304,8 +308,12 @@
         this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
           this.form = res.data.data;
+          this.oldForm = Object.assign({},res.data.data);
           this.configuration.dicData = res.data.data.customerModel;
-          this.dataList = res.data.data.itemsList
+          if(res.data.data.itemsList){
+            this.dataList = res.data.data.itemsList
+            this.oldItemList = this.deepClone(res.data.data.itemsList)
+          }
         })
       }else{
         getSysNo("CW-SK").then(res =>{

+ 37 - 10
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -157,6 +157,7 @@ import commodity from "./config/commodity.json"
 import {corpsbank, getList} from "@/api/basicData/deliveryNotice"
 import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
 import {getSysNo} from "@/api/importTrade/purchase";
+import { contrastObj,contrastList } from "@/util/contrastData";
 
 export default {
   name: "detailsPageEdit",
@@ -324,6 +325,10 @@ export default {
       },
       commodityData: false,
       tableData: [],
+      //新旧值对比
+      oldForm:{},
+      oldContactsData:[],
+      oldUpLoadData:[],
     }
   },
   created() {
@@ -331,9 +336,17 @@ export default {
       let id = this.detailData.id.replace(/\"/g, "")
       detailInvoiceList(id).then(res => {
         this.form = res.data.data;
+        this.oldForm = Object.assign({},res.data.data);
         this.configuration.dicData = this.form.companyName
         this.sConfiguration.dicData = this.form.salesCompanyNameList
-        this.contactsData = this.form.deliveryItemsList
+        if(this.form.deliveryItemsList){
+          this.contactsData = this.form.deliveryItemsList
+          this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
+        }
+        if(this.form.deliveryFilesList){
+          this.upLoadData = this.form.deliveryFilesList
+          this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
+        }
       })
     }else {
       getSysNo("JK-FH").then(res => {
@@ -452,9 +465,17 @@ export default {
               this.$message.success("操作成功!")
               detailInvoiceList(res.data.data.id).then(res => {
                 this.form = res.data.data;
+                this.oldForm = Object.assign({},res.data.data);
                 this.configuration.dicData = this.form.companyName
                 this.sConfiguration.dicData = this.form.salesCompanyNameList
-                this.contactsData = this.form.deliveryItemsList
+                if(this.form.deliveryItemsList){
+                  this.contactsData = this.form.deliveryItemsList
+                  this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
+                }
+                if(this.form.deliveryFilesList){
+                  this.upLoadData = this.form.deliveryFilesList
+                  this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
+                }
               })
             }
           })
@@ -571,15 +592,21 @@ export default {
     },
     //返回列表
     backToList() {
-      this.$confirm("是否保存当前页面?", "提示", {
-        confirmButtonText: "保存",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        this.editCustomer(true)
-      }).catch(() => {
+      if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
+        || contrastList(this.upLoadData,this.oldUpLoadData)
+      ){
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.editCustomer(true)
+        }).catch(()=>{
+          this.$emit("goBack");
+        })
+      }else{
         this.$emit("goBack");
-      })
+      }
     }
   },
 }

+ 3 - 0
src/views/importTrade/invoice/index.vue

@@ -96,6 +96,7 @@ export default {
         form:this.$route.query.form
       }
       this.show = false;
+      this.$store.commit("GO_IN_DETAIL");
     }
   },
   methods: {
@@ -160,6 +161,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("GO_IN_DETAIL");
     },
     //新增跳转页面
     beforeOpen(row) {
@@ -175,6 +177,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("GO_IN_DETAIL");
     },
     //点击新增时触发
     beforeClose(done) {

+ 37 - 10
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -161,6 +161,7 @@ import {
 } from "@/api/basicData/deliveryNotice"
 import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
 import {detailListData } from "@/api/importTrade/purchase";
+import { contrastObj,contrastList } from "@/util/contrastData";
 
 export default {
   name: "detailsPageEdit",
@@ -333,6 +334,10 @@ export default {
       },
       commodityData: false,
       tableData: [],
+      //新旧数据对比
+      oldForm:{},
+      oldContactsData:[],
+      oldUpLoadData:[],
     }
   },
   created() {
@@ -340,9 +345,17 @@ export default {
       let id = this.detailData.id.replace(/\"/g, "")
       detailReceiptList(id).then(res => {
         this.form = res.data.data;
+        this.oldForm = Object.assign({},res.data.data);
         this.configuration.dicData = this.form.companyName
         this.sConfiguration.dicData = this.form.salesCompanyNameList
-        this.contactsData = this.form.deliveryItemsList
+        if(this.form.deliveryItemsList){
+          this.contactsData = this.form.deliveryItemsList
+          this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
+        }
+        if(this.form.deliveryFilesList){
+          this.upLoadData = this.form.deliveryFilesList
+          this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
+        }
       })
     }else{
       getSysNo("JK-SH").then(res =>{
@@ -453,9 +466,17 @@ export default {
               this.$message.success("操作成功!")
               detailReceiptList(res.data.data.id).then(res => {
                 this.form = res.data.data;
+                this.oldForm = Object.assign({},res.data.data);
                 this.configuration.dicData = this.form.companyName
                 this.sConfiguration.dicData = this.form.salesCompanyNameList
-                this.contactsData = this.form.deliveryItemsList
+                if(this.form.deliveryItemsList){
+                  this.contactsData = this.form.deliveryItemsList
+                  this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
+                }
+                if(this.form.deliveryFilesList){
+                  this.upLoadData = this.form.deliveryFilesList
+                  this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
+                }
               })
             }
           })
@@ -585,15 +606,21 @@ export default {
     },
     //返回列表
     backToList() {
-      this.$confirm("是否保存当前页面?", "提示", {
-        confirmButtonText: "保存",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        this.editCustomer(true)
-      }).catch(() => {
+      if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
+        || contrastList(this.upLoadData,this.oldUpLoadData)
+      ){
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.editCustomer(true)
+        }).catch(()=>{
+          this.$emit("goBack");
+        })
+      }else{
         this.$emit("goBack");
-      })
+      }
     }
   },
 }

+ 1 - 0
src/views/importTrade/receipt/index.vue

@@ -96,6 +96,7 @@ export default {
         params:this.$route.query.params
       }
       this.show = false;
+      this.$store.commit("TAKE_IN_DETAIL");
     }
   },
   methods: {

+ 2 - 2
src/views/purchase/contract/config/customerContact.json

@@ -24,7 +24,7 @@
       "label": "提单号",
       "prop": "billNo",
       "index": 1,
-      "width":150,
+      "width":180,
       "cell": true,
       "rules": [
         {
@@ -50,7 +50,7 @@
       "label": "货物详情",
       "prop": "cname",
       "index": 3,
-      "width":150,
+      "width":180,
       "cell": true,
       "rules": [
         {

+ 2 - 2
src/views/purchase/contract/config/mainList.json

@@ -42,13 +42,13 @@
     },
     {
       "label": "供应商",
-      "prop": "corpId",
+      "prop": "strCorpName",
       "search": true,
       "index": 3,
       "width":120
     },{
       "label": "采购商",
-      "prop": "purchaserId",
+      "prop": "strPurchaserName",
       "search": true,
       "index": 4,
       "width":120

+ 10 - 161
src/views/purchase/contract/detailsPage.vue

@@ -119,7 +119,7 @@
               </el-button>
               <el-button type="info"
                          size="small"
-                         @click="applicationDialog = true"
+                         @click="applicationDialog = true,applicationData = contactsData"
               >查看申请记录
               </el-button>
             </template>
@@ -185,7 +185,7 @@
         </span>
     </el-dialog>
     <el-dialog
-      title="查看申请记录"
+      title="申请记录"
       append-to-body
       class="el-dialogDeep"
       :visible.sync="applicationDialog"
@@ -738,12 +738,11 @@ export default {
         }
         if(type){
           //进入付款管理
-          if(this.$store.getters.goStatus){
+          if(this.$store.getters.payStatus){
             this.$alert("付款页面已存在,请保存付款页面再进行操作", "温馨提示", {
               confirmButtonText: "确定",
               type: 'warning',
               callback: action => {
-                console.log(action)
               }
             });
           }else{
@@ -755,12 +754,11 @@ export default {
           }
         }else{
           //进入收货单
-          if(this.$store.getters.goStatus){
+          if(this.$store.getters.takeStatus){
             this.$alert("收货单页面已存在,请保存收货单再进行操作", "温馨提示", {
               confirmButtonText: "确定",
               type: 'warning',
               callback: action => {
-                console.log(action)
               }
             });
           }else{
@@ -881,7 +879,10 @@ export default {
             priceCategory:this.tableData[item].code,
             priceCategoryNames:this.tableData[item].cname,
             itemId:this.tableData[item].id,
-            cname:this.tableData[item].cname
+            cname:this.tableData[item].cname,
+            purchaseQuantity:0,
+            price:0,
+            amount:0.00
           }
           this.$refs.crudContact.rowCellAdd(params);
           this.$refs.crudContact.rowCell(params,this.contactsData.length - 1)
@@ -903,160 +904,6 @@ export default {
       this.dialogVisible = !this.dialogVisible
       this.commodityData = false
     },
-    //其他费用编辑
-    rowCellTwo(row, index) {
-      this.$refs.crudProject.rowCell(row, index)
-    },
-    //新增明细保存触发
-    rowSaveProject(row, done, loading){
-      // this.advantageProjectData.push(row)
-      done()
-    },
-    //修改明细触发
-    rowUpdateProject(row, index, done, loading) {
-      done(row);
-    },
-    //删除明细触发
-    rowDelProject(row, index, donerowDel) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        if (row.id){
-          // corpsitem(row.id).then(res=>{
-          //   this.$message({
-          //     type: "success",
-          //     message: "操作成功!"
-          //   });
-          //   this.detailedData.splice(index, 1);
-          // })
-        }else {
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.detailedData.splice(index, 1);
-        }
-      })
-    },
-    // 修改其他费用明细
-    rowUpdateAdvantageProject(row, index, done, loading) {
-      done(row);
-    },
-    // 删除其他费用明细
-    rowDelAdvantageProject(row, index, donerowDel) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        if (row.id){
-          // corpsitem(row.id).then(res=>{
-          //   this.$message({
-          //     type: "success",
-          //     message: "操作成功!"
-          //   });
-          //   this.detailedData.splice(index, 1);
-          // })
-        }else {
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.advantageProjectData.splice(index, 1);
-        }
-      })
-    },
-    //其他费用新增触发
-    costIncrease(){
-      this.dialogCost = !this.dialogCost
-      this.choiceData = false
-    },
-    //新增附件上传保存触发
-    rowSaveBankOfDeposit(row, done, loading){
-      this.bankOfDepositData.push(row)
-      done()
-    },
-    //修改附件上传触发
-    rowUpdateBankOfDeposit(row, index, done, loading) {
-      done(row);
-    },
-    //删除附件上传触发
-    rowDelBankOfDeposit(row, index, donerowDel) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        if (row.id){
-          corpsbank(row.id).then(res=>{
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.bankOfDepositData.splice(index, 1);
-          })
-        }else {
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.bankOfDepositData.splice(index, 1);
-        }
-      })
-    },
-    //费用查询
-    onLoadCost(page, params = {}) {
-      this.loadingCost = true;
-      let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage,parentId:0,feesTypeId:this.treeDeptIdCost})
-      customerList(queryParams).then(res => {
-        const data = res.data.data;
-        this.pageCost.total = data.total;
-        this.dataCost = data.records;
-        this.loadingCost = false;
-      });
-    },
-    nodeClickCost(data){
-      this.treeDeptIdCost = data.id;
-      this.pageCost.currentPage = 1;
-      this.onLoadCost(this.pageCost);
-    },
-    //费用刷新触发
-    refreshChangeCost() {
-      this.treeDeptIdCost = '';
-      this.pageCost.currentPage = 1;
-      this.onLoadCost(this.pageCost);
-    },
-    //费用选中触发
-    selectionChangeCost(list){
-      this.tableDataCost = list
-    },
-    //费用导入触发
-    importCost(){
-      // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
-      if (this.tableDataCost.length>0){
-        for(let item in this.tableDataCost){
-          this.tableDataCost[item].itemId = this.tableDataCost[item].id
-          this.tableDataCost[item].feeName = this.tableDataCost[item].cname
-          delete this.tableDataCost[item].id
-          this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
-          this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length-1)
-        }
-      }
-      this.tableDataCost = []
-      this.dialogCost = false
-    },
-    //费用编辑导入触发
-    choiceCost(){
-      if (this.tableDataCost.length === 1){
-        this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
-        this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
-        this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
-      }
-      this.dialogCost = !this.dialogCost
-      this.choiceData = false
-    },
     backToList() {
       if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
       || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
@@ -1067,6 +914,8 @@ export default {
           type: "warning",
         }).then(() => {
           this.editCustomer(true)
+        }).catch(()=>{
+          this.$emit("goBack");
         })
       }else{
         this.$emit("goBack");

+ 1 - 1
src/views/purchase/contract/index.vue

@@ -214,7 +214,7 @@ export default {
       console.log('1')
     },
     refreshChange() {
-      console.log('1')
+      this.onLoad(this.page);
     },
     onLoad(page, params) {
       if(params){

+ 8 - 1
src/views/salesManagement/salesContract/config/importInventory.json

@@ -89,7 +89,14 @@
           "trigger": "blur"
         }
       ]
-    },{
+    },
+    {
+      "label": "库存",
+      "prop": "kucun",
+      "index": 7,
+      "width":120
+    },
+    {
       "label": "件数",
       "prop": "actualQuantity",
       "index": 7,

+ 5 - 0
src/views/salesManagement/salesContract/config/mainList.json

@@ -24,6 +24,11 @@
     {
       "label": "合同日期",
       "prop": "businessDate",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
       "search": true,
       "index": 1,
       "width":150

+ 52 - 18
src/views/salesManagement/salesContract/detailsPage.vue

@@ -221,6 +221,7 @@ import {detailSaleList,
 import feeInfo from "@/components/fee-info/main";
 import {getSysNo} from "@/api/importTrade/purchase";
 import uploadFile from "@/components/upload-file/main";
+import { contrastObj,contrastList } from "@/util/contrastData";
 import _ from "lodash";
 
 export default {
@@ -582,7 +583,6 @@ export default {
       // 合同上传数据
       uploadList: uploadList,
       // 合同数据
-      bankOfDepositData: [],
       bankOfDepositForm: {},
 
       optionTwo: commodity,
@@ -596,6 +596,11 @@ export default {
       tableData: [],
       commodityData: false,
       selection: [],
+      //新旧数据对比
+      oldForm:{},
+      oldInventoryData:[],
+      oldFeesList:[],
+      oldFilesList:[],
     }
   },
   created() {
@@ -607,16 +612,21 @@ export default {
       let id = this.detailData.id.replace(/\"/g, "")
       detailSaleList(id).then(res => {
         this.form = res.data.data;
+        this.oldForm = Object.assign({},res.data.data);
         this.configuration.dicData = this.form.corpName
         this.bConfiguration.dicData = this.form.belongToCorpList
-        this.importInventoryData = this.form.orderItemsList
+        if(this.form.orderItemsList){
+          this.importInventoryData = this.form.orderItemsList
+          this.oldInventoryData = this.deepClone(this.form.orderItemsList)
+        }
         if(this.form.orderFeesList){
           this.orderFeesList = this.form.orderFeesList
+          this.oldFeesList = this.deepClone(this.form.orderFeesList)
         }
         if(this.form.orderFilesList){
           this.orderFilesList = this.form.orderFilesList
+          this.oldFilesList = this.deepClone(this.form.orderFilesList)
         }
-        this.bankOfDepositData = this.form.orderFilesList
       })
     }else{
       getSysNo("JK-XS").then(res =>{
@@ -682,16 +692,22 @@ export default {
               this.$message.success("操作成功!")
               detailSaleList(res.data.data.id).then(res => {
                 this.form = res.data.data;
+                this.oldForm = Object.assign({},res.data.data);
                 this.configuration.dicData = this.form.corpName
                 this.bConfiguration.dicData = this.form.belongToCorpList
                 this.importInventoryData = this.form.orderItemsList
+                if(this.form.orderItemsList){
+                  this.importInventoryData = this.form.orderItemsList
+                  this.oldInventoryData = this.deepClone(this.form.orderItemsList)
+                }
                 if(this.form.orderFeesList){
                   this.orderFeesList = this.form.orderFeesList
+                  this.oldFeesList = this.deepClone(this.form.orderFeesList)
                 }
                 if(this.form.orderFilesList){
                   this.orderFilesList = this.form.orderFilesList
+                  this.oldFilesList = this.deepClone(this.form.orderFilesList)
                 }
-                this.bankOfDepositData = this.form.orderFilesList
               })
             }
           })
@@ -740,12 +756,21 @@ export default {
         id:this.form.id,
         orderItemIds: lsit
       }
-      generateShipment(data).then(res=>{
-        this.$router.push({
-          path: "/importTrade/invoice/index",
-          query: {form: JSON.stringify(res.data.data)},
+      if(this.$store.getters.goStatus){
+        this.$alert("发货单已存在,请保存发货单再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: 'warning',
+          callback: action => {
+          }
         });
-      })
+      }else{
+        generateShipment(data).then(res=>{
+          this.$router.push({
+            path: "/importTrade/invoice/index",
+            query: {form: JSON.stringify(res.data.data)},
+          });
+        })
+      }
     },
     //商品明细导入
     newDetails(){
@@ -824,7 +849,10 @@ export default {
             priceCategory:this.tableData[item].code,
             priceCategoryNames:this.tableData[item].cname,
             itemId:this.tableData[item].id,
-            cname:this.tableData[item].cname
+            cname:this.tableData[item].cname,
+            actualQuantity:0,
+            price:0,
+            amount:0.00,
           }
           this.$refs.importInventory.rowCellAdd(params);
           this.$refs.importInventory.rowCell(params,this.importInventoryData.length - 1)
@@ -886,15 +914,21 @@ export default {
       })
     },
     backToList() {
-      this.$confirm("是否保存当前页面?", "提示", {
-        confirmButtonText: "保存",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        this.editCustomer(true)
-      }).catch(() => {
+      if(contrastObj(this.form,this.oldForm) || contrastList(this.importInventoryData,this.oldInventoryData)
+        || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
+      ){
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.editCustomer(true)
+        }).catch(()=>{
+          this.$emit("goBack");
+        })
+      }else{
         this.$emit("goBack");
-      })
+      }
     },
   },
 }

+ 6 - 1
src/views/salesManagement/salesContract/index.vue

@@ -212,7 +212,7 @@ export default {
       console.log('1')
     },
     refreshChange() {
-      console.log('1')
+      this.onLoad(this.page)
     },
     onLoad(page, params) {
       let queryParams = Object.assign({}, params, {
@@ -222,6 +222,11 @@ export default {
       selectSaleList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 350;
+        } else {
+          this.option.height = window.innerHeight - 305;
+        }
         this.dataList.forEach(item => {
           this.$set(item,'insideList',[])
           this.$set(item,'loading', true)

+ 2 - 2
src/views/workManagement/main-items/detailsPage.vue

@@ -637,8 +637,8 @@
                   return
                 })
               }else{
-                this.pleaseCheck()
-                // this.openPleaseCheckDialog();
+                // this.pleaseCheck()
+                this.openPleaseCheckDialog();
               }
             }else{
               this.$message({

+ 1 - 1
src/views/workManagement/service-items/configuration/projectOption.json

@@ -93,7 +93,7 @@
       "type":"date",
       "prop": "warrantyPeriod",
       "format": "yyyy-MM-dd",
-      "valueFormat": "timestamp",
+      "valueFormat": "yyyy-MM-dd HH:dd:ss",
       "index": 6,
       "width": 150
     },

+ 0 - 1
src/views/workManagement/service-items/project.vue

@@ -150,7 +150,6 @@ export default {
       }
       if (["edit"].includes(type)) {
         detail(this.form.id).then(res => {
-          res.data.data.warrantyPeriod = Date.parse(new Date(res.data.data.warrantyPeriod));
           this.form = res.data.data;
         });
       }