|
@@ -28,6 +28,7 @@ import { storeToRefs } from 'pinia'
|
|
|
import MessageCard from './components/message-card.vue'
|
|
|
import CouponCard from '../common/components/coupon-card.vue'
|
|
|
import { select } from 'radash'
|
|
|
+import { useMessage } from 'wot-design-uni'
|
|
|
|
|
|
const pageHelperRef = ref<ComponentExposed<typeof PageHelper>>()
|
|
|
const userStore = useUserStore()
|
|
@@ -41,13 +42,31 @@ const tabs = ref([
|
|
|
])
|
|
|
const selectedCoupon = ref()
|
|
|
const coupons = ref<Coupon[]>([])
|
|
|
+const cancelReason = ref('')
|
|
|
+const { confirm } = useMessage('wd-message-box-slot')
|
|
|
+
|
|
|
const query = computed(() => ({ messageType: tabs.value[tab.value]?.value }))
|
|
|
|
|
|
const handleCancel = async (message: Message) => {
|
|
|
- await requestToast(
|
|
|
- () => orderPointsCancel({ id: message.businessId.toString(), cancelReason: '用户取消' }),
|
|
|
- { success: true, successTitle: '积分确认已驳回' },
|
|
|
- )
|
|
|
+ await confirm({
|
|
|
+ title: '驳回',
|
|
|
+ beforeConfirm: async ({ resolve }) => {
|
|
|
+ if (!cancelReason.value) {
|
|
|
+ resolve(false)
|
|
|
+ uni.showToast({ title: '请输入驳回原因', icon: 'none' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ await requestToast(
|
|
|
+ () =>
|
|
|
+ orderPointsCancel({
|
|
|
+ id: message.businessId.toString(),
|
|
|
+ cancelReason: cancelReason.value,
|
|
|
+ }),
|
|
|
+ { success: true, successTitle: '积分确认已驳回' },
|
|
|
+ )
|
|
|
+ resolve(true)
|
|
|
+ },
|
|
|
+ })
|
|
|
// await deleteMessage(message.id.toString())
|
|
|
await updateMessage({ id: message.id, isRead: '1' })
|
|
|
await pageHelperRef.value?.refresh()
|
|
@@ -117,6 +136,18 @@ onShow(async () => {
|
|
|
</div>
|
|
|
</template>
|
|
|
</PageHelper>
|
|
|
+ <wd-message-box selector="wd-message-box-slot">
|
|
|
+ <!-- <wd-rate custom-class="custom-rate-class" v-model="rate" /> -->
|
|
|
+ <wd-config-provider :themeVars="{ textareaBg: 'transparent', textareaCellHeight: '100rpx' }">
|
|
|
+ <wd-textarea
|
|
|
+ custom-class="bg-[#f6f6f6]! rounded-lg border border-solid border-[#9f9f9f]/20"
|
|
|
+ v-model="cancelReason"
|
|
|
+ line="2"
|
|
|
+ height="100rpx"
|
|
|
+ placeholder="请输入驳回原因"
|
|
|
+ />
|
|
|
+ </wd-config-provider>
|
|
|
+ </wd-message-box>
|
|
|
<wd-action-sheet title="优惠券" v-model="show">
|
|
|
<view class="">
|
|
|
<wd-tabs>
|