bug修复

This commit is contained in:
hongchao 2025-04-02 12:09:33 +08:00
parent 4ae8592936
commit bdafab2675
1 changed files with 71 additions and 48 deletions

View File

@ -17,7 +17,7 @@
placeholder="请选择领用类型"
clearable
style="width: 240px"
:disabled="isEdit"
@change="leaseTypeChange"
>
<el-option
@ -25,7 +25,7 @@
:key="item.id"
:label="item.name"
:value="item.id"
:disabled="isEdit"
></el-option>
</el-select>
</el-form-item>
@ -37,7 +37,7 @@
@change="GetProData"
style="width: 240px"
placeholder="请选择"
:disabled="isEdit"
>
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -50,7 +50,7 @@
@change="GetUnitData"
style="width: 240px"
placeholder="请选择"
:disabled="isEdit"
>
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -111,7 +111,7 @@
@remove-tag="onRemoveTag"
v-model="queryParams.wholeTypeName"
multiple
:disabled="isEdit"
>
<el-option v-for="item in holdingPoleSelList" :key="item.id" :label="item.wholeTypeName" :value="item.id" />
</el-select>
@ -155,9 +155,10 @@
clearable
style="width: 240px"
placeholder="请选择费用承担方"
:disabled="isEdit"
@change="costBearingPartyChange"
@blur="handleSelectBlur"
>
<el-option v-for="item in costBearingList" :key="item" :label="item" :value="item"></el-option>
<el-option v-for="(item, index) in costBearingList" :key="index" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="roleName">
@ -176,7 +177,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button plain size="mini" v-if="isView" type="primary" icon="el-icon-plus" @click="handleAdd">
保存
提交
</el-button>
</el-col>
@ -456,6 +457,7 @@ export default {
//
leaseApplyDetails: [],
wholeTypeName: '',
costBearingParty: '', //
},
typeList: [
{ id: '0', name: '工程租赁' },
@ -758,23 +760,19 @@ export default {
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
return this.handelEchoData(item)
})
// this.leaseApplyDetails.forEach((e) => {
// selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
// })
this.$nextTick(() => {
let selectList = []
for (let i = 0; i < this.leaseApplyDetails.length; i++) {
selectList.push(this.getParentsById(this.deviceTypeTree, this.leaseApplyDetails[i].typeId))
}
// this.leaseApplyDetails.forEach((e) => {
// selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
// })
this.$nextTick(() => {
this.deviceType = selectList
this.propsKey++
// 1
setTimeout(() => {
// 1
}, 1000);
this.$set(this.queryParams, 'leaseType', data.leaseType);
})
if (data.ctLeaseApplyDetails) {
this.getCtFileList(data.ctLeaseApplyDetails)
}
@ -782,6 +780,7 @@ export default {
},
//
async GetTaskDetail2(taskId) {
await this.GetDeviceTypeTree()
const res = await getLeaseApplyAuditListAll({ taskId })
const data = res.rows[0]
@ -811,14 +810,15 @@ export default {
return this.handelEchoData(item)
})
this.$nextTick(() => {
let selectList = []
this.leaseApplyDetails.forEach((e) => {
selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
})
this.deviceType = selectList
this.propsKey++
await this.$nextTick();
this.$set(this.queryParams, 'leaseType', data.leaseType);
})
if (data.ctLeaseApplyDetails) {
this.
this.getCtFileList(data.ctLeaseApplyDetails)
@ -826,7 +826,7 @@ export default {
},
//
getCtFileList(ctData) {
async getCtFileList(ctData) {
const ctList = []
for (const key in ctData) {
ctList.push({
@ -838,25 +838,20 @@ export default {
}
ctList.forEach((e) => {
// queryCompleteSetToolsApi(e).then((res) => {
// e.childrenList = res.data.map((j) => {
// return {
// ...j,
// initNum: j.deviceNum,
// preNum: j.preNum,
// }
// })
// e.childrenList.forEach((i) => {
// i.deviceNum = i.initNum * e.wholeTypeNum
// })
// this.wholeTypeNameList.push(e)
// })
e.childrenList = ctData[e.wholeTypeName].map((j) => {
console.log("pppppppp",j)
let temp = []
queryCompleteSetToolsApi(e).then((res) => {
temp = res.data.map((k) => {
return {
...k,
initNum: k.deviceNum,
}
})
e.childrenList = ctData[e.wholeTypeName].map((j,index) => {
return {
...j,
initNum: j.deviceNum,
deviceType : temp[index].deviceType,
deviceAscription : temp[index].deviceAscription,
initNum: temp[index].deviceNum,
preNum: j.preNum,
}
})
@ -865,7 +860,26 @@ export default {
i.preNum = Number(i.preNum )
})
this.wholeTypeNameList.push(e)
console.log("hhhhhhhhhhhh",this.wholeTypeNameList)
})
// e.childrenList.forEach((i) => {
// i.deviceNum = i.initNum * e.wholeTypeNum
// })
// this.wholeTypeNameList.push(e)
// })
// e.childrenList = ctData[e.wholeTypeName].map((j) => {
// console.log("pppppppp",j)
// return {
// ...j,
// initNum: j.preNum,
// preNum: j.preNum,
// }
// })
// e.childrenList.forEach((i) => {
// i.deviceNum = i.initNum * e.wholeTypeNum
// i.preNum = Number(i.preNum )
// })
// this.wholeTypeNameList.push(e)
// console.log("hhhhhhhhhhhh",this.wholeTypeNameList)
})
},
//
@ -980,7 +994,6 @@ export default {
const wholeTypeList = []
this.wholeTypeNameList.forEach((i) => {
i.childrenList.forEach((e) => {
console.log("uiiiiiiiiiiiiiiiii",e)
const items = {
companyId: '101',
guigeCn: e.deviceType,
@ -1204,6 +1217,14 @@ export default {
const { data: res } = await getCostBearingApi()
this.costBearingList = res
},
costBearingPartyChange(val) {
console.log("qqqqqqqqq",val)
this.queryParams.costBearingParty = val
},
handleSelectBlur() {
//
this.$forceUpdate();
},
//
leaseTypeChange(val) {
@ -1252,6 +1273,7 @@ export default {
}
})
this.wholeTypeNameList.push(wholeTypeNameData)
console.log('🚀 ~ this.wholeTypeNameList:', this.wholeTypeNameList)
})
}
})
@ -1269,10 +1291,11 @@ export default {
/* 更改数量 */
onChangeInput(val, v) {
console.log("gggggggg",val,v),
console.log("sssssssssss",this.wholeTypeNameList),
this.wholeTypeNameList[v].childrenList.forEach((e) => (
console.log("uuuuuuuuuu",e),
e.deviceNum = e.deviceNum * val,e.preNum = e.preNum * val))
e.deviceNum = e.initNum * val,e.preNum = e.initNum * val))
},
//
async getMaTypeDataByIdFun(val) {