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

257 lines
9.0 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 _easycom_uni_th2 = common_vendor.resolveComponent("uni-th");
const _easycom_uni_tr2 = common_vendor.resolveComponent("uni-tr");
const _easycom_uni_td2 = common_vendor.resolveComponent("uni-td");
const _easycom_uni_table2 = common_vendor.resolveComponent("uni-table");
const _component_tiplist = common_vendor.resolveComponent("tiplist");
const _component_saomiao2 = common_vendor.resolveComponent("saomiao2");
(_easycom_u_navbar2 + _easycom_uni_th2 + _easycom_uni_tr2 + _easycom_uni_td2 + _easycom_uni_table2 + _component_tiplist + _component_saomiao2)();
}
const _easycom_u_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_uni_th = () => "../../../uni_modules/uni-table/components/uni-th/uni-th.js";
const _easycom_uni_tr = () => "../../../uni_modules/uni-table/components/uni-tr/uni-tr.js";
const _easycom_uni_td = () => "../../../uni_modules/uni-table/components/uni-td/uni-td.js";
const _easycom_uni_table = () => "../../../uni_modules/uni-table/components/uni-table/uni-table.js";
if (!Math) {
(_easycom_u_navbar + _easycom_uni_th + _easycom_uni_tr + _easycom_uni_td + _easycom_uni_table + cusSelects)();
}
const cusSelects = () => "../../../compoment/cus-selects-fan/cus-selects-fan.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "SelfPickupDetails",
setup(__props) {
let details = common_vendor.reactive({
schanvalue: "",
typearr: [
{
value: 1,
label: "齐套"
},
{
value: 2,
label: "部分扫"
},
{
value: 3,
label: "未扫"
}
],
dataList: [],
orderStatus: 0,
orderType: 1,
billLadingId: "",
orderCode: "",
consignee: "",
pickUpPlate: "",
carTypeStr: "",
orderNum: "",
planNum: "",
completeNum: "",
signedNum: "",
scancode: ""
});
const tiplists = common_vendor.ref(null);
common_vendor.onLoad((op) => {
details.billLadingId = op.billLadingId;
initpage();
common_vendor.index.$on("scancodedate", function(code) {
if (code) {
console.log(code);
details.scancode = code;
sacn();
}
});
});
function showsdqs() {
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入扫描的码",
placeholder: "请输入扫描的码",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
sacn();
tiplists.value.setdetails({ isshow: false });
},
cancel: () => {
tiplists.value.setdetails({ isshow: false });
},
close: () => {
tiplists.value.setdetails({ isshow: false });
}
});
}
async function sacn() {
let data = {
id: details.billLadingId,
coding: details.scancode,
type: details.orderType == 1 ? "2" : "1"
};
let res = await api_user.billLadingscan(data);
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
if (details.orderType == 1) {
let data = {
orderStatus: details.orderStatus,
billLadingId: details.billLadingId,
orderCode: details.orderCode
};
let response = await api_user.billLadingdetailList(data);
details.dataList = response.data.list;
details.consignee = response.data.consignee;
details.pickUpPlate = response.data.pickUpPlate;
details.carTypeStr = response.data.carTypeStr;
details.orderNum = response.data.orderNum;
details.planNum = response.data.planNum;
details.completeNum = response.data.completeNum;
details.signedNum = response.data.signedNum;
} else if (details.orderType == 2) {
let data = {
orderStatus: details.orderStatus,
id: details.billLadingId,
orderCode: details.orderCode,
current: 1,
size: 10
};
let response = await api_user.billLadinggetInventoryNum(data);
details.dataList = response.data.records;
}
}
function setorderStatus(state) {
details.orderType = state;
initpage();
}
function checktype(e) {
if (e == "") {
details.schanvalue = "";
}
details.typearr.map((item) => {
if (item.value == e) {
details.schanvalue = item.label;
details.orderStatus = item.value;
console.log(details.schanvalue);
}
});
}
const { orderType, schanvalue, typearr, dataList } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "自提明细扫描",
bgColor: "#D3832A",
leftIconColor: "#ffffff",
titleStyle: "color:#ffffff",
placeholder: true,
autoBack: true,
leftIconSize: "35"
}),
b: common_vendor.t(common_vendor.unref(details).carTypeStr),
c: common_vendor.t(common_vendor.unref(details).pickUpPlate),
d: common_vendor.t(common_vendor.unref(details).consignee),
e: common_vendor.p({
width: "70",
align: "center"
}),
f: common_vendor.p({
align: "center"
}),
g: common_vendor.p({
align: "center"
}),
h: common_vendor.f([1, 2], (item, k0, i0) => {
return {
a: common_vendor.t(item == 1 ? "计划" : "完成"),
b: "e4b7b2b4-7-" + i0 + "," + ("e4b7b2b4-6-" + i0),
c: common_vendor.t(item == 1 ? common_vendor.unref(details).orderNum : common_vendor.unref(details).completeNum),
d: "e4b7b2b4-8-" + i0 + "," + ("e4b7b2b4-6-" + i0),
e: common_vendor.t(item == 1 ? common_vendor.unref(details).planNum : common_vendor.unref(details).signedNum),
f: "e4b7b2b4-9-" + i0 + "," + ("e4b7b2b4-6-" + i0),
g: "e4b7b2b4-6-" + i0 + ",e4b7b2b4-1"
};
}),
i: common_vendor.p({
align: "center"
}),
j: common_vendor.p({
align: "center"
}),
k: common_vendor.p({
align: "center"
}),
l: common_vendor.p({
loading: false,
emptyText: "暂无更多数据"
}),
m: common_vendor.o(checktype),
n: common_vendor.p({
data: common_vendor.unref(typearr),
value: common_vendor.unref(schanvalue),
placeholder: "全部",
arrLeft: 5,
size: "145",
clearable: true
}),
o: common_vendor.o(initpage),
p: common_vendor.n(common_vendor.unref(orderType) == 1 ? "xz" : ""),
q: common_vendor.o(($event) => setorderStatus(1)),
r: common_vendor.n(common_vendor.unref(orderType) == 2 ? "xz" : ""),
s: common_vendor.o(($event) => setorderStatus(2)),
t: common_vendor.unref(orderType) == 1
}, common_vendor.unref(orderType) == 1 ? {
v: common_vendor.f(common_vendor.unref(dataList), (item, k0, i0) => {
return {
a: common_vendor.t(item.orderCode),
b: common_vendor.t(item.orderPackageCode),
c: common_vendor.t(item.scanStatusStr),
d: common_vendor.t(item.errorStatusStr)
};
}),
w: common_vendor.o(showsdqs)
} : {}, {
x: common_vendor.unref(orderType) == 2
}, common_vendor.unref(orderType) == 2 ? {
y: common_vendor.f(common_vendor.unref(dataList), (item, k0, i0) => {
return {
a: common_vendor.t(item.sku),
b: common_vendor.t(item.coding),
c: common_vendor.t(item.descriptionGoods),
d: common_vendor.t(item.specification),
e: common_vendor.t(item.cargoUnit),
f: common_vendor.t(item.scanStatus == 1 ? "未扫描" : item.scanStatus == "" ? "未扫描" : "扫描")
};
}),
z: common_vendor.o(showsdqs)
} : {}, {
A: common_vendor.sr(tiplists, "e4b7b2b4-11", {
"k": "tiplists"
})
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/物流/logPm/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue"]]);
wx.createPage(MiniProgramPage);