永康嘉持电器有限公司前端
小小儁爺
2025-03-13 2146654ce466348808bd11218d5a71756d03abc4
1.打印模板修改2.新增打印次数字段
已修改3个文件
149 ■■■■■ 文件已修改
src/api/WorkOrder.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/workOrder/workOrderList.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/workOrder/workOrderSend.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/WorkOrder.js
@@ -295,3 +295,11 @@
  })
}
// MES工单打印更新打印次数
export function UpdateMesOrderPrintCount(data) {
  return request({
    url: 'WorkOrder/UpdateMesOrderPrintCount',
    method: 'post',
    params: data
  })
}
src/views/workOrder/workOrderList.vue
@@ -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,21 +1512,21 @@
            :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'}"
            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000',fontSize:'18px'}"
            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"
            >
@@ -1570,11 +1577,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 +1620,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 +1641,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'}"
            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000',fontSize:'18px'}"
            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 +1708,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 +2625,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'
@@ -3881,9 +3888,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')
@@ -4370,6 +4377,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 +4544,7 @@
}
.formContent {
  width: 240px;
  width: 300px;
}
</style>
@@ -4547,6 +4560,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>
<!--公共页面样式-->
src/views/workOrder/workOrderSend.vue
@@ -389,19 +389,19 @@
                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="打印工单" placement="top">
                  <!--                  <i-->
                  <!--                    class="el-icon-tickets"-->
                  <!--                    style="cursor: pointer;color: #42b983;margin-right: 15px"-->
                  <!--                    @click="check(row)"-->
                  <!--                  />-->
                  <i
                    :style="{color:$store.state.settings.theme}"
                    class="el-icon-printer"
                    style="cursor: pointer;margin-right: 15px"
                    @click.stop="handlePrint(row.wo_code)"
                  />
                </el-tooltip>
                <!--                <el-tooltip class="item" effect="dark" content="打印工单" placement="top">-->
                <!--                  &lt;!&ndash;                  <i&ndash;&gt;-->
                <!--                  &lt;!&ndash;                    class="el-icon-tickets"&ndash;&gt;-->
                <!--                  &lt;!&ndash;                    style="cursor: pointer;color: #42b983;margin-right: 15px"&ndash;&gt;-->
                <!--                  &lt;!&ndash;                    @click="check(row)"&ndash;&gt;-->
                <!--                  &lt;!&ndash;                  />&ndash;&gt;-->
                <!--                  <i-->
                <!--                    :style="{color:$store.state.settings.theme}"-->
                <!--                    class="el-icon-printer"-->
                <!--                    style="cursor: pointer;margin-right: 15px"-->
                <!--                    @click.stop="handlePrint(row.wo_code)"-->
                <!--                  />-->
                <!--                </el-tooltip>-->
                <el-tooltip class="item" effect="dark" content="详情" placement="top">
                  <i