永康嘉持电器有限公司前端
小小儁爺
2025-06-13 a2bce22a3a4df5f4662c373e57c07fa4268aeee1
src/views/workOrder/workOrderList.vue
@@ -8,11 +8,11 @@
          <el-button v-waves type="success" icon="el-icon-connection" @click="send">派发</el-button>
        </div>
        <el-button v-waves type="primary" @click="batchUpdate"><i
          class="el-icon-edit-outline"
          style="margin-right: 0;"
        /> 批量修改
        </el-button>
        <!--        <el-button v-waves type="primary" @click="batchUpdate"><i-->
        <!--          class="el-icon-edit"-->
        <!--          style="margin-right: 0;"-->
        <!--        /> 批量绑定-->
        <!--        </el-button>-->
      </div>
      <div class="bodyTopFormGroup">
@@ -286,6 +286,13 @@
            width="100"
          />
          <el-table-column
            prop="printcount"
            label="打印次数"
            sortable="custom"
            show-tooltip-when-overflow
            width="110"
          />
          <el-table-column
            prop="priuserdefnvc1"
            label="客户名称"
            width="110"
@@ -463,7 +470,7 @@
                    :style="{color:$store.state.settings.theme}"
                    class="el-icon-printer"
                    style="cursor: pointer;margin-right: 15px"
                    @click="handlePrint(row.wo_code,row.saleOrderCod,row)"
                    @click="handlePrint(row.wo_code,row.saleOrderCode,row)"
                  />
                </el-tooltip>
@@ -1418,14 +1425,14 @@
      <div id="printMe" style="padding: 30px">
        <!--        <div v-for="(item,index) in tableDataPrint" :key="index">-->
        <div>
          <div style="font-size: 26px; text-align: center">流程单</div>
          <div style="font-size: 32px; text-align: center;font-weight:bolder;">流程单</div>
          <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
            <div style="width: 78%">
            <div style="width: 200%">
              <el-form
                ref="formApprove"
                :model="formApprove"
                label-width="80px"
                label-width="100px"
                inline
                style="display: flex;justify-content: space-between"
              >
@@ -1484,20 +1491,20 @@
                </div>
              </el-form>
            </div>
            <div
              id="qrCode0"
              style="width: 22%;height:90px;
                        margin-top: 20px;
                        overflow-y: scroll;display: flex;
                        justify-content: center;
                        position: relative;"
            >
              <div id="qrCode00" ref="qrCodeDiv00" />
            </div>
            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
            <div
              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
            />
            <!--            <div-->
            <!--              id="qrCode0"-->
            <!--              style="width: 22%;height:90px;-->
            <!--                        margin-top: 20px;-->
            <!--                        overflow-y: scroll;display: flex;-->
            <!--                        justify-content: center;-->
            <!--                        position: relative;"-->
            <!--            >-->
            <!--              <div id="qrCode00" ref="qrCodeDiv00" />-->
            <!--            </div>-->
            <!--            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />-->
            <!--            <div-->
            <!--              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"-->
            <!--            />-->
          </div>
          <el-table
@@ -1505,26 +1512,25 @@
            :data="tableDataPrint[0]"
            border
            class="tableDataPrint"
            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000',fontSize:'18px',padding:'2px 0'}"
            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000',fontSize:'18px',padding:'5px 0'}"
            style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
          >
            <el-table-column
              id="column0"
              prop="seq"
              label="工序号"
              label="序号"
              width="70"
              align="center"
            />
            <el-table-column
              id="column1"
              prop="stepqrcode"
              label="工序二维码"
              label="二维码"
              width="100"
              align="center"
            >
              <template slot-scope="{row}">
                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
              </template>
            </el-table-column>
@@ -1570,11 +1576,11 @@
          <div style="font-size: 26px; text-align: center">流程单</div>
          <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
            <div style="width: 78%">
            <div style="width: 200%">
              <el-form
                ref="formApprove"
                :model="formApprove"
                label-width="80px"
                label-width="100px"
                inline
                style="display: flex;justify-content: space-between"
              >
@@ -1613,20 +1619,20 @@
                </div>
              </el-form>
            </div>
            <div
              id="qrCode1"
              style="width: 22%;height:90px;
                        margin-top: 20px;
                        overflow-y: scroll;display: flex;
                        justify-content: center;
                        position: relative;"
            >
              <div id="qrCode01" ref="qrCodeDiv01" />
            </div>
            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
            <div
              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
            />
            <!--            <div-->
            <!--              id="qrCode1"-->
            <!--              style="width: 22%;height:90px;-->
            <!--                        margin-top: 20px;-->
            <!--                        overflow-y: scroll;display: flex;-->
            <!--                        justify-content: center;-->
            <!--                        position: relative;"-->
            <!--            >-->
            <!--              <div id="qrCode01" ref="qrCodeDiv01" />-->
            <!--            </div>-->
            <!--            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />-->
            <!--            <div-->
            <!--              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"-->
            <!--            />-->
          </div>
          <el-table
@@ -1634,21 +1640,21 @@
            :data="tableDataPrint[1]"
            border
            class="tableDataPrint"
            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000',fontSize:'18px',padding:'2px 0'}"
            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000',fontSize:'18px',padding:'5px 0'}"
            style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
          >
            <el-table-column
              id="column0"
              prop="seq"
              label="工序号"
              label="序号"
              width="70"
              align="center"
            />
            <el-table-column
              id="column1"
              prop="stepqrcode"
              label="工序二维码"
              label="二维码"
              width="100"
              align="center"
            >
@@ -1701,7 +1707,7 @@
          <el-button v-waves @click="dialogVisibleBackPreview">返 回</el-button>
          <!--            <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">确 定</el-button>-->
          <!--            <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定/打 印</el-button>-->
          <el-button v-waves v-print="printObj" type="primary">打 印</el-button>
          <el-button v-waves v-print="printObj" type="primary" @click="printObjGetApi">打 印</el-button>
        </div>
      </span>
    </el-dialog>
@@ -2618,7 +2624,7 @@
  AddMesOrderCodeSearch,
  AddUpdateMesOrder, AddUpdateMesOrderList, DeleteMesOrder,
  MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent, MesOrderProcessSopSearch,
  MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch,
  MesOrderSearch, MesOrderSopSearch, UpdateMesOrderPrintCount, UpdateMesOrderStepListSearch,
  UpdateMesOrderStepSearch
} from '@/api/WorkOrder'
import { PartSelect } from '@/api/ProductModel'
@@ -3525,6 +3531,9 @@
      this.dialogForm.mesqtyinit = row.plan_qty
      this.dialogForm.paystartdate = row.plan_startdate
      this.dialogForm.payenddate = row.plan_enddate
      const data = {
        sourceid: this.dialogForm.sourceorderid,
        sourcewo: this.dialogForm.sourceorder,
@@ -3747,6 +3756,10 @@
            return this.$message.info('此工单的最大修改数值为:' + this.dialogForm.mesmaxqty)
          }
          if (this.mesSetting.route && !this.dialogForm.routecode) {
            return this.$message.error('请选择工艺路线!')
          }
          const workListSub = []
          this.stepTableData.forEach((i, j) => {
            workListSub.push(
@@ -3774,6 +3787,8 @@
            wkshopcode: this.dialogForm.wkshopcode,
            woqty: this.dialogForm.mesqty, // 工单数量
            deliverydate: this.dialogForm.deliverydate, // 交付时间
            paystartdate: this.dialogForm.paystartdate,
            payenddate: this.dialogForm.payenddate,
            data_sources: this.dialogForm.data_sources, // 数据来源
            isstep: workListSub.length > 0 ? 'Y' : 'N', //
            difference: this.dialogForm.mesqty - this.dialogForm.mesqtyinit, // 数据差值
@@ -3881,9 +3896,9 @@
              item.forEach(i => {
                this.bindQRCode(i.seq, i.stepqrcode, 'small')
              })
              this.bindQRCode(index, this.formApprove.mesordercode, 'big')
              const div = document.getElementById('qrCode' + index)
              div.scrollTop = div.scrollHeight // 滚动条位于最底部
              // this.bindQRCode(index, this.formApprove.mesordercode, 'big')
              // const div = document.getElementById('qrCode' + index)
              // div.scrollTop = div.scrollHeight // 滚动条位于最底部
            })
            // const div = document.getElementById('qrCode')
@@ -3934,8 +3949,8 @@
      if (size === 'big') {
        new QRCode(this.$refs['qrCodeDiv0' + 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', // 二维码背景色
@@ -3944,8 +3959,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', // 二维码背景色
@@ -4370,6 +4385,12 @@
        this.$refs.tableDataRef.doLayout()
      })
      return sums
    },
    async printObjGetApi() {
      const res = await UpdateMesOrderPrintCount({ wo_code: this.formApprove.mesordercode })
      if (res.code === '200') {
        await this.getMesOrderSearch()
      }
    }
  }
}
@@ -4531,7 +4552,18 @@
}
.formContent {
  width: 240px;
  //width: 330px;
  width: calc(50% - 10px);
  display:flex;
  ::v-deep .el-form-item__label {
    float: left;
  }
  ::v-deep .el-form-item__content {
    //float: left;
    width: 240px;
  }
}
</style>
@@ -4547,6 +4579,12 @@
<style>
.formContent .el-form-item__label {
  color: #000 !important;
  font-size: 20px;
}
.formContent .el-form-item__content {
  color: #000 !important;
  font-size: 20px;
}
</style>
<!--公共页面样式-->