春风项目四线(合箱线、总装线)
yyt
2024-06-03 5030f3d30ccc1bd16db371c6970a48103aff9191
jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue
@@ -3,16 +3,6 @@
    <div style="width: 100%">
      <el-card class="box-card" >
        <el-form :model="from" size="large" :inline="true" label-width="68px" @submit.native.prevent>
<!--          <el-form-item label="箱体码:" prop="scanObject1" >-->
<!--            <el-input-->
<!--              style="width: 350px"-->
<!--              v-model="from.scanObject1"-->
<!--              placeholder="请输入箱体码"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--              @input="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
          <el-form-item label-width="200" label="平衡轴码" :prop="from.scanObject2"  style="align-content: center">
            <input v-model="from.scanObject2"
                   ref="inputdata"
@@ -30,29 +20,6 @@
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="轴名称:" prop="axisName" >
            <el-select v-model="from.axisName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.axisname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="颈名称:" prop="neckName" >
            <el-select v-model="from.neckName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.neckname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
@@ -63,7 +30,6 @@
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
@@ -86,17 +52,11 @@
            <el-descriptions-item label="平衡轴码">
              <span>{{queryParams.scanObject2}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="轴名称">
              <span>{{queryParams.axisName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="颈名称">
              <span>{{queryParams.neckName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="瓦名称">
              <span>{{queryParams.tileName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="配瓦颜色">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
              <span v-for="(word, index) in queryParams.words" :key="index" :style="{ backgroundColor: queryParams.colors[index],fontSize: '30px',}">{{ word }}</span>
            </el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
@@ -108,6 +68,7 @@
<script>
import VueQr from 'vue-qr'
import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {setBarcode} from "@/api/main/bs/tileMatchRules/tileMatchRules";
export default {
  name: "index",
  dicts: ['colour_hex','productseries','axisname','neckname','tilename'],
@@ -124,13 +85,12 @@
      from:{
        pageNum: 1,
        pageSize: 10,
        productSeries: null,
        //scanObject1: null,
        //scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: '',
        productSeries: '380Y',
        scanObject1: null,
        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
        axisName: null,
        neckName: null,
        tileName: null,
        tileName: '平衡轴瓦',
        axisParameterNoPosition: null,
        neckParameterPosition: null,
        axisValue: null,
@@ -146,11 +106,12 @@
        pageSize: 10,
        productSeries: null,
        scanObject1: null,
        // scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: null,
        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
        axisName: null,
        neckName: null,
        tileName: null,
        words: ['------', '------', ],
        colors: ['#FFFFFF', '#FFFFFF'],
        axisParameterNoPosition: null,
        neckParameterPosition: null,
        axisValue: null,
@@ -192,6 +153,14 @@
        this.scannerFlag = true
        console.log('条码:',this.from.scanObject2)
        //扫描完成
        if (typeof this.from.scanObject2 !== 'undefined') {
          console.log('条码:',this.from.scanObject2,'HOP040')
          setBarcode({barcode:this.from.scanObject2,locationCode:'HOP040'}).then(res =>{
            console.log('res',res)
            this.from.scanObject1=res
          })
        }
        this.handleQuery()
      }
    },
    /** 搜索按钮操作 */
@@ -199,9 +168,9 @@
      this.clear();
      if(this.from.scanObject1 !== null && this.from.scanObject2 !== null
        && this.from.axisName !== null && this.from.axisName !== ""
        && this.from.neckName !== null && this.from.neckName !== ""
        && this.from.tileName !== null && this.from.tileName !== ""
        // && this.from.axisName !== null && this.from.axisName !== ""
        // && this.from.neckName !== null && this.from.neckName !== ""
        // && this.from.tileName !== null && this.from.tileName !== ""
        && this.from.productSeries !== null && this.from.productSeries !== "")
      {
        this.axisValueextracted();
@@ -224,6 +193,7 @@
        }
      }
      else{
        console.log("搜索条件",this.from.scanObject1 ,this.from.scanObject2)
        const h = this.$createElement;
        this.$message({
          message: h('p',null, [
@@ -269,7 +239,14 @@
      }
      console.log(queryParams)
      listTileMatchRules(queryParams).then(response => {
        this.queryParams.tileColor = response.rows[0].tileColor;
        // this.queryParams.tileColor = response.rows[0].tileColor;
        this.queryParams.words= ['------', '------']
        this.queryParams.colors= ['#FFFFFF', '#FFFFFF']
        for (var i=0;i<response.rows.length;i++){
          this.queryParams.colors[i]=response.rows[i].tileColor;
          this.queryParams.words[i]=response.rows[i].tileName;
        }
        console.log('颜色:',response)
      });
    },
    clear(){