|
|
|
@ -28,18 +28,6 @@ |
|
|
|
<dict-data-select dict-type="project_info_source" v-if="visible" v-model="dataForm.projectSource"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item prop="customerName"> |
|
|
|
<span slot="label" style="" @click="getBaseList(102,1)"><a herf="#">直接客户</a></span> |
|
|
|
<el-input v-model="dataForm.customerName" readonly ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item prop="customerName"> |
|
|
|
<span slot="label" style="" @click="getBaseList(102,2)"><a herf="#">终端客户</a></span> |
|
|
|
<el-input v-model="dataForm.finalCustomerName" readonly ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item prop="priority" label="优先级"> |
|
|
|
<dict-data-select dict-type="project_info_priority" v-if="visible" v-model="dataForm.priority"></dict-data-select> |
|
|
|
@ -68,6 +56,28 @@ |
|
|
|
<el-input v-model="dataForm.projectOwnerName" readonly ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item prop="customerId"> |
|
|
|
<span slot="label" style="" @click="getBaseList(102,1)"><a herf="#">直接客户</a></span> |
|
|
|
<el-input v-model="dataForm.customerId" @blur="getCustomerName(1)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item prop="customerName" label="直接客户名称:"> |
|
|
|
<el-input v-model="dataForm.customerName" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item > |
|
|
|
<span slot="label" style="" @click="getBaseList(102,2)"><a herf="#">终端客户</a></span> |
|
|
|
<el-input v-model="dataForm.finalCustomerId" @blur="getCustomerName(2)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="终端客户名称:"> |
|
|
|
<el-input v-model="dataForm.finalCustomerName" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-form-item label="项目描述" style="height: 70px"> |
|
|
|
<el-input type="textarea" resize="none" :autosize="{minRows: 2, maxRows: 2}" v-model="dataForm.projectDesc" ></el-input> |
|
|
|
@ -238,6 +248,10 @@ |
|
|
|
} from "@/api/project/project.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import DictDataSelect from "../../sys/dict-data-select.vue"; |
|
|
|
import {queryCustomer |
|
|
|
} from "@/api/customer/customerInformation"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
model:{ |
|
|
|
prop:'value', |
|
|
|
@ -319,6 +333,13 @@ |
|
|
|
trigger: ['change','blur'] |
|
|
|
} |
|
|
|
], |
|
|
|
customerId: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['change','blur'] |
|
|
|
} |
|
|
|
], |
|
|
|
needDate: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
@ -792,6 +813,46 @@ |
|
|
|
this.changeAll(row) |
|
|
|
} |
|
|
|
}, |
|
|
|
getCustomerName(type){ |
|
|
|
if(type===1){ |
|
|
|
let params = { |
|
|
|
site:this.$store.state.user.site, |
|
|
|
customerNo:this.dataForm.customerId |
|
|
|
} |
|
|
|
queryCustomer(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0 ) { |
|
|
|
if (data.rows && data.rows.length === 1){ |
|
|
|
this.dataForm.customerName = data.rows[0].customerDesc |
|
|
|
}else { |
|
|
|
this.dataForm.customerName = '' |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
if(type===2){ |
|
|
|
let params = { |
|
|
|
site:this.$store.state.user.site, |
|
|
|
customerNo:this.dataForm.finalCustomerId |
|
|
|
} |
|
|
|
queryCustomer(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0 ) { |
|
|
|
if (data.rows && data.rows.length === 1){ |
|
|
|
this.dataForm.finalCustomerName = data.rows[0].customerDesc |
|
|
|
}else { |
|
|
|
this.dataForm.finalCustomerName = '' |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|