订单
This commit is contained in:
		| @ -1,6 +1,6 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { map } from 'rxjs/operators'; | ||||
| @ -73,8 +73,8 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           title: '卸货地' | ||||
|         }, | ||||
|         sex: { | ||||
|           title: '货物类型', | ||||
|         sex2: { | ||||
|           title: '服务类型', | ||||
|           type: 'string', | ||||
|           default: 0, | ||||
|           enum: [ | ||||
| @ -90,9 +90,50 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|             }, | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         sex: { | ||||
|           title: '结算依据', | ||||
|           type: 'string', | ||||
|           default: 0, | ||||
|           enum: [ | ||||
|             { label: '未知', value: 0 }, | ||||
|             { label: '男', value: 1 }, | ||||
|             { label: '女', value: 2 }, | ||||
|             { label: '保密', value: 3 }, | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         createTime: { | ||||
|           title: '发布时间', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'date', | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } as SFDateWidgetSchema, | ||||
|         }, | ||||
|         createTime2: { | ||||
|           title: '截止时间', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'date', | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } as SFDateWidgetSchema, | ||||
|         }, | ||||
|         appId: { | ||||
|           type: 'string', | ||||
|           title: '录单员', | ||||
|           title: '网络货运人', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
| @ -103,10 +144,19 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|             asyncData: () => this.getCatalogueMember(), | ||||
|           }, | ||||
|         }, | ||||
|         no4: { | ||||
|           type: 'string', | ||||
|           title: '货主', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } | ||||
|         }, | ||||
|       }, | ||||
|       type: 'object', | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 80, grid: { span: 8, gutter: 4 } } }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
|   initSFFre() { | ||||
|     this.freightSchema = { | ||||
| @ -202,7 +252,7 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|         title: '操作', | ||||
|         fixed: 'right', | ||||
|         width: '200px', | ||||
|         className: 'text-center', | ||||
|         className: 'text-left', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '货源审核', | ||||
|  | ||||
| @ -0,0 +1,204 @@ | ||||
| <page-header-wrapper [title]="''"></page-header-wrapper> | ||||
| <nz-card> | ||||
|   <div class="card-title">货源单设置</div> | ||||
|   <sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1"></sf> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">装卸货信息<span class="tip-font">预计公里数:-km,预计行程耗时:-小时</span></div> | ||||
|   <!-- <sf #sf2 [schema]="schema2" [button]="'none'" [ui]="ui2"> | ||||
|     <ng-template sf-template="name1" let-i let-ui="ui"> | ||||
|       <div nz-row class="align-center"> | ||||
|         <div nz-col nzSpan="16"> | ||||
|           <input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> | ||||
|         </div> | ||||
|         <div nz-col nzSpan="8"> | ||||
|           <span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span> | ||||
|           <label nz-checkbox [(ngModel)]="newTempchecked" [ngModelOptions]="{ standalone: true }"></label> | ||||
|           <span style="padding-left: 10px">发布后存入新模板</span> | ||||
|         </div> | ||||
|       </div> | ||||
|     </ng-template> | ||||
|   </sf> --> | ||||
|   <form nz-form [formGroup]="validateForm1" role="form"> | ||||
|     <div nz-row [nzGutter]="24"> | ||||
|       <div nz-col [nzSpan]="8"> | ||||
|         <div *ngFor="let data of startInfo; let idx = index"> | ||||
|           <nz-form-item> | ||||
|             <nz-form-label [nzSpan]="4" nzRequired>装货地</nz-form-label> | ||||
|             <nz-form-control [nzErrorTip]="'请输入装货地'"> | ||||
|               <div class="align-center"> | ||||
|                 <nz-input-group [nzSuffix]="endInconTemp1"> | ||||
|                   <input nz-input [(ngModel)]="data.address" [ngModelOptions]="{ standalone: true }" /> | ||||
|                 </nz-input-group> | ||||
|                 <span style="padding: 0 10px" | ||||
|                   ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap()"></i | ||||
|                 ></span> | ||||
|                 <span *ngIf="idx !== 0" | ||||
|                   ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx)">X</i | ||||
|                 ></span> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
|           <nz-form-item> | ||||
|             <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> | ||||
|             <nz-form-control [nzErrorTip]="'请输入联系人信息'"> | ||||
|               <div class="align-center"> | ||||
|                 <input nz-input [(ngModel)]="data.name" [ngModelOptions]="{ standalone: true }" maxlength="30" /> | ||||
|                 <input style="margin-left: 12px" nz-input [(ngModel)]="data.phone" [ngModelOptions]="{ standalone: true }" maxlength="11" /> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
|         </div> | ||||
|         <button nz-button nzType="primary" (click)="addStartInfo($event)"> | ||||
|           <i nz-icon nzType="plus"></i> | ||||
|           添加装货地 | ||||
|         </button> | ||||
|       </div> | ||||
|       <div nz-col [nzSpan]="8"> | ||||
|         <div style="display: flex; justify-content: center"> | ||||
|           <span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div nz-col [nzSpan]="8"> | ||||
|         <div *ngFor="let data of endInfo; let idx = index"> | ||||
|           <nz-form-item> | ||||
|             <nz-form-label [nzSpan]="4" nzRequired>卸货地</nz-form-label> | ||||
|             <nz-form-control [nzErrorTip]="'请输入卸货地'"> | ||||
|               <div class="align-center"> | ||||
|                 <nz-input-group [nzSuffix]="endInconTemp1"> | ||||
|                   <input nz-input [(ngModel)]="data.address" [ngModelOptions]="{ standalone: true }" /> | ||||
|                 </nz-input-group> | ||||
|                 <span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span> | ||||
|                 <span *ngIf="idx !== 0" | ||||
|                   ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)">X</i | ||||
|                 ></span> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
|           <nz-form-item> | ||||
|             <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> | ||||
|             <nz-form-control [nzErrorTip]="'请输入联系人信息'"> | ||||
|               <div class="align-center"> | ||||
|                 <input nz-input [(ngModel)]="data.name" [ngModelOptions]="{ standalone: true }" maxlength="30" /> | ||||
|                 <input style="margin-left: 12px" nz-input [(ngModel)]="data.phone" [ngModelOptions]="{ standalone: true }" maxlength="11" /> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
|         </div> | ||||
|         <button nz-button nzType="primary" (click)="addEndInfo($event)"> | ||||
|           <i nz-icon nzType="plus"></i> | ||||
|           添加卸货地 | ||||
|         </button> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div nz-row [nzGutter]="24" style="margin-top: 24px"> | ||||
|       <div nz-col [nzSpan]="9"> | ||||
|         <nz-form-item> | ||||
|           <nz-form-label [nzSpan]="4" nzRequired>装货时间</nz-form-label> | ||||
|           <nz-form-control [nzErrorTip]="'请输入装货时间'"> | ||||
|             <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="name1"></nz-date-picker> | ||||
|           </nz-form-control> | ||||
|         </nz-form-item> | ||||
|       </div> | ||||
|       <div nz-col [nzSpan]="8"> | ||||
|         <nz-form-item> | ||||
|           <nz-form-label [nzSpan]="9" nzRequired>卸货时间</nz-form-label> | ||||
|           <nz-form-control [nzErrorTip]="'请输入卸货时间'"> | ||||
|             <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="name2"></nz-date-picker> | ||||
|           </nz-form-control> | ||||
|         </nz-form-item> | ||||
|       </div> | ||||
|     </div> | ||||
|     <ng-template #endInconTemp1><i nz-icon nzType="global"></i></ng-template> | ||||
|   </form> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">货物信息</div> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3"></sf> | ||||
|       <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4"> | ||||
|         <ng-template sf-template="name3" let-i let-ui="ui"> | ||||
|           <nz-input-group nzAddOnAfter="吨"> | ||||
|             <input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> | ||||
|           </nz-input-group> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="name4" let-i let-ui="ui"> | ||||
|           <nz-input-group nzAddOnAfter="方"> | ||||
|             <input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> | ||||
|           </nz-input-group> | ||||
|         </ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">服务信息</div> | ||||
|   <div nz-row [nzGutter]="24" style="margin: 24px 0"> | ||||
|     <div nz-col [nzSpan]="10"> | ||||
|       <div class="align-center"> | ||||
|         <span style="font-weight: bolder; margin-right: 24px">购买货运险</span> | ||||
|         <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> | ||||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
|   <ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a>《投保告知》</a></ng-template> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5"> | ||||
|         <ng-template sf-template="name1" let-i let-ui="ui"> | ||||
|           <div class="align-center"> | ||||
|             <input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> | ||||
|             <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" | ||||
|               ><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i | ||||
|             ></span> | ||||
|             <ng-template #template2>注意事项:.......</ng-template> | ||||
|           </div> | ||||
|         </ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">补充信息</div> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6"></sf> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">运费信息</div> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7"> | ||||
|         <ng-template sf-template="name5" let-i let-ui="ui">¥0.00</ng-template> | ||||
|         <ng-template sf-template="name6" let-i let-ui="ui">¥0.00</ng-template> | ||||
|         <ng-template sf-template="name7" let-i let-ui="ui">¥0.00</ng-template> | ||||
|         <ng-template sf-template="name8" let-i let-ui="ui"> | ||||
|           <div nz-row> | ||||
|             <div class="align-center"> | ||||
|               <div nz-col nzSpan="16"> | ||||
|                 <input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> | ||||
|               </div> | ||||
|               <div nz-col nzSpan="8"> | ||||
|                 <span>天内支付运费</span> | ||||
|               </div> | ||||
|             </div> | ||||
|           </div> | ||||
|         </ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
| <nz-card> | ||||
|   <div class="align-center"> | ||||
|     <button nz-button nzType="primary" (click)="chooseFamifiar()">指派熟车</button> | ||||
|     <button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">司机抢单</button> | ||||
|   </div> | ||||
| </nz-card> | ||||
| @ -0,0 +1,22 @@ | ||||
| .tip-font { | ||||
|   margin-left: 16px; | ||||
|   font-weight: 500; | ||||
|   font-size: 12px; | ||||
| } | ||||
|  | ||||
| .card-title { | ||||
|   margin-bottom: 24px; | ||||
|   font-weight: bold; | ||||
|   font-size: 16px; | ||||
| } | ||||
|  | ||||
| .align-center { | ||||
|   display: flex; | ||||
|   align-items: center; | ||||
|   justify-content: center; | ||||
| } | ||||
|  | ||||
| #container { | ||||
|   width: 300px; | ||||
|   height: 180px; | ||||
| } | ||||
| @ -0,0 +1,496 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { | ||||
|   SFArrayWidgetSchema, | ||||
|   SFComponent, | ||||
|   SFNumberWidgetSchema, | ||||
|   SFSchema, | ||||
|   SFSelectWidgetSchema, | ||||
|   SFTextareaWidgetSchema, | ||||
|   SFUISchema | ||||
| } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; | ||||
|  | ||||
| // import { PublishGoodsChooseFamifiarComponent } from '../bulk-publish/choose-famifiar/choose-famifiar.component'; | ||||
| // import { GaodeMapComponent } from '../gaode-map/gaode-map.component'; | ||||
| @Component({ | ||||
|   selector: 'app-publish-goods-onecar-publish', | ||||
|   templateUrl: './onecar-publish.component.html', | ||||
|   styleUrls: ['./onecar-publish.component.less'] | ||||
| }) | ||||
| export class  SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|   validateForm1: FormGroup; | ||||
|   newTempchecked = false; //是否存入新模板 | ||||
|  | ||||
|   // // 单位 | ||||
|   unit1 = '吨'; | ||||
|   unit2 = '方'; | ||||
|   unit3 = '保价费金额'; | ||||
|   startInfo: any[] = [ | ||||
|     { | ||||
|       addresss: '深圳', | ||||
|       name: '张三', | ||||
|       phone: '18888888888' | ||||
|     } | ||||
|   ]; | ||||
|   endInfo: any[] = [ | ||||
|     { | ||||
|       addresss: '深圳', | ||||
|       name: '张三', | ||||
|       phone: '18888888888' | ||||
|     } | ||||
|   ]; | ||||
|  | ||||
|   // formatterRmb = (value: number): string => `¥ ${value}`; | ||||
|   // parserRmb = (value: string): string => value.replace('¥ ', ''); | ||||
|   constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private modalService: NzModalService) { | ||||
|     this.validateForm1 = fb.group({ | ||||
|       name1: [null, []], | ||||
|       name2: [null, []], | ||||
|       name3: [null, []] | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   @ViewChild('sf1', { static: false }) sf1!: SFComponent; | ||||
|   schema1: SFSchema = {}; | ||||
|   ui1!: SFUISchema; | ||||
|  | ||||
|   @ViewChild('sf2', { static: false }) sf2!: SFComponent; | ||||
|   schema2: SFSchema = {}; | ||||
|   ui2!: SFUISchema; | ||||
|  | ||||
|   @ViewChild('sf3', { static: false }) sf3!: SFComponent; | ||||
|   schema3: SFSchema = {}; | ||||
|   ui3!: SFUISchema; | ||||
|  | ||||
|   @ViewChild('sf4', { static: false }) sf4!: SFComponent; | ||||
|   schema4: SFSchema = {}; | ||||
|   ui4!: SFUISchema; | ||||
|  | ||||
|   @ViewChild('sf5', { static: false }) sf5!: SFComponent; | ||||
|   schema5: SFSchema = {}; | ||||
|   ui5!: SFUISchema; | ||||
|  | ||||
|   @ViewChild('sf6', { static: false }) sf6!: SFComponent; | ||||
|   schema6: SFSchema = {}; | ||||
|   ui6!: SFUISchema; | ||||
|  | ||||
|   @ViewChild('sf7', { static: false }) sf7!: SFComponent; | ||||
|   schema7: SFSchema = {}; | ||||
|   ui7!: SFUISchema; | ||||
|   ngOnInit(): void { | ||||
|     this.initSF1(); | ||||
|     // this.initSF2(); | ||||
|     this.initSF3(); | ||||
|     this.initSF4(); | ||||
|     this.initSF5(); | ||||
|     this.initSF6(); | ||||
|     this.initSF7(); | ||||
|   } | ||||
|  | ||||
|   initSF1() { | ||||
|     this.schema1 = { | ||||
|       properties: { | ||||
|         name3: { | ||||
|           type: 'string', | ||||
|           title: '货主', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name4: { | ||||
|           type: 'string', | ||||
|           title: '项目', | ||||
|           enum: [ | ||||
|             { label: '1', value: '1' }, | ||||
|             { label: '2', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true | ||||
|             // asyncData: () => | ||||
|             //   this.service.loadChildData2('0', '2').pipe( | ||||
|             //     map((data: any) => { | ||||
|             //       return data.map((m: any) => { | ||||
|             //         return { label: m.name, value: m.id }; | ||||
|             //       }); | ||||
|             //     }), | ||||
|             //   ), | ||||
|             // change: (i) => this.updateCategory(i, '/categoryId2'), | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         no1: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
|           ui: { | ||||
|             widget: 'text' | ||||
|           }, | ||||
|           default: 0 | ||||
|         }, | ||||
|         name8: { | ||||
|           type: 'string', | ||||
|           title: '外部货源号', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name2: { | ||||
|           type: 'string', | ||||
|           title: '调度员', | ||||
|           enum: [ | ||||
|             { label: '1', value: '1' }, | ||||
|             { label: '2', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true | ||||
|             // asyncData: () => | ||||
|             //   this.service.loadChildData2('0', '2').pipe( | ||||
|             //     map((data: any) => { | ||||
|             //       return data.map((m: any) => { | ||||
|             //         return { label: m.name, value: m.id }; | ||||
|             //       }); | ||||
|             //     }), | ||||
|             //   ), | ||||
|             // change: (i) => this.updateCategory(i, '/categoryId2'), | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui1 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 8 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   // initSF2() { | ||||
|   //   this.schema2 = { | ||||
|   //     properties: { | ||||
|   //       name1: { | ||||
|   //         type: 'string', | ||||
|   //         title: '发货模板', | ||||
|   //         ui: { | ||||
|   //           widget: 'custom', | ||||
|   //           placeholder: '请输入' | ||||
|   //         } | ||||
|   //       } | ||||
|   //     } | ||||
|   //   }; | ||||
|   //   this.ui2 = { | ||||
|   //     '*': { | ||||
|   //       spanLabelFixed: 90, | ||||
|   //       grid: { span: 12 } | ||||
|   //     } | ||||
|   //   }; | ||||
|   // } | ||||
|   initSF3() { | ||||
|     this.schema3 = { | ||||
|       properties: { | ||||
|         name1: { | ||||
|           type: 'string', | ||||
|           title: '货物名称', | ||||
|           enum: [ | ||||
|             { label: '1', value: '1' }, | ||||
|             { label: '2', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择' | ||||
|             // asyncData: () => | ||||
|             //   this.categoryService.loadChildData2('0', '2').pipe( | ||||
|             //     map((data: any) => { | ||||
|             //       return data.map((m: any) => { | ||||
|             //         return { label: m.name, value: m.id }; | ||||
|             //       }); | ||||
|             //     }), | ||||
|             //   ), | ||||
|             // change: (i) => this.updateCategory(i, '/categoryId2'), | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         name2: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               name1: value => value === '1' | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui3 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $name1: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $name2: { | ||||
|         grid: { span: 12 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   initSF4() { | ||||
|     this.schema4 = { | ||||
|       properties: { | ||||
|         name3: { | ||||
|           type: 'string', | ||||
|           title: '重量/体积', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name5: { | ||||
|           type: 'string', | ||||
|           title: '用车需求', | ||||
|           enum: [ | ||||
|             { label: '1', value: '1' }, | ||||
|             { label: '2', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择车型' | ||||
|             // asyncData: () => | ||||
|             //   this.categoryService.loadChildData2('0', '2').pipe( | ||||
|             //     map((data: any) => { | ||||
|             //       return data.map((m: any) => { | ||||
|             //         return { label: m.name, value: m.id }; | ||||
|             //       }); | ||||
|             //     }), | ||||
|             //   ), | ||||
|             // change: (i) => this.updateCategory(i, '/categoryId2'), | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         name6: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           enum: [ | ||||
|             { label: '1', value: '1' }, | ||||
|             { label: '2', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择车长' | ||||
|             // asyncData: () => | ||||
|             //   this.categoryService.loadChildData2('0', '2').pipe( | ||||
|             //     map((data: any) => { | ||||
|             //       return data.map((m: any) => { | ||||
|             //         return { label: m.name, value: m.id }; | ||||
|             //       }); | ||||
|             //     }), | ||||
|             //   ), | ||||
|             // change: (i) => this.updateCategory(i, '/categoryId2'), | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui4 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       }, | ||||
|       $name3: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $name4: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $name5: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $name6: { | ||||
|         grid: { span: 12 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   initSF5() { | ||||
|     this.schema5 = { | ||||
|       properties: { | ||||
|         name1: { | ||||
|           type: 'string', | ||||
|           title: '货物价值', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui5 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   initSF6() { | ||||
|     this.schema6 = { | ||||
|       properties: { | ||||
|         name1: { | ||||
|           type: 'string', | ||||
|           title: '是否回单', | ||||
|           enum: [ | ||||
|             { label: '1', value: '1' }, | ||||
|             { label: '2', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择' | ||||
|             // asyncData: () => | ||||
|             //   this.categoryService.loadChildData2('0', '2').pipe( | ||||
|             //     map((data: any) => { | ||||
|             //       return data.map((m: any) => { | ||||
|             //         return { label: m.name, value: m.id }; | ||||
|             //       }); | ||||
|             //     }), | ||||
|             //   ), | ||||
|             // change: (i) => this.updateCategory(i, '/categoryId2'), | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         name2: { | ||||
|           type: 'string', | ||||
|           title: '备注', | ||||
|           ui: { | ||||
|             widget: 'textarea', | ||||
|             placeholder: '请输入', | ||||
|             autosize: { minRows: 3, maxRows: 3 } | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui6 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   initSF7() { | ||||
|     this.schema7 = { | ||||
|       properties: { | ||||
|         name1: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema }, | ||||
|         name2: { type: 'number', title: '到付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema }, | ||||
|         name3: { type: 'number', title: '油卡', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema }, | ||||
|         name4: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema }, | ||||
|         name5: { | ||||
|           type: 'string', | ||||
|           title: '小计', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name6: { | ||||
|           type: 'string', | ||||
|           title: '附加费', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name7: { | ||||
|           type: 'string', | ||||
|           title: '总费用', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         name8: { | ||||
|           type: 'string', | ||||
|           title: '到货后', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui7 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   addStartInfo(event: any) { | ||||
|     this.startInfo.push({ | ||||
|       addresss: '', | ||||
|       name: '', | ||||
|       phone: '' | ||||
|     }); | ||||
|   } | ||||
|   subStartInfo(event: any, index: number) { | ||||
|     this.startInfo.splice(index, 1); | ||||
|   } | ||||
|  | ||||
|   addEndInfo(event: any) { | ||||
|     this.endInfo.push({ | ||||
|       addresss: '', | ||||
|       name: '', | ||||
|       phone: '' | ||||
|     }); | ||||
|   } | ||||
|   subEndInfo(event: any, index: number) { | ||||
|     this.endInfo.splice(index, 1); | ||||
|   } | ||||
|  | ||||
|   //指派熟车 | ||||
|   chooseFamifiar() { | ||||
|     this.modalService.create({ | ||||
|       nzTitle: '指派熟车', | ||||
|       // nzContent: PublishGoodsChooseFamifiarComponent, | ||||
|       nzWidth: 1300 | ||||
|     }); | ||||
|   } | ||||
|   submit(): void { | ||||
|     Object.keys(this.validateForm1.controls).forEach(key => { | ||||
|       this.validateForm1.controls[key].markAsDirty(); | ||||
|       this.validateForm1.controls[key].updateValueAndValidity(); | ||||
|     }); | ||||
|     console.log(this.validateForm1); | ||||
|     if (this.validateForm1.invalid) { | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     // const data = this.form.value; | ||||
|     // this.http.post('/register', data).subscribe(() => { | ||||
|     //   this.router.navigateByUrl('/passport/register-result', { | ||||
|     //     // queryParams: { email: data.mail }, | ||||
|     //   }); | ||||
|     // }); | ||||
|     // this.router.navigateByUrl('/passport/register-result', { | ||||
|     //   // queryParams: { email: data.mail }, | ||||
|     // }); | ||||
|   } | ||||
|  | ||||
|   openMap() { | ||||
|     this.modalService.create({ | ||||
|       nzTitle: '', | ||||
|       // nzContent: GaodeMapComponent, | ||||
|       nzWidth: 1200 | ||||
|     }); | ||||
|   } | ||||
| } | ||||
| @ -1,3 +1,4 @@ | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| @ -48,7 +49,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|     count: 0, | ||||
|   }, | ||||
|   ]; | ||||
|   constructor(public service: SupplyManagementService, private modal: NzModalService) { } | ||||
|   constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,private ar: ActivatedRoute) { } | ||||
|  | ||||
|   /** | ||||
|  * 查询参数 | ||||
| @ -80,16 +81,59 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           title: '货源编号', | ||||
|         }, | ||||
|         sex2: { | ||||
|           title: '服务类型', | ||||
|           type: 'string', | ||||
|           default: 0, | ||||
|           enum: [ | ||||
|             { label: '未知', value: 0 }, | ||||
|             { label: '男', value: 1 }, | ||||
|             { label: '女', value: 2 }, | ||||
|             { label: '保密', value: 3 }, | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|  | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         categoryId: { | ||||
|           type: 'string', | ||||
|           title: '货物名称', | ||||
|           // enum: this.secondCatList || [], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         no2: { | ||||
|           type: 'string', | ||||
|           title: '装货地' | ||||
|           title: '装货地', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } | ||||
|         }, | ||||
|         no1: { | ||||
|           type: 'string', | ||||
|           title: '卸货地' | ||||
|           title: '卸货地', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } | ||||
|         }, | ||||
|         no4: { | ||||
|           type: 'string', | ||||
|           title: '货主', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } | ||||
|         }, | ||||
|         sex: { | ||||
|           title: '货物类型', | ||||
|           title: '审核状态', | ||||
|           type: 'string', | ||||
|           default: 0, | ||||
|           enum: [ | ||||
| @ -107,7 +151,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|         }, | ||||
|         appId: { | ||||
|           type: 'string', | ||||
|           title: '录单员', | ||||
|           title: '网络货运人', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
| @ -121,7 +165,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|       }, | ||||
|       type: 'object', | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 80, grid: { span: 8, gutter: 4 } } }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
|   initSFFre() { | ||||
|     this.freightSchema = { | ||||
| @ -199,6 +243,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|         className: 'text-center', | ||||
|         index: 'enStatusStr2', | ||||
|         type: 'badge', | ||||
|         width: '120px', | ||||
|         badge: { | ||||
|           正常: { text: '正常', color: 'success' }, | ||||
|           冻结: { text: '冻结', color: 'warning' }, | ||||
| @ -215,6 +260,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|         className: 'text-center', | ||||
|         index: 'enStatusStr3', | ||||
|         type: 'badge', | ||||
|         width: '170px', | ||||
|         badge: { | ||||
|           正常: { text: '正常', color: 'success' }, | ||||
|           冻结: { text: '冻结', color: 'warning' }, | ||||
| @ -225,7 +271,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|         title: '操作', | ||||
|         fixed: 'right', | ||||
|         width: '200px', | ||||
|         className: 'text-center', | ||||
|         className: 'text-left', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '货源审核', | ||||
| @ -233,7 +279,7 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|           }, | ||||
|           { | ||||
|             text: '修改货源', | ||||
|             // click: (_record) => this.editOne(_record), | ||||
|             click: (_record) => this.amend(_record), | ||||
|           }, | ||||
|           { | ||||
|             text: '修改运费', | ||||
| @ -380,4 +426,13 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|   handleOK() { | ||||
|      | ||||
|   } | ||||
|    /** | ||||
|   * 跳转修改货源 | ||||
|   */ | ||||
|   amend(item: any) { | ||||
|     console.log(item) | ||||
|     this.router.navigate(['/supply-management/vehicle-amend', item.id], { | ||||
|       relativeTo: this.ar | ||||
|     }) | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user