| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--打印预览页面--> |
| | | <!--打印预览页面 小标签--> |
| | | <el-dialog |
| | | title="预览" |
| | | :visible.sync="dialogVisible2" |
| | |
| | | <!-- 要打印的区域 --> |
| | | <div id="printMe2" style="padding: 30px;"> |
| | | <div |
| | | style="display: flex;width: 300px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | <div style="width: 80px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 120px;border-bottom:1px solid #000;justify-content: center;align-items: center " |
| | | style="display: flex;height: 90px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div id="qrCode2" ref="qrCodeDiv2" /> |
| | | <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" /> |
| | | </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: 30px">数量:</div> |
| | | 10000 |
| | | <!-- {{ qrForm.startqty }}--> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:220px;display: flex;flex-direction: column"> |
| | | <div style="width:190px;display: flex;flex-direction: column"> |
| | | <div |
| | | style="display: flex;height: 25%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left" |
| | | 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: 25%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left" |
| | | 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: 25%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | 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: 25%;justify-content: flex-start;align-items: center;text-align: left"> |
| | | <div style="width: 60px;margin-left: 5px;">下道工序:</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> |
| | | |
| | | <!-- {{ qrForm.operator }}--> |
| | | <!-- {{ qrForm.operatorTime }}--> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisible2 = false">取 消</el-button> |
| | |
| | | bindQRCode(text) { |
| | | new QRCode(this.$refs.qrCodeDiv2, { |
| | | text: text, |
| | | width: 50, |
| | | height: 50, |
| | | // width: 50, |
| | | width: 60, |
| | | // height: 50, |
| | | height: 60, |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | |
| | | this.qrForm.partcode = this.dialogForm.partcode |
| | | this.qrForm.partname = this.dialogForm.partname |
| | | this.qrForm.nextstepname = this.dialogForm.nextstepname |
| | | |
| | | this.qrForm.operator = getCookie('username') |
| | | this.qrForm.operatorTime = handleDatetime2(new Date()) |
| | | this.$nextTick(() => { |
| | | this.bindQRCode(this.qrForm.qrvalue) |
| | | console.log(this.$refs.qrCodeDiv2, 123) |
| | | // console.log(this.$refs.qrCodeDiv2.querySelectorAll('#qrCode2>img'), 1) |
| | | // console.log(this.$refs.qrCodeDiv2.querySelectorAll('#qrCode2>canvas'), 2) |
| | | }) |
| | | }, |
| | | WXprint2() { |
| | |
| | | this.qrForm.partcode = this.dialogForm.partcode |
| | | this.qrForm.partname = this.dialogForm.partname |
| | | this.qrForm.nextstepname = this.dialogForm.nextstepname |
| | | this.qrForm.operator = getCookie('username') |
| | | this.qrForm.operatorTime = handleDatetime2(new Date()) |
| | | this.$nextTick(() => { |
| | | this.bindQRCode(this.qrForm.qrvalue) |
| | | }) |
| | |
| | | this.qrForm.partcode = '' |
| | | this.qrForm.partname = '' |
| | | this.qrForm.nextstepname = '' |
| | | this.$refs.qrCodeDiv2 = '' |
| | | this.qrForm.operator = '' |
| | | this.qrForm.operatorTime = '' |
| | | // this.$refs.qrCodeDiv2 = '' |
| | | }, |
| | | |
| | | // 获取页面高度 |
| | |
| | | // console.log(JSON.stringify(data), 1) |
| | | // console.log(this.badDialogForm.operation, 1) |
| | | // this.badPrintOperator = |
| | | this.badPrint(this.badOperationArr.find(item => item.usercode === this.badDialogForm.operation).username) |
| | | this.dialogVisible2 = true |
| | | // this.badPrint(this.badOperationArr.find(item => item.usercode === this.badDialogForm.operation).username) |
| | | // this.dialogVisible2 = true |
| | | |
| | | // EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => { |
| | | // if (res.code === '200' || res.code === '301') { |
| | | // this.getBadList() |
| | | // this.badDialogVisible = false |
| | | // this.badPrint(this.badOperationArr.find(item => item.usercode === this.badDialogForm.operation).username) |
| | | // this.dialogVisible2 = true |
| | | // return this.$message.success('保存成功!') |
| | | // } |
| | | // }) |
| | | EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => { |
| | | if (res.code === '200' || res.code === '301') { |
| | | this.getBadList() |
| | | this.badDialogVisible = false |
| | | this.badPrint(this.badOperationArr.find(item => item.usercode === this.badDialogForm.operation).username) |
| | | this.dialogVisible2 = true |
| | | return this.$message.success('保存成功!') |
| | | } |
| | | }) |
| | | }, |
| | | badPrint(username) { |
| | | this.qrForm.qrvalue = this.badDialogForm.wo_code + ';' + this.badDialogForm.nextstepcode |