Prechádzať zdrojové kódy

约检确认单微信推送

xuzhancheng 3 dní pred
rodič
commit
b3aad9ceca

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 0
yudao-ui-admin-vue3/.env.hst


+ 6 - 0
yudao-ui-admin-vue3/src/api/pressure/appointmentconfirmorder/index.ts

@@ -119,6 +119,12 @@ export const AppointmentConfirmOrderApi = {
   sendWechatConfirm: async (data: any) => {
     return await request.post({ url: `pressure/appointment-confirm-order/send-template-message`, data })
   },
+  sendWechatConfirmBoiler: async (data: any) => {
+    return await request.post({ url: `pressure2/appointment-confirm-order/send-template-message`, data })
+  },
+  sendWechatConfirmPipe: async (data: any) => {
+    return await request.post({ url: `pressure2/appointment-confirm-order/pipe/send-template-message`, data })
+  },
 
   // 获取约检确认设备列表
   getAppointmentConfirmOrderEquipmentList: async (params: any) => {

+ 17 - 3
yudao-ui-admin-vue3/src/views/pressure/orderConfirm/index.vue

@@ -586,9 +586,23 @@
   const handleSendWechatConfirm = async () => {
     try {
       // 调用发送短信的API
-      await AppointmentConfirmOrderApi.sendWechatConfirm({
-        id: currentRow.value?.id,
-      })
+      if (!currentRow.value?.id) {
+        ElMessage.error('发送失败,请修正约检联系人电话格式')
+        return
+      }
+      if (currentRow.value.equipMainType === 200) {
+        await AppointmentConfirmOrderApi.sendWechatConfirmBoiler({
+          id: currentRow.value?.id,
+        })
+      } else if (currentRow.value.equipMainType === 300) {
+        await AppointmentConfirmOrderApi.sendWechatConfirmPipe({
+          id: currentRow.value?.id,
+        })
+      } else {
+        await AppointmentConfirmOrderApi.sendWechatConfirm({
+          id: currentRow.value?.id,
+        })
+      }
       ElMessage.success('微信推送发送成功')
       smsDialogVisible.value = false
     } catch (error) {