大组件自整理-pad端

开始

   <table class="table table-striped check-table-border" border="1" width="100%" style="text-align: center;">

1、 表格初始头:用户登录

#

html:

<span class="fontsize">统计完成:</span>
    <user-confirm-input (userConfirmed)="userConfirmed()" [title]="'记录者'" [(ngModel)]="confirmPerson"
    name="'confirmPerson'"></user-confirm-input>

ts:


  userConfirmed() {
     
    this.dateTime = moment().format("YYYY-MM-DD");//不良记录主表更新时间

    if (this.confirmPerson) {
     
      this.indexMainData.confirmPersonId = this.confirmPerson.userId;
      this.indexMainData.confirmPerson = this.confirmPerson.userNick;
      this.indexMainData.confirmResult = 'Y';
      this.indexMainData.recordStatus = "已完成";
      this.userService.completeTaskProgress(this.value.formCode, this.value.pId, this.indexMainData.confirmResult != 'Y');//完成表的创建
    }
    this.sql.saveRecord(this.value["indexTableName"], this.indexMainData);
  }


2、日期

在这里插入图片描述

html:

<td>
                <input [readOnly]="value['confirmPerson']" 
                class="check-input"
                 type="date" 
                 [(ngModel)]="value['checkDate']" 
                 (ngModelChange)="saveRecord('checkDate');">
                </td>

ts:

在这里插入代码片


3、单选菜单

在这里插入图片描述

html:

<select class="check-input form-control ng-pristine ng-valid ng-touche" 
[disabled]="confirmPerson" 
[(ngModel)]="indexMainData['remark']" 
(ngModelChange)="saveParent('remark')" 
name="indexMainData['remark']">
          <option value="big1">1#大径卷边头</option>
          <option value="small1">1#小径卷边头</option>
          <option value="big2">2#大径卷边头</option>
          <option value="small2">2#小径卷边头</option>
          <option value="big3">3#大径卷边头</option>
          <option value="small3">3#小径卷边头</option>
        </select>

indexMainData[‘remark’] --------框中当前选中的内容

ts:

//储存单选框数据
  saveParent(name = '') {
     
    //如果单选框中选择的内容和name相同
    if (name == 'remark') {
     
      //则执行查询操作
      this.selectTotalNums();
    }
    this.nativeProvider.saveRecord(this.value["indexTableName"], this.indexMainData);
  }


4、时间

html:

<td>
        <input type="time" class="check-input time-width" 
        [readonly]="confirmPerson"
          [(ngModel)]="value['checkTime']"
        (ngModelChange)="saveRecord('checkTime');">
      </td>

ts:

changeCheckTime(name: string) {
     
    this.selectTotalNums();
    this.saveParent();
  }


5、计数框

5.1 使用次数:

html:

<td>
        <input class="check-input" 
        [readonly]="confirmPerson" type="number" 
        [(ngModel)]="value['col1Value']"
               (blur)="useChange1();"/>
      </td>

5.2 累计使用次数:

html:

<td>
        <input class="check-input" [readonly]="confirmPerson" type="number" [(ngModel)]="value['col2Value']"
               (ngModelChange)="setTotal1($event)"/>
        <button *ngIf="!confirmPerson" style="font-size:16px;position:relative;" (click)="clearTotal1();">清零 <i
          class="fa fa-dot-circle-o" style="font-size:20px;color:red"></i></button>
      </td>


6、系长签名

html

<td colspan="4">
           <user-confirm-input 
                  *ngIf="confirmPerson" 
                  name="headSign" [title]="'承认签名'" 
                  [(ngModel)]="headSign"
                  (userConfirmed)="userConfirmed('headSign')" 
                  [roleType]="'1'">
          </user-confirm-input>
              </td>

ts

userConfirmed() {
     
    if (this.value['confirmResult'] == 'N') {
     
      this.indexMainData.confirmResult = "N";
    } else if (this.value["confirmResult"] == "Y") {
     
      this.indexMainData.confirmResult = "Y";
    }
    if (this.confirmPerson) {
     
      this.indexMainData.confirmPerson = this.confirmPerson.userNick;
      this.indexMainData.confirmPersonId = this.confirmPerson.userId;
      this.indexMainData.recordStatus = "已完成";//表的状态
      // let hasNg = false;
      // this.userService.completeTaskProgress(this.value["formCode"], this.indexMainData.id, hasNg);
      this.userService.completeTaskProgress(this.value["formCode"], this.indexMainData.id, this.indexMainData.confirmResult != 'Y');
    }
    if (this.headSign) {
     
      this.indexMainData.headSign = this.headSign.userNick;
      this.indexMainData.headSignId = this.headSign.userId;
    }
    this.nativeProvider.saveRecord(this.value.indexTableName, this.indexMainData);

  }

7、多选下拉框

在这里插入图片描述

html

<td>
        <ion-select *ngIf="!confirmPerson"
         class="select" 
         [disabled]="indexMainData['recordStatus']=='已完成'"
          [(ngModel)]="suitVariet1" 
          (ngModelChange)="saveVariety();" multiple="true"
                cancelText="取消" okText="确定">

          <ion-option *ngFor="let item of codeList" 
          value="{
     {item.name}}">{
     {
     item.name}}</ion-option>
          <!-- <option value="EGZ">EGZ</option>
          <option value="AGK">AGK</option>
          <option value="EFS">EFS</option>
          <option value="GGE">GGE</option>
          <option value="EHB">EHB</option> -->
        </ion-select>
        <label *ngIf="confirmPerson">
        {
     {
     value['variety']}}</label>
      </td>

ts

//此方法为:当已经选中了,则将数据存到库中
saveVariety() {
     
    if (this.suitVariet1) {
     
      this.value['variety'] = this.suitVariet1.toString().split(",").join("/");
    }
    this.saveRecord('variety')
  }

8、输入框

在这里插入图片描述

html

<td colspan="2"> 产气药暴露控制“ON</td>
      <td>
        <div style="width:200px;margin: 0 auto">
          <check-item-text 
            [formCode]="indexMainData['formCode']"
            [benchmark]="benchmark.benchmark1" 
            [inputFieldName]="'checkValue1'"
            [readonly]="confirmPerson" 
            [checkProject]="'产气药暴露控制“ON”'" 
            [modelData]="value"
            [(ngModel)]="value['checkValue1']" 
            [resultFieldName]="'checkResult1'" 
            (check)="confirmResult('checkValue1')"
            (audit)="onAudit($event)" 
            name="checkValue1">
         </check-item-text>
        </div>
      </td>

二维码

在这里插入图片描述

html

<td class="scanner-part">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" style="background: skyblue;"
               maxlength="1"
               [(ngModel)]="value['g0']" (blur)="saveRecord('g0')">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g1']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g2']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g3']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g4']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g5']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g6']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g7']">
        <input [readonly]="true" type="text" class="check-input" [(ngModel)]="value['g8']">
        <svg *ngIf="!value['confirmPerson']" style="height: 40px;width:auto;" (click)="scanner('g')" t="1561421794266"
             class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7927"
             width="200" height="200">
          <path
              d="M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8zM648 200h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM888 640h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8zM904 476H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"
              p-id="7928"></path>
        </svg>
      </td>

ts

scanner(type: string) {
     
    let options: ZBarOptions = {
     
      text_title: '扫描中',
      text_instructions: '请把相机对准条形码',
      flash: 'on',
      drawSight: true
    };

    this.zBar.scan(options).then(result => {
     
      if (result.length == 9) {
     
        result = result.substring(1)
      }
      if (result.length == 8) {
     
        let zbarDatas = result.split('');
        for (let index = 0; index < zbarDatas.length; index++) {
     
          this.value[type + (index + 1)] = zbarDatas[index]
        }
        if (this.value['g1'] && this.value['c1'] && this.value['t1']) {
     
          let gStr = '', cStr = '', tStr = '';
          for (let index = 1; index < 9; index++) {
     
            gStr += this.value['g' + index];
            cStr += this.value['c' + index];
            tStr += this.value['t' + index];
          }
          if (gStr != cStr || cStr != tStr) {
     
            this.value['gctJudges'] = 'NG'
          } else {
     
            this.value['gctJudges'] = 'OK'
          }
        }
      }
      this.saveObject(this.value)
    }).catch(error => {
     
      this.noticeSer.showToast('ERROR: 条码解析错误.')
    })
  }


像是二维码但不用扫码的

在这里插入图片描述

html

 <tr>
      <td>
        充填指示书(2)
      </td>
      <td class="scanner-part">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" style="background: skyblue;"
               maxlength="1"
               [(ngModel)]="value['c0']" (blur)="saveRecord('c0')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c1']" (blur)="saveAndJudge('c1')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c2']" (blur)="saveAndJudge('c2')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c3']" (blur)="saveAndJudge('c3')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c4']" (blur)="saveAndJudge('c4')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c5']" (blur)="saveAndJudge('c5')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c6']" (blur)="saveAndJudge('c6')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c7']" (blur)="saveAndJudge('c7')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['c8']" (blur)="saveAndJudge('c8')">
        <!--<svg *ngIf="!value['confirmPerson']" style="height: 40px;width:auto;" (click)="scanner('c')" t="1561421794266"-->
        <!--class="icon"-->
        <!--viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7927" width="200"-->
        <!--height="200">-->
        <!--<path-->
        <!--d="M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8zM648 200h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM888 640h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8zM904 476H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"-->
        <!--p-id="7928"></path>-->
        <!--</svg>-->
      </td>
    </tr>
    <tr>
      <td>
        GOT扫描确认(3)
      </td>
      <td class="scanner-part">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" style="background: skyblue;"
               maxlength="1"
               [(ngModel)]="value['t0']" (blur)="saveRecord('t0')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t1']" (blur)="saveAndJudge('t1')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t2']" (blur)="saveAndJudge('t2')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t3']" (blur)="saveAndJudge('t3')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t4']" (blur)="saveAndJudge('t4')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t5']" (blur)="saveAndJudge('t5')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t6']" (blur)="saveAndJudge('t6')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t7']" (blur)="saveAndJudge('t7')">
        <input [readonly]="value['confirmPerson']" type="text" class="check-input" maxlength="1"
               [(ngModel)]="value['t8']" (blur)="saveAndJudge('t8')">
        <!--<svg *ngIf="!value['confirmPerson']" style="height: 40px;width:auto;" (click)="scanner('t')" t="1561421794266"-->
        <!--class="icon"-->
        <!--viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7927" width="200"-->
        <!--height="200">-->
        <!--<path-->
        <!--d="M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8zM648 200h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM888 640h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8zM904 476H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"-->
        <!--p-id="7928"></path>-->
        <!--</svg>-->
      </td>
    </tr>

ts

//保存并且判断LOT是否一致
  saveAndJudge(name:string){
     
    this.saveRecord(name);
    let gStr = '', cStr = '', tStr = '';
    let breakFlag = true;
    for (let i = 1;  i< 9; i++) {
     
      if (this.value['c' + i] && this.value['t' + i] && this.value['g' + i]){
     
        gStr += this.value['g' + i];
        cStr += this.value['c' + i];
        tStr += this.value['t' + i];
      } else {
     
        breakFlag = false;
        break;
      }
    }
    //值已经填完
    if(breakFlag){
     
      if (gStr != cStr || cStr != tStr) {
     
        this.value['gctJudges'] = 'NG'
      } else {
     
        this.value['gctJudges'] = 'OK'
      }
      this.saveRecord("gctJudges");
    }

  }



简单输入框

在这里插入图片描述

html

<td>
        <input type="text" class="check-input" [readonly]="value['confirmPerson']"
               [(ngModel)]="value['ctl1']"
               (blur)="saveRecord('ctl1');">
      </td>


特殊组件

1、OK,NG相关联

大组件自整理-pad端_第1张图片
在这里插入图片描述

html

<tr>
      <td>
        充填指示书(2)
      </td>
      <td>
        <input type="text" class="check-input" [readonly]="value['confirmPerson']"
               [(ngModel)]="value['ctl2']"
               (blur)="compareCtl('ctl2');">
      </td>
    </tr>
    <tr>
      <td>
        GOT扫描确认(3)
      </td>
      <td>
        <input type="text" class="check-input" [readonly]="value['confirmPerson']"
               [(ngModel)]="value['ctl3']"
               (blur)="compareCtl('ctl3');">
      </td>
    </tr>

ts

  compareCtl(name: string) {
     
    // if (this.value['ctl1'] && this.value['ctl2'] && this.value['ctl3']) {
     
    //   if (this.value['ctl1'] != this.value['ctl2'] || this.value['ctl2'] != this.value['ctl3']) {
     
    //     this.value['ctlJudges'] = 'NG'
    //   } else {
     
    //     this.value['ctlJudges'] = 'OK'
    //   }
    // }
    if (this.value['ctl2'] && this.value['ctl3']) {
     
      if (this.value['ctl2'] != this.value['ctl3']) {
     
        this.value['ctlJudges'] = 'NG'
      } else {
     
        this.value['ctlJudges'] = 'OK'
      }
    }
    this.saveRecord(name);
    if (this.value['ctlJudges']){
     
      this.saveRecord('ctlJudges');
    }
  }

OK,NG点击按钮

在这里插入图片描述

html

<td>
        <check-item-btn [formCode]="tableName" [inputFieldName]="'lotJudges'" [readonly]="value['confirmPerson']"
                        [benchmark]="OK=='OK'"
                        [modelData]="value" [(ngModel)]="value['lotJudges']"
                        (check)="saveRecord('lotJudges')"
                        (audit)="onAudit($event)" name="lotJudges"></check-item-btn>


      </td>

确认者(班长)

在这里插入图片描述

html

<tr>
            <td colspan="2">
              确认者(班长)
            </td>
            <td colspan="3">
              <user-confirm-input
              *ngIf="value['checkTime'] && value['lot'] && value['checkDate'] && value['shift'] && value['classInfo'] && value['nqValIn']&& value['nqValPc']&&value['ProLot']&&value['ProProduct']&&value['IniLot']&&value['IniProduct']  "
                [title]="'记录表确认'" [(ngModel)]="confirmPerson" (userConfirmed)="userConfirmed()" [roleType]="'3'">
              </user-confirm-input>
            </td>
          </tr>


班次

在这里插入图片描述

html

<td rowspan="2" colspan="3">
              班次
            </td>
            <td>
              <select [disabled]="value['confirmPerson']" class="form-control" [(ngModel)]="value['shift']"
                      (ngModelChange)="saveRecord('shift')">
                <option *ngFor="let opt of shiftCodes" value="{
     {opt.name}}">{
     {
     opt.name}}</option>
              </select>
            </td>
          </tr>
          <tr>
            <td>
              <select [disabled]="value['confirmPerson']" class="form-control" [(ngModel)]="value['classInfo']"
                      (ngModelChange)="saveRecord('classInfo')">
                <option *ngFor="let opt of classCodes" value="{
     {opt.name}}">{
     {
     opt.name}}</option>
              </select>
            </td>

ts

//依赖注入
  constructor(private nativeProvider: NativeProvider,
              private nav: NavController,
              private uservice: UserService,
              public codeService: CodeService,

              
    ){
     }



// 获取班次
    this.codeService.getCodeByTypeFromDb("class_code").subscribe((data) => {
     
      this.classCodes = data
    });

    // 获取排班
    this.codeService.getCodeByTypeFromDb("shift_code").subscribe((data) => {
     
      this.shiftCodes = data
    });


填充量

大组件自整理-pad端_第2张图片

注:

this.saveRecord(‘mcJudges’);
this.saveRecord(‘mcJudgesContent’) 条形码相同判定
mcValIn 输入框 上
mcValPc
this.saveRecord(‘mcValJudges’);
this.saveRecord(‘mcValJudgesContent’) 输入框相同判定

html

<tr>
          <td rowspan="3">PRO填充量</td>
            <td>充填量指示书</td>
            <td colspan="9">
              <div style="width:200px;margin: 0 auto;">
                <check-item-text [readonly]="value['confirmPerson']" [formCode]="tableName" [inputFieldName]="'nqValIn'"
                                 [modelData]="value" [(ngModel)]="value['nqValIn']" (check)="onCheck($event)"
                                 (audit)="onAudit($event)"
                                 (ngModelChange)="valueEqualCheck('nqValIn')" name="nqValIn"
                                 [dependOnFieldName]="'nqJudges'"
                                 class="check-input"
                                 [ignoreBenchmark]="true"></check-item-text>
              </div>
            </td>
            </tr>
            <tr>
              <td>HOST PC输入</td>
              <td colspan="9">
                <div style="width:200px;margin: 0 auto;">
                  <check-item-text [readonly]="value['confirmPerson']" [formCode]="tableName" [inputFieldName]="'nqValPc'"
                                   [modelData]="value" [(ngModel)]="value['nqValPc']" (check)="onCheck($event)"
                                   (audit)="onAudit($event)"
                                   (ngModelChange)="valueEqualCheck('nqValPc')" name="nqValPc" class="check-input"
                                   [dependOnFieldName]="'nqValIn'"
                                   [ignoreBenchmark]="true"></check-item-text>
                </div>
              </td>
            </tr>
            <tr>
              <td>两者是否一致<br>(是“OK,否“NG”)</td>
              <td colspan="9">
                {
     {
     value['nqValJudgesContent']}}
              </td>
            </tr>

ts

valueEqualCheck(name:string){
     
  this.saveRecord(name);
  var FillingVerificationRules = {
      // 充填量指示书,GOT显示 校验规则
    "EFS": {
     "ENH": "2.5", "GG": "42.1"},
    "EGK": {
     "ENH": "2.5", "GG": "42.1"},
    "AGK": {
     "ENH": "2.5", "GG": "42.1"},
    "GGK": {
     "ENH": "2.5", "GG": "42.1"},
    "TGK": {
     "ENH": "2.5", "GG": "42.1"},
    "EHB": {
     "ENH": "2.5", "GG": "42.1"},

    "EGE": {
     "ENH": "2.9", "GG": "50.6"},
    "GGE": {
     "ENH": "2.9", "GG": "50.6"},

    "EGF": {
     "ENH": "5.0", "GG": "[email protected]"},
    "GGF": {
     "ENH": "5.0", "GG": "[email protected]"}
  };
  if (this.value['mcInstruction1'] && this.value['mcInstruction2'] && this.value['mcInstruction3'] && this.value['mcInstruction4'] && this.value['mcInstruction5'] && this.value['mcInstruction6'] && this.value['mcInstruction7'] && this.value['mcInstruction8']
    && this.value['mcHostPc1'] && this.value['mcHostPc2'] && this.value['mcHostPc3'] && this.value['mcHostPc4'] && this.value['mcHostPc5'] && this.value['mcHostPc6'] && this.value['mcHostPc7'] && this.value['mcHostPc8']) {
     
    //都有值得情况下,开始确认这二者的比较值
    let ticket = this.value['mcInstruction1'] + this.value['mcInstruction2'] + this.value['mcInstruction3'] + this.value['mcInstruction4'] + this.value['mcInstruction5'] + this.value['mcInstruction6'] + this.value['mcInstruction7'] + this.value['mcInstruction8'];
    let nqGot = this.value['mcHostPc1'] + this.value['mcHostPc2'] + this.value['mcHostPc3'] + this.value['mcHostPc4'] + this.value['mcHostPc5'] + this.value['mcHostPc6'] + this.value['mcHostPc7'] + this.value['mcHostPc8'];
    if (ticket === nqGot) {
     
      if (ticket === '--------') {
     
        this.value['mcJudges'] = '-';
        this.value['mcJudgesContent'] = '-';
      } else {
     
        this.value['mcJudges'] = "Y";
        this.value['mcJudgesContent'] = 'OK';
      }

    } else {
     
      this.value['mcJudges'] = "N";
      this.value['mcJudgesContent'] = 'NG';
    }
    this.saveRecord('mcJudges');
    this.saveRecord('mcJudgesContent')
  }

  if (this.value['mcValIn'] && this.value['mcValPc']) {
     
    //都有值得情况下,开始确认这二者的比较值
    if (this.value['mcValIn'] === this.value['mcValPc']) {
     
      if (this.value['mcValIn'] == "-") {
     
        this.value['mcValJudges'] = "-";
        this.value['mcValJudgesContent'] = "-";
      } else {
     
        this.value['mcValJudges'] = "Y";
        this.value['mcValJudgesContent'] = "OK";
      }

    } else {
     
      this.value['mcValJudges'] = "N";
      this.value['mcValJudgesContent'] = "NG";
    }
    this.saveRecord('mcValJudges');
    this.saveRecord('mcValJudgesContent')
  }

  if (this.value['nqInstruction1'] && this.value['nqInstruction2'] && this.value['nqInstruction3'] && this.value['nqInstruction4'] && this.value['nqInstruction5'] && this.value['nqInstruction6'] && this.value['nqInstruction7'] && this.value['nqInstruction8']
    && this.value['nqHostPc1'] && this.value['nqHostPc2'] && this.value['nqHostPc3'] && this.value['nqHostPc4'] && this.value['nqHostPc5'] && this.value['nqHostPc6'] && this.value['nqHostPc7'] && this.value['nqHostPc8']) {
     
    //都有值得情况下,开始确认这二者的比较值
    let ticket = this.value['nqInstruction1'] + this.value['nqInstruction2'] + this.value['nqInstruction3'] + this.value['nqInstruction4'] + this.value['nqInstruction5'] + this.value['nqInstruction6'] + this.value['nqInstruction7'] + this.value['nqInstruction8'];
    let nqGot = this.value['nqHostPc1'] + this.value['nqHostPc2'] + this.value['nqHostPc3'] + this.value['nqHostPc4'] + this.value['nqHostPc5'] + this.value['nqHostPc6'] + this.value['nqHostPc7'] + this.value['nqHostPc8'];
    if (ticket === nqGot) {
     
      if (ticket === '--------') {
     
        this.value['nqJudges'] = "-";
        this.value['nqJudgesContent'] = "-";
      } else {
     
        this.value['nqJudges'] = "Y";
        this.value['nqJudgesContent'] = "OK";
      }

    } else {
     
      this.value['nqJudges'] = "N";
      this.value['nqJudgesContent'] = "NG";
    }
    this.saveRecord('nqJudges');
    this.saveRecord('nqJudgesContent')
  }

  if (this.value['nqValIn'] && this.value['nqValPc']) {
     
    //都有值得情况下,开始确认这二者的比较值
    if (this.value['nqValIn'] === this.value['nqValPc']) {
     
      if (this.value['nqValIn'] == "-") {
     
        this.value['nqValJudges'] = "-";
        this.value['nqValJudgesContent'] = "-";
      } else {
     
        this.value['nqValJudges'] = "Y";
        this.value['nqValJudgesContent'] = "OK";
      }

    } else {
     
      this.value['nqValJudges'] = "N";
      this.value['nqValJudgesContent'] = "NG";
    }
    this.saveRecord('nqValJudges');
    this.saveRecord('nqValJudgesContent');
    if(this.value['mcJudgesContent'] && this.value['mcValJudgesContent'] && this.value['nqJudgesContent'] && this.value['nqValJudgesContent']) {
     
      if (this.value['mcJudgesContent'] == 'OK' && this.value['mcValJudgesContent'] == 'OK' && this.value['nqJudgesContent'] == 'OK' && this.value['nqValJudgesContent'] == 'OK') {
     
        this.value['confirmResult'] = "Y";
      }else {
     
        this.value['confirmResult'] = "N";
      }
    }
  }

  //点检判定confirmResult的值
  if (this.value['mcJudges'] && this.value['mcValJudges'] && this.value['nqJudges'] && this.value['nqValJudges'] ) {
     
    if (this.value['mcJudges'] == "Y" && this.value['mcValJudges'] == "Y" && this.value['nqJudges'] == "Y" && this.value['nqValJudges'] == "Y" ) {
     
      this.value['confirmResult'] = "Y";
    } else {
     
      this.value['confirmResult'] = "N";
    }
    this.saveRecord('confirmResult');
    this.indexMainData.confirmResult = this.value['confirmResult'];
    this.nativeProvider.saveRecord(this.value['indexTableName'], this.indexMainData);
  }
}

onCheck($e) {
     
  //判定confirmResult的值
}

AB表

大组件自整理-pad端_第3张图片

参考

大组件自整理-pad端_第4张图片

HTML

<tr>
            <td colspan="10" *ngIf="!indexMainData['recordStatus'] || indexMainData['recordStatus']!='已完成'">
                <select class="check-input select" [disabled]="indexMainData['recordStatus']=='已完成'"
                    [(ngModel)]="indexMainData['line']" (ngModelChange)="saveParent();">
                    <option value="A">A</option>
                    <option value="B">B</option>
                </select>
            </td>
            <td colspan="9" *ngIf="indexMainData['recordStatus']=='已完成'">
                {
     {
     indexMainData['line']}}
            </td>
        </tr>

TS

点检者确认

大组件自整理-pad端_第5张图片

html

<td *ngIf="lineSn == 'c14'">
          <user-confirm-input *ngIf="value['date']&&value['checkTime']&&value['variety']&&value['reason']&&value['checkValue']&&value['qrCode']"
                              (userConfirmed)="userConfirmed('check_person')" [title]="'点检者确认'"
                              [(ngModel)]="check_person" [roleType]="'3'"></user-confirm-input>
        </td>





备注

html

<form-usage>
    <ion-grid>
      <ion-row>
        <ion-col col-12>
            备注: 1.满足以下两个条件可以进行刷子更换:⑴.使用回数达设定时(①设备计数报警②使用回数距设定<200回时);
            ⑵.产品外观异常时;<br> 
            2.YAG刷子更换安装后,要将GOT上的计数器上数字记录在表格中后,将数字清零;
        </ion-col>
      </ion-row>
    </ion-grid>
  </form-usage>

你可能感兴趣的:(angular)