Merge branch 'dev' into order

* dev:
  no message
  修改话费订单导出问题
  修改话费订单导出问题
  1
  1
  1
  提交代码
  提交代码
  1
  新增油站生成二维码

# Conflicts:
#	src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts
#	src/app/app-common.module.ts
#	src/app/pipes/index.ts
#	src/app/pipes/paytype.pipe.ts
#	src/environments/environment.ts
pull/1/head
袁野 2 years ago
commit 22ac0ee3fe
  1. 7
      src/app/admin/agent/agent-list/agent-list.component.ts
  2. 1
      src/app/admin/audit/refund-audit/refund-audit.component.html
  3. 238
      src/app/admin/cms/cms-category/cms-category.component.html
  4. 198
      src/app/admin/cms/cms-category/cms-category.component.ts
  5. 16
      src/app/admin/cms/cms-content-edit/cms-content-edit.component.html
  6. 313
      src/app/admin/cms/cms-content/cms-content.component.html
  7. 27
      src/app/admin/cms/cms-content/cms-content.component.less
  8. 639
      src/app/admin/cms/cms-content/cms-content.component.ts
  9. 7
      src/app/admin/cms/cms.module.ts
  10. 1
      src/app/admin/cms/content-edit/content-edit.component.html
  11. 0
      src/app/admin/cms/content-edit/content-edit.component.scss
  12. 15
      src/app/admin/cms/content-edit/content-edit.component.ts
  13. 4
      src/app/admin/config-manage/integral-rebate/integral-rebate.component.html
  14. 18
      src/app/admin/config-manage/third-product/third-product.component.html
  15. 8
      src/app/admin/config-manage/third-product/third-product.component.ts
  16. 14
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  17. 7
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
  18. 3
      src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.ts
  19. 60
      src/app/admin/index/test/test.component.html
  20. 26
      src/app/admin/index/test/test.component.ts
  21. 23
      src/app/admin/merchant-store/store-list/store-list.component.html
  22. 11
      src/app/admin/merchant-store/store-list/store-list.component.ts
  23. 190
      src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html
  24. 0
      src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.scss
  25. 118
      src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts
  26. 182
      src/app/admin/order/order-coupon-list/order-coupon-list.component.html
  27. 0
      src/app/admin/order/order-coupon-list/order-coupon-list.component.scss
  28. 134
      src/app/admin/order/order-coupon-list/order-coupon-list.component.ts
  29. 2
      src/app/admin/order/order-list/order-list.component.ts
  30. 2
      src/app/admin/order/order-routing.module.ts
  31. 3
      src/app/admin/order/order.module.ts
  32. 4
      src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts
  33. 179
      src/app/admin/system/system-msg/system-msg.component.html
  34. 0
      src/app/admin/system/system-msg/system-msg.component.scss
  35. 180
      src/app/admin/system/system-msg/system-msg.component.ts
  36. 2
      src/app/admin/system/system-routing.module.ts
  37. 3
      src/app/admin/system/system.module.ts
  38. 147
      src/app/app-common.module.ts
  39. 1
      src/app/pipes/index.ts
  40. 30
      src/app/pipes/msg/msg-type.pipe.ts
  41. 8
      src/app/pipes/paytype.pipe.ts
  42. 20
      src/app/pipes/third-product/product-type.pipe.ts
  43. 91
      src/app/services/cms.service.ts
  44. 12
      src/app/services/merchant-store.service.ts
  45. 52
      src/app/services/msg.service.ts
  46. 26
      src/app/services/order.service.ts
  47. 29
      src/app/services/order/order-kfc.service.ts

@ -251,8 +251,11 @@ export class AgentListComponent implements OnInit {
}
this.isOkLoading = true;
this.validateFormDistribute.value['agentName'] = this.requestData.find(data => data.id = this.agentId).agentName;
this.validateFormDistribute.value['couponName'] = this.couponList.find(data => data.id = this.validateFormDistribute.value['couponId']).couponName;
console.log(this.couponList);
console.log(this.distributeList);
this.validateFormDistribute.value['agentName'] = this.requestData.find(data => data.id == this.agentId).agentName;
this.validateFormDistribute.value['couponName'] = this.distributeList.find(data => data.id == this.validateFormDistribute.value['couponId']).couponName;
this.validateFormDistribute.value['agentId'] = this.agentId;
const whereObject = {

@ -155,4 +155,3 @@
<nz-descriptions-item nzTitle="订单状态">{{data['orderStatus'] | orderCouponStatus}}</nz-descriptions-item>
</nz-descriptions>
</nz-modal>

@ -1,99 +1,103 @@
<div class="inner-content" nz-row>
<div nz-row>
<div nz-col [nzSpan]="16" [nzPush]="8">
<div [nzPush]="8" [nzSpan]="16" nz-col>
<div style="height: 40px; width: 100%;">
<button (click)="showDeleteConfirm(id)" *ngIf="BTN_cmscategory_delete == 1" nz-button nzType="danger">删除</button>
<span *ngIf="BTN_cmscategory_edit == 1"><button (click)="goDetails()" nz-button class="upload" nzType="primary">编辑</button></span>
<button (click)="goAddShow()" *ngIf="BTN_cmscategory_add == 1 && id != ''" nz-button nzType="primary">添加子分类</button>
<button (click)="goAddShow()" *ngIf="BTN_cmscategory_add == 1 && id == ''" nz-button nzType="primary">添加顶级分类</button>
<button (click)="showDeleteConfirm(id)" *ngIf="BTN_cmscategory_delete == 1" nz-button nzType="danger">
删除
</button>
<span *ngIf="BTN_cmscategory_edit == 1"><button (click)="goDetails()" class="upload" nz-button
nzType="primary">编辑</button></span>
<button (click)="goAddShow()" *ngIf="BTN_cmscategory_add == 1 && id != ''" nz-button nzType="primary">
添加子分类
</button>
<button (click)="goAddShow()" *ngIf="BTN_cmscategory_add == 1 && id == ''" nz-button nzType="primary">
添加顶级分类
</button>
</div>
<div class="details">
<div class="title">
<span>分类详情</span>
</div>
<div style="padding: 10px;" nz-row [nzGutter]="24">
<div nz-col [nzSpan]="24">
<div [nzGutter]="24" nz-row style="padding: 10px;">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >分类名称</nz-form-label>
<nz-form-label>分类名称</nz-form-label>
<nz-form-control>
<input style="width: 300px;" nz-input disabled="disabled" [(ngModel)]="cmsCategory.name" placeholder="暂无数据" nzSize="default" />
<input [(ngModel)]="cmsCategory.name" disabled="disabled" nz-input nzSize="default"
placeholder="暂无数据" style="width: 300px;"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >分类编码</nz-form-label>
<nz-form-label>分类编码</nz-form-label>
<nz-form-control>
<input nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="cmsCategory.code" placeholder="暂无数据" nzSize="default" />
<input [(ngModel)]="cmsCategory.code" disabled="disabled" nz-input nzSize="default"
placeholder="暂无数据" style="width: 300px;"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >排序</nz-form-label>
<nz-form-label>排序</nz-form-label>
<nz-form-control>
<input nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="cmsCategory.sort" placeholder="暂无数据" nzSize="default" />
<input [(ngModel)]="cmsCategory.sort" disabled="disabled" nz-input nzSize="default"
placeholder="暂无数据" style="width: 300px;"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >封面图</nz-form-label>
<nz-form-label>封面图</nz-form-label>
<nz-form-control>
<img *ngIf="cmsCategory.coverImg != null && cmsCategory.coverImg != ''" [src]="FILE_URL + cmsCategory.coverImg" style="height: 100px;width: 100px;" />
<!--<input nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="cmsCategory.coverImg" placeholder="暂无数据" nzSize="default" />-->
<img *ngIf="cmsCategory.coverImg != null && cmsCategory.coverImg != ''"
[src]="FILE_URL + cmsCategory.coverImg" style="height: 100px;width: 100px;"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label>备注</nz-form-label>
<nz-form-control>
<textarea nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="cmsCategory.remark"
placeholder="暂无数据"></textarea>
<textarea [(ngModel)]="cmsCategory.remark" disabled="disabled" nz-input placeholder="暂无数据"
style="width: 300px;"></textarea>
</nz-form-control>
</nz-form-item>
</div>
<!--<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >分类权限</nz-form-label>
<nz-form-label>公司名称</nz-form-label>
<nz-form-control>
<nz-checkbox-group [(ngModel)]="showCheck">
</nz-checkbox-group>
</nz-form-control>
</nz-form-item>
</div>-->
<div nz-col [nzSpan]="24">
<nz-form-item nzFlex>
<nz-form-label >公司名称</nz-form-label>
<nz-form-control>
<input nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="ext1.unitName" placeholder="暂无数据" nzSize="default" />
<input [(ngModel)]="ext1.unitName" disabled="disabled" nz-input nzSize="default"
placeholder="暂无数据" style="width: 300px;"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >公司地址</nz-form-label>
<nz-form-label>公司地址</nz-form-label>
<nz-form-control>
<input nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="ext1.address" placeholder="暂无数据" nzSize="default" />
<input [(ngModel)]="ext1.address" disabled="disabled" nz-input nzSize="default"
placeholder="暂无数据" style="width: 300px;"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<div [nzSpan]="24" nz-col>
<nz-form-item nzFlex>
<nz-form-label >联系方式</nz-form-label>
<nz-form-label>联系方式</nz-form-label>
<nz-form-control>
<input nz-input style="width: 300px;" disabled="disabled" [(ngModel)]="ext1.contact" placeholder="暂无数据" nzSize="default" />
<input [(ngModel)]="ext1.contact" disabled="disabled" nz-input nzSize="default"
placeholder="暂无数据" style="width: 300px;"/>
</nz-form-control>
</nz-form-item>
</div>
</div>
</div>
</div>
<div nz-col [nzSpan]="8" [nzPull]="16">
<div [nzPull]="16" [nzSpan]="8" nz-col>
<nz-input-group [nzSuffix]="suffixIcon">
<input type="text" nz-input placeholder="输入名称查询" [(ngModel)]="searchValue" />
<input [(ngModel)]="searchValue" nz-input placeholder="输入名称查询" type="text"/>
</nz-input-group>
<ng-template #suffixIcon>
<i nz-icon nzType="search"></i>
@ -101,37 +105,37 @@
<nz-empty *ngIf="nodes.length == 0"></nz-empty>
<nz-tree
#nzTreeComponent
[nzData]="nodes"
[nzSearchValue]="searchValue"
(nzClick)="nzEvent($event)"
(nzExpandChange)="nzEvent($event)"
(nzSearchValueChange)="nzEvent($event)"
[nzData]="nodes"
[nzSearchValue]="searchValue"
>
</nz-tree>
</div>
</div>
</div>
<!--添加添加弹出层-->
<nz-modal [(nzVisible)]="isVisible" nzTitle="添加" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk(validateForm.value)" [nzOkLoading]="isOkLoading">
<form nz-form [formGroup]="validateForm" style="margin-left: 5%;">
<nz-modal (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk(validateForm.value)" [(nzVisible)]="isVisible" [nzOkLoading]="isOkLoading"
nzTitle="添加">
<form [formGroup]="validateForm" nz-form style="margin-left: 5%;">
<!--标题-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>
<span>分类名称<i nz-icon nz-tooltip nzTitle="分类名称" type="question-circle" nzTheme="outline"></i></span>
<span>分类名称<i nz-icon nz-tooltip nzTheme="outline" nzTitle="分类名称" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="name" placeholder="请输入分类名称..." />
<!--<nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">请输入分类名称!</nz-form-explain>-->
<input formControlName="name" nz-input placeholder="请输入分类名称..."/>
</nz-form-control>
</nz-form-item>
<!--分类编码-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code" nzRequired>
<span>分类编码<i nz-icon nz-tooltip nzTitle="分类编码" type="question-circle" nzTheme="outline"></i></span>
<span>分类编码<i nz-icon nz-tooltip nzTheme="outline" nzTitle="分类编码" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="code" placeholder="请输入分类编码..." />
<!--<nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">请输入分类编码!</nz-form-explain>-->
<input formControlName="code" nz-input placeholder="请输入分类编码..."/>
</nz-form-control>
</nz-form-item>
<!--排序-->
@ -140,9 +144,29 @@
<span>排序</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-input-number style="width: 100%;" formControlName="sort" [(ngModel)]="cmsCategory.sort" [nzPlaceHolder]="'排序'" [nzMin]="1" [nzMax]="99999" ></nz-input-number>
<nz-input-number [(ngModel)]="cmsCategory.sort" [nzMax]="99999" [nzMin]="1"
[nzPlaceHolder]="'排序'" formControlName="sort" style="width: 100%;"></nz-input-number>
</nz-form-control>
</nz-form-item>
<!--类型-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code" >
<span>展示类型<i nz-icon nz-tooltip nzTheme="outline" nzTitle="展示类型" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select [(ngModel)]="cmsCategory.type" formControlName="type" nzAllowClear nzPlaceHolder="请选择类型" nzShowSearch>
<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]="6"></nz-option>
<nz-option nzLabel="小图一行五个" [nzValue]="7"></nz-option>
<nz-option nzLabel="首页背景图" [nzValue]="8"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<!--封面图-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="hasImage">
@ -150,17 +174,18 @@
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="coverImgArray"
[nzShowButton]="coverImgArray.length < 1"
[nzPreview]="handlePreview"
[nzShowButton]="coverImgArray.length < 1"
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传封面图</div>
<nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
<nz-modal (nzOnCancel)="previewVisible = false" [nzContent]="modalContent" [nzFooter]="null"
[nzVisible]="previewVisible">
<ng-template #modalContent>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
<img [ngStyle]="{ width: '100%' }" [src]="previewImage"/>
</ng-template>
</nz-modal>
</nz-upload>
@ -169,76 +194,67 @@
<!--备注-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>备注<i nz-icon nz-tooltip nzTitle="备注" type="question-circle" nzTheme="outline"></i></span>
<span>备注<i nz-icon nz-tooltip nzTheme="outline" nzTitle="备注" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<textarea nz-input formControlName="remark" rows="4"></textarea>
<textarea formControlName="remark" nz-input rows="4"></textarea>
</nz-form-control>
</nz-form-item>
<button nz-button id="reset" style="display: none;" (click)="resetForm($event)">清空</button>
<button (click)="resetForm($event)" id="reset" nz-button style="display: none;">清空</button>
</form>
<!-- <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="checkOptions" nzRequired>
<span>分类权限<i nz-icon nz-tooltip nzTitle="分类权限" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-checkbox-group [(ngModel)]="checkOptions" (ngModelChange)="allot($event)">
</nz-checkbox-group>
</nz-form-control>
</nz-form-item>-->
<!--公司名称-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>公司名称<i nz-icon nz-tooltip nzTitle="公司名称,招商政策类填写" type="question-circle" nzTheme="outline"></i></span>
<span>公司名称<i nz-icon nz-tooltip nzTheme="outline" nzTitle="公司名称,招商政策类填写" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input [(ngModel)]="ext1.unitName" placeholder="请输入公司名称,招商政策类填写" />
<input [(ngModel)]="ext1.unitName" nz-input placeholder="请输入公司名称,招商政策类填写"/>
</nz-form-control>
</nz-form-item>
<!--公司地址-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>公司地址<i nz-icon nz-tooltip nzTitle="公司地址,招商政策类填写" type="question-circle" nzTheme="outline"></i></span>
<span>公司地址<i nz-icon nz-tooltip nzTheme="outline" nzTitle="公司地址,招商政策类填写" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input [(ngModel)]="ext1.address" placeholder="请输入公司地址,招商政策类填写" />
<input [(ngModel)]="ext1.address" nz-input placeholder="请输入公司地址,招商政策类填写"/>
</nz-form-control>
</nz-form-item>
<!--联系方式-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>联系方式<i nz-icon nz-tooltip nzTitle="联系方式,招商政策类填写" type="question-circle" nzTheme="outline"></i></span>
<span>联系方式<i nz-icon nz-tooltip nzTheme="outline" nzTitle="联系方式,招商政策类填写" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input [(ngModel)]="ext1.contact" placeholder="请输入联系方式,招商政策类填写" />
<input [(ngModel)]="ext1.contact" nz-input placeholder="请输入联系方式,招商政策类填写"/>
</nz-form-control>
</nz-form-item>
</nz-modal>
<!--添加修改弹出层-->
<nz-modal [(nzVisible)]="isVisibleEdit" nzTitle="修改" nzWidth="60%" (nzOnCancel)="handleCancelEdit()" (nzOnOk)="handleOkEdit(validateForm.value)" [nzOkLoading]="isOkEditLoading">
<form nz-form [formGroup]="validateForm">
<nz-modal (nzOnCancel)="handleCancelEdit()" (nzOnOk)="handleOkEdit(validateForm.value)" [(nzVisible)]="isVisibleEdit" [nzOkLoading]="isOkEditLoading"
nzTitle="修改" nzWidth="60%">
<form [formGroup]="validateForm" nz-form>
<!--标题-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>
<span>分类名称<i nz-icon nz-tooltip nzTitle="分类名称" type="question-circle" nzTheme="outline"></i></span>
<span>分类名称<i nz-icon nz-tooltip nzTheme="outline" nzTitle="分类名称" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="name" [(ngModel)]="cmsCategory.name" placeholder="请输入分类名称..." />
<!--<nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">请输入分类名称!</nz-form-explain>-->
<input [(ngModel)]="cmsCategory.name" formControlName="name" nz-input placeholder="请输入分类名称..."/>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code" nzRequired>
<span>分类编码<i nz-icon nz-tooltip nzTitle="分类编码" type="question-circle" nzTheme="outline"></i></span>
<span>分类编码<i nz-icon nz-tooltip nzTheme="outline" nzTitle="分类编码" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="code" disabled="disabled" [(ngModel)]="cmsCategory.code" placeholder="请输入分类名称..." />
<!--<nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">请输入分类编码!</nz-form-explain>-->
<input [(ngModel)]="cmsCategory.code" disabled="disabled" formControlName="code" nz-input
placeholder="请输入分类名称..."/>
</nz-form-control>
</nz-form-item>
<!--排序-->
@ -247,9 +263,23 @@
<span>排序</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-input-number style="width: 100%;" formControlName="sort" [(ngModel)]="cmsCategory.sort" [nzPlaceHolder]="'排序'" [nzMin]="1" [nzMax]="99999" ></nz-input-number>
<nz-input-number [(ngModel)]="cmsCategory.sort" [nzMax]="99999" [nzMin]="1"
[nzPlaceHolder]="'排序'" formControlName="sort" style="width: 100%;"></nz-input-number>
</nz-form-control>
</nz-form-item>
<!--类型-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code">
<span>类型<i nz-icon nz-tooltip nzTheme="outline" nzTitle="类型" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select formControlName="type" nzAllowClear nzPlaceHolder="请选择类型" nzShowSearch>
<nz-option nzLabel="cms内容" [nzValue]="1"></nz-option>
<nz-option nzLabel="数据库数据" [nzValue]="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<!--封面图-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="hasImage">
@ -257,17 +287,18 @@
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="coverImgArray"
[nzShowButton]="coverImgArray.length < 1"
[nzPreview]="handlePreview"
[nzShowButton]="coverImgArray.length < 1"
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传封面图</div>
<nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
<nz-modal (nzOnCancel)="previewVisible = false" [nzContent]="modalContent" [nzFooter]="null"
[nzVisible]="previewVisible">
<ng-template #modalContent>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
<img [ngStyle]="{ width: '100%' }" [src]="previewImage"/>
</ng-template>
</nz-modal>
</nz-upload>
@ -276,52 +307,41 @@
<!--内容-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>备注<i nz-icon nz-tooltip nzTitle="备注" type="question-circle" nzTheme="outline"></i></span>
<span>备注<i nz-icon nz-tooltip nzTheme="outline" nzTitle="备注" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<textarea nz-input formControlName="remark" [(ngModel)]="cmsCategory.remark" rows="4"></textarea>
<textarea [(ngModel)]="cmsCategory.remark" formControlName="remark" nz-input rows="4"></textarea>
</nz-form-control>
</nz-form-item>
</form>
<!--
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="checkOptions" nzRequired>
<span>分类权限<i nz-icon nz-tooltip nzTitle="分类权限" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-checkbox-group [(ngModel)]="showCheck" (ngModelChange)="allot($event)">
</nz-checkbox-group>
</nz-form-control>
</nz-form-item>
-->
<!--公司名称-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>公司名称<i nz-icon nz-tooltip nzTitle="公司名称,招商政策类填写" type="question-circle" nzTheme="outline"></i></span>
<span>公司名称<i nz-icon nz-tooltip nzTheme="outline" nzTitle="公司名称,招商政策类填写" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input [(ngModel)]="ext1.unitName" placeholder="请输入公司名称,招商政策类填写" />
<input [(ngModel)]="ext1.unitName" nz-input placeholder="请输入公司名称,招商政策类填写"/>
</nz-form-control>
</nz-form-item>
<!--公司地址-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>公司地址<i nz-icon nz-tooltip nzTitle="公司地址,招商政策类填写" type="question-circle" nzTheme="outline"></i></span>
<span>公司地址<i nz-icon nz-tooltip nzTheme="outline" nzTitle="公司地址,招商政策类填写" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input [(ngModel)]="ext1.address" placeholder="请输入公司地址,招商政策类填写" />
<input [(ngModel)]="ext1.address" nz-input placeholder="请输入公司地址,招商政策类填写"/>
</nz-form-control>
</nz-form-item>
<!--联系方式-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">
<span>联系方式<i nz-icon nz-tooltip nzTitle="联系方式,招商政策类填写" type="question-circle" nzTheme="outline"></i></span>
<span>联系方式<i nz-icon nz-tooltip nzTheme="outline" nzTitle="联系方式,招商政策类填写" type="question-circle"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input [(ngModel)]="ext1.contact" placeholder="请输入联系方式,招商政策类填写" />
<input [(ngModel)]="ext1.contact" nz-input placeholder="请输入联系方式,招商政策类填写"/>
</nz-form-control>
</nz-form-item>
</nz-modal>

@ -34,25 +34,12 @@ export class CmsCategoryComponent implements OnInit {
FILE_URL;
nodes = [];
roles = [];
/* checkOptions = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 5, checked: false}
];
showCheck = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 4, checked: false}
];*/
cmsCategory = {
id: '',
parentId: '',
name: '',
code: '',
type: '',
sort: '',
coverImg: '',
status: '',
@ -108,10 +95,8 @@ export class CmsCategoryComponent implements OnInit {
name: [null, [Validators.required]],
code: [null, [Validators.required]],
sort: [null, [Validators.required]],
type: [null],
coverImg: [null],
/*hasImage: [null, [Validators.required]],
imageWidth: [null],
imageHeight: [null],*/
remark: [null],
});
this.goRequest();
@ -165,18 +150,13 @@ export class CmsCategoryComponent implements OnInit {
name: '',
code: '',
sort: '',
type: '',
coverImg: '',
status: '',
remark: '',
};
this.id = '';
/* this.showCheck = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 4, checked: false}
];*/
this.ext1 = {
unitName: '',
address: '',
@ -217,26 +197,11 @@ export class CmsCategoryComponent implements OnInit {
};
}
if (this.cmsCategory.parentId == null || this.cmsCategory.parentId === '' || this.cmsCategory.parentId === undefined || this.cmsCategory.parentId.length === 0) {
/* this.showCheck = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 4, checked: false}
];*/
// 查询自己已分配的权限,然后勾选
this.http.get(this.WEB_SERVE_URL + '/cmsCategory/getRolesOfCategory?id=' + id).subscribe(allot => {
if (allot['return_code'] === '000000') {
// tslint:disable-next-line:forin
/* for (const i in allot['return_data']) {
for (const j in this.showCheck) {
if (allot['return_data'][i] === this.showCheck[j].value) {
this.showCheck[j].checked = true;
this.roles.push(this.showCheck[j].value);
console.log(this.roles);
}
}
}*/
} else {
this.message.create('warning', allot['return_msg']);
}
@ -244,59 +209,11 @@ export class CmsCategoryComponent implements OnInit {
} else {
this.http.get(this.WEB_SERVE_URL + '/cmsCategory/getRolesOfCategory?id=' + this.cmsCategory.parentId).subscribe(parent => {
if (parent['return_code'] === '000000') {
/* this.showCheck = [];
// tslint:disable-next-line:forin
for (const i in parent['return_data']) {
if (parent['return_data'][i] === 1) {
const params = {
label: '中心平台',
value: 1,
disabled: true,
checked: false
};
this.showCheck.push(params);
}
if (parent['return_data'][i] === 2) {
const params = {
label: '企业',
value: 2,
disabled: true,
checked: false
};
this.showCheck.push(params);
}
if (parent['return_data'][i] === 3) {
const params = {
label: '服务机构',
value: 3,
disabled: true,
checked: false
};
this.showCheck.push(params);
}
if (parent['return_data'][i] === 4) {
const params = {
label: '行政部门',
value: 4,
disabled: true,
checked: false
};
this.showCheck.push(params);
}
}*/
// 查询自己已分配的权限,然后勾选
this.http.get(this.WEB_SERVE_URL + '/cmsCategory/getRolesOfCategory?id=' + id).subscribe(allot2 => {
if (allot2['return_code'] === '000000') {
// tslint:disable-next-line:forin
/*for (const i in allot2['return_data']) {
for (const j in this.showCheck) {
if (allot2['return_data'][i] === this.showCheck[j].value) {
this.showCheck[j].checked = true;
this.roles.push(this.showCheck[j].value);
console.log(this.roles);
}
}
}*/
} else {
this.message.create('warning', allot2['return_msg']);
}
@ -320,6 +237,7 @@ export class CmsCategoryComponent implements OnInit {
parentId: '',
name: '',
code: '',
type: '',
sort: '5',
coverImg: '',
status: '',
@ -330,19 +248,14 @@ export class CmsCategoryComponent implements OnInit {
address: '',
contact: '',
};
// this.checkOptions = [
// {label: '中心平台', value: 1, checked: false},
// {label: '企业', value: 2, checked: false},
// {label: '服务机构', value: 3, checked: false},
// {label: '行政部门', value: 4, checked: false}
// ];
} else {
this.findAddRoleType(this.id);
this.cmsCategory = {
id: '',
parentId: '',
name: '',
code: '',
type: '',
sort: '5',
coverImg: '',
status: '',
@ -371,10 +284,7 @@ export class CmsCategoryComponent implements OnInit {
this.message.create('error', `请选择输入排序序号!`);
return;
}
/* if (this.roles.length === 0) {
this.message.create('error', `请选择分类权限!`);
return;
}*/
let coverImgStr = null;
for (let i = 0; i < this.coverImgArray.length; i++) {
if (this.coverImgArray[i].response != null && this.coverImgArray[i].response != '') {
@ -390,6 +300,7 @@ export class CmsCategoryComponent implements OnInit {
code: value.code,
parentId: this.id,
sort: value.sort,
type: value.type,
coverImg: coverImgStr,
remark: value.remark,
ext1: JSON.stringify(this.ext1)
@ -409,6 +320,7 @@ export class CmsCategoryComponent implements OnInit {
name: '',
code: '',
sort: '',
type: '',
coverImg: '',
status: '',
remark: '',
@ -418,12 +330,6 @@ export class CmsCategoryComponent implements OnInit {
address: '',
contact: '',
};
/* this.checkOptions = [
{label: '中心平台', value: 1, checked: false},
{label: '企业', value: 2, checked: false},
{label: '服务机构', value: 3, checked: false},
{label: '行政部门', value: 4, checked: false}
];*/
this.id = '';
} else {
this.message.create('warning', data['return_msg']);
@ -460,9 +366,6 @@ export class CmsCategoryComponent implements OnInit {
return;
}
// tslint:disable-next-line:forin
/* for (const i in this.showCheck) {
this.showCheck[i].disabled = false;
}*/
this.isVisibleEdit = true;
}
@ -485,10 +388,6 @@ export class CmsCategoryComponent implements OnInit {
this.message.create('error', `请选择输入排序序号!`);
return;
}
/* if (this.roles.length === 0) {
this.message.create('error', `请选择分类权限!`);
return;
}*/
let coverImgStr = null;
for (let i = 0; i < this.coverImgArray.length; i++) {
if (this.coverImgArray[i].response != null && this.coverImgArray[i].response != '') {
@ -505,6 +404,7 @@ export class CmsCategoryComponent implements OnInit {
code: value.code,
parentId: this.cmsCategory.parentId,
sort: value.sort,
type: value.type,
coverImg: coverImgStr,
status: this.cmsCategory.status,
remark: value.remark,
@ -524,6 +424,7 @@ export class CmsCategoryComponent implements OnInit {
parentId: '',
name: '',
code: '',
type: '',
sort: '',
coverImg: '',
status: '',
@ -534,13 +435,6 @@ export class CmsCategoryComponent implements OnInit {
address: '',
contact: '',
};
/* this.showCheck = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 4, checked: false}
];*/
} else {
this.message.create('warning', data['return_msg']);
}
@ -590,6 +484,7 @@ export class CmsCategoryComponent implements OnInit {
name: '',
code: '',
sort: '',
type: '',
coverImg: '',
status: '',
remark: '',
@ -599,20 +494,6 @@ export class CmsCategoryComponent implements OnInit {
address: '',
contact: '',
};
/*this.checkOptions = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 4, checked: false}
];
this.showCheck = [
{label: '房管局', value: 1, checked: false},
{label: '街道办', value: 2, checked: false},
{label: '物业', value: 3, checked: false},
{label: '小区', value: 4, checked: false},
{label: '业委会', value: 4, checked: false}
];*/
this.id = '';
this.goRequest();
} else {
@ -621,51 +502,6 @@ export class CmsCategoryComponent implements OnInit {
});
}
// 查询能分配的角色(上级已分配角色)
findAddRoleType(id) {
/*this.http.get(WEB_SERVE_URL + '/cmsCategory/getRolesOfCategory?id=' + id).subscribe(data => {
if (data['return_code'] === '000000') {
this.checkOptions = [];
// tslint:disable-next-line:forin
for (const i in data['return_data']) {
if (data['return_data'][i] === 1) {
const params = {
label: '中心平台',
value: 1,
checked: false
};
this.checkOptions.push(params);
}
if (data['return_data'][i] === 2) {
const params = {
label: '企业',
value: 2,
checked: false
};
this.checkOptions.push(params);
}
if (data['return_data'][i] === 3) {
const params = {
label: '服务机构',
value: 3,
checked: false
};
this.checkOptions.push(params);
}
if (data['return_data'][i] === 4) {
const params = {
label: '行政部门',
value: 4,
checked: false
};
this.checkOptions.push(params);
}
}
} else {
this.message.create('warning', data['return_msg']);
}
});*/
}
// 是否包含图片
getChange(event) {

@ -40,7 +40,19 @@
<!--<nz-form-explain *ngIf="validateForm.get('description')?.dirty && validateForm.get('description')?.errors">请输入简要描述!</nz-form-explain>-->
</nz-form-control>
</nz-form-item>
<!--跳转链接-->
<nz-form-item nzFlex>
<nz-form-label>
<span>展示平台</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" [(ngModel)]="cmsContentView.jumpType" formControlName="jumpType">
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<!--跳转链接-->
<nz-form-item nzFlex>
@ -61,7 +73,7 @@
<span>跳转链接</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="ext1" [(ngModel)]="cmsContentView.ext1" placeholder="请输入跳转链接(轮播图必填)" />
<input nz-input formControlName="ext1" [(ngModel)]="cmsContentView.jumpUrl" placeholder="请输入跳转链接(轮播图必填)" />
</nz-form-control>
</nz-form-item>

@ -8,221 +8,206 @@
</nz-breadcrumb-item>
</nz-breadcrumb>
<div class="inner-content" nz-row>
<!--条件搜索-->
<div style="margin-bottom: 24px; margin-top: 24px;">
<!--分类-->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">内容分类</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-tree-select
nzPlaceHolder="请选择分类"
style="width: 250px"
nzPlaceHolder="请选择内容分类"
[nzNodes]="nodes"
nzShowSearch
nzPlaceHolder="请选择内容分类"
[(ngModel)]="searchCategoryId"
formControlName="categoryId"
>
</nz-tree-select>
<input class="width_input_chlid" [(ngModel)]="searchTitle" name="searchTitle" nz-input placeholder="请输入内容标题" nzSize="default">
<nz-select class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchStatus">
</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">
<input formControlName="title" name="title" nz-input placeholder="请输入内容标题" nzSize="default">
</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 class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" formControlName="status">
<nz-option nzLabel="请选择状态" nzValue=""></nz-option>
<nz-option nzLabel="编辑中" nzValue="1"></nz-option>
<nz-option nzLabel="已发布" nzValue="2"></nz-option>
<!--<nz-option nzLabel="已下线" nzValue="3"></nz-option>-->
</nz-select>
<button style="margin-left: 10px;" nz-button nzType="primary" (click)="getSearch()" [nzLoading]="isLoadingSearch">搜索</button>
<button nz-button (click)="resetSearch()">重置</button>
</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 class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" formControlName="platform">
<nz-option nzLabel="请选择展示平台" nzValue=""></nz-option>
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content" nz-row>
<nz-layout>
<nz-sider style="background: #ffffff;"><div class="gaopin-data-toalt" style="width: 300px;">共搜索到 {{total}} 条数据</div></nz-sider>
<nz-content style="text-align: right;background: #ffffff;">
<button *ngIf="BTN_cmscontent_add == 1" class="funcBnt" nz-button nzType="primary" (click)="getAdd()">添加</button>
</nz-content>
</nz-layout>
<!--数组表格 -->
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getAdd()" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
</div>
<nz-table
style="margin-top: 30px;width: 100%;"
class="table"
#ajaxTable
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageIndex"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
(nzPageIndexChange)="getRequest()"
(nzPageSizeChange)="getRequest(true)"
[nzScroll]="{ x: '1150px'}">
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="80px">序号</th>
<th nzWidth="240px">分类名称</th>
<th nzWidth="240px">内容标题</th>
<th nzWidth="300px">简要描述</th>
<th nzWidth="120px">访问总量</th>
<th nzWidth="120px">是否推荐</th>
<th nzWidth="120px">状态</th>
<th nzWidth="100px">分类名称</th>
<th nzWidth="100px">内容标题</th>
<th nzWidth="80px">展示平台</th>
<th nzWidth="80px">状态</th>
<th nzWidth="120px">创建时间</th>
<th nzRight="0px" nzAlign="left" nzWidth="300px">操作</th>
<th nzRight="0px" nzAlign="left" nzWidth="100px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index;">
<td>{{i+ 1}}</td>
<td>{{data.categoryName}}</td>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.tag}}</td>
<td>{{data.title}}</td>
<td>{{data.description}}</td>
<td>{{data.visitCount}}</td>
<td>
<span style="color: #1890ff;" *ngIf="data.recommend"></span>
<span style="color: darkgray;" *ngIf="!data.recommend"></span>
</td>
<td>{{data.platform | showType}}</td>
<td>
<span *ngIf="data.status == 1">编辑中</span>
<span *ngIf="data.status == 2">已发布</span>
</td>
<td>{{data.createTime | date:'yyyy-MM-dd' }}</td>
<td nzRight="0px" style="font-size: 16px;">
<a><span nz-tooltip nzTitle="详情" (click)='getContentView(data.id)'><i nz-icon nzType="unordered-list" nzTheme="outline"></i></span></a>
<span *ngIf="BTN_cmscontent_edit">
<nz-divider nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="编辑" (click)='getEdit(data.id)'><i nz-icon nzType="edit" nzTheme="outline"></i></span></a>
</span>
<span *ngIf="BTN_cmscontent_up_down == 1">
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 2"><span nz-tooltip nzTitle="下线" (click)='showDown(data.id)'><i nz-icon nzType="down-square" nzTheme="outline"></i></span></a>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="发布" (click)='addPush(data.id, data.categoryId)'><i nz-icon nzType="up-square" nzTheme="outline"></i></span></a>
</span>
<span *ngIf="BTN_cmscontent_delete == 1">
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="删除" (click)='showDeleteConfirmDelete(data.id)'><i nz-icon nzType="delete" nzTheme="outline"></i></span></a>
</span>
<span *ngIf="BTN_cmscontent_patch == 1">
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="附件" (click)='findPatchByContent(data.id)'><i nz-icon nzType="file" nzTheme="outline"></i></span></a>
</span>
{{data.status == 1 ? '编辑中': '已发布'}}
</td>
</tr>
</tbody>
</nz-table>
<nz-layout *ngIf="showPatch == 1" style="margin-bottom: 10px;">
<nz-content style="text-align: right;background: #ffffff;">
<button class="funcBnt" nz-button nzType="primary" (click)="addPatch()">添加附件</button>
</nz-content>
</nz-layout>
<nz-table style="width: 100%" [nzShowPagination]="false" #basicTable [nzData]="patchList" *ngIf="showPatch == 1">
<thead>
<tr>
<th>附件名称</th>
<th>附件类型</th>
<th>附件描述</th>
<th>排序</th>
<th>添加时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of patchList">
<td>{{ data.patchName }}</td>
<td *ngIf="data.patchType == 1">图片</td>
<td *ngIf="data.patchType == 2">音频</td>
<td *ngIf="data.patchType == 3">视频</td>
<td *ngIf="data.patchType == 4">文档</td>
<td *ngIf="data.patchType == 5">其他</td>
<td>{{data.patchDesc}}</td>
<td>{{data.sort}}</td>
<td>{{data.addTime | date:'yyyy-MM-dd'}}</td>
<td>
<a><span nz-tooltip nzTitle="删除附件" (click)='showDeletePatch(data.id)'><i nz-icon nzType="delete" nzTheme="outline"></i></span></a>
<td>{{data.createTime | date:'yyyy-MM-dd hh:mm:ss' }}</td>
<td nzRight class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu">更多操作<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li *ngIf="data.status == 1 && 'BTN_cmscontent_edit' | button" nz-menu-item><a (click)="getEdit(data)">编辑</a></li>
<li *ngIf="'BTN_cmscontent_up_down' | button" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 2 ? '下架': '上架'}}</a></li>
<li *ngIf="data.status == 1 && 'BTN_cmscontent_delete' | button" nz-menu-item><a (click)='showDeleteConfirmDelete(data.id)'>删除</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
<!--添加附件弹出层-->
<nz-modal [(nzVisible)]="isVisible" nzTitle="添加附件" (nzOnCancel)="handleCancel()" (nzOnOk)="handlePatchOk(annexForm.value)" [nzOkLoading]="isOkLoading">
<form nz-form [formGroup]="annexForm" style="margin-left: 5%;">
<!--附件名称-->
<nz-modal [(nzVisible)]="isVisible" nzTitle="编辑内容" nzWidth="700" (nzOnCancel)="isVisible = false" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm" class="login-form">
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchName" nzRequired>
<span>附件名称<i nz-icon nz-tooltip nzTitle="附件名称" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="patchName" placeholder="请输入附件名称..." />
<!--<nz-form-explain *ngIf="annexForm.get('patchName')?.dirty && annexForm.get('patchName')?.errors">请输入附件名称!</nz-form-explain>-->
<nz-form-label [nzSpan]="6" nzRequired>分类</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="内容分类">
<nz-tree-select
style="width: 250px"
[nzNodes]="nodes"
nzShowSearch
nzPlaceHolder="请选择内容分类"
formControlName="categoryId"
>
</nz-tree-select>
</nz-form-control>
</nz-form-item>
<!--附件描述-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchDesc">
<span>附件描述<i nz-icon nz-tooltip nzTitle="附件描述" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="patchDesc" placeholder="请输入附件描述..." />
<!--<nz-form-explain *ngIf="annexForm.get('patchDesc')?.dirty && annexForm.get('patchDesc')?.errors">请输入附件描述!</nz-form-explain>-->
<nz-form-label [nzSpan]="6" nzRequired>内容标题</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入内容标题">
<input nz-input formControlName="title" placeholder="请输入内容标题!" />
</nz-form-control>
</nz-form-item>
<!--附件排序-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="sort" nzRequired>
<span>附件排序<i nz-icon nz-tooltip nzTitle="附件排序" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input type="number" formControlName="sort" placeholder="请输入附件排序,越小越靠前..." oninput="if(value.length>5) value=value.slice(0,5)"/>
<!--<nz-form-explain *ngIf="annexForm.get('sort')?.dirty && annexForm.get('sort')?.errors">请输入附件排序!</nz-form-explain>-->
<nz-form-label [nzSpan]="6" nzRequired>展示平台</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择展示平台">
<nz-select *ngIf="!editFlag" nzMode="multiple" nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" formControlName="platformArray">
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></nz-option>
</nz-select>
<nz-select *ngIf="editFlag" nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" formControlName="platform">
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<!--附件类型-->
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchType" nzRequired>
<span>附件类型</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select style="width: 80%;" formControlName="patchType" (ngModelChange)="getChange($event)" nzShowSearch nzAllowClear 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-select>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>优先级</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入优先级">
<nz-input-number style="width: 240px;" nzPlaceHolder="请输入优先级,越小越靠前..." formControlName="sortId" [nzMin]="1" [nzMax]="100" [nzStep]="1"></nz-input-number>
</nz-form-control>
</nz-form-item>
<!--附件上传-->
<nz-form-item *ngIf="patchTypeCheck != '0' && patchTypeCheck != null && patchTypeCheck != ''">
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchPath" nzRequired>
<span>附件上传<i nz-icon nz-tooltip nzTitle="附件上传" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/fileUpload"
[(nzFileList)]="fileList"
[nzCustomRequest]="customReq"
[nzShowButton]="fileList.length < 1"
>
<button nz-button ><i nz-icon nzType="upload"></i><span>点击上传</span></button>
</nz-upload>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>内容描述</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入内容描述">
<input nz-input formControlName="description" placeholder="请输入内容描述!" />
</nz-form-control>
</nz-form-item>
<button nz-button id="reset" style="display: none;" (click)="emptyForm($event)">清空</button>
</form>
</nz-modal>
<!--发布弹出层-->
<nz-modal [(nzVisible)]="isPublish" nzTitle="发布内容" (nzOnCancel)="handleCancelPush()" (nzOnOk)="handlePushOk(pushForm.value)" [nzOkLoading]="isPushOkLoading">
<form nz-form [formGroup]="pushForm" style="margin-left: 5%;">
<!--附件名称-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="moduleId">
<span>发布模板<i nz-icon nz-tooltip nzTitle="发布模板" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select formControlName="moduleId" nzShowSearch nzAllowClear nzPlaceHolder="选择发布模板,也可不选择" [(ngModel)]="moduleId">
<nz-option *ngFor="let data of selectModule" nzLabel="{{data.moduleName}}" nzValue="{{data.id}}"></nz-option>
<nz-form-label [nzSpan]="6" >跳转类型</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转类型">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择跳转类型" formControlName="jumpType">
<nz-option nzLabel="外链" [nzValue]="1"></nz-option>
<nz-option nzLabel="内链" [nzValue]="2"></nz-option>
</nz-select>
<!--<input nz-input formControlName="moduleId" placeholder="请输入附件名称..." />-->
</nz-form-control>
</nz-form-item>
<button nz-button id="resetPush" style="display: none;" (click)="emptyPushForm($event)">清空</button>
<nz-form-item>
<nz-form-label [nzSpan]="6" >跳转路径</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转路径">
<input nz-input formControlName="jumpUrl" placeholder="请输入跳转链接(轮播图必填)" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">封面图片</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-upload
nzAction="{{POST_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="imgFile"
[nzShowButton]="imgFile.length < 1"
[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>
</form>
</nz-modal>

@ -1,27 +0,0 @@
.width_input {
width: 200px;
}
.width_input_chlid {
width: 200px;
margin-left: 10px;
}
[nz-form] {
max-width: 600px;
}
button {
margin-left: 8px;
}
:host ::ng-deep .upload-list-inline .ant-upload-list-item {
float: left;
width: 200px;
margin-right: 8px;
}
.search-result-list {
margin-top: 16px;
border: 1px dashed #e9e9e9;
border-radius: 6px;
background-color: #fafafa;
min-height: 200px;
text-align: center;
padding-top: 80px;
}

@ -1,12 +1,22 @@
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {HttpClient, HttpEvent, HttpEventType, HttpRequest, HttpResponse} from '@angular/common/http';
import {NzMessageService, NzModalService, UploadXHRArgs} from 'ng-zorro-antd';
import {HttpClient} from '@angular/common/http';
import {NzMessageService, NzModalService, NzUploadFile} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {LocalStorageService} from '../../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {environment} from '../../../../environments/environment';
import {CmsService} from '../../../services/cms.service';
import {CommonsService} from '../../../services/commons.service';
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
@Component({
selector: 'app-cms-content',
@ -14,247 +24,93 @@ import {environment} from '../../../../environments/environment';
styleUrls: ['./cms-content.component.less']
})
export class CmsContentComponent implements OnInit {
// 搜索按钮等待特效
isLoadingSearch = false;
// 搜索内容标题
searchTitle = '';
// 状态搜索
searchStatus = '';
// 分类搜索
searchCategoryId = '';
// 公司id
searchCompanyId = '';
// 查询数组
requestData = [];
// 查询数组等待特效
loading = true;
// 请求页码
pageIndex = 1;
// 请求条数
pageSize = 10;
// 查询总条数
total = 0;
/** 分类树数据 **/
nodes = [];
WEB_SERVE_URL;
// 选中的内容id
contentSelect = '';
// 是否显示附件列表
showPatch = 0;
// 根据内容查询附件列表
patchList = [];
// 添加附件相关
// 提交等待
isOkLoading = false;
// 附件类型
patchTypeCheck = '0';
// 附件返回地址
patchPath = '';
// 允许上传的文件类型
annexForm: FormGroup;
/** 定义附件表单 **/
isVisible = false;
/** 是否弹出添加 **/
fileList = [];
// 上传的后缀名
suffix = '';
// 允许上传的文件类型
imageSuffix = [
'jpg',
'jpeg',
'png',
'jif',
'dwg',
'dxf',
'jp2',
'jpe',
'svf',
'tif',
'tiff',
];
audioSuffix = [
'3gpp',
'ac3',
'mp2',
'mp3',
'asf',
'cda',
'wav',
'wma',
'mid',
'ra',
'rma',
'mod',
];
videoSuffix = [
'3gpp',
'mp2',
'mp4',
'mpeg',
'mpg',
'avi',
'rmvb',
'flv',
'3pg',
'rm',
'mov',
'wmv',
'mkv',
'f4v',
'm4v',
];
applicationSuffix = [
'asf',
'doc',
'dot',
'dtd',
'htm',
'html',
'css',
'csv',
'js',
'json',
'mpp',
'ogg',
'pdf',
'pot',
'pps',
'ppt',
'rtf',
'txt',
'wdb',
'wps',
'xhtml',
'xlc',
'xlm',
'xls',
'xlt',
'xlw',
'xml',
'zip',
'docx',
'xlsx',
'pptx',
'sql'
];
isPublish = false;
isPushOkLoading = false;
moduleId = '';
pushId = '';
pushForm: FormGroup;
// 可选择的模板列表
selectModule = [];
/** 按钮数据权限 **/
BTN_cmscontent_add = 0;
BTN_cmscontent_edit = 0;
BTN_cmscontent_delete = 0;
BTN_cmscontent_patch = 0;
BTN_cmscontent_up_down = 0;
WEB_SERVE_URL = environment.imageUrl;
POST_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
nodes = []; // 类型树
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
editFlag = false;
isVisible = false;
imgFile = [];
previewImage: string | undefined = '';
previewVisible = false;
id: number;
constructor(
private fb: FormBuilder,
private http: HttpClient, // http请求
private message: NzMessageService, // 信息提示
private router: Router,
private modalService: NzModalService, // 对话框
private store: LocalStorageService, // 请求缓存
private common: CommonsService,
private cms: CmsService,
) {
this.WEB_SERVE_URL = environment.baseUrl;
this.searchCompanyId = this.store.get(ADMIN_INFO_OBJECT)['secUser']['companyId'];
}
ngOnInit() {
/** 循环查询 按钮权限 **/
for (let i = 0; i < this.store.get(ADMIN_INFO_OBJECT)['buttonList'].length; i++) {
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_add') {
this.BTN_cmscontent_add = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_edit') {
this.BTN_cmscontent_edit = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_delete') {
this.BTN_cmscontent_delete = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_patch') {
this.BTN_cmscontent_patch = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_up_down') {
this.BTN_cmscontent_up_down = 1;
}
}
this.annexForm = this.fb.group({
patchName: [null, [Validators.required]],
patchDesc: [null],
patchType: [null, [Validators.required]],
sort: [null, [Validators.required]],
this.searchForm = this.fb.group({
title: [null],
categoryId: [null],
platform: [null],
status: [null],
});
this.pushForm = this.fb.group({
moduleId: [null]
this.validateForm = this.fb.group({
categoryId: [null, [Validators.required]],
title: [null, [Validators.required]],
platform: [null],
platformArray: [null],
sortId: [null, [Validators.required]],
description: [null, [Validators.required]],
jumpType: [null],
jumpUrl: [null],
});
// 获取登录人 角色类型,查询分类树
console.log(this.store.get(ADMIN_INFO_OBJECT));
let roleType = 1;
/* if (0 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) {
roleType = 1;
} else if (1 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) {
if (this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['isService'] == true) {
roleType = 3;
} else {
roleType = 2;
}
} else if (2 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) {
roleType = 3;
}*/
const roleType = 1;
this.findCategoryTree(roleType);
this.getRequest();
}
this.getRequest(true, this.searchForm.value);
// 重置搜索
resetSearch() {
// 搜索内容标题
this.searchTitle = '';
// 状态搜索
this.searchStatus = '';
// 分类搜索
this.searchCategoryId = '';
}
// 请求列表
getRequest(reset: boolean = false) {
this.showPatch = 0;
this.loading = false;
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (reset) {
this.pageIndex = 1;
}
if (this.searchStatus == null) {
this.searchStatus = '';
}
if (this.searchCategoryId == null) {
this.searchCategoryId = '';
this.pageNum = 1;
}
this.http.get(this.WEB_SERVE_URL + '/cmsContent/getListContent?pageNum=' + this.pageIndex + '&pageSize=' + this.pageSize + '&title=' + this.searchTitle + '&category=' + this.searchCategoryId + '&status=' + this.searchStatus + '&companyId=' + this.searchCompanyId).subscribe(data => {
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.cms.getListContent(whereObject, data => {
console.log(data);
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
this.isLoadingSearch = false;
} else {
this.message.create('error', data['return_msg']);
this.message.error(data['return_msg']);
}
});
}
// 搜索
getSearch() {
this.getRequest();
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 查询分类树
findCategoryTree(roleType) {
this.http.get(this.WEB_SERVE_URL + '/cmsCategory/getOwnCategoryTree?roleType=' + roleType).subscribe(data => {
this.cms.getOwnCategoryTree(roleType , data => {
if (data['return_code'] === '000000') {
this.nodes = data['return_data'];
if (this.nodes.length !== 0) {
@ -273,7 +129,6 @@ export class CmsContentComponent implements OnInit {
for (const i in data) {
if (data[i].nodes == null) {
const item = {
/** 重新赋值 **/
isLeaf: true,
title: data[i].text,
key: data[i].id,
@ -282,7 +137,6 @@ export class CmsContentComponent implements OnInit {
data[i] = item;
} else {
const item = {
/** 重新赋值 **/
isLeaf: false,
title: data[i].text,
key: data[i].id,
@ -293,340 +147,119 @@ export class CmsContentComponent implements OnInit {
}
}
this.nodes = data;
console.log(this.nodes);
}
// 跳转添加
// 新增
getAdd() {
this.router.navigate(['/admin/cms/cmscontentadd'], {
queryParams: {
editFlag: 0
}
});
}
// 跳转修改
getEdit(id) {
this.router.navigate(['/admin/cms/cmscontentedit'], {
queryParams: {
id: id
}
});
this.isVisible = true;
this.editFlag = false;
}
// 跳转详情
getContentView(id) {
this.router.navigate(['/admin/cms/cmscontentview'], {
queryParams: {
id: id
}
// 编辑
getEdit(data: object) {
console.log(data);
if (data['imgData'] != null && data['imgData'] !== '') {
const logo = String(data['imgData']);
const logoArray = [];
logoArray.push(
{
uid: 1,
name: logo,
status: 'done',
url: environment.imageUrl + logo
});
this.imgFile = logoArray;
}
// 对话框删除
showDeleteConfirmDelete(id): void {
this.modalService.confirm({
nzTitle: '是否确定删除',
nzOkText: '是',
nzOnOk: () => this.deleteContent(id),
nzCancelText: '否',
});
this.id = data['id'];
this.validateForm.patchValue(data);
this.editFlag = true;
this.isVisible = true;
}
// 删除内容
deleteContent(id) {
if (id === undefined) {
// 提交内容
handleOk() {
// tslint:disable-next-line:forin
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
if (this.validateForm.controls[i].errors != null) {
this.message.error('必填项不能为空');
return;
}
if (id === null) {
return;
}
if (id === '') {
return;
}
this.http.get(this.WEB_SERVE_URL + '/cmsContent/delContent?id=' + id).subscribe(data => {
if (data['return_code'] === '000000') {
this.message.create('success', `删除成功!`);
this.getRequest();
} else {
this.message.create('warning', data['return_msg']);
}
});
}
// 查询附件列表
findPatchByContent(id) {
this.contentSelect = id;
this.http.get(this.WEB_SERVE_URL + '/cmsContent/getListPatches?pageNum=1&pageSize=100&contentId=' + id).subscribe(data => {
if (data['return_code'] === '000000') {
this.showPatch = 1;
this.patchList = data['return_data'].list;
console.log(this.patchList);
if (this.imgFile.length !== 0) {
if (this.imgFile[0]['response'] != null) {
this.validateForm.value.imgData = this.imgFile[0]['response']['return_data'][0];
} else {
this.message.create('warning', data['return_msg']);
}
});
}
// 弹出添加附件
addPatch() {
this.isVisible = true;
}
// 删除附件确认
showDeletePatch(id) {
this.modalService.confirm({
nzTitle: '是否确定删除',
nzOkText: '是',
nzOnOk: () => this.deletePatch(id),
nzCancelText: '否',
});
this.validateForm.value.imgData = this.imgFile[0].name;
}
// 删除附件
deletePatch(id) {
if (id === undefined || id === null || id === '') {
return;
}
this.http.get(this.WEB_SERVE_URL + '/cmsPatch/delPatch?id=' + id).subscribe(data => {
if (this.editFlag) {
this.validateForm.value.id = this.id;
this.cms.updateCmsContent(this.validateForm.value , data => {
if (data['return_code'] === '000000') {
this.message.create('success', `删除成功!`);
this.findPatchByContent(this.contentSelect);
} else {
this.message.create('warning', data['return_msg']);
}
});
}
// 取消按钮
handleCancel(): void {
this.isVisible = false;
this.patchPath = '';
this.fileList = [];
/** 隐藏弹框 **/
}
// 附件类型选择
getChange(event) {
if (event != null) {
this.patchTypeCheck = event;
console.log(event);
}
this.getRequest(false, this.searchForm.value);
this.message.success('修改成功');
} else {
this.message.create('error', '修改失败');
}
// 附件上传设置
customReq = (item: UploadXHRArgs) => {
this.patchPath = ''; // 置空路径
const formData = new FormData();
formData.append('requestFile', item.file as any);
formData.append('uploadType', 'cmsPatch');
console.log(item);
const req = new HttpRequest('POST', item.action!, formData, {
reportProgress: true,
});
console.log(req);
return this.http.request(req).subscribe(
(event: HttpEvent<any>) => {
console.log(event);
if (event.type === HttpEventType.UploadProgress) {
if (event.total! > 0) {
(event as any).percent = (event.loaded / event.total!) * 100;
}
item.onProgress!(event, item.file!);
} else if (event instanceof HttpResponse) {
item.onSuccess!(event.body, item.file!, event);
if (event.body.return_code === '000000') {
this.patchPath = event.body.return_data[item.file.name];
this.suffix = this.patchPath.split('.')[this.patchPath.split('.').length - 1];
}
}
},
err => {
item.onError!(err, item.file!);
}
);
}
/** 清空 **/
emptyForm(e: MouseEvent): void {
e.preventDefault();
this.annexForm.reset();
for (const key in this.annexForm.controls) {
this.annexForm.controls[key].markAsPristine();
this.annexForm.controls[key].updateValueAndValidity();
}
}
// 附件弹窗确定添加按钮
handlePatchOk(value: any): void {
// 校验类型选择与必填
if (value.patchName == null || value.patchName == '') {
this.message.create('error', `请填写附件名称!`);
return;
}
if (value.sort == null || value.sort == '') {
this.message.create('error', `请填写附件排序,越小越靠前!`);
return;
}
if (value.patchType == '1') {
if (this.imageSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传图片类型的附件!`);
return;
}
} else if (value.patchType == '2') {
if (this.audioSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传音频类型的附件!`);
return;
}
} else if (value.patchType == '3') {
if (this.videoSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传视频类型的附件!`);
return;
}
} else if (value.patchType == '4') {
if (this.applicationSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传文档类型的附件!`);
return;
}
} else if (value.patchType == '5') {
} else {
this.message.create('error', `请选择附件类型!`);
return;
}
if (this.patchPath == null || this.patchPath == '') {
this.message.create('error', `请上传附件!`);
return;
}
// 定义附件数据
const params = {
'contentId': this.contentSelect,
'patchName': value.patchName,
'patchDesc': value.patchDesc,
'patchType': value.patchType,
'patchPath': this.patchPath,
'source': 1,
'sort': value.sort,
'suffixName': this.suffix,
'addTime': new Date()
};
/** 确定等待 **/
this.http.post(this.WEB_SERVE_URL + '/cmsPatch/addPatch', params).subscribe(data => {
this.cms.insertCmsContent(this.validateForm.value , data => {
if (data['return_code'] === '000000') {
this.isVisible = false;
this.isOkLoading = false;
this.fileList = [];
this.patchTypeCheck = '0';
this.findPatchByContent(this.contentSelect);
this.message.create('success', `新增成功!`);
this.getRequest(false, this.searchForm.value);
this.message.success('新增成功');
} else {
this.message.create('warning', data['return_msg']);
this.message.create('error', '修改失败');
}
}, error => {
this.message.create('error', `未知错误!`);
});
}
// 弹出发布附件
addPush(id, categoryId) {
this.findModuleByCategory(categoryId);
this.pushId = id;
// document.getElementById('resetPush').click();
this.isPublish = true;
}
// 取消发布
handleCancelPush(): void {
this.isPublish = false;
this.moduleId = '';
this.pushId = '';
/** 隐藏弹框 **/
// 图片查看
handlePreview = async (file: NzUploadFile) => {
if (!file.url && !file.preview) {
// tslint:disable-next-line:no-non-null-assertion
file.preview = await getBase64(file.originFileObj!);
}
// 附件弹窗确定添加按钮
handlePushOk(value: any): void {
console.log('发布');
console.log(this.pushId);
console.log(this.moduleId);
console.log(value.moduleId);
if (this.pushId == null || this.pushId == '') {
this.message.create('error', '请重新选择发布的内容!');
return;
}
if (this.moduleId == null || this.moduleId == undefined) {
this.moduleId = '';
this.previewImage = file.url || file.preview;
this.previewVisible = true;
}
// 定义附件数据
const params = {
'id': this.pushId,
'status': 2,
'moduleId': this.moduleId
};
/** 确定等待 **/
this.http.post(this.WEB_SERVE_URL + '/cmsContent/updateStatusOfContent', params).subscribe(data => {
showDeleteConfirmDelete(id: number): void {
this.common.showConfirm('是否确定删除!' , dataR => {
if (dataR) {
this.cms.deleteById(id, data => {
if (data['return_code'] === '000000') {
this.isPublish = false;
this.isPushOkLoading = false;
this.moduleId = '';
this.pushId = '';
this.getRequest();
this.message.create('success', `发布成功!`);
this.getRequest(true, this.searchForm.value);
this.message.success(data['return_data']);
} else {
this.message.create('warning', data['return_msg']);
this.message.error(data['return_msg']);
}
}, error => {
this.message.create('error', `未知错误!`);
});
}
/** 清空模板 **/
emptyPushForm(e: MouseEvent): void {
e.preventDefault();
this.pushForm.reset();
for (const key in this.pushForm.controls) {
this.pushForm.controls[key].markAsPristine();
this.pushForm.controls[key].updateValueAndValidity();
}
});
}
// 根据内容分类查询可使用的模板列表
findModuleByCategory(categoryId) {
this.http.get(this.WEB_SERVE_URL + '/cmsCategoryModule/getModuleByCategoryId?categoryId=' + categoryId).subscribe(data => {
if (data['return_code'] === '000000') {
this.selectModule = data['return_data'];
console.log(this.selectModule);
public getForbiddenUser(id, status: any): void {
const message = (status === 2 ? '是否下架当前内容' : '是否上架当前内容');
const s = status === 2 ? 1 : 2;
this.common.showConfirm(message, data => {
if (data) {
this.cms.updateContentStatus(id, s , dataUser => {
if (dataUser['return_code'] === '000000') {
this.message.success(dataUser['return_data']);
} else {
this.message.create('error', data['return_msg']);
this.message.error(dataUser['return_msg']);
}
this.getRequest(false , this.searchForm.value);
});
}
showDown(id): void {
this.modalService.confirm({
nzTitle: '是否确定下线',
nzOkText: '是',
nzOnOk: () => this.DownContent(id),
nzCancelText: '否',
});
}
// 下线
DownContent(id) {
// 定义附件数据
const params = {
'id': id,
'status': 1
};
/** 确定等待 **/
this.http.post(this.WEB_SERVE_URL + '/cmsContent/updateStatusOfContent', params).subscribe(data => {
if (data['return_code'] === '000000') {
this.getRequest();
this.message.create('success', `下线成功!`);
} else {
this.message.create('warning', data['return_msg']);
}
}, error => {
this.message.create('error', `未知错误!`);
});
}
}

@ -11,17 +11,20 @@ import {CmsContentViewComponent} from './cms-content-view/cms-content-view.compo
import {CmsCategoryModuleComponent} from './cms-category-module/cms-category-module.component';
import {CmsContentAddComponent} from './cms-content-add/cms-content-add.component';
import {CmsContentComponent} from './cms-content/cms-content.component';
import { ContentEditComponent } from './content-edit/content-edit.component';
import {AppCommonModule} from "../../app-common.module";
@NgModule({
declarations: [CmsCategoryComponent, CmsCategoryModuleComponent, CmsContentComponent, CmsContentAddComponent, CmsContentEditComponent, CmsContentViewComponent],
declarations: [CmsCategoryComponent, CmsCategoryModuleComponent, CmsContentComponent, CmsContentAddComponent, CmsContentEditComponent, CmsContentViewComponent, ContentEditComponent],
imports: [
CommonModule,
CmsRoutingModule,
FormsModule,
NgZorroAntdModule,
ReactiveFormsModule,
NgxNeditorModule
NgxNeditorModule,
AppCommonModule
]
})
export class CmsModule { }

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-content-edit',
templateUrl: './content-edit.component.html',
styleUrls: ['./content-edit.component.scss']
})
export class ContentEditComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -180,8 +180,8 @@
</nz-form-control>
</nz-form-item>
<nz-form-item >
<nz-form-label [nzSpan]="6" nzRequired>第三方产品</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择第三方产品!">
<nz-form-label [nzSpan]="6" nzRequired>有效期</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择有效期!">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm:ss' }" formControlName="time"></nz-range-picker>
</nz-form-control>
</nz-form-item>

@ -62,6 +62,7 @@
<tr>
<th nzWidth="60px">编号</th>
<!-- <th nzWidth="90px">产品类型</th>-->
<th nzWidth="90px">产品类型</th>
<th nzWidth="90px">产品名称</th>
<th nzWidth="90px">利润比例</th>
<th nzWidth="120px">积分抵扣比例</th>
@ -76,8 +77,9 @@
<td>{{i + 1}}</td>
<!-- <td>{{data.productType == 1 ? '星巴克' : '肯德基'}}</td>-->
<td>{{data.productName}}</td>
<td>{{data.discount + "%"}}</td>
<td>{{data.integralDiscount + "%"}}</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>
<td>{{data.productPlatformString.substring(0 , data.productPlatformString.length - 1)}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
@ -103,6 +105,16 @@
<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-select>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="validateForm.value['productType'] == 4">
<nz-form-label [nzSpan]="6" nzRequired>卡券来源</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择卡券来源!">
<nz-select nzShowSearch nzAllowClear formControlName="productId" nzPlaceHolder="请选择卡券来源!">
<nz-option *ngFor="let item of couponSource" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -130,7 +142,7 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-item *ngIf="validateForm.value['productType'] == 1 || validateForm.value['productType'] == 2 || validateForm.value['productType'] == 3">
<nz-form-label [nzSpan]="6" nzRequired>利润比例</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入利润比例!">
<nz-input-number

@ -32,6 +32,7 @@ export class ThirdProductComponent implements OnInit {
loading = true;
isVisible = false;
isVisibleProduct = false;
couponSource;
id: number;
edit = false;
payPrice;
@ -75,7 +76,9 @@ export class ThirdProductComponent implements OnInit {
this.common.getDictionary('SHOW_PLATFORM ', data => {
this.productPlatformArray = data['return_data'];
});
this.common.getDictionary('COUPON_SOURCE', data => {
this.couponSource = data['return_data'];
});
}
@ -85,11 +88,12 @@ export class ThirdProductComponent implements OnInit {
productName: [null],
});
this.validateForm = this.form.group({
discount: [null, [Validators.required]],
discount: [null],
integralDiscount: [0],
productPlatform: [null, [Validators.required]],
payType: [null, [Validators.required]],
productType: [null, [Validators.required]],
productId: [null],
productName: [null],
});

@ -12,6 +12,14 @@
<nz-content class="inner-content">
<form nz-form [formGroup]="validateForm" class="ant-advanced-search-form">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'couponKey'">卡券key</nz-form-label>
<nz-form-control nzErrorTip="请输入卡券名称!">
<input nz-input placeholder="请输入卡券key..." [formControlName]="'couponKey'" id="'couponKey'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'couponName'" nzRequired>卡券名称</nz-form-label>
@ -36,15 +44,11 @@
<nz-form-label [nzFor]="'couponSource'" >卡券来源</nz-form-label>
<nz-form-control nzErrorTip="请选择卡券来源!">
<nz-select [nzDisabled]="editFlag" nzPlaceHolder="请选择卡券来源" [formControlName]="'couponSource'">
<nz-option nzValue="1" nzLabel="中石化"></nz-option>
<nz-option nzValue="2" nzLabel="消费券"></nz-option>
<nz-option nzValue="4" nzLabel="贵州中石化"></nz-option>
<nz-option nzValue="3" nzLabel="其他卡券"></nz-option>
<nz-option *ngFor="let item of couponSource" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8" *ngIf="validateForm.value.couponSource !== '2'">
<nz-form-item>
<nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label>

@ -49,11 +49,13 @@ export class CouponEditComponent implements OnInit {
content: string;
goodsTypeData;
brandData;
couponSource;
constructor(
private fb: FormBuilder,
private merchant: MerchantService,
private coupon: CouponService,
private common: CommonsService,
private commonsService: CommonsService,
private config: ConfigService,
private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute,
@ -104,7 +106,9 @@ export class CouponEditComponent implements OnInit {
this.config.getListGoodsType(params , data => {
this.goodsTypeData = data['return_data'].list;
});
this.commonsService.getDictionary('COUPON_SOURCE', data => {
this.couponSource = data['return_data'];
});
}
// 查询商户
@ -183,6 +187,7 @@ export class CouponEditComponent implements OnInit {
this.config.getBrandByList(params , data => {
this.brandData = data['return_data'].list;
});
}
// 查询卡券

@ -131,8 +131,7 @@ export class DiscountPackageEditComponent implements OnInit {
}
// 图片判断
// this.imgIsPost();
this.imgIsPost();
if (this.editFlag) {
this.validateForm.value.id = this.id;

@ -1,30 +1,30 @@
<!--<section>-->
<!-- 大家好!我是:{{currentUser}}-->
<!--</section>-->
<!--<section *ngFor="let msg of messages">-->
<!-- <section>{{msg}}</section>-->
<!--</section>-->
<!--<section>-->
<!-- 当前登录用户:{{users}}-->
<!--</section>-->
<!--<section>-->
<!-- <label>-->
<!-- <select name="type" [(ngModel)]="type">-->
<!-- <option value="all">发送给所有人</option>-->
<!-- <option value="single">发送给个人</option>-->
<!-- </select>-->
<!-- </label>-->
<!--</section>-->
<!--<section>-->
<!-- <label *ngIf="type === 'single'">-->
<!-- <select name="user" [(ngModel)]="sendToUser">-->
<!-- <option *ngFor="let person of users" [value]="person">{{person}}</option>-->
<!-- </select>-->
<!-- </label>-->
<!--</section>-->
<!--<p *ngIf="error">{{error | json}}</p>-->
<!--<p *ngIf="completed">completed!</p>-->
<!--<label>-->
<!-- <input type="text" [(ngModel)]="message">-->
<!--</label>-->
<!--<button (click)="send()">发送</button>-->
<section>
大家好!我是:{{currentUser}}
</section>
<section *ngFor="let msg of messages">
<section>{{msg}}</section>
</section>
<section>
当前登录用户:{{users}}
</section>
<section>
<label>
<select name="type" [(ngModel)]="type">
<option value="all">发送给所有人</option>
<option value="single">发送给个人</option>
</select>
</label>
</section>
<section>
<label *ngIf="type === 'single'">
<select name="user" [(ngModel)]="sendToUser">
<option *ngFor="let person of users" [value]="person">{{person}}</option>
</select>
</label>
</section>
<p *ngIf="error">{{error | json}}</p>
<p *ngIf="completed">completed!</p>
<label>
<input type="text" [(ngModel)]="message">
</label>
<button (click)="send()">发送</button>

@ -37,7 +37,7 @@ export class TestComponent implements OnInit {
ngOnInit(): void {
console.log(this.currentUser);
// 连接websocket
// this.webSocketService.connect(`ws://139.159.177.244:9302/brest/WebSocket/` + this.currentUser);
this.webSocketService.connect(`ws://139.159.177.244:9302/brest/WebSocket/` + this.currentUser);
// 接收消息
this.webSocketService.messageSubject.subscribe(
data => {
@ -54,18 +54,18 @@ export class TestComponent implements OnInit {
);
}
// send() {
// // 创建消息对象
// const msg = {
// msg: this.message, // 消息内容
// type: this.type === SEND_TYPE.ALL ? SEND_TYPE.ALL : SEND_TYPE.SINGLE, // 类型
// to: this.type === SEND_TYPE.SINGLE ? this.sendToUser : undefined // 要发送的对象
// };
// // 发送
// this.webSocketService.sendMessage(JSON.stringify(msg));
// // 发送完成,情况message内容
// this.message = '';
// }
send() {
// 创建消息对象
const msg = {
msg: this.message, // 消息内容
type: this.type === SEND_TYPE.ALL ? SEND_TYPE.ALL : SEND_TYPE.SINGLE, // 类型
to: this.type === SEND_TYPE.SINGLE ? this.sendToUser : undefined // 要发送的对象
};
// 发送
this.webSocketService.sendMessage(JSON.stringify(msg));
// 发送完成,情况message内容
this.message = '';
}
}

@ -75,7 +75,7 @@
<th nzWidth="80px">门店名称</th>
<th nzWidth="100px">门店电话</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="160px" nzRight="0px">操作</th>
<th nzWidth="80px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
@ -87,15 +87,18 @@
<td>{{data.telephone}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)">详情</a>
<nz-divider nzType="vertical"></nz-divider>
<a *ngIf="'BTN_add_blance' | button" (click)="getRecharge(data.id)">增加余额</a>
<nz-divider *ngIf="'BTN_add_blance' | button" nzType="vertical"></nz-divider>
<a (click)="getDelete(data.id)">删除</a>
<nz-divider nzType="vertical"></nz-divider>
<a [routerLink]="['/admin/device/list']" [queryParams]="{ merStoreId: data.id}">设备管理</a>
<a nz-dropdown [nzDropdownMenu]="menu">更多操作</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li class="li-a" nz-menu-item><a (click)="getEdit(data.id)">编辑</a></li>
<li class="li-a" nz-menu-item><a (click)="getDetail(data.id)">详情</a></li>
<li class="li-a" nz-menu-item><a *ngIf="data.type == 1" (click)="getQrCode(data.storeKey)">下载油站二维码</a></li>
<li class="li-a" nz-menu-item><a *ngIf="'BTN_add_blance' | button" (click)="getRecharge(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>
</nz-dropdown-menu>
</td>
</tbody>
</nz-table>

@ -137,6 +137,17 @@ export class StoreListComponent implements OnInit {
}).then(r => console.log(r));
}
// 下载二维码
public getQrCode(storeKey: string): void {
this.merchantStore.getQrCode(storeKey, data => {
if (data['return_code'] === '000000') {
window.location.href = data['return_data'];
} else {
this.message.warning(data['return_msg']);
}
});
}
handleCancelError(): void {
this.errorStudentVisible = false;
}

@ -0,0 +1,190 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!-- start 搜索条件 -->
<div [@openClose]="isCollapse ? 'open' : 'closed'">
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">交易单号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="orderNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">客户电话</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="memPhone" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">交易状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="status" nzAllowClear>
<nz-option *ngFor="let item of orderStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row *ngIf="isCollapse">
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1">
<nz-form-item>
<nz-form-label [nzSpan]="8">分公司</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch formControlName="companyId" nzAllowClear>
<nz-option *ngFor="let item of companyArray" nzValue="{{item['id']}}" nzLabel="{{item['name']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付方式</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="payType">
<nz-option nzValue="1" nzLabel="支付宝"></nz-option>
<nz-option nzValue="2" nzLabel="微信"></nz-option>
<nz-option nzValue="3" nzLabel="积分抵扣"></nz-option>
<nz-option nzValue="4" nzLabel="汇联通工会卡"></nz-option>
<nz-option nzValue="5" nzLabel="银联"></nz-option>
<nz-option nzValue="6" nzLabel="银联分期"></nz-option>
<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 [nzSpan]="8">支付卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="memCardNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
[nzShowTime]="{ nzHideDisabledOptions: true }"
formControlName="payTimeArray"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">创建时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
[nzShowTime]="{ nzHideDisabledOptions: true }"
formControlName="createTimeArray"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">退款时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
[nzShowTime]="{ nzHideDisabledOptions: true }"
formControlName="refundTimeArray"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="searchForm.reset();"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
<a class="collapse" (click)="isCollapse = !isCollapse;">{{!isCollapse ? '更多条件' : '隐藏条件'}}<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i></a>
</div>
</div>
</form>
</div>
</div>
<!-- end 搜索条件 -->
<!--列表数据-->
<div class="inner-content">
<span>共计 {{total?total:0}} 条数据</span>
<div class="operating-button">
<!-- <button nz-button nzType="primary" class="right-btn" (click)="exportExcel()" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button>-->
</div>
<!--数组表格 -->
<nz-table #basicTable
nzShowPagination
nzShowSizeChanger
nzBordered
[nzData]="requestData"
[nzTotal]="total"
[nzLoading]="loading"
[nzFrontPagination]="false"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)"
[nzPageSizeOptions]="[10,20,50,100]"
[nzScroll]="{ x: '1200px'}">
<thead>
<tr>
<th nzWidth="200px">交易单号</th>
<th nzWidth="130px">客户电话</th>
<th nzWidth="200px">订单名称</th>
<th nzWidth="100px">订单金额</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="140px">支付卡号</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="180px">创建时间</th>
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.orderNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.title}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderStatus | orderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<!-- <li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>-->
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>

@ -0,0 +1,118 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {ADMIN_INFO_OBJECT} from '../../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../../services/local-storage.service';
import {CompanyService} from '../../../../services/company.service';
import {CommonsService} from '../../../../services/commons.service';
import {animate, state, style, transition, trigger} from '@angular/animations';
import {OrderKfcService} from '../../../../services/order/order-kfc.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'app-kfc-order-list',
animations: [
trigger('openClose', [
state('open', style({
height: '260px',
opacity: 1,
backgroundColor: 'white'
})),
state('closed', style({
opacity: 1,
backgroundColor: 'white'
})),
transition('open => closed', [
animate('0.3s')
]),
transition('closed => open', [
animate('0.3s')
]),
]),
],
templateUrl: './kfc-order-list.component.html',
styleUrls: ['./kfc-order-list.component.scss']
})
export class KfcOrderListComponent implements OnInit {
// 搜索框
searchForm: FormGroup;
// 搜索框折叠
isCollapse = false;
// 订单状态数据
orderStatusArray = [];
// 公司数据
companyArray = [];
// 角色类型
roleType: number;
// 列表相关参数
// 总条数
total: number;
// 页码
pageNum = 1;
// 条码
pageSize = 10;
// 列表数据
requestData = [];
// 列表加载
loading = true;
constructor(
private form: FormBuilder,
private store: LocalStorageService,
private message: NzMessageService,
private kfcOrder: OrderKfcService,
private companyService: CompanyService,
private commonsService: CommonsService,
) { }
ngOnInit(): void {
// 搜索表单初始化
this.searchForm = this.form.group({
orderNo: [null],
memPhone: [null],
payTimeArray: [null],
status: [null],
createTimeArray: [null],
refundTimeArray: [null],
companyId: [null],
payType: [null],
memCardNo: [null],
});
// 角色类型初始化
this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType);
// 查询公司列表
if (this.roleType === 0 || this.roleType === 1) {
this.companyService.selectCompanyList({ pageNum: 1, pageSize: 999 }, data => {
this.companyArray = data['return_data']['list'];
});
}
// 查询订单状态数据
this.commonsService.getDictionary('ORDER_OIL_STATUS', data => {
this.orderStatusArray = data['return_data'];
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = true;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.kfcOrder.getOrderKfcList(whereObject, data => {
this.loading = false;
if (data['return_code'] === '000000') {
console.log(data);
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -0,0 +1,182 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}">
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">订单号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="orderNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">客户电话</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="memPhone" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">卡券名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="couponName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="couponName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付方式</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="payType">
<nz-option nzValue="1" nzLabel="支付宝"></nz-option>
<nz-option nzValue="2" nzLabel="微信"></nz-option>
<nz-option nzValue="3" nzLabel="积分抵扣"></nz-option>
<nz-option nzValue="4" nzLabel="汇联通工会卡"></nz-option>
<nz-option nzValue="5" nzLabel="银联"></nz-option>
<nz-option nzValue="6" nzLabel="银联分期"></nz-option>
<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 [nzSpan]="8">订单状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="orderStatus">
<nz-option nzValue="1" nzLabel="待支付"></nz-option>
<nz-option nzValue="2" nzLabel="已支付"></nz-option>
<nz-option nzValue="3" nzLabel="已完成"></nz-option>
<nz-option nzValue="4" nzLabel="已退款"></nz-option>
<nz-option nzValue="5" nzLabel="已取消"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">创建时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker [nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" formControlName="createTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker [nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" formControlName="payTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">完成时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker [nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" formControlName="finishTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="exportExcel()" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button>
</div>
<!--数组表格 -->
<nz-table #basicTable
[nzData]="dataObject.list"
[nzTotal]="dataObject.total"
[nzFrontPagination]="false"
[nzLoading]="tableLoading"
[nzPageIndex]="whereObject.pageNum"
(nzPageIndexChange)="requestData($event)"
[nzScroll]="{ x: '1100px'}">
<thead>
<tr>
<th nzWidth="60px">序号</th>
<th nzWidth="200px">订单号</th>
<th nzWidth="120px">客户电话</th>
<th nzWidth="200px">卡券名称</th>
<th nzWidth="100px">订单总额</th>
<th nzWidth="100px">优惠金额</th>
<th nzWidth="100px">应付金额</th>
<th nzWidth="100px">积分抵扣</th>
<th nzWidth="100px">实付金额</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="140px">支付卡号</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="180px">创建时间</th>
<th nzWidth="180px">支付时间</th>
<th nzWidth="180px">完成时间</th>
<!-- <th nzWidth="110px" nzRight="0px">操作</th>-->
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i+1}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.couponName}}</td>
<td>{{data.totalPrice}}</td>
<td>{{data.deductionPrice}}</td>
<td>{{data.payablePrice}}</td>
<td>{{data.payGold / 100}}</td>
<td>{{data.payPrice}}</td>
<td>{{data.payType}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<!-- <td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item ><a>二维码</a></li>
</ul>
</nz-dropdown-menu>
</td>-->
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>

@ -0,0 +1,134 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {GasStaffService} from '../../../services/gas-staff.service';
import {CommonsService} from '../../../services/commons.service';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {OrderService} from '../../../services/order.service';
@Component({
selector: 'app-order-coupon-list',
templateUrl: './order-coupon-list.component.html',
styleUrls: ['./order-coupon-list.component.scss']
})
export class OrderCouponListComponent implements OnInit {
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
positionTypeArray = [];
gasStaffQrCodeImgUrl: string;
gasStaffQrCodeModal = false;
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private orderService: OrderService,
private commonsService: CommonsService,
private router: Router,
private form: FormBuilder) {
this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType);
this.adminFlag = Number(this.store.get(ADMIN_INFO_OBJECT)['secUser'].adminFlag);
}
ngOnInit(): void {
this.searchForm = this.form.group({
orderNo: [null],
memPhone: [null],
couponName: [null],
payType: [null],
orderStatus: [null],
createTime: [null],
payTime: [null],
finishTime: [null],
});
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.orderService.getOrderCouponList(this.whereObject, data => {
if (data['return_code'] === '000000') {
this.dataObject = data['return_data'];
} else {
this.modal.error(data['return_msg']);
}
this.tableLoading = false;
});
}
/**
*
* @param whereObject
*/
search(whereObject: object) {
if (whereObject['createTime'] != null) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
} else {
whereObject['createTimeS'] = null;
whereObject['createTimeE'] = null;
}
if (whereObject['payTime'] != null) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
} else {
whereObject['payTimeS'] = null;
whereObject['payTimeE'] = null;
}
if (whereObject['finishTime'] != null) {
whereObject['finishTimeS'] = whereObject['finishTime'][0].getTime();
whereObject['finishTimeE'] = whereObject['finishTime'][1].getTime();
} else {
whereObject['finishTimeS'] = null;
whereObject['finishTimeE'] = null;
}
this.whereObject = whereObject;
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
/**
* Excel
*/
exportExcel(): void {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
this.orderService.exportOrderCouponExcel(this.whereObject, data => {
this.loadingObject.spinning = false;
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
}
});
}
}

@ -97,7 +97,7 @@ export class OrderListComponent implements OnInit {
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.order.getOrderCouponList(whereObject, data => {
this.order.getGoodsOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;

@ -14,6 +14,7 @@ import {PackageRecordListComponent} from './package-record-list/package-record-l
import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component';
import {OilStationOrderComponent} from './oil-station-order/oil-station-order.component';
import {OrderCouponListComponent} from './order-coupon-list/order-coupon-list.component';
const routes: Routes = [
@ -22,6 +23,7 @@ const routes: Routes = [
{ path: 'order-detail', component: OrderDetailComponent },
{ path: 'order-coupons', component: OrderCouponsComponent },
{ path: 'order-coupon', component: OrderCouponComponent },
{ path: 'order-coupon-list', component: OrderCouponListComponent },
{ path: 'order-c-list', component: OrderCListComponent },
{ path: 'order-k-list', component: OrderKListComponent },
{ path: 'order-h-list', component: OrderHListComponent },

@ -23,9 +23,10 @@ import { DiscountUseConditionListComponent } from './discount-use-condition-list
import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component";
import {NzSpaceModule} from "ng-zorro-antd/space";
import { OilStationOrderComponent } from './oil-station-order/oil-station-order.component';
import { OrderCouponListComponent } from './order-coupon-list/order-coupon-list.component';
@NgModule({
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent],
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent, OrderCouponListComponent],
imports: [
CommonModule,
OrderRoutingModule,

@ -1,6 +1,10 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {IconService} from '../../../services/icon.service';
<<<<<<< HEAD
=======
import {CommonsService} from '../../../services/commons.service';
>>>>>>> dev
import {DistributionService} from '../../../services/distribution.service';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';

@ -0,0 +1,179 @@
<!--面包屑-->
<nz-breadcrumb>
<nz-breadcrumb-item>
内容管理
</nz-breadcrumb-item>
<nz-breadcrumb-item>
内容发布
</nz-breadcrumb-item>
</nz-breadcrumb>
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">站内信标题</nz-form-label>
<nz-form-control [nzSpan]="16">
<input formControlName="title" name="title" nz-input placeholder="请输入站内信标题!" nzSize="default">
</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 class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择站内信类型" formControlName="type">
<nz-option nzLabel="请选择站内信类型" nzValue=""></nz-option>
<nz-option nzLabel="服务通知" nzValue="1"></nz-option>
<nz-option nzLabel="支付信息" nzValue="2"></nz-option>
<nz-option nzLabel="客服信息" nzValue="3"></nz-option>
</nz-select>
</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 class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择跳转类型" formControlName="jumpType">
<nz-option nzLabel="请选择跳转类型" nzValue=""></nz-option>
<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-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getAdd()" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
</div>
<nz-table
class="table"
#ajaxTable
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="80px">序号</th>
<th nzWidth="100px">标题</th>
<th nzWidth="80px">类型</th>
<th nzWidth="80px">跳转类型</th>
<th nzWidth="80px">消息类型</th>
<th nzWidth="80px">内容</th>
<th nzWidth="80px">状态</th>
<th nzWidth="120px">创建时间</th>
<th nzRight="0px" nzAlign="left" nzWidth="100px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.title}}</td>
<td>{{data.type | msgType : 1 }}</td>
<td>{{data.jumpType | msgType : 2 }}</td>
<td>{{data.msgType | msgType : 3 }}</td>
<td>{{data.content}}</td>
<td>{{data.status == 1? '编辑中': '已发布'}}</td>
<td>{{data.createTime | date:'yyyy-MM-dd hh:mm:ss' }}</td>
<td nzRight class="table-td-operation">
<a *ngIf="data.status == 1" nz-dropdown [nzDropdownMenu]="menu">更多操作<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a (click)="getEdit(data)">查看</a></li>
<li nz-menu-item><a (click)="getForbiddenUser(data.id)">发布</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="编辑内容" nzWidth="700" [nzFooter]="modalFooter" (nzOnCancel)="isVisible = false">
<form nz-form [formGroup]="validateForm" class="login-form">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>内容标题</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入内容标题">
<input nz-input formControlName="title" placeholder="请输入内容标题!" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" >类型</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入类型">
<nz-select [nzDisabled]="editFlag" nzShowSearch nzAllowClear nzPlaceHolder="请选择类型" formControlName="type">
<nz-option nzLabel="服务通知" [nzValue]="1"></nz-option>
<nz-option nzLabel="支付信息" [nzValue]="2"></nz-option>
<nz-option nzLabel="客服信息" [nzValue]="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" >跳转类型</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转类型">
<nz-select [nzDisabled]="editFlag" nzShowSearch nzAllowClear nzPlaceHolder="请选择跳转类型" formControlName="jumpType">
<nz-option nzLabel="外部链接" [nzValue]="2"></nz-option>
<nz-option nzLabel="内部链接" [nzValue]="3"></nz-option>
<nz-option nzLabel="客服信息" [nzValue]="4"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>{{validateForm.value['jumpType'] == 4 ? '消息内容':'跳转路径'}}</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入{{validateForm.value['jumpType'] == 4 ? '消息内容':'跳转路径'}}">
<input nz-input formControlName="content" placeholder="请输入{{validateForm.value['jumpType'] == 4 ? '消息内容':'跳转路径'}}!" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">信息图片</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-upload
nzAction="{{POST_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="imgFile"
[nzShowButton]="imgFile.length < 1"
[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>
</form>
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="isVisible = false">取消</button>
<button *ngIf="!editFlag" nz-button nzType="primary" (click)="handleOk()">提交</button>
</ng-template>
</nz-modal>

@ -0,0 +1,180 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
import {NzMessageService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {MsgService} from '../../../services/msg.service';
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
@Component({
selector: 'app-system-msg',
templateUrl: './system-msg.component.html',
styleUrls: ['./system-msg.component.scss']
})
export class SystemMsgComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
POST_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
nodes = []; // 类型树
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
editFlag = false;
isVisible = false;
imgFile = [];
previewImage: string | undefined = '';
previewVisible = false;
id: number;
constructor(
private fb: FormBuilder,
private http: HttpClient, // http请求
private message: NzMessageService, // 信息提示
private router: Router,
private common: CommonsService,
private msg: MsgService
) {
this.WEB_SERVE_URL = environment.baseUrl;
}
ngOnInit() {
this.searchForm = this.fb.group({
type: [null],
jumpType: [null],
title: [null],
});
this.validateForm = this.fb.group({
type: [null, [Validators.required]],
title: [null, [Validators.required]],
jumpType: [null, [Validators.required]],
content: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.msg.getMsgByList(whereObject, data => {
console.log(data);
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 新增
getAdd() {
this.isVisible = true;
this.editFlag = false;
}
// 编辑
getEdit(data: object) {
console.log(data);
if (data['image'] != null && data['image'] !== '') {
const logo = String(data['image']);
const logoArray = [];
logoArray.push(
{
uid: 1,
name: logo,
status: 'done',
url: environment.imageUrl + logo
});
this.imgFile = logoArray;
}
this.id = data['id'];
this.validateForm.patchValue(data);
this.editFlag = true;
this.isVisible = true;
}
// 提交内容
handleOk() {
// tslint:disable-next-line:forin
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
if (this.validateForm.controls[i].errors != null) {
this.message.error('必填项不能为空');
return;
}
}
if (this.imgFile.length !== 0) {
if (this.imgFile[0]['response'] != null) {
this.validateForm.value.image = this.imgFile[0]['response']['return_data'][0];
} else {
this.validateForm.value.image = this.imgFile[0].name;
}
}
this.msg.insertMsg(this.validateForm.value , data => {
if (data['return_code'] === '000000') {
this.isVisible = false;
this.getRequest(false, this.searchForm.value);
this.message.success('新增成功');
} else {
this.message.create('error', '修改失败');
}
});
}
// 图片查看
handlePreview = async (file: NzUploadFile) => {
if (!file.url && !file.preview) {
// tslint:disable-next-line:no-non-null-assertion
file.preview = await getBase64(file.originFileObj!);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
}
public getForbiddenUser(id): void {
const message = '是否发布';
this.common.showConfirm(message, data => {
if (data) {
this.msg.pushMsg(id, dataUser => {
if (dataUser['return_code'] === '000000') {
this.message.success(dataUser['return_data']);
} else {
this.message.error(dataUser['return_msg']);
}
this.getRequest(false , this.searchForm.value);
});
}
});
}
}

@ -10,12 +10,14 @@ import {PositionRelComponent} from './position-rel/position-rel.component';
import {SinopecConfigComponent} from './sinopec-config/sinopec-config.component';
import {SinopecEditComponent} from './sinopec-edit/sinopec-edit.component';
import {OilsDiscountComponent} from './oils-discount/oils-discount.component';
import {SystemMsgComponent} from './system-msg/system-msg.component';
const routes: Routes = [
{ path: 'systemorganization', component: SystemOrganizationComponent},
{ path: 'systemrole', component: SystemRoleComponent},
{ path: 'systemrole-show', component: SystemRoleShowComponent},
{ path: 'systemuser', component: SystemUserComponent },
{ path: 'msg', component: SystemMsgComponent },
{ path: 'menu', component: MenuComponent },
{ path: 'permission', component: PermissionComponent },
{ path: 'positionrel', component: PositionRelComponent },

@ -19,8 +19,9 @@ import {AppCommonModule} from '../../app-common.module';
import { SinopecConfigComponent } from './sinopec-config/sinopec-config.component';
import { SinopecEditComponent } from './sinopec-edit/sinopec-edit.component';
import { OilsDiscountComponent } from './oils-discount/oils-discount.component';
import { SystemMsgComponent } from './system-msg/system-msg.component';
@NgModule({
declarations: [SystemOrganizationComponent, SystemRoleComponent, SystemRoleShowComponent, SystemUserComponent, MenuComponent, PermissionComponent, PositionRelComponent, SinopecConfigComponent, SinopecEditComponent, OilsDiscountComponent],
declarations: [SystemOrganizationComponent, SystemRoleComponent, SystemRoleShowComponent, SystemUserComponent, MenuComponent, PermissionComponent, PositionRelComponent, SinopecConfigComponent, SinopecEditComponent, OilsDiscountComponent, SystemMsgComponent],
imports: [
CommonModule,
SystemRoutingModule,

@ -1,147 +0,0 @@
import {
FormsModule,
ReactiveFormsModule,
} from '@angular/forms';
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {NgxNeditorModule} from '@notadd/ngx-neditor';
// 管道
import {
TimesPipe,
TextareaPipe,
SystemPipe,
CouponStatusPipe,
CouponCodePipe,
AuditTypePipe,
AuditStatusPipe,
PaymodelPipe,
PaytypePipe,
DiscountTypePipe,
OrderCouponStatusPipe,
DiscountStatusPipe,
DisplayAreaPipe,
DiscountCodeStatusPipe,
RechargePricePipe,
RechargeStatusPipe,
ChannelMarkPipe,
TypePipe,
StatusPipe,
RechargePayTypePipe,
RefundSourcePipe,
RefundStatusPipe,
PreOrderStatusPipe,
ButtonPipe,
DiscountPackageStatusPipe,
PriceShowPipe,
ShowTypePipe,
EnergyTypePipe,
CompanyAmountRecordTypePipe,
CompanyAmountRecordSourceTypePipe,
OilCardBindStatusPipe,
OilCardRecordTypePipe,
OilCardRecordSourceTypePipe,
RechargePlatformPipe,
PriceStatusPipe,
GasStaffStatusPipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, OrderStatusPipe, OrderPayTypePipe, OrderChildGoodsTypePipe
} from './pipes';
import {OilCardStatusPipe} from './pipes';
import {OilTypePipe} from './pipes/store/oil-type.pipe';
import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe';
import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.pipe';
import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-price-type.pipe';
import { PlatformPipe } from './pipes/recharge-pipe/platform.pipe';
import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
import {OrderOilStatusPipe} from './pipes/order/order-oil-status.pipe';
const PIPES = [
TimesPipe,
TextareaPipe,
SystemPipe,
CouponStatusPipe,
CouponCodePipe,
AuditTypePipe,
AuditStatusPipe,
OrderCouponStatusPipe,
PaymodelPipe,
PaytypePipe,
DiscountTypePipe,
DiscountStatusPipe,
DisplayAreaPipe,
DiscountCodeStatusPipe,
RechargePricePipe,
RechargeStatusPipe,
ChannelMarkPipe,
ChannelMarkPipe,
TypePipe,
StatusPipe,
RechargePayTypePipe,
RefundSourcePipe,
RefundStatusPipe,
PreOrderStatusPipe,
ButtonPipe,
DiscountPackageStatusPipe,
ShowTypePipe,
PriceShowPipe,
EnergyTypePipe,
CompanyAmountRecordTypePipe,
CompanyAmountRecordSourceTypePipe,
OilCardStatusPipe,
OilCardBindStatusPipe,
OilCardRecordTypePipe,
OilCardRecordSourceTypePipe,
GasStaffStatusPipe,
OilTypePipe,
RechargePlatformPipe,
PriceStatusPipe,
OilPriceTaskStatusPipe,
OilPriceTaskExecutionTypePipe,
OilPriceTaskPriceTypePipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
SourceTypePipe,
GasClassGroupTaskStatusPipe,
GasOrderStatusPipe,
PlatformPipe,
OrderOilStatusPipe,
OrderStatusPipe,
OrderPayTypePipe,
OrderChildGoodsTypePipe,
];
@NgModule({
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
NgZorroAntdModule,
NgxNeditorModule
],
declarations: [
...PIPES,
IntegralTypePipe,
IntegralProductPipe,
],
exports: [
...PIPES,
IntegralTypePipe,
IntegralProductPipe,
],
})
export class AppCommonModule {
static forRoot() {
return {
ngModule: AppCommonModule,
providers: [],
};
}
}

@ -45,3 +45,4 @@ export * from './order/order-oil-status.pipe';
export * from './order/order-status.pipe';
export * from './order/order-pay-type.pipe';
export * from './order/order-child-goods-type.pipe';
export * from './third-product/product-type.pipe';

@ -0,0 +1,30 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'msgType'
})
export class MsgTypePipe implements PipeTransform {
array = {
1: ['服务通知', '支付信息', '客服信息'],
2: ['订单详情' , '外部链接' , '内部链接' , '客服信息'],
3: ['个人信息' , '全局信息']
};
transform(type: number , product: number): string {
return this.array[product][type - 1];
}
// transform(object: string , objectName: string): string {
//
// console.log(object);
//
// const o = JSON.parse(object);
// if (typeof o == 'object') {
// return o[objectName];
// }
// return null;
// }
}

@ -12,11 +12,15 @@ export class PaytypePipe implements PipeTransform {
case 2:
return '微信';
case 3:
return '金币';
return '积分抵扣';
case 4:
return '汇联通工会卡';
return '贵州汇联通工会卡';
case 5:
return '银联';
case 6:
return '银联分期';
case 7:
return '嗨森逛油卡';
default:
return '未知';
}

@ -0,0 +1,20 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'productType'
})
export class ProductTypePipe implements PipeTransform {
array = {
1: ['星巴克'],
2: ['', '肯德基'],
3: ['', '', '第三方产品'],
4: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油'],
5: ['', '', '', '', '在线加油'],
};
transform(type: number , product: number): string {
return this.array[type][product - 1];
}
}

@ -15,8 +15,8 @@ export class CmsService {
/**
* cms内容
* @param paramObject
* @param callBack
* @param paramObject
* @param callBack
*/
getListContent(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'cmsContent/getListContent?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
@ -24,4 +24,91 @@ export class CmsService {
});
}
/**
* cms内容
* @param paramObject
* @param callBack
*/
getListCmsContent(paramObject: object, callBack) {
this.http.get(environment.baseUrl + 'cmsContent/getListCmsContent?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => {
callBack(data);
});
}
/**
* id查询详情
*
* @param roleType id
* @param callBack
*/
public getOwnCategoryTree(roleType: number, callBack) {
this.http.get(environment.baseUrl + 'cmsCategory/getOwnCategoryTree?roleType=' + roleType).subscribe(data => {
callBack(data);
});
}
/**
* cms内容
*
* @param params
* @param callBack
* @return data
*/
public insertCmsContent(params: object, callBack) {
this.http.post(environment.baseUrl + 'cmsContent/insertCmsContent', params).subscribe(data => {
callBack(data);
});
}
/**
* cms内容
*
* @param params
* @param callBack
* @return data
*/
public updateCmsContent(params: object, callBack) {
this.http.post(environment.baseUrl + 'cmsContent/updateCmsContent', params).subscribe(data => {
callBack(data);
});
}
/**
* id查询详情
*
* @param id id
* @param callBack
*/
public findById(id: number, callBack) {
this.http.get(environment.baseUrl + 'cmsContent/findById?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
* id删除内容
*
* @param id id
* @param callBack
*/
public deleteById(id: number, callBack) {
this.http.get(environment.baseUrl + 'cmsContent/deleteById?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param id id
* @param status status
* @param callBack
*/
public updateContentStatus(id: number, status: number, callBack) {
this.http.get(environment.baseUrl + 'cmsContent/updateContentStatus?id=' + id + '&status=' + status ).subscribe(data => {
callBack(data);
});
}
}

@ -100,6 +100,18 @@ export class MerchantStoreService {
});
}
/**
*
*
* @param storeKey id
* @param callBack
*/
public getQrCode(storeKey: string, callBack) {
this.http.get(environment.baseUrl + 'highMerchantStore/getQrCode?storeKey=' + storeKey).subscribe(data => {
callBack(data);
});
}
/**
*
*

@ -0,0 +1,52 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class MsgService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getMsgByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'bsMsg/getMsgByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public insertMsg(params: object, callBack) {
this.http.post(environment.baseUrl + 'bsMsg/insertMsg', params).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param iId id
* @param callBack
*/
public pushMsg(id: number, callBack) {
this.http.get(environment.baseUrl + 'bsMsg/pushMsg?id=' + id).subscribe(data => {
callBack(data);
});
}
}

@ -34,12 +34,36 @@ export class OrderService {
* @param paramsObject
* @param callBack
*/
public getOrderCouponList(paramsObject: object, callBack) {
public getGoodsOrderList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/getGoodsOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getOrderCouponList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/getOrderCouponList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public exportOrderCouponExcel(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/exportOrderCouponExcel?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*

@ -0,0 +1,29 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from '../commons.service';
import {environment} from "../../../environments/environment";
@Injectable({
providedIn: 'root'
})
export class OrderKfcService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* @Author Sum1Dream
* @methodName getOrderKfcList
* @Description // 查询肯德基订单
* @Date 17:20 2022/10/27
* @Param param
*/
public getOrderKfcList(param: object, callBack) {
this.http.get(environment.orderUrl + 'thirdParty/getOrderKfcList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}
Loading…
Cancel
Save