车辆对接
This commit is contained in:
@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-sm mb-sm" nz-row>
|
<div class="mt-sm mb-sm" nz-row>
|
||||||
<div>
|
<div>
|
||||||
<b>总费用:<span class="text-red-light text-md">{{i?.freightPrice | currency}}</span></b>
|
<b>总费用:<span class="text-red-light text-md">{{i?.freightPrice | currency: '¥'}}</span></b>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nz-divider></nz-divider>
|
<nz-divider></nz-divider>
|
||||||
@ -79,8 +79,8 @@
|
|||||||
<div class="mt-md">
|
<div class="mt-md">
|
||||||
<h4 class="text-md">装货卸货信息
|
<h4 class="text-md">装货卸货信息
|
||||||
<span class="ml-sm text-sm">(
|
<span class="ml-sm text-sm">(
|
||||||
<label>{{i?.loadingCount}}装</label>
|
<label>{{i?.loadingCount || '一'}}装</label>
|
||||||
<label>{{i?.unloadingCount}}卸</label>
|
<label>{{i?.unloadingCount || '一'}}卸</label>
|
||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
@ -129,7 +129,7 @@
|
|||||||
<nz-divider class="mb-xs mt-xs"></nz-divider>
|
<nz-divider class="mb-xs mt-xs"></nz-divider>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<label>单价:</label>
|
<label>单价:</label>
|
||||||
<span class="text-error-dark text-xxl">{{item?.freightPrice | currency}}
|
<span class="text-error-dark text-xxl">{{item?.freightPrice | currency: '¥'}}
|
||||||
{{freightType[item?.freightType]}}</span>
|
{{freightType[item?.freightType]}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -259,22 +259,22 @@ export class SupplyManagementBulkComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
text: '货源审核',
|
text: '货源审核',
|
||||||
click: (_record) => this.audit(_record, 1),
|
click: (_record) => this.audit(_record, 1),
|
||||||
// iif: item => item.auditStatus === 1,
|
iif: item => item.auditStatus == 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '二维码',
|
text: '二维码',
|
||||||
click: (_record) => this.assignedQrcode(_record),
|
click: (_record) => this.assignedQrcode(_record),
|
||||||
// iif: item => item.auditStatus === 1 || item.auditStatus === 2,
|
iif: item => item.auditStatus == 1 || item.auditStatus == 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '修改单价',
|
text: '修改单价',
|
||||||
click: (_record) => this.modification(_record),
|
click: (_record) => this.modification(_record),
|
||||||
// iif: item => item.auditStatus === 1 || item.auditStatus === 2,
|
iif: item => item.auditStatus == 1 || item.auditStatus == 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '取消货源',
|
text: '取消货源',
|
||||||
click: (_record) => this.delOne(_record),
|
click: (_record) => this.delOne(_record),
|
||||||
// iif: item => item.auditStatus === 1 || item.auditStatus === 2,
|
iif: item => item.auditStatus == 1 || item.auditStatus == 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '再下一单',
|
text: '再下一单',
|
||||||
@ -282,8 +282,8 @@ export class SupplyManagementBulkComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '重新指派',
|
text: '重新指派',
|
||||||
// click: (_record) => this.delOne(_record),
|
click: (_record) => this.delOne(_record),
|
||||||
// iif: item => item.auditStatus === 2,
|
iif: item => item.auditStatus == 2,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -402,14 +402,31 @@ export class SupplyManagementBulkComponent implements OnInit {
|
|||||||
handleOK() {
|
handleOK() {
|
||||||
|
|
||||||
}
|
}
|
||||||
// 修改货源
|
// 修改单价
|
||||||
modification(item: any) {
|
modification(item: any) {
|
||||||
this.router.navigate(['/supply-management/bulk-amend', item.id], {
|
const modalRef = this.modal.create({
|
||||||
queryParams: {
|
nzTitle: '修改单价',
|
||||||
sta: 3
|
nzWidth: '600px',
|
||||||
|
nzContent: SupplyManagementUpdatePriceComponent,
|
||||||
|
nzComponentParams: {
|
||||||
|
record: item,
|
||||||
},
|
},
|
||||||
|
nzFooter: null,
|
||||||
|
});
|
||||||
|
modalRef.afterClose.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
console.log(res)
|
||||||
|
// this.getGoodsSourceDetail();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// getGoodsSourceDetail() {
|
||||||
|
// this.service.request(this.service.$api_get_bulk_detail, { id: this.id }).subscribe(res => {
|
||||||
|
// this.i = res;
|
||||||
|
// this.currentStatus = +this.i?.resourceStatus - 1;
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
// 再下一单
|
// 再下一单
|
||||||
nextOrder(item: any) {
|
nextOrder(item: any) {
|
||||||
this.router.navigate(['/supply-management/bulk-amend', item.id], {
|
this.router.navigate(['/supply-management/bulk-amend', item.id], {
|
||||||
|
|||||||
@ -1,14 +1,6 @@
|
|||||||
<!--
|
|
||||||
* @Author: your name
|
|
||||||
* @Date: 2021-12-03 11:10:14
|
|
||||||
* @LastEditTime: 2021-12-10 15:14:11
|
|
||||||
* @LastEditors: your name
|
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
||||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\update-price\update-price.component.html
|
|
||||||
-->
|
|
||||||
<div class="mb-lg">
|
<div class="mb-lg">
|
||||||
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
|
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
|
||||||
<sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="ii" button="none">
|
<sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
|
||||||
<ng-template sf-template="freightPrice" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="freightPrice" let-me let-ui="ui" let-schema="schema">
|
||||||
<nz-input-group [nzAddOnAfter]="freightType[i?.freightType]">
|
<nz-input-group [nzAddOnAfter]="freightType[i?.freightType]">
|
||||||
<input [max]="99999999" placeholder="请输入" type="number" [ngModel]="me.value"
|
<input [max]="99999999" placeholder="请输入" type="number" [ngModel]="me.value"
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import { Params } from '@angular/router';
|
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { STColumn } from '@delon/abc/st';
|
import { STColumn } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||||
@ -14,7 +13,6 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
|||||||
export class SupplyManagementUpdatePriceComponent implements OnInit {
|
export class SupplyManagementUpdatePriceComponent implements OnInit {
|
||||||
record: any = {};
|
record: any = {};
|
||||||
i: any;
|
i: any;
|
||||||
ii: any;
|
|
||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
columns: STColumn[] = [];
|
columns: STColumn[] = [];
|
||||||
@ -34,14 +32,7 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
this.initSt();
|
this.initSt();
|
||||||
console.log(this.i)
|
if (this.record?.id) this.getGoodsResourceShipperDeatail(this.record?.id);
|
||||||
const Params = {
|
|
||||||
id: this.i.id
|
|
||||||
}
|
|
||||||
this.service.request(this.service.$api_get_listModifyPrice, Params).subscribe((res) =>{
|
|
||||||
console.log(res)
|
|
||||||
this.ii = res[0];
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initSF() {
|
initSF() {
|
||||||
@ -64,13 +55,10 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
|||||||
rule: {
|
rule: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '取整规则',
|
title: '取整规则',
|
||||||
enum: [
|
default: '0',
|
||||||
{ label: '保留小数', value: '1' },
|
|
||||||
{ label: '抹除小数', value: '2' },
|
|
||||||
{ label: '抹除个位', value: '3' },
|
|
||||||
],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'dict-select',
|
||||||
|
params: { dictKey: 'goodresource:rounding:rules' },
|
||||||
optionalHelp: {
|
optionalHelp: {
|
||||||
text: '例如:付司机运费= 重量*单价 = 999.99;\n 保留小数:即 999.99; \n 抹除小数:即 999.00;\n 抹除个位,即 990.00',
|
text: '例如:付司机运费= 重量*单价 = 999.99;\n 保留小数:即 999.99; \n 抹除小数:即 999.00;\n 抹除个位,即 990.00',
|
||||||
}
|
}
|
||||||
@ -88,6 +76,13 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getGoodsResourceShipperDeatail(id: any) {
|
||||||
|
this.service.request(this.service.$api_get_goods_resource_shipper, { id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.i = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
@ -99,8 +94,9 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
save(value: any): void {
|
save(value: any): void {
|
||||||
console.log(value)
|
console.log(value);
|
||||||
const { id, freightType, freightPrice, resourceCode, rule, resourceId } = value;
|
// const { id: resourceId, freightType, freightPrice, resourceCode, rule, goodsID: id } = value;
|
||||||
|
const { resourceId, freightType, freightPrice, resourceCode, rule, id } = value;
|
||||||
this.service.request(this.service.$api_update_price, { id, freightType, freightPrice, resourceCode, rule, resourceId }).subscribe(res => {
|
this.service.request(this.service.$api_update_price, { id, freightType, freightPrice, resourceCode, rule, resourceId }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.msgSrv.success('保存成功');
|
this.msgSrv.success('保存成功');
|
||||||
|
|||||||
Reference in New Issue
Block a user