车辆对接
This commit is contained in:
		@ -44,12 +44,12 @@
 | 
				
			|||||||
            <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
 | 
					            <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
 | 
				
			||||||
            <nz-form-control [nzErrorTip]="'请输入联系人信息'">
 | 
					            <nz-form-control [nzErrorTip]="'请输入联系人信息'">
 | 
				
			||||||
              <div class="align-center">
 | 
					              <div class="align-center">
 | 
				
			||||||
                <input nz-input [(ngModel)]="data.appUserName" [ngModelOptions]="{ standalone: true }" maxlength="30" />
 | 
					                <input nz-input [(ngModel)]="data.appUserName"  formControlName="loadName{{ idx }}" maxlength="30"  />
 | 
				
			||||||
                <input
 | 
					                <input
 | 
				
			||||||
                  style="margin-left: 12px"
 | 
					                  style="margin-left: 12px"
 | 
				
			||||||
                  nz-input
 | 
					                  nz-input
 | 
				
			||||||
 | 
					                  formControlName="loadPhone{{ idx }}"
 | 
				
			||||||
                  [(ngModel)]="data.contractTelephone"
 | 
					                  [(ngModel)]="data.contractTelephone"
 | 
				
			||||||
                  [ngModelOptions]="{ standalone: true }"
 | 
					 | 
				
			||||||
                  maxlength="11"
 | 
					                  maxlength="11"
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
@ -92,12 +92,12 @@
 | 
				
			|||||||
            <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
 | 
					            <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
 | 
				
			||||||
            <nz-form-control [nzErrorTip]="'请输入联系人信息'">
 | 
					            <nz-form-control [nzErrorTip]="'请输入联系人信息'">
 | 
				
			||||||
              <div class="align-center">
 | 
					              <div class="align-center">
 | 
				
			||||||
                <input nz-input [(ngModel)]="data.appUserName" [ngModelOptions]="{ standalone: true }" maxlength="30" />
 | 
					                <input nz-input [(ngModel)]="data.appUserName" formControlName="unloadName{{ idx }}" maxlength="30" />
 | 
				
			||||||
                <input
 | 
					                <input
 | 
				
			||||||
                  style="margin-left: 12px"
 | 
					                  style="margin-left: 12px"
 | 
				
			||||||
                  nz-input
 | 
					                  nz-input
 | 
				
			||||||
                  [(ngModel)]="data.contractTelephone"
 | 
					                  [(ngModel)]="data.contractTelephone"
 | 
				
			||||||
                  [ngModelOptions]="{ standalone: true }"
 | 
					                  formControlName="unloadPhone{{ idx }}"
 | 
				
			||||||
                  maxlength="11"
 | 
					                  maxlength="11"
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
@ -282,7 +282,7 @@
 | 
				
			|||||||
  <div class="align-center">
 | 
					  <div class="align-center">
 | 
				
			||||||
    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="choose()">取消</button>
 | 
					    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="choose()">取消</button>
 | 
				
			||||||
    <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button>
 | 
					    <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button>
 | 
				
			||||||
    <!-- <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="chooseFamifiar()">指派熟车</button> -->
 | 
					    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')">指派熟车</button>
 | 
				
			||||||
    <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()"
 | 
					    <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()"
 | 
				
			||||||
      >司机抢单</button
 | 
					      >司机抢单</button
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
 | 
				
			|||||||
@ -20,6 +20,8 @@ import { PublishAddressListComponent } from './address-list/address-list.compone
 | 
				
			|||||||
import { PublishSuccessComponent } from './publish-success/publish-success.component';
 | 
					import { PublishSuccessComponent } from './publish-success/publish-success.component';
 | 
				
			||||||
import { map } from 'rxjs/operators';
 | 
					import { map } from 'rxjs/operators';
 | 
				
			||||||
import { of } from 'rxjs';
 | 
					import { of } from 'rxjs';
 | 
				
			||||||
 | 
					import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
 | 
				
			||||||
 | 
					import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
 | 
				
			||||||
@Component({
 | 
					@Component({
 | 
				
			||||||
  selector: 'app-publish-goods-onecar-publish',
 | 
					  selector: 'app-publish-goods-onecar-publish',
 | 
				
			||||||
  templateUrl: './onecar-publish.component.html',
 | 
					  templateUrl: './onecar-publish.component.html',
 | 
				
			||||||
@ -695,28 +697,62 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   //指派熟车
 | 
					   //指派熟车
 | 
				
			||||||
  chooseFamifiar() {
 | 
					   chooseFamifiar(item: any) {
 | 
				
			||||||
    this.modalService.create({
 | 
					     console.log('999')
 | 
				
			||||||
 | 
					    const modalRef = this.modalService.create({
 | 
				
			||||||
      nzTitle: '指派熟车',
 | 
					      nzTitle: '指派熟车',
 | 
				
			||||||
      nzContent: PublishGoodsChooseFamifiarComponent,
 | 
					      nzContent: SupplyManagementVehicleAssignedCarComponent,
 | 
				
			||||||
      nzWidth: 1300
 | 
					      nzWidth: 1200,
 | 
				
			||||||
 | 
					      nzComponentParams: {
 | 
				
			||||||
 | 
					        status: 'new',
 | 
				
			||||||
 | 
					        url: this.service.$api_save_assign_whole,
 | 
				
			||||||
 | 
					        params: item
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      nzFooter: null
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    modalRef.afterClose.subscribe(result => {
 | 
				
			||||||
 | 
					      if (result) {
 | 
				
			||||||
 | 
					        this.openFinishPage(result);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  submit(): void {
 | 
					    // 打开下单完成页面
 | 
				
			||||||
 | 
					    openFinishPage(resourceObj: any = null) {
 | 
				
			||||||
 | 
					      this.modalService.create({
 | 
				
			||||||
 | 
					        nzTitle: '',
 | 
				
			||||||
 | 
					        nzContent: PublishSuccessComponent,
 | 
				
			||||||
 | 
					        nzWidth: 900,
 | 
				
			||||||
 | 
					        nzFooter: null,
 | 
				
			||||||
 | 
					        nzComponentParams: { type: 'onecar', resourceObj }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 提交前确认,委托运输协议弹窗
 | 
				
			||||||
 | 
					    submitConfirm(submitType?: any) {
 | 
				
			||||||
 | 
					      const modalRef = this.modalService.create({
 | 
				
			||||||
 | 
					        nzTitle: '运输协议',
 | 
				
			||||||
 | 
					        nzContent: TranAgreementComponent,
 | 
				
			||||||
 | 
					        nzWidth: 900,
 | 
				
			||||||
 | 
					        nzFooter: null
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      modalRef.afterClose.subscribe(result => {
 | 
				
			||||||
 | 
					        if (result) {
 | 
				
			||||||
 | 
					          this.submit(submitType);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  submit(submitType?: string): void {
 | 
				
			||||||
    console.log('进来了');
 | 
					    console.log('进来了');
 | 
				
			||||||
    console.log(this.startInfo);
 | 
					    Object.keys(this.validateForm1.controls).forEach(key => {
 | 
				
			||||||
    // Object.keys(this.validateForm1.controls).forEach(key => {
 | 
					      this.validateForm1.controls[key].markAsDirty();
 | 
				
			||||||
    //   this.validateForm1.controls[key].markAsDirty();
 | 
					      this.validateForm1.controls[key].updateValueAndValidity();
 | 
				
			||||||
    //   this.validateForm1.controls[key].updateValueAndValidity();
 | 
					    });
 | 
				
			||||||
    // });
 | 
					    this.sf3.validator({ emitError: true });
 | 
				
			||||||
    // this.sf1.validator({ emitError: true });
 | 
					    this.sf4.validator({ emitError: true });
 | 
				
			||||||
    // this.sf3.validator({ emitError: true });
 | 
					    this.sf6.validator({ emitError: true });
 | 
				
			||||||
    // this.sf4.validator({ emitError: true });
 | 
					    this.sf7.validator({ emitError: true });
 | 
				
			||||||
    // this.sf6.validator({ emitError: true });
 | 
					    if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
 | 
				
			||||||
    // if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
 | 
					      return;
 | 
				
			||||||
    //   return;
 | 
					    }
 | 
				
			||||||
    // }
 | 
					 | 
				
			||||||
    console.log(this.validateForm1.value);
 | 
					 | 
				
			||||||
    if (typeof this.validateForm1.value.unloadingTime !== 'string') {
 | 
					    if (typeof this.validateForm1.value.unloadingTime !== 'string') {
 | 
				
			||||||
      var c = new Date(this.validateForm1.value.unloadingTime);
 | 
					      var c = new Date(this.validateForm1.value.unloadingTime);
 | 
				
			||||||
      this.validateForm1.value.unloadingTime =
 | 
					      this.validateForm1.value.unloadingTime =
 | 
				
			||||||
@ -747,10 +783,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
        ':' +
 | 
					        ':' +
 | 
				
			||||||
        this.addPreZero(c.getSeconds());
 | 
					        this.addPreZero(c.getSeconds());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // if (this.validateForm1.invalid) {
 | 
					 | 
				
			||||||
    //   return;
 | 
					 | 
				
			||||||
    // }
 | 
					 | 
				
			||||||
    console.log(this.sf7.value)
 | 
					 | 
				
			||||||
    const params: any = {
 | 
					    const params: any = {
 | 
				
			||||||
      ...this.sf1.value,
 | 
					      ...this.sf1.value,
 | 
				
			||||||
      ...this.sf5.value,
 | 
					      ...this.sf5.value,
 | 
				
			||||||
@ -773,6 +805,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
      totalFees: this.totalFees
 | 
					      totalFees: this.totalFees
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    console.log(params);
 | 
					    console.log(params);
 | 
				
			||||||
 | 
					    if(submitType) {
 | 
				
			||||||
 | 
					      if (submitType == 'assign') {
 | 
				
			||||||
 | 
					        this.chooseFamifiar(params);
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    if (this.PageStatus === '整车修改') {
 | 
					    if (this.PageStatus === '整车修改') {
 | 
				
			||||||
      this.requests(this.service.$api_set_WholeModify, params);
 | 
					      this.requests(this.service.$api_set_WholeModify, params);
 | 
				
			||||||
    } else if (this.PageStatus === '整车下一单') {
 | 
					    } else if (this.PageStatus === '整车下一单') {
 | 
				
			||||||
 | 
				
			|||||||
@ -313,7 +313,7 @@
 | 
				
			|||||||
</nz-card>
 | 
					</nz-card>
 | 
				
			||||||
<nz-card>
 | 
					<nz-card>
 | 
				
			||||||
  <div class="align-center">
 | 
					  <div class="align-center">
 | 
				
			||||||
    <!-- <button nz-button nzType="primary" (click)="submit('assign')" *ngIf="type === 'add'">指派熟车</button> -->
 | 
					    <button nz-button nzType="primary" (click)="submitConfirm('assign')" *ngIf="type === 'add'">指派熟车</button>
 | 
				
			||||||
    <button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')" *ngIf="type === 'add'">司机抢单</button>
 | 
					    <button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')" *ngIf="type === 'add'">司机抢单</button>
 | 
				
			||||||
    <button
 | 
					    <button
 | 
				
			||||||
      nz-button
 | 
					      nz-button
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,7 @@ import { SupplyManagementService } from '../../services/supply-management.servic
 | 
				
			|||||||
import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
 | 
					import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
 | 
				
			||||||
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
 | 
					import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
 | 
				
			||||||
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
 | 
					import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
 | 
				
			||||||
 | 
					import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Component({
 | 
					@Component({
 | 
				
			||||||
  selector: 'app-publish-goods-onecar-publish',
 | 
					  selector: 'app-publish-goods-onecar-publish',
 | 
				
			||||||
@ -71,7 +72,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
     private route: ActivatedRoute,
 | 
					     private route: ActivatedRoute,
 | 
				
			||||||
     private eaCacheSrv: EACacheService,
 | 
					     private eaCacheSrv: EACacheService,
 | 
				
			||||||
     private amapService: AmapService,
 | 
					     private amapService: AmapService,
 | 
				
			||||||
    public service2: ShipperBaseService
 | 
					    public shipperSrv: ShipperBaseService
 | 
				
			||||||
   ) {
 | 
					   ) {
 | 
				
			||||||
     this.validateForm1 = fb.group({
 | 
					     this.validateForm1 = fb.group({
 | 
				
			||||||
       loadingTime: [null, [Validators.required]],
 | 
					       loadingTime: [null, [Validators.required]],
 | 
				
			||||||
@ -170,7 +171,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
              _$expand: (value: boolean) => value,
 | 
					              _$expand: (value: boolean) => value,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            allowClear: true,
 | 
					            allowClear: true,
 | 
				
			||||||
            asyncData: () => this.service2.getNetworkFreightForwarder(),
 | 
					            asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
         externalResourceCode: {
 | 
					         externalResourceCode: {
 | 
				
			||||||
@ -184,24 +185,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
         dispatchId: {
 | 
					         dispatchId: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
          title: '调度员',
 | 
					          title: '调度员',
 | 
				
			||||||
           enum: [
 | 
					 | 
				
			||||||
             { label: '周涛', value: 1 },
 | 
					 | 
				
			||||||
             { label: '李诞', value: 2 }
 | 
					 | 
				
			||||||
           ],
 | 
					 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'select',
 | 
					            widget: 'select',
 | 
				
			||||||
            placeholder: '请选择',
 | 
					            placeholder: '请选择',
 | 
				
			||||||
            allowClear: true,
 | 
					            allowClear: true,
 | 
				
			||||||
             optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您'
 | 
					            optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
 | 
				
			||||||
             // asyncData: () =>
 | 
					            asyncData: () => this.shipperSrv.getStaffList2()
 | 
				
			||||||
             //   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
 | 
					          } as SFSelectWidgetSchema
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
@ -240,42 +229,68 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
        goodsTypeId: {
 | 
					        goodsTypeId: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
          title: '货物名称',
 | 
					          title: '货物名称',
 | 
				
			||||||
           enum: [
 | 
					 | 
				
			||||||
             { label: '服装', value: '1' },
 | 
					 | 
				
			||||||
             { label: '电子产品', value: '2' },
 | 
					 | 
				
			||||||
             { label: '其他', value: '3' }
 | 
					 | 
				
			||||||
           ],
 | 
					 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'select',
 | 
					            widget: 'select',
 | 
				
			||||||
            placeholder: '请选择',
 | 
					            placeholder: '请选择',
 | 
				
			||||||
             errors: { required: '请选择货物名称' },
 | 
					            errors: { required: '请选择货物类型' },
 | 
				
			||||||
             change: (value, data) => {
 | 
					            asyncData: () =>
 | 
				
			||||||
               this.currentGoodsTypeName = data;
 | 
					              this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
 | 
				
			||||||
 | 
					                map((data: any) => {
 | 
				
			||||||
 | 
					                  return data[0].children?.map((m: any) => {
 | 
				
			||||||
 | 
					                    return { label: m.name, value: m.id };
 | 
				
			||||||
 | 
					                  });
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					              ),
 | 
				
			||||||
 | 
					            change: (value, data: any) => {
 | 
				
			||||||
 | 
					              this.changeGoodsType(value, data);
 | 
				
			||||||
 | 
					              this.sf3.setValue('/goodsTypeName', data.label);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
             // 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
 | 
					          } as SFSelectWidgetSchema
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        goodsTypeName: {
 | 
				
			||||||
 | 
					          type: 'string',
 | 
				
			||||||
 | 
					          title: '',
 | 
				
			||||||
 | 
					          ui: {
 | 
				
			||||||
 | 
					            hidden: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        goodsNameId: {
 | 
				
			||||||
 | 
					          type: 'string',
 | 
				
			||||||
 | 
					          title: '',
 | 
				
			||||||
 | 
					          ui: {
 | 
				
			||||||
 | 
					            widget: 'select',
 | 
				
			||||||
 | 
					            placeholder: '请选择',
 | 
				
			||||||
 | 
					            errors: { required: '请填写货物名称' },
 | 
				
			||||||
 | 
					            change: (value: any, data: any) => {
 | 
				
			||||||
 | 
					              this.sf3.setValue('/goodsName', data.label);
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            visibleIf: {
 | 
				
			||||||
 | 
					              goodsTypeName: (value: any) => value && value !== '其它'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        goodsName: {
 | 
					        goodsName: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
          title: '',
 | 
					          title: '',
 | 
				
			||||||
           maxLength: 20,
 | 
					          ui: {
 | 
				
			||||||
 | 
					            hidden: true,
 | 
				
			||||||
 | 
					            visibleIf: {
 | 
				
			||||||
 | 
					              goodsTypeName: (value: any) => value && value !== '其它'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        goodsName1: {
 | 
				
			||||||
 | 
					          type: 'string',
 | 
				
			||||||
 | 
					          title: '',
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            errors: { required: '请填写货物名称' },
 | 
					            errors: { required: '请填写货物名称' },
 | 
				
			||||||
            visibleIf: {
 | 
					            visibleIf: {
 | 
				
			||||||
               goodsTypeId: value => value === '其他'
 | 
					              goodsTypeName: (value: any) => value && value === '其它'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
       required: ['goodsTypeId', 'goodsName']
 | 
					      required: ['goodsTypeId', 'goodsName', 'goodsNameId']
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    this.ui3 = {
 | 
					    this.ui3 = {
 | 
				
			||||||
      '*': {
 | 
					      '*': {
 | 
				
			||||||
@ -617,13 +632,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
  //指派熟车
 | 
					  //指派熟车
 | 
				
			||||||
  chooseFamifiar(item: any) {
 | 
					  chooseFamifiar(item: any) {
 | 
				
			||||||
 | 
					    console.log('999')
 | 
				
			||||||
   const modalRef = this.modalService.create({
 | 
					   const modalRef = this.modalService.create({
 | 
				
			||||||
     nzTitle: '指派熟车',
 | 
					     nzTitle: '指派熟车',
 | 
				
			||||||
     nzContent: SupplyManagementVehicleAssignedCarComponent,
 | 
					     nzContent: SupplyManagementVehicleAssignedCarComponent,
 | 
				
			||||||
     nzWidth: 1200,
 | 
					     nzWidth: 1200,
 | 
				
			||||||
     nzComponentParams: {
 | 
					     nzComponentParams: {
 | 
				
			||||||
       status: 'new',
 | 
					       status: 'new',
 | 
				
			||||||
         url: this.service.$api_save_assign_bulk,
 | 
					       url: this.service.$api_save_assign_whole,
 | 
				
			||||||
       params: item
 | 
					       params: item
 | 
				
			||||||
     },
 | 
					     },
 | 
				
			||||||
     nzFooter: null
 | 
					     nzFooter: null
 | 
				
			||||||
@ -633,6 +649,20 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
       this.openFinishPage(result);
 | 
					       this.openFinishPage(result);
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
   });
 | 
					   });
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					     // 提交前确认,委托运输协议弹窗
 | 
				
			||||||
 | 
					     submitConfirm(submitType?: any) {
 | 
				
			||||||
 | 
					      const modalRef = this.modalService.create({
 | 
				
			||||||
 | 
					        nzTitle: '运输协议',
 | 
				
			||||||
 | 
					        nzContent: TranAgreementComponent,
 | 
				
			||||||
 | 
					        nzWidth: 900,
 | 
				
			||||||
 | 
					        nzFooter: null
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      modalRef.afterClose.subscribe(result => {
 | 
				
			||||||
 | 
					        if (result) {
 | 
				
			||||||
 | 
					          this.submit(submitType);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
   submit(submitType: string): void {
 | 
					   submit(submitType: string): void {
 | 
				
			||||||
     Object.keys(this.validateForm1.controls).forEach(key => {
 | 
					     Object.keys(this.validateForm1.controls).forEach(key => {
 | 
				
			||||||
@ -652,11 +682,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
     // 货物信息
 | 
					     // 货物信息
 | 
				
			||||||
     const goodsInfoList = [
 | 
					     const goodsInfoList = [
 | 
				
			||||||
       {
 | 
					       {
 | 
				
			||||||
         ...this.sf3.value,
 | 
					 | 
				
			||||||
         goodsTypeName: this.currentGoodsTypeName.label,
 | 
					 | 
				
			||||||
         goodsName: '电子',
 | 
					 | 
				
			||||||
         goodsNameId: '1',
 | 
					 | 
				
			||||||
        ...this.sf4.value,
 | 
					        ...this.sf4.value,
 | 
				
			||||||
 | 
					        ...this.sf3.value,
 | 
				
			||||||
        maxWeight: this.sf4.value.maxWeight.join(','),
 | 
					        maxWeight: this.sf4.value.maxWeight.join(','),
 | 
				
			||||||
        maxCube: this.sf4.value.maxCube.join(',')
 | 
					        maxCube: this.sf4.value.maxCube.join(',')
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
@ -692,10 +719,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
     };
 | 
					     };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     let reqUrl = this.service.$api_consignWhole;
 | 
					     let reqUrl = this.service.$api_consignWhole;
 | 
				
			||||||
     if (submitType === 'assign') {
 | 
					     if(submitType) {
 | 
				
			||||||
 | 
					      if (submitType == 'assign') {
 | 
				
			||||||
        this.chooseFamifiar(params);
 | 
					        this.chooseFamifiar(params);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     this.service.request(reqUrl, params).subscribe((res: any) => {
 | 
					     this.service.request(reqUrl, params).subscribe((res: any) => {
 | 
				
			||||||
       if (res) {
 | 
					       if (res) {
 | 
				
			||||||
@ -821,7 +850,34 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
 | 
				
			|||||||
       nzComponentParams: { type: 'onecar', resourceObj }
 | 
					       nzComponentParams: { type: 'onecar', resourceObj }
 | 
				
			||||||
     });
 | 
					     });
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					   changeGoodsType(value: string, data: any) {
 | 
				
			||||||
 | 
					    if (data.label === '其它') return;
 | 
				
			||||||
 | 
					    const params = {
 | 
				
			||||||
 | 
					      pageIndex: 1,
 | 
				
			||||||
 | 
					      pageSize: 100,
 | 
				
			||||||
 | 
					      configId: value
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    this.service
 | 
				
			||||||
 | 
					      .request(this.service.$api_get_config_item_page, params)
 | 
				
			||||||
 | 
					      .pipe(
 | 
				
			||||||
 | 
					        map(data => {
 | 
				
			||||||
 | 
					          return data.records?.map((m: any) => {
 | 
				
			||||||
 | 
					            return { label: m.name, value: m.id };
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      )
 | 
				
			||||||
 | 
					      .subscribe(res => {
 | 
				
			||||||
 | 
					        if (res) {
 | 
				
			||||||
 | 
					          this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
 | 
				
			||||||
 | 
					          this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
 | 
				
			||||||
 | 
					          if(this.sf3data.goodsNameId){
 | 
				
			||||||
 | 
					            this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.service.msgSrv.error(res.msg);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
   /**
 | 
					   /**
 | 
				
			||||||
    * 取消
 | 
					    * 取消
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					<h2 >
 | 
				
			||||||
 | 
					  委托运输协议
 | 
				
			||||||
 | 
					</h2>
 | 
				
			||||||
 | 
					<div *nzModalFooter>
 | 
				
			||||||
 | 
					  <button nz-button nzType="primary" (click)="handleOk()" >我已阅读并同意签署</button>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					import { Component } from '@angular/core';
 | 
				
			||||||
 | 
					import { NzModalRef } from 'ng-zorro-antd/modal';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Component({
 | 
				
			||||||
 | 
					  selector: 'publish-goods-tran-agreement',
 | 
				
			||||||
 | 
					  templateUrl: './tran-agreement.component.html',
 | 
				
			||||||
 | 
					  styleUrls: ['./tran-agreement.component.less']
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class TranAgreementComponent {
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  constructor(private modal: NzModalRef) {
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  handleOk(){
 | 
				
			||||||
 | 
					    this.modal.close(true);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: your name
 | 
					 * @Author: your name
 | 
				
			||||||
 * @Date: 2021-12-03 11:10:14
 | 
					 * @Date: 2021-12-03 11:10:14
 | 
				
			||||||
 * @LastEditTime: 2022-01-05 16:45:24
 | 
					 * @LastEditTime: 2022-01-06 15:32:50
 | 
				
			||||||
 * @LastEditors: Please set LastEditors
 | 
					 * @LastEditors: Please set LastEditors
 | 
				
			||||||
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 | 
					 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 | 
				
			||||||
 * @FilePath: \tms-obc-web\src\app\routes\supply-management\services\supply-management.service.ts
 | 
					 * @FilePath: \tms-obc-web\src\app\routes\supply-management\services\supply-management.service.ts
 | 
				
			||||||
@ -63,7 +63,13 @@ export class SupplyManagementService extends BaseService {
 | 
				
			|||||||
  $api_get_goods_resource_shipper = `/api/sdc/goodsResourceShipper/modifyPricePre`; // 修改单价页面根据货源ID获取货物表
 | 
					  $api_get_goods_resource_shipper = `/api/sdc/goodsResourceShipper/modifyPricePre`; // 修改单价页面根据货源ID获取货物表
 | 
				
			||||||
  $api_get_car_captain_by_mobile = `/api/mdc/userDriverExpand/getCarCaptainByMobile`; // 查询车队长或者司机列表
 | 
					  $api_get_car_captain_by_mobile = `/api/mdc/userDriverExpand/getCarCaptainByMobile`; // 查询车队长或者司机列表
 | 
				
			||||||
  $api_save_assign_vehicle = `/api/sdc/goodsResourceShipper/reAssignWhole`;// 货主端大宗货源重新指派
 | 
					  $api_save_assign_vehicle = `/api/sdc/goodsResourceShipper/reAssignWhole`;// 货主端大宗货源重新指派
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $api_save_assign_bulk = `/api/sdc/goodsResourceShipper/reAssignBulk`; // 货主端大宗货源指派熟车
 | 
					  $api_save_assign_bulk = `/api/sdc/goodsResourceShipper/reAssignBulk`; // 货主端大宗货源指派熟车
 | 
				
			||||||
 | 
					   // 货主端大宗货源指派熟车
 | 
				
			||||||
 | 
					   $api_save_assign_whole = `/api/sdc/goodsResourceShipper/saveWholeAssign`;
 | 
				
			||||||
 | 
					  // 货主端大宗货源指派熟车
 | 
				
			||||||
 | 
					  $api_save_bulk_assign = `/api/sdc/goodsResourceShipper/saveBulkAssign`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $api_get_has_assigned_car_list = `/api/sdc/goodsResourceShipper/getCarDriverIdsByResourceId`;// 大宗货源根据货源id获取司机和车辆的id集合
 | 
					  $api_get_has_assigned_car_list = `/api/sdc/goodsResourceShipper/getCarDriverIdsByResourceId`;// 大宗货源根据货源id获取司机和车辆的id集合
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 根据手机号查询车队长/司机
 | 
					    // 根据手机号查询车队长/司机
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: your name
 | 
					 * @Author: your name
 | 
				
			||||||
 * @Date: 2021-12-03 11:10:14
 | 
					 * @Date: 2021-12-03 11:10:14
 | 
				
			||||||
 * @LastEditTime: 2021-12-28 20:31:23
 | 
					 * @LastEditTime: 2022-01-06 15:01:57
 | 
				
			||||||
 * @LastEditors: Please set LastEditors
 | 
					 * @LastEditors: Please set LastEditors
 | 
				
			||||||
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 | 
					 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 | 
				
			||||||
 * @FilePath: \tms-obc-web\src\app\routes\supply-management\supply-management.module.ts
 | 
					 * @FilePath: \tms-obc-web\src\app\routes\supply-management\supply-management.module.ts
 | 
				
			||||||
@ -31,6 +31,7 @@ import { CarAddmodalComponent } from './components/addmodal/addmodal.component';
 | 
				
			|||||||
import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component';
 | 
					import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component';
 | 
				
			||||||
import { SupplyManagementReleasePublishComponent } from './components/release-publish/release-publish.component';
 | 
					import { SupplyManagementReleasePublishComponent } from './components/release-publish/release-publish.component';
 | 
				
			||||||
import { SupplyManagementBulkReleasePublishComponent } from './components/bulk-release-publish/bulk-release-publish.component';
 | 
					import { SupplyManagementBulkReleasePublishComponent } from './components/bulk-release-publish/bulk-release-publish.component';
 | 
				
			||||||
 | 
					import { TranAgreementComponent } from './components/tran-agreement/tran-agreement.component';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const COMPONENTS: Type<void>[] = [
 | 
					const COMPONENTS: Type<void>[] = [
 | 
				
			||||||
@ -55,7 +56,9 @@ const COMPONENTS: Type<void>[] = [
 | 
				
			|||||||
  CarAddmodalComponent,
 | 
					  CarAddmodalComponent,
 | 
				
			||||||
  SupplyManagementBulkDetailComponent,
 | 
					  SupplyManagementBulkDetailComponent,
 | 
				
			||||||
  SupplyManagementReleasePublishComponent,
 | 
					  SupplyManagementReleasePublishComponent,
 | 
				
			||||||
  SupplyManagementBulkReleasePublishComponent
 | 
					  SupplyManagementBulkReleasePublishComponent,
 | 
				
			||||||
 | 
					  TranAgreementComponent
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@NgModule({
 | 
					@NgModule({
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user