From 6295d72b111150e86465085c9b723d106b279088 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 13:53:43 +0800 Subject: [PATCH 01/10] fix bug --- .../components/freight/list/list.component.html | 4 ++-- .../components/freight/list/list.component.ts | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/list.component.html b/src/app/routes/usercenter/components/freight/list/list.component.html index d8652768..afdba959 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.html +++ b/src/app/routes/usercenter/components/freight/list/list.component.html @@ -46,12 +46,12 @@
  • 新增企业
  • - + 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 8ec7d565..020eb8c4 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -469,14 +469,14 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen text: '分配客服
    ', click: item => this.showService(item) }, - // { - // text: '修改合伙人', - // click: item => this.editPartner(item) - // }, - // { - // text: '修改渠道销售', - // click: item => this.editSale(item) - // } + { + text: '修改合伙人', + click: item => this.editPartner(item) + }, + { + text: '修改渠道销售', + click: item => this.editSale(item) + } ] } ]; From c633a29052e86da0f9713e8c4a51cd1986e784c5 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 9 May 2022 13:57:40 +0800 Subject: [PATCH 02/10] reuse --- .../components/role-management/edit/edit.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html index 976a3f03..3b79e2e3 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html @@ -19,10 +19,10 @@
    - - + +
    From f3b9d9ff283cc19d69fd42c755d84f7a9aaa26a7 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 14:03:00 +0800 Subject: [PATCH 03/10] fix bug --- .../datascreen/datascreen.component.html | 69 ++++++++++--------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.html b/src/app/routes/datatable/components/datascreen/datascreen.component.html index 8142b1e1..8e0df5a5 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.html +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-06 10:57:56 * @LastEditors : Shiming - * @LastEditTime : 2022-05-07 09:43:16 + * @LastEditTime : 2022-05-09 13:59:19 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -48,31 +48,6 @@ - - - - {{ index + 1 }} - - - {{ item.weight ? item.weight + '吨' : '' }} - {{ item.volume ? item.volume + '方' : '' }} - - - {{ item.weight ? item.weight + '吨' : '' }} - {{ item.volume ? item.volume + '方' : '' }} - - -
    @@ -91,11 +66,6 @@
    - - - - -
    @@ -156,6 +126,43 @@ +
    + +
    +
    + + + + + {{ index + 1 }} + + + {{ item.weight ? item.weight + '吨' : '' }} + {{ item.volume ? item.volume + '方' : '' }} + + + {{ item.weight ? item.weight + '吨' : '' }} + {{ item.volume ? item.volume + '方' : '' }} + + + +
    +
    + + + +
    +
    Date: Mon, 9 May 2022 14:06:29 +0800 Subject: [PATCH 04/10] fix bug --- .../datatable/components/datascreen/datascreen.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.html b/src/app/routes/datatable/components/datascreen/datascreen.component.html index 8e0df5a5..c5b491b4 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.html +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.html @@ -167,7 +167,7 @@ Date: Mon, 9 May 2022 14:25:30 +0800 Subject: [PATCH 05/10] fix bug --- .../datascreen/datascreen.component.less | 2 +- .../components/list/list.component.ts | 26 ++++++++++++++++++- .../services/channel-sales.service.ts | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.less b/src/app/routes/datatable/components/datascreen/datascreen.component.less index b6591429..871034c1 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.less +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.less @@ -8,7 +8,7 @@ font-size: 14px; } .ant-table-thead > tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td { - padding: 0; + padding: 5px; font-size: 12px; } } diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index 1939905f..22363457 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -133,7 +133,13 @@ export class ParterChannelSalesListComponent implements OnInit { acl: { ability: ['channelSales-frozen'] }, iif: (item) => {return item.stateLocked == false}, click: (_record, _modal, _instance) => this.stop(_record), - } + }, + { + text: '启用', + acl: { ability: ['channelSales-frozen'] }, + iif: (item) => {return item.stateLocked == true}, + click: (_record, _modal, _instance) => this.open(_record), + }, ] } ]; @@ -185,6 +191,24 @@ export class ParterChannelSalesListComponent implements OnInit { }); } } + open(record: STData) { + if (record.stateLocked) { + const params = { + id: record.id + } + this.modalService.confirm({ + nzTitle: '启用确认', + nzContent: `确定启用该账号吗?
    `, + nzOnOk: () => + this.service.request(this.service.$api_activeChannelSales, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('启用成功!'); + this.st.reload(); + } + }) + }); + } + } /** * 重置表单 diff --git a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts index 6c17a145..7d3a7ca5 100644 --- a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts +++ b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts @@ -21,6 +21,8 @@ export class ChannelSalesService extends BaseService { $api_getChannelSalesInfo = '/api/mdc/channelSalesManagement/getChannelSalesInfo'; // 冻结渠道销售 $api_frozenChannelSales = '/api/mdc/channelSalesManagement/frozenChannelSales'; + // 激活渠道销售 + $api_activeChannelSales = '/api/mdc/channelSalesManagement/activeChannelSales'; constructor(public injector: Injector) { From bec73469276e88dd90e699d8ad519d1ee5dbbda7 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 14:26:50 +0800 Subject: [PATCH 06/10] fix bug --- .../partner/channel-sales/components/list/list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index 22363457..9e3ddcb0 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -136,7 +136,7 @@ export class ParterChannelSalesListComponent implements OnInit { }, { text: '启用', - acl: { ability: ['channelSales-frozen'] }, + acl: { ability: ['channelSales-open'] }, iif: (item) => {return item.stateLocked == true}, click: (_record, _modal, _instance) => this.open(_record), }, From 2d5ffbf610e10067aad1ee051b0436cb2e7de034 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 14:41:57 +0800 Subject: [PATCH 07/10] fix bug --- .../receipts-audit.component.html | 55 +++++++++---------- .../index/partner-list.component.html | 11 +++- .../index/partner-list.component.ts | 4 +- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html index 14dceaa9..50799075 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html @@ -39,10 +39,17 @@
    - + {{ item.freightPrice | currency }} @@ -62,8 +69,7 @@
    - - +
    @@ -72,26 +78,21 @@
    卸 | {{ item?.unloadingTime }}
    -
    {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + - item?.carNo : '' }}
    +
    {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }}
    -
    {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
    +
    {{ item?.payeeName }}{{ item?.payeePhone ? '/' + item?.payeePhone : '' }}
    - {{ - item.billCode }} - {{ - item.billCode }} - {{ - item.billCode }} + {{ item.billCode }} + {{ item.billCode }} + {{ item.billCode }}
    - {{item?.billStatusLabel}} + {{ item?.billStatusLabel }}
    - {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? - '':item?.serviceTypeLabel}} + {{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel === item?.resourceTypeLabel ? '' : item?.serviceTypeLabel }}
    @@ -116,20 +117,18 @@
    - + + 更多
      -
    • - 批量通过 -
    • -
    • - 批量生成电子单据 -
    • +
    • 批量通过
    • +
    • 批量生成电子单据
    -
    \ No newline at end of file +
    diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.html b/src/app/routes/partner/partner-list/components/index/partner-list.component.html index 24522919..fd1002df 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.html +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-29 17:28:23 * @LastEditors : Shiming - * @LastEditTime : 2022-05-09 11:33:34 + * @LastEditTime : 2022-05-09 14:40:09 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-list\\components\\index\\partner-list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -61,6 +61,14 @@ [scroll]="{ x: '1200px' }" [page]="{}" > + +
    + {{item.partnerType ? item.enterpriseName || item.contactName : ''}} +
    +
    + 管理员: {{item.contactName }} +
    +
    @@ -104,7 +112,6 @@ [req]="{ process: beforeReq, params: { effectiveStatus: 2, newPartnerId: selectItem.id } }" [loading]="service.http.loading" [page]="{ show: false }" - (change)="stChange($event)" > diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index 62134560..ae23d1e2 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -412,13 +412,11 @@ export class PartnerListComponent { return [ { title: '合伙人名称', - index: 'enterpriseName', + render: 'enterpriseName', width: 180, - format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') }, { title: '付款编码', index: 'payCode', width: 160 }, { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, - { title: '企业管理员', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, From 489404402123a1aa1e41ee555c3f601db293ecfa Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 15:08:07 +0800 Subject: [PATCH 08/10] fix bug --- .../components/index/partner-list.component.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index ae23d1e2..65d2cac3 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -236,10 +236,6 @@ export class PartnerListComponent { type: 'string', title: '合伙人名称' }, - contactName: { - type: 'string', - title: '企业管理员' - }, contactMobile: { type: 'string', title: '手机号' @@ -252,9 +248,6 @@ export class PartnerListComponent { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - expand: (value: boolean) => value - }, onSearch: (q: any) => { let str = q.replace(/^\s+|\s+$/g, ''); if (str) { From a00fdbf800c088b36e2554dd665b9ee796de0195 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 16:00:28 +0800 Subject: [PATCH 09/10] fix bug --- proxy.conf.js | 4 +- .../cancellation-invoice.component.html | 166 +++++++++--------- .../cancellation-invoice.component.ts | 20 +-- 3 files changed, 99 insertions(+), 91 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index 7db07ae1..7e19011b 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-05-09 11:25:41 + * @LastEditTime : 2022-05-09 15:14:15 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -30,7 +30,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/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html index e2611f6f..ce4bc04f 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html @@ -19,91 +19,99 @@ --> -
    - - - - - - - -
    +
    + + + + + + + +
    - -
    -
    - 已选择 - {{ selectedRows.length }} 张发票   发票金额总计 - {{totalCallNo }} - 清空 -
    - - - + -
    + +
    + + + + {{ item.vatinvcode }}
    +
    - - - - - {{ item.vatinvcode }}
    - -
    -
    +
    -
    -
    - - {{openInfo?.artoname}} - - - {{openInfo?.artotaxno}} - - - {{openInfo?.artoadd}} - - - {{openInfo?.artotel}} - - - {{openInfo?.artobank}} - - - {{openInfo?.artoacc}} - - - {{openInfo?.vatnameLabel}} - - - {{openInfo?.vatremarks}} - - - {{openInfo?.otherremarks}} - - - {{openInfo?.isdetail?'需要':'不需要'}} - - - {{openInfo?.vatmoney | currency}} - - - - - - - - - - - -
    +
    +
    + + {{ openInfo?.artoname }} + + + {{ openInfo?.artotaxno }} + + + {{ openInfo?.artoadd }} + + + {{ openInfo?.artotel }} + + + {{ openInfo?.artobank }} + + + {{ openInfo?.artoacc }} + + + {{ openInfo?.vatnameLabel }} + + + {{ openInfo?.vatremarks }} + + + {{ openInfo?.otherremarks }} + + + {{ openInfo?.isdetail ? '需要' : '不需要' }} + + + {{ openInfo?.vatmoney | currency }} + + + + + + + + + +
    - \ No newline at end of file +
    + diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index 46ebd34b..57e6c57b 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -279,16 +279,16 @@ export class CancellationInvoiceComponent extends BasicTableComponent { asyncData: () => this.service.getNetworkFreightForwarder() } }, - sts: { - title: '发票状态', - type: 'string', - ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'vatinv:status' }, - containAllLable: true - } as SFSelectWidgetSchema - }, + // sts: { + // title: '发票状态', + // type: 'string', + // ui: { + // widget: 'dict-select', + // containsAllLabel: true, + // params: { dictKey: 'vatinv:status' }, + // containAllLable: true + // } as SFSelectWidgetSchema + // }, // or2derSn: { // type: 'string', // title: '订单号', From 3de10b7b4d405e819c4c67347500b73c62b61956 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 9 May 2022 16:26:23 +0800 Subject: [PATCH 10/10] fix bug --- .../bulk-publish/bulk-publish.component.ts | 89 +++++++------- .../bulk-release-publish.component.ts | 67 ++++------ .../onecar-publish.component.ts | 91 +++++++------- .../release-publish.component.ts | 116 +++++++++--------- 4 files changed, 168 insertions(+), 195 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index b9ce6987..763173d1 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -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']; } diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 18ebcb55..95133f57 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -235,13 +235,34 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { initSF3() { this.schema3 = { properties: { - goodsTypeId: { + goodsTips: { + type: 'string', + title: '', + ui: { + widget: 'custom', + class: 'goods_Tips_item', + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // } + } + }, + goodsName: { type: 'string', title: '货物名称', + ui: { + // hidden: true, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + } + }, + goodsTypeId: { + type: 'string', + title: '', ui: { widget: 'select', placeholder: '请选择', - errors: { required: '请选择货物类型' }, + errors: { required: '请选择货物名称' }, asyncData: () => this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { @@ -263,44 +284,8 @@ export class SupplyManagementBulkReleasePublishComponent 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 === '其它' - } - } - } }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] + required: ['goodsTypeId', 'goodsName', ] }; this.ui3 = { '*': { @@ -624,10 +609,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { // 货物信息 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'] } diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 354ed480..3e81a823 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -264,13 +264,23 @@ export class SupplyManagementOnecarPublishComponent 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) => { @@ -292,47 +302,38 @@ export class SupplyManagementOnecarPublishComponent 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 = { '*': { @@ -1013,10 +1014,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // 货物信息 const sf3Values = { ...this.sf3.value }; - if (sf3Values.goodsTypeName === '其它') { - sf3Values.goodsName = sf3Values.goodsName1; - delete sf3Values.goodsName1; - } + console.log(sf3Values); + if (this.sf4.value.carModel.includes('999')) { this.sf4.value.carModel = ['999']; } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 6fd3cd8e..e2bc4dd8 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -251,13 +251,23 @@ export class SupplyManagementReleasePublishComponent 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) => { @@ -279,47 +289,38 @@ export class SupplyManagementReleasePublishComponent 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 = { '*': { @@ -978,10 +979,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { // 货物信息 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']; } @@ -1020,19 +1017,18 @@ export class SupplyManagementReleasePublishComponent implements OnInit { insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, goodsValue: this.sf4.value.goodsValue }; - console.log(params); - // const modalRef = this.modalService.create({ - // nzTitle: '运输协议', - // nzContent: TranAgreementComponent, - // nzWidth: 900, - // nzFooter: null, - // nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } - // }); - // modalRef.afterClose.subscribe(result => { - // if (result) { - // this.submit(submitType, params); - // } - // }); + const modalRef = this.modalService.create({ + nzTitle: '运输协议', + nzContent: TranAgreementComponent, + nzWidth: 900, + nzFooter: null, + nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } + }); + modalRef.afterClose.subscribe(result => { + if (result) { + this.submit(submitType, params); + } + }); } // 提交 submit(submitType?: string, params?: any): void { @@ -1287,7 +1283,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => { if (res === false) { const modalRef = this.modalService.error({ - nzTitle: '货物类型含有违禁词,请重新输入!', + nzTitle: '货物名称含有违禁词,请重新输入!', }); modalRef.afterClose.subscribe(result => { // this.sf3.setValue('/goodsName1', null);