-
+
-
+
-
+
{{ i.value | currency }}
@@ -276,14 +240,14 @@
{{ i.value | currency }}
-
-
-
-
- 天内支付运费
-
+
+
+
+
+ 天内支付运费
+
@@ -293,12 +257,12 @@
-
-
-
+
+
+
diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less
index 35b08935..a445eacf 100644
--- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less
+++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less
@@ -3,10 +3,35 @@
nz-input-number {
width: 100%;
}
+
nz-date-picker {
width: 94.3%;
}
+
+ .sf3 {
+ .goods_Tips_item {
+ .goods_tips {
+ width: calc(50% - 45px);
+
+ .ant-alert {
+ padding: 0 0 0 2px;
+ }
+
+ }
+
+ nz-form-item {
+ margin-bottom: 8px;
+ }
+
+ // .ant-form-item-control-input-content {
+ // display: flex;
+ // justify-content: end;
+ // }
+ }
+ }
+
}
+
i {
cursor: pointer;
}
@@ -34,7 +59,10 @@
padding: 24px;
color: #7d7d7d;
font-size: 30px;
- :hover{color: #52acff;}
+
+ :hover {
+ color: #52acff;
+ }
}
#container {
@@ -45,11 +73,13 @@
input[type='number'] {
-moz-appearance: textfield;
}
+
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
}
+
.hides {
margin-left: 10px;
color: aqua;
diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts
index 107e87f5..9795724f 100644
--- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts
+++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts
@@ -262,6 +262,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
+ goodsTips: {
+ type: 'string',
+ title: '',
+ ui: {
+ widget: 'custom',
+ class: 'goods_Tips_item',
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value === '其它'
+ // }
+ }
+ },
goodsTypeId: {
type: 'string',
title: '货物名称',
@@ -323,6 +334,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
+ },
+ blur: (value: any) => {
+ this.checkGoodsName();
}
}
}
@@ -333,6 +347,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
'*': {
spanLabelFixed: 90,
grid: { span: 12 }
+ },
+ $goodsTips: {
+ grid: { span: 24 }
}
};
}
@@ -465,10 +482,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
)
},
change: (tag: any, org: any) => {
- if(tag === '3'){
+ if (tag === '3') {
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
- }else {
+ } else {
this.getInsurersPrice(tag);
}
}
@@ -481,7 +498,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
- } ,
+ },
},
type2: {
type: 'string',
@@ -494,7 +511,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
insurancePremium: {
type: 'string',
title: '服务包费用',
- readOnly:true,
+ readOnly: true,
ui: {
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
@@ -523,7 +540,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
},
},
- required: [ 'insurancePremium']
+ required: ['insurancePremium']
};
this.ui5 = {
'*': {
@@ -733,7 +750,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.service
.request(
this.service.$api_getAdditionalRate +
- `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'`
+ `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'`
)
.subscribe(res => {
if (res) {
@@ -986,9 +1003,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
];
// 运费信息
const expenseList = [
- { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' ,resourceId: this.sf7data?.PREresourceId || '' },
- { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' ,resourceId: this.sf7data?.RECEresourceId || ''},
- { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' ,resourceId: this.sf7data?.BACKresourceId || ''}
+ { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '', resourceId: this.sf7data?.PREresourceId || '' },
+ { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '', resourceId: this.sf7data?.RECEresourceId || '' },
+ { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '', resourceId: this.sf7data?.BACKresourceId || '' }
];
// 从“再下一单”过来,将所有的子参数内的id都删除
if (this.PageStatus === '整车下一单') {
@@ -1017,8 +1034,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
- subtotal :this.sf7.value.subtotal,
- total:this.sf7.value.total,
+ subtotal: this.sf7.value.subtotal,
+ total: this.sf7.value.total,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
goodsValue: this.sf4.value.goodsValue
};
@@ -1081,7 +1098,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
nzWidth: 900,
nzOnOk: item => {
console.log(item);
- if(item?.poi) {
+ if (item?.poi) {
const poi = item.poi;
const locList = poi.pois;
switch (type) {
@@ -1106,7 +1123,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
default:
break;
}
-
+
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
this.totalDistance = res.distance;
@@ -1114,10 +1131,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.getInsurersPrice(); // 计算保费金额
});
}
- return true
+ return true
} else {
this.service.msgSrv.warning('请重新手动选择地址!')
- return false
+ return false
}
}
});
@@ -1155,7 +1172,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.totalDistance = res?.estimatedKilometers;
this.totalTime = res?.estimatedTravelTime;
this.sf1data = {
- resourceCode:res?.resourceCode || '',
+ resourceCode: res?.resourceCode || '',
enterpriseInfoName: res?.enterpriseInfoName,
enterpriseInfoId: res?.enterpriseInfoId,
dispatchPhone: res?.dispatchPhone,
@@ -1423,7 +1440,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
console.log(this.totalDistance);
- if (insuranceType !== '3' && this.totalDistance > 0) {
+ if (insuranceType !== '3' && this.totalDistance > 0) {
const params = {
insuranceType,
goodsValue: this.sf4.value.goodsValue,
@@ -1440,14 +1457,31 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
});
}
}
- // 运费信息价格变更
- priceChange(event:any, i:any){
- i.setValue(event);
- if(event>=99999){
- this.modalService.warning({
- nzTitle: '可输入的最大金额为99999元',
+ // 运费信息价格变更
+ priceChange(event: any, i: any) {
+ i.setValue(event);
+ if (event >= 99999) {
+ this.modalService.warning({
+ nzTitle: '可输入的最大金额为99999元',
+ });
+ }
+ this.payChange()
+ }
+
+ checkGoodsName() {
+ const name = this.sf3.getValue('/goodsName1');
+ if (!name || name.trim().length === 0) {
+ return;
+ }
+ this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
+ if (res === false) {
+ const modalRef = this.modalService.error({
+ nzTitle: '货物名称含有违禁词,请重新输入!',
+ });
+ modalRef.afterClose.subscribe(result => {
+ // this.sf3.setValue('/goodsName1', null);
});
}
- this.payChange()
- }
+ });
+ }
}
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html
index b3be726e..efdb686f 100644
--- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html
+++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html
@@ -7,15 +7,13 @@
货源单设置
-
- {{ i.value }}
-
+
+ {{ i.value }}
+
- 装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
+ 装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
-
+
-
+
-
+
{{ i.value | currency }}
@@ -277,14 +241,14 @@
{{ i.value | currency }}
-
-
-
-
- 天内支付运费
-
+
+
+
+
+ 天内支付运费
+
@@ -293,7 +257,9 @@
-
-
+
+
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.less b/src/app/routes/supply-management/components/release-publish/release-publish.component.less
index f6d4bb4f..b34cbcc9 100644
--- a/src/app/routes/supply-management/components/release-publish/release-publish.component.less
+++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.less
@@ -3,10 +3,34 @@
nz-input-number {
width: 100%;
}
+
nz-date-picker {
width: 94.3%;
}
+
+ .sf3 {
+ .goods_Tips_item {
+ .goods_tips {
+ width: calc(50% - 45px);
+
+ .ant-alert {
+ padding: 0 0 0 2px;
+ }
+
+ }
+
+ nz-form-item {
+ margin-bottom: 8px;
+ }
+
+ // .ant-form-item-control-input-content {
+ // display: flex;
+ // justify-content: end;
+ // }
+ }
+ }
}
+
i {
cursor: pointer;
}
@@ -34,7 +58,10 @@
padding: 24px;
color: #7d7d7d;
font-size: 30px;
- :hover{color: #52acff;}
+
+ :hover {
+ color: #52acff;
+ }
}
#container {
@@ -45,6 +72,7 @@
input[type='number'] {
-moz-appearance: textfield;
}
+
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts
index 4b8b2798..6683e303 100644
--- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts
+++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts
@@ -237,6 +237,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
+ goodsTips: {
+ type: 'string',
+ title: '',
+ ui: {
+ widget: 'custom',
+ class: 'goods_Tips_item',
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value === '其它'
+ // }
+ }
+ },
goodsTypeId: {
type: 'string',
title: '货物名称',
@@ -298,6 +309,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
+ },
+ blur: (value: any) => {
+ this.checkGoodsName();
}
}
}
@@ -308,6 +322,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
'*': {
spanLabelFixed: 115,
grid: { span: 12 }
+ },
+ $goodsTips: {
+ grid: { span: 24 }
}
};
}
@@ -436,13 +453,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
- )
+ );
},
change: (tag: any, org: any) => {
- if(tag === '3'){
+ if (tag === '3') {
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
- }else {
+ } else {
this.getInsurersPrice(tag);
}
}
@@ -455,7 +472,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
- } ,
+ }
},
type2: {
type: 'string',
@@ -468,7 +485,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
insurancePremium: {
type: 'string',
title: '服务包费用',
- readOnly:true,
+ readOnly: true,
ui: {
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
@@ -495,9 +512,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
- },
+ }
},
- required: [ 'insurancePremium']
+ required: ['insurancePremium']
};
this.ui5 = {
'*': {
@@ -562,8 +579,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
receiptUserPhone: {
type: 'string',
title: '联系电话',
+ format: 'mobile',
maxLength: 11,
ui: {
+ errors: {
+ format: '请输入正确联系电话格式'
+ },
visibleIf: {
receiptType: value => value === '2'
}
@@ -741,9 +762,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.service
.request(
this.service.$api_getAdditionalRate +
- `?shipperId=${this?.sf1.value?.shipperAppUserId || ''}&enterpriseInfoId=${
- this?.sf1.value?.enterpriseInfoName || ''
- }&resourcetype='1'`
+ `?shipperId=${this?.sf1.value?.shipperAppUserId || ''}&enterpriseInfoId=${this?.sf1.value?.enterpriseInfoName || ''
+ }&resourcetype='1'`
)
.subscribe(res => {
if (res) {
@@ -955,8 +975,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf6.value,
expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays,
- subtotal :this.sf7.value.subtotal,
- total:this.sf7.value.total,
+ subtotal: this.sf7.value.subtotal,
+ total: this.sf7.value.total,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
@@ -999,42 +1019,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
nzContent: AmapPoiPickerComponent,
nzWidth: 900,
nzOnOk: item => {
- if(item?.poi) {
- const poi = item.poi;
- const locList = poi.pois;
- switch (type) {
- case 'start':
- this.startInfo[index].detailedAddress = poi.formattedAddress;
- this.startInfo[index].longitude = locList[0];
- this.startInfo[index].latitude = locList[1];
- this.startInfo[index].province = poi.addressComponent.province;
- this.startInfo[index].city = poi.addressComponent.city;
- this.startInfo[index].area = poi.addressComponent.district;
- break;
- case 'end':
- this.endInfo[index].detailedAddress = poi.formattedAddress;
- this.endInfo[index].longitude = locList[0];
- this.endInfo[index].latitude = locList[1];
- this.endInfo[index].province = poi.addressComponent.province;
- this.endInfo[index].city = poi.addressComponent.city;
- this.endInfo[index].area = poi.addressComponent.district;
- break;
- default:
- break;
+ if (item?.poi) {
+ const poi = item.poi;
+ const locList = poi.pois;
+ switch (type) {
+ case 'start':
+ this.startInfo[index].detailedAddress = poi.formattedAddress;
+ this.startInfo[index].longitude = locList[0];
+ this.startInfo[index].latitude = locList[1];
+ this.startInfo[index].province = poi.addressComponent.province;
+ this.startInfo[index].city = poi.addressComponent.city;
+ this.startInfo[index].area = poi.addressComponent.district;
+ break;
+ case 'end':
+ this.endInfo[index].detailedAddress = poi.formattedAddress;
+ this.endInfo[index].longitude = locList[0];
+ this.endInfo[index].latitude = locList[1];
+ this.endInfo[index].province = poi.addressComponent.province;
+ this.endInfo[index].city = poi.addressComponent.city;
+ this.endInfo[index].area = poi.addressComponent.district;
+ break;
+ default:
+ break;
+ }
+ // 计算里程,时间
+ if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
+ this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
+ this.totalDistance = res.distance;
+ this.totalTime = res.time;
+ this.getInsurersPrice(); // 计算保费金额
+ });
+ }
+ return true;
+ } else {
+ this.service.msgSrv.warning('请重新手动选择地址!');
+ return false;
}
- // 计算里程,时间
- if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
- this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
- this.totalDistance = res.distance;
- this.totalTime = res.time;
- this.getInsurersPrice(); // 计算保费金额
- });
- }
- return true
- } else {
- this.service.msgSrv.warning('请重新手动选择地址!')
- return false
- }
}
});
}
@@ -1193,7 +1213,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
console.log(insuranceType);
console.log(this.totalDistance);
- if (insuranceType !== '3' && this.totalDistance > 0) {
+ if (insuranceType !== '3' && this.totalDistance > 0) {
const params = {
insuranceType,
goodsValue: this.sf4.value.goodsValue,
@@ -1210,14 +1230,31 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
});
}
}
- // 运费信息价格变更
- priceChange(event:any, i:any){
- i.setValue(event);
- if(event>=99999){
- this.modalService.warning({
- nzTitle: '可输入的最大金额为99999元',
- });
- }
- this.payChange()
+ // 运费信息价格变更
+ priceChange(event: any, i: any) {
+ i.setValue(event);
+ if (event >= 99999) {
+ this.modalService.warning({
+ nzTitle: '可输入的最大金额为99999元'
+ });
+ }
+ this.payChange();
+ }
+
+ checkGoodsName() {
+ const name = this.sf3.getValue('/goodsName1');
+ if (!name || name.trim().length === 0) {
+ return;
+ }
+ this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
+ if (res === false) {
+ const modalRef = this.modalService.error({
+ nzTitle: '货物名称含有违禁词,请重新输入!',
+ });
+ modalRef.afterClose.subscribe(result => {
+ // this.sf3.setValue('/goodsName1', null);
+ });
}
+ });
+ }
}
diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html
index 30da689b..4909c270 100644
--- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html
+++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html
@@ -94,7 +94,7 @@
货物信息
- {{ item.goodsName }}
+ {{ item.goodsTypeName }} - {{ item.goodsName }}
{{ item.weight }}吨,{{ item.volume }}方,{{ item.number }}件
@@ -190,7 +190,7 @@
(运费{{ i?.totalFreight | currency }}含附加运费 {{ i?.totalSurcharge | currency }})
-
车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}
+
车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}