lhl 2 éve
szülő
commit
711ece4f6d
3 módosított fájl, 48 hozzáadás és 11 törlés
  1. 4 4
      src/request/user.js
  2. 25 6
      src/views/order/orderList.vue
  3. 19 1
      src/views/settle/settleOrder.vue

+ 4 - 4
src/request/user.js

@@ -112,8 +112,8 @@ export function getMoneyList(data) {
 export function getOrderList(data) {
 	return request({
 		url: '/api/user/order_list',
-		method: 'get',
-		params:data
+		method: 'post',
+		data
 	});
 }
 
@@ -179,8 +179,8 @@ export function downToken(data) {
 export function settlement(data) {
 	return request({
 		url: '/api/user/settlement',
-		method: 'get',
-		params:data
+		method: 'post',
+		data
 	});
 }
 

+ 25 - 6
src/views/order/orderList.vue

@@ -90,13 +90,20 @@
 							style="width: 250px;justify-content: center;align-items: center;flex-direction: column;">
 							<i class="el-icon-loading" style="font-size: 30px;" v-if="scope.row.loading"></i>
 							<div class="flex">
-								<el-button v-if="scope.row.status > 2"
-									@click="getExpressDelivery(scope.row)">查看物流</el-button>
+								<!-- <el-button v-if="scope.row.status > 2"
+									@click="getExpressDelivery(scope.row)">查看物流</el-button> -->
+									<el-button v-if="scope.row.status == 1">待签收</el-button>
+									<el-button v-if="scope.row.status == 2" @click="batchOrder(scope.row)">待签收</el-button>
+									<el-button v-if="scope.row.status == 3" @click="batchOrder(scope.row)">申请退货</el-button>
+									<el-button v-if="scope.row.status == 5" >理赔中</el-button>
+									<el-button v-if="scope.row.status == 6" >结算中</el-button>
+									<el-button v-if="scope.row.status == 7" >已完成</el-button>
 								<!-- showBtn -->
-								<template v-if="scope.row.status <= 4">
-									<el-button v-if="showBtn(scope.row.refund_time_check) && scope.row.status > 2"
-										@click="handleOrder('您确定立即申请退货?',scope.row)" type="primary">退货</el-button>
-									<el-button v-else type="danger">退货</el-button>
+								<template v-if="scope.row.status == 4">
+									<el-button v-if="showBtn(scope.row.refund_time_check) && scope.row.refund_status == 0"
+										@click="handleOrder('您确定立即申请退货?',scope.row)" type="primary">申请退货</el-button>
+									<el-button v-else-if="showBtn(scope.row.refund_time_check) && scope.row.refund_status == 1" type="danger">等待商家审核</el-button>
+									<el-button v-else type="danger">申请退货</el-button>
 								</template>
 							</div>
 
@@ -321,6 +328,18 @@
 			},
 			sqlp(item) {
 
+			},
+			batchOrder(item) {
+				item.loading = true
+				batchOrder({
+					id: item.id
+				}).then(res => {
+					// this.$msg.success(res.msg)
+					item.tag = res.msg
+					item.loading = false
+					item.loaded = true
+					// this.getList()
+				})
 			},
 			oneWork(arr, i = 0) {
 				// batchOrder({

+ 19 - 1
src/views/settle/settleOrder.vue

@@ -187,7 +187,25 @@
 				settlement(that.queryInfo).then(res => {
 					console.log(res);
 					setTimeout((item) => {
-						that.js = res.data
+						if(res.data) {
+							that.js = res.data
+						}else {
+							that.js = {
+								order_count: 0,
+								settlement_count: 0,
+								prohibit_refund: 0,
+								compensation_sum: 0,
+								expenses_sum: 0,
+								ommission_sum: 0,
+								compensation_10_count:0,
+								compensation_11_count:0,
+								compensation_12_count: 0,
+								compensation_13_count: 0,
+								compensation_14_count: 0,
+								compensation_15_count: 0,
+							}
+						}
+						
 						that.js.loaded = true
 					},1000)