Forráskód Böngészése

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

黄梓星 1 éve
szülő
commit
def8010e8d

+ 2 - 1
src/views/material/basicFile/index.vue

@@ -210,6 +210,7 @@
     },
     data() {
       const params = this.$init.params(SearchColumns);
+     
       return {
         failLoad: false,
         params:params,
@@ -476,7 +477,7 @@
           }
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
-          this.download('/system/material/export', this.params, `物料基本信息${new Date().getTime()}.xlsx`);
+          this.download('/system/material/export', {...this.params}, `物料基本信息${new Date().getTime()}.xlsx`);
         }
 
       },

+ 83 - 5
src/views/material/requisition/columns.js

@@ -6,7 +6,7 @@
   { item: { key: "billCode", title: "单据编码" }, attr: {} },
   
   {
-    item: { key: "createName", title: "申请人",width:150, },
+    item: { key: "proposerName", title: "申请人",width:150, },
     attr: { },
   },
   { item: { key: "status", title: "单据状态",width:120, }, 
@@ -27,7 +27,7 @@
     },
     { item: { key: "name", title: "物料名称" }, attr: {} },
      { item: { key: "specification", title: "规格" ,width:150,}, attr: {} },
-    { item: { key: "manufacturerName", title: "生产厂" ,width:150,}, attr: {} },
+    { item: { key: "manufacturerName", title: "生产厂家/代理人" ,width:150,}, attr: {} },
      { item: { key: "registrationNo", title: "注册证号" ,width:150,}, attr: {} },
     { item: { key: "registrant", title: "注册人" ,width:150,}, attr: {} },
     { item: { key: "updateTime", title: "最后修改时间" ,width:150,}, attr: {} },
@@ -62,6 +62,14 @@
       },
     },
     {
+      item: { key: "status", title: "单据状态" },
+      attr: {
+        is: "el-select",
+        dictName: "documents_status",
+        clearable: true,
+      },
+    },
+    {
       item: { key: "name", title: "物料名称" },
       attr: {
         is: "el-popover-select-v2",
@@ -71,13 +79,83 @@
       },
     },
     {
-      item: { key: "status", title: "单据状态" },
+      item: { key: "code", title: "物料编码" },
       attr: {
-        is: "el-select",
-        dictName: "documents_status",
+        is: "el-popover-select-v2",
+        referName: "MATERIAL_PARAM",
+        valueKey: "code",
+        clearable:true,
+      },
+    },
+    {
+      item: { key: "classifySearchList", title: "品类" },
+      attr: {
+        is: "el-popover-multiple-tree-select",
+        referName: "MATERIALCLASSIFY_PARAM",
+        valueKey: "id",
+        clearable:true,
+      },
+    },
+    {
+      item: { key: "proposerName", title: "申请人" },
+      attr: {
+        is: "el-popover-select-v2",
+        referName: "CONTACTS_PARAM",
+        valueKey: "name",
+        dataMapping: {
+          proposerId: "code",
+        },
+        clearable: true,
+      },
+    },
+    {
+      item: { key: "createTimeString", title: "申请时间" },
+      attr: {
+        is: "el-date-picker", 
+        valueFormat: "yyyy-MM-dd" ,
+        clearable: true,
+      },
+    },
+    {
+      item: { key: "reviewedName", title: "最后审批人" },
+      attr: {
+        is: "el-popover-select-v2",
+        referName: "CONTACTS_PARAM",
+        valueKey: "name",
+        dataMapping: {
+          reviewedBy: "code",
+        },
+        clearable: true,
+      },
+    },
+    {
+      item: { key: "auditTimeString", title: "审批时间" },
+      attr: {
+        is: "el-date-picker", 
+        valueFormat: "yyyy-MM-dd" ,
         clearable: true,
       },
     },
+    {
+      item: { key: "manufacturerName", title: "生产厂家/代理人" },
+      attr: {
+        clearable:true,
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "MANUFACTURER_PARAM",
+        dataMapping: {
+          manufacturerId: "id",
+        },
+      },
+    },
+    // {
+    //   item: { key: "registrationNo", title: "注册证号" },
+    //   attr: {
+    //     clearable:true,
+    //     is: "el-input",
+    //   },
+    // },
+    
   
   ].map(({ item, attr }) => ({
     attr,

+ 1 - 1
src/views/purchase/contract/columns.js

@@ -141,7 +141,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { width: 100, key: "signDate", title: "合同创建时间" },
+      item: { width: 100, key: "create_time", title: "合同创建时间" },
       attr: {},
     },
     {

+ 19 - 0
src/views/purchase/contract/edit/index.vue

@@ -83,6 +83,25 @@ export default {
       },
       immediate: true,
     },
+    "params.status":{
+      handler:function(newValue){
+
+        if(newValue === '2'){
+          // 已审核
+          this.TableColumns = this.TableColumns.map(({item,attr}) =>{
+
+            return {
+              item:{...item},
+              attr:{
+                ...attr,
+                disabled: item.key !== 'puFile' ? true: false
+              }
+            }
+
+          })
+        }
+      }
+    }
   },
   methods: {
     //

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

@@ -101,6 +101,7 @@ export default {
       this.page.pageNum = 1;
       this.page.pageSize = 10;
       this.params = this.$init.params(this.SearchColumns);
+      this.$refs.superTable.clearSelection();
       this.useQuery(this.params, this.page);
     },
     // 选 择
@@ -212,7 +213,14 @@ export default {
         <pige-button
           :size="size"
           :select-data="selectData"
-          @success="useQuery(params, page)"
+          :isCancal="false"
+          @success="useReset"
+        ></pige-button>
+        <pige-button
+          :size="size"
+          :select-data="selectData"
+          :isCancal="true"
+          @success="useReset"
         ></pige-button>
       </el-button-group>
       <!-- <el-button-group>

+ 63 - 13
src/views/purchase/contract/pigeonhole/index.vue

@@ -8,10 +8,15 @@ export default {
       type: [Array],
       require: true,
     },
+    isCancal:{
+      type:Boolean,
+      require:true,
+    }
   },
   data() {
+    let title = this.isCancal ? '取消归档' : '归 档'
     return {
-      title: "归 档",
+      title: title,
       visible: false,
       loading: false,
       params: { id: "", pigeonholeFile: "" },
@@ -22,14 +27,17 @@ export default {
       get() {
         const {
           selectData,
-          selectData: [{ pigeonhole } = {}],
         } = this;
-        if (selectData.length !== 1) {
-          return true;
-        }
-        if (selectData.length === 1 && pigeonhole === "Y") {
-          return true;
+        if(!selectData.length){
+          return true
         }
+        return false
+        // if (selectData.length !== 1) {
+        //   return true;
+        // }
+        // if (selectData.length === 1 && pigeonhole === "Y") {
+        //   return true;
+        // }
       },
       set() {},
     },
@@ -37,9 +45,51 @@ export default {
   watch: {},
   methods: {
     //
-    open(prop) {
-      this.visible = true;
-      this.params.id = prop;
+    async open(prop) {
+      // this.visible = true;
+      // this.params.id = prop;
+
+      let eligibility = this.selectData.filter(item => {
+        if(!this.isCancal){
+          // 归档
+          return (item.pigeonhole === 'Y' || item.status !== '2')
+
+        }else{
+          // 取消归档
+          return (item.pigeonhole === 'N' || item.status !== '2')
+        }
+      });
+
+      console.log(eligibility,'eligibility');
+
+      if(!eligibility.length){
+
+        try {
+          this.loading = true;
+
+          const { msg, code } = await PIGEONHOLE(
+            [...this.selectData],
+            { type: this.isCancal ? 'N':'Y'}
+            );
+
+          if (code === 200) {
+          this.$emit("success");
+          this.$notify.success({ title: msg });
+        }
+
+        } catch (error) {
+          
+        }finally{
+          this.loading = false;
+        }
+      }else{
+        this.$notify.warning({ 
+          title: '警告',
+          message: `请选择已审核并${this.isCancal ? '已' :'未'}归档数据!`,
+        });
+      }
+      
+
     },
     //
     hide() {
@@ -78,10 +128,10 @@ export default {
     v-bind="$attrs"
     v-on="$listeners"
     :disabled="disabled"
-    @click="open(selectData[0].id)"
+    @click="open"
   >
     {{ title }}
-    <el-dialog
+    <!-- <el-dialog
       :title="title"
       :visible.sync="visible"
       width="25%"
@@ -117,6 +167,6 @@ export default {
           ></file-upload>
         </el-form-item>
       </el-form>
-    </el-dialog>
+    </el-dialog> -->
   </el-button>
 </template>

+ 6 - 0
src/views/purchase/contract/see/index.vue

@@ -19,6 +19,7 @@ export default {
   components: {
     ElSuperDescriptions: () =>
       import("@/components/super-descriptions/index.vue"),
+    SubmButton: () => import("../submit/index.vue"),
     ElSuperTable: () => import("@/components/super-table/index.vue"),
     ElSuperForm: () => import("@/components/super-form/index.vue"),
   },
@@ -128,6 +129,11 @@ export default {
       <el-button type="primary" :size="$attrs.size" :loading="loading" @click="handleJump">
           流程跳转
         </el-button>
+        <subm-button
+          :size="$attrs.size"
+          :select-data="[{...this.params}]"
+          @success="hide"
+        ></subm-button>
       <!-- <el-button
         type="primary"
         :size="$attrs.size"