diff --git a/api/index.ts b/api/index.ts index 0ea0f1b..0edb0b0 100644 --- a/api/index.ts +++ b/api/index.ts @@ -9,10 +9,59 @@ import { request } from "./request"; -// 获取店铺配置 +// 获取商品 export function fetchGoods () { return request({ url:'/index/goods', }) } +// 获取套餐 +export function fetchCombos(data : {}) { + return request({ + url: '/index/combos', + data: data, + method: 'POST' + }); +} +// 获取房间 +export function fetchRooms(data : {}) { + return request({ + url: '/index/rooms', + data: data, + method: 'POST' + }); +} +// 预约 +export function fetchBooking(data : {}) { + return request({ + url: '/index/booking', + data: data, + method: 'POST' + }); +} +// 取消预约 +export function fetchUnBooking(data : {}) { + return request({ + url: '/index/unbooking', + data: data, + method: 'POST' + }); +} + +// 开台/商品订单 +export function fetchAddOrder(data : {}) { + return request({ + url: '/index/addOrder', + data: data, + method: 'POST' + }); +} + +// 房间订单详情 +export function fetchRoomOrder(roomId : Number) { + return request({ + url: '/index/roomOrder', + data: { roomId: roomId }, + }) +} diff --git a/common/constants.ts b/common/constants.ts deleted file mode 100644 index 507ea91..0000000 --- a/common/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -// export enum ShoppingCartType { -// PHONE = 1, -// PARTS = 2, -// } diff --git a/pages.json b/pages.json index 99537dd..8ba0d15 100644 --- a/pages.json +++ b/pages.json @@ -14,7 +14,7 @@ // "pagePath": "pages/cart/index", // "iconPath": "static/tabbar/cart.png", // "selectedIconPath": "static/tabbar/cart-active.png", - // "text": "购物车" + // "text": "待办" // }, // { // "pagePath": "pages/cart/parts/index", @@ -36,14 +36,21 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "订单管理", + "navigationBarTitleText": "茶麻古道", "enablePullDownRefresh": false } }, { "path": "pages/index/orderAdd", "style": { - "navigationBarTitleText": "新增订单", + "navigationBarTitleText": "开台", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/index/orderEdit", + "style": { + "navigationBarTitleText": "账单", "enablePullDownRefresh": false } }, diff --git a/pages/index/index.vue b/pages/index/index.vue index d195d02..ed5c550 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,26 +2,67 @@ - + 新增商品订单 - - - - {{room.name}} - - 尾号: 111111 - 备注: 这是一段北湖这是一段北湖这是一段北... - - - 预约 - 开台 + + + + + + {{room.room_name}} + + 尾号: {{room.tel}} + 备注: {{room.remarks}} + + + + 预约 + + + 取消预约 + + + + 详情 + + + + 开台 + + - - + + + + + + + {{tempRoom?.room_name}} + + + + + + + + + + + 预约 + + + + @@ -37,43 +78,111 @@ onLoad, onShow, } from '@dcloudio/uni-app' - - import { - navigateTo, + import { + fetchRooms, + fetchBooking, + fetchUnBooking + } from '@/api/index'; + import { + navigateTo, } from '@/utils/helper' - - - - + const form = reactive({ + room_id: 0, + tel: '', + remarks: '' + }) // 房间列表 - const rooms = [{ - name: '房间名称 1' - }, - { - name: '房间名称 2' - }, - { - name: '房间名称 3' - }, - { - name: '房间名称 4' - }, - { - name: '房间名称 5' - }, - { - name: '房间名称 6' - }, - { - name: '房间名称 7' - }, - { - name: '房间名称 8' - }, - { - name: '房间名称 9' + const rooms = ref([]); + const getRoomStyle = (status) => { + let backgroundColor = ''; + let borderColor = ''; + switch (status) { + case 1: // 空闲/可用 + backgroundColor = '#d9d9d9'; + break; + case 2: // 已预约 + backgroundColor = '#ffa39e'; + break; + case 3: // 已占用 + backgroundColor = '#b7eb8f'; + break; + // case 4: // 打扫中 + // backgroundColor = '#f0f5ff'; + // borderColor = '#adc6ff'; + // break; + default: // 默认 + backgroundColor = '#d9d9d9'; } - ]; + return { + 'background-color': backgroundColor, + }; + } + const visiblePopup = ref(false) + const tempRoom = reactive({}) + const onBooking = (room) => { + console.log("----", room); + Object.assign(tempRoom, room) + form.room_id = room.id + visiblePopup.value = true + } + const onClosePopup = () => { + Object.assign(tempRoom, {}) + Object.assign(form, { + room_id: 0, + tel: '', + remarks: '' + }) + visiblePopup.value = false + console.log("关闭"); + }; + + const getRooms = () => { + console.log("房间"); + fetchRooms().then(res => { + console.log(res); + rooms.value = res; + }) + } + + // 预约 + const onSubmit = () => { + fetchBooking(form).then(res => { + console.log(res); + uni.showToast({ + icon: 'none', + title: '预约成功' + }) + onClosePopup() + getRooms() + }) + } + // 取消预约 + const onUnBooking = (room) => { + fetchUnBooking({ + id: room.id + }).then(res => { + console.log(res); + uni.showToast({ + icon: 'none', + title: '取消预约成功' + }) + getRooms() + }) + } + + const init = () => { + console.log('init'); + getRooms() + } + + onShow(() => { + console.log("onshow---"); + getRooms() + }); + + onMounted(() => { + init(); + }) \ No newline at end of file diff --git a/pages/index/orderAdd copy.vue b/pages/index/orderAdd copy.vue new file mode 100644 index 0000000..58130ad --- /dev/null +++ b/pages/index/orderAdd copy.vue @@ -0,0 +1,618 @@ + + + + + + \ No newline at end of file diff --git a/pages/index/orderAdd.vue b/pages/index/orderAdd.vue index c7d8ed2..0f395c6 100644 --- a/pages/index/orderAdd.vue +++ b/pages/index/orderAdd.vue @@ -167,7 +167,7 @@ - 保存订单 + 开台 @@ -218,11 +218,27 @@ toValue } from 'vue'; - import { + onLoad, + onShow, + onHide + } from '@dcloudio/uni-app'; + import { + fetchCombos, fetchGoods, + fetchAddOrder, } from '@/api/index'; + onLoad(options => { + console.log('onLoad'); + // 获取房间ID + form.room_id = options.roomId + console.log(form); + console.log(options); + }) + + + // // 选择房间弹窗 // const visibleRoomsPopup = ref(false); @@ -277,29 +293,31 @@ form.fee_type_name = selectedValue.selectedOptions[0].label form.fee_type = selectedValue.selectedOptions[0].value console.log(form); + if (form.fee_type !== 3) { + getCombos(); + } + visibleFeeTypePopup.value = false } + const getCombos = () => { + console.log("获取套餐"); + fetchCombos({ + type: form.fee_type + }).then(res => { + console.log(res); + combos.value = res; + }) + } + + + // 选择套餐弹窗 const visibleCombosPopup = ref(false); // 选中的套餐 const popupCombosVal = ref([]) // 套餐列表 - const combos = [{ - value: 1, - label: '美团中包套餐' - }, - { - value: 2, - label: '美团小包套餐' - }, - { - value: 3, - label: '美团小包套餐' - }, - ]; - - + const combos = ref([]); // 选择套餐 const onConfirmCombos = (selectedValue) => { console.log(selectedValue); @@ -308,8 +326,6 @@ console.log(form); visibleCombosPopup.value = false } - - // 支付状态弹窗 const visiblePaymentStatusPopup = ref(false); // 选中的支付状态 @@ -342,7 +358,7 @@ if (popupPaymentTypeVal.value == 'fee') { form.fee_pay_status_txt = selectedValue.selectedOptions[0].label - form.payment_status = selectedValue.selectedOptions[0].value + form.fee_pay_status = selectedValue.selectedOptions[0].value } if (popupPaymentTypeVal.value == 'over') { form.over_pay_status_txt = selectedValue.selectedOptions[0].label @@ -353,7 +369,6 @@ orderGoods.value[goodsPayIndex.value].goods_pay_status_txt = selectedValue.selectedOptions[0].label orderGoods.value[goodsPayIndex.value].goods_pay_status = selectedValue.selectedOptions[0].value } - console.log(form); visiblePaymentStatusPopup.value = false popupPaymentTypeVal.value = '' @@ -363,18 +378,18 @@ // 订单商品列表 - const orderGoods = ref([ - // { - // goods_type_name: null, - // goods_type_id: null, - // goods_name: null, - // goods_id: null, - // goods_price: null, - // goods_pay_status: 0, - // goods_pay_status_txt: "请选择", - // cascader_val: [] - // }, - ]) + const orderGoods = ref([ + // { + // goods_type_name: null, + // goods_type_id: null, + // goods_name: null, + // goods_id: null, + // goods_price: null, + // goods_pay_status: 0, + // goods_pay_status_txt: "请选择", + // cascader_val: [] + // }, + ]) // 当前操作的商品 const goodsPayIndex = ref(0) // 当前操作的商品 @@ -454,11 +469,10 @@ const form = reactive({ - // room_id: 0, - // room_name: '选择房间', - + order_type: 1, // 开台订单 + room_id: 0, fee_type: 0, - fee_type_name: '选择方式', + fee_type_name: '请选择', fee_combo_id: 0, // 套餐费用ID fee_combo_name: '请选择', // 套餐费用名称 fee_amount: null, // 线下支付费用 @@ -476,6 +490,7 @@ }) + // 商品列表 const selectGoods = ref([]) onMounted(() => { fetchGoods().then(res => { @@ -494,7 +509,17 @@ // amount: amount.value, // paymentStatus: paymentStatus.value // }; - console.log('提交的订单数据:', orderGoods.value); + let data = { + order_goods: orderGoods.value, + order: form + } + console.log('提交的订单数据:', data); + // console.log('提交的订单数据:', form); + fetchAddOrder(data).then(res => { + console.log(res); + // selectGoods.value = res; + }) + }; @@ -547,72 +572,4 @@ gap: 20rpx; margin-bottom: 20rpx; } - - - // .inline-goods-form { - // display: flex; - // justify-content: space-between; - // gap: 10rpx; - // /* 在元素之间添加间距 */ - // } - // .inline-goods-form { - // display: flex; - // flex-wrap: nowrap; - // /* 防止换行 */ - // align-items: flex-start; - // gap: 10rpx; - // margin-bottom: 20rpx; - // padding: 20rpx; - // background-color: #f8f9fa; - // border-radius: 16rpx; - // box-sizing: border-box; - // overflow: hidden; - // /* 防止溢出 */ - // } - - // /* 关键:为每个表单项设置适当的flex属性 */ - // .inline-goods-form .nut-form-item { - // flex: 1; /* 平均分配空间 */ - // min-width: 0; /* 重要:允许内容收缩 */ - // max-width: 100%; /* 防止溢出 */ - // word-break: break-word; /* 文本换行 */ - // overflow: hidden; /* 隐藏溢出内容 */ - // } - - // /* 确保内部元素不会撑开 */ - // .inline-goods-form .nut-form-item__body { - // width: 100%; - // overflow: hidden; - // } - - // /* 调整按钮大小 */ - // .inline-goods-form .nut-button { - // max-width: 100%; - // white-space: nowrap; - // overflow: hidden; - // text-overflow: ellipsis; - // } - - // .inline-goods-form { - // display: flex; - // flex-wrap: wrap; /* 确保元素在不足的宽度时换行 */ - // justify-content: space-between; - - // gap: 10rpx; /* 设置每个表单项之间的间距 */ - // width: 100%; - // // box-sizing: border-box; - // } - // .inline-goods-form-item-50 { - // flex: 0 0 50% !important; /* 第一个表单项占 50% */ - // } - - // .inline-goods-form-item-25 { - // flex: 0 0 25% !important; /* 其他两个表单项各占 25% */ - // } - - // .inline-item { - // flex: 1; - // display: flex; - // flex-direction: column; - // } \ No newline at end of file diff --git a/pages/index/orderEdit.vue b/pages/index/orderEdit.vue new file mode 100644 index 0000000..aa6a153 --- /dev/null +++ b/pages/index/orderEdit.vue @@ -0,0 +1,626 @@ + + + + + + \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/api/index.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/api/index.js.map index d9f00cf..cc058a7 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/api/index.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/api/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["api/index.ts"],"sourcesContent":["import { request } from \"./request\";\n\n// export function fetchNavList () {\n// \treturn request({\n// \t\turl:'/index/nav_list'\n// \t})\n// }\n\n\n\n\n// 获取店铺配置\nexport function fetchGoods () {\n\treturn request({\n\t\turl:'/index/goods',\n\t})\n}\n\n"],"names":["request"],"mappings":";;AAYO,SAAS,aAAc;AAC7B,SAAOA,oBAAQ;AAAA,IACd,KAAI;AAAA,EAAA,CACJ;AACF;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["api/index.ts"],"sourcesContent":["import { request } from \"./request\";\n\n// export function fetchNavList () {\n// \treturn request({\n// \t\turl:'/index/nav_list'\n// \t})\n// }\n\n\n\n\n// 获取商品\nexport function fetchGoods () {\n\treturn request({\n\t\turl:'/index/goods',\n\t})\n}\n// 获取套餐\nexport function fetchCombos(data : {}) {\n\treturn request({\n\t\turl: '/index/combos',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n// 获取房间\nexport function fetchRooms(data : {}) {\n\treturn request({\n\t\turl: '/index/rooms',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 预约\nexport function fetchBooking(data : {}) {\n\treturn request({\n\t\turl: '/index/booking',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n// 取消预约\nexport function fetchUnBooking(data : {}) {\n\treturn request({\n\t\turl: '/index/unbooking',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 开台/商品订单\nexport function fetchAddOrder(data : {}) {\n\treturn request({\n\t\turl: '/index/addOrder',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 房间订单详情\r\nexport function fetchRoomOrder(roomId : Number) {\r\n\treturn request({\r\n\t\turl: '/index/roomOrder',\r\n\t\tdata: { roomId: roomId },\r\n\t})\r\n}\r\n"],"names":["request"],"mappings":";;AAYO,SAAS,aAAc;AAC7B,SAAOA,oBAAQ;AAAA,IACd,KAAI;AAAA,EAAA,CACJ;AACF;AAEO,SAAS,YAAY,MAAW;AACtC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAEO,SAAS,WAAW,MAAW;AACrC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,aAAa,MAAW;AACvC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAEO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,cAAc,MAAW;AACxC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,eAAe,QAAiB;AAC/C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,OAAe;AAAA,EAAA,CACvB;AACF;;;;;;;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map index 4278a1a..a6a1c16 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["\n\n\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACf,UAAU,WAAY;AAOpBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"} \ No newline at end of file +{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["\n\n\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACf,UAAU,WAAY;AAOpBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map index 12bae1c..2ea96a0 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["pages/index/index.vue","pages/index/index.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAgDC,UAAM,QAAQ;AAAA,MAAC;AAAA,QACb,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,MACD;AAAA,QACC,MAAM;AAAA,MACN;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1EA,GAAG,WAAW,eAAe;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["pages/index/index.vue","pages/index/index.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["reactive","ref","uni","fetchRooms","fetchBooking","fetchUnBooking","onShow","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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A,QACX,CAAI;AACD,qBAAc;AACd,iBAAU;AAAA,MACb,CAAG;AAAA,IACD;AAED,UAAM,cAAc,CAAC,SAAS;AAC7BG,+BAAe;AAAA,QACd,IAAI,KAAK;AAAA,MACZ,CAAG,EAAE,KAAK,SAAO;AACdH,sBAAAA,MAAY,MAAA,OAAA,gCAAA,GAAG;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACb,MAAM;AAAA,UACN,OAAO;AAAA,QACX,CAAI;AACD,iBAAU;AAAA,MACb,CAAG;AAAA,IACD;AAED,UAAM,OAAO,MAAM;AAClBA,oBAAAA,MAAY,MAAA,OAAA,gCAAA,MAAM;AAClB,eAAU;AAAA,IACV;AAEDI,kBAAAA,OAAO,MAAM;AACZJ,oBAAAA,MAAA,MAAA,OAAA,gCAAY,WAAW;AACvB,eAAU;AAAA,IACZ,CAAE;AAEDK,kBAAAA,UAAU,MAAM;AACf;IACF,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvLF,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderAdd.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderAdd.js.map index 58561db..1faeacd 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderAdd.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderAdd.js.map @@ -1 +1 @@ -{"version":3,"file":"orderAdd.js","sources":["pages/index/orderAdd.vue","pages/index/orderAdd.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/index/orderAdd.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","uni","computed","reactive","onMounted","fetchGoods"],"mappings":";;;;;;;;;;;;;;;;;;;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AAiB;AAAA;AAAA,IAGnB,CAAE;AAGD,UAAM,cAAcH,cAAG,IAAC,EAAE;AAC1BI,kBAAAA,UAAU,MAAM;AACfC,2BAAY,EAAC,KAAK,SAAO;AACxB,oBAAY,QAAQ;AAAA,MACvB,CAAG;AAAA,IACH,CAAE;AAKD,UAAM,aAAa,MAAM;AAQxBJ,oBAAA,MAAA,MAAA,OAAA,mCAAY,YAAY,WAAW,KAAK;AAAA,IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChfA,GAAG,WAAW,eAAe;"} \ No newline at end of file +{"version":3,"file":"orderAdd.js","sources":["pages/index/orderAdd.vue","pages/index/orderAdd.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/index/orderAdd.vue'\nwx.createPage(MiniProgramPage)"],"names":["onLoad","uni","ref","fetchCombos","computed","reactive","onMounted","fetchGoods","fetchAddOrder"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuOCA,kBAAAA,OAAO,aAAW;AACjBC,oBAAAA,MAAA,MAAA,OAAA,mCAAY,QAAQ;AAEpB,WAAK,UAAU,QAAQ;AACvBA,oBAAAA,sDAAY,IAAI;AAChBA,oBAAAA,MAAY,MAAA,OAAA,mCAAA,OAAO;AAAA,IACrB,CAAE;AAiCD,UAAM,sBAAsBC,kBAAI,KAAK;AAIrC,UAAM,WAAW;AAAA,MAAC;AAAA,QAChB,OAAO;AAAA,QACP,OAAO;AAAA,MACP;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,OAAO;AAAA,MACP;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,O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kBAAAA,UAAU,MAAM;AACfC,2BAAY,EAAC,KAAK,SAAO;AACxB,oBAAY,QAAQ;AAAA,MACvB,CAAG;AAAA,IACH,CAAE;AAKD,UAAM,aAAa,MAAM;AAQxB,UAAI,OAAO;AAAA,QACV,aAAa,WAAW;AAAA,QACxB,OAAO;AAAA,MACP;AACDN,0EAAY,YAAY,IAAI;AAE5BO,gBAAAA,cAAc,IAAI,EAAE,KAAK,SAAO;AAC/BP,sBAAAA,MAAY,MAAA,OAAA,mCAAA,GAAG;AAAA,MAElB,CAAG;AAAA,IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzgBA,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderEdit.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderEdit.js.map new file mode 100644 index 0000000..a7f64fd --- /dev/null +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderEdit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"orderEdit.js","sources":["pages/index/orderEdit.vue","pages/index/orderEdit.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/index/orderEdit.vue'\nwx.createPage(MiniProgramPage)"],"names":["onLoad","uni","fetchRoomOrder","ref","fetchCombos","computed","reactive","onMounted","fetchGoods","fetchAddOrder"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA+NCA,kBAAAA,OAAO,aAAW;AACjBC,oBAAAA,MAAA,MAAA,OAAA,oCAAY,QAAQ;AAEpB,WAAK,UAAU,QAAQ;AAEvB,mBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5jBA,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/api/index.js b/unpackage/dist/dev/mp-weixin/api/index.js index 3cd3d3f..914e6ef 100644 --- a/unpackage/dist/dev/mp-weixin/api/index.js +++ b/unpackage/dist/dev/mp-weixin/api/index.js @@ -5,5 +5,52 @@ function fetchGoods() { url: "/index/goods" }); } +function fetchCombos(data) { + return api_request.request({ + url: "/index/combos", + data, + method: "POST" + }); +} +function fetchRooms(data) { + return api_request.request({ + url: "/index/rooms", + data, + method: "POST" + }); +} +function fetchBooking(data) { + return api_request.request({ + url: "/index/booking", + data, + method: "POST" + }); +} +function fetchUnBooking(data) { + return api_request.request({ + url: "/index/unbooking", + data, + method: "POST" + }); +} +function fetchAddOrder(data) { + return api_request.request({ + url: "/index/addOrder", + data, + method: "POST" + }); +} +function fetchRoomOrder(roomId) { + return api_request.request({ + url: "/index/roomOrder", + data: { roomId } + }); +} +exports.fetchAddOrder = fetchAddOrder; +exports.fetchBooking = fetchBooking; +exports.fetchCombos = fetchCombos; exports.fetchGoods = fetchGoods; +exports.fetchRoomOrder = fetchRoomOrder; +exports.fetchRooms = fetchRooms; +exports.fetchUnBooking = fetchUnBooking; //# sourceMappingURL=../../.sourcemap/mp-weixin/api/index.js.map diff --git a/unpackage/dist/dev/mp-weixin/app.js b/unpackage/dist/dev/mp-weixin/app.js index abb6289..ea7b0eb 100644 --- a/unpackage/dist/dev/mp-weixin/app.js +++ b/unpackage/dist/dev/mp-weixin/app.js @@ -4,6 +4,7 @@ const common_vendor = require("./common/vendor.js"); if (!Math) { "./pages/index/index.js"; "./pages/index/orderAdd.js"; + "./pages/index/orderEdit.js"; "./pages/mine/index.js"; "./pages/mall/detail.js"; "./pages/mall/houseDetail.js"; diff --git a/unpackage/dist/dev/mp-weixin/app.json b/unpackage/dist/dev/mp-weixin/app.json index d9fd9a8..2acf9ac 100644 --- a/unpackage/dist/dev/mp-weixin/app.json +++ b/unpackage/dist/dev/mp-weixin/app.json @@ -2,6 +2,7 @@ "pages": [ "pages/index/index", "pages/index/orderAdd", + "pages/index/orderEdit", "pages/mine/index", "pages/mall/detail", "pages/mall/houseDetail", diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.js b/unpackage/dist/dev/mp-weixin/pages/index/index.js index 77b7416..0f0bf5a 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.js @@ -1,50 +1,112 @@ "use strict"; const common_vendor = require("../../common/vendor.js"); +const api_index = require("../../api/index.js"); const utils_helper = require("../../utils/helper.js"); if (!Array) { const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button"); - const _easycom_nut_grid_item2 = common_vendor.resolveComponent("nut-grid-item"); - const _easycom_nut_grid2 = common_vendor.resolveComponent("nut-grid"); - (_easycom_nut_button2 + _easycom_nut_grid_item2 + _easycom_nut_grid2)(); + const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input"); + const _easycom_nut_form_item2 = common_vendor.resolveComponent("nut-form-item"); + const _easycom_nut_textarea2 = common_vendor.resolveComponent("nut-textarea"); + const _easycom_nut_form2 = common_vendor.resolveComponent("nut-form"); + const _easycom_nut_popup2 = common_vendor.resolveComponent("nut-popup"); + (_easycom_nut_button2 + _easycom_nut_input2 + _easycom_nut_form_item2 + _easycom_nut_textarea2 + _easycom_nut_form2 + _easycom_nut_popup2)(); } const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js"; -const _easycom_nut_grid_item = () => "../../uni_modules/nutui-uni/components/griditem/griditem.js"; -const _easycom_nut_grid = () => "../../uni_modules/nutui-uni/components/grid/grid.js"; +const _easycom_nut_input = () => "../../uni_modules/nutui-uni/components/input/input.js"; +const _easycom_nut_form_item = () => "../../uni_modules/nutui-uni/components/formitem/formitem.js"; +const _easycom_nut_textarea = () => "../../uni_modules/nutui-uni/components/textarea/textarea.js"; +const _easycom_nut_form = () => "../../uni_modules/nutui-uni/components/form/form.js"; +const _easycom_nut_popup = () => "../../uni_modules/nutui-uni/components/popup/popup.js"; if (!Math) { - (_easycom_nut_button + _easycom_nut_grid_item + _easycom_nut_grid)(); + (_easycom_nut_button + _easycom_nut_input + _easycom_nut_form_item + _easycom_nut_textarea + _easycom_nut_form + _easycom_nut_popup)(); } const _sfc_main = { __name: "index", setup(__props) { - const rooms = [ - { - name: "房间名称 1" - }, - { - name: "房间名称 2" - }, - { - name: "房间名称 3" - }, - { - name: "房间名称 4" - }, - { - name: "房间名称 5" - }, - { - name: "房间名称 6" - }, - { - name: "房间名称 7" - }, - { - name: "房间名称 8" - }, - { - name: "房间名称 9" + const form = common_vendor.reactive({ + room_id: 0, + tel: "", + remarks: "" + }); + const rooms = common_vendor.ref([]); + const getRoomStyle = (status) => { + let backgroundColor = ""; + switch (status) { + case 1: + backgroundColor = "#d9d9d9"; + break; + case 2: + backgroundColor = "#ffa39e"; + break; + case 3: + backgroundColor = "#b7eb8f"; + break; + default: + backgroundColor = "#d9d9d9"; } - ]; + return { + "background-color": backgroundColor + }; + }; + const visiblePopup = common_vendor.ref(false); + const tempRoom = common_vendor.reactive({}); + const onBooking = (room) => { + common_vendor.index.__f__("log", "at pages/index/index.vue:123", "----", room); + Object.assign(tempRoom, room); + form.room_id = room.id; + visiblePopup.value = true; + }; + const onClosePopup = () => { + Object.assign(tempRoom, {}); + Object.assign(form, { + room_id: 0, + tel: "", + remarks: "" + }); + visiblePopup.value = false; + common_vendor.index.__f__("log", "at pages/index/index.vue:136", "关闭"); + }; + const getRooms = () => { + common_vendor.index.__f__("log", "at pages/index/index.vue:140", "房间"); + api_index.fetchRooms().then((res) => { + common_vendor.index.__f__("log", "at pages/index/index.vue:142", res); + rooms.value = res; + }); + }; + const onSubmit = () => { + api_index.fetchBooking(form).then((res) => { + common_vendor.index.__f__("log", "at pages/index/index.vue:150", res); + common_vendor.index.showToast({ + icon: "none", + title: "预约成功" + }); + onClosePopup(); + getRooms(); + }); + }; + const onUnBooking = (room) => { + api_index.fetchUnBooking({ + id: room.id + }).then((res) => { + common_vendor.index.__f__("log", "at pages/index/index.vue:164", res); + common_vendor.index.showToast({ + icon: "none", + title: "取消预约成功" + }); + getRooms(); + }); + }; + const init = () => { + common_vendor.index.__f__("log", "at pages/index/index.vue:174", "init"); + getRooms(); + }; + common_vendor.onShow(() => { + common_vendor.index.__f__("log", "at pages/index/index.vue:179", "onshow---"); + getRooms(); + }); + common_vendor.onMounted(() => { + init(); + }); return (_ctx, _cache) => { return { a: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/index/orderAdd")), @@ -53,24 +115,95 @@ const _sfc_main = { block: true }), c: common_vendor.s("top:0px"), - d: common_vendor.f(rooms, (room, index, i0) => { - return { - a: common_vendor.t(room.name), - b: "1cf27b2a-3-" + i0 + "," + ("1cf27b2a-2-" + i0), - c: "1cf27b2a-4-" + i0 + "," + ("1cf27b2a-2-" + i0), - d: index, - e: "1cf27b2a-2-" + i0 + ",1cf27b2a-1" - }; - }), - e: common_vendor.p({ - type: "primary" - }), - f: common_vendor.p({ - type: "success" + d: common_vendor.f(rooms.value, (room, index, i0) => { + return common_vendor.e({ + a: common_vendor.t(room.room_name), + b: room.tel + }, room.tel ? { + c: common_vendor.t(room.tel) + } : {}, { + d: room.remarks + }, room.remarks ? { + e: common_vendor.t(room.remarks) + } : {}, { + f: room.status === 1 + }, room.status === 1 ? { + g: common_vendor.o(($event) => onBooking(room), index), + h: "1cf27b2a-1-" + i0, + i: common_vendor.p({ + size: "small", + type: "primary", + shape: "square" + }) + } : room.status === 2 ? { + k: common_vendor.o(($event) => onUnBooking(room), index), + l: "1cf27b2a-2-" + i0, + m: common_vendor.p({ + size: "small", + type: "warning", + plain: true, + shape: "square" + }) + } : {}, { + j: room.status === 2, + n: room.status === 3 + }, room.status === 3 ? { + o: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)(`/pages/index/orderEdit?roomId=${room.id}`), index), + p: "1cf27b2a-3-" + i0, + q: common_vendor.p({ + size: "small", + type: "info", + plain: true, + shape: "square" + }) + } : { + r: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)(`/pages/index/orderAdd?roomId=${room.id}`), index), + s: "1cf27b2a-4-" + i0, + t: common_vendor.p({ + size: "small", + type: "success", + plain: true, + shape: "square" + }) + }, { + v: index, + w: common_vendor.s(getRoomStyle(room.status)) + }); }), + e: common_vendor.t(tempRoom == null ? void 0 : tempRoom.room_name), + f: common_vendor.o(($event) => form.tel = $event), g: common_vendor.p({ - ["column-num"]: 2, - square: true + placeholder: "请输入尾号", + modelValue: form.tel + }), + h: common_vendor.p({ + label: "尾号" + }), + i: common_vendor.o(($event) => form.remarks = $event), + j: common_vendor.p({ + rows: 3, + ["adjust-keyboard-to"]: _ctx.bottom, + placeholder: "请输入备注", + modelValue: form.remarks + }), + k: common_vendor.p({ + label: "备注" + }), + l: common_vendor.o(onSubmit), + m: common_vendor.p({ + type: "primary", + block: true + }), + n: common_vendor.o(onClosePopup), + o: common_vendor.o(($event) => visiblePopup.value = $event), + p: common_vendor.p({ + ["custom-style"]: { + height: "60%" + }, + position: "bottom", + ["safe-area-inset-bottom"]: true, + ["close-on-click-overlay"]: true, + visible: visiblePopup.value }) }; }; diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.json b/unpackage/dist/dev/mp-weixin/pages/index/index.json index d281246..9682526 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.json +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.json @@ -1,9 +1,12 @@ { - "navigationBarTitleText": "订单管理", + "navigationBarTitleText": "茶麻古道", "enablePullDownRefresh": false, "usingComponents": { "nut-button": "../../uni_modules/nutui-uni/components/button/button", - "nut-grid-item": "../../uni_modules/nutui-uni/components/griditem/griditem", - "nut-grid": "../../uni_modules/nutui-uni/components/grid/grid" + "nut-input": "../../uni_modules/nutui-uni/components/input/input", + "nut-form-item": "../../uni_modules/nutui-uni/components/formitem/formitem", + "nut-textarea": "../../uni_modules/nutui-uni/components/textarea/textarea", + "nut-form": "../../uni_modules/nutui-uni/components/form/form", + "nut-popup": "../../uni_modules/nutui-uni/components/popup/popup" } } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.wxml b/unpackage/dist/dev/mp-weixin/pages/index/index.wxml index 714ed4c..da54b76 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.wxml @@ -1 +1 @@ - 新增商品订单 {{room.a}}尾号: 111111备注: 这是一段北湖这是一段北湖这是一段北...预约开台 \ No newline at end of file + 新增商品订单 {{room.a}}尾号: {{room.c}}备注: {{room.e}}预约取消预约详情开台{{e}} 预约 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.wxss b/unpackage/dist/dev/mp-weixin/pages/index/index.wxss index 41719cd..e8be0a5 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.wxss @@ -58,6 +58,20 @@ text-align: center; padding: 20rpx 60rpx; } + +/* Grid布局 - 每行两列 */ +.room-grid.data-v-1cf27b2a { + display: grid; + grid-template-columns: repeat(2, 1fr); + /* 两列等宽 */ + gap: 20rpx; + /* 间距 */ + padding: 20rpx; + background: #f5f5f5; +} +.room-grid-item.data-v-1cf27b2a { + border-radius: 16rpx; +} .grid-item-content.data-v-1cf27b2a { display: flex; flex-direction: column; @@ -66,23 +80,54 @@ height: 100%; text-align: center; } -.room-name.data-v-1cf27b2a { +.grid-item-content .room-name.data-v-1cf27b2a { font-size: 32rpx; -} -.room-footer.data-v-1cf27b2a { - margin: 20rpx 0; - color: #666; -} -.room-footer .room-id.data-v-1cf27b2a { - font-size: 26rpx; - margin-bottom: 10rpx; -} -.room-footer .remark.data-v-1cf27b2a { - font-size: 24rpx; - padding: 10rpx; + padding: 20rpx 0; text-align: center; } -.buttons.data-v-1cf27b2a { +.grid-item-content .room-info.data-v-1cf27b2a { + text-align: left; + padding: 20rpx 10rpx; + color: #666; + width: 100%; + min-height: 160rpx; + box-sizing: border-box; +} +.grid-item-content .room-info .room-id.data-v-1cf27b2a { + font-size: 24rpx; +} +.grid-item-content .room-info .remark.data-v-1cf27b2a { + font-size: 24rpx; + display: -webkit-box; + /* 使元素成为伸缩容器 */ + -webkit-box-orient: vertical; + /* 设置伸缩方向为纵向 */ + overflow: hidden; + /* 隐藏超出的内容 */ + -webkit-line-clamp: 2; + /* 限制显示2行 */ + line-height: 36rpx; + word-wrap: break-word; + /* 强制长单词或长数字换行 */ + word-break: break-word; + /* 强制长单词或长数字换行 */ + white-space: normal; + /* 确保文本正常换行 */ + /* 设置行高 */ +} +.grid-item-content .room-buttons.data-v-1cf27b2a { + padding: 20rpx 10rpx; display: flex; - gap: 16rpx; + gap: 20rpx; + justify-content: space-around; + width: 100%; + box-sizing: border-box; +} +.title.data-v-1cf27b2a { + padding: 0 20rpx; + margin-top: 20rpx; + margin-bottom: 20rpx; + font-size: 28rpx; + font-weight: 400; + text-align: center; } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.js b/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.js index 2e655d0..9beaeaf 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.js +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.js @@ -24,6 +24,12 @@ if (!Math) { const _sfc_main = { __name: "orderAdd", setup(__props) { + common_vendor.onLoad((options) => { + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:233", "onLoad"); + form.room_id = options.roomId; + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:236", form); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:237", options); + }); const visibleFeeTypePopup = common_vendor.ref(false); const feeTypes = [ { @@ -40,33 +46,32 @@ const _sfc_main = { } ]; const onConfirmFeeType = (selectedValue) => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:276", selectedValue); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:292", selectedValue); form.fee_type_name = selectedValue.selectedOptions[0].label; form.fee_type = selectedValue.selectedOptions[0].value; - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:279", form); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:295", form); + if (form.fee_type !== 3) { + getCombos(); + } visibleFeeTypePopup.value = false; }; + const getCombos = () => { + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:304", "获取套餐"); + api_index.fetchCombos({ + type: form.fee_type + }).then((res) => { + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:308", res); + combos.value = res; + }); + }; const visibleCombosPopup = common_vendor.ref(false); const popupCombosVal = common_vendor.ref([]); - const combos = [ - { - value: 1, - label: "美团中包套餐" - }, - { - value: 2, - label: "美团小包套餐" - }, - { - value: 3, - label: "美团小包套餐" - } - ]; + const combos = common_vendor.ref([]); const onConfirmCombos = (selectedValue) => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:305", selectedValue); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:323", 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/orderAdd.vue:308", form); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:326", form); visibleCombosPopup.value = false; }; const visiblePaymentStatusPopup = common_vendor.ref(false); @@ -90,23 +95,23 @@ const _sfc_main = { popupPaymentTypeVal.value = type; goodsPayIndex.value = index; visiblePaymentStatusPopup.value = true; - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:338", type); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:354", type); }; const onConfirmPaymentStatus = (selectedValue) => { if (popupPaymentTypeVal.value == "fee") { form.fee_pay_status_txt = selectedValue.selectedOptions[0].label; - form.payment_status = selectedValue.selectedOptions[0].value; + form.fee_pay_status = selectedValue.selectedOptions[0].value; } if (popupPaymentTypeVal.value == "over") { form.over_pay_status_txt = selectedValue.selectedOptions[0].label; form.over_pay_status = selectedValue.selectedOptions[0].value; } if (popupPaymentTypeVal.value == "goods" && goodsPayIndex.value >= 0) { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:352", "处理商品支付状态", goodsPayIndex.value); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:368", "处理商品支付状态", 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/orderAdd.vue:357", form); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:372", form); visiblePaymentStatusPopup.value = false; popupPaymentTypeVal.value = ""; goodsPayIndex.value = -1; @@ -126,7 +131,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/orderAdd.vue:384", orderGoods.value); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:399", orderGoods.value); orderGoods.value.push({ goods_type_name: null, goods_type_id: null, @@ -152,12 +157,12 @@ const _sfc_main = { } }); const onGoodsChange = (...args) => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:412", "onGoodsChange", args); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:427", "onGoodsChange", args); }; const onGoodsPathChange = (args) => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:416", "onGoodsPathChange", args); - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:417", "goodsIndex", goodsIndex.value); - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:418", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:431", "onGoodsPathChange", args); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:432", "goodsIndex", goodsIndex.value); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:433", "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; @@ -172,11 +177,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/orderAdd.vue:434", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:449", "orderGoods.value[goodsIndex.value]", orderGoods.value[goodsIndex.value]); }; const onCloseGoodsCascader = () => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:437", "onCloseGoodsCascader"); - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:438", "goodsIndex.value", goodsIndex.value); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:452", "onCloseGoodsCascader"); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:453", "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, @@ -184,17 +189,18 @@ const _sfc_main = { ]; } goodsIndex.value = 0; - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:446", "goodsIndex.value", goodsIndex.value); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:461", "goodsIndex.value", goodsIndex.value); }; const onOpenGoodsCascader = () => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:449", "onOpenGoodsCascader"); - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:450", "goodsIndex.value", goodsIndex.value); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:464", "onOpenGoodsCascader"); + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:465", "goodsIndex.value", goodsIndex.value); }; const form = common_vendor.reactive({ - // room_id: 0, - // room_name: '选择房间', + order_type: 1, + // 开台订单 + room_id: 0, fee_type: 0, - fee_type_name: "选择方式", + fee_type_name: "请选择", fee_combo_id: 0, // 套餐费用ID fee_combo_name: "请选择", @@ -223,7 +229,14 @@ const _sfc_main = { }); }); const submitForm = () => { - common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:497", "提交的订单数据:", orderGoods.value); + let data = { + order_goods: orderGoods.value, + order: form + }; + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:516", "提交的订单数据:", data); + api_index.fetchAddOrder(data).then((res) => { + common_vendor.index.__f__("log", "at pages/index/orderAdd.vue:519", res); + }); }; return (_ctx, _cache) => { return common_vendor.e({ @@ -370,7 +383,7 @@ const _sfc_main = { W: common_vendor.o(($event) => visibleCombosPopup.value = false), X: common_vendor.o(($event) => popupCombosVal.value = $event), Y: common_vendor.p({ - columns: combos, + columns: combos.value, ["field-names"]: { text: "label", value: "value" diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.json b/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.json index 29a129b..8e266a3 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.json +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.json @@ -1,5 +1,5 @@ { - "navigationBarTitleText": "新增订单", + "navigationBarTitleText": "开台", "enablePullDownRefresh": false, "usingComponents": { "nut-form-item": "../../uni_modules/nutui-uni/components/formitem/formitem", diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.wxml b/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.wxml index 009ac55..4b5572b 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderAdd.wxml @@ -1 +1 @@ -基础台费 结算方式{{a}}选择团购{{e}}线下收款支付状态{{k}}超时收费 时长(小时)超时金额支付状态{{t}}商品 新增商品商品{{item.b}} - {{item.c}}请选择商品售价{{item.f}}支付状态{{item.h}}操作删除商品订单优惠 优惠金额 保存订单 \ No newline at end of file +基础台费 结算方式{{a}}选择团购{{e}}线下收款支付状态{{k}}超时收费 时长(小时)超时金额支付状态{{t}}商品 新增商品商品{{item.b}} - {{item.c}}请选择商品售价{{item.f}}支付状态{{item.h}}操作删除商品订单优惠 优惠金额 开台 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.js b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.js new file mode 100644 index 0000000..cc0408e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.js @@ -0,0 +1,441 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_index = require("../../api/index.js"); +if (!Array) { + const _easycom_nut_form_item2 = common_vendor.resolveComponent("nut-form-item"); + 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_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)(); +} +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_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)(); +} +const _sfc_main = { + __name: "orderEdit", + setup(__props) { + common_vendor.onLoad((options) => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:225", "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); + }); + const getRoomOrder = () => { + api_index.fetchRoomOrder(form.room_id).then((res) => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:239", res); + form.room_id = res.room_id; + form.order_type = res.order_type; + form.fee_type = res.fee_type.value; + form.fee_type_name = res.fee_type.text; + form.fee_combo_id = res.fee_combo_id; + form.fee_combo_name = res.fee_combo_name; + form.fee_amount = res.fee_amount; + form.fee_pay_status = res.fee_pay_status.value; + form.fee_pay_status_txt = res.fee_pay_status.text; + form.over_often = res.over_often; + 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; + }); + }; + const visibleFeeTypePopup = common_vendor.ref(false); + const feeTypes = [ + { + value: 1, + label: "美团" + }, + { + value: 2, + label: "抖音" + }, + { + value: 3, + label: "线下" + } + ]; + const onConfirmFeeType = (selectedValue) => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:343", 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); + if (form.fee_type !== 3) { + getCombos(); + } + visibleFeeTypePopup.value = false; + }; + const getCombos = () => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:355", "获取套餐"); + api_index.fetchCombos({ + type: form.fee_type + }).then((res) => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:359", res); + combos.value = res; + }); + }; + const visibleCombosPopup = common_vendor.ref(false); + 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); + 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); + visibleCombosPopup.value = false; + }; + const visiblePaymentStatusPopup = common_vendor.ref(false); + common_vendor.ref([]); + const popupPaymentTypeVal = common_vendor.ref(""); + const paymentStatuses = [ + { + value: 1, + label: "已付" + }, + { + value: 2, + label: "未付" + }, + { + value: 3, + label: "赠送" + } + ]; + const openPayStatusPopup = (type, index = -1) => { + popupPaymentTypeVal.value = type; + goodsPayIndex.value = index; + visiblePaymentStatusPopup.value = true; + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:405", type); + }; + const onConfirmPaymentStatus = (selectedValue) => { + if (popupPaymentTypeVal.value == "fee") { + form.fee_pay_status_txt = selectedValue.selectedOptions[0].label; + form.fee_pay_status = selectedValue.selectedOptions[0].value; + } + if (popupPaymentTypeVal.value == "over") { + form.over_pay_status_txt = selectedValue.selectedOptions[0].label; + 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); + 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); + visiblePaymentStatusPopup.value = false; + popupPaymentTypeVal.value = ""; + goodsPayIndex.value = -1; + }; + const orderGoods = common_vendor.ref([ + // { + // goods_type_name: null, + // goods_type_id: null, + // goods_name: null, + // goods_id: null, + // goods_price: null, + // goods_pay_status: 0, + // goods_pay_status_txt: "请选择", + // cascader_val: [] + // }, + ]); + 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); + orderGoods.value.push({ + goods_type_name: null, + goods_type_id: null, + goods_name: null, + goods_id: null, + goods_price: null, + goods_pay_status: 0, + goods_pay_status_txt: "请选择", + cascader_val: [] + }); + }; + const removeGoods = (index) => { + orderGoods.value.splice(index, 1); + }; + const visibleGoodsCascader = common_vendor.ref(false); + const cascaderGoodsValue = common_vendor.computed(() => { + var _a; + let cascader_val = []; + if (goodsIndex.value >= 0) { + return ((_a = orderGoods.value[goodsIndex.value]) == null ? void 0 : _a.cascader_val) ?? []; + } else { + return cascader_val; + } + }); + const onGoodsChange = (...args) => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:478", "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]); + orderGoods.value[goodsIndex.value].goods_type_name = null; + orderGoods.value[goodsIndex.value].goods_type_id = null; + orderGoods.value[goodsIndex.value].goods_name = null; + orderGoods.value[goodsIndex.value].goods_id = null; + orderGoods.value[goodsIndex.value].goods_price = null; + if (args.length >= 1 && args[0] !== null) { + orderGoods.value[goodsIndex.value].goods_type_name = args[0].text; + orderGoods.value[goodsIndex.value].goods_type_id = args[0].value; + } + if (args.length >= 2 && args[1] !== null) { + orderGoods.value[goodsIndex.value].goods_name = args[1].text; + 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]); + }; + 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); + 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, + orderGoods.value[goodsIndex.value].goods_id + ]; + } + goodsIndex.value = 0; + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:512", "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); + }; + const form = common_vendor.reactive({ + order_type: 1, + // 开台订单 + room_id: 0, + fee_type: 0, + fee_type_name: "请选择", + fee_combo_id: 0, + // 套餐费用ID + fee_combo_name: "请选择", + // 套餐费用名称 + fee_amount: null, + // 线下支付费用 + fee_pay_status: 0, + // 费用支付状态 + fee_pay_status_txt: "请选择", + // 费用支付状态 + over_often: null, + // 超时小时 + over_amount: null, + // 超时金额 + over_pay_status: 0, + // 超时支付状态 + over_pay_status_txt: "请选择", + // 超时支付状态 + discount_amount: null + // 优惠金额 + }); + const selectGoods = common_vendor.ref([]); + common_vendor.onMounted(() => { + api_index.fetchGoods().then((res) => { + selectGoods.value = res; + }); + }); + const submitForm = () => { + let data = { + order_goods: orderGoods.value, + order: form + }; + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:567", "提交的订单数据:", data); + api_index.fetchAddOrder(data).then((res) => { + common_vendor.index.__f__("log", "at pages/index/orderEdit.vue:570", res); + }); + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.t(form.fee_type_name), + b: common_vendor.o(($event) => visibleFeeTypePopup.value = true), + c: common_vendor.p({ + ["label-position"]: "top" + }), + d: form.fee_type === 1 || form.fee_type === 2 + }, form.fee_type === 1 || form.fee_type === 2 ? { + e: common_vendor.t(form.fee_combo_name), + f: common_vendor.o(($event) => visibleCombosPopup.value = true), + g: common_vendor.p({ + ["label-position"]: "top" + }) + } : { + h: common_vendor.o(($event) => form.fee_amount = $event), + i: common_vendor.p({ + placeholder: "请输入金额", + type: "number", + modelValue: form.fee_amount + }), + j: common_vendor.p({ + ["label-position"]: "top" + }) + }, { + k: common_vendor.t(form.fee_pay_status_txt), + l: common_vendor.o(($event) => openPayStatusPopup("fee")), + m: common_vendor.p({ + ["label-position"]: "top" + }), + n: common_vendor.o(($event) => form.over_often = $event), + o: common_vendor.p({ + placeholder: "请输入小时", + type: "number", + modelValue: form.over_often + }), + p: common_vendor.p({ + ["label-position"]: "top" + }), + q: common_vendor.o(($event) => form.over_amount = $event), + r: common_vendor.p({ + placeholder: "请输入金额", + type: "number", + modelValue: form.over_amount + }), + s: common_vendor.p({ + ["label-position"]: "top" + }), + t: common_vendor.t(form.over_pay_status_txt), + v: common_vendor.o(($event) => openPayStatusPopup("over")), + w: common_vendor.p({ + ["label-position"]: "top" + }), + x: common_vendor.o(addGoods), + y: common_vendor.p({ + type: "primary", + plain: true, + size: "small" + }), + z: common_vendor.f(orderGoods.value, (item, index, i0) => { + return common_vendor.e({ + a: item.goods_type_name && item.goods_name + }, item.goods_type_name && item.goods_name ? { + b: common_vendor.t(item.goods_type_name), + c: common_vendor.t(item.goods_name) + } : {}, { + d: common_vendor.o(($event) => { + visibleGoodsCascader.value = true; + goodsIndex.value = index; + }, index), + e: "7c6285d6-14-" + i0 + ",7c6285d6-13", + f: common_vendor.t(item.goods_price), + g: "7c6285d6-15-" + i0 + ",7c6285d6-13", + h: common_vendor.t(item.goods_pay_status_txt), + i: common_vendor.o(($event) => openPayStatusPopup("goods", index), index), + j: "7c6285d6-16-" + i0 + ",7c6285d6-13", + k: common_vendor.o(($event) => removeGoods(index), index), + l: "7c6285d6-18-" + i0 + "," + ("7c6285d6-17-" + i0), + m: "7c6285d6-17-" + i0 + ",7c6285d6-13", + n: index + }); + }), + A: common_vendor.p({ + ["label-position"]: "top" + }), + B: common_vendor.p({ + ["label-position"]: "top" + }), + C: common_vendor.p({ + ["label-position"]: "top" + }), + D: common_vendor.p({ + type: "danger", + size: "mini" + }), + E: common_vendor.p({ + ["label-position"]: "top" + }), + F: common_vendor.o(($event) => form.discount_amount = $event), + G: common_vendor.p({ + placeholder: "请输入金额", + type: "number", + modelValue: form.discount_amount + }), + H: common_vendor.o(submitForm), + I: common_vendor.p({ + type: "primary", + 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({ + title: "商品选择", + ["text-key"]: "label", + ["value-key"]: "value", + ["children-key"]: "children", + options: selectGoods.value, + ["title-ellipsis"]: false, + visible: visibleGoodsCascader.value, + modelValue: cascaderGoodsValue.value + }), + Q: common_vendor.o(onConfirmPaymentStatus), + R: common_vendor.o(($event) => visiblePaymentStatusPopup.value = false), + S: common_vendor.p({ + columns: paymentStatuses, + ["field-names"]: { + text: "label", + value: "value" + }, + title: "选择支付状态" + }), + T: common_vendor.o(($event) => visiblePaymentStatusPopup.value = $event), + U: 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({ + columns: combos.value, + ["field-names"]: { + text: "label", + value: "value" + }, + title: "选择团购套餐", + modelValue: popupCombosVal.value + }), + Z: common_vendor.o(($event) => visibleCombosPopup.value = $event), + aa: 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({ + columns: feeTypes, + ["field-names"]: { + text: "label", + value: "value" + }, + title: "选择结算方式" + }), + ae: common_vendor.o(($event) => visibleFeeTypePopup.value = $event), + af: common_vendor.p({ + position: "bottom", + ["safe-area-inset-bottom"]: true, + visible: visibleFeeTypePopup.value + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7c6285d6"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/orderEdit.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.json b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.json new file mode 100644 index 0000000..dadd99f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "账单", + "enablePullDownRefresh": false, + "usingComponents": { + "nut-form-item": "../../uni_modules/nutui-uni/components/formitem/formitem", + "nut-input": "../../uni_modules/nutui-uni/components/input/input", + "nut-form": "../../uni_modules/nutui-uni/components/form/form", + "nut-button": "../../uni_modules/nutui-uni/components/button/button", + "nut-cascader": "../../uni_modules/nutui-uni/components/cascader/cascader", + "nut-picker": "../../uni_modules/nutui-uni/components/picker/picker", + "nut-popup": "../../uni_modules/nutui-uni/components/popup/popup" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.wxml b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.wxml new file mode 100644 index 0000000..922b3a2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.wxml @@ -0,0 +1 @@ +基础台费 结算方式{{a}}选择团购{{e}}线下收款支付状态{{k}}超时收费 时长(小时)超时金额支付状态{{t}}商品 新增商品商品{{item.b}} - {{item.c}}请选择商品售价{{item.f}}支付状态{{item.h}}操作删除商品订单优惠 优惠金额 开台 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.wxss b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.wxss new file mode 100644 index 0000000..de30442 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/orderEdit.wxss @@ -0,0 +1,84 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.page-content.data-v-7c6285d6 { + min-height: 100vh; + background-color: #f2f3f5; +} +.title.data-v-7c6285d6 { + padding: 0 20rpx; + margin-top: 20rpx; + margin-bottom: 20rpx; + font-size: 28rpx; + color: #909ca4; +} +.inline-form.data-v-7c6285d6 { + display: flex; + justify-content: space-between; + gap: 10rpx; + /* 在元素之间添加间距 */ +} +.top-bar.data-v-7c6285d6 { + background: #fff; + padding: 20rpx; + display: flex; + justify-content: space-between; + border-top: 1px solid #eee; +} + +/* 每个商品项容器 */ +/* 行容器 */ +.form-row.data-v-7c6285d6 { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 20rpx; + margin-bottom: 20rpx; +} \ No newline at end of file