剩余模块:生产退料
This commit is contained in:
@@ -153,31 +153,37 @@
|
||||
command.setSize(100, 50)
|
||||
command.setGap(2)
|
||||
command.setCls()
|
||||
command.setQR(15, 15, "L", 3, "A", item.FBarCode)
|
||||
command.setText(120, 15, "TSS24.BF2", 1, 1, `Date:${item.FDate.split('T')[0]}`)
|
||||
command.setText(120, 40, "TSS24.BF2", 1, 1, `MO#:${item.FSrcBillNo}`)
|
||||
command.setText(120, 65, "TSS24.BF2", 1, 1, `P/N:${item.FMaterialId}`)
|
||||
command.setText(120, 90, "TSS24.BF2", 1, 1, `SN#:${item.FSno}`)
|
||||
command.setQR(30, 100, "L", 7, "A", item.FBarCode)
|
||||
command.setText(280, 40, "TSS24.BF2", 1, 1, `Supplier Name:${item.FSupplierId}`)
|
||||
command.setText(280, 80, "TSS24.BF2", 1, 1, `P/N:${item.FMaterialId}`)
|
||||
command.setText(280, 120, "TSS24.BF2", 1, 1, `Qty:${item.FQty}`)
|
||||
command.setText(280, 160, "TSS24.BF2", 1, 1, `Batch No:${item.FLot}`)
|
||||
command.setText(280, 200, "TSS24.BF2", 1, 1, `Supplier Lot No:${item.FSupplierLot}`)
|
||||
command.setText(280, 240, "TSS24.BF2", 1, 1, `PO:${state.pageData.PO}`)
|
||||
command.setText(280, 280, "TSS24.BF2", 1, 1, `Delivery Date:${state.pageData.Date}`)
|
||||
command.setText(280, 320, "TSS24.BF2", 1, 1, `GRN #:${state.pageData.FBillCode}`)
|
||||
command.setPagePrint()
|
||||
state.sendData = command.getData();
|
||||
}
|
||||
const sendHexStr = () => {
|
||||
let arr = []
|
||||
let data1 = {
|
||||
FBarCodeRule: "171064",
|
||||
FBarCodeRule: "01",
|
||||
FBarCode: `${state.pageData.FBillCode}*${state.pageData.FMaterialId}*${state.pageData.FLotText}*${Number(state.pageData.FQty) - Number(state.pageData.splitQty)}`,
|
||||
FBillCode:state.pageData.FBillCode,
|
||||
FMaterialId: state.pageData.FMaterialId,
|
||||
FSupplierLot: state.pageData.FSupplierId,
|
||||
FQty: Number(state.pageData.FQty) - Number(state.pageData.splitQty)
|
||||
FSupplierLot: state.pageData.FSupplierLot,
|
||||
FLot: state.pageData.FLotText,
|
||||
FQty: (Number(state.pageData.FQty) - Number(state.pageData.splitQty)) + ''
|
||||
}
|
||||
let data2 = {
|
||||
FBarCodeRule: "171064",
|
||||
FBarCodeRule: "01",
|
||||
FBarCode: `${state.pageData.FBillCode}*${state.pageData.FMaterialId}*${state.pageData.FLotText}*${Number(state.pageData.splitQty)}`,
|
||||
FBillCode:state.pageData.FBillCode,
|
||||
FMaterialId: state.pageData.FMaterialId,
|
||||
FSupplierLot: state.pageData.FSupplierId,
|
||||
FQty: Number(state.pageData.splitQty)
|
||||
FSupplierLot: state.pageData.FSupplierLot,
|
||||
FLot: state.pageData.FLotText,
|
||||
FQty: Number(state.pageData.splitQty) + ''
|
||||
}
|
||||
arr = [data1,data2]
|
||||
UHIK_BD_BarCodeMainFileSave({
|
||||
@@ -185,40 +191,19 @@
|
||||
Items: arr
|
||||
},true).then((res : any) => {
|
||||
console.log(res);
|
||||
// if (res.code == 200) {
|
||||
// let i : number = 0;
|
||||
// state.timer = setInterval(() => {
|
||||
// if (state.printState === '0') {
|
||||
// createLabel(state.prontList[i])
|
||||
// initPrint()
|
||||
// i++;
|
||||
// }
|
||||
// if (state.prontList.length == i) {
|
||||
// clearInterval(state.timer);
|
||||
// state.timer = null;
|
||||
// state.printState = '0';
|
||||
// }
|
||||
// }, 2000);
|
||||
// } else {
|
||||
// let str = JSON.stringify(res)
|
||||
// if(str.indexOf('违反字段唯一性要求') !== -1 || str.indexOf('is already been used') !== -1){
|
||||
// let i : number = 0;
|
||||
// state.timer = setInterval(() => {
|
||||
// if (state.printState === '0') {
|
||||
// createLabel(state.prontList[i])
|
||||
// initPrint()
|
||||
// i++;
|
||||
// }
|
||||
// if (state.prontList.length == i) {
|
||||
// clearInterval(state.timer);
|
||||
// state.timer = null;
|
||||
// state.printState = '0';
|
||||
// }
|
||||
// }, 2000);
|
||||
// } else {
|
||||
// uni.$u.toast(t('index.cjbqsb'))
|
||||
// }
|
||||
// }
|
||||
if (res.code == 200) {
|
||||
|
||||
setTimeout(()=>{
|
||||
createLabel(arr[0])
|
||||
initPrint()
|
||||
},2000)
|
||||
setTimeout(()=>{
|
||||
createLabel(arr[1])
|
||||
initPrint()
|
||||
},4000)
|
||||
} else {
|
||||
uni.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user