fix bug
This commit is contained in:
@ -358,26 +358,36 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '车型/车长',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:model' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车型',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车型' }
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carLength: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:length' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车长',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车长' }
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
||||
};
|
||||
|
||||
@ -377,29 +377,37 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
carModel: {
|
||||
type: 'string',
|
||||
title: '车型/车长',
|
||||
default: [],
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:model' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车型',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车型' }
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carLength: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
default: [],
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:length' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车长',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车长' }
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
||||
};
|
||||
|
||||
@ -331,26 +331,36 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '车型/车长',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:model' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车型',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车型' }
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carLength: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:length' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车长',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车长' }
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
|
||||
@ -347,26 +347,36 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '车型/车长',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:model' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车型',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车型' }
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carLength: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:length' },
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择车长',
|
||||
maxMultipleCount:3,
|
||||
errors: { required: '请选择车长' }
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
|
||||
@ -4,11 +4,12 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-17 16:44:23
|
||||
* @LastEditTime : 2022-02-17 16:58:46
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { BaseService } from 'src/app/shared/services';
|
||||
|
||||
@Injectable({
|
||||
@ -108,7 +109,25 @@ export class SupplyManagementService extends BaseService {
|
||||
$api_consignBulkQRCode = '/api/sdc/goodsResourceOperate/consignBulkQRCode';
|
||||
// 获取操作日志列表
|
||||
public $api_getOperationLogRecordsList = '/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList';
|
||||
// 获取数据字典
|
||||
$api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
|
||||
|
||||
/**
|
||||
* 获取车型、车长字典数据
|
||||
* @returns
|
||||
*/
|
||||
getDictOptions(params = {}) {
|
||||
return this.request(this.$api_getDictValue, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const obj = [];
|
||||
obj.push({ label: '不限', value: "999" })
|
||||
return [...obj,...res];
|
||||
})
|
||||
)
|
||||
}
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user