申诉处理
This commit is contained in:
		| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-01-12 10:52:50 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-01-21 10:47:36 | ||||
|  * @LastEditTime : 2022-01-21 11:17:05 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\receipts-audit\\receipts-audit.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| @ -119,101 +119,8 @@ | ||||
| </nz-card> | ||||
|  | ||||
|  | ||||
| <nz-modal [(nzVisible)]="isVisible"  [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('0')"> | ||||
|   <ng-container *nzModalContent> | ||||
|     <st | ||||
|     #stFloat | ||||
|     size="small" | ||||
|     [bordered]="true" | ||||
|     [data]="service.$api_get_listChangeApply" | ||||
|     [columns]="columnsFloat" | ||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeParams }" | ||||
|     [res]="{ reName: { list: 'data', total: 'data.total' } }" | ||||
|     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" | ||||
|   > | ||||
|    | ||||
|   <ng-template st-row="order" let-item let-index="index"> | ||||
|     {{ index + 1 }} | ||||
|   </ng-template> | ||||
|   <ng-template st-row="externalSn" let-item let-index="index"> | ||||
|     <div> | ||||
|       <span *ngIf="item?.externalSn == '1'">待确认</span> | ||||
|       <span *ngIf="item?.externalSn == '2'">已确认</span> | ||||
|       <span *ngIf="item?.externalSn == '3'">已撤销</span> | ||||
|       <span *ngIf="item?.externalSn == '4'">拒绝</span> | ||||
|     </div> | ||||
|   </ng-template> | ||||
|   </st> | ||||
|   </ng-container> | ||||
|   <ng-template #nzModalFooter> | ||||
|     <button nz-button nzType="primary" (click)="handleCancel('0')">取消</button> | ||||
|     <button nz-button nzType="default" (click)="handleCancel('0')">确定</button> | ||||
|   </ng-template> | ||||
| </nz-modal> | ||||
|  | ||||
|  | ||||
| <nz-modal [(nzVisible)]="isVisibleView"  [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="查看" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('1')"> | ||||
|   <ng-container *nzModalContent> | ||||
|     <sf #sfView [schema]="schemaView" [ui]="uiView" [formData]="ViewCause" [compact]="true" [button]="'none'"> | ||||
|       <ng-template sf-template="no" let-me let-ui="uiView" let-schema="schemaView"> | ||||
|        <div style="display: flex;"> | ||||
|         <nz-input-number [(ngModel)]="demoValue" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number> | ||||
|         <div class="left_btn">元/吨</div> | ||||
|        </div> | ||||
|       </ng-template> | ||||
|     </sf> | ||||
|     <st | ||||
|     #stFloatView | ||||
|     multiSort | ||||
|     size="small" | ||||
|     [bordered]="true" | ||||
|     [data]="service.$api_getChangeRecordBulkDetail" | ||||
|     [columns]="columnsFloatView" | ||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }" | ||||
|     [res]="{ reName: { list: 'data.list', total: 'data.total' } }" | ||||
|   > | ||||
|   | ||||
|   <ng-template st-row="amountBeforeChange" let-item let-index="index"> | ||||
|     {{ item.amountBeforeChange | currency}} | ||||
|   </ng-template> | ||||
|   <ng-template st-row="amountchangeValue" let-item let-index="index"> | ||||
|     ¥{{ item.amountchangeValue | number: '0.2-2'}} | ||||
|   </ng-template> | ||||
|   <ng-template st-row="amountAfterChange" let-item let-index="index"> | ||||
|     {{ item.amountAfterChange | currency}} | ||||
|   </ng-template> | ||||
|   </st> | ||||
|   <div><span>变更原因:{{ViewCause?.changeCause}}</span></div> | ||||
|   <div><span>拒绝原因:{{ViewCause?.refuseCause}}</span></div> | ||||
|   <div><span>注:附加费依据调整后的运输费用重新计算</span></div> | ||||
|   </ng-container> | ||||
|   <ng-template #nzModalFooterview> | ||||
|     <button nz-button nzType="default" (click)="handleCancel('1')">取消</button> | ||||
|     <button nz-button nzType="primary" (click)="handleCancel('1')">确定</button> | ||||
|   </ng-template> | ||||
| </nz-modal> | ||||
|  | ||||
| <nz-modal [(nzVisible)]="isVisibleEvaluate"  [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate"  (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('2')"> | ||||
|   <ng-container *nzModalContent> | ||||
|     <nz-tabset> | ||||
|       <nz-tab nzTitle="我的评价"> | ||||
|       <div> | ||||
|         评分: <nz-rate [ngModel]="2.5" nzAllowHalf></nz-rate> | ||||
|         <div><span>评价内容:</span></div> | ||||
|       </div> | ||||
|       </nz-tab> | ||||
|       <nz-tab nzTitle="司机评价"> | ||||
|       <div> | ||||
|         暂无评价内容 | ||||
|       </div> | ||||
|       </nz-tab> | ||||
|     </nz-tabset> | ||||
|   </ng-container> | ||||
|   <ng-template #nzModalFooterEvaluate> | ||||
|     <button nz-button nzType="default" (click)="handleCancel('2')">取消</button> | ||||
|     <button nz-button nzType="primary" (click)="handleOK()">确定</button> | ||||
|   </ng-template> | ||||
| </nz-modal> | ||||
| <ng-template #enable> | ||||
|   <div class="ant-popover-message"> | ||||
|     <i nz-icon nzType="info-circle" nzTheme="fill"></i> | ||||
| @ -226,9 +133,9 @@ | ||||
| </ng-template> | ||||
| <ng-template #extraTemplate> | ||||
|   <div> | ||||
|     <button  nz-button nzType="primary" nzGhost nz-popconfirm | ||||
|     <!-- <button  nz-button nzType="primary" nzGhost nz-popconfirm | ||||
| [nzPopconfirmTitle]="enable" (nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight"> | ||||
| 批量签收 | ||||
| </button>  | ||||
| </button>  --> | ||||
|   </div> | ||||
| </ng-template> | ||||
| @ -10,6 +10,7 @@ import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-r | ||||
| import { of } from 'rxjs'; | ||||
| import { ShipperBaseService } from '@shared'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-order-management-receipts-audit', | ||||
| @ -26,35 +27,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|   isVisibleEvaluate = false; | ||||
|   isVisible = false; | ||||
|   _$expand = false; | ||||
|   changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 | ||||
|   changeViewId: any; // 查看运费变更记录id - 用于查看 | ||||
|   ViewCause: any; // 变更运费查看数据 | ||||
|   sfViewFormData: any; // 变更运费查看的sf 数据 | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   @ViewChild('stFloat') private readonly stFloat!: STComponent; | ||||
|   @ViewChild('stFloatView') private readonly stFloatView!: STComponent; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; | ||||
|   @ViewChild('sfView', { static: false }) sfView!: SFComponent; | ||||
|   columns: STColumn[] = []; | ||||
|   columnsFloat: STColumn[] = []; | ||||
|   columnsFloatView: STColumn[] = []; | ||||
|   demoValue: any; | ||||
|   resourceStatus: any; | ||||
|   datass: any = [ | ||||
|     { | ||||
|       one: '1', | ||||
|       two: '1', | ||||
|       three: '1', | ||||
|       id: 1 | ||||
|     }, | ||||
|     { | ||||
|       one: '2', | ||||
|       two: '2', | ||||
|       three: '2', | ||||
|       id: 2 | ||||
|     } | ||||
|   ]; | ||||
|   tabs = { | ||||
|     cancelQuantity: 0, | ||||
|     receivedQuantity: 0, | ||||
| @ -93,11 +69,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|   get selectedRows() { | ||||
|     return this.st?.list.filter(item => item.checked) || []; | ||||
|   } | ||||
|   get changeParams() { | ||||
|     return { | ||||
|       id: this.changeId | ||||
|     }; | ||||
|   } | ||||
|   search() { | ||||
|     this.st?.load(1); | ||||
|     this.getGoodsSourceStatistical(); | ||||
| @ -139,9 +110,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|     this.getGoodsSourceStatistical(); | ||||
|     this.initSF(); | ||||
|     this.initST(); | ||||
|     this.initSTFloat(); | ||||
|     this.initSTFloatView(); | ||||
|     this.initSFView(); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
| @ -295,42 +263,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
|   /** | ||||
|    * 初始化查询表单 | ||||
|    */ | ||||
|   initSFView() { | ||||
|     this.schemaView = { | ||||
|       properties: { | ||||
|         freightPrice: { | ||||
|           type: 'string', | ||||
|           title: '运费单价' | ||||
|         }, | ||||
|         rule: { | ||||
|           title: '', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'goodresource:rounding:rules' }, | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         settlementBasis: { | ||||
|           type: 'string', | ||||
|           title: '结算重量', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'goodresource:settlement:type' }, | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.uiView = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } }; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 初始化数据列表 | ||||
| @ -408,94 +340,29 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '通过', | ||||
|             click: _record => this.viewEvaluate(_record), | ||||
|             iif: item => item.billStatus == '5' | ||||
|             click: _record => console.log('1'), | ||||
|             // iif: item => item.billStatus == '5' | ||||
|           }, | ||||
|           { | ||||
|             text: '生成电子单据', | ||||
|             click: _record => this.OpenPrice(_record), | ||||
|             iif: item => | ||||
|               item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6' | ||||
|             click: _record => this.generate(_record), | ||||
|             // iif: item => item.billStatus == '4' | ||||
|           }, | ||||
|           { | ||||
|             text: '修改', | ||||
|             click: _record => this.updateFreight(_record), | ||||
|             iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' | ||||
|             click: _record => this.modification(_record), | ||||
|             // iif: item => item.billStatus == '4'  | ||||
|           }, | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|   initSTFloat() { | ||||
|     this.columnsFloat = [ | ||||
|       { | ||||
|         title: '序号', | ||||
|         className: 'text-center', | ||||
|         render: 'order' | ||||
|       }, | ||||
|       { | ||||
|         title: '操作时间', | ||||
|         className: 'text-center', | ||||
|         index: 'applyTime' | ||||
|       }, | ||||
|       { | ||||
|         title: '操作人', | ||||
|         className: 'text-center', | ||||
|         index: 'applyUserName' | ||||
|       }, | ||||
|       { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         fixed: 'right', | ||||
|         className: 'text-left', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '查看', | ||||
|             click: _record => this.FloatView(_record) | ||||
|           }, | ||||
|           // { | ||||
|           //   text: '查看协议', | ||||
|           //   click: (_record, _modal, _instance) => this.view(_record) | ||||
|           // }, | ||||
|           { | ||||
|             text: '撤销', | ||||
|             click: _record => this.revoke(_record), | ||||
|             iif: item => item.handleStatus === '1' || item.handleStatus === 1 | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|   initSTFloatView() { | ||||
|     this.columnsFloatView = [ | ||||
|       { | ||||
|         title: '费用名称', | ||||
|         width: '100px', | ||||
|         className: 'text-center', | ||||
|         index: 'costName' | ||||
|       }, | ||||
|       { | ||||
|         title: '变更前', | ||||
|         width: '100px', | ||||
|         className: 'text-center', | ||||
|         index: 'amountAfterChange', | ||||
|         render: 'amountAfterChange' | ||||
|       }, | ||||
|       { title: '变更值', index: 'amountchangeValue', width: '120px', className: 'text-center', render: 'amountchangeValue' }, | ||||
|       { title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', className: 'text-center' } | ||||
|     ]; | ||||
|   } | ||||
|   /** | ||||
|    * 查询字段个数 | ||||
|    */ | ||||
|   get queryFieldCount(): number { | ||||
|     return Object.keys(this.schema?.properties || {}).length; | ||||
|   } | ||||
|   get changeViewParams() { | ||||
|     return { | ||||
|       id: this.changeViewId | ||||
|     }; | ||||
|   } | ||||
|   /** | ||||
|    * 伸缩查询条件 | ||||
|    */ | ||||
| @ -518,74 +385,19 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|   importGoodsSource() {} | ||||
|   audit(item: any) {} | ||||
|  | ||||
|   /* | ||||
|   * 审核关闭弹窗 | ||||
|   view: 1 | ||||
|   浮动费用: 0 | ||||
|   查看评价: 3 | ||||
|   */ | ||||
|   handleCancel(type: string) { | ||||
|     if (type === '0') { | ||||
|       this.isVisible = false; | ||||
|     } else if (type === '1') { | ||||
|       console.log(type); | ||||
|       this.isVisibleView = false; | ||||
|     } else if (type === '2') { | ||||
|       this.isVisibleEvaluate = false; | ||||
|     } | ||||
|   } | ||||
|   /** | ||||
|    * 审核通过按钮 | ||||
|    */ | ||||
|   handleOK() {} | ||||
|   OpenPrice(item: any) { | ||||
|     this.changeId = item.id; | ||||
|     this.isVisible = true; | ||||
|   } | ||||
|   /** | ||||
|    * 浮动费用查看 | ||||
|    */ | ||||
|   FloatView(item: any) { | ||||
|     this.changeViewId = item.id; | ||||
|     this.service.request(this.service.$api_getChangeRecordBulkDetail, { id: this.changeViewId }).subscribe(res => { | ||||
|       this.ViewCause = res; | ||||
|     }); | ||||
|     this.isVisibleView = true; | ||||
|   } | ||||
|   /** | ||||
|    *查看评价 | ||||
|    */ | ||||
|   viewEvaluate(item: any) { | ||||
|     this.isVisibleEvaluate = true; | ||||
|   } | ||||
|   /** | ||||
|    *变更运费 | ||||
|    */ | ||||
|   updateFreight(item: any) { | ||||
|     this.service.request(this.service.$api_getFreightChangeBulkDetail, { id: item.id }).subscribe(data => { | ||||
|       if (data) { | ||||
|         const modal = this.modal.create({ | ||||
|           nzTitle: '变更运费', | ||||
|           nzWidth: 580, | ||||
|           nzContent: UpdateFreightComponent, | ||||
|           nzComponentParams: { data: { ...data, billId: item.id } }, | ||||
|           nzFooter: null | ||||
|         }); | ||||
|         modal.afterClose.subscribe(_ => { | ||||
|           this.st.reload(1); | ||||
|           this.getGoodsSourceStatistical(); | ||||
|         }); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   //  *确认签收 | ||||
|  | ||||
|   confirmReceipt(item: any) { | ||||
|   // 修改 | ||||
|   modification(item: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '确认签收', | ||||
|       nzTitle: '修改', | ||||
|       nzWidth: '50%', | ||||
|       nzContent: ConfirReceiptComponent, | ||||
|       nzContent: orderManagementVoucherViewComponent, | ||||
|       nzComponentParams: { | ||||
|         i: item, | ||||
|         Status: 1 | ||||
| @ -594,20 +406,25 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe((result: any) => { | ||||
|       this.st.load(1); | ||||
|       this.getGoodsSourceStatistical(); | ||||
|     }); | ||||
|       this.getGoodsSourceStatistical() | ||||
|   }); | ||||
|   } | ||||
|   userAction() { | ||||
|     let params: any[] = []; | ||||
|     this.selectedRows.forEach(item => { | ||||
|       params.push(item.id); | ||||
|     }); | ||||
|     this.service.request(this.service.$api_get_batchSignBulkOrder, params).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.st.load(1); | ||||
|         this.getGoodsSourceStatistical(); | ||||
|       } | ||||
|   // 生成电子单据 | ||||
|   generate(item: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '查看凭证', | ||||
|       nzWidth: '50%', | ||||
|       nzContent: orderManagementVoucherViewComponent, | ||||
|       nzComponentParams: { | ||||
|         i: item, | ||||
|         Status: 2 | ||||
|       }, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe((result: any) => { | ||||
|       this.st.load(1); | ||||
|       this.getGoodsSourceStatistical() | ||||
|   }); | ||||
|   } | ||||
|   // 取消订单 | ||||
|   cancellation(item: any) { | ||||
| @ -628,20 +445,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { | ||||
|         }) | ||||
|     }); | ||||
|   } | ||||
|   revoke(item: any) { | ||||
|     this.modal.confirm({ | ||||
|       nzTitle: '是否确定立即撤销费用变更!</i>', | ||||
|       nzOnOk: () => | ||||
|         this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe(res => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('撤销成功!'); | ||||
|             this.stFloat.reload(); | ||||
|             this.st?.reload(1); | ||||
|             this.getGoodsSourceStatistical(); | ||||
|           } | ||||
|         }) | ||||
|     }); | ||||
|   } | ||||
|   // 修改订单 | ||||
|   changeOrder(value: any) { | ||||
|     this.router.navigate(['order-management/bulk-detailChange', value.id]); | ||||
|  | ||||
| @ -0,0 +1,30 @@ | ||||
| <!-- | ||||
|  * @Description  :  | ||||
|  * @Version      : 1.0 | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-15 13:17:42 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-01-18 17:23:52 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\sure-arrive\\sure-arrive.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
|  | ||||
| <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none"> | ||||
|   <ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema"> | ||||
|     <div style="display: flex"> | ||||
|       <nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number> | ||||
|       <div class="left_btn">吨</div> | ||||
|     </div> | ||||
|   </ng-template> | ||||
|   <ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema"> | ||||
|     <div style="display: flex"> | ||||
|       <nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number> | ||||
|       <div class="left_btn">方</div> | ||||
|     </div> | ||||
|   </ng-template> | ||||
| </sf> | ||||
|  | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading">确认到车</button> | ||||
| </div> | ||||
| @ -0,0 +1,7 @@ | ||||
|     .left_btn { | ||||
|          width: 50px; | ||||
|         height: 32px;  | ||||
|          padding-left: 8px; | ||||
|          line-height:32px;  | ||||
|          background-color: #d7d7d7; | ||||
|     } | ||||
| @ -0,0 +1,481 @@ | ||||
|  | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { DatePipe } from '@angular/common'; | ||||
| import { | ||||
|   SFComponent, | ||||
|   SFCustomWidgetSchema, | ||||
|   SFDateWidgetSchema, | ||||
|   SFNumberWidgetSchema, | ||||
|   SFRadioWidgetSchema, | ||||
|   SFSchema, | ||||
|   SFSelectWidgetSchema, | ||||
|   SFTextareaWidgetSchema, | ||||
|   SFUISchema, | ||||
|   SFUploadWidgetSchema | ||||
| } from '@delon/form'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service'; | ||||
| import { Observable, Observer } from 'rxjs'; | ||||
| import { EAEnvironmentService } from '@shared'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-order-management-voucher-view', | ||||
|   templateUrl: './voucher-view.component.html', | ||||
|   styleUrls: ['./voucher-view.component.less'], | ||||
|   providers: [DatePipe] | ||||
| }) | ||||
| export class orderManagementVoucherViewComponent implements OnInit { | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   formData: any; | ||||
|   Status: any; | ||||
|   data: any ={ | ||||
|     weight: 0, | ||||
|     volume: 0 | ||||
|   }; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|   constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe,private datePipe: DatePipe,private envSrv: EAEnvironmentService, ) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.i) | ||||
|     this.initData() | ||||
|     this.i.time = this.i.loadingTime; | ||||
|     this.initSF(); | ||||
|   } | ||||
|   initSF() { | ||||
|     if(this.Status === 1) { | ||||
|  | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         imgUrl3: { | ||||
|           type: 'string', | ||||
|           title: '装货凭证', | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '提货单', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         }, | ||||
|         imgUrl4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '人车货照片', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         }, | ||||
|         no4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'text', | ||||
|            }, | ||||
|            default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', | ||||
|         }, | ||||
|         imgUrl1: { | ||||
|           type: 'string', | ||||
|           title: '卸货凭证', | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '提货单', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         }, | ||||
|         imgUrl2: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '人车货照片', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         } | ||||
|       }, | ||||
|       required: ['time'] | ||||
|     }; | ||||
|   }else { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         imgUrl3: { | ||||
|           type: 'string', | ||||
|           title: '装货凭证', | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '提货单', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         }, | ||||
|         imgUrl4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '人车货照片', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         }, | ||||
|         no4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'text', | ||||
|            }, | ||||
|            default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', | ||||
|         }, | ||||
|         imgUrl1: { | ||||
|           type: 'string', | ||||
|           title: '卸货凭证', | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '提货单', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         }, | ||||
|         imgUrl2: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'upload', | ||||
|             action: apiConf.fileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             descriptionI18n: '人车货照片', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             beforeUpload: (file: any, fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt1M = file.size / 1024 / 1024 < 5; | ||||
|                 const fileType = 'image/png,image/jpeg'; | ||||
|                 if (fileType.indexOf(file.type) === -1) { | ||||
|                   this.service.msgSrv.warning('图片格式不正确!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 if (!isLt1M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt1M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|           } as SFUploadWidgetSchema, | ||||
|         } | ||||
|       }, | ||||
|       required: ['time', 'weight' ] | ||||
|     }; | ||||
|   } | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 20 } | ||||
|       }, | ||||
|       $imgUrl1: { grid: { span: 12} }, | ||||
|       $imgUrl2: { grid: { span: 12} }, | ||||
|       $imgUrl3: { grid: { span: 12} }, | ||||
|       $imgUrl4: { grid: { span: 12} }, | ||||
|     }; | ||||
|   } | ||||
|   save(value: any): void { | ||||
|     if(this.Status === 1) { | ||||
|       if(!value.time) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|        const params = { | ||||
|         id: this.i.id, | ||||
|         imgUrl1: value.imgUrl1.data.fullFilePath, | ||||
|         imgUrl2: value.imgUrl2.data.fullFilePath, | ||||
|         time: value.time, | ||||
|       } | ||||
|       params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|       this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => { | ||||
|         if(res) { | ||||
|           this.service.msgSrv.success('确认到车成功!') | ||||
|            this.modal.destroy(true); | ||||
|         } | ||||
|       }) | ||||
|     } else { | ||||
|       if(!value.time || !this.data.weight) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|         console.log(value) | ||||
|         console.log(this.i) | ||||
|         const params = { | ||||
|           id: this.i?.id, | ||||
|           imgUrl1: value.imgUrl1.data.fullFilePath, | ||||
|           imgUrl2: value.imgUrl2.data.fullFilePath, | ||||
|           time: value.time, | ||||
|           volume: this.data.volume, | ||||
|           weight: this.data.weight | ||||
|         } | ||||
|         params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|         console.log(params) | ||||
|         this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => { | ||||
|           if(res) { | ||||
|             this.service.msgSrv.success('确认到车成功!') | ||||
|              this.modal.destroy(true); | ||||
|           } | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|   } | ||||
|     //  确认到车界面信息(两个只能看的图片) | ||||
|   initData() { | ||||
|     this.service.request(this.service.$api_get_getUnloadCarInfo, { id : this.i?.id}).subscribe((res) => { | ||||
|       console.log(res) | ||||
|       if (res.imgUrl1) { | ||||
|         this.formData = { | ||||
|           imgUrl3: [ | ||||
|             { | ||||
|               uid: 'logo', | ||||
|               name: 'LOGO', | ||||
|               status: 'done', | ||||
|               url: res.imgUrl1, | ||||
|               response: { | ||||
|                 url: res.imgUrl1, | ||||
|               }, | ||||
|             }, | ||||
|       ], | ||||
|           imgUrl4: [ | ||||
|             { | ||||
|               uid: 'logo', | ||||
|               name: 'LOGO', | ||||
|               status: 'done', | ||||
|               url: res.imgUrl2, | ||||
|               response: { | ||||
|                 url: res.imgUrl2, | ||||
|               }, | ||||
|             }, | ||||
|       ], | ||||
|         }; | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|   close(): void { | ||||
|     this.modal.destroy(true); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-01-06 09:24:00 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-01-19 17:10:24 | ||||
|  * @LastEditTime : 2022-01-21 11:12:17 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\order-management.module.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -23,6 +23,7 @@ import { OrderManagementVehicleDetailChangeComponent } from './components/vehicl | ||||
| import { OrderManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component'; | ||||
|  | ||||
| import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component'; | ||||
| import { orderManagementVoucherViewComponent } from './modal/audit/voucher-view/voucher-view.component'; | ||||
| import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.component'; | ||||
| import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component'; | ||||
| import { OneCarOrderCancelComponent } from './modal/vehicle/cancel/cancel.component'; | ||||
| @ -56,7 +57,8 @@ const COMPONENTS: Type<void>[] = [ | ||||
|   VehicleFreightPeopleComponent, | ||||
|   VehicleModifyCaptainComponent, | ||||
|   OrderManagementComplaintDetailComponent, | ||||
|   OrderManagementReceiptsAuditComponent | ||||
|   OrderManagementReceiptsAuditComponent, | ||||
|   orderManagementVoucherViewComponent | ||||
| ]; | ||||
|  | ||||
| @NgModule({ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user