You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
276 lines
11 KiB
276 lines
11 KiB
"use strict"; |
|
const common_vendor = require("../../../common/vendor.js"); |
|
const api_user = require("../../../api/user.js"); |
|
require("../../../utils/request.js"); |
|
require("../../../store/index.js"); |
|
require("../../../utils/functions.js"); |
|
require("../../../utils/IDCardVerification.js"); |
|
require("../../../utils/base64.js"); |
|
require("../../../config/host.js"); |
|
require("../../../utils/md5.js"); |
|
if (!Array) { |
|
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar"); |
|
const _component_saomiao2 = common_vendor.resolveComponent("saomiao2"); |
|
const _component_tips = common_vendor.resolveComponent("tips"); |
|
(_easycom_u_navbar2 + _component_saomiao2 + _component_tips)(); |
|
} |
|
const _easycom_u_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js"; |
|
if (!Math) { |
|
_easycom_u_navbar(); |
|
} |
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ |
|
__name: "Relocation", |
|
setup(__props) { |
|
const tip = common_vendor.ref(null); |
|
let details = common_vendor.reactive({ |
|
scancode: "", |
|
pagetype: "", |
|
allocationId: "", |
|
dtilobj: {}, |
|
trayCode: "", |
|
scanlist: [], |
|
obldate: {}, |
|
codenumer: 0, |
|
isshowtot: false |
|
}); |
|
common_vendor.onLoad((op) => { |
|
details.pagetype = op.type; |
|
details.scancode = "1697135045583261698"; |
|
scandata(); |
|
common_vendor.index.$on("scancodedate", function(code) { |
|
if (code) { |
|
details.scancode = code; |
|
scandata(); |
|
} |
|
}); |
|
}); |
|
function goorderdetail(item) { |
|
common_vendor.index.navigateTo({ |
|
url: "/pagesHome/pages/orderDetails/orderDetails?orderCode=" + item.orderCode |
|
}); |
|
} |
|
const traynumber = common_vendor.computed(() => { |
|
let numbers = 0; |
|
details.scanlist.map((item) => { |
|
if (item.shelfNum) { |
|
numbers += item.shelfNum; |
|
} else if (item.num) { |
|
numbers += item.num; |
|
} |
|
}); |
|
return numbers; |
|
}); |
|
common_vendor.watchEffect(() => { |
|
details.scanlist.map((item) => { |
|
details.codenumer += item.shelfNum; |
|
}); |
|
console.log(details.codenumer); |
|
}); |
|
async function scandata() { |
|
let res = null; |
|
if (!details.allocationId) { |
|
let data = { |
|
allocationId: details.scancode |
|
}; |
|
res = await api_user.warehouseUpdownTypemoveAllocationScanTarget(data); |
|
if (res.code == 200) { |
|
details.dtilobj = res.data; |
|
details.allocationId = res.data.allocationId; |
|
details.scancode = ""; |
|
} |
|
return; |
|
} |
|
if (details.pagetype == "1") { |
|
let data = { |
|
trayCode: details.scancode |
|
}; |
|
res = await api_user.warehouseUpdownTypemoveAllocationScanTrayCode(data); |
|
if (res.code == 200) { |
|
details.trayCode = details.scancode; |
|
details.scanlist = res.data.list; |
|
details.obldate = res.data; |
|
} |
|
} else if (details.pagetype == "2") { |
|
let data = { |
|
allocationId: details.allocationId, |
|
orderPackageCode: details.scancode |
|
}; |
|
res = await api_user.warehouseUpdownTypemoveAllocationScanPackage(data); |
|
if (res.code == 200) { |
|
details.scanlist = details.scanlist.concat(res.data); |
|
} |
|
} |
|
} |
|
async function uplist() { |
|
let res = null; |
|
if (details.pagetype == "1") { |
|
let data = { |
|
allocationId: details.allocationId, |
|
trayCode: details.trayCode |
|
}; |
|
res = await api_user.warehouseUpdownTypemoveAllocationByTrayCode(data); |
|
} else if (details.pagetype == "2") { |
|
let data = { |
|
allocationId: details.allocationId, |
|
upShelfPackageList: details.scanlist |
|
}; |
|
res = await api_user.warehouseUpdownTypemoveAllocationPackageList(data); |
|
} |
|
if (res.code == 200) { |
|
details.scancode = ""; |
|
details.allocationId = ""; |
|
details.dtilobj = {}; |
|
details.obldate = {}; |
|
details.trayCode = ""; |
|
details.scanlist = []; |
|
details.isshowtot = false; |
|
} |
|
} |
|
function setstate(flg) { |
|
if (flg && !details.trayCode && details.pagetype == "1") { |
|
common_vendor.index.showToast({ |
|
title: "请扫描正确的托盘码", |
|
icon: "none" |
|
}); |
|
return; |
|
} else if (flg && details.scanlist.length == 0 && details.pagetype == "2") { |
|
common_vendor.index.showToast({ |
|
title: "请扫描正确的包件码", |
|
icon: "none" |
|
}); |
|
return; |
|
} |
|
details.isshowtot = flg; |
|
} |
|
const { |
|
obldate, |
|
isshowtot, |
|
scancode, |
|
pagetype, |
|
dtilobj, |
|
scanlist, |
|
trayCode |
|
} = common_vendor.toRefs(details); |
|
return (_ctx, _cache) => { |
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p; |
|
return common_vendor.e({ |
|
a: common_vendor.p({ |
|
title: common_vendor.unref(pagetype) == "1" ? "托盘移库" : "按件移库", |
|
bgColor: "#D3832A", |
|
leftIconColor: "#ffffff", |
|
titleStyle: "color:#ffffff", |
|
placeholder: true, |
|
autoBack: true, |
|
leftIconSize: "35" |
|
}), |
|
b: common_vendor.t((((_a = common_vendor.unref(dtilobj)) == null ? void 0 : _a.warehouseName) || "") + "-" + (((_b = common_vendor.unref(dtilobj)) == null ? void 0 : _b.areaTitle) || "") + "-" + (((_c = common_vendor.unref(dtilobj)) == null ? void 0 : _c.shelfTitle) || "") + "-" + (((_d = common_vendor.unref(dtilobj)) == null ? void 0 : _d.allocationTitle) || "")), |
|
c: common_vendor.t(((_e = common_vendor.unref(dtilobj)) == null ? void 0 : _e.warehouseName) || "暂无数据"), |
|
d: common_vendor.unref(pagetype) == 2 |
|
}, common_vendor.unref(pagetype) == 2 ? { |
|
e: common_vendor.unref(scancode), |
|
f: common_vendor.o(($event) => common_vendor.isRef(scancode) ? scancode.value = $event.detail.value : null), |
|
g: common_vendor.o(scandata) |
|
} : {}, { |
|
h: common_vendor.t(((_f = common_vendor.unref(dtilobj)) == null ? void 0 : _f.trayCode) || "暂无数据"), |
|
i: common_vendor.t(common_vendor.unref(dtilobj).trayNum || "0"), |
|
j: common_vendor.unref(pagetype) == 2 |
|
}, common_vendor.unref(pagetype) == 2 ? { |
|
k: common_vendor.t(common_vendor.unref(traynumber) || "0") |
|
} : {}, { |
|
l: common_vendor.unref(pagetype) == 1 |
|
}, common_vendor.unref(pagetype) == 1 ? { |
|
m: common_vendor.f(common_vendor.unref(scanlist), (item, k0, i0) => { |
|
return common_vendor.e({ |
|
a: item.goodsType == 1 |
|
}, item.goodsType == 1 ? { |
|
b: common_vendor.t(item.serviceNum) |
|
} : {}, { |
|
c: item.goodsType == 1 |
|
}, item.goodsType == 1 ? { |
|
d: common_vendor.t(item.orderCode), |
|
e: common_vendor.o(($event) => goorderdetail(item)) |
|
} : {}, { |
|
f: item.goodsType == 2 |
|
}, item.goodsType == 2 ? { |
|
g: common_vendor.t(item.waybillNo) |
|
} : {}, { |
|
h: item.goodsType == 2 |
|
}, item.goodsType == 2 ? { |
|
i: common_vendor.t(item.orderCode), |
|
j: common_vendor.o(($event) => goorderdetail(item)) |
|
} : {}, { |
|
k: item.goodsType == 3 |
|
}, item.goodsType == 3 ? { |
|
l: common_vendor.t(item.materialCode) |
|
} : {}, { |
|
m: item.goodsType == 3 |
|
}, item.goodsType == 3 ? { |
|
n: common_vendor.t(item.materialName) |
|
} : {}, { |
|
o: item.goodsType == 3 |
|
}, item.goodsType == 3 ? { |
|
p: common_vendor.t(item.marketName) |
|
} : {}, { |
|
q: item.goodsType == 3 |
|
}, item.goodsType == 3 ? { |
|
r: common_vendor.t(item.orderCode), |
|
s: common_vendor.o(($event) => goorderdetail(item)) |
|
} : {}, { |
|
t: item.goodsType == 3 |
|
}, item.goodsType == 3 ? { |
|
v: common_vendor.t(item.incomingBatch) |
|
} : {}, { |
|
w: item.trayCode |
|
}, item.trayCode ? { |
|
x: common_vendor.t(item.trayCode) |
|
} : {}, { |
|
y: common_vendor.t(item.totalNum), |
|
z: common_vendor.t(item.shelfNum), |
|
A: item.totalNum == item.shelfNum ? "/pagesHome/static/qitao.png" : "/pagesHome/static/weiqitao.png" |
|
}); |
|
}), |
|
n: common_vendor.t(common_vendor.unref(obldate).areaName + "-" + common_vendor.unref(obldate).allocationName) |
|
} : {}, { |
|
o: common_vendor.unref(pagetype) == 2 |
|
}, common_vendor.unref(pagetype) == 2 ? { |
|
p: common_vendor.f(common_vendor.unref(scanlist), (item, k0, i0) => { |
|
return { |
|
a: common_vendor.t(item.orderCode), |
|
b: common_vendor.o(($event) => goorderdetail(item)), |
|
c: common_vendor.t(item.orderPackageCode), |
|
d: common_vendor.t(item.positionCode) |
|
}; |
|
}) |
|
} : {}, { |
|
q: common_vendor.o(($event) => setstate(true)), |
|
r: common_vendor.unref(isshowtot) |
|
}, common_vendor.unref(isshowtot) ? common_vendor.e({ |
|
s: common_vendor.unref(pagetype) == "1" |
|
}, common_vendor.unref(pagetype) == "1" ? { |
|
t: common_vendor.t((((_g = common_vendor.unref(obldate)) == null ? void 0 : _g.areaName) || "") + "-" + (((_h = common_vendor.unref(obldate)) == null ? void 0 : _h.shelfName) || "") + "-" + (((_i = common_vendor.unref(obldate)) == null ? void 0 : _i.allocationName) || "")), |
|
v: common_vendor.t(common_vendor.unref(trayCode)), |
|
w: common_vendor.t(common_vendor.unref(traynumber)), |
|
x: common_vendor.t((((_j = common_vendor.unref(dtilobj)) == null ? void 0 : _j.areaTitle) || "") + "-" + (((_k = common_vendor.unref(dtilobj)) == null ? void 0 : _k.shelfTitle) || "") + "-" + (((_l = common_vendor.unref(dtilobj)) == null ? void 0 : _l.allocationTitle) || "")), |
|
y: common_vendor.o(($event) => setstate(false)), |
|
z: common_vendor.o(uplist) |
|
} : {}, { |
|
A: common_vendor.unref(pagetype) == "2" |
|
}, common_vendor.unref(pagetype) == "2" ? common_vendor.e({ |
|
B: common_vendor.t(common_vendor.unref(traynumber)), |
|
C: common_vendor.t((((_m = common_vendor.unref(dtilobj)) == null ? void 0 : _m.areaTitle) || "") + "-" + (((_n = common_vendor.unref(dtilobj)) == null ? void 0 : _n.shelfTitle) || "") + "-" + (((_o = common_vendor.unref(dtilobj)) == null ? void 0 : _o.allocationTitle) || "")), |
|
D: common_vendor.unref(dtilobj).trayCode |
|
}, common_vendor.unref(dtilobj).trayCode ? { |
|
E: common_vendor.t((_p = common_vendor.unref(dtilobj)) == null ? void 0 : _p.trayCode) |
|
} : {}, { |
|
F: common_vendor.o(($event) => setstate(false)), |
|
G: common_vendor.o(uplist) |
|
}) : {}) : {}, { |
|
H: common_vendor.sr(tip, "7685f104-2", { |
|
"k": "tip" |
|
}) |
|
}); |
|
}; |
|
} |
|
}); |
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/worksp/logpm/pagesHome/pages/Relocation/Relocation.vue"]]); |
|
wx.createPage(MiniProgramPage);
|
|
|