fix: 控制器故障告警开关显示。
This commit is contained in:
@@ -184,6 +184,11 @@ export interface DeviceVO {
|
||||
*/
|
||||
voltageWarnOpen: number;
|
||||
|
||||
/**
|
||||
* 控制器故障电话报警开关(断电不受此开关限制)
|
||||
*/
|
||||
controllerFaultCallOpen: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -422,6 +427,11 @@ export interface DeviceForm extends BaseEntity {
|
||||
*/
|
||||
voltageWarnOpen?: number;
|
||||
|
||||
/**
|
||||
* 控制器故障电话报警开关(断电不受此开关限制)
|
||||
*/
|
||||
controllerFaultCallOpen?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -61,3 +61,15 @@ export const delPayOrder = (id: string | number | Array<string | number>) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 主动向微信确认并修复支付订单
|
||||
* @param orderId 订单ID
|
||||
*/
|
||||
export const confirmPayOrder = (orderId: string | number) => {
|
||||
return request({
|
||||
url: '/weixin/pay/confirm_order',
|
||||
method: 'post',
|
||||
data: { orderId }
|
||||
});
|
||||
};
|
||||
|
||||
15
src/types/components.d.ts
vendored
15
src/types/components.d.ts
vendored
@@ -17,8 +17,10 @@ declare module 'vue' {
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
@@ -35,12 +37,17 @@ declare module 'vue' {
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElLink: typeof import('element-plus/es')['ElLink']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
@@ -48,14 +55,22 @@ declare module 'vue' {
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElText: typeof import('element-plus/es')['ElText']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
|
||||
FlowChart: typeof import('./../components/Process/flowChart.vue')['default']
|
||||
FlowChartImg: typeof import('./../components/Process/flowChartImg.vue')['default']
|
||||
Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
|
||||
IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
|
||||
IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
|
||||
IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
|
||||
IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
|
||||
IFrame: typeof import('./../components/iFrame/index.vue')['default']
|
||||
ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
|
||||
ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
|
||||
|
||||
@@ -454,6 +454,15 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10" class="mt-3">
|
||||
<el-col :span="6">
|
||||
<div class="param-item">
|
||||
<div class="param-label">控制器故障电话告警</div>
|
||||
<dict-tag :options="[{label:'关',value:'0'},{label:'开',value:'1'}]" :value="String(device.controllerFaultCallOpen ?? 1)"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10" class="mt-3">
|
||||
<el-col :span="6">
|
||||
<div class="param-item">
|
||||
@@ -665,6 +674,15 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10" class="mt-3">
|
||||
<el-col :span="6">
|
||||
<div class="param-item">
|
||||
<div class="param-label">控制器故障电话告警</div>
|
||||
<dict-tag :options="[{label:'关',value:'0'},{label:'开',value:'1'}]" :value="String(device.controllerFaultCallOpen ?? 1)"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10" class="mt-3">
|
||||
<el-col :span="6">
|
||||
<div class="param-item">
|
||||
|
||||
@@ -128,6 +128,11 @@
|
||||
<dict-tag :options="open_close" :value="scope.row.voltageWarnOpen"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="控制器故障电话报警开关" align="center" prop="controllerFaultCallOpen" width="170">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="open_close" :value="scope.row.controllerFaultCallOpen ?? 1"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备分类" align="center" prop="category" />
|
||||
<el-table-column label="电量电话告警开关" align="center" prop="batteryWarnCallOpen" >
|
||||
<template #default="scope">
|
||||
@@ -252,6 +257,7 @@
|
||||
<div class="info-row"><span class="label">温度补偿</span><span class="value">{{ item.temperatureCompensation ?? '-' }}</span></div>
|
||||
<div class="info-row"><span class="label">输入额定电压</span><span class="value">{{ item.inputVoltage ?? '-' }}</span></div>
|
||||
<div class="info-row"><span class="label">电压告警开关</span><span class="value"><dict-tag :options="open_close" :value="item.voltageWarnOpen"/></span></div>
|
||||
<div class="info-row"><span class="label">控制器故障电话报警</span><span class="value"><dict-tag :options="open_close" :value="item.controllerFaultCallOpen ?? 1"/></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -511,6 +517,18 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="控制器故障电话告警" prop="controllerFaultCallOpen">
|
||||
<el-select v-model="form.controllerFaultCallOpen" placeholder="请选择控制器故障电话告警" clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in open_close"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电量电话告警开关" prop="batteryWarnCallOpen">
|
||||
<el-select v-model="form.batteryWarnCallOpen" placeholder="请选择电量电话告警开关" clearable style="width: 100%">
|
||||
@@ -1123,6 +1141,7 @@ const initFormData: DeviceForm = {
|
||||
phasedifCompensation: undefined,
|
||||
temperatureCompensation: undefined,
|
||||
voltageWarnOpen: undefined,
|
||||
controllerFaultCallOpen: 1,
|
||||
remark: undefined,
|
||||
category: undefined,
|
||||
batteryWarnCallOpen: undefined,
|
||||
@@ -1340,6 +1359,7 @@ const handleUpdate = async (row?: DeviceVO) => {
|
||||
const _id = row?.id || ids.value[0]
|
||||
const res = await getDevice(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
form.value.controllerFaultCallOpen = form.value.controllerFaultCallOpen ?? 1;
|
||||
|
||||
// 回显用户信息
|
||||
if (form.value.userId) {
|
||||
|
||||
@@ -55,7 +55,18 @@
|
||||
<dict-tag :options="profit_status" :value="scope.row.profitStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
|
||||
<el-table-column label="操作" align="center" width="140" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus !== 2"
|
||||
link
|
||||
type="primary"
|
||||
icon="Refresh"
|
||||
@click="handleConfirmPay(scope.row)"
|
||||
>修复支付状态</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
@@ -64,7 +75,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="PayOrder" lang="ts">
|
||||
import { listPayOrder } from '@/api/fishery/payOrder';
|
||||
import { confirmPayOrder, listPayOrder } from '@/api/fishery/payOrder';
|
||||
import { PayOrderVO, PayOrderQuery } from '@/api/fishery/payOrder/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@@ -120,6 +131,23 @@ const handleExport = () => {
|
||||
}, `payOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 主动确认并修复微信支付状态 */
|
||||
const handleConfirmPay = async (row: PayOrderVO) => {
|
||||
await proxy?.$modal.confirm('是否向微信支付查询并修复该订单状态?');
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await confirmPayOrder(row.id);
|
||||
if (res.code === 200) {
|
||||
proxy?.$modal.msgSuccess('修复成功');
|
||||
} else {
|
||||
proxy?.$modal.msgWarning(res.msg || '微信侧尚未确认支付成功');
|
||||
}
|
||||
await getList();
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user