fix bug
This commit is contained in:
@ -76,12 +76,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="10">{{ infoData.phone }}</div>
|
<div nz-col [nzSpan]="10">{{ infoData.phone }}</div>
|
||||||
<div nz-col [nzSpan]="10">
|
<div nz-col [nzSpan]="10">
|
||||||
<span *ngIf="infoData.phone; else elsePhone"
|
<span *ngIf="infoData.phone; else elsePhone"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
|
||||||
><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'" style="color: #52c41a"></i> 已绑定</span
|
style="color: #52c41a"></i> 已绑定</span>
|
||||||
>
|
<ng-template #elsePhone><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
|
||||||
<ng-template #elsePhone
|
style="color: #ccc"></i> 未绑定</ng-template>
|
||||||
><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'" style="color: #ccc"></i> 未绑定</ng-template
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-list-item-meta-title>
|
</nz-list-item-meta-title>
|
||||||
@ -110,22 +108,6 @@
|
|||||||
<div class="item-btn"><a (click)="edit('password')">修改</a></div>
|
<div class="item-btn"><a (click)="edit('password')">修改</a></div>
|
||||||
</nz-list-item>
|
</nz-list-item>
|
||||||
</nz-list>
|
</nz-list>
|
||||||
<!-- <div class="info">
|
|
||||||
<nz-card style="width: 100%; margin-top: 16px" [nzBordered]="false">
|
|
||||||
<nz-card-meta [nzAvatar]="avatarTemplate" [nzTitle]="infoData.nickName" [nzDescription]="content"></nz-card-meta>
|
|
||||||
<ng-template #avatarTemplate>
|
|
||||||
<nz-avatar
|
|
||||||
style="width: 80px; height: 80px; border: 1px solid #979797; border-radius: 100%"
|
|
||||||
[nzSrc]="infoData.avatar"
|
|
||||||
></nz-avatar>
|
|
||||||
</ng-template>
|
|
||||||
<ng-template #content>
|
|
||||||
<div>用户名:{{ infoData.name }} | 手机号:{{ infoData.phone }}</div>
|
|
||||||
<div>性别:{{ infoData.sexName }} | 生日:{{ infoData.birthday }}</div>
|
|
||||||
<div>真实姓名:{{ infoData.realName }} | 身份证号码:{{ infoData.certificateNumber }}</div>
|
|
||||||
</ng-template>
|
|
||||||
</nz-card>
|
|
||||||
<a (click)="edit('info')" class="info-btn">修改</a>
|
|
||||||
</div> -->
|
|
||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -134,23 +134,21 @@ export class AccountComponentsCenterComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
getInfo() {
|
getInfo() {
|
||||||
const params = {
|
this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => {
|
||||||
// id: this.i.id,
|
console.log(res)
|
||||||
};
|
this.infoData = res.data;
|
||||||
// this.service.http.post(this.service.$api_getUserInfo, params).subscribe((res) => {
|
// this.infoData.avatar = [
|
||||||
// this.infoData = res.data;
|
// {
|
||||||
// this.infoData.avatar = [
|
// uid: -1,
|
||||||
// {
|
// name: 'LOGO',
|
||||||
// uid: -1,
|
// status: 'done',
|
||||||
// name: 'LOGO',
|
// url: res.data.avatar,
|
||||||
// status: 'done',
|
// response: {
|
||||||
// url: res.data.avatar,
|
// url: res.data.avatar,
|
||||||
// response: {
|
// },
|
||||||
// url: res.data.avatar,
|
// },
|
||||||
// },
|
// ];
|
||||||
// },
|
});
|
||||||
// ];
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
edit(tpye: string) {
|
edit(tpye: string) {
|
||||||
@ -200,7 +198,7 @@ export class AccountComponentsCenterComponent implements OnInit {
|
|||||||
|
|
||||||
formSubmit(value: any): void {
|
formSubmit(value: any): void {
|
||||||
const params = { ...value };
|
const params = { ...value };
|
||||||
this.service.request(`${this.service.$api_updateUserInfo}`, params).subscribe((res) => {
|
this.service.request(`${this.service.$api_get_current_user_info}`, params).subscribe((res) => {
|
||||||
if (res === true) {
|
if (res === true) {
|
||||||
this.service.msgSrv.success('保存成功');
|
this.service.msgSrv.success('保存成功');
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
|
|||||||
@ -105,7 +105,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit
|
|||||||
const params = {
|
const params = {
|
||||||
// phoneNumber: phone
|
// phoneNumber: phone
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_get_msg_code, params, 'POST', true, 'FORM').subscribe((res) => {
|
this.service.request(this.service.$api_get_current_user_info, params, 'POST', true, 'FORM').subscribe((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// code==503046 弹出网易盾
|
// code==503046 弹出网易盾
|
||||||
if (res && res.code === '1') {
|
if (res && res.code === '1') {
|
||||||
@ -138,7 +138,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit
|
|||||||
const params = {
|
const params = {
|
||||||
// id: this.i.id,
|
// id: this.i.id,
|
||||||
};
|
};
|
||||||
this.service.http.post(this.service.$api_get_current_user_detail, params).subscribe((res) => {
|
this.service.http.post(this.service.$api_get_current_user_info, params).subscribe((res) => {
|
||||||
// if (res) {
|
// if (res) {
|
||||||
// this.getCaptcha(res.data.phone);
|
// this.getCaptcha(res.data.phone);
|
||||||
// }
|
// }
|
||||||
@ -204,7 +204,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit
|
|||||||
const params = {
|
const params = {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
};
|
};
|
||||||
this.service.http.post(this.service.$api_updateUserName, params).subscribe((res) => {
|
this.service.http.post(this.service.$api_get_current_user_info, params).subscribe((res) => {
|
||||||
console.log(res, 'submitForm');
|
console.log(res, 'submitForm');
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.service.msgSrv.success(res.msg);
|
this.service.msgSrv.success(res.msg);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-11-02 11:12:21
|
* @Date: 2021-11-02 11:12:21
|
||||||
* @LastEditTime: 2021-11-05 10:04:26
|
* @LastEditTime: 2021-12-13 17:43:32
|
||||||
* @LastEditors: your name
|
* @LastEditors: Please set LastEditors
|
||||||
* @Description: In User Settings Edit
|
* @Description: In User Settings Edit
|
||||||
* @FilePath: \scm-ows-ui\src\app\routes\account\services\account.service.ts
|
* @FilePath: \scm-ows-ui\src\app\routes\account\services\account.service.ts
|
||||||
*/
|
*/
|
||||||
@ -17,44 +17,9 @@ import { EAFileUtil } from 'src/app/shared/utils/file.util';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class AccountService extends BaseService {
|
export class AccountService extends BaseService {
|
||||||
public $api_add_one!: string;
|
|
||||||
public $api_add_many!: string;
|
|
||||||
public $api_edit_one!: string;
|
|
||||||
public $api_edit_many!: string;
|
|
||||||
public $api_del_one!: string;
|
|
||||||
public $api_del_many!: string;
|
|
||||||
public $api_get_many!: string;
|
|
||||||
public $api_get_one!: string;
|
|
||||||
public $api_get_page!: string;
|
|
||||||
public $api_export!: string;
|
|
||||||
public $api_import!: string;
|
|
||||||
public $api_import_download_tpl!: string;
|
|
||||||
// 获取当前登录用户详情
|
|
||||||
$api_get_current_user_detail = `/cuc/user/getUserInfo`;
|
|
||||||
// 获取当前登录用户基本信息
|
|
||||||
$api_getUserInfo = `/cuc/user/getUserInfo`;
|
|
||||||
// 修改用户信息
|
|
||||||
$api_updateUserInfo = `/cuc/userBasicInfo/updateUserInfo`;
|
|
||||||
// 凭证修改手机号
|
|
||||||
$api_voucherUpdatePhone = '/cuc/userBasicInfo/forgetPassword/voucherUpdatePhone';
|
|
||||||
// 凭证修改密码
|
|
||||||
$api_voucherUpdatePassword = '/cuc/userBasicInfo/forgetPassword/voucherUpdatePassword';
|
|
||||||
// 根据当前登录用户绑定的手机号码获取短信验证码
|
|
||||||
public $api_get_msg_code = `/cuc/userBasicInfo/getLoginUserSMVerificationCode`;
|
|
||||||
// 验证手机号
|
|
||||||
$api_verifyPhone = '/cuc/userBasicInfo/forgetPassword/verifyPhone';
|
|
||||||
|
|
||||||
// 获取当前登录用户详情
|
// 获取当前登录用户详情
|
||||||
$api_get_current_user_info = `/cuc/user/getUserInfo`;
|
$api_get_current_user_info = `/api/mdc/cuc/user/getUserInfo`;
|
||||||
|
|
||||||
// 修改用户名
|
|
||||||
$api_updateUserName = `/cuc/userBasicInfo/updateUserName`;
|
|
||||||
// 验证用户名是否已被使用
|
|
||||||
$api_checkUserName = `/cuc/userBasicInfo/checkUserName`;
|
|
||||||
|
|
||||||
// constructor(http: _HttpClient, msgSrv: NzMessageService, fileExt: EAFileUtil) {
|
|
||||||
// super(http, msgSrv, fileExt);
|
|
||||||
// }
|
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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-09 21:21:27
|
* @LastEditTime: 2021-12-13 15:24:41
|
||||||
* @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\components\bulk-detail\bulk-detail.component.ts
|
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\bulk-detail\bulk-detail.component.ts
|
||||||
@ -119,7 +119,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 修改货源
|
// 修改货源
|
||||||
modification() {
|
modification() {
|
||||||
this.router.navigate(['/supply-management/vehicle-amend', this.id], {
|
this.router.navigate(['/supply-management/bulk-amend', this.id], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
sta: 3
|
sta: 3
|
||||||
},
|
},
|
||||||
@ -127,7 +127,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 再下一单
|
// 再下一单
|
||||||
nextOrder() {
|
nextOrder() {
|
||||||
this.router.navigate(['/supply-management/vehicle-amend', this.id], {
|
this.router.navigate(['/supply-management/bulk-amend', this.id], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
sta: 4
|
sta: 4
|
||||||
},
|
},
|
||||||
|
|||||||
@ -0,0 +1,229 @@
|
|||||||
|
<page-header-wrapper [title]="PageStatus" [logo]="logo">
|
||||||
|
<ng-template #logo>
|
||||||
|
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||||
|
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||||
|
</button>
|
||||||
|
</ng-template>
|
||||||
|
</page-header-wrapper>
|
||||||
|
<nz-card>
|
||||||
|
<div class="card-title">货源单设置</div>
|
||||||
|
<sf #sf1 [schema]="schema1" [formData]="sf1data" [button]="'none'" [ui]="ui1"></sf>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<nz-card>
|
||||||
|
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:-km,预计行程耗时:-小时</span></div>
|
||||||
|
<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.detailedAddress"
|
||||||
|
(click)="openMap('start', idx)"
|
||||||
|
formControlName="loadAddress{{ idx }}"
|
||||||
|
placeholder="请输入装货地"
|
||||||
|
/>
|
||||||
|
</nz-input-group>
|
||||||
|
</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.appUserName" [ngModelOptions]="{ standalone: true }" maxlength="30" />
|
||||||
|
<input style="margin-left: 12px" nz-input [(ngModel)]="data.contractTelephone" [ngModelOptions]="{ standalone: true }" maxlength="11" />
|
||||||
|
</div>
|
||||||
|
</nz-form-control>
|
||||||
|
</nz-form-item>
|
||||||
|
</div>
|
||||||
|
</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.detailedAddress"
|
||||||
|
(click)="openMap('end', idx)"
|
||||||
|
formControlName="unloadAddress{{ idx }}"
|
||||||
|
placeholder="请输入卸货地"
|
||||||
|
/>
|
||||||
|
</nz-input-group>
|
||||||
|
</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.appUserName" [ngModelOptions]="{ standalone: true }" maxlength="30" />
|
||||||
|
<input style="margin-left: 12px" nz-input [(ngModel)]="data.contractTelephone" [ngModelOptions]="{ standalone: true }" maxlength="11" />
|
||||||
|
</div>
|
||||||
|
</nz-form-control>
|
||||||
|
</nz-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div *ngIf="npp" 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="createTime" [(ngModel)]="creatTime"></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="modifyTime" [(ngModel)]="modifyTime"></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" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
||||||
|
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||||
|
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||||
|
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||||
|
<input
|
||||||
|
nz-input
|
||||||
|
type="number"
|
||||||
|
[ngModel]="i.value"
|
||||||
|
min="0"
|
||||||
|
step="0.01"
|
||||||
|
(ngModelChange)="i.setValue($event)"
|
||||||
|
placeholder="总重量,必填"
|
||||||
|
/>
|
||||||
|
</nz-input-group>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="volume" let-i let-ui="ui">
|
||||||
|
<nz-input-group [nzAddOnAfter]="'方'">
|
||||||
|
<input
|
||||||
|
nz-input
|
||||||
|
type="number"
|
||||||
|
[ngModel]="i.value"
|
||||||
|
min="0"
|
||||||
|
step="0.01"
|
||||||
|
(ngModelChange)="i.setValue($event)"
|
||||||
|
placeholder="总体积"
|
||||||
|
/>
|
||||||
|
</nz-input-group>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="number" let-i let-ui="ui">
|
||||||
|
<nz-input-group [nzAddOnAfter]="'车'">
|
||||||
|
<input
|
||||||
|
nz-input
|
||||||
|
type="number"
|
||||||
|
[ngModel]="i.value"
|
||||||
|
min="0"
|
||||||
|
step="0.01"
|
||||||
|
(ngModelChange)="i.setValue($event)"
|
||||||
|
placeholder="总车次"
|
||||||
|
/>
|
||||||
|
</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" [formData]="sf5data" [button]="'none'" [ui]="ui5">
|
||||||
|
<ng-template sf-template="goodsValue" 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>注意事项:<br/>
|
||||||
|
|
||||||
|
①请仔细阅读《投保告知》<br/>
|
||||||
|
|
||||||
|
②港澳台、西藏不在投保范围内,不予承保<br/>
|
||||||
|
|
||||||
|
③保价费最低收费2元,请按真实货值填写,录入的所有信息必须确保真实,不如实录入的内容,不承担对应赔偿责任。</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" [formData]="sf6data" [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" [formData]="sf7data" [button]="'none'" [ui]="ui7">
|
||||||
|
<ng-template sf-template="totalFee" let-i let-ui="ui" >
|
||||||
|
<div *ngIf="this.PageStatus === '整车修改' || this.PageStatus === '整车下一单'">{{totalFees | currency: '¥'}}</div>
|
||||||
|
<div *ngIf="this.PageStatus === '大宗修改' || this.PageStatus === '大宗下一单'">
|
||||||
|
<nz-input-number [(ngModel)]="totalFees" (ngModelChange)="i.setValue($event)" [nzMin]="1" [nzStep]="0.01"></nz-input-number>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="paymentDays" 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)" /> -->
|
||||||
|
<nz-input-number [(ngModel)]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" [nzMax]="30" [nzStep]="1"></nz-input-number>
|
||||||
|
</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,796 @@
|
|||||||
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { FormBuilder, FormGroup,Validators,FormControl } from '@angular/forms';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import {
|
||||||
|
SFComponent,
|
||||||
|
SFNumberWidgetSchema,
|
||||||
|
SFSchema,
|
||||||
|
SFSelectWidgetSchema,
|
||||||
|
SFTextareaWidgetSchema,
|
||||||
|
SFUISchema
|
||||||
|
} from '@delon/form';
|
||||||
|
import { _HttpClient } from '@delon/theme';
|
||||||
|
import { AmapPoiPickerComponent } from '@shared';
|
||||||
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
||||||
|
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||||
|
import { debug } from 'console';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-publish-goods-bulk-publish',
|
||||||
|
templateUrl: './bulk-publish.component.html',
|
||||||
|
styleUrls: ['./bulk-publish.component.less']
|
||||||
|
})
|
||||||
|
export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||||
|
validateForm1: FormGroup;
|
||||||
|
newTempchecked = false; //是否存入新模板
|
||||||
|
sf1data: any; // 货源单设置回显
|
||||||
|
sf3data: any; // 货源单设置回显
|
||||||
|
sf4data: any; // 货源单设置回显
|
||||||
|
sf5data: any; // 货源单设置回显
|
||||||
|
sf6data: any; // 货源单设置回显
|
||||||
|
sf7data: any; // 货源单设置回显
|
||||||
|
creatTime: any; // 货源单设置回显
|
||||||
|
modifyTime: any; // 货源单设置回显
|
||||||
|
totalFees: any; // 总数信息
|
||||||
|
id = this.route.snapshot.params.id;
|
||||||
|
// // 单位
|
||||||
|
unit1 = '吨';
|
||||||
|
unit2 = '方';
|
||||||
|
unit3 = '保价费金额';
|
||||||
|
startInfo: any = [];
|
||||||
|
endInfo: any = [];
|
||||||
|
PageStatus = '';
|
||||||
|
dataList: any;
|
||||||
|
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService) {
|
||||||
|
this.validateForm1 = fb.group({
|
||||||
|
createTime: [null, []],
|
||||||
|
modifyTime: [null, []],
|
||||||
|
loadAddress0: [null, [Validators.required]],
|
||||||
|
loadName0: [null, [Validators.required]],
|
||||||
|
loadPhone0: [null, [Validators.required]],
|
||||||
|
unloadAddress0: [null, [Validators.required]],
|
||||||
|
unloadName0: [null, [Validators.required]],
|
||||||
|
unloadPhone0: [null, [Validators.required]]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@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 {
|
||||||
|
if(this.route.snapshot?.queryParams?.sta === '1') {
|
||||||
|
console.log('修改')
|
||||||
|
this.PageStatus = '整车修改';
|
||||||
|
} else if(this.route.snapshot?.queryParams?.sta === '2') {
|
||||||
|
this.PageStatus = '整车下一单';
|
||||||
|
} else if(this.route.snapshot?.queryParams?.sta === '3') {
|
||||||
|
this.PageStatus = '大宗修改';
|
||||||
|
} else if(this.route.snapshot?.queryParams?.sta === '4') {
|
||||||
|
this.PageStatus = '大宗下一单';
|
||||||
|
}
|
||||||
|
this.initSF1();
|
||||||
|
// this.initSF2();
|
||||||
|
this.initSF3();
|
||||||
|
this.initSF4();
|
||||||
|
this.initSF5();
|
||||||
|
this.initSF6();
|
||||||
|
this.initSF7();
|
||||||
|
this.initdata();
|
||||||
|
}
|
||||||
|
|
||||||
|
initSF1() {
|
||||||
|
|
||||||
|
this.schema1 = {
|
||||||
|
properties: {
|
||||||
|
shipperAppUserName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '货主',
|
||||||
|
maxLength: 30,
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
enterpriseProjectId: {
|
||||||
|
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
|
||||||
|
},
|
||||||
|
enterpriseInfoName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '网络货运人',
|
||||||
|
ui: {
|
||||||
|
widget: 'text'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deadlineTime: {
|
||||||
|
title: '截至日期',
|
||||||
|
type: 'string',
|
||||||
|
format: 'date-time',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
format: 'yyyy-MM-dd HH:mm:ss'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dispatchId: {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
require: ['deadlineTime']
|
||||||
|
};
|
||||||
|
this.ui1 = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 120,
|
||||||
|
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: {
|
||||||
|
goodsName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '货物名称',
|
||||||
|
ui: {
|
||||||
|
widget: 'dict-select',
|
||||||
|
params: { dictKey: 'GoodsName' },
|
||||||
|
placeholder: '请选择'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
qita: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
visibleIf: {
|
||||||
|
goodsName: value => value === '3'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['goodsName', ]
|
||||||
|
};
|
||||||
|
this.ui3 = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 90,
|
||||||
|
grid: { span: 12 }
|
||||||
|
},
|
||||||
|
$goodsName: {
|
||||||
|
grid: { span: 12 }
|
||||||
|
},
|
||||||
|
$qita: {
|
||||||
|
grid: { span: 12 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
initSF4() {
|
||||||
|
this.schema4 = {
|
||||||
|
properties: {
|
||||||
|
weight: {
|
||||||
|
type: 'string',
|
||||||
|
title: '货物数量',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请输入',
|
||||||
|
errors: { required: '必填项' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
volume: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
number: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
maxWeight: {
|
||||||
|
type: 'string',
|
||||||
|
title: '车型/车长',
|
||||||
|
|
||||||
|
enum: [
|
||||||
|
{ label: '1', value: '1' },
|
||||||
|
{ label: '2', value: '2' }
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择车型',
|
||||||
|
mode: 'multiple',
|
||||||
|
errors: { required: '请选择车型' }
|
||||||
|
// 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
|
||||||
|
},
|
||||||
|
maxCube: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
enum: [
|
||||||
|
{ label: '1', value: '1' },
|
||||||
|
{ label: '2', value: '2' }
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择车长',
|
||||||
|
mode: 'multiple',
|
||||||
|
errors: { required: '请选择车长' }
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['weight', 'maxWeight', 'maxCube']
|
||||||
|
};
|
||||||
|
this.ui4 = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 90,
|
||||||
|
grid: { span: 24 }
|
||||||
|
},
|
||||||
|
$weight: {
|
||||||
|
grid: { span: 8 }
|
||||||
|
},
|
||||||
|
$volume: {
|
||||||
|
grid: { span: 8 }
|
||||||
|
},
|
||||||
|
$number: {
|
||||||
|
grid: { span: 8 }
|
||||||
|
},
|
||||||
|
$maxWeight: {
|
||||||
|
grid: { span: 12 }
|
||||||
|
},
|
||||||
|
$maxCube: {
|
||||||
|
grid: { span: 12 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
initSF5() {
|
||||||
|
this.schema5 = {
|
||||||
|
properties: {
|
||||||
|
goodsValue: {
|
||||||
|
type: 'string',
|
||||||
|
title: '货物价值',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.ui5 = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 90,
|
||||||
|
grid: { span: 24 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
initSF6() {
|
||||||
|
this.schema6 = {
|
||||||
|
properties: {
|
||||||
|
stateReceipt: {
|
||||||
|
type: 'string',
|
||||||
|
title: '是否回单',
|
||||||
|
enum: [
|
||||||
|
{ label: '需要', value: true },
|
||||||
|
{ label: '不需要', value: false }
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
errors: { required: '请选择' },
|
||||||
|
placeholder: '请选择'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
receiptType: {
|
||||||
|
type: 'string',
|
||||||
|
title: '回单类型',
|
||||||
|
enum: [
|
||||||
|
{ label: '电子回单', value: 1 },
|
||||||
|
{ label: '纸质回单', value: 2 }
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择',
|
||||||
|
errors: { required: '请选择' },
|
||||||
|
visibleIf: {
|
||||||
|
stateReceipt: value => value === true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
receiptUserId: {
|
||||||
|
type: 'string',
|
||||||
|
title: '选择地址',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请点击选择收回单地址',
|
||||||
|
validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||||
|
visibleIf: {
|
||||||
|
receiptType: value => value === '2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
default: '1212'
|
||||||
|
},
|
||||||
|
name4: {
|
||||||
|
type: 'string',
|
||||||
|
title: '联系人',
|
||||||
|
ui: {
|
||||||
|
visibleIf: {
|
||||||
|
receiptType: value => value === '2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
name5: {
|
||||||
|
type: 'string',
|
||||||
|
title: '联系电话',
|
||||||
|
ui: {
|
||||||
|
visibleIf: {
|
||||||
|
receiptType: value => value === '2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
name6: {
|
||||||
|
type: 'string',
|
||||||
|
title: '所在地区',
|
||||||
|
ui: {
|
||||||
|
visibleIf: {
|
||||||
|
receiptType: value => value === '2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
receiptAddress: {
|
||||||
|
type: 'string',
|
||||||
|
title: '详细地址',
|
||||||
|
maxLength: 20,
|
||||||
|
ui: {
|
||||||
|
visibleIf: {
|
||||||
|
receiptType: value => value === '2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
remarks: {
|
||||||
|
type: 'string',
|
||||||
|
title: '备注',
|
||||||
|
maxLength: 200,
|
||||||
|
ui: {
|
||||||
|
widget: 'textarea',
|
||||||
|
placeholder: '请输入',
|
||||||
|
autosize: { minRows: 3, maxRows: 3 }
|
||||||
|
} as SFTextareaWidgetSchema
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['stateReceipt', 'receiptType']
|
||||||
|
};
|
||||||
|
this.ui6 = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 90,
|
||||||
|
grid: { span: 24 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
changeValue() {
|
||||||
|
this.totalFees = Number(this.sf7?.value?.appendFee) + Number(this.sf7?.value?.oilCardPay) + Number(this.sf7?.value?.prePay) + Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.toPay)
|
||||||
|
console.log(this.totalFees)
|
||||||
|
}
|
||||||
|
initSF7() {
|
||||||
|
this.schema7 = {
|
||||||
|
properties: {
|
||||||
|
totalFee: {
|
||||||
|
type: 'string',
|
||||||
|
title: '总费用',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.ui7 = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 90,
|
||||||
|
grid: { span: 24 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
addStartInfo(event: any) {
|
||||||
|
if (this.startInfo.length < 5) {
|
||||||
|
const controlId = this.startInfo.length;
|
||||||
|
this.startInfo.push({
|
||||||
|
detailedAddress: '',
|
||||||
|
appUserName: '',
|
||||||
|
contractTelephone: '',
|
||||||
|
latitude: '',
|
||||||
|
longitude: '',
|
||||||
|
province: '',
|
||||||
|
city: '',
|
||||||
|
area: '',
|
||||||
|
type: 1
|
||||||
|
});
|
||||||
|
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
subStartInfo(event: any, index: number, id?:any) {
|
||||||
|
console.log(event, index, id)
|
||||||
|
if(id) {
|
||||||
|
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.startInfo.splice(index, 1);
|
||||||
|
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||||
|
this.validateForm1.removeControl(`loadName${index}`);
|
||||||
|
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
addEndInfo(event: any) {
|
||||||
|
if (this.addEndInfo.length < 5) {
|
||||||
|
const controlId = this.endInfo.length;
|
||||||
|
this.endInfo.push({
|
||||||
|
detailedAddress: '',
|
||||||
|
appUserName: '',
|
||||||
|
contractTelephone: '',
|
||||||
|
latitude: '',
|
||||||
|
longitude: '',
|
||||||
|
province: '',
|
||||||
|
city: '',
|
||||||
|
area: '',
|
||||||
|
type: 2
|
||||||
|
});
|
||||||
|
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
subEndInfo(event: any, index: number, id?:any) {
|
||||||
|
if(id) {
|
||||||
|
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(event, index, id)
|
||||||
|
this.endInfo.splice(index, 1);
|
||||||
|
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||||
|
this.validateForm1.removeControl(`unloadName${index}`);
|
||||||
|
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
//指派熟车
|
||||||
|
chooseFamifiar() {
|
||||||
|
this.modalService.create({
|
||||||
|
nzTitle: '指派熟车',
|
||||||
|
nzContent: PublishGoodsChooseFamifiarComponent,
|
||||||
|
nzWidth: 1300
|
||||||
|
});
|
||||||
|
}
|
||||||
|
submit(): void {
|
||||||
|
console.log('进来了')
|
||||||
|
console.log(this.startInfo)
|
||||||
|
debugger;
|
||||||
|
// Object.keys(this.validateForm1.controls).forEach(key => {
|
||||||
|
// this.validateForm1.controls[key].markAsDirty();
|
||||||
|
// this.validateForm1.controls[key].updateValueAndValidity();
|
||||||
|
// });
|
||||||
|
// this.sf1.validator({ emitError: true });
|
||||||
|
// this.sf3.validator({ emitError: true });
|
||||||
|
// this.sf4.validator({ emitError: true });
|
||||||
|
// this.sf6.validator({ emitError: true });
|
||||||
|
// if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
if(typeof(this.validateForm1.value.modifyTime) !== 'string' ) {
|
||||||
|
var c = new Date(this.validateForm1.value.modifyTime);
|
||||||
|
this.validateForm1.value.modifyTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds()
|
||||||
|
}
|
||||||
|
if(typeof(this.validateForm1.value.createTime) !== 'string' ) {
|
||||||
|
var c = new Date(this.validateForm1.value.createTime);
|
||||||
|
this.validateForm1.value.createTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds()
|
||||||
|
}
|
||||||
|
// if (this.validateForm1.invalid) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
if(this.validateForm1?.value?.createTime) {
|
||||||
|
this.startInfo.createTime = this.validateForm1?.value?.createTime
|
||||||
|
this.startInfo.modifyTime = this.validateForm1?.value?.modifyTime
|
||||||
|
}
|
||||||
|
const params: any = {
|
||||||
|
...this.sf1.value,
|
||||||
|
...this.sf5.value,
|
||||||
|
...this.sf6.value,
|
||||||
|
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||||
|
goodsInfoDTOList: [
|
||||||
|
{
|
||||||
|
...this.sf4.value, ...this.sf3.value,
|
||||||
|
maxWeight: this.sf4.value.maxWeight.join(','),
|
||||||
|
maxCube: this.sf4.value.maxCube.join(',')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
params.freightPrice = this.totalFees
|
||||||
|
console.log(this.sf7.value)
|
||||||
|
console.log(params)
|
||||||
|
if(this.PageStatus === '大宗修改') {
|
||||||
|
this.requests(this.service.$api_set_bulkModify, params);
|
||||||
|
} else if(this.PageStatus === '大宗下一单') {
|
||||||
|
this.requests(this.service.$api_set_saveAnotherBulkOrder, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
requests(url: any, params: any) {
|
||||||
|
this.service.request(url, params).subscribe((res: any) => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 打开地图
|
||||||
|
openMap(type: string, index: number) {
|
||||||
|
const modalRef = this.modalService.create({
|
||||||
|
nzTitle: '',
|
||||||
|
nzContent: AmapPoiPickerComponent,
|
||||||
|
nzWidth: 900,
|
||||||
|
nzOnOk: item => {
|
||||||
|
const poi = item.poi;
|
||||||
|
console.log(item.poi);
|
||||||
|
const locList = poi.location.toString().split(',');
|
||||||
|
switch (type) {
|
||||||
|
case 'start':
|
||||||
|
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
|
this.startInfo[index].longitude = locList[0];
|
||||||
|
this.startInfo[index].latitude = locList[1];
|
||||||
|
this.startInfo[index].province = poi.cityInfo.province;
|
||||||
|
this.startInfo[index].city = poi.cityInfo.city;
|
||||||
|
this.startInfo[index].area = poi.cityInfo.district;
|
||||||
|
break;
|
||||||
|
case 'end':
|
||||||
|
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
|
this.endInfo[index].longitude = locList[0];
|
||||||
|
this.endInfo[index].latitude = locList[1];
|
||||||
|
this.endInfo[index].province = poi.cityInfo.province;
|
||||||
|
this.endInfo[index].city = poi.cityInfo.city;
|
||||||
|
this.endInfo[index].area = poi.cityInfo.district;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
goBack() {
|
||||||
|
window.history.go(-1);
|
||||||
|
}
|
||||||
|
// 初始化信息
|
||||||
|
initdata() {
|
||||||
|
this.service.request(`${this.service.$api_get_getBulkDetail}`, {id:this.id}).subscribe((res) => {
|
||||||
|
this.dataR(res);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
asds(i: any) {
|
||||||
|
console.log(i)
|
||||||
|
}
|
||||||
|
// 初始化信息
|
||||||
|
dataR (res: any) {
|
||||||
|
// this.dataList = res;
|
||||||
|
this.sf1data = {
|
||||||
|
// shipperAppUserName: res?.shipperAppUserName || '',
|
||||||
|
enterpriseProjectId: res?.enterpriseProjectId || '',
|
||||||
|
enterpriseInfoName: res?.enterpriseInfoName || '',
|
||||||
|
externalResourceCode: res?.externalResourceCode || '',
|
||||||
|
dispatchId: res?.dispatchId || '',
|
||||||
|
deadlineTime: res?.deadlineTime || '',
|
||||||
|
}
|
||||||
|
if(this.PageStatus === '大宗修改') {
|
||||||
|
this.sf1data.id = res?.id;
|
||||||
|
}
|
||||||
|
res?.unLoadingPlaceVOList.forEach((element: any) => {
|
||||||
|
if(element.type === 1) {
|
||||||
|
const controlId = this.startInfo.length;
|
||||||
|
if(this.PageStatus === '大宗修改') {
|
||||||
|
this.startInfo.push({
|
||||||
|
detailedAddress: element.detailedAddress,
|
||||||
|
appUserName: element.appUserName,
|
||||||
|
contractTelephone: element.contractTelephone,
|
||||||
|
latitude: element.latitude,
|
||||||
|
longitude: element.longitude,
|
||||||
|
province: element.province,
|
||||||
|
city: element.city,
|
||||||
|
area: element.area,
|
||||||
|
type: element.type,
|
||||||
|
id: element.id
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.startInfo.push({
|
||||||
|
detailedAddress: element.detailedAddress,
|
||||||
|
appUserName: element.appUserName,
|
||||||
|
contractTelephone: element.contractTelephone,
|
||||||
|
latitude: element.latitude,
|
||||||
|
longitude: element.longitude,
|
||||||
|
province: element.province,
|
||||||
|
city: element.city,
|
||||||
|
area: element.area,
|
||||||
|
type: element.type,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(element.createTime) {
|
||||||
|
this.creatTime = element?.createTime
|
||||||
|
this.modifyTime = element?.modifyTime
|
||||||
|
}
|
||||||
|
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
} else if(element.type === 2) {
|
||||||
|
const controlId = this.endInfo.length;
|
||||||
|
if( this.PageStatus === '大宗修改') {
|
||||||
|
this.endInfo.push({
|
||||||
|
detailedAddress: element?.detailedAddress,
|
||||||
|
appUserName: element?.appUserName,
|
||||||
|
contractTelephone: element?.contractTelephone,
|
||||||
|
latitude: element.latitude,
|
||||||
|
longitude: element.longitude,
|
||||||
|
province: element.province,
|
||||||
|
city: element.city,
|
||||||
|
area: element.area,
|
||||||
|
type: element.type,
|
||||||
|
id: element.id
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.endInfo.push({
|
||||||
|
detailedAddress: element?.detailedAddress,
|
||||||
|
appUserName: element?.appUserName,
|
||||||
|
contractTelephone: element?.contractTelephone,
|
||||||
|
latitude: element.latitude,
|
||||||
|
longitude: element.longitude,
|
||||||
|
province: element.province,
|
||||||
|
city: element.city,
|
||||||
|
area: element.area,
|
||||||
|
type: element.type
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.sf3data = {
|
||||||
|
goodsName: res?.goodsInfoVOList[0]?.goodsName || '',
|
||||||
|
}
|
||||||
|
this.sf4data = {
|
||||||
|
weight: res?.goodsInfoVOList[0]?.weight || '',
|
||||||
|
volume: res?.goodsInfoVOList[0]?.volume || '',
|
||||||
|
vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand || '',
|
||||||
|
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || '',
|
||||||
|
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '',
|
||||||
|
number: res?.goodsInfoVOList[0]?.number || '',
|
||||||
|
goodsType: res?.goodsInfoVOList[0]?.goodsType || '',
|
||||||
|
modifyTime: res?.goodsInfoVOList[0]?.modifyTime || '',
|
||||||
|
modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId || '',
|
||||||
|
resourceId: res?.goodsInfoVOList[0]?.resourceId || '',
|
||||||
|
rule: res?.goodsInfoVOList[0]?.rule || '',
|
||||||
|
settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis || '',
|
||||||
|
|
||||||
|
}
|
||||||
|
if(this.PageStatus === '大宗修改') {
|
||||||
|
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
|
||||||
|
}
|
||||||
|
this.totalFees = res?.freightPrice || '0';
|
||||||
|
this.sf5data = {
|
||||||
|
goodsValue: res?.goodsValue || '',
|
||||||
|
}
|
||||||
|
this.sf6data = {
|
||||||
|
stateReceipt: res?.supplementaryInformationVO?.stateReceipt || '',
|
||||||
|
receiptType: res?.supplementaryInformationVO?.receiptType || '',
|
||||||
|
receiptUserId: res?.supplementaryInformationVO?.receiptUserId || '',
|
||||||
|
remarks: res?.supplementaryInformationVO?.remarks || ''
|
||||||
|
};
|
||||||
|
this.sf7data = {
|
||||||
|
prePay: res?.shippingInformationVO?.prePay || '',
|
||||||
|
toPay: res?.shippingInformationVO?.toPay || '',
|
||||||
|
oilCardPay: res?.shippingInformationVO?.oilCardPay || '',
|
||||||
|
receiptPay: res?.shippingInformationVO?.receiptPay || '',
|
||||||
|
// subtotal: res?.shippingInformationVO?.oilCardPay || '',
|
||||||
|
appendFee: res?.shippingInformationVO?.appendFee || '',
|
||||||
|
paymentDays: res?.shippingInformationVO?.paymentDays || '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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-08 16:06:57
|
* @LastEditTime: 2021-12-13 14:51:27
|
||||||
* @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\components\bulk\bulk.component.html
|
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\bulk\bulk.component.html
|
||||||
@ -35,9 +35,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
<!-- <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||||
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
|
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
|
||||||
</nz-tab>
|
</nz-tab>
|
||||||
|
</nz-tabset> -->
|
||||||
|
<nz-tabset (nzSelectedIndexChange)="selectChange($event)">
|
||||||
|
<nz-tab [nzTitle]="'全部('+tabs?.totalQuantity+')'"></nz-tab>
|
||||||
|
<nz-tab [nzTitle]="'进行中('+tabs?.stayQuantity+')'"></nz-tab>
|
||||||
|
<nz-tab [nzTitle]="'已完结('+tabs?.receivedQuantity+')'"></nz-tab>
|
||||||
|
<nz-tab [nzTitle]="'已取消('+tabs?.cancelQuantity+')'"></nz-tab>
|
||||||
</nz-tabset>
|
</nz-tabset>
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
<nz-alert
|
<nz-alert
|
||||||
|
|||||||
@ -26,33 +26,20 @@ export class SupplyManagementBulkComponent implements OnInit {
|
|||||||
@ViewChild('st') private readonly st!: STComponent;
|
@ViewChild('st') private readonly st!: STComponent;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||||
tabs = [ {
|
|
||||||
name: '全部',
|
tabs = {
|
||||||
type: 0,
|
totalQuantity: 0,
|
||||||
count: 0,
|
cancelQuantity: 0,
|
||||||
},
|
receivedQuantity: 0,
|
||||||
{
|
stayQuantity: 0
|
||||||
name: '进行中',
|
};
|
||||||
type: 1,
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已完结',
|
|
||||||
type: 2,
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已取消',
|
|
||||||
type: 3,
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router) { }
|
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
this.initST();
|
this.initST();
|
||||||
this.initSFFre();
|
this.initSFFre();
|
||||||
|
this.getGoodsSourceStatistical()
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 查询参数
|
* 查询参数
|
||||||
@ -418,7 +405,7 @@ handleOK() {
|
|||||||
}
|
}
|
||||||
// 修改货源
|
// 修改货源
|
||||||
modification(item: any) {
|
modification(item: any) {
|
||||||
this.router.navigate(['/supply-management/vehicle-amend', item.id], {
|
this.router.navigate(['/supply-management/bulk-amend', item.id], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
sta: 3
|
sta: 3
|
||||||
},
|
},
|
||||||
@ -426,10 +413,19 @@ handleOK() {
|
|||||||
}
|
}
|
||||||
// 再下一单
|
// 再下一单
|
||||||
nextOrder(item: any) {
|
nextOrder(item: any) {
|
||||||
this.router.navigate(['/supply-management/vehicle-amend', item.id], {
|
this.router.navigate(['/supply-management/bulk-amend', item.id], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
sta: 4
|
sta: 4
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取货源状态统计
|
||||||
|
getGoodsSourceStatistical() {
|
||||||
|
this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2 }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
console.log(res)
|
||||||
|
this.tabs = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
placeholder="请输入装货地"
|
placeholder="请输入装货地"
|
||||||
/>
|
/>
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
<span style="padding: 0 10px"
|
<span style="padding: 0 10px"
|
||||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i
|
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i
|
||||||
></span>
|
></span>
|
||||||
<span
|
<span
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<button nz-button nzType="primary" (click)="addStartInfo($event)">
|
<button nz-button nzType="primary" (click)="addStartInfo($event)">
|
||||||
<i nz-icon nzType="plus"></i>
|
<i nz-icon nzType="plus"></i>
|
||||||
添加装货地
|
添加装货地
|
||||||
</button>
|
</button>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
placeholder="请输入卸货地"
|
placeholder="请输入卸货地"
|
||||||
/>
|
/>
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span>
|
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span>
|
||||||
<span
|
<span
|
||||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)">X</i
|
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)">X</i
|
||||||
></span>
|
></span>
|
||||||
@ -90,18 +90,18 @@
|
|||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<button nz-button nzType="primary" (click)="addEndInfo($event)">
|
<button nz-button nzType="primary" (click)="addEndInfo($event)">
|
||||||
<i nz-icon nzType="plus"></i>
|
<i nz-icon nzType="plus"></i>
|
||||||
添加卸货地
|
添加卸货地
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||||
<div nz-col [nzSpan]="9">
|
<div nz-col [nzSpan]="9">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<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]="'请输入装货时间'">
|
||||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="createTime" [(ngModel)]="creatTime"></nz-date-picker>
|
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="loadingTime" [(ngModel)]="loadingTime"></nz-date-picker>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
@ -109,7 +109,7 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label [nzSpan]="9" nzRequired>卸货时间</nz-form-label>
|
<nz-form-label [nzSpan]="9" nzRequired>卸货时间</nz-form-label>
|
||||||
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
|
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
|
||||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="modifyTime" [(ngModel)]="modifyTime"></nz-date-picker>
|
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="unloadingTime" [(ngModel)]="unloadingTime"></nz-date-picker>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
@ -217,10 +217,7 @@
|
|||||||
<div nz-col nzSpan="12">
|
<div nz-col nzSpan="12">
|
||||||
<sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7">
|
<sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7">
|
||||||
<ng-template sf-template="totalFee" let-i let-ui="ui" >
|
<ng-template sf-template="totalFee" let-i let-ui="ui" >
|
||||||
<div *ngIf="this.PageStatus === '整车修改' || this.PageStatus === '整车下一单'">{{totalFees | currency: '¥'}}</div>
|
<div>{{totalFees | currency: '¥'}}</div>
|
||||||
<div *ngIf="this.PageStatus === '大宗修改' || this.PageStatus === '大宗下一单'">
|
|
||||||
<nz-input-number [(ngModel)]="totalFees" (ngModelChange)="i.setValue($event)" [nzMin]="1" [nzStep]="0.01"></nz-input-number>
|
|
||||||
</div>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { AmapPoiPickerComponent } from '@shared';
|
|||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
||||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||||
|
import { debug } from 'console';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-publish-goods-onecar-publish',
|
selector: 'app-publish-goods-onecar-publish',
|
||||||
templateUrl: './onecar-publish.component.html',
|
templateUrl: './onecar-publish.component.html',
|
||||||
@ -29,8 +30,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
sf6data: any; // 货源单设置回显
|
sf6data: any; // 货源单设置回显
|
||||||
sf7data: any; // 货源单设置回显
|
sf7data: any; // 货源单设置回显
|
||||||
creatTime: any; // 货源单设置回显
|
creatTime: any; // 货源单设置回显
|
||||||
modifyTime: any; // 货源单设置回显
|
loadingTime: any; // 货源单设置回显
|
||||||
|
unloadingTime: any; // 货源单设置回显
|
||||||
totalFees: any; // 总数信息
|
totalFees: any; // 总数信息
|
||||||
|
npp =false
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
// // 单位
|
// // 单位
|
||||||
unit1 = '吨';
|
unit1 = '吨';
|
||||||
@ -42,8 +45,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
dataList: any;
|
dataList: any;
|
||||||
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService) {
|
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService) {
|
||||||
this.validateForm1 = fb.group({
|
this.validateForm1 = fb.group({
|
||||||
createTime: [null, []],
|
loadingTime: [null, []],
|
||||||
modifyTime: [null, []],
|
unloadingTime: [null, []],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||||
@ -97,15 +100,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
initSF1() {
|
initSF1() {
|
||||||
this.schema1 = {
|
this.schema1 = {
|
||||||
properties: {
|
properties: {
|
||||||
// shipperAppUserName: {
|
shipperAppUserName: {
|
||||||
// type: 'string',
|
type: 'string',
|
||||||
// title: '货主',
|
title: '货主',
|
||||||
// maxLength: 30,
|
maxLength: 30,
|
||||||
// ui: {
|
ui: {
|
||||||
// placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
enterpriseProjectName: {
|
enterpriseProjectId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '项目',
|
title: '项目',
|
||||||
enum: [
|
enum: [
|
||||||
@ -464,7 +467,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
console.log(this.totalFees)
|
console.log(this.totalFees)
|
||||||
}
|
}
|
||||||
initSF7() {
|
initSF7() {
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '整车下一单') {
|
|
||||||
this.schema7 = {
|
this.schema7 = {
|
||||||
properties: {
|
properties: {
|
||||||
prePay: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥', change: ()=> {
|
prePay: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥', change: ()=> {
|
||||||
@ -516,20 +518,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
required: ['paymentDays']
|
required: ['paymentDays']
|
||||||
};
|
};
|
||||||
} else {
|
|
||||||
this.schema7 = {
|
|
||||||
properties: {
|
|
||||||
totalFee: {
|
|
||||||
type: 'string',
|
|
||||||
title: '总费用',
|
|
||||||
ui: {
|
|
||||||
widget: 'custom',
|
|
||||||
placeholder: '请输入'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
this.ui7 = {
|
this.ui7 = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 90,
|
spanLabelFixed: 90,
|
||||||
@ -611,76 +599,96 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
submit(): void {
|
submit(): void {
|
||||||
Object.keys(this.validateForm1.controls).forEach(key => {
|
console.log('进来了')
|
||||||
this.validateForm1.controls[key].markAsDirty();
|
console.log(this.startInfo)
|
||||||
this.validateForm1.controls[key].updateValueAndValidity();
|
// Object.keys(this.validateForm1.controls).forEach(key => {
|
||||||
});
|
// this.validateForm1.controls[key].markAsDirty();
|
||||||
if(typeof(this.validateForm1.value.modifyTime) !== 'string' ) {
|
// this.validateForm1.controls[key].updateValueAndValidity();
|
||||||
var c = new Date(this.validateForm1.value.modifyTime);
|
// });
|
||||||
this.validateForm1.value.modifyTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds()
|
// this.sf1.validator({ emitError: true });
|
||||||
|
// this.sf3.validator({ emitError: true });
|
||||||
|
// this.sf4.validator({ emitError: true });
|
||||||
|
// this.sf6.validator({ emitError: true });
|
||||||
|
// if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
console.log(this.validateForm1.value)
|
||||||
|
if(typeof(this.validateForm1.value.unloadingTime) !== 'string' ) {
|
||||||
|
var c = new Date(this.validateForm1.value.unloadingTime);
|
||||||
|
this.validateForm1.value.unloadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||||
}
|
}
|
||||||
if(typeof(this.validateForm1.value.createTime) !== 'string' ) {
|
if(typeof(this.validateForm1.value.loadingTime) !== 'string' ) {
|
||||||
var c = new Date(this.validateForm1.value.createTime);
|
var c = new Date(this.validateForm1.value.loadingTime);
|
||||||
this.validateForm1.value.createTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds()
|
this.validateForm1.value.loadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||||
}
|
}
|
||||||
if (this.validateForm1.invalid) {
|
// if (this.validateForm1.invalid) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
this.startInfo.createTime = this.validateForm1.value.createTime
|
|
||||||
this.startInfo.modifyTime = this.validateForm1.value.modifyTime
|
|
||||||
const params: any = {
|
const params: any = {
|
||||||
...this.sf1.value,
|
...this.sf1.value,
|
||||||
...this.sf5.value,
|
...this.sf5.value,
|
||||||
|
...this.sf6.value,
|
||||||
|
loadingTime: this.validateForm1?.value?.loadingTime,
|
||||||
|
unloadingTime: this.validateForm1?.value?.unloadingTime,
|
||||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||||
goodsInfoDTOList: [
|
goodsInfoDTOList: [
|
||||||
{...this.sf4.value, ...this.sf3.value}
|
{
|
||||||
|
...this.sf4.value,
|
||||||
|
...this.sf3.value,
|
||||||
|
maxWeight: this.sf4.value.maxWeight.join(','),
|
||||||
|
maxCube: this.sf4.value.maxCube.join(',')
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '整车下一单') {
|
|
||||||
params.shippingInformationDTO = {
|
params.shippingInformationDTO = {
|
||||||
...this.sf7.value,
|
...this.sf7.value,
|
||||||
totalFees: this.totalFees
|
totalFees: this.totalFees
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
params.freightPrice = this.totalFees
|
|
||||||
}
|
|
||||||
console.log(this.sf7.value)
|
|
||||||
console.log(params)
|
console.log(params)
|
||||||
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 === '整车下一单') {
|
||||||
this.requests(this.service.$api_set_saveAnotherWholeOrder, params);
|
this.requests(this.service.$api_set_saveAnotherWholeOrder, params);
|
||||||
} else if(this.PageStatus === '大宗修改') {
|
|
||||||
this.requests(this.service.$api_set_bulkModify, params);
|
|
||||||
} else if(this.PageStatus === '大宗下一单') {
|
|
||||||
this.requests(this.service.$api_set_saveAnotherBulkOrder, params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
addPreZero(num: any){
|
||||||
|
if(num<10){
|
||||||
|
return '0'+num;
|
||||||
|
} else {
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
}
|
||||||
requests(url: any, params: any) {
|
requests(url: any, params: any) {
|
||||||
this.service.request(url, params).subscribe((res: any) => {
|
this.service.request(url, params).subscribe((res: any) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
openMap(type: string, index: number) {
|
// 打开地图
|
||||||
|
openMap(type: string, index: number) {
|
||||||
const modalRef = this.modalService.create({
|
const modalRef = this.modalService.create({
|
||||||
nzTitle: '',
|
nzTitle: '',
|
||||||
nzContent: AmapPoiPickerComponent,
|
nzContent: AmapPoiPickerComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
console.log(item)
|
console.log(item.poi);
|
||||||
const locList = poi.location.toString().split(',');
|
const locList = poi.location.toString().split(',');
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'start':
|
case 'start':
|
||||||
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
this.startInfo[index].longitude = locList[0];
|
this.startInfo[index].longitude = locList[0];
|
||||||
this.startInfo[index].latitude = locList[1];
|
this.startInfo[index].latitude = locList[1];
|
||||||
|
this.startInfo[index].province = poi.cityInfo.province;
|
||||||
|
this.startInfo[index].city = poi.cityInfo.city;
|
||||||
|
this.startInfo[index].area = poi.cityInfo.district;
|
||||||
break;
|
break;
|
||||||
case 'end':
|
case 'end':
|
||||||
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
this.endInfo[index].longitude = locList[0];
|
this.endInfo[index].longitude = locList[0];
|
||||||
this.endInfo[index].latitude = locList[1];
|
this.endInfo[index].latitude = locList[1];
|
||||||
|
this.endInfo[index].province = poi.cityInfo.province;
|
||||||
|
this.endInfo[index].city = poi.cityInfo.city;
|
||||||
|
this.endInfo[index].area = poi.cityInfo.district;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -693,15 +701,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 初始化信息
|
// 初始化信息
|
||||||
initdata() {
|
initdata() {
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '整车下一单') {
|
|
||||||
this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => {
|
this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => {
|
||||||
this.dataR(res);
|
this.dataR(res);
|
||||||
})
|
})
|
||||||
} else if(this.PageStatus === '大宗修改' || this.PageStatus === '大宗下一单') {
|
|
||||||
this.service.request(`${this.service.$api_get_getBulkDetail}`, {id:this.id}).subscribe((res) => {
|
|
||||||
this.dataR(res);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
asds(i: any) {
|
asds(i: any) {
|
||||||
console.log(i)
|
console.log(i)
|
||||||
@ -710,19 +712,19 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
dataR (res: any) {
|
dataR (res: any) {
|
||||||
// this.dataList = res;
|
// this.dataList = res;
|
||||||
this.sf1data = {
|
this.sf1data = {
|
||||||
// shipperAppUserName: res?.shipperAppUserName || '',
|
// shipperAppUserName: res?.shipperAppUserName ,
|
||||||
enterpriseProjectName: res?.enterpriseProjectName || '',
|
enterpriseProjectId: res?.enterpriseProjectId ,
|
||||||
enterpriseInfoName: res?.enterpriseInfoName || '',
|
enterpriseInfoName: res?.enterpriseInfoName ,
|
||||||
externalResourceCode: res?.externalResourceCode || '',
|
externalResourceCode: res?.externalResourceCode ,
|
||||||
dispatchId: res?.dispatchId || '',
|
dispatchId: res?.dispatchId ,
|
||||||
}
|
}
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
if(this.PageStatus === '整车修改') {
|
||||||
this.sf1data.id = res?.id;
|
this.sf1data.id = res?.id;
|
||||||
}
|
}
|
||||||
res?.unLoadingPlaceList.forEach((element: any) => {
|
res?.unLoadingPlaceVOList.forEach((element: any) => {
|
||||||
if(element.type === 1) {
|
if(element.type === 1) {
|
||||||
const controlId = this.startInfo.length;
|
const controlId = this.startInfo.length;
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
if(this.PageStatus === '整车修改') {
|
||||||
this.startInfo.push({
|
this.startInfo.push({
|
||||||
detailedAddress: element.detailedAddress,
|
detailedAddress: element.detailedAddress,
|
||||||
appUserName: element.appUserName,
|
appUserName: element.appUserName,
|
||||||
@ -748,16 +750,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
type: element.type,
|
type: element.type,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(element.createTime) {
|
|
||||||
this.creatTime = element?.createTime
|
|
||||||
this.modifyTime = element?.modifyTime
|
|
||||||
}
|
|
||||||
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
} else if(element.type === 2) {
|
} else if(element.type === 2) {
|
||||||
const controlId = this.endInfo.length;
|
const controlId = this.endInfo.length;
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
if(this.PageStatus === '整车修改') {
|
||||||
this.endInfo.push({
|
this.endInfo.push({
|
||||||
detailedAddress: element?.detailedAddress,
|
detailedAddress: element?.detailedAddress,
|
||||||
appUserName: element?.appUserName,
|
appUserName: element?.appUserName,
|
||||||
@ -788,52 +787,51 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.sf3data = {
|
this.sf3data = {
|
||||||
goodsName: res?.goodsInfoList[0]?.goodsName || '',
|
goodsName: res?.goodsInfoVOList[0]?.goodsName ,
|
||||||
}
|
}
|
||||||
this.sf4data = {
|
this.sf4data = {
|
||||||
weight: res?.goodsInfoList[0]?.weight || '',
|
weight: res?.goodsInfoVOList[0]?.weight ,
|
||||||
volume: res?.goodsInfoList[0]?.volume || '',
|
volume: res?.goodsInfoVOList[0]?.volume ,
|
||||||
vehicleDemand: res?.goodsInfoList[0]?.vehicleDemand || '',
|
vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand ,
|
||||||
maxCube: res?.goodsInfoList[0]?.maxCube?.split(',') || '',
|
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') ,
|
||||||
maxWeight: res?.goodsInfoList[0]?.maxWeight?.split(',') || '',
|
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') ,
|
||||||
number: res?.goodsInfoList[0]?.number || '',
|
number: res?.goodsInfoVOList[0]?.number ,
|
||||||
freightPrice: res?.goodsInfoList[0]?.freightPrice || '',
|
goodsType: res?.goodsInfoVOList[0]?.goodsType ,
|
||||||
freightType: res?.goodsInfoList[0]?.freightType || '',
|
modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId ,
|
||||||
goodsType: res?.goodsInfoList[0]?.goodsType || '',
|
resourceId: res?.goodsInfoVOList[0]?.resourceId ,
|
||||||
modifyTime: res?.goodsInfoList[0]?.modifyTime || '',
|
rule: res?.goodsInfoVOList[0]?.rule ,
|
||||||
modifyUserId: res?.goodsInfoList[0]?.modifyUserId || '',
|
settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis ,
|
||||||
resourceId: res?.goodsInfoList[0]?.resourceId || '',
|
|
||||||
rule: res?.goodsInfoList[0]?.rule || '',
|
|
||||||
settlementBasis: res?.goodsInfoList[0]?.settlementBasis || '',
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
if(res?.loadingTime) {
|
||||||
this.sf4data.id = res?.goodsInfoList[0]?.id;
|
this.loadingTime = res?.loadingTime;
|
||||||
}
|
}
|
||||||
if(this.PageStatus === '大宗下一单' || this.PageStatus === '大宗修改') {
|
if(res?.unloadingTime) {
|
||||||
this.totalFees = res?.freightPrice || '0';
|
this.unloadingTime = res?.unloadingTime;
|
||||||
} else {
|
}
|
||||||
this.totalFees = res?.shippingInformationVO?.totalFee || '0';
|
if(this.PageStatus === '整车修改' ) {
|
||||||
|
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
|
||||||
}
|
}
|
||||||
|
this.totalFees = res?.shippingInformationVO?.totalFee || '0';
|
||||||
this.sf5data = {
|
this.sf5data = {
|
||||||
goodsValue: res?.goodsValue || '',
|
goodsValue: res?.goodsValue ,
|
||||||
}
|
}
|
||||||
|
console.log(res?.stateReceipt)
|
||||||
this.sf6data = {
|
this.sf6data = {
|
||||||
stateReceipt: res?.supplementaryInformationVO?.stateReceipt || '',
|
stateReceipt: res?.stateReceipt,
|
||||||
remarks: res?.supplementaryInformationVO?.remarks || '',
|
receiptType: res?.receiptType ,
|
||||||
|
receiptUserId: res?.receiptUserId ,
|
||||||
|
remarks: res?.remarks
|
||||||
}
|
}
|
||||||
this.sf7data = {
|
this.sf7data = {
|
||||||
prePay: res?.shippingInformationVO?.prePay || '',
|
prePay: res?.shippingInformationVO?.prePay ,
|
||||||
toPay: res?.shippingInformationVO?.toPay || '',
|
toPay: res?.shippingInformationVO?.toPay ,
|
||||||
oilCardPay: res?.shippingInformationVO?.oilCardPay || '',
|
oilCardPay: res?.shippingInformationVO?.oilCardPay ,
|
||||||
receiptPay: res?.shippingInformationVO?.receiptPay || '',
|
receiptPay: res?.shippingInformationVO?.receiptPay ,
|
||||||
// subtotal: res?.shippingInformationVO?.oilCardPay || '',
|
// subtotal: res?.shippingInformationVO?.oilCardPay ,
|
||||||
appendFee: res?.shippingInformationVO?.appendFee || '',
|
appendFee: res?.shippingInformationVO?.appendFee ,
|
||||||
paymentDays: res?.shippingInformationVO?.paymentDays || '',
|
paymentDays: res?.shippingInformationVO?.paymentDays ,
|
||||||
}
|
}
|
||||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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-13 14:17:23
|
* @LastEditTime: 2021-12-13 14:52:49
|
||||||
* @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\components\vehicle\vehicle.component.html
|
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
|
||||||
@ -36,10 +36,17 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
<!-- <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||||
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
|
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
|
||||||
</nz-tab>
|
</nz-tab>
|
||||||
</nz-tabset>
|
</nz-tabset> -->
|
||||||
|
<nz-tabset (nzSelectedIndexChange)="selectChange($event)"
|
||||||
|
[nzTabBarExtraContent]="extraTemplate">
|
||||||
|
<nz-tab [nzTitle]="'全部('+tabs?.totalQuantity+')'"></nz-tab>
|
||||||
|
<nz-tab [nzTitle]="'待接单('+tabs?.stayQuantity+')'"></nz-tab>
|
||||||
|
<nz-tab [nzTitle]="'已接单('+tabs?.receivedQuantity+')'"></nz-tab>
|
||||||
|
<nz-tab [nzTitle]="'已取消('+tabs?.cancelQuantity+')'"></nz-tab>
|
||||||
|
</nz-tabset>
|
||||||
<div style="margin-top: 15px;">
|
<div style="margin-top: 15px;">
|
||||||
<!-- 选中提示框 -->
|
<!-- 选中提示框 -->
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
|
|||||||
@ -27,27 +27,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||||
columns: STColumn[] = [];
|
columns: STColumn[] = [];
|
||||||
tabs = [ {
|
tabs = {
|
||||||
name: '全部',
|
totalQuantity: 0,
|
||||||
type: 0,
|
cancelQuantity: 0,
|
||||||
count: 0,
|
receivedQuantity: 0,
|
||||||
},
|
stayQuantity: 0
|
||||||
{
|
};
|
||||||
name: '待接单',
|
|
||||||
type: 1,
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已接单',
|
|
||||||
type: 2,
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已取消',
|
|
||||||
type: 3,
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
resourceStatus: any;
|
resourceStatus: any;
|
||||||
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,private ar: ActivatedRoute) { }
|
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,private ar: ActivatedRoute) { }
|
||||||
|
|
||||||
@ -71,6 +56,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
this.initSF();
|
this.initSF();
|
||||||
this.initST();
|
this.initST();
|
||||||
this.initSFFre();
|
this.initSFFre();
|
||||||
|
this.getGoodsSourceStatistical();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -452,4 +438,13 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取货源状态统计
|
||||||
|
getGoodsSourceStatistical() {
|
||||||
|
this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 1 }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
console.log(res)
|
||||||
|
this.tabs = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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-10 15:03:10
|
* @LastEditTime: 2021-12-13 15:39:52
|
||||||
* @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
|
||||||
@ -18,9 +18,9 @@ export class SupplyManagementService extends BaseService {
|
|||||||
// 大宗获取货源表详情
|
// 大宗获取货源表详情
|
||||||
$api_get_getBulkDetail = `/api/sdc/goodsResourceOperate/getBulkDetail`;
|
$api_get_getBulkDetail = `/api/sdc/goodsResourceOperate/getBulkDetail`;
|
||||||
// 查询运营后台大宗货源列表
|
// 查询运营后台大宗货源列表
|
||||||
$api_get_bulkPage_list = `/api/sdc/goodsResourceOperate/list/bulkPage`;
|
$api_get_bulkPage_list = `/api/sdc/goodsResourceOperate/listBulkPage`;
|
||||||
// 查询运营后台整车货源列表
|
// 查询运营后台整车货源列表
|
||||||
$api_get_wholePage_list = `/api/sdc/goodsResourceOperate/list/wholePage`;
|
$api_get_wholePage_list = `/api/sdc/goodsResourceOperate/listWholePage`;
|
||||||
// 整车再下一单
|
// 整车再下一单
|
||||||
$api_set_saveAnotherWholeOrder = `/api/sdc/goodsResourceOperate/saveAnotherWholeOrder`;
|
$api_set_saveAnotherWholeOrder = `/api/sdc/goodsResourceOperate/saveAnotherWholeOrder`;
|
||||||
// 大宗再下一单
|
// 大宗再下一单
|
||||||
@ -36,6 +36,7 @@ export class SupplyManagementService extends BaseService {
|
|||||||
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
||||||
$api_get_listModifyPrice = `/api/sdc/goodsInfo/listModifyPrice`;
|
$api_get_listModifyPrice = `/api/sdc/goodsInfo/listModifyPrice`;
|
||||||
$api_update_price = `/api/sdc/goodsInfo/modifyPrice`; // 根据货物ID修改单价
|
$api_update_price = `/api/sdc/goodsInfo/modifyPrice`; // 根据货物ID修改单价
|
||||||
|
$api_get_goods_resource_statistical = `/api/sdc/goodsResourceOperate/StatisticalStatus`; // 统计整车、大宗货源状态数量
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector)
|
super(injector)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bu
|
|||||||
import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component';
|
import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component';
|
||||||
import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component';
|
import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component';
|
||||||
import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component';
|
import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component';
|
||||||
|
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: 'index', component: SupplyManagementIndexComponent },
|
{ path: 'index', component: SupplyManagementIndexComponent },
|
||||||
@ -22,6 +23,7 @@ const routes: Routes = [
|
|||||||
{ path: 'vehicle-detail/:id', component: SupplyManagementVehicleDetailComponent },
|
{ path: 'vehicle-detail/:id', component: SupplyManagementVehicleDetailComponent },
|
||||||
{ path: 'add-drivers', component: SupplyManagementAddDriversComponent },
|
{ path: 'add-drivers', component: SupplyManagementAddDriversComponent },
|
||||||
{ path: 'vehicle-amend/:id', component: SupplyManagementOnecarPublishComponent },
|
{ path: 'vehicle-amend/:id', component: SupplyManagementOnecarPublishComponent },
|
||||||
|
{ path: 'bulk-amend/:id', component: SupplyManagementBulkPublishComponent },
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -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-06 13:41:42
|
* @LastEditTime: 2021-12-13 15:23:25
|
||||||
* @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
|
||||||
@ -25,6 +25,7 @@ import { GaodeMapComponent } from './components/gaode-map/gaode-map.component';
|
|||||||
import { PublishGoodsChooseFamifiarComponent } from './components/choose-famifiar/choose-famifiar.component';
|
import { PublishGoodsChooseFamifiarComponent } from './components/choose-famifiar/choose-famifiar.component';
|
||||||
import { PublishchooseFamifiarSetCaptainComponent } from './components/choose-famifiar/set-captain/set-captain.component';
|
import { PublishchooseFamifiarSetCaptainComponent } from './components/choose-famifiar/set-captain/set-captain.component';
|
||||||
import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/add/add.component';
|
import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/add/add.component';
|
||||||
|
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
|
||||||
|
|
||||||
const COMPONENTS: Type<void>[] = [
|
const COMPONENTS: Type<void>[] = [
|
||||||
SupplyManagementIndexComponent,
|
SupplyManagementIndexComponent,
|
||||||
@ -42,7 +43,9 @@ const COMPONENTS: Type<void>[] = [
|
|||||||
GaodeMapComponent,
|
GaodeMapComponent,
|
||||||
PublishGoodsChooseFamifiarComponent,
|
PublishGoodsChooseFamifiarComponent,
|
||||||
PublishchooseFamifiarSetCaptainComponent,
|
PublishchooseFamifiarSetCaptainComponent,
|
||||||
PublishchooseFamifiarAddComponent
|
PublishchooseFamifiarAddComponent,
|
||||||
|
SupplyManagementBulkPublishComponent,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
Reference in New Issue
Block a user