Commit 5beebbe3 by 李伟康

```

feat(equity): 新增通过订单号查询服务信息详情功能

- 在 `api/module/equity.js` 中新增 `getEquityOrderByOrderId` 方法,用于根据订单号获取服务信息
- 修改 `CreateEquity.vue` 组件中的 `getServiceInfoDetail` 方法,支持根据合同号或订单号两种方式调用不同接口
- 调整 `OrderCard.vue` 中跳转逻辑,将创建订单跳转目标由 `CreateOrder` 改为 `CreateEquity`
```
1 parent cf7989c0
...@@ -245,4 +245,14 @@ module.exports = { ...@@ -245,4 +245,14 @@ module.exports = {
...data ...data
}, true) }, true)
}, },
/**
* 订单号查服务信息详情
*/
getEquityOrderByOrderId (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.handler',
projectName: 'boutique',
...data
})
},
} }
...@@ -188,7 +188,12 @@ export default { ...@@ -188,7 +188,12 @@ export default {
watch: { watch: {
transmissionOfData: { transmissionOfData: {
handler (val) { handler (val) {
if (val && val.contractNo) this.getServiceInfoDetail(val.contractNo) if (val && val.contractNo) this.getServiceInfoDetail({
contractNo: val.contractNo
}, 1)
if (val && val.orderId) this.getServiceInfoDetail({
orderId: val.orderId
}, 2)
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -258,15 +263,14 @@ export default { ...@@ -258,15 +263,14 @@ export default {
// VIN车架号动态校验:车架号字段,动态转换为大写 // VIN车架号动态校验:车架号字段,动态转换为大写
if (val.value === 'vin') this.validateVin() if (val.value === 'vin') this.validateVin()
}, },
async getServiceInfoDetail (contractNo) { async getServiceInfoDetail (paramSdata, type) {
try { try {
uni.showLoading({ uni.showLoading({
title: '加载中...', title: '加载中...',
mask: true mask: true
}) })
const data = await uni.$api.equityApi.getServiceInfoDetail({ let targetApi = type == 1 ? 'getServiceInfoDetail' : 'getEquityOrderByOrderId'
contractNo const data = await uni.$api.equityApi[targetApi](paramSdata)
})
if (!data) throw '获取数据失败' if (!data) throw '获取数据失败'
if (data.ybAttachmentFlag != 0) this.formList[3] = [] if (data.ybAttachmentFlag != 0) this.formList[3] = []
if (data.qsFlag != 1) this.formList[4] = [] if (data.qsFlag != 1) this.formList[4] = []
......
...@@ -479,7 +479,7 @@ export default { ...@@ -479,7 +479,7 @@ export default {
}, },
//去处理 //去处理
createorder() { createorder() {
this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'CreateOrder' }) this.$emit('jump', 'CreateEquity', this.orderCardDetail)
}, },
//上传协议 //上传协议
uploadContract() { uploadContract() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!