|
@@ -5,6 +5,10 @@
|
|
|
<div class="hui-detail-box">
|
|
|
<div class="hui-detail-title">基础信息</div>
|
|
|
<div class="hui-detail-content">
|
|
|
+ <div class="hui-detail-item">
|
|
|
+ <div class="hui-detail-label">创建时间</div>
|
|
|
+ <div class="hui-detail-value">{{part.createTime}}</div>
|
|
|
+ </div>
|
|
|
<div class="hui-detail-item">
|
|
|
<div class="hui-detail-label">订单编号</div>
|
|
|
<div class="hui-detail-value">{{part.orderNo}}</div>
|
|
@@ -15,11 +19,7 @@
|
|
|
</div>
|
|
|
<div class="hui-detail-item">
|
|
|
<div class="hui-detail-label">价格(元)</div>
|
|
|
- <div class="hui-detail-value">{{part.totalFee}}</div>
|
|
|
- </div>
|
|
|
- <div class="hui-detail-item">
|
|
|
- <div class="hui-detail-label">创建时间</div>
|
|
|
- <div class="hui-detail-value">{{part.createTime}}</div>
|
|
|
+ <div class="hui-detail-value color-danger">{{part.totalFee}}</div>
|
|
|
</div>
|
|
|
<div class="hui-detail-item">
|
|
|
<div class="hui-detail-label">支付状态</div>
|
|
@@ -37,8 +37,12 @@
|
|
|
<div class="hui-state-label">待确认</div>
|
|
|
</div>
|
|
|
<div class="hui-state" v-else-if="part.status === 1">
|
|
|
+ <div class="hui-state-bage hui-state-waiting"></div>
|
|
|
+ <div class="hui-state-label">过程进行中</div>
|
|
|
+ </div>
|
|
|
+ <div class="hui-state" v-else-if="part.status === 2">
|
|
|
<div class="hui-state-bage hui-state-success"></div>
|
|
|
- <div class="hui-state-label">已确认</div>
|
|
|
+ <div class="hui-state-label">已交付</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -47,8 +51,9 @@
|
|
|
<div class="hui-detail-box">
|
|
|
<div class="hui-detail-title">订单过程</div>
|
|
|
<div class="hui-detail-content" style="padding:0;">
|
|
|
- <process-set ref="processSet" v-if="part.id" :part="part" type="product"
|
|
|
- :key="reloadKey"></process-set>
|
|
|
+ <process-set ref="processSet" @callback="callback" v-if="part.id" :part="part" type="product"
|
|
|
+ :key="reloadKey" :roleType="type">
|
|
|
+ </process-set>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -74,12 +79,13 @@
|
|
|
import {
|
|
|
getOrederDetail,
|
|
|
changeOrderPrice,
|
|
|
- changeOrderStatus
|
|
|
+ changeOrderStatus,
|
|
|
+ getOrederDetailByOrderNo
|
|
|
} from '@/api/serve'
|
|
|
const processSet = () => import('@/components/work/system/serveSet/processSet');
|
|
|
const payOrder = () => import('@/components/website/payOrder');
|
|
|
export default {
|
|
|
- props: ['detailId', 'type'],
|
|
|
+ props: ['detailId', 'type', 'detailType'],
|
|
|
data() {
|
|
|
return {
|
|
|
part: {},
|
|
@@ -101,14 +107,21 @@
|
|
|
methods: {
|
|
|
init() {
|
|
|
this.activeList = [];
|
|
|
- getOrederDetail(this.detailId).then(res => {
|
|
|
- if (res.state) {
|
|
|
- this.part = res.data;
|
|
|
- this.type === 1 ? this.initCustomerRole() : this.initFacilitatorRole();
|
|
|
- }
|
|
|
- })
|
|
|
+ if (this.detailType === 'orderNo') {
|
|
|
+ getOrederDetailByOrderNo(this.detailId).then(this.initSuccessFunc)
|
|
|
+ } else {
|
|
|
+ getOrederDetail(this.detailId).then(this.initSuccessFunc)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initSuccessFunc(res) {
|
|
|
+ if (res.state) {
|
|
|
+ this.part = res.data;
|
|
|
+ if (this.detailType === 'orderNo') return;
|
|
|
+ this.type === 1 ? this.initCustomerRole() : this.initFacilitatorRole();
|
|
|
+ }
|
|
|
},
|
|
|
initFacilitatorRole() {
|
|
|
+ //status 0-待服务商确认 1-服务商已确认,过程开始 2.过程结束,已交付
|
|
|
//服务商
|
|
|
if (this.part.orderStatus === '未支付') this.activeList.push({
|
|
|
id: 1,
|
|
@@ -143,9 +156,7 @@
|
|
|
this.visible = true;
|
|
|
break;
|
|
|
case 3:
|
|
|
- this.$confirm('是否确定订单,确认订单后将不能再修改', () => {
|
|
|
- console.log('-----');
|
|
|
- console.log(this.$refs.processSet);
|
|
|
+ this.$confirm('是否确定订单,确认订单后将不能再修改', () => {
|
|
|
this.$refs.processSet.initStatus();
|
|
|
changeOrderStatus({
|
|
|
orderNo: this.part.orderNo,
|
|
@@ -191,9 +202,9 @@
|
|
|
if (done) done();
|
|
|
},
|
|
|
callback(type) {
|
|
|
+ if (type === 'reloadKey') return this.reloadKey = !this.reloadKey;
|
|
|
this.visible = false;
|
|
|
if (type === 'init') this.init();
|
|
|
- if (type === 'reloadKey') this.reloadKey = !this.reloadKey;
|
|
|
if (type === 'payState') {
|
|
|
this.activeList = [];
|
|
|
this.timeOut = setTimeout(() => {
|
|
@@ -203,6 +214,12 @@
|
|
|
this.timeOut = null;
|
|
|
}, 5000)
|
|
|
}
|
|
|
+ if (type === 'processSuccess') {
|
|
|
+ changeOrderStatus({
|
|
|
+ orderNo: this.part.orderNo,
|
|
|
+ status: 2
|
|
|
+ }).then(this.updateOrderSuccessFunc);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
components: {
|