货无忧
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.

207 lines
7.1 KiB

2 years ago
"use strict";
const common_vendor = require("../../../common/vendor.js");
1 year ago
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");
1 year ago
require("../../../config/host.js");
1 year ago
require("../../../utils/md5.js");
2 years ago
if (!Array) {
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
1 year ago
const _component_tiplist = common_vendor.resolveComponent("tiplist");
1 year ago
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");
1 year ago
(_easycom_u_navbar2 + _component_tiplist + _component_saomiao + _component_saomiao1 + _component_saomiao2 + _component_saomiao3 + _component_saomiao4)();
2 years ago
}
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: [
{
1 year ago
value: 3,
2 years ago
label: "齐套"
},
{
value: 2,
label: "部分扫"
},
{
1 year ago
value: 1,
2 years ago
label: "未扫"
}
1 year ago
],
items: {},
datalist: [],
scancode: "",
orderStatus: 1,
1 year ago
id: "",
orderType: 0,
inputtxt: ""
2 years ago
});
1 year ago
const tiplists = common_vendor.ref(null);
1 year ago
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();
}
});
});
1 year ago
function showsdqs() {
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
scandata();
tiplists.value.setdetails({ isshow: false });
},
cancel: () => {
tiplists.value.setdetails({ isshow: false });
},
close: () => {
tiplists.value.setdetails({ isshow: false });
}
});
}
1 year ago
async function initpage() {
let data = {
1 year ago
reservationId: details.items.id,
completecode: details.orderType,
orderCode: details.inputtxt
1 year ago
};
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 || [];
}
2 years ago
function checktype(e) {
if (e == "") {
details.schanvalue = "";
1 year ago
details.orderType = 0;
2 years ago
}
details.typearr.map((item) => {
if (item.value == e) {
details.schanvalue = item.label;
1 year ago
details.orderType = item.value;
2 years ago
console.log(details.schanvalue);
}
});
}
1 year ago
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();
}
1 year ago
const { inputtxt, orderStatus, schanvalue, typearr, items, datalist } = common_vendor.toRefs(details);
2 years ago
return (_ctx, _cache) => {
1 year ago
return common_vendor.e({
2 years ago
a: common_vendor.p({
1 year ago
title: "客户订单扫描",
2 years ago
placeholder: true,
border: "true",
autoBack: true,
leftIconSize: "35"
}),
1 year ago
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({
2 years ago
data: common_vendor.unref(typearr),
value: common_vendor.unref(schanvalue),
placeholder: "全部",
arrLeft: 5,
size: "145",
clearable: true
}),
1 year ago
i: common_vendor.unref(inputtxt),
j: common_vendor.o(($event) => common_vendor.isRef(inputtxt) ? inputtxt.value = $event.detail.value : null),
k: common_vendor.o(initpage),
l: common_vendor.n(common_vendor.unref(orderStatus) == 1 ? "xz" : ""),
m: common_vendor.o(($event) => setorderStatus(1)),
n: common_vendor.n(common_vendor.unref(orderStatus) == 2 ? "xz" : ""),
o: common_vendor.o(($event) => setorderStatus(2)),
p: common_vendor.unref(orderStatus) == 1
1 year ago
}, common_vendor.unref(orderStatus) == 1 ? {
1 year ago
q: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
2 years ago
return {
1 year ago
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")
2 years ago
};
1 year ago
}),
r: common_vendor.o(showsdqs)
1 year ago
} : {}, {
1 year ago
s: common_vendor.unref(orderStatus) == 2
1 year ago
}, common_vendor.unref(orderStatus) == 2 ? {
1 year ago
t: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
1 year ago
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)
};
1 year ago
}),
v: common_vendor.o(showsdqs)
} : {}, {
w: common_vendor.sr(tiplists, "dfa68ca0-2", {
"k": "tiplists"
1 year ago
})
1 year ago
});
2 years ago
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/物流/logPm/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue"]]);
wx.createPage(MiniProgramPage);