bug修复
This commit is contained in:
parent
4ae8592936
commit
bdafab2675
|
|
@ -17,7 +17,7 @@
|
||||||
placeholder="请选择领用类型"
|
placeholder="请选择领用类型"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
:disabled="isEdit"
|
|
||||||
@change="leaseTypeChange"
|
@change="leaseTypeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:disabled="isEdit"
|
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
@change="GetProData"
|
@change="GetProData"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:disabled="isEdit"
|
|
||||||
>
|
>
|
||||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
@change="GetUnitData"
|
@change="GetUnitData"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:disabled="isEdit"
|
|
||||||
>
|
>
|
||||||
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
@remove-tag="onRemoveTag"
|
@remove-tag="onRemoveTag"
|
||||||
v-model="queryParams.wholeTypeName"
|
v-model="queryParams.wholeTypeName"
|
||||||
multiple
|
multiple
|
||||||
:disabled="isEdit"
|
|
||||||
>
|
>
|
||||||
<el-option v-for="item in holdingPoleSelList" :key="item.id" :label="item.wholeTypeName" :value="item.id" />
|
<el-option v-for="item in holdingPoleSelList" :key="item.id" :label="item.wholeTypeName" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -155,9 +155,10 @@
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择费用承担方"
|
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="roleName">
|
<el-form-item label="备注" prop="roleName">
|
||||||
|
|
@ -176,7 +177,7 @@
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button plain size="mini" v-if="isView" type="primary" icon="el-icon-plus" @click="handleAdd">
|
<el-button plain size="mini" v-if="isView" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||||
保存
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
@ -456,6 +457,7 @@ export default {
|
||||||
//领料详情集合
|
//领料详情集合
|
||||||
leaseApplyDetails: [],
|
leaseApplyDetails: [],
|
||||||
wholeTypeName: '',
|
wholeTypeName: '',
|
||||||
|
costBearingParty: '', //费用承担方
|
||||||
},
|
},
|
||||||
typeList: [
|
typeList: [
|
||||||
{ id: '0', name: '工程租赁' },
|
{ id: '0', name: '工程租赁' },
|
||||||
|
|
@ -758,23 +760,19 @@ export default {
|
||||||
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
|
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
|
||||||
return this.handelEchoData(item)
|
return this.handelEchoData(item)
|
||||||
})
|
})
|
||||||
|
// this.leaseApplyDetails.forEach((e) => {
|
||||||
|
// selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
let selectList = []
|
let selectList = []
|
||||||
for (let i = 0; i < this.leaseApplyDetails.length; i++) {
|
for (let i = 0; i < this.leaseApplyDetails.length; i++) {
|
||||||
selectList.push(this.getParentsById(this.deviceTypeTree, this.leaseApplyDetails[i].typeId))
|
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.deviceType = selectList
|
||||||
this.propsKey++
|
this.propsKey++
|
||||||
// 等待 1 秒
|
this.$set(this.queryParams, 'leaseType', data.leaseType);
|
||||||
setTimeout(() => {
|
|
||||||
// 这里可以添加等待 1 秒后要执行的代码
|
|
||||||
}, 1000);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
if (data.ctLeaseApplyDetails) {
|
if (data.ctLeaseApplyDetails) {
|
||||||
this.getCtFileList(data.ctLeaseApplyDetails)
|
this.getCtFileList(data.ctLeaseApplyDetails)
|
||||||
}
|
}
|
||||||
|
|
@ -782,6 +780,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 驳回提交 任务详情数据
|
// 驳回提交 任务详情数据
|
||||||
async GetTaskDetail2(taskId) {
|
async GetTaskDetail2(taskId) {
|
||||||
|
await this.GetDeviceTypeTree()
|
||||||
const res = await getLeaseApplyAuditListAll({ taskId })
|
const res = await getLeaseApplyAuditListAll({ taskId })
|
||||||
|
|
||||||
const data = res.rows[0]
|
const data = res.rows[0]
|
||||||
|
|
@ -811,14 +810,15 @@ export default {
|
||||||
return this.handelEchoData(item)
|
return this.handelEchoData(item)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
let selectList = []
|
let selectList = []
|
||||||
this.leaseApplyDetails.forEach((e) => {
|
this.leaseApplyDetails.forEach((e) => {
|
||||||
selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
|
selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
|
||||||
})
|
})
|
||||||
this.deviceType = selectList
|
this.deviceType = selectList
|
||||||
this.propsKey++
|
this.propsKey++
|
||||||
await this.$nextTick();
|
this.$set(this.queryParams, 'leaseType', data.leaseType);
|
||||||
|
})
|
||||||
if (data.ctLeaseApplyDetails) {
|
if (data.ctLeaseApplyDetails) {
|
||||||
this.
|
this.
|
||||||
this.getCtFileList(data.ctLeaseApplyDetails)
|
this.getCtFileList(data.ctLeaseApplyDetails)
|
||||||
|
|
@ -826,7 +826,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 生成成套附属设备
|
// 生成成套附属设备
|
||||||
getCtFileList(ctData) {
|
async getCtFileList(ctData) {
|
||||||
const ctList = []
|
const ctList = []
|
||||||
for (const key in ctData) {
|
for (const key in ctData) {
|
||||||
ctList.push({
|
ctList.push({
|
||||||
|
|
@ -838,25 +838,20 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
ctList.forEach((e) => {
|
ctList.forEach((e) => {
|
||||||
// queryCompleteSetToolsApi(e).then((res) => {
|
let temp = []
|
||||||
// e.childrenList = res.data.map((j) => {
|
queryCompleteSetToolsApi(e).then((res) => {
|
||||||
// return {
|
temp = res.data.map((k) => {
|
||||||
// ...j,
|
return {
|
||||||
// initNum: j.deviceNum,
|
...k,
|
||||||
// preNum: j.preNum,
|
initNum: k.deviceNum,
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
|
e.childrenList = ctData[e.wholeTypeName].map((j,index) => {
|
||||||
// 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 {
|
return {
|
||||||
...j,
|
...j,
|
||||||
initNum: j.deviceNum,
|
deviceType : temp[index].deviceType,
|
||||||
|
deviceAscription : temp[index].deviceAscription,
|
||||||
|
initNum: temp[index].deviceNum,
|
||||||
preNum: j.preNum,
|
preNum: j.preNum,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -865,7 +860,26 @@ export default {
|
||||||
i.preNum = Number(i.preNum )
|
i.preNum = Number(i.preNum )
|
||||||
})
|
})
|
||||||
this.wholeTypeNameList.push(e)
|
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 = []
|
const wholeTypeList = []
|
||||||
this.wholeTypeNameList.forEach((i) => {
|
this.wholeTypeNameList.forEach((i) => {
|
||||||
i.childrenList.forEach((e) => {
|
i.childrenList.forEach((e) => {
|
||||||
console.log("uiiiiiiiiiiiiiiiii",e)
|
|
||||||
const items = {
|
const items = {
|
||||||
companyId: '101',
|
companyId: '101',
|
||||||
guigeCn: e.deviceType,
|
guigeCn: e.deviceType,
|
||||||
|
|
@ -1204,6 +1217,14 @@ export default {
|
||||||
const { data: res } = await getCostBearingApi()
|
const { data: res } = await getCostBearingApi()
|
||||||
this.costBearingList = res
|
this.costBearingList = res
|
||||||
},
|
},
|
||||||
|
costBearingPartyChange(val) {
|
||||||
|
console.log("qqqqqqqqq",val)
|
||||||
|
this.queryParams.costBearingParty = val
|
||||||
|
},
|
||||||
|
handleSelectBlur() {
|
||||||
|
// 确保数据更新
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
|
||||||
// 领用类型修改时清空费用承担方
|
// 领用类型修改时清空费用承担方
|
||||||
leaseTypeChange(val) {
|
leaseTypeChange(val) {
|
||||||
|
|
@ -1252,6 +1273,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.wholeTypeNameList.push(wholeTypeNameData)
|
this.wholeTypeNameList.push(wholeTypeNameData)
|
||||||
|
console.log('🚀 ~ this.wholeTypeNameList:', this.wholeTypeNameList)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1269,10 +1291,11 @@ export default {
|
||||||
|
|
||||||
/* 更改数量 */
|
/* 更改数量 */
|
||||||
onChangeInput(val, v) {
|
onChangeInput(val, v) {
|
||||||
|
console.log("gggggggg",val,v),
|
||||||
console.log("sssssssssss",this.wholeTypeNameList),
|
console.log("sssssssssss",this.wholeTypeNameList),
|
||||||
this.wholeTypeNameList[v].childrenList.forEach((e) => (
|
this.wholeTypeNameList[v].childrenList.forEach((e) => (
|
||||||
console.log("uuuuuuuuuu",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) {
|
async getMaTypeDataByIdFun(val) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue