综法订单新增取消功能,新增匹配律师状态
This commit is contained in:
@@ -119,6 +119,26 @@ const orderDiffInfo = (diff_price_id) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 取消订单
|
||||||
|
const cancelOrder = (type, id) => {
|
||||||
|
let url
|
||||||
|
switch (type){
|
||||||
|
case 'service':
|
||||||
|
url = "synthesis/services/order/"
|
||||||
|
break;
|
||||||
|
case 'entrust':
|
||||||
|
url = "synthesis/entrust/order/"
|
||||||
|
break;
|
||||||
|
case 'expand':
|
||||||
|
url = "synthesis/expand/order/"
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url : url + id,
|
||||||
|
method : 'DELETE'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
servicesOrder,
|
servicesOrder,
|
||||||
synthesisOrder,
|
synthesisOrder,
|
||||||
@@ -132,5 +152,6 @@ export {
|
|||||||
orderDiff,
|
orderDiff,
|
||||||
orderDiffList,
|
orderDiffList,
|
||||||
orderDiffCancel,
|
orderDiffCancel,
|
||||||
orderDiffInfo
|
orderDiffInfo,
|
||||||
|
cancelOrder
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,10 @@
|
|||||||
<label>需补差价</label>
|
<label>需补差价</label>
|
||||||
<view class="nowrap">{{ diff || '-' }}</view>
|
<view class="nowrap">{{ diff || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type" v-if="can.lawyer_status != 0">
|
||||||
<label>服务律师</label>
|
<label>服务律师</label>
|
||||||
<view class="nowrap">{{ lawyer.name || '-' }}</view>
|
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
|
||||||
|
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type">
|
||||||
<label>服务费用</label>
|
<label>服务费用</label>
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btns">
|
<view class="order-btns">
|
||||||
|
<button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button>
|
||||||
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
|
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
|
||||||
<button class="btn-cancel" @click="onSing(no)" v-if="can.sign && isSelf">签约</button>
|
<button class="btn-cancel" @click="onSing(no)" v-if="can.sign && isSelf">签约</button>
|
||||||
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
|
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
|
||||||
@@ -123,6 +125,10 @@
|
|||||||
// 支付
|
// 支付
|
||||||
onOPay(id){
|
onOPay(id){
|
||||||
this.$emit('pay', id)
|
this.$emit('pay', id)
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(id){
|
||||||
|
this.$emit('cancel', id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,10 @@
|
|||||||
<label>需补差价</label>
|
<label>需补差价</label>
|
||||||
<view class="nowrap">{{ diff || '-' }}</view>
|
<view class="nowrap">{{ diff || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type" v-if="can.lawyer_status != 0">
|
||||||
<label>服务律师</label>
|
<label>服务律师</label>
|
||||||
<view class="nowrap">{{ lawyer.name || '-' }}</view>
|
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
|
||||||
|
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type">
|
||||||
<label>服务金额</label>
|
<label>服务金额</label>
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btns">
|
<view class="order-btns">
|
||||||
|
<button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button>
|
||||||
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
|
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
|
||||||
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
|
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
|
||||||
<text v-if="can.pay_status == 1">支付</text>
|
<text v-if="can.pay_status == 1">支付</text>
|
||||||
@@ -96,6 +98,10 @@
|
|||||||
default : () => {
|
default : () => {
|
||||||
return { name: '' }
|
return { name: '' }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
isSelf: {
|
||||||
|
type : Boolean,
|
||||||
|
default : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -114,6 +120,10 @@
|
|||||||
// 支付
|
// 支付
|
||||||
onOPay(id){
|
onOPay(id){
|
||||||
this.$emit('pay', id)
|
this.$emit('pay', id)
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(id){
|
||||||
|
this.$emit('cancel', id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,10 @@
|
|||||||
<label>订单类型</label>
|
<label>订单类型</label>
|
||||||
<view class="nowrap">{{ service.title || '-' }}</view>
|
<view class="nowrap">{{ service.title || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type" v-if="can.lawyer_status != 0">
|
||||||
<label>服务律师</label>
|
<label>服务律师</label>
|
||||||
<view class="nowrap">{{ lawyer.name || '-' }}</view>
|
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
|
||||||
|
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type">
|
||||||
<label>服务金额</label>
|
<label>服务金额</label>
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btns">
|
<view class="order-btns">
|
||||||
|
<button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button>
|
||||||
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
|
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
|
||||||
<button class="btn-cancel" @click="onSing(no)" v-if="can.sign && isSelf">签约</button>
|
<button class="btn-cancel" @click="onSing(no)" v-if="can.sign && isSelf">签约</button>
|
||||||
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
|
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
|
||||||
@@ -119,6 +121,10 @@
|
|||||||
// 支付
|
// 支付
|
||||||
onOPay(id){
|
onOPay(id){
|
||||||
this.$emit('pay', id)
|
this.$emit('pay', id)
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(id){
|
||||||
|
this.$emit('cancel', id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
<view class="order-block-content">
|
<view class="order-block-content">
|
||||||
<view class="order-user">{{user.nickname}}<text>{{user.username}}</text></view>
|
<view class="order-user">{{user.nickname}}<text>{{user.username}}</text></view>
|
||||||
<view class="order-content">
|
<view class="order-content">
|
||||||
<view class="order-content-type">
|
<view class="order-content-type" v-if="can.lawyer_status != 0">
|
||||||
<label>服务律师</label>
|
<label>服务律师</label>
|
||||||
<view class="nowrap">{{ lawyer.name || '-' }}</view>
|
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
|
||||||
|
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type">
|
||||||
<label>服务金额</label>
|
<label>服务金额</label>
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btns">
|
<view class="order-btns">
|
||||||
|
<!-- <button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button> -->
|
||||||
<button class="btn-cancel" @click="onPhone(user)">联系TA</button>
|
<button class="btn-cancel" @click="onPhone(user)">联系TA</button>
|
||||||
<button class="btn-sign" @click="onInfo(no)">查看</button>
|
<button class="btn-sign" @click="onInfo(no)">查看</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -65,6 +67,10 @@
|
|||||||
default : () => {
|
default : () => {
|
||||||
return { name: '' }
|
return { name: '' }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
isSelf: {
|
||||||
|
type : Boolean,
|
||||||
|
default : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -78,6 +84,10 @@
|
|||||||
},
|
},
|
||||||
onSing(id){
|
onSing(id){
|
||||||
this.$emit('info', id)
|
this.$emit('info', id)
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(id){
|
||||||
|
this.$emit('cancel', id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<view class="from-inpus from-input-code">
|
<view class="from-inpus from-input-code">
|
||||||
<label>验证码</label>
|
<label>验证码</label>
|
||||||
<input type="number" v-model="code" maxlength="4" placeholder="短信验证码">
|
<input type="number" v-model="code" maxlength="4" placeholder="短信验证码">
|
||||||
<button :disabled="username.length < 11 || getSms" @click="getCode">{{sendCode}}</button>
|
<button :disabled="username.length < 11 || getSms" @click="getCode()">{{sendCode}}</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button">
|
<view class="button">
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
:isSelf="item.is_self"
|
:isSelf="item.is_self"
|
||||||
:payStatus="item.pay_status"
|
:payStatus="item.pay_status"
|
||||||
:can="item.can"
|
:can="item.can"
|
||||||
|
@cancel="onCancel"
|
||||||
@info="onInfo"
|
@info="onInfo"
|
||||||
@pay="onPay"
|
@pay="onPay"
|
||||||
@sing="onSing"
|
@sing="onSing"
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
:payStatus="item.pay_status"
|
:payStatus="item.pay_status"
|
||||||
@info="onInfo"
|
@info="onInfo"
|
||||||
@pay="onPay"
|
@pay="onPay"
|
||||||
|
@cancel="onCancel"
|
||||||
/>
|
/>
|
||||||
<!-- 委托单 -->
|
<!-- 委托单 -->
|
||||||
<entrust-block
|
<entrust-block
|
||||||
@@ -66,6 +68,7 @@
|
|||||||
@sing="onSing"
|
@sing="onSing"
|
||||||
@diff="onDiff"
|
@diff="onDiff"
|
||||||
@callPhone="onCallPhone"
|
@callPhone="onCallPhone"
|
||||||
|
@cancel="onCancel"
|
||||||
/>
|
/>
|
||||||
<!-- 拓展单 -->
|
<!-- 拓展单 -->
|
||||||
<expand-block
|
<expand-block
|
||||||
@@ -85,6 +88,7 @@
|
|||||||
@pay="onPay"
|
@pay="onPay"
|
||||||
@diff="onDiff"
|
@diff="onDiff"
|
||||||
@callPhone="onCallPhone"
|
@callPhone="onCallPhone"
|
||||||
|
@cancel="onCancel"
|
||||||
/>
|
/>
|
||||||
</block>
|
</block>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
@@ -103,7 +107,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { certified } from '@/apis/interfaces/user.js'
|
import { certified } from '@/apis/interfaces/user.js'
|
||||||
import { servicesOrder, synthesisOrder, entrustOrder, expandOrder, orderRead } from '@/apis/interfaces/synthesisOrder.js'
|
import { servicesOrder, synthesisOrder, entrustOrder, expandOrder, orderRead, cancelOrder } from '@/apis/interfaces/synthesisOrder.js'
|
||||||
import { esignUrl } from '@/apis/interfaces/synthesis.js'
|
import { esignUrl } from '@/apis/interfaces/synthesis.js'
|
||||||
import entrustBlock from '@/components/entrustOrder.vue'
|
import entrustBlock from '@/components/entrustOrder.vue'
|
||||||
import expandBlock from '@/components/expandOrder.vue'
|
import expandBlock from '@/components/expandOrder.vue'
|
||||||
@@ -203,6 +207,37 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(no){
|
||||||
|
let orderArr = this.orderArr
|
||||||
|
let orderObj = orderArr.find(val => val.order_no === no)
|
||||||
|
let orderIndex = orderArr.findIndex(val => val.order_no === no)
|
||||||
|
|
||||||
|
uni.showModal({
|
||||||
|
title : '提示',
|
||||||
|
content : '确认取消当前订单嘛?',
|
||||||
|
success : modalRes => {
|
||||||
|
if(modalRes.confirm){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
cancelOrder(this.$Route.query.type, orderObj.order_id).then(res => {
|
||||||
|
this.orderArr.splice(orderIndex, 1)
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单已取消',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 签约
|
// 签约
|
||||||
onSing(no){
|
onSing(no){
|
||||||
let orderArr = this.orderArr
|
let orderArr = this.orderArr
|
||||||
|
|||||||
Reference in New Issue
Block a user