材料站领料bug修复
This commit is contained in:
parent
c494514932
commit
d635eaa592
|
|
@ -2,16 +2,16 @@
|
|||
<!-- 新增工机具 -->
|
||||
<div>
|
||||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<el-form-item label="租赁工程" prop="proId">
|
||||
<el-select
|
||||
v-if="!isEdit || !maForm.teamId"
|
||||
v-model="maForm.projectId"
|
||||
v-model="maForm.proId"
|
||||
placeholder="请选择租赁工程"
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change="changePro"
|
||||
>
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.projectId" />
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
||||
</el-select>
|
||||
<el-input v-else v-model="maForm.projectName" disabled maxlength="50" style="width: 240px" />
|
||||
</el-form-item>
|
||||
|
|
@ -296,7 +296,7 @@ export default {
|
|||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
projectId: [
|
||||
proId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择租赁工程',
|
||||
|
|
@ -362,7 +362,7 @@ export default {
|
|||
watch: {
|
||||
maForm: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal.teamId && newVal.projectId) {
|
||||
if (newVal.teamId && newVal.proId) {
|
||||
this.getAgreementId()
|
||||
} else {
|
||||
this.equipmentTypeList = []
|
||||
|
|
@ -386,7 +386,7 @@ export default {
|
|||
},
|
||||
// 获取协议id
|
||||
getAgreementId() {
|
||||
if (!this.maForm.teamId || !this.maForm.projectId) return
|
||||
if (!this.maForm.teamId || !this.maForm.proId) return
|
||||
getAgreement({
|
||||
teamId: this.maForm.teamId,
|
||||
// projectId: this.maForm.projectId,
|
||||
|
|
@ -453,7 +453,8 @@ export default {
|
|||
},
|
||||
changePro(e) {
|
||||
console.log('🚀 ~ changePro ~ e:', e)
|
||||
this.maForm.proId = this.projectList.find(item => item.projectId === e)?.proId
|
||||
this.maForm.proId = e
|
||||
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
|
||||
this.getBmTeam()
|
||||
},
|
||||
changeTeam(e) {
|
||||
|
|
@ -584,6 +585,7 @@ export default {
|
|||
await getApplyInfo(this.id).then(response => {
|
||||
Object.assign(this.maForm, response.data.leaseApplyInfo)
|
||||
this.maForm.projectId = response.data.leaseApplyInfo.proId
|
||||
this.maForm.proId = response.data.leaseApplyInfo.proId
|
||||
this.equipmentList = response.data.leaseApplyDetailsList || []
|
||||
// 如果 bmFileInfos有值
|
||||
if (this.maForm.bmFileInfos.length > 0) {
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@
|
|||
<!-- 新增工机具 -->
|
||||
<div>
|
||||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<el-form-item label="租赁工程" prop="proId">
|
||||
<el-select
|
||||
v-if="!isEdit"
|
||||
v-model="maForm.projectId"
|
||||
v-model="maForm.proId"
|
||||
:disabled="isEdit"
|
||||
placeholder="请选择租赁工程"
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change="changePro"
|
||||
>
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.projectId" />
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
||||
</el-select>
|
||||
<el-input v-else v-model="maForm.projectName" disabled maxlength="50" style="width: 240px" />
|
||||
</el-form-item>
|
||||
|
|
@ -306,7 +306,7 @@ export default {
|
|||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
projectId: [
|
||||
proId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择租赁工程',
|
||||
|
|
@ -381,7 +381,7 @@ export default {
|
|||
watch: {
|
||||
maForm: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal.teamId && newVal.projectId) {
|
||||
if (newVal.teamId && newVal.proId) {
|
||||
this.getAgreementId()
|
||||
} else {
|
||||
this.equipmentTypeList = []
|
||||
|
|
@ -450,7 +450,8 @@ export default {
|
|||
},
|
||||
changePro(e) {
|
||||
console.log('🚀 ~ changePro ~ e:', e)
|
||||
this.maForm.proId = this.projectList.find(item => item.projectId === e)?.proId
|
||||
this.maForm.proId = e
|
||||
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
|
||||
this.getBmTeam()
|
||||
},
|
||||
changeTeam(e) {
|
||||
|
|
@ -596,6 +597,7 @@ export default {
|
|||
}
|
||||
Object.assign(this.maForm, response.data.leaseApplyInfo)
|
||||
this.maForm.projectId = response.data.leaseApplyInfo.proId
|
||||
this.maForm.proId = response.data.leaseApplyInfo.proId
|
||||
this.equipmentList = response.data.leaseApplyDetailsList || []
|
||||
if (this.equipmentList.length > 0) {
|
||||
this.equipmentList.forEach(item => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue