剩余模块:生产退料
This commit is contained in:
parent
a59dd54c27
commit
63a44af1d8
@ -198,7 +198,7 @@
|
||||
const str = JSON.stringify(obj);
|
||||
console.log(item);
|
||||
temporaryScanDraftSave({
|
||||
FVHUBFormId: "SAL_DELIVERYNOTICE", //数据类型
|
||||
FVHUBFormId: "SAL_OUTSTOCK", //数据类型
|
||||
FVHUBFBillNo: state.FBillNo, //单据编号
|
||||
FVHUBScanNumber: state.queryString, //条码
|
||||
FVHUBMaterialNumber: item.articlesStr, //物料编码
|
||||
@ -234,7 +234,7 @@
|
||||
}
|
||||
const scanRecordFun = () => {
|
||||
toPages('/pages/records/index', {
|
||||
FormId: 'SAL_DELIVERYNOTICE',
|
||||
FormId: 'SAL_OUTSTOCK',
|
||||
FbillNo: state.FBillNo
|
||||
})
|
||||
}
|
||||
@ -250,7 +250,7 @@
|
||||
let ids : any = []
|
||||
let ScanEntry : any = []
|
||||
let param = {
|
||||
FormId: 'SAL_DELIVERYNOTICE',
|
||||
FormId: 'SAL_OUTSTOCK',
|
||||
UserId: uni.getStorageSync('userInfo').Context.UserId,
|
||||
FbillNo: state.FBillNo
|
||||
};
|
||||
@ -273,7 +273,7 @@
|
||||
})
|
||||
//推送数据
|
||||
SAL_OUTSTOCKCheck({
|
||||
Ids: ids,
|
||||
Ids: state.materialId,
|
||||
EntryIds: EntryIds.toString(),
|
||||
}).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
58
unpackage/dist/dev/app-plus/app-service.js
vendored
58
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -13942,38 +13942,56 @@ ${codeFrame}` : message2);
|
||||
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({
|
||||
Key: "qwe123!@#",
|
||||
Items: arr
|
||||
}, true).then((res2) => {
|
||||
formatAppLog("log", "at pages/split/print.vue:187", res2);
|
||||
formatAppLog("log", "at pages/split/print.vue:193", res2);
|
||||
if (res2.code == 200) {
|
||||
setTimeout(() => {
|
||||
createLabel(arr[0]);
|
||||
initPrint();
|
||||
}, 2e3);
|
||||
setTimeout(() => {
|
||||
createLabel(arr[1]);
|
||||
initPrint();
|
||||
}, 4e3);
|
||||
} else {
|
||||
uni.$u.toast(res2.msg);
|
||||
}
|
||||
});
|
||||
};
|
||||
const initPrint = () => {
|
||||
@ -13997,16 +14015,16 @@ ${codeFrame}` : message2);
|
||||
return resArr;
|
||||
}
|
||||
var sendloop = splitString(hexStr, 250);
|
||||
formatAppLog("log", "at pages/split/print.vue:249", sendloop.length);
|
||||
formatAppLog("log", "at pages/split/print.vue:234", sendloop.length);
|
||||
function realWriteData(sendloop2, i2) {
|
||||
var data2 = sendloop2[i2];
|
||||
if (typeof data2 == "undefined") {
|
||||
return;
|
||||
}
|
||||
formatAppLog("log", "at pages/split/print.vue:255", "第【" + i2 + "】次写数据" + data2);
|
||||
formatAppLog("log", "at pages/split/print.vue:240", "第【" + i2 + "】次写数据" + data2);
|
||||
blueModule.sendHexStr(data2, (result) => {
|
||||
formatAppLog("log", "at pages/split/print.vue:258", "发送结果");
|
||||
formatAppLog("log", "at pages/split/print.vue:259", result);
|
||||
formatAppLog("log", "at pages/split/print.vue:243", "发送结果");
|
||||
formatAppLog("log", "at pages/split/print.vue:244", result);
|
||||
if (!result.success) {
|
||||
uni.$u.toast(t("index.ljydk"));
|
||||
uni.setStorageSync("printInfo", {});
|
||||
@ -31260,7 +31278,7 @@ This will fail in production if not fixed.`);
|
||||
const str = JSON.stringify(obj);
|
||||
formatAppLog("log", "at pages/BatchOutOftock/material.vue:199", item);
|
||||
temporaryScanDraftSave({
|
||||
FVHUBFormId: "SAL_DELIVERYNOTICE",
|
||||
FVHUBFormId: "SAL_OUTSTOCK",
|
||||
//数据类型
|
||||
FVHUBFBillNo: state.FBillNo,
|
||||
//单据编号
|
||||
@ -31302,7 +31320,7 @@ This will fail in production if not fixed.`);
|
||||
};
|
||||
const scanRecordFun = () => {
|
||||
toPages("/pages/records/index", {
|
||||
FormId: "SAL_DELIVERYNOTICE",
|
||||
FormId: "SAL_OUTSTOCK",
|
||||
FbillNo: state.FBillNo
|
||||
});
|
||||
};
|
||||
@ -31318,7 +31336,7 @@ This will fail in production if not fixed.`);
|
||||
let ids = [];
|
||||
let ScanEntry = [];
|
||||
let param = {
|
||||
FormId: "SAL_DELIVERYNOTICE",
|
||||
FormId: "SAL_OUTSTOCK",
|
||||
UserId: uni.getStorageSync("userInfo").Context.UserId,
|
||||
FbillNo: state.FBillNo
|
||||
};
|
||||
@ -31339,7 +31357,7 @@ This will fail in production if not fixed.`);
|
||||
});
|
||||
});
|
||||
SAL_OUTSTOCKCheck({
|
||||
Ids: ids,
|
||||
Ids: state.materialId,
|
||||
EntryIds: EntryIds.toString()
|
||||
}).then((res3) => {
|
||||
if (res3.code === 200) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user