Browse Source

Merge branch 'ttxh' of git.huaml.com:zhh/front-end into ttxh

shizhongqi 4 years ago
parent
commit
0c706b97a1

+ 1 - 1
ghsApp/src/pages.json

@@ -76,7 +76,7 @@
 				{"path": "arrival","style": {"navigationBarTitleText": "到货处理"}},
 				{"path": "result","style": {"navigationBarTitleText": "结果"}},
 				{"path": "refund","style": {"navigationBarTitleText": "退款"}},
-				{"path": "refundMsg","style": {"navigationBarTitleText": "退款"}},
+				{"path": "refundDetail","style": {"navigationBarTitleText": "退款"}},
 				{"path": "ship","style": {"navigationBarTitleText": "发货"}},
 				{"path": "shipInfo","style": {"navigationBarTitleText": "发货"}},
 				{"path": "select","style": {"navigationBarTitleText": "重选花材"}},

+ 0 - 0
ghsApp/src/pagesOrder/refundMsg.vue → ghsApp/src/pagesOrder/refundDetail.vue


+ 1 - 1
ghsApp/src/pagesOrder/refundList.vue

@@ -61,7 +61,7 @@ export default {
         this.$msg('预订单多退少补')
         return false
       }
-      this.$util.pageTo({url: '/pagesOrder/refundMsg',query: {id: item.id}})
+      this.$util.pageTo({url: '/pagesOrder/refundDetail',query: {id: item.id}})
     },
     _list() {
       return refundList({

+ 2 - 11
hdApp/src/admin/goodsManage/list.vue

@@ -59,7 +59,7 @@ import AppSearchModule from "@/components/module/app-search";
 import OperateModule from "@/admin/home/components/module/operate";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
-import {categoryListB,getCategoryGoodsB,delB,changeStatusB} from "@/api/goods";
+import {categoryListB,getCategoryGoodsB} from "@/api/goods";
 import { list } from "@/mixins";
 export default {
   name: "list",
@@ -127,7 +127,7 @@ export default {
       });
     },
     getGoodsList() {
-      return getCategoryGoodsB({ status: 1, page: this.list.page, ...this.form }).then(res => {
+      return getCategoryGoodsB({ status:'', page: this.list.page, ...this.form }).then(res => {
         this.completes(res)
       })
     },
@@ -141,15 +141,6 @@ export default {
         this.resetList();
         this.getGoodsList();
       }
-    },
-    changeStatus(item) {
-      let status = item.status == 0 ? 1 : 0
-      changeStatusB({id: item.id,status: status}).then(res => {
-        if(res.code == 1){
-          this.$msg("修改成功")
-          item.status = status
-        }
-      })
     }
   }
 };

+ 2 - 2
hdApp/src/admin/goodsManage/stockChange.vue

@@ -7,15 +7,15 @@
 					<t-table :headerBackgroundColor="'#F0F2F6'">
 						<t-tr header>
 							<t-th>时间</t-th>
-							<t-th><view style="width:180upx;">事项</view></t-th>
 							<t-th>名称</t-th>
+							<t-th><view style="width:180upx;">事项</view></t-th>
 							<t-th>变动</t-th>
 							<t-th>剩余</t-th>
 						</t-tr>
 						<t-tr v-for="(item, index) in list.data" :key="index">
 							<t-td><view>{{ item.addTime.substr(5,11) }}</view></t-td>
-							<t-td><view style="width:180upx;">{{item.typeName}}</view></t-td>
 							<t-td><view>{{item.relateName}}</view></t-td>
+							<t-td><view style="width:180upx;">{{item.typeName}}</view></t-td>
 							<t-td><view>{{parseFloat(item.goodsNum)}}</view></t-td>
 							<t-td><view>{{parseFloat(item.newStock)}}</view></t-td>
 						</t-tr>

+ 1 - 1
hdApp/src/admin/home/components/order-item.vue

@@ -53,8 +53,8 @@ export default {
 		}
 		.list-msg {
 			color:#999999;
+			font-size: 28upx;
 			.title {
-				font-size: 28upx;
 				color: $fontColor2;
 				margin-bottom: 10upx;
 			}

+ 7 - 6
hdApp/src/admin/home/order.vue

@@ -4,9 +4,10 @@
     <view class="list-wrap">
       <block v-if="!$util.isEmpty(list.data)">
         <view class="list" v-for="(item, index) in list.data" :key="index" @click="pageTo({ url: '/admin/order/detail', query: { id: item.id } })" >
-          <view class="list-top flex-center-between">
-            <view class="app-color-3">编号:{{ item.sendNum }}</view>
-            <view :class="['app-price',{'app-green':item.status==5}]">{{ item.status | constantfilter('ORDER_STATUS') }}</view>
+          <view class="list-top flex-center-between" style="border-bottom:1upx solid #EEEEEE;">
+            <view class="app-color-3" style="font-size:28upx;">编号:{{ item.sendNum }}</view>
+            <view style="border:1upx solid red;border-radius:18upx;font-size:19upx;color:red;padding:5upx 10upx;" v-if="item.refund == 1">有退款</view>
+            <view style="font-size:28upx;" class='app-price app-green'>{{ item.status | constantfilter('ORDER_STATUS') }}</view>
           </view>
           <view class="list-blo">
               <orderItem :info="item"></orderItem>
@@ -14,7 +15,7 @@
           <view class="list-bottom" style="padding-top:0upx;">
             <view style="border-bottom:1upx solid #EEEEEE;padding-bottom:8upx;">
               <span v-if="item.sendCost > 0" class="freight-text">运费 ¥{{ item.sendCost ? parseFloat(item.sendCost) : 0 }}</span>
-              <span class="app-size-30 app-bold">¥{{ item.realPrice ? parseFloat(item.realPrice) :0 }}</span>
+              <span class="app-size-30 app-bold">¥{{ item.orderPrice ? parseFloat(item.orderPrice) :0 }}</span>
             </view>
             <view class="list-button">
                 <view class="admin-button-com default">编辑收花人</view>
@@ -189,7 +190,6 @@ export default {
       margin-bottom: 20upx;
       .list-top,.list-bottom {
         padding: 20upx 0;
-        border-bottom: 1px solid #EEEEEE;
         color: #999999;
         .app-bold {
           color: #333;
@@ -208,7 +208,8 @@ export default {
         .list-button {
           margin-top: 26upx;
           .admin-button-com {
-            margin-left: 20upx;
+            margin-left: 50upx;
+            padding:20upx 30upx;
           }
         }
       }

+ 1 - 1
hdApp/src/admin/item/components/ItemStock.vue

@@ -21,7 +21,7 @@
 		</view>
 	</view>
 	<text class="bottom-button" @click.stop="goToOrderDetail(info.id)">销售记录</text>
-	<text class="bottom-button" @click.stop="goToStockDetail(info.id)">库存明细</text>
+	<text class="bottom-button" @click.stop="goToStockDetail(info.id)">库存变动</text>
 	<!-- #ifdef MP-WEIXIN -->
 	<!-- <text class="bottom-button" @click.stop="goToProduct(info.id)">分享</text> -->
 	<!-- #endif -->

+ 25 - 20
hdApp/src/admin/order/detail.vue

@@ -26,30 +26,30 @@
         <view class="module-det">
           <view class="order-msg-blo">
             <view class="msg-list">
-              <view class="label">收花</view>
+              <view class="label">收花</view>
               <view class="value">{{ orderInfo.receiveUserName }}</view>
             </view>
             <view class="msg-list">
-              <view class="label">电话</view>
+              <view class="label">电话</view>
               <view class="value">{{ orderInfo.receiveMobile }}</view>
             </view>
             <view class="msg-list">
-              <view class="label">地址</view>
+              <view class="label">地址</view>
               <view class="value">{{ orderInfo.receiveFullAddress }}</view>
             </view>
           </view>
           <view class="order-msg-blo">
             <view class="msg-list">
-              <view class="label">送达时间</view>
+              <view class="label">送达</view>
               <view v-if="orderInfo.reachDate == '0000-00-00'" class="value">-</view>
               <view v-else class="value"><span style="margin-right:10upx;">{{orderInfo.reachDate}}</span> <span v-if="orderInfo.reachPeriod == 0">上午</span><span v-else-if="orderInfo.reachPeriod == 1">下午</span><span v-else>晚上</span></view>
             </view>
             <view v-if="orderInfo.reachDate != '0000-00-00'" class="msg-list">
-              <view class="label">贺卡</view>
+              <view class="label">贺卡</view>
               <view class="value">{{ orderInfo.needCard == 1 ? "需要" : '不需要' }}</view>
             </view>
             <view class="msg-list">
-              <view class="label">祝福语</view>
+              <view class="label">寄语:</view>
               <view class="value">{{ orderInfo.cardInfo || '-' }}</view>
             </view>
           </view>
@@ -64,27 +64,32 @@
         <view class="module-det">
           <view class="order-msg-blo">
             <view class="msg-list">
-              <view class="label">单号</view>
+              <view class="label">单号</view>
               <view class="value">{{ orderInfo.orderSn||'' }}</view>
             </view>
             <view class="msg-list">
-              <view class="label">创建时间</view>
+              <view class="label">时间</view>
               <view class="value">{{ orderInfo.addTime ? orderInfo.addTime.substr(5,11) : ''}}</view>
             </view>
-            <view class="msg-list">
-              <view class="label">运费</view>
+            <view class="msg-list" v-if="Number(orderInfo.sendCost)>0">
+              <view class="label">运费</view>
               <view class="value">¥{{ orderInfo.sendCost ? parseFloat(orderInfo.sendCost) : 0 }}</view>
             </view>
+            <view v-if="orderInfo.discountAmount > 0" class="msg-list">
+              <view class="label">优惠:</view>
+              <view class="value">-¥{{ orderInfo.discountAmount ? parseFloat(orderInfo.discountAmount) : 0 }}</view>
+            </view>
             <view class="msg-list">
-              <view class="label">总金额</view>
-              <view class="value">¥{{ orderInfo.prePrice ? parseFloat(orderInfo.prePrice) : 0 }}</view>
+              <view class="label">金额</view>
+              <view class="value">¥{{ orderInfo.orderPrice ? parseFloat(orderInfo.orderPrice) : 0 }}</view>
             </view>
-            <view v-if="orderInfo.discountAmount > 0" class="msg-list">
-              <view class="label">优惠</view>
-              <view class="value">¥{{ orderInfo.discountAmount ? parseFloat(orderInfo.discountAmount) : 0 }}</view>
+            <view class="msg-list" v-if="Number(orderInfo.tkPrice)>0">
+              <view class="label">退款:</view>
+              <view class="value">-¥{{ orderInfo.tkPrice ? parseFloat(orderInfo.tkPrice) : 0 }}</view>
+              <view style="color: #3385ff;margin-left:50upx;" @click="pageTo({url: '/admin/order/refundList',query: {orderSn: orderInfo.orderSn}})">退款记录</view>
             </view>
             <view class="msg-list">
-              <view class="label">实付</view>
+              <view class="label">实付</view>
               <view class="value">¥{{ orderInfo.realPrice ? parseFloat(orderInfo.realPrice) : 0 }}</view>
             </view>
           </view>
@@ -121,7 +126,7 @@ export default {
   methods: {
 		goRefund(){
 			if(this.orderInfo.payWay == 1){
-				this.$msg('支付宝订单暂不支持退款,请线下退款')
+				this.$msg('支付宝订单暂不支持线上退款')
 				return false
 			}
 			this.$util.pageTo({url:'/admin/order/refund?id='+this.option.id})
@@ -174,11 +179,11 @@ export default {
       padding: 20upx 0;
       border-top: 1px solid $borderColor;
       .msg-list {
-        @include disFlex(flex-start, space-between);
+        display: flex;
+        justify-content: flex-start;
         margin: 16upx 0;
         .label {
-          width: 40%;
-          color: $fontColor3;
+          color: #999999;
         }
       }
     }

+ 1 - 1
hdApp/src/admin/order/refund.vue

@@ -113,7 +113,7 @@ export default {
 
 				}
 			}
-			this.refundMoney = price
+			this.refundMoney = parseFloat(price.toFixed(2))
 			return price
 		}
 	},

+ 142 - 0
hdApp/src/admin/order/refundDetail.vue

@@ -0,0 +1,142 @@
+<template>
+	<view class="app-content">
+		<view class="flex refund-item">
+			<view class="refund-label">退款方式:</view>
+			<view class="flex list">
+				<view class="flex" >{{refundType==1?'退货并退款':'仅退款'}}</view>
+			</view>
+		</view>
+		<view class="refund-item-list" v-if="refundType==1">
+			<view class="refund-label">退货商品:</view>
+			<view>
+				<template v-if="!$util.isEmpty(itemList)">
+					<view class="list" v-for="(res,i) in itemList" :key="i">
+						<view class="flex list-title" >
+							{{res.name}} {{res.num}}{{res.unitName}} X ¥{{parseFloat(res.unitPrice)}} = ¥{{parseFloat(res.price)}}
+						</view>
+					</view>
+				</template>
+				<template v-if="!$util.isEmpty(goodsList)">
+					<view class="list" v-for="(res,i) in goodsList" :key="i">
+						<view class="flex list-title" >
+							{{res.name}} {{res.num}}份 X ¥{{parseFloat(res.unitPrice)}} = ¥{{parseFloat(res.price)}}
+						</view>
+					</view>
+				</template>
+			</view>
+		</view>
+		<view class="flex refund-item">
+			<view class="refund-label"><text></text>退款金额:</view>
+			<view class="list">{{parseFloat(refundPrice)}}</view>
+		</view>
+		<view class=" refund-item">
+			<view class="refund-label">备注信息:</view>
+			<view class="list">{{remak}}</view>
+		</view>
+	</view>
+</template>
+<script>
+import { refundDetail } from "@/api/refund/index";
+export default {
+	data() {
+		return {
+			itemList:[],
+			goodsList:[],
+			refundPrice:0,
+			refundType:1,
+			remark:''
+		};
+	},
+	onShow() {
+	},
+	methods: {
+		init() {
+			refundDetail({ id: this.option.id }).then(res=>{
+				this.itemList = res.data.itemList
+				this.goodsList = res.data.goodsList
+				this.refundType = res.data.info.refundType||0
+				this.refundPrice = res.data.info.refundPrice||0
+				this.remark = res.data.remark
+			})
+		},
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-content{
+	height: calc(100vh - 30upx * 2);
+	padding: 30upx;
+	background: #FFFFFF;
+	.radioBtn{
+		width: 30upx;
+		height: 30upx;
+		margin-right: 10upx;
+		border: 1upx solid #ddd;
+		border-radius: 50%;
+		&.active{
+			position: relative;
+			border: 1upx solid #3385ff;
+			&:after{
+				content: '';
+				position: absolute;
+				width: 18upx;
+				height: 18upx;
+				background: #3385ff;
+				border-radius: 50%;
+			}
+		}
+	}
+	.refund-item-list{
+		display: flex;
+		padding-bottom: 30upx;
+		border-bottom: 1upx solid #dddddd;
+		.refund-label{
+			width: 200upx;
+			text{color: red;}
+		}
+		.list{
+			margin-bottom: 10upx;
+			.list-title{
+				height: 60upx;
+				padding-bottom: 20upx;
+
+			}
+			.list-val{
+				input{
+					width: 150upx;
+					border: 1upx solid #ddd;
+				}
+				text{
+					padding: 0 30upx;
+				}
+			}
+		}
+	}
+	.refund-item{
+		display: flex;
+		padding: 20upx 0;
+		.refund-label{width: 200upx;text{color: red;}}
+		input{
+			border: 1upx solid #ddd;
+		}
+		textarea{
+			width: calc(100% - 210upx);
+			border: 1upx solid #ddd;
+			height:150upx;
+		}
+	}
+	.btn-box{
+		.btn{
+			width: 200upx;
+			height: 60upx;
+			border: 1upx solid #666666;
+			border-radius: 10upx;
+			&.active{
+				background: #3385ff;
+				color: #fff;
+				border: 1upx solid #3385ff;
+			}
+		}
+	}
+}
+</style>

+ 98 - 0
hdApp/src/admin/order/refundList.vue

@@ -0,0 +1,98 @@
+<template>
+  <view class="app-content">
+			<block v-if="!$util.isEmpty(list.data)">
+				<view class="flex-space list" v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+
+          <view class="label">
+              <text>日期:{{item.addTime.substr(5,11)}}</text>
+              <text>单号:{{item.orderSn}}</text>
+              <text>操作:{{item.shopAdminName}}</text>
+              <text>类型:{{item.book == 1 ? '预订单多退少补' :'普通'}}</text>
+
+              <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>    
+
+          </view>
+          <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
+
+			  </view>
+			</block>
+			<block v-else>
+				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+  </view>
+</template>
+<script>
+import { list } from "@/mixins";
+import { refundList } from "@/api/refund";
+export default {
+  name: "refundList",
+  components: {},
+  mixins: [list],
+  data() {
+    return {
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  mounted() {
+  },
+  onLoad(option) {
+  },
+  onShow() {
+  	this.resetList();
+    this._list();
+  },
+  methods: {
+    goDetail(item){
+      this.$util.pageTo({url: '/admin/order/refundDetail',query: {id: item.id}})
+    },
+    _list() {
+      return refundList({
+        page: this.list.page,
+        orderSn:this.option.orderSn
+      }).then((res) => {
+        this.completes(res);
+        if (this.$util.isEmpty(res.data)){
+          return false
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+	.app-content{
+		.list{
+			padding: 20upx 30upx;
+			margin-bottom: 20upx;
+			background: #FFFFFF;
+			.label{
+        position: relative;
+				line-height: 50upx;
+				text{
+					display: block;
+				}
+			}
+			.val{
+				font-size: 25upx;
+				.iconfont{
+					margin-left: 12upx;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 10 - 0
hdApp/src/api/refund/index.js

@@ -0,0 +1,10 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+//退款详情
+export const refundDetail = data => {
+	return https.get('/refund/detail', data)
+}
+
+export const refundList = data => {
+	return https.get('/refund/list', data)
+}

+ 2 - 2
hdApp/src/common/success.vue

@@ -1,6 +1,6 @@
 <template>
   <appResult :title="title">
-	<button class="admin-button-com big blue" style="width:80%;margin-top:50upx;" @click="goBackHome">返回首页</button>
+	<button class="admin-button-com big blue" style="width:80%;margin-top:50upx;" @click="goBackHome">返回</button>
   </appResult>
 </template>
 <script>
@@ -34,7 +34,7 @@ export default {
 	},
 	methods: {
         goBackHome() {
-            this.$util.pageTo({ url: "/admin/home/workbench", type: 3, query: { tabIndex: 0 }})
+            uni.navigateBack()
         }
   },
 };

+ 4 - 1
hdApp/src/pages.json

@@ -5,7 +5,8 @@
 		{ "path": "admin/home/order", "style": { "navigationBarTitleText": "订单", "enablePullDownRefresh": true } },
 		{ "path": "admin/home/member", "style": { "navigationBarTitleText": "客户", "enablePullDownRefresh": true } },
 		{ "path": "admin/home/apply", "style": { "navigationBarTitleText": "应用", "enablePullDownRefresh": true } },
-		{ "path": "admin/home/me", "style": { "navigationBarTitleText": "我的", "enablePullDownRefresh": true, "navigationStyle": "custom" } }
+		{ "path": "admin/home/me", "style": { "navigationBarTitleText": "我的", "enablePullDownRefresh": true, "navigationStyle": "custom" } },
+		{"path": "common/success","style": {"navigationBarBackgroundColor": "#ffffff","navigationBarTextStyle": "black"}}
 	],
 	"subPackages": [
 		{
@@ -274,6 +275,8 @@
 			"pages": [
 				{ "path": "detail", "style": { "navigationBarTitleText": "详情" } },
 				{ "path": "refund", "style": { "navigationBarTitleText": "退款" } },
+				{ "path": "refundList", "style": { "navigationBarTitleText": "退款记录" } },
+				{ "path": "refundDetail", "style": { "navigationBarTitleText": "退款详情" } },
 				{ "path": "ship", "style": { "navigationBarTitleText": "发货" } },
 				{ "path": "fill-form", "style": { "navigationBarTitleText": "填写收花人" } }
 			]

+ 2 - 2
hdApp/src/pagesStorehouse/stockWarn/detailed.vue

@@ -7,15 +7,15 @@
 					<t-table :headerBackgroundColor="'#F0F2F6'">
 						<t-tr header>
 							<t-th>时间</t-th>
-							<t-th><view style="width:180upx;">事项</view></t-th>
 							<t-th>名称</t-th>
+							<t-th><view style="width:180upx;">事项</view></t-th>
 							<t-th>变动</t-th>
 							<t-th>剩余</t-th>
 						</t-tr>
 						<t-tr v-for="(item, index) in list.data" :key="index">
 							<t-td><view>{{ item.addTime.substr(5,11) }}</view></t-td>
-							<t-td><view style="width:180upx;">{{item.typeName}}</view></t-td>
 							<t-td><view>{{item.relateName}}</view></t-td>
+							<t-td><view style="width:180upx;">{{item.typeName}}</view></t-td>
 							<t-td><view>{{parseFloat(item.itemNum)}}</view></t-td>
 							<t-td><view>{{parseFloat(item.newStock)}}</view></t-td>
 						</t-tr>