This commit is contained in:
wangshiming
2022-05-09 16:26:23 +08:00
parent a00fdbf800
commit 3de10b7b4d
4 changed files with 168 additions and 195 deletions

View File

@ -219,13 +219,23 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
// }
}
},
goodsName: {
type: 'string',
title: '货物名称',
ui: {
// hidden: true,
// visibleIf: {
// goodsTypeName: (value: any) => value && value !== '其它'
// }
}
},
goodsTypeId: {
type: 'string',
title: '货物类型',
title: '',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择货物类型' },
errors: { required: '请选择货物名称' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
@ -247,47 +257,38 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
hidden: true
}
},
goodsNameId: {
type: 'string',
title: '',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请填写货物类型' },
change: (value: any, data: any) => {
this.sf3.setValue('/goodsName', data.label);
},
visibleIf: {
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName: {
type: 'string',
title: '',
ui: {
hidden: true,
visibleIf: {
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName1: {
type: 'string',
title: '',
maxLength: 20,
ui: {
errors: { required: '请填写货物类型' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
// goodsName1: {
// type: 'string',
// title: '',
// maxLength: 20,
// ui: {
// errors: { required: '请填写货物名称' },
// visibleIf: {
// goodsTypeName: (value: any) => value && value === '其它'
// },
// blur: (value: any) => {
// this.checkGoodsName();
// }
// }
// },
// goodsNameId: {
// type: 'string',
// title: '',
// ui: {
// widget: 'select',
// placeholder: '请选择',
// errors: { required: '请填写货物名称' },
// change: (value: any, data: any) => {
// // this.sf3.setValue('/goodsName', data.label);
// },
// visibleIf: {
// goodsTypeName: (value: any) => value && value !== '其它'
// }
// }
// },
},
required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1']
required: ['goodsTypeId', 'goodsName', ]
};
this.ui3 = {
'*': {
@ -708,10 +709,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
const LoadingList = this.startInfo.concat(this.endInfo);
// 货物信息
const sf3Values = { ...this.sf3.value };
if (sf3Values.goodsTypeName === '其它') {
sf3Values.goodsName = sf3Values.goodsName1;
delete sf3Values.goodsName1;
}
if (this.sf4.value.carModel.includes('999')) {
this.sf4.value.carModel = ['999'];
}