| | |
| | | label="产品规格" |
| | | sortable="custom" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }}</div> |
| | |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="200" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="工序编码" |
| | | prop="stepcode" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="工序名称" |
| | | prop="stepname" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="任务数量" |
| | |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisible2Close" |
| | | > |
| | | <!-- 要打印的区域 --> |
| | | <div id="printMe2" style="padding: 0px;"> |
| | | <div |
| | | style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | <div style="height: 300px"> |
| | | <!-- 下拉框选择打印尺寸--> |
| | | <div style="display: flex;align-items: center;margin: 0 0 20px 0"> |
| | | <div>选择打印尺寸:</div> |
| | | <el-select |
| | | v-model="printSize" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="printSizeChange" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 90px;border-bottom:1px solid #000; |
| | | <el-option |
| | | v-for="item in printSizeSelectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <!-- 要打印的区域 --> |
| | | <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">--> |
| | | <div id="printMe2" :style="printMe2StylePadding(printSize)"> |
| | | <div |
| | | v-if="printSize===0" |
| | | style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 96px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" /> |
| | | > |
| | | <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ qrForm.startqty }} |
| | | </div> |
| | | <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ qrForm.startqty }} |
| | | </div> |
| | | <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:190px;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="width: 60px;margin-left: 5px;">工单编号:</div> |
| | | <div>{{ 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="width: 60px;margin-left: 5px;">产品编码:</div> |
| | | <div>{{ 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="width:60px;margin-left: 5px;">产品名称:</div> |
| | | <div>{{ 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="width:60px;margin-left: 5px;">下道工序:</div> |
| | | <div>{{ qrForm.nextstepname }}</div> |
| | | </div> |
| | | <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 style="width:190px;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="width: 60px;margin-left: 5px;">工单编号:</div> |
| | | <div>{{ 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="width: 60px;margin-left: 5px;">产品编码:</div> |
| | | <div>{{ 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="width:60px;margin-left: 5px;">产品名称:</div> |
| | | <div>{{ 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="width:60px;margin-left: 5px;">下道工序:</div> |
| | | <div>{{ qrForm.nextstepname }}</div> |
| | | </div> |
| | | <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===1" |
| | | style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 96px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ qrForm.startqty }} |
| | | </div> |
| | | <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:190px;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="width: 60px;margin-left: 5px;">工单编号:</div> |
| | | <div>{{ 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="width: 60px;margin-left: 5px;">产品编码:</div> |
| | | <div>{{ 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="width:60px;margin-left: 5px;">产品名称:</div> |
| | | <div>{{ 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="width:60px;margin-left: 5px;">下道工序:</div> |
| | | <div>{{ qrForm.nextstepname }}</div> |
| | | </div> |
| | | <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===5" |
| | | style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 60px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ qrForm.startqty }} |
| | | </div> |
| | | <div style="display: flex;height: 20px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:100%;display: flex;flex-direction: column;"> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;align-items: center;text-align: left" |
| | | > |
| | | <!-- <div style="width: 60px;margin-left: 5px;">工单编号:</div>--> |
| | | <div>{{ qrForm.wo_code }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;align-items: center ;text-align: left" |
| | | > |
| | | <!-- <div style="width: 60px;margin-left: 5px;">产品编码:</div>--> |
| | | <div>{{ qrForm.partcode }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: center;align-items: center;text-align: left" |
| | | > |
| | | <!-- <div style="width:60px;margin-left: 5px;">产品名称:</div>--> |
| | | <div>{{ qrForm.partname }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: center;align-items: center;text-align: left" |
| | | > |
| | | <!-- <div style="width:60px;margin-left: 5px;">下道工序:</div>--> |
| | | <div>{{ qrForm.nextstepname }}</div> |
| | | </div> |
| | | <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left"> |
| | | <!-- <div style="width: 60px;margin-left: 5px;">处理时间:</div>--> |
| | | <div>{{ qrForm.operatorTime }}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | closeCallback(vue) { // 关闭打印的回调事件(无法确定点击的是确认还是取消) |
| | | console.log('11212', vue) |
| | | // vue.dialogVisible = false |
| | | vue.dialogVisible2 = false |
| | | // vue.dialogVisible2 = false |
| | | // vue.dialogVisible = false |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | |
| | | defaultroute_codeArr: '', // 默认工艺路线数组 |
| | | projectTableData: [], // 设备列表 |
| | | isExpandForm: false, // 表单是否展开,默认不展开 |
| | | tableDataDetail: []// 点击工单表的行 显示详细信息 |
| | | tableDataDetail: [], // 点击工单表的行 显示详细信息 |
| | | printSize: 1, |
| | | printSizeSelectArr: [// 宽*高 |
| | | { code: 0, name: '80*50' }, |
| | | { code: 1, name: '78*60' }, |
| | | { code: 2, name: '50*60' }, |
| | | { code: 3, name: '50*40' }, |
| | | { code: 4, name: '50*80' }, |
| | | { code: 5, name: '40*30' } |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | // 生成二维码 |
| | | // 生成二维码 工单报表二维码 |
| | | bindQRCode(seq, text, size) { |
| | | if (size === 'big') { |
| | | console.log(text, 1) |
| | |
| | | this.qrForm.operatorTime = '' |
| | | // this.$refs.qrCodeDiv2 = '' |
| | | }, |
| | | // 生成二维码 |
| | | // 生成二维码 工序标签二维码 |
| | | bindQRCode2(text) { |
| | | new QRCode(this.$refs.qrCodeDiv2, { |
| | | text: text, |
| | |
| | | // 打印工单 |
| | | printOrder() { |
| | | |
| | | }, |
| | | // 选择打印尺寸的大小值改变 |
| | | printSizeChange(val) { |
| | | this.$nextTick(() => { |
| | | this.bindQRCode2(this.qrForm.qrvalue) |
| | | }) |
| | | }, |
| | | printMe2StylePadding(val) { |
| | | if (val === 0) { |
| | | return { paddingLeft: '10px', paddingTop: '5px' } |
| | | } |
| | | if (val === 5) { |
| | | return { paddingLeft: '15px', paddingTop: '7px' } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | //} |
| | | } |
| | | |
| | | ::v-deep .el-select__caret{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | </style> |
| | | <style> |
| | | |