车辆对接
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { Params } from '@angular/router';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
@ -14,7 +13,6 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
||||
export class SupplyManagementUpdatePriceComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
ii: any;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
columns: STColumn[] = [];
|
||||
@ -34,14 +32,7 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initSt();
|
||||
console.log(this.i)
|
||||
const Params = {
|
||||
id: this.i.id
|
||||
}
|
||||
this.service.request(this.service.$api_get_listModifyPrice, Params).subscribe((res) =>{
|
||||
console.log(res)
|
||||
this.ii = res[0];
|
||||
})
|
||||
if (this.record?.id) this.getGoodsResourceShipperDeatail(this.record?.id);
|
||||
}
|
||||
|
||||
initSF() {
|
||||
@ -64,13 +55,10 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
||||
rule: {
|
||||
type: 'string',
|
||||
title: '取整规则',
|
||||
enum: [
|
||||
{ label: '保留小数', value: '1' },
|
||||
{ label: '抹除小数', value: '2' },
|
||||
{ label: '抹除个位', value: '3' },
|
||||
],
|
||||
default: '0',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'goodresource:rounding:rules' },
|
||||
optionalHelp: {
|
||||
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 {
|
||||
console.log(value)
|
||||
const { id, freightType, freightPrice, resourceCode, rule, resourceId } = value;
|
||||
console.log(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 => {
|
||||
if (res) {
|
||||
this.msgSrv.success('保存成功');
|
||||
|
||||
Reference in New Issue
Block a user