loulijun2021
2023-03-20 a1c2af547ceee7a78226cb7f271b9f9cd1854786
src/views/scgl/gd.vue
@@ -320,7 +320,7 @@
              <div class="operationClass">
                <el-tooltip class="item" effect="dark" content="打印工单" placement="top">
                  <i
                    class="el-icon-tickets"
                    class="el-icon-printer"
                    style="cursor: pointer;color: #42b983;margin-right: 15px"
                    @click="handlePrint(row.wo_code)"
                  />
@@ -414,7 +414,7 @@
              <div class="operationClass">
                <el-tooltip class="item" effect="dark" content="打印工序" placement="top">
                  <i
                    class="el-icon-tickets"
                    class="el-icon-printer"
                    style="cursor: pointer;color: #42b983;margin-right: 15px"
                    @click="supplementSmallClick(row)"
                  />
@@ -1171,12 +1171,14 @@
                <el-form-item label="产品编码:" class="formContent">
                  {{ formApprove.partcode }}
                </el-form-item>
                <el-form-item label="产品名称:" class="formContent">
                  {{ formApprove.partname }}
                </el-form-item>
                <el-form-item label="产品规格:" class="formContent">
                  {{ formApprove.partspec }}
                </el-form-item>
                <el-form-item label="产品名称:" class="formContent" style="width: 100%;">
                  {{ formApprove.partname }}
                  <!--                  王力-5寸H型单曲合页(加彩款)左上页金工件-->
                </el-form-item>
                <el-form-item label="工单数量:" class="formContent">
                  {{ formApprove.plan_qty }}
                </el-form-item>
@@ -1424,6 +1426,68 @@
              <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
                <div style="width: 60px;margin-left: 5px;">处理时间:</div>
                <div>{{ qrForm.operatorTime }}</div>
              </div>
            </div>
          </div>
          <div
            v-if="printSize===2"
            class="printSize2"
            style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
          >
            <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
              <div
                style="display: flex;height: 60%;border-bottom:1px solid #000;
              justify-content: center;align-items: center;position: relative"
              >
                <div
                  id="qrCode2"
                  ref="qrCodeDiv2"
                  style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
                />
              </div>
              <div
                style="display: flex;height:  20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
              >
                <div style="margin-left: 3px; ">数量:{{ qrForm.startqty }}</div>
              </div>
              <div style="display: flex;height:  20%;justify-content: flex-start;align-items: center;">
                <div style="margin-left: 3px; ">操作:{{ qrForm.operator }}</div>
              </div>
            </div>
            <div style="width:150px;display: flex;flex-direction: column">
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
              >
                <div style="margin-left: 3px;">编号:{{ qrForm.wo_code }}</div>
              </div>
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
              >
                <div style="margin-left: 3px;">产品编码:{{ qrForm.partcode }}</div>
              </div>
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
              >
                <div style="margin-left: 3px;">产品名称:{{ qrForm.partname }}</div>
              </div>
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
              >
                <div style="margin-left: 3px;">下道工序:{{ qrForm.nextstepname }}</div>
              </div>
              <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
                <div style=" margin-left: 3px;">时间: {{ qrForm.operatorTime }}</div>
                <!--                <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
                <!--                <div>{{ qrForm.operatorTime }}</div>-->
              </div>
            </div>
@@ -1882,10 +1946,11 @@
      defaultroute_codeArr: '', // 默认工艺路线数组
      projectTableData: [], // 设备列表
      tableDataDetail: [], // 点击工单表的行 显示详细信息
      printSize: 1,
      printSize: 2,
      printSizeSelectArr: [// 宽*高
        { code: 0, name: '80*50' },
        { code: 1, name: '78*60' }
        { code: 1, name: '78*60' },
        { code: 2, name: '60*40' }
        // { code: 2, name: '50*60' },
        // { code: 3, name: '50*40' },
        // { code: 4, name: '50*80' },
@@ -2404,8 +2469,8 @@
      } else {
        new QRCode(this.$refs['qrCodeDiv' + seq], {
          text: text,
          width: size === 'big' ? 90 : 60,
          height: size === 'big' ? 90 : 60,
          width: size === 'big' ? 90 : 45,
          height: size === 'big' ? 90 : 45,
          // colorDark: '#333333', // 二维码颜色
          colorDark: '#000', // 二维码颜色
          colorLight: '#ffffff', // 二维码背景色
@@ -2458,6 +2523,10 @@
          this.$nextTick(() => {
            console.log(this.qrForm.qrvalue, 3333)
            this.bindQRCode2(this.qrForm.qrvalue)
            const div = document.getElementById('qrCode2')
            // 这么多代码只需要这一句实现我们所需要的功能,定位div滚动条位置在底部,scrollHeight计算出div的高度,再scrollTop 设置滚动条的高度为多少
            div.scrollTop = div.scrollHeight // 滚动条位于最底部
            // div.scrollTop = 0 // 滚动条位于最顶部
          })
        }
      })
@@ -2481,8 +2550,8 @@
    bindQRCode2(text) {
      new QRCode(this.$refs.qrCodeDiv2, {
        text: text,
        width: 60,
        height: 60,
        width: this.printSize !== 2 ? 60 : 55,
        height: this.printSize !== 2 ? 60 : 55,
        colorDark: '#000', // 二维码颜色
        colorLight: '#ffffff', // 二维码背景色
        correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H