This commit is contained in:
wangshiming
2021-12-13 13:16:52 +08:00
parent c4b249fe94
commit abafcd8326
10 changed files with 139 additions and 75 deletions

View File

@ -65,7 +65,13 @@
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input nz-input [(ngModel)]="data.detailedAddress" [ngModelOptions]="{ standalone: true }" />
<input
nz-input
[(ngModel)]="data.detailedAddress"
(click)="openMap('end', idx)"
formControlName="unloadAddress{{ idx }}"
placeholder="请输入卸货地"
/>
</nz-input-group>
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span>
<span

View File

@ -200,24 +200,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
goodsName: {
type: 'string',
title: '货物名称',
enum: [
{ label: '真实货物', value: '1' },
{ label: '远程货物', value: '2' },
{ label: '其他', value: '3' }
],
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'GoodsName' },
placeholder: '请选择'
// 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
}
},
qita: {
type: 'string',
@ -492,7 +479,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
receiptPay: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥',change: ()=> {
this.changeValue();},
} as SFNumberWidgetSchema },
oilCardPay2: {
subtotal: {
type: 'string',
title: '小计',
ui: {
@ -576,15 +563,29 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
})
}
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) {
@ -594,6 +595,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
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}`);
}
//指派熟车
@ -700,7 +704,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
asds(i: any) {
console.log(i)
}
// const data =
// 初始化信息
dataR (res: any) {
// this.dataList = res;
this.sf1data = {
@ -715,11 +719,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
res?.unLoadingPlaceList.forEach((element: any) => {
if(element.type === 1) {
const controlId = this.startInfo.length;
if(this.PageStatus === '整车修改' || 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
})
@ -728,6 +738,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
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,
})
}
@ -735,12 +750,21 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
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.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
})
@ -749,10 +773,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
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 = {
@ -762,8 +793,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
weight: res?.goodsInfoList[0]?.weight || '',
volume: res?.goodsInfoList[0]?.volume || '',
vehicleDemand: res?.goodsInfoList[0]?.vehicleDemand || '',
maxCube: res?.goodsInfoList[0]?.maxCube || '',
maxWeight: res?.goodsInfoList[0]?.maxWeight || '',
maxCube: res?.goodsInfoList[0]?.maxCube?.split(',') || '',
maxWeight: res?.goodsInfoList[0]?.maxWeight?.split(',') || '',
number: res?.goodsInfoList[0]?.number || '',
freightPrice: res?.goodsInfoList[0]?.freightPrice || '',
freightType: res?.goodsInfoList[0]?.freightType || '',
@ -795,7 +826,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
toPay: res?.shippingInformationVO?.toPay || '',
oilCardPay: res?.shippingInformationVO?.oilCardPay || '',
receiptPay: res?.shippingInformationVO?.receiptPay || '',
// oilCardPay2: res?.shippingInformationVO?.oilCardPay || '',
// subtotal: res?.shippingInformationVO?.oilCardPay || '',
appendFee: res?.shippingInformationVO?.appendFee || '',
paymentDays: res?.shippingInformationVO?.paymentDays || '',
}

View File

@ -101,12 +101,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
goodsName: {
type: 'string',
title: '货物名称',
enum: [
{ label: '普货', value: 1 },
{ label: '指派', value: 2 },
],
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'GoodsName' },
placeholder: '请选择',
} as SFSelectWidgetSchema,
},

View File

@ -1,3 +1,11 @@
<!--
* @Author: your name
* @Date: 2021-12-13 10:47:28
* @LastEditTime: 2021-12-13 11:24:23
* @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\usercenter\components\freight\user\user.component.html
-->
<!-- 页头 -->
<page-header-wrapper [title]="'员工列表'"></page-header-wrapper>
<nz-card>

View File

@ -78,7 +78,7 @@ export class FreightComponentsUserComponent implements OnInit {
});
}
userAction(status: number) {
userAction(status: number, item: any) {
this.modal.warning({
nzTitle: status === 1 ? '确定启用该用户吗?' : '确定冻结该用户吗?',
nzContent:
@ -86,7 +86,15 @@ export class FreightComponentsUserComponent implements OnInit {
? '停用后,该用户将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'
: '启用后,该用户将恢复正常使用功能,请再次确认',
nzOnOk: () => {
// this.service.request(this.service.$api_lock_user)
console.log(item)
const params = {
appUserId: [item.appUserId],
telephone: item.telephone,
freezeOrResume: status === 0 ? true : false
}
this.service.request(this.service.$api_audit_freezeOrResume, params).subscribe((res: any) => {
this.st.reload();
})
this.st.reload();
}
});
@ -219,12 +227,12 @@ export class FreightComponentsUserComponent implements OnInit {
{
text: '冻结',
iif: item => item.stateLocked === 0,
click: (item: any) => this.userAction(0)
click: (item: any) => this.userAction(0, item)
},
{
text: '启用',
iif: item => item.stateLocked === 1,
click: (item: any) => this.userAction(1)
click: (item: any) => this.userAction(1, item)
}
]
}

View File

@ -1,8 +1,8 @@
/*
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-11-29 15:43:42
* @LastEditors: your name
* @LastEditTime: 2021-12-13 11:25:12
* @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\usercenter\services\usercenter.service.ts
*/
@ -65,6 +65,8 @@ export class UsermanageService extends BaseService {
$api_get_enterprise_user_by_id = '/api/mdc/cuc/enterpriseAdmin/operate/get';
// 审核企业管理员
$api_audit_enterprise_admin = '/api/mdc/cuc/enterpriseAdmin/operate/audit';
// 审核企业管理员
$api_audit_freezeOrResume = '/api/mdc/cuc/userApp/freezeOrResume';
constructor(public injector: Injector) {
super(injector);

View File

@ -72,26 +72,18 @@ export class VehicleComponentsAuditComponent implements OnInit {
carNoColor: {
type: 'string',
title: '车牌颜色',
enum: [
{ label: '全部', value: '' },
{ label: '正常', value: 0 },
{ label: '冻结', value: 1 },
{ label: '废弃', value: 2 },
],
ui: {
widget: 'select',
},
widget: 'dict-select',
params: { dictKey: 'CarColor' },
}
},
isSelf: {
type: 'string',
title: '是否挂靠',
enum: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
ui: {
widget: 'select',
},
widget: 'dict-select',
params: { dictKey: 'Whether' },
}
},
saveUser: {
type: 'string',

View File

@ -94,15 +94,9 @@ export class VehicleComponentsListComponent implements OnInit {
carNoColor: {
type: 'string',
title: '车牌颜色',
enum: [
{ label: '全部', value: '' },
{ label: '正常', value: 0 },
{ label: '冻结', value: 1 },
{ label: '废弃', value: 2 },
],
default: '',
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'CarColor' },
visibleIf: {
expand: (value: boolean) => value,
},

View File

@ -1,6 +1,19 @@
<!--
* @Author: your name
* @Date: 2021-12-07 14:19:25
* @LastEditTime: 2021-12-13 11:02:14
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\shared\components\amap\amap-poi-picker\amap-poi-picker.component.html
-->
<div nz-row class="mb-xl">
<div nz-col nzSpan="8">
<input id="pickerInput" [(ngModel)]="addressInput" placeholder="请输入地址" />
</div>
</div>
<div class="map-container" id="container" tabindex="0" style="width: 800px; height: 500px"></div>
</div>
<div class="map-container" id="container" tabindex="0" style="width: 800px; height: 500px"></div>
<div *nzModalFooter>
<button nz-button nzType="default" (click)="cancel()">取消</button>
<button nz-button nzType="primary" (click)="sure()">确定</button>
</div>

View File

@ -1,7 +1,8 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { throwError } from 'rxjs';
import AMapLoader from '@amap/amap-jsapi-loader';
import { Component, OnInit, ViewChild } from '@angular/core';
import { amapConf } from '@conf/amap.config';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { throwError } from 'rxjs';
declare var AMap: any;
declare var AMapUI: any;
declare var Loca: any;
@ -14,15 +15,15 @@ const CONFIG = amapConf;
styleUrls: ['./amap-poi-picker.component.less']
})
export class AmapPoiPickerComponent implements OnInit {
@ViewChild('modal')
modal: any;
// @ViewChild('modal')
// modal: any;
addressInput: any;
aMap: any;
poi: any;
constructor() {}
constructor(private modalRef: NzModalRef) {}
ngOnInit(): void {
this.mapInit();
// this.PoiPicker();
@ -79,6 +80,7 @@ export class AmapPoiPickerComponent implements OnInit {
});
}
//POI选点
poiPickerReady(poiPicker: any) {
(window as any).poiPicker = poiPicker;
const map = this.aMap;
@ -99,7 +101,6 @@ export class AmapPoiPickerComponent implements OnInit {
poiPicker.on('poiPicked', (poiResult: any) => {
const source = poiResult.source,
poi = poiResult.item;
console.log(poi);
this.poi = poi;
marker.setMap(map);
infoWindow.setMap(map);
@ -107,18 +108,29 @@ export class AmapPoiPickerComponent implements OnInit {
marker.setPosition(poi.location);
infoWindow.setPosition(poi.location);
infoWindow.setContent('地址: <pre>' + poi.name + '</pre>');
infoWindow.setContent(`地址: <pre>${poi.name}</pre>`);
infoWindow.open(map, marker.getPosition());
map.setCenter(marker.getPosition());
//获取行政区信息
map.getCity(function (info: any) {
poi.cityInfo = info;
});
});
poiPicker.onCityReady(function () {
poiPicker.suggest('美食');
});
// poiPicker.onCityReady(function () {
// poiPicker.suggest('美食');
// });
}
closeInfoWindow() {
this.aMap.clearInfoWindow();
}
sure() {
this.modalRef.destroy();
}
cancel() {
this.modalRef.destroy();
}
}