yusheng 1 year ago
parent
commit
b6c75d79af

+ 1 - 1
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -119,7 +119,7 @@
       <template v-slot:files="{ row, $index }">
         <el-form-item prop="files">
           <fileMain
-            v-model="row.files"
+            v-model="form.files"
             :type="status == 'Detail' ? 'view' : ''"
           ></fileMain>
           <!--          <fileUpload-->

+ 14 - 0
src/views/purchasingManage/producerManage/components/contactDetailDialog.vue

@@ -628,6 +628,20 @@ export default {
           label: '是'
         }
       ],
+      statusList: [
+          {
+            label: '未收款',
+            value: 0
+          },
+          {
+            label: '部分收款',
+            value: 1
+          },
+          {
+            label: '已收全款',
+            value: 2
+          }
+        ],
       bankColumns: [
         {
           type: 'index',

+ 14 - 0
src/views/purchasingManage/supplierManage/components/contactDetailDialog.vue

@@ -621,6 +621,20 @@ export default {
           label: '是'
         }
       ],
+      statusList: [
+          {
+            label: '未收款',
+            value: 0
+          },
+          {
+            label: '部分收款',
+            value: 1
+          },
+          {
+            label: '已收全款',
+            value: 2
+          }
+        ],
       bankColumns: [
         {
           type: 'index',

+ 10 - 13
src/views/saleManage/contact/components/addContactDialog.vue

@@ -243,7 +243,7 @@
                 </DictSelection>
               </el-form-item>
             </el-col>
-            <el-col :span="8" v-if="form.type!=2">
+            <el-col :span="8" v-if="form.type != 2">
               <el-form-item label="资质审查" prop="qualificationCensorship">
                 <el-radio v-model="form.qualificationCensorship" label="1"
                   >启用</el-radio
@@ -637,11 +637,7 @@
               详情
             </el-link>
             <el-link
-              v-if="
-                (isNeed_process_is_close &&
-                  [0, 3].includes(scope.row.processStatus)) ||
-                isNeed_process_is_close
-              "
+              v-if="[0, 3].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
@@ -651,7 +647,11 @@
             </el-link>
 
             <el-link
-              v-if="[0, 3].includes(scope.row.processStatus)&&form.type==1&& form.qualificationCensorship == '2'"
+              v-if="
+                [0, 3].includes(scope.row.processStatus) &&
+                form.type == 1 &&
+                form.qualificationCensorship == '2'
+              "
               type="primary"
               :underline="false"
               icon="el-icon-plus"
@@ -660,7 +660,7 @@
               提交
             </el-link>
             <el-link
-              v-if="[0, 3].includes(scope.row.processStatus)&&form.type==2"
+              v-if="[0, 3].includes(scope.row.processStatus) && form.type == 2"
               type="primary"
               :underline="false"
               icon="el-icon-plus"
@@ -675,11 +675,7 @@
             >
               <template v-slot:reference>
                 <el-link
-                  v-if="
-                    (isNeed_process_is_close &&
-                      [0, 3].includes(scope.row.processStatus)) ||
-                    !isNeed_process_is_close
-                  "
+                  v-if="[0, 3].includes(scope.row.processStatus)"
                   type="danger"
                   :underline="false"
                   icon="el-icon-delete"
@@ -810,6 +806,7 @@
       :contactInfo="form"
       :typeInfo="form.type"
       @success="tableCertificateDataAdd"
+      @reload="reloadTableCertificateDataList"
     >
     </certificate-qualifications-dialog>
     <process-submit-dialog

+ 329 - 324
src/views/saleManage/contact/components/certificateQualificationsDialog.vue

@@ -322,7 +322,7 @@
         >保存</el-button
       >
       <el-button
-        v-if="isNeed_process_is_close && type !== 'view'&&contactInfo.id"
+        v-if="isNeed_process_is_close && type !== 'view' && contactInfo.id"
         type="primary"
         plan
         @click="handleSave(true)"
@@ -343,344 +343,349 @@
   </ele-modal>
 </template>
 <script>
-import FileUpload from '@/components/upload/fileUpload.vue';
-import staffSelection from '@/components/staffSelection/staffSelection.vue';
-import {
-  contactQcPackDetailAPI,
-  contactQcPackSaveAPI,
-  contactQcPackUpdateAPI,
-  contactQcSubmit
-} from '@/api/saleManage/contact';
-import { getFile } from '@/api/system/file';
-import bpmDetail from '@/views/bpm/processInstance/detail.vue';
-import { mapActions, mapGetters } from 'vuex';
-import dictEnum from '@/enum/dict';
-import fileMain from '@/components/addDoc/index.vue';
-import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import FileUpload from '@/components/upload/fileUpload.vue';
+  import staffSelection from '@/components/staffSelection/staffSelection.vue';
+  import {
+    contactQcPackDetailAPI,
+    contactQcPackSaveAPI,
+    contactQcPackUpdateAPI,
+    contactQcSubmit
+  } from '@/api/saleManage/contact';
+  import { getFile } from '@/api/system/file';
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import { mapActions, mapGetters } from 'vuex';
+  import dictEnum from '@/enum/dict';
+  import fileMain from '@/components/addDoc/index.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
-export default {
-  name: 'certificateQualificationsDialog',
-  components: {
-    processSubmitDialog,
-    fileMain,
-    bpmDetail,
-    FileUpload,
-    staffSelection
-  },
-  props: {
-    certificateQualificationsDialogFlag: Boolean,
-    contactInfo: Object,
-    typeInfo: String
-  },
-  data() {
-    return {
-      title: '',
-      type: '',
-      activeName: 'QC',
-      defaultData: {
-        accessory: [],
-        name: '',
-        noticePersonId: '',
-        noticePersonName: '',
-        num: '',
-        remark: '',
-        businessRange: '',
-        type: '',
-        endTime: '',
-        startTime: ''
-      },
-      form: {
-        accessory: [],
-        detailsList: [],
-        relationName: '',
-        name: '',
-        date: [],
-        remark: ''
-      },
-      curIndex: null,
-      index:'',
-      processSubmitDialogFlag: false,
-      levelOptions: [
-        {
-          dictValue: '初级',
-          dictCode: '1'
-        },
-        {
-          dictValue: '中级',
-          dictCode: '2'
-        },
-        {
-          dictValue: '高级',
-          dictCode: '3'
-        }
-      ],
-      statusList: {
-        10: '有效',
-        20: '无效',
-        30: '已过期'
-      },
-      statusTagTypeList: {
-        10: 'success',
-        20: 'info',
-        30: 'danger'
-      }
-    };
-  },
-  computed: {
-    ...mapGetters(['dict']),
-    dictList() {
-      return this.dict[dictEnum['客户/供应商资质类型']] || [];
+  export default {
+    name: 'certificateQualificationsDialog',
+    components: {
+      processSubmitDialog,
+      fileMain,
+      bpmDetail,
+      FileUpload,
+      staffSelection
     },
-    typeList() {
-      return this.dict[dictEnum['工种类型']] || [];
+    props: {
+      certificateQualificationsDialogFlag: Boolean,
+      contactInfo: Object,
+      typeInfo: String
     },
-    columns() {
-      return [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '名称',
-          prop: 'name',
-          slot: 'name',
-          headerSlot: 'isRequired',
-          minWidth: 180,
-          align: 'center'
-        },
-        {
-          label: '编号',
-          prop: 'code',
-          slot: 'code',
-          headerSlot: 'isRequired',
-          minWidth: 120,
-          align: 'center'
-        },
-        {
-          label: '许可/经营范围',
-          prop: 'businessRange',
-          slot: 'businessRange',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '有效期起始日期',
-          prop: 'startTime',
-          slot: 'startTime',
-          // headerSlot: 'isRequired',
-          minWidth: 160,
-          align: 'center'
-        },
-        {
-          label: '有效期截止日期',
-          prop: 'endTime',
-          slot: 'endTime',
-          // headerSlot: 'isRequired',
-          minWidth: 160,
-          align: 'center'
-        },
-        {
-          label: '通知人',
-          prop: 'noticePersonName',
-          slot: 'noticePersonName',
-          headerSlot: 'isRequired',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '附件',
-          prop: 'accessory',
-          slot: 'accessory',
-          headerSlot: 'isRequired',
-          minWidth: 140
-        },
-        {
-          label: '等级',
-          prop: 'level',
-          slot: 'level',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '分类',
-          prop: 'type',
-          slot: 'type',
-          minWidth: 140,
-          align: 'center'
+    data() {
+      return {
+        title: '',
+        type: '',
+        activeName: 'QC',
+        defaultData: {
+          accessory: [],
+          name: '',
+          noticePersonId: '',
+          noticePersonName: '',
+          num: '',
+          remark: '',
+          businessRange: '',
+          type: '',
+          endTime: '',
+          startTime: ''
         },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          minWidth: 140,
-          align: 'center'
+        form: {
+          accessory: [],
+          detailsList: [],
+          relationName: '',
+          name: '',
+          date: [],
+          remark: ''
         },
-        {
-          label: '状态',
-          prop: 'status',
-          slot: 'status',
-          align: 'center'
+        curIndex: null,
+        index: '',
+        processSubmitDialogFlag: false,
+        levelOptions: [
+          {
+            dictValue: '初级',
+            dictCode: '1'
+          },
+          {
+            dictValue: '中级',
+            dictCode: '2'
+          },
+          {
+            dictValue: '高级',
+            dictCode: '3'
+          }
+        ],
+        statusList: {
+          10: '有效',
+          20: '无效',
+          30: '已过期'
         },
-        {
-          action: 'action',
-          slot: 'action',
-          label: '操作',
-          align: 'center',
-          fixed: 'right'
-        }
-      ];
-    },
-    disabledToType() {
-      return (row) => {
-        let list = this.form.detailsList.map((item) => item.name);
-        let dictCodeList = this.dictList.map((item) => item.dictCode);
-        let intersectionList = list.filter((v) => dictCodeList.indexOf(v) > -1);
-        intersectionList = intersectionList.filter((v) => row.name !== v);
-        return intersectionList;
-      };
-    }
-  },
-  created() {
-    this.requestDict('客户/供应商资质类型');
-    this.requestDict('工种类型');
-  },
-  methods: {
-    ...mapActions('dict', ['requestDict']),
-    getLabelName(arr, id) {
-      if (!id) return '';
-      return arr.find((item) => item.dictCode == id)?.dictValue;
-    },
-    //删除资质
-    handleRemove(index) {
-      this.form.detailsList.splice(index, 1);
-    },
-    //结束日期验证
-    validateEndDate(row, index) {
-      return (rule, value, callback) => {
-        //new Error('')
-        if (!value) return callback();
-        if (row.endTime && row.startTime && value < row.startTime) {
-          callback(new Error('截止日期不能小于起始日期'));
-        } else {
-          callback();
+        statusTagTypeList: {
+          10: 'success',
+          20: 'info',
+          30: 'danger'
         }
       };
     },
-    //页面初始化
-    init(type, row = {},index) {
-      this.title = type == 'add' ? '新增' : type == 'update' ? '修改' : '详情';
-      this.type = type;
-      if (type !== 'add') {
-        if (this.contactInfo.id) {
-          this.getCertificateInfo(row);
-        } else {
-          this.form = row;
-          this.index=index
-          // this.form.date=[this.form.startTime, this.form.endTime];
-      this.$set(this.form,'date',[this.form.startTime, this.form.endTime])
-
-        }
+    computed: {
+      ...mapGetters(['dict']),
+      dictList() {
+        return this.dict[dictEnum['客户/供应商资质类型']] || [];
+      },
+      typeList() {
+        return this.dict[dictEnum['工种类型']] || [];
+      },
+      columns() {
+        return [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '名称',
+            prop: 'name',
+            slot: 'name',
+            headerSlot: 'isRequired',
+            minWidth: 180,
+            align: 'center'
+          },
+          {
+            label: '编号',
+            prop: 'code',
+            slot: 'code',
+            headerSlot: 'isRequired',
+            minWidth: 120,
+            align: 'center'
+          },
+          {
+            label: '许可/经营范围',
+            prop: 'businessRange',
+            slot: 'businessRange',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '有效期起始日期',
+            prop: 'startTime',
+            slot: 'startTime',
+            // headerSlot: 'isRequired',
+            minWidth: 160,
+            align: 'center'
+          },
+          {
+            label: '有效期截止日期',
+            prop: 'endTime',
+            slot: 'endTime',
+            // headerSlot: 'isRequired',
+            minWidth: 160,
+            align: 'center'
+          },
+          {
+            label: '通知人',
+            prop: 'noticePersonName',
+            slot: 'noticePersonName',
+            headerSlot: 'isRequired',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '附件',
+            prop: 'accessory',
+            slot: 'accessory',
+            headerSlot: 'isRequired',
+            minWidth: 140
+          },
+          {
+            label: '等级',
+            prop: 'level',
+            slot: 'level',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '分类',
+            prop: 'type',
+            slot: 'type',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            slot: 'remark',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '状态',
+            prop: 'status',
+            slot: 'status',
+            align: 'center'
+          },
+          {
+            action: 'action',
+            slot: 'action',
+            label: '操作',
+            align: 'center',
+            fixed: 'right'
+          }
+        ];
+      },
+      disabledToType() {
+        return (row) => {
+          let list = this.form.detailsList.map((item) => item.name);
+          let dictCodeList = this.dictList.map((item) => item.dictCode);
+          let intersectionList = list.filter(
+            (v) => dictCodeList.indexOf(v) > -1
+          );
+          intersectionList = intersectionList.filter((v) => row.name !== v);
+          return intersectionList;
+        };
       }
     },
-    async getCertificateInfo(row) {
-      this.form = await contactQcPackDetailAPI(row.id);
-      this.$set(this.form,'date',[this.form.startTime, this.form.endTime])
-    },
-    //打开选择负责人弹窗
-    openStaffSelection(index) {
-      this.curIndex = index;
-      this.$refs.staffSelection.open([]);
+    created() {
+      this.requestDict('客户/供应商资质类型');
+      this.requestDict('工种类型');
     },
-    //选择负责人回调
-    confirmStaffSelection(data) {
-      this.form.detailsList[this.curIndex].noticePersonName = data
-        .map((item) => item.name)
-        .toString();
-      this.form.detailsList[this.curIndex].noticePersonId = data
-        .map((item) => item.id)
-        .toString();
-    },
-    //新增
-    handleAdd() {
-      this.form.detailsList.push({ ...this.defaultData });
-    },
-    //修改资质证书
-    handleChangeType(val, row) {
-      if (!val) return (row.name = '');
-      // row.name = this.dictList.find(i => i.dictCode == val)?.dictValue || ''
-    },
-    downloadFile(file) {
-      getFile({ objectName: file.storePath }, file.name);
-    },
-    //保存/提交
-    handleSave(isSub) {
-      this.$refs.form.validate(async (valid) => {
-        if (!valid) return this.$message.warning('有必填项未填写,请检查');
-        if (!this.form.detailsList.length)
-          return this.$message.warning('至少保存一条资质信息');
-        this.form.certificationType =this.typeInfo
-        this.form.relationId = this.contactInfo.id;
-        this.form.relationName = this.contactInfo.name;
-        this.form.startTime = this.form.date[0];
-        this.form.endTime = this.form.date[1];
-        if (!this.contactInfo.id) {
-          this.$emit('success',{ form:this.form,index:this.index});
-          this.cancel();
-          return;
-        }
-        let api =
-          this.type == 'add' ? contactQcPackSaveAPI : contactQcPackUpdateAPI;
-        let id = await api(this.form);
-        if (isSub) {
-          // await contactQcSubmit({businessId: id, certificationType: this.typeInfo})
-          await this.submit({
-            businessId: id,
-            certificationType: this.typeInfo
-          });
-          return;
-        }
-        this.$message.success('保存成功');
-        this.$emit('success',{});
-        this.cancel();
-      });
-    },
-    async submit(row) {
-      let data = await contactQcPackDetailAPI(this.form.id || row.businessId);
-      this.processSubmitDialogFlag = true;
-      this.$nextTick(() => {
-        let key =
-          this.typeInfo == 1 ? 'contact_qc_approve' : 'supplier_qc_approve';
-        let params = {
-          businessId: data.id,
-          businessKey: key,
-          formCreateUserId: data.createUserId,
-          variables: {
-            certificationType: this.typeInfo
+    methods: {
+      ...mapActions('dict', ['requestDict']),
+      getLabelName(arr, id) {
+        if (!id) return '';
+        return arr.find((item) => item.dictCode == id)?.dictValue;
+      },
+      //删除资质
+      handleRemove(index) {
+        this.form.detailsList.splice(index, 1);
+      },
+      //结束日期验证
+      validateEndDate(row, index) {
+        return (rule, value, callback) => {
+          //new Error('')
+          if (!value) return callback();
+          if (row.endTime && row.startTime && value < row.startTime) {
+            callback(new Error('截止日期不能小于起始日期'));
+          } else {
+            callback();
           }
-          // callBackMethodType : '1',
-          // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-          // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-          // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-          // miniHandle : '',
-          // miniView : '',
         };
-        this.$refs.processSubmitDialogRef.init(params);
-      });
-    },
-    reload() {
-      this.$emit('reload');
-      this.cancel();
-    },
-    //关闭弹窗
-    cancel() {
-      this.$emit('update:certificateQualificationsDialogFlag', false);
+      },
+      //页面初始化
+      init(type, row = {}, index) {
+        this.title =
+          type == 'add' ? '新增' : type == 'update' ? '修改' : '详情';
+        this.type = type;
+        if (type !== 'add') {
+          if (this.contactInfo.id) {
+            this.getCertificateInfo(row);
+          } else {
+            this.form = row;
+            this.index = index;
+            // this.form.date=[this.form.startTime, this.form.endTime];
+            this.$set(this.form, 'date', [
+              this.form.startTime,
+              this.form.endTime
+            ]);
+          }
+        }
+      },
+      async getCertificateInfo(row) {
+        this.form = await contactQcPackDetailAPI(row.id);
+        this.$set(this.form, 'date', [this.form.startTime, this.form.endTime]);
+      },
+      //打开选择负责人弹窗
+      openStaffSelection(index) {
+        this.curIndex = index;
+        this.$refs.staffSelection.open([]);
+      },
+      //选择负责人回调
+      confirmStaffSelection(data) {
+        this.form.detailsList[this.curIndex].noticePersonName = data
+          .map((item) => item.name)
+          .toString();
+        this.form.detailsList[this.curIndex].noticePersonId = data
+          .map((item) => item.id)
+          .toString();
+      },
+      //新增
+      handleAdd() {
+        this.form.detailsList.push({ ...this.defaultData });
+      },
+      //修改资质证书
+      handleChangeType(val, row) {
+        if (!val) return (row.name = '');
+        // row.name = this.dictList.find(i => i.dictCode == val)?.dictValue || ''
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      //保存/提交
+      handleSave(isSub) {
+        this.$refs.form.validate(async (valid) => {
+          if (!valid) return this.$message.warning('有必填项未填写,请检查');
+          if (!this.form.detailsList.length)
+            return this.$message.warning('至少保存一条资质信息');
+          this.form.certificationType = this.typeInfo;
+          this.form.relationId = this.contactInfo.id;
+          this.form.relationName = this.contactInfo.name;
+          this.form.startTime = this.form.date[0];
+          this.form.endTime = this.form.date[1];
+          if (!this.contactInfo.id) {
+            this.$emit('success', { form: this.form, index: this.index });
+            this.cancel();
+            return;
+          }
+          let api =
+            this.type == 'add' ? contactQcPackSaveAPI : contactQcPackUpdateAPI;
+          let id = await api(this.form);
+          if (isSub) {
+            // await contactQcSubmit({businessId: id, certificationType: this.typeInfo})
+            await this.submit({
+              businessId: id,
+              certificationType: this.typeInfo
+            });
+            return;
+          }
+          this.$message.success('保存成功');
+          this.$emit('success', {});
+          this.cancel();
+        });
+      },
+      async submit(row) {
+        let data = await contactQcPackDetailAPI(this.form.id || row.businessId);
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let key =
+            this.typeInfo == 1 ? 'contact_qc_approve' : 'supplier_qc_approve';
+          let params = {
+            businessId: data.id,
+            businessKey: key,
+            formCreateUserId: data.createUserId,
+            variables: {
+              certificationType: this.typeInfo
+            }
+            // callBackMethodType : '1',
+            // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
+            // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
+            // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
+            // miniHandle : '',
+            // miniView : '',
+          };
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      },
+      reload() {
+        this.$emit('success', {});
+        this.cancel();
+      },
+      //关闭弹窗
+      cancel() {
+        this.$emit('update:certificateQualificationsDialogFlag', false);
+      }
     }
-  }
-};
+  };
 </script>
 <style scoped lang="scss">
-:deep.el-form-item {
-  margin-bottom: 0;
-}
+  :deep.el-form-item {
+    margin-bottom: 0;
+  }
 </style>

+ 14 - 0
src/views/saleManage/contact/components/contactDetailDialog.vue

@@ -815,6 +815,20 @@ export default {
           label: '是'
         }
       ],
+      statusList: [
+          {
+            label: '未收款',
+            value: 0
+          },
+          {
+            label: '部分收款',
+            value: 1
+          },
+          {
+            label: '已收全款',
+            value: 2
+          }
+        ],
       bankColumns: [
         {
           type: 'index',