|
@@ -323,7 +323,7 @@
|
|
|
>更新</van-button
|
|
|
>
|
|
|
</div>
|
|
|
- <van-field
|
|
|
+ <!-- <van-field
|
|
|
v-if="
|
|
|
refundObject.status === 1 &&
|
|
|
user.ifForeign === '0' &&
|
|
@@ -335,7 +335,7 @@
|
|
|
label="联系方式"
|
|
|
placeholder="消费者联系方式,没有则不填"
|
|
|
>
|
|
|
- </van-field>
|
|
|
+ </van-field> -->
|
|
|
<!-- 发起退款 -->
|
|
|
<!-- 非已付款订单,线下订单要隐藏按钮 -->
|
|
|
<div
|
|
@@ -373,7 +373,7 @@
|
|
|
user.type < 2 &&
|
|
|
orderType != '3'
|
|
|
"
|
|
|
- @click="sentRefundMessage(refundObject)"
|
|
|
+ @click="showSendDialog = true"
|
|
|
round
|
|
|
type="primary"
|
|
|
style="padding: 15px 15px; margin-top: 20px"
|
|
@@ -401,6 +401,45 @@
|
|
|
>
|
|
|
{{ $t("orderCenter.initiateRefund") }}
|
|
|
</van-button>
|
|
|
+
|
|
|
+ <!-- 短信发送确认弹窗 -->
|
|
|
+ <van-dialog
|
|
|
+ v-model:show="showSendDialog"
|
|
|
+ title="提醒"
|
|
|
+ :showCancelButton="true"
|
|
|
+ class="complaint-dialog"
|
|
|
+ @confirm="sentRefundMessage(refundObject)"
|
|
|
+ >
|
|
|
+ <div class="dialog-content">
|
|
|
+ <!-- 消费者号码输入 -->
|
|
|
+ <div class="input-group">
|
|
|
+ <label class="input-label">消费者号码</label>
|
|
|
+ <van-field
|
|
|
+ v-model="customerPhone"
|
|
|
+ class="input-field"
|
|
|
+ type="tel"
|
|
|
+ placeholder="没有不填"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 投诉原因输入 -->
|
|
|
+ <div class="input-group">
|
|
|
+ <label class="input-label required">投诉原因</label>
|
|
|
+ <van-field
|
|
|
+ v-model="reason"
|
|
|
+ class="input-field"
|
|
|
+ rows="3"
|
|
|
+ type="textarea"
|
|
|
+ autosize
|
|
|
+ maxlength="20"
|
|
|
+ show-word-limit
|
|
|
+ placeholder="请输入投诉原因"
|
|
|
+ :border="false"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-popup>
|
|
@@ -584,6 +623,8 @@ export default {
|
|
|
const sendListshow = ref(false);
|
|
|
// 提醒记录
|
|
|
const sendList = ref([]);
|
|
|
+ // 短信确认弹窗
|
|
|
+ const showSendDialog = ref(false);
|
|
|
const router = useRouter();
|
|
|
// 更新是否开发票
|
|
|
const updateInvoice = async (id) => {
|
|
@@ -606,8 +647,6 @@ export default {
|
|
|
return;
|
|
|
});
|
|
|
};
|
|
|
- // 加载状态
|
|
|
- // const isLoading = ref(false);
|
|
|
// 监控退款选择框状态
|
|
|
const checkGood = (index) => {
|
|
|
if (isChecked.value[index]) {
|
|
@@ -737,27 +776,25 @@ export default {
|
|
|
});
|
|
|
};
|
|
|
const customerPhone = ref(""); // 消费者号码
|
|
|
+ const reason = ref(""); // 投诉原因
|
|
|
// 发送退款提醒短信
|
|
|
const sentRefundMessage = async (row) => {
|
|
|
+ if (reason.value === "" || reason.value === null) {
|
|
|
+ showToast("请填写投诉原因");
|
|
|
+ return;
|
|
|
+ }
|
|
|
const params = {
|
|
|
id: row.id,
|
|
|
customerPhone: customerPhone.value,
|
|
|
adminId: user.id,
|
|
|
+ reason: reason.value,
|
|
|
};
|
|
|
- showConfirmDialog({
|
|
|
- message: "是否确认发送短信?",
|
|
|
- })
|
|
|
- .then(async () => {
|
|
|
- const { data } = await sentMessage(params);
|
|
|
- if (data.code === "00000") {
|
|
|
- showSuccessToast("发送成功");
|
|
|
- } else {
|
|
|
- showFailToast(data.message);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- return;
|
|
|
- });
|
|
|
+ const { data } = await sentMessage(params);
|
|
|
+ if (data.code === "00000") {
|
|
|
+ showSuccessToast("发送成功");
|
|
|
+ } else {
|
|
|
+ showFailToast(data.message);
|
|
|
+ }
|
|
|
};
|
|
|
// 退款操作
|
|
|
const refundAjax = async () => {
|
|
@@ -1370,6 +1407,8 @@ export default {
|
|
|
getStatusType,
|
|
|
pushPageList,
|
|
|
statusClass,
|
|
|
+ showSendDialog,
|
|
|
+ reason,
|
|
|
};
|
|
|
},
|
|
|
};
|
|
@@ -1855,4 +1894,58 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.complaint-dialog {
|
|
|
+ :deep(.van-dialog__header) {
|
|
|
+ padding: 20px 20px 10px;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 600;
|
|
|
+ // color: --;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.van-dialog__content) {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.dialog-content {
|
|
|
+ padding: 0 20px 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.input-group {
|
|
|
+ margin-bottom: 20px;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 25px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.input-label {
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: var(--text-primary);
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+.input-field {
|
|
|
+ background-color: #f9fbfe;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 10px 15px;
|
|
|
+
|
|
|
+ :deep(.van-field__control) {
|
|
|
+ font-size: 14px;
|
|
|
+ color: var(--text-secondary);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@media (max-width: 480px) {
|
|
|
+ .dialog-content {
|
|
|
+ padding: 0 15px 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input-group {
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|