"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const pages_mixins_pullRefreshMixin = require("../mixins/pullRefreshMixin.js");
|
|
const _sfc_main = {
|
|
mixins: [pages_mixins_pullRefreshMixin.pullRefreshMixin],
|
|
data() {
|
|
return {
|
|
qualifiedList: [
|
|
{ id: 1, name: "羽绒服", price: 8, count: 8, total: 64, reason: "" }
|
|
],
|
|
unqualifiedGroups: [
|
|
{
|
|
name: "羽绒服",
|
|
price: 8,
|
|
total: 0,
|
|
items: [
|
|
{ id: 11, name: "羽绒服1", reason: "" },
|
|
{ id: 12, name: "羽绒服2", reason: "" },
|
|
{ id: 13, name: "羽绒服3", reason: "" },
|
|
{ id: 14, name: "羽绒服4", reason: "" },
|
|
{ id: 15, name: "羽绒服5", reason: "" },
|
|
{ id: 16, name: "羽绒服6", reason: "" },
|
|
{ id: 17, name: "羽绒服7", reason: "" },
|
|
{ id: 18, name: "羽绒服8", reason: "" }
|
|
]
|
|
},
|
|
{
|
|
name: "品牌服饰",
|
|
price: 8,
|
|
total: 0,
|
|
items: [
|
|
{ id: 21, name: "品牌服饰1", reason: "" }
|
|
]
|
|
}
|
|
],
|
|
unrecyclableList: [
|
|
{ id: 31, name: "毛衣", price: "", count: 8, total: 0, reason: "" }
|
|
],
|
|
reasonPopupVisible: false,
|
|
currentReasonTitle: "",
|
|
reasonImages: [],
|
|
reasonOptions: ["大面积破损", "不可回收", "顽固污渍", "污渍无法清除", "异味严重", "带有危险物品"],
|
|
reasonChecked: [false, true, false, true, false, false],
|
|
currentReasonItem: null
|
|
};
|
|
},
|
|
methods: {
|
|
goBack() {
|
|
common_vendor.index.navigateBack();
|
|
},
|
|
goPrev() {
|
|
common_vendor.index.navigateBack();
|
|
},
|
|
finishInspect() {
|
|
common_vendor.index.showToast({ title: "完成质检", icon: "success" });
|
|
},
|
|
selectReason(item) {
|
|
this.currentReasonItem = item;
|
|
this.currentReasonTitle = item.name;
|
|
this.reasonImages = item.images || [];
|
|
this.reasonChecked = item.reasons || Array(this.reasonOptions.length).fill(false);
|
|
this.$refs.reasonPopup.open();
|
|
},
|
|
closeReasonPopup() {
|
|
this.$refs.reasonPopup.close();
|
|
},
|
|
addReasonImg() {
|
|
common_vendor.index.chooseImage({
|
|
count: 3 - this.reasonImages.length,
|
|
success: (res) => {
|
|
this.reasonImages = this.reasonImages.concat(res.tempFilePaths);
|
|
}
|
|
});
|
|
},
|
|
removeReasonImg(idx) {
|
|
this.reasonImages.splice(idx, 1);
|
|
},
|
|
toggleReason(idx) {
|
|
this.$set(this.reasonChecked, idx, !this.reasonChecked[idx]);
|
|
},
|
|
saveReason() {
|
|
if (this.currentReasonItem) {
|
|
this.currentReasonItem.images = [...this.reasonImages];
|
|
this.currentReasonItem.reasons = [...this.reasonChecked];
|
|
}
|
|
this.closeReasonPopup();
|
|
},
|
|
async onRefresh() {
|
|
await this.refreshData && this.refreshData();
|
|
},
|
|
refreshData() {
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
|
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
|
(_easycom_uni_icons2 + _easycom_uni_popup2)();
|
|
}
|
|
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
|
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
|
if (!Math) {
|
|
(_easycom_uni_icons + _easycom_uni_popup)();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return {
|
|
a: common_vendor.p({
|
|
type: "left",
|
|
size: "20",
|
|
color: "#222"
|
|
}),
|
|
b: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
|
|
c: common_vendor.p({
|
|
type: "more",
|
|
size: "24",
|
|
color: "#222"
|
|
}),
|
|
d: common_vendor.f($data.qualifiedList, (item, k0, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.name),
|
|
b: common_vendor.t(item.price),
|
|
c: common_vendor.t(item.count),
|
|
d: common_vendor.t(item.total),
|
|
e: item.reason,
|
|
f: common_vendor.o(($event) => item.reason = $event.detail.value, item.id),
|
|
g: item.id
|
|
};
|
|
}),
|
|
e: common_vendor.f($data.unqualifiedGroups, (group, k0, i0) => {
|
|
return {
|
|
a: common_vendor.t(group.name),
|
|
b: common_vendor.t(group.price),
|
|
c: common_vendor.t(group.total),
|
|
d: common_vendor.f(group.items, (item, k1, i1) => {
|
|
return {
|
|
a: common_vendor.t(item.name),
|
|
b: "431a990e-2-" + i0 + "-" + i1,
|
|
c: common_vendor.o(($event) => $options.selectReason(item), item.id),
|
|
d: item.id
|
|
};
|
|
}),
|
|
e: group.name
|
|
};
|
|
}),
|
|
f: common_vendor.p({
|
|
type: "right",
|
|
size: "18",
|
|
color: "#bbb"
|
|
}),
|
|
g: common_vendor.f($data.unrecyclableList, (item, k0, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.name),
|
|
b: common_vendor.t(item.price || "—"),
|
|
c: common_vendor.t(item.count),
|
|
d: common_vendor.t(item.total),
|
|
e: item.reason,
|
|
f: common_vendor.o(($event) => item.reason = $event.detail.value, item.id),
|
|
g: item.id
|
|
};
|
|
}),
|
|
h: common_vendor.o((...args) => $options.goPrev && $options.goPrev(...args)),
|
|
i: common_vendor.o((...args) => $options.finishInspect && $options.finishInspect(...args)),
|
|
j: common_vendor.o((...args) => $options.closeReasonPopup && $options.closeReasonPopup(...args)),
|
|
k: common_vendor.t($data.currentReasonTitle),
|
|
l: common_vendor.f($data.reasonImages, (img, idx, i0) => {
|
|
return {
|
|
a: img,
|
|
b: common_vendor.o(($event) => $options.removeReasonImg(idx), idx),
|
|
c: idx
|
|
};
|
|
}),
|
|
m: common_vendor.p({
|
|
type: "plusempty",
|
|
size: "40",
|
|
color: "#bbb"
|
|
}),
|
|
n: common_vendor.o((...args) => $options.addReasonImg && $options.addReasonImg(...args)),
|
|
o: common_vendor.f($data.reasonOptions, (item, idx, i0) => {
|
|
return {
|
|
a: common_vendor.n({
|
|
checked: $data.reasonChecked[idx]
|
|
}),
|
|
b: common_vendor.t(item),
|
|
c: item,
|
|
d: common_vendor.o(($event) => $options.toggleReason(idx), item)
|
|
};
|
|
}),
|
|
p: common_vendor.o((...args) => $options.saveReason && $options.saveReason(...args)),
|
|
q: common_vendor.sr("reasonPopup", "431a990e-3"),
|
|
r: common_vendor.p({
|
|
type: "bottom",
|
|
["mask-click"]: false
|
|
})
|
|
};
|
|
}
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-431a990e"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/manager/inspect-result.js.map
|