爱简收旧衣按件回收前端代码仓库
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.
 
 
 
 

122 lines
4.1 KiB

"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 {
apply: {
name: "周小艺",
phone: "18899102278",
time: "6小时",
applyTime: "2025-03-20 11:00",
status: "待审批"
},
statusBarHeight: 0,
navBarRealHeight: 0
};
},
computed: {
navbarStyle() {
return `padding-top: ${this.statusBarHeight}px;`;
}
},
onLoad(options) {
common_vendor.index.getSystemInfo({
success: (res) => {
this.statusBarHeight = res.statusBarHeight || 20;
}
});
this.$nextTick(() => {
common_vendor.index.createSelectorQuery().select(".navbar").boundingClientRect((rect) => {
if (rect) {
this.navBarRealHeight = rect.height;
}
}).exec();
});
const eventChannel = this.getOpenerEventChannel && this.getOpenerEventChannel();
if (eventChannel) {
eventChannel.on("applyDetail", (apply) => {
this.apply = Object.assign({}, this.apply, apply);
});
}
},
methods: {
goBack() {
common_vendor.index.navigateBack();
},
reject() {
if (!this.apply.id) {
common_vendor.index.showToast({ title: "缺少申请ID", icon: "none" });
return;
}
this.$api && this.$api("rejectPromotionApply", { id: this.apply.id }, (res) => {
if (res && res.code === 200) {
common_vendor.index.showToast({ title: "已驳回", icon: "none" });
this.apply.status = "已驳回";
} else {
common_vendor.index.showToast({ title: "操作失败", icon: "none" });
}
});
},
approve() {
if (!this.apply.id) {
common_vendor.index.showToast({ title: "缺少申请ID", icon: "none" });
return;
}
common_vendor.index.__f__("log", "at pages/manager/tui-apply-detail.vue:116", this.apply);
this.$api && this.$api("passPromotionApply", { id: this.apply.id }, (res) => {
if (res && res.code === 200) {
common_vendor.index.showToast({ title: "已通过", icon: "none" });
this.apply.status = "已确认";
} else {
common_vendor.index.showToast({ title: "操作失败", icon: "none" });
}
});
},
refreshData() {
},
async onRefresh() {
await this.refreshData && this.refreshData();
}
},
onPullDownRefresh() {
this.refreshData && this.refreshData();
common_vendor.index.stopPullDownRefresh();
}
};
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
_easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
type: "back",
size: "24",
color: "#222"
}),
b: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
c: common_vendor.s($options.navbarStyle),
d: $data.apply.status === "待审批"
}, $data.apply.status === "待审批" ? {} : $data.apply.status === "已驳回" ? {} : $data.apply.status === "已确认" ? {} : {}, {
e: $data.apply.status === "已驳回",
f: $data.apply.status === "已确认",
g: common_vendor.t($data.apply.name),
h: common_vendor.t($data.apply.phone),
i: common_vendor.t($data.apply.time),
j: common_vendor.t($data.apply.applyTime),
k: $data.navBarRealHeight + "px",
l: $data.apply.status === "待审批"
}, $data.apply.status === "待审批" ? {
m: common_vendor.o((...args) => $options.reject && $options.reject(...args)),
n: common_vendor.o((...args) => $options.approve && $options.approve(...args))
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-138bea45"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/manager/tui-apply-detail.js.map