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

153 lines
4.7 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: "RemoveTray",
setup(__props) {
const tip = common_vendor.ref(null);
let details = common_vendor.reactive({
datalist: [],
scancode: "",
statetype: "",
trayCodes: ""
});
common_vendor.onLoad(() => {
common_vendor.index.$on("scancodedate", function(code) {
if (code) {
details.scancode = code;
scandata();
}
});
});
async function scandata() {
var _a, _b, _c, _d;
let data = {
trayCode: details.scancode
};
let res = await api_user.warehouseTrayTypetrayToNullScanTrayCode(data);
if (res.code == 200) {
console.log(res);
details.datalist = (_a = res.data) == null ? void 0 : _a.list;
details.statetype = (_b = res.data) == null ? void 0 : _b.type;
if (((_d = (_c = res.data) == null ? void 0 : _c.list) == null ? void 0 : _d.length) > 0) {
details.trayCodes = details.scancode;
}
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
function removetray() {
tip.value.setdetails({
title: "提示",
content: "确认空置托盘?",
confirmTxt: "确认",
isshow: true,
isshowcancel: true,
success: async () => {
let data = {
trayCode: details.trayCodes
};
let res = await api_user.warehouseTrayTypetrayToNull(data);
if (res.code == 200) {
common_vendor.index.showToast({
title: "空置托盘成功",
icon: "none"
});
tip.value.setdetails({
title: "提示",
content: "空置托盘成功",
confirmTxt: "确认",
isshow: true,
isshowcancel: false,
success: () => {
tip.value.setisshow(false);
},
cancel: () => {
tip.value.setisshow(false);
},
close: () => {
tip.value.setisshow(false);
}
});
details.datalist = [];
details.trayCodes = "";
tip.value.setisshow(false);
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
},
cancel: () => {
tip.value.setisshow(false);
},
close: () => {
tip.value.setisshow(false);
}
});
}
const {
statetype,
datalist
} = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: "空置托盘",
bgColor: "#D3832A",
leftIconColor: "#ffffff",
titleStyle: "color:#ffffff",
placeholder: true,
autoBack: true,
leftIconSize: "35"
}),
b: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
return common_vendor.e({
a: common_vendor.t(item.dataCode),
b: item.dataName
}, item.dataName ? {
c: common_vendor.t(item.dataName)
} : {}, {
d: item.sku
}, item.sku ? {
e: common_vendor.t(item.sku)
} : {}, {
f: item.cargoUnit
}, item.cargoUnit ? {
g: common_vendor.t(item.cargoUnit)
} : {}, {
h: common_vendor.t(item.orderTotalNum),
i: common_vendor.t(item.scanNum)
});
}),
c: common_vendor.o(removetray),
d: common_vendor.sr(tip, "7be60d30-2", {
"k": "tip"
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/物流/logPm/pagesHome/pages/RemoveTray/RemoveTray.vue"]]);
wx.createPage(MiniProgramPage);