fix bug
This commit is contained in:
		@ -4,7 +4,7 @@
 | 
			
		||||
 * @Author       : Shiming
 | 
			
		||||
 * @Date         : 2021-12-24 15:54:08
 | 
			
		||||
 * @LastEditors  : Shiming
 | 
			
		||||
 * @LastEditTime : 2022-02-17 11:19:04
 | 
			
		||||
 * @LastEditTime : 2022-02-17 14:05:57
 | 
			
		||||
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\network-freight.component.html
 | 
			
		||||
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 | 
			
		||||
-->
 | 
			
		||||
@ -46,11 +46,10 @@
 | 
			
		||||
</nz-card>
 | 
			
		||||
 | 
			
		||||
<nz-card class="content-box">
 | 
			
		||||
    <!-- 工具栏 -->
 | 
			
		||||
    <div class="toolbar" style="float: right;
 | 
			
		||||
    padding-bottom: 15px;">
 | 
			
		||||
      <button nz-button nzType="primary" >新增</button>
 | 
			
		||||
    </div>
 | 
			
		||||
  <!-- 工具栏 -->
 | 
			
		||||
  <div class="toolbar" style="float: right; padding-bottom: 15px">
 | 
			
		||||
    <button nz-button nzType="primary">新增</button>
 | 
			
		||||
  </div>
 | 
			
		||||
  <st
 | 
			
		||||
    #st
 | 
			
		||||
    [scroll]="{ x: '2000px' }"
 | 
			
		||||
@ -61,34 +60,34 @@
 | 
			
		||||
    (change)="stChange($event)"
 | 
			
		||||
  >
 | 
			
		||||
    <ng-template st-row="costRate" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.costRate ? item?.costRate + '%' : '' }}</div>
 | 
			
		||||
      <div>{{ item?.costRate ? item?.costRate + '%' : '' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="goodsSurchargeRatio" let-item let-index="index">
 | 
			
		||||
      <div>货源单:{{item?.goodsSurchargeRatio ? item?.goodsSurchargeRatio + '%' : '' }}</div>
 | 
			
		||||
      <div>合同单:{{item?.contractSurchargeRatio ? item?.contractSurchargeRatio + '%' : '' }}</div>
 | 
			
		||||
      <div>货源单:{{ item?.goodsSurchargeRatio ? item?.goodsSurchargeRatio + '%' : '' }}</div>
 | 
			
		||||
      <div>合同单:{{ item?.contractSurchargeRatio ? item?.contractSurchargeRatio + '%' : '' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="ticketEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.ticketEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
      <div>{{ item?.ticketEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="insuranceEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.insuranceEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
      <div>{{ item?.insuranceEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="pinganEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.pinganEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
      <div>{{ item?.pinganEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="pufaEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.pufaEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
      <div>{{ item?.pufaEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="pinganAccountEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.pinganAccountEnable ? '已开启' : '未开启'  }}</div>
 | 
			
		||||
      <div>{{item?.pinganAccountEnable ? item?.pinganAccount : ''  }}</div>
 | 
			
		||||
      <div>{{ item?.pinganAccountEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
      <div>{{ item?.pinganAccountEnable ? item?.pinganAccount : '' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="pufaAccountEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.pufaAccountEnable ? '已开启' : '未开启'  }}</div>
 | 
			
		||||
      <div>{{item?.pufaAccountEnable ? item?.pufaAccount : ''  }}</div>
 | 
			
		||||
      <div>{{ item?.pufaAccountEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
      <div>{{ item?.pufaAccountEnable ? item?.pufaAccount : '' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="invoiceEnable" let-item let-index="index">
 | 
			
		||||
      <div>{{item?.invoiceEnable ? '已开启' : '未开启'  }}</div>
 | 
			
		||||
      <div>{{ item?.invoiceEnable ? '已开启' : '未开启' }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="bankName" let-item let-index="index">
 | 
			
		||||
      <a href="javascript:;" (click)="setMakeInvoice()">开通子账户</a>
 | 
			
		||||
@ -111,7 +110,20 @@
 | 
			
		||||
 | 
			
		||||
<nz-modal [(nzVisible)]="isVisibleTicket" [nzFooter]="nzModalFooterTiket" nzTitle="票务设置" (nzOnCancel)="handleCancelTicket()">
 | 
			
		||||
  <ng-container *nzModalContent>
 | 
			
		||||
    <sf #sfTicket [schema]="ticketSchema" [ui]="ui3" [formData]="formDataTicket" [compact]="false" [button]="'none'"> </sf>
 | 
			
		||||
    <div nz-row [nzGutter]="10" style="height: 600px; overflow-y: auto">
 | 
			
		||||
      <div nz-col [nzSpan]="6" style="position: relative;">
 | 
			
		||||
        <ul nz-menu nzMode="inline" class="card-height">
 | 
			
		||||
          <li nz-menu-item [nzSelected]="idx === 0" (click)="changeType(item)" *ngFor="let item of tabs; let idx = index">
 | 
			
		||||
            {{ item.name }}
 | 
			
		||||
          </li>
 | 
			
		||||
        </ul>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div nz-col [nzSpan]="18" style="overflow: scroll">
 | 
			
		||||
        <sf #sfTicket [schema]="ticketSchema" [ui]="ui3" *ngIf="!taxStatus" [formData]="formDataTicket" [compact]="false" [button]="'none'">
 | 
			
		||||
        </sf>
 | 
			
		||||
        <sf #sfTax [schema]="TaxSchema" [ui]="ui4" *ngIf="taxStatus" [formData]="formDataTax" [compact]="false" [button]="'none'"> </sf>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </ng-container>
 | 
			
		||||
  <ng-template #nzModalFooterTiket>
 | 
			
		||||
    <button nz-button nzType="primary" (click)="handleCancelTicket()" [disabled]="">取消</button>
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,27 @@
 | 
			
		||||
:host::ng-deep{
 | 
			
		||||
    .search-box{
 | 
			
		||||
        .ant-card-body{
 | 
			
		||||
            padding-bottom: 18px;
 | 
			
		||||
        }
 | 
			
		||||
:host {
 | 
			
		||||
    ::ng-deep {
 | 
			
		||||
      .card-height {
 | 
			
		||||
        min-height: 600px;
 | 
			
		||||
      }
 | 
			
		||||
  
 | 
			
		||||
      .save-btn {
 | 
			
		||||
        width     : 100%;
 | 
			
		||||
        text-align: right;
 | 
			
		||||
      }
 | 
			
		||||
  
 | 
			
		||||
      .block-radio {
 | 
			
		||||
        display   : flex;
 | 
			
		||||
        min-height: 32px;
 | 
			
		||||
      }
 | 
			
		||||
  
 | 
			
		||||
      input {
 | 
			
		||||
        width      : 100px;
 | 
			
		||||
        margin-left: 10px;
 | 
			
		||||
      }
 | 
			
		||||
  
 | 
			
		||||
      .ant-form-item-control-input-content {
 | 
			
		||||
        display: flex;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .content-box{
 | 
			
		||||
        .ant-card-body{
 | 
			
		||||
            padding-top: 14px;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
  
 | 
			
		||||
  }
 | 
			
		||||
@ -17,21 +17,30 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
  @ViewChild('sf', { static: false }) sf!: SFComponent;
 | 
			
		||||
  @ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
 | 
			
		||||
  @ViewChild('sfTicket', { static: false }) sfTicket!: SFComponent;
 | 
			
		||||
  @ViewChild('sfTax', { static: false }) sfTax!: SFComponent;
 | 
			
		||||
  ui: SFUISchema = {};
 | 
			
		||||
  ui2: SFUISchema = {};
 | 
			
		||||
  ui3: SFUISchema = {};
 | 
			
		||||
  ui4: SFUISchema = {};
 | 
			
		||||
  schema: SFSchema = {};
 | 
			
		||||
  addSchema: SFSchema = {};
 | 
			
		||||
  ticketSchema: SFSchema = {};
 | 
			
		||||
  TaxSchema: SFSchema = {};
 | 
			
		||||
  _$expand = false;
 | 
			
		||||
  taxStatus = false;
 | 
			
		||||
  formData: any;
 | 
			
		||||
  ticketId: any;
 | 
			
		||||
  ticketItem: any;
 | 
			
		||||
  formDataTicket: any
 | 
			
		||||
  formDataTax: any
 | 
			
		||||
  isVisible = false;
 | 
			
		||||
  isVisibleTicket = false;
 | 
			
		||||
  edit = false;
 | 
			
		||||
  editId = false;
 | 
			
		||||
  tabs: any[] = [
 | 
			
		||||
    {name: '开票设置'},
 | 
			
		||||
    {name: '税务设置'},
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  columns: STColumn[] = [
 | 
			
		||||
    { 
 | 
			
		||||
@ -105,7 +114,7 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          text: '财务设置',
 | 
			
		||||
          click: item => this.roleAction(item, 2)
 | 
			
		||||
          click: item => this.ticket(item)
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          text: '充值账户',
 | 
			
		||||
@ -224,6 +233,41 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
          title: '注册电话',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone2: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '税收分类版本号',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone3: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '税收分类编码',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone4: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '发票税率',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone5: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '发票面额上限',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone6: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '收款人',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone7: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '复核人',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        registerPhone8: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '开票人',
 | 
			
		||||
          ui: { placeholder: '请输入' }
 | 
			
		||||
        },
 | 
			
		||||
        senderName: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '寄件人姓名',
 | 
			
		||||
@ -236,7 +280,7 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
        },
 | 
			
		||||
        senderRegionCode: {
 | 
			
		||||
          type: 'number',
 | 
			
		||||
          title: '营业执照所在地',
 | 
			
		||||
          title: '寄件地区',
 | 
			
		||||
          ui: {
 | 
			
		||||
            widget: 'cascader',
 | 
			
		||||
            valueProperty: 'regionCode',
 | 
			
		||||
@ -266,6 +310,22 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
    };
 | 
			
		||||
    this.ui3 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
 | 
			
		||||
  }
 | 
			
		||||
  initSFTax() {
 | 
			
		||||
    this.TaxSchema = {
 | 
			
		||||
      properties: {
 | 
			
		||||
        enterpriseName1: {
 | 
			
		||||
          type: 'string',
 | 
			
		||||
          title: '公司名称',
 | 
			
		||||
          ui: {
 | 
			
		||||
            widget: 'text',
 | 
			
		||||
           },
 | 
			
		||||
           default: this.ticketItem?.enterpriseName,
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      required: ['enterpriseName']
 | 
			
		||||
    };
 | 
			
		||||
    this.ui4= { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
 | 
			
		||||
  }
 | 
			
		||||
  initSFFre() {
 | 
			
		||||
    this.addSchema = {
 | 
			
		||||
      properties: {
 | 
			
		||||
@ -310,9 +370,12 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
    this.editId = value.id;
 | 
			
		||||
    this.isVisible = true;
 | 
			
		||||
  }
 | 
			
		||||
  // 财务设置
 | 
			
		||||
  ticket(value: any) {
 | 
			
		||||
    this.formDataTicket = [];
 | 
			
		||||
    this.formDataTax = [];
 | 
			
		||||
    this.ticketItem  = value;
 | 
			
		||||
      this.initSFTax();
 | 
			
		||||
      this.initSFTicket();
 | 
			
		||||
    this.service.request(this.service.$api_getTicketByNetworkTransporterId, { id: value.id }).subscribe((res: any) => {
 | 
			
		||||
      console.log(res);
 | 
			
		||||
@ -461,16 +524,12 @@ export class NetworkFreightComponent implements OnInit {
 | 
			
		||||
  getRegionDetailByCode(regionCode: any) {
 | 
			
		||||
    return this.service.request(this.service.$api_get_region_by_code, { regionCode });
 | 
			
		||||
  }
 | 
			
		||||
  // setMakeInvoice2(item:any) {
 | 
			
		||||
  //     this.nzModalService.create({
 | 
			
		||||
  //       nzTitle: '基础设置',
 | 
			
		||||
  //       nzContent: SinglepageSettingModalComponent,
 | 
			
		||||
  //       nzWidth: 900,
 | 
			
		||||
  //       nzComponentParams: {
 | 
			
		||||
  //         extendType: '1',
 | 
			
		||||
  //         businessId: item.id
 | 
			
		||||
  //       },
 | 
			
		||||
  //       nzFooter: null
 | 
			
		||||
  //     });
 | 
			
		||||
  // }
 | 
			
		||||
  changeType(value: any) {
 | 
			
		||||
  console.log(value);
 | 
			
		||||
   if(value.name === '税务设置') {
 | 
			
		||||
      this.taxStatus = true
 | 
			
		||||
   } else {
 | 
			
		||||
    this.taxStatus = false
 | 
			
		||||
   }
 | 
			
		||||
  } 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user