loulijun2021
2023-03-20 ed4da27a04e5c00dc2a457d9bdc92eacd38398a8
src/views/scgl/gd.vue
@@ -93,7 +93,10 @@
            </el-form-item>
          </div>
          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
          <div
            class="bodySearchReset"
            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
          >
            <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
@@ -746,7 +749,7 @@
          <!--          <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>-->
          <el-button
            v-if="!sumbitBottonIsDisabled"
            v-if="!submitBottonIsDisabled"
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
@@ -755,7 +758,7 @@
          >确 定</el-button>
          <el-button
            v-if="sumbitBottonIsDisabled"
            v-if="submitBottonIsDisabled"
            v-waves
            type="primary"
            disabled
@@ -1509,6 +1512,67 @@
          </div>
          <div
            v-if="printSize===2"
            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>
          </div>
          <div
            v-if="printSize===5"
            style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
          >
@@ -1780,8 +1844,8 @@
        routecode: '', // 工艺路线编码
        wkshopcode: '', // 生产车间编码
        // planstartdate: '', // 计划开始时间
        // planenddate: '', // 计划完成时间
        planstartdate: '', // 计划开始时间
        planenddate: '', // 计划完成时间
        orderlev: '', // 工单等级
        isAps: 'N', // 是否排程
        bomId: '', // 物料清单id
@@ -1940,10 +2004,11 @@
      defaultroute_codeArr: '', // 默认工艺路线数组
      projectTableData: [], // 设备列表
      tableDataDetail: [], // 点击工单表的行 显示详细信息
      printSize: 1,
      printSize: 0,
      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' },
@@ -1954,7 +2019,7 @@
          return time.getTime() < Date.now() - 8.64e7
        }
      },
      sumbitBottonIsDisabled: false
      submitBottonIsDisabled: false
    }
  },
  created() {
@@ -2090,7 +2155,7 @@
      this.dialogForm.wkshopcode = ''
      this.sumbitBottonIsDisabled = false
      this.submitBottonIsDisabled = false
    },
    // 工艺路线值改变
    async routecodeChange(val) {
@@ -2103,7 +2168,7 @@
      this.wkshopArr = res2
      this.dialogForm.wkshopcode = ''
      this.sumbitBottonIsDisabled = false
      this.submitBottonIsDisabled = false
    },
    // 生产车间值改变时
    wkshopcodeChange(val) {
@@ -2116,7 +2181,7 @@
        // console.log(res, 1)
      }).catch(err => {
        // console.log(err, 2)
        this.sumbitBottonIsDisabled = true
        this.submitBottonIsDisabled = true
      })
    },
@@ -2281,7 +2346,7 @@
      this.bomIdArr = []
      this.$refs.dialogForm.clearValidate()
      this.sumbitBottonIsDisabled = false
      this.submitBottonIsDisabled = false
    },
    // 对话框取消
    dialogVisibleCancel() {
@@ -2515,6 +2580,11 @@
          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 // 滚动条位于最顶部
          })
        }
      })
@@ -2538,8 +2608,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
@@ -2765,6 +2835,7 @@
<style lang="scss" scoped>
$main_color: #42b983;
.dialogVisibleRoute {
  .myCheckboxGroup {
    display: flex;