loulijun2021
2022-07-16 392f9468875a8721c17c4e15c288333017cac4a1
src/views/scgl/sckbg.vue
@@ -303,7 +303,7 @@
            @pagination="getMesOrderStepSearch"
          />
        </el-tab-pane>
        <el-tab-pane v-if="false" label="工序检验">
        <el-tab-pane label="工序检验">
          <div style="margin-left: 10px;margin-top:10px;display: flex;flex-direction: column">
            <div style="margin-bottom: 10px;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />扫码信息
@@ -318,38 +318,40 @@
                @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
              />
            </div>
            <div style="line-height: 40px; display: flex;margin-top: 20px">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">工单编码:</div>
                <div>PX00120012312</div>
              </div>
            <!--        六项信息      -->
            <div style="display:flex;margin-top: 10px;align-items: center">
              <div style="display: flex;">
                <div style="width: 90px">产品编码:</div>
                <div>123-446-789</div>
                <div style="display: flex;margin-right: 50px">
                  <div style="width: 90px">工单编码:</div>
                  <div style="width: 100px">PX00120012312</div>
                </div>
                <div style="display: flex;">
                  <div style="width: 90px">产品编码:</div>
                  <div style="width: 100px">123-446-789</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">PX00120012312</div>
                </div>
                <div style="display: flex;">
                  <div style="width: 90px">产品规格:</div>
                  <div style="width: 100px">123-446-789</div>
                </div>
              </div>
              <div style=" display: flex;margin-left: 30px;">
                <div style="display: flex;margin-right: 50px">
                  <div style="width: 90px">工序编码:</div>
                  <div>PX00120012312</div>
                </div>
                <div style="display: flex;">
                  <div style="width: 90px">工序名称:</div>
                  <div>123-446-789</div>
                </div>
              </div>
            </div>
            <div style="line-height: 40px; display: flex;">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">产品名称:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">产品规格:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="line-height: 40px; display: flex;">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">工序编码:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">工序名称:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="margin: 20px 0;font-size: 14px">
            <div style="margin: 10px 0;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验标准信息
            </div>
            <div style="display: flex;align-items: center">
@@ -358,6 +360,7 @@
                v-model="dialogForm.aaa"
                style="width: 200px;"
                placeholder="请选择"
                filterable
              >
                <el-option
                  v-for="item in ARR"
@@ -366,11 +369,12 @@
                  :value="item.code"
                />
              </el-select>
              <div style="width: 90px;margin-left: 50px;">检验标准:</div>
              <div style="width: 90px;margin-left: 50px;">检验人员:</div>
              <el-select
                v-model="dialogForm.aaa"
                style="width: 200px;"
                placeholder="请选择"
                filterable
              >
                <el-option
                  v-for="item in ARR"
@@ -380,8 +384,109 @@
                />
              </el-select>
            </div>
            <div style="margin: 20px 0;font-size: 14px">
            <div style="margin: 10px 0;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验项信息
            </div>
            <div>
              <el-button type="primary" @click="add">新增</el-button>
            </div>
            <div style="margin-top: 10px">
              <el-table
                :data="JYTableData"
                :height="(tableHeight-195)+'px'"
                border
                stripe
                :style="{width: 100+'%',height:tableHeight+'px',}"
                highlight-current-row
                :header-cell-style="this.$headerCellStyle"
                :cell-style="this.$cellStyle"
                @sort-change="JYsortChange"
              >
                <el-table-column
                  prop="RowNum"
                  label="序号"
                />
                <!--                <el-table-column-->
                <!--                  prop="bm"-->
                <!--                  label="检验项目编码"-->
                <!--                  sortable="custom"-->
                <!--                />-->
                <el-table-column
                  prop="mc"
                  sortable="custom"
                  label="检验项目名称"
                >
                  <!--                  <template slot-scope="{row}">-->
                  <!--                    <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请输入" />-->
                  <!--                    <div v-else> {{ row.group_code }}</div>-->
                  <!--                  </template>-->
                </el-table-column>
                <el-table-column
                  prop="ms"
                  label="检验标准描述"
                  sortable="custom"
                >
                  <!--                  <template slot-scope="{row}">-->
                  <!--                    <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请输入" />-->
                  <!--                    <div v-else> {{ row.group_code }}</div>-->
                  <!--                  </template>-->
                </el-table-column>
                <el-table-column
                  prop="jg"
                  label="检验结果"
                  sortable="custom"
                >
                  <template slot-scope="{row}">
                    <div style="justify-content: flex-start ;">
                      <el-radio v-model="radio" label="1">备选项</el-radio>
                      <el-radio v-model="radio" label="2">备选项</el-radio>
                    </div>
                  </template>
                </el-table-column>
                <el-table-column
                  label="操作"
                >
                  <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>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <!--   检验结果   和  检验备注      -->
            <div style="display: flex;margin-top: 20px;align-items: center">
              <div style="display: flex;margin-right: 50px;align-items: center">
                <div style="width: 90px">检验结果:</div>
                <el-select
                  v-model="dialogForm.aaa"
                  style="width: 200px;"
                  placeholder="请选择"
                  filterable
                >
                  <el-option
                    v-for="item in ARR"
                    :key="item.code"
                    :label="item.name"
                    :value="item.code"
                  />
                </el-select>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">检验备注:</div>
                <!--                <el-input v-model="row.group_code" placeholder="请输入" />-->
              </div>
            </div>
            <div style="display: flex;margin: 20px 0;align-items: center">
              <el-button type="primary">首检保存</el-button>
              <el-button type="primary" style="margin-left: 50px">巡检保存</el-button>
              <el-button type="primary" style="margin-left: 50px">完工检保存</el-button>
              <el-button type="info" style="margin-left: 50px">取消</el-button>
            </div>
          </div>
        </el-tab-pane>
@@ -747,6 +852,7 @@
  SavaMesOrderStepReport
} from '@/api/scgl'
import { urlAddRandomNo, webapp_urlprotocol_startup, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
import { UserGroupDelete } from '@/api/jcsz'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -890,8 +996,11 @@
        // order: 'asc', // 排序字段
        // page: 1, // 第几页
        // rows: 20 // 每页多少条
      }
      },
      JYTableData: [
        { RowNum: 1, bm: '001', mc: '尺寸', ms: '无', jg: '我是结果', isVisible: 0 }
      ], // 检验项信息表格
      radio: ''
    }
  },
  created() {
@@ -963,14 +1072,14 @@
        this.$nextTick(() => {
          this.getMesOrderStepSearch()
          $("input[name='produceCode']")[0].focus()
          // this.WXform.orderstepqrcode = ''
          this.WXform.orderstepqrcode = ''
        })
      }
      if (this.$refs.elTabs.currentName === '1') {
        this.$nextTick(() => {
          this.getMesOrderWxStepSearch()
          $("input[name='WXproduceCode']")[0].focus()
          // this.form.orderstepqrcode = ''
          this.form.orderstepqrcode = ''
        })
      }
      if (this.$refs.elTabs.currentName === '2') {
@@ -1472,6 +1581,62 @@
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 80
      })
    },
    /*
  *检验项信息
  * */
    JYsortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.GXform.order = order
      this.GXform.prop = prop
      // this.getOrganizationSearch()
    },
    // 获取工序列表
    // getList(){
    //
    // },
    //  新增
    add() {
      // this.JYTableData.forEach(item => {
      //   item.isVisible = 0
      // })
      let number = Math.random() * Math.random()// 作为删除时的标识符
      number = number === 0 ? (10 + Math.random()) : number
      // const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number }
      // this.JYTableData.unshift(data)
    },
    // 删除
    del() {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        // UserGroupDelete({ UserGrupCode: row.group_code }).then(res => {
        //   if (res.code === '200') {
        //     this.$message.success('删除成功!')
        //     this.getUserGroupSearch()
        //   }
        // })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    //  确认
    confirm() {
    },
    //  取消
    cancel() {
    }
  }
}