This commit is contained in:
wangshiming
2022-02-17 15:30:59 +08:00
parent b67e17f1d8
commit b9495a8753
12 changed files with 981 additions and 12 deletions

View File

@ -220,7 +220,7 @@
</nz-card>
<nz-card>
<div class="align-center">
<!-- <button nz-button nzType="primary" (click)="chooseFamifiar()">生成二维码</button> -->
<button nz-button nzType="primary" (click)="submitConfirm('qrcode')">生成二维码</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('assign')">指派熟车</button>
<!-- <button nz-button nzType="primary" (click)="choose()">取消</button> -->
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')">司机抢单</button>

View File

@ -21,6 +21,7 @@ import { PublishSuccessComponent } from '../onecar-publish/publish-success/publi
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component';
@Component({
selector: 'app-publish-goods-bulk-publish',
templateUrl: './bulk-publish.component.html',
@ -692,6 +693,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
if (submitType == 'assign') {
this.chooseFamifiar(params);
return;
}else if(submitType === 'qrcode'){
this.service.request(this.service.$api_saveAnotherBulkOrderQRCode, params).subscribe(res => {
if (res) {
this.assignedQrcode( res, params )
}
});
return;
}
}
if (this.PageStatus === '大宗修改') {
@ -700,6 +708,28 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.requests(this.service.$api_set_saveAnotherBulkOrder, params, 2);
}
}
// 生成二维码
assignedQrcode(id:string,parms:any ) {
const item = {
id,
enterpriseInfoName: parms.enterpriseInfoName,
loadingAddressArr: this.startInfo.map((ele: any)=>ele.detailedAddress),
unloadingAddressArr: this.endInfo.map((ele: any)=>ele.detailedAddress),
deadlineTime: parms.deadlineTime,
}
const modalRef = this.modalService.create({
nzTitle: '二维码',
nzWidth: '468px',
nzContent: SupplyManagementQrcodePageComponent,
nzComponentParams: {
i: item,
},
nzFooter: null,
});
modalRef.afterClose.subscribe(() => {
this.router.navigate(['/supply-management/index'], { queryParams: { type: 'bulk' } });
});
}
requests(url: any, params: any, change?: any) {
this.service.request(url, params).subscribe((res: any) => {
if (res) {