提交代码

pull/1/head
胡锐 2 years ago
parent 23aca9dbfe
commit 92c89442f0
  1. 7
      src/app/admin/gas-staff/gas-staff-list/gas-staff-list.component.html
  2. 28
      src/app/admin/gas-staff/gas-staff-list/gas-staff-list.component.ts
  3. 14
      src/app/admin/order/oil-station-order/oil-station-order.component.html
  4. 32
      src/app/admin/order/oil-station-order/oil-station-order.component.ts
  5. 12
      src/app/services/gas-staff.service.ts
  6. 8
      src/environments/environment.ts

@ -101,6 +101,7 @@
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a> <a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li nz-menu-item (click)="showGasStaffQrCodeModal(data.id)"><a>二维码</a></li>
<li nz-menu-item [routerLink]="['/admin/gas-staff/edit']" [queryParams]="{ id: data.id}"><a>修改</a></li> <li nz-menu-item [routerLink]="['/admin/gas-staff/edit']" [queryParams]="{ id: data.id}"><a>修改</a></li>
<li nz-menu-item (click)="showDisabledConfirm(data.id)" *ngIf="data.status == 1" ><a>禁用</a></li> <li nz-menu-item (click)="showDisabledConfirm(data.id)" *ngIf="data.status == 1" ><a>禁用</a></li>
<li nz-menu-item (click)="showRecoverConfirm(data.id)" *ngIf="data.status == 2" ><a>恢复</a></li> <li nz-menu-item (click)="showRecoverConfirm(data.id)" *ngIf="data.status == 2" ><a>恢复</a></li>
@ -114,3 +115,9 @@
</div> </div>
</nz-spin> </nz-spin>
<nz-modal [(nzVisible)]="gasStaffQrCodeModal" nzTitle="二维码" (nzOnCancel)="closeGasStaffQrCodeModal()" nzWidth="400px" [nzFooter]="null">
<img src="{{FILE_URL + 'gasStaff/' + gasStaffQrCodeImgUrl}}" style="width: 350px; height: 350px;">
<div style="width: 100%;margin-top: 15px;text-align: center;">
<span>鼠标右键点击“二维码”,另存为下载到本地</span>
</div>
</nz-modal>

@ -32,6 +32,9 @@ export class GasStaffListComponent implements OnInit {
positionTypeArray = []; positionTypeArray = [];
gasStaffQrCodeImgUrl: string;
gasStaffQrCodeModal = false;
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
private store: LocalStorageService, private store: LocalStorageService,
@ -181,4 +184,29 @@ export class GasStaffListComponent implements OnInit {
}); });
} }
/**
*
* @param id
*/
showGasStaffQrCodeModal(id: number) {
this.gasStaffService.queryQrCode({ gasStaffId: id }, data => {
if (data['return_code'] === '000000') {
this.gasStaffQrCodeImgUrl = data['return_data'];
this.gasStaffQrCodeModal = true;
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
/**
*
*/
closeGasStaffQrCodeModal() {
this.gasStaffQrCodeModal = false;
}
} }

@ -10,12 +10,22 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">油站</nz-form-label> <nz-form-label [nzSpan]="6">油站</nz-form-label>
<nz-form-control [nzSpan]="16"> <nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择油站" formControlName="storeId"> <nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择油站" formControlName="storeId" (ngModelChange)="selectGasChange($event)">
<nz-option *ngFor="let item of gasArray" nzLabel="{{item.storeName}}" nzValue="{{item.id}}"></nz-option> <nz-option *ngFor="let item of gasArray" nzLabel="{{item.storeName}}" nzValue="{{item.id}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="8" *ngIf="userSession['secUser']['objectType'] == 1 || userSession['secUser']['objectType'] == 2 || userSession['secUser']['objectType'] == 3 || (userSession['secUser']['objectType'] == 8 && userSession['gasStaff'] != null && userSession['gasStaff']['positionType'] != 2)">
<nz-form-item>
<nz-form-label [nzSpan]="6">加油员</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择加油员" formControlName="staffId">
<nz-option *ngFor="let item of gasStaffArray" nzLabel="{{item.name}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">订单号</nz-form-label> <nz-form-label [nzSpan]="6">订单号</nz-form-label>
@ -89,6 +99,7 @@
<th nzWidth="60px">编号</th> <th nzWidth="60px">编号</th>
<th nzWidth="200px">订单号</th> <th nzWidth="200px">订单号</th>
<th nzWidth="180px">油站名称</th> <th nzWidth="180px">油站名称</th>
<th nzWidth="100px">加油员</th>
<th nzWidth="90px">类型</th> <th nzWidth="90px">类型</th>
<th nzWidth="90px">油号</th> <th nzWidth="90px">油号</th>
<th nzWidth="90px">油枪号</th> <th nzWidth="90px">油枪号</th>
@ -108,6 +119,7 @@
<td>{{i + 1}}</td> <td>{{i + 1}}</td>
<td>{{data.orderNo}}</td> <td>{{data.orderNo}}</td>
<td>{{data.gasName}}</td> <td>{{data.gasName}}</td>
<td>{{data.gasStaffName?data.gasStaffName:'未知'}}</td>
<td>{{data.gasOilType == 1 ? '汽油': '柴油'}}</td> <td>{{data.gasOilType == 1 ? '汽油': '柴油'}}</td>
<td>{{data.gasOilNo + "#"}}</td> <td>{{data.gasOilNo + "#"}}</td>
<td>{{data.gasGunNo + "号"}}</td> <td>{{data.gasGunNo + "号"}}</td>

@ -12,6 +12,7 @@ import {CommonsService} from '../../../services/commons.service';
import {WebsocketService} from '../../../services/websocket.service'; import {WebsocketService} from '../../../services/websocket.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {MerchantStoreService} from '../../../services/merchant-store.service'; import {MerchantStoreService} from '../../../services/merchant-store.service';
import {GasStaffService} from "../../../services/gas-staff.service";
@Component({ @Component({
selector: 'app-oil-station-order', selector: 'app-oil-station-order',
@ -46,6 +47,9 @@ export class OilStationOrderComponent implements OnInit {
}; };
printModal = false; printModal = false;
userSession = {};
gasStaffArray = [];
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private order: OrderService, private order: OrderService,
@ -57,6 +61,7 @@ export class OilStationOrderComponent implements OnInit {
private company: CompanyService, private company: CompanyService,
private merchant: MerchantService, private merchant: MerchantService,
private merchantStoreService: MerchantStoreService, private merchantStoreService: MerchantStoreService,
private gasStaffService: GasStaffService,
private orderService: OrderService, private orderService: OrderService,
private store: LocalStorageService, // 数据请求 private store: LocalStorageService, // 数据请求
private common: CommonsService private common: CommonsService
@ -64,6 +69,7 @@ export class OilStationOrderComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.userSession = this.store.get(ADMIN_INFO_OBJECT);
this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser']; this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser'];
if (this.secUser['objectType'] === 2) { if (this.secUser['objectType'] === 2) {
this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => { this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => {
@ -71,6 +77,10 @@ export class OilStationOrderComponent implements OnInit {
this.gasArray = data['return_data']['list']; this.gasArray = data['return_data']['list'];
} }
}); });
} else if (this.secUser['objectType'] === 3) {
this.getStaffList(null);
} else if (this.secUser['objectType'] === 8) {
this.getStaffList(null);
} }
this.init(); this.init();
// 接收消息 // 接收消息
@ -86,6 +96,7 @@ export class OilStationOrderComponent implements OnInit {
public init(): void { public init(): void {
this.searchForm = this.form.group({ this.searchForm = this.form.group({
storeId: [null], storeId: [null],
staffId: [null],
orderNo: [null], orderNo: [null],
status: [null], status: [null],
createTime: [null], createTime: [null],
@ -116,6 +127,27 @@ export class OilStationOrderComponent implements OnInit {
}); });
} }
// 查询列表
public getStaffList(gasId: number) {
const param = { pageNum: 1 , pageSize: 9999};
if (gasId != null) {
param['merchantStoreId'] = gasId;
}
this.gasStaffService.getStaffList(param, data => {
if (data['return_code'] === '000000') {
this.gasStaffArray = data['return_data']['list'];
}
});
}
selectGasChange(gasId: number) {
if (gasId != null) {
this.getStaffList(gasId);
} else {
this.gasStaffArray = [];
}
}
// 重置 // 重置
public resetForm(): void { public resetForm(): void {
this.searchForm.reset(); this.searchForm.reset();

@ -96,4 +96,16 @@ export class GasStaffService {
callBack(data); callBack(data);
}); });
} }
/**
*
*
* @param param
* @param callBack
*/
public queryQrCode(param: object, callBack) {
this.http.post(environment.baseUrl + 'gasStaff/queryQrCode', param).subscribe(data => {
callBack(data);
});
}
} }

@ -4,10 +4,10 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) /* baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/', imageUrl: 'http://localhost:9302/filesystem/',*/
// baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsg.dctpay.com/filesystem/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
}; };

Loading…
Cancel
Save