提交代码

master
胡锐 2 years ago
parent a579a1be63
commit 1fb88abfa2
  1. 1
      src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.html
  2. 15
      src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.ts
  3. 22
      src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.html
  4. 23
      src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.ts
  5. 11
      src/app/services/pay-qr-code.service.ts
  6. 4
      src/environments/environment.ts

@ -127,6 +127,7 @@
<button nz-button nzType="primary" class="right-btn" *ngIf="BTN_QRCODE_COMPANY" (click)="showAllocationCompanyModal()"><i nz-icon nzType="plus" nzTheme="outline"></i>分配公司</button>
<button nz-button nzType="primary" class="right-btn" *ngIf="BTN_QRCODE_AGENT" (click)="showAllocationAgentModal()"><i nz-icon nzType="plus" nzTheme="outline"></i>分配代理商</button>
<button nz-button nzType="primary" class="right-btn" *ngIf="BTN_QRCODE_SALESMAN" (click)="showAllocationSalesmanModal()"><i nz-icon nzType="plus" nzTheme="outline"></i>分配业务员</button>
<button nz-button nzType="primary" class="right-btn" *ngIf="userType == 0 || userType == 1" (click)="exportQrCode()">导出二维码</button>
</div>
<!--数组表格 -->

@ -19,7 +19,7 @@ export class PayQrCodeListComponent implements OnInit {
userType: number;
baseUrl = environment.baseUrl;
FILE_URL = environment.imageUrl;
loadingObject = {
spinning: false,
msg: '加载中'
@ -545,4 +545,17 @@ export class PayQrCodeListComponent implements OnInit {
this.salesmanDataArray = [];
}
}
exportQrCode() {
this.loadingObject.spinning = true;
this.loadingObject.msg = '导出中...';
this.payQrCodeService.exportQrCodeList(this.whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
this.loadingObject.spinning = false;
});
}
}

@ -13,14 +13,32 @@
<form nz-form [formGroup]="dataForm" >
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>门店</nz-form-label>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>商户</nz-form-label>
<nz-form-control [nzSm]="6" [nzXs]="24">
<nz-select [formControlName]="'storeId'" [nzPlaceHolder]="'请选择门店'">
<nz-select [formControlName]="'merId'" [nzPlaceHolder]="'请选择商户'" (ngModelChange)="getStore($event)">
<nz-option *ngFor="let item of merArray" nzValue="{{item.id}}" nzLabel="{{item.merName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">门店</nz-form-label>
<nz-form-control [nzSm]="6" [nzXs]="24">
<nz-select [formControlName]="'storeId'" nzAllowClear [nzPlaceHolder]="'请选择门店'">
<nz-option *ngFor="let item of storeArray" nzValue="{{item.id}}" nzLabel="{{item.name}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>参与方式</nz-form-label>
<nz-form-control [nzSm]="6" [nzXs]="24">
<nz-select [formControlName]="'partakeWay'" [nzPlaceHolder]="'请选择参与'">
<nz-option *ngFor="let item of discountActivityPartakeWayArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>优惠活动名称</nz-form-label>
<nz-form-control [nzSm]="6" [nzXs]="24">

@ -6,6 +6,8 @@ import {ValidatorsService} from '../../../services/validators.service';
import {StoreDiscountActivityService} from '../../../services/store-discount-activity.service';
import {StoreService} from '../../../services/store.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {MerService} from '../../../services/mer.service';
import {CommonsService} from '../../../services/commons.service';
@Component({
selector: 'app-store-discount-activity-edit',
@ -18,10 +20,14 @@ export class StoreDiscountActivityEditComponent implements OnInit {
btnLoading = false;
storeArray = [];
merArray = [];
discountActivityPartakeWayArray = [];
constructor(private form: FormBuilder,
private modal: NzModalService,
private commonsService: CommonsService,
private storeDiscountActivityService: StoreDiscountActivityService,
private merService: MerService,
private storeService: StoreService,
private activatedRoute: ActivatedRoute,
private router: Router) { }
@ -29,7 +35,9 @@ export class StoreDiscountActivityEditComponent implements OnInit {
ngOnInit(): void {
this.dataForm = this.form.group({
id: [null],
storeId: [null, [Validators.required]],
merId: [null, [Validators.required]],
storeId: [null],
partakeWay: ['1', [Validators.required]],
name: [null, [Validators.required]],
discountType: [1, [Validators.required]],
discountCondition: [0, [Validators.required]],
@ -38,6 +46,10 @@ export class StoreDiscountActivityEditComponent implements OnInit {
endTime: [null, [Validators.required]],
});
this.commonsService.getDictionary('DISCOUNT_ACTIVITY_PARTAKE_WAY', data => {
this.discountActivityPartakeWayArray = data['return_data'];
});
this.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams['id'] != null) {
this.storeDiscountActivityService.getActivityDetail(queryParams['id'], data => {
@ -48,8 +60,8 @@ export class StoreDiscountActivityEditComponent implements OnInit {
}
});
this.storeService.getStoreList({pageNum: 1, pageSize: 99999}, data => {
this.storeArray = data['return_data']['list'];
this.merService.getMerList({pageNum: 1, pageSize: 99999}, data => {
this.merArray = data['return_data']['list'];
});
}
@ -83,4 +95,9 @@ export class StoreDiscountActivityEditComponent implements OnInit {
});
}
getStore(merId: number) {
this.storeService.getStoreListByMer({ merId: merId, pageNum: 1, pageSize: 99999}, data => {
this.storeArray = data['return_data']['list'];
});
}
}

@ -100,4 +100,15 @@ export class PayQrCodeService {
callBack(data);
});
}
/**
*
* @param paramObject
* @param callBack
*/
exportQrCodeList(param: object, callBack) {
this.http.get(environment.baseUrl + 'payQrCode/exportQrCodeList?' + this.commonsService.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}

@ -5,8 +5,8 @@
export const environment = {
production: false,
// baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
baseUrl: 'http://localhost:9602/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://gratia-pay.dctpay.com/filesystem/',
baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://gratia-pay.dctpay.com/filesystem/',
obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com',
};

Loading…
Cancel
Save