物资类型修改编辑库管维修员

This commit is contained in:
zzyuan 2024-12-26 09:36:31 +08:00
parent 9310e218d0
commit bad7e7d034
1 changed files with 18 additions and 6 deletions

View File

@ -1000,8 +1000,12 @@ export default {
const typeId = row.typeId;
getMaType(typeId).then((response) => {
this.form = response.data;
this.form.repairerArr = response.data.repairerId.split(",")
this.form.keeperArr = response.data.keeperId.split(",")
if(response.data.repairerId){
this.form.repairerArr = response.data.repairerId.split(",")
}
if(response.data.keeperId){
this.form.keeperArr = response.data.keeperId.split(",")
}
this.form.isCharging = this.form.isCharging + "";
// this.form.houseName = row.houseName;
this.form.itemType = row.itemType;
@ -1021,8 +1025,12 @@ export default {
const typeId = row.typeId;
getMaType(typeId).then((response) => {
this.form = response.data;
this.form.repairerArr = response.data.repairerId.split(",")
this.form.keeperArr = response.data.keeperId.split(",")
if(response.data.repairerId){
this.form.repairerArr = response.data.repairerId.split(",")
}
if(response.data.keeperId){
this.form.keeperArr = response.data.keeperId.split(",")
}
this.form.isCharging = this.form.isCharging + "";
// this.form.houseName = row.houseName;
this.form.itemType = row.itemType;
@ -1041,8 +1049,12 @@ export default {
console.log(this.form, "提交参数---");
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.keeperId = this.form.keeperArr.join(",")
this.form.repairerId = this.form.repairerArr.join(",")
if(this.form.keeperArr.length>0){
this.form.keeperId = this.form.keeperArr.join(",")
}
if(this.form.repairerArr.length>0){
this.form.repairerId = this.form.repairerArr.join(",")
}
if (this.form.typeId != undefined) {
updateMaType(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");