货主管理
This commit is contained in:
		| @ -1,51 +1,32 @@ | |||||||
| <page-header-wrapper [title]="'企业审核列表'" [content]="content"> | <page-header-wrapper [title]="'企业审核列表'" [content]="content"> | ||||||
|   <nz-card> |   <nz-card class="mb-md"> | ||||||
|     <!-- 搜索表单 --> |     <!-- 搜索表单 --> | ||||||
|     <div nz-row nzGutter="8"> |     <div nz-row nzGutter="8"> | ||||||
|       <!-- 查询字段小于或等于3个时,不显示伸缩按钮 --> |       <div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24"> | ||||||
|       <div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> |  | ||||||
|         <sf |  | ||||||
|           #sf |  | ||||||
|           [schema]="schema" |  | ||||||
|           [ui]="ui" |  | ||||||
|           [mode]="'search'" |  | ||||||
|           [disabled]="!sf?.valid" |  | ||||||
|           [loading]="service.http.loading" |  | ||||||
|           (formSubmit)="st?.load(1)" |  | ||||||
|           (formReset)="resetSF()" |  | ||||||
|         ></sf> |  | ||||||
|       </div> |  | ||||||
|  |  | ||||||
|       <!-- 查询字段大于3个时,根据展开状态调整布局 --> |  | ||||||
|       <ng-container *ngIf="queryFieldCount > 4"> |  | ||||||
|         <div nz-col [nzSpan]="_$expand ? 24 : 18"> |  | ||||||
|         <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> |         <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> | ||||||
|       </div> |       </div> | ||||||
|         <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> |       <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" | ||||||
|           <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> |         [class.expend-options]="_$expand"> | ||||||
|  |         <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" | ||||||
|  |           (click)="st?.load(1)">查询</button> | ||||||
|         <button nz-button (click)="resetSF()">重置</button> |         <button nz-button (click)="resetSF()">重置</button> | ||||||
|         <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button> |         <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button> | ||||||
|           <button nz-button nzType="link" (click)="expandToggle()"> |         <button nz-button nzType="link" (click)="expandToggle(!_$expand)"> | ||||||
|           {{ !_$expand ? '展开' : '收起' }} |           {{ !_$expand ? '展开' : '收起' }} | ||||||
|           <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> |           <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||||
|         </button> |         </button> | ||||||
|       </div> |       </div> | ||||||
|       </ng-container> |  | ||||||
|     </div> |     </div> | ||||||
|   </nz-card> |   </nz-card> | ||||||
|   <div style="margin-bottom: 20px; text-align: right"></div> |  | ||||||
|   <nz-card> |   <nz-card> | ||||||
|     <!-- 数据列表 --> |     <!-- 数据列表 --> | ||||||
|     <st |     <st #st multiSort [data]="tabType===1?service.$api_get_freight_list:service.$api_get_freight_list" | ||||||
|       #st |       [columns]="tabType===1?enterColumns:adminColumns" | ||||||
|       multiSort |  | ||||||
|       [data]="datalist" |  | ||||||
|       [columns]="columns" |  | ||||||
|       [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |       [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|       [res]="{ reName: { list: 'data.records', total: 'data.total' } }" |       [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|       [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" |       [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" | ||||||
|       [loading]="service.http.loading" |       [loading]="service.http.loading"> | ||||||
|     > |  | ||||||
|     </st> |     </st> | ||||||
|   </nz-card> |   </nz-card> | ||||||
|   <ng-template #content> |   <ng-template #content> | ||||||
| @ -54,39 +35,3 @@ | |||||||
|     </nz-tabset> |     </nz-tabset> | ||||||
|   </ng-template> |   </ng-template> | ||||||
| </page-header-wrapper> | </page-header-wrapper> | ||||||
| <!-- <nz-modal |  | ||||||
|   [(nzVisible)]="isVisible" |  | ||||||
|   [nzTitle]="mdTitle" |  | ||||||
|   [nzFooter]="modalFooter" |  | ||||||
|   (nzOnCancel)="handleCancel()" |  | ||||||
|   (nzOnOk)="handleOk()" |  | ||||||
|   [nzWidth]="700" |  | ||||||
| > |  | ||||||
|   <ng-container> |  | ||||||
|  |  | ||||||
|   </ng-container> |  | ||||||
|   <ng-template #modalFooter> |  | ||||||
|     <button nz-button nzType="default" (click)="handleCancel()">取消</button> |  | ||||||
|     <button |  | ||||||
|       nz-button |  | ||||||
|       nzType="primary" |  | ||||||
|       *ngIf="mdType === 2" |  | ||||||
|       [disabled]="!sf1?.valid" |  | ||||||
|       (click)="handleOk()" |  | ||||||
|       [nzLoading]="service.http.loading" |  | ||||||
|     > |  | ||||||
|       确定 |  | ||||||
|     </button> |  | ||||||
|     <button |  | ||||||
|       nz-button |  | ||||||
|       nzType="primary" |  | ||||||
|       *ngIf="mdType === 3" |  | ||||||
|       [disabled]="!sf1?.valid" |  | ||||||
|       (click)="handleOk()" |  | ||||||
|       [nzLoading]="service.http.loading" |  | ||||||
|     > |  | ||||||
|       重新提交 |  | ||||||
|     </button> |  | ||||||
|     <button nz-button nzType="primary" *ngIf="mdType === 4" (click)="handleCancel()">确定</button> |  | ||||||
|   </ng-template> |  | ||||||
| </nz-modal> --> |  | ||||||
|  | |||||||
| @ -3,8 +3,21 @@ | |||||||
|     .tabs-wrap>.ant-tabs-nav { |     .tabs-wrap>.ant-tabs-nav { | ||||||
|       margin-bottom: 0; |       margin-bottom: 0; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .myForm .ant-upload.ant-upload-select-picture-card>.ant-upload { |     .myForm .ant-upload.ant-upload-select-picture-card>.ant-upload { | ||||||
|       flex-direction: column !important; |       flex-direction: column !important; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .expend-options { | ||||||
|  |   margin-top: 0px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @media (min-width: 1200px) { | ||||||
|  |   .expend-options { | ||||||
|  |     margin-top: -40px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -8,13 +8,14 @@ import { UsermanageService } from '../../../services/usercenter.service'; | |||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-Freight-components-enterprise-audit', |   selector: 'app-Freight-components-enterprise-audit', | ||||||
|   templateUrl: './enterprise-audit.component.html', |   templateUrl: './enterprise-audit.component.html', | ||||||
|   styleUrls: ['./enterprise-audit.component.less'], |   styleUrls: ['./enterprise-audit.component.less'] | ||||||
| }) | }) | ||||||
| export class FreightComponentsEnterpriseAuditComponent implements OnInit { | export class FreightComponentsEnterpriseAuditComponent implements OnInit { | ||||||
|   _$expand = false; |   _$expand = false; | ||||||
|   ui!: SFUISchema; |   ui: SFUISchema = { '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }; | ||||||
|   schema!: SFSchema; |   schema: SFSchema = this.initSF(); | ||||||
|   columns!: STColumn[]; |   enterColumns: STColumn[] = this.initEnterST(); | ||||||
|  |   adminColumns: STColumn[] = this.initAdminST(); | ||||||
|   @ViewChild('st', { static: false }) st!: STComponent; |   @ViewChild('st', { static: false }) st!: STComponent; | ||||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; |   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||||
|   tabType = 1; |   tabType = 1; | ||||||
| @ -22,80 +23,32 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | |||||||
|     { |     { | ||||||
|       name: '企业审核', |       name: '企业审核', | ||||||
|       type: 1, |       type: 1, | ||||||
|       isActived: false, |       isActived: false | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       name: '企业管理员审核', |       name: '企业管理员审核', | ||||||
|       type: 2, |       type: 2, | ||||||
|       isActived: false, |       isActived: false | ||||||
|     }, |  | ||||||
|   ]; |  | ||||||
|   datalist = [ |  | ||||||
|     { |  | ||||||
|       storeName: '企业名称', |  | ||||||
|       contactsName: '152746565', |  | ||||||
|       enterpriseName: '湖南', |  | ||||||
|       unifiedSocialCreditCode: '45454', |  | ||||||
|       contactsPhone: '*97889461561', |  | ||||||
|       effectiveDateStr: '废弃eww', |  | ||||||
|       enStatusStr2: '已驳回', |  | ||||||
|       enStatusStr3: '正常', |  | ||||||
|       unifiedSocialCreditCode3: '常用服务', |  | ||||||
|       unifiedSocialCreditCode2: '正常', |  | ||||||
|       tenantId: 1, |  | ||||||
|       id: 1 |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       storeName: '企业名称', |  | ||||||
|       contactsName: '152746565', |  | ||||||
|       enterpriseName: '湖南', |  | ||||||
|       unifiedSocialCreditCode: '45454', |  | ||||||
|       contactsPhone: '*97889461561', |  | ||||||
|       effectiveDateStr: '废弃eww', |  | ||||||
|       enStatusStr2: '待审核', |  | ||||||
|       enStatusStr3: '正常', |  | ||||||
|       unifiedSocialCreditCode3: '常用服务', |  | ||||||
|       unifiedSocialCreditCode2: '正常', |  | ||||||
|       tenantId: 2, |  | ||||||
|       id: 2 |  | ||||||
|     }, |  | ||||||
|   ] |  | ||||||
|   isVisible = false; |  | ||||||
|   mdType!: any; |  | ||||||
|   cateData = []; |  | ||||||
|   // stApi = this.service.$api_get_labelList; |  | ||||||
|   constructor(public service: UsermanageService, private router: Router, private modal: NzModalService,private ar: ActivatedRoute) {} |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 查询字段个数 |  | ||||||
|    */ |  | ||||||
|   get queryFieldCount(): number { |  | ||||||
|     return Object.keys(this.schema?.properties || {}).length; |  | ||||||
|     } |     } | ||||||
|  |   ]; | ||||||
|  |   constructor(public service: UsermanageService, private router: Router, private modal: NzModalService, private ar: ActivatedRoute) {} | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 查询参数 |    * 查询参数 | ||||||
|    */ |    */ | ||||||
|   get reqParams() { |   get reqParams() { | ||||||
|     const params = Object.assign({}, this.sf?.value || {}, { |     const params = Object.assign({}, this.sf?.value || {}, { | ||||||
|       flag: this.tabType, |       flag: this.tabType | ||||||
|     }); |     }); | ||||||
|     delete params._$expand; |     delete params._$expand; | ||||||
|     return { ...params }; |     return { ...params, listSource: 1 }; | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 选中行 |  | ||||||
|    */ |  | ||||||
|   get selectedRows() { |  | ||||||
|     return this.st?.list.filter((item) => item.checked) || []; |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 伸缩查询条件 |    * 伸缩查询条件 | ||||||
|    */ |    */ | ||||||
|   expandToggle() { |   expandToggle(status: boolean) { | ||||||
|     this._$expand = !this._$expand; |     this._$expand = status; | ||||||
|     this.sf?.setValue('/expand', this._$expand); |     this.sf?.setValue('/expand', this._$expand); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -109,90 +62,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | |||||||
|   /** |   /** | ||||||
|    * 程序初始化入口 |    * 程序初始化入口 | ||||||
|    */ |    */ | ||||||
|   ngOnInit() { |   ngOnInit() {} | ||||||
|     this.initSF(); |  | ||||||
|     this.initST(); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 初始化查询表单 |  | ||||||
|    */ |  | ||||||
|   initSF() { |  | ||||||
|     this.schema = { |  | ||||||
|       properties: { |  | ||||||
|         expand: { type: 'boolean', ui: { hidden: true } }, |  | ||||||
|         name: { title: '企业名称', type: 'string' }, |  | ||||||
|         contactsName: { |  | ||||||
|           title: '联系人', |  | ||||||
|           type: 'string', |  | ||||||
|           ui: { |  | ||||||
|             showRequired: false, |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|         phone: { |  | ||||||
|           title: '手机号', |  | ||||||
|           type: 'string', |  | ||||||
|           format: 'mobile', |  | ||||||
|           maxLength: 11, |  | ||||||
|           ui: { |  | ||||||
|             placeholder: '请输入手机号', |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|         enStatus2: { |  | ||||||
|           type: 'string', |  | ||||||
|           title: '状态', |  | ||||||
|           enum: [ |  | ||||||
|             { label: '全部', value: '' }, |  | ||||||
|             { label: '正常', value: 0 }, |  | ||||||
|             { label: '冻结', value: 1 }, |  | ||||||
|             { label: '废弃', value: 2 }, |  | ||||||
|           ], |  | ||||||
|           default: '', |  | ||||||
|           ui: { |  | ||||||
|             widget: 'select', |  | ||||||
|             visibleIf: { |  | ||||||
|               expand: (value: boolean) => value, |  | ||||||
|             }, |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|  |  | ||||||
|       }, |  | ||||||
|     }; |  | ||||||
|     this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } } }; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 初始化数据列表 |  | ||||||
|    */ |  | ||||||
|   initST() { |  | ||||||
|     this.columns = [ |  | ||||||
|       { title: '企业名称', className: 'text-center', index: 'storeName' }, |  | ||||||
|       { title: '联系人', className: 'text-center', index: 'contactsName' }, |  | ||||||
|       { title: '手机号', className: 'text-center', render: 'enterpriseName' }, |  | ||||||
|       { title: '申请时间', className: 'text-center', index: 'unifiedSocialCreditCode' }, |  | ||||||
|       { |  | ||||||
|         title: '状态', |  | ||||||
|         className: 'text-center', |  | ||||||
|         index: 'enStatusStr2', |  | ||||||
|         type: 'badge', |  | ||||||
|         badge: { |  | ||||||
|           待审核: { text: '待审核', color: 'success' }, |  | ||||||
|           已驳回: { text: '已驳回', color: 'warning' }, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|      { title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode3' }, |  | ||||||
|      { title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' }, |  | ||||||
|       { |  | ||||||
|         title: '操作', |  | ||||||
|         fixed: 'right', |  | ||||||
|         width: '180px', |  | ||||||
|         className: 'text-center', |  | ||||||
|         buttons: [ |  | ||||||
|           { text: '查看', click: (_record) => this.View(_record) }, |  | ||||||
|         ], |  | ||||||
|       }, |  | ||||||
|     ]; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 数据列表状态变化事件 |    * 数据列表状态变化事件 | ||||||
| @ -202,109 +72,151 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 新增实例 |    * 查看详情 | ||||||
|    */ |    */ | ||||||
|   View(record: any) { |   View(record: any) { | ||||||
|     console.log(record) |     this.router.navigate(['./view', record.id], { | ||||||
|     // this.router.navigate(['../add'], { relativeTo: this.ar }); |  | ||||||
|     this.router.navigate(['./view', record.tenantId], { |  | ||||||
|       relativeTo: this.ar |       relativeTo: this.ar | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 编辑单个实例 |  | ||||||
|    * @param record 记录实例 |  | ||||||
|    */ |  | ||||||
|   editOne(record: STData) { |  | ||||||
|     // this.router.navigate(['../edit', record.uuid], { relativeTo: this.ar }); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 删除单个实例 |  | ||||||
|    * @param record 记录实例 |  | ||||||
|    */ |  | ||||||
|   delOne(record: STData) { |  | ||||||
|     // let delApi = this.service.$api_label_deletebatch; |  | ||||||
|     // if (this.tabType === 3) { |  | ||||||
|     //   delApi = this.service.$api_business_label_delete; |  | ||||||
|     // } else { |  | ||||||
|     //   delApi = this.service.$api_label_deletebatch; |  | ||||||
|     // } |  | ||||||
|     this.modal.confirm({ |  | ||||||
|       nzTitle: '<i>删除确认</i>', |  | ||||||
|       nzContent: `<b>即将删除 当前行数据,请仔细核对,避免误操作!<br>是否删除?</br>`, |  | ||||||
|       nzOnOk: () => |  | ||||||
|       console.log('1') |  | ||||||
|         // this.service.http.post(delApi, [record.id]).subscribe((res) => { |  | ||||||
|         //   console.log(res, 'del'); |  | ||||||
|  |  | ||||||
|         //   if (res === true || res.data === true) { |  | ||||||
|         //     this.service.msgSrv.success('删除成功!'); |  | ||||||
|         //     setTimeout(() => { |  | ||||||
|         //       this.st?.reload(); |  | ||||||
|         //     }, 500); |  | ||||||
|         //   } else { |  | ||||||
|         //     this.service.msgSrv.error('删除失败!'); |  | ||||||
|         //   } |  | ||||||
|         // }), |  | ||||||
|     }); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 删除多个实例 |  | ||||||
|    */ |  | ||||||
|   delMany(record: STData) { |  | ||||||
|     this.modal.confirm({ |  | ||||||
|       nzTitle: '<i>删除确认</i>', |  | ||||||
|       nzContent: `<b>即将删除 当前行数据,请仔细核对,避免误操作!<br>是否删除?</br>`, |  | ||||||
|       nzOnOk: () => |  | ||||||
|       console.log('') |  | ||||||
|         // this.service.http.post(this.service.$api_label_deletebatch, [record.id]).subscribe((res) => { |  | ||||||
|         //   if (res === true) { |  | ||||||
|         //     this.service.msgSrv.success('删除成功!'); |  | ||||||
|         //     this.st?.reload(); |  | ||||||
|         //   } |  | ||||||
|         // }), |  | ||||||
|     }); |  | ||||||
|     /* |  | ||||||
|     const delData = this.st.list.filter((item) => item.checked).map((item) => item.id); |  | ||||||
|     if (delData.length > 0) { |  | ||||||
|       this.modal.confirm({ |  | ||||||
|         nzTitle: '<i>删除确认</i>', |  | ||||||
|         nzContent: `<b>即将删除 <i>${delData.length}</i> 条数据,请仔细核对,避免误操作!<br>是否删除?</br>`, |  | ||||||
|         nzOnOk: () => |  | ||||||
|           this.service.delMany(delData).subscribe((res) => { |  | ||||||
|             if (res === true) { |  | ||||||
|               this.service.msgSrv.success('数据删除成功!'); |  | ||||||
|               this.st?.reload(); |  | ||||||
|             } |  | ||||||
|           }), |  | ||||||
|       }); |  | ||||||
|     } |  | ||||||
|     */ |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   // 切换Tab |   // 切换Tab | ||||||
|   changeTab(item: any) { |   changeTab(item: any) { | ||||||
|     this.tabType = item.type; |     this.tabType = item.type; | ||||||
|     console.log(item) |     this.expandToggle(false); | ||||||
|     this.sf?.reset(); |     this.sf?.reset(); | ||||||
|     // if (item.type === 3) { |     setTimeout(() => { | ||||||
|     //   this.stApi = this.service.$api_get_business_labelList; |       this.st.load(1); | ||||||
|     // } else { |     }, 100); | ||||||
|     //   this.stApi = this.service.$api_get_labelList; |  | ||||||
|     // } |  | ||||||
|     // setTimeout(() => { |  | ||||||
|     //   this.tabs.forEach((i) => (i.isActived = false)); |  | ||||||
|     //   item.isActived = !item.isActived; |  | ||||||
|     //   this.st.load(1); |  | ||||||
|     //   this.st.resetColumns(); |  | ||||||
|     // }, 500); |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   // checkType(): boolean { |   /** | ||||||
|   //   return this.mdType === 2 ? true : false; |    * 初始化数据列表 | ||||||
|   // } |    */ | ||||||
|  |   initEnterST(): STColumn[] { | ||||||
|  |     return [ | ||||||
|  |       { title: '企业名称', className: 'text-center', index: 'enterpriseName' }, | ||||||
|  |       { title: '联系人', className: 'text-center', index: 'contacter' }, | ||||||
|  |       { title: '手机号', className: 'text-center', render: 'mobile' }, | ||||||
|  |       { title: '申请时间', className: 'text-center', index: 'createTime' }, | ||||||
|  |       { | ||||||
|  |         title: '审核状态', | ||||||
|  |         className: 'text-center', | ||||||
|  |         index: 'approvalStatus', | ||||||
|  |         type: 'badge', | ||||||
|  |         badge: { | ||||||
|  |           10: { text: '待审核', color: 'processing' }, | ||||||
|  |           20: { text: '已成功', color: 'success' }, | ||||||
|  |           30: { text: '审核失败', color: 'warning' } | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         title: '常用服务', | ||||||
|  |         className: 'text-center', | ||||||
|  |         index: 'oftenUsedServices', | ||||||
|  |         type: 'enum', | ||||||
|  |         enum: { 10: '整车发货', 20: '大宗发货' } | ||||||
|  |       }, | ||||||
|  |       { title: '推广业务员', className: 'text-center', index: 'promotersTelephone' }, | ||||||
|  |       { | ||||||
|  |         title: '操作', | ||||||
|  |         fixed: 'right', | ||||||
|  |         width: '180px', | ||||||
|  |         className: 'text-center', | ||||||
|  |         buttons: [{ text: '查看', click: _record => this.View(_record) }] | ||||||
|  |       } | ||||||
|  |     ]; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   initAdminST(): STColumn[] { | ||||||
|  |     return [ | ||||||
|  |       { title: '企业名称', className: 'text-center', index: 'enterpriseName' }, | ||||||
|  |       { title: '当前管理员', className: 'text-center', index: 'contacter' }, | ||||||
|  |       { title: '当前管理员手机号', className: 'text-center', render: 'mobile' }, | ||||||
|  |       { title: '转授对象', className: 'text-center', index: 'promotersTelephone' }, | ||||||
|  |       { title: '转授对象手机号', className: 'text-center', index: 'promotersTelephone' }, | ||||||
|  |       { title: '申请时间', className: 'text-center', index: 'createTime' }, | ||||||
|  |       { | ||||||
|  |         title: '状态', | ||||||
|  |         className: 'text-center', | ||||||
|  |         index: 'approvalStatus', | ||||||
|  |         type: 'badge', | ||||||
|  |         badge: { | ||||||
|  |           10: { text: '待审核', color: 'processing' }, | ||||||
|  |           20: { text: '已成功', color: 'success' }, | ||||||
|  |           30: { text: '审核失败', color: 'warning' } | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         title: '操作', | ||||||
|  |         fixed: 'right', | ||||||
|  |         width: '180px', | ||||||
|  |         className: 'text-center', | ||||||
|  |         buttons: [{ text: '审核', click: _record => this.View(_record) }] | ||||||
|  |       } | ||||||
|  |     ]; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 初始化查询表单 | ||||||
|  |    */ | ||||||
|  |   initSF(): SFSchema { | ||||||
|  |     return { | ||||||
|  |       properties: { | ||||||
|  |         expand: { type: 'boolean', ui: { hidden: true } }, | ||||||
|  |         enterpriseName: { | ||||||
|  |           title: '企业名称', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入' | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         contactName: { | ||||||
|  |           title: '联系人', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入', | ||||||
|  |             visibleIf: { | ||||||
|  |               expand: (value: boolean) => this.tabType === 1 | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         contactName2: { | ||||||
|  |           title: '管理员', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入', | ||||||
|  |             visibleIf: { | ||||||
|  |               expand: (value: boolean) => this.tabType !== 1 | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         mobile: { | ||||||
|  |           title: '手机号', | ||||||
|  |           type: 'string', | ||||||
|  |           format: 'mobile', | ||||||
|  |           maxLength: 11, | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入' | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         lockedStatus: { | ||||||
|  |           type: 'string', | ||||||
|  |           title: '状态', | ||||||
|  |           enum: [ | ||||||
|  |             { label: '全部', value: '' }, | ||||||
|  |             { label: '正常', value: 0 }, | ||||||
|  |             { label: '冻结', value: 1 } | ||||||
|  |           ], | ||||||
|  |           default: '', | ||||||
|  |           ui: { | ||||||
|  |             widget: 'select', | ||||||
|  |             visibleIf: { | ||||||
|  |               expand: (value: boolean) => value | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -7,54 +7,82 @@ | |||||||
|       </button> |       </button> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template #content> |     <ng-template #content> | ||||||
|       <div class="user-info"> |       <nz-skeleton [nzLoading]="service.http.loading"> | ||||||
|         <div style="flex: 1"> |         <div class="user-info" nz-row> | ||||||
|          <div style="display: flex;"> |           <div nz-col nzSpan="24" class="d-flex"> | ||||||
|           <p style="padding-right: 80px; width: 400px;">申请编号:54545454{{ detailData?.shoppFeignVO?.publicity }}</p> |             <img [src]="detailData?.enterpriseLogo" /> | ||||||
|  |             <div style="flex: 1;"> | ||||||
|  |               <div nz-row> | ||||||
|  |                 <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> | ||||||
|  |                   <p style="margin-bottom: 0;">{{ detailData?.enterpriseName }}</p> | ||||||
|                 </div> |                 </div> | ||||||
|          <div style="display: flex;"> |                 <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24" class="text-right mb-sm"> | ||||||
|           <p style="padding-right: 80px; width: 400px;">申请时间:{{ detailData?.shoppFeignVO?.introduction }}</p> |                   <label style="font-size: 18px;font-weight: 600;">{{statusE[detailData?.approvalStatus] }}</label> | ||||||
|           <p >申请人:黄龙真人</p> |  | ||||||
|                 </div> |                 </div> | ||||||
|          <div> |  | ||||||
|           申请人手机号:156565656565 |  | ||||||
|               </div> |               </div> | ||||||
|          <div style="position: relative;top: -65%; |               <div nz-row> | ||||||
|          left: 75%;"> |                 <div nz-col [nzLg]="8" [nzSm]="24" [nzXs]="24"> | ||||||
|          <span>状态</span> |                   <p>{{ detailData?.unifiedSocialCreditCode }}</p> | ||||||
|          <br /> |                 </div> | ||||||
|          <span>待审核</span> |                 <div nz-col [nzLg]="8" [nzSm]="24" [nzXs]="24"> | ||||||
|          <span >审核中</span> |                   申请时间:{{detailData?.createTime}} | ||||||
|          <span>已审核</span> |                 </div> | ||||||
|  |                 <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="24" [nzXs]="24" class="d-flex" | ||||||
|  |                   style="justify-content: flex-end;"> | ||||||
|  |                   <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="auditPass()"> | ||||||
|  |                     通过 | ||||||
|  |                   </button> | ||||||
|  |                   <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="auditNo()"> | ||||||
|  |                     驳回 | ||||||
|  |                   </button> | ||||||
|  |                   <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="ratify()"> | ||||||
|  |                     修改 | ||||||
|  |                   </button> | ||||||
|                 </div> |                 </div> | ||||||
|               </div> |               </div> | ||||||
|             </div> |             </div> | ||||||
|  |           </div> | ||||||
|  |         </div> | ||||||
|  |       </nz-skeleton> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|   </page-header-wrapper> |   </page-header-wrapper> | ||||||
|   <nz-card> |   <nz-card [nzLoading]="service.http.loading"> | ||||||
|     <sv-container col="3"> |     <sv-container col="3"> | ||||||
|       <sv-title>申请人信息</sv-title> |       <sv-title>企业管理员信息</sv-title> | ||||||
|       <sv label="申请人"> |       <sv label="姓名"> | ||||||
|         {{ detailData?.contactsName }} |         {{ detailData?.adminUserInfo?.name }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="申请人手机号"> |       <sv label="手机号"> | ||||||
|         {{ detailData?.contactsPhone }} |         {{ detailData?.adminUserInfo?.mobile }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="身份证号码"> |       <sv label="身份证号"> | ||||||
|         {{ detailData?.contactsPhone }} |         {{ detailData?.contactadminUserInfo?.certificateNumber }} | ||||||
|       </sv> |       </sv> | ||||||
|     </sv-container> |     </sv-container> | ||||||
|     <sv-container col="2"> |     <sv-container col="2"> | ||||||
|       <sv label="身份证照"> |       <sv label="身份证照"> | ||||||
|         <!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> |         <app-imagelist | ||||||
|  |           [imgList]="[detailData?.adminUserInfo?.certificatePhotoFrontWatermark,detailData?.adminUserInfo?.certificatePhotoBackWatermark]"> | ||||||
|  |         </app-imagelist> | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="企业授权函"> |       <sv label="企业授权函"> | ||||||
|         <!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> |         <app-imagelist [imgList]="[detailData?.adminUserInfo?.certificatePhotoBackWatermark]"></app-imagelist> | ||||||
|       </sv> |       </sv> | ||||||
|     </sv-container> |     </sv-container> | ||||||
|     <nz-divider></nz-divider> |     <nz-divider></nz-divider> | ||||||
|     <sv-container col="3" class="mt16"> |     <sv-container col="3" class="mt16"> | ||||||
|       <sv-title>公司基本信息</sv-title> |       <sv-title> | ||||||
|  |         <label class="mr-md">企业基本信息</label> | ||||||
|  |         <label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle" | ||||||
|  |             nzTheme="fill" class="mr-xs"></i>待审核 | ||||||
|  |         </label> | ||||||
|  |         <label *ngIf="detailData?.approvalStatus===20" style="color: #52c41a;"><i nz-icon nzType="check-circle" | ||||||
|  |             nzTheme="fill" class="mr-xs"></i>审核通过 | ||||||
|  |         </label> | ||||||
|  |         <label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle" | ||||||
|  |             nzTheme="fill" class="mr-xs"></i>驳回 | ||||||
|  |         </label> | ||||||
|  |       </sv-title> | ||||||
|       <sv label="公司名称"> |       <sv label="公司名称"> | ||||||
|         {{ detailData?.enterpriseName }} |         {{ detailData?.enterpriseName }} | ||||||
|       </sv> |       </sv> | ||||||
| @ -76,12 +104,14 @@ | |||||||
|           {{ detailData?.operatingStartTime }} 至 {{ detailData?.operatingEndTime }} |           {{ detailData?.operatingStartTime }} 至 {{ detailData?.operatingEndTime }} | ||||||
|         </div> |         </div> | ||||||
|         <div *ngIf="!detailData?.operatingStartTime && !detailData?.operatingEndTime">长期</div> |         <div *ngIf="!detailData?.operatingStartTime && !detailData?.operatingEndTime">长期</div> | ||||||
|         <div *ngIf="!!detailData?.operatingStartTime && !detailData?.operatingEndTime">{{ detailData?.operatingStartTime }} 至 长期</div> |         <div *ngIf="!!detailData?.operatingStartTime && !detailData?.operatingEndTime">{{ detailData?.operatingStartTime | ||||||
|  |           }} 至 长期</div> | ||||||
|       </sv> |       </sv> | ||||||
|     </sv-container> |     </sv-container> | ||||||
|     <sv-container col="2" class="mt16"> |     <sv-container col="2" class="mt16"> | ||||||
|       <sv label="公司所在地" col="3"> |       <sv label="公司所在地" col="3"> | ||||||
|         {{ detailData?.enterpriseAddressCodeStr }} |         {{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{ | ||||||
|  |         detailData?.fullRegionVO?.areaName }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="公司详细地址"> |       <sv label="公司详细地址"> | ||||||
|         {{ detailData?.enterpriseAddress }} |         {{ detailData?.enterpriseAddress }} | ||||||
| @ -91,63 +121,78 @@ | |||||||
|       <sv label="经营范围"> |       <sv label="经营范围"> | ||||||
|         {{ detailData?.businessScope }} |         {{ detailData?.businessScope }} | ||||||
|       </sv> |       </sv> | ||||||
|  |     </sv-container> | ||||||
|  |     <sv-container col="2" class="mt16"> | ||||||
|  |       <sv label="税务机关"> | ||||||
|  |         {{ detailData?.taxAuthority }} | ||||||
|  |       </sv> | ||||||
|       <sv label="营业执照"> |       <sv label="营业执照"> | ||||||
|         <!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> |         <app-imagelist [imgList]="[detailData?.licensePhotoWatermark]"></app-imagelist> | ||||||
|       </sv> |       </sv> | ||||||
|     </sv-container> |     </sv-container> | ||||||
|     <nz-divider></nz-divider> |     <nz-divider></nz-divider> | ||||||
|     <sv-container col="3" class="mt16"> |     <sv-container col="3" class="mt16"> | ||||||
|       <sv-title>法人信息</sv-title> |       <sv-title>企业法人信息</sv-title> | ||||||
|       <sv label="法定代表人"> |       <sv label="法定代表人"> | ||||||
|         {{ detailData?.name }} |         {{ detailData?.legalPersonIdentityVO?.name }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="身份证号"> |       <sv label="身份证号码"> | ||||||
|         {{ detailData?.certificateNumber }} |         {{ detailData?.legalPersonIdentityVO?.certificateNumber }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="身份证有效期"> |       <sv label="身份证有效期"> | ||||||
|         {{ detailData?.validStartTime }} - |         {{ detailData?.legalPersonIdentityVO?.validStartTime }} - | ||||||
|         {{ detailData?.validEndTime ? detailData?.validEndTime : '长期' }} |         {{ detailData?.legalPersonIdentityVO?.validEndTime || '长期' }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="身份证照" col="1"> |       <sv label="身份证照" col="1"> | ||||||
|         <!-- <app-imagelist [imgList]="detailData?.certificatePhoto"></app-imagelist> --> |         <app-imagelist | ||||||
|  |           [imgList]="[detailData?.legalPersonIdentityVO?.certificatePhotoFrontWatermark,detailData?.legalPersonIdentityVO?.certificatePhotoBackWatermark]"> | ||||||
|  |         </app-imagelist> | ||||||
|  |       </sv> | ||||||
|  |     </sv-container> | ||||||
|  |     <nz-divider></nz-divider> | ||||||
|  |     <sv-container col="3" class="mt16"> | ||||||
|  |       <sv-title>企业开票信息</sv-title> | ||||||
|  |       <sv label="开户银行"> | ||||||
|  |         {{ detailData?.createBank }} | ||||||
|  |       </sv> | ||||||
|  |       <sv label="银行账户"> | ||||||
|  |         {{ detailData?.bankAccount }} | ||||||
|  |       </sv> | ||||||
|  |       <sv label="注册电话"> | ||||||
|  |         {{ detailData?.registerPhone }} | ||||||
|  |       </sv> | ||||||
|  |       <sv label="注册地址"> | ||||||
|  |         {{ detailData?.registerAddress }} | ||||||
|       </sv> |       </sv> | ||||||
|     </sv-container> |     </sv-container> | ||||||
|     <div> |  | ||||||
|     <div |  | ||||||
|     style=" |  | ||||||
|       position: sticky; |  | ||||||
|       bottom: 0; |  | ||||||
|       margin-top: 0.5rem; |  | ||||||
|       padding-top: 0.5rem; |  | ||||||
|       text-align: right; |  | ||||||
|       background-color: #fff; |  | ||||||
|       border-top: 1px solid #eee; |  | ||||||
|     " |  | ||||||
|   > |  | ||||||
|     <button nz-button nzType="default" nzDanger  (click)="auditPass()">审核通过</button> |  | ||||||
|     <button nz-button nzType="default" nzDanger  (click)="auditNo()">驳回审核</button> |  | ||||||
|     <button nz-button nzType="default" nzDanger  (click)="ratify()">修改</button> |  | ||||||
|   </div> |  | ||||||
|     </div> |  | ||||||
|   </nz-card> |   </nz-card> | ||||||
| </ng-container> | </ng-container> | ||||||
| <nz-modal [(nzVisible)]="isVisible"   [nzFooter]="nzModalFooter" nzTitle="审核通过" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('suppliersType')"> |  | ||||||
|   <ng-container *nzModalContent> |  | ||||||
|     <sf #sf [schema]="schema" [ui]="ui" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf> |  | ||||||
|   </ng-container> |  | ||||||
|  |  | ||||||
|   <ng-template #nzModalFooter> | <ng-template #approvedModal> | ||||||
|     <button nz-button nzType="default" (click)="handleCancel('suppliersType')">取消</button> |   <div nz-row nzGutter="8"> | ||||||
|     <button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button> |     <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||||
|  |       <se [col]="1" label="公司名称"> | ||||||
|  |         {{ detailData?.enterpriseName }} | ||||||
|  |       </se> | ||||||
|  |       <se [col]="1" label="网络货运人" required > | ||||||
|  |         <nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter"> | ||||||
|  |           <nz-option [nzValue]="1" nzLabel="Jack"></nz-option> | ||||||
|  |           <nz-option [nzValue]="2" nzLabel="Lucy"></nz-option> | ||||||
|  |         </nz-select> | ||||||
|  |       </se> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
| </ng-template> | </ng-template> | ||||||
| </nz-modal> |  | ||||||
| <nz-modal [(nzVisible)]="isVisibleNo"   [nzFooter]="nzModalFooter2" nzTitle="审核驳回" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('suppliersTypeNo')"> |  | ||||||
|   <ng-container *nzModalContent> |  | ||||||
|     <sf #sf2 [schema]="schema2" [ui]="ui2" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf> |  | ||||||
|   </ng-container> |  | ||||||
|  |  | ||||||
|   <ng-template #nzModalFooter2> | <ng-template #redectModal> | ||||||
|     <button nz-button nzType="default" (click)="handleCancel('suppliersTypeNo')">取消</button> |   <div nz-row nzGutter="8"> | ||||||
|     <button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button> |     <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||||
|  |       <se [col]="1" label="公司名称"> | ||||||
|  |         {{ detailData?.enterpriseName }} | ||||||
|  |       </se> | ||||||
|  |       <se [col]="1" label="备注" required > | ||||||
|  |         <textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" [(ngModel)]="approvalOpinion"></textarea> | ||||||
|  |       </se> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
| </ng-template> | </ng-template> | ||||||
| </nz-modal> |  | ||||||
|  | |||||||
| @ -1,31 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @Author: your name |  | ||||||
|  * @Date: 2021-11-30 10:25:50 |  | ||||||
|  * @LastEditTime: 2021-11-30 10:26:29 |  | ||||||
|  * @LastEditors: your name |  | ||||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |  | ||||||
|  * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\enterprise-audit\view\view.component.spec.ts |  | ||||||
|  */ |  | ||||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |  | ||||||
| import { FreightComponentsEnterpriseAuditViewComponent } from './view.component'; |  | ||||||
|  |  | ||||||
| describe('FreightComponentsEnterpriseAuditViewComponent', () => { |  | ||||||
|   let component: FreightComponentsEnterpriseAuditViewComponent; |  | ||||||
|   let fixture: ComponentFixture<FreightComponentsEnterpriseAuditViewComponent>; |  | ||||||
|  |  | ||||||
|   beforeEach(async(() => { |  | ||||||
|     TestBed.configureTestingModule({ |  | ||||||
|       declarations: [FreightComponentsEnterpriseAuditViewComponent], |  | ||||||
|     }).compileComponents(); |  | ||||||
|   })); |  | ||||||
|  |  | ||||||
|   beforeEach(() => { |  | ||||||
|     fixture = TestBed.createComponent(FreightComponentsEnterpriseAuditViewComponent); |  | ||||||
|     component = fixture.componentInstance; |  | ||||||
|     fixture.detectChanges(); |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   it('should create', () => { |  | ||||||
|     expect(component).toBeTruthy(); |  | ||||||
|   }); |  | ||||||
| }); |  | ||||||
| @ -4,113 +4,59 @@ import { STColumn, STComponent } from '@delon/abc/st'; | |||||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | import { NzMessageService } from 'ng-zorro-antd/message'; | ||||||
| import { UsermanageService } from '../../../../services/usercenter.service'; | import { UsermanageService } from '../../../../services/usercenter.service'; | ||||||
| import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFUploadWidgetSchema, SFSelectWidgetSchema, SFTextWidgetSchema, SFTagWidgetSchema } from '@delon/form'; | import { | ||||||
|  |   SFComponent, | ||||||
|  |   SFSchema, | ||||||
|  |   SFDateWidgetSchema, | ||||||
|  |   SFUISchema, | ||||||
|  |   SFUploadWidgetSchema, | ||||||
|  |   SFSelectWidgetSchema, | ||||||
|  |   SFTextWidgetSchema, | ||||||
|  |   SFTagWidgetSchema | ||||||
|  | } from '@delon/form'; | ||||||
| import { Observable, Observer } from 'rxjs'; | import { Observable, Observer } from 'rxjs'; | ||||||
|  | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-Freight-components-EnterpriseAudit-view', |   selector: 'app-Freight-components-EnterpriseAudit-view', | ||||||
|   templateUrl: './view.component.html', |   templateUrl: './view.component.html', | ||||||
|   styleUrls: ['./view.component.less'], |   styleUrls: ['./view.component.less'] | ||||||
| }) | }) | ||||||
| export class FreightComponentsEnterpriseAuditViewComponent implements OnInit { | export class FreightComponentsEnterpriseAuditViewComponent implements OnInit { | ||||||
|   i: any; |   @ViewChild('approvedModal', { static: false }) | ||||||
|   url = `/rule?_allow_anonymous=true`; |   approvedModal!: any; | ||||||
|   @ViewChild('st', { static: false }) st!: STComponent; |   @ViewChild('redectModal', { static: false }) | ||||||
|   detailData: any; |   redectModal!: any; | ||||||
|   isVisible = false; |  | ||||||
|   isVisibleNo = false; |  | ||||||
|   modalTitle = '有效期'; |  | ||||||
|   modalName = ''; |  | ||||||
|   ui!: SFUISchema; |  | ||||||
|   ui2!: SFUISchema; |  | ||||||
|   schema!: SFSchema; |  | ||||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; |  | ||||||
|   schema2!: SFSchema; |  | ||||||
|   @ViewChild('sf2', { static: false }) sf2!: SFComponent; |  | ||||||
|   validData: any = ['suppliersType']; |  | ||||||
|   suppliersData: any = {}; |  | ||||||
|  |  | ||||||
|   constructor( |   approvalOpinion = ''; | ||||||
|     private http: _HttpClient, |   networkTransporter = null; | ||||||
|     private modal: ModalHelper, |  | ||||||
|     public service: UsermanageService, |   detailData: any; | ||||||
|     private route: ActivatedRoute, |  | ||||||
|     private modalHelper: ModalHelper, |   statusE: any = { | ||||||
|     private msgSrv: NzMessageService, |     10: '待审核', | ||||||
|   ) {} |     20: '审核通过', | ||||||
|  |     30: '审核失败' | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   isEdit = false; | ||||||
|  |  | ||||||
|  |   constructor(private nzModalService: NzModalService, public service: UsermanageService, private route: ActivatedRoute) {} | ||||||
|  |  | ||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|     console.log(this.route.snapshot); |     this.initData(); | ||||||
|     // this.initData(); |  | ||||||
|     this.initSF(); |  | ||||||
|     this.initSFNo(); |  | ||||||
|     // this.launchSign(); |     // this.launchSign(); | ||||||
|   } |   } | ||||||
|   /** |  | ||||||
|    * 初始化查询表单 |  | ||||||
|    */ |  | ||||||
|   initSF() { |  | ||||||
|     this.schema = { |  | ||||||
|       properties: { |  | ||||||
|         '公司名称': { type: 'number', ui: { widget: 'text', defaultText: '深圳市星链供应链云科技有限公' } as SFTextWidgetSchema }, |  | ||||||
|         status: { |  | ||||||
|           type: 'string', |  | ||||||
|           title: '税源地', |  | ||||||
|           enum: [ |  | ||||||
|             { label: '待支付', value: 'WAIT_BUYER_PAY', otherData: 1 }, |  | ||||||
|             { label: '已支付', value: 'TRADE_SUCCESS' }, |  | ||||||
|             { label: '交易完成', value: 'TRADE_FINISHED' }, |  | ||||||
|           ], |  | ||||||
|           default: 'WAIT_BUYER_PAY', |  | ||||||
|           ui: { |  | ||||||
|             widget: 'select', |  | ||||||
|             change: (value, orgData) => console.log(value, orgData), |  | ||||||
|           } as SFSelectWidgetSchema, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       required: ['status'], |  | ||||||
|     }; |  | ||||||
|     this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; |  | ||||||
|   } |  | ||||||
|   initSFNo() { |  | ||||||
|     this.schema2 = { |  | ||||||
|       properties: { |  | ||||||
|         '公司名称': { type: 'number', ui: { widget: 'text', defaultText: '深圳市星链供应链云科技有限公' } as SFTextWidgetSchema }, |  | ||||||
|         roleDescription: { |  | ||||||
|           title: '地址', |  | ||||||
|           type: 'string', |  | ||||||
|           maxLength: 30, |  | ||||||
|           ui: { |  | ||||||
|             placeholder: '请输入地址', |  | ||||||
|             widget: 'textarea', |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|         like: { |  | ||||||
|           type: 'number', |  | ||||||
|           title: '兴趣', |  | ||||||
|           enum: [ |  | ||||||
|             { value: 1, label: '电影' }, |  | ||||||
|             { value: 2, label: '书' }, |  | ||||||
|             { value: 3, label: '旅行' }, |  | ||||||
|           ], |  | ||||||
|           ui: { |  | ||||||
|             widget: 'tag', |  | ||||||
|           } as SFTagWidgetSchema, |  | ||||||
|           default: [1, 2], |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       required: ['roleDescription'], |  | ||||||
|     }; |  | ||||||
|     this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   async initData() { |   initData() { | ||||||
|     console.log(this.route.snapshot, 'this.route.snapshot'); |     this.service | ||||||
|  |       .request(this.service.$api_get_freight_detail, { | ||||||
|     const params = { |         id: this.route.snapshot.params.id | ||||||
|       tenantId: this.route.snapshot.params.id, |       }) | ||||||
|       // tenantId: this.route.snapshot.queryParams.tenantId, |       .subscribe(res => { | ||||||
|     }; |         if (res) { | ||||||
|     const res = await this.service.asyncRequest(this.service.$api_get_one, params); |           this.detailData = res; | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|     // // 商品资质 |     // // 商品资质 | ||||||
|     // if (res.enterpriseBusinessJson) { |     // if (res.enterpriseBusinessJson) { | ||||||
|     //   res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : []; |     //   res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : []; | ||||||
| @ -122,24 +68,24 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit { | |||||||
|     // // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate); |     // // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate); | ||||||
|  |  | ||||||
|     // 法人身份证证件 |     // 法人身份证证件 | ||||||
|     const imagelist = []; |     // const imagelist = []; | ||||||
|     imagelist.push(res?.certificatePhotoFront); |     // imagelist.push(res?.certificatePhotoFront); | ||||||
|     imagelist.push(res?.certificatePhotoBack); |     // imagelist.push(res?.certificatePhotoBack); | ||||||
|     res.certificatePhoto = imagelist; |     // res.certificatePhoto = imagelist; | ||||||
|  |  | ||||||
|     // 营业执照 |     // // 营业执照 | ||||||
|     res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate |     // res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate | ||||||
|       ? res.enterpriseQualificationCertificate.split(',') |     //   ? res.enterpriseQualificationCertificate.split(',') | ||||||
|       : []; |     //   : []; | ||||||
|  |  | ||||||
|     // 返回所在地 |     // // 返回所在地 | ||||||
|     res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode); |     // res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode); | ||||||
|  |  | ||||||
|     this.detailData = res; |     // this.detailData = res; | ||||||
|     this.suppliersData = { |     // this.suppliersData = { | ||||||
|       suppliersType: res?.suppliersType, |     //   suppliersType: res?.suppliersType, | ||||||
|       externalSuppliersId: res?.externalSuppliersId, |     //   externalSuppliersId: res?.externalSuppliersId | ||||||
|     }; |     // }; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
| @ -148,7 +94,7 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit { | |||||||
|    */ |    */ | ||||||
|   async getRegionFullName(code: any) { |   async getRegionFullName(code: any) { | ||||||
|     const params = { |     const params = { | ||||||
|       regionCode: code, |       regionCode: code | ||||||
|     }; |     }; | ||||||
|     const res = await this.service.asyncRequest(this.service.$api_get_one, params, 'POST', true); |     const res = await this.service.asyncRequest(this.service.$api_get_one, params, 'POST', true); | ||||||
|     // if (res && res.regionFullName) { |     // if (res && res.regionFullName) { | ||||||
| @ -157,36 +103,57 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit { | |||||||
|     // } |     // } | ||||||
|     return res && res.regionFullName; |     return res && res.regionFullName; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   auditPass() { | ||||||
|  |     this.networkTransporter = null; | ||||||
|  |     this.nzModalService.create({ | ||||||
|  |       nzTitle: '审核通过', | ||||||
|  |       nzContent: this.approvedModal, | ||||||
|  |       nzOnOk: () => { | ||||||
|  |         if (!this.networkTransporter) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         this.auditEnterprise(20); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |   auditNo() { | ||||||
|  |     this.approvalOpinion = ''; | ||||||
|  |     this.nzModalService.create({ | ||||||
|  |       nzTitle: '审核驳回', | ||||||
|  |       nzContent: this.redectModal, | ||||||
|  |       nzOnOk: () => { | ||||||
|  |         if (!this.approvalOpinion) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         this.auditEnterprise(30); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   private auditEnterprise(status: number) { | ||||||
|  |     this.service | ||||||
|  |       .request(this.service.$api_audit_freight, { | ||||||
|  |         approvalStatus: status, | ||||||
|  |         id: this.detailData.id, | ||||||
|  |         approvalOpinion: this.approvalOpinion, | ||||||
|  |         networkTransporter: this.networkTransporter | ||||||
|  |       }) | ||||||
|  |       .subscribe(res => { | ||||||
|  |         if (res) { | ||||||
|  |           this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功'); | ||||||
|  |         } | ||||||
|  |         this.initData(); | ||||||
|  |       }); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ratify() { | ||||||
|  |     this.isEdit = true; | ||||||
|  |   } | ||||||
|  |    | ||||||
|   goBack() { |   goBack() { | ||||||
|     window.history.go(-1); |     window.history.go(-1); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   handleCancel(name: any) { |  | ||||||
|     if (name === 'suppliersTypeNo') { |  | ||||||
|       this.isVisibleNo = false; |  | ||||||
|     } else { |  | ||||||
|       this.isVisible = false; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   handleOK() { |  | ||||||
|     const params: any = { |  | ||||||
|       tenantId: this.route.snapshot.params.id, |  | ||||||
|       // tenantId: this.route.snapshot.queryParams.tenantId, |  | ||||||
|     }; |  | ||||||
|     console.log(this.sf.value) |  | ||||||
|     // this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => { |  | ||||||
|  |  | ||||||
|     // }); |  | ||||||
|   } |  | ||||||
|   auditPass() { |  | ||||||
|     this.isVisible = true |  | ||||||
|   } |  | ||||||
|   auditNo() { |  | ||||||
|     this.isVisibleNo = true |  | ||||||
|   } |  | ||||||
|   ratify() { |  | ||||||
|  |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ | |||||||
|     </button> |     </button> | ||||||
|   </ng-template> |   </ng-template> | ||||||
|   <ng-template #content> |   <ng-template #content> | ||||||
|  |     <nz-skeleton [nzLoading]="service.http.loading"> | ||||||
|       <div class="user-info" nz-row> |       <div class="user-info" nz-row> | ||||||
|         <div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex"> |         <div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex"> | ||||||
|           <img [src]="detailData?.enterpriseLogo" /> |           <img [src]="detailData?.enterpriseLogo" /> | ||||||
| @ -51,6 +52,7 @@ | |||||||
|           </button> |           </button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|  |     </nz-skeleton> | ||||||
|   </ng-template> |   </ng-template> | ||||||
|  |  | ||||||
|   <ng-template #frozen> |   <ng-template #frozen> | ||||||
| @ -74,7 +76,7 @@ | |||||||
|   </ng-template> |   </ng-template> | ||||||
| </page-header-wrapper> | </page-header-wrapper> | ||||||
|  |  | ||||||
| <nz-card> | <nz-card [nzLoading]="service.http.loading"> | ||||||
|   <sv-container col="3"> |   <sv-container col="3"> | ||||||
|     <sv-title>企业管理员信息</sv-title> |     <sv-title>企业管理员信息</sv-title> | ||||||
|     <sv label="姓名"> |     <sv label="姓名"> | ||||||
| @ -86,13 +88,15 @@ | |||||||
|     <sv label="身份证号"> |     <sv label="身份证号"> | ||||||
|       {{ detailData?.contactadminUserInfo?.certificateNumber }} |       {{ detailData?.contactadminUserInfo?.certificateNumber }} | ||||||
|     </sv> |     </sv> | ||||||
|  |   </sv-container> | ||||||
|  |   <sv-container col="2"> | ||||||
|     <sv label="身份证照"> |     <sv label="身份证照"> | ||||||
|       <img [src]="detailData?.adminUserInfo?.certificatePhotoFrontWatermark" alt=""> |       <app-imagelist | ||||||
|       <img [src]="detailData?.adminUserInfo?.certificatePhotoBackWatermark" alt=""> |         [imgList]="[detailData?.adminUserInfo?.certificatePhotoFrontWatermark,detailData?.adminUserInfo?.certificatePhotoBackWatermark]"> | ||||||
|  |       </app-imagelist> | ||||||
|     </sv> |     </sv> | ||||||
|     <sv label="企业授权函"> |     <sv label="企业授权函"> | ||||||
|       <img [src]="detailData?.adminUserInfo?.certificatePhotoBackWatermark" alt=""> |       <app-imagelist [imgList]="[detailData?.adminUserInfo?.certificatePhotoBackWatermark]"></app-imagelist> | ||||||
|       <!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> |  | ||||||
|     </sv> |     </sv> | ||||||
|   </sv-container> |   </sv-container> | ||||||
|   <nz-divider></nz-divider> |   <nz-divider></nz-divider> | ||||||
| @ -136,7 +140,8 @@ | |||||||
|   </sv-container> |   </sv-container> | ||||||
|   <sv-container col="2" class="mt16"> |   <sv-container col="2" class="mt16"> | ||||||
|     <sv label="公司所在地" col="3"> |     <sv label="公司所在地" col="3"> | ||||||
|       {{ detailData?.enterpriseAddressCodeStr }} |       {{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{ | ||||||
|  |       detailData?.fullRegionVO?.areaName }} | ||||||
|     </sv> |     </sv> | ||||||
|     <sv label="公司详细地址"> |     <sv label="公司详细地址"> | ||||||
|       {{ detailData?.enterpriseAddress }} |       {{ detailData?.enterpriseAddress }} | ||||||
| @ -152,7 +157,7 @@ | |||||||
|       {{ detailData?.taxAuthority }} |       {{ detailData?.taxAuthority }} | ||||||
|     </sv> |     </sv> | ||||||
|     <sv label="营业执照"> |     <sv label="营业执照"> | ||||||
|       <!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> |       <app-imagelist [imgList]="[detailData?.licensePhotoWatermark]"></app-imagelist> | ||||||
|     </sv> |     </sv> | ||||||
|   </sv-container> |   </sv-container> | ||||||
|   <nz-divider></nz-divider> |   <nz-divider></nz-divider> | ||||||
| @ -169,7 +174,9 @@ | |||||||
|       {{ detailData?.legalPersonIdentityVO?.validEndTime || '长期' }} |       {{ detailData?.legalPersonIdentityVO?.validEndTime || '长期' }} | ||||||
|     </sv> |     </sv> | ||||||
|     <sv label="身份证照" col="1"> |     <sv label="身份证照" col="1"> | ||||||
|       <!-- <app-imagelist [imgList]="detailData?.certificatePhoto"></app-imagelist> --> |       <app-imagelist | ||||||
|  |         [imgList]="[detailData?.legalPersonIdentityVO?.certificatePhotoFrontWatermark,detailData?.legalPersonIdentityVO?.certificatePhotoBackWatermark]"> | ||||||
|  |       </app-imagelist> | ||||||
|     </sv> |     </sv> | ||||||
|   </sv-container> |   </sv-container> | ||||||
|   <nz-divider></nz-divider> |   <nz-divider></nz-divider> | ||||||
|  | |||||||
| @ -12,29 +12,10 @@ import { UsermanageService } from '../../../../services/usercenter.service'; | |||||||
|   styleUrls: ['./detail.component.less'] |   styleUrls: ['./detail.component.less'] | ||||||
| }) | }) | ||||||
| export class FreightComponentsListDetailComponent implements OnInit { | export class FreightComponentsListDetailComponent implements OnInit { | ||||||
|   i: any; |  | ||||||
|   url = `/rule?_allow_anonymous=true`; |  | ||||||
|   @ViewChild('st', { static: false }) st!: STComponent; |  | ||||||
|   detailData: any; |   detailData: any; | ||||||
|   isShow = false; |  | ||||||
|   modalTitle = '有效期'; |  | ||||||
|   modalName = ''; |  | ||||||
|   ui!: SFUISchema; |  | ||||||
|   schema!: SFSchema; |  | ||||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; |  | ||||||
|   schema1!: SFSchema; |  | ||||||
|   @ViewChild('sf1', { static: false }) sf1!: SFComponent; |  | ||||||
|   validData: any = ['suppliersType']; |  | ||||||
|   suppliersData: any = {}; |   suppliersData: any = {}; | ||||||
|  |  | ||||||
|   constructor( |   constructor(public service: UsermanageService, private route: ActivatedRoute) {} | ||||||
|     private http: _HttpClient, |  | ||||||
|     private modal: ModalHelper, |  | ||||||
|     public service: UsermanageService, |  | ||||||
|     private route: ActivatedRoute, |  | ||||||
|     private modalHelper: ModalHelper, |  | ||||||
|     private msgSrv: NzMessageService |  | ||||||
|   ) {} |  | ||||||
|  |  | ||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|     this.initData(); |     this.initData(); | ||||||
| @ -96,11 +77,6 @@ export class FreightComponentsListDetailComponent implements OnInit { | |||||||
|     // } |     // } | ||||||
|     return res && res.regionFullName; |     return res && res.regionFullName; | ||||||
|   } |   } | ||||||
|   add() { |  | ||||||
|     // this.modal |  | ||||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) |  | ||||||
|     //   .subscribe(() => this.st.reload()); |  | ||||||
|   } |  | ||||||
|   goBack() { |   goBack() { | ||||||
|     window.history.go(-1); |     window.history.go(-1); | ||||||
|   } |   } | ||||||
| @ -126,6 +102,10 @@ export class FreightComponentsListDetailComponent implements OnInit { | |||||||
|         } |         } | ||||||
|       }); |       }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 支付权限 | ||||||
|  |    */ | ||||||
|   PayOrResume(type: number) { |   PayOrResume(type: number) { | ||||||
|     this.service.http |     this.service.http | ||||||
|       .post(this.service.$api_lock_freight, { |       .post(this.service.$api_lock_freight, { | ||||||
|  | |||||||
| @ -1,82 +1,97 @@ | |||||||
| <!-- |  | ||||||
|  * @Author: your name |  | ||||||
|  * @Date: 2021-11-30 15:09:49 |  | ||||||
|  * @LastEditTime: 2021-11-30 16:28:26 |  | ||||||
|  * @LastEditors: Please set LastEditors |  | ||||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |  | ||||||
|  * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\user\detail\detail.component.html |  | ||||||
| --> |  | ||||||
| <ng-container> | <ng-container> | ||||||
|   <!-- 页头 --> |   <!-- 页头 --> | ||||||
|   <page-header-wrapper [title]="'用户列表详情'" [logo]="logo" [content]="content"> |   <page-header-wrapper [title]="'员工详情'" [logo]="logo" [content]="content"> | ||||||
|     <ng-template #logo> |     <ng-template #logo> | ||||||
|       <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> |       <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> | ||||||
|         <i nz-icon nzType="left" nzTheme="outline"></i> |         <i nz-icon nzType="left" nzTheme="outline"></i> | ||||||
|       </button> |       </button> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template #content> |     <ng-template #content> | ||||||
|       <div class="user-info"> |       <nz-skeleton [nzLoading]="service.http.loading"> | ||||||
|         <div style="flex: 1"> |         <div class="user-info" nz-row> | ||||||
|          <div style="display: flex;"> |           <div nz-col nzSpan="24" class="d-flex"> | ||||||
|           <p style="padding-right: 80px; width: 400px; font-size: 20px;">申请编号:{{ detailData?.shoppFeignVO?.publicity }}</p> |             <img [src]="detailData?.enterpriseLogo" /> | ||||||
|  |             <div style="flex: 1;"> | ||||||
|  |               <div nz-row> | ||||||
|  |                 <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> | ||||||
|  |                   <p style="margin-bottom: 0;">{{ detailData?.enterpriseName }} | ||||||
|  |                     <nz-badge nzStatus="success" nzText="正常" *ngIf="detailData?.stateLocked" class="ml-sm"></nz-badge> | ||||||
|  |                     <nz-badge nzStatus="error" nzText="冻结" *ngIf="!detailData?.stateLocked" class="ml-sm"></nz-badge> | ||||||
|  |                   </p> | ||||||
|                 </div> |                 </div> | ||||||
|          <div style="display: flex;"> |  | ||||||
|           <p style="padding-right: 80px; width: 400px;">申请时间{{ detailData?.shoppFeignVO?.introduction }}</p> |  | ||||||
|           <p >申请人:黄龙真人</p> |  | ||||||
|               </div> |               </div> | ||||||
|          <div> |               <div nz-row> | ||||||
|           申请人手机号:6846846416541 |                 <div nz-col [nzLg]="8" [nzSm]="24" [nzXs]="24"> | ||||||
|  |                   <p>手机号:{{ detailData?.phone }}</p> | ||||||
|                 </div> |                 </div> | ||||||
|          <div style="position: relative;top: -65%; |                 <div nz-col [nzLg]="8" [nzSm]="24" [nzXs]="24"> | ||||||
|          left: 85%;"> |                   申请时间:{{detailData?.createTime}} | ||||||
|         <span style="font-size: 12px;">状态</span> |                 </div> | ||||||
|         <br /> |                 <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="24" [nzXs]="24" class="d-flex" | ||||||
|         <span>待审核</span> |                   style="justify-content: flex-end;"> | ||||||
|  |                   <button [nzLoading]="service.http.loading" nz-button nzType="primary" nzGhost (click)="userAction(1)"> | ||||||
|  |                     启用 | ||||||
|  |                   </button> | ||||||
|  |                   <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="userAction(0)"> | ||||||
|  |                     冻结 | ||||||
|  |                   </button> | ||||||
|                 </div> |                 </div> | ||||||
|               </div> |               </div> | ||||||
|             </div> |             </div> | ||||||
|  |           </div> | ||||||
|  |         </div> | ||||||
|  |       </nz-skeleton> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|   </page-header-wrapper> |   </page-header-wrapper> | ||||||
|   <nz-card> |  | ||||||
|     <sv-container col="1"> |   <nz-card [nzLoading]="service.http.loading"> | ||||||
|       <sv-title>申请人信息</sv-title> |     <sv-container col="2"> | ||||||
|  |       <sv-title>个人信息 | ||||||
|  |         <div style="float: right;"> | ||||||
|  |           <button nz-button nzType="default" nzDanger (click)="auditPass()">审核通过</button> | ||||||
|  |           <button nz-button nzType="default" nzDanger (click)="auditNo()">驳回审核</button> | ||||||
|  |           <button nz-button nzType="default" nzDanger (click)="ratify()">修改</button> | ||||||
|  |         </div> | ||||||
|  |       </sv-title> | ||||||
|       <sv label="姓名"> |       <sv label="姓名"> | ||||||
|         {{ detailData?.contactsName }} |         {{ detailData?.contactsName }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="身份证号码"> |       <sv label="身份证号码"> | ||||||
|         {{ detailData?.contactsPhone }} |         {{ detailData?.contactsPhone }} | ||||||
|       </sv> |       </sv> | ||||||
|       <sv label="企业授权函"> |       <sv label="身份证照"> | ||||||
|         <!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> |         <app-imagelist | ||||||
|        <div style="float: right;"> |           [imgList]="[detailData?.legalPersonIdentityVO?.certificatePhotoFrontWatermark,detailData?.legalPersonIdentityVO?.certificatePhotoBackWatermark]"> | ||||||
|         <button nz-button nzType="default" nzDanger  (click)="auditPass()">审核通过</button> |         </app-imagelist> | ||||||
|         <button nz-button nzType="default" nzDanger  (click)="auditNo()">驳回审核</button> |  | ||||||
|         <button nz-button nzType="default" nzDanger  (click)="ratify()">修改</button> |  | ||||||
|        </div> |  | ||||||
|       </sv> |       </sv> | ||||||
|     </sv-container> |     </sv-container> | ||||||
|     <nz-divider></nz-divider> |     <nz-divider></nz-divider> | ||||||
|     <sv-container col="3" class="mt16"> |     <sv-container col="3" class="mt16"> | ||||||
|       <sv-title>关联企业</sv-title> |       <sv-title>关联企业</sv-title> | ||||||
|       <st |       <!-- <st #st [bordered]="true" [columns]="columns" [data]="detailData.goodsList" [ngStyle]="{ margin: '1rem 0' }" | ||||||
|       #st |         multiSort size="small" [page]="{ show: false }"> | ||||||
|       [bordered]="true" |       </st> --> | ||||||
|       [columns]="columns" |  | ||||||
|       [data]="detailData.goodsList" |  | ||||||
|       [ngStyle]="{ margin: '1rem 0' }" |  | ||||||
|       multiSort |  | ||||||
|       size="small" |  | ||||||
|       [page]="{ show: false }" |  | ||||||
|     > |  | ||||||
|     </st> |  | ||||||
|     </sv-container> |     </sv-container> | ||||||
|  |  | ||||||
|   </nz-card> |   </nz-card> | ||||||
| </ng-container> | </ng-container> | ||||||
| <nz-modal [(nzVisible)]="isVisible" nzTitle="类型" (nzOnOk)="handleOK('suppliersType')"> |  | ||||||
|   <sf #sf1 [schema]="schema1" [ui]="ui" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf> | <ng-template #redectModal> | ||||||
|   <div *nzModalFooter> |   <div nz-row nzGutter="8"> | ||||||
|     <button nz-button nzType="default" (click)="handleCancel('suppliersType')">取消</button> |     <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||||
|     <button nz-button nzType="primary" (click)="handleOK('suppliersType')" [disabled]="!sf1.valid">确认</button> |       <se [col]="1" label="姓名"> | ||||||
|  |         {{ detailData?.enterpriseName }} | ||||||
|  |       </se> | ||||||
|  |       <se [col]="1" label="备注" required> | ||||||
|  |         <textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" | ||||||
|  |           [(ngModel)]="approvalOpinion.remark"></textarea> | ||||||
|  |       </se> | ||||||
|  |       <se [col]="1" label="可选理由"> | ||||||
|  |         <nz-tag *ngFor="let tag of reasonTags" nzColor="default" nzMode="checkable" | ||||||
|  |           [nzChecked]="approvalOpinion?.reason===tag" (nzCheckedChange)="approvalOpinion.reason=tag"> | ||||||
|  |           {{ tag }} | ||||||
|  |         </nz-tag> | ||||||
|  |       </se> | ||||||
|     </div> |     </div> | ||||||
| </nz-modal> |   </div> | ||||||
|  | </ng-template> | ||||||
| @ -4,279 +4,87 @@ import { STColumn, STComponent } from '@delon/abc/st'; | |||||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | import { NzMessageService } from 'ng-zorro-antd/message'; | ||||||
|  | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| import { UsermanageService } from '../../../../services/usercenter.service'; | import { UsermanageService } from '../../../../services/usercenter.service'; | ||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-supplier-components-list-view', |   selector: 'app-supplier-components-list-view', | ||||||
|   templateUrl: './detail.component.html', |   templateUrl: './detail.component.html', | ||||||
|   styleUrls: ['./detail.component.less'], |   styleUrls: ['./detail.component.less'] | ||||||
| }) | }) | ||||||
| export class FreightComponentsUserDetailComponent implements OnInit { | export class FreightComponentsUserDetailComponent implements OnInit { | ||||||
|   i: any; |   @ViewChild('redectModal', { static: false }) | ||||||
|   url = `/rule?_allow_anonymous=true`; |   redectModal!: any; | ||||||
|   @ViewChild('st', { static: false }) st!: STComponent; |  | ||||||
|  |  | ||||||
|   detailData: any = { |   detailData: any = {}; | ||||||
|     goodsList: [ |   @ViewChild('st', { static: false }) st!: STComponent; | ||||||
|       { |  | ||||||
|         perPrice: '22323', |  | ||||||
|         goodsQuantity: '项目名称', |  | ||||||
|         totalPrice: '角色', |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         perPrice: '2259595', |  | ||||||
|         goodsQuantity: '项目名称2', |  | ||||||
|         totalPrice: '角色', |  | ||||||
|       }, |  | ||||||
|     ] |  | ||||||
|   }; |  | ||||||
|   isShow = false; |  | ||||||
|   isVisible = false; |  | ||||||
|   modalTitle = '有效期'; |  | ||||||
|   modalName = ''; |  | ||||||
|   ui!: SFUISchema; |  | ||||||
|   schema!: SFSchema; |  | ||||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; |  | ||||||
|   schema1!: SFSchema; |  | ||||||
|   @ViewChild('sf1', { static: false }) sf1!: SFComponent; |  | ||||||
|   validData: any = ['suppliersType']; |  | ||||||
|   suppliersData: any = {}; |  | ||||||
|   columns: STColumn[] = [ |   columns: STColumn[] = [ | ||||||
|     { title: '企业名称', index: 'perPrice', width: 300, className: 'text-center' }, |     { title: '企业名称', index: 'perPrice', width: 300, className: 'text-center' }, | ||||||
|     { title: '项目名称', index: 'goodsQuantity', width: 300, className: 'text-center' }, |     { title: '项目名称', index: 'goodsQuantity', width: 300, className: 'text-center' }, | ||||||
|     { title: '角色', index: 'totalPrice', width: 300, className: 'text-center' }, |     { title: '角色', index: 'totalPrice', width: 300, className: 'text-center' } | ||||||
|   ]; |   ]; | ||||||
|   constructor( |  | ||||||
|     private http: _HttpClient, |   approvalOpinion = { | ||||||
|     private modal: ModalHelper, |     reason: '', | ||||||
|     public service: UsermanageService, |     remark: '' | ||||||
|     private route: ActivatedRoute, |   }; | ||||||
|     private modalHelper: ModalHelper, |   reasonTags = ['身份证照片太丑', '姓名与身份证号不匹配']; | ||||||
|     private msgSrv: NzMessageService, |   constructor(private nzModalService: NzModalService, public service: UsermanageService, private route: ActivatedRoute) {} | ||||||
|   ) {} |  | ||||||
|  |  | ||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|     console.log(this.route.snapshot); |     this.initData(); | ||||||
|     // this.initData(); |  | ||||||
|     this.initSF(); |  | ||||||
|     this.initSF1(); |  | ||||||
|     // this.launchSign(); |     // this.launchSign(); | ||||||
|   } |   } | ||||||
|   /** |  | ||||||
|    * 初始化查询表单 |  | ||||||
|    */ |  | ||||||
|   initSF() { |  | ||||||
|     this.schema = { |  | ||||||
|       properties: { |  | ||||||
|         _$expand: { type: 'boolean', ui: { hidden: true } }, |  | ||||||
|         effectiveDate: { |  | ||||||
|           title: '有效期', |  | ||||||
|           type: 'string', |  | ||||||
|           ui: { |  | ||||||
|             widget: 'date', |  | ||||||
|             format: 'yyyy-MM-dd 00:00:00', |  | ||||||
|             // hidden: this.modalName === 'effectiveDate' ? false : true, |  | ||||||
|           } as SFDateWidgetSchema, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       required: ['effectiveDate'], |  | ||||||
|     }; |  | ||||||
|     this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; |  | ||||||
|   } |  | ||||||
|   initSF1() { |  | ||||||
|     this.schema1 = { |  | ||||||
|       properties: { |  | ||||||
|         _$expand: { type: 'boolean', ui: { hidden: true } }, |  | ||||||
|         suppliersType: { |  | ||||||
|           type: 'string', |  | ||||||
|           title: '类型', |  | ||||||
|           enum: [ |  | ||||||
|             { label: '非外部供应商', value: 0 }, |  | ||||||
|             { label: '外部供应商', value: 1 }, |  | ||||||
|           ], |  | ||||||
|           default: '', |  | ||||||
|           ui: { |  | ||||||
|             widget: 'select', |  | ||||||
|             change: (args: any) => { |  | ||||||
|               console.log(args, 'args'); |  | ||||||
|               this.suppliersData.suppliersType = args; |  | ||||||
|               if (args === 1) { |  | ||||||
|                 this.validData = ['suppliersType', 'externalSuppliersId']; |  | ||||||
|               } else { |  | ||||||
|                 this.validData = ['suppliersType']; |  | ||||||
|                 this.suppliersData.externalSuppliersId = ''; |  | ||||||
|               } |  | ||||||
|               this.initSF1(); |  | ||||||
|             }, |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|         externalSuppliersId: { |  | ||||||
|           title: '外部供应商id', |  | ||||||
|           type: 'string', |  | ||||||
|           default: '', |  | ||||||
|           ui: { |  | ||||||
|             visibleIf: { suppliersType: (value: any) => value === 1 }, |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       required: this.validData, |  | ||||||
|     }; |  | ||||||
|   } |  | ||||||
|   showModal(name: any) { |  | ||||||
|     this.modalName = name; |  | ||||||
|     if (name === 'effectiveDate') { |  | ||||||
|       this.isShow = true; |  | ||||||
|     } else { |  | ||||||
|       this.isVisible = true; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   async initData() { |   async initData() { | ||||||
|     console.log(this.route.snapshot, 'this.route.snapshot'); |     console.log(this.route.snapshot, 'this.route.snapshot'); | ||||||
|  |  | ||||||
|     const params = { |     const params = { | ||||||
|       tenantId: this.route.snapshot.params.id, |       id: this.route.snapshot.params.id | ||||||
|       // tenantId: this.route.snapshot.queryParams.tenantId, |       // tenantId: this.route.snapshot.queryParams.tenantId, | ||||||
|     }; |     }; | ||||||
|     const res = await this.service.asyncRequest(this.service.$api_get_one, params); |  | ||||||
|     // // 商品资质 |  | ||||||
|     // if (res.enterpriseBusinessJson) { |  | ||||||
|     //   res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : []; |  | ||||||
|     // } |  | ||||||
|     // // // 申请人身份证证件 |  | ||||||
|     // // res.applyUserJson.imagelist = []; |  | ||||||
|     // // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoFront); |  | ||||||
|     // // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoBack); |  | ||||||
|     // // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate); |  | ||||||
|  |  | ||||||
|     // 法人身份证证件 |  | ||||||
|     const imagelist = []; |  | ||||||
|     imagelist.push(res?.certificatePhotoFront); |  | ||||||
|     imagelist.push(res?.certificatePhotoBack); |  | ||||||
|     res.certificatePhoto = imagelist; |  | ||||||
|  |  | ||||||
|     // 营业执照 |  | ||||||
|     res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate |  | ||||||
|       ? res.enterpriseQualificationCertificate.split(',') |  | ||||||
|       : []; |  | ||||||
|  |  | ||||||
|     // 返回所在地 |  | ||||||
|     res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode); |  | ||||||
|  |  | ||||||
|     this.detailData = res; |  | ||||||
|     this.suppliersData = { |  | ||||||
|       suppliersType: res?.suppliersType, |  | ||||||
|       externalSuppliersId: res?.externalSuppliersId, |  | ||||||
|     }; |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   userAction(status: number) { | ||||||
|    * 根据地区code查询地区详情 |     this.nzModalService.warning({ | ||||||
|    * @param code 地区代码 |       nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?', | ||||||
|    */ |       nzContent: | ||||||
|   async getRegionFullName(code: any) { |         status === 1 | ||||||
|     const params = { |           ? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作' | ||||||
|       regionCode: code, |           : '启用后,该用户将恢复正常使用功能,请再次确认', | ||||||
|     }; |       nzOnOk: () => { | ||||||
|     const res = await this.service.asyncRequest(this.service.$api_get_one, params, 'POST', true); |         // this.service.request(this.service.$api_lock_user) | ||||||
|     // if (res && res.regionFullName) { |         this.st.reload(); | ||||||
|     //   const arr = res.regionFullName.split(','); |  | ||||||
|     //   res.regionFullName = arr.reverse().join('-'); |  | ||||||
|     // } |  | ||||||
|     return res && res.regionFullName; |  | ||||||
|   } |  | ||||||
|   add() { |  | ||||||
|     // this.modal |  | ||||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) |  | ||||||
|     //   .subscribe(() => this.st.reload()); |  | ||||||
|   } |  | ||||||
|   goBack() { |  | ||||||
|     window.history.go(-1); |  | ||||||
|   } |  | ||||||
|   /** |  | ||||||
|    * 冻结 |  | ||||||
|    */ |  | ||||||
|   freezeOrResume(type: number) { |  | ||||||
|     console.log(type) |  | ||||||
|     // this.service.http |  | ||||||
|     //   .post(this.service.$api_set_freezeOrResume, { |  | ||||||
|     //     tenantId: this.route.snapshot.params.id, |  | ||||||
|     //     // tenantId: this.route.snapshot.queryParams.tenantId, |  | ||||||
|     //     status: type, |  | ||||||
|     //   }) |  | ||||||
|     //   .subscribe((res) => { |  | ||||||
|     //     if (res.data === true) { |  | ||||||
|     //       if (type === 0) { |  | ||||||
|     //         this.service.msgSrv.success(`启用成功!`); |  | ||||||
|     //       } else if (type === 1) { |  | ||||||
|     //         this.service.msgSrv.success(`冻结成功!`); |  | ||||||
|     //       } |  | ||||||
|     //       this.ngOnInit(); |  | ||||||
|     //     } else { |  | ||||||
|     //       this.service.msgSrv.error(res.msg || '操作失败!'); |  | ||||||
|     //     } |  | ||||||
|     //   }); |  | ||||||
|   } |  | ||||||
|   PayOrResume(type: number) { |  | ||||||
|     console.log(type) |  | ||||||
|     // this.service.http |  | ||||||
|     //   .post(this.service.$api_set_freezeOrResume, { |  | ||||||
|     //     tenantId: this.route.snapshot.params.id, |  | ||||||
|     //     // tenantId: this.route.snapshot.queryParams.tenantId, |  | ||||||
|     //     status: type, |  | ||||||
|     //   }) |  | ||||||
|     //   .subscribe((res) => { |  | ||||||
|     //     if (res.data === true) { |  | ||||||
|     //       if (type === 0) { |  | ||||||
|     //         this.service.msgSrv.success(`启用成功!`); |  | ||||||
|     //       } else if (type === 1) { |  | ||||||
|     //         this.service.msgSrv.success(`冻结成功!`); |  | ||||||
|     //       } |  | ||||||
|     //       this.ngOnInit(); |  | ||||||
|     //     } else { |  | ||||||
|     //       this.service.msgSrv.error(res.msg || '操作失败!'); |  | ||||||
|     //     } |  | ||||||
|     //   }); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   handleCancel(name: any) { |  | ||||||
|     if (name === 'effectiveDate') { |  | ||||||
|       this.isShow = false; |  | ||||||
|     } else { |  | ||||||
|       this.isVisible = false; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   handleOK(name: any) { |  | ||||||
|     const params: any = { |  | ||||||
|       tenantId: this.route.snapshot.params.id, |  | ||||||
|       // tenantId: this.route.snapshot.queryParams.tenantId, |  | ||||||
|     }; |  | ||||||
|  |  | ||||||
|     if (name === 'effectiveDate') { |  | ||||||
|       params.effectiveDate = this.sf?.value?.effectiveDate; |  | ||||||
|     } else { |  | ||||||
|       Object.assign(params, this.sf1?.value); |  | ||||||
|     } |  | ||||||
|     this.service.http.post(this.service.$api_get_one, params).subscribe((res) => { |  | ||||||
|       if (res.data === true) { |  | ||||||
|         this.service.msgSrv.success(`编辑成功!`); |  | ||||||
|         this.ngOnInit(); |  | ||||||
|       } else { |  | ||||||
|         this.service.msgSrv.error(res.msg || '编辑失败!'); |  | ||||||
|       } |  | ||||||
|       if (name === 'effectiveDate') { |  | ||||||
|         this.isShow = false; |  | ||||||
|       } else { |  | ||||||
|         this.isVisible = false; |  | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   auditPass() { |   auditPass() { | ||||||
|      |     this.nzModalService.confirm({ | ||||||
|  |       nzTitle: '审核通过', | ||||||
|  |       nzContent: `是否确认通过(姓名:黄大仙)审核`, | ||||||
|  |       nzOnOk: () => {} | ||||||
|  |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   auditNo() { |   auditNo() { | ||||||
|  |     this.approvalOpinion = { | ||||||
|  |       reason: '', | ||||||
|  |       remark: '' | ||||||
|  |     }; | ||||||
|  |     this.nzModalService.create({ | ||||||
|  |       nzTitle: '审核驳回', | ||||||
|  |       nzContent: this.redectModal, | ||||||
|  |       nzOnOk: () => { | ||||||
|  |         if (!this.approvalOpinion?.remark) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |   ratify() {} | ||||||
|  |  | ||||||
|   } |   goBack() { | ||||||
|   ratify() { |     window.history.go(-1); | ||||||
|  |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,39 +1,15 @@ | |||||||
| <!-- |  | ||||||
|  * @Author: your name |  | ||||||
|  * @Date: 2021-11-29 15:22:34 |  | ||||||
|  * @LastEditTime: 2021-11-30 15:52:31 |  | ||||||
|  * @LastEditors: Please set LastEditors |  | ||||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |  | ||||||
|  * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html |  | ||||||
| --> |  | ||||||
| <!-- 页头 --> | <!-- 页头 --> | ||||||
| <page-header-wrapper [title]="'用户列表'"></page-header-wrapper> | <page-header-wrapper [title]="'员工列表'"></page-header-wrapper> | ||||||
| <nz-card> | <nz-card> | ||||||
|   <!-- 搜索区 --> |   <!-- 搜索区 --> | ||||||
|   <!-- 搜索表单 --> |   <!-- 搜索表单 --> | ||||||
|   <div nz-row nzGutter="8"> |   <div nz-row nzGutter="8"> | ||||||
|     <!-- 查询字段小于或等于3个时,不显示伸缩按钮 --> |     <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> | ||||||
|     <div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> |  | ||||||
|       <sf |  | ||||||
|         #sf |  | ||||||
|         [schema]="schema" |  | ||||||
|         [ui]="ui" |  | ||||||
|         [mode]="'search'" |  | ||||||
|         [disabled]="!sf?.valid" |  | ||||||
|         (formSubmit)="st?.load(1)" |  | ||||||
|         (formReset)="resetSF()" |  | ||||||
|       ></sf> |  | ||||||
|      |  | ||||||
|     </div> |  | ||||||
|     <!-- [loading]="service.http.loading" --> |  | ||||||
|  |  | ||||||
|     <!-- 查询字段大于3个时,根据展开状态调整布局 --> |  | ||||||
|     <ng-container *ngIf="queryFieldCount > 4"> |  | ||||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 18"> |  | ||||||
|       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> |       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> | ||||||
|     </div> |     </div> | ||||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> |     <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> | ||||||
|         <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> |       <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" | ||||||
|  |         (click)="st?.load(1)">查询</button> | ||||||
|       <button nz-button (click)="resetSF()">重置</button> |       <button nz-button (click)="resetSF()">重置</button> | ||||||
|       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button> |       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button> | ||||||
|       <button nz-button nzType="link" (click)="expandToggle()"> |       <button nz-button nzType="link" (click)="expandToggle()"> | ||||||
| @ -41,113 +17,41 @@ | |||||||
|         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> |         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||||
|       </button> |       </button> | ||||||
|     </div> |     </div> | ||||||
|     </ng-container> |  | ||||||
|   </div> |   </div> | ||||||
| </nz-card> | </nz-card> | ||||||
|  |  | ||||||
| <nz-card> | <nz-card> | ||||||
|   <!-- 数据列表 --> |   <!-- 数据列表 --> | ||||||
|   <!-- [data]="service.$api_get_supplier_page" --> |   <!-- [data]="service.$api_get_supplier_page" --> | ||||||
|  |  | ||||||
|   <st |   <st #st [bordered]="true" [columns]="columns" [data]='service.$api_get_user_list' | ||||||
|     #st |  | ||||||
|     [bordered]="true" |  | ||||||
|     [columns]="columns" |  | ||||||
|     [data]='datalist' |  | ||||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|     [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }" |     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" |     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500" | ||||||
|     [loadingDelay]="500" |     [loading]="service.http.loading"> | ||||||
|     [loading]="service.http.loading" |  | ||||||
|   > |  | ||||||
|     <ng-template st-row="enterpriseName" let-item let-index="index"> |     <ng-template st-row="enterpriseName" let-item let-index="index"> | ||||||
|       <div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> |       <div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> | ||||||
|         <div |         <div | ||||||
|           style="display: inline-block; max-width: 280px; margin: 0 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis" |           style="display: inline-block; max-width: 280px; margin: 0 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis"> | ||||||
|         > |  | ||||||
|           {{ item.enterpriseName }} |           {{ item.enterpriseName }} | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="contactsPhone" let-item let-index="index"> |     <ng-template st-row="contactsPhone" let-item let-index="index"> | ||||||
|         <div |       <div style="color: #52c41a;" (click)="addPromoter(item)"> | ||||||
|           style="color: #52c41a;" (click)="daoyun(item)" |  | ||||||
|         > |  | ||||||
|         {{ item.contactsPhone }} |         {{ item.contactsPhone }} | ||||||
|       </div> |       </div> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="stateCol" let-item let-index="index"> |  | ||||||
|       <nz-tag *ngIf="item.stateLocked" nzColor="error">冻结</nz-tag> |  | ||||||
|       <nz-tag *elseBlock nzColor="success">正常</nz-tag> |  | ||||||
|     </ng-template> |  | ||||||
|   </st> |   </st> | ||||||
|   <nz-modal [(nzVisible)]="isVisible"   [nzFooter]="nzModalFooter" nzTitle="推广业务员" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()"> |  | ||||||
|     <ng-container *nzModalContent> |  | ||||||
|       <sf #sf2 [schema]="schema2" [ui]="ui2" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf> |  | ||||||
|     </ng-container> |  | ||||||
|     <ng-template #nzModalFooter> |  | ||||||
|       <button nz-button nzType="default" (click)="handleCancel()">取消</button> |  | ||||||
|       <button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button> |  | ||||||
|     </ng-template> |  | ||||||
|   </nz-modal> |  | ||||||
| </nz-card> |  | ||||||
| <nz-modal [(nzVisible)]="isVisibleFreeze"   [nzFooter]="nzModalFooterFreeze" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel_freeze()"> |  | ||||||
|   <ng-container *nzModalContent> |  | ||||||
|     <div class="ant-popover-message"> |  | ||||||
|       <i nz-icon="" nztheme="fill" class="anticon anticon-exclamation-circle ng-star-inserted"> |  | ||||||
|         <svg |  | ||||||
|           viewBox="64 64 896 896" |  | ||||||
|           focusable="false" |  | ||||||
|           fill="currentColor" |  | ||||||
|           width="1em" |  | ||||||
|           height="1em" |  | ||||||
|           class="ng-tns-c358-1487" |  | ||||||
|           data-icon="exclamation-circle" |  | ||||||
|           aria-hidden="true" |  | ||||||
|         > |  | ||||||
|           <path |  | ||||||
|             d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" |  | ||||||
|           ></path> |  | ||||||
|         </svg> |  | ||||||
|       </i> |  | ||||||
|       <div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">确定冻结该企业吗?</div> |  | ||||||
|       <div class="ant-popover-message-title ng-star-inserted" style="color: red;"> |  | ||||||
|         停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作 |  | ||||||
|       </div> |  | ||||||
|     </div> |  | ||||||
|   </ng-container> |  | ||||||
|   <ng-template #nzModalFooterFreeze> |  | ||||||
|     <button nz-button nzType="default" (click)="handleCancel_freeze()">取消</button> |  | ||||||
|     <button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button> |  | ||||||
|   </ng-template> |  | ||||||
| </nz-modal> |  | ||||||
| <nz-modal [(nzVisible)]="isVisibleOpen"   [nzFooter]="nzModalFooterOpen" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel_open()"> |  | ||||||
|   <ng-container *nzModalContent> |  | ||||||
|     <div class="ant-popover-message"> |  | ||||||
|       <i nz-icon="" nztheme="fill" class="anticon anticon-exclamation-circle ng-star-inserted"> |  | ||||||
|         <svg |  | ||||||
|           viewBox="64 64 896 896" |  | ||||||
|           focusable="false" |  | ||||||
|           fill="currentColor" |  | ||||||
|           width="1em" |  | ||||||
|           height="1em" |  | ||||||
|           class="ng-tns-c358-1487" |  | ||||||
|           data-icon="exclamation-circle" |  | ||||||
|           aria-hidden="true" |  | ||||||
|         > |  | ||||||
|           <path |  | ||||||
|             d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" |  | ||||||
|           ></path> |  | ||||||
|         </svg> |  | ||||||
|       </i> |  | ||||||
|       <div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">确定启用该企业吗?</div> |  | ||||||
|       <div class="ant-popover-message-title ng-star-inserted" style="color: red;"> |  | ||||||
|         启用后,该企业将恢复正常使用功能,请再次确认 |  | ||||||
|       </div> |  | ||||||
|     </div> |  | ||||||
|   </ng-container> |  | ||||||
|   <ng-template #nzModalFooterOpen> |  | ||||||
|     <button nz-button nzType="default" (click)="handleCancel_open()">取消</button> |  | ||||||
|     <button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button> |  | ||||||
|   </ng-template> |  | ||||||
| </nz-modal> |  | ||||||
|  |  | ||||||
|  | </nz-card> | ||||||
|  |  | ||||||
|  | <ng-template #promoterModal> | ||||||
|  |   <div nz-row nzGutter="8"> | ||||||
|  |     <div nz-col nzSpan="24" se-container [labelWidth]="80"> | ||||||
|  |       <se [col]="1" label="手机号"> | ||||||
|  |         <input nz-input [(ngModel)]="promotersTelephone" /> | ||||||
|  |       </se> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  | </ng-template> | ||||||
| @ -0,0 +1,6 @@ | |||||||
|  | :host::ng-deep { | ||||||
|  |  | ||||||
|  |     nz-range-picker { | ||||||
|  |         width: 100%; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,23 +0,0 @@ | |||||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |  | ||||||
| import { FreightComponentsListComponent } from './list.component'; |  | ||||||
|  |  | ||||||
| describe('FreightComponentsListComponent', () => { |  | ||||||
|   let component: FreightComponentsListComponent; |  | ||||||
|   let fixture: ComponentFixture<FreightComponentsListComponent>; |  | ||||||
|  |  | ||||||
|   beforeEach(async(() => { |  | ||||||
|     TestBed.configureTestingModule({ |  | ||||||
|       declarations: [FreightComponentsListComponent], |  | ||||||
|     }).compileComponents(); |  | ||||||
|   })); |  | ||||||
|  |  | ||||||
|   beforeEach(() => { |  | ||||||
|     fixture = TestBed.createComponent(FreightComponentsListComponent); |  | ||||||
|     component = fixture.componentInstance; |  | ||||||
|     fixture.detectChanges(); |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   it('should create', () => { |  | ||||||
|     expect(component).toBeTruthy(); |  | ||||||
|   }); |  | ||||||
| }); |  | ||||||
| @ -1,75 +1,44 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { ActivatedRoute, Router } from '@angular/router'; | import { ActivatedRoute, Router } from '@angular/router'; | ||||||
| import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; | import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| import { UsermanageService } from '../../../services/usercenter.service'; | import { UsermanageService } from '../../../services/usercenter.service'; | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-Freight-components-user', |   selector: 'app-Freight-components-user', | ||||||
|   templateUrl: './user.component.html', |   styleUrls: ['./user.component.less'], | ||||||
|  |   templateUrl: './user.component.html' | ||||||
| }) | }) | ||||||
| export class FreightComponentsUserComponent implements OnInit { | export class FreightComponentsUserComponent implements OnInit { | ||||||
|   _$expand = false; |   _$expand = false; | ||||||
|   url = `/rule?_allow_anonymous=true`; |   ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; | ||||||
|   isVisible = false; |   schema: SFSchema = this.initSF(); | ||||||
|   isVisibleFreeze = false; |   columns: STColumn[] = this.initST(); | ||||||
|   isVisibleOpen = false; |  | ||||||
|   ui!: SFUISchema; |  | ||||||
|   ui2!: SFUISchema; |  | ||||||
|   schema!: SFSchema; |  | ||||||
|   schema2!: SFSchema; |  | ||||||
|   columns!: STColumn[]; |  | ||||||
|   suppliersData: any; |  | ||||||
|   datalist = [ |  | ||||||
|     { |  | ||||||
|       storeName: '企业名称', |  | ||||||
|       contactsName: '152746565', |  | ||||||
|       enterpriseName: '湖南', |  | ||||||
|       unifiedSocialCreditCode: '45454', |  | ||||||
|       contactsPhone: '*97889461561', |  | ||||||
|       effectiveDateStr: '废弃eww', |  | ||||||
|       enStatusStr2: '正常', |  | ||||||
|       enStatusStr3: '正常', |  | ||||||
|       unifiedSocialCreditCode3: '常用服务', |  | ||||||
|       unifiedSocialCreditCode2: '正常', |  | ||||||
|       tenantId: 1 |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       storeName: '企业名称', |  | ||||||
|       contactsName: '152746565', |  | ||||||
|       enterpriseName: '湖南', |  | ||||||
|       unifiedSocialCreditCode: '45454', |  | ||||||
|       contactsPhone: '*97889461561', |  | ||||||
|       effectiveDateStr: '废弃eww', |  | ||||||
|       enStatusStr2: '正常', |  | ||||||
|       enStatusStr3: '正常', |  | ||||||
|       unifiedSocialCreditCode3: '常用服务', |  | ||||||
|       unifiedSocialCreditCode2: '正常', |  | ||||||
|       tenantId: 2 |  | ||||||
|     }, |  | ||||||
|   ] |  | ||||||
|   @ViewChild('st', { static: false }) st!: STComponent; |   @ViewChild('st', { static: false }) st!: STComponent; | ||||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; |   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||||
|   @ViewChild('sf2', { static: false }) sf2!: SFComponent; |  | ||||||
|  |   @ViewChild('promoterModal', { static: false }) | ||||||
|  |   promoterModal!: any; | ||||||
|  |   promotersTelephone = ''; | ||||||
|  |  | ||||||
|   constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} |   constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} | ||||||
|   /** |  | ||||||
|    * 查询字段个数navigate |  | ||||||
|    */ |  | ||||||
|   get queryFieldCount(): number { |  | ||||||
|     return Object.keys(this.schema?.properties || {}).length; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 查询参数 |    * 查询参数 | ||||||
|    */ |    */ | ||||||
|   get reqParams() { |   get reqParams() { | ||||||
|     const params: any = { |     const params: any = { | ||||||
|       ...(this.sf && this.sf.value), |       ...(this.sf && this.sf.value) | ||||||
|     }; |     }; | ||||||
|     if (this.sf?.value.effectiveDate) { |     if (this.sf?.value.effectiveDate) { | ||||||
|       params.effectiveDateStart = this.sf?.value.effectiveDate[0]; |       Object.assign(params, { | ||||||
|       params.effectiveDateEnd = this.sf?.value.effectiveDate[1]; |         time: { | ||||||
|  |           start: this.sf?.value.effectiveDate[0], | ||||||
|  |           end: this.sf?.value.effectiveDate[1] | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |       // params.effectiveDateStart = this.sf?.value.effectiveDate[0]; | ||||||
|  |       // params.effectiveDateEnd = this.sf?.value.effectiveDate[1]; | ||||||
|     } |     } | ||||||
|     delete params.effectiveDate; |     delete params.effectiveDate; | ||||||
|     delete params.expand; |     delete params.expand; | ||||||
| @ -77,120 +46,164 @@ export class FreightComponentsUserComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   get selectedRows() { |   get selectedRows() { | ||||||
|     return this.st?.list.filter((item) => item.checked) || []; |     return this.st?.list.filter(item => item.checked) || []; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|     this.initSF(); |     this.ar.url.subscribe(params => { | ||||||
|     this.initST(); |  | ||||||
|     this.initSF2(); |  | ||||||
|     this.ar.url.subscribe((params) => { |  | ||||||
|       this.st?.load(1); |       this.st?.load(1); | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   dataProcess(data: STData[]): STData[] { |  | ||||||
|     return data.map((i, index) => { |   addPromoter(item?: any) { | ||||||
|       i.showSortFlag = false; |     this.promotersTelephone = item?.promotersTelephone; | ||||||
|       return i; |     const modal = this.modal.create({ | ||||||
|  |       nzTitle: '推广业务员', | ||||||
|  |       nzContent: this.promoterModal, | ||||||
|  |       nzOnOk: () => { | ||||||
|  |         if (!!!this.promotersTelephone) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => { | ||||||
|  |           if (res) { | ||||||
|  |             this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功'); | ||||||
|  |           } | ||||||
|  |           this.st.load(); | ||||||
|  |         }); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   initSF() { |  | ||||||
|     this.schema = { |   userAction(status: number) { | ||||||
|  |     this.modal.warning({ | ||||||
|  |       nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?', | ||||||
|  |       nzContent: | ||||||
|  |         status === 1 | ||||||
|  |           ? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作' | ||||||
|  |           : '启用后,该用户将恢复正常使用功能,请再次确认', | ||||||
|  |       nzOnOk: () => { | ||||||
|  |         // this.service.request(this.service.$api_lock_user) | ||||||
|  |         this.st.reload(); | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   expandToggle() { | ||||||
|  |     this._$expand = !this._$expand; | ||||||
|  |     this.sf?.setValue('/expand', this._$expand); | ||||||
|  |   } | ||||||
|  |   creat() { | ||||||
|  |     this.router.navigate(['./new'], { relativeTo: this.ar }); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 重置表单 | ||||||
|  |    */ | ||||||
|  |   resetSF() { | ||||||
|  |     this.sf.reset(); | ||||||
|  |     this._$expand = false; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   initSF(): SFSchema { | ||||||
|  |     return { | ||||||
|       properties: { |       properties: { | ||||||
|         expand: { |         expand: { | ||||||
|           type: 'boolean', |           type: 'boolean', | ||||||
|           ui: { |           ui: { | ||||||
|             hidden: true, |             hidden: true | ||||||
|  |           } | ||||||
|         }, |         }, | ||||||
|  |         name: { | ||||||
|  |           title: '用户姓名', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入', | ||||||
|  |             showRequired: false | ||||||
|  |           } | ||||||
|         }, |         }, | ||||||
|         storeName: { title: '用户姓名', type: 'string', ui: { showRequired: false } }, |  | ||||||
|         contactsName: { |         contactsName: { | ||||||
|           title: '企业名称', |           title: '企业名称', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           ui: { |           ui: { | ||||||
|             showRequired: false, |             placeholder: '请输入', | ||||||
|  |             showRequired: false | ||||||
|  |           } | ||||||
|         }, |         }, | ||||||
|         }, |         telephone: { | ||||||
|         phone: { |  | ||||||
|           title: '手机号', |           title: '手机号', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           format: 'mobile', |           format: 'mobile', | ||||||
|           maxLength: 11, |           maxLength: 11, | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入手机号', |             placeholder: '请输入' | ||||||
|  |           } | ||||||
|         }, |         }, | ||||||
|         }, |         stateLocked: { | ||||||
|         enStatus: { |  | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '货主状态', |           title: '状态', | ||||||
|           enum: [ |           enum: [ | ||||||
|             { label: '全部', value: '' }, |             { label: '全部', value: '' }, | ||||||
|             { label: '正常', value: 0 }, |             { label: '正常', value: 0 }, | ||||||
|             { label: '冻结', value: 1 }, |             { label: '冻结', value: 1 } | ||||||
|             { label: '废弃', value: 2 }, |  | ||||||
|           ], |           ], | ||||||
|           default: '', |           default: '', | ||||||
|           ui: { |           ui: { | ||||||
|             widget: 'select', |             widget: 'select', | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               expand: (value: boolean) => value, |               expand: (value: boolean) => value | ||||||
|  |             } | ||||||
|  |           } | ||||||
|         }, |         }, | ||||||
|           }, |         promotersTelephone: { | ||||||
|         }, |           title: '推广业务员', | ||||||
|         yewuphone: { |  | ||||||
|           title: '业务员手机号', |  | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           format: 'mobile', |           format: 'mobile', | ||||||
|           maxLength: 11, |           maxLength: 11, | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入手机号', |             placeholder: '请输入手机号', | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               expand: (value: boolean) => value, |               expand: (value: boolean) => value | ||||||
|             }, |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|     }; |  | ||||||
|     this.ui = { '*': { spanLabelFixed: 180, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; |  | ||||||
|             } |             } | ||||||
|   initSF2() { |           } | ||||||
|     this.schema2 = { |         }, | ||||||
|       properties: { |         effectiveDate: { | ||||||
|         phone: { |           title: '申请时间', | ||||||
|           title: '手机号', |  | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           format: 'mobile', |  | ||||||
|           maxLength: 11, |  | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入手机号', |             widget: 'date', | ||||||
|           }, |             mode: 'range', | ||||||
|         }, |             format: 'yyyy-MM-dd', | ||||||
|       }, |             visibleIf: { | ||||||
|  |               expand: (value: boolean) => value | ||||||
|  |             } | ||||||
|  |           } as SFDateWidgetSchema | ||||||
|  |         } | ||||||
|  |       } | ||||||
|     }; |     }; | ||||||
|     this.ui2 = { '*': { spanLabelFixed: 90, grid: { span: 16}, enter: () => this.st.load() } }; |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   initST() { |   initST(): STColumn[] { | ||||||
|     this.columns = [ |     return [ | ||||||
|       // { title: '', type: 'checkbox', className: 'text-center' }, |       { title: '用户姓名', className: 'text-center', index: 'name' }, | ||||||
|       { title: '用户姓名', className: 'text-center', index: 'storeName' }, |       { title: '手机号', className: 'text-center', index: 'telephone' }, | ||||||
|       { title: '手机号', className: 'text-center', index: 'contactsName' }, |       { title: '身份证件号', className: 'text-center', render: 'certificateNumber' }, | ||||||
|       { title: '身份证件号', className: 'text-center', render: 'enterpriseName' }, |  | ||||||
|       { title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode' }, |       { title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode' }, | ||||||
|       { title: '推广业务员', className: 'text-center', index: 'contactsPhone', |       { title: '推广业务员', className: 'text-center', index: 'promotersTelephone', render: 'promotersTelephone' }, | ||||||
|         render: 'contactsPhone' |       { title: '申请时间', className: 'text-center', index: 'createTime', type: 'date' }, | ||||||
|       }, |  | ||||||
|       { title: '申请时间', className: 'text-center', index: 'unifiedSocialCreditCode2' }, |  | ||||||
|       { |       { | ||||||
|         title: '状态', |         title: '状态', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         index: 'enStatusStr2', |         index: 'stateLocked', | ||||||
|         type: 'badge', |         type: 'badge', | ||||||
|         badge: { |         badge: { | ||||||
|           正常: { text: '正常', color: 'success' }, |           10: { text: '待审核', color: 'default' }, | ||||||
|           冻结: { text: '冻结', color: 'warning' }, |           20: { text: ' 已成功', color: 'success' }, | ||||||
|           废弃: { text: '废弃', color: 'default' }, |           30: { text: '已驳回', color: 'warning' } | ||||||
|         }, |         } | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '操作', |         title: '操作', | ||||||
| @ -199,54 +212,20 @@ export class FreightComponentsUserComponent implements OnInit { | |||||||
|         buttons: [ |         buttons: [ | ||||||
|           { |           { | ||||||
|             text: '查看', |             text: '查看', | ||||||
|             click: (item) => { |             click: (item: any) => { | ||||||
|               this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar }); |               this.router.navigate(['./view', item.id], { relativeTo: this.ar }); | ||||||
|             }, |             } | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             text: '冻结', |             text: '冻结', | ||||||
|             click: (item) => { |             click: (item: any) => this.userAction(0) | ||||||
|               this.isVisibleFreeze = true |  | ||||||
|             }, |  | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             text: '启用', |             text: '启用', | ||||||
|             click: (item) => { |             click: (item: any) => this.userAction(1) | ||||||
|               this.isVisibleOpen = true |           } | ||||||
|               console.log(item) |         ] | ||||||
|             }, |       } | ||||||
|           }, |  | ||||||
|         ], |  | ||||||
|       }, |  | ||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|   daoyun(item: any) { |  | ||||||
|     this.isVisible = true |  | ||||||
|   } |  | ||||||
|   expandToggle() { |  | ||||||
|     this._$expand = !this._$expand; |  | ||||||
|     this.sf?.setValue('/expand', this._$expand); |  | ||||||
|   } |  | ||||||
|   creat() { |  | ||||||
|     this.router.navigate(['./new',], { relativeTo: this.ar }); |  | ||||||
|   } |  | ||||||
|   /** |  | ||||||
|    * 重置表单 |  | ||||||
|    */ |  | ||||||
|   resetSF() { |  | ||||||
|     this.sf.reset(); |  | ||||||
|     this._$expand = false; |  | ||||||
|   } |  | ||||||
|   handleOK() { |  | ||||||
|     console.log(this.sf2.value) |  | ||||||
|   } |  | ||||||
|   handleCancel() { |  | ||||||
|     this.isVisible = false |  | ||||||
|   } |  | ||||||
|   handleCancel_open() { |  | ||||||
|     this.isVisibleOpen = false |  | ||||||
|   } |  | ||||||
|   handleCancel_freeze() { |  | ||||||
|     this.isVisibleFreeze = false |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -31,6 +31,19 @@ export class UsermanageService extends BaseService { | |||||||
|   // 冻结/启用企业业 |   // 冻结/启用企业业 | ||||||
|   $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock'; |   $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock'; | ||||||
|  |  | ||||||
|  |   // 企业审核 | ||||||
|  |   $api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit'; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   // 货主员工列表(运营后台) | ||||||
|  |   $api_get_user_list = '/api/mdc/cuc/userApp/getShipperUserList'; | ||||||
|  |  | ||||||
|  |   // 根据应用用户id获取用户详情 | ||||||
|  |   $api_get_user_detail = '/api/mdc/cuc/user/getUserDetailByAppUserId'; | ||||||
|  |  | ||||||
|  |   // 冻结/启用用户 | ||||||
|  |   $api_lock_user = '/api/mdc/cuc/enterpriseInfo/operate/lock'; | ||||||
|  |  | ||||||
|   constructor(public injector: Injector) { |   constructor(public injector: Injector) { | ||||||
|     super(injector); |     super(injector); | ||||||
|   } |   } | ||||||
|  | |||||||
							
								
								
									
										13
									
								
								src/app/shared/components/imagelist/image-list.module.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/app/shared/components/imagelist/image-list.module.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | |||||||
|  | import { CommonModule } from '@angular/common'; | ||||||
|  | import { NgModule } from '@angular/core'; | ||||||
|  | import { ImageListComponent } from './imagelist.component'; | ||||||
|  | import { ImageViewComponent } from './imageview/imageview.component'; | ||||||
|  |  | ||||||
|  | const COMPONENTS = [ImageListComponent, ImageViewComponent]; | ||||||
|  |  | ||||||
|  | @NgModule({ | ||||||
|  |   declarations: COMPONENTS, | ||||||
|  |   imports: [CommonModule], | ||||||
|  |   exports: COMPONENTS, | ||||||
|  | }) | ||||||
|  | export class ImageListModule {} | ||||||
| @ -0,0 +1,3 @@ | |||||||
|  | <div class="imgBox"> | ||||||
|  |   <img *ngFor="let item of imgList; let i = index" [src]="item" (click)="showImg(i)" /> | ||||||
|  | </div> | ||||||
| @ -1,18 +1,18 @@ | |||||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||||
| import { CmcComponentsTagsComponent } from './tags.component'; | import { ImageListComponent } from './imagelist.component'; | ||||||
| 
 | 
 | ||||||
| describe('CmcComponentsTagsComponent', () => { | describe('ImageListComponent', () => { | ||||||
|   let component: CmcComponentsTagsComponent; |   let component: ImageListComponent; | ||||||
|   let fixture: ComponentFixture<CmcComponentsTagsComponent>; |   let fixture: ComponentFixture<ImageListComponent>; | ||||||
| 
 | 
 | ||||||
|   beforeEach(async(() => { |   beforeEach(async(() => { | ||||||
|     TestBed.configureTestingModule({ |     TestBed.configureTestingModule({ | ||||||
|       declarations: [CmcComponentsTagsComponent], |       declarations: [ImageListComponent], | ||||||
|     }).compileComponents(); |     }).compileComponents(); | ||||||
|   })); |   })); | ||||||
| 
 | 
 | ||||||
|   beforeEach(() => { |   beforeEach(() => { | ||||||
|     fixture = TestBed.createComponent(CmcComponentsTagsComponent); |     fixture = TestBed.createComponent(ImageListComponent); | ||||||
|     component = fixture.componentInstance; |     component = fixture.componentInstance; | ||||||
|     fixture.detectChanges(); |     fixture.detectChanges(); | ||||||
|   }); |   }); | ||||||
							
								
								
									
										23
									
								
								src/app/shared/components/imagelist/imagelist.component.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/app/shared/components/imagelist/imagelist.component.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | |||||||
|  | import { Component, Input, OnInit } from '@angular/core'; | ||||||
|  | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
|  | import { NzMessageService } from 'ng-zorro-antd/message'; | ||||||
|  | import { ImageViewComponent } from './imageview/imageview.component'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-imagelist', | ||||||
|  |   templateUrl: './imagelist.component.html', | ||||||
|  |   styleUrls: ['./imagelist.less'], | ||||||
|  | }) | ||||||
|  | export class ImageListComponent implements OnInit { | ||||||
|  |   @Input() imgList: any = []; | ||||||
|  |   constructor(private modal: ModalHelper, public msgSrv: NzMessageService, public http: _HttpClient) {} | ||||||
|  |  | ||||||
|  |   ngOnInit(): void {} | ||||||
|  |   showImg(index: any) { | ||||||
|  |     const params = { | ||||||
|  |       imgList: this.imgList, | ||||||
|  |       index, | ||||||
|  |     }; | ||||||
|  |     this.modal.create(ImageViewComponent, { params }).subscribe((res) => {}); | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										9
									
								
								src/app/shared/components/imagelist/imagelist.less
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/app/shared/components/imagelist/imagelist.less
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | .imgBox { | ||||||
|  |   width: 100%; | ||||||
|  |   overflow: hidden; | ||||||
|  |   img { | ||||||
|  |     width: 100px; | ||||||
|  |     margin: 0 10px; | ||||||
|  |     vertical-align: middle; | ||||||
|  |   } | ||||||
|  | } | ||||||
| @ -0,0 +1,12 @@ | |||||||
|  | <div class="modal-header"> | ||||||
|  |   <div class="modal-title">查看图片</div> | ||||||
|  | </div> | ||||||
|  | <div class="imageWrap"> | ||||||
|  |   <div class="prev" (click)="prevImg()" *ngIf="params.imgList.length > 1"> | ||||||
|  |     <i nz-icon [class.blue]="currentIndex != 0" nzType="vertical-right" nzTheme="outline"></i> | ||||||
|  |   </div> | ||||||
|  |   <div class="imgBox"><img [src]="params.imgList[currentIndex]" /></div> | ||||||
|  |   <div class="next" *ngIf="params.imgList.length > 1" (click)="nextImg()"> | ||||||
|  |     <i nz-icon nzType="vertical-left" nzTheme="outline" [class.blue]="currentIndex != params.imgList.length - 1"></i> | ||||||
|  |   </div> | ||||||
|  | </div> | ||||||
| @ -0,0 +1,23 @@ | |||||||
|  | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||||
|  | import { ImageViewComponent } from './imageview.component'; | ||||||
|  |  | ||||||
|  | describe('ImageViewComponent', () => { | ||||||
|  |   let component: ImageViewComponent; | ||||||
|  |   let fixture: ComponentFixture<ImageViewComponent>; | ||||||
|  |  | ||||||
|  |   beforeEach(async(() => { | ||||||
|  |     TestBed.configureTestingModule({ | ||||||
|  |       declarations: [ImageViewComponent], | ||||||
|  |     }).compileComponents(); | ||||||
|  |   })); | ||||||
|  |  | ||||||
|  |   beforeEach(() => { | ||||||
|  |     fixture = TestBed.createComponent(ImageViewComponent); | ||||||
|  |     component = fixture.componentInstance; | ||||||
|  |     fixture.detectChanges(); | ||||||
|  |   }); | ||||||
|  |  | ||||||
|  |   it('should create', () => { | ||||||
|  |     expect(component).toBeTruthy(); | ||||||
|  |   }); | ||||||
|  | }); | ||||||
| @ -0,0 +1,39 @@ | |||||||
|  | import { Component, OnInit } from '@angular/core'; | ||||||
|  | import { _HttpClient } from '@delon/theme'; | ||||||
|  | import { NzMessageService } from 'ng-zorro-antd/message'; | ||||||
|  | import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-imageview', | ||||||
|  |   templateUrl: './imageview.component.html', | ||||||
|  |   styleUrls: ['./imageview.less'], | ||||||
|  | }) | ||||||
|  | export class ImageViewComponent implements OnInit { | ||||||
|  |   params: any = {}; | ||||||
|  |   currentIndex = 0; | ||||||
|  |   constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public http: _HttpClient) {} | ||||||
|  |  | ||||||
|  |   ngOnInit(): void { | ||||||
|  |     this.currentIndex = this.params.index; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   close() { | ||||||
|  |     this.modal.destroy(); | ||||||
|  |   } | ||||||
|  |   prevImg() { | ||||||
|  |     if (this.currentIndex === 0) { | ||||||
|  |       this.msgSrv.error('已经是第一张图片!'); | ||||||
|  |       return false; | ||||||
|  |     } | ||||||
|  |     this.currentIndex--; | ||||||
|  |     return true; | ||||||
|  |   } | ||||||
|  |   nextImg() { | ||||||
|  |     if (this.currentIndex === this.params.imgList.length - 1) { | ||||||
|  |       this.msgSrv.error('已经是最后一张图片!'); | ||||||
|  |       return false; | ||||||
|  |     } | ||||||
|  |     this.currentIndex++; | ||||||
|  |     return true; | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										39
									
								
								src/app/shared/components/imagelist/imageview/imageview.less
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								src/app/shared/components/imagelist/imageview/imageview.less
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,39 @@ | |||||||
|  | .imageWrap { | ||||||
|  |   position: relative; | ||||||
|  |   width: 95%; | ||||||
|  |   margin: 0 auto; | ||||||
|  | } | ||||||
|  | .imgBox { | ||||||
|  |   max-width: 500px; | ||||||
|  |   height: 100%; | ||||||
|  |   max-height: 800px; | ||||||
|  |   margin: 0 auto; | ||||||
|  |   overflow: hidden; | ||||||
|  |   img { | ||||||
|  |     width: 100%; | ||||||
|  |     vertical-align: middle; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | .prev, | ||||||
|  | .next { | ||||||
|  |   position: absolute; | ||||||
|  |   top: 50%; | ||||||
|  |   width: 50px; | ||||||
|  |   height: 50px; | ||||||
|  |   color: #bbb; | ||||||
|  |   font-size: 30px; | ||||||
|  |   line-height: 50px; | ||||||
|  |   text-align: center; | ||||||
|  |   background: #e2e2e2; | ||||||
|  |   border-radius: 100px; | ||||||
|  |   transform: translateY(-50%); | ||||||
|  | } | ||||||
|  | .next { | ||||||
|  |   right: 0; | ||||||
|  | } | ||||||
|  | .prev { | ||||||
|  |   left: 0; | ||||||
|  | } | ||||||
|  | .blue { | ||||||
|  |   color: #2593e8 !important; | ||||||
|  | } | ||||||
							
								
								
									
										3
									
								
								src/app/shared/components/imagelist/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/app/shared/components/imagelist/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | export * from './imagelist.component'; | ||||||
|  | export * from './imageview/imageview.component'; | ||||||
|  | export * from './image-list.module'; | ||||||
| @ -39,6 +39,7 @@ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'; | |||||||
| import { NzEmptyModule } from 'ng-zorro-antd/empty'; | import { NzEmptyModule } from 'ng-zorro-antd/empty'; | ||||||
| import { NzStatisticModule } from 'ng-zorro-antd/statistic'; | import { NzStatisticModule } from 'ng-zorro-antd/statistic'; | ||||||
| import { NzTimelineModule } from 'ng-zorro-antd/timeline'; | import { NzTimelineModule } from 'ng-zorro-antd/timeline'; | ||||||
|  | import { NzSkeletonModule } from 'ng-zorro-antd/skeleton'; | ||||||
| export const SHARED_ZORRO_MODULES = [ | export const SHARED_ZORRO_MODULES = [ | ||||||
|   NzButtonModule, |   NzButtonModule, | ||||||
|   NzGridModule, |   NzGridModule, | ||||||
| @ -71,5 +72,6 @@ export const SHARED_ZORRO_MODULES = [ | |||||||
|   NzPopoverModule, |   NzPopoverModule, | ||||||
|   NzEmptyModule, |   NzEmptyModule, | ||||||
|   NzStatisticModule, |   NzStatisticModule, | ||||||
|   NzTimelineModule |   NzTimelineModule, | ||||||
|  |   NzSkeletonModule | ||||||
| ]; | ]; | ||||||
|  | |||||||
| @ -28,6 +28,7 @@ import { StatusLabelModule } from './components/status-label'; | |||||||
| import { SharedThirdModule } from './shared-third.module'; | import { SharedThirdModule } from './shared-third.module'; | ||||||
| import { LogisticsTimeLineComponent } from './components/logistics-time-line/logistics-time-line.component'; | import { LogisticsTimeLineComponent } from './components/logistics-time-line/logistics-time-line.component'; | ||||||
| import { AmapModule } from './components/amap/amap.module'; | import { AmapModule } from './components/amap/amap.module'; | ||||||
|  | import { ImageListModule } from './components/imagelist'; | ||||||
|  |  | ||||||
| const MODULES = [ | const MODULES = [ | ||||||
|   AddressModule, |   AddressModule, | ||||||
| @ -40,6 +41,7 @@ const MODULES = [ | |||||||
|   StatusLabelModule, |   StatusLabelModule, | ||||||
|   SharedThirdModule, |   SharedThirdModule, | ||||||
|   AmapModule, |   AmapModule, | ||||||
|  |   ImageListModule, | ||||||
|   ...PRO_SHARED_MODULES |   ...PRO_SHARED_MODULES | ||||||
| ]; | ]; | ||||||
| // #endregion | // #endregion | ||||||
|  | |||||||
| @ -66,7 +66,7 @@ | |||||||
|                   "link": "/usercenter/freight/enterprise/view/:id" |                   "link": "/usercenter/freight/enterprise/view/:id" | ||||||
|                 }, |                 }, | ||||||
|                 { |                 { | ||||||
|                   "text": "用户列表", |                   "text": "货主员工列表", | ||||||
|                   "icon": "anticon anticon-dashboard", |                   "icon": "anticon anticon-dashboard", | ||||||
|                   "link": "/usercenter/freight/user" |                   "link": "/usercenter/freight/user" | ||||||
|                 } |                 } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user