hldy_xcx/unpackage/dist/dev/mp-weixin/pages/supplierindex/workjoin.js

89 lines
3.1 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const pages_supplierindex_api = require("./api.js");
if (!Math) {
model();
}
const model = () => "../../compontent/public/model.js";
const _sfc_main = {
__name: "workjoin",
setup(__props) {
common_vendor.ref(0);
const workArray = common_vendor.ref([]);
common_vendor.ref(false);
common_vendor.onLoad((options) => {
pages_supplierindex_api.getSuppliersAuditLog().then((res) => {
workArray.value = res.result.records;
});
});
common_vendor.onPullDownRefresh(() => {
pages_supplierindex_api.getSuppliersAuditLog().then((res) => {
workArray.value = res.result.records;
});
common_vendor.index.stopPullDownRefresh();
});
const content = common_vendor.ref("");
const show = common_vendor.ref(false);
const openLook = (res) => {
if (res) {
content.value = res;
show.value = true;
}
};
const goBack = () => {
common_vendor.index.navigateBack();
};
const jumpToAll = (element) => {
pages_supplierindex_api.getSupInfoByOpenId().then((res) => {
if (res.success) {
common_vendor.index.navigateTo({
url: `/pages/addsupplier/all?element=${JSON.stringify(res.result)}`
});
}
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(($event) => show.value = false),
b: common_vendor.p({
show: show.value,
content: content.value
}),
c: common_vendor.o(goBack),
d: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
e: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
f: workArray.value.length
}, workArray.value.length ? {} : {}, {
g: !workArray.value.length
}, !workArray.value.length ? {} : {}, {
h: common_vendor.f(workArray.value, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.departName),
b: common_vendor.t(item.orgLeader),
c: common_vendor.t(item.orgLeaderPhone),
d: item.suppliersStatus === `1`
}, item.suppliersStatus === `1` ? {} : {}, {
e: item.suppliersStatus === `2`
}, item.suppliersStatus === `2` ? {} : {}, {
f: item.suppliersStatus === `3`
}, item.suppliersStatus === `3` ? {} : {}, {
g: common_vendor.t(item.orgAddress),
h: item.suppliersStatus === `3`
}, item.suppliersStatus === `3` ? {
i: common_vendor.o(($event) => openLook(item.auditContent), index)
} : {}, {
j: common_vendor.o(($event) => jumpToAll(), index),
k: index
});
}),
i: common_vendor.s(!workArray.value.length ? {
backgroundColor: `#F7F7F7`
} : {})
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-920a6f45"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/supplierindex/workjoin.js.map