|
@@ -76,8 +76,10 @@
|
|
}
|
|
}
|
|
const result = JSON.parse(res.result)
|
|
const result = JSON.parse(res.result)
|
|
|
|
|
|
|
|
+ /************************ 查询是否一批多箱 ************************/
|
|
getCarrierInfo(result).then(resqust => {
|
|
getCarrierInfo(result).then(resqust => {
|
|
if (resqust.code == 200) {
|
|
if (resqust.code == 200) {
|
|
|
|
+ //返回数据大于一条,跳转选择批次弹窗
|
|
if (resqust.data.length > 1) {
|
|
if (resqust.data.length > 1) {
|
|
query.value = result;
|
|
query.value = result;
|
|
console.log("查询箱号信息", resqust)
|
|
console.log("查询箱号信息", resqust)
|
|
@@ -86,7 +88,6 @@
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
});
|
|
});
|
|
-
|
|
|
|
// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
|
|
// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
|
|
// 需要定义一个请求方法, 从后端获取
|
|
// 需要定义一个请求方法, 从后端获取
|
|
getLotInfo(result).then(res => {
|
|
getLotInfo(result).then(res => {
|
|
@@ -106,7 +107,6 @@
|
|
});
|
|
});
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -146,35 +146,46 @@
|
|
|
|
|
|
// 确定后,将批次id,批次号,传递过去
|
|
// 确定后,将批次id,批次号,传递过去
|
|
const handleConfirm = () => {
|
|
const handleConfirm = () => {
|
|
- lot.value.carrierCode = carrierCode.value
|
|
|
|
- uni.showLoading({
|
|
|
|
- title: '加载中'
|
|
|
|
- });
|
|
|
|
- console.log("加载", lot.value);
|
|
|
|
- getLotInfo(lot.value).then(res => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- lot.value = res.data;
|
|
|
|
- lot.value.carrierCode = carrierCode.value
|
|
|
|
- store.processInspection = null;
|
|
|
|
- uni.hideLoading();
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/processInspection/form",
|
|
|
|
- success: (res) => {
|
|
|
|
- // 通过eventChannel向被打开页面传送数据
|
|
|
|
- res.eventChannel.emit("processInspectionFrom", {
|
|
|
|
- data: lot.value
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- icon: 'none',
|
|
|
|
- title: res.msg,
|
|
|
|
- duration: 2000
|
|
|
|
- })
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (lot.carrierCode || carrierCode.value !== "") {
|
|
|
|
+ lot.value.carrierCode = carrierCode.value
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '加载中'
|
|
|
|
+ });
|
|
|
|
+ console.log("加载", lot.value);
|
|
|
|
+ getLotInfo(lot.value).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ lot.value = res.data;
|
|
|
|
+ lot.value.carrierCode = carrierCode.value
|
|
|
|
+ store.processInspection = null;
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "/pages/processInspection/form",
|
|
|
|
+ success: (res) => {
|
|
|
|
+ // 通过eventChannel向被打开页面传送数据
|
|
|
|
+ res.eventChannel.emit("processInspectionFrom", {
|
|
|
|
+ data: lot.value
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: res.msg,
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: "请输入箱号或扫描箱码",
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|