|
|
|
"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("../../../config/host.js");
|
|
|
|
require("../../../utils/base64.js");
|
|
|
|
require("../../../utils/md5.js");
|
|
|
|
if (!Array) {
|
|
|
|
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
|
|
|
|
const _component_saomiao = common_vendor.resolveComponent("saomiao");
|
|
|
|
const _component_saomiao1 = common_vendor.resolveComponent("saomiao1");
|
|
|
|
const _component_saomiao2 = common_vendor.resolveComponent("saomiao2");
|
|
|
|
const _component_saomiao3 = common_vendor.resolveComponent("saomiao3");
|
|
|
|
const _component_saomiao4 = common_vendor.resolveComponent("saomiao4");
|
|
|
|
(_easycom_u_navbar2 + _component_saomiao + _component_saomiao1 + _component_saomiao2 + _component_saomiao3 + _component_saomiao4)();
|
|
|
|
}
|
|
|
|
const _easycom_u_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
|
|
|
|
if (!Math) {
|
|
|
|
(_easycom_u_navbar + cusSelects)();
|
|
|
|
}
|
|
|
|
const cusSelects = () => "../../../compoment/cus-selects-fan/cus-selects-fan.js";
|
|
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
|
__name: "CustomerOrdersDetails",
|
|
|
|
setup(__props) {
|
|
|
|
let details = common_vendor.reactive({
|
|
|
|
schanvalue: "",
|
|
|
|
typearr: [
|
|
|
|
{
|
|
|
|
value: 1,
|
|
|
|
label: "齐套"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 2,
|
|
|
|
label: "部分扫"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 3,
|
|
|
|
label: "未扫"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
items: {},
|
|
|
|
datalist: [],
|
|
|
|
scancode: "",
|
|
|
|
orderStatus: 1,
|
|
|
|
id: ""
|
|
|
|
});
|
|
|
|
common_vendor.onLoad((op) => {
|
|
|
|
details.items = JSON.parse(op.item);
|
|
|
|
details.id = op.id;
|
|
|
|
initpage();
|
|
|
|
common_vendor.index.$on("scancodedate", function(code) {
|
|
|
|
if (code) {
|
|
|
|
console.log(code);
|
|
|
|
details.scancode = code;
|
|
|
|
scandata();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
async function initpage() {
|
|
|
|
let data = {
|
|
|
|
reservationId: details.items.id
|
|
|
|
};
|
|
|
|
details.datalist = [];
|
|
|
|
let response = null;
|
|
|
|
if (details.orderStatus == 1) {
|
|
|
|
response = await api_user.deliveryorder(data);
|
|
|
|
} else if (details.orderStatus == 2) {
|
|
|
|
response = await api_user.signforinventory(data);
|
|
|
|
}
|
|
|
|
details.datalist = response.data.records || [];
|
|
|
|
}
|
|
|
|
function checktype(e) {
|
|
|
|
if (e == "") {
|
|
|
|
details.schanvalue = "";
|
|
|
|
}
|
|
|
|
details.typearr.map((item) => {
|
|
|
|
if (item.value == e) {
|
|
|
|
details.schanvalue = item.label;
|
|
|
|
console.log(details.schanvalue);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function setorderStatus(state) {
|
|
|
|
details.orderStatus = state;
|
|
|
|
initpage();
|
|
|
|
}
|
|
|
|
async function scandata() {
|
|
|
|
let loadingId = common_vendor.index.getStorageSync("checkvehicle").id;
|
|
|
|
if (details.orderStatus == 1) {
|
|
|
|
let data = {
|
|
|
|
deliveryId: details.id,
|
|
|
|
loadingId,
|
|
|
|
type: 1,
|
|
|
|
barcode: details.scancode
|
|
|
|
};
|
|
|
|
let res = await api_user.deliveryloadingscan(data);
|
|
|
|
console.log(res);
|
|
|
|
} else if (details.orderStatus == 2) {
|
|
|
|
let data = {
|
|
|
|
reservationId: details.items.id,
|
|
|
|
deliveryId: details.id,
|
|
|
|
loadingId,
|
|
|
|
type: 1,
|
|
|
|
barcode: details.scancode
|
|
|
|
};
|
|
|
|
let res = await api_user.deliveryloadinginventory(data);
|
|
|
|
console.log(res);
|
|
|
|
}
|
|
|
|
initpage();
|
|
|
|
}
|
|
|
|
const { orderStatus, schanvalue, typearr, items, datalist } = common_vendor.toRefs(details);
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
return common_vendor.e({
|
|
|
|
a: common_vendor.p({
|
|
|
|
title: "客户订单扫描",
|
|
|
|
placeholder: true,
|
|
|
|
border: "true",
|
|
|
|
autoBack: true,
|
|
|
|
leftIconSize: "35"
|
|
|
|
}),
|
|
|
|
b: common_vendor.t(common_vendor.unref(items).consignee),
|
|
|
|
c: common_vendor.t(common_vendor.unref(items).isstock),
|
|
|
|
d: common_vendor.t(common_vendor.unref(items).isload),
|
|
|
|
e: common_vendor.t(common_vendor.unref(items).ordNub),
|
|
|
|
f: common_vendor.t(common_vendor.unref(items).signNub),
|
|
|
|
g: common_vendor.o(checktype),
|
|
|
|
h: common_vendor.p({
|
|
|
|
data: common_vendor.unref(typearr),
|
|
|
|
value: common_vendor.unref(schanvalue),
|
|
|
|
placeholder: "全部",
|
|
|
|
arrLeft: 5,
|
|
|
|
size: "145",
|
|
|
|
clearable: true
|
|
|
|
}),
|
|
|
|
i: common_vendor.o(initpage),
|
|
|
|
j: common_vendor.n(common_vendor.unref(orderStatus) == 1 ? "xz" : ""),
|
|
|
|
k: common_vendor.o(($event) => setorderStatus(1)),
|
|
|
|
l: common_vendor.n(common_vendor.unref(orderStatus) == 2 ? "xz" : ""),
|
|
|
|
m: common_vendor.o(($event) => setorderStatus(2)),
|
|
|
|
n: common_vendor.unref(orderStatus) == 1
|
|
|
|
}, common_vendor.unref(orderStatus) == 1 ? {
|
|
|
|
o: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
|
|
|
|
return {
|
|
|
|
a: common_vendor.t(item.orderCode),
|
|
|
|
b: common_vendor.t(item.reservationNum),
|
|
|
|
c: common_vendor.t(item.loadingNub),
|
|
|
|
d: common_vendor.t(item.complete),
|
|
|
|
e: common_vendor.n(item.completecode == 3 ? "tip tp1" : item.completecode == 1 ? "tip tp2" : "tip tp3")
|
|
|
|
};
|
|
|
|
})
|
|
|
|
} : {}, {
|
|
|
|
p: common_vendor.unref(orderStatus) == 2
|
|
|
|
}, common_vendor.unref(orderStatus) == 2 ? {
|
|
|
|
q: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
|
|
|
|
return {
|
|
|
|
a: common_vendor.t(item.sku),
|
|
|
|
b: common_vendor.t(item.descriptionGoods),
|
|
|
|
c: common_vendor.t(item.specification),
|
|
|
|
d: common_vendor.t(item.logpmUnit)
|
|
|
|
};
|
|
|
|
})
|
|
|
|
} : {});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/物流/logPm/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue"]]);
|
|
|
|
wx.createPage(MiniProgramPage);
|