loulijun2021
2023-02-12 adb74c51618faf025fe1d46bf6b22db895c2608f
src/views/zlgl/gxjy.vue
@@ -3,7 +3,7 @@
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding-top: 10px;display: flex;flex-direction: column">
        <div style="margin-bottom: 15px;font-size: 14px">
          <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />扫码信息
          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin-right: 5px" />扫码信息
        </div>
        <div style="display: flex;align-items: center">
          <div style="width: 90px;display: flex">
@@ -13,42 +13,42 @@
          <el-input
            v-model="form.orderstepqrcode"
            name="GXproduceCode"
            style="width: 300px"
            @keyup.native="e=>judgeIsScanning(e,'GXproduceCode')"
            @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
          />
          <!--          @keyup.native="e=>judgeIsScanning(e,'GXproduceCode')"-->
        </div>
        <!--        六项信息      -->
        <div v-if="!isIpad" style="background:#f8f8fa ;display:flex;margin-top: 10px;align-items: center; line-height: 50px">
          <div style="display: flex; margin-left: 10px">
            <div style="display: flex;margin-right: 50px">
              <div style="width: 90px">工单编码:</div>
              <div style="width: 200px">{{ form.wo_code }}</div>
              <div style="width: 150px">{{ form.wo_code }}</div>
            </div>
            <div style="display: flex;">
              <div style="width: 90px">产品编码:</div>
              <div style="width: 100px">{{ form.partcode }}</div>
              <div style="width: 150px">{{ form.partcode }}</div>
            </div>
          </div>
          <div style="display: flex;margin-left: 30px;">
            <div style="display: flex;margin-right: 50px">
              <div style="width: 90px">产品名称:</div>
              <div style="width: 200px">{{ form.partname }}</div>
              <div style="width: 150px">{{ form.partname }}</div>
            </div>
            <div style="display: flex;">
              <div style="width: 90px">产品规格:</div>
              <div style="width: 100px">{{ form.partspec }}</div>
              <div style="width: 150px">{{ form.partspec }}</div>
            </div>
          </div>
          <div style=" display: flex;margin-left: 30px;">
            <div style="display: flex;margin-right: 50px">
              <div style="width: 90px">工序编码:</div>
              <div style="width: 100px">{{ form.stepcode }}</div>
              <div style="width: 150px">{{ form.stepcode }}</div>
            </div>
            <div style="display: flex;">
              <div style="width: 90px">工序名称:</div>
              <div style="width: 100px">{{ form.stepname }}</div>
              <div style="width: 150px">{{ form.stepname }}</div>
            </div>
          </div>
        </div>
@@ -88,7 +88,7 @@
        </div>
        <div style="margin: 15px 0;font-size: 14px">
          <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验标准信息
          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin-right: 5px" />检验标准信息
        </div>
        <div style="display: flex;align-items: center">
          <div style="width: 90px;display: flex">
@@ -163,10 +163,10 @@
        </div>
        <div style="margin: 15px 0;font-size: 14px">
          <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验项信息
          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin-right: 5px" />检验项信息
        </div>
        <div>
          <el-button type="primary" @click="add">新增</el-button>
          <el-button v-waves type="primary" @click="add">新增</el-button>
        </div>
        <div style="margin-top: 10px">
          <el-table
@@ -220,6 +220,7 @@
            <el-table-column
              prop="code"
              label="检验标准编码"
              show-tooltip-when-overflow
            >
              <template slot-scope="{row}">
                <div v-if="row.isVisible===0">{{ row.code }}</div>
@@ -242,6 +243,7 @@
            <el-table-column
              prop="name"
              label="检验标准名称"
              show-tooltip-when-overflow
            >
              <template slot-scope="{row}">
                <div v-if="row.isVisible===0">{{ row.name }}</div>
@@ -265,6 +267,7 @@
            <el-table-column
              prop="stepcheckitem_desc"
              label="检验标准描述"
              show-tooltip-when-overflow
            >
              <template slot-scope="scope">
                <el-input
@@ -285,6 +288,7 @@
              prop="result"
              label="检验结果"
              width="100"
              show-tooltip-when-overflow
            >
              <template slot-scope="{row}">
                <div v-if="row.result==='OK'">合格</div>
@@ -325,9 +329,9 @@
            >
              <template slot-scope="{row}">
                <div class="operationClass">
                  <el-button v-if="row.isVisible===0" type="text" @click="del(row)">删除</el-button>
                  <el-button v-if="row.isVisible===1" type="text" @click="confirm(row)">确认</el-button>
                  <el-button v-if="row.isVisible===1" type="text" @click="cancel(row)">取消</el-button>
                  <el-button v-if="row.isVisible===0" v-waves type="text" @click="del(row)">删除</el-button>
                  <el-button v-if="row.isVisible===1" v-waves type="text" @click="confirm(row)">确认</el-button>
                  <el-button v-if="row.isVisible===1" v-waves type="text" @click="cancel(row)">取消</el-button>
                </div>
              </template>
            </el-table-column>
@@ -335,10 +339,10 @@
        </div>
        <div style="display: flex;margin: 30px 0;align-items: center">
          <el-button type="primary" @click="submitButton('FirstCheck')">首检保存</el-button>
          <el-button type="primary" style="margin-left: 50px" @click="submitButton('PatroCheck')">巡检保存</el-button>
          <el-button type="primary" style="margin-left: 50px" @click="submitButton('EndCheck')">完工检保存</el-button>
          <el-button type="info" style="margin-left: 50px" @click="submitButton('Cancel')">取消</el-button>
          <el-button v-waves type="primary" @click="submitButton('FirstCheck')">首检保存</el-button>
          <el-button v-waves type="primary" style="margin-left: 50px" @click="submitButton('PatroCheck')">巡检保存</el-button>
          <el-button v-waves type="primary" style="margin-left: 50px" @click="submitButton('EndCheck')">完工检保存</el-button>
          <el-button v-waves type="info" style="margin-left: 50px" @click="submitButton('Cancel')">取消</el-button>
        </div>
      </div>
    </div>
@@ -358,12 +362,15 @@
  StepCheckItemSelect
} from '@/api/zlgl'
import { MesOrderSelectUser } from '@/api/scgl'
import { getCookie } from '@/utils/auth'
import waves from '@/directive/waves'
export default {
  name: 'QXDY',
  // components: {
  //   Pagination
  // },
  directives: { waves },
  data() {
    return {
      isIpad: false,
@@ -381,7 +388,7 @@
      },
      checkStandard: '', // 检验标准
      checkStandardSelect: [], // 检验标准下拉数组
      checkUser: '', // 检验人员
      checkUser: getCookie('navTabId'), // 检验人员
      checkqty: 0, // 检验数量
      checkUserSelect: [], // 检验人员下拉数组
      checkResult: '', // 检验结果
@@ -529,7 +536,7 @@
      this.judgeIsScanningArr.push(timenow)
      let i
      for (i in this.judgeIsScanningArr) {
        flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 1
        flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
        if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
          if (flag) {
            this.fnThrottle(this.enterNative, 500, 2000, belong)()
@@ -638,6 +645,9 @@
        if (this.form.orderstepqrcode.length < 1) {
          return this.$message.info('扫描条码不能为空!')
        }
        if (this.form.wo_code.toString().length === 0) {
          return this.$message.info('未获得工单编码!')
        }
        if (this.checkStandard.length < 1) {
          return this.$message.info('检验标准不能为空!')
        }
@@ -705,7 +715,7 @@
      this.JYTableData = []
      this.multipleSelection = []
      this.checkdescr = ''
      this.checkUser = ''
      this.checkUser = getCookie('navTabId')
      this.checkqty = 0
      this.checkResult = ''
      this.checkStandard = ''
@@ -717,6 +727,8 @@
      this.form.stepcode = ''
      this.form.stepname = ''
      this.judgeIsScanningArr = []
      this.isCancel = true
    },