|
@@ -29,11 +29,24 @@
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="hui-detail-item">
|
|
|
|
+ <div class="hui-detail-label">订单状态</div>
|
|
|
|
+ <div class="hui-detail-value">
|
|
|
|
+ <div class="hui-state" v-if="!part.status">
|
|
|
|
+ <div class="hui-state-bage hui-state-info"></div>
|
|
|
|
+ <div class="hui-state-label">待确认</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="hui-state" v-else-if="part.status === 1">
|
|
|
|
+ <div class="hui-state-bage hui-state-success"></div>
|
|
|
|
+ <div class="hui-state-label">已确认</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="hui-detail-box">
|
|
<div class="hui-detail-box">
|
|
<div class="hui-detail-title">订单过程</div>
|
|
<div class="hui-detail-title">订单过程</div>
|
|
- <div class="hui-detail-content" style="min-height: 300px;padding:0;">
|
|
|
|
|
|
+ <div class="hui-detail-content" style="padding:0;">
|
|
<process-set v-if="part.id" :part="part" type="product" :key="reloadKey"></process-set>
|
|
<process-set v-if="part.id" :part="part" type="product" :key="reloadKey"></process-set>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -58,7 +71,9 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- getOrederDetail
|
|
|
|
|
|
+ getOrederDetail,
|
|
|
|
+ changeOrderPrice,
|
|
|
|
+ changeOrderStatus
|
|
} from '@/api/serve'
|
|
} from '@/api/serve'
|
|
const processSet = () => import('@/components/work/system/serveSet/processSet');
|
|
const processSet = () => import('@/components/work/system/serveSet/processSet');
|
|
const payOrder = () => import('@/components/website/payOrder');
|
|
const payOrder = () => import('@/components/website/payOrder');
|
|
@@ -88,43 +103,89 @@
|
|
getOrederDetail(this.detailId).then(res => {
|
|
getOrederDetail(this.detailId).then(res => {
|
|
if (res.state) {
|
|
if (res.state) {
|
|
this.part = res.data;
|
|
this.part = res.data;
|
|
- if (this.type === 2) { //服务商
|
|
|
|
- this.activeList = [{
|
|
|
|
- id: 1,
|
|
|
|
- type: 'warning',
|
|
|
|
- name: '修改过程'
|
|
|
|
- }, {
|
|
|
|
- id: 2,
|
|
|
|
- type: 'primary',
|
|
|
|
- name: '确认过程'
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
- if (this.type === 1) { //客户
|
|
|
|
- if (this.part.orderStatus === '未支付') {
|
|
|
|
- this.activeList = [{
|
|
|
|
- id: 3,
|
|
|
|
- type: 'primary',
|
|
|
|
- name: '立即支付'
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.type === 1 ? this.initCustomerRole() : this.initFacilitatorRole();
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ initFacilitatorRole() {
|
|
|
|
+ //服务商
|
|
|
|
+ if (this.part.orderStatus === '未支付') this.activeList.push({
|
|
|
|
+ id: 1,
|
|
|
|
+ type: 'primary',
|
|
|
|
+ name: '修改金额'
|
|
|
|
+ });
|
|
|
|
+ if (!this.part.status) this.activeList.push({
|
|
|
|
+ id: 2,
|
|
|
|
+ type: 'warning',
|
|
|
|
+ name: '修改过程'
|
|
|
|
+ });
|
|
|
|
+ if (this.part.orderStatus === '支付成功' && !this.part.status) this.activeList.push({
|
|
|
|
+ id: 3,
|
|
|
|
+ type: 'primary',
|
|
|
|
+ name: '确认订单'
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ initCustomerRole() {
|
|
|
|
+ //客户
|
|
|
|
+ if (this.part.orderStatus === '未支付') this.activeList.push({
|
|
|
|
+ id: 4,
|
|
|
|
+ type: 'primary',
|
|
|
|
+ name: '立即支付'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
action(item) {
|
|
action(item) {
|
|
switch (item.id) {
|
|
switch (item.id) {
|
|
case 1:
|
|
case 1:
|
|
- this.visible = true;
|
|
|
|
|
|
+ this.changePrice();
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
|
|
+ this.visible = true;
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
|
|
+ this.$confirm('是否确定订单,确认订单后将不能再修改', () => {
|
|
|
|
+ changeOrderStatus({
|
|
|
|
+ orderNo: this.part.orderNo,
|
|
|
|
+ status: 1
|
|
|
|
+ }).then(this.updateOrderSuccessFunc);
|
|
|
|
+ })
|
|
|
|
+ break;
|
|
|
|
+ case 4:
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ changePrice() {
|
|
|
|
+ let _self = this;
|
|
|
|
+ this.$prompt('请输入订单金额', 'WORKARK提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ inputPlaceholder: '请输入金额',
|
|
|
|
+ beforeClose: (action, instance, done) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ let match = /^(?:[0-9]\d*(?:\.\d{1,2})?|0\.(?:[1-9]\d?|\d[1-9]))$/;
|
|
|
|
+ let value = instance.inputValue;
|
|
|
|
+ if (!match.test(value)) return this.$message.warning('请输入正确的金额');
|
|
|
|
+ changeOrderPrice({
|
|
|
|
+ orderNo: this.part.orderNo,
|
|
|
|
+ totalFee: value
|
|
|
|
+ }).then(res => this.updateOrderSuccessFunc(res, done))
|
|
|
|
+ } else {
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ callback: () => {}
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ updateOrderSuccessFunc(res, done) {
|
|
|
|
+ if (res.state) {
|
|
|
|
+ this.$message.success('修改成功');
|
|
|
|
+ this.init();
|
|
|
|
+ this.$emit('callback', 'init');
|
|
|
|
+ }
|
|
|
|
+ if (done) done();
|
|
|
|
+ },
|
|
callback(type) {
|
|
callback(type) {
|
|
this.visible = false;
|
|
this.visible = false;
|
|
if (type === 'init') this.init();
|
|
if (type === 'init') this.init();
|