维修管理,维修审核客户提出的问题整改
This commit is contained in:
parent
74f01a0594
commit
37a77e120d
|
|
@ -603,6 +603,8 @@ export default {
|
||||||
taskId: '',
|
taskId: '',
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
totalPrice: 0, // 总金额
|
totalPrice: 0, // 总金额
|
||||||
|
|
||||||
|
currentUserId: '' //当前登录人
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -715,29 +717,33 @@ export default {
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
console.log('this.rowObj', this.rowObj)
|
console.log('this.rowObj', this.rowObj)
|
||||||
|
getInfo()
|
||||||
getUserSelectApi({ roleIds: [133] }).then((response) => {
|
.then((res) => {
|
||||||
this.userSelectList = response.data;
|
this.companyId = res.user.companyId
|
||||||
|
this.currentUserId = res.user.userId
|
||||||
|
// 返回 getUserSelectApi 的 Promise
|
||||||
|
return getUserSelectApi({ roleIds: [133] })
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.userSelectList = response.data
|
||||||
if (this.rowObj.manageType == 0) {
|
if (this.rowObj.manageType == 0) {
|
||||||
this.dynamicValidateForm.premiumList = [];
|
this.dynamicValidateForm.premiumList = []
|
||||||
this.dynamicValidateFormTwo.premiumListTwo = [];
|
this.dynamicValidateFormTwo.premiumListTwo = []
|
||||||
this.addDomainOne();
|
this.addDomainOne()
|
||||||
} else {
|
} else {
|
||||||
this.dynamicValidateForm.premiumList = [];
|
this.dynamicValidateForm.premiumList = []
|
||||||
this.dynamicValidateFormTwo.premiumListTwo = [];
|
this.dynamicValidateFormTwo.premiumListTwo = []
|
||||||
this.addDomainTwo();
|
this.addDomainTwo()
|
||||||
}
|
}
|
||||||
this.dynamicValidateForm.premiumList.forEach((item) => {
|
this.dynamicValidateForm.premiumList.forEach((item) => {
|
||||||
item.repairRemark = this.rowObj.repairRemark;
|
item.repairRemark = this.rowObj.repairRemark
|
||||||
|
})
|
||||||
});
|
|
||||||
this.dynamicValidateFormTwo.premiumListTwo.forEach((item) => {
|
this.dynamicValidateFormTwo.premiumListTwo.forEach((item) => {
|
||||||
item.repairRemark = this.rowObj.repairRemark;
|
item.repairRemark = this.rowObj.repairRemark
|
||||||
|
})
|
||||||
});
|
})
|
||||||
});
|
.catch((error) => {
|
||||||
getInfo().then((res) => {
|
console.error('初始化出错:', error)
|
||||||
this.companyId = res.user.companyId
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
|
@ -754,7 +760,8 @@ export default {
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
return `${year}-${month}-${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
};
|
};
|
||||||
|
// 检查 currentUserId 是否在 userSelectList 的 userId 中
|
||||||
|
const isUserIdInList = this.userSelectList.some(user => user.userId === this.currentUserId);
|
||||||
// 选择配件 partId
|
// 选择配件 partId
|
||||||
// 是否收费 partType
|
// 是否收费 partType
|
||||||
// 配件数量 partNum
|
// 配件数量 partNum
|
||||||
|
|
@ -764,7 +771,7 @@ export default {
|
||||||
const newDomain = {
|
const newDomain = {
|
||||||
selected: 'N',
|
selected: 'N',
|
||||||
// partId: '',
|
// partId: '',
|
||||||
repairer: this.userSelectList.length > 0 ? this.userSelectList[0].userId : '', // 默认选择第一条数据
|
repairer: this.userSelectList.length > 0 && isUserIdInList ? this.currentUserId : '', // 默认选择第一条数据
|
||||||
partType: 0,
|
partType: 0,
|
||||||
partNum: '',
|
partNum: '',
|
||||||
partCost: '',
|
partCost: '',
|
||||||
|
|
@ -797,10 +804,14 @@ export default {
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
return `${year}-${month}-${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 检查 currentUserId 是否在 userSelectList 的 userId 中
|
||||||
|
const isUserIdInList = this.userSelectList.some(user => user.userId === this.currentUserId);
|
||||||
|
|
||||||
const newDomain = {
|
const newDomain = {
|
||||||
selected: 'N',
|
selected: 'N',
|
||||||
// partId: '',
|
// partId: '',
|
||||||
repairer: this.userSelectList.length > 0 ? this.userSelectList[0].userId : '', // 默认选择第一条数据
|
repairer: this.userSelectList.length > 0 && isUserIdInList ? this.currentUserId : '', // 默认选择第一条数据
|
||||||
partType: 0,
|
partType: 0,
|
||||||
partNum: '',
|
partNum: '',
|
||||||
partCost: '',
|
partCost: '',
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,17 @@
|
||||||
style="width: 350px"
|
style="width: 350px"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :prop="'premiumList.' + index + '.repairContent'" label="维修内容:">
|
||||||
|
<el-input
|
||||||
|
v-model="domain.repairContent"
|
||||||
|
maxlength="100"
|
||||||
|
placeholder="请输入"
|
||||||
|
show-word-limit
|
||||||
|
size="small"
|
||||||
|
style="width: 350px"
|
||||||
|
type="textarea"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item :prop="'premiumList.' + index + '.repairContent'" label="维修内容:">
|
<!-- <el-form-item :prop="'premiumList.' + index + '.repairContent'" label="维修内容:">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="domain.repairContent"
|
v-model="domain.repairContent"
|
||||||
|
|
@ -305,7 +316,17 @@
|
||||||
style="width: 350px"
|
style="width: 350px"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :prop="'premiumListTwo.' + index + '.repairContent'" label="维修内容:">
|
||||||
|
<el-input
|
||||||
|
v-model="domain.repairContent"
|
||||||
|
maxlength="100"
|
||||||
|
placeholder="请输入"
|
||||||
|
show-word-limit
|
||||||
|
size="small"
|
||||||
|
style="width: 350px"
|
||||||
|
type="textarea"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item label="维修内容:">
|
<!-- <el-form-item label="维修内容:">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="domain.repairContent"
|
v-model="domain.repairContent"
|
||||||
|
|
@ -462,6 +483,7 @@ export default {
|
||||||
xiayoufeiyonge_unit: '',
|
xiayoufeiyonge_unit: '',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
repairRemark: '', // 技术鉴定
|
repairRemark: '', // 技术鉴定
|
||||||
|
repairContent: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -480,6 +502,7 @@ export default {
|
||||||
xiayoufeiyonge_unit: '',
|
xiayoufeiyonge_unit: '',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
repairRemark: '', // 技术鉴定
|
repairRemark: '', // 技术鉴定
|
||||||
|
repairContent: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -545,6 +545,12 @@
|
||||||
type="index"
|
type="index"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="配件名称"
|
||||||
|
align="center"
|
||||||
|
prop="partName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="配件数量"
|
label="配件数量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,12 @@
|
||||||
type="index"
|
type="index"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="配件名称"
|
||||||
|
align="center"
|
||||||
|
prop="partName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="配件数量"
|
label="配件数量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue