材料站领料申请bug修复

This commit is contained in:
hongchao 2025-07-14 17:27:25 +08:00
parent 8f1fe5c258
commit d1bee85557
1 changed files with 9 additions and 7 deletions

View File

@ -18,10 +18,10 @@
<div class="content">
<uni-section title="任务信息" type="line"></uni-section>
<uni-forms ref="form" :rules="rules" :model="formData" label-width="90px">
<uni-forms-item label="领用工程" required name="projectId">
<uni-forms-item label="领用工程" required name="proId">
<uni-data-select
v-if="!opts.isEdit"
v-model="formData.projectId"
v-model="formData.proId"
:localdata="prodRange"
:clear="false"
filterable
@ -80,7 +80,7 @@
style="width: 100%; height: 90rpx; margin: 10px 0"
ref="treeSelect"
:options="equipmentList"
:disabled="!formData.teamId || !formData.projectId"
:disabled="!formData.teamId || !formData.proId"
@change="changeEquipment"
></eselect>
</uni-forms>
@ -214,7 +214,7 @@ const rules = ref({
teamId: {
rules: [{ required: true, errorMessage: '请选择班组' }],
},
projectId: {
proId: {
rules: [{ required: true, errorMessage: '请选择工程' }],
},
leasePerson: {
@ -255,6 +255,7 @@ const getDetailsById = async () => {
tableData.value = res.data.leaseApplyDetailsList
Object.assign(formData, res.data.leaseApplyInfo)
formData.projectId = res.data.leaseApplyInfo.proId
formData.proId = res.data.leaseApplyInfo.proId
getAgreementInfoById()
} catch (error) {
console.log('🚀 ~ getDetailsById ~ error:', error)
@ -316,7 +317,7 @@ const getProjectListApi = async () => {
prodRange.value = res.data.map((item) => {
return {
...item,
value: item.projectId,
value: item.proId,
text: item.proName,
}
})
@ -434,8 +435,9 @@ const changeTeamd = (e) => {
//
const changeProd = (e) => {
console.log('🚀 ~ changeProd ~ e:', e)
formData.projectId = e
formData.proId = prodRange.value.find(item => item.projectId === e)?.proId
formData.proId = e
formData.projectId = prodRange.value.find(item => item.proId === e)?.projectId
console.log("xxxxxxxxxxxxxxxxxxxxxx",formData.projectId)
equipmentList.value = []
// getAgreementInfoById()
getTeamList()