|
@@ -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() {
|