|
|
|
"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_tiplist = common_vendor.resolveComponent("tiplist");
|
|
|
|
(_easycom_u_navbar2 + _component_tiplist)();
|
|
|
|
}
|
|
|
|
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: "SetPrice",
|
|
|
|
setup(__props) {
|
|
|
|
let details = common_vendor.reactive({
|
|
|
|
reservationId: "",
|
|
|
|
items: {},
|
|
|
|
priceType: [
|
|
|
|
{ typename: "上楼", type: 1 },
|
|
|
|
{ typename: "超区", type: 2 },
|
|
|
|
{ typename: "平移", type: 3 },
|
|
|
|
{ typename: "搬运", type: 4 },
|
|
|
|
{ typename: "分拣入户", type: 5 },
|
|
|
|
{ typename: "专车", type: 6 }
|
|
|
|
],
|
|
|
|
priceList: []
|
|
|
|
});
|
|
|
|
common_vendor.onLoad((op) => {
|
|
|
|
details.reservationId = op.reservationId;
|
|
|
|
details.items = JSON.parse(op.item);
|
|
|
|
});
|
|
|
|
common_vendor.onShow(() => {
|
|
|
|
init();
|
|
|
|
});
|
|
|
|
common_vendor.onPullDownRefresh(() => {
|
|
|
|
const timer = setTimeout(() => {
|
|
|
|
init();
|
|
|
|
common_vendor.index.stopPullDownRefresh();
|
|
|
|
clearTimeout(timer);
|
|
|
|
}, 500);
|
|
|
|
});
|
|
|
|
const tiplists = common_vendor.ref(null);
|
|
|
|
async function init() {
|
|
|
|
let data = {
|
|
|
|
reservationId: details.items.id
|
|
|
|
};
|
|
|
|
let res = await api_user.addvalueaddvalueInfo(data);
|
|
|
|
details.priceList = res.data;
|
|
|
|
}
|
|
|
|
function goValueaddedServicePage(item) {
|
|
|
|
common_vendor.index.navigateTo({
|
|
|
|
url: "/pagesHome/pages/createAddServe/createAddServe?reservationId=" + details.items.id + "&deliveryId=" + details.reservationId + "&editId=" + item.addvalueDetailId + "&addvalueType=" + item.addvalueId
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function goaddserve() {
|
|
|
|
common_vendor.index.navigateTo({
|
|
|
|
url: "/pagesHome/pages/createAddServe/createAddServe?reservationId=" + details.items.id + "&deliveryId=" + details.reservationId
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function removeItem(_item) {
|
|
|
|
console.log("_item :>> ", _item);
|
|
|
|
tiplists.value.setdetails({
|
|
|
|
title: `确认取消该${details.priceType[Number(_item.addvalueId) - 1].typename}服务`,
|
|
|
|
isshow: true,
|
|
|
|
tipstate: 2,
|
|
|
|
list: [],
|
|
|
|
inputtext: "",
|
|
|
|
confirmTxt: "确认取消",
|
|
|
|
isonecheck: true,
|
|
|
|
success: async () => {
|
|
|
|
const submitData = {
|
|
|
|
reservationId: details.items.id,
|
|
|
|
addvalueType: _item.addvalueId,
|
|
|
|
addvalueDetailId: _item.addvalueDetailId,
|
|
|
|
floolNum: "",
|
|
|
|
distance: "",
|
|
|
|
num: 0,
|
|
|
|
packageEntityList: []
|
|
|
|
};
|
|
|
|
const res = await api_user.addvalueupdateAddvalueInfo(submitData);
|
|
|
|
console.log("res :>> ", res);
|
|
|
|
if (res.code === 200)
|
|
|
|
common_vendor.index.showToast({
|
|
|
|
title: "删除成功",
|
|
|
|
icon: "none"
|
|
|
|
});
|
|
|
|
init();
|
|
|
|
tiplists.value.setdetails({ isshow: false });
|
|
|
|
},
|
|
|
|
cancel: (details2) => {
|
|
|
|
tiplists.value.setdetails({ isshow: false });
|
|
|
|
},
|
|
|
|
close: (details2) => {
|
|
|
|
tiplists.value.setdetails({ isshow: false });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
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.t(common_vendor.unref(details).items.consignee),
|
|
|
|
c: common_vendor.t(common_vendor.unref(details).items.deliveryStatus),
|
|
|
|
d: common_vendor.t(common_vendor.unref(details).items.ordNub),
|
|
|
|
e: common_vendor.t(common_vendor.unref(details).items.reservationNum),
|
|
|
|
f: common_vendor.t(common_vendor.unref(details).items.signNub),
|
|
|
|
g: common_vendor.f(common_vendor.unref(details).priceList, (item, k0, i0) => {
|
|
|
|
return common_vendor.e({
|
|
|
|
a: common_vendor.t(common_vendor.unref(details).priceType[Number(item.addvalueId) - 1].typename),
|
|
|
|
b: item.floolNum
|
|
|
|
}, item.floolNum ? {
|
|
|
|
c: common_vendor.t(item.floolNum + " 楼")
|
|
|
|
} : item.distance && item.addvalueId == "2" ? {
|
|
|
|
e: common_vendor.t(item.distance + " km")
|
|
|
|
} : item.distance ? {
|
|
|
|
g: common_vendor.t(item.distance || " m")
|
|
|
|
} : {}, {
|
|
|
|
d: item.distance && item.addvalueId == "2",
|
|
|
|
f: item.distance,
|
|
|
|
h: common_vendor.t(item.fee || "0"),
|
|
|
|
i: common_vendor.o(($event) => goValueaddedServicePage(item)),
|
|
|
|
j: common_vendor.o(($event) => removeItem(item)),
|
|
|
|
k: common_vendor.f(item.packageEntityList, (ite, k1, i1) => {
|
|
|
|
return common_vendor.e({
|
|
|
|
a: common_vendor.t(ite.materialName),
|
|
|
|
b: common_vendor.t(ite.orderCode),
|
|
|
|
c: Number(ite.conditions) !== 3
|
|
|
|
}, Number(ite.conditions) !== 3 ? {
|
|
|
|
d: common_vendor.t(ite.orderPackageCode)
|
|
|
|
} : {
|
|
|
|
e: common_vendor.t(ite.quantity || 0)
|
|
|
|
});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
h: common_vendor.sr(tiplists, "91a023f6-1", {
|
|
|
|
"k": "tiplists"
|
|
|
|
}),
|
|
|
|
i: common_vendor.o(goaddserve)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/workSpace/logpm/pagesHome/pages/SetPrice/SetPrice.vue"]]);
|
|
|
|
wx.createPage(MiniProgramPage);
|