处理商品订单
This commit is contained in:
@@ -6,34 +6,36 @@ if (!Array) {
|
||||
const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input");
|
||||
const _easycom_nut_form2 = common_vendor.resolveComponent("nut-form");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_textarea2 = common_vendor.resolveComponent("nut-textarea");
|
||||
const _easycom_nut_cascader2 = common_vendor.resolveComponent("nut-cascader");
|
||||
const _easycom_nut_picker2 = common_vendor.resolveComponent("nut-picker");
|
||||
const _easycom_nut_popup2 = common_vendor.resolveComponent("nut-popup");
|
||||
(_easycom_nut_form_item2 + _easycom_nut_input2 + _easycom_nut_form2 + _easycom_nut_button2 + _easycom_nut_cascader2 + _easycom_nut_picker2 + _easycom_nut_popup2)();
|
||||
(_easycom_nut_form_item2 + _easycom_nut_input2 + _easycom_nut_form2 + _easycom_nut_button2 + _easycom_nut_textarea2 + _easycom_nut_cascader2 + _easycom_nut_picker2 + _easycom_nut_popup2)();
|
||||
}
|
||||
const _easycom_nut_form_item = () => "../../uni_modules/nutui-uni/components/formitem/formitem.js";
|
||||
const _easycom_nut_input = () => "../../uni_modules/nutui-uni/components/input/input.js";
|
||||
const _easycom_nut_form = () => "../../uni_modules/nutui-uni/components/form/form.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_textarea = () => "../../uni_modules/nutui-uni/components/textarea/textarea.js";
|
||||
const _easycom_nut_cascader = () => "../../uni_modules/nutui-uni/components/cascader/cascader.js";
|
||||
const _easycom_nut_picker = () => "../../uni_modules/nutui-uni/components/picker/picker.js";
|
||||
const _easycom_nut_popup = () => "../../uni_modules/nutui-uni/components/popup/popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_form_item + _easycom_nut_input + _easycom_nut_form + _easycom_nut_button + _easycom_nut_cascader + _easycom_nut_picker + _easycom_nut_popup)();
|
||||
(_easycom_nut_form_item + _easycom_nut_input + _easycom_nut_form + _easycom_nut_button + _easycom_nut_textarea + _easycom_nut_cascader + _easycom_nut_picker + _easycom_nut_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "orderEdit",
|
||||
setup(__props) {
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:225", "onLoad");
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:233", "onLoad");
|
||||
form.room_id = options.roomId;
|
||||
getRoomOrder();
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:232", form);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:233", options);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:240", form);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:241", options);
|
||||
});
|
||||
const getRoomOrder = () => {
|
||||
api_index.fetchRoomOrder(form.room_id).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:239", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:247", res);
|
||||
form.room_id = res.room_id;
|
||||
form.order_type = res.order_type;
|
||||
form.fee_type = res.fee_type.value;
|
||||
@@ -47,6 +49,9 @@ const _sfc_main = {
|
||||
form.over_amount = res.over_amount;
|
||||
form.over_pay_status = res.over_pay_status.value;
|
||||
form.over_pay_status_txt = res.over_pay_status.text;
|
||||
form.discount_amount = res.discount_amount;
|
||||
form.remarks = res.remarks;
|
||||
orderGoods.value = res.goods;
|
||||
});
|
||||
};
|
||||
const visibleFeeTypePopup = common_vendor.ref(false);
|
||||
@@ -65,21 +70,21 @@ const _sfc_main = {
|
||||
}
|
||||
];
|
||||
const onConfirmFeeType = (selectedValue) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:343", selectedValue);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:298", selectedValue);
|
||||
form.fee_type_name = selectedValue.selectedOptions[0].label;
|
||||
form.fee_type = selectedValue.selectedOptions[0].value;
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:346", form);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:301", form);
|
||||
if (form.fee_type !== 3) {
|
||||
getCombos();
|
||||
}
|
||||
visibleFeeTypePopup.value = false;
|
||||
};
|
||||
const getCombos = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:355", "获取套餐");
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:310", "获取套餐");
|
||||
api_index.fetchCombos({
|
||||
type: form.fee_type
|
||||
}).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:359", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:314", res);
|
||||
combos.value = res;
|
||||
});
|
||||
};
|
||||
@@ -87,10 +92,10 @@ const _sfc_main = {
|
||||
const popupCombosVal = common_vendor.ref([]);
|
||||
const combos = common_vendor.ref([]);
|
||||
const onConfirmCombos = (selectedValue) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:374", selectedValue);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:329", selectedValue);
|
||||
form.fee_combo_name = selectedValue.selectedOptions[0].label;
|
||||
form.fee_combo_id = selectedValue.selectedOptions[0].value;
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:377", form);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:332", form);
|
||||
visibleCombosPopup.value = false;
|
||||
};
|
||||
const visiblePaymentStatusPopup = common_vendor.ref(false);
|
||||
@@ -114,7 +119,7 @@ const _sfc_main = {
|
||||
popupPaymentTypeVal.value = type;
|
||||
goodsPayIndex.value = index;
|
||||
visiblePaymentStatusPopup.value = true;
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:405", type);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:360", type);
|
||||
};
|
||||
const onConfirmPaymentStatus = (selectedValue) => {
|
||||
if (popupPaymentTypeVal.value == "fee") {
|
||||
@@ -126,11 +131,11 @@ const _sfc_main = {
|
||||
form.over_pay_status = selectedValue.selectedOptions[0].value;
|
||||
}
|
||||
if (popupPaymentTypeVal.value == "goods" && goodsPayIndex.value >= 0) {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:419", "处理商品支付状态", goodsPayIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:375", "处理商品支付状态", goodsPayIndex.value);
|
||||
orderGoods.value[goodsPayIndex.value].goods_pay_status_txt = selectedValue.selectedOptions[0].label;
|
||||
orderGoods.value[goodsPayIndex.value].goods_pay_status = selectedValue.selectedOptions[0].value;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:423", form);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:379", form);
|
||||
visiblePaymentStatusPopup.value = false;
|
||||
popupPaymentTypeVal.value = "";
|
||||
goodsPayIndex.value = -1;
|
||||
@@ -150,7 +155,7 @@ const _sfc_main = {
|
||||
const goodsPayIndex = common_vendor.ref(0);
|
||||
const goodsIndex = common_vendor.ref(0);
|
||||
const addGoods = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:450", orderGoods.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:406", orderGoods.value);
|
||||
orderGoods.value.push({
|
||||
goods_type_name: null,
|
||||
goods_type_id: null,
|
||||
@@ -176,12 +181,12 @@ const _sfc_main = {
|
||||
}
|
||||
});
|
||||
const onGoodsChange = (...args) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:478", "onGoodsChange", args);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:434", "onGoodsChange", args);
|
||||
};
|
||||
const onGoodsPathChange = (args) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:482", "onGoodsPathChange", args);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:483", "goodsIndex", goodsIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:484", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:438", "onGoodsPathChange", args);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:439", "goodsIndex", goodsIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:440", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]);
|
||||
orderGoods.value[goodsIndex.value].goods_type_name = null;
|
||||
orderGoods.value[goodsIndex.value].goods_type_id = null;
|
||||
orderGoods.value[goodsIndex.value].goods_name = null;
|
||||
@@ -196,11 +201,11 @@ const _sfc_main = {
|
||||
orderGoods.value[goodsIndex.value].goods_id = args[1].value;
|
||||
orderGoods.value[goodsIndex.value].goods_price = args[1].goods_price;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:500", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:456", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]);
|
||||
};
|
||||
const onCloseGoodsCascader = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:503", "onCloseGoodsCascader");
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:504", "goodsIndex.value", goodsIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:459", "onCloseGoodsCascader");
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:460", "goodsIndex.value", goodsIndex.value);
|
||||
if (orderGoods.value[goodsIndex.value].goods_type_id && orderGoods.value[goodsIndex.value].goods_id) {
|
||||
orderGoods.value[goodsIndex.value].cascader_val = [
|
||||
orderGoods.value[goodsIndex.value].goods_type_id,
|
||||
@@ -208,11 +213,11 @@ const _sfc_main = {
|
||||
];
|
||||
}
|
||||
goodsIndex.value = 0;
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:512", "goodsIndex.value", goodsIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:468", "goodsIndex.value", goodsIndex.value);
|
||||
};
|
||||
const onOpenGoodsCascader = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:515", "onOpenGoodsCascader");
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:516", "goodsIndex.value", goodsIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:471", "onOpenGoodsCascader");
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:472", "goodsIndex.value", goodsIndex.value);
|
||||
};
|
||||
const form = common_vendor.reactive({
|
||||
order_type: 1,
|
||||
@@ -252,9 +257,9 @@ const _sfc_main = {
|
||||
order_goods: orderGoods.value,
|
||||
order: form
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:567", "提交的订单数据:", data);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:523", "提交的订单数据:", data);
|
||||
api_index.fetchAddOrder(data).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:570", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:526", res);
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
@@ -361,18 +366,33 @@ const _sfc_main = {
|
||||
type: "number",
|
||||
modelValue: form.discount_amount
|
||||
}),
|
||||
H: common_vendor.o(submitForm),
|
||||
H: common_vendor.o(($event) => form.remarks = $event),
|
||||
I: common_vendor.p({
|
||||
type: "primary",
|
||||
rows: 3,
|
||||
["adjust-keyboard-to"]: _ctx.bottom,
|
||||
placeholder: "请输入备注",
|
||||
modelValue: form.remarks
|
||||
}),
|
||||
J: common_vendor.p({
|
||||
label: "备注"
|
||||
}),
|
||||
K: common_vendor.o(submitForm),
|
||||
L: common_vendor.p({
|
||||
type: "success",
|
||||
block: true
|
||||
}),
|
||||
J: common_vendor.o(onGoodsChange),
|
||||
K: common_vendor.o(onGoodsPathChange),
|
||||
L: common_vendor.o(onOpenGoodsCascader),
|
||||
M: common_vendor.o(onCloseGoodsCascader),
|
||||
N: common_vendor.o(($event) => visibleGoodsCascader.value = $event),
|
||||
O: common_vendor.o(($event) => cascaderGoodsValue.value = $event),
|
||||
P: common_vendor.p({
|
||||
M: common_vendor.o(submitForm),
|
||||
N: common_vendor.p({
|
||||
type: "danger",
|
||||
block: true
|
||||
}),
|
||||
O: common_vendor.o(onGoodsChange),
|
||||
P: common_vendor.o(onGoodsPathChange),
|
||||
Q: common_vendor.o(onOpenGoodsCascader),
|
||||
R: common_vendor.o(onCloseGoodsCascader),
|
||||
S: common_vendor.o(($event) => visibleGoodsCascader.value = $event),
|
||||
T: common_vendor.o(($event) => cascaderGoodsValue.value = $event),
|
||||
U: common_vendor.p({
|
||||
title: "商品选择",
|
||||
["text-key"]: "label",
|
||||
["value-key"]: "value",
|
||||
@@ -382,9 +402,9 @@ const _sfc_main = {
|
||||
visible: visibleGoodsCascader.value,
|
||||
modelValue: cascaderGoodsValue.value
|
||||
}),
|
||||
Q: common_vendor.o(onConfirmPaymentStatus),
|
||||
R: common_vendor.o(($event) => visiblePaymentStatusPopup.value = false),
|
||||
S: common_vendor.p({
|
||||
V: common_vendor.o(onConfirmPaymentStatus),
|
||||
W: common_vendor.o(($event) => visiblePaymentStatusPopup.value = false),
|
||||
X: common_vendor.p({
|
||||
columns: paymentStatuses,
|
||||
["field-names"]: {
|
||||
text: "label",
|
||||
@@ -392,16 +412,16 @@ const _sfc_main = {
|
||||
},
|
||||
title: "选择支付状态"
|
||||
}),
|
||||
T: common_vendor.o(($event) => visiblePaymentStatusPopup.value = $event),
|
||||
U: common_vendor.p({
|
||||
Y: common_vendor.o(($event) => visiblePaymentStatusPopup.value = $event),
|
||||
Z: common_vendor.p({
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: visiblePaymentStatusPopup.value
|
||||
}),
|
||||
V: common_vendor.o(onConfirmCombos),
|
||||
W: common_vendor.o(($event) => visibleCombosPopup.value = false),
|
||||
X: common_vendor.o(($event) => popupCombosVal.value = $event),
|
||||
Y: common_vendor.p({
|
||||
aa: common_vendor.o(onConfirmCombos),
|
||||
ab: common_vendor.o(($event) => visibleCombosPopup.value = false),
|
||||
ac: common_vendor.o(($event) => popupCombosVal.value = $event),
|
||||
ad: common_vendor.p({
|
||||
columns: combos.value,
|
||||
["field-names"]: {
|
||||
text: "label",
|
||||
@@ -410,15 +430,15 @@ const _sfc_main = {
|
||||
title: "选择团购套餐",
|
||||
modelValue: popupCombosVal.value
|
||||
}),
|
||||
Z: common_vendor.o(($event) => visibleCombosPopup.value = $event),
|
||||
aa: common_vendor.p({
|
||||
ae: common_vendor.o(($event) => visibleCombosPopup.value = $event),
|
||||
af: common_vendor.p({
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: visibleCombosPopup.value
|
||||
}),
|
||||
ab: common_vendor.o(onConfirmFeeType),
|
||||
ac: common_vendor.o(($event) => visibleFeeTypePopup.value = false),
|
||||
ad: common_vendor.p({
|
||||
ag: common_vendor.o(onConfirmFeeType),
|
||||
ah: common_vendor.o(($event) => visibleFeeTypePopup.value = false),
|
||||
ai: common_vendor.p({
|
||||
columns: feeTypes,
|
||||
["field-names"]: {
|
||||
text: "label",
|
||||
@@ -426,8 +446,8 @@ const _sfc_main = {
|
||||
},
|
||||
title: "选择结算方式"
|
||||
}),
|
||||
ae: common_vendor.o(($event) => visibleFeeTypePopup.value = $event),
|
||||
af: common_vendor.p({
|
||||
aj: common_vendor.o(($event) => visibleFeeTypePopup.value = $event),
|
||||
ak: common_vendor.p({
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: visibleFeeTypePopup.value
|
||||
|
||||
Reference in New Issue
Block a user