生箔工序打印

This commit is contained in:
2025-07-22 14:54:20 +08:00
parent 30a1df1055
commit e929005eb3
2 changed files with 32 additions and 2 deletions

View File

@@ -11,7 +11,7 @@
</view> </view>
</view> </view>
<view class="zd-row jccenter mgt20"> <view class="zd-row jccenter mgt20">
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="val1 && type === '2' && disabled2" style="margin-right: 15px" @tap="handleConfirm1('2')">{{$t('button.upper-axis')}}</button> <button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="val1 && type === '2' && disabled2" @tap="handleConfirm1('2')">{{$t('button.upper-axis')}}</button>
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="val1 && type === '4' && disabled2" @tap="handleConfirm1('4')">{{$t('button.lower-axis')}}</button> <button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="val1 && type === '4' && disabled2" @tap="handleConfirm1('4')">{{$t('button.lower-axis')}}</button>
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled1" @tap="handleConfirm2('5')">{{$t('button.ready-to-go')}}</button> <button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled1" @tap="handleConfirm2('5')">{{$t('button.ready-to-go')}}</button>
</view> </view>
@@ -34,6 +34,7 @@
</view> </view>
<view class="zd-row jccenter mgt20"> <view class="zd-row jccenter mgt20">
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled1" @tap="handleConfirm2('6')">{{$t('button.add-order')}}</button> <button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled1" @tap="handleConfirm2('6')">{{$t('button.add-order')}}</button>
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val2}" :disabled="disabled1" @tap="handleConfirm2('7')">打印</button>
</view> </view>
</view> </view>
<view class="zd_wrapper grid-wraper"> <view class="zd_wrapper grid-wraper">
@@ -89,7 +90,7 @@
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import UpTop from '@/components/upTop.vue' import UpTop from '@/components/upTop.vue'
import { confirmAction } from '@/utils/utils.js' import { confirmAction } from '@/utils/utils.js'
import {queryProductArea, queryRawFoilList, createOrder, confirmBlanking, rawScrollDowm} from '@/utils/getData1.js' import {queryProductArea, queryRawFoilList, createOrder, rawPrint, confirmBlanking, rawScrollDowm} from '@/utils/getData1.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -179,6 +180,9 @@
if ((!this.val1 || !this.val2) && type === '6') { if ((!this.val1 || !this.val2) && type === '6') {
return return
} }
if (!this.val2 && type === '7') {
return
}
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?") const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
if (isConfirmed) { if (isConfirmed) {
if (type === '5') { if (type === '5') {
@@ -187,6 +191,9 @@
if (type === '6') { if (type === '6') {
this._createOrder() this._createOrder()
} }
if (type === '7') {
this._rawPrint()
}
} }
}, },
async _confirmBlanking () { async _confirmBlanking () {
@@ -221,6 +228,22 @@
this.disabled1 = false this.disabled1 = false
} }
}, },
async _rawPrint () {
this.disabled1 = true
try {
let res = await rawPrint(this.val2)
this.disabled1 = false
this.pkId = ''
this.pkObj = {}
this.searchList()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
async handleConfirm1(type) { async handleConfirm1(type) {
this.type = type this.type = type
if (!this.pkId && (type === '1' || type === '3')) { if (!this.pkId && (type === '1' || type === '3')) {

View File

@@ -50,6 +50,13 @@ export const createOrder = (code, name) => request({
container_name: name container_name: name
} }
}) })
// 打印
export const rawPrint = (name) => request({
url: 'api/pda/raw/print',
data: {
container_name: name
}
})
// 确认下卷-改为:准备就绪 // 确认下卷-改为:准备就绪
export const confirmBlanking = (code) => request({ export const confirmBlanking = (code) => request({
url: 'api/pda/raw/confirmBlanking', url: 'api/pda/raw/confirmBlanking',