提交代码

dev
袁野 1 year ago
parent 605ce413e9
commit 4ffdeb0072
  1. 36
      src/app/admin/merchant-store/store-edit/store-edit.component.html
  2. 31
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  3. 37
      src/app/admin/merchant-store/store-list/store-list.component.html
  4. 55
      src/app/admin/merchant-store/store-list/store-list.component.ts
  5. 7
      src/app/admin/system/oils-discount/oils-discount.component.html
  6. 1
      src/app/admin/system/oils-discount/oils-discount.component.ts
  7. 19
      src/app/services/index.service.ts
  8. 8
      src/environments/environment.ts

@ -57,6 +57,19 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'type'" >来源类型</nz-form-label>
<nz-form-control >
<nz-select formControlName="sourceType" nzAllowClear nzPlaceHolder="请选择来源类型">
<nz-option nzValue="7" nzLabel="自建油卡"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'type'" nzRequired>行业类型</nz-form-label>
@ -111,6 +124,29 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label>油卡位置图片</nz-form-label>
<nz-form-control>
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[nzMultiple]="true"
[(nzFileList)]="imgFile"
[nzShowButton]="imgFile.length < 5"
[nzPreview]="handlePreview"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传图片</div>
</nz-upload>
<nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
<ng-template #modalContent>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
</ng-template>
</nz-modal>
</nz-form-control>
</nz-form-item>
</div>
<!-- <nz-divider nzText="设备信息"></nz-divider>
<div nz-col [nzSpan]="8">
<nz-form-item>

@ -33,6 +33,7 @@ export class StoreEditComponent implements OnInit {
id: number;
passwordVisible = false;
logoFile = [];
imgFile = [];
WEB_SERVE_URL = environment.baseUrl;
previewVisible = false;
previewImage: string | undefined = '';
@ -68,6 +69,7 @@ export class StoreEditComponent implements OnInit {
longitude: [106.565428, [Validators.required]],
deviceSn: [null],
deviceKey: [null],
sourceType: [null],
deviceName: [null],
regionId: [null],
brandId: [null],
@ -122,6 +124,20 @@ export class StoreEditComponent implements OnInit {
this.validateForm.value.storeLogo = this.logoFile[0].name;
}
}
const imgFile = [];
if (this.imgFile.length !== 0) {
for (const i of this.imgFile) {
if (i['response'] != null) {
imgFile.push(i['response']['return_data'][0]);
} else {
imgFile.push(i.name);
}
}
}
this.validateForm.value.ext3 = imgFile.join(',');
if (this.editFlag) {
this.validateForm.value.id = this.id;
this.merchantStore.updateMerchantStore(this.validateForm.value, data => {
@ -164,6 +180,21 @@ export class StoreEditComponent implements OnInit {
});
this.logoFile = logoArray;
}
if (data['return_data']['ext3'] != null && data['return_data']['ext3'] !== '') {
const imgFile = data['return_data']['ext3'].split(',');
const imgFileArray = [];
for (const i of imgFile) {
imgFileArray.push(
{
uid: i,
name: i,
status: 'done',
url: environment.imageUrl + i
});
}
this.imgFile = imgFileArray;
}
this.validateForm.patchValue(data['return_data']);
this.getMap();
} else {

@ -94,6 +94,8 @@
<li class="li-a" nz-menu-item><a (click)="getDetail(data.id)">详情</a></li>
<li class="li-a" *ngIf="data.type == 1" nz-menu-item><a (click)="getQrCode(data.storeKey)">下载油站二维码</a></li>
<li class="li-a" *ngIf="'BTN_add_blance' | button" nz-menu-item><a (click)="getRecharge(data.id)">增加余额</a></li>
<li class="li-a" nz-menu-item><a (click)="getOilCard(data.id)">增加油卡</a></li>
<li class="li-a" nz-menu-item><a (click)="getOilCardList(data.id)">查看油卡</a></li>
<li class="li-a" nz-menu-item><a (click)="getDelete(data.id)">删除</a></li>
<li class="li-a" nz-menu-item><a [routerLink]="['/admin/device/list']" [queryParams]="{ merStoreId: data.id}">设备管理</a></li>
</ul>
@ -142,3 +144,38 @@
</div>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleAddOilCard" nzTitle="新增油卡" (nzOnCancel)="isVisibleAddOilCard = false" (nzOnOk)="handleOilCardOk()">
<div nz-row>
<div nz-col nzSpan="18">
<nz-form-item>
<nz-form-label [nzSpan]="6">油卡号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入油卡号..." [(ngModel)]="oilCardNo" />
</nz-form-control>
</nz-form-item>
</div>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleAddOilCardList" nzTitle="导入失败数据" (nzOnCancel)="isVisibleAddOilCardList = false" nzWidth="900px" [nzFooter]="null">
<nz-table #oilCardList [nzData]="oilCardListArray">
<thead>
<tr>
<th nzWidth="80px">序号</th>
<th nzWidth="150px">油卡号</th>
<th nzWidth="150px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of oilCardList.data;let i = index">
<td>{{ i + 1}}</td>
<td>{{data.oilCardNo}}</td>
<td><a (click)="deleteOilCard(data.id)">删除</a></td>
</tr>
</tbody>
</nz-table>
</nz-modal>

@ -27,10 +27,13 @@ export class StoreListComponent implements OnInit {
price: string;
WEB_SERVE_URL = environment.baseUrl;
importErrorStudentArray = [];
oilCardListArray = [];
errorStudentVisible = false;
isVisibleAdd = false;
isSpinning = false;
isVisibleAddOilCard = false;
isVisibleAddOilCardList = false;
oilCardNo;
constructor(
private form: FormBuilder,
private merchantStore: MerchantStoreService,
@ -214,4 +217,54 @@ export class StoreListComponent implements OnInit {
}
});
}
public getOilCard(id): void {
this.storeId = id;
this.isVisibleAddOilCard = true;
}
public handleOilCardOk(): void {
if (this.oilCardNo == null) {
this.message.error('请输入充值金额');
return;
}
const paramsObject = {
storeId: this.storeId,
oilCardNo: this.oilCardNo
};
this.index.insertStoreOilCard(paramsObject, data => {
if (data['return_code'] === '000000') {
this.message.success("添加成功")
this.isVisibleAddOilCard = false;
} else {
this.message.error(data['return_msg']);
}
});
}
public getOilCardList(id:number) {
this.storeId = id;
this.isVisibleAddOilCardList = true;
this.index.getStoreOilCardList(id , data => {
this.oilCardListArray = data['return_data'];
});
}
deleteOilCard(id) {
const message = '是否删除油卡';
this.common.showConfirm(message, data => {
if (data) {
this.index.deleteStoreOilCard(id, dataReturn => {
if (dataReturn['return_code'] === '000000') {
this.message.success('操作成功');
this.getOilCardList(this.storeId);
} else {
this.message.warning(dataReturn['return_msg']);
}
});
}
});
}
}

@ -119,6 +119,7 @@
<nz-form-control [nzSpan]="14">
<nz-select formControlName="payPlatformType">
<nz-option nzValue="1" nzLabel="微信"></nz-option>
<nz-option nzValue="2" nzLabel="惠支付"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -136,6 +137,12 @@
<input nz-input placeholder="请输入第三方平台商户号" formControlName="payPlatformMerNo" />
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="tripartitePlatformForm.value.payPlatformType == '2'">
<nz-form-label [nzSpan]="6" nzRequired >商户KEY</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="请输入第三方平台商户KEY" formControlName="payPlatformKey" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >是否分账</nz-form-label>

@ -76,6 +76,7 @@ export class OilsDiscountComponent implements OnInit {
payPlatformMerName: [null, [Validators.required]],
payPlatformMerNo: [null, [Validators.required]],
profitSharingStatus: ['false', [Validators.required]],
payPlatformKey: [null],
profitSharingRatio: [null],
profitSharingReceiversNo: [null],
profitSharingReceiversName: [null],

@ -66,6 +66,25 @@ export class IndexService {
});
}
public insertStoreOilCard(params: object, callBack) {
this.http.post(environment.baseUrl + 'highMerchantStore/insertStoreOilCard', params).subscribe(data => {
callBack(data);
});
}
public getStoreOilCardList(storeId: number, callBack) {
this.http.get(environment.baseUrl + 'highMerchantStore/getStoreOilCardList?storeId=' + storeId).subscribe(data => {
callBack(data);
});
}
public deleteStoreOilCard(id: number, callBack) {
this.http.get(environment.baseUrl + 'highMerchantStore/deleteStoreOilCard?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName addHLTBalance

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

Loading…
Cancel
Save