edit
This commit is contained in:
		@ -57,13 +57,28 @@
 | 
			
		||||
<ng-template #requestedModal>
 | 
			
		||||
    <div nz-row nzGutter="8">
 | 
			
		||||
        <div nz-col nzSpan="24" se-container [labelWidth]="100">
 | 
			
		||||
            <!-- <se [col]="1" label="开票信息">
 | 
			
		||||
                <p style="margin: 0;">公司名:</p>
 | 
			
		||||
                <p style="margin: 0;">税号:</p>
 | 
			
		||||
                <p style="margin: 0;">注册地址:</p>
 | 
			
		||||
                <p style="margin: 0;">注册电话:</p>
 | 
			
		||||
                <p style="margin: 0;">开户行:</p>
 | 
			
		||||
            </se> -->
 | 
			
		||||
            <se [col]="1" label="开票信息" class="mb-sm">
 | 
			
		||||
                <p style="margin: 0;">公司名: {{openInfo?.artoname}}</p>
 | 
			
		||||
                <p style="margin: 0;">税号: {{openInfo?.artotaxno}}</p>
 | 
			
		||||
                <p style="margin: 0;">注册地址: {{openInfo?.artoadd}}</p>
 | 
			
		||||
                <p style="margin: 0;">注册电话: {{openInfo?.artotel}}</p>
 | 
			
		||||
                <p style="margin: 0;">开户行: {{openInfo?.artobank}}</p>
 | 
			
		||||
            </se>
 | 
			
		||||
            <se [col]="1" label="服务名称" class="mb-sm">
 | 
			
		||||
                {{openInfo?.vatname}}
 | 
			
		||||
            </se>
 | 
			
		||||
            <se [col]="1" label="发票备注栏" class="mb-sm">
 | 
			
		||||
                {{openInfo?.vatremarks}}
 | 
			
		||||
            </se>
 | 
			
		||||
            <se [col]="1" label="其它要求" class="mb-sm">
 | 
			
		||||
                {{openInfo?.otherremarks}}
 | 
			
		||||
            </se>
 | 
			
		||||
            <se [col]="1" label="销货清单" class="mb-sm">
 | 
			
		||||
                {{openInfo?.isdetail?'需要':'不需要'}}
 | 
			
		||||
            </se>
 | 
			
		||||
            <se [col]="1" label="开票金额" class="mb-sm">
 | 
			
		||||
                {{openInfo?.vatnotax | currency}}
 | 
			
		||||
            </se>
 | 
			
		||||
            <se [col]="1" label="开票日期" required>
 | 
			
		||||
                <nz-date-picker [(ngModel)]="openInfo.invoicedate" nzPlaceHolder="请选择" style=" width: 100%;">
 | 
			
		||||
                </nz-date-picker>
 | 
			
		||||
 | 
			
		||||
@ -79,34 +79,40 @@ export class CancellationInvoiceComponent implements OnInit {
 | 
			
		||||
   */
 | 
			
		||||
  requestedAction(item: any) {
 | 
			
		||||
    this.openInfo = { invoicedate: null, invoiceno: null, invoiceno2: null };
 | 
			
		||||
    const modal = this.nzModalService.create({
 | 
			
		||||
      nzTitle: '发票确认',
 | 
			
		||||
      nzContent: this.requestedModal,
 | 
			
		||||
      nzOnOk: () => {
 | 
			
		||||
        if (!this.openInfo?.invoicedate || !this.openInfo?.invoiceno) {
 | 
			
		||||
          this.service.msgSrv.warning('请填开票信息');
 | 
			
		||||
          return false;
 | 
			
		||||
        }
 | 
			
		||||
        const params = {
 | 
			
		||||
          invoiceno: this.openInfo.invoiceno,
 | 
			
		||||
          invoicedate: dateTimePickerUtil.format(this.openInfo.invoicedate),
 | 
			
		||||
          invoiceno2: this.openInfo.invoiceno2
 | 
			
		||||
        };
 | 
			
		||||
        this.service
 | 
			
		||||
          .request(this.service.$api_apply_fico_invoic, {
 | 
			
		||||
            id: item.id,
 | 
			
		||||
            vatinvcode: item.vatinvcode,
 | 
			
		||||
            ...params
 | 
			
		||||
          })
 | 
			
		||||
          .subscribe(res => {
 | 
			
		||||
            if (res) {
 | 
			
		||||
              this.service.msgSrv.success('开票成功');
 | 
			
		||||
              this.st.load(1);
 | 
			
		||||
              modal.destroy();
 | 
			
		||||
    this.service.request(this.service.$api_get_apply_fico_info, { id: item.vatappHId }).subscribe(info => {
 | 
			
		||||
      if (info) {
 | 
			
		||||
        console.log(info);
 | 
			
		||||
        Object.assign(this.openInfo, { ...info });
 | 
			
		||||
        const modal = this.nzModalService.create({
 | 
			
		||||
          nzTitle: '发票确认',
 | 
			
		||||
          nzContent: this.requestedModal,
 | 
			
		||||
          nzOnOk: () => {
 | 
			
		||||
            if (!this.openInfo?.invoicedate || !this.openInfo?.invoiceno) {
 | 
			
		||||
              this.service.msgSrv.warning('请填开票信息');
 | 
			
		||||
              return false;
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
            const params = {
 | 
			
		||||
              invoiceno: this.openInfo.invoiceno,
 | 
			
		||||
              invoicedate: dateTimePickerUtil.format(this.openInfo.invoicedate),
 | 
			
		||||
              invoiceno2: this.openInfo.invoiceno2
 | 
			
		||||
            };
 | 
			
		||||
            this.service
 | 
			
		||||
              .request(this.service.$api_apply_fico_invoic, {
 | 
			
		||||
                id: item.id,
 | 
			
		||||
                vatinvcode: item.vatinvcode,
 | 
			
		||||
                ...params
 | 
			
		||||
              })
 | 
			
		||||
              .subscribe(res => {
 | 
			
		||||
                if (res) {
 | 
			
		||||
                  this.service.msgSrv.success('开票成功');
 | 
			
		||||
                  this.st.load(1);
 | 
			
		||||
                  modal.destroy();
 | 
			
		||||
                }
 | 
			
		||||
              });
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -32,5 +32,5 @@
 | 
			
		||||
<div class="modal-footer text-center">
 | 
			
		||||
  <button nz-button type="button">移除</button>
 | 
			
		||||
  <button nz-button type="button" (click)="saveManage()">手工处理</button>
 | 
			
		||||
  <button nz-button type="submit" nzType="primary" [nzLoading]="false" (click)="saveManage()">自动开票</button>
 | 
			
		||||
  <!-- <button nz-button type="submit" nzType="primary" [nzLoading]="false" (click)="saveManage()">自动开票</button> -->
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user