loulijun2021
2022-07-20 95fb18f99827a5eeefa1ebf661c6f6459646b87b
src/views/scgl/sckbg.vue
@@ -1,7 +1,6 @@
<template>
  <div>
    <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}">
      <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
        <el-tab-pane label="生产列表">
          <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
@@ -302,192 +301,6 @@
            popper-class="select_bottom"
            @pagination="getMesOrderStepSearch"
          />
        </el-tab-pane>
        <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" />扫码信息
            </div>
            <div style="display: flex;align-items: center">
              <div style="width: 90px">扫描条码:</div>
              <el-input
                v-model="GXform.orderstepqrcode"
                name="GXproduceCode"
                style="width: 300px"
                @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
              />
            </div>
            <!--        六项信息      -->
            <div style="display:flex;margin-top: 10px;align-items: center">
              <div style="display: flex;">
                <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="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">
              <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 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"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                />
              </el-select>
            </div>
            <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>
      </el-tabs>
@@ -990,18 +803,7 @@
          { required: true, message: '请输入报工数量', trigger: ['blur', 'change'] }
        ]
      },
      activeName: '',
      GXform: { // 工序
        orderstepqrcode: '' // 扫描的二维码信息
        // prop: 'wo_code', // 排序字段z
        // order: 'asc', // 排序字段
        // page: 1, // 第几页
        // rows: 20 // 每页多少条
      },
      JYTableData: [
        { RowNum: 1, bm: '001', mc: '尺寸', ms: '无', jg: '我是结果', isVisible: 0 }
      ], // 检验项信息表格
      radio: ''
      activeName: ''
    }
  },
  created() {
@@ -1083,11 +885,6 @@
          this.form.orderstepqrcode = ''
        })
      }
      if (this.$refs.elTabs.currentName === '2') {
        this.$nextTick(() => {
          $("input[name='GXproduceCode']")[0].focus()
        })
      }
    },
    // 扫码键盘回车事件
    async enterNative(val, belong) {
@@ -1126,10 +923,6 @@
        if (res.code === '200' && res.count === 3) {
          await this.WXback(res.data)
        }
      }
      if (belong === 'GXproduceCode') {
        console.log('GXproduceCode')
      }
    },
    // 查询
@@ -1548,8 +1341,8 @@
        ]
      }
      const args = {
        type: 'print', // preview  print
        showOptionDlg: false, // 如果不显示打印对话框而直接打印,将此行注释去掉即可
        type: 'preview', // preview  print
        showOptionDlg: true, // 如果不显示打印对话框而直接打印,将此行注释去掉即可
        report: urlAddRandomNo('./static/grf/报工产出标签.grf'),
        data: obj
      }
@@ -1571,8 +1364,8 @@
        ]
      }
      const args = {
        type: 'print', // preview  print
        showOptionDlg: false, // 如果不显示打印对话框而直接打印,将此行注释去掉即可
        type: 'preview', // preview  print
        showOptionDlg: true, // 如果不显示打印对话框而直接打印,将此行注释去掉即可
        report: urlAddRandomNo('./static/grf/外协收料标签.grf'),
        data: obj
      }
@@ -1584,62 +1377,6 @@
        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() {
    }
  }
}