CheckStepThreeForm.vue 18.6 KB
<template>
  <a-spin :spinning="confirmLoading">
    <j-form-container :disabled="formDisabled">
      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
        <a-form-item :wrapperCol="{span: 19, offset: 5}">
          <a-button type="primary" @click="nextSteps()">下一步</a-button>
        </a-form-item>
        <a-row>
          <a-col :span="24">
            <a-form-model-item label="sn编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="snCode">
              <a-input v-model="model.snCode"  type="text"  placeholder="请输入sn编码"  ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <span style="font-size: 22px;">一(4)额定空载电压(GB/T 15579.1-2024 15.3)</span>
        <a-row>
          <a-col :span="24">
            <span style="color: #00A0E9">1.输出额定空载电压(额定空载电压应在铭牌规定电压±5%以内,且不应超过直流113V峰值)。</span>
            <a-form-model-item  label="检验" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eddy">
              <a-input style="width: 200px;"  v-model="model.eddy"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.eddy2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
        </a-row>
        <span style="font-size: 22px;">一(5)额定最小和最大焊接电流(GB/T 15579.1-2024 15. 4b 15.4c)</span>
        <a-row>
          <a-col :span="24">
            <span style="color: #00A0E9">1.额定最小焊接电流(I2min)(数值不能大于铭牌规定的数值 5 A,不大于102%,即不大于5.1A)</span>
            <a-form-model-item  label="检验" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eddl1">
              <a-input style="width: 200px;"  v-model="model.eddl1"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.eddl1v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">1.额定最大焊接电流(I2max)(数值不能小于铭牌规定的数值400 A,不小于98%)</span>
            <a-form-model-item  label="检验" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eddl2">
              <a-input style="width: 200px;"  v-model="model.eddl2"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.eddl2v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
        </a-row>
        <span style="font-size: 22px;">二(1)面板</span>
        <a-row>
          <a-col :span="24">
            <span style="color: #00A0E9">1.液晶屏幕(亮度适中)</span>
            <a-form-model-item  label="背光" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb1">
              <a-input style="width: 200px;"  v-model="model.mb1"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb1v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">2.液晶屏幕(无亮点/暗点)</span>
            <a-form-model-item  label="字符完整" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb2">
              <a-input style="width: 200px;"  v-model="model.mb2"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb2v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">3.液晶屏幕(按程序定时刷屏)</span>
            <a-form-model-item  label="字符刷新" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb3">
              <a-input style="width: 200px;"  v-model="model.mb3"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb3v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">4.液晶屏幕(开机图标正确(华恒))</span>
            <a-form-model-item  label="开机图标" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb4">
              <a-input style="width: 200px;"  v-model="model.mb4"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb4v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">5.液晶屏幕(触摸屏按压点准确)</span>
            <a-form-model-item  label="触摸屏校准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb5">
              <a-input style="width: 200px;"  v-model="model.mb5"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb5v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">6.面板编程按钮(可以及时响应,无误动作)</span>
            <a-form-model-item  label="灵敏度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb6">
              <a-input style="width: 200px;"  v-model="model.mb6"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb6v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">7.触摸屏校准(操作触摸屏)</span>
            <a-form-model-item  label="检查触摸屏触摸点位置是否正确" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mb7">
              <a-input style="width: 200px;"  v-model="model.mb7"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.mb7v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
        </a-row>

        <span style="font-size: 22px;">二(2)线控器点动检测</span>
        <a-row>
          <a-col :span="24">
            <span style="color: #00A0E9">1.旋转按钮</span>
            <a-form-model-item  label="正反转方向" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd1">
              <a-input style="width: 200px;"  v-model="model.xlqdd1"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd1v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">1.旋转按钮</span>
            <a-form-model-item  label="旋转点动加速" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd2">
              <a-input style="width: 200px;"  v-model="model.xlqdd2"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd2v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <span style="color: #00A0E9">2.送丝按钮</span>
            <a-form-model-item  label="送丝和抽丝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd3">
              <a-input style="width: 200px;"  v-model="model.xlqdd3"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd3v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">2.送丝按钮</span>
            <a-form-model-item  label="送丝点动加速" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd4">
              <a-input style="width: 200px;"  v-model="model.xlqdd4"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd4v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">3.弧长按钮</span>
            <a-form-model-item  label="弧长方向和碰工件抬升" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd5">
              <a-input style="width: 200px;"  v-model="model.xlqdd5"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd5v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">4.程序号</span>
            <a-form-model-item  label="程序号同步显示" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd6">
              <a-input style="width: 200px;"  v-model="model.xlqdd6"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd6v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">5.急停按钮</span>
            <a-form-model-item  label="紧急停止功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd7">
              <a-input style="width: 200px;"  v-model="model.xlqdd7"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd7v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">6.横摆按钮</span>
            <a-form-model-item  label="横摆方向" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd8">
              <a-input style="width: 200px;"  v-model="model.xlqdd8"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd8v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">7.组合按键</span>
            <a-form-model-item  label="加紧功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xlqdd9">
              <a-input style="width: 200px;"  v-model="model.xlqdd9"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.xlqdd9v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
        </a-row>

        <span style="font-size: 22px;">二(3)编程功能检验</span>
        <a-row>
          <a-col :span="24">
            <span style="color: #00A0E9">1.程序存储</span>
            <a-form-model-item  label="程序编制" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bcgn1">
              <a-input style="width: 200px;"  v-model="model.bcgn1"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.bcgn1v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <span style="color: #00A0E9">2.程序存储</span>
            <a-form-model-item  label="掉电程序存储" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bcgn2">
              <a-input style="width: 200px;"  v-model="model.bcgn2"  placeholder="请输入检验结果"  ></a-input>
              <a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.bcgn2v2">
                <a-select-option  value="Pass">Pass</a-select-option>
                <a-select-option  value="Fail">Fail </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-form-item :wrapperCol="{span: 19, offset: 5}">
          <a-button type="primary" @click="nextSteps()">下一步</a-button>
        </a-form-item>
      </a-form-model>

    </j-form-container>
  </a-spin>
</template>

<script>

  import { httpAction, getAction } from '@/api/manage'
  import { validateDuplicateValue } from '@/utils/util'

  export default {
    name: 'CheckStepThreeForm',
    components: {
    },
    props: {
      //表单禁用
      disabled: {
        type: Boolean,
        default: false,
        required: false
      }
    },
    data () {
      return {
        model:{
         },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        confirmLoading: false,
validatorRules: {
        snCode: [
            { required: true, message: '请输入sn编码!'},
        ],
},
        url: {
          add: "/jianyan/checkStepThree/add",
          edit: "/jianyan/checkStepThree/edit",
          queryById: "/jianyan/checkStepThree/queryById"
        }
      }
    },
    computed: {
      formDisabled(){
        return this.disabled
      },
    },
    created () {
       //备份model原始值
      let record={
        eddy:'电压:78.0V', eddy2:'Pass',
        eddl1:'电压:10.1V电流:4.9A', eddl1v2:'Pass',
        eddl2:'电压:30.1V电流:499.2A', eddl2v2:'Pass',
        mb1:'合格', mb1v2:'Pass',
        mb2:'合格', mb2v2:'Pass',
        mb3:'合格', mb3v2:'Pass',
        mb4:'合格', mb4v2:'Pass',
        mb5:'合格', mb5v2:'Pass',
        mb6:'合格', mb6v2:'Pass',
        mb7:'合格', mb7v2:'Pass',
        xlqdd1:'合格', xlqdd1v2:'Pass',
        xlqdd2:'合格', xlqdd2v2:'Pass',
        xlqdd3:'合格', xlqdd3v2:'Pass',
        xlqdd4:'合格', xlqdd4v2:'Pass',
        xlqdd5:'合格', xlqdd5v2:'Pass',
        xlqdd6:'合格', xlqdd6v2:'Pass',
        xlqdd7:'合格', xlqdd7v2:'Pass',
        xlqdd8:'合格', xlqdd8v2:'Pass',
        xlqdd9:'合格', xlqdd9v2:'Pass',
        bcgn1:'合格', bcgn1v2:'Pass',
        bcgn2:'合格', bcgn2v2:'Pass',
      }
      this.model = Object.assign({}, record);
      this.modelDefault = JSON.parse(JSON.stringify(this.model));
    },
    methods: {
      add () {

        this.edit(this.modelDefault);
      },
      edit (record) {

        this.model = Object.assign({}, record);
        this.visible = true;
      },
      submitForm () {
        const that = this;
        // 触发表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true;
            let httpurl = '';
            let method = '';
            if(!this.model.id){
              httpurl+=this.url.add;
              method = 'post';
            }else{
              httpurl+=this.url.edit;
               method = 'put';
            }
            httpAction(httpurl,this.model,method).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                that.$emit('ok');
              }else{
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
            })
          }
        })
      },
      nextSteps() {
        if(this.model.snCode==undefined||this.model.snCode==''||this.model.snCode==null){
          this.$message.warning('请先填写sn编码!');
          return;
        }
        this.$emit('setSnData',this.model.snCode)
        this.submitForm ();
        this.$emit('nextStep',this.model.snCode)
      },

    }
  }
</script>