소스 검색

客户申请修改

yusheng 1 년 전
부모
커밋
93ac3e3856

+ 1 - 1
src/BIZComponents/inventoryTable.vue

@@ -1290,7 +1290,7 @@
 
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.produceType);
-          this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+          this.$set(parasm, 'approvalNumber', item.extField?.approvalNumber);
           this.$set(
             parasm,
             'packingSpecification',

+ 11 - 0
src/api/contractManage/contractBook.js

@@ -111,3 +111,14 @@ export async function batchSubmitAPI(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+/**
+ * 更新合同关联状态
+ */
+export async function updateContractStatus(data) {
+  const res = await request.post('/eom/contract/updateRelationStatus', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 19 - 16
src/api/saleManage/contact.js

@@ -54,12 +54,14 @@ export async function contactSave(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 /**
  * 客户证书资质信息分页
  */
 export async function contactQcPackPageAPI(params) {
-  const res = await request.get(`/main/professionCertification/selectByRelationIdAndType`, { params });
+  const res = await request.get(
+    `/main/professionCertification/selectByRelationIdAndType`,
+    { params }
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -90,7 +92,10 @@ export async function contactQcPackUpdateAPI(data) {
  * 获取客户证书资质信息详情
  */
 export async function contactQcPackDetailAPI(id) {
-  const res = await request.get(`/main/professionCertification/getById/${id}`, {});
+  const res = await request.get(
+    `/main/professionCertification/getById/${id}`,
+    {}
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -100,7 +105,9 @@ export async function contactQcPackDetailAPI(id) {
  * 删除客户证书资质包
  */
 export async function contactQcPackDeleteAPI(data) {
-  const res = await request.delete(`/main/professionCertification/delete`, { data });
+  const res = await request.delete(`/main/professionCertification/delete`, {
+    data
+  });
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -118,14 +125,10 @@ export async function contactQcSubmit(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
 /**
  * 删除事项
  */
 export async function contactDelete(data) {
-
   const res = await request.post('/eom/contact/delete', data);
   if (res.data.code == 0) {
     return res.data.data;
@@ -133,7 +136,6 @@ export async function contactDelete(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 /**
  * 获取客户分类树
  */
@@ -149,7 +151,9 @@ export async function contactTypeTree(data) {
  * 更新用户状态
  */
 export async function updateStatus(id, status) {
-  const res = await request.get(`/eom/contact/updateStatus?id=` + id + '&status=' + status);
+  const res = await request.get(
+    `/eom/contact/updateStatus?id=` + id + '&status=' + status
+  );
   if (res.data.code == 0) {
     return res.data;
   }
@@ -178,15 +182,14 @@ export async function free(data) {
 /**
  * 申请
  */
-export async function apply(data) {
-  const res = await request.post('/bpm/contactlistapply/apply', data);
+export async function applySave(data) {
+  const res = await request.post('/eom/contactlistapply/save', data);
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 
-
 /**
  * 供应商维护供货产品
  */
@@ -232,7 +235,7 @@ export async function updateContactDynamics(data) {
 /**
  * 回复动态
  */
- export async function updateContactComment(data) {
+export async function updateContactComment(data) {
   const res = await request.put('/eom/contact/updateContactComment', data);
   if (res.data.code == 0) {
     return res.data.data;
@@ -242,8 +245,8 @@ export async function updateContactDynamics(data) {
 /**
  * 摘要卡片
  */
- export async function queryContactIdCount(id) {
-  const res = await request.get(`eom/contact/queryContactIdCount/`+id);
+export async function queryContactIdCount(id) {
+  const res = await request.get(`eom/contact/queryContactIdCount/` + id);
   if (res.data.code == 0) {
     return res.data;
   }

+ 3 - 3
src/views/contractManage/contractChange/components/addOrEditDialog.vue

@@ -32,8 +32,8 @@
     >
       <el-row>
         <el-col :span="12" v-if="dialogType != 'add'">
-          <el-form-item label="编码" prop="code">
-            <el-input v-model="form.code" disabled></el-input>
+          <el-form-item label="编码" prop="changeCode">
+            <el-input v-model="form.changeCode" disabled></el-input>
           </el-form-item>
         </el-col>
 
@@ -88,7 +88,7 @@
   import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
   const defForm = {
     name: '',
-    code: '',
+    changeCode: '',
     file: [], //条件
     remark: '',
     type: '',

+ 6 - 6
src/views/contractManage/contractChange/components/searchTable.vue

@@ -9,20 +9,20 @@
     <el-row :gutter="15">
  
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="编码:" prop="code">
+        <el-form-item label="编码:" prop="changeCode">
           <el-input
             clearable
             placeholder="请输入"
-            v-model.trim="params.code"
+            v-model.trim="params.changeCode"
           ></el-input>
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="名称" prop="name">
+        <el-form-item label="合同名称" prop="contractName">
           <el-input
             clearable
             placeholder="请输入"
-            v-model.trim="params.name"
+            v-model.trim="params.contractName"
           ></el-input>
         </el-form-item>
       </el-col>
@@ -50,8 +50,8 @@
     data () {
       // 默认表单数据
       const defaultParams = {
-        code:'',
-        name:'',
+        changeCode:'',
+        contractName:'',
       };
       return {
         defaultParams,

+ 13 - 14
src/views/contractManage/contractChange/index.vue

@@ -14,6 +14,12 @@
         cache-key="eomContactPageTable"
         :page-size="20"
       >
+        <!-- 查看详情列 -->
+        <template v-slot:changeCode="{ row }">
+          <el-link type="primary" :underline="false" @click="handleAddOrEdit(row,'view')">
+            {{ row.changeCode }}
+          </el-link>
+        </template>
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
           <el-button
@@ -22,6 +28,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="handleAddOrEdit('', 'add')"
+            v-if="$hasPermission('eom:contractchangerecord:save')"
           >
             新建
           </el-button>
@@ -33,7 +40,7 @@
             :underline="false"
             icon="el-icon-edit"
             @click="handleAddOrEdit(row, 'update')"
-            v-if="[0, 3].includes(row.approvalStatus)"
+            v-if="[0, 3].includes(row.approvalStatus)&&$hasPermission('eom:contractchangerecord:update')"
           >
             修改
           </el-link>
@@ -50,7 +57,7 @@
             class="ele-action"
             title="确定要删除此信息吗?"
             @confirm="remove([row.id])"
-            v-if="[0, 3].includes(row.approvalStatus)"
+            v-if="[0, 3].includes(row.approvalStatus)&&$hasPermission('eom:contractchangerecord:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -59,15 +66,7 @@
             </template>
           </el-popconfirm>
         </template>
-        <template v-slot:applyUserName="{ row }">
-          <el-link
-            type="primary"
-            :underline="false"
-            @click="handleDetail(row, 'view')"
-          >
-            {{ row.applyUserName }}
-          </el-link>
-        </template>
+
       </ele-pro-table>
     </el-card>
 
@@ -129,10 +128,10 @@
           },
           {
             minWidth: 200,
-            prop: 'code',
+            prop: 'changeCode',
             label: '编码',
             align: 'center',
-            slot: 'code',
+            slot: 'changeCode',
             showOverflowTooltip: true
           },
           {
@@ -240,7 +239,7 @@
             businessKey: key,
             formCreateUserId: res.createUserId,
             variables: {
-              businessCode: res.code
+              businessCode: res.changeCode
             }
           };
           this.$refs.processSubmitDialogRef.init(params);

+ 6 - 3
src/views/financialManage/invoiceManage/components/addOrEditDialog.vue

@@ -253,7 +253,6 @@
     </el-form>
     <headerTitle title="关联信息"></headerTitle>
     <table-info
-     
       :isOtherSourceFlag="isOtherSourceFlag"
       :dialogType="dialogType"
       :form="form"
@@ -332,6 +331,7 @@
   import { enterprisePage } from '@/api/contractManage/contractBook';
   import { contactDetail } from '@/api/saleManage/contact';
   import fileMain from '@/components/addDoc/index.vue';
+  import {updateContractStatus } from '@/api/contractManage/contractBook';
 
   const defForm = {
     accountingSubjectCode: '',
@@ -586,7 +586,7 @@
         this.$set(this.form, 'sourceCode', row.code);
         this.$set(this.form, 'amount', row.receivedTotalPrice);
         this.$set(this.form, 'invoiceAmount', row.invoiceAmount);
-        this.getContactDetail(form.contactId,{});
+        this.getContactDetail(form.contactId, {});
       },
 
       //对账单回调
@@ -607,7 +607,7 @@
       //订单、合同列表
       async createInvoice1(data, type, sourceType) {
         this.$set(this.form, 'type', Number(type));
-          this.$set(this.form, 'sourceType', sourceType);
+        this.$set(this.form, 'sourceType', sourceType);
 
         await this.init({}, 'add');
 
@@ -733,6 +733,9 @@
               ? invoiceApplySaveAPI
               : invoiceApplyUpdateAPI;
           const id = await API(this.form);
+          if (this.form.sourceType == 2) {
+            updateContractStatus([this.form.sourceId]);
+          }
           if (flag) {
             await this.handleSub(id);
             return;

+ 2 - 2
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -647,8 +647,8 @@ export default {
         this.$set(parasm, 'remark', '');
         this.$set(parasm, 'imgCode', item.imgCode);
         this.$set(parasm, 'produceType', item.produceType);
-        this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
-        this.$set(parasm, 'packingSpecification', item.extField.packingSpecification);
+        this.$set(parasm, 'approvalNumber', item.extField?.approvalNumber);
+        this.$set(parasm, 'packingSpecification', item.extField?.packingSpecification);
 
         if (idx == -1) {
           this.form.datasource.push(row);

+ 15 - 11
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -510,7 +510,7 @@
   import deptSelect from '@/components/CommomSelect/dept-select.vue';
   import personSelect from '@/components/CommomSelect/person-select.vue';
   import parentList from '@/views/purchasingManage/supplierManage/components/parentList.vue';
-  import { enterprisePage, getDetail } from '@/api/contractManage/contractBook';
+  import { enterprisePage, getDetail,updateContractStatus } from '@/api/contractManage/contractBook';
   import supplierGoodsListDialog from '@/views/purchasingManage/purchaseOrder/components/supplierGoodsListDialog.vue';
   import {
     addInformation,
@@ -535,7 +535,11 @@
   import inquiryList from './inquiryList.vue';
   import { getInventoryTotalAPI } from '@/api/wms';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
-  import { contactDetail,updateRelationStatus } from '@/api/saleManage/contact';
+  import {
+    contactDetail,
+    updateRelationStatus
+  } from '@/api/saleManage/contact';
+  
   export default {
     mixins: [dictMixins],
     components: {
@@ -736,8 +740,7 @@
     created() {
       this.getGroupAll();
       this.getEnterprisePage();
-      this.changePersonel()
-
+      this.changePersonel();
     },
     methods: {
       // 选择负责人部门
@@ -1063,7 +1066,7 @@
                 contractStartDate: contractVO.contractStartDate
               });
             }
-          
+
             this.$refs.rawDetailListRef &&
               this.$refs.rawDetailListRef.putTableValue(contractVO.rawList); //原料
             this.$refs.outputDetailListRef &&
@@ -1154,7 +1157,6 @@
         if (!obj) {
           obj = this.$store.getters.user.info;
           obj.id = obj.userId;
-       
         }
         this.$set(this.form, 'partaLinkId', obj.id);
         this.$set(this.form, 'partaLinkName', obj.name);
@@ -1210,8 +1212,8 @@
           contractName: obj.contractName,
           contractNo: obj.contractNo
         });
-       await this.getPlanInfo(this.form.contractId);
-       await this.getDetailData(obj.id);
+        await this.getPlanInfo(this.form.contractId);
+        await this.getDetailData(obj.id);
         // //采购询价表
         // if(obj.sourceType==2){
         //   obj.sourceId && this.getPurchaseinquiry(obj.sourceId);
@@ -1223,7 +1225,6 @@
 
         this.$store.commit('order/setContractId', obj.id);
         //获取合同采购计划
-    
       },
       async getPlanInfo(id) {
         let res = await getPurchasePlanByContractIdAPI(id);
@@ -1483,7 +1484,10 @@
               .then((res) => {
                 this.loading = false;
                 this.$message.success('修改成功');
-                updateRelationStatus([this.form.partbId])
+                updateRelationStatus([this.form.partbId]);
+                if (this.form.contractId) {
+                  updateContractStatus([this.form.contractId]);
+                }
                 if (type === 'sub') {
                   this.sub(res);
                   return;
@@ -1499,7 +1503,7 @@
               .then((res) => {
                 this.loading = false;
                 this.$message.success('新增成功');
-                updateRelationStatus([this.form.partbId])
+                updateRelationStatus([this.form.partbId]);
                 if (type === 'sub') {
                   this.sub(res);
                   return;

+ 20 - 13
src/views/saleManage/contact/contactList.vue

@@ -168,7 +168,7 @@
   // import popModal from '@/components/pop-modal';
   import AssetTree from '@/components/AssetTree';
   import {
-    apply,
+    applySave,
     contactDelete,
     contactPage,
     contactTypeTree,
@@ -255,7 +255,7 @@
             formatter: (_row, _column, cellValue) => {
               return (
                 (_row.addressName ? _row.addressName.replaceAll(',', '') : '') +
-                 ( _row.address || '')
+                (_row.address || '')
               );
             }
           },
@@ -490,17 +490,24 @@
 
       //申请
       addApply(row) {
-        this.processSubmitDialogFlag = true;
-        this.$nextTick(() => {
-          let params = {
-            businessId: this.selection[0].id,
-            businessKey: 'contact_list_apply',
-            formCreateUserId: this.user.info.userId,
-            variables: {
-              businessCode: this.selection[0].code
-            }
-          };
-          this.$refs.processSubmitDialogRef.init(params);
+        applySave({
+          applyId: this.user.info.userId,
+          applyName: this.user.info.name,
+          contactIds: this.selection[0].id,
+          contactNames: this.selection[0].name
+        }).then((res) => {
+          this.processSubmitDialogFlag = true;
+          this.$nextTick(() => {
+            let params = {
+              businessId: res,
+              businessKey: 'contact_list_apply',
+              formCreateUserId: this.user.info.userId,
+              variables: {
+                businessCode: this.selection[0].code
+              }
+            };
+            this.$refs.processSubmitDialogRef.init(params);
+          });
         });
       },
       openDetail(row) {

+ 4 - 1
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -401,7 +401,7 @@
   import fileUpload from '@/components/upload/fileUpload';
   import dictMixins from '@/mixins/dictMixins';
   import parentList from '@/views/saleManage/contact/components/parentList.vue';
-  import { getDetail } from '@/api/contractManage/contractBook';
+  import {  getDetail,updateContractStatus } from '@/api/contractManage/contractBook';
   import {
     contactDetail,
     updateRelationStatus
@@ -1004,6 +1004,9 @@
           .then((res) => {
             this.loading = false;
             updateRelationStatus([this.form.partaId]);
+            if(this.form.contractId){
+              updateContractStatus([this.form.contractId])
+            }
             if (type === 'sub') {
               // if (commitData.needProduce == 1) {
               //   this.$parent.$refs.autogenerateDialogRef.init(

+ 3 - 0
src/views/saleManage/saleOrder/components/contractListDialog.vue

@@ -268,6 +268,9 @@
         if (this.type) {
           where['type'] = this.type;
         }
+        if(this.isChange){
+          where['ifRelation'] =0;
+        }
         let params = {
           pageNum: page,
           size: limit,