|
|
@@ -257,6 +257,16 @@
|
|
|
<view class="instock-title"
|
|
|
>当前箱码未录入系统,请确认数量并录入</view
|
|
|
>
|
|
|
+ <view class="instock-row">
|
|
|
+ <text class="instock-label">生产日期</text>
|
|
|
+ <view class="instock-datetime">
|
|
|
+ <uni-datetime-picker
|
|
|
+ v-model="inStockCheckProduceDate"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择生产日期"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="instock-row">
|
|
|
<text class="instock-label">数量</text>
|
|
|
<input
|
|
|
@@ -378,6 +388,7 @@ export default defineComponent({
|
|
|
/* -------------------- 条码是否在库校验相关 -------------------- */
|
|
|
const inStockCheckPopup = ref(null); // 弹窗实例
|
|
|
const inStockCheckQty = ref(""); // 数量输入
|
|
|
+ const inStockCheckProduceDate = ref(""); // 生产日期输入
|
|
|
const inStockCheckStore = ref(""); // 库位输入
|
|
|
const inStockCheckErpStockName = ref(""); // 弹窗内仓库名称
|
|
|
const inStockCheckWmsStoreName = ref(""); // 弹窗内货位名称
|
|
|
@@ -541,7 +552,7 @@ export default defineComponent({
|
|
|
// }
|
|
|
// }
|
|
|
/* 1. 先调摄像头 */
|
|
|
- const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
|
|
|
+ const mpaasScanModule = { mpaasScan: uni.$scanByCameraCompat };
|
|
|
const ret = await new Promise((resolve) =>
|
|
|
mpaasScanModule.mpaasScan(
|
|
|
{ scanType: ["qrCode", "barCode"], hideAlbum: false },
|
|
|
@@ -935,7 +946,7 @@ export default defineComponent({
|
|
|
// 将 handleQueryPart 改为扫码方法
|
|
|
const handleQueryPart = async () => {
|
|
|
// #ifdef APP-PLUS
|
|
|
- const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
|
|
|
+ const mpaasScanModule = { mpaasScan: uni.$scanByCameraCompat };
|
|
|
const ret = await new Promise((resolve) =>
|
|
|
mpaasScanModule.mpaasScan(
|
|
|
{ scanType: ["qrCode", "barCode"], hideAlbum: false },
|
|
|
@@ -990,7 +1001,7 @@ export default defineComponent({
|
|
|
/* ===== 2. 仅保存贴纸ID,不请求 ===== */
|
|
|
const setTmOnly = async () => {
|
|
|
// #ifdef APP-PLUS
|
|
|
- const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
|
|
|
+ const mpaasScanModule = { mpaasScan: uni.$scanByCameraCompat };
|
|
|
const ret = await new Promise((resolve) =>
|
|
|
mpaasScanModule.mpaasScan(
|
|
|
{ scanType: ["qrCode", "barCode"], hideAlbum: false },
|
|
|
@@ -1378,6 +1389,7 @@ export default defineComponent({
|
|
|
inStockCheckQty.value = Number.isFinite(defaultQty)
|
|
|
? String(defaultQty)
|
|
|
: "";
|
|
|
+ inStockCheckProduceDate.value = data?.produceDate || "";
|
|
|
inStockCheckStore.value = "";
|
|
|
inStockCheckErpStockName.value = "";
|
|
|
inStockCheckWmsStoreName.value = "";
|
|
|
@@ -1392,7 +1404,7 @@ export default defineComponent({
|
|
|
// 弹窗内库位扫码
|
|
|
const scanInStockStore = function () {
|
|
|
// #ifdef APP-PLUS
|
|
|
- const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
|
|
|
+ const mpaasScanModule = { mpaasScan: uni.$scanByCameraCompat };
|
|
|
mpaasScanModule.mpaasScan(
|
|
|
{
|
|
|
scanType: ["qrCode", "barCode"],
|
|
|
@@ -1449,6 +1461,15 @@ export default defineComponent({
|
|
|
uni.showToast({ title: "请输入大于0的数量", icon: "none" });
|
|
|
return;
|
|
|
}
|
|
|
+ const produceDate = (inStockCheckProduceDate.value || "").trim();
|
|
|
+ if (!produceDate) {
|
|
|
+ uni.showToast({ title: "请输入生产日期", icon: "none" });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(produceDate)) {
|
|
|
+ uni.showToast({ title: "生产日期格式应为 2026-10-15", icon: "none" });
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (!wmsStockId.value) {
|
|
|
uni.showToast({ title: "当前库位信息无仓库id数据", icon: "none" });
|
|
|
return;
|
|
|
@@ -1466,6 +1487,7 @@ export default defineComponent({
|
|
|
.$reqPost("autoInStock", {
|
|
|
qrCode: instockQrCode,
|
|
|
qrCodeQty: qty,
|
|
|
+ produceDate: produceDate,
|
|
|
wmsStockId: wmsStockId.value,
|
|
|
wmsStoreAreaId: wmsStoreAreaId.value,
|
|
|
wmsStoreLocationId: wmsStoreLocationId.value,
|
|
|
@@ -1569,6 +1591,7 @@ export default defineComponent({
|
|
|
// 条码是否在库校验相关
|
|
|
inStockCheckPopup,
|
|
|
inStockCheckQty,
|
|
|
+ inStockCheckProduceDate,
|
|
|
inStockCheckStore,
|
|
|
inStockCheckErpStockName,
|
|
|
inStockCheckWmsStoreName,
|
|
|
@@ -1934,6 +1957,10 @@ export default defineComponent({
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
+.instock-datetime {
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+
|
|
|
.instock-scan-icon {
|
|
|
margin-left: 16rpx;
|
|
|
font-size: 36rpx;
|