Browse Source

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 4 years ago
parent
commit
99459e871e
34 changed files with 1104 additions and 304 deletions
  1. 9 0
      src/api/examineApprove/interface.js
  2. 1 1
      src/api/work/work.js
  3. 57 0
      src/components/examineApprove/config/startDialog.json
  4. 139 0
      src/components/examineApprove/index.vue
  5. 109 0
      src/components/examineApprove/start.vue
  6. 6 0
      src/page/index/tags.vue
  7. 2 2
      src/router/views/index.js
  8. 2 0
      src/store/getters.js
  9. 23 3
      src/store/modules/ifdetail.js
  10. 17 18
      src/views/basicData/commodityType/index.vue
  11. 114 107
      src/views/basicData/customerInformation/configuration/mainList.json
  12. 15 14
      src/views/basicData/customerInformation/detailsPageEdit.vue
  13. 19 18
      src/views/basicData/customerInformation/index.vue
  14. 66 6
      src/views/basicData/productInformation/index.vue
  15. 0 13
      src/views/businessManagement/deliveryNotice/configuration/customerContact.json
  16. 8 0
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  17. 4 15
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  18. 33 1
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  19. 0 13
      src/views/businessManagement/receipt/configuration/customerContact.json
  20. 5 0
      src/views/businessManagement/receipt/detailsPageEdit.vue
  21. 0 1
      src/views/businessManagement/salesOrder/configuration/BuyFree.json
  22. 6 17
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  23. 0 1
      src/views/businessManagement/salesOrder/configuration/optionPolicy.json
  24. 104 9
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  25. 2 0
      src/views/financialManagement/payment.vue
  26. 2 0
      src/views/importTrade/receipt/index.vue
  27. 14 1
      src/views/purchase/contract/config/mainList.json
  28. 110 28
      src/views/purchase/contract/detailsPage.vue
  29. 11 1
      src/views/purchase/contract/index.vue
  30. 41 0
      src/views/salesManagement/salesContract/detailsPage.vue
  31. 2 0
      src/views/work/process/leave/handle.vue
  32. 1 1
      src/views/workManagement/main-items/configuration/detailsPage.json
  33. 62 0
      src/views/workManagement/main-items/configuration/startDialog.json
  34. 120 34
      src/views/workManagement/main-items/detailsPage.vue

+ 9 - 0
src/api/examineApprove/interface.js

@@ -0,0 +1,9 @@
+import request from '@/router/axios';
+
+export const examineApproveSubmit = (data) => {
+  return request({
+    url: '/api/blade-desk/process/check/start-process',
+    method: 'post',
+    data:data,
+  })
+}

+ 1 - 1
src/api/work/work.js

@@ -74,7 +74,7 @@ export const claimTask = (taskId) => {
 
 export const completeTask = (data) => {
   return request({
-    url: '/api/blade-flow/work/complete-task',
+    url: '/api/blade-flow/work/checkCompleteTask',
     method: 'post',
     data
   })

+ 57 - 0
src/components/examineApprove/config/startDialog.json

@@ -0,0 +1,57 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuPosition": "right",
+  "searchMenuSpan": 12,
+  "searchLabelWidth": 120,
+  "tree": true,
+  "selection": false,
+  "addBtn": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 220,
+  "column":[
+   {
+      "label": "流程分类",
+      "prop": "category",
+      "search": true,
+      "row": true,
+      "dicUrl": "/api/blade-system/dict/dictionary?code=flow",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "dataType":"number",
+      "slot": true,
+      "index": 1,
+      "width":180
+    },{
+      "label": "流程标识",
+      "prop": "key",
+      "index": 2,
+      "width":150
+    },{
+      "label": "流程名称",
+      "prop": "name",
+      "search": true,
+      "index": 3,
+      "width":150
+    },{
+      "label": "状态",
+      "prop": "suspensionState",
+      "index": 4,
+      "width":150
+    },{
+      "label": "部署时间",
+      "prop": "deploymentTime",
+      "index": 5,
+      "width":200
+    }
+  ]
+}

+ 139 - 0
src/components/examineApprove/index.vue

@@ -0,0 +1,139 @@
+<template>
+  <div>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               ref="crud"
+               @refresh-change="refreshChange"
+               :page.sync="page"
+               @on-load="onLoad">
+      <template slot-scope="scope" slot="menu">
+        <el-button type="text"
+                   size="small"
+                   plain
+                   class="none-border"
+                   @click.stop="handleStart(scope.row)">发起
+        </el-button>
+        <el-button type="text"
+                   size="small"
+                   plain
+                   class="none-border"
+                   @click.stop="handleImage(scope.row,scope.index)">流程图
+        </el-button>
+      </template>
+    </avue-crud>
+    <div style="margin-left: 90%">
+       <span slot="footer" class="dialog-footer" >
+          <el-button type="primary"  @click="closeFun()">关 闭</el-button>
+  </span>
+    </div>
+    <el-dialog
+      title="请核"
+      :visible.sync="dialogPleaseCheck"
+      width="600px"
+      append-to-body
+      :close-on-click-modal="false"
+      destroy-on-close
+    >
+      <examine-start
+        :processDefinitionId="processDefinitionId"
+        :itemId = "itemId"
+        @dialogClose="dialogPleaseCheckClose"
+      ></examine-start>
+    </el-dialog>
+    <el-dialog title="流程图"
+               append-to-body
+               :visible.sync="flowBox"
+               :fullscreen="true">
+      <iframe
+        :src=flowUrl
+        width="80%"
+        height="700"
+        title="流程图"
+        frameBorder="no"
+        border="0"
+        marginWidth="0"
+        marginHeight="0"
+        scrolling="no"
+        allowTransparency="yes">
+      </iframe>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button @click="flowBox = false">关 闭</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import option from './config/startDialog.json'
+  import {startList} from "@/api/work/work";
+  import examineStart from "@/components/examineApprove/start";
+  export default {
+    name: "index",
+    props: {
+      itemId: {
+        type: String
+      },
+      closeFun: {
+        type: Function
+      }
+    },
+    components:{
+      examineStart
+    },
+    data(){
+      return {
+        option:option,
+        loading:false,
+        data:[],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        dialogPleaseCheck:false,
+        processDefinitionId:'',
+        //流程图
+        flowBox: false,
+        flowUrl: '',
+        itemId:'',
+      }
+    },
+    created() {
+
+    },
+    methods:{
+      refreshChange(){
+
+      },
+      onLoad(page, params = {}){
+        params.mode = '1';
+        this.loading = true;
+        startList(page.currentPage, page.pageSize,params).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+        })
+        .finally(()=>{
+          this.loading = false;
+        })
+      },
+      handleStart(row){
+        this.dialogPleaseCheck = true;
+        this.processDefinitionId = row.id
+      },
+      handleImage(row) {
+        this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
+        this.flowBox = true;
+      },
+      dialogPleaseCheckClose() {
+        this.dialogPleaseCheck = false;
+        this.closeFun()
+      }
+    }
+  }
+</script>
+<style scoped>
+
+</style>

+ 109 - 0
src/components/examineApprove/start.vue

@@ -0,0 +1,109 @@
+<template>
+  <basic-container>
+    <avue-form  ref="form" :option="option"  v-model="form" @submit="handleSubmit"/>
+  </basic-container>
+</template>
+
+<script>
+  import { examineApproveSubmit } from "@/api/examineApprove/interface";
+    export default {
+        name: "start",
+      props:{
+        processDefinitionId:{
+          type:String
+        },
+        itemId:{
+          type:String
+        }
+      },
+      data(){
+        return {
+          form: {},
+          option: {
+            group: [
+              {
+                labelWidth: 120,
+                column: [
+                  {
+                    label: '第一级审批人',
+                    prop: 'checkUser',
+                    type: 'select',
+                    dicUrl: `/api/blade-user/user-list`,
+                    row:true,
+                    props: {
+                      label: "account",
+                      value: "id"
+                    },
+                    span: 22,
+                    rules: [
+                      {
+                        required: true,
+                        message: '请选择第一级审批人',
+                        trigger: 'blur'
+                      }
+                    ]
+                  },
+                  {
+                    label: '第二级审批人',
+                    prop: 'checkSecondsUser',
+                    type: 'select',
+                    row:true,
+                    dicUrl: `/api/blade-user/user-list`,
+                    props: {
+                      label: "account",
+                      value: "id"
+                    },
+                    span: 22,
+                    rules: [
+                      {
+                        required: true,
+                        message: '请选择第二级审批人',
+                        trigger: 'blur'
+                      }
+                    ]
+                  },
+                  {
+                    label: '备注',
+                    row:true,
+                    prop: 'reason',
+                    type: 'textarea',
+                    span: 22,
+                    rules: [
+                      {
+                        required: true,
+                        message: '请输入请假理由',
+                        trigger: 'blur'
+                      }
+                    ]
+                  },
+                ]
+              },
+            ],
+          }
+        }
+      },
+      methods:{
+        handleSubmit(){
+          this.$refs["form"].validate((valid) => {
+            if(valid){
+              this.form.processDefinitionId = this.processDefinitionId
+              this.form.itemId = this.itemId
+              examineApproveSubmit(this.form).then(res =>{
+                if(res.data.success){
+                  this.$message.success("请核成功!")
+                  this.$emit('dialogClose');
+                }
+              })
+            }
+          })
+        }
+      }
+    }
+</script>
+
+<style scoped>
+  .startFrom-input{
+    display:flex;
+    justify-content:center;
+  }
+</style>

+ 6 - 0
src/page/index/tags.vue

@@ -133,6 +133,12 @@
             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]; //如果关闭本标签让前推一个

+ 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

+ 2 - 0
src/store/getters.js

@@ -27,6 +27,8 @@ const getters = {
   flowRoutes: state => state.dict.flowRoutes,
   inStatus: state => state.ifdetail.inStatus,
   goStatus: state => state.ifdetail.goStatus,
+  takeStatus: state => state.ifdetail.takeStatus,
   outStatus: state => state.ifdetail.outStatus,
+  payStatus: state => state.ifdetail.payStatus,
 }
 export default getters

+ 23 - 3
src/store/modules/ifdetail.js

@@ -1,8 +1,10 @@
 const ifdetail = {
   state: {
     inStatus: false, //国内
-    goStatus: false, //进口
-    outStatus: false //出口
+    goStatus: false, //进口发货单
+    takeStatus: false, //进口发货单
+    outStatus: false, //出口
+    payStatus: false //付款
   },
   actions: {},
   mutations: {
@@ -15,7 +17,7 @@ const ifdetail = {
     IN_OUT_DETAIL(state) {
       state.inStatus = false;
     },
-    //进口状态
+    //进口发货单状态
     // 进入详情页
     GO_IN_DETAIL(state) {
       state.goStatus = true;
@@ -24,6 +26,15 @@ const ifdetail = {
     GO_OUT_DETAIL(state) {
       state.goStatus = false;
     },
+    //进口收货单状态
+    // 进入详情页
+    TAKE_IN_DETAIL(state) {
+      state.takeStatus = true;
+    },
+    //退出详情页
+    TAKE_OUT_DETAIL(state) {
+      state.takeStatus = false;
+    },
     //出口状态
     // 进入详情页
     OUT_IN__DETAIL(state) {
@@ -32,6 +43,15 @@ const ifdetail = {
     //退出详情页
     OUT_OUT_DETAIL(state) {
       state.outStatus = false;
+    },
+    //付款管理
+    // 进入详情payment
+    PAY_IN_DETAIL(state) {
+      state.payStatus = true;
+    },
+    //退出详情页
+    PAY_OUT_DETAIL(state) {
+      state.payStatus = false;
     }
   }
 

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

@@ -30,17 +30,10 @@
             <el-button
               type="primary"
               size="small"
-              icon="el-icon-plus"
+              icon="el-icon-bottom"
               @click="commodityImport()"
             >导入
             </el-button>
-            <el-button
-              type="success"
-              icon="el-icon-upload2"
-              size="small"
-              @click="derivation()"
-            >下载模板
-            </el-button>
           </template>
           <template slot-scope="scope" slot="menu">
             <el-button
@@ -148,7 +141,13 @@
                    append-to-body
                    :visible.sync="excelBox"
                    width="555px">
-          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"/>
+          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+            <template slot="excelTemplate">
+              <el-button type="primary" @click="derivation">
+                点击下载<i class="el-icon-download el-icon--right"></i>
+              </el-button>
+            </template>
+          </avue-form>
         </el-dialog>
       </basic-container>
     </el-col>
@@ -336,10 +335,15 @@ export default {
             span: 24,
             propsHttp: {
               res: 'data',
-              // url:'link'
             },
             tip: '请上传 .xls,.xlsx 标准格式文件',
-            action: "/api/blade-client/goodsdesc/import-desc?typeId="+this.treeDeptId+"",
+            action: "",
+          },
+          {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
           }
         ]
       }
@@ -397,13 +401,7 @@ export default {
       }
     },
     derivation() {
-      this.$confirm("是否下载模板?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        window.open(`/api/blade-client/goodsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
-      });
+      window.open(`/api/blade-client/goodsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },
     uploadAfter(res, done, loading, column) {
       window.console.log(column);
@@ -608,6 +606,7 @@ export default {
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
         const data = res.data.data;
         this.data = data.records;
+        this.page.total = res.data.data.total
         this.loading = false;
         this.selectionClear();
       });

+ 114 - 107
src/views/basicData/customerInformation/configuration/mainList.json

@@ -1,111 +1,118 @@
 {
-    "lazy": true,
-    "tip": false,
-    "simplePage": true,
-    "searchShow": true,
-    "searchMenuSpan": 6,
-    "dialogWidth": "60%",
-    "tree": true,
-    "border": true,
-    "index": true,
-    "selection": true,
-    "viewBtn": false,
-    "editBtn": false,
-    "delBtn": false,
-    "menuWidth": 300,
-    "dialogClickModal": false,
-    "column":[
+  "headerAlign": "center",
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 220,
+  "dialogClickModal": false,
+  "column":[
+    {
+      "label": "客户编码",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width":120,
+      "rules": [
         {
-            "label": "客户编码",
-            "prop": "code",
-            "search": true,
-            "index": 1,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
-        },{
-            "label": "客户全称",
-            "prop": "cname",
-            "search": true,
-            "index": 2,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
-        },{
-            "label": "区域",
-            "prop": "belongtoarea",
-            "search": true,
-            "index": 4,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
-        },{
-            "label": "所属公司",
-            "prop": "belongtocompany",
-            "search": true,
-            "index": 5,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
-        },{
-            "label": "联系人",
-            "prop": "attn",
-            "search": true,
-            "index": 6,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
-        },{
-            "label": "代理品牌",
-            "prop": "goodtypes",
-            "search": true,
-            "index": 7,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
-        },{
-            "label": "客户等级 ",
-            "prop": "creditLevel",
-            "search": true,
-            "index": 8,
-            "width":100,
-            "rules": [
-                {
-                    "required": true,
-                    "message": "请输入菜单名称",
-                    "trigger": "blur"
-                }
-            ]
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
         }
-    ]
+      ]
+    },{
+      "label": "客户全称",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "width":150,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "区域",
+      "prop": "belongtoarea",
+      "search": true,
+      "index": 4,
+      "width":120,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "所属公司",
+      "prop": "belongtocompany",
+      "search": true,
+      "index": 5,
+      "width":150,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "联系人",
+      "prop": "attn",
+      "search": true,
+      "index": 6,
+      "width":130,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "代理品牌",
+      "prop": "goodtypes",
+      "search": true,
+      "index": 7,
+      "width":120,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "企业类型",
+      "prop": "companytype",
+      "index": 8,
+      "width":130
+    },{
+      "label": "客户等级 ",
+      "prop": "creditLevel",
+      "search": true,
+      "hide": true,
+      "index": 8,
+      "width":100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
 }

+ 15 - 14
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -48,6 +48,7 @@
                   leaf-only
                   multiple
                   style="width: 100%;"
+                  size="small"
                   :props="{ label: 'title' }"
                   v-model="form[item.prop]"
                   placeholder="请选择内容"
@@ -161,7 +162,7 @@
       @onClose="onClose()"
     >
     <template slot="content">
-      
+
     </template>
     </flow-dialog>
   </div>
@@ -409,8 +410,8 @@ export default {
             ]
           },
           {
-            label: "代理品牌",
-            prop: "goodtypes",
+            label: "客户名称",
+            prop: "cname",
             rules: [
               {
                 required: true,
@@ -420,8 +421,8 @@ export default {
             ]
           },
           {
-            label: "所属公司",
-            prop: "belongtocompany",
+            label: "客户类别",
+            prop: "corpsTypeId",
             rules: [
               {
                 required: true,
@@ -431,33 +432,33 @@ export default {
             ]
           },
           {
-            label: "客户名称",
-            prop: "cname",
+            label: "企业类型",
+            prop: "companytype",
             rules: [
               {
-                required: true,
+                required: false,
                 message: " ",
                 trigger: "blur"
               }
             ]
           },
           {
-            label: "客户类别",
-            prop: "corpsTypeId",
+            label: "代理品牌",
+            prop: "goodtypes",
             rules: [
               {
-                required: true,
+                required: false,
                 message: " ",
                 trigger: "blur"
               }
             ]
           },
           {
-            label: "企业类型",
-            prop: "companytype",
+            label: "所属公司",
+            prop: "belongtocompany",
             rules: [
               {
-                required: true,
+                required: false,
                 message: " ",
                 trigger: "blur"
               }

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

@@ -39,18 +39,11 @@
             <el-button
               type="primary"
               size="small"
-              icon="el-icon-plus"
+              icon="el-icon-bottom"
               @click="commodityImport()"
             >导入
             </el-button>
             <el-button
-              type="success"
-              icon="el-icon-upload2"
-              size="small"
-              @click="derivation()"
-            >下载模板
-            </el-button>
-            <el-button
               icon="el-icon-printer"
               size="small"
               type="primary"
@@ -86,11 +79,19 @@
           :switchDialog="switchDialog"
           @onClose="onClose()"
         ></report-dialog>
-        <el-dialog title="导入商品"
+        <el-dialog title="导入客户"
                    append-to-body
                    :visible.sync="excelBox"
-                   width="555px">
-          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"/>
+                   width="555px"
+                   v-dialog-drag
+        >
+          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+            <template slot="excelTemplate">
+              <el-button type="primary" @click="derivation">
+                点击下载<i class="el-icon-download el-icon--right"></i>
+              </el-button>
+            </template>
+          </avue-form>
         </el-dialog>
       </basic-container>
     </el-col>
@@ -168,6 +169,12 @@ export default {
             },
             tip: '请上传 .xls,.xlsx 标准格式文件',
             action: "",
+          },
+          {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
           }
         ]
       }
@@ -191,13 +198,7 @@ export default {
       }
     },
     derivation() {
-      this.$confirm("是否下载模板?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        window.open(`/api/blade-client/corpsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
-      });
+      window.open(`/api/blade-client/corpsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },
     uploadAfter(res, done, loading, column) {
       window.console.log(column);

+ 66 - 6
src/views/basicData/productInformation/index.vue

@@ -25,6 +25,15 @@
                    @size-change="sizeChange"
                    @refresh-change="refreshChange"
                    @on-load="onLoad">
+          <template slot="menuLeft">
+            <el-button
+              type="primary"
+              size="small"
+              icon="el-icon-bottom"
+              @click="commodityImport()"
+            >导入
+            </el-button>
+          </template>
           <template slot-scope="scope" slot="menu">
             <el-button
                 type="text"
@@ -49,6 +58,18 @@
             </el-button>
           </template>
         </avue-crud>
+        <el-dialog title="导入产品"
+                   append-to-body
+                   :visible.sync="excelBox"
+                   width="555px">
+          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+            <template slot="excelTemplate">
+              <el-button type="primary" @click="derivation">
+                点击下载<i class="el-icon-download el-icon--right"></i>
+              </el-button>
+            </template>
+          </avue-form>
+        </el-dialog>
       </basic-container>
     </el-col>
   </el-row>
@@ -126,9 +147,53 @@ export default {
       platformData: [],
       platformForm: {},
       excelForm: {},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: '模板上传',
+            prop: 'excelFile',
+            type: 'upload',
+            drag: true,
+            loadText: '模板上传中,请稍等',
+            span: 24,
+            propsHttp: {
+              res: 'data',
+            },
+            tip: '请上传 .xls,.xlsx 标准格式文件',
+            action: "",
+          },
+          {
+            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()}`);
+    },
+    uploadAfter(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox = false;
+      this.refreshChange();
+      done();
+    },
     nodeClick(data) {
       this.treeDeptId = data.id;
       this.page.currentPage = 1;
@@ -259,12 +324,6 @@ export default {
     handleImport() {
       this.excelBox = true;
     },
-    uploadAfter(res, done, loading, column) {
-      window.console.log(column);
-      this.excelBox = false;
-      this.refreshChange();
-      done();
-    },
     handleTemplate() {
       window.open(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`);
     },
@@ -307,6 +366,7 @@ export default {
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
         const data = res.data.data;
         this.data = data.records;
+        this.page.total = res.data.data.total
         this.loading = false;
         this.selectionClear();
       });

+ 0 - 13
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -72,19 +72,6 @@
         }
       ]
     },{
-      "label": "规格编码",
-      "prop": "typeno",
-      "index": 3,
-      "width":100,
-      "cell": false,
-      "rules": [
-        {
-          "required": false,
-          "message": "请输入规格编码",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "规格型号",
       "prop": "specificationAndModel",
       "index": 4,

+ 8 - 0
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -500,6 +500,7 @@ export default {
     this.getWorkDicts("order_status").then(res => {
       this.statusOption = res.data.data
     })
+    this.$set(this.form,'deliveryStatus','录入')
     wareHouseType().then(res => {
       this.warehouseType = res.data.data.records
       this.warehouseType.forEach(item => {
@@ -730,12 +731,19 @@ export default {
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
           console.log(this.tableData[item])
+          this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
           this.tableData[item].itemId = this.tableData[item].id
           this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
           delete this.tableData[item].goodsTypeName
           delete this.tableData[item].id
           delete this.tableData[item].status
           delete this.tableData[item].isDeleted
+          this.$set(this.tableData[item], 'inventoryNumber', 0)
+          this.$set(this.tableData[item], 'actualQuantity', 0)
+          this.$set(this.tableData[item], 'inventoryAmount', 0)
+          this.$set(this.tableData[item], 'deliveryAmount', 0)
+          this.tableData[item].price = 0
+          this.tableData[item].amount = 0
           this.tableData[item].sort = this.maxGoodsNum + 1
           this.maxGoodsNum++
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);

+ 4 - 15
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -72,19 +72,6 @@
         }
       ]
     },{
-      "label": "规格编码",
-      "prop": "typeno",
-      "index": 3,
-      "width":100,
-      "cell": false,
-      "rules": [
-        {
-          "required": false,
-          "message": "请输入规格编码",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "规格型号",
       "prop": "specificationAndModel",
       "index": 4,
@@ -116,7 +103,8 @@
       "prop": "actualQuantity",
       "index": 6,
       "width":100,
-      "cell": true,
+      "cell": false,
+      "slot": true,
       "rules": [
         {
           "required": false,
@@ -129,7 +117,8 @@
       "prop": "storageQuantity",
       "index": 6,
       "width":100,
-      "cell": true,
+      "cell": false,
+      "slot": true,
       "rules": [
         {
           "required": false,

+ 33 - 1
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -72,6 +72,24 @@
               ></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="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
               <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>
@@ -95,7 +113,7 @@
                          icon="el-icon-plus"
                          size="small"
                          :disabled="selection.length < 1"
-                         @click="generateShipmentC">生成货单
+                         @click="generateShipmentC">生成货单
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -746,6 +764,11 @@ export default {
     //商品编辑
     rowCell(row, index) {
       console.log(row)
+      if (row.$cellEdit) {
+        if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
+          return this.$message.error('订货数量不能小于发货数量')
+        }
+      }
       this.$refs.crudContact.rowCell(row, index)
     },
     //费用编辑
@@ -836,7 +859,11 @@ export default {
           this.tableData[item].itemId = this.tableData[item].id
           this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
           delete 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
@@ -1059,6 +1086,11 @@ export default {
       console.log(this.form)
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          for (let item in this.contactsData) {
+            if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
+              return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
+            }
+          }
           //商品信息
           this.form.itemsVOList = this.contactsData
           this.form.orderFeesList = this.advantageProjectData

+ 0 - 13
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -73,19 +73,6 @@
         }
       ]
     },{
-      "label": "规格编码",
-      "prop": "typeno",
-      "index": 3,
-      "width":100,
-      "cell": false,
-      "rules": [
-        {
-          "required": false,
-          "message": "请输入规格编码",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "规格型号",
       "prop": "specificationAndModel",
       "index": 4,

+ 5 - 0
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -873,6 +873,11 @@ export default {
           delete this.tableData[item].id
           delete this.tableData[item].status
           delete this.tableData[item].isDeleted
+          this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+          this.$set(this.tableData[item], 'purchaseQuantity', 0)
+          this.$set(this.tableData[item], 'actualQuantity', 0)
+          this.$set(this.tableData[item], 'purchaseAmount', 0)
+          this.$set(this.tableData[item], 'deliveryAmount', 0)
           this.tableData[item].sort = this.maxGoodsNum + 1
           this.maxGoodsNum++
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);

+ 0 - 1
src/views/businessManagement/salesOrder/configuration/BuyFree.json

@@ -14,7 +14,6 @@
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
-  "index": true,
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,

+ 6 - 17
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -33,7 +33,7 @@
         }
       ]
     },{
-      "label": "类",
+      "label": "产品分类",
       "prop": "priceCategory",
       "index": 1,
       "width":100,
@@ -41,7 +41,7 @@
       "rules": [
         {
           "required": true,
-          "message": "请输入类",
+          "message": "请输入产品分类",
           "trigger": "blur"
         }
       ]
@@ -85,19 +85,6 @@
         }
       ]
     },{
-      "label": "规格编码",
-      "prop": "typeno",
-      "index": 3,
-      "width":100,
-      "cell": false,
-      "rules": [
-        {
-          "required": false,
-          "message": "请输入规格编码",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "规格型号",
       "prop": "specificationAndModel",
       "index": 4,
@@ -129,7 +116,8 @@
       "prop": "actualQuantity",
       "index": 6,
       "width":100,
-      "cell": true,
+      "cell": false,
+      "slot": true,
       "rules": [
         {
           "required": false,
@@ -142,7 +130,8 @@
       "prop": "storageQuantity",
       "index": 6,
       "width":100,
-      "cell": true,
+      "cell": false,
+      "slot": true,
       "rules": [
         {
           "required": false,

+ 0 - 1
src/views/businessManagement/salesOrder/configuration/optionPolicy.json

@@ -14,7 +14,6 @@
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
-  "index": true,
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,

+ 104 - 9
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -78,7 +78,8 @@
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.orderQuantity"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                size="small"
+                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                size="small"
                 @input="quantityChange(row)"
               ></el-input>
               <span v-else>{{ row.orderQuantity }}</span>
@@ -88,10 +89,42 @@
                 v-if="row.$cellEdit"
                 v-model="row.price"
                 size="small"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                @input="priceChange(row)"
+                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                @input="priceChange(row)"
               ></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"
@@ -451,8 +484,10 @@ import {
   corpsitem,
   getList,
   detailList,
-  generateShipment
+  generateShipment,
+
 } from "@/api/basicData/configuration"
+import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"
@@ -488,6 +523,7 @@ export default {
         dicData: []
       },
       data: [],
+      policyForm: {},
       dataPolicy: [],
       contactsDataBuyFree: [],
       loadingCost: false,
@@ -999,6 +1035,12 @@ export default {
       this.statusOption = res.data.data
     })
     this.$set(this.form, 'orderStatus', '录入')
+    // this.optionPolicy.selectable = function(row, index) {
+    //   return false
+    // }
+    // this.customerBuyFree.selectable = function(row, index) {
+    //   return false
+    // }
     if (this.detailData.id) {
       // let id = this.$route.query.id.replace(/\"/g, "")
       this.queryData(this.detailData.id)
@@ -1099,7 +1141,11 @@ export default {
     },
     //商品编辑
     rowCell(row, index) {
-      console.log(row)
+      if (row.$cellEdit) {
+        if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
+          return this.$message.error('订货数量不能小于发货数量')
+        }
+      }
       this.$refs.crudContact.rowCell(row, index)
     },
     //费用编辑
@@ -1192,7 +1238,7 @@ export default {
         this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
         this.contactsData[this.choiceIndexT].code = this.tableData[0].code
         this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
-        this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
+        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
@@ -1235,12 +1281,21 @@ export default {
       // this.contactsData = this.contactsData.concat(this.tableData)
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
-          console.log(this.tableData[item])
+          let data = {
+            goodsId: this.tableData[item].id,
+            typeno: this.tableData[item].specs
+          }
+          selectGoodsNum(data).then(res => {
+            console.log(res.data)
+          })
           this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
           delete this.tableData[item].goodsTypeName
           this.tableData[item].itemId = this.tableData[item].id
-          // this.tableData[item].orderQuantity = 0
+          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
@@ -1264,7 +1319,10 @@ export default {
     closePolicy() {
       this.treePolicyId = '';
       this.dataPolicy = [];
+      this.policyForm = {};
       this.contactsDataBuyFree = [];
+      this.policyData = []
+      this.policyDataTwo = []
     },
     //选中触发
     selectionChange(list) {
@@ -1304,17 +1362,48 @@ export default {
     },
     //销售政策特价促销选中触发
     selectionChangePolicy(list) {
-      this.policyData = list
+      console.log(list)
+      this.policyData = this.policyData.concat(list)
+      // this.policyData.forEach(item => {
+      //   this.$set(item, 'price', item.specialOffer)
+      // })
+      if (this.policyData.length > 0) {
+        this.customerBuyFree.selection = false
+      } else {
+        this.customerBuyFree.selection = true
+      }
     },
     //销售政策买赠促销选中触发
     selectionChangePolicyTwo(list) {
-      this.policyDataTwo = list
+      this.policyDataTwo = this.policyDataTwo.concat(list)
+      // this.policyDataTwo.forEach(item => {
+      //   this.$set(item, 'price', item.salesPrice)
+      // })
+      if (this.policyDataTwo.length > 0) {
+        this.optionPolicy.selection = false
+      } else {
+        this.optionPolicy.selection = true
+      }
     },
     //导入商品政策
     importPolicy() {
       let list = this.policyData.concat(this.policyDataTwo)
       for (let item in list) {
         console.log(list[item])
+        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], 'priceType', this.policyForm.cname)
+        this.$set(list[item], 'cname', list[item].productCategory)
+        this.$set(list[item], 'sort', this.maxGoodsNum + 1)
+        this.maxGoodsNum++
         this.$refs.crudContact.rowCellAdd(list[item]);
         this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
       }
@@ -1374,6 +1463,7 @@ export default {
     policyOnLoad(params = {}) {
       // this.policyLoading = true;
       detailList(this.treePolicyId).then(res => {
+        this.policyForm = res.data.data
         //特价促销
         this.dataPolicy = res.data.data.specialItemList
         //买赠促销
@@ -1480,6 +1570,11 @@ export default {
       console.log(this.form)
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          for (let item in this.contactsData) {
+            if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
+              return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
+            }
+          }
           //商品信息
           this.form.orderItemsList = this.contactsData
           this.form.orderFeesList = this.advantageProjectData

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

@@ -104,6 +104,7 @@
           status: 1
         };
         this.show = false;
+        this.$store.commit("PAY_IN_DETAIL");
       },
       //编辑打开
       editOpen(row, status){
@@ -112,6 +113,7 @@
           status: status
         };
         this.show = false;
+        this.$store.commit("PAY_IN_DETAIL");
       },
       rowDel(row, index, done) {
         if(row.id){

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

@@ -160,6 +160,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("TAKE_IN_DETAIL");
     },
     //新增跳转页面
     beforeOpen(row, status) {
@@ -168,6 +169,7 @@ export default {
         status: status
       };
       this.show = false;
+      this.$store.commit("TAKE_IN_DETAIL");
     },
     editOpen(row, status) {
       this.detailData = {

+ 14 - 1
src/views/purchase/contract/config/mainList.json

@@ -3,7 +3,7 @@
   "tip": false,
   "simplePage": true,
   "searchShow": true,
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 12,
   "dialogWidth": "60%",
   "align": "center",
   "searchMenuPosition": "right",
@@ -41,6 +41,19 @@
       "width":150
     },
     {
+      "label": "供应商",
+      "prop": "corpId",
+      "search": true,
+      "index": 3,
+      "width":120
+    },{
+      "label": "采购商",
+      "prop": "purchaserId",
+      "search": true,
+      "index": 4,
+      "width":120
+    },
+    {
       "label": "付款日期/开证日期",
       "prop": "accountsCollectionDate",
       "type": "date",

+ 110 - 28
src/views/purchase/contract/detailsPage.vue

@@ -119,7 +119,7 @@
               </el-button>
               <el-button type="info"
                          size="small"
-                         @click=""
+                         @click="applicationDialog = true"
               >查看申请记录
               </el-button>
             </template>
@@ -151,7 +151,8 @@
       width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
-      :close-on-press-escape="false">
+      :close-on-press-escape="false"
+      v-dialog-drag>
       <el-row style="height: 0;">
         <el-col :span="5">
           <div>
@@ -183,6 +184,30 @@
                      :disabled="tableData.length !== 1">导入<</el-button>
         </span>
     </el-dialog>
+    <el-dialog
+      title="查看申请记录"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applicationDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <basic-container>
+        <avue-crud :option="customerContact"
+                   :table-loading="applicationLoading"
+                   :data="applicationData"
+                   ref="applicationCrud"
+                   @refresh-change="applicationRefreshChange"
+                   :page.sync="applicationPage"
+                   @on-load="applicationOnLoad"></avue-crud>
+      </basic-container>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="applicationDialog = false ">关 闭</el-button>
+        </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -199,6 +224,7 @@ import uploadFile from "@/components/upload-file/main";
 //商品详情接口
 import {corpsattn, corpsbank,  getDeptLazyTreeS} from "@/api/basicData/configuration"
 import { getList } from "@/api/basicData/commodityType"
+import { contrastObj,contrastList } from "@/util/contrastData";
 export default {
   name: "detailsPage",
   props: {
@@ -321,6 +347,20 @@ export default {
       tableDataCost: [],
       treeDeptIdCost: '',
       choiceIndex: '',
+      //查看申请记录
+      applicationDialog:false,
+      applicationLoading:false,
+      applicationData:[],
+      applicationPage:{
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      //对比新旧数据信息
+      oldContactsData:[],
+      oldForm:{},
+      oldFeesList:[],
+      oldFilesList:[],
     //  基础信息
       basicData: {
         column: [
@@ -562,16 +602,20 @@ export default {
       let id = this.detailData.id.replace(/\"/g, "")
       detailListData(id).then(res => {
         this.form = res.data.data;
+        this.oldForm = Object.assign({},res.data.data);
         this.configuration.dicData = this.form.corpsName
         this.pConfiguration.dicData = this.form.purchaserName
         if(res.data.data.itemsVOList){
           this.contactsData = res.data.data.itemsVOList
+          this.oldContactsData = this.deepClone(res.data.data.itemsVOList)
         }
         if(res.data.data.orderFeesList){
           this.orderFeesList = res.data.data.orderFeesList
+          this.oldFeesList = this.deepClone(res.data.data.orderFeesList)
         }
         if( res.data.data.orderFilesList){
           this.orderFilesList = res.data.data.orderFilesList
+          this.oldFilesList = this.deepClone(res.data.data.orderFilesList)
         }
       })
     }else{
@@ -639,16 +683,20 @@ export default {
               this.$message.success("操作成功!")
               detailListData(this.form.id).then(res => {
                 this.form = res.data.data;
+                this.oldForm = Object.assign({},res.data.data);
                 this.configuration.dicData = this.form.corpsName
                 this.pConfiguration.dicData = this.form.purchaserName
                 if(res.data.data.itemsVOList){
                   this.contactsData = res.data.data.itemsVOList
+                  this.oldContactsData = this.deepClone(res.data.data.itemsVOList)
                 }
                 if(res.data.data.orderFeesList){
                   this.orderFeesList = res.data.data.orderFeesList
+                  this.oldFeesList = this.deepClone(res.data.data.orderFeesList)
                 }
                 if( res.data.data.orderFilesList){
                   this.orderFilesList = res.data.data.orderFilesList
+                  this.oldFilesList = this.deepClone(res.data.data.orderFilesList)
                 }
               })
             }
@@ -678,25 +726,51 @@ export default {
             type: 'warning'
           }).then(() => {
             this.editCustomer();
+            return
           })
         }else {
           list.push(this.selectContact[item].$index)
         }
       }
-      const params = {
-        id:this.form.id,
-        orderItemIds:list
-      }
-      if(type){
-        this.$router.push({
-          path: "/financialManagement/payment",
-          query: {params: params},
-        });
-      }else{
-        this.$router.push({
-          path: "/importTrade/receipt/index",
-          query: {params: params},
-        });
+        const params = {
+          id:this.form.id,
+          orderItemIds:list
+        }
+        if(type){
+          //进入付款管理
+          if(this.$store.getters.goStatus){
+            this.$alert("付款页面已存在,请保存付款页面再进行操作", "温馨提示", {
+              confirmButtonText: "确定",
+              type: 'warning',
+              callback: action => {
+                console.log(action)
+              }
+            });
+          }else{
+            this.$router.$avueRouter.closeTag('/financialManagement/payment');
+            this.$router.push({
+              path: "/financialManagement/payment",
+              query: {params: params},
+            });
+          }
+        }else{
+          //进入收货单
+          if(this.$store.getters.goStatus){
+            this.$alert("收货单页面已存在,请保存收货单再进行操作", "温馨提示", {
+              confirmButtonText: "确定",
+              type: 'warning',
+              callback: action => {
+                console.log(action)
+              }
+            });
+          }else{
+            //关闭一下存在的列表页
+            this.$router.$avueRouter.closeTag('/importTrade/receipt/index');
+            this.$router.push({
+              path: "/importTrade/receipt/index",
+              query: {params: params},
+            });
+          }
       }
     },
     //选择货物品种
@@ -747,6 +821,14 @@ export default {
         }
       })
     },
+    //刷新
+    applicationRefreshChange(){
+
+    },
+    //申请记录
+    applicationOnLoad(){
+
+    },
     //点击商品明细选择触发
     commodityChoice(row) {
       this.dialogVisible = !this.dialogVisible
@@ -975,20 +1057,20 @@ export default {
       this.dialogCost = !this.dialogCost
       this.choiceData = false
     },
-    // 发货
-    sendHandle() {
-      this.$message.success('发货成功')
-    },
     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.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
+      ){
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.editCustomer(true)
+        })
+      }else{
         this.$emit("goBack");
-      })
+      }
     },
   }
 }

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

@@ -3,6 +3,7 @@
     <basic-container v-if="show">
       <avue-crud :option="option"
                  :data="dataList"
+                 :table-loading="loading"
                  ref="crud"
                  v-model="form"
                  :page.sync="page"
@@ -89,6 +90,7 @@ export default {
   name: "index",
   data() {
     return {
+      loading:false,
       option: option,
       detailData:{},
       dataList: [],
@@ -215,7 +217,6 @@ export default {
       console.log('1')
     },
     onLoad(page, params) {
-      console.log()
       if(params){
         if (params.businesDate != undefined) {
           params.businesStartDate = params.businesDate[0]+ " " + "00:00:00";
@@ -238,9 +239,18 @@ export default {
         current: page.currentPage,
         tradeType:"JK"  //进口参数
       })
+      this.loading = true
       selectPurchaseList(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;
+        }
+      })
+      .finally(()=>{
+        this.loading = false
       })
     },
     //表格展开触发

+ 41 - 0
src/views/salesManagement/salesContract/detailsPage.vue

@@ -109,6 +109,7 @@
               <el-button type="info"
                          size="small"
                          :disabled="importInventoryData.length < 1"
+                         @click="payeeDialog = true"
               >收款记录
               </el-button>
             </template>
@@ -177,6 +178,29 @@
                      :disabled="tableData.length !== 1">导入</el-button>
         </span>
     </el-dialog>
+    <el-dialog
+      title="收款记录"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="payeeDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag>
+      <basic-container>
+        <avue-crud :option="importInventory"
+                   :table-loading="payeeLoading"
+                   :data="payeeData"
+                   ref="applicationCrud"
+                   @refresh-change="payeeRefreshChange"
+                   :page.sync="payeePage"
+                   @on-load="payeeOnLoad"></avue-crud>
+      </basic-container>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="payeeDialog = false ">关 闭</el-button>
+        </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -465,6 +489,15 @@ export default {
           }
         ],
       },
+      //收款记录
+      payeeDialog:false,
+      payeeLoading:false,
+      payeeData:[],
+      payeePage:{
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
       // 导入库存配置
       importInventory: importInventory,
       importInventoryForm: {},
@@ -670,6 +703,14 @@ export default {
         }
       });
     },
+    //刷新
+    payeeRefreshChange(){
+
+    },
+    //申请记录
+    payeeOnLoad(){
+
+    },
     //商品选中触发
     productSelection(selection){
       this.selection = selection

+ 2 - 0
src/views/work/process/leave/handle.vue

@@ -128,6 +128,7 @@
           processInstanceId: this.processInstanceId,
           flag: 'ok',
           comment: this.form.comment,
+          businessId:this.form.id
         };
         completeTask(params).then(res => {
           const data = res.data;
@@ -149,6 +150,7 @@
           taskId: this.taskId,
           processInstanceId: this.processInstanceId,
           comment: this.form.comment,
+          businessId:this.form.id
         };
         completeTask(params).then(res => {
           const data = res.data;

+ 1 - 1
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -39,7 +39,7 @@
       "label": "任务部门",
       "prop": "deptid",
       "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=000000",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
       "props": {
         "label": "title",
         "value": "value"

+ 62 - 0
src/views/workManagement/main-items/configuration/startDialog.json

@@ -0,0 +1,62 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuPosition": "right",
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 150,
+  "column":[
+    {
+      "label": "租户编号",
+      "prop": "tenantId",
+      "search": true,
+      "index": 1,
+      "width":150
+    },{
+      "label": "流程分类",
+      "prop": "category",
+      "search": true,
+      "row": true,
+      "dicUrl": "/api/blade-system/dict/dictionary?code=flow",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "dataType":"number",
+      "slot": true,
+      "index": 2,
+      "width":120
+    },{
+      "label": "流程标识",
+      "prop": "key",
+      "index": 4,
+      "width":120
+    },{
+      "label": "流程名称",
+      "prop": "name",
+      "search": true,
+      "index": 5,
+      "width":140
+    },{
+      "label": "状态",
+      "prop": "suspensionState",
+      "index": 6,
+      "width":120
+    },{
+      "label": "部署时间",
+      "prop": "deploymentTime",
+      "index": 7,
+      "width":150
+    }
+  ]
+}

+ 120 - 34
src/views/workManagement/main-items/detailsPage.vue

@@ -66,7 +66,8 @@
             </el-button>
             <el-button type="info"
                        size="small"
-                       @click.stop="beforePleaseCheck">请 核
+                       :disabled="crudSelection == 0"
+                       @click.stop="beforePleaseCheck()">请 核
             </el-button>
           </template>
           <template slot="menuRight">
@@ -82,6 +83,7 @@
               type="text"
               size="small"
               @click="rowCellTwo(row,index)"
+              :disabled="row.strStatus !== '录入'"
             >{{row.$cellEdit?'修改完成':'修改'}}</el-button>
           </template>
           <template slot="userid" slot-scope="{row,index}">
@@ -182,11 +184,30 @@
       <el-button type="primary" :disabled="this.userSelection.length == 1 ? false:true" @click="userConfirm" >确 定</el-button>
     </span>
     </el-dialog>
+    <el-dialog
+      title="流程"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="processDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :modal-append-to-body='false'
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <examine-approve
+        :itemId ="itemId"
+        :closeFun="dialogProcessClose"
+      >
+      </examine-approve>
+    </el-dialog>
   </div>
 </template>
 
 <script>
   import option from "./configuration/detailsPage.json";
+  import startOption from "./configuration/startDialog.json";
   import { projectDetail,editMianProject,updateItemStatus,getSysNo } from "@/api/workManagement/mainProject";
   //上传文件json
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
@@ -204,6 +225,11 @@
 
   //上传附件删除
   import { corpsbank } from "@/api/basicData/configuration"
+  //事务
+  import examineApprove from "@/components/examineApprove/index";
+  //对象数组比较
+  import { contrastObj,contrastList } from "@/util/contrastData";
+
 
   export default {
     data() {
@@ -458,6 +484,21 @@
           total: 0,
           pageSize: 10
         },
+        itemId:'',
+        //请核窗口定义
+        processDialog:false,
+        pleaseCheckContact:startOption,
+        pleaseCheckLoading:false,
+        pleaseCheckData:[],
+        pleaseCheckPage:{
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        //新旧数据比较
+        oldData:[],
+        oldUpLoadData:[],
+        oldForm:{}
       };
     },
     created() {
@@ -484,6 +525,9 @@
         this.paymentTerm = res.data.data;
       })
     },
+    components:{
+      examineApprove
+    },
     mounted() {
 
     },
@@ -493,19 +537,16 @@
         if(this.id){
           projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
             this.form = res.data.data;
+            this.oldForm = Object.assign({},res.data.data);
             if(res.data.data.corpName){
               this.configuration.dicData = res.data.data.corpName; //给客户名称赋值
             }
             if(res.data.data.filesList){
               this.upLoadData = res.data.data.filesList
+              this.oldUpLoadData = this.deepClone(res.data.data.filesList)
             }
             if(res.data.data.itemList){
-              this.loading = true;
               this.operationDetailList(res.data.data.itemList);
-              this.loading = false;
-              if(pleaseCheck === 10086){
-                this.pleaseCheck();
-              }
             }else{
               this.data = [];
             }
@@ -524,6 +565,7 @@
       },
       operationDetailList(itemList){
         this.data = itemList;
+        this.oldData = this.deepClone(itemList)
         let status = [];
         this.data.forEach(item =>{
           item.status == 0 ? status.push(true) : status.push(false)
@@ -568,20 +610,36 @@
           this.editMainProject(10010);
         })
       },
+      openPleaseCheckDialog(){
+        this.processDialog = true;
+        this.itemId = this.crudSelection[0].id   //记得不能写死
+      },
       //请核之前
       beforePleaseCheck(){
-        if(this.crudSelection.length!=0){
-          let resultUserName = [];
+        if(this.crudSelection){
+          let id = [];
           let result = [];
           this.crudSelection.forEach(item=>{
             // 新录入状态下  才可提交审核
-            item.createUserName ? resultUserName.push(true) : resultUserName.push(false) //如果没有创建人并且为新录入  提示保存
+            item.id ? id.push(true) : id.push(false) //如果没有id并且为新录入  提示保存
             item.strStatus === "录入" ? result.push(true) : result.push(false) //判断所有的是否为录入状态
           })
-          if(resultUserName.findIndex(item => item != true) == -1){
-            // 如果数组内有一个 为false  则为false
+          if(id.findIndex(item => item != true) == -1){
             if(result.findIndex(item => item != true) == -1){
-              this.editMainProject(10086);
+              if(contrastObj(this.form,this.oldForm) || contrastList(this.data,this.oldData)){  //判断是否改动过此页面
+                this.$confirm("您已改动此页面,请先保存之后在请核?", "提示", {
+                  confirmButtonText: "保存",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }).then(() => {
+                  this.editMainProject();
+                }).catch(()=>{
+                  return
+                })
+              }else{
+                this.pleaseCheck()
+                // this.openPleaseCheckDialog();
+              }
             }else{
               this.$message({
                 type: "error",
@@ -595,14 +653,9 @@
               cancelButtonText: "取消",
               type: "warning"
             }).then(() => {
-              this.editMainProject(10086);
+              this.editMainProject();
             })
           }
-        }else{
-          this.$message({
-            type: "error",
-            message: "请先选择一条数据!"
-          });
         }
       },
       //新增 修改
@@ -628,10 +681,7 @@
               filesList:this.upLoadData
             }
             editMianProject(params).then(res =>{
-              if(pleaseCheck === 10086){  //请核
-                this.id =  res.data.data;
-                this.getProjectDetail(pleaseCheck)
-              }else if(pleaseCheck === 10010){  //复制新单新单
+             if(pleaseCheck === 10010){  //复制新单新单
                 this.$router.push({
                   path: "/mainItems_detailsPage",
                   query: {id: ''},
@@ -641,6 +691,16 @@
                 this.data = []
                 this.upLoadData = []
                 this.id = ''
+              }else if(pleaseCheck === 10001){  //返回列表保存数据
+                this.$message({
+                  type: "success",
+                  message: "操作成功!"
+                });
+                this.$router.$avueRouter.closeTag();
+                this.$router.push({
+                  path: '/workManagement/main-items/list',
+                  query: {}
+                });
               }else{
                 this.$message({
                   type: "success",
@@ -655,25 +715,47 @@
       //请核
       pleaseCheck(){
         this.crudSelection.forEach(item =>{
+          let success = false;
           updateItemStatus(this.data[item.$index].id,1).then(res =>{
             if(res.data.success){
-              this.$message({
-                type: "success",
-                message: "请核成功!"
-              });
-              //刷新列表
-              this.getProjectDetail();
+              success = true
             }
           })
+          if(success){
+            this.$message({
+              type: "success",
+              message: "请核成功!"
+            });
+            //刷新列表
+            this.getProjectDetail();
+          }
         })
       },
       //返回主营项目列表
       backToList(){
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({
-          path: '/workManagement/main-items/list',
-          query: {}
-        });
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.data,this.oldData)
+          || contrastList(this.upLoadData,this.oldUpLoadData)
+        ){
+          this.$confirm("是否保存当前页面?", "提示", {
+            confirmButtonText: "保存",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            this.editMainProject(10001)
+          }).catch(()=>{
+            this.$router.$avueRouter.closeTag();
+            this.$router.push({
+              path: '/workManagement/main-items/list',
+              query: {}
+            });
+          })
+        }else{
+          this.$router.$avueRouter.closeTag();
+          this.$router.push({
+            path: '/workManagement/main-items/list',
+            query: {}
+          });
+        }
       },
       //点击修改或保存时触发
       rowCellTwo(row,index){
@@ -822,7 +904,11 @@
            this.$set(this.data[this.detailsSelect],'userName',this.userSelection[0].realName)
            this.userDialog = !this.userDialog
          }
-      }
+      },
+      dialogProcessClose(){
+        this.processDialog = false
+        this.getProjectDetail()
+      },
     },
   };
 </script>