Browse Source

Merge remote-tracking branch 'origin/purchaseDev' into purchaseDev

shiy 1 year ago
parent
commit
b5dd32a44e

+ 33 - 21
src/views/business/spd/task_management/visitingPlan/add.vue

@@ -121,7 +121,7 @@
             <el-button type="primary" size="mini" @click="addLine" v-if="!sonDisable">增行</el-button>
             <el-button type="primary" size="mini"  @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
             <el-button type="primary" size="mini" @click="delItems" v-if="sonPageStu == 'edit'">批量删除</el-button>
-            <el-button type="primary" size="mini" @click="edit" v-if="sonPageStu == 'check'">编辑</el-button>
+            <el-button type="primary" size="mini" @click="edit" v-if="sonPageStu == 'check' && basicForm.state == '0'">编辑</el-button>
           </div>
         </div>
 
@@ -145,7 +145,8 @@
                   type="date"
                   size="mini"
                   value-format="yyyy-MM-dd"
-                  placeholder="选择日期">
+                  placeholder="选择日期"
+                >
                 </el-date-picker>
               </el-form-item>
             </template>
@@ -154,7 +155,7 @@
           <el-table-column show-overflow-tooltip label="客户" prop="customerName" min-width="230" :render-header="addRedStar">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'mkBoPlanItemList.' + scope.$index + '.' + 'customerName'" :rules="{ required: true, message: '请选择客户', trigger: 'blur' }">
-                <el-select clearable size="mini" v-model="scope.row.customerName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'CUSTOMER_PARAM_ZT', true, '客户')" style="width: 200px">
+                <el-select clearable size="mini" v-model="scope.row.customerName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'CUSTOMER_PARAM_ZT', true, '客户', {charger: basicForm.charger})" style="width: 200px">
                   <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.code" />
                 </el-select>
               </el-form-item>
@@ -164,7 +165,7 @@
           <el-table-column show-overflow-tooltip label="联系人" prop="contactName" min-width="230" :render-header="addRedStar">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'mkBoPlanItemList.' + scope.$index + '.' + 'contactName'" :rules="{ required: true, message: '请选择联系人', trigger: 'blur' }">
-                <el-select clearable size="mini" v-model="scope.row.contactName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'LINKMAN_PARAM', true, '联系人', {customer:scope.row.customer})" style="width: 200px">
+                <el-select clearable size="mini" v-model="scope.row.contactName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'LINKMAN_PARAM', true, '联系人', {customer: scope.row.customer, charger: basicForm.charger})" style="width: 200px">
                   <el-option v-for="item in linkOptions" :key="item.id" :label="item.name" :value="item.code" />
                 </el-select>
               </el-form-item>
@@ -190,10 +191,12 @@
             </template>
           </el-table-column>
 
-          <el-table-column :readonly="sonDisable" show-overflow-tooltip label="商机" prop="boName" min-width="200">
+          <el-table-column show-overflow-tooltip label="商机" prop="boName" min-width="330">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'mkBoPlanItemList.' + scope.$index + '.' + 'boName'">
-                <el-input clearable :readonly="sonDisable" size="mini" v-model="scope.row.boName"/>
+                <el-select clearable size="mini" v-model="scope.row.boName" :disabled="sonDisable" @focus="chooseSon(scope.$index, 'BO_PARAM', true, '商机', {charger: basicForm.charger, customer: scope.row.customer})" style="width: 300px">
+                  <el-option v-for="item in boOptions" :key="item.id" :label="item.name" :value="item.code" />
+                </el-select>
               </el-form-item>
             </template>
           </el-table-column>
@@ -284,13 +287,9 @@ export default {
         isPage: true,
         title: '',
       },
-      // referCondition: {
-      //   type: '',
-      //   isPage: true,
-      //   title: '',
-      // },
       tableIndex: null,
       ids: [],
+      boOptions: [],
       linkOptions: [],
       manOptions: [],
       personOptions: [],
@@ -327,8 +326,11 @@ export default {
       this.basicForm.planCode = ''
       this.basicForm.createBy = ''
       this.basicForm.createTime = ''
+      //复制之后执行人和部门变为当前账号所有者
+      this.basicForm.charger = this.$store.state.user.id,
       this.basicForm.chargerName = this.$store.state.user.nickName
       this.basicForm.dept = this.$store.state.user.deptId
+      this.basicForm.deptName = this.$store.state.user.deptName
       if (this.basicForm.chargerName) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.chargerName) }
       if (this.basicForm.marketingAreaName) { this.reBackRefer('MK_SALESAREA_PARAM', this.basicForm.marketingAreaName) }
       if (this.basicForm.deptName) { this.reBackRefer('DEPT_PARAM', this.basicForm.deptName) }
@@ -513,20 +515,23 @@ export default {
     // 回显参照框
     reBackRefer(type, id, title) {
       getRefer({type: type, id: id}).then(res => {
+        if (type == 'CONTACTS_PARAM') {
+          this.personOptions = res.rows
+        }
         if(type == 'MK_SALESAREA_PARAM') {
           this.salesAreaOptions = res.rows
         }
+        if (type == 'DEPT_PARAM') {
+          this.deptOptions = res.rows
+        }
         if (type == 'CUSTOMER_PARAM_ZT') {
           this.customerOptions = res.rows
         }
-        if (type == 'CONTACTS_PARAM') {
-          this.personOptions = res.rows
-        }
         if (type == 'LINKMAN_PARAM') {
           this.linkOptions = res.rows
         }
-        if (type == 'DEPT_PARAM') {
-          this.deptOptions = res.rows
+        if(type == 'BO_PARAM') {
+          this.boOptions = res.rows
         }
       })
     },
@@ -547,11 +552,6 @@ export default {
       this.$refs.refer.init(this.referCondition)
     },
     selectionsToInput(selection) {
-      if(this.referCondition.type == 'CUSTOMER_PARAM_ZT') {
-        this.customerOptions = selection
-        this.basicForm.mkBoPlanItemList[this.tableIndex].customer = selection[0].id
-        this.basicForm.mkBoPlanItemList[this.tableIndex].customerName = selection[0].name
-      }
       if(this.referCondition.type == 'CONTACTS_PARAM') {
         this.personOptions = selection
         this.basicForm.charger = selection[0].id
@@ -567,11 +567,23 @@ export default {
         this.basicForm.dept = selection[0].id
         this.basicForm.deptName = selection[0].name
       }
+      if(this.referCondition.type == 'CUSTOMER_PARAM_ZT') {
+        this.customerOptions = selection
+        this.basicForm.mkBoPlanItemList[this.tableIndex].customer = selection[0].id
+        this.basicForm.mkBoPlanItemList[this.tableIndex].customerName = selection[0].name
+      }
       if(this.referCondition.type == 'LINKMAN_PARAM') {
         this.linkOptions = selection
         this.basicForm.mkBoPlanItemList[this.tableIndex].contact = selection[0].id
         this.basicForm.mkBoPlanItemList[this.tableIndex].contactName = selection[0].name
       }
+      if(this.referCondition.type == 'BO_PARAM') {
+        this.linkOptions = selection
+        this.basicForm.mkBoPlanItemList[this.tableIndex].bo = selection[0].id
+        this.basicForm.mkBoPlanItemList[this.tableIndex].boName = selection[0].name
+        this.basicForm.mkBoPlanItemList[this.tableIndex].customer = selection[0].customer
+        this.basicForm.mkBoPlanItemList[this.tableIndex].customerName = selection[0].customerName
+      }
     },
     //获取当前时间
     getCurrentTime() {

+ 17 - 17
src/views/material/basicFile/details.vue

@@ -2506,28 +2506,28 @@
         deep: true,
       },
       // 通过一级分类判断业务线是否必填
-      "basicData.value.oneClass": {
-        handler(nVal, oVal) {
+      // "basicData.value.oneClass": {
+      //   handler(nVal, oVal) {
 
-          this.basicData.form = this.basicData.form.map(formItem => {
+      //     this.basicData.form = this.basicData.form.map(formItem => {
 
-            if (formItem.prop === "businessLine" && nVal) {
+      //       if (formItem.prop === "businessLine" && nVal) {
 
-              if ( nVal.includes('介入耗材&5') || nVal.includes('骨科耗材&2') ||
-                  nVal.includes('普通耗材&3') || nVal.includes('医用设备&1') ||
-                  nVal.includes('体外诊断&4')) {
+      //         if ( nVal.includes('介入耗材&5') || nVal.includes('骨科耗材&2') ||
+      //             nVal.includes('普通耗材&3') || nVal.includes('医用设备&1') ||
+      //             nVal.includes('体外诊断&4')) {
 
-                    formItem.required  = true
-              } else {
-                formItem.required  = false
-              }
+      //               formItem.required  = true
+      //         } else {
+      //           formItem.required  = false
+      //         }
 
-            }
-            return formItem;
-          })
-        },
-        deep: true,
-      },
+      //       }
+      //       return formItem;
+      //     })
+      //   },
+      //   deep: true,
+      // },
       // 物料分类改变同时改变一二三级分类
       "basicData.value.classifyId": {
 

+ 14 - 13
src/views/material/changeApply/add/column.js

@@ -129,20 +129,8 @@ export default function useColumns(){
             require: true,
           },
           attr:{
-            is: "el-input",
-            disabled:true,
-          },
-         
-        },
-        {
-          item:{
-            key:'materialName',
-            title:'物料名称',
-            require: true,
-          },
-          attr:{
             is: "el-popover-select-v2",
-            valueKey: "name",
+            valueKey: "code",
             referName: "MATERIAL_PARAM",
             dataMapping: {
               materialId: "id",
@@ -172,6 +160,19 @@ export default function useColumns(){
               medicalDevices:'medicalInstruments',
             },
 
+            
+          },
+         
+        },
+        {
+          item:{
+            key:'materialName',
+            title:'物料名称',
+            require: true,
+          },
+          attr:{
+            is: "el-input",
+            // disabled:true,
           },
          
         },

+ 1 - 0
src/views/material/requisition/add.vue

@@ -16,6 +16,7 @@
         <el-button type="primary" :size="size" plain @click="back">返回</el-button>
       </el-col>
     </el-row>
+    
     <el-tabs type="border-card" v-model="tabValue" @tab-click="handleClick">
       <el-tab-pane label="基本信息" name="first">
         <div style="width: 100%;height: 580px;overflow-y: auto; overflow-x: hidden;">