pull/1/head
袁野 2 years ago
parent 84a57f36fb
commit c8af1bd39d
  1. 43
      src/app/admin/cms/cms-content/cms-content.component.html
  2. 3
      src/app/admin/cms/cms-content/cms-content.component.ts
  3. 24
      src/app/admin/config-manage/third-product/third-product.component.html
  4. 4
      src/app/admin/discount/discount-edit/discount-edit.component.html
  5. 8
      src/app/admin/discount/discount-edit/discount-edit.component.ts
  6. 16
      src/app/admin/discount/discount-list/discount-list.component.html
  7. 14
      src/app/admin/discount/discount-list/discount-list.component.ts
  8. 9
      src/app/pipes/third-product/product-type.pipe.ts

@ -86,28 +86,27 @@
<!--数组表格 -->
<nz-table
class="table"
#ajaxTable
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzData]="requestData"
nzShowSizeChanger
[nzFrontPagination]="false"
nzBordered
[nzData]="requestData"
[nzLoading]="loading"
[nzScroll]="{ x: '1200px' }"
[nzTotal]="total"
class="table"
nzShowSizeChanger>
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="100px">分类名称</th>
<th nzWidth="100px">内容标题</th>
<th nzWidth="80px">展示平台</th>
<th nzWidth="80px">状态</th>
<th nzWidth="120px">创建时间</th>
<th nzAlign="left" nzRight="0px" nzWidth="100px">操作</th>
<th nzWidth="80px">分类名称</th>
<th nzWidth="80px">内容标题</th>
<th nzWidth="60px">展示平台</th>
<th nzWidth="100px">创建时间</th>
<th nzRight nzWidth="40px">状态</th>
<th nzAlign="left" nzRight nzWidth="60px">操作</th>
</tr>
</thead>
<tbody>
@ -115,10 +114,8 @@
<td>{{data.tag}}</td>
<td>{{data.title}}</td>
<td>{{data.platform | showType}}</td>
<td>
{{data.status == 1 ? '编辑中' : '已发布'}}
</td>
<td>{{data.createTime | date:'yyyy-MM-dd' }}</td>
<td>{{data.createTime | date:'yyyy-MM-dd hh:mm' }}</td>
<td nzRight>{{data.status == 1 ? '编辑中' : '已发布'}}</td>
<td class="table-td-operation" nzRight>
<a [nzDropdownMenu]="menu" nz-dropdown>更多操作<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
@ -209,7 +206,13 @@
<nz-form-item>
<nz-form-label [nzSpan]="6">跳转路径</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转路径">
<input formControlName="jumpUrl" nz-input placeholder="请输入跳转链接(轮播图必填)"/>
<input formControlName="jumpUrl" nz-input placeholder="请输入跳转链接"/>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">跳转详情路径</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转详情路径">
<input formControlName="ext1" nz-input placeholder="请输入跳转详情路径"/>
</nz-form-control>
</nz-form-item>
<nz-form-item>

@ -67,6 +67,7 @@ export class CmsContentComponent implements OnInit {
title: [null, [Validators.required]],
platform: [null],
platformArray: [null],
ext1: [null],
sortId: [null, [Validators.required]],
description: [null, [Validators.required]],
jumpType: [null],
@ -87,7 +88,7 @@ export class CmsContentComponent implements OnInit {
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.cms.getListContent(whereObject, data => {
this.cms.getListCmsContent(whereObject, data => {
console.log(data);
this.loading = false;
if (data['return_code'] === '000000') {

@ -14,17 +14,6 @@
</nz-form-control>
</nz-form-item>
</div>
<!-- <div nz-col nzSpan="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6">产品类型</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16">-->
<!-- <nz-select nzShowSearch nzAllowClear formControlName="productType" nzPlaceHolder="请选择价格状态">-->
<!-- <nz-option nzLabel="星巴克" [nzValue]="1"></nz-option>-->
<!-- <nz-option nzLabel="肯德基" [nzValue]="2"></nz-option>-->
<!-- </nz-select>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
</div>
@ -61,7 +50,6 @@
<thead nzSingleSort>
<tr>
<th nzWidth="60px">编号</th>
<!-- <th nzWidth="90px">产品类型</th>-->
<th nzWidth="90px">产品类型</th>
<th nzWidth="90px">产品名称</th>
<th nzWidth="90px">利润比例</th>
@ -75,9 +63,8 @@
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<!-- <td>{{data.productType == 1 ? '星巴克' : '肯德基'}}</td>-->
<td>{{data.productName}}</td>
<!-- <td>{{data.productType | productType : data.productId}}</td>-->
<td>{{data.productType | productType : data.productId}}</td>
<td>{{data.discount == null ? '暂未配置' : data.discount + "%"}}</td>
<td>{{data.integralDiscount == null ? '0' : data.integralDiscount + "%"}}</td>
<td>{{data.productPayTypeString.substring(0 , data.productPayTypeString.length - 1)}}</td>
@ -104,13 +91,14 @@
<nz-select nzShowSearch nzAllowClear formControlName="productType" nzPlaceHolder="请选择产品类型">
<nz-option nzLabel="星巴克" [nzValue]="1"></nz-option>
<nz-option nzLabel="肯德基" [nzValue]="2"></nz-option>
<nz-option nzLabel="充值产品" [nzValue]="3"></nz-option>
<nz-option nzLabel="卡券" [nzValue]="4"></nz-option>
<nz-option nzLabel="在线加油" [nzValue]="5"></nz-option>
<nz-option nzLabel="第三方会员充值" [nzValue]="3"></nz-option>
<nz-option nzLabel="购买卡券" [nzValue]="5"></nz-option>
<nz-option nzLabel="加油服务" [nzValue]="6"></nz-option>
<nz-option nzLabel="优惠券包" [nzValue]="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="validateForm.value['productType'] == 4">
<nz-form-item *ngIf="validateForm.value['productType'] == 5">
<nz-form-label [nzSpan]="6" nzRequired>卡券来源</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择卡券来源!">
<nz-select nzShowSearch nzAllowClear formControlName="productId" nzPlaceHolder="请选择卡券来源!">

@ -37,7 +37,7 @@
<nz-form-label [nzFor]="'usingScope'" nzRequired>优惠券使用范围</nz-form-label>
<nz-form-control nzErrorTip="请选择优惠券使用范围!">
<nz-select formControlName="useScope" nzAllowClear nzPlaceHolder="请选择优惠券使用范围">
<nz-option *ngFor="let item of usingScope" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
<nz-option *ngFor="let item of useScope" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -47,7 +47,7 @@
<nz-form-label [nzFor]="'usingRange'" >优惠券使用归属</nz-form-label>
<nz-form-control nzErrorTip="请选择优惠券使用归属!">
<nz-select formControlName="usingRange" nzAllowClear nzPlaceHolder="请选择优惠券使用归属">
<nz-option *ngFor="let item of usingRange" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
<nz-option *ngFor="let item of usingAttribution" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>

@ -28,8 +28,8 @@ export class DiscountEditComponent implements OnInit {
editFlag = false;
id: number;
discountImg = [];
usingRange = [];
usingScope = [];
useScope = [];
usingAttribution = [];
WEB_SERVE_URL = environment.baseUrl;
previewImage: string | undefined = '';
previewVisible = false;
@ -69,11 +69,11 @@ export class DiscountEditComponent implements OnInit {
});
this.commonsService.getDictionary('USING_RANGE', data => {
this.usingScope = data['return_data'];
this.useScope = data['return_data'];
});
this.commonsService.getDictionary('USING_ATTRIBUTION', data => {
this.usingRange = data['return_data'];
this.usingAttribution = data['return_data'];
});
}

@ -7,7 +7,7 @@
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="6">
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">优惠券KYE</nz-form-label>
<nz-form-control [nzSpan]="16">
@ -15,7 +15,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">优惠券名称</nz-form-label>
<nz-form-control [nzSpan]="16">
@ -23,7 +23,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">优惠券类型</nz-form-label>
<nz-form-control [nzSpan]="16">
@ -35,6 +35,16 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">使用范围</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select formControlName="useScope" nzAllowClear nzPlaceHolder="请选择优惠券使用范围">
<nz-option *ngFor="let item of usingRange" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>

@ -1,7 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {AgentService} from '../../../services/agent.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
@ -36,7 +35,7 @@ export class DiscountListComponent implements OnInit {
loadingDiscountCoupon = true;
discountId: number;
RelByDiscountId: number;
usingRange = [];
setOfCheckedId = new Set<number>();
checked = false;
indeterminate = false;
@ -60,7 +59,6 @@ export class DiscountListComponent implements OnInit {
}
refreshCheckedStatus(): void {
this.checked = this.requestCouponData.every(item => this.setOfCheckedId.has(item.id));
this.indeterminate = this.requestCouponData.some(item => this.setOfCheckedId.has(item.id)) && !this.checked;
@ -79,12 +77,15 @@ export class DiscountListComponent implements OnInit {
}
ngOnInit(): void {
this.common.getDictionary('USING_RANGE', data => {
this.usingRange = data['return_data'];
});
this.init();
const whereObject = {};
whereObject['pageNum'] = 1;
whereObject['pageSize'] = 30000;
this.merchant.getMerchantList(whereObject , data => {
if (data['return_code'] === '000000' ) {
this.merchant.getMerchantList(whereObject, data => {
if (data['return_code'] === '000000') {
this.optionList = data['return_data'].list;
}
});
@ -94,6 +95,7 @@ export class DiscountListComponent implements OnInit {
this.searchForm = this.form.group({
discountKey: [null],
discountName: [null],
useScope: [null],
discountType: [null],
});
this.searchFormCoupon = this.form.group({

@ -7,10 +7,11 @@ export class ProductTypePipe implements PipeTransform {
array = {
1: ['星巴克'],
2: ['', '肯德基'],
3: ['', '', '第三方产品'],
4: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油'],
5: ['', '', '', '', '在线加油'],
2: ['肯德基'],
3: ['第三方产品'],
5: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油'],
6: ['在线加油'],
7: ['优惠券包'],
};
transform(type: number , product: number): string {

Loading…
Cancel
Save