fix: 成本下拉框允许手动修改

This commit is contained in:
沈昭朝 2024-07-25 19:14:17 +08:00
parent 79f27be41d
commit ef6e2e395f
1 changed files with 45 additions and 5 deletions

View File

@ -478,7 +478,14 @@
:trigger-on-focus="false"
@select="handleSelect"
/> -->
<el-select v-model="addStatusForm.costCenter" placeholder="请选择成本号">
<el-select
v-model="addStatusForm.costCenter"
placeholder="请选择成本号"
clearable
filterable
allow-create
@blur="InsertCostCenterSelect"
>
<el-option
v-for="(item, index) in costList"
:key="index"
@ -620,7 +627,14 @@
:trigger-on-focus="false"
@select="handleSelect"
/> -->
<el-select v-model="editStatusForm.workRecordsList[0].costCenter" placeholder="请选择成本号">
<el-select
v-model="editStatusForm.workRecordsList[0].costCenter"
placeholder="请选择成本号"
clearable
filterable
allow-create
@blur="EditCostCenterSelect"
>
<el-option
v-for="(item, index) in costList"
:key="index"
@ -731,7 +745,14 @@
:trigger-on-focus="false"
@select="handleSelect"
/> -->
<el-select v-model="editStatusForm.costCenterOfNewOrder" placeholder="请选择成本号">
<el-select
v-model="editStatusForm.costCenterOfNewOrder"
placeholder="请选择成本号"
clearable
filterable
allow-create
@blur="EditNewCostCenterSelect"
>
<el-option
v-for="(item, index) in costList"
:key="index"
@ -1251,7 +1272,6 @@ export default {
this.handleMonthLastDay()
this.dayScreen()
const { page, limit, departmentId } = this
console.log(this.departmentId + '++++++')
var queryInfo = {
page: this.page,
limit: this.limit,
@ -1260,6 +1280,7 @@ export default {
reign: this.region.trim(),
city: this.city.trim()
}
console.log(this.departmentId)
const resultOfSelectEngisByDept =
await this.$API.user.reqGetUserPageWithSkills(queryInfo)// select.reqSelectEngisByDept(page, limit, departmentId)
if (resultOfSelectEngisByDept.code === 0) {
@ -1282,7 +1303,7 @@ export default {
page,
limit
)
console.log(this.engiArray, resOfSelectEngiStatusByMap)
if (resOfSelectEngiStatusByMap.code === 0) {
var EngiStatusMap = resOfSelectEngiStatusByMap.data
for (const i in EngiStatusMap) {
@ -2138,6 +2159,25 @@ export default {
}
return dropdownData
},
InsertCostCenterSelect(e) {
const value = e.target.value //
if (value) { //
this.addStatusForm.costCenter = value
}
},
// cost center
EditCostCenterSelect(e) {
const value = e.target.value //
if (value) { //
this.editStatusForm.workRecordsList[0].costCenter = value
}
},
EditNewCostCenterSelect(e) {
const value = e.target.value //
if (value) { //
this.editStatusForm.costCenterOfNewOrder = value
}
}
},
watch: {