diff --git a/src/api/company/property/propertydealitem.js b/src/api/company/property/propertydealitem.js index 28533ca..849a23b 100644 --- a/src/api/company/property/propertydealitem.js +++ b/src/api/company/property/propertydealitem.js @@ -18,6 +18,15 @@ export function updatePropertyDealItem(data) { }) } +// 更新企业管理-资产变动子 +export function updatePropertyDealItemChange(data) { + return request({ + url: '/company/property-deal-item/updateChange', + method: 'put', + data: data + }) +} + // 删除企业管理-资产处置子 export function deletePropertyDealItem(id) { return request({ diff --git a/src/views/company/property/propertyDealChange/form/PropertyDealChangeForm.vue b/src/views/company/property/propertyDealChange/form/PropertyDealChangeForm.vue index c745eb5..62b75f1 100644 --- a/src/views/company/property/propertyDealChange/form/PropertyDealChangeForm.vue +++ b/src/views/company/property/propertyDealChange/form/PropertyDealChangeForm.vue @@ -277,6 +277,7 @@ export default { const property = res.data.property property.dealWay = res.data.dealWay await this.getOtherList(property.corpId) + property.userId = parseInt(property.userId) this.formData.propList.push(property) } finally { this.formLoading = false @@ -310,18 +311,20 @@ export default { const data = this.formData // 修改的提交 if (data.id) { - // TODO 修改方法待适配 - // const newData = { - // id: data.id, - // dealWay: data.propList[0].dealWay, - // dealId: data.dealId, - // propertyId: data.propList[0].id, - // remark: data.propList[0].remark - // } - // await PropertyDealItemApi.updatePropertyDealItem(newData) - // this.$modal.msgSuccess('修改成功') - // this.dialogVisible = false - // this.$emit('success') + const newData = { + id: data.id, + dealWay: data.propList[0].dealWay, + dealId: data.dealId, + propertyId: data.propList[0].id, + remark: data.propList[0].remark, + corpId: data.propList[0].corpId, + userId: data.propList[0].userId, + posId: data.propList[0].posId, + } + await PropertyDealItemApi.updatePropertyDealItemChange(newData) + this.$modal.msgSuccess('修改成功') + this.dialogVisible = false + this.$emit('success') return } // 添加的提交 diff --git a/src/views/company/property/propertyDealChange/index.vue b/src/views/company/property/propertyDealChange/index.vue index 8a7c929..14e674e 100644 --- a/src/views/company/property/propertyDealChange/index.vue +++ b/src/views/company/property/propertyDealChange/index.vue @@ -78,6 +78,11 @@ {{ StaffName(row.userId) }} + + +