|
|
@@ -143,7 +143,7 @@
|
|
|
<el-button link type="primary" v-if="scope.row.orderStatus === '5'">下载电子保单</el-button>
|
|
|
<el-button link type="primary" v-if="scope.row.orderStatus === '5'">查看电子保单</el-button>
|
|
|
<el-button link type="primary" v-if="scope.row.orderStatus === '4'" @click="payCode(scope)">支付码</el-button>
|
|
|
- <el-button link type="danger"
|
|
|
+ <el-button link type="danger" @click="deleteOrder(scope.row.orderNo)"
|
|
|
v-if="scope.row.orderStatus === '6' || scope.row.orderStatus === '8'">删除订单</el-button>
|
|
|
<!-- <el-dropdown trigger="click" class="ml-[12px] align-middle" v-if="scope.row.orderStatus === '5'">
|
|
|
<el-button link type="primary">
|
|
|
@@ -554,6 +554,33 @@ const updateOrderStatus = (orderNo) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 删除保险订单
|
|
|
+ * @param {string} id - 订单ID
|
|
|
+ * @returns {void}
|
|
|
+ *
|
|
|
+ * 功能说明:
|
|
|
+ * - 调用删除订单接口,根据订单ID删除对应的保险订单
|
|
|
+ * - 删除成功后显示成功提示并刷新订单列表
|
|
|
+ * - 删除失败时显示警告提示
|
|
|
+ */
|
|
|
+const deleteOrder = (id:string):void => {
|
|
|
+ api.insurancePolicyApi.deleteOrder({ id }).then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ initData()
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 支付码
|
|
|
let payCodeShow = ref(false)
|
|
|
let payCodeUrl = ref('')
|