zhaoyun hace 1 día
padre
commit
e65d26ab73

+ 7 - 0
mer_uniapp/api/order.js

@@ -385,4 +385,11 @@ export function expressAllApi() {
  */
 export function returningGoodsApi(data) {
 	return request.post(`refund/returning/goods`,data)
+}
+/**
+ * 用户备注
+ * 
+*/
+export function userMark(data) {
+  return request.post(`order/mark`,data);
 }

+ 51 - 4
mer_uniapp/pages/order/index.vue

@@ -20,7 +20,7 @@
 		</view>
 
 		<!-- 列表数据 -->
-		<view class="nbox-1">
+		<view class="nbox-1"  v-if="list.length">
 			<view class="nbox-2" v-for="(item,index) in list" :key="index">
 				<view class="container" @click='goOrderDetails(item)'>
 					<text class="left-text">{{item.merName}}</text>
@@ -57,8 +57,11 @@
 
 						<!-- 留言字段 -->
 						<image src="/static/img/ic-message1.png" class="image2" />
-						<text style="color: #141414;font-size: 21rpx;">留言</text>
+						<text style="color: #141414;font-size: 21rpx;" @click="modify(item, 1)">留言</text> 
 					</view>
+					<PriceChange :change="change" :orderInfo="orderInfo" :isRefund="isRefund"
+						v-on:statusChange="statusChange($event)" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
+						:status="status"></PriceChange>
 				</view>
 			</view>
 			<view class='loadingicon flex-center' :hidden='!loading'>
@@ -66,22 +69,30 @@
 			</view>
 			<view class="flex-center no-data-tip" v-if="loadTitle">{{loadTitle}}</view>
 		</view>
+	    <emptyPage v-else title="暂无订单~" :imgSrc="urlDomain+'crmebimage/presets/noShopper.png'"></emptyPage>
 	</view>
 </template>
 
 <script>
+	import PriceChange from "./PriceChange/index.vue";
+	import emptyPage from '@/components/emptyPage.vue'
 	import {
 		ProductTypeEnum,
 	} from "@/enums/productEnums";
 	import {
-
+		userMark,
 		getOrderList
 	} from '@/api/order.js';
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
 	let app = getApp();
 	export default {
+		components: {
+			emptyPage,
+			PriceChange
+		},
 		data() {
 			return {
+				urlDomain: this.$Cache.get("imgHost"),
 				statusBarHeight: app.globalData.statusBarHeight,
 				navigationBarHeight: 0,
 				isShow: 0,
@@ -90,7 +101,10 @@
 				loadTitle: '',
 				page: 1,
 				list: [], //订单数据
-				ProductTypeEnum
+				ProductTypeEnum,
+				change:false,
+				orderInfo:{},
+				status: ""
 			}
 		},
 		//下拉刷新
@@ -115,6 +129,39 @@
 
 		},
 		methods: {
+			modify: function(item, status) {
+				this.change = true;
+				this.status = status.toString();
+				this.orderInfo = item;
+			},
+			changeclose: function(msg) {
+				this.change = msg;
+			},
+			async savePrice(opt) {
+				let that = this,
+				data = {};
+				data.orderNo = that.orderInfo.orderNo;
+				data.remark=opt.remark
+					if (!data.remark) {
+						return this.$util.Tips({
+							title: '请输入备注'
+						})
+					}
+					userMark(data).then(res=>{
+						if(res.code==200){
+							this.$util.Tips({
+								title: '备注成功'
+							})
+							this.getOrderList();
+							this.change = false
+						}else{
+							this.$util.Tips({
+								title:res.message
+							})
+						}
+					})
+				 
+			},
 			/**
 			 * 去订单详情
 			 */

+ 2 - 2
mer_uniapp/pages/rider_index/order/index.vue

@@ -319,8 +319,8 @@
 		computed: mapGetters(['isLogin']),
 		onLoad(options) {
 			//await
-			this.state = options.type ? options.type : 'await';
-			this.searchListData.status = options.type ? options.type : 'await';
+			this.state = options.type ? options.type : 'all';
+			this.searchListData.status = options.type ? options.type : 'all';
 			this.searchListData.type = options.orderType ? options.orderType : -1;
 		},
 		// created() {