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

@ -21,6 +21,7 @@ import { PublishAddressListComponent } from '../onecar-publish/address-list/addr
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.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-release-publish.component.html',
@ -615,6 +616,13 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
let reqUrl = this.service.$api_consignBulk;
if (submitType === 'assign') {
this.chooseFamifiar(params);
}else if(submitType === 'qrcode'){
this.service.request(this.service.$api_consignBulkQRCode, params).subscribe(res => {
if (res) {
this.assignedQrcode( res, params )
}
});
return;
} else {
this.service.request(reqUrl, params).subscribe(res => {
if (res) {
@ -629,6 +637,28 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
});
}
}
// 生成二维码
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' } });
});
}
// 获取城市列表
getRegionCode(regionCode: any) {
return this.service