diff --git a/proxy.conf.js b/proxy.conf.js index 3d26f6c5..87118004 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:13:58 + * @LastEditTime : 2022-01-19 11:29:14 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts index 4b359af4..4d70087b 100644 --- a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-05 11:01:55 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:16:49 + * @LastEditTime : 2022-01-19 10:39:55 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -90,7 +90,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { default: '', ui: { widget: 'dict-select', - params: { dictKey: 'contract:type' }, + params: { dictKey: 'contract:document:type' }, containAllLable: true, visibleIf: { templateType: value => value === 'MX' @@ -129,6 +129,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => { if (res) { this.detailList = res; + this.title = this.detailList?.templateName this.sfdata = res; this.sfdata2 = res; } @@ -139,6 +140,9 @@ export class ContractManagementTemplateDetailComponent implements OnInit { } save() { + console.log(this.sf.value) + console.log(this.sf2.value) + console.log(this.title) if (!this.sf.value.templateName || !this.sf.value.templateType || !this.sf2.value.templateContent || !this.title) { this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); return; diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index b3119b8d..e1a34797 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -80,7 +80,7 @@ export class ContractManagementTemplateComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'contract:template:type' }, - containAllLable:true, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts index 2d9fae53..86a27a9e 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts @@ -70,7 +70,7 @@ export class CostManagementDetailComponent implements OnInit { ], collection: [ { title: '序号', index: 'no' }, - { title: '费用明细号', index: 'callNo' }, + { title: '费用明细号', index: 'waybillLId' }, { title: '收款单号', index: 'callNo' }, { title: '收款日期', index: 'callNo' }, { title: '收款状态', index: 'callNo' }, diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts index db19a720..27193906 100644 --- a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts +++ b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts @@ -37,28 +37,24 @@ export class SettingFinancialComponent implements OnInit { phone: { title: '纳税人识别号', type: 'string', - format: 'mobile', ui: { widget: 'string', placeholder: '请输入纳税人识别号' }, default: staff.phone }, phone2: { title: '税收分类编码', type: 'string', - format: 'mobile', ui: { widget: 'string', placeholder: '请输入税收分类编码' }, default: staff.phone }, phone3: { title: '发票税率', type: 'string', - format: 'mobile', ui: { widget: 'string', placeholder: '请输入发票税率' }, default: staff.phone }, phone4: { title: '附加费比例', type: 'string', - format: 'mobile', ui: { widget: 'string', placeholder: '请输入附加费比例' }, default: staff.phone } diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index c456c0f8..3aabd849 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -179,6 +179,7 @@ tabs = { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { if (!!q) { return this.service @@ -191,6 +192,20 @@ tabs = { }, } as SFSelectWidgetSchema, }, + enterpriseProjectId: { + type: 'string', + title: '所属项目', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.service.getEnterpriseProject(), + visibleIf: { + _$expand: (value: boolean) => value + } + }, + default: '' + }, loadingPlace: { type: 'string', title: '装货地', @@ -242,7 +257,7 @@ tabs = { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containAllLable:true, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -255,6 +270,7 @@ tabs = { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value } @@ -282,33 +298,13 @@ tabs = { ui: { widget: 'select', placeholder: '请选择', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value, }, - allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder(), }, }, - goodsNameId: { - type: 'string', - title: '货物名称', - ui: { - widget: 'select', - placeholder: '请选择', - errors: { required: '请选择货物类型' }, - visibleIf: { - _$expand: (value: boolean) => value, - }, - asyncData: () => - this.shipperservice.loadConfigByKey('goods.name.config.type').pipe( - map((data: any) => { - return data[0].children?.map((m: any) => { - return { label: m.name, value: m.id }; - }); - }) - ), - } as SFSelectWidgetSchema - }, serviceType: { title: '服务类型', type: 'string', @@ -316,6 +312,19 @@ tabs = { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, + containsAllLable: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, + settlementBasis: { + title: '结算依据', + type: 'string', + ui: { + widget: 'dict-select', + containsAllLable: true, + params: { dictKey: 'goodresource:settlement:type' }, containAllLable:true, visibleIf: { _$expand: (value: boolean) => value, diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 0721e959..f9f0b509 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -81,7 +81,7 @@ export class OrderManagementRiskComponent implements OnInit { this.initST(); } getGoodsSourceStatistical() { - this.service.request(this.service.$api_get_listStatisticalStatus, {}).subscribe(res => { + this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { if (res) { res.forEach((element: any) => { if(element.representationsStatusLabel === '待申述') { @@ -166,8 +166,8 @@ export class OrderManagementRiskComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - params: { dictKey: 'goodresourceType' }, - containAllLable: true, + params: { dictKey: 'freight:type' }, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value } @@ -179,7 +179,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'BulkFreightUnitPriceType' }, - containAllLable: true, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value } @@ -191,10 +191,10 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value, }, - allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder(), }, }, @@ -205,6 +205,7 @@ export class OrderManagementRiskComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value } @@ -234,6 +235,12 @@ export class OrderManagementRiskComponent implements OnInit { className: 'text-left', render: 'billCode' }, + { + title: '货源编号', + width: '200px', + className: 'text-left', + index: 'resourceId' + }, { title: '异常信息', width: '200px', diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 1bcc9265..c0dc43e9 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -175,6 +175,7 @@ resourceStatus: any; serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { if (!!q) { return this.service @@ -187,6 +188,20 @@ resourceStatus: any; }, } as SFSelectWidgetSchema, }, + enterpriseProjectId: { + type: 'string', + title: '所属项目', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.service.getEnterpriseProject(), + visibleIf: { + _$expand: (value: boolean) => value + } + }, + default: '' + }, loadingPlace: { type: 'string', title: '装货地', @@ -205,29 +220,6 @@ resourceStatus: any; } } }, - // driverId: { - // title: '承运司机', - // type: 'string', - // ui: { - // widget: 'select', - // serverSearch: true, - // searchDebounceTime: 300, - // searchLoadingText: '搜索中...', - // onSearch: (q: any) => { - // if (!!q) { - // return this.service - // .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) - // .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.appUserId } as SFSchemaEnum)))) - // .toPromise(); - // } else { - // return of([]); - // } - // }, - // visibleIf: { - // _$expand: (value: boolean) => value - // } - // } as SFSelectWidgetSchema - // }, driverName: { title: '承运司机', type: 'string', @@ -262,7 +254,7 @@ resourceStatus: any; ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containAllLable:true, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -296,19 +288,6 @@ resourceStatus: any; }, }, }, - // riskStatus: { - // title: '是否风险单', - // type: 'string', - // default: '', - // ui: { - // widget: 'dict-select', - // params: { dictKey: 'bill:risk:status' }, - // containAllLable:true, - // visibleIf: { - // _$expand: (value: boolean) => value, - // }, - // } as SFSelectWidgetSchema, - // }, enterpriseInfoId: { type: 'string', title: '网络货运人', @@ -322,26 +301,26 @@ resourceStatus: any; asyncData: () => this.shipperservice.getNetworkFreightForwarder(), }, }, - goodsNameId: { - type: 'string', - title: '货物名称', - ui: { - widget: 'select', - placeholder: '请选择', - errors: { required: '请选择货物类型' }, - visibleIf: { - _$expand: (value: boolean) => value, - }, - asyncData: () => - this.shipperservice.loadConfigByKey('goods.name.config.type').pipe( - map((data: any) => { - return data[0].children?.map((m: any) => { - return { label: m.name, value: m.id }; - }); - }) - ), - } as SFSelectWidgetSchema - }, + // goodsNameId: { + // type: 'string', + // title: '货物名称', + // ui: { + // widget: 'select', + // placeholder: '请选择', + // errors: { required: '请选择货物类型' }, + // visibleIf: { + // _$expand: (value: boolean) => value, + // }, + // asyncData: () => + // this.shipperservice.loadConfigByKey('goods.name.config.type').pipe( + // map((data: any) => { + // return data[0].children?.map((m: any) => { + // return { label: m.name, value: m.id }; + // }); + // }) + // ), + // } as SFSelectWidgetSchema + // }, serviceType: { title: '服务类型', type: 'string', @@ -349,7 +328,7 @@ resourceStatus: any; ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containAllLable:true, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index 13d2036a..3e1e592c 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -146,6 +146,7 @@ export class SupplyManagementBulkComponent implements OnInit { visibleIf: { _$expand: (value: boolean) => value, }, + allowClear: true, } as SFDateWidgetSchema, }, deadlineTime: { @@ -158,6 +159,7 @@ export class SupplyManagementBulkComponent implements OnInit { visibleIf: { _$expand: (value: boolean) => value, }, + allowClear: true, } as SFDateWidgetSchema, }, enterpriseInfoId: { @@ -184,6 +186,7 @@ export class SupplyManagementBulkComponent implements OnInit { visibleIf: { _$expand: (value: boolean) => value }, + allowClear: true, onSearch: (q: any) => { console.log(q) if (!!q) { diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 062442ab..f68c6f87 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -350,6 +350,7 @@ export class SupplyManagementVehicleComponent implements OnInit { visibleIf: { _$expand: (value: boolean) => value }, + allowClear: true, onSearch: (q: any) => { console.log(q); if (!!q) { @@ -371,6 +372,8 @@ export class SupplyManagementVehicleComponent implements OnInit { visibleIf: { _$expand: (value: boolean) => value }, + allowClear: true, + containsAllLable: true, asyncData: () => this.shipperSrv.getEnterpriseProject() } as SFSelectWidgetSchema }, @@ -383,7 +386,8 @@ export class SupplyManagementVehicleComponent implements OnInit { params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value - } + }, + allowClear: true } as SFSelectWidgetSchema }, auditStatus: { @@ -391,10 +395,13 @@ export class SupplyManagementVehicleComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', + allowClear: true, + containsAllLable: true, params: { dictKey: 'goodresource:audit:status' }, visibleIf: { _$expand: (value: boolean) => value - } + }, + } as SFSelectWidgetSchema }, enterpriseInfoId: { diff --git a/src/app/routes/sys-setting/components/btn-management/btn-management.component.html b/src/app/routes/sys-setting/components/btn-management/btn-management.component.html new file mode 100644 index 00000000..6bf41320 --- /dev/null +++ b/src/app/routes/sys-setting/components/btn-management/btn-management.component.html @@ -0,0 +1,80 @@ + + + + + +
+ +
+ +
+ + + +
+ +
+
+ + + + +
+
+
+
+ + +
+
+ +
+
+ + +
+ 客户 + 供应商 +
+
+
+
+ + + + + + + + + + diff --git a/src/app/routes/sys-setting/components/btn-management/btn-management.component.less b/src/app/routes/sys-setting/components/btn-management/btn-management.component.less new file mode 100644 index 00000000..04fd4ba3 --- /dev/null +++ b/src/app/routes/sys-setting/components/btn-management/btn-management.component.less @@ -0,0 +1,13 @@ +:host::ng-deep{ + .search-box{ + .ant-card-body{ + padding-bottom: 18px; + } + } + + .content-box{ + .ant-card-body{ + padding-top: 14px; + } + } +} \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/btn-management/btn-management.component.ts b/src/app/routes/sys-setting/components/btn-management/btn-management.component.ts new file mode 100644 index 00000000..a0618112 --- /dev/null +++ b/src/app/routes/sys-setting/components/btn-management/btn-management.component.ts @@ -0,0 +1,199 @@ +import { Component, OnInit, ViewChild, Type } from '@angular/core'; +import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { of } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { SystemService } from '../../services/system.service'; + +@Component({ + selector: 'app-sys-setting-components-btn-management', + templateUrl: './btn-management.component.html', + styleUrls: ['./btn-management.component.less'] +}) +export class BtnManagementComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; + ui: SFUISchema = {}; + ui2: SFUISchema = {}; + schema: SFSchema = {}; + addSchema: SFSchema = {}; + _$expand = false; + editText = ''; + formData :any; + isVisible = false; + edit = false; + editId = false; + + columns: STColumn[] = [ + { title: '按钮名称', index: 'name' }, + { title: 'i18n', index: 'i18n' }, + { title: '创建时间', index: 'createTime' }, + { title: '按钮说明', index: 'text' }, + { + title: '操作', + buttons: [ + { + text: '编辑', + click: item => this.roleAction(item, 2) + }, + { + text: '删除', + click: item => this.deleteAction(item) + }, + ] + } + ]; + + selectedRows: any[] = []; + + get reqParams (){ + return { + ...this.sf?.value, + }}; + + constructor( + public service: SystemService, + private nzModalService: NzModalService, + public shipperservice: ShipperBaseService, + ) {} + + ngOnInit(): void { + this.initSF() + this.initSFFre() + } + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + case 'filter': + this.st.load(); + break; + } + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + initSF(){ + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + name: { + type: 'string', + title: '按钮名称', + ui: { placeholder: '请输入' } + }, + } + + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + initSFFre() { + this.addSchema = { + properties: { + name: { + type: 'string', + title: '按钮名称', + ui: { placeholder: '请输入' } + }, + i18n: { + type: 'string', + title: 'i18n', + ui: { placeholder: '请输入' } + }, + text: { + title: '按钮说明', + type: 'string', + ui: { + placeholder: '请输入', + } + }, + }, + required: ['name', 'i18n', 'text'] + }; +this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; +} + roleAction(value: any,item?: any) { + if(item === 1) { + this.edit = false; + this.editText = '新增'; + this.formData = {}; + } else { + this.service.request(this.service.$api_getButtonInfo_one, {id: value.id}).subscribe((res: any) => { + console.log(res) + if(res) { + this.formData = res; + } + }) + this.edit = true; + this.editId = value.id; + this.editText = '编辑'; + } + this.isVisible = true; + } + + deleteAction(item?: any) { + this.nzModalService.error({ + nzTitle: '确认删除?', + nzClosable: false, + nzCancelText: '取消', + nzOnOk: () => { + this.service.request(this.service.$api_settlementCustomer_deletebatch, [item.id]).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功!'); + this.st.reload(1) + } + }) + } + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + } + handleCancel() { + this.isVisible = false + } + + handleOK() { + console.log(this.sfFre.value) + if(!this.sfFre.valid) { + this.service.msgSrv.warning('请正确填写完整!') + return + } + const params ={ + ...this.sfFre.value + } + if(this.editId) { + params.id = this.editId + } + this.service.request(this.service.$api_saveButtonInfo, params).subscribe((res:any) => { + if(res) { + this.service.msgSrv.success('保存成功!') + this.isVisible = false + this.st.reload(); + } else { + this.service.msgSrv.warning(res?.msg) + + } + }) + } +} diff --git a/src/app/routes/sys-setting/components/close-account/close-account.component.ts b/src/app/routes/sys-setting/components/close-account/close-account.component.ts index 04d24468..8a61d047 100644 --- a/src/app/routes/sys-setting/components/close-account/close-account.component.ts +++ b/src/app/routes/sys-setting/components/close-account/close-account.component.ts @@ -41,6 +41,10 @@ export class CloseAccountComponent implements OnInit { text: '编辑', click: item => this.roleAction(item, 2) }, + { + text: '删除', + click: item => this.deleteAction(item) + }, ] } ]; @@ -106,6 +110,7 @@ export class CloseAccountComponent implements OnInit { ui: { placeholder: '请选择', widget: 'select', + allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder(), } }, @@ -195,7 +200,14 @@ this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; nzTitle: '确认删除?', nzClosable: false, nzCancelText: '取消', - nzOnOk: () => {} + nzOnOk: () => { + this.service.request(this.service.$api_deletebatchButton, [item.id]).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功!'); + this.st.reload(1) + } + }) + } }); } diff --git a/src/app/routes/sys-setting/components/crm-management/crm-management.component.ts b/src/app/routes/sys-setting/components/crm-management/crm-management.component.ts index 6b2969a3..00924fef 100644 --- a/src/app/routes/sys-setting/components/crm-management/crm-management.component.ts +++ b/src/app/routes/sys-setting/components/crm-management/crm-management.component.ts @@ -36,6 +36,10 @@ export class CrmManagementComponent implements OnInit { text: '编辑', click: item => this.roleAction(item, 2) }, + { + text: '删除', + click: item => this.deleteAction(item) + }, ] } ]; @@ -151,7 +155,14 @@ this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; nzTitle: '确认删除?', nzClosable: false, nzCancelText: '取消', - nzOnOk: () => {} + nzOnOk: () => { + this.service.request(this.service.$api_deletebatch_crmCustomer, [item.id]).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功!'); + this.st.reload(1) + } + }) + } }); } diff --git a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts index e9c1c557..81072a63 100644 --- a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts +++ b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts @@ -34,7 +34,6 @@ export class SystemStaffStaffModalComponent implements OnInit { telephone: { title: '手机号码', type: 'string', - format: 'mobile', maxLength: 11, ui: { widget: staff?.appUserId ? 'text' : 'string', placeholder: '请输入员工手机号' }, default: staff.telephone diff --git a/src/app/routes/sys-setting/services/system.service.ts b/src/app/routes/sys-setting/services/system.service.ts index 8676b2b8..e9755da6 100644 --- a/src/app/routes/sys-setting/services/system.service.ts +++ b/src/app/routes/sys-setting/services/system.service.ts @@ -1,10 +1,10 @@ /* * @Author: your name * @Date: 2021-12-20 17:18:43 - * @LastEditTime: 2022-01-14 10:57:58 - * @LastEditors: Please set LastEditors + * @LastEditTime : 2022-01-19 11:09:26 + * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - * @FilePath: \tms-obc-web\src\app\routes\sys-setting\services\system.service.ts + * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\services\\system.service.ts */ import { Injectable, Injector } from '@angular/core'; import { BaseService } from 'src/app/shared/services'; @@ -133,6 +133,16 @@ export class SystemService extends BaseService { $api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode'; // 根据地区code查询地区详情 $api_getRegionDetailByCode = '/api/mdc/pbc/region/getRegionDetailByCode'; + + + // 分页查询按钮列表 + $api_getButtonInfoPage = '/api/mdc/cuc/buttonInfo/getButtonInfoPage'; + // 新增编辑按钮信息 + $api_saveButtonInfo = '/api/mdc/cuc/buttonInfo/saveButtonInfo'; + // 获取按钮信息表(id) + $api_getButtonInfo_one = '/api/mdc/cuc/buttonInfo/getButtonInfo'; + // 删除按钮信息(id) + $api_deletebatchButton = '/api/mdc/cuc/buttonInfo/deletebatchButton'; $api_getRoleTemplateInfo: string = ''; $api_getFunctionButtonInfo: string = ''; diff --git a/src/app/routes/sys-setting/sys-setting-routing.module.ts b/src/app/routes/sys-setting/sys-setting-routing.module.ts index c3763507..add28e17 100644 --- a/src/app/routes/sys-setting/sys-setting-routing.module.ts +++ b/src/app/routes/sys-setting/sys-setting-routing.module.ts @@ -1,10 +1,10 @@ /* * @Author: your name * @Date: 2021-12-03 15:23:05 - * @LastEditTime: 2021-12-27 11:11:12 - * @LastEditors: Please set LastEditors + * @LastEditTime : 2022-01-19 10:53:58 + * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - * @FilePath: \tms-obc-web\src\app\routes\sys-setting\sys-setting-routing.module.ts + * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\sys-setting-routing.module.ts */ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; @@ -13,6 +13,7 @@ import { AuditReasonConfigComponent } from './components/audit-reason-config/aud import { BasicConfigComponent } from './components/basic-config/basic-config.component'; import { BasicSettingComponent } from './components/basic-setting/basic-setting.component'; import { CartConfigComponent } from './components/cart-config/cart-config.component'; +import { BtnManagementComponent } from './components/btn-management/btn-management.component'; import { CloseAccountComponent } from './components/close-account/close-account.component'; import { CrmManagementComponent } from './components/crm-management/crm-management.component'; import { GoodsNameConfigComponent } from './components/goods-name-config/goods-name-config.component'; @@ -44,6 +45,7 @@ const routes: Routes = [ { path: 'close-account', component: CloseAccountComponent }, { path: 'system-supply-logs', component: SystemSupplyLogsComponent }, { path: 'system-waybill-logs', component: SystemWaybillLogsComponent }, + { path: 'btn-management', component: BtnManagementComponent }, ]; @NgModule({ diff --git a/src/app/routes/sys-setting/sys-setting.module.ts b/src/app/routes/sys-setting/sys-setting.module.ts index 816faebb..38f68fa0 100644 --- a/src/app/routes/sys-setting/sys-setting.module.ts +++ b/src/app/routes/sys-setting/sys-setting.module.ts @@ -1,10 +1,10 @@ /* * @Author: your name * @Date: 2021-12-03 15:23:05 - * @LastEditTime: 2022-01-04 14:46:23 - * @LastEditors: Please set LastEditors + * @LastEditTime : 2022-01-19 10:53:26 + * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - * @FilePath: \tms-obc-web\src\app\routes\sys-setting\sys-setting.module.ts + * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\sys-setting.module.ts */ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; @@ -34,6 +34,7 @@ import { NetworkFreightComponent } from './components/network-freight/network-fr import { CloseAccountComponent } from './components/close-account/close-account.component'; import { SystemSupplyLogsComponent } from './components/system-supply-logs/system-supply-logs.component'; import { SystemWaybillLogsComponent } from './components/system-waybill-logs/system-waybill-logs.component'; +import { BtnManagementComponent } from './components/btn-management/btn-management.component'; const COMPONENTS = [ StaffManagementComponent, @@ -52,7 +53,8 @@ const COMPONENTS = [ NetworkFreightComponent, CloseAccountComponent, SystemSupplyLogsComponent, - SystemWaybillLogsComponent + SystemWaybillLogsComponent, + BtnManagementComponent ]; const NOTROUTECOMPONENTS = [ BuyerTranspowerComponent, diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.ts b/src/app/routes/usercenter/components/driver/captain/captain.component.ts index cf637e7b..deff0ec7 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.ts +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.ts @@ -127,7 +127,6 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { mobile: { title: '手机号', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入' @@ -143,7 +142,6 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { promotersTelephone: { title: '业务员手机号', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入', diff --git a/src/app/routes/usercenter/components/driver/driver.component.ts b/src/app/routes/usercenter/components/driver/driver.component.ts index 8053fdce..6842d26f 100644 --- a/src/app/routes/usercenter/components/driver/driver.component.ts +++ b/src/app/routes/usercenter/components/driver/driver.component.ts @@ -148,7 +148,6 @@ export class UserCenterComponentsDriverComponent implements OnInit { mobile: { title: '手机号', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入' @@ -207,7 +206,6 @@ export class UserCenterComponentsDriverComponent implements OnInit { promotersTelephone: { title: '推广业务员', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入手机号', diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts index 9ec7789b..ea6bd6d0 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts @@ -246,7 +246,6 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { mobile: { title: '手机号', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入' diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 066eced9..56acad75 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -150,23 +150,6 @@ export class FreightComponentsListComponent implements OnInit { } } }, - crmStatus: { - type: 'string', - title: 'CRM审核状态', - enum: [ - { label: '全部', value: '' }, - { label: '待审核', value: '10' }, - { label: '审核通过', value: '20' }, - { label: '驳回', value: '30' } - ], - default: '', - ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value - } - } - }, lockedStatus: { type: 'string', title: '企业状态', @@ -197,17 +180,6 @@ export class FreightComponentsListComponent implements OnInit { { title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } }, { title: '推广业务员', className: 'text-center', render: 'promotersTelephone' }, { title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '用户注册', 2: '货主添加' } }, - { - title: 'CRM审核状态', - className: 'text-center', - index: 'crmStatus', - type: 'badge', - badge: { - 10: { text: '待审核', color: 'default' }, - 20: { text: '已成功', color: 'success' }, - 30: { text: '审核失败', color: 'warning' } - } - }, { title: '企业状态', className: 'text-center', diff --git a/src/app/routes/usercenter/components/freight/user/user.component.ts b/src/app/routes/usercenter/components/freight/user/user.component.ts index fe17a804..81088edc 100644 --- a/src/app/routes/usercenter/components/freight/user/user.component.ts +++ b/src/app/routes/usercenter/components/freight/user/user.component.ts @@ -147,7 +147,6 @@ export class FreightComponentsUserComponent implements OnInit { telephone: { title: '手机号', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入' @@ -173,7 +172,6 @@ export class FreightComponentsUserComponent implements OnInit { promotersTelephone: { title: '推广业务员', type: 'string', - format: 'mobile', maxLength: 11, ui: { placeholder: '请输入手机号', diff --git a/src/app/routes/vehicle/components/audit/audit.component.ts b/src/app/routes/vehicle/components/audit/audit.component.ts index 0531d0fc..9e0a397a 100644 --- a/src/app/routes/vehicle/components/audit/audit.component.ts +++ b/src/app/routes/vehicle/components/audit/audit.component.ts @@ -80,6 +80,7 @@ export class VehicleComponentsAuditComponent implements OnInit { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { if (!!q) { return this.service @@ -103,6 +104,7 @@ export class VehicleComponentsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:color' }, + containsAllLable: true, } }, isSelf: { @@ -114,6 +116,7 @@ export class VehicleComponentsAuditComponent implements OnInit { ], ui: { widget: 'select', + allowClear: true, } }, saveUser: { diff --git a/src/app/routes/vehicle/components/list/list.component.ts b/src/app/routes/vehicle/components/list/list.component.ts index 170a0fcf..61641d78 100644 --- a/src/app/routes/vehicle/components/list/list.component.ts +++ b/src/app/routes/vehicle/components/list/list.component.ts @@ -79,6 +79,7 @@ export class VehicleComponentsListComponent implements OnInit { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { if (!!q) { return this.service @@ -101,7 +102,7 @@ export class VehicleComponentsListComponent implements OnInit { title: '车牌颜色', ui: { widget: 'dict-select', - containAllLable:true, + containsAllLable: true, params: { dictKey: 'car:color' }, }, }, @@ -113,6 +114,7 @@ export class VehicleComponentsListComponent implements OnInit { { label: '运输中', value: 1 }, ], ui: { + allowClear: true, widget: 'select', }, }, @@ -122,7 +124,7 @@ export class VehicleComponentsListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:model' }, - containAllLable:true, + containsAllLable: true, visibleIf: { expand: (value: boolean) => value, }, @@ -134,7 +136,7 @@ export class VehicleComponentsListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:length' }, - containAllLable:true, + containsAllLable: true, visibleIf: { expand: (value: boolean) => value, }, @@ -149,6 +151,7 @@ export class VehicleComponentsListComponent implements OnInit { ], ui: { widget: 'select', + allowClear: true, visibleIf: { expand: (value: boolean) => value, }, @@ -165,6 +168,7 @@ export class VehicleComponentsListComponent implements OnInit { default: '', ui: { widget: 'select', + allowClear: true, visibleIf: { expand: (value: boolean) => value, }, @@ -180,6 +184,7 @@ export class VehicleComponentsListComponent implements OnInit { ], ui: { widget: 'select', + allowClear: true, visibleIf: { expand: (value: boolean) => value, }, diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts index b4330333..26ea6eb0 100644 --- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts @@ -118,6 +118,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { console.log(q) if (!!q) { @@ -139,6 +140,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { title: '所属项目', ui: { widget: 'select', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -146,53 +148,23 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { this.shipperSrv.getEnterpriseProject() } as SFSelectWidgetSchema, }, - driverId: { + driverName: { title: '承运司机', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) - .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, carNo: { title: '车牌号', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getCarLicenseListByCarNo, { - carNo: q - }) - .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, reportingTime: { title: '上报时间', diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index 4c4a991f..5082fc0d 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -92,6 +92,7 @@ tabs = { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { console.log(q) if (!!q) { @@ -132,7 +133,7 @@ tabs = { } } }, - carNo: { + licenseCarNo: { title: '车牌号', type: 'string', ui: { @@ -141,7 +142,7 @@ tabs = { } } }, - captainName: { + carCaptainName: { title: '车队长', type: 'string', ui: { @@ -155,8 +156,8 @@ tabs = { type: 'string', ui: { widget: 'dict-select', - params: { dictKey: 'payment:status' }, - containAllLable:true, + params: { dictKey: 'overall:payment:status' }, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -185,6 +186,7 @@ tabs = { ], ui: { widget: 'select', + allowClear: true, placeholder: '请选择', visibleIf: { _$expand: (value: boolean) => value, @@ -211,6 +213,7 @@ tabs = { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value, }, diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index 5b6ebe00..787421ef 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -90,6 +90,7 @@ export class WaybillManagementVehicleComponent implements OnInit { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', + allowClear: true, onSearch: (q: any) => { console.log(q) if (!!q) { @@ -129,6 +130,7 @@ export class WaybillManagementVehicleComponent implements OnInit { visibleIf: { _$expand: (value: boolean) => value }, + allowClear: true, asyncData: () => this.shipperservice.getEnterpriseProject() } as SFSelectWidgetSchema }, @@ -141,7 +143,7 @@ export class WaybillManagementVehicleComponent implements OnInit { } } }, - carNo: { + licenseCarNo: { title: '车牌号', type: 'string', ui: { @@ -150,7 +152,7 @@ export class WaybillManagementVehicleComponent implements OnInit { } } }, - captainName: { + carCaptainName: { title: '车队长', type: 'string', ui: { @@ -165,7 +167,7 @@ export class WaybillManagementVehicleComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containAllLable: true, + containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value } @@ -195,6 +197,7 @@ export class WaybillManagementVehicleComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value } @@ -220,6 +223,7 @@ export class WaybillManagementVehicleComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value } diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 0b732eaa..c10f1bc1 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -152,8 +152,7 @@ { "text": "整车订单", "icon": "anticon anticon-dashboard", - "link": "/order-management/vehicle", - "reuse": true + "link": "/order-management/vehicle" }, { "text": "大宗订单", @@ -476,6 +475,10 @@ "text": "基础设置", "link": "/system/basic-setting" }, + { + "text": "按钮管理设置", + "link": "/system/btn-management" + }, { "text": "车型车长配置", "link": "/system/cart-config" diff --git a/src/environments/eascs/environment.prod.ts b/src/environments/eascs/environment.prod.ts index 0449f0d0..fe8247ae 100644 --- a/src/environments/eascs/environment.prod.ts +++ b/src/environments/eascs/environment.prod.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2021-12-08 13:38:19 + * @LastEditors : Shiming + * @LastEditTime : 2022-01-19 09:23:10 + * @FilePath : \\tms-obc-web\\src\\environments\\eascs\\environment.prod.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { Environment } from '@delon/theme'; export const environment = { @@ -8,4 +18,13 @@ export const environment = { refreshTokenEnabled: false, refreshTokenType: 'auth-refresh', }, + pro: { + theme: 'dark', + menu: 'side', + contentWidth: 'fluid', + fixedHeader: true, + autoHideHeader: false, + fixSiderbar: true, + onlyIcon: false, + } } as Environment; diff --git a/src/styles/theme.less b/src/styles/theme.less index 74b0ba47..c5ab157a 100644 --- a/src/styles/theme.less +++ b/src/styles/theme.less @@ -11,4 +11,6 @@ .error-color { color: #ff4d4f; -} \ No newline at end of file +} + +@primary-color: #F5222D; \ No newline at end of file