|
@@ -41,6 +41,16 @@
|
|
|
<el-form-item :label="$t(`下次跟进计划`)" prop="nextplan" :rules="{ required: false, message: $t('请填写下次跟进计划'), trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
|
|
|
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.nextplan" :placeholder="$t(`请输入下次跟进计划`)" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item :label="$t(`变更项目阶段`)" prop="squarestage" :rules="{ required: true, message: $t('请选择项目阶段'), trigger: 'change'}" v-if="$route.path === '/projectChangeDetail'">
|
|
|
+ <el-select v-model="form.squarestage" :placeholder="$t(`请选择项目阶段`)" @focus="squarestageFocus" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in squarestageList"
|
|
|
+ :key="item.stagename"
|
|
|
+ :label="$t(item.stagename)"
|
|
|
+ :value="item.stagename">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<upload
|
|
|
ref="upload"
|
|
@@ -71,7 +81,7 @@ import upload from '@/components/upload/preview_upload.vue'
|
|
|
import previewImage from '@/components/previewImage/index.vue'
|
|
|
import contactsList from '@/template/projectChange/contactsList.vue'
|
|
|
export default {
|
|
|
- props:['ownertable','status','disabled','bindDataFile'],
|
|
|
+ props:['ownertable','status','disabled','bindDataFile','editData'],
|
|
|
components:{
|
|
|
upload,
|
|
|
previewImage,
|
|
@@ -90,6 +100,8 @@ export default {
|
|
|
target:'',//目的
|
|
|
results:'',//结果
|
|
|
nextplan:'',//下次跟进计划
|
|
|
+ squarestage:'',
|
|
|
+ sa_project_stageid:''
|
|
|
},
|
|
|
selectTag:[],
|
|
|
bindData:{},
|
|
@@ -108,7 +120,8 @@ export default {
|
|
|
condition:''
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ squarestageList:[]
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -121,6 +134,7 @@ export default {
|
|
|
console.log(this.$route,'route')
|
|
|
this.path = this.$route.path
|
|
|
console.log(this.path)
|
|
|
+ this.form.squarestage = this.editData.stagename
|
|
|
this.queryFollowUpType()
|
|
|
},
|
|
|
/*获取跟进类型*/
|
|
@@ -129,12 +143,22 @@ export default {
|
|
|
this.followUpType = res.data
|
|
|
},
|
|
|
submitLog () {
|
|
|
+ console.log(this.form.squarestage,'阶段')
|
|
|
+ if (this.squarestageList.length == 0){
|
|
|
+ this.stageData()
|
|
|
+ }else {
|
|
|
+ this.squarestageList.forEach(item=>{
|
|
|
+ if (item.stagename === this.form.squarestage){
|
|
|
+ this.form.sa_project_stageid = item.sa_project_stageid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
this.$refs.form.validate(async (valid)=>{
|
|
|
if (!valid) return false
|
|
|
let resource = this.$route.matched[1].meta.title
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20220930121601,
|
|
|
- "content": {
|
|
|
+ let content = {}
|
|
|
+ if (this.$route.path === '/projectChangeDetail'){
|
|
|
+ content = {
|
|
|
"sys_datafollowupid":0,
|
|
|
"ownertable":this.ownertable,
|
|
|
"ownerid":this.$route.query.id,
|
|
@@ -146,8 +170,29 @@ export default {
|
|
|
"dataextend": {
|
|
|
"contactsid": this.form.dataextend.contactsid // 跟进对象
|
|
|
},
|
|
|
- "resource":resource
|
|
|
+ "resource":resource,
|
|
|
+ "squarestage":this.form.squarestage,
|
|
|
+ "sa_project_stageid":this.form.sa_project_stageid
|
|
|
}
|
|
|
+ }else {
|
|
|
+ content = {
|
|
|
+ "sys_datafollowupid":0,
|
|
|
+ "ownertable":this.ownertable,
|
|
|
+ "ownerid":this.$route.query.id,
|
|
|
+ "type":this.form.type,
|
|
|
+ "content":this.form.content,
|
|
|
+ "target":this.form.target,//目的
|
|
|
+ "results":this.form.results,//结果
|
|
|
+ "nextplan":this.form.nextplan,//下次跟进计划
|
|
|
+ "dataextend": {
|
|
|
+ "contactsid": this.form.dataextend.contactsid // 跟进对象
|
|
|
+ },
|
|
|
+ "resource":resource,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20220930121601,
|
|
|
+ "content": content
|
|
|
})
|
|
|
this.tool.showMessage(res,()=>{
|
|
|
this.bindData = {
|
|
@@ -160,6 +205,7 @@ export default {
|
|
|
|
|
|
this.$refs['upload'].toUpload()
|
|
|
this.$emit('onSuccess')
|
|
|
+ this.squarestageList = []
|
|
|
this.selectTag = []
|
|
|
this.form.dataextend.contactsid = []
|
|
|
})
|
|
@@ -188,8 +234,29 @@ export default {
|
|
|
this.dialogFormVisible = false
|
|
|
this.selectTag = []
|
|
|
this.form.dataextend.contactsid = []
|
|
|
+ this.squarestageList = []
|
|
|
this.$refs.form.resetFields()
|
|
|
- }
|
|
|
+ },
|
|
|
+ async squarestageFocus(){
|
|
|
+ if (this.squarestageList.length == 0){
|
|
|
+ this.stageData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /*获取阶段*/
|
|
|
+ async stageData(){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221024102402,
|
|
|
+ "content": {
|
|
|
+ "sa_projectid":this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.squarestageList = res.data
|
|
|
+ this.squarestageList.forEach(item=>{
|
|
|
+ if (item.stagename === this.form.squarestage){
|
|
|
+ this.form.sa_project_stageid = item.sa_project_stageid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
|