Secondary interface card (Senior)

Project Method Invocation

import { UIInterfaceFunc } from 'sj.sys.ui';

 

/ ** 
     * front-end secondary development interface front-end call functions 
     * @param UnitID current medical units ID 
     * @param MouldName module name, such as: outpatient prescription medicine 
     * @param EventName event name, such as: outpatient prescription medicine before saving 
     * @param ReturnInf returns JSON object parameters, and returns the result parameter ReturnInf mechanism consistent data (key consistency, value may be modified rear) 
     * @param OtherReqInf other additional parameters, the return value does not include any value in this object 
     * @ param BatchOrdinalNo serial batch operation GUID 
     * @param the UserID user ID, the blank was in the current globalVar user ID 
     * @param StationID station ID, which is currently empty compared globalVar in the workstation ID 
     * / 
  public ceshi the async (resResult, agDataOptionResult) { 
    the let dataOption = { 
      UnitID: this.dynamicValidateForm.unitId, // current medical unit ID 
      MouldName: 'invoice printing', // module name, such as: a prescription medicine clinics 
      EventName: 'invoice printing', // the name of the event, such as: prescription medicine clinic before save
      ReturnInf: this.ReturnInf (agDataOptionResult), // return parameter JSON object, this same parameter and returns the results in data ReturnInf mechanism (key consistency, value may be modified rear) 
      OtherReqInf: this.OtherReqInf (resResult), / / other additional parameters, the return value does not include any value in this object 
      BatchOrdinalNo: this.guid (), // serial batch operation GUID 
      the UserID: sj.globalVar.UserID, // user ID, the current was empty globalVar in the user ID 
      StationID: // sj.globalVar.StationID station ID, which is currently empty compared globalVar in the workstation ID 
    } 
    UIInterfaceFunc.CallUIInterface ( 
      dataOption.UnitID, 
      dataOption.MouldName, 
      dataOption.EventName, 
      dataOption.ReturnInf, 
      dataOption. OtherReqInf, 
      dataOption.BatchOrdinalNo, 
      dataOption.UserID, 
      dataOption.StationID,
    ).then(async result => {
      console.log(result);
      console.log(result.CanRunNext);
      if (!result.CanRunNext) {
        UI.Error(result.ErrMsg)
      } else {
        console.log(result.ReturnInf);
      }
    }).catch((errer) => {
      UI.Toast(JSON.stringify(errer))
    });
  }

  

// interface to transfer data into one serial number unique 
 GUID () { 
   return 'XXXXXXXX-XXXX-4xxx-yxxx-xxxxxxxxxxxx'.replace (/ [XY] / G, function (C) { 
     var = R & lt the Math. Random () * 16 | 0, V = C == 'X' R & lt:? (R & lt 0x3 & | 0x8); 
     return v.toString (16); 
   }); 
 } 
 
 // return parameter JSON object parameters and return this results ReturnInf mechanism consistent data (key consistency, value may be modified rear) 
 ReturnInf (agDataOptionResult) { 
   return { 
     // InvoiceType: this.dynamicValidateForm.InvoiceType, // String; // invoice type 
     // InvoiceCode: this .dynamicValidateForm.InvoiceCode, // string; // invoice number 
     InvoiceType: agDataOptionResult.InvoiceType, // invoice type String 
     InvoiceNo: invoice number String agDataOptionResult.InvoiceCode // 
   } 
 } 
 
 // other additional parameters, return value is not included within this object any value
 OtherReqInf (resResult) { 
   return { 
     BizCode: 'PrintOutAcceptInvoice', // encoding type String 
     AccountID: resResult.AccountNo, billing charges // Serial String 
     IsDesigned: // whether the design condition to true Boolean 
   } 
 }

  

Guess you like

Origin www.cnblogs.com/LFxanla/p/11283427.html