fix bug
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-14 17:48:58
|
||||
* @LastEditTime: 2021-12-14 20:10:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\services\order-management.service.ts
|
||||
@ -19,6 +19,8 @@ export class SupplyManagementService extends BaseService {
|
||||
// 据 手机号/姓名 查询 车队长/司机
|
||||
$api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`;
|
||||
$api_del_driver = ``;
|
||||
// 获取货主企业列表
|
||||
public $api_getList = '/api/mdc/cuc/enterpriseInfo/cargoOwner/getList?_allow_anonymous=true';
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
|
||||
@ -106,6 +106,36 @@
|
||||
<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="freightPrice" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
|
||||
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" placeholder="请输入" />
|
||||
</nz-input-group>
|
||||
<ng-template #addOnAfterTemplate>
|
||||
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
|
||||
<nz-option nzLabel="元/吨" nzValue="1"></nz-option>
|
||||
<nz-option nzLabel="元/方" nzValue="2"></nz-option>
|
||||
<nz-option nzLabel="元/车" nzValue="3"></nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<ng-template sf-template="rule" let-i let-ui="ui">
|
||||
<div class="align-center">
|
||||
<nz-select [ngModel]="i.value" (ngModelChange)="i.setValue($event)" nzPlaceHolder="运费取整规则">
|
||||
<nz-option nzLabel="保留小数" nzValue="1"></nz-option>
|
||||
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
|
||||
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
|
||||
</nz-select>
|
||||
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
|
||||
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
|
||||
></span>
|
||||
<ng-template #template2>
|
||||
<p>例如 付司机运费 = 重量*单价 = 999.99</p>
|
||||
<p>保留小数,即 999.99</p>
|
||||
<p>抹除小数,即 999.00</p>
|
||||
<p>抹除个位,即 990.00</p>
|
||||
</ng-template>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||
<input
|
||||
@ -150,60 +180,11 @@
|
||||
</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">
|
||||
|
||||
@ -27,7 +27,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
sf3data: any; // 货源单设置回显
|
||||
sf4data: any; // 货源单设置回显
|
||||
sf5data: any; // 货源单设置回显
|
||||
sf6data: any; // 货源单设置回显
|
||||
sf7data: any; // 货源单设置回显
|
||||
creatTime: any; // 货源单设置回显
|
||||
modifyTime: any; // 货源单设置回显
|
||||
@ -69,13 +68,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
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 = {};
|
||||
@ -95,9 +87,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
// this.initSF2();
|
||||
this.initSF3();
|
||||
this.initSF4();
|
||||
this.initSF5();
|
||||
this.initSF6();
|
||||
this.initSF7();
|
||||
this.initdata();
|
||||
}
|
||||
|
||||
@ -244,13 +234,52 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
freightPrice: {
|
||||
type: 'string',
|
||||
title: '运费单价',
|
||||
ui: {
|
||||
errors: { required: '请选择运费单价' },
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
freightType: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
},
|
||||
default: '1'
|
||||
},
|
||||
|
||||
rule: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
errors: { required: '请选择运费取整规则' }
|
||||
}
|
||||
},
|
||||
settlementBasis: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: [
|
||||
{ label: '以收货为准', value: '1' },
|
||||
{ label: '以发货为准', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '结算依据',
|
||||
errors: { required: '请选择结算依据' }
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '货物数量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
errors: { required: '请填写总重量' }
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
@ -317,13 +346,22 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
} as SFSelectWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['weight', 'maxWeight', 'maxCube']
|
||||
required: ['weight', 'maxWeight', 'maxCube', 'freightPrice', 'rule', 'settlementBasis']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freightPrice: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$rule: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$settlementBasis: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
@ -342,112 +380,21 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
initSF5() {
|
||||
this.schema5 = {
|
||||
properties: {
|
||||
goodsValue: {
|
||||
type: 'string',
|
||||
title: '货物价值',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui5 = {
|
||||
'*': {
|
||||
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)
|
||||
}
|
||||
|
||||
initSF6() {
|
||||
this.schema6 = {
|
||||
this.schema7 = {
|
||||
properties: {
|
||||
stateReceipt: {
|
||||
paymentDays: {
|
||||
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: '选择地址',
|
||||
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
|
||||
placeholder: '请输入',
|
||||
errors: { required: '请输入付款承诺天数' }
|
||||
}
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
@ -460,31 +407,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
} 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: '请输入'
|
||||
}
|
||||
}
|
||||
}
|
||||
required: ['paymentDays']
|
||||
};
|
||||
this.ui7 = {
|
||||
'*': {
|
||||
@ -494,6 +417,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
addStartInfo(event: any) {
|
||||
if (this.startInfo.length < 5) {
|
||||
const controlId = this.startInfo.length;
|
||||
@ -567,9 +491,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
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();
|
||||
@ -577,7 +499,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
// 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;
|
||||
// }
|
||||
@ -598,8 +519,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
const params: any = {
|
||||
...this.sf1.value,
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||
goodsInfoDTOList: [
|
||||
{
|
||||
@ -756,41 +675,37 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
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(',') || '',
|
||||
// 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 || '',
|
||||
|
||||
freightPrice: res?.goodsInfoVOList[0]?.freightPrice || '',
|
||||
freightType: res?.goodsInfoVOList[0]?.freightType || '',
|
||||
rule: res?.goodsInfoVOList[0]?.rule || '',
|
||||
settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis || '',
|
||||
weight: res?.goodsInfoVOList[0]?.weight || '',
|
||||
volume: res?.goodsInfoVOList[0]?.volume || '',
|
||||
number: res?.goodsInfoVOList[0]?.number || '',
|
||||
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 || '',
|
||||
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || ''
|
||||
|
||||
}
|
||||
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 || '',
|
||||
}
|
||||
paymentDays: res?.paymentDays || '',
|
||||
remarks: res?.remarks || ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 20:08:17
|
||||
* @LastEditTime: 2021-12-14 20:09:50
|
||||
* @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\onecar-publish\address-list\address-list.component.html
|
||||
-->
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[data]="service.$api_getList"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: reqProcess }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
[widthMode]="{ type: 'strict' }"
|
||||
(change)="change($event)"
|
||||
>
|
||||
<ng-template st-row="region" let-item let-index="index"> {{ item.province }}-{{ item.city }}-{{ item.area }} </ng-template>
|
||||
</st>
|
||||
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 20:08:17
|
||||
* @LastEditTime: 2021-12-14 20:08:55
|
||||
* @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\onecar-publish\address-list\address-list.component.ts
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { NzDrawerService } from 'ng-zorro-antd/drawer';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from 'src/app/routes/order-management/services/order-management.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-publish-address-list',
|
||||
templateUrl: './address-list.component.html'
|
||||
})
|
||||
export class PublishAddressListComponent implements OnInit {
|
||||
columns!: STColumn[];
|
||||
@ViewChild('st', { static: false })
|
||||
st!: STComponent;
|
||||
|
||||
seleteData: any;
|
||||
|
||||
spuStatus = '1'; // '1'客户地址,'2'收回单地址
|
||||
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
private drawerService: NzDrawerService,
|
||||
public service: SupplyManagementService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return {
|
||||
type: this.spuStatus
|
||||
};
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', index: 'id', type: 'radio', width: 70 },
|
||||
{
|
||||
title: '省市区',
|
||||
render: 'region'
|
||||
},
|
||||
{
|
||||
title: '详细地址',
|
||||
index: 'detailedAddress'
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
index: 'contactName'
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
index: 'contactTelephone'
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
index: 'modifyTime'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// 排序
|
||||
reqProcess(requestOptions: STRequestOptions): STRequestOptions {
|
||||
return processSingleSort(requestOptions);
|
||||
}
|
||||
|
||||
change(ret: STChange): void {
|
||||
console.log('change', ret);
|
||||
this.seleteData = { ...ret.radio };
|
||||
}
|
||||
}
|
||||
@ -206,7 +206,17 @@
|
||||
<div class="card-title">补充信息</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"></sf>
|
||||
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6">
|
||||
<ng-template sf-template="receiptUserId" let-i let-ui="ui">
|
||||
<input
|
||||
nz-input
|
||||
[ngModel]="i.value"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="请点击选择收回单地址"
|
||||
(click)="backBillChange()"
|
||||
/>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -15,6 +15,7 @@ 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';
|
||||
import { PublishAddressListComponent } from './address-list/address-list.component';
|
||||
@Component({
|
||||
selector: 'app-publish-goods-onecar-publish',
|
||||
templateUrl: './onecar-publish.component.html',
|
||||
@ -396,7 +397,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请点击选择收回单地址',
|
||||
validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
default: '1212'
|
||||
@ -406,7 +407,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '联系人',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -416,7 +417,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '联系电话',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -426,7 +427,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '所在地区',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -437,7 +438,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
maxLength: 20,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -628,6 +629,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
...this.sf1.value,
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
paymentDays: this.sf7.value.paymentDays,
|
||||
loadingTime: this.validateForm1?.value?.loadingTime,
|
||||
unloadingTime: this.validateForm1?.value?.unloadingTime,
|
||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||
@ -831,7 +833,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay ,
|
||||
// subtotal: res?.shippingInformationVO?.oilCardPay ,
|
||||
appendFee: res?.shippingInformationVO?.appendFee ,
|
||||
paymentDays: res?.shippingInformationVO?.paymentDays ,
|
||||
paymentDays: res?.paymentDays ,
|
||||
}
|
||||
}
|
||||
backBillChange() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '选择收回单地址',
|
||||
nzContent: PublishAddressListComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: { spuStatus: '2' },
|
||||
nzOnOk: item => {
|
||||
const data = item.seleteData;
|
||||
if (JSON.stringify(data) === '{}') return;
|
||||
this.sf6.setValue('/name4', data.contactName);
|
||||
this.sf6.setValue('/name5', data.contactTelephone);
|
||||
this.sf6.setValue('/name6', `${data.province}-${data.city}-${data.area}`);
|
||||
this.sf6.setValue('/receiptAddress', data.detailedAddress);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-13 15:39:52
|
||||
* @LastEditTime: 2021-12-14 20:09:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @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
|
||||
@ -37,6 +37,8 @@ export class SupplyManagementService extends BaseService {
|
||||
$api_get_listModifyPrice = `/api/sdc/goodsInfo/listModifyPrice`;
|
||||
$api_update_price = `/api/sdc/goodsInfo/modifyPrice`; // 根据货物ID修改单价
|
||||
$api_get_goods_resource_statistical = `/api/sdc/goodsResourceOperate/StatisticalStatus`; // 统计整车、大宗货源状态数量
|
||||
// 获取货主企业列表
|
||||
public $api_getList = '/api/mdc/cuc/enterpriseInfo/cargoOwner/getList?_allow_anonymous=true';
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ import { PublishGoodsChooseFamifiarComponent } from './components/choose-famifia
|
||||
import { PublishchooseFamifiarSetCaptainComponent } from './components/choose-famifiar/set-captain/set-captain.component';
|
||||
import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/add/add.component';
|
||||
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
|
||||
import { PublishAddressListComponent } from './components/onecar-publish/address-list/address-list.component';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
SupplyManagementIndexComponent,
|
||||
@ -45,7 +46,7 @@ const COMPONENTS: Type<void>[] = [
|
||||
PublishchooseFamifiarSetCaptainComponent,
|
||||
PublishchooseFamifiarAddComponent,
|
||||
SupplyManagementBulkPublishComponent,
|
||||
|
||||
PublishAddressListComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
nz-select-top-control {
|
||||
padding-left: 0px !important;
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
min-width: 250px;
|
||||
|
||||
nz-select-top-control {
|
||||
cursor: text !important;
|
||||
color : #000 !important;
|
||||
cursor: text !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,18 +54,18 @@
|
||||
|
||||
.image-hover {
|
||||
.delete-icon {
|
||||
border-radius : 50%;
|
||||
color : #F55656;
|
||||
font-size : 28px;
|
||||
position : absolute;
|
||||
top : -15px;
|
||||
right : -15px;
|
||||
background-color: #ffffff;
|
||||
color : #F55656;
|
||||
font-size : 28px;
|
||||
background-color: #fff;
|
||||
border-radius : 50%;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.show-icon {
|
||||
color : #ffffff;
|
||||
color : #fff;
|
||||
font-size: 30px;
|
||||
cursor : pointer;
|
||||
}
|
||||
@ -76,33 +76,33 @@
|
||||
}
|
||||
|
||||
.mask {
|
||||
position : absolute;
|
||||
width : 200px;
|
||||
height : 160px;
|
||||
margin-top : -160px;
|
||||
background-color : #4F4F4F;
|
||||
opacity : 0;
|
||||
position : absolute;
|
||||
// top : 6px;
|
||||
// left : 12px;
|
||||
border-radius : 6px;
|
||||
margin-top : -160px;
|
||||
opacity : 0;
|
||||
}
|
||||
|
||||
.mask-over {
|
||||
position : absolute;
|
||||
display : flex;
|
||||
align-items : center;
|
||||
justify-content : center;
|
||||
width : 200px;
|
||||
height : 160px;
|
||||
position : absolute;
|
||||
margin-top : -160px;
|
||||
// top : 6px;
|
||||
// left : 12px;
|
||||
border-radius : 6px;
|
||||
display : flex;
|
||||
justify-content : center;
|
||||
align-items : center;
|
||||
margin-top : -160px;
|
||||
|
||||
label {
|
||||
color : #FFF;
|
||||
font-size : 20px;
|
||||
line-height : 24px;
|
||||
letter-spacing: 0.7px;
|
||||
color : #FFFFFF;
|
||||
}
|
||||
}
|
||||
@ -7,27 +7,52 @@
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #content>
|
||||
<sv-container col="1">
|
||||
<sv-title style="font-weight: 700;">待审核
|
||||
<div style="float: right;">
|
||||
<ng-container *ngIf="!isEdit">
|
||||
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isEdit">
|
||||
<button nz-button nzType="default" (click)="reset()">取消</button>
|
||||
<button nz-button nzType="default" (click)="save()" nzDanger>保存</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
</sv-title>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv-title style="font-weight: 700;">车辆基础信息</sv-title>
|
||||
<sv label="车牌号">
|
||||
{{ detailData?.carNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车牌颜色">
|
||||
{{ detailData?.carNoColor }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carNoColor" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车型">
|
||||
{{ detailData?.carModel }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carModel" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车长">
|
||||
{{ detailData?.carLength }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carLength" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="是否为挂车">
|
||||
{{ detailData?.isTrailer === true ? '是' : '否'}}
|
||||
<nz-select [(ngModel)]="detailData.isTrailer" [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit"
|
||||
[nzShowArrow]="isEdit" [nzDisabled]="!isEdit">
|
||||
<nz-option [nzValue]="false" nzLabel="否"></nz-option>
|
||||
<nz-option [nzValue]="true" nzLabel="是"></nz-option>
|
||||
</nz-select>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="车头照">
|
||||
<app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist>
|
||||
<!-- <app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
</ng-template>
|
||||
@ -36,73 +61,98 @@
|
||||
<sv-container col="3">
|
||||
<sv-title style="font-weight: 700;">行驶证信息</sv-title>
|
||||
<sv label="档案编号">
|
||||
{{ detailData?.archivesNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.archivesNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="准驾车型">
|
||||
{{ detailData?.carModel }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carModel" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="行驶证注册日期">
|
||||
{{ detailData?.driverLicenseRegisterTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseRegisterTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="2">
|
||||
<sv label="行驶证到期日">
|
||||
{{ detailData?.driverLicenseEndTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseEndTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="行驶证签发机关">
|
||||
{{ detailData?.driverLicenseSigningOrg }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseSigningOrg" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv label="行驶证发证日期">
|
||||
{{ detailData?.driverLicenseGetTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseGetTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车辆识别代码">
|
||||
{{ detailData?.carDistinguishCode }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carDistinguishCode" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="使用性质">
|
||||
{{ detailData?.useNature === '1' ? '营运' : '非营运'}}
|
||||
<nz-select [(ngModel)]="detailData.useNature" [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit"
|
||||
[nzShowArrow]="isEdit" [nzDisabled]="!isEdit">
|
||||
<nz-option [nzValue]="1" nzLabel="营运"></nz-option>
|
||||
<nz-option [nzValue]="0" nzLabel="非营运"></nz-option>
|
||||
</nz-select>
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv label="载重(吨)">
|
||||
{{ detailData?.carLoad }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carLoad" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="整备质量">
|
||||
{{ detailData?.curbWeight }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.curbWeight" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="所有人">
|
||||
{{ detailData?.carOwner }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carOwner" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="自有载具">
|
||||
{{ detailData?.contactsName }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.contactsName" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="行驶证照片">
|
||||
<app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist>
|
||||
<!-- <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'carFrontPhotoWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title style="font-weight: 700;">道路运输证信息</sv-title>
|
||||
<sv label="道路运输证号">
|
||||
{{ detailData?.roadTransportNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="经营许可证号">
|
||||
{{ detailData?.roadTransportLicenceNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportLicenceNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="发证日期">
|
||||
{{ detailData?.roadTransportStartTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportStartTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="有效期至">
|
||||
{{detailData?.roadTransportEndTime}}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportEndTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="道路运输证照片">
|
||||
<app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist>
|
||||
<!-- <app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'carFrontPhotoWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
@ -152,4 +202,26 @@
|
||||
<button nz-button nzType="default" (click)="handleCancel('2')">取消</button>
|
||||
<button nz-button nzType="primary" (click)="handleOK()">确定</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
</nz-modal>
|
||||
|
||||
<ng-template #uploadTemplate let-image="image" let-key="key" let-hover="hover">
|
||||
<nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
|
||||
[nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
|
||||
[nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,key)">
|
||||
<ng-container *ngIf="!image && isEdit">
|
||||
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
|
||||
<div class="ant-upload-text">上传</div>
|
||||
</ng-container>
|
||||
<div *ngIf="image" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
|
||||
(click)="$event.cancelBubble=true" class="image-hover">
|
||||
<img [src]="image" style="width: 200px;height: 160px;" />
|
||||
<div class="mask" *ngIf="detailData[hover] && isEdit"></div>
|
||||
<div class="mask-over" *ngIf="detailData[hover] && isEdit">
|
||||
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(key)"></i>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="showImg(image)"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nz-upload>
|
||||
</ng-template>
|
||||
@ -7,6 +7,9 @@ import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { VehicleService } from '../../../services/vehicle.service';
|
||||
import { VehicleComponentsListEditComponent } from '../edit/edit.component';
|
||||
import { VehicleImgViewComponent } from '../img-view/img-view.component';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supplier-components-list-view',
|
||||
@ -19,17 +22,21 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
isShow = false;
|
||||
isVisible = false;
|
||||
isEdit = false;
|
||||
modalTitle = '有效期';
|
||||
modalName = '';
|
||||
ui!: SFUISchema;
|
||||
columns!: STColumn[];
|
||||
detailData: any;
|
||||
uploadURl = apiConf.waterFileUpload;
|
||||
schema!: SFSchema;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema1!: SFSchema;
|
||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||
validData: any = ['suppliersType'];
|
||||
suppliersData: any = {};
|
||||
disabledUpload = false;
|
||||
detailData: any = this.getDetailList();
|
||||
tempalateData :any;
|
||||
|
||||
constructor(
|
||||
private http: _HttpClient,
|
||||
@ -38,6 +45,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
private route: ActivatedRoute,
|
||||
private modalHelper: ModalHelper,
|
||||
private msgSrv: NzMessageService,
|
||||
private nzModalService: NzModalService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@ -145,6 +153,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
this.service.request(`${this.service.$api_get_operate_get}`, params).subscribe((res) => {
|
||||
console.log(res)
|
||||
this.detailData = res;
|
||||
this.tempalateData = res;
|
||||
})
|
||||
}
|
||||
|
||||
@ -177,4 +186,65 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
handleOK() {
|
||||
|
||||
}
|
||||
ratify() {
|
||||
this.isEdit = true;
|
||||
}
|
||||
changeUpload({ file, fileList, type }: any, key: string) {
|
||||
console.log({ file, fileList, type });
|
||||
if (type === 'success') {
|
||||
this.detailData[key] = file.response.data.fullFileWatermarkPath;
|
||||
}
|
||||
}
|
||||
deleteImg(key: string) {
|
||||
this.nzModalService.warning({
|
||||
nzTitle: '是否确认删除该图片',
|
||||
nzOnOk: () => {
|
||||
this.disabledUpload = true;
|
||||
this.detailData[key] = '';
|
||||
setTimeout(() => {
|
||||
this.disabledUpload = false;
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
showImg(url: any) {
|
||||
const params = {
|
||||
imgList: [url],
|
||||
index: 0
|
||||
};
|
||||
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.detailData = { ...this.tempalateData };
|
||||
this.isEdit = false;
|
||||
}
|
||||
|
||||
save() {
|
||||
this.isEdit = false;
|
||||
}
|
||||
private initData() {
|
||||
return {
|
||||
carNo: '',
|
||||
carNoColor: '',
|
||||
carModel: '',
|
||||
carLength: '',
|
||||
archivesNo: '',
|
||||
driverLicenseSigningOrg: '',
|
||||
carDistinguishCode: '',
|
||||
carLoad: '',
|
||||
curbWeight: '',
|
||||
roadTransportNo: '',
|
||||
roadTransportLicenceNo: '',
|
||||
carOwner: '',
|
||||
isTrailer: null,
|
||||
useNature: null,
|
||||
driverLicenseRegisterTime: null,
|
||||
driverLicenseGetTime: null,
|
||||
driverLicenseEndTime: null,
|
||||
roadTransportStartTime: null,
|
||||
roadTransportEndTime: null,
|
||||
carFrontPhotoWatermark: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ const COMPONENTS = [
|
||||
VehicleComponentsListEditComponent,
|
||||
VehicleImgViewComponent,
|
||||
VehicleComponentsAuditComponent,
|
||||
VehicleComponentsAuditDetailComponent
|
||||
VehicleComponentsAuditDetailComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
Reference in New Issue
Block a user