Selaa lähdekoodia

销售端登录问题修复,预约时间选择修复

huangzhe 3 vuotta sitten
vanhempi
commit
f000866276
99 muutettua tiedostoa jossa 16562 lisäystä ja 229 poistoa
  1. 13 4
      src/components/page-component/app-user-center-top/app-user-center-top.vue
  2. 173 172
      src/pages.json
  3. 37 14
      src/pages/case/appointment/appointment-form.vue
  4. 4 4
      src/pages/case/appointment/appointment-list.vue
  5. 8 1
      src/pages/case/appointment/appointment.vue
  6. 3 0
      src/pages/goods/list.vue
  7. 1 1
      src/pages/sale/mySaleOrder.vue
  8. 12 17
      src/pages/sale/sale-user-center.vue
  9. 33 14
      src/pages/sale/sale_login/sale_login.vue
  10. 0 2
      src/pages/user-center/user-center.vue
  11. 717 0
      src/plugins/mch/apply/apply.vue
  12. 520 0
      src/plugins/mch/cat/cat.vue
  13. 734 0
      src/plugins/mch/goods/goods.vue
  14. BIN
      src/plugins/mch/image/add-detail.png
  15. BIN
      src/plugins/mch/image/add-goods.png
  16. BIN
      src/plugins/mch/image/add.png
  17. BIN
      src/plugins/mch/image/apply-er.png
  18. BIN
      src/plugins/mch/image/apply-ok.png
  19. BIN
      src/plugins/mch/image/arrow-left-white.png
  20. BIN
      src/plugins/mch/image/camera.png
  21. BIN
      src/plugins/mch/image/cat-close.png
  22. BIN
      src/plugins/mch/image/close.png
  23. BIN
      src/plugins/mch/image/copy.png
  24. BIN
      src/plugins/mch/image/delete.png
  25. BIN
      src/plugins/mch/image/express.png
  26. BIN
      src/plugins/mch/image/goods-contact.png
  27. BIN
      src/plugins/mch/image/goods-del.png
  28. BIN
      src/plugins/mch/image/goods-edit.png
  29. BIN
      src/plugins/mch/image/goods-xiajia.png
  30. BIN
      src/plugins/mch/image/image.png
  31. BIN
      src/plugins/mch/image/line.png
  32. BIN
      src/plugins/mch/image/list-cat.png
  33. BIN
      src/plugins/mch/image/localhost.png
  34. BIN
      src/plugins/mch/image/login-alipay.png
  35. BIN
      src/plugins/mch/image/login-wechat.png
  36. BIN
      src/plugins/mch/image/low.png
  37. BIN
      src/plugins/mch/image/more-active.png
  38. BIN
      src/plugins/mch/image/more-handle.png
  39. BIN
      src/plugins/mch/image/more.png
  40. BIN
      src/plugins/mch/image/myshop-code.png
  41. BIN
      src/plugins/mch/image/myshop-data.png
  42. BIN
      src/plugins/mch/image/myshop-goods.png
  43. BIN
      src/plugins/mch/image/myshop-notice.png
  44. BIN
      src/plugins/mch/image/myshop-order.png
  45. BIN
      src/plugins/mch/image/myshop-shop.png
  46. BIN
      src/plugins/mch/image/myshop-zc.png
  47. BIN
      src/plugins/mch/image/open.png
  48. BIN
      src/plugins/mch/image/order-list-refund.png
  49. BIN
      src/plugins/mch/image/search.png
  50. BIN
      src/plugins/mch/image/shop-all.png
  51. BIN
      src/plugins/mch/image/shop-cat.png
  52. BIN
      src/plugins/mch/image/shop-contact.png
  53. BIN
      src/plugins/mch/image/shop-home.png
  54. BIN
      src/plugins/mch/image/shop-kf.png
  55. BIN
      src/plugins/mch/image/shop-new.png
  56. BIN
      src/plugins/mch/image/shop-phone.png
  57. BIN
      src/plugins/mch/image/shop-price-less.png
  58. BIN
      src/plugins/mch/image/shop-price-plus.png
  59. BIN
      src/plugins/mch/image/shop-price.png
  60. BIN
      src/plugins/mch/image/shop-summary.png
  61. BIN
      src/plugins/mch/image/shop-wechat.png
  62. BIN
      src/plugins/mch/image/summary-address.png
  63. BIN
      src/plugins/mch/image/summary-blue.png
  64. BIN
      src/plugins/mch/image/summary-home.png
  65. BIN
      src/plugins/mch/image/summary-map.png
  66. BIN
      src/plugins/mch/image/summary-phone.png
  67. BIN
      src/plugins/mch/image/summary-synopsis.png
  68. BIN
      src/plugins/mch/image/summary-yw.png
  69. BIN
      src/plugins/mch/image/tel.png
  70. BIN
      src/plugins/mch/image/txt.png
  71. BIN
      src/plugins/mch/image/web-login.png
  72. 411 0
      src/plugins/mch/list/list.vue
  73. 180 0
      src/plugins/mch/mch/account-log/account-log.vue
  74. 237 0
      src/plugins/mch/mch/account/account.vue
  75. 1797 0
      src/plugins/mch/mch/add-goods/add-goods.vue
  76. 186 0
      src/plugins/mch/mch/cash-log/cash-log.vue
  77. 454 0
      src/plugins/mch/mch/cash/cash.vue
  78. 257 0
      src/plugins/mch/mch/change-add/change-add.vue
  79. 1101 0
      src/plugins/mch/mch/config/config.vue
  80. 321 0
      src/plugins/mch/mch/count/count.vue
  81. 202 0
      src/plugins/mch/mch/express/express.vue
  82. 296 0
      src/plugins/mch/mch/goods-attr-edit/goods-attr-edit.vue
  83. 807 0
      src/plugins/mch/mch/goods-attr-info/goods-attr-info.vue
  84. 432 0
      src/plugins/mch/mch/goods-attr/goods-attr.vue
  85. 566 0
      src/plugins/mch/mch/goods-detail/goods-detail.vue
  86. 706 0
      src/plugins/mch/mch/goods/goods.vue
  87. 281 0
      src/plugins/mch/mch/login/login.vue
  88. 358 0
      src/plugins/mch/mch/myshop/myshop.vue
  89. 438 0
      src/plugins/mch/mch/open-time/open-time.vue
  90. 1610 0
      src/plugins/mch/mch/order-detail/order-detail.vue
  91. 1827 0
      src/plugins/mch/mch/order/order.vue
  92. 140 0
      src/plugins/mch/mch/password/password.vue
  93. 104 0
      src/plugins/mch/mch/qrcode/qrcode.vue
  94. 422 0
      src/plugins/mch/mch/send/send.vue
  95. 142 0
      src/plugins/mch/mch/settle-detail/settle-detail.vue
  96. 99 0
      src/plugins/mch/mch/web-login/web-login.vue
  97. 692 0
      src/plugins/mch/shop/shop.vue
  98. 235 0
      src/plugins/mch/summary/summary.vue
  99. 6 0
      src/store/modules/user.js

+ 13 - 4
src/components/page-component/app-user-center-top/app-user-center-top.vue

xqd
@@ -261,10 +261,19 @@
 						</view>
 						<!--#ifdef MP-WEIXIN -->
 							<image v-if="isRealname" style="width: 96rpx;height: 31rpx;margin-left: 14rpx;" src="https://t17.9026.com/web/statics/image/index/ysm.png" mode=""></image>
-						<button class="u-refresh dir-left-nowrap main-between cross-center member-margin"
-							open-type="getUserInfo" @getAuthorize="getUserInfo" @click="getUserInfo">
-							<icon class="u-icon" type></icon>
-							<text>刷新</text>
+						<button class="u-refresh dir-left-nowrap main-between cross-center " v-if="canIUseGetUserProfile"
+						open-type="getUserInfo"
+								@click="getUserInfoClick"
+								>
+						    <icon class="u-icon" type></icon>
+						    <text>刷新</text>
+						</button>
+						<button class="u-refresh dir-left-nowrap main-between cross-center " v-else open-type="getUserInfo"
+						        @getAuthorize="getUserInfo"
+						        @getuserinfo="getUserInfo"
+								>
+						    <icon class="u-icon" type></icon>
+						    <text>刷新</text>
 						</button>
 						<!-- #endif-->
 						<!--#ifdef  H5 -->

+ 173 - 172
src/pages.json

xqd
@@ -1124,178 +1124,179 @@
 				}
 			]
 		},
-		// {
-		// 	"root": "plugins/mch",
-		// 	"pages": [{
-		// 			"path": "apply/apply"
-		// 		},
-		// 		{
-		// 			"path": "cat/cat",
-		// 			"style": {
-		// 				"navigationBarTitleText": "店铺分类"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "goods/goods",
-		// 			"style": {
-		// 				"navigationBarTitleText": "商品详情"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "list/list",
-		// 			"style": {
-		// 				"navigationBarTitleText": "好店推荐"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "shop/shop"
-		// 		},
-		// 		{
-		// 			"path": "summary/summary",
-		// 			"style": {
-		// 				"navigationBarTitleText": "店铺简介"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/login/login",
-		// 			"style": {
-		// 				"navigationBarTitleText": "商家登录"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/myshop/myshop"
-		// 		},
-		// 		{
-		// 			"path": "mch/account/account",
-		// 			"style": {
-		// 				"navigationBarTitleText": "资产"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/account-log/account-log",
-		// 			"style": {
-		// 				"navigationBarTitleText": "交易记录"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/settle-detail/settle-detail"
-		// 		},
-		// 		{
-		// 			"path": "mch/cash-log/cash-log",
-		// 			"style": {
-		// 				"navigationBarTitleText": "提现记录"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/cash/cash",
-		// 			"style": {
-		// 				"navigationBarTitleText": "提现申请"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/count/count",
-		// 			"style": {
-		// 				"navigationBarTitleText": "数据统计"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/config/config",
-		// 			"style": {
-		// 				"navigationBarTitleText": "店铺管理"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/password/password",
-		// 			"style": {
-		// 				"navigationBarTitleText": "修改密码"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/web-login/web-login",
-		// 			"style": {
-		// 				"navigationBarTitleText": "登录网页端"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/qrcode/qrcode",
-		// 			"style": {
-		// 				"navigationBarTitleText": "店铺二维码"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/goods/goods",
-		// 			"style": {
-		// 				"navigationBarTitleText": "商品管理"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/add-goods/add-goods",
-		// 			"style": {
-		// 				"navigationBarTitleText": "添加商品"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/goods-detail/goods-detail",
-		// 			"style": {
-		// 				"navigationBarTitleText": "商品详情图"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/order/order",
-		// 			"style": {
-		// 				"navigationBarTitleText": "订单管理"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/order-detail/order-detail",
-		// 			"style": {
-		// 				"navigationBarTitleText": "订单详情"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/send/send",
-		// 			"style": {
-		// 				"navigationBarTitleText": "发货"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/express/express",
-		// 			"style": {
-		// 				"navigationBarTitleText": "快递信息"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/change-add/change-add",
-		// 			"style": {
-		// 				"navigationBarTitleText": "修改地址"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/goods-attr/goods-attr",
-		// 			"style": {
-		// 				"navigationBarTitleText": "商品规格"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/goods-attr-edit/goods-attr-edit",
-		// 			"style": {
-		// 				"navigationBarTitleText": "规格值编辑"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/goods-attr-info/goods-attr-info",
-		// 			"style": {
-		// 				"navigationBarTitleText": "规格明细"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "mch/open-time/open-time",
-		// 			"style": {
-		// 				"navigationBarTitleText": "设置时间段"
-		// 			}
-		// 		}
-		// 	]
-		// },
+		{
+			"root": "plugins/mch",
+			"pages": [{
+					"path": "apply/apply"
+				},
+				{
+					"path": "cat/cat",
+					"style": {
+						"navigationBarTitleText": "店铺分类"
+					}
+				},
+				{
+					"path": "goods/goods",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"navigationStyle": "custom"
+					}
+				},
+				{
+					"path": "list/list",
+					"style": {
+						"navigationBarTitleText": "好店推荐"
+					}
+				},
+				{
+					"path": "shop/shop"
+				},
+				{
+					"path": "summary/summary",
+					"style": {
+						"navigationBarTitleText": "店铺简介"
+					}
+				},
+				{
+					"path": "mch/login/login",
+					"style": {
+						"navigationBarTitleText": "商家登录"
+					}
+				},
+				{
+					"path": "mch/myshop/myshop"
+				},
+				{
+					"path": "mch/account/account",
+					"style": {
+						"navigationBarTitleText": "资产"
+					}
+				},
+				{
+					"path": "mch/account-log/account-log",
+					"style": {
+						"navigationBarTitleText": "交易记录"
+					}
+				},
+				{
+					"path": "mch/settle-detail/settle-detail"
+				},
+				{
+					"path": "mch/cash-log/cash-log",
+					"style": {
+						"navigationBarTitleText": "提现记录"
+					}
+				},
+				{
+					"path": "mch/cash/cash",
+					"style": {
+						"navigationBarTitleText": "提现申请"
+					}
+				},
+				{
+					"path": "mch/count/count",
+					"style": {
+						"navigationBarTitleText": "数据统计"
+					}
+				},
+				{
+					"path": "mch/config/config",
+					"style": {
+						"navigationBarTitleText": "店铺管理"
+					}
+				},
+				{
+					"path": "mch/password/password",
+					"style": {
+						"navigationBarTitleText": "修改密码"
+					}
+				},
+				{
+					"path": "mch/web-login/web-login",
+					"style": {
+						"navigationBarTitleText": "登录网页端"
+					}
+				},
+				{
+					"path": "mch/qrcode/qrcode",
+					"style": {
+						"navigationBarTitleText": "店铺二维码"
+					}
+				},
+				{
+					"path": "mch/goods/goods",
+					"style": {
+						"navigationBarTitleText": "商品管理"
+					}
+				},
+				{
+					"path": "mch/add-goods/add-goods",
+					"style": {
+						"navigationBarTitleText": "添加商品"
+					}
+				},
+				{
+					"path": "mch/goods-detail/goods-detail",
+					"style": {
+						"navigationBarTitleText": "商品详情图"
+					}
+				},
+				{
+					"path": "mch/order/order",
+					"style": {
+						"navigationBarTitleText": "订单管理"
+					}
+				},
+				{
+					"path": "mch/order-detail/order-detail",
+					"style": {
+						"navigationBarTitleText": "订单详情"
+					}
+				},
+				{
+					"path": "mch/send/send",
+					"style": {
+						"navigationBarTitleText": "发货"
+					}
+				},
+				{
+					"path": "mch/express/express",
+					"style": {
+						"navigationBarTitleText": "快递信息"
+					}
+				},
+				{
+					"path": "mch/change-add/change-add",
+					"style": {
+						"navigationBarTitleText": "修改地址"
+					}
+				},
+				{
+					"path": "mch/goods-attr/goods-attr",
+					"style": {
+						"navigationBarTitleText": "商品规格"
+					}
+				},
+				{
+					"path": "mch/goods-attr-edit/goods-attr-edit",
+					"style": {
+						"navigationBarTitleText": "规格值编辑"
+					}
+				},
+				{
+					"path": "mch/goods-attr-info/goods-attr-info",
+					"style": {
+						"navigationBarTitleText": "规格明细"
+					}
+				},
+				{
+					"path": "mch/open-time/open-time",
+					"style": {
+						"navigationBarTitleText": "设置时间段"
+					}
+				}
+			]
+		},
 		{
 			"root": "plugins/book",
 			"pages": [{

+ 37 - 14
src/pages/case/appointment/appointment-form.vue

xqd xqd xqd xqd
@@ -57,7 +57,7 @@
 			<view class="item main-between cross-center">
 				<view class="hjx-ts-28 hjx-tw-600 hjx-tc-000">到访时间</view>
 				<view>
-					<picker mode="time" :value="time" start="09:01" end="21:01" @change="bindTimeChange">
+					<picker mode="time" :value="time" :start="startTime" :end="endTime" @change="bindTimeChange">
 						<view class="cross-center hjx-ts-28"
 							:class="{'hjx-tc-999':time=='请选择'?true:false,'hjx-tc-000':time!='请选择'?true:false}">{{time}}
 							<image style="width: 12.8rpx;height: 22.8rpx;margin-left: 20rpx;"
@@ -81,10 +81,10 @@
 		},
 		computed: {
 			startDate() {
-				return this.getDate('start');
+				return this.getDate(1,this.dataDetail.begin_time);
 			},
 			endDate() {
-				return this.getDate('end');
+				return this.getDate(1,this.dataDetail.end_time);
 			}
 		},
 		data() {
@@ -97,9 +97,29 @@
 				username: '',
 				mobile: '',
 				time: '请选择',
-				date: '请选择'
+				date: '请选择',
+				
+				startTime:'',
+				endTime:'',
 			};
 		},
+		watch:{
+			date(nVal,oVal){
+				if(nVal==this.startDate){
+					this.startTime=this.getDate(2,this.dataDetail.begin_time);
+				}else{
+					this.startTime='00:00'
+				}
+				if(nVal==this.endDate){
+					this.endTime=this.getDate(2,this.dataDetail.end_time);
+				}else{
+					this.endTime='23:59'
+				}
+				if(new Date('2007-2-2 '+this.time).getTime()<new Date('2007-2-2 '+this.startTime).getTime() || new Date('2007-2-2 '+this.time).getTime()>new Date('2007-2-2 '+this.endTime).getTime()){
+					this.time='请选择'
+				}
+			}
+		},
 		onLoad(option) {
 			this.visit_id=option.id
 			this.$request({
@@ -121,20 +141,23 @@
 			bindDateChange(e) {
 				this.date = e.target.value
 			},
-			getDate(type) {
-				const date = new Date();
+			getDate(type,val) {
+				const date = new Date(val);
 				let year = date.getFullYear();
 				let month = date.getMonth() + 1;
 				let day = date.getDate();
-
-				if (type === 'start') {
-					year = year - 60;
-				} else if (type === 'end') {
-					year = year + 2;
+				let hours=date.getHours();
+				let minutes=date.getMinutes();
+				if(type===1){
+					month = month > 9 ? month : '0' + month;
+					day = day > 9 ? day : '0' + day;
+					return `${year}-${month}-${day}`;
+				}else{
+					hours=hours>9?hours:'0'+hours;
+					minutes=minutes<10? '0'+minutes:minutes;
+					return `${hours}:${minutes}`;
 				}
-				month = month > 9 ? month : '0' + month;
-				day = day > 9 ? day : '0' + day;
-				return `${year}-${month}-${day}`;
+				
 			},
 			goAppointment() {
 				if(!this.username){

+ 4 - 4
src/pages/case/appointment/appointment-list.vue

xqd
@@ -9,17 +9,17 @@
 				<view class="main-between pl" >
 					<view class="main-between-y">
 						<view class="title t-omit">{{item.name}}</view>
-						<view class="desc t-omit">活动时间:{{`${item.begin_time}-${item.end_time}`}}</view>
+						<view class="desc t-omit" :style="{width: is_myself===0?'':'100%'}">活动时间:{{`${item.begin_time}-${item.end_time}`}}</view>
 					</view>
-					<view class="right-bt">
+					<view v-if="is_myself===0" class="right-bt">
 						<view class="t-omit">{{item.num}}</view>
 						<view class="ee">名额仅剩</view>
 					</view>
 				</view>
 				<view class="line"></view>
 				<view class="main-between cross-center addr">
-					<view class="t-omit" style="width: 400rpx;">活动地点:{{item.address}}</view>
-					<button class="appointment-now" style="padding: 0;border-radius: 0;" size="mini" :style="{'background-color':getTheme.background}">去预约</button>
+					<view class="t-omit" :style="{width: is_myself===0?'400rpx':'100%'}">活动地点:{{item.address}}</view>
+					<button v-if="is_myself===0" class="appointment-now" style="padding: 0;border-radius: 0;" size="mini" :style="{'background-color':getTheme.background}">{{item.is_already_appoint==1?'已预约':'去预约'}}</button>
 				</view>
 			</view>
 			<appNoData v-if="VisitList.length===0" :title="'暂无预约'"></appNoData>

+ 8 - 1
src/pages/case/appointment/appointment.vue

xqd xqd
@@ -109,7 +109,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="noMake cross-center" v-if="!is_myself"><button type="default" @tap="goAppointment">立即预约</button></view>
+		<view class="noMake cross-center" v-if="!is_myself"><button type="default" @tap="goAppointment">{{dataDetail.is_already_appoint==1?'已预约':'立即预约'}}</button></view>
 	</view>
 </template>
 
@@ -147,6 +147,13 @@ export default {
 			this.swiperKey = e.detail.current;
 		},
 		goAppointment() {
+			if(this.dataDetail.is_already_appoint==1){
+			uni.showToast({
+				title:'您已预约该活动',
+				icon:'none'
+			})
+			return
+			}
 			uni.navigateTo({
 				url: '/pages/case/appointment/appointment-form?id='+this.dataDetail.id
 			});

+ 3 - 0
src/pages/goods/list.vue

xqd xqd
@@ -49,12 +49,14 @@
                 noGoods: false,
                 loading: false,
                 sign: '',
+				mch_id:'',
             }
         },
 	    onLoad(options) { this.$commonLoad.onload(options);
             if(options.cat_id > 0) {
                 this.cat_id = options.cat_id;
             }
+			'mch_id' in options ?this.mch_id=options.mch_id:''
             if(options.coupon_id > 0) {
                 this.coupon_id = options.coupon_id
             }
@@ -122,6 +124,7 @@
                         keyword: '',
                         coupon_id: this.coupon_id,
                         sign: this.sign,
+						mch_id:this.mch_id
 	                }
                 });
                 if (res.code === 0) {

+ 1 - 1
src/pages/sale/mySaleOrder.vue

xqd
@@ -86,7 +86,7 @@
 						<view class="date">{{item.updated_at.split(' ')[0]}}</view>
 						<view class="main-around">
 							<!-- <view class="kbtn">上传发票</view> -->
-							<view class="kbtn">再次购买</view>
+							<view class="kbtn" @click="$jump({'open_type':'navigate','url':item.sign=='composition'?'/pages/case/projectInfo':'/pages/goods/goods'})">再次购买</view>
 							
 							<view class="kbtn" v-if="item.status>1" @click="$jump({open_type:'navigate',url:'/pages/order/express-detail/express-detail'})">查看物流</view>
 						</view>

+ 12 - 17
src/pages/sale/sale-user-center.vue

xqd xqd xqd xqd
@@ -89,6 +89,7 @@
 	import {
 		mapGetters,
 		mapState,
+		mapActions
 	} from 'vuex';
 	import AppUserCenterTop from '../../components/page-component/app-user-center-top/app-user-center-top.vue';
 	import AppCopyright from '../../components/page-component/app-copyright/app-copyright.vue';
@@ -139,13 +140,6 @@
 						name: "我的消息",
 						open_type: "navigate",
 					},
-					// {
-					// 	icon_url: "https://t17.9026.com/web/statics/image/index/m.png",
-					// 	key: "pintuan",
-					// 	link_url: "",
-					// 	name: "我的身份码",
-					// 	open_type: "navigate",
-					// },
 					{
 						icon_url: "https://t17.9026.com/web/statics/image/index/kf.png",
 						key: "pintuan",
@@ -159,6 +153,13 @@
 						link_url: "/pages/index/index",
 						name: "用户端",
 						open_type: "reLaunch",
+					},
+					{
+						icon_url: "https://t17.9026.com/web/statics/image/sale/sale_home.png",
+						key: "",
+						link_url: "",
+						name: "退出销售端",
+						open_type: "reLaunch",
 					}
 				]
 			}
@@ -364,27 +365,21 @@
 			// #ifdef H5
 			this.$jwx.config();
 			// #endif
-			if(!this.info.salesperson_info){
-				uni.redirectTo({
-					url:'/pages/sale/sale_login/sale_login'
-				})
-			}
 		},
-		onShow() {
+		async onShow() {
 			this.$event.on(this.$const.EVENT_USER_LOGIN).then(() => {
 				uni.redirectTo({
 					url: `/pages/user-center/user-center`
 				});
-			});
-			// if (this.$user.isLogin()) {
-			    this.$store.dispatch('user/refresh');
-			// }
+			})
+			this.refresh()
 			this.$nextTick().then(() => {
 				this.$store.dispatch('userCenter/data');
 				this.$store.dispatch('user/isEnterSales',true);
 			});
 		},
 		methods: {
+			...mapActions('user',['refresh']),
 			// #ifdef H5
 			routerGo() {
 				uni.navigateTo({

+ 33 - 14
src/pages/sale/sale_login/sale_login.vue

xqd xqd
@@ -23,7 +23,7 @@
 </template>
 
 <script>
-	import {mapGetters} from 'vuex'
+	import {mapGetters,mapActions} from 'vuex'
 	export default {
 		data() {
 			return {
@@ -37,26 +37,45 @@
 			}),
 		},
 		methods:{
-			login(){
-				this.$request({
+			...mapActions('user',['refresh']),
+		 async login(){
+			 if(!this.$validation.mobile(this.account)){
+				 uni.showToast({
+				 	title:'手机号不合法',
+				 	icon:'none'
+				 })
+				 return
+			 }
+			 if(!this.password){
+				 uni.showToast({
+				 	title:'密码不能为空',
+				 	icon:'none'
+				 })
+				 return
+			 }
+				let loginRes=await this.$request({
 				    url: this.$api.sale.sale_login,
 				    data: {
 				        account:this.account,
 						password:this.password
 				    },
 				    method:'post'
-				}).then(res=>{
-					if(res.code===0){
-						uni.reLaunch({
-							url:'/pages/sale/sale-user-center'
-						})
-					}else{
-						uni.showToast({
-							title:res.msg,
-							icon:'none'
-						})
-					}
 				})
+				console.log(loginRes)
+				if(loginRes.code===0){
+					console.log('111')
+					await this.refresh()
+					console.log('userRes')
+					console.log('222')
+					uni.reLaunch({
+						url:'/pages/sale/sale-user-center'
+					})
+				}else{
+					uni.showToast({
+						title:loginRes.msg,
+						icon:'none'
+					})
+				}
 				
 			},
 			forgetPwd(){

+ 0 - 2
src/pages/user-center/user-center.vue

xqd xqd
@@ -5,7 +5,6 @@
 			background-color=""></app-nav-bar>
         <app-user-center-top
             :top-style="4"
-            
             :member-pic-url="userCenter.member_pic_url"
             :is_icon_super_vip="is_icon_super_vip"
             user-name-color="#262626"
@@ -334,7 +333,6 @@
             // #ifdef H5
             this.$jwx.config();
             // #endif
-			console.log('查看',this)
         },
         onShow() {
             this.$event.on(this.$const.EVENT_USER_LOGIN).then(() => {

+ 717 - 0
src/plugins/mch/apply/apply.vue

xqd
@@ -0,0 +1,717 @@
+<template>
+    <app-layout>
+        <view v-if="status === -1 || form_status">
+            <view class="apply-com">基本信息</view>
+            <view class="white">
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">联系人</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="realname"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="realname"
+                               :value="form.realname"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">联系电话</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="mobile"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="mobile"
+                               :value="form.mobile"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">微信号</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="wechat"
+                               placeholder="请填写微信号"
+                               placeholder-class="plugins-mch-apply-input"
+                               name="wechat"
+                               :value="form.wechat"/>
+                    </view>
+                </view>
+            </view>
+
+            <view class="apply-com">账号信息</view>
+            <view class="white">
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">账号</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="username"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="username"
+                               :value="form.username"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">密码</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               password
+                               data-type="password"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="password"
+                               :value="form.password"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">确认密码</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               password
+                               data-type="checkPass"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="checkPass"
+                               :value="form.checkPass"/>
+                    </view>
+                </view>
+            </view>
+
+            <view class="apply-com">店铺信息</view>
+            <view class="white">
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">店铺名称</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="name"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="name"
+                               :value="form.name"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">所在地区</view>
+                    <view class="box-grow-1 area-left">
+                        <app-area-picker @customevent="areaEvent"
+                                         :ids="[area.province_id, area.city_id, area.district_id]"></app-area-picker>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">详细地址</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="address"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="address"
+                               :value="form.address"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">客服电话</view>
+                    <view class="box-grow-1">
+                        <input @input="applyInput"
+                               :disabled="form_status && status !== 2"
+                               data-type="service_mobile"
+                               placeholder-class="plugins-mch-apply-input"
+                               placeholder="必填"
+                               name="service_mobile"
+                               :value="form.service_mobile"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center form-input">
+                    <view class="box-grow-0 form-label main-right">所售类目</view>
+                    <view class="box-grow-1">
+                        <picker :disabled="form_status && status !== 2"
+                                :range="category_list" range-key="name" class="category-picker"
+                                :value="form.mch_common_cat_id" @change="categoryChange">
+                            <view class="cross-center dir-left-nowrap category-info">
+                                <view class="box-grow-1 category-select">
+                                    {{form.mch_common_cat_str?form.mch_common_cat_str:`请选择`}}
+                                </view>
+                                <view class="box-grow-0 cross-center">
+                                    <icon class="icon-arrow-right" type></icon>
+                                </view>
+                            </view>
+                        </picker>
+                    </view>
+                </view>
+            </view>
+
+            <block v-if="form_data && form_data.length && (setting.status === '1' || status >= 0)">
+                <!-- 自定义表单-->
+                <app-diy-form title="其他信息" :list="form_data" sign="mch" @input="hangleForm"
+                              @validate="validateForm"></app-diy-form>
+            </block>
+
+            <block v-if="!form_status || status === 2">
+                <view class="dir-left-nowrap cross-center rules-box">
+                    <view v-if="rulesStatus" class="icon" @click="rulesTap(false)">
+                        <view class="icon-true" type></view>
+                    </view>
+                    <view v-else class="icon" @click="rulesTap(true)">
+                        <view class="icon-false" type></view>
+                    </view>
+                    <view class="block">我已阅读并同意</view>
+                    <view @click="navApplyRules" class="blue">《入驻协议》</view>
+                </view>
+                <view class="main-center submit-btn" v-if="status === -1 || status === 2">
+                    <app-button @click="formSubmit" height="80" width="702" font-size="32" background="#ff4544"
+                                color="#FFFFFF" round>提交
+                    </app-button>
+                </view>
+            </block>
+
+            <view v-if="form_status" class="cross-center dir-top-nowrap main-center">
+                <view @click="closeForm" class="result-title">查看审核结果</view>
+                <view @click="navHome" class="result-home">返回首页</view>
+            </view>
+        </view>
+
+        <!-- STATUS -->
+        <block v-if="status >=0 && !form_status">
+            <view class="dir-top-nowrap main-center cross-center">
+                <view class="main-center form-img">
+                    <image v-if="status === 0" :src="appImg.load"></image>
+                    <image v-else-if="status === 1" :src="appImg.success"></image>
+                    <image v-else-if="status === 2" :src="appImg.error"></image>
+                </view>
+                <view class="status-title">
+                    <view v-if="status === 0">待审核</view>
+                    <view v-else-if="status === 1">审核通过</view>
+                    <view v-else-if="status === 2">审核失败</view>
+                </view>
+                <view class="status-content">
+                    <view v-if="status === 0">您的信息已提交,请耐心等待审核。</view>
+                    <block v-else-if="status === 2">
+                        <view v-if="mch.review_remark">{{mch.review_remark}}</view>
+                        <view v-else>您的信息填写不完整,请重新填写</view>
+                    </block>
+                </view>
+                <view v-if="status === 2" class="status-new main-center">
+                    <app-button @click="openForm" height="80" width="560" background="#FF4544" color="#FFFFFF"
+                                font-size="32" round>重新申请
+                    </app-button>
+                </view>
+                <view v-else class="status-submit" @click="openForm">查看提交内容</view>
+            </view>
+        </block>
+
+    </app-layout>
+</template>
+
+<script>
+import {mapState} from 'vuex';
+import appAreaPicker from '../../../components/page-component/app-area-picker/app-area-picker';
+import appDiyForm from '../../../components/page-component/app-diy-form/app-diy-form';
+
+export default {
+    name: "apply",
+    components: {appAreaPicker, appDiyForm},
+    computed: {
+        ...mapState({
+            appImg: state => state.mallConfig.plugin.mch.app_image,
+        }),
+    },
+    data() {
+        return {
+            mch_id: -1,
+                category_list: [],
+                express_list: null,
+                form_data: null,
+                form_status: false,
+                rulesStatus: false,
+                area: {
+                    province_id: 0,
+                    city_id: 0,
+                    district_id: 0,
+                },
+                setting: {},
+                status: -2,
+                form: {
+                    realname: '',
+                    mobile: '',
+                    wechat: '',
+                    username: '',
+                    password: '',
+                    checkPass: '',
+                    address: '',
+                    name: '',
+                    service_mobile: '',
+                    mch_common_cat_str: '',
+                    mch_common_cat_id: 0,
+                },
+                formStatus: {
+                    errors: [],
+                    hasError: false,
+                },
+                submit_status: false,
+                template_message_list: null,
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+            this.getCategory();
+        },
+
+        methods: {
+            hangleForm({data}) {
+                this.form.form_data = data;
+            },
+            navApplyRules() {
+                // uni.navigateTo({url: `/plugins/mch/apply_rules/apply_rules`});
+                uni.navigateTo({
+                    url: `/pages/rules/index?url=${encodeURIComponent(this.$api.mch.setting)}&keys=${JSON.stringify(['setting', 'desc'])}`,
+                });
+            },
+            navHome() {
+                uni.navigateTo({url: `/pages/index/index`});
+            },
+            loadData: function () {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.mch_status,
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        self.mch = info.data.mch;
+                        self.status = self.mch ? self.mch.review_status : -1;
+                        self.template_message_list = info.data.template_message_list;
+                        if (self.mch) {
+                            self.formInfo(self.mch.id);
+                            if (self.mch.status == 1) {
+                                //缓存
+                                this.$storage.setStorageSync("MCH2019", info.data);
+                            }
+                        } else {
+                            self.getSetting();
+                        }
+                    }
+                }).catch(e => {
+                    self.$hideLoading();
+                })
+            },
+
+            //FUNCTION
+            getCategory: function () {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.category,
+                    data: {
+                        id: self.mch_id,
+                    }
+                }).then(info => {
+                    if (info.code === 0) {
+                        self.category_list = info.data.list;
+                        self.loadData();
+                    }
+                });
+            },
+
+            getExpress: function () {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.express_list,
+                }).then(info => {
+                    if (info.code === 0) {
+                        self.express_list = info.data.list;
+                    }
+                });
+            },
+
+            getSetting: function () {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.setting,
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        self.setting = info.data.setting;
+                        self.form_data = info.data.setting.form_data;
+                    }
+                });
+            },
+
+            //INFO
+            formInfo(mch_id) {
+                const self = this;
+                self.getExpress();
+
+                self.$request({
+                    url: self.$api.mch.detail,
+                    data: {
+                        id: mch_id,
+                        is_review_status: 1,
+                    }
+                }).then(info => {
+                    if (info.code === 0) {
+                        const detail = info.data.detail;
+
+                        let mch_common_cat_str = '';
+                        self.category_list.forEach(v => {
+                            if (v.id == detail.mch_common_cat_id)
+                                mch_common_cat_str = v.name
+                        });
+
+                        if (self.status === 2) {
+                            self.getSetting();
+                        }
+
+                        //表单处理
+                        if (self.status === 0 || self.status === 1) {
+                            let form_data = [];
+                            if (detail.form_data && detail.form_data.length) {
+                                detail.form_data.map(v => {
+                                    let list = [];
+                                    if (v.key === 'checkbox') {
+                                        v.value = v.value ? v.value: [];
+                                        v.value.map(v => {
+                                            list.push({label: v});
+                                        })
+                                    }
+                                    if (v.key === 'radio') {
+                                        list.push({label: v.value});
+                                    }
+                                    form_data.push({
+                                        key: v.key,
+                                        name: v.key_name,
+                                        default: v.value,
+                                        is_required: v.required,
+                                        img_type: v.img_type,
+                                        list: list,
+                                    })
+                                });
+                            }
+                            self.form_data = form_data;
+                        }
+
+                        self.form = {
+                            mch_id: detail.id,
+                            realname: detail.realname,
+                            mobile: detail.mobile,
+                            wechat: detail.wechat,
+                            username: detail.mchUser.username,
+                            password: '000000',
+                            checkPass: '000000',
+                            address: detail.store.address,
+                            name: detail.store.name,
+                            service_mobile: detail.store.mobile,
+                            mch_common_cat_str: mch_common_cat_str,
+                            mch_common_cat_id: detail.mch_common_cat_id,
+                        };
+
+                        self.area = {
+                            province_id: detail.store.province_id,
+                            city_id: detail.store.city_id,
+                            district_id: detail.store.district_id,
+                        };
+                    }
+                });
+            },
+
+            //INPUT
+            applyInput: function (e) {
+                let name = e.currentTarget.dataset.type;
+                this.form[name] = e.detail.value;
+            },
+
+            categoryChange(e) {
+                const item = this.category_list[e.detail.value];
+
+                this.form.mch_common_cat_id = item.id;
+                this.form.mch_common_cat_str = item.name;
+            },
+
+            //地址处理
+            areaEvent(data) {
+                if (data) {
+                    this.area.province_id = data.province.id;
+                    this.area.city_id = data.city.id;
+                    this.area.district_id = data.district.id;
+                }
+            },
+
+            validateForm: function ({result}) {
+                this.formStatus = result;
+            },
+            subscribe(callback) {
+                this.$subscribe(this.template_message_list).then(() => {
+                    callback();
+                }).catch(() => {
+                    callback();
+                });
+            },
+            //SUBMIT
+            formSubmit: function () {
+                const self = this;
+                let form = self.form;
+                let area = self.area;
+                let rulesStatus = self.rulesStatus;
+
+                let content = function () {
+                    if (!rulesStatus) {
+                        return '请同意入驻协议';
+                    }
+                    if (!form.realname) {
+                        return "联系人不能为空";
+                    }
+                    if (!form.mobile) {
+                        return "联系电话不能为空";
+                    }
+                    if (!form.username) {
+                        return "账号不能为空";
+                    }
+                    if (!form.password) {
+                        return "密码不能为空";
+                    }
+                    if (!form.mch_common_cat_id) {
+                        return "类目不能为空";
+                    }
+                    if (form.password !== form.checkPass) {
+                        return "密码不一致";
+                    }
+                    if (!form.name) {
+                        return "店铺名称不能为空";
+                    }
+                    if (self.formStatus.hasError) {
+                        return self.formStatus.errors[0].msg;
+                    }
+                    if (self.submit_status) {
+                        return "提交中";
+                    }
+                    return false;
+                }();
+
+                if (content) {
+                    uni.showToast({title: content, icon: 'none'});
+                    return;
+                }
+                self.subscribe(() => {
+                    self.$showLoading({text: `提交中`});
+                    self.submit_status = true;
+                    self.$request({
+                        url: self.$api.mch.apply,
+                        data: {
+                            id: form.mch_id ? form.mch_id : 0,
+                            realname: form.realname,
+                            mobile: form.mobile,
+                            wechat: form.wechat,
+                            username: form.username,
+                            password: form.password,
+                            name: form.name,
+                            province_id: area.province_id,
+                            city_id: area.city_id,
+                            district_id: area.district_id,
+                            mch_common_cat_id: form.mch_common_cat_id,
+                            address: form.address,
+                            service_mobile: form.service_mobile,
+                            form_data: form.form_data ? JSON.stringify(form.form_data) : JSON.stringify([]),
+                            is_update_apply: self.status === 2 ? 1 : 0,
+                        },
+                        method: 'POST',
+                    }).then(info => {
+                        self.submit_status = false;
+                        self.$hideLoading();
+                        if (info.code === 0) {
+                            self.loadData();
+                            self.form_status = false;
+                        } else {
+                            uni.showToast({title: info.msg, icon: 'none'});
+                        }
+                    }).catch(e => {
+                        self.submit_status = false;
+                    })
+                })
+            },
+
+            rulesTap: function (status) {
+                this.rulesStatus = status;
+            },
+
+            closeForm() {
+                this.form_status = false;
+            },
+
+            openForm() {
+                this.form_status = true;
+            },
+        }
+    }
+</script>
+
+<style lang="scss">
+    .plugins-mch-apply-input {
+        color: #bbb;
+        font-size: #{28rpx};
+    }
+</style>
+<style scoped lang="scss">
+    .apply-com {
+        padding-top: #{30rpx};
+        padding-left: #{24rpx};
+        height: #{72rpx};
+        color: #999;
+        font-size: #{26rpx};
+        background: #f7f7f7;
+        width: 100%;
+    }
+
+    .white {
+        background: #FFFFFF;
+
+        .form-input {
+            margin: 0 #{24rpx};
+            border-bottom: 1px solid #e2e2e2;
+            height: #{100rpx}
+        }
+
+        input {
+            height: 100%;
+            padding: 0 #{32rpx};
+            color: #666666;
+            font-size: #{28rpx};
+        }
+
+        .form-label {
+            padding-left: #{3rpx};
+            font-size: #{28rpx};
+            color: #353535;
+            min-width: #{125rpx};
+        }
+
+        > view:last-child {
+            border-bottom: none;
+        }
+
+        .icon-arrow-right {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png");
+            height: #{22rpx};
+            width: #{12rpx};
+            background-size: 100% auto;
+            background-repeat: no-repeat;
+        }
+
+        .area-left {
+            padding-left: #{32rpx};
+            text-align: right;
+            margin-left: auto;
+        }
+
+        .category-picker {
+            height: 100%;
+            width: 100%;
+        }
+
+        .category-info {
+            height: 100%;
+            width: 100%;
+            min-height: #{98rpx};
+        }
+
+        .category-select {
+            font-size: #{28rpx};
+            color: #666666;
+            text-align: right;
+            padding-right: #{24rpx};
+        }
+    }
+
+    .rules-box {
+        background: #f7f7f7;
+        margin: #{32rpx} #{24rpx};
+        font-size: #{28rpx};
+
+        .icon {
+            height: #{32rpx};
+            width: #{32rpx};
+            margin-right: #{16rpx};
+        }
+
+        .icon-true {
+            height: #{32rpx};
+            width: #{32rpx};
+            background-repeat: no-repeat;
+            background-image: url("../image/apply-ok.png");
+            background-size: 100% 100%;
+        }
+
+        .icon-false {
+            height: #{32rpx};
+            width: #{32rpx};
+            background-repeat: no-repeat;
+            background-image: url("../image/apply-er.png");
+            background-size: 100% 100%;
+        }
+
+        .block {
+            color: #353535;
+        }
+
+        .blue {
+            color: #5292ed;
+        }
+    }
+
+    .submit-btn {
+        margin-top: #{52rpx - 32rpx};
+        margin-bottom: #{24rpx};
+    }
+
+    .result-title {
+        color: #387ee8;
+        font-size: #{28rpx};
+        margin-top: #{32rpx};
+    }
+
+    .result-home {
+        color: #666;
+        font-size: #{28rpx};
+        padding: #{24rpx};
+    }
+
+    .form-img {
+        width: 100%;
+        margin-top: #{150rpx};
+        margin-bottom: #{72rpx};
+
+        image {
+            height: #{270rpx};
+            width: #{380rpx};
+        }
+    }
+
+    .status-title {
+        font-size: #{36rpx};
+        color: #666666;
+    }
+
+    .status-content {
+        margin-top: #{24rpx};
+        color: #666666;
+        width: #{560rpx};
+
+        view {
+            text-align: center;
+        }
+    }
+
+    .status-new {
+        margin-top: #{88rpx};
+    }
+
+    .status-submit {
+        color: #5292ed;
+        font-size: #{28rpx};
+        margin-top: #{66rpx};
+    }
+</style>

+ 520 - 0
src/plugins/mch/cat/cat.vue

xqd
@@ -0,0 +1,520 @@
+<template>
+    <view class="app-layout">
+        <app-layout>
+            <template v-if="cat_style === `1`">
+                <view class="app-body dir-top-nowrap">
+                    <view class="app-item" v-for="(item, index) in list" :key="index">
+                        <app-jump-button 
+                            form 
+                            open_type="navigate" 
+                            :url="item.page_url"
+                        >
+                            <view class="app-image" 
+                                :style="{backgroundImage: `url(${item.big_pic_url})`}"
+                            ></view>
+                        </app-jump-button>
+                    </view>
+                </view>
+            </template>
+            <template v-else-if="cat_style === `2`">
+                <view class="app-left-right dir-left-nowrap">
+                    <app-category-list 
+                        @click="activeThree" 
+                        :windowHeight="windowHeight" 
+                        :windowWidth="windowWidth"
+                        :botHeight="botHeight" 
+                        :height="height" 
+                        :noSetHeight="setHeight"
+                        :list="list"
+                    ></app-category-list>
+                    <scroll-view scroll-y class="app-right" :style="{height: `${setHeight}`}" style="padding-top:20rpx">
+                        <image class="app-background" :src="list[activeIndex].advert_pic"
+                               v-if="list[activeIndex].advert_pic"></image>
+                        <view class="app-item" v-for="(item, index) in list[activeIndex].child" :key="index">
+                            <app-jump-button form open_type="navigate" :url="item.page_url">
+                                <image :src="item.big_pic_url" class="app-image"></image>
+                            </app-jump-button>
+                        </view>
+                    </scroll-view>
+                </view>
+            </template>
+            <template v-else-if="cat_style === `3`">
+                <view class="app-small dir-left-wrap">
+                    <view class="app-item" v-for="(item, index) in list" :key="index">
+                        <app-jump-button arrangement="column" form open_type="navigate" :url="item.page_url">
+                            <image class="app-image" :src="item.pic_url"></image>
+                            <text class="app-name" style="text-align: center">{{item.name}}</text>
+                        </app-jump-button>
+                    </view>
+                </view>
+            </template>
+            <template v-else-if="cat_style === `4`">
+                <view class="app-left-right-t dir-left-nowrap">
+                    <app-category-list :windowHeight="windowHeight" :windowWidth="windowWidth" :botHeight="botHeight"
+                                       @click="activeThree" :height="height" :noSetHeight="setHeight"
+                                       :list="list"></app-category-list>
+                    <scroll-view scroll-y class="app-right" :style="{height: `${setHeight}`}"
+                                 style="padding-top: 20rpx">
+                        <image class="app-background" :src="list[activeIndex].advert_pic"
+                               v-if="list[activeIndex].advert_pic"></image>
+                        <view class="app-item" v-for="(item, index) in list[activeIndex].child" :key="index">
+                            <app-jump-button arrangement="column" form open_type="navigate" :url="item.page_url">
+                                <image :src="item.pic_url" class="app-image"></image>
+                                <text class="app-name">{{item.name}}</text>
+                            </app-jump-button>
+                        </view>
+                    </scroll-view>
+                </view>
+            </template>
+            <template v-else-if="cat_style === `6`">
+                <view class="app-left-right-f dir-left-nowrap">
+                    <app-category-list :windowHeight="windowHeight" :windowWidth="windowWidth" :botHeight="botHeight"
+                                       @click="activeThree" :height="height" :noSetHeight="setHeight"
+                                       :list="list"></app-category-list>
+                    <scroll-view scroll-y class="app-right" :style="{height: `${setHeight}`}">
+                        <image class="app-background" :src="list[activeIndex].advert_pic"
+                               v-if="list[activeIndex].advert_pic"></image>
+                        <view class="app-item" v-for="(item, index) in list[activeIndex].child" :key="index">
+                            <view class="app-top">
+                                <app-jump-button arrangement="left" form open_type="navigate" :url="item.page_url">
+                                    <text class="app-text">{{item.name}}</text>
+                                    <view class="app-icon dir-left-nowrap cross-center">
+                                        <text>更多</text>
+                                        <icon type></icon>
+                                    </view>
+                                </app-jump-button>
+                            </view>
+                            <view v-for="(a, i)  in item.child" :key="i">
+                                <app-jump-button form open_type="navigate" :url="a.page_url">
+                                    <image :src="a.big_pic_url" class="app-image"></image>
+                                </app-jump-button>
+                            </view>
+                        </view>
+                    </scroll-view>
+                </view>
+            </template>
+            <template v-else-if="cat_style === `7`">
+                <view class="app-left-right-s  dir-left-nowrap">
+                    <app-category-list 
+                        :windowHeight="windowHeight" 
+                        :windowWidth="windowWidth" 
+                        :botHeight="botHeight"
+                        @click="activeThree" 
+                        :height="height"
+                        :noSetHeight="setHeight"
+                        :list="list"
+                    ></app-category-list>
+                    <scroll-view
+                        scroll-y
+                        class="app-right"
+                        :style="{height: `${setHeight}`}"
+                        style="padding-top: 20rpx"
+                    >
+                        <image lazy-load class="app-background" 
+                            :src="list[activeIndex].advert_pic"
+                            v-if="list[activeIndex].advert_pic"
+                        ></image>
+                        <view class="app-item" v-for="(item, index) in list[activeIndex].child" :key="index">
+                            <view class="app-top">
+                                <app-jump-button arrangement="left" form open_type="navigate" :url="item.page_url">
+                                    <text class="app-text">{{item.name}}</text>
+                                    <view class="app-icon dir-left-nowrap cross-center">
+                                        <text>更多</text>
+                                        <icon type></icon>
+                                    </view>
+                                </app-jump-button>
+                            </view>
+                            <view class="app-item-child" v-for="(a, i)  in item.child" :key="i">
+                                <app-jump-button arrangement="column" form open_type="navigate" :url="a.page_url">
+                                    <image :src="a.pic_url" class="app-image"></image>
+                                    <text class="app-text">{{a.name}}</text>
+                                </app-jump-button>
+                            </view>
+                        </view>
+                    </scroll-view>
+                </view>
+            </template>
+        </app-layout>
+    </view>
+</template>
+
+<script>
+    import {mapGetters, mapState} from 'vuex';
+    import appCategoryList from '../../../components/page-component/app-category-list/app-category-list.vue';
+
+    export default {
+        components: {
+            'app-category-list': appCategoryList,
+        },
+        data() {
+            return {
+                scrollTop: 0,
+                list: [],
+                goods: [],
+                request: true,
+                page: 1,
+                classId: 0,
+                activeIndex: 0,
+                activeIndexTwo: 0,
+                height: 0,
+                over: false,
+                scrollHeight: 0,
+                mch_id: 0,
+                cat_style: 0,
+                cat_id: 0,
+            }
+        },
+        computed: {
+            ...mapGetters('mallConfig', {
+                tabBarNavs: 'getNavBar'
+            }),
+            ...mapState('gConfig', {
+                windowHeight: state => state.systemInfo.windowHeight,
+                windowWidth: state => state.systemInfo.windowWidth,
+            }),
+            ...mapGetters('iPhoneX', {
+                botHeight: 'getBotHeight'
+            }),
+            setHeight() {
+                return this.windowHeight + 'px';
+            }
+        },
+        onReachBottom() {
+
+        },
+        /**
+         * 生命周期函数--监听页面加载
+         */
+        onLoad(options) { this.$commonLoad.onload(options);
+            const self = this;
+            self.mch_id = options.mch_id;
+            self.$request({
+                url: self.$api.mch.cat_style,
+                data: {
+                    mch_id: self.mch_id,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    self.cat_style = info.data.setting.cat_style;
+                    self.loadData();
+                }
+            });
+        },
+        methods: {
+            loadData: function () {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.cats_list,
+                    data: {
+                        mch_id: self.mch_id,
+                        cat_id: self.cat_id
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        self.list = info.data.list
+                    }
+                }).catch(info => {
+                    self.$hideLoading();
+                })
+            },
+            // 点击导航栏
+            active(item) {
+                this.page = 1;
+                uni.showLoading({
+                    text: '加载中...',
+                    mask: true
+                });
+                for (let i = 0; i < this.list.length; i++) {
+                    if (this.list[i].active !== item.active) {
+                        this.list[i].active = false;
+                    }
+                    if (this.list[i].id === item.id) {
+                        this.list[i].active = true;
+                    }
+                }
+                this.$request({
+                    url: `${this.$api.default.goods_list}&page=${this.page}&cat_id=${item.id}`
+                }).then(response => {
+                    uni.hideLoading();
+                    this.goods = response.data.list;
+                    this.page = 1;
+                    this.classId = item.id;
+                    this.over = false;
+                });
+                this.over = false;
+            },
+            // 下拉分页请求
+            req() {
+                this.$request({
+                    url: `${this.$api.default.goods_list}&page=${this.page}&cat_id=${this.classId}`
+                }).then(response => {
+                    if (response.data.list.length > 0) {
+                        this.goods.push(...response.data.list);
+                    } else {
+                        this.over = true;
+                    }
+                    uni.hideLoading();
+                });
+            },
+            activeThree(item) {
+                for (let i = 0; i < this.list.length; i++) {
+                    if (this.list[i].active !== item.active) {
+                        this.list[i].active = false;
+                    }
+                    if (this.list[i].id === item.id) {
+                        this.list[i].active = true;
+                        this.activeIndex = i;
+                    }
+                }
+            }
+        },
+    }
+</script>
+<style lang="scss" scoped>
+    .app-layout {
+        background: white;
+        min-height: 100vh;
+    }
+    .app-body {
+        width: #{750rpx};
+        background-color: white;
+        padding: 0 #{24rpx} #{24rpx} #{24rpx};
+        .app-item {
+            width: #{702rpx};
+            height: #{212rpx};
+            margin-top: #{20rpx};
+            .app-image {
+                background-size: 100% 100%;
+                background-repeat: no-repeat;
+                width: 100%;
+                height: 100%;
+            }
+        }
+    }
+    .app-small {
+        width: $screen-width;
+        padding: 0 #{27rpx};
+        background-color: white;
+        .app-item {
+            width: #{120rpx};
+            margin: #{64rpx} #{27rpx} 0 #{27rpx};
+            .app-image {
+                width: #{120rpx};
+                height: #{120rpx};
+                margin-bottom: #{20rpx};
+            }
+            .app-name {
+                color: #353535;
+                font-size: #{26rpx};
+                width: 100%;
+                word-break: break-all;
+                text-overflow: ellipsis;
+                display: -webkit-box;
+                -webkit-box-orient: vertical;
+                -webkit-line-clamp: 1;
+                overflow: hidden;
+            }
+        }
+    }
+    .app-top {
+        width: $screen-width;
+    }
+
+    .app-top-t {
+        width: $screen-width;
+        background: white;
+
+        .app-t {
+            width: 100%;
+            padding-top: #{24rpx};
+            padding-left: #{24rpx};
+
+            > text {
+                margin-bottom: #{20rpx};
+            }
+
+            .app-text {
+                border: #{1rpx} solid #cccccc;
+                font-size: #{28rpx};
+                color: #666666;
+                padding: 0 #{28rpx};
+                display: inline-block;
+                height: #{54rpx};
+                line-height: #{54rpx};
+                margin-right: #{24rpx};
+                border-radius: #{28rpx};
+            }
+
+            .app-active-color {
+                color: #ff4544;
+                border: #{1rpx} solid #ff4544;
+            }
+        }
+    }
+    .app-left-right {
+        width: $screen-width;
+        background: #ffffff;
+        .app-right {
+            width: #{524rpx};
+            margin-left: #{22rpx};
+            .app-background {
+                width: #{500rpx};
+                height: #{184rpx};
+                margin: #{20rpx} #{24rpx} #{20rpx} 0;
+            }
+
+            .app-item {
+                margin-left: #{2rpx};
+                height: #{158rpx};
+                width: #{524rpx};
+                margin-bottom: #{20rpx};
+
+                .app-image {
+                    height: #{158rpx};
+                    width: #{524rpx};
+                }
+            }
+        }
+    }
+    .app-left-right-t {
+        width: $screen-width;
+        background: white;
+        .app-right {
+            width: #{546rpx};
+            .app-background {
+                width: #{500rpx};
+                height: #{184rpx};
+                margin: #{20rpx} #{24rpx} #{20rpx} #{24rpx};
+            }
+            .app-item {
+                width: #{182rpx};
+                height: #{138rpx};
+                display: inline-block;
+                margin-bottom: #{40rpx};
+                .app-image {
+                    height: #{104rpx};
+                    width: #{104rpx};
+                }
+                .app-name {
+                    font-size: #{26rpx};
+                    margin-top: #{8rpx};
+                    color: #353535;
+                    word-break: break-all;
+                    text-overflow: ellipsis;
+                    display: -webkit-box;
+                    -webkit-box-orient: vertical;
+                    -webkit-line-clamp: 1;
+                    overflow: hidden;
+                }
+            }
+        }
+    }
+    .app-left-right-f {
+        width: $screen-width;
+        background: white;
+        .app-right {
+            width: #{524rpx};
+            margin-left: #{22rpx};
+            .app-background {
+                width: #{500rpx};
+                height: #{184rpx};
+                margin: #{20rpx} #{24rpx} #{20rpx} 0;
+            }
+            .app-item {
+                margin-left: #{2rpx};
+                width: #{524rpx};
+                .app-image {
+                    width: #{524rpx};
+                    height: #{158rpx};
+                    margin-bottom: #{20rpx};
+                }
+
+                .app-top {
+                    position: relative;
+                    width: #{524rpx};
+                    margin: #{20rpx} 0 #{40rpx} 0;
+                }
+                .app-text {
+                    font-size: #{28rpx};
+                    color: #353535;
+                }
+                .app-icon {
+                    position: absolute;
+                    right: #{24rpx};
+                    text {
+                        font-size: #{26rpx};
+                        color: #999999;
+                        margin-left: #{16rpx};
+                    }
+                    icon {
+                        width: #{13rpx};
+                        height: #{22rpx};
+                        background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png");
+                        background-size: 100% 100%;
+                        background-repeat: no-repeat;
+                        margin-left: #{24rpx};
+                    }
+                }
+            }
+        }
+    }
+    .app-left-right-s {
+        width: $screen-width;
+        background: white;
+        .app-right {
+            width: #{546rpx};
+            background-color: white;
+            .app-background {
+                width: #{500rpx};
+                height: #{184rpx};
+                margin: #{20rpx} #{24rpx} #{40rpx} #{24rpx};
+            }
+            .app-item {
+                width: #{546rpx};
+                .app-top {
+                    width: 100%;
+                    padding-left: #{24rpx};
+                    margin-bottom: #{40rpx};
+                    .app-text {
+                        font-size: #{28rpx};
+                        color: #353535;
+                    }
+                    .app-icon {
+                        position: absolute;
+                        right: #{24rpx};
+                        text {
+                            font-size: #{26rpx};
+                            color: #999999;
+                            margin-left: #{16rpx};
+                        }
+                        icon {
+                            width: #{13rpx};
+                            height: #{22rpx};
+                            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png");
+                            background-size: 100% 100%;
+                            background-repeat: no-repeat;
+                            margin-left: #{24rpx};
+                        }
+                    }
+                }
+                .app-item-child {
+                    display: inline-block;
+                    height: #{138rpx};
+                    width: #{182rpx};
+                    margin-bottom: #{40rpx};
+                    .app-image {
+                        width: #{104rpx};
+                        height: #{104rpx};
+                    }
+                    .app-text {
+                        font-size: #{26rpx};
+                        color: #353535;
+                        margin-top: #{8rpx};
+                    }
+                }
+            }
+        }
+    }
+</style>

+ 734 - 0
src/plugins/mch/goods/goods.vue

xqd
@@ -0,0 +1,734 @@
+<template>
+    <app-layout>
+        <view v-if="!goods" class="u-goods-detail"></view>
+        <template v-if="goods">
+			<app-nav-bar  :fixed="true" :background-color="''" :xStyle="1" :hasMallSetting="2"
+				:hasHeight="false"></app-nav-bar>
+            <!--商品轮播图-->
+            <app-goods-banner
+                :pic-list="goods.pic_url"
+                :share="goods.share"
+                :goods_id="id"
+                sign="mch"
+                :video-url="goods.video_url"
+            ></app-goods-banner>
+            <view>
+                <bd-info
+                    :theme="getTheme"
+                    :name="goods.name"
+                    :subtitle="goods.subtitle"
+                    :level-show="goods.level_show"
+                    :flash-sale="flash_sale"
+                    :price="goods.price"
+                    :original-price="goods.original_price"
+                    :price-max="goods.price_max"
+                    :price-min="goods.price_min"
+                    :price-member-max="goods.price_member_max"
+                    :price-member-min="goods.price_member_min"
+                    :sales="goods.sales"
+                    :unit="goods.unit"
+                    :is-sales="goods.is_sales"
+                    :goods-id="goods.id"
+                    :extra-quick-share="goods.extra_quick_share"
+                    :app-share-pic="goods.app_share_pic"
+                    :app-share-title="goods.app_share_title"
+                    :poster-config="poster_config + `&goods_id=` + goods.id + `&mch_id=` + goods.mch_id"
+                    :poster-generate="poster_generate + `&goods_id=` + goods.id + `&mch_id=` + goods.mch_id"
+                    :has-poster-nav="true"
+                    :share-url="poster + `&goods_id=` + goods.id + `&mch_id=` + goods.mch_id"
+                    v-bind:goods="goods"
+                    @share="hShareAppMessage"
+					:limit-buy="goods.limit_buy"
+					:min-number="goods.min_number"
+                ></bd-info>
+            </view>
+            <template v-if="mch_store">
+                <view class="shop-info dir-left-nowrap cross-center" :clas="mch_store.distance ? 'shop-info-2' : 'shop-info-1'">
+                    <image @click="navShop" class="box-grow-0" :src="mch_store.store.cover_url"></image>
+                    <view @click="navShop" class="dir-top-nowrap box-grow-1">
+                        <view class="store-name t-omit">{{mch_store.store.name}}</view>
+                        <view class="dir-left-nowrap">
+                            <view class="store-num">商品数量: {{mch_store.goods_count}}</view>
+                            <view>已售: {{mch_store.order_goods_count}}</view>
+                        </view>
+                    </view>
+                    <view class="box-grow-0">
+                        <view @click="navService" v-if="mch_setting.is_web_service"
+                              class="contain main-center cross-center dir-top-nowrap">
+                            <image class="store-icon-contain"
+                                   :src="mch_setting.web_service_pic ? mch_setting.web_service_pic : `../image/goods-contact.png`"></image>
+                            <view class="store-contain">客服</view>
+                        </view>
+                        <view v-else class="main-center store-btn">
+                            <view class="shop-btn" @click="navShop">进店逛逛</view>
+                        </view>
+                    </view>
+                </view>
+                <view v-if="mch_store.distance"  class="shop-address dir-left-nowrap cross-top">
+                    <view class="dir-top-nowrap box-grow-1">
+                        <view class="address">{{mch_store.store.address}}</view>
+                        <view class="km">距离{{mch_store.distance}}</view>
+                    </view>
+                    <view @click="navMap" class="box-grow-0 icon-address main-center">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//summary-address.png"></image>
+                    </view>
+                </view>
+            </template>
+            <bd-xbc
+                :coAttr="is_open"
+                :attr-list="selectAttr && selectAttr.attr_list"
+                :type="goods.type"
+                :guarantee-title="goods.guarantee_title"
+                :guarantee-pic="goods.guarantee_pic"
+                :param_content="param_content"
+                :param_name="goods.param_name"
+                :services="goods.services"
+                :attr-groups="goods.attr_groups"
+                :goods-stock="goods.goods_stock"
+                @openAttr="clickAttr()"
+            ></bd-xbc>
+            <bd-hc
+                :integral="goods.goods_marketing_award.integral"
+                :coupon="goods.goods_marketing_award.coupon"
+                :card="goods.goods_marketing_award.card"
+                :balance="goods.goods_marketing_award.balance"
+                :theme="getTheme"
+            ></bd-hc>
+            <bd-kb
+                :limit="goods.goods_marketing.limit"
+                :express="goods.express"
+                :shipping="goods.goods_marketing.shipping"
+                :pickup="goods.goods_marketing.pickup"
+            ></bd-kb>
+            <bd-comments :goods-id="goods.id"></bd-comments>
+            <bd-detail :detail="goods.detail"></bd-detail>
+            <!--相关推荐-->
+            <view class="recommend">
+                <view class="recommend-title dir-left-nowrap main-center">
+                    <view class="dir-left-nowrap cross-center">
+                        <view class="border"></view>
+                        <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite.png"></image>
+                        <view style="color: #353535;">您或许喜欢</view>
+                        <view class="border"></view>
+                    </view>
+                </view>
+                <view class="recommend-list">
+                    <u-ordinary-list :is-under-line-price="isListUnderlinePrice == 1 ? true : false" :isShowAttr="true" :list="recommend_list" :theme="getTheme" :list-style="2"></u-ordinary-list>
+                </view>
+            </view>
+            <!-- 底部空格 -->
+            <view class="safe-area-inset-bottom">
+                <view class="u-bottom-height" :class="[uBottomHeight]"></view>
+            </view>
+            <!-- 底部按钮 -->
+            <view v-if="is_open == 1" class="safe-area-inset-bottom u-bottom-fixed">
+                <view v-if="full_reduce">
+                    <app-goods-full-reduce
+                        :theme="getTheme"
+                        :full_reduce="full_reduce"
+                    >
+                    </app-goods-full-reduce>
+                </view>
+				<view v-if="goods.sell_time > 0">
+					<app-sell-tip :time="goods.sell_time" @changeTime="changeTime"></app-sell-tip>
+				</view>
+                <view class="bd-bottom dir-left-nowrap" >
+                    <view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="navShop">
+                        <image class="bd-icon" src="https://t17.9026.com/web/statics/image/mall/static/icon/icon-mch.png"></image>
+                        <text>店铺</text>
+                    </view>
+                    <view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="back">
+                        <image class="bd-icon" src="https://t17.9026.com/web/statics/image/mall/static/icon/index.png"></image>
+                        <text>首页</text>
+                    </view>
+                    <view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="favorite">
+                        <image class="bd-icon" :src="goods.favorite ? 'https://t17.9026.com/web/statics/image/index/icon-favorite-active.png' : 'https://t17.9026.com/web/statics/image/index/icon-favorite.png'"></image>
+                        <text>收藏</text>
+                    </view>
+                    <view class="box-grow-1 dir-left-nowrap">
+                        <template v-if="goods.goods_stock > 0 && !goods.is_finish_sell">
+                            <view class="bd-button"
+                                  :class="[leftTip]"
+                                  :style="{'background': !goods || goods.buy_goods_auth ? getTheme.background_s_gradient_btn : '#999999','color': !goods || goods.buy_goods_auth ? getTheme.secondary_text : ''}"
+                                  @click="clickAttr">
+                                加入购物车
+                            </view>
+							<view class="bd-button" v-if="!(isTip == 0 && goods.sell_time > 0)">
+								<app-jump-button form>
+									<view 
+                            :style="{'background': goods.buy_goods_auth ? getTheme.background_gradient_btn : '#999999','color': goods.buy_goods_auth ? getTheme.main_text : '', 'width': '100%'}"
+							class="bd-btn-right box-grow-1"  @click="buyClick"
+                            >{{rightRemindText}}
+									</view>
+								</app-jump-button>
+							</view>
+                        </template>
+                        <view v-else class="bd-btn" :class="[disableBtn]">{{goods.is_finish_sell ? '商品已下架' : '已售罄'}}</view>
+                    </view>
+                </view>
+            </view>
+            <u-attr
+                v-model="attrShow"
+                :goods="goods"
+                :theme="getTheme"
+                :checked="selectAttr"
+                @check="onAttr"
+            >
+            </u-attr>
+        </template>
+        <app-close v-if="showClose" :mch_id="mch_id" :modal="false" @update="getMall"></app-close>
+    </app-layout>
+</template>
+
+<script>
+    import {mapGetters, mapState} from "vuex";
+    import appGoodsBanner from "@/components/page-component/goods/app-goods-banner.vue";
+    import appGoodsFullReduce from "@/components/page-component/goods/app-goods-full-reduce";
+    import uOrdinaryList from '@/components/page-component/u-goods-list/u-ordinary-list.vue';
+    import uAttr from '@/components/page-component/goods/u-attr.vue';
+    import bdInfo from '@/components/page-component/goods/bd-info';
+    import bdXbc from '@/components/page-component/goods/bd-xbc.vue';
+    import bdKb from '@/components/page-component/goods/bd-kb.vue';
+    import bdHc from '@/components/page-component/goods/bd-hc.vue';
+    import bdDetail from '@/components/page-component/goods/bd-detail.vue';
+    import bdComments from '@/components/page-component/goods/bd-comments.vue';
+    import appClose from '@/components/basic-component/app-close/app-close.vue';
+    import appSellTip from '@/components/page-component/goods/app-sell-tip.vue';
+	import goodsMixin from '@/core/goods-mixin.js';
+
+import appNavBar from '@/components/page-component/index/app-nav-bar.vue';
+    export default {
+        name: "goods",
+		mixins: [goodsMixin],
+        components: {
+            appGoodsBanner,
+            uOrdinaryList,
+            uAttr,
+            appGoodsFullReduce,
+            bdInfo,
+            bdXbc,
+            bdKb,
+            bdHc,
+            bdDetail,
+            bdComments,
+            appClose,
+			appSellTip,
+			
+			appNavBar
+        },
+        data() {
+            return {
+                showClose: false,
+                is_open: 0,
+                goods: null,
+                full_reduce: null,
+                selectAttr: null,
+                recommend_list: null,
+                attrShow: false,
+                id: 0,
+                mch_id: 0,
+                mch_store: null,
+                mch_setting: null,
+                flash_sale: null,
+                poster: this.$api.mch.poster,
+                poster_config: this.$api.mch.poster_config,
+                poster_generate: this.$api.mch.poster_generate,
+                param_content: [],
+				disable: 'disable'
+            };
+        },
+        computed: {
+            ...mapState({
+                mall: state => state.mallConfig.mall,
+                isListUnderlinePrice: state => state.mallConfig.mall.setting.is_list_underline_price,
+				isTip: state => state.mallConfig.mall.setting.is_remind_sell_time
+            }),
+            ...mapState('gConfig', {
+                iphone: (data) => {
+                    return data.iphone;
+                },
+                iphoneHeight: (state) => {
+                    return state.iphoneHeight;
+                },
+            }),
+            ...mapGetters('mallConfig', {
+                getTheme: 'getTheme',
+            }),
+			uBottomHeight() {
+				if (this.full_reduce && this.goods && this.goods.sell_time > 0) {
+					return 'u-bottom-height-2';
+				} else if (this.full_reduce || (this.goods && this.goods.sell_time > 0)) {
+					return 'u-bottom-height-1';
+				} else {
+					return 'u-bottom-height-0';
+				}
+			},
+			leftTip() {
+				let leftTip = '';
+				if (!(this.isTip == 0 && this.goods && this.goods.sell_time > 0)) {
+					leftTip = 'bd-btn-left';
+				} else {
+					leftTip = 'box-grow-1';
+				}
+				return leftTip;
+			},
+			disableBtn() {
+				return this.goods && this.goods.is_finish_sell ? 'btn-finish-sell' : 'bd-oversell-btn';
+			},
+			remindParams() {
+				if (!this.goods) {
+					return {};
+				}
+				return {
+					sell_time: this.goods.sell_time,
+					goods_id: this.goods.id,
+					template_message_list: this.goods.template_message_list,
+					buy_text: '立即购买'
+				};
+			},
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            [this.mch_id, this.id] = [options.mch_id, options.id];
+            this.getAddress();
+            this.loadRecommend();
+            // #ifdef MP-WEIXIN
+            wx.showShareMenu({
+                withShareTicket: true,
+                menus: ['shareAppMessage', 'shareTimeline']
+            })
+            // #endif
+        },
+        onShow() {
+            this.showClose = false;
+            setTimeout(()=>{
+                this.showClose = true;
+            })
+        },
+        // #ifdef MP-WEIXIN
+        onShareTimeline() {
+            return this.$shareTimeline({
+                title: this.goods.app_share_title ? this.goods.app_share_title : this.goods.name,
+                query: {
+                    id: this.id,
+                    mch_id: this.mch_id,
+                }
+            });
+        },
+        // #endif
+        // #ifdef MP
+        onShareAppMessage() {
+            return this.hShareAppMessage();
+        },
+        // #endif
+        methods: {
+            hShareAppMessage(s = false){
+                return this.$shareAppMessage({
+                    title: this.goods.app_share_title ? this.goods.app_share_title : this.goods.name,
+                    imageUrl: this.goods.app_share_pic ? this.goods.app_share_pic : this.goods.pic_url[0].pic_url,
+                    path: '/plugins/mch/goods/goods',
+                    desc: this.goods.subtitle,
+                    params: {
+                        id: this.id,
+                        mch_id: this.mch_id,
+                    }
+                }, s);
+            },
+            getMall(e) {
+                this.is_open = e.is_open;
+            },
+            // setCoupon(index) {
+            //     this.$set(this.goods.goods_coupon_center[index], 'is_receive', 1);
+            // },
+            getAddress() {
+                const self = this;
+                uni.getLocation({
+                    type: 'wgs84',
+                    success(res) {
+                        self.getMch(res.latitude, res.longitude);
+                    },
+                    fail(e) {
+                        self.getMch(0, 0);
+                    }
+                });
+            },
+
+            getMch(latitude, longitude) {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.detail,
+                    data: {
+                        id: self.mch_id,
+                        latitude: latitude,
+                        longitude: longitude,
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        [self.mch_store, self.mch_setting] = [info.data.detail, info.data.mchSetting];
+                        self.getDetail();
+                    } else {
+                        uni.showModal({
+                            title: '提示',
+                            content: info.msg,
+                            showCancel: false,
+                            success: function (e) {
+                                if (e.confirm) {
+                                    uni.navigateBack({delta: 1});
+                                }
+                            }
+                        });
+                    }
+                }).catch(() => {
+                    self.$hideLoading();
+                })
+            },
+
+            getDetail() {
+                this.$showLoading();
+                this.$request({
+                    url: this.$api.mch.goods_detail,
+                    data: {
+                        id: this.id,
+                        mch_id: this.mch_id
+                    }
+                }).then(e => {
+                    this.$hideLoading();
+                    if (e.code === 0) {
+                        let { goods_activity } = e.data.detail;
+                        this.goods = e.data.detail;
+                        // #ifdef H5
+                        this.hShareAppMessage();
+                        // #endif
+                        let { param_content } = e.data.detail;
+                        this.param_content = param_content;
+                        if (goods_activity) {
+                            this.full_reduce = goods_activity.full_reduce;
+                        }
+                    } else {
+                        uni.showModal({
+                            title: '提示',
+                            content: e.msg,
+                            showCancel: false
+                        });
+                    }
+                }).catch(() => {
+                    this.$hideLoading();
+                });
+            },
+
+            loadRecommend() {
+                const self = this;
+                self.$request({
+                    url: self.$api.goods.new_recommend,
+                    data: {
+                        goods_id: self.id,
+                    },
+                    method: 'get'
+                }).then(info => {
+                    if (info.code === 0) {
+                        this.recommend_list = info.data.list;
+                    }
+                });
+            },
+
+            navMap() {
+                uni.openLocation({
+                    latitude: parseFloat(this.mch_store.store.latitude),
+                    longitude: parseFloat(this.mch_store.store.longitude),
+                    name: this.mch_store.store.name,
+                    address: this.mch_store.store.address,
+                })
+            },
+
+            onAttr({item}) {
+                this.selectAttr = item;
+            },
+
+            navService() {
+                uni.navigateTo({url: `/pages/web/web?url=` + this.mch_setting.web_service_url});
+            },
+
+            navShop() {
+                uni.redirectTo({url: `/plugins/mch/shop/shop?mch_id=` + this.mch_id});
+            },
+
+            back() {
+                uni.redirectTo({
+                    url: '/pages/index/index'
+                });
+            },
+
+            favorite() {
+                this.goods.favorite ? this.goods.favorite = false :  this.goods.favorite = true;
+                this.$request({
+                    url: !this.goods.favorite ? this.$api.user.favorite_remove : this.$api.user.favorite_add,
+                    data: {
+                        goods_id: this.goods.id,
+                    }
+                }).then(e => {
+                    if (e.code !== 0) {
+                        uni.showModal({
+                            title: '提示',
+                            content: e.msg,
+                            showCancel: false
+                        });
+                    }
+                });
+            },
+
+            clickAttr() {
+                if (!this.goods.buy_goods_auth) {
+                    uni.showToast({
+                        title: '您暂无权限购买该商品',
+                        icon: 'none'
+                    });
+                    return;
+                }
+                if (this.goods.type === 'ecard') {
+                    uni.showToast({
+                        title: '虚拟商品不允许加入购物车',
+                        icon: 'none'
+                    });
+                    return;
+                }
+                this.attrShow = true;
+            },
+			changeTime(time) {
+				this.goods.sell_time = time;
+			},
+			buyClick() {
+				if (this.goods.sell_time > 0) {
+					this.rightTip();
+				} else{
+					this.clickAttr();
+				}
+			},
+        },
+    }
+</script>
+
+<style scoped lang="scss">
+    .goods-name {
+        padding: #{24rpx};
+        background-color: #ffffff;
+        color: $uni-important-color-black;
+    }
+
+    .goods-subtitle {
+        padding: #{24rpx};
+        padding-top: 0;
+        font-size: 24rpx;
+        background-color: #ffffff;
+        color: #999999;
+    }
+
+
+    .attr {
+        padding: #{24rpx} 0;
+        background-color: #f7f7f7;
+    }
+
+    .recommend {
+        .recommend-title {
+            margin: #{40rpx} 0 #{32rpx} 0;
+            font-size: $uni-font-size-weak-one;
+            color: $uni-general-color-two;
+
+            .border {
+                border-top: #{1rpx} solid #bbbbbb;
+                height: 0;
+                width: #{40rpx};
+                margin: 0 #{24rpx};
+            }
+
+            image {
+                width: #{24rpx};
+                height: #{24rpx};
+                display: block;
+                margin-right: #{12rpx};
+            }
+        }
+    }
+
+    .shop-btn {
+        height: #{64rpx};
+        border: #{1px} solid #cdcdcd;
+        color: #666666;
+        background: #FFFFFF;
+        width: #{146rpx};
+        line-height: #{64rpx};
+        border-radius: #{32rpx};
+        text-align: center;
+    }
+
+    .bd-bottom {
+        height: 110upx;
+        width: 750upx;
+        padding: 20upx 24upx;
+    }
+    .bd-back {
+        width: 66upx;
+        height: 100%;
+        margin-right: 20upx;
+        font-size: 20upx;
+        color: #888888;
+    }
+    .bd-icon {
+        width: 30upx;
+        height: 30upx;
+    }
+    .bd-button {
+        text-align: center;
+        line-height: 70upx;
+        font-size: 26upx;
+        border-radius: 35upx;
+        width: 50%;
+    }
+    .bd-btn-left {
+        border-top-right-radius: 0;
+        border-bottom-right-radius: 0;
+    }
+    .bd-btn-right {
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
+        border-top-right-radius: 35upx;
+        border-bottom-right-radius: 35upx;
+        color: #ffffff;
+    }
+    .bd-btn {
+        color: #ffffff;
+        width: 100%;
+        text-align: center;
+        line-height: 70upx;
+        font-size: 26upx;
+        border-radius: 35upx;
+    }
+
+    .comments {
+        margin-bottom: #{20rpx};
+        background-color: #ffffff;
+    }
+
+    .detail {
+        background-color: #ffffff;
+
+        image {
+            width: 100%;
+            height: #{80rpx};
+            display: block;
+        }
+    }
+    .shop-info-1 {
+        border-radius: 15upx;
+    }
+    .shop-info-2 {
+        border-radius: 15upx 15upx 0 0;
+    }
+    .shop-info {
+        height: #{124rpx};
+        color: #999999;
+        font-size: #{24rpx};
+        background: #FFFFFF;
+        width: 702upx;
+        margin: 24upx 24upx 0 24upx;
+        > image {
+            border-radius: #{8rpx};
+            margin: 0 #{20rpx};
+            height: #{80rpx};
+            width: #{80rpx}
+        }
+
+        .store-name {
+            line-height: 1.5em;
+            font-size: #{32rpx};
+            color: #353535;
+            margin-bottom: #{16rpx};
+        }
+
+        .store-num {
+            margin-right: #{32rpx};
+        }
+
+        .contain {
+            width: #{152rpx};
+            height: 100%;
+
+            image {
+                height: #{40rpx};
+                width: #{40rpx};
+                display: block;
+            }
+
+            view {
+                margin-top: #{8rpx};
+            }
+        }
+
+        .store-btn {
+            margin: 0 #{20rpx};
+        }
+    }
+
+    .shop-address {
+        width: 702rpx;
+        margin: 0 24upx 24upx 24upx;
+        padding: 20upx;
+        font-size: #{24rpx};
+        background: #FFFFFF;
+        border-radius: 0 0 15upx 15upx;
+        .address {
+            color: #666666;
+            max-height: #{560rpx};
+        }
+
+        .km {
+            color: #999999;
+            margin-top:#{10rpx};
+        }
+
+        .icon-address {
+            width: #{120rpx};
+            border-left: 1px solid #e2e2e2;
+        }
+
+        image {
+            height: #{32rpx};
+            width: #{32rpx};
+            display: block;
+        }
+    }
+    .text {
+        color: #ffffff;
+    }
+    .goods-margin {
+        margin-top: 20upx;
+    }
+    .u-bottom-height-0 {
+        height: 110upx;
+    }
+    .u-bottom-height-1 {
+        height: 190upx;
+    }
+    .u-bottom-fixed {
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        width: 100%;
+        z-index: 1602;
+        background-color: #ffffff;
+        box-shadow: 0 -1rpx 20rpx -15rpx #353535;
+    }
+    .bd-oversell-btn {
+        background-color: #CDCDCD;
+    }
+	.btn-finish-sell {
+		background: linear-gradient(to right, rgba(153, 153, 153, 1), rgba(153, 153, 153, 0.7)) ;
+	}
+    .u-bottom-height-2 {
+        height: 270upx;
+    }
+    .bd-oversell-btn {
+        background-color: #CDCDCD;
+    }
+</style>

BIN
src/plugins/mch/image/add-detail.png


BIN
src/plugins/mch/image/add-goods.png


BIN
src/plugins/mch/image/add.png


BIN
src/plugins/mch/image/apply-er.png


BIN
src/plugins/mch/image/apply-ok.png


BIN
src/plugins/mch/image/arrow-left-white.png


BIN
src/plugins/mch/image/camera.png


BIN
src/plugins/mch/image/cat-close.png


BIN
src/plugins/mch/image/close.png


BIN
src/plugins/mch/image/copy.png


BIN
src/plugins/mch/image/delete.png


BIN
src/plugins/mch/image/express.png


BIN
src/plugins/mch/image/goods-contact.png


BIN
src/plugins/mch/image/goods-del.png


BIN
src/plugins/mch/image/goods-edit.png


BIN
src/plugins/mch/image/goods-xiajia.png


BIN
src/plugins/mch/image/image.png


BIN
src/plugins/mch/image/line.png


BIN
src/plugins/mch/image/list-cat.png


BIN
src/plugins/mch/image/localhost.png


BIN
src/plugins/mch/image/login-alipay.png


BIN
src/plugins/mch/image/login-wechat.png


BIN
src/plugins/mch/image/low.png


BIN
src/plugins/mch/image/more-active.png


BIN
src/plugins/mch/image/more-handle.png


BIN
src/plugins/mch/image/more.png


BIN
src/plugins/mch/image/myshop-code.png


BIN
src/plugins/mch/image/myshop-data.png


BIN
src/plugins/mch/image/myshop-goods.png


BIN
src/plugins/mch/image/myshop-notice.png


BIN
src/plugins/mch/image/myshop-order.png


BIN
src/plugins/mch/image/myshop-shop.png


BIN
src/plugins/mch/image/myshop-zc.png


BIN
src/plugins/mch/image/open.png


BIN
src/plugins/mch/image/order-list-refund.png


BIN
src/plugins/mch/image/search.png


BIN
src/plugins/mch/image/shop-all.png


BIN
src/plugins/mch/image/shop-cat.png


BIN
src/plugins/mch/image/shop-contact.png


BIN
src/plugins/mch/image/shop-home.png


BIN
src/plugins/mch/image/shop-kf.png


BIN
src/plugins/mch/image/shop-new.png


BIN
src/plugins/mch/image/shop-phone.png


BIN
src/plugins/mch/image/shop-price-less.png


BIN
src/plugins/mch/image/shop-price-plus.png


BIN
src/plugins/mch/image/shop-price.png


BIN
src/plugins/mch/image/shop-summary.png


BIN
src/plugins/mch/image/shop-wechat.png


BIN
src/plugins/mch/image/summary-address.png


BIN
src/plugins/mch/image/summary-blue.png


BIN
src/plugins/mch/image/summary-home.png


BIN
src/plugins/mch/image/summary-map.png


BIN
src/plugins/mch/image/summary-phone.png


BIN
src/plugins/mch/image/summary-synopsis.png


BIN
src/plugins/mch/image/summary-yw.png


BIN
src/plugins/mch/image/tel.png


BIN
src/plugins/mch/image/txt.png


BIN
src/plugins/mch/image/web-login.png


+ 411 - 0
src/plugins/mch/list/list.vue

xqd
@@ -0,0 +1,411 @@
+<template>
+    <app-layout>
+        <view class="list-head">
+            <view class="dir-left-nowrap cross-center mch-list-input">
+                <view class="box-grow-1 box dir-left main-center cross-center">
+                    <view v-if="toSearch" class="search-content">
+                        <input class="input"
+                               :value="keyword"
+                               @input="bindInput"
+                               @confirm="bindConfirm"
+                               @blur="beSearch"
+                               confirm-type="search"
+                               :focus="getFocus"/>
+                        <view v-if="keyword.length" @click="cancelPrint" class="main-center cross-center close-word">
+                            <icon class="icon-close" type></icon>
+                        </view>
+                    </view>
+                    <view v-else @click="beSearch" class="main-center search-content cross-center">
+                        <icon class="icon-search" type></icon>
+                        <text class="search-text">搜索</text>
+                    </view>
+                </view>
+                <view @click="changeCat" class="cross-center">
+                    <icon class="icon-cats" type></icon>
+                </view>
+            </view>
+
+            <view v-if="catModel" class="list-cat-model dir-left-wrap cross-center">
+                <view v-for="(v,k) in cat_list" :key="k">
+                    <view @click="cat(v.id)">
+                        <view class="cat-name">{{v.name}}</view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="gap"></view>
+        <view class="no-content" v-if="!list || list.length === 0">暂无店铺记录</view>
+        <app-good-shop-recommendation v-else :theme="getTheme" :coupon_req="true" :mch_list="list" :show-goods="true"></app-good-shop-recommendation>
+    </app-layout>
+</template>
+<script>
+    import appGoodShopRecommendation
+        from '../../../components/page-component/app-good-shop-recommendation/app-good-shop-recommendation.vue';
+    import {mapGetters, mapState} from "vuex";
+
+    export default {
+        name: "list",
+        components: {appGoodShopRecommendation},
+        data() {
+            return {
+                catModel: false,
+                toSearch: false,
+                list: [],
+                cat_list: [],
+                page: 1,
+                keyword: '',
+                mch_common_cat_id: 0,
+                load: false,
+                args: false,
+                latitude: 0,
+                longitude: 0,
+                page_loading: false,
+                getFocus: false
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.getLocation();
+            this.getCats();
+        },
+
+        onReachBottom: function () {
+            const self = this;
+            if (self.args || self.load)
+                return;
+            self.load = true;
+            let page = self.page + 1;
+
+            self.$request({
+                url: self.$api.mch.index,
+                data: {
+                    keyword: self.keyword,
+                    latitude: self.latitude,
+                    longitude: self.longitude,
+                    mch_common_cat_id: self.mch_common_cat_id,
+                    page: page,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    [self.page, self.args, self.list] = [page, info.data.list.length === 0, self.list.concat(self.dataMap(info.data.list))];
+                }
+                self.load = false;
+            });
+        },
+        // #ifdef MP
+        onShareAppMessage() {
+            return this.$shareAppMessage({
+                title: `好店推荐`,
+                path: '/plugins/mch/list/list',
+                params: {}
+            });
+        },
+        // #endif
+        methods: {
+            dataMap(list) {
+                if (!list)
+                    return;
+                list.forEach(item => {
+                    item.pic_url = item.store.cover_url;
+                    item.name = item.store.name;
+                    item.goods_num = item.goods_count;
+                    item.order_num = item.order_goods_count;
+                    item.goodsList = item.goods;
+                    item.goodsList.forEach(item1 => {
+                        item1.picUrl = item1.goodsWarehouse.cover_pic;
+                    })
+                });
+                return list;
+            },
+            getLocation() {
+                const self = this;
+                // #ifdef MP
+                uni.getLocation({
+                    type: 'wgs84',
+                    success(res) {
+                        [self.latitude, self.longitude] = [res.latitude, res.longitude];
+                    },
+                    complete(res) {
+                        console.warn(res);
+                        self.loadData();
+                    }
+                })
+                // #endif
+                // #ifdef H5
+                this.$jwx.getLocation({
+                    success(res) {
+                        [self.latitude, self.longitude] = [res.latitude, res.longitude];
+                        self.loadData();
+                    },
+                    fail() {
+                        self.loadData();
+                    }
+                });
+                // #endif
+            },
+            loadData() {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.index,
+                    data: {
+                        keyword: self.keyword,
+                        latitude: self.latitude,
+                        longitude: self.longitude,
+                        mch_common_cat_id: self.mch_common_cat_id,
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        self.list = self.dataMap(info.data.list);
+                    }
+                }).catch(info => {
+                    self.$hideLoading();
+                })
+            },
+            //分类处理
+            getCats() {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.category,
+                }).then(info => {
+                    self.cat_list = info.data.list;
+                });
+            },
+            navShop(mch_id) {
+                uni.navigateTo({url: `/plugins/mch/shop/shop?mch_id=` + mch_id});
+            },
+            navGoods(mch_id, goods_id) {
+                uni.navigateTo({url: `/plugins/mch/goods/goods?id=` + goods_id + `&mch_id=` + mch_id});
+            },
+
+            beSearch: function (e) {
+                if (this.keyword.length === 0) {
+                    this.toSearch = !this.toSearch;
+                    this.getFocus = this.toSearch;
+                }
+            },
+            //搜索
+            bindConfirm() {
+                [
+                    this.page,
+                    this.mch_common_cat_id,
+                    this.catModel,
+                    this.list
+                ] = [
+                    1,
+                    0,
+                    false,
+                    []
+                ]
+                this.loadData();
+            },
+
+            cat(id) {
+                [this.mch_common_cat_id, this.list, this.page, this.catModel] = [id, [], 1, false];
+                this.loadData();
+            },
+
+            changeCat() {
+                this.catModel = !this.catModel;
+            },
+
+            bindInput: function (e) {
+                this.keyword = e.detail.value;
+            },
+
+            cancelPrint() {
+                this.keyword = '';
+                this.toSearch = false;
+                this.bindConfirm();
+            },
+        },
+        computed: {
+            ...mapGetters('mallConfig', {
+                getTheme: 'getTheme',
+            }),
+        },
+    }
+</script>
+<style scoped lang="scss">
+    .search-content {
+        height: #{56rpx};
+        border-radius: #{28rpx};
+        background: #fff;
+        position: relative;
+        width: 100%;
+        margin-left: #{24rpx};
+
+        .input {
+            height: #{56rpx};
+            border-radius: #{28rpx};
+            color: #353535;
+            width: 90%;
+            background-color: #ffffff;
+        }
+
+        .icon-search {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/icon-search.png");
+            height: #{24rpx};
+            width: #{24rpx};
+            background-size: 100% auto;
+            margin-right: #{10rpx};
+            background-repeat: no-repeat;
+        }
+    }
+
+    .search-text {
+        color: #b2b2b2;
+        font-size: #{24rpx};
+        margin: 0 #{5rpx};
+    }
+
+    .list-head {
+        position: fixed;
+        top: 0;
+        z-index: 1;
+        width: 100%;
+    }
+
+    .no-content {
+        color: #888;
+        padding: #{100rpx} 0 0 0;
+        text-align: center;
+    }
+
+    .mch-list-input {
+        height: #{88rpx};
+        padding: 0 #{24rpx};
+        background: #EFEFF4;
+
+
+        .box {
+            margin-right: #{24rpx};
+            height: #{56rpx};
+            border-radius: #{28rpx};
+            background: #FFFFFF;
+            input {
+                border-radius: #{28rpx};
+            }
+        }
+
+        .icon-cats {
+            background-image: url("./../image/list-cat.png");
+            background-repeat: no-repeat;
+            background-size: 100% auto;
+            height: #{30rpx};
+            width: #{38rpx};
+        }
+
+        .close-word {
+            height: #{56rpx};
+            width: #{70rpx};
+            position: absolute;
+            right: 0;
+            top: 0;
+            z-index: 20;
+
+            .icon-close {
+                background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/icon-close.png");
+                background-repeat: no-repeat;
+                background-size: 100% auto;
+                height: #{25rpx};
+                width: #{25rpx};
+            }
+        }
+    }
+
+    .list-cat-model {
+        padding-top: #{12rpx};
+        padding-bottom: #{12rpx};
+        padding-left: #{20rpx};
+        background: #f7f7f7;
+
+        .cat-name {
+            color: #353535;
+            font-size: #{24rpx};
+            border: #{1rpx} solid #e7e7e7;
+            border-radius: #{28rpx};
+            line-height: #{56rpx};
+            height: #{56rpx};
+            background: #ffffff;
+            padding: 0 #{24rpx};
+            margin: #{10rpx} #{12rpx} #{10rpx} #{12rpx};
+        }
+    }
+
+    .gap {
+        height: #{88rpx};
+    }
+
+    .list-shop {
+        margin: #{10rpx} #{20rpx};
+        width: #{710rpx};
+        background: #fff;
+        border-radius: #{16rpx};
+    }
+
+    .list-shop .shop-info {
+        padding-right: #{24rpx};
+    }
+
+    .list-shop .distance {
+        align-self: flex-start;
+        padding-top: #{36rpx};
+        font-size: #{24rpx};
+        color: #999999;
+        padding-right: #{50rpx};
+    }
+
+    .list-shop .list-shop-icon {
+        border-radius: #{8rpx};
+        height: #{100rpx};
+        width: #{100rpx};
+        margin: #{24rpx};
+    }
+
+    .list-shop .name {
+        color: #353535;
+        font-size: #{28rpx};
+        margin-bottom: #{24rpx};
+    }
+
+    .list-shop .shop {
+        font-size: #{24rpx};
+        color: #999;
+    }
+
+    .list-shop .goods-num {
+        padding-right: #{32rpx};
+    }
+
+    .list-shop .goods {
+        padding-bottom: #{24rpx};
+        margin: 0 #{16rpx};
+    }
+
+    .list-shop .goods-box {
+        margin: 0 #{8rpx};
+    }
+
+    .list-shop .goods-info {
+        position: relative;
+        height: #{210rpx};
+        width: #{210rpx};
+    }
+
+    .list-shop .goods-info view {
+        background: #fff;
+        font-size: #{28rpx};
+        opacity: 0.8;
+        width: #{210rpx};
+        color: #ff4544;
+        height: #{50rpx};
+        position: absolute;
+        bottom: 0;
+    }
+
+    .list-shop .goods-info image {
+        height: 100%;
+        width: 100%;
+    }
+</style>

+ 180 - 0
src/plugins/mch/mch/account-log/account-log.vue

xqd
@@ -0,0 +1,180 @@
+<template>
+    <app-layout>
+        <view class="list">
+            <view class="account-date main-center cross-center">
+                <image @click="dateLess" class="account-icon"
+                       src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-left.png"></image>
+                <picker mode="date" :value="date" fields="month" @change="dateChange">
+                    <view>{{date_a}}</view>
+                </picker>
+                <image @click="datePlus" class="account-icon"
+                       src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
+            </view>
+            <view class="no-content" v-if="!list.length">暂无记录</view>
+            <view v-else class="account-list">
+                <view v-for="(item, index) in list" :key="index" class="account-item dir-left-nowrap cross-center">
+                    <view class="box-grow-1 left">
+                        <view class="desc t-omit">{{item.desc}}</view>
+                        <view class="created">{{item.created_at}}</view>
+                    </view>
+                    <view class="add-money" v-if="item.type == 1">+{{item.money}}</view>
+                    <view class="less-money" v-else>-{{item.money}}</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "account-log",
+        components: {},
+        data() {
+            return {
+                page: 1,
+                args: false,
+                load: false,
+                mch_id: 0,
+                list: [],
+
+                date_a: '',
+                data: '',
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+            this.getNowTime(new Date());
+        },
+        onReachBottom: function () {
+            const self = this;
+            if (self.args || self.load)
+                return;
+            self.load = true;
+            let page = self.page + 1;
+
+            self.$request({
+                url: self.$api.mch.account_log,
+                data: {
+                    mch_id: self.mch_id,
+                    page: page,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    [self.page, self.args, self.list] = [page, info.data.list.length === 0, self.list.concat(info.data.list)];
+                }
+                self.load = false;
+            });
+        },
+        methods: {
+            getLog: function () {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.account_log,
+                    data: {
+                        mch_id: self.mch_id,
+                        date: self.date
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    self.list = info.data.list;
+                }).catch(e => {
+                    self.$hideLoading();
+                })
+            },
+
+            dateLess: function () {
+                let date = this.date;
+                let d = new Date(date);
+                d.setMonth(d.getMonth() - 1);
+                this.getNowTime(d);
+            },
+            datePlus: function () {
+                let date = this.date;
+                let d = new Date(date);
+                d.setMonth(d.getMonth() + 1);
+                this.getNowTime(d);
+            },
+            dateChange: function (e) {
+                let date = e.detail.value;
+                let d = new Date(date);
+                this.getNowTime(d);
+            },
+
+            getNowTime(date) {
+                let year = date.getFullYear();
+                let month = date.getMonth() + 1;
+                date = [year, month].map((n) => {
+                    n = n.toString()
+                    return n[1] ? n : '0' + n
+                }).join('-');
+                let date_a = date.replace('-', '年') + '月';
+                [this.date, this.date_a, this.page, this.args] = [date, date_a, 1, false];
+                this.getLog();
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .account-date {
+        position: fixed;
+        top: 0;
+        width: #{100%};
+        height: #{80rpx};
+        background: #FFFFFF;
+        color: #353535;
+
+        .account-icon {
+            height: #{20rpx};
+            width: #{12rpx};
+            margin: auto #{84rpx};
+        }
+    }
+
+    .no-content {
+        color: #888;
+        padding: #{200rpx} 0 0 0;
+        text-align: center;
+    }
+
+    .account-list {
+        margin-top: #{80rpx + 16rpx};
+
+        .account-item {
+            background: #FFFFFF;
+            height: #{140rpx};
+            border-bottom: #{1rpx} solid #e2e2e2;
+            padding: 0 #{24rpx};
+
+            .left {
+                margin-right: #{24rpx};
+            }
+
+            .desc {
+                font-size: #{28rpx};
+                color: #353535;
+            }
+
+            .created {
+                margin-top: #{14rpx};
+                font-size: #{24rpx};
+                color: #666666;
+            }
+
+            .add-money {
+                font-size: #{48rpx};
+                color: #ff4544;
+            }
+
+            .less-money {
+                font-size: #{48rpx};
+                color: #3fc24c;
+            }
+        }
+
+        .account-item:last-child {
+            border-bottom: none;
+        }
+    }
+</style>

+ 237 - 0
src/plugins/mch/mch/account/account.vue

xqd
@@ -0,0 +1,237 @@
+<template>
+    <app-layout>
+        <!-- 页面内容 -->
+        <view class="header-h">
+            <image class="header-bg" :src="appImg.mch_account_header_bg" mode="widthFix"></image>
+            <view class="header-box dir-top-nowrap main-center">
+                <view class="account">账户可用余额(元)</view>
+                <view class="money">{{account_money}}</view>
+                <app-form-id style="height: auto" @click="navCash">
+                    <view class="cash-btn">提现</view>
+                </app-form-id>
+            </view>
+        </view>
+
+        <view class="menu-group">
+            <app-form-id @click="navAccountLog">
+                <view class="menu-item flex dir-left-nowrap">
+                    <view class="box-grow-1 cross-center">收支记录</view>
+                    <view class="box-grow-0 cross-center">
+                        <icon class="icon-arrow-right" type></icon>
+                    </view>
+                </view>
+            </app-form-id>
+            <app-form-id @click="navCashLog">
+                <view class="menu-item flex dir-left-nowrap">
+                    <view class="box-grow-1 cross-center">提现记录</view>
+                    <view class="box-grow-0 cross-center">
+                        <icon class="icon-arrow-right" type></icon>
+                    </view>
+                </view>
+            </app-form-id>
+
+            <app-form-id @click="navSettleDetailN">
+                <view class="menu-item flex dir-left-nowrap weijiesuan">
+                    <view class="box-grow-1 cross-center">未结算金额</view>
+                    <view class="box-grow-0 cross-center">
+                        <text>¥{{not_close_money}}</text>
+                        <icon class="icon-arrow-right" type></icon>
+                    </view>
+                </view>
+            </app-form-id>
+            <app-form-id @click="navSettleDetailY">
+                <view class="menu-item flex dir-left-nowrap">
+                    <view class="box-grow-1 cross-center">已结算金额</view>
+                    <view class="box-grow-0 cross-center">
+                        <text>¥{{close_money}}</text>
+                        <icon class="icon-arrow-right" type></icon>
+                    </view>
+                </view>
+            </app-form-id>
+        </view>
+        <view class="footer">
+            <view @click="showDesc">交易手续费说明</view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import {mapState} from 'vuex';
+
+    export default {
+        name: "account",
+        components: {},
+        computed: {
+            ...mapState({
+                appImg: state => state.mallConfig.plugin.mch.app_image,
+            }),
+        },
+        data() {
+            return {
+                account_money: '--',
+                close_money: '0.00',
+                desc: '',
+                not_close_money: '0.00',
+                transfer_fate: 0,
+
+                mch_id: -1,
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+            // #ifdef MP-BAIDU
+            this.loadData();
+            // #endif
+        },
+
+        onShow: function () {
+            this.loadData();
+        },
+
+        methods: {
+            navCash() {
+                uni.navigateTo({url: `/plugins/mch/mch/cash/cash?mch_id=` + this.mch_id + `&account_money=` + this.account_money})
+            },
+            navAccountLog() {
+                uni.navigateTo({url: `/plugins/mch/mch/account-log/account-log?mch_id=` + this.mch_id})
+            },
+            navCashLog() {
+                uni.navigateTo({url: `/plugins/mch/mch/cash-log/cash-log?mch_id=` + this.mch_id})
+            },
+            navSettleDetailN() {
+                uni.navigateTo({url: `/plugins/mch/mch/settle-detail/settle-detail?is_transfer=0&mch_id=` + this.mch_id})
+            },
+            navSettleDetailY() {
+                uni.navigateTo({url: `/plugins/mch/mch/settle-detail/settle-detail?is_transfer=1&mch_id=` + this.mch_id})
+            },
+            loadData: function () {
+                const self = this;
+                if (self.mch_id <= 0) return
+                self.$showLoading();
+
+                self.$request({
+                    url: self.$api.mch.property,
+                    data: {
+                        mch_id: self.mch_id,
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    [
+                        self.account_money,
+                        self.close_money,
+                        self.desc,
+                        self.not_close_money,
+                        self.transfer_fate
+                    ] = [
+                        info.data.account_money,
+                        info.data.close_money,
+                        info.data.desc,
+                        info.data.not_close_money,
+                        info.data.transfer_fate
+                    ];
+                }).catch(e => {
+                    self.$hideLoading();
+                });
+            },
+
+            showDesc: function () {
+                uni.showModal({
+                    title: '交易手续费说明',
+                    content: this.desc,
+                    showCancel: false,
+                });
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .icon-arrow-right {
+        width: #{12rpx};
+        height: #{22rpx};
+        margin-left: #{12rpx};
+        background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png");
+        background-repeat: no-repeat;
+        background-size: 100% auto;
+    }
+
+    .header-h {
+        position: relative;
+        text-align: center;
+        height: #{324rpx};
+        color: #fff;
+        z-index: 10;
+
+        .header-bg {
+            position: absolute;
+            z-index: 0;
+            left: 0;
+            top: 0;
+            width: 100%;
+        }
+
+        .header-box {
+            position: relative;
+            height: 100%;
+
+            .account {
+                font-size: #{26rpx};
+                margin-bottom: #{40rpx};
+            }
+
+            .money {
+                font-size: #{88rpx};
+                font-weight: bold;
+                line-height: 1;
+                margin-bottom: #{40rpx};
+            }
+
+            .cash-btn {
+                display: inline-block;
+                height: #{56rpx};
+                line-height: #{56rpx};
+                padding: 0 #{60rpx};
+                border: #{1rpx} solid #fff;
+                font-size: #{28rpx};
+                border-radius: #{28rpx};
+            }
+        }
+    }
+
+    .menu-group {
+        font-size: #{28rpx};
+        color: #353535;
+        margin: #{16rpx} 0;
+    }
+
+    .menu-item {
+        background: #fff;
+        height: #{88rpx};
+        border-bottom: #{1rpx} solid #eee;
+        padding: 0 #{24rpx};
+    }
+
+    .menu-item.weijiesuan {
+        margin-top: #{20rpx};
+    }
+
+    .menu-item text {
+        color: #666666;
+    }
+
+    .footer {
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        width: 100%;
+        text-align: center;
+        padding-bottom: #{56rpx};
+
+        view {
+            font-size: #{28rpx};
+            padding: #{12rpx};
+            display: inline-block;
+            color: #397ed3
+        }
+    }
+</style>

+ 1797 - 0
src/plugins/mch/mch/add-goods/add-goods.vue

xqd
@@ -0,0 +1,1797 @@
+<template>
+    <view>
+        <app-layout>
+        <view :class="[`${beMove?'screen':''}`]" :style="{'height':`${!beMove?'100%':(height / 2)+'px'}`}">
+            <view class='title'>基本信息</view>
+            <view class='goods-img'>
+                <view class='label'>
+                    <text>商品图片</text>
+                    <text class="label-info">(最多9张,可拖拽改变顺序)</text>
+                </view>
+                <view class='goods-list'>
+                    <movable-area style="height: auto; width: 100%;" class="flex-wrap">
+                        <view @touchend.stop='touchend' @touchmove.stop='touchm' @longpress.stop='_longtap(item.pic_url,index,$event)' class='goods-item' v-for="(item,index) in img" :key="index">
+                            <image mode="aspectFill" class='goods-cover move-img' :data-index="index" :src="item.pic_url"></image>
+                            <image @click.stop='del_img(index)' v-if="!beMove" class='del-btn' src='/plugins/mch/image/delete.png'></image>
+                            <view v-if="index == 0 && !beMove" class='main-img'>主图</view>
+                        </view>
+                        <view v-if="img.length < 9" @click.stop='add_img' class='add-goods-img'>
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/add-goods.png'></image>
+                            <view>添加</view>
+                        </view>
+                        <movable-view :data-index="beginIndex" :x="x" :y="y" direction="all" :damping="5000" :friction="1" :disabled="disabled">
+                            <image :hidden='imgHidden' mode="aspectFill" class="goods-cover img-border" :src='img_src'></image>
+                        </movable-view>
+                    </movable-area>
+                </view>
+            </view>
+            <view class='goods-info'>
+                <view class='info-item goods-name cross-center dir-left-nowrap'>
+                    <view class="form-label">商品名称</view>
+                    <view @click="nameBlur" v-if="inputName" :class="form.name.length > 0 ? 'input' : 'input placeholder'">{{form.name ? form.name :'请输入商品名称'}}</view>
+                    <input :focus="!inputName" @blur="nameBlur" v-else class='input' placeholder-style="color: #cdcdcd" placeholder="请输入商品名称" v-model='form.name'/>
+                </view>
+                <view class='info-item cross-center main-between'>
+                    <view class="form-label">商品分类</view>
+                    <view @click="chooseCat('mall')">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text v-if="beCat.length > 0">编辑</text>
+                            <text v-else>未选择</text>
+                        </view>
+                    </view>
+                </view>
+                <view class='info-item cross-center main-between'>
+                    <view class="form-label">多商户分类</view>
+                    <view @click="chooseCat('mch')">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text v-if="beMchCat.length > 0">编辑</text>
+                            <text v-else>未选择</text>
+                        </view>
+                    </view>
+                </view>
+                <view class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">单位</view>
+                    <view class='dir-left-nowrap cross-center'>
+                        <input maxlength="4" placeholder-style="color: #cdcdcd" placeholder="请输入商品单位" v-model='unit' class='input'/>
+                    </view>
+                </view>
+            </view>
+            <view class='title'>规格、价格及库存</view>
+            <view class='goods-info'>
+                <view class='info-item main-between'>
+                    <view>多规格</view>
+                    <switch style="transform:scale(0.7)" :checked="set_attr" @change="set_attr = !set_attr"></switch>
+                </view>
+                <view v-if="set_attr" class='info-item cross-center main-between'>
+                    <view class="form-label">商品规格</view>
+                    <view @click="chooseAttr">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text v-if="attr">已设置</text>
+                            <text style="color: #cdcdcd" v-else>未设置,点击设置</text>
+                        </view>
+                    </view>
+                </view>
+                <view v-if="!set_attr" class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">规格</view>
+                    <view class='dir-left-nowrap cross-center price-input'>
+                        <input class='input' placeholder-style="color: #cdcdcd" v-model='form.attr_default_name'></input>
+                    </view>
+                </view>
+                <view class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">成本价</view>
+                    <view class='dir-left-nowrap price-input cross-center main-between'>
+                        <input @change="costChange" placeholder-style="color: #cdcdcd" placeholder="请输入成本价" type='digit' class='input' v-model="form.cost_price"></input>
+                        <view>元</view>
+                    </view>
+                </view>
+                <view class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">原价</view>
+                    <view class='dir-left-nowrap price-input cross-center main-between'>
+                        <input @change="originalChange" placeholder-style="color: #cdcdcd" placeholder="请输入原价" type='digit' class='input' v-model="form.original_price"></input>
+                        <view>元</view>
+                    </view>
+                </view>
+                <view class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">售价</view>
+                    <view class='dir-left-nowrap price-input cross-center main-between'>
+                        <input @change="priceChange" placeholder-style="color: #cdcdcd" placeholder="请输入售价" type='digit' class='input' v-model="form.price"></input>
+                        <view>元</view>
+                    </view>
+                </view>
+                <view v-if="!set_attr" class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">库存</view>
+                    <view class='dir-left-nowrap price-input cross-center main-between'>
+                        <input placeholder-style="color: #cdcdcd" placeholder="请输入库存" type='number' v-model="form.goods_num" class='input unit'></input>
+                            <view class="unit-width">{{unit}}</view>
+                    </view>
+                </view>
+                <view v-if="!set_attr" class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">货号</view>
+                    <view class='dir-left-nowrap price-input cross-center'>
+                        <input placeholder-style="color: #cdcdcd" placeholder="请输入货号" class='input' v-model="form.goods_no"></input>
+                    </view>
+                </view>
+                <view v-if="!set_attr" class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">重量</view>
+                    <view class='dir-left-nowrap cross-center price-input'>
+                        <input placeholder-style="color: #cdcdcd" placeholder="请输入重量" type='number' v-model='form.goods_weight' class='input'></input>
+                        <view>g</view>
+                    </view>
+                </view>
+            </view>
+            <view class='title'>运费、包邮及限购</view>
+            <view class='goods-info'>
+                <view class='info-item cross-center main-between' style="border-top:0">
+                    <view class="form-label">运费设置</view>
+                    <view @click="chooseExpress">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text v-if="bePostage.id > -1">{{bePostage.name}}</text>
+                            <text v-else>未选择</text>
+                        </view>
+                    </view>
+                </view>
+                <view class='info-item cross-center main-between' v-if="form.type == 'goods'">
+                    <view class="form-label">包邮规则</view>
+                    <view @click="chooseDelivery">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text v-if="beDelivery.id > -1">{{beDelivery.name}}</text>
+                            <text style="color: #cdcdcd" v-else>未选择</text>
+                        </view>
+                    </view>
+                </view>
+                <view class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">起售数量</view>
+                    <view class='dir-left-nowrap cross-center price-input'>
+                        <view class='dir-left-nowrap cross-center price-input'>
+                            <input placeholder-style="color: #cdcdcd" style="width:396rpx;" placeholder="请输入起售数量" type='number' v-model='form.min_number' class='input'></input>
+                            <view>{{unit}}</view>
+                        </view>
+                    </view>
+                </view>
+                <view class='info-item main-between'>
+                    <view>限购</view>
+                    <switch style="transform:scale(0.7)" :checked="confine" @change="changeConfine"></switch>
+                </view>
+                <view v-if="confine" class='info-item cross-center dir-left-nowrap'>
+                    <view class="form-label">终身限购</view>
+                    <view class="select">
+						<radio-group @change="limitBuyFirstChange" class="dir-left-nowrap main-between">
+							<label class="dir-left-nowrap">
+								<view>
+									<radio color="#446dfd" value="1" :checked="limit_buy_first"/>
+								</view>
+								<view class="select-label">无限制</view>
+							</label>
+							<label class="dir-left-nowrap">
+								<view>
+									<radio color="#446dfd" value="0" :checked="!limit_buy_first"/>
+								</view>
+								<view class="select-label" >手动输入</view>
+							</label>
+						</radio-group>
+					</view>
+                </view>
+                <view class='info-item cross-center dir-left-nowrap' v-if="confine && !limit_buy_first">
+                    <view class="form-label">终身限购数量</view>
+                    <view class='dir-left-nowrap cross-center price-input'>
+                        <view class='dir-left-nowrap cross-center price-input'>
+                            <input placeholder-style="color: #cdcdcd" style="width:396rpx;" placeholder="请输入终身限购数量" type='number' v-model='form.confine_count' class='input'></input>
+                            <view>{{unit}}</view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view class='title'>商品图文描述</view>
+            <view class='goods-info'>
+                <view class='info-item cross-center main-between' style="border-top:0">
+                    <view class="form-label">商品图文描述</view>
+                    <view @click="toGoodsDetail">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text v-if="goods_detail.length > 0">已添加</text>
+                            <text v-else>未添加</text>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view class='title'>服务内容</view>
+            <view class='goods-info'>
+                <view class='info-item main-between'>
+                    <view>默认服务</view>
+                    <switch style="transform:scale(0.7)" :checked="is_default_services" @change="is_default_services=!is_default_services"></switch>
+                </view>
+                <view v-if="is_default_services == 0" class='info-item cross-center main-between'>
+                    <view class="form-label">服务内容</view>
+                    <view @click="chooseService">
+                        <view class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text class="service-text" v-if="beService.length > 0">
+                                <text v-for="(item,index) in beService" :key="index">
+                                    <text v-if="index > 0">,</text>
+                                    {{item.name}}
+                                </text>
+                            </text>
+                            <text style="color: #cdcdcd" v-else-if="service.length > 0">未选择</text>
+                            <text style="color: #cdcdcd" v-else>未设置</text>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view @click="submit">
+                <view class='send'>{{id > 0 ? '保存' : '上架'}}</view>
+            </view>
+        </view>
+        <view class='dialog' v-if="is_service">
+            <view class='dialog-item'>
+                <view class='dialog-title'>服务内容</view>
+                <view v-if="is_service" v-for="(item,index) in service" :key="index" @click='choose(item)' class="dir-left-nowrap type-choose" >
+                    <image v-if="item.isChoose" class="active-status" src='https://shop.9026.com/web/statics/img/mall/mch/apply-ok.png'></image>
+                    <image v-else class="active-status" src='https://shop.9026.com/web/statics/image/mall/static/icon/form-er.png'></image>
+                    <view :class="[`${item.isChoose ? 'active':''}`]">{{item.name}}</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancelService'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='submitService'>确认</view>
+                </view>
+            </view>
+        </view>
+        <view :class="['dialog', `${iphone_x?'iphone_x':''}`]" v-if="dialog">
+            <view class="picker-list">
+                <view class="main-between picker-header">
+                    <view @click="toggle">取消</view>
+                    <view @click="toggle(1)">确定</view>
+                </view>
+                <picker-view v-if="dialogType == 'postage'" :value="[set_postage?postageIndex:-1]" class="picker" @change="bindChange">
+                    <picker-view-column>
+                        <view v-for="(item,idx) in postage" :key="item.id"
+                        :class="[`cross-center picker-text`,{
+                            'sure-color': newIndex == idx,
+                            'cardinal-color': newIndex == idx + 1 || newIndex == idx - 1,
+                            'even-color': newIndex == idx + 2 || newIndex == idx - 2,
+                        }]">{{item.name}}</view>
+                    </picker-view-column>
+                </picker-view>
+                <picker-view v-if="dialogType == 'delivery'" :value="[set_delivery?deliveryIndex:-1]" class="picker" @change="bindChange">
+                    <picker-view-column>
+                        <view v-for="(item,idx) in delivery" :key="item.id"
+                        :class="[`cross-center picker-text`,{
+                            'sure-color': newIndex == idx,
+                            'cardinal-color': newIndex == idx + 1 || newIndex == idx - 1,
+                            'even-color': newIndex == idx + 2 || newIndex == idx - 2,
+                        }]">{{item.name}}</view>
+                    </picker-view-column>
+                </picker-view>
+            </view>
+        </view>
+        <view class='dialog' v-if="modal">
+            <view class='dialog-item'>
+                <view class='dialog-title'>提示</view>
+                <view class="error-info" v-if="set_cat">您暂未设置分类<br/>请前往商城后台设置</view>
+                <view class="error-info" v-if="set_mch_cat && mch_cat.length == 0">您暂未设置多商户分类<br/>请前往商城后台设置</view>
+                <view class="error-info" v-if="set_postage && postage.length == 0">您暂未设置运费模板<br/>请前往商城后台设置</view>
+                <view class="error-info" v-if="set_service && service.length == 0">您暂未设置服务内容<br/>请前往商城后台设置</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn be-submit" @click='close'>确认</view>
+                </view>
+            </view>
+        </view>
+        <view class='dialog' v-if="error">
+            <view class='dialog-item'>
+                <view class='dialog-title'>提示</view>
+                <view class="error-info">{{error}}</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn be-submit" @click='close'>确认</view>
+                </view>
+            </view>
+        </view>
+        <view class='dialog' v-if="beSubmit">
+            <view class='dialog-item'>
+                <view class='dialog-title'>提示</view>
+                <view class="submit-info">是否确认添加此商品</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toSubmit'>确认</view>
+                </view>
+            </view>
+        </view>
+        </app-layout>
+    </view>
+</template>
+
+<script>
+
+    import { mapState } from "vuex";
+    import uploadFile from '../../../../core/upload.js';
+
+    export default {
+        data() {
+            return {
+                id: 0,
+                postageIndex: -1,
+                deliveryIndex: -1,
+                height: 0,
+                beSubmit: false,
+                form: {
+                    cats: [],
+                    mchCats: [],
+                    name: '',
+                    cost_price: '',
+                    price: '',
+                    original_price: '',
+                    type: 'goods',
+                    attr_default_name: '默认规格'
+                },
+                forehead: -1,
+                unit: '件',
+                set_attr: false,
+                iphone_x: false,
+                modal: false,
+                error: false,
+                set_cat: false,
+                set_mch_cat: false,
+                set_postage: false,
+                set_delivery: false,
+                set_service: false,
+                is_default_services: true,
+                confine: false,
+                is_service: false,
+                img: [],
+                cat: [],
+                mch: 0,
+                mch_cat: [],
+                goods_detail: [],
+                beMove: false,
+                service: [],
+                postage: [],
+                beCat: [],
+                beMchCat: [],
+                isChooseCat: ['未选择'],
+                delivery: [],
+                bePostage: '',
+                beDelivery: '',
+                beService: [],
+                newIndex: '0',
+                index: '0',
+                attr: false,
+                have_children: false,
+                disabled: true,
+                imgHidden: true,
+                flag: false,
+                x: 0,
+                y: 0,
+                first_service: true,
+                choose_list: [],
+                elements: [],
+                img_src: '',
+                dialogType: '',
+                dialog: false,
+                inputName: true,
+                beginIndex: null,
+                loading: false,
+				limit_buy_status: 0,
+				min_number: 1,
+				limit_buy_first: true,
+				limit_buy_second: true,
+				limit_buy_type: 'day',
+				limit_buy_value: -1,
+            }
+        },
+      
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+                adminImg: state => state.mallConfig.__wxapp_img.app_admin,
+            })
+        },
+        methods: {
+            bindChange(e) {
+                this.newIndex = e.detail.value[0]
+            },
+            toggle(status) {
+                this.choose_list = [];
+                this.dialog = false;
+                this.set_cat = false;
+                if(this.dialogType == 'postage') {
+                    if (status == 1) {
+                        if (this.set_postage) {
+                            this.bePostage = this.postage[this.newIndex];
+                        }
+                    }else {
+                        this.set_postage = false;
+                    }
+                }
+                if(this.dialogType == 'delivery') {
+                    if (status == 1) {
+                        if (this.set_delivery) {
+                            this.beDelivery = this.delivery[this.newIndex];
+                        }
+                    }else {
+                        this.set_delivery = false;
+                    }
+                }
+                this.dialogType = '';
+            },
+            money(val) {
+              let num = val.toString(); //先转换成字符串类型
+              if (num.indexOf('.') == 0) { //第一位就是 .
+                num = '0' + num
+              }
+              num = num.replace(/[^\d.]/g, "");  //清除“数字”和“.”以外的字符
+              num = num.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
+              num = num.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+              num = num.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+              if (num.indexOf(".") < 0 && num != "") {
+                num = parseFloat(num);
+              }
+              return +num
+            },
+            costChange(e) {
+                this.form.cost_price = this.money(e.detail.value)
+            },
+            originalChange(e) {
+                this.form.original_price = this.money(e.detail.value)
+            },
+            priceChange(e) {
+                this.form.price = this.money(e.detail.value)
+            },
+            nameBlur() {
+                this.inputName = !this.inputName;
+            },
+            changeConfine() {
+                this.confine = !this.confine
+                if(this.confine && this.form.confine_count == -1) {
+                    this.form.confine_count = ''
+                }
+            },
+            chooseAttr() {
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/goods-attr/goods-attr'
+                })
+                this.$storage.setStorageSync('goods_unit', this.unit);
+            },
+            toSubmit() {
+                let that = this;
+                if(that.loading) {
+                    return false
+                }
+                uni.showLoading({
+                    title: '提交中...'
+                });
+                that.beSubmit = false;
+                that.loading = true;
+                that.$request({
+                    url: that.$api.mch.edit,
+                    data: {
+                        form: JSON.stringify(that.form),
+                        mch_id: that.mch_id
+                    },
+                    method: 'post'
+                }).then(response=>{
+                    that.loading = false;
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.$hideLoading();
+                        uni.hideLoading();
+                        if(response.code == 0) {
+                            uni.showToast({
+                                title: response.msg,
+                                duration: 1000
+                            });
+                            setTimeout(function() {
+                                uni.navigateBack();
+                            }, 500)
+                        }else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(() => {
+                    that.loading = false;
+                    that.$hideLoading();
+                    uni.hideLoading();
+                });
+            },
+
+            submit() {
+                let pass = false;
+                let that = this;
+                let form = that.form;
+                form.status = this.form.status ? this.form.status : 1
+                form.cats = [];
+                form.mchCats = [];
+                if (that.beCat.length == 0) {
+                    that.error = '请设置商品分类';
+                    return false
+                } else {
+                    that.beCat.forEach(function(row) {
+                        form.cats.push(row.value)
+                    })
+                }
+                if (that.beMchCat.length == 0) {
+                    that.error = '请设置多商户分类';
+                    return false
+                } else {
+                    that.beMchCat.forEach(function(row) {
+                        form.mchCats.push(row.value)
+                    })
+                }
+                if (that.img.length > 0) {
+                    form.pic_url = that.img;
+                } else {
+                    that.error = '请上传商品图片';
+                    return false
+                }
+                if (!form.name) {
+                    that.error = '请设置商品名称';
+                    return false
+                }
+                if (!that.unit) {
+                    that.error = '请设置商品单位';
+                    return false
+                } else {
+                    form.unit = that.unit
+                }
+                if (form.cost_price != 0 && !form.cost_price) {
+                    that.error = '请设置商品成本价';
+                    return false
+                }
+                if (form.cost_price < 0) {
+                    that.error = '成本价不得小于零';
+                    return false
+                }
+                if (form.original_price != 0 && !form.original_price) {
+                    that.error = '请设置商品原价';
+                    return false
+                }
+                if (form.original_price < 0) {
+                    that.error = '商品原价不得小于零';
+                    return false
+                }
+                if (form.price != 0 && !form.price) {
+                    that.error = '请设置商品售价';
+                    return false
+                }
+                if(!that.set_attr) {
+                    form.use_attr = 0;
+                    form.attr = []; 
+                    if (!form.goods_num) {
+                        that.error = '商品库存不得为空';
+                        return false
+                    } else if (form.goods_num < 0) {
+                        that.error = '商品库存不得小于零';
+                        return false
+                    } else {
+                        pass = true;
+                    }
+                }else {
+                    form.use_attr = 1;
+                    form.goods_num = 0;
+                    if (!form.attr_groups || form.attr_groups.length == 0) {
+                        that.error = '请设置商品规格';
+                        return false
+                    }else {
+                        pass = true
+                    }
+                }
+                form.cards = that.goods_card;
+                form.is_default_services = 1;
+                form.services = [];
+				that.form.limit_buy_status = that.confine ? 1 : 0;
+                if(that.is_default_services == 0) {
+                    form.is_default_services = 0;
+                    if (that.beService.length > 0) {
+                        form.services = that.beService;
+                    }
+                }
+                if (that.goods_detail.length > 0) {
+                    form.detail = '';
+                    for(let i in that.goods_detail) {
+                        if(that.goods_detail[i].type == "img") {
+                            form.detail += '<p><img src="' + that.goods_detail[i].pic_url + '"/></p>'
+                        }else if(that.goods_detail[i].type == "line") {
+                            form.detail += '<p><img src="' + that.adminImg.line + '"/></p>'
+                        }else if(that.goods_detail[i].type == "text") {
+                            form.detail += '<p>' + that.goods_detail[i].text + '</p>'
+                        }
+                    }
+                } else {
+                    that.error = '请设置图文描述';
+                    return false
+                }
+                if (that.forehead_integral) {
+                    if (that.forehead_integral > 0) {
+                        form.forehead_integral_type = 1;
+                        form.forehead_integral = that.forehead_integral;
+                    } else {
+                        form.forehead_integral_type = 2;
+                        form.forehead_integral = that.forehead_integral.replace('%', '')
+                    }
+                }
+                if (that.give_integral) {
+                    if (that.give_integral > 0) {
+                        form.give_integral_type = 1;
+                        form.give_integral = that.give_integral;
+                    } else {
+                        form.give_integral_type = 2;
+                        form.give_integral = that.give_integral.replace('%', '')
+                    }
+                }
+                if(!form.virtual_sales) {
+                    form.virtual_sales = 0;
+                }
+                if(!form.cover_pic) {
+                    form.cover_pic = '';
+                }
+                if(!form.sort) {
+                    form.sort = 100;
+                }
+                if(!form.accumulative) {
+                    form.accumulative = 1;
+                }
+                if(!form.member_price) {
+                    form.member_price = {};
+                }
+                form.freight_id = that.bePostage.id;
+                form.freight = that.bePostage;
+                form.shipping_id = that.beDelivery.id;
+                form.shipping = that.beDelivery;
+                if(!form.individual_share) {
+                    form.individual_share = 0;
+                }
+                if(!form.is_level) {
+                    form.is_level = 0;
+                }
+                if(!form.individual_share) {
+                    form.individual_share = 0;
+                }
+                if(!form.video_url) {
+                    form.video_url = '';
+                }
+                form.mch_id = that.mch_id;
+                form.sign = 'mch';
+                if (pass) {
+                    that.form = form;
+                    if(that.id > 0) {
+                        that.form.id = that.id;
+                        that.toSubmit();
+                    }else {
+                        that.beSubmit = true;
+                    }
+                }
+            },
+
+            close() {
+                this.error = null;
+                this.set_cat = false;
+                this.set_mch_cat = false;
+                this.set_postage = false;
+                this.set_service = false;
+                this.modal = false;
+            },
+
+            inputAttr(index) {
+                this.attr[index].attr_list[0].attr_id = (+index + 2).toString();
+            },
+
+            _longtap: function (img_src,index,e) {
+                let that = this;
+                let query = uni.createSelectorQuery();
+                let nodesRef = query.selectAll(".move-img");
+                nodesRef.fields({
+                    dataset: true,
+                    rect: true
+
+                }, (result) => {
+                    that.elements = result;
+                }).exec();
+                // const detail = e.detail;
+                that.img[index].pic_url = '';
+                that.x = e.currentTarget.offsetLeft;
+                that.y = e.currentTarget.offsetTop;
+                that.imgHidden = false;
+                that.flag = true;
+                that.beMove = true;
+                that.img_src = img_src;
+                that.beginIndex = index;
+            },
+            //触摸结束
+            touchend: function (e) {
+                let that = this;
+                if (!that.flag) {
+                    return;
+                }
+                const x = e.changedTouches[0].pageX;
+                const y = e.changedTouches[0].pageY;
+                const list = that.elements;
+                let data = that.img;
+                const beginIndex = that.beginIndex;
+                for (var j = 0; j < list.length; j++) {
+                    const item = list[j];
+                    if (x > item.left && x < item.right && y > item.top && y < item.bottom) {
+                        const endIndex = item.dataset.index;
+                        //向后移动
+                        if (beginIndex < endIndex) {
+                            let tem = data[beginIndex];
+                            for (let i = beginIndex; i < endIndex; i++) {
+                                data[i] = data[i + 1]
+                            }
+                            data[endIndex] = tem;
+                        }
+                        //向前移动
+                        if (beginIndex > endIndex) {
+                            let tem = data[beginIndex];
+                            for (let i = beginIndex; i > endIndex; i--) {
+                                data[i] = data[i - 1]
+                            }
+                            data[endIndex] = tem;
+                        }
+                        data[endIndex].pic_url = that.img_src;
+                        that.img = data;
+                    }
+                }
+                if (!that.img[beginIndex].pic_url) {
+                    that.img[beginIndex].pic_url = that.img_src;
+                }
+                that.imgHidden = true;
+                that.flag = false;
+                that.beMove = false;
+                that.beginIndex = null;
+            },
+            //滑动
+            touchm: function (e) {
+                if (this.flag) {
+                    const x = e.touches[0].pageX;
+                    const y = e.touches[0].pageY;
+                    this.x = x - 60;
+                    this.y = y - 129;
+                }
+            },
+            cancelService() {
+                let beService = this.beService;
+                let service = this.service;
+                if (beService.length > 0) {
+                    service.forEach(function(res) {
+                        res.isChoose = false;
+                        beService.forEach(function(row) {
+                            if (row.id == res.id) {
+                                res.isChoose = true;
+                            }
+                        })
+                    })
+                } else {
+                    service.forEach(function(res) {
+                        res.isChoose = false;
+                    })
+                }
+                this.beService = beService;
+                this.service = service;
+                this.set_service = false;
+                this.is_service = false;
+            },
+
+            submitService() {
+                let beService = [];
+                this.service.forEach(function(row) {
+                    if (row.isChoose) {
+                        beService.push(row)
+                    }
+                });
+                this.beService = beService;
+                this.set_service = false;
+                this.is_service = false;
+            },
+            choose(item) {
+                let that = this;
+                that.service.forEach(function(row) {
+                    if (row.id == item.id) {
+                        row.isChoose = !row.isChoose;
+                        that.$forceUpdate();
+                    }
+                })
+            },
+            toGoodsDetail() {
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/goods-detail/goods-detail?mch_id=' + this.mch_id 
+                })
+            },
+            add_img() {
+                let that = this;
+                let num = 9 - that.img.length;
+                // #ifdef MP
+                uni.chooseImage({
+                    count: num,
+                    sizeType: ['original', 'compressed'],
+                    sourceType: ['album', 'camera'],
+                    success(res) {
+                        // tempFilePath可以作为img标签的src属性显示图片
+                        const tempFilePaths = res.tempFilePaths;
+                        let img = that.img;
+                        tempFilePaths.forEach(function (row, index) {
+                            uni.showLoading({
+                                title: '上传中...'
+                            });
+                            let fileName = '';
+                            
+                            // #ifdef MP-BAIDU
+                            fileName = row.substr(row.lastIndexOf('/') + 1);
+                            // #endif
+                            uploadFile({
+                                url: that.$api.upload.file,
+                                filePath: row,
+                                fileType: 'image',
+                                fileName: fileName,
+                                mch_id: that.mch_id
+                            }).then(res => {
+                                    // #ifndef MP-BAIDU
+                                    const imgInfo = JSON.parse(res.data);
+                                    // #endif
+                                    // #ifdef MP-BAIDU
+                                    const imgInfo = res.data;
+                                    // #endif
+                                    let para = {
+                                        pic_url: imgInfo.data.url,
+                                        id: imgInfo.data.id
+                                    };
+                                    if (imgInfo.code == 0) {
+                                        img.push(para)
+                                    }
+                                    that.img = img;
+                                    if (index == tempFilePaths.length - 1) {
+                                        uni.hideLoading();
+                                    }
+                                })
+                        })
+                    }
+                })
+                // #endif
+
+                // #ifdef H5
+                uni.chooseImage({
+                    count: Number(num),
+                    success: function(e) {
+                        uni.showLoading({
+                            mask: true,
+                            title: '上传中...'
+                        });
+                        for (let i in e.tempFilePaths) {
+                            if (i >= (num - that.img.length)) {
+                                break;
+                            }
+                            let image = new Image();
+                            image.src = e.tempFilePaths[i];
+                            image.onload = () => {
+                                let canvas = document.createElement("canvas");
+                                canvas.width = image.width;
+                                canvas.height = image.height;
+                                let ctx = canvas.getContext("2d");
+                                ctx.drawImage(image, 0, 0, image.width, image.height);
+                                let ext = image.src.substring(image.src.lastIndexOf(".") + 1).toLowerCase();
+                                let dataURL = canvas.toDataURL("image/" + ext);
+                                uploadFile({
+                                    url: that.$api.upload.file,
+                                    maxNum: num,
+                                    success: function({res, header}) {
+                                        that.$request({
+                                            url: that.$api.upload.file + '&name=base64',
+                                            header: header,
+                                            method: 'post',
+                                            data: {
+                                                database: dataURL
+                                            }
+                                        }).then(res => {
+                                            uni.hideLoading();
+                                            if (res.code === 0) {
+                                                that.img.push({
+                                                    pic_url: res.data.url,
+                                                    id: res.data.id
+                                                })
+                                                // if (index === e.tempFilePaths.length - 1) {
+                                                //     uni.hideLoading();
+                                                // }
+                                            } else {
+                                                uni.showModal({
+                                                    title: '',
+                                                    content: res.msg,
+                                                    showCancel: false,
+                                                });
+                                            }
+                                        })
+                                    }
+                                });
+                            };
+                        }
+                    }
+                });
+                // #endif
+            },
+            del_img(index) {
+                this.img.splice(index, 1);
+            },
+            chooseCat(type) {
+                uni.navigateTo({
+                    url: '/pages/goods-edit/goods-cat/goods-cat?type=' + type + '&mch_id='+this.mch_id
+                })
+            },
+            chooseService() {
+                let that = this;
+                if(that.first_service) {
+                    that.$request({
+                        url: that.$api.mch.service,
+                        data: {
+                            mch_id: that.mch_id
+                        }
+                    }).then(response =>{
+                        that.$hideLoading();
+                        if(response.code == 0) {
+                            that.service = response.data.list;
+                            if (response.data.list.length == 0) {
+                                that.modal = true;
+                            } else {
+                                that.is_service = true;
+                            }
+                            let beService = [];
+                            for(let row of response.data.list) {
+                                row.isChoose = false
+                                if(that.is_default_services == 1) {
+                                    if (row.is_default == 1) {
+                                        beService.push(row);
+                                        row.isChoose = true
+                                    }
+                                }else {
+                                    for(let item of that.beService) {
+                                        if(row.id == item.id) {
+                                            row.isChoose = true
+                                        }
+                                    }
+                                }
+                            }
+                            that.set_service = true;
+                            if(that.is_default_services == 1) {
+                                that.beService = beService;
+                                that.default_service = beService;
+                            }
+                            that.first_service = false;
+                        }else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(() => {
+                        that.$hideLoading();
+                    });
+                }else {
+                    if (that.service.length == 0) {
+                        that.modal = true;
+                    } else {
+                        that.is_service = true;
+                    }
+                }
+            },
+            chooseExpress() {
+                let that = this;
+                that.$request({
+                    url: that.$api.mch.postage,
+                    data: {
+                        mch_id: that.mch_id
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        if (response.data.list.length == 0) {
+                            that.set_postage = true;
+                            that.modal = true;
+                            that.postage = response.data.list;
+                        } else {
+                            let arr = [];
+                            response.data.list.forEach(function (row, index) {
+                                arr.push(response.data.list[index].id)
+                            });
+                            let index = arr.indexOf(that.bePostage.id);
+                            if(index > -1) {
+                                that.postageIndex = +index;
+                                that.newIndex = +index;
+                            }else {
+                                that.bePostage = ''
+                            }
+                            that.set_postage = true;
+                            that.dialog = true;
+                            that.dialogType = 'postage'
+                            that.postage = response.data.list;
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(() => {
+                    that.$hideLoading();
+                });
+            },
+            chooseDelivery() {
+                let that = this;
+                that.$request({
+                    url: that.$api.mch.delivery_rules,
+                    data: {
+                        mch_id: that.mch_id
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        if (response.data.list.length == 0) {
+                            that.set_delivery = true;
+                            that.modal = true;
+                            that.delivery = response.data.list;
+                        } else {
+                            let arr = [];
+                            response.data.list.forEach(function (row, index) {
+                                arr.push(response.data.list[index].id)
+                            });
+                            let index = arr.indexOf(that.beDelivery.id);
+                            if(index > -1) {
+                                that.deliveryIndex = +index;
+                                that.newIndex = +index;
+                            }else {
+                                that.beDelivery = ''
+                            }
+                            that.set_delivery = true;
+                            that.dialog = true;
+                            that.dialogType = 'delivery'
+                            that.delivery = response.data.list;
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(() => {
+                    that.$hideLoading();
+                });
+            },
+            getService() {
+                let that = this;
+                that.$request({
+                    url: that.$api.mch.service,
+                    data: {
+                        mch_id: that.mch_id
+                    }
+                }).then(response =>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.service = response.data.list;
+                        for(let i in that.service) {
+                            that.service[i].isChoose = false;
+                        }
+                        if(id > 0) {
+                            for(let j in that.beService) {
+                                for(let i in that.service) {
+                                    if(that.service[i].id == that.beService[j].id) {
+                                        that.service[i].isChoose = true;
+                                        that.first_service = false;
+                                    }
+                                }
+                            }
+                        }else {
+                            that.beService = [];
+                            data.list.forEach(function(row) {
+                                row.isChoose = false;
+                                if (row.is_default == 1) {
+                                    that.beService.push(row);
+                                    row.isChoose = true
+                                }
+                            })
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(() => {
+                    that.$hideLoading();
+                });
+            },
+            getPostage(id) {
+                let that = this;
+                that.$request({
+                    url: that.$api.mch.postage,
+                    data: {
+                        mch_id: that.mch_id
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.postage = response.data.list;
+                        if(id > 0) {
+                            return false;
+                        }else {
+                            that.bePostage = '';
+                            that.bePostage = response.data.list[0];
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(() => {
+                    that.$hideLoading();
+                });
+            },
+            getDelivery(id) {
+                let that = this;
+                this.$request({
+                    url: this.$api.mch.delivery_rules,
+                    data: {
+                        mch_id: that.mch_id
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.delivery = response.data.list;
+                        if(id > 0) {
+                            return false;
+                        }else {
+                            that.beDelivery = '';
+                            that.beDelivery = response.data.list[0];
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(() => {
+                    that.$hideLoading();
+                });
+            },
+            async getDetail(id) {
+                const res = await this.$request({
+                    url: this.$api.mch.goods_edit,
+                    data: {
+                        id: id,
+                        mch_id: this.mch_id
+                    }
+                });
+                let { code, data, msg } = res;
+                await this.$hideLoading();
+                this.getService(id);
+                this.getPostage(id);
+                this.getDelivery(id);
+                if(code === 0) {
+                    this.form = data.detail;
+                    let {
+                        pic_url, cats, use_attr, mchCats,
+                        services, freight, cards,
+                        confine_count, is_default_services, forehead_integral,
+                        forehead_integral_type, give_integral, give_integral_type,
+                        attr_groups, attr, detail, unit, shipping, min_number, limit_buy_status,
+						limit_buy_type, limit_buy_value,
+                    } = this.form;
+                    this.img = pic_url;
+                    this.beCat = cats;
+                    this.beMchCat = mchCats;
+                    this.set_attr = use_attr == 1 ? true : false;
+                    this.beService = services;
+                    this.bePostage = freight;
+                    this.goods_card = cards;
+                    this.beDelivery = shipping;
+                    this.unit = unit;
+                    this.min_number = min_number;
+
+                    if(limit_buy_status == 1) {
+                        this.confine = true;
+                    }
+					
+					if (confine_count > 0) {
+						this.limit_buy_first = false;
+					}
+					if (limit_buy_value > 0) {
+						this.limit_buy_second= false;
+					}
+
+                    if(is_default_services == 0) this.is_default_services = false;
+
+                    this.forehead_integral = +forehead_integral;
+                    if(forehead_integral_type == 2) this.forehead_integral = forehead_integral + '%';
+
+                    this.give_integral = +give_integral;
+                    if(give_integral_type == 2) this.give_integral = give_integral + '%';
+
+                    if(attr_groups.length > 0 && attr.length > 0) {
+                        this.attr = true;
+                        this.$storage.setStorageSync('goods_attr_groups', attr_groups);
+                        this.$storage.setStorageSync('goods_attr', attr);
+                    }
+                    let form_detail = detail.split(/<\/p>|<br\/>|<img /);
+                    let good_detail = [];
+
+                    let para = undefined;
+
+                    for(let i in form_detail) {
+                        form_detail[i] =  form_detail[i].replace(/<p>/g, '').replace(/<\/p>/g, '');
+                        para = {type: ''};
+                        if(form_detail[i].indexOf('src') > -1) {
+                            para.type = 'img';
+                            para.id = '';
+                            let end = form_detail[i].indexOf('.png') > -1 ? form_detail[i].indexOf('.png') + 4 : form_detail[i].length -1;
+                            if(form_detail[i].indexOf('.jpg') > -1) {
+                                end = form_detail[i].indexOf('.jpg') + 4
+                            }
+                            if(form_detail[i].indexOf('.jpeg') > -1) {
+                                end = form_detail[i].indexOf('.jpeg') + 5
+                            }
+                            if(form_detail[i].indexOf('.gif') > -1) {
+                                end = form_detail[i].indexOf('.gif') + 4
+                            }
+                            para.pic_url = form_detail[i].slice(form_detail[i].indexOf('http'), end);
+                        }else {
+                            para.type = 'text';
+                            para.text = form_detail[i];
+                        }
+                        good_detail[i] = para;
+                    }
+
+                    for(let i in good_detail) {
+                        if(good_detail[i].text === '') {
+                            good_detail.splice(i,1);
+                        }
+                    }
+                    this.goods_detail = good_detail;
+                    this.$storage.setStorageSync('goods_card', cards);
+                    this.$storage.setStorageSync('mch_goods_cat', this.beCat);
+                    this.$storage.setStorageSync('mch_goods_mch_cat', this.beMchCat);
+                    this.$storage.setStorageSync('goods_detail', good_detail);
+                }else {
+                    uni.showToast({
+                        title: msg,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                }
+            },
+			limitBuyFirstChange(e) {
+				if (e.target.value === '1') {
+					this.limit_buy_first = true;
+					this.form.confine_count = -1;
+				} else {
+					this.limit_buy_first = false;
+					this.form.confine_count = '';
+				}
+			}
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            });
+            that.mch_id = options.mch_id;
+            uni.getSystemInfo({
+                success: function (res) {
+                    let clientHeight = res.windowHeight;
+                    let clientWidth = res.windowWidth;
+                    let ratio = 750 / clientWidth;
+                    that.height = clientHeight * ratio;
+                }
+            });
+            this.$storage.removeStorageSync('mch_goods_cat');
+            this.$storage.removeStorageSync('mch_goods_mch_cat');
+            this.$storage.removeStorageSync('goods_unit');
+            this.$storage.removeStorageSync('goods_attr_groups');
+            this.$storage.removeStorageSync('goods_attr');
+            this.$storage.removeStorageSync('temp_attr');
+            this.$storage.removeStorageSync('temp_attr_info');
+            this.$storage.removeStorageSync('goods_detail');
+            that.goods_card = [];
+            that.goods_detail = [];
+            if(options.id > 0) {
+                that.$showLoading({
+                    type: 'global',
+                    text: '加载中...'
+                });
+                that.id = options.id;
+                setTimeout(()=>{
+                    uni.setNavigationBarTitle({
+                        title: '编辑商品',
+                    });
+                    that.getDetail(options.id);
+                },500);
+            }else {
+                that.getService();
+                that.getPostage();
+                that.getDelivery();
+            }
+        },
+        onShow() {
+            this.goods_card = this.$storage.getStorageSync('goods_card') ? this.$storage.getStorageSync('goods_card') : [];
+            this.beCat = this.$storage.getStorageSync('mch_goods_cat') ? this.$storage.getStorageSync('mch_goods_cat') : [];
+            this.beMchCat = this.$storage.getStorageSync('mch_goods_mch_cat') ? this.$storage.getStorageSync('mch_goods_mch_cat') : [];
+            this.goods_detail = this.$storage.getStorageSync('goods_detail') ? this.$storage.getStorageSync('goods_detail') : [];
+            this.form.attr = this.$storage.getStorageSync('goods_attr') ? this.$storage.getStorageSync('goods_attr') : [];
+            if(this.$storage.getStorageSync('goods_attr_groups')) {
+                this.form.attr_groups = this.$storage.getStorageSync('goods_attr_groups');
+                this.attr = true;
+            }
+            this.$storage.removeStorageSync('temp_attr');
+            this.$storage.removeStorageSync('temp_attr_info');
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .unit-width {
+        width: #{112rpx};
+        text-align: right;
+    }
+    .title {
+        font-size: #{28rpx};
+        color: #999;
+        margin: #{30rpx} #{24rpx} #{13rpx};
+    }
+
+    .goods-img {
+        background-color: #fff;
+        padding: #{32rpx} #{24rpx};
+    }
+
+    .goods-list {
+        margin-top: #{8rpx};
+        margin-left: #{-24rpx};
+    }
+
+    .goods-item {
+        position: relative;
+        margin-left: #{24rpx};
+        margin-top: #{24rpx};
+        height: #{218rpx};
+        width: #{218rpx};
+    }
+
+    .label {
+        font-size: #{28rpx};
+        color: #999;
+    }
+
+    .goods-cover {
+        height: #{218rpx};
+        width: #{218rpx};
+    }
+
+    .del-btn {
+        height: #{40rpx};
+        width: #{40rpx};
+        position: absolute;
+        right: #{-8rpx};
+        top: #{-16rpx};
+    }
+
+    .main-img {
+        height: #{40rpx};
+        line-height: #{40rpx};
+        width: #{218rpx};
+        text-align: center;
+        font-size: #{24rpx};
+        color: #fff;
+        background-color: rgba(255,69,68, 0.5);
+        position: absolute;
+        bottom: 0;
+        left: 0;
+    }
+
+    .add-goods-img {
+        background-color: #f4f5f9;
+        position: relative;
+        margin-left: #{24rpx};
+        margin-top: #{24rpx};
+        height: #{218rpx};
+        width: #{218rpx};
+        font-size: #{24rpx};
+        color: #999;
+        text-align: center;
+        z-index: 100;
+    }
+
+    .add-goods-img image {
+        height: #{40rpx};
+        width: #{40rpx};
+        margin: #{70rpx} auto #{10rpx};
+    }
+
+    .goods-info {
+        background-color: #fff;
+        padding: 0 #{24rpx};
+        .info-item:first-of-type {
+            border-top: 0;
+        }
+        .info-item.goods-name {
+            border-top: #{1rpx} solid #e2e2e2;
+        }
+    }
+
+    .form-label {
+        width: #{176rpx};
+    }
+
+    .info-item {
+        border-top: #{1rpx} solid #e2e2e2;
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{28rpx};
+        color: #353535;
+    }
+
+    view.input {
+        height: #{80rpx};
+        line-height: #{80rpx};
+        white-space: nowrap;
+        overflow: auto;
+    }
+
+    view.input.placeholder {
+        color: #cdcdcd;
+    }
+
+    .input {
+        width: #{476rpx};
+        background-color: #fff;
+        padding-left: #{25rpx};
+        font-size: #{28rpx};
+    }
+
+    .input.unit {
+        width: #{396rpx};
+    }
+
+    .cat-info {
+        width: #{526rpx};
+        color: #666;
+    }
+
+    .to-more {
+        height: #{24rpx};
+        width: #{12rpx};
+        margin-left: #{10rpx};
+    }
+
+    .price-input {
+        position: relative;
+        color: #666;
+        height: #{88rpx};
+    }
+
+    .money {
+        position: absolute;
+        height: #{88rpx};
+        line-height: #{88rpx};
+        width: #{20rpx};
+        left: 0;
+        top: 0;
+    }
+
+    .attr-info {
+        background-color: #fff;
+        padding: 0 #{24rpx};
+        margin-top: #{20rpx};
+    }
+
+    .attr-input {
+        width: #{638rpx};
+    }
+
+    .attr-input .input {
+        color: #666;
+        width: #{462rpx};
+    }
+
+    .attr-input .input.unit {
+        width: #{330rpx};
+    }
+
+
+    .low-attr {
+        margin-top: #{24rpx};
+        height: #{40rpx};
+        width: #{40rpx};
+        margin-right: #{24rpx};
+    }
+
+    .add-attr {
+        height: #{120rpx};
+        background-color: #fff;
+        padding-top: #{24rpx};
+        border-top: #{1rpx} solid #e2e2e2;
+    }
+
+    .add-attr-btn {
+        height: #{72rpx};
+        width: #{320rpx};
+        border-radius: #{36rpx};
+        border: #{1rpx} solid #ff4544;
+        margin: 0 auto;
+        color: #ff4544;
+        font-size: #{26rpx};
+        line-height: #{72rpx};
+    }
+
+    .add-attr-btn image {
+        height: #{28rpx};
+        width: #{28rpx};
+        margin-right: #{12rpx};
+        margin-top: #{22rpx};
+    }
+
+    .express-setting {
+        height: #{136rpx};
+        padding: #{16rpx} 0 #{20rpx};
+        border-top: #{1rpx} solid #e2e2e2;
+    }
+
+    .express-input {
+        position: relative;
+    }
+
+    .express-input .input {
+        width: #{702rpx};
+        padding-left: #{216rpx};
+    }
+
+    .express-input view {
+        position: absolute;
+        left: 0;
+        z-index: 10;
+    }
+
+    .express-etc {
+        color: #999;
+        font-size: #{24rpx};
+        margin-top: #{16rpx};
+    }
+
+    .send {
+        height: #{80rpx};
+        line-height: #{80rpx};
+        text-align: center;
+        width: #{702rpx};
+        margin: #{80rpx} #{24rpx};
+        font-size: #{28rpx};
+        color: #fff;
+        background-color: #ff4544;
+        border-radius: #{40rpx};
+    }
+
+    .dialog {
+        position: fixed;
+        height: 100%;
+        width: 100%;
+        bottom: 0;
+        left: 0;
+        z-index: 200;
+        background-color: rgba(0, 0, 0, .3);
+    }
+
+    .dialog.iphone_x .picker-list{
+        padding-bottom: #{50rpx};
+    }
+
+    .picker {
+        width: 100%;
+        height: #{440rpx};
+        color: #999999;
+    }
+
+
+    .dialog.iphone_x .picker{
+        height:#{490rpx};
+    }
+
+    .picker-list {
+        background-color: #fff;
+        padding-top: #{20rpx};
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        width: 100%;
+    }
+
+    .picker-header {
+        padding: 0 #{24rpx};
+        color: #ff4544;
+        font-size: #{32rpx};
+    }
+
+    .is_cat {
+        padding: #{50rpx} 0 0 #{24rpx};
+        color: #666666;
+        font-size: #{28rpx};
+        border-bottom: #{1rpx} solid #e2e2e2;
+    }
+
+    .is_cat text {
+        margin-right: #{48rpx};
+        display: inline-block;
+        max-width: #{130rpx};
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
+    .is_cat text:last-of-type {
+        padding-bottom: #{24rpx};
+        color: #ff4544;
+        border-bottom: #{2rpx} solid #ff4544;
+    }
+
+    .type-choose {
+        padding: 0 #{24rpx} 0 #{72rpx};
+        height: #{36rpx};
+        line-height: #{36rpx};
+        color: #353535;
+        font-size: #{32rpx};
+        text-align: left;
+        margin: #{35rpx} 0 #{50rpx};
+    }
+
+    .type-choose .active {
+        color: #ff4544;
+    }
+
+    .active-status {
+        width: #{36rpx};
+        height: #{36rpx};
+        display: block;
+        margin-right: #{24rpx};
+    }
+
+    .attr-btn-item {
+        padding-left: #{88rpx};
+        background-color: #fff;
+    }
+
+    .dialog {
+        position: fixed;
+        height: 100%;
+        width: 100%;
+        bottom: 0;
+        left: 0;
+        z-index: 200;
+        background-color: rgba(0, 0, 0, .3);
+    }
+
+    .dialog-item {
+        padding-top: #{20rpx};
+        position: fixed;
+        top: 30%;
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+        width: #{620rpx};
+        border-radius: #{16rpx};
+        background-color: #fff;
+    }
+
+    .btn-area {
+        height: #{88rpx};
+        position: relative;
+        border-top: #{1rpx} solid #e2e2e2;
+    }
+
+    .btn-area .line {
+        height: #{32rpx};
+        width: #{1rpx};
+        background-color: #e2e2e2;
+        position: absolute;
+        top: #{28rpx};
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+    }
+
+    .submit-btn {
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{32rpx};
+        color: #666;
+        width: #{310rpx};
+        text-align: center;
+    }
+
+    .submit-btn.be-submit {
+        color: #ff4544;
+    }
+
+    .dialog-title {
+        text-align: center;
+        margin: #{15rpx} 0 #{50rpx};
+    }
+
+    .img-border {
+        height: #{250rpx};
+        width: #{250rpx};
+        margin-top: #{-16rpx};
+        margin-left: #{-16rpx}; 
+    }
+
+    .screen {
+        height: 100%;
+        overflow: hidden;
+    }
+
+    .error-info {
+        text-align: center;
+        margin: #{50rpx};
+    }
+
+    .submit-info {
+        text-align:center;
+        margin-bottom: #{60rpx};
+    }
+
+    .picker-text {
+        line-height: #{88rpx};
+        color: #ff4544;
+        font-size: #{32rpx};
+        padding-left: #{24rpx};
+    }
+
+    .integral {
+        font-size:#{28rpx};
+        color:#353535;
+    }
+
+    .integral-info .express-setting {
+        height: #{164rpx};
+    }
+
+    .integral-info .express-setting:first-of-type {
+        border-top:0
+    }
+
+    .label-info {
+        font-size: #{24rpx};
+        color: #999999;
+    }
+
+    .service-text {
+        width: 500rpx;
+        text-align: right;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+	.select {
+		width: #{408upx};
+	}
+	.select-label {
+		font-size: #{26upx};
+		margin-left: #{23upx};
+	}
+</style>

+ 186 - 0
src/plugins/mch/mch/cash-log/cash-log.vue

xqd
@@ -0,0 +1,186 @@
+<template>
+    <app-layout>
+        <view class="list">
+            <view class="account-date main-center cross-center">
+                <image @click="dateLess" class="account-icon"
+                       src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-left.png"></image>
+                <picker mode="date" :value="date" fields="month" @change="dateChange">
+                    <view>{{date_a}}</view>
+                </picker>
+                <image @click="datePlus" class="account-icon"
+                       src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
+            </view>
+            <view class="no-content" v-if="!list || !list.length">暂无记录</view>
+            <view v-else class="account-list">
+                <view v-for="(item, index) in list" :key="index" class="account-item dir-left-nowrap cross-center">
+                    <view class="box-grow-1 left">
+                        <view v-if="item.status==='0'">待审核</view>
+                        <view v-else-if="item.status==='1' && item.transfer_status === '0'">待打款</view>
+                        <view v-else-if="item.status==='1' && item.transfer_status === '1'" class="green">已打款</view>
+                        <view v-else-if="item.status==='1' && item.transfer_status === '2'" class="red">拒绝打款</view>
+                        <view v-else class="red">审核未通过</view>
+                        <view class="created">{{item.created_at}}</view>
+                    </view>
+                    <view class="add-money">{{item.money}}</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "cash-log",
+        components: {},
+        data() {
+            return {
+                page: 1,
+                args: false,
+                load: false,
+                mch_id: 0,
+                list: [],
+
+                date_a: '',
+                data: '',
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+            this.getNowTime(new Date());
+        },
+
+        onReachBottom: function () {
+            const self = this;
+            if (self.args || self.load)
+                return;
+            self.load = true;
+            let page = self.page + 1;
+
+            self.$request({
+                url: self.$api.mch.cash_log,
+                data: {
+                    mch_id: self.mch_id,
+                    page: page,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    [self.page, self.args, self.list] = [page, info.data.list.length === 0, self.list.concat(info.data.list)];
+                }
+                self.load = false;
+            });
+        },
+
+        methods: {
+            getLog: function () {
+                const self = this;
+                self.$showLoading();
+
+                self.$request({
+                    url: self.$api.mch.cash_log,
+                    data: {
+                        mch_id: self.mch_id,
+                        date: self.date
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    self.list = info.data.list;
+                }).catch(e => {
+                    self.$hideLoading();
+                })
+            },
+
+            dateLess: function () {
+                let date = this.date;
+                let d = new Date(date);
+                d.setMonth(d.getMonth() - 1);
+                this.getNowTime(d);
+            },
+            datePlus: function () {
+                let date = this.date;
+                let d = new Date(date);
+                d.setMonth(d.getMonth() + 1);
+                this.getNowTime(d);
+            },
+            dateChange: function (e) {
+                let date = e.detail.value;
+                let d = new Date(date);
+                this.getNowTime(d);
+            },
+
+            getNowTime(date) {
+                let year = date.getFullYear();
+                let month = date.getMonth() + 1;
+                date = [year, month].map((n) => {
+                    n = n.toString()
+                    return n[1] ? n : '0' + n
+                }).join('-');
+                let date_a = date.replace('-', '年') + '月';
+                [this.date, this.date_a, this.page, this.args] = [date, date_a, 1, false];
+                this.getLog();
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .account-date {
+        position: fixed;
+        top: 0;
+        width: #{100%};
+        height: #{80rpx};
+        background: #FFFFFF;
+        color: #353535;
+
+        .account-icon {
+            height: #{20rpx};
+            width: #{12rpx};
+            margin: auto #{84rpx};
+        }
+    }
+
+    .no-content {
+        color: #888;
+        padding: #{200rpx} 0 0 0;
+        text-align: center;
+    }
+
+    .account-list {
+        margin-top: #{80rpx + 16rpx};
+
+        .account-item {
+            background: #FFFFFF;
+            height: #{140rpx};
+            border-bottom: #{1rpx} solid #e2e2e2;
+            padding: 0 #{24rpx};
+
+            .left {
+                margin-right: #{24rpx};
+                font-size: #{28rpx};
+                color: #353535;
+            }
+
+            .red {
+                color: #ff4544;
+            }
+
+            .green {
+                color: #3fc24c;
+            }
+
+            .created {
+                margin-top: #{14rpx};
+                font-size: #{24rpx};
+                color: #666666;
+            }
+
+            .add-money {
+                font-size: #{48rpx};
+                color: #ff4544;
+            }
+        }
+
+        .account-item:last-child {
+            border-bottom: none;
+        }
+    }
+</style>

+ 454 - 0
src/plugins/mch/mch/cash/cash.vue

xqd
@@ -0,0 +1,454 @@
+<template>
+    <app-layout>
+        <view class="cash-head dir-top-nowrap main-center">
+            <view class="cash-account">账户剩余金额:{{account_money}}</view>
+            <view class="dir-left-nowrap cross-center cash-account-input">
+                <view class="box-grow-0 cash-cny">¥</view>
+                <view class="box-grow-1 cross-center">
+                    <input class="cash-input-account" placeholder="输入提现金额" type="digit"
+                           placeholder-style="color:#cdcdcd;font-size:40rpx" v-model="form.cash_money"/>
+                </view>
+            </view>
+
+            <view class="dir-left-nowrap cross-center cash-type" @click="cashTypeModel = true">
+                <view class="box-grow-1">提现方式</view>
+                <view class="box-grow-0">{{cashName}}</view>
+                <image class="box-grow-0 arrow-image" src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
+            </view>
+            <view v-if="pay_type === 'wx'" class="cash-form">
+                <view class="dir-left-nowrap cross-center line">
+                    <view class="box-grow-0 required">姓名</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确的姓名"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.nickname"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center no-line">
+                    <view class="box-grow-0 required">账号</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确微信账号"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.account"/>
+                    </view>
+                </view>
+            </view>
+            <view v-if="pay_type === 'alipay'" class="cash-form">
+                <view class="dir-left-nowrap cross-center line">
+                    <view class="box-grow-0 required">姓名</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确的姓名"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.nickname"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center no-line">
+                    <view class="box-grow-0 required">账号</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确支付宝账号"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.account"/>
+                    </view>
+                </view>
+            </view>
+            <view v-if="pay_type === 'bank'" class="cash-form">
+                <view class="dir-left-nowrap cross-center line">
+                    <view class="box-grow-0 required">开户人</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确的姓名"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.nickname"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center line">
+                    <view class="box-grow-0 required">开户行</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确的银行名称"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.bank_name"/>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap cross-center no-line">
+                    <view class="box-grow-0 required">账号</view>
+                    <view class="box-grow-1">
+                        <input class="cash-input" placeholder="请输入正确银行卡账号"
+                               placeholder-style="color:#cccccc;font-size:28rpx" v-model="form.account"/>
+                    </view>
+                </view>
+            </view>
+            <view class="cash-btn main-center">
+                <app-button @click="submit" height="80" width="702" background="#FF4544" font-size="32" color="#FFFFFF"
+                            round>提交申请
+                </app-button>
+            </view>
+
+            <app-cash-model
+                    :is-auto="is_auto"
+                    :is-wx="is_wx"
+                    :is-alipay="is_alipay"
+                    :is-bank="is_bank"
+                    :is-balance="is_balance"
+                    :pay-type="pay_type"
+                    @change="payTypeChange"
+                    v-model="cashTypeModel"
+            ></app-cash-model>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import appCashModel from "../../../../components/page-component/app-cash-model/app-cash-model";
+
+    export default {
+        name: "cash",
+        components: {appCashModel},
+        data() {
+            return {
+                cashTypeModel: false,
+                is_wx: false,
+                is_alipay: false,
+                is_bank: false,
+                is_balance: false,
+                is_auto: false,
+                form: {
+                    cash_money: '',
+                    account: '',
+                    nickname: '',
+                    bank_name: '',
+                },
+                mch_id: 0,
+                pay_type: '',
+                account_money: '',
+                setting: null,
+                template_message_list: null,
+            }
+        },
+        computed: {
+            cashName() {
+                switch (this.pay_type) {
+                    case 'auto':
+                        // #ifdef MP-WEIXIN
+                        return '微信零钱';
+                        // #endif
+                        // #ifdef MP-ALIPAY
+                        return '支付宝余额';
+                        // #endif
+                        // #ifndef MP-WEIXIN || MP-ALIPAY
+                        return '自动';
+                    // #endif
+                    case 'wx':
+                        return '微信线下打款';
+                    case 'alipay':
+                        return '支付宝线下打款';
+                    case 'bank':
+                        return '银联线下打款';
+                    case 'balance':
+                        return '商城余额';
+                    default:
+                        return;
+                        break;
+                }
+            },
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            const self = this;
+            self.mch_id = options.mch_id;
+            self.account_money = options.account_money;
+
+            self.$showLoading({text: '正在提交'});
+            self.$request({
+                url: self.$api.mch.setting,
+                data: {
+                    mch_id: self.mch_id
+                }
+            }).then(info => {
+                self.$hideLoading();
+                if (info.code === 0) {
+                    let setting = info.data.setting;
+                    [
+                        self.setting,
+                        self.is_wx,
+                        self.is_alipay,
+                        self.is_bank,
+                        self.is_balance,
+                        self.is_auto,
+                        self.template_message_list
+                    ] = [
+                        setting,
+                        setting.cash_type.indexOf('wx') !== -1,
+                        setting.cash_type.indexOf('alipay') !== -1,
+                        setting.cash_type.indexOf('bank') !== -1,
+                        setting.cash_type.indexOf('balance') !== -1,
+                        setting.cash_type.indexOf('auto') !== -1,
+                        info.data.template_message_list,
+                    ];
+                }
+            }).catch(e => {
+                self.$hideLoading();
+            })
+        },
+        methods: {
+            payTypeChange(value) {
+                this.pay_type = value;
+            },
+
+            subscribe(callback) {
+                this.$subscribe(this.template_message_list).then(res => {
+                    callback();
+                }).catch(res => {
+                    callback();
+                });
+            },
+            submit: function (e) {
+                const self = this;
+                let form = self.form;
+                let pay_type = self.pay_type;
+                let cash_max = self.account_money;
+
+                let content = function () {
+                    if (!form.cash_money) {
+                        return "请输入提现金额";
+                    }
+                    let cash = parseFloat(parseFloat(form.cash_money).toFixed(2));
+
+                    if (cash > cash_max) {
+                        return "提现金额不能超过" + cash_max + "元";
+                    }
+                    if (cash < 1) {
+                        return "提现金额不能低于1元";
+                    }
+                    if (!pay_type) {
+                        return "请选择提现方式";
+                    }
+                    if (pay_type === 'wx' || pay_type === 'alipay' || pay_type === 'bank') {
+                        if (!form.nickname) {
+                            return "姓名不能为空";
+                        }
+                        if (!form.account) {
+                            return "账号不能为空";
+                        }
+                    }
+                    if (pay_type === 'bank' && !form.bank_name) {
+                        return "开户行不能为空";
+                    }
+                    if (pay_type === 'balance' || pay_type === 'auto') {
+                    }
+                    return false;
+                }();
+
+                if (content) {
+                    uni.showToast({icon: 'none', title: content});
+                    return
+                }
+                self.subscribe(() => {
+                    self.$showLoading({text: '正在提交'});
+                    self.$request({
+                        url: self.$api.mch.cash_submit,
+                        method: 'POST',
+                        data: {
+                            mch_id: self.mch_id,
+                            money: form.cash_money,
+                            type: self.pay_type,
+                            type_data: JSON.stringify(form),
+                        }
+                    }).then(info => {
+                        self.$hideLoading();
+                        uni.showModal({
+                            title: "提示",
+                            content: info.msg,
+                            showCancel: false,
+                            success: function (e) {
+                                if (e.confirm) {
+                                    if (info.code === 0) {
+                                        uni.redirectTo({url: '/plugins/mch/mch/cash-log/cash-log?mch_id=' + self.mch_id})
+                                    }
+                                }
+                            }
+                        });
+                    }).catch(e => {
+                        self.$hideLoading();
+                    })
+                })
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .cash-type {
+        height: #{120rpx};
+        background: white;
+        color: #353535;
+        font-size: #{32rpx};
+        padding: 0 #{24rpx};
+        margin-top: #{24rpx};
+
+        .arrow-image {
+            width: #{12rpx};
+            height: #{24rpx};
+            display: block;
+            margin-left: #{12rpx};
+        }
+    }
+
+    .cash-type-item {
+        height: #{120rpx};
+        padding-left: #{32rpx};
+
+        > view {
+            height: 100%;
+        }
+
+        .cash-type-box {
+            border-bottom: 1px solid #E2E2E2;
+            padding-right: #{32rpx};
+
+
+            .radio-single {
+                width: #{40rpx};
+                height: #{40rpx};
+                border-radius: 50%;
+                background-color: white;
+                border: #{1rpx} solid #e2e2e2;
+            }
+
+            .radio-single-active {
+                width: #{40rpx};
+                height: #{40rpx};
+                border-radius: 50%;
+                background-repeat: repeat;
+                background-size: 100% 100%;
+                background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/icon-checkbox-checked-a.png");
+            }
+        }
+
+        .icon {
+            height: #{40rpx};
+            width: #{40rpx};
+            margin-right: #{16rpx};
+            display: flex;
+            justify-content: center;
+        }
+    }
+
+    .cash-head {
+        .cash-account {
+            height: #{96rpx};
+            border-bottom: #{1rpx} solid #e2e2e2;
+            padding: 0 #{24rpx};
+            line-height: #{96rpx};
+            font-size: #{32rpx};
+            color: #353535;
+            background: #FFFFFF;
+        }
+
+        .cash-account-input {
+            height: #{160rpx};
+            padding: 0 #{24rpx};
+            background: #FFFFFF;
+
+            .cash-cny {
+                font-size: #{64rpx};
+                color: #ff4544;
+                line-height: 1;
+            }
+
+            .cash-input-account {
+                height: #{160rpx};
+                color: #353535;
+                margin-left: #{24rpx};
+                font-size: #{40rpx};
+            }
+        }
+    }
+
+    .cash-process {
+        background: #FFFFFF;
+        padding: #{32rpx} #{24rpx};
+        margin-top: #{20rpx};
+        font-size: #{28rpx};
+        color: #353535;
+
+        .label {
+            padding-bottom: #{32rpx - 24rpx};
+        }
+
+        .cash-tx {
+            color: #353535;
+            margin: 0 -#{24rpx};
+        }
+
+        .cash-tx .tx-item {
+            margin: 0 #{16rpx};
+            margin-top: #{24rpx};
+            border: #{1rpx} solid #cdcdcd;
+            height: #{68rpx};
+            border-radius: #{34rpx};
+            width: #{210rpx};
+        }
+
+        .tx-item.active {
+            border: #{2rpx} solid #ff4544;
+        }
+
+        .icon {
+            height: #{40rpx};
+            width: #{40rpx};
+            margin-right: #{16rpx};
+            background-size: 100% auto;
+            background-repeat: no-repeat;
+
+        }
+
+        .icon.wechat {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/cash/icon-wechat.png");
+        }
+
+        .icon.alipay {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/cash/icon-alipay.png");
+        }
+
+        .icon.bank {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/cash/icon-bank.png");
+        }
+
+        .icon.balance {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/cash/icon-balance.png");
+        }
+
+        .icon.auto {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/cash/icon-auto.png");
+        }
+    }
+
+    .cash-form {
+        margin-top: #{20rpx};
+        background: #fff;
+        font-size: #{28rpx};
+
+        .line {
+            height: #{88rpx};
+            margin: 0 #{24rpx};
+            border-bottom: 1px solid #ddd;
+        }
+
+        .no-line {
+            height: #{88rpx};
+            margin: 0 #{24rpx};
+        }
+
+        .required {
+            min-width: #{180rpx - 24rpx - 24rpx};
+        }
+
+        .required::before {
+            content: '*';
+            vertical-align: top;
+            color: #ff4544;
+        }
+
+        .cash-input {
+            height: 100%;
+            color: #353535;
+            font-size: #{28rpx};
+        }
+    }
+
+    .cash-btn {
+        margin-top: #{40rpx};
+    }
+</style>

+ 257 - 0
src/plugins/mch/mch/change-add/change-add.vue

xqd
@@ -0,0 +1,257 @@
+<template>
+    <app-layout>
+        <view>
+            <view class="input-list">
+                <view class="dir-left-nowrap input-item">
+                    <view class='label'>收货人</view>
+                    <input name="name" v-model="name">
+                </view>
+                <view class="dir-left-nowrap input-item">
+                    <view class='label'>联系电话</view>
+                    <input name="mobile" type="number" v-model="mobile">
+                </view>
+                <view class="main-between input-item">
+                    <text class="label">所在地区</text>
+                    <app-area-picker @customevent="areaEvent"
+                                     :ids="ids"></app-area-picker>
+                </view>
+                <view class="dir-left-nowrap input-item">
+                    <view class='label'>详细地址</view>
+                    <input name="detail" placeholder="请输入详细地址(最多50字)" maxlength="50" v-model="detail">
+                </view>
+            </view>
+            <button @click="saveAddress" class='address-bottom'>{{!changeAddress ? '确认修改地址' : '确定'}}</button>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import appAreaPicker from '../../../../components/page-component/app-area-picker/app-area-picker.vue';
+
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                ids: [0],
+                list: [],
+                name: '',
+                mobile: '',
+                mch_id: 0,
+                detail: '',
+                order_no: '',
+                province: '',
+                city: '',
+                district: '',
+                order: {},
+                changeAddress: false
+            }
+        },
+        components: {
+            "app-area-picker": appAreaPicker
+        },
+        computed: {
+            ...mapState({
+                theme: state => state.mallConfig.theme,
+                userInfo: state => state.user.info,
+                adminImg: state => state.mallConfig.__wxapp_img.app_admin,
+            })
+        },
+        methods: {
+            areaEvent(data) {
+                if (data) {
+                    this.province = data.province.name;
+                    this.city = data.city.name;
+                    this.district = data.district.name;
+                }
+            },
+            getDistrict() {
+                let that = this;
+                that.$showLoading({
+                    text: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.default.district
+                }).then(response=>{
+                    if(response.code == 0) {
+                        that.list = response.data.list;
+                        that.getList();
+                    }else {
+                        that.$hideLoading();
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+            getList() {
+                let that = this;
+                that.$request({
+                    url: that.$api.mch.order_list,
+                    data: {
+                        status: '-1',
+                        mch_id: that.mch_id,
+                        keyword: that.order_no
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.order = response.data.list[0];
+                        that.name = response.data.list[0].name;
+                        that.mobile = response.data.list[0].mobile;
+                        if(!response.data.list[0].address) {
+                            that.changeAddress = true;
+                            uni.setNavigationBarTitle({
+                                title: '添加收货地址'
+                            });
+                            return false;
+                        }
+                        let arr = response.data.list[0].address.trim().split(" ");
+                        that.detail = arr[arr.length - 1];
+                        let firstList = that.list;
+                        that.ids = [];
+                        firstList.forEach(function(row){
+                            if (row.name == arr[0]) {
+                                that.ids[0] = row.id;
+                                let secList = row
+                                secList.list.forEach(function(res){
+                                    if (res.name == arr[1]) {
+                                        that.ids[1] = res.id;
+                                        let thirList = res;
+                                        thirList.list.forEach(function (e) {
+                                            if (e.name == arr[2]) {
+                                                that.ids[2] = e.id;
+                                            }
+                                        })
+                                    }
+                                })
+                            }
+                        })
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+            saveAddress: function (e) {
+                let that = this;
+                if (!that.province) {
+                    uni.showToast({
+                        title: '地区不能为空',
+                        icon: 'none',
+                        duration: 1000,
+                    });
+                    return;
+                }
+                uni.showLoading({
+                    title: '提交中...'
+                });
+                that.$request({
+                    url: that.$api.mch.update_address,
+                    method: "POST",
+                    data: {
+                        order_id: that.order.id,
+                        mch_id: that.mch_id,
+                        name: that.name,
+                        mobile: that.mobile,
+                        province: that.province,
+                        city: that.city,
+                        district: that.district,
+                        address: that.detail,
+                    }
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            duration: 1000,
+                            icon: 'success',
+                            mask: false
+                        });
+                        setTimeout(function(){
+                            uni.navigateBack();
+                        },500)
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+
+            },
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            if (options.order_no) {
+                that.order_no = options.order_no
+                that.mch_id = options.mch_id
+                that.getDistrict();
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .address-bottom {
+        width: #{702rpx};
+        height: #{80rpx};
+        line-height: #{80rpx};
+        border-radius: #{40rpx};
+        padding: 0;
+        text-align: center;
+        margin: #{40rpx} auto;
+        color: #fff;
+        z-index: 7;
+        font-size: #{28rpx};
+        background-color: #ff4544;
+    }
+
+    .input-list {
+        background-color: #fff;
+        padding-left: #{30rpx};
+    }
+
+    .input-item {
+        border-bottom: #{1rpx} solid #eee;
+        padding: #{24rpx} #{30rpx} #{24rpx} 0;
+        height: #{96rpx};
+        font-size: #{28rpx};
+        color: #495060;
+    }
+
+    .input-item:last-of-type {
+        border-bottom: 0;
+    }
+
+    .input-item .label {
+        width: 20%;
+        height: #{48rpx};
+        line-height: #{48rpx};
+    }
+
+    .input-item input {
+        width: 80%;
+        height: #{48rpx};
+        line-height: #{48rpx};
+        font-size: #{28rpx};
+    }
+</style>

+ 1101 - 0
src/plugins/mch/mch/config/config.vue

xqd
@@ -0,0 +1,1101 @@
+<template>
+    <app-layout>
+        <view class="apply-com">基本信息</view>
+        <view class="white">
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label main-right">联系人</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="realname"
+                           placeholder-class="plugins-mch-config-input"
+                           placeholder="必填"
+                           name="realname"
+                           :value="form.realname"/>
+                </view>
+            </view>
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label main-right">联系电话</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="mobile"
+                           placeholder-class="plugins-mch-config-input"
+                           placeholder="必填"
+                           maxlength="18"
+                           name="mobile"
+                           :value="form.mobile"/>
+                </view>
+            </view>
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label main-right">微信号</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="wechat"
+                           placeholder-class="plugins-mch-config-input"
+                           placeholder="请输入微信号"
+                           name="wechat"
+                           :value="form.wechat"/>
+                </view>
+            </view>
+        </view>
+
+        <view class="apply-com">账号信息</view>
+        <view class="white">
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label main-right">账号</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="username"
+                           name="username"
+                           placeholder="请输入账号"
+                           placeholder-class="plugins-mch-config-input"
+                           :value="form.username"/>
+                </view>
+            </view>
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label main-right">密码</view>
+                <view class="box-grow-1" @click="navPassword">
+                    <view class="dir-left-nowrap cross-center">
+                        <view class="box-grow-1 password">修改密码</view>
+                        <view class="box-grow-0 cross-center">
+                            <icon class="icon-arrow-right" type></icon>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+
+        <view class="apply-com">店铺信息</view>
+        <view class="white">
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">店铺名称</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="name"
+                           placeholder-class="plugins-mch-config-input"
+                           placeholder="必填"
+                           :value="form.name"/>
+                </view>
+            </view>
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">营业状态</view>
+                <view class="box-grow-1 dir-right-nowrap">
+                    <view @click="form.is_open = form.is_open == 1? 2: 1" class="switch-view"  :class="{'app-switch-view':form.is_open == 1 }">
+                        <view class="click" :class="{'app-switch': form.is_open == 1 }"></view>
+                    </view>
+                </view>
+            </view>
+            <view v-if="form.is_open == 1" class="dir-left-nowrap cross-center form-input">
+                <view @click="form.open_type = 1" class="dir-left-nowrap cross-center box-grow-0 form-radio-input">
+                    <view class="box-grow-0">
+                        <app-radio @click="form.open_type = 1" :value="form.open_type == 1" :item="form" :theme="theme" type="round"></app-radio>
+                    </view>
+                    <view class="box-grow-0 radio-text" :style="{'color': form.open_type == 1 ? '#ff4544':'353535'}">全天24小时营业</view>
+                </view>
+                <view @click="form.open_type = 2" class="dir-left-nowrap cross-center box-grow-0 form-radio-input">
+                    <view class="box-grow-0">
+                        <app-radio @click="form.open_type = 2" :value="form.open_type == 2" :item="form" :theme="theme" type="round"></app-radio>
+                    </view>
+                    <view class="box-grow-0 radio-text" :style="{'color': form.open_type == 2 ? '#ff4544':'353535'}">自定义营业时间</view>
+                </view>
+            </view>
+            <view @click="openTime" v-if="form.is_open == 1 && form.open_type == 2" class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">选择日期</view>
+                <view class="box-grow-1 dir-right-nowrap">
+                    <view class="cross-center dir-right-nowrap category-info">
+                        <view class="box-grow-0 cross-center">
+                            <icon class="icon-arrow-right" type></icon>
+                        </view>
+                        <view class="box-grow-0 category-select">
+                            <view v-if="form.week_list.length == 0">未填写</view>
+                            <view v-else class="t-omit switch-open-text">
+                                <text v-for="(item,index) in form.week_list" :key="index">
+                                    <text v-if="item == '1'">周一</text>
+                                    <text v-if="item == '2'">周二</text>
+                                    <text v-if="item == '3'">周三</text>
+                                    <text v-if="item == '4'">周四</text>
+                                    <text v-if="item == '5'">周五</text>
+                                    <text v-if="item == '6'">周六</text>
+                                    <text v-if="item == '7'">周日</text>
+                                    <text v-if="index != form.week_list.length - 1">、</text>
+                                </text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view @click="toSettingTime" v-if="form.is_open == 1 && form.open_type == 2" class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">选择时间段</view>
+                <view class="box-grow-1 dir-right-nowrap">
+                    <view class="cross-center dir-right-nowrap category-info">
+                        <view class="box-grow-0 cross-center">
+                            <icon class="icon-arrow-right" type></icon>
+                        </view>
+                        <view class="box-grow-0 category-select">
+                            <view v-if="form.time_list.length == 0">未填写</view>
+                            <view v-else class="t-omit switch-open-text">
+                                <text v-for="(item,index) in form.time_list" :key="index">
+                                    {{item.value[0]}}-{{item.value[1]}}<text v-if="index != form.time_list.length - 1">、</text>
+                                </text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view v-if="form.is_open == 2" class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">设置自动开业时间</view>
+                <view class="box-grow-1">
+                    <view @click="openAuto" class="box-grow-0 cross-center dir-right-nowrap radio-text" style="color: #666666">
+                        <icon class="icon-arrow-right" type></icon>
+                        <view v-if="form.is_auto_open == 1">
+                            不设置
+                        </view>
+                        <view v-else-if="form.is_auto_open == 2">
+                            {{form.auto_open_time}}
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">所在地区</view>
+                <view class="box-grow-1 area-left">
+                    <app-area-picker @customevent="areaEvent"
+                                     :ids="[area.province_id, area.city_id, area.district_id]"></app-area-picker>
+                </view>
+            </view>
+
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">详细地址</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="address"
+                           placeholder-class="plugins-mch-config-input"
+                           placeholder="必填"
+                           name="address"
+                           :value="form.address"/>
+                </view>
+            </view>
+
+
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">所售类目</view>
+                <view class="box-grow-1">
+                    <picker :range="category_list" range-key="name" class="category-picker" :value="form.mch_common_cat_key" @change="categoryChange">
+                        <view class="cross-center dir-left-nowrap category-info">
+                            <view class="box-grow-1 category-select">
+                                {{form.mch_common_cat_str ? form.mch_common_cat_str:`请选择`}}
+                            </view>
+                            <view class="box-grow-0 cross-center">
+                                <icon class="icon-arrow-right" type></icon>
+                            </view>
+                        </view>
+                    </picker>
+                </view>
+            </view>
+
+            <view class="dir-left-nowrap cross-center form-input">
+                <view class="box-grow-0 form-label ">客服电话</view>
+                <view class="box-grow-1">
+                    <input @input="applyInput"
+                           data-type="service_mobile"
+                           placeholder-class="plugins-mch-config-input"
+                           placeholder="必填"
+                           name="service_mobile"
+                           :value="form.service_mobile"/>
+                </view>
+            </view>
+
+            <view class="dir-left-nowrap cross-center form-input end">
+                <view class="form-label box-grow-0 dir-top-nowrap ">
+                    <view>店铺头像</view>
+                    <view class="bigness">240×240</view>
+                </view>
+                <view class="box-grow-1">
+                    <view class="dir-left-nowrap up-pic" @click="uploadCoverUrl">
+                        <view class="box-grow-1 cross-center category-picker">
+                            <view v-if="form.cover_url" class="shop-pic">
+                                <image mode="aspectFill" :src="form.cover_url" class="pic-head"></image>
+                            </view>
+                            <view v-else class="box-grow-1 category-select">请选择图片</view>
+                        </view>
+                        <view class="box-grow-0 cross-center">
+                            <icon class="icon-arrow-right" type></icon>
+                        </view>
+                    </view>
+                </view>
+            </view>
+
+            <view class="dir-left-nowrap cross-center form-input end">
+                <view class="form-label box-grow-0 dir-top-nowrap ">
+                    <view>店铺背景</view>
+                    <view class="bigness">750×200</view>
+                </view>
+                <view class="box-grow-1">
+                    <view class="dir-left-nowrap up-pic" @click="uploadPicUrl">
+                        <view class="box-grow-1 cross-center category-picker">
+                            <view v-if="form.pic_url" class="shop-pic">
+                                <image mode="aspectFill" :src="form.pic_url" class="pic-bg"></image>
+                            </view>
+                            <view v-else class="box-grow-1 category-select">请选择图片</view>
+                        </view>
+                        <view class="box-grow-0 cross-center">
+                            <icon class="icon-arrow-right" type></icon>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="main-center submit-btn">
+            <app-button @click="formSubmit" height="80" width="702" font-size="32" background="#ff4544" color="#ffffff"
+                        round>提交
+            </app-button>
+        </view>
+        <view @touchmove.stop.prevent="" class="time-bg cross-center" v-if="timeDialog">
+            <view class="time-dialog">
+                <view class="dialog-title">自定义营业时间</view>
+                <view class="flex-wrap main-between cross-center time-area date-area">
+                    <view v-for="item in date" :key="item.value" @click="chooseDate(item)" :class="[`${item.check?`a-m-text a a-m-border`:'time-area-item'}`]" class="dialog-choose-item">{{item.label}}</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="time-submit-btn" @click='cancel' style="color: #666;">取消</view>
+                    <view class="line"></view>
+                    <view class="time-submit-btn" style="color: #ff4544;" @click='submitTime'>确认</view>
+                </view>
+            </view>
+        </view>
+        <view @touchmove.stop.prevent="" class="time-bg cross-center" v-if="autoDialog">
+            <view class="time-dialog">
+                <view class="dialog-title">设置自动开业</view>
+                <view class="main-center cross-center time-area">
+                    <view @click="changeAuto(1)" :class="[`${chooseAuto==1?`a-m-text a a-m-border`:'time-area-item'}`]" class="dialog-choose-item">不设置</view>
+                    <view @click="changeAuto(2)" :class="[`${chooseAuto==2?`a-m-text a a-m-border`:'time-area-item'}`]" class="dialog-choose-item">设置</view>
+                </view>
+                <view class="choose-time" v-if="chooseAuto==2">
+                    <view class="time-title">设置自动开业时间</view>
+                    <view class="year-1">年</view>
+                    <view class="month-1">月</view>
+                    <view class="day-1">日</view>
+                    <view class="year-2">时</view>
+                    <view class="month-2">分</view>
+                    <view class="day-2">秒</view>
+                    <picker-view :value="dateVal" :indicator-style="indicatorStyle" class="picker-view" @change="dateChange">
+                        <picker-view-column>
+                            <view v-for="(item,idx) in years" :key="item"
+                                :class="[`${dateVal[0] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: dateVal[0] == idx + 1 || dateVal[0] == idx - 1 ? '#999999' : dateVal[0] == idx + 2 || dateVal[0] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in months" :key="item"
+                                :class="[`${dateVal[1] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: dateVal[1] == idx + 1 || dateVal[1] == idx - 1 ? '#999999' : dateVal[1] == idx + 2 || dateVal[1] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in days" :key="item"
+                                :class="[`${dateVal[2] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: dateVal[2] == idx + 1 || dateVal[2] == idx - 1 ? '#999999' : dateVal[2] == idx + 2 || dateVal[2] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                    </picker-view>
+                    <picker-view :value="timeVal" :indicator-style="indicatorStyle" class="picker-view" @change="timeChange">
+                        <picker-view-column>
+                            <view v-for="(item,idx) in hour" :key="item"
+                                :class="[`${timeVal[0] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: timeVal[0] == idx + 1 || timeVal[0] == idx - 1 ? '#999999' : timeVal[0] == idx + 2 || timeVal[0] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in minutes" :key="item"
+                                :class="[`${timeVal[1] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: timeVal[1] == idx + 1 || timeVal[1] == idx - 1 ? '#999999' : timeVal[1] == idx + 2 || timeVal[1] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in minutes" :key="item"
+                                :class="[`${timeVal[2] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: timeVal[2] == idx + 1 || timeVal[2] == idx - 1 ? '#999999' : timeVal[2] == idx + 2 || timeVal[2] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                    </picker-view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="time-submit-btn" @click='cancel' style="color: #666;">取消</view>
+                    <view class="line"></view>
+                    <view class="time-submit-btn" style="color: #ff4544;" @click='submitAutoTime'>确认</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import appAreaPicker from '../../../../components/page-component/app-area-picker/app-area-picker';
+    import appRadio from '../../../../components/basic-component/app-radio/app-radio.vue';
+
+    const date = new Date()
+    const years = []
+    const months = []
+    const bigDays = []
+    const smallDays = []
+    const secDays = []
+    const otherDays = []
+
+    for (let i = date.getFullYear(); i <= date.getFullYear() + 10; i++) {
+        years.push(i)
+    }
+
+    for (let i = 1; i <= 12; i++) {
+        months.push(i)
+    }
+
+    for (let i = 1; i <= 31; i++) {
+        bigDays.push(i)
+    }
+    for (let i = 1; i <= 30; i++) {
+        smallDays.push(i)
+    }
+    for (let i = 1; i <= 28; i++) {
+        secDays.push(i)
+    }
+    for (let i = 1; i <= 29; i++) {
+        otherDays.push(i)
+    }
+    
+    export default {
+        name: "config",
+        components: {appAreaPicker, appRadio},
+        data() {
+            return {
+                theme: {
+                    background: '#ff4544'
+                },
+                lineHeight: '72rpx',
+                mch_id: -1,
+                category_list: [],
+                indicatorStyle: '',
+                area: {
+                    province_id: 0,
+                    city_id: 0,
+                    district_id: 0,
+                },
+                date: [
+                    {label: '周一', value: '1', check: false},
+                    {label: '周二', value: '2', check: false},
+                    {label: '周三', value: '3', check: false},
+                    {label: '周四', value: '4', check: false},
+                    {label: '周五', value: '5', check: false},
+                    {label: '周六', value: '6', check: false},
+                    {label: '周日', value: '0', check: false},
+                ],
+                form: {},
+                form_data: {},
+
+                timeDialog: false,
+                choose: 2,
+                hour: [],
+                minutes: [],
+                startVal: [0,0,0],
+                endVal: [0,0,0],
+
+                autoDialog: false,
+                dateVal: [0,0,0],
+                timeVal: [0,0,0],
+                chooseAuto: 1,
+                years: years,
+                months: months,
+                days: bigDays,
+                bigDays: bigDays,
+                smallDays: smallDays,
+                secDays: secDays,
+                otherDays: otherDays,
+            }
+        },
+        onShow() {
+            let that = this;
+            uni.getStorage({
+                key: 'openTime',
+                success(res) {
+                    that.form.time_list = res.data;
+                }
+            })
+        },
+        /**
+         * 生命周期函数--监听页面加载
+         */
+        onLoad(options) { this.$commonLoad.onload(options);
+            uni.removeStorage({
+                key: 'openTime'
+            })
+            this.indicatorStyle =  'height: 36px;font-size:14px;';
+            let screenWidth = uni.getSystemInfoSync().windowWidth;
+            let p = 375 / screenWidth;
+            this.lineHeight = 72*p + 'rpx';
+            this.mch_id = options.mch_id;
+            this.getCategory();
+            for(let i = 0;i < 60;i++) {
+                if(i < 10) {
+                    i = '0' + i
+                }
+                if(i < 24) {
+                    this.hour.push(i)
+                }
+                this.minutes.push(i)
+            }
+            var myDate = new Date();
+            let year = myDate.getFullYear();
+            let month = myDate.getMonth() + 1;
+            if (month >= 1 && month <= 9) {
+                month = "0" + month;
+            }
+            let day = myDate.getDate();
+            for(let i in this.years) {
+                if (year == this.years[i]) {
+                    this.dateVal[0] = +i
+                }
+            }
+            for(let i in this.months) {
+                if (month == this.months[i]) {
+                    this.dateVal[1] = +i
+                }
+            }
+            if(month == 2) {
+                if(year%4 == 0 && year %400 != 0) {
+                    this.days = this.otherDays
+                }else {
+                    this.days = this.secDays
+                }
+            }else if((month < 8 && month%2 == 1) || (month > 7 && month%2 == 0)) {
+                this.days = this.bigDays
+            }else {
+                this.days = this.smallDays
+            }
+            for(let i in this.days) {
+                if (day == this.days[i]) {
+                    this.dateVal[2] = +i
+                }
+            }
+        },
+        methods: {
+            toSettingTime() {
+                uni.navigateTo({
+                    url: `/plugins/mch/mch/open-time/open-time?time_list=${JSON.stringify(this.form.time_list)}`
+                })
+            },
+            chooseDate(e) {
+                e.check = !e.check;
+            },
+            openTime() {
+                for(let date of this.date) {
+                    date.check = false;
+                    for(let item of this.form.week_list) {
+                        if(date.value == item) {
+                            date.check = true;
+                        }
+                    }
+                }
+                this.timeDialog = true;
+            },
+            openAuto() {
+                this.chooseAuto = this.form.is_auto_open;
+                if(this.chooseAuto == 2 && this.form.auto_open_time.length > 0) {
+                    for(let i in this.years) {
+                        if (this.form.auto_open_time.substring(0, 4) == this.years[i]) {
+                            this.dateVal[0] = +i
+                        }
+                    }
+                    for(let i in this.months) {
+                        if (this.form.auto_open_time.substring(5, 7) == this.months[i]) {
+                            this.dateVal[1] = +i
+                        }
+                    }
+                    let startMonth = +this.dateVal[1] + 1;
+                    if(startMonth == 2) {
+                        if(year%4 == 0 && year %400 != 0) {
+                            this.days = this.otherDays
+                        }else {
+                            this.days = this.secDays
+                        }
+                    }else if((startMonth < 8 && startMonth%2 == 1) || (startMonth > 7 && startMonth%2 == 0)) {
+                        this.days = this.bigDays
+                    }else {
+                        this.days = this.smallDays
+                    }
+                    for(let i in this.days) {
+                        if (this.form.auto_open_time.substring(8, 10) == this.days[i]) {
+                            this.dateVal[2] = +i
+                        }
+                    }
+                    let auto_open_time = this.form.auto_open_time.substring(11);
+                    this.timeVal = auto_open_time.split(':').map(Number);
+                }
+                this.autoDialog = true;
+            },
+            submitTime() {
+                this.form.week_list = [];
+                for(let item of this.date) {
+                    if(item.check) {
+                        this.form.week_list.push(item.value)
+                    }
+                }
+                this.timeDialog = false;
+            },
+            submitAutoTime() {
+                this.form.is_auto_open = this.chooseAuto;
+                if(this.form.is_auto_open == 2) {
+                    let month = this.months[this.dateVal[1]];
+                    let day = this.days[this.dateVal[2]];
+                    if(month < 10) {
+                        month = '0' + month
+                    }
+                    if(day < 10) {
+                        day = '0' + day
+                    }
+                    this.form.auto_open_time = this.years[this.dateVal[0]] + '-' + month + '-' + day
+                    this.form.auto_open_time += ' ' + this.hour[this.timeVal[0]] + ':' + this.minutes[this.timeVal[1]] + ':' + this.minutes[this.timeVal[2]]
+                }
+                this.autoDialog = false;
+            },
+            cancel() {
+                this.timeDialog = false;
+                this.autoDialog = false;
+            },
+            change(e) {
+                this.choose = e;
+            },
+            changeAuto(e) {
+                this.chooseAuto = e;
+            },
+            startChange: function(e) {
+                this.startVal = e.detail.value;
+            },
+            endChange: function(e) {
+                this.endVal = e.detail.value;
+            },
+            dateChange: function(e) {
+                const val = e.detail.value;
+                this.dateVal = e.detail.value;
+                let years = this.years;
+                let year = this.years[val[0]];
+                let month = this.months[val[1]];
+                if(month == 2) {
+                    if(year%4 == 0 && year %400 != 0) {
+                        this.days = this.otherDays
+                    }else {
+                        this.days = this.secDays
+                    }
+                }else if((month < 8 && month%2 == 1) || (month > 7 && month%2 == 0)) {
+                    this.days = this.bigDays
+                }else {
+                    this.days = this.smallDays
+                }
+            },
+            timeChange: function(e) {
+                this.timeVal = e.detail.value;
+            },
+            getCategory: function () {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.category,
+                    data: {
+                        id: self.mch_id,
+                    }
+                }).then(info => {
+                    if (info.code == 0) {
+                        self.category_list = info.data.list;
+                        self.loadData();
+                    }
+                });
+            },
+
+            loadData: function () {
+                const self = this;
+                self.$showLoading();
+
+                self.$request({
+                    url: self.$api.mch.detail,
+                    data: {
+                        id: self.mch_id,
+                        review_status: 1,
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        const detail = info.data.detail;
+
+                        let mch_common_cat_str = '';
+                        let mch_common_cat_key = 0;
+                        self.category_list.map((v, k) => {
+                            if (v.id == detail.mch_common_cat_id) {
+                                mch_common_cat_str = v.name;
+                                mch_common_cat_key = k;
+                            }
+                        });
+
+                        self.form = {
+                            id: detail.id,
+                            realname: detail.realname,
+                            mobile: detail.mobile,
+                            wechat: detail.wechat,
+                            address: detail.store.address,
+                            name: detail.store.name,
+                            service_mobile: detail.store.mobile,
+                            mch_common_cat_str,
+                            mch_common_cat_key,
+                            mch_common_cat_id: detail.mch_common_cat_id,
+                            cover_url: detail.store.cover_url,
+                            username: detail.mchUser.username,
+                            pic_url: detail.store.pic_url.length > 0 ? detail.store.pic_url[0].pic_url : '',
+                            form_data: detail.form_data,
+                            is_open: detail.is_open,
+                            open_type: detail.open_type,
+                            is_auto_open: detail.is_auto_open,
+                            auto_open_time: detail.auto_open_time,
+                            time_list: detail.time_list,
+                            week_list: detail.week_list
+                        };
+                        self.area = {
+                            province_id: detail.store.province_id,
+                            city_id: detail.store.city_id,
+                            district_id: detail.store.district_id,
+                        };
+                    }
+                });
+            },
+
+            navPassword() {
+                uni.navigateTo({url: `/plugins/mch/mch/password/password?mch_id=` + this.mch_id});
+            },
+
+            //INPUT
+            applyInput: function (e) {
+                let name = e.currentTarget.dataset.type;
+                this.form[name] = e.detail.value;
+            },
+
+            categoryChange(e) {
+                const item = this.category_list[e.detail.value];
+
+                this.form.mch_common_cat_id = item.id;
+                this.form.mch_common_cat_str = item.name;
+                this.form.mch_common_cat_key = e.detail.value;
+            },
+
+            //地址处理
+            areaEvent(data) {
+                if (data) {
+                    this.area.province_id = data.province.id;
+                    this.area.city_id = data.city.id;
+                    this.area.district_id = data.district.id;
+                }
+            },
+
+            // 上传头像
+            uploadCoverUrl(e) {
+                const self = this;
+                uni.chooseImage({
+                    count: 1,
+                    success: function (e) {
+                        uni.uploadFile({
+                            url: self.$api.upload.file,
+                            filePath: e.tempFilePaths[0],
+                            name: 'file',
+                            formData: {
+                                file: e.tempFilePaths[0],
+                            },
+                            success(res) {
+                                const result = JSON.parse(res.data);
+                                if (result.code === 0) {
+                                    self.form.cover_url = result.data.url;
+                                    uni.showToast({title: '上传成功'});
+                                } else {
+                                    uni.showToast({icon: 'none', title: result.msg});
+                                }
+                            }
+                        });
+                    }
+                })
+            },
+
+            // 上传背景
+            uploadPicUrl(e) {
+                const self = this;
+                uni.chooseImage({
+                    count: 1,
+                    success: function (e) {
+                        uni.uploadFile({
+                            url: self.$api.upload.file,
+                            filePath: e.tempFilePaths[0],
+                            name: 'file',
+                            formData: {
+                                file: e.tempFilePaths[0],
+                            },
+                            success(res) {
+                                const result = JSON.parse(res.data);
+                                if (result.code === 0) {
+                                    self.form.pic_url = result.data.url;
+                                    self.form.pic_url_id = result.data.id;
+                                    uni.showToast({title: '上传成功'});
+                                } else {
+                                    uni.showToast({icon: 'none', title: result.msg});
+                                }
+                            }
+                        });
+                    }
+                })
+            },
+
+            //SUBMIT
+            formSubmit: function (e) {
+                let self = this;
+                let form = self.form;
+                let area = self.area;
+
+                let content = function () {
+                    if(form.open_type == 2 && form.week_list.length == 0) {
+                        return '请选择营业时间'
+                    }
+                    if (!form.realname) {
+                        return "联系人不能为空";
+                    }
+                    if (!form.mobile) {
+                        return "联系电话不能为空";
+                    }
+                    if (!form.username) {
+                        return "账号不能为空";
+                    }
+                    if (!form.mch_common_cat_id) {
+                        return "类目不能为空";
+                    }
+                    if (!form.name) {
+                        return "店铺名称不能为空";
+                    }
+                    return false;
+                }();
+                if (content) {
+                    uni.showToast({icon: 'none', title: content});
+                    return;
+                }
+                self.$showLoading({title: '保存中'});
+                self.$request({
+                    url: self.$api.mch.apply,
+                    data: {
+                        id: form.id,
+                        mch_common_cat_id: form.mch_common_cat_id,
+                        address: form.address,
+                        username: form.username,
+                        name: form.name,
+                        service_mobile: form.service_mobile,
+                        realname: form.realname,
+                        mobile: form.mobile,
+                        wechat: form.wechat,
+                        form_data: JSON.stringify(form.form_data),
+                        province_id: area.province_id,
+                        city_id: area.city_id,
+                        district_id: area.district_id,
+                        logo: form.cover_url,
+                        bg_pic_url: JSON.stringify({pic_url: form.pic_url, id: form.pic_url_id}),
+                        is_open: form.is_open,
+                        open_type: form.open_type,
+                        is_auto_open: form.is_auto_open,
+                        auto_open_time: form.auto_open_time,
+                        time_list: JSON.stringify(form.time_list),
+                        week_list: JSON.stringify(form.week_list)
+                    },
+                    method: 'POST',
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        uni.showModal({
+                            title: '提示',
+                            content: info.msg,
+                            showCancel: false,
+                            success: function (e) {
+                                if (e.confirm) {
+                                    uni.navigateBack({
+                                        delta: 1
+                                    });
+                                }
+                            }
+                        })
+                    } else {
+                        uni.showToast({icon: 'none', title: info.msg});
+                    }
+                });
+            },
+        }
+    }
+</script>
+
+<style lang="scss">
+    .plugins-mch-config-input {
+        color: #bbb;
+        font-size: #{28rpx};
+    }
+</style>
+<style scoped lang="scss">
+    .apply-com {
+        padding-top: #{30rpx};
+        padding-left: #{24rpx};
+        height: #{72rpx};
+        color: #999;
+        font-size: #{26rpx};
+        background: #f7f7f7;
+        width: 100%;
+    }
+
+    .white {
+        background: #FFFFFF;
+
+        .form-input {
+            margin: 0 #{24rpx};
+            border-bottom: 1px solid #e2e2e2;
+            height: #{100rpx};
+            .form-radio-input {
+                width: #{350rpx};
+            }
+            .switch-open-text {
+              width: 314rpx;
+              text-align: right;
+            }
+            .radio-text {
+                margin-left: #{18rpx};
+                font-size: #{28rpx};
+                .icon-arrow-right {
+                    margin-left: 18rpx;
+                }
+            }
+            .app-switch-view {
+                background-color: #14d675 !important;
+            }
+            .switch-view {
+                width: #{88rpx};
+                height: #{48rpx};
+                border-radius: #{24rpx};
+                background-color: #dddddd;
+                .click {
+                    border-radius: 50%;
+                    background-color: white;
+                    width: #{38rpx};
+                    height: #{38rpx};
+                    margin: #{5rpx} #{6rpx};
+                }
+                .app-switch {
+                    transform: translateX(#{40rpx});
+                }
+            }
+        }
+
+        input {
+            height: 100%;
+            width: 100%;
+            padding-left: #{32rpx};
+            padding-right: #{24rpx};
+            color: #666666;
+            font-size: #{28rpx};
+        }
+
+        .form-label {
+            padding-left: #{3rpx};
+            font-size: #{28rpx};
+            color: #353535;
+            min-width: #{125rpx};
+        }
+
+        > view:last-child {
+            border-bottom: none;
+        }
+
+        //
+        .password {
+            font-size: #{28rpx};
+            color: #666666;
+            text-align: right;
+            padding-right: #{24rpx};
+        }
+
+        .icon-arrow-right {
+            background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png");
+            height: #{22rpx};
+            width: #{12rpx};
+            background-size: 100% auto;
+            background-repeat: no-repeat;
+        }
+
+        .area-left {
+            padding-left: #{32rpx};
+            text-align: right;
+            margin-left: auto;
+        }
+
+        .category-picker {
+            height: 100%;
+            width: 100%;
+        }
+
+        .category-info {
+            height: 100%;
+            width: 100%;
+            min-height: #{98rpx};
+        }
+
+        .category-select {
+            font-size: #{28rpx};
+            color: #666666;
+            text-align: right;
+            padding-right: #{24rpx};
+        }
+
+        .end {
+            height: #{128rpx};
+
+            .bigness {
+                font-size: #{24rpx};
+                color: #888;
+                line-height: 1;
+            }
+        }
+
+        .up-pic {
+            height: 100%;
+            padding-left: #{32rpx};
+
+            .shop-pic {
+                padding: #{18rpx} #{24rpx};
+                text-align: right;
+                width: 100%;
+                font-size: 0;
+
+                .pic-head {
+                    height: #{80rpx};
+                    width: #{80rpx};
+                }
+
+                .pic-bg {
+                    height: #{80rpx};
+                    width: #{298rpx};
+                }
+            }
+        }
+    }
+
+    .submit-btn {
+        margin-top: #{56rpx};
+        margin-bottom: #{24rpx};
+    }
+    .time-bg {
+        background-color: rgba(0, 0, 0, 0.3);
+        position: fixed;
+        top: 0;
+        left: 0;
+        height: 100%;
+        width: 100%;
+        z-index: 100;
+        .time-dialog {
+            width: #{620rpx};
+            border-radius: #{16rpx};
+            margin: 0 auto;
+            background-color: #fff;
+            z-index: 20;
+            .dialog-title {
+                font-size: #{32rpx};
+                color: #353535;
+                width: #{620rpx};
+                margin: #{32rpx} auto #{40rpx};
+                text-align: center;
+            }
+            .time-area {
+                margin-bottom: #{24rpx};
+                padding: 0 #{32rpx};
+                &.date-area {
+                    border-top: #{2rpx} solid #e2e2e2;
+                    padding: #{28rpx} #{32rpx};
+                    .dialog-choose-item {
+                        margin: #{12rpx} 0;
+                    }
+                }
+                .dialog-choose-item {
+                    margin: 0 12rpx;
+                    width: #{170rpx};
+                    height: #{68rpx};
+                    line-height: #{68rpx};
+                    text-align: center;
+                    border-radius: #{34rpx};
+                    border: #{2rpx} solid;
+                    font-size: #{28rpx};
+                    margin-bottom: #{16rpx};
+                    &.time-area-item {
+                        border-color: #ddd;
+                        color: #666;
+                    }
+                }
+            }
+            .choose-time {
+                position: relative;
+                .time-title {
+                    margin-left: #{32rpx};
+                    color: #666;
+                    font-size: #{28rpx};
+                    margin-bottom: #{20rpx};
+                }
+                .year-1 {
+                    position: absolute;
+                    left: #{192rpx};
+                    top: #{146rpx};
+                }
+                .month-1 {
+                    position: absolute;
+                    left: #{380rpx};
+                    top: #{146rpx};
+                }
+                .day-1 {
+                    position: absolute;
+                    right: #{32rpx};
+                    top: #{146rpx};
+                }
+                .year-2 {
+                    position: absolute;
+                    left: #{192rpx};
+                    bottom: #{88rpx};
+                }
+                .month-2 {
+                    position: absolute;
+                    left: #{380rpx};
+                    bottom: #{88rpx};
+                }
+                .day-2 {
+                    position: absolute;
+                    right: #{32rpx};
+                    bottom: #{88rpx};
+                }
+                .picker-view {
+                    width: #{556rpx};
+                    height: #{216rpx};
+                    margin: 0 auto #{20rpx};
+                    text-align: center;
+                    view {
+                        line-height: #{68rpx};
+                    }
+                }
+            }
+            .btn-area {
+                height: #{88rpx};
+                position: relative;
+                border-top: #{2rpx} solid #e2e2e2;
+                &.other-btn-area {
+                    margin-top: #{10rpx};
+                }
+                .line {
+                    height: #{32rpx};
+                    width: #{1rpx};
+                    background-color: #e2e2e2;
+                    position: absolute;
+                    top: #{28rpx};
+                    left: 0;
+                    right: 0;
+                    margin: 0 auto;
+                }
+                .time-submit-btn {
+                    height: #{88rpx};
+                    line-height: #{88rpx};
+                    font-size: #{32rpx};
+                    width: #{310rpx};
+                    text-align: center;
+                }
+            }
+        }
+    }
+</style>

+ 321 - 0
src/plugins/mch/mch/count/count.vue

xqd
@@ -0,0 +1,321 @@
+<template>
+    <app-layout>
+        <view style="background:#FFFFFF" v-if="year_list">
+            <scroll-view scroll-x :scroll-into-view="`mch_`+ scrollId" scroll-with-animation>
+                <view class="dir-left-nowrap month-list">
+                    <view id="mch_0-2" class="box-grow-0 month-item"></view>
+                    <view id="mch_0-1" class="box-grow-0 month-item"></view>
+                    <block v-for="(item,index) in year_list" :key="index">
+                        <app-form-id v-for="(year_item, year_index) in item.month_list" :key="year_index"
+                                     @click="switchTaps(index,year_index)">
+                            <view class="box-grow-0 dir-top-nowrap main-center month-item"
+                                  :class="year_item.active?`active`:``" :id="`mch_`+ index + year_index">
+                                <view class="en">{{year_item.name_en}}</view>
+                                <view class="cn">{{year_item.name_cn}}</view>
+                            </view>
+                        </app-form-id>
+                    </block>
+                    <view class="box-grow-0 month-item"></view>
+                    <view class="box-grow-0 month-item"></view>
+                </view>
+            </scroll-view>
+            <view class="dir-left-nowrap cross-center">
+                <view class="year-line"></view>
+                <view class="year-label">{{year_str}}</view>
+                <view class="year-line"></view>
+            </view>
+            <view class="main-between count-num">
+                <view class="cross-center dir-top-nowrap">
+                    <view class="name">日均成交额</view>
+                    <view class="num">{{monthly_order_pay_price_average}}</view>
+                </view>
+                <view class="cross-center dir-top-nowrap">
+                    <view class="name">当月成交额</view>
+                    <view class="num">{{monthly_order_pay_price_count}}</view>
+                </view>
+                <view class="cross-center dir-top-nowrap">
+                    <view class="name">对比上月</view>
+                    <view class="num">{{contrast_prev_monthly}}</view>
+                </view>
+            </view>
+
+            <view class="main-center cross-center canvas-box">
+                <!--#ifdef MP-ALIPAY -->
+                <canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" :width="750" :height="500"
+                        :style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
+                <!--#endif-->
+
+                <!--#ifndef MP-ALIPAY -->
+                <canvas canvas-id="canvasColumn" id="canvasColumn" class="charts"></canvas>
+                <!--#endif-->
+            </view>
+
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import uCharts from '../../../../components/u-charts/u-charts.min.js';
+
+    var _self;
+    var canvaColumn = null;
+    export default {
+        name: "count",
+        components: {},
+        data() {
+            return {
+                contrast_prev_monthly: '',
+                monthly_order_pay_price_average: '',
+                monthly_order_pay_price_count: '',
+
+                mch_id: 0,
+                options: [],
+                year_str: '',
+                month_str: '',
+
+                year_list: null,
+                scrollId: null,
+
+                year_index: 0,
+                index: 0,
+
+                cWidth: '',
+                cHeight: '',
+                pixelRatio: 1,
+                serverData: ''
+            }
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+            this.getYear();
+
+            _self = this;
+            //#ifdef MP-ALIPAY
+            uni.getSystemInfo({
+                success: function (res) {
+                    if (res.pixelRatio > 1) {
+                        //正常这里给2就行,如果pixelRatio=3性能会降低一点
+                        //_self.pixelRatio =res.pixelRatio;
+                        _self.pixelRatio = 2;
+                    }
+                }
+            });
+            //#endif
+            this.cWidth = uni.upx2px(750);
+            this.cHeight = uni.upx2px(500);
+        },
+
+        methods: {
+            showColumn(canvasId, chartData) {
+                canvaColumn = new uCharts({
+                    $this: _self,
+                    canvasId: canvasId,
+                    type: 'line',
+                    background: '#FFFFFF',
+                    animation: true,
+                    dataPointShape: false,
+                    pixelRatio: _self.pixelRatio,
+                    categories: chartData.categories,
+                    series: chartData.series,
+                    width: _self.cWidth * _self.pixelRatio,
+                    height: _self.cHeight * _self.pixelRatio,
+                    legend: true,
+                    xAxis: {
+                        disabled: true,
+                        axisLine: false,
+                        disableGrid: true,
+                    },
+                    yAxis: {
+                        format: (val => {
+                            return val;
+                        })
+                    },
+                    dataLabel: false,
+
+                    extra: {
+                        line: {
+                            type: 'curve',
+                            width: '4rpx'
+                        }
+                    }
+                });
+            },
+            changeData() {
+                canvaColumn.updateData({
+                    series: _self.serverData.ColumnB.series,
+                    categories: _self.serverData.ColumnB.categories
+                });
+            },
+
+            getYear() {
+                const self = this;
+                self.$showLoading();
+
+                self.$request({
+                    url: self.$api.mch.year_list,
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        //初始化
+                        let year_list = info.data.year_list;
+                        let scrollId, year_str, month_str;
+                        year_list.map((v1, k1) => {
+                            v1.month_list.map((v2, k2) => {
+                                if (v2.active) {
+                                    scrollId = k1.toString() + k2.toString();
+                                    year_str = year_list[k1].year;
+                                    month_str = year_list[k1].month_list[k2].month;
+                                }
+                            })
+                        });
+                        [
+                            self.year_list,
+                            self.scrollId,
+                            self.year_str,
+                            self.month_str
+                        ] = [
+                            year_list,
+                            scrollId,
+                            year_str,
+                            month_str
+                        ]
+                        this.loadData();
+                    }
+                });
+            },
+            loadData() {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.statistic,
+                    data: {
+                        mch_id: self.mch_id,
+                        monthly: self.month_str,
+                        year: self.year_str,
+                    }
+                }).then(info => {
+                    if (info.code === 0) {
+                        let chartData = {
+                            categories: info.data.trend_arr,
+                            series: [{
+                                name: '日成交额',
+                                data: info.data.trend_arr,
+                                color: '#fa6855'
+                            }]
+                        }
+                        self.showColumn("canvasColumn", chartData);
+                        [
+                            self.contrast_prev_monthly,
+                            self.monthly_order_pay_price_average,
+                            self.monthly_order_pay_price_count,
+                        ] = [
+                            info.data.contrast_prev_monthly,
+                            info.data.monthly_order_pay_price_average,
+                            info.data.monthly_order_pay_price_count,
+                        ];
+                    }
+                });
+            },
+            switchTaps(index, year_index) {
+                const self = this;
+                let year_list = self.year_list;
+
+                //ACTIVE
+                year_list.forEach((v, k) => {
+                    v.active = k == index;
+                    v.month_list.forEach((v1, k2) => {
+                        v1.active = k == index && k2 == year_index;
+                    })
+                })
+
+                //Animate
+                let scrollId = self.scrollId;
+                if (year_index >= 2 || index == 0) {
+                    scrollId = index.toString() + (year_index - 2).toString();
+                } else {
+                    scrollId = (index - 1).toString() + (year_index + 10).toString();
+                }
+                [
+                    self.index,
+                    self.year_list,
+                    self.year_index,
+                    self.scrollId,
+                    self.year_str,
+                    self.month_str
+                ] = [
+                    index,
+                    year_list,
+                    year_index,
+                    scrollId,
+                    year_list[index].year,
+                    year_list[index].month_list[year_index].month,
+                ]
+                self.loadData();
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .charts {
+        width: #{750upx};
+        height: #{500upx};
+        background-color: #FFFFFF;
+    }
+
+    ::-webkit-scrollbar {
+        width: 0;
+        height: 0;
+        color: transparent;
+    }
+
+    .month-list .month-item {
+        color: #bbb;
+        width: #{150rpx};
+        text-align: center;
+        height: #{120rpx};
+
+        .en {
+            font-size: #{24rpx};
+        }
+
+        .cn {
+            font-size: #{28rpx};
+        }
+    }
+
+    .month-list .month-item.active {
+        color: #e9ad33;
+    }
+
+    .year-label {
+        font-size: #{20rpx};
+        color: #999999;
+        padding: #{24rpx} #{40rpx};
+    }
+
+    .year-line {
+        height: #{1px};
+        width: 100%;
+        background: #e2e2e2;
+    }
+
+    .count-num {
+        font-size: #{24rpx};
+        margin: 0 #{24rpx};
+
+        .name {
+            color: #999999;
+            margin-bottom: #{16rpx};
+        }
+
+        .num {
+            color: #353535;
+        }
+    }
+
+    .canvas-box {
+        margin-top: #{48rpx};
+        width: 100%
+    }
+</style>

+ 202 - 0
src/plugins/mch/mch/express/express.vue

xqd
@@ -0,0 +1,202 @@
+<template>
+    <app-layout>
+        <view class="express">
+            <image class="logo" src='https://shop.9026.com/web/statics/img/mall/mch/express.png'></image>
+            <view class="company-name">{{express_company}}</view>
+            <view class="express-no">运单编号:{{express_no}}<image @click='copy' src="https://shop.9026.com/web/statics/img/mall/mch//copy.png"></image></view>
+        </view>
+        <view class='logistics-box dir-top t-small-color t-medium'>
+            <block v-if='express.list'>
+                <view class='item-box'>
+                    <view :class="['dir-top-nowrap','item',`${index == 0 ? 'sign-text' : ''}`]" v-for='item in express.list' :key='item.id'>
+                        <image v-if='index == 0' class='sign-big' src='https://shop.9026.com/web/statics/image/mall/static/icon/order/point-green.png'></image>
+                        <image v-else class='sign' src='https://shop.9026.com/web/statics/image/mall/static/icon/order/point-gray.png'></image>
+                        <view>{{item.desc}}</view>
+                        <view>{{item.datetime}}</view>
+                    </view>
+                </view>
+            </block>
+            <view v-else class='main-center'>
+                <view>暂无物流信息</view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                express: '',
+                id: '',
+                express_no: '',
+                express_company: ''
+            }
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+                adminImg: state => state.mallConfig.__wxapp_img.app_admin,
+            })
+        },
+        methods: {
+            copy() {
+                this.$utils.uniCopy({
+                    data: this.express_no,
+                    success() {
+                        uni.getClipboardData();
+                    }
+                })
+            },
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            that.$showLoading({
+                type: 'global',
+                text: '加载中...'
+            });
+            that.$request({
+                url: that.$api.app_admin.express_detail,
+                data: {
+                    id: options.id,
+                    express: options.express,
+                    customer_name: options.customer_name,
+                    express_no: options.express_no
+                }
+            }).then(response => {
+                that.$hideLoading();
+                if (response.code == 0) {
+                    that.express = response.data.express;
+                    that.id = options.id;
+                    that.express_company = options.express;
+                    that.express_no = options.express_no;
+                } else {
+                    uni.showToast({
+                        title: response.msg,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                }
+            }).catch(response => {
+                that.$hideLoading();
+                uni.showToast({
+                    title: response,
+                    icon: 'none',
+                    duration: 1000
+                });
+            });
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .logo {
+        height: #{100rpx};
+        width: #{100rpx};
+        float: left;
+        margin-right: #{34rpx};
+    }
+
+    .express {
+        margin: #{24rpx};
+        display: block;
+        margin-bottom: 0;
+        padding: #{32rpx};
+        padding-left: #{24rpx};
+        position: relative;
+        font-size: #{32rpx};
+        background-color: #fff;
+        color: #353535;
+        border-radius: #{16rpx};
+        height: #{160rpx};
+    }
+
+    .to-more {
+        height: #{24rpx};
+        width: #{12rpx};
+        position: absolute;
+        right: #{24rpx};
+        top: 50%;
+        margin-top: #{-6rpx};
+    }
+
+    .express-list {
+        padding: #{40rpx} #{32rpx};
+        background-color: #fff;
+        color: #25ae5f;
+        font-size: #{32rpx};
+        margin: #{24rpx};
+        border-radius: #{16rpx};
+    }
+
+    .express-box .top-box {
+        background-color: #fff;
+        padding: #{20rpx};
+    }
+    .express-box .label {
+        margin-right: #{10rpx};
+    }
+
+    .express-box .goods-pic {
+        width: #{130rpx};
+        height: #{130rpx};
+        margin-right: #{20rpx};
+    }
+
+    .logistics-box {
+        padding: #{20rpx} #{25rpx};
+        margin: 0 #{24rpx};
+        border-radius: #{16rpx};
+        background-color: #fff;
+        margin-top: #{25rpx};
+    }
+
+    .logistics-box .item-box {
+        border-left: #{1rpx} solid #e2e2e2;
+        padding-left: #{45rpx};
+        position: relative;
+    }
+
+    .logistics-box .item {
+        margin-bottom: #{25rpx};
+        padding-bottom: #{25rpx};
+        border-bottom: #{1rpx} solid #e2e2e2;
+    }
+
+    .logistics-box .item .sign {
+        width: #{16rpx};
+        height: #{16rpx};
+        position: absolute;
+        left: #{-7rpx};
+    }
+
+    .logistics-box .item .sign-big {
+        width: #{32rpx};
+        height: #{32rpx};
+        position: absolute;
+        left: #{-16rpx};
+    }
+
+    .sign-text {
+        color: #25ae5f;
+    }
+
+    .company-name {
+        margin-top: #{6rpx};
+    }
+
+    .express-no {
+        color:#666666;
+        font-size: #{28rpx};
+        margin-top: #{10rpx};
+    }
+
+    .express-no image {
+        height: #{24rpx};
+        width: #{24rpx};
+        margin-left: #{16rpx};
+    }
+</style>

+ 296 - 0
src/plugins/mch/mch/goods-attr-edit/goods-attr-edit.vue

xqd
@@ -0,0 +1,296 @@
+<template>
+    <app-layout>
+        <view class='add-attr' @click='add_attr'>
+            <view class='add-attr-btn main-center'>
+                <image src='https://shop.9026.com/web/statics/img/mall/mch/add.png'></image>
+                <view>增加规格值</view>
+            </view>
+        </view>
+        <view>
+            <view class="attr" v-for="(item, index) in list" :key="index">
+                <image @click='pop(index)' class='low-attr' src='https://shop.9026.com/web/statics/img/mall/mch/low.png'></image>
+                <view class="attr-item">
+                    <input placeholder-style="color: #cdcdcd" placeholder="请输入规格值" class='input' v-model="item.attr_name"/>
+                </view>
+            </view>
+        </view>
+        <view :class="['placeholder', `${iphone_x? 'iphone_x':''}`]"></view>
+        <view :class="['add', `${iphone_x? 'iphone_x':''}`]">
+            <view @click="save">保存</view>
+        </view>
+        <view class='dialog' v-if="index > -1">
+            <view class='dialog-item'>
+                <view class='dialog-title'>确定删除这个规格值吗?</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='close'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toDelete'>删除</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                iphone_x: false,
+                detail: {},
+                index: -1,
+                list: [],
+                idx: -1,
+                attrList: [],
+                attr: []
+            }
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info
+            })
+        },
+        methods: {
+            pop(index) {
+                this.index = index;
+            },
+            close() {
+                this.index = -1;
+            },
+            add_attr() {
+                this.list.push({
+                    attr_id: this.list.length > 0 ? +this.list[this.list.length -1].attr_id + 1 : 1,
+                    attr_name: '',
+                    pic_url: ''
+                });
+            },
+            toDelete() {
+                let arr = [];
+                for(let i in this.attrList) {
+                    for(let y in this.attrList[i].attr_list) {
+                        let { attr_group_id, attr_id } = this.attrList[i].attr_list[y];
+                        if(attr_group_id == this.attr[this.idx].attr_group_id && attr_id == this.list[this.index].attr_id) {
+                            arr.unshift(i);
+                        }
+                    }
+                }
+                for(let i in arr) {
+                    this.attrList.splice(arr[i],1);
+                }
+                this.list.splice(this.index,1);
+                this.index = -1;
+            },
+            save() {
+                for(let i in this.list) {
+                    if(!this.list[i].attr_name) {
+                        uni.showToast({
+                            title: '请输入规格值',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false
+                    }
+                    for(let j in this.list) {
+                        if(i !== j && this.list[i].attr_name === this.list[j].attr_name) {
+                            uni.showToast({
+                                title: '同一规格组下,规格名不能重复',
+                                icon: 'none',
+                                duration: 1000
+                            });
+                            return false
+                        }
+                    }
+                }
+
+                let change = false;
+                if(this.list.length > this.attr[this.idx].attr_list.length) {
+                    change = true;
+                }
+
+                for(let i in this.attrList) {
+                    for(let y in this.attrList[i].attr_list) {
+                        for(let j in this.list) {
+                            let { attr_group_id, attr_id } = this.attrList[i].attr_list[y];
+                            if(attr_group_id == this.attr[this.idx].attr_group_id && attr_id == this.list[j].attr_id) {
+                                this.attrList[i].attr_list[y].attr_name = this.list[j].attr_name;
+                            }
+                        }
+                    }
+                }
+                uni.showLoading({
+                    title: '保存中...'
+                });
+                if(change) {
+                    this.$storage.removeStorageSync('temp_attr_info');
+                }else {
+                    if(this.attrList.length === 0) {
+                        this.$storage.removeStorageSync('temp_attr_info');
+                    }else {
+                        this.$storage.setStorageSync('temp_attr_info', this.attrList);
+                    }
+                }
+                this.attr[this.idx].attr_list = this.list;
+                this.$storage.setStorageSync('temp_attr', this.attr);
+                setTimeout(function() {
+                    uni.navigateBack();
+                }, 500)
+            },
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            this.idx = options.index;
+            if(that.$storage.getStorageSync('temp_attr')) {
+                that.attr = that.$storage.getStorageSync('temp_attr');
+                that.detail = that.attr[options.index];
+                that.list = JSON.parse(JSON.stringify(that.detail.attr_list));
+            }
+            that.attrList = that.$storage.getStorageSync('temp_attr_info') ? that.$storage.getStorageSync('temp_attr_info') : [];
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            })
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .attr {
+        background-color: #fff;
+        position: relative;
+        padding-left: #{84rpx};
+        margin-bottom: #{20rpx};
+        .low-attr {
+            position: absolute;
+            z-index: 2;
+            top: #{24rpx};
+            height: #{40rpx};
+            width: #{40rpx};
+            left: #{24rpx};
+        }
+        .attr-item {
+            height: #{88rpx};
+            line-height: #{88rpx};
+            border-top: #{2rpx} solid #e2e2e2;
+            position: relative;
+            font-size: #{28rpx};
+            color: #353535;
+            input {
+                height: #{88rpx};
+                line-height: #{88rpx};
+            }
+        }
+        .attr-item:first-of-type {
+            border-top: 0;
+        }
+    }
+    .add-attr {
+        height: #{120rpx};
+        background-color: #fff;
+        margin-bottom: #{20rpx};
+        padding-top: #{24rpx};
+        .add-attr-btn {
+            height: #{72rpx};
+            width: #{320rpx};
+            border-radius: #{36rpx};
+            border: #{1rpx} solid #ff4544;
+            margin: 0 auto;
+            color: #ff4544;
+            font-size: #{26rpx};
+            line-height: #{72rpx};
+            image {
+                height: #{28rpx};
+                width: #{28rpx};
+                margin-right: #{12rpx};
+                margin-top: #{22rpx};
+            }
+        }
+    }
+    .add {
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        height: #{120rpx};
+        width: 100%;
+        z-index: 15;
+        background-color: #fff;
+        view {
+            width: #{702rpx};
+            line-height: #{80rpx};
+            height: #{80rpx};
+            margin: #{20rpx} auto;
+            border-radius: #{40rpx};
+            background-color: #ff4544;
+            color: #fff;
+            font-size: #{32rpx};
+            text-align: center;
+        }
+    }
+    .add.iphone_x {
+        height: #{170rpx};
+        padding-bottom: #{50rpx};
+    }
+    .placeholder {
+        height: #{120rpx};
+    }
+    .placeholder.iphone_x {
+        height: #{170rpx};
+    }
+    .dialog {
+        position: fixed;
+        height: 100%;
+        width: 100%;
+        bottom: 0;
+        left: 0;
+        z-index: 10;
+        background-color: rgba(0, 0, 0, .3);
+        .dialog-item {
+            padding-top: #{20rpx};
+            position: fixed;
+            top: 25%;
+            left: 0;
+            right: 0;
+            margin: 0 auto;
+            width: #{620rpx};
+            border-radius: #{16rpx};
+            background-color: #fff;
+            text-align: center;
+        }
+        .btn-area {
+            height: #{88rpx};
+            position: relative;
+            border-top: #{1rpx} solid #e2e2e2;
+            .line {
+                height: #{32rpx};
+                width: #{1rpx};
+                background-color: #e2e2e2;
+                position: absolute;
+                top: #{28rpx};
+                left: 0;
+                right: 0;
+                margin: 0 auto;
+            }
+            .submit-btn {
+                height: #{88rpx};
+                line-height: #{88rpx};
+                font-size: #{32rpx};
+                color: #666;
+                width: #{310rpx};
+                text-align: center;
+            }
+            .submit-btn.be-submit {
+                color: #ff4544;
+            }
+        }
+        .dialog-title {
+            text-align: center;
+            font-size: 32rpx;
+            color: #353535;
+            margin: #{66rpx} 0 #{76rpx};
+        }
+    }
+</style>

+ 807 - 0
src/plugins/mch/mch/goods-attr-info/goods-attr-info.vue

xqd
@@ -0,0 +1,807 @@
+<template>
+    <app-layout>
+        <view class="group main-center cross-center">
+            <view @click="choose(item,index)" v-for="(item,index) in attr_groups" :key="index" class="box-grow-1 group-item main-center cross-center">
+                <view :class="['group-name', 't-omit', `${item.choose? 'active':''}`]">{{item.choose ? item.choose_attr : item.attr_group_name}}</view>
+                <image v-if="showGroup && groupIndex == index" class="more" :src="item.choose ? './../image/close.png' :'https://shop.9026.com/web/statics/image/mall/static/icon/icon-up.png'"></image>
+                <image class="more" v-else :src="item.choose ? './../image/open.png' :'https://shop.9026.com/web/statics/image/mall/static/icon/icon-down.png'"></image>
+            </view>
+        </view>
+        <view class="attr-group-holder"></view>
+        <view>
+            <view class="attr-item" v-if="item.show == listLength" v-for="(item,index) in attr" :key="item.id">
+               <template v-if="startIndex < item.showIndex && item.showIndex < endIndex">
+                   <view class="attr-name">
+                       <view class="check" @click="unSelect(item,index)">
+                           <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-uncheck.png" v-if="!item.select"></image>
+                           <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-checkbox-checked-a.png" v-else></image>
+                       </view>
+                       <view class="dir-left-wrap cross-center">
+                           <view class="attr-group" v-for="(attr,idx) in item.attr_list" :key="idx">
+                               <text class="attr-group-name">{{attr.attr_group_name}}:</text>
+                               <text>{{attr.attr_name}}</text>
+                           </view>
+                       </view>
+                   </view>
+                   <view style="background-color: #fff">
+                       <view class='info-item cross-center dir-left-nowrap'>
+                           <view class="form-label">售价</view>
+                           <view class='dir-left-nowrap price-input cross-center main-between'>
+                               <input
+                                   :value="item.price"
+                                   :focus="inputName && chooseIndex == item.id"
+                                   @blur="nameBlur(item.id,$event)"
+                                   v-if="inputName && chooseIndex == item.id"
+                                   placeholder-style="color: #cdcdcd"
+                                   placeholder="请输入售价"
+                                   type='digit'
+                                   class='input'
+                               />
+                               <view v-else :class="item.price ? 'input input-item' : 'input input-item placeholder'" @click="nameBlur(item.id)">{{item.price ? item.price :'请输入售价'}}</view>
+                               <view>元</view>
+                           </view>
+                       </view>
+                       <view class='info-item cross-center dir-left-nowrap'>
+                           <view class="form-label">库存</view>
+                           <view class='dir-left-nowrap price-input cross-center main-between'>
+                               <input
+                                   :focus="inputStock && chooseIndex == item.id"
+                                   @blur="stockBlur(item.id,$event)"
+                                   v-if="inputStock && chooseIndex == item.id"
+                                   placeholder-style="color: #cdcdcd"
+                                   placeholder="请输入库存"
+                                   type='number'
+                                   class='input unit'
+                                   :value="item.stock"
+                               />
+                               <view v-else :class="item.stock ? 'input unit input-item' : 'input unit input-item placeholder'" @click="stockBlur(item.id)">{{item.stock ? item.stock :'请输入库存'}}</view>
+                               <view class="unit-width">{{unit}}</view>
+                           </view>
+                       </view>
+                       <view class='info-item cross-center dir-left-nowrap'>
+                           <view class="form-label">货号</view>
+                           <view class='dir-left-nowrap price-input cross-center'>
+                               <input
+                                   :focus="inputNo && chooseIndex == item.id"
+                                   @blur="noBlur(item.id,$event)"
+                                   v-if="inputNo && chooseIndex == item.id"
+                                   placeholder-style="color: #cdcdcd"
+                                   placeholder="请输入货号"
+                                   class='input'
+                                   :value="item.no"
+                               />
+                               <view v-else :class="item.no ? 'input input-item' : 'input input-item placeholder'" @click="noBlur(item.id)">{{item.no ? item.no :'请输入货号'}}</view>
+                           </view>
+                       </view>
+                       <view class='info-item cross-center dir-left-nowrap'>
+                           <view class="form-label">重量</view>
+                           <view class='dir-left-nowrap cross-center price-input'>
+                               <input
+                                   :focus="inputWeight && chooseIndex == item.id"
+                                   @blur="weightBlur(item.id,$event)"
+                                   v-if="inputWeight && chooseIndex == item.id"
+                                   placeholder-style="color: #cdcdcd"
+                                   placeholder="请输入重量"
+                                   type='digit'
+                                   class='input'
+                                   :value="item.weight"
+                               />
+                               <view v-else :class="item.weight ? 'input input-item' : 'input input-item placeholder'" @click="weightBlur(item.id)">{{item.weight ? item.weight :'请输入重量'}}</view>
+                               <view>g</view>
+                           </view>
+                       </view>
+                   </view>
+               </template>
+            </view>
+        </view>
+        <view :class="['placeholder', `${iphone_x? 'iphone_x':''}`]"></view>
+        <view :class="['bottom', 'cross-center', 'dir-left-nowrap', `${iphone_x? 'iphone_x':''}`]">
+            <view @click="allSelect" class="check">
+                <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-uncheck.png" v-if="!selectStatus"></image>
+                <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-checkbox-checked-a.png" v-else></image>
+            </view>
+            <view>全选</view>
+            <view @click="allSetting" class="all-setting">批量设置</view>
+            <view @click="save" :class="['save-btn', `${iphone_x? 'iphone_x':''}`]">保存</view>
+        </view>
+        <view @touchmove.stop.prevent="" :class="['bg', `${showSetting? 'again':''}`]" v-if="showGroup || showSetting">
+            <view class="dialog-group" v-if="showGroup">
+                <view @click="confirm(-1)" class="dialog-group-name t-omit">{{ '全部' + chooseGroup.attr_group_name}}</view>
+                <view @click="confirm(index,item)" v-for="(item,index) in chooseGroup.attr_list" :key="item.attr_id" :class="['dialog-group-name', 't-omit', `${item.choose? 'active':''}`]">{{item.attr_name}}</view>
+            </view>
+            <view :class="['dialog-setting', `${iphone_x? 'iphone_x':''}`]" v-if="showSetting">
+                <view class="dialog-setting-title main-between cross-center">
+                    <view @click="close" class="dialog-setting-btn">取消</view>
+                    <view>批量设置</view>
+                    <view @click="settingSubmit" class="dialog-setting-btn">确定</view>
+                </view>
+                <view style="background-color: #fff">
+                    <view class='info-item cross-center dir-left-nowrap'>
+                        <view class="form-label">售价</view>
+                        <view class='dir-left-nowrap price-input cross-center main-between'>
+                            <input @input="settingValue($event,'price')" placeholder-style="color: #cdcdcd" placeholder="请输入售价" type='digit' class='input'/>
+                            <view>元</view>
+                        </view>
+                    </view>
+                    <view class='info-item cross-center dir-left-nowrap'>
+                        <view class="form-label">库存</view>
+                        <view class='dir-left-nowrap price-input cross-center main-between'>
+                            <input @input="settingValue($event,'stock')" placeholder-style="color: #cdcdcd" placeholder="请输入库存" type='number' class='input unit'/>
+                                <view class="unit-width">{{unit}}</view>
+                        </view>
+                    </view>
+                    <view class='info-item cross-center dir-left-nowrap'>
+                        <view class="form-label">货号</view>
+                        <view class='dir-left-nowrap price-input cross-center'>
+                            <input @input="settingValue($event,'no')" placeholder-style="color: #cdcdcd" placeholder="请输入货号" class='input'/>
+                        </view>
+                    </view>
+                    <view class='info-item cross-center dir-left-nowrap'>
+                        <view class="form-label">重量</view>
+                        <view class='dir-left-nowrap cross-center price-input'>
+                            <input @input="settingValue($event,'weight')" placeholder-style="color: #cdcdcd" placeholder="请输入重量" type='number' class='input'/>
+                            <view>g</view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+
+    export default {
+        data() {
+            return {
+                iphone_x: false,
+                attr_groups: [],
+                attr_list: [],
+                unit: '件',
+                attr: [],
+                select: false,
+                chooseAttr: {},
+                chooseGroup: {},
+                chooseList: [],
+                selectList: [],
+                selectStatus: false,
+                chooseIndex: -1,
+                listLength: 0,
+                showGroup: false,
+                showSetting: false,
+                inputName: false,
+                inputStock: false,
+                inputNo: false,
+                inputWeight: false,
+                startIndex: -10,
+                endIndex: 90,
+                setting: {
+                    price: '',
+                    stock: '',
+                    no: '',
+                    weight: '',
+                },
+                groupIndex: -1
+            }
+        },
+        methods: {
+            settingValue(e, name) {
+                let value = e.detail.value;
+                switch (name) {
+                    case 'price':
+                        this.setting.price = value;
+                        break;
+                    case 'stock':
+                        this.setting.stock = value;
+                        break;
+                    case 'no':
+                        this.setting.no = value;
+                        break;
+                    case 'weight':
+                        this.setting.weight = value;
+                        break;
+                }
+            },
+            nameBlur(id,e) {
+                if(!e) {
+                    this.inputName = true;
+                    this.inputStock = false;
+                    this.inputNo = false;
+                    this.inputWeight = false;
+                    this.chooseIndex = id;
+                }else {
+                    this.inputName = false;
+                    this.attr[id].price = this.money(e.detail.value);
+                }
+            },
+            stockBlur(id,e) {
+                if(!e) {
+                    this.inputStock = true;
+                    this.inputName = false;
+                    this.inputNo = false;
+                    this.inputWeight = false;
+                    this.chooseIndex = id;
+                }else {
+                    this.inputStock = false;
+                    this.attr[id].stock = e.detail.value;
+                }
+            },
+            noBlur(id,e) {
+                if(!e) {
+                    this.inputNo = true;
+                    this.inputName = false;
+                    this.inputStock = false;
+                    this.inputWeight = false;
+                    this.chooseIndex = id;
+                }else {
+                    this.inputNo = false;
+                    this.attr[id].no = e.detail.value;
+                }
+            },
+            weightBlur(id,e) {
+                if(!e) {
+                    this.inputWeight = true;
+                    this.inputName = false;
+                    this.inputStock = false;
+                    this.inputNo = false;
+                    this.chooseIndex = id;
+                }else {
+                    this.inputWeight = false;
+                    this.attr[id].weight = e.detail.value;
+                }
+            },
+            money(val) {
+              let num = val.toString(); //先转换成字符串类型
+              if (num.indexOf('.') === 0) { //第一位就是 .
+                num = '0' + num
+              }
+              num = num.replace(/[^\d.]/g, "");  //清除“数字”和“.”以外的字符
+              num = num.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
+              num = num.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+              num = num.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+              if (num.indexOf(".") < 0 && num != "") {
+                num = parseFloat(num);
+              }
+              return num
+            },
+            allSetting() {
+                let select = false;
+                for(let i in this.attr) {
+                    if(this.attr[i].select) {
+                        select = true
+                    }
+                }
+                if(select) {
+                    this.showSetting = true;
+                }else {
+                    uni.showToast({
+                        title: '请选择规格',
+                        icon: 'none',
+                        duration: 1000
+                    });
+                }
+            },
+            settingSubmit() {
+                for(let i in this.attr) {
+                    if(this.attr[i].select) {
+                        if(this.setting.price) {
+                            this.attr[i].price = this.money(this.setting.price)
+                            this.$forceUpdate();
+                        }
+                        if(this.setting.stock) {
+                            this.attr[i].stock = this.setting.stock
+                            this.$forceUpdate();
+                        }
+                        if(this.setting.no) {
+                            this.attr[i].no = this.setting.no
+                            this.$forceUpdate();
+                        }
+                        if(this.setting.weight) {
+                            this.attr[i].weight = this.setting.weight
+                            this.$forceUpdate();
+                        }
+                    }
+                }
+                this.close();
+            },
+            close() {
+                this.showSetting = false;
+                this.setting.stock = '';
+                this.setting.price = '';
+                this.setting.no = '';
+                this.setting.weight = '';
+            },
+            unSelect(item,index) {
+                this.attr[index].select = !this.attr[index].select;
+                let select = true;
+                for(let i in this.attr) {
+                    if(!this.attr[i].select) {
+                        select = false;
+                    }
+                }
+                this.selectStatus = select;
+                this.$forceUpdate();
+            },
+            allSelect() {
+                this.selectStatus = !this.selectStatus;
+                for(let i in this.attr) {
+                    this.attr[i].select = !this.selectStatus;
+                    if(this.attr[i].show == this.listLength) {
+                        this.attr[i].select = this.selectStatus;
+                    }
+                }
+            },
+            save() {
+                let that = this;
+                let pass = true;
+                for(let i in that.attr) {
+                    if(!that.attr[i].price || !that.attr[i].stock) {
+                        pass = false;
+                        uni.showToast({
+                            title: '请填写规格信息',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false;
+                    }
+                }
+                if(pass) {
+                    uni.showLoading({
+                        title: '保存中...'
+                    });
+                    this.$storage.setStorage({
+                        key: "temp_attr_info",
+                        data: that.attr,
+                        success() {
+                            uni.hideLoading();
+                            setTimeout(() => {
+                                uni.navigateBack();
+                            }, 500);
+                        },
+                        fail(res) {
+                            uni.hideLoading();
+                            uni.showToast({
+                                title: res.errMsg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    })
+                }
+            },
+            choose(item,index) {
+                this.chooseGroup = item;
+                if(this.groupIndex != index) {
+                    this.showGroup = true;
+                    this.groupIndex = index;
+                }else {
+                    this.showGroup = !this.showGroup;
+                }
+            },
+            confirm(index,item) {
+                this.showGroup = false;
+                for(let i in this.attr_groups[this.groupIndex].attr_list) {
+                    this.attr_groups[this.groupIndex].attr_list[i].choose = false;
+                }
+                if(index > -1) {
+                    this.chooseAttr = item;
+                    item.attr_groups_id = this.attr_groups[this.groupIndex].attr_groups_id;
+                    this.attr_groups[this.groupIndex].attr_list[index].choose = true;
+                    this.attr_groups[this.groupIndex].choose = true;
+                    this.attr_groups[this.groupIndex].choose_attr = this.attr_groups[this.groupIndex].attr_list[index].attr_name;
+                }else {
+                    this.chooseGroup = {};
+                    this.chooseAttr = {};
+                    this.attr_groups[this.groupIndex].choose = false;
+                    this.attr_groups[this.groupIndex].choose_attr = '';
+                }
+                this.chooseList = [];
+                for(let i in this.attr_groups) {
+                    if(this.attr_groups[i].choose) {
+                        for(let j in this.attr_groups[i].attr_list) {
+                            if(this.attr_groups[i].attr_list[j].choose) {
+                                let {attr_group_id, attr_group_name, attr_list} = this.attr_groups[i];
+                                this.chooseList.push({
+                                    attr_group_id: attr_group_id,
+                                    attr_group_name: attr_group_name,
+                                    attr_id: attr_list[j].attr_id,
+                                    attr_name: attr_list[j].attr_name
+                                });
+                            }
+                        }
+                    }
+                }
+                this.listLength = this.chooseList.length;
+                let select = false;
+                let showIndex = -1;
+                for(let x in this.attr) {
+                    this.attr[x].show = 0;
+                    this.attr[x].choose = [];
+                    this.attr[x].showIndex = -200;
+                    if(this.chooseList.length > 0) {
+                        for(let y in this.attr[x].attr_list) {
+                            for(let i in this.chooseList) {
+                                let { attr_group_id, attr_id } = this.attr[x].attr_list[y];
+                                if(attr_group_id == this.chooseList[i].attr_group_id && attr_id == this.chooseList[i].attr_id) {
+                                    this.attr[x].choose.push(this.chooseList[i].attr_name);
+                                    this.attr[x].choose = Array.from(new Set(this.attr[x].choose));
+                                    this.attr[x].show = this.attr[x].choose.length;
+                                    this.attr[x].showIndex = showIndex;
+                                    select = true;
+                                    this.$forceUpdate();
+                                }
+                            }
+                        }
+                    }else {
+                        this.attr[x].showIndex = x;
+                    }
+                }
+                if(!select) {
+                    for(let x in this.attr) {
+                        this.attr[x].choose = [];
+                        this.attr[x].show = this.attr[x].choose.length;
+                    }
+                }else {
+                    for(let x in this.attr) {
+                        if(this.attr[x].show == this.listLength) {
+                            showIndex++;
+                            this.attr[x].showIndex = showIndex;
+                        }
+                    }
+                }
+                this.startIndex = -10;
+                this.endIndex = 90;
+                uni.pageScrollTo({
+                    scrollTop: 0,
+                    duration: 300
+                });
+            },
+            saveData(obj1,obj2,obj3,obj4,obj5) {
+                let obj = {};
+                obj.attr_list = []
+                obj.stock = '';
+                obj.price = '';
+                obj.no = '';
+                obj.weight = '';
+                obj.pic_url = '';
+                obj.shareLevelList = [];
+                obj.member_price = {};
+                obj.attr_list.push(obj1)
+                if(obj2) {
+                    obj.attr_list.push(obj2);
+                }
+                if(obj3) {
+                    obj.attr_list.push(obj3);
+                }
+                if(obj4) {
+                    obj.attr_list.push(obj4);
+                }
+                if(obj5) {
+                    obj.attr_list.push(obj5);
+                }
+                this.attr.push(obj);
+                this.$hideLoading();
+            },
+        },
+        onPageScroll (e) {
+            let that = this;
+            that.startIndex = Math.floor((e.scrollTop-50) / 250) - 150; // 取得可见区域的起始数据索引
+            that.endIndex = that.startIndex + 300; // 取得可见区域的结束数据索引
+        },
+        onLoad() { this.$commonLoad.onload();
+            let that = this;
+            that.$showLoading({
+                type: 'global',
+                text: '加载中...'
+            });
+            that.unit = that.$storage.getStorageSync('goods_unit') ? that.$storage.getStorageSync('goods_unit') : '件';
+            if(that.$storage.getStorageSync('temp_attr_info')) {
+                that.attr_groups = that.$storage.getStorageSync('temp_attr');
+                that.attr_list[0] = [];
+                that.attr = that.$storage.getStorageSync('temp_attr_info');
+                for(let i in that.attr) {
+                    that.attr[i].show = 0;
+                    that.attr[i].choose = [];
+                    that.attr[i].id = i;
+                    that.attr[i].select = false;
+                    that.attr[i].showIndex = i;
+                }
+                that.$hideLoading();
+            }else {
+                if(that.$storage.getStorageSync('temp_attr')) {
+                    that.attr_groups = that.$storage.getStorageSync('temp_attr');
+                    that.attr = [];
+                    for(let i = 0;i < that.attr_groups[0].attr_list.length;i++) {
+                            let first = {
+                                attr_group_id: that.attr_groups[0].attr_group_id,
+                                attr_group_name: that.attr_groups[0].attr_group_name,
+                                attr_id: that.attr_groups[0].attr_list[i].attr_id,
+                                attr_name: that.attr_groups[0].attr_list[i].attr_name,
+                            }
+                            if(that.attr_groups.length === 1) {
+                                that.saveData(first);
+                            }else {
+                                for(let j = 0;j < that.attr_groups[1].attr_list.length;j++) {
+                                        let second = {
+                                            attr_group_id: that.attr_groups[1].attr_group_id,
+                                            attr_group_name: that.attr_groups[1].attr_group_name,
+                                            attr_id: that.attr_groups[1].attr_list[j].attr_id,
+                                            attr_name: that.attr_groups[1].attr_list[j].attr_name,
+                                        }
+                                        if(that.attr_groups.length === 2) {
+                                            that.saveData(first,second);
+                                        }else {
+                                            for(let x = 0;x < that.attr_groups[2].attr_list.length;x++) {
+                                                    let third = {
+                                                        attr_group_id: that.attr_groups[2].attr_group_id,
+                                                        attr_group_name: that.attr_groups[2].attr_group_name,
+                                                        attr_id: that.attr_groups[2].attr_list[x].attr_id,
+                                                        attr_name: that.attr_groups[2].attr_list[x].attr_name,
+                                                    }
+                                                    if(that.attr_groups.length === 3) {
+                                                        that.saveData(first,second,third);
+                                                    }else {
+                                                        for(let y = 0;y < that.attr_groups[3].attr_list.length;y++) {
+                                                
+                                                                let fourth = {
+                                                                    attr_group_id: that.attr_groups[3].attr_group_id,
+                                                                    attr_group_name: that.attr_groups[3].attr_group_name,
+                                                                    attr_id: that.attr_groups[3].attr_list[y].attr_id,
+                                                                    attr_name: that.attr_groups[3].attr_list[y].attr_name,
+                                                                }
+                                                                if(that.attr_groups.length === 4) {
+                                                                    that.saveData(first,second,third,fourth);
+                                                                    that.$hideLoading();
+                                                                }else {
+                                                                    for(let z = 0;z < that.attr_groups[4].attr_list.length;z++) {
+                                                                        let fifth = {
+                                                                            attr_group_id: that.attr_groups[4].attr_group_id,
+                                                                            attr_group_name: that.attr_groups[4].attr_group_name,
+                                                                            attr_id: that.attr_groups[4].attr_list[z].attr_id,
+                                                                            attr_name: that.attr_groups[4].attr_list[z].attr_name,
+                                                                        }
+                                                                        that.saveData(first,second,third,fourth,fifth);
+                                                                    }
+                                                                }
+                                                        }
+                                                    }
+                                            }
+                                        }
+                                }
+                            }
+                    }
+                    for(let i in that.attr) {
+                        that.attr[i].show = 0;
+                        that.attr[i].choose = [];
+                        that.attr[i].id = i;
+                        that.attr[i].showIndex = i;
+                    }
+                }
+            }
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            })
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .checked-icon {
+        background-color: #ff4544;
+    }
+    .attr-group-holder {
+        height: #{100rpx};
+    }
+    .group {
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: #{100rpx};
+        background-color: #fff;
+        z-index: 100;
+        .group-item {
+            height: #{50rpx};
+            border-left: #{2rpx} solid #e2e2e2;
+            .group-name {
+                width: #{86rpx};
+                font-size: #{28rpx};
+                color: #353535;
+                text-align: right;
+                &.active {
+                    color: #ff4544;
+                }
+            }
+            .more {
+                display: block;
+                width: #{22rpx};
+                height: #{12rpx};
+                margin-left: #{12rpx};
+            }
+        }
+        .group-item:first-of-type {
+            border-left: 0;
+        }
+    }
+    .attr-item {
+        min-height: 445rpx;
+        .attr-name {
+            padding: #{24rpx};
+            padding-left: #{96rpx};
+            position: relative;
+            font-size: #{28rpx};
+            color: #353535;
+            .check {
+                width: #{84rpx};
+                height: #{76rpx};
+                padding: #{20rpx} #{24rpx};
+                position: absolute;
+                top: 0;
+                left: 0;
+                image {
+                    width: #{36rpx};
+                    height: #{36rpx};
+                }
+            }
+            .attr-group {
+                padding-right: #{24rpx};
+                height: #{30rpx};
+                line-height: #{26rpx};
+                border-right: #{2rpx} solid #999999;
+                margin-right: #{24rpx};
+                margin-bottom: #{8rpx};
+                .attr-group-name {
+                    color: #999999;
+                }
+            }
+            .attr-group:last-of-type {
+                border-right: 0;
+            }
+        }
+    }
+    .info-item {
+        border-top: #{1rpx} solid #e2e2e2;
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{28rpx};
+        color: #353535;
+        margin: 0 24rpx;
+        .form-label {
+            width: #{176rpx};
+        }
+        .input {
+            width: #{476rpx};
+            background-color: #fff;
+            padding-left: #{25rpx};
+            font-size: #{28rpx};
+            &.input-item {
+                height: #{80rpx};
+                line-height: #{80rpx};
+                white-space: nowrap;
+                overflow: auto;
+                &.placeholder {
+                    color: #cdcdcd;
+                }
+            }
+        }
+
+        .input.unit {
+            width: #{396rpx};
+        }
+
+        .unit-width {
+            width: #{112rpx};
+            text-align: right;
+        }
+    }
+    .info-item:first-of-type {
+        border-top: 0;
+    }
+    .bottom {
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        width: 100%;
+        height: #{120rpx};
+        background-color: #fff;
+        padding: 0 #{24rpx};
+        font-size: #{28rpx};
+        z-index: 10;
+        color: #353535;
+        .check {
+            width: #{84rpx};
+            height: #{84rpx};
+            padding: #{24rpx};
+            image {
+                width: #{36rpx};
+                height: #{36rpx};
+            }
+        }
+        .all-setting {
+            color: #ff4544;
+            margin-left: #{40rpx};
+        }
+        .save-btn {
+            position: absolute;
+            right: #{24rpx};
+            bottom: #{20rpx};
+            height: #{80rpx};
+            line-height: #{80rpx};
+            width: #{280rpx};
+            text-align: center;
+            border-radius: #{40rpx};
+            background-color: #ff4544;
+            font-size: #{32rpx};
+            color: #ffffff;
+            font-weight: bold;
+            &.iphone_x {
+                bottom: #{70rpx};
+            }
+        }
+    }
+    .bottom.iphone_x {
+        height: #{170rpx};
+        padding-bottom: #{50rpx};
+    }
+    .placeholder {
+        height: #{140rpx};
+    }
+    .placeholder.iphone_x {
+        height: #{190rpx};
+    }
+    .bg {
+        position: fixed;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        background-color: rgba(0,0,0,.3);
+        z-index: 80;
+        &.again {
+            z-index: 120;
+        }
+        .dialog-group {
+            position: fixed;
+            top: #{100rpx};
+            width: 100%;
+            border-top: #{2rpx} solid #e2e2e2;
+            background-color: #fff;
+            padding-left: #{24rpx};
+            .dialog-group-name {
+                height: #{88rpx};
+                line-height: #{88rpx};
+                font-size: #{28rpx};
+                color: #353535;
+                &.active {
+                    color: #ff4544;
+                }
+            }
+        }
+        .dialog-setting {
+            position: fixed;
+            bottom: 0;
+            left: 0;
+            width: 100%;
+            z-index: 122;
+            &.iphone_x {
+                padding-bottom: #{50rpx};
+            }
+            .dialog-setting-title {
+                border-top-left-radius: #{16rpx};
+                border-top-right-radius: #{16rpx};
+                background-color: #f7f7f7;
+                height: #{88rpx};
+                font-size: #{32rpx};
+                color: #353535;
+                padding: 0 #{24rpx};
+                .dialog-setting-btn {
+                    color: #ff4544;
+                }
+            }
+        }
+    }
+</style>

+ 432 - 0
src/plugins/mch/mch/goods-attr/goods-attr.vue

xqd
@@ -0,0 +1,432 @@
+<template>
+    <app-layout>
+        <view>
+            <view class="attr" v-for="(item,index) in list" :key="index">
+                <image @click='pop(index)' class='low-attr' src='https://shop.9026.com/web/statics/img/mall/mch/low.png'></image>
+                <view class="attr-item dir-left-nowrap">
+                    <view class="attr-label">规格名</view>
+                    <view class='dir-left-nowrap cross-center'>
+                        <input placeholder-style="color: #cdcdcd" placeholder="请输入规格" @input="changeName(item)" class='input' v-model="item.attr_group_name"/>
+                    </view>
+                </view>
+                <view class="attr-item dir-left-nowrap">
+                    <view class="attr-label">规格值</view>
+                    <view @click="changeValue(index)">
+                        <view class="attr_name" v-if="item.attr_list.length > 0">
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <view class="attr-name-list t-omit">
+                                <text v-for="(attr,idx) in item.attr_list" :key="idx"><text v-if="idx !== 0">;</text>{{attr.attr_name}}</text>
+                            </view>
+                        </view>
+                        <view v-else class='cat-info dir-right-nowrap cross-center'>
+                            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                            <text style="color: #cdcdcd">未选择</text>
+                        </view>
+                    </view>
+                    <view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class='title'>设置价格、库存等规格明细</view>
+        <view class='info-item cross-center main-between'>
+            <view class="form-label">规格明细</view>
+            <view @click="chooseDetail">
+                <view class='cat-info dir-right-nowrap cross-center'>
+                    <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                    <text v-if="attr.length > 0">已设置</text>
+                    <text style="color: #cdcdcd" v-else>未设置,点击设置</text>
+                </view>
+            </view>
+        </view>
+        <view v-if="list.length < 5" class='add-attr' @click='add_attr'>
+            <view class='add-attr-btn main-center'>
+                <image src='https://shop.9026.com/web/statics/img/mall/mch/add.png'></image>
+                <view>增加规格</view>
+            </view>
+        </view>
+        <view :class="['placeholder', `${iphone_x? 'iphone_x':''}`]"></view>
+        <view :class="['add', `${iphone_x? 'iphone_x':''}`]">
+            <view @click="save">保存</view>
+        </view>
+        <view class='dialog' v-if="index > -1">
+            <view class='dialog-item'>
+                <view class='dialog-title'>确定删除这个规格吗?</view>
+                <view class="submit-info">删除后,规格名与规格值都将被删除</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='close'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toDelete'>确认</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+
+    export default {
+        data() {
+            return {
+                list: [],
+                attr: [],
+                iphone_x: false,
+                noDetail: true,
+                first: true,
+                index: -1,
+            }
+        },
+
+        methods: {
+            changeName(item) {
+                let that = this;
+                if(this.attr.length > 0) {
+                    for(let i in this.attr) {
+                        for(let j in this.attr[i].attr_list) {
+                            if(item.attr_group_id == this.attr[i].attr_list[j].attr_group_id) {
+                                this.attr[i].attr_list[j].attr_group_name = item.attr_group_name;
+                            }
+                        }
+                    }
+                    this.$storage.setStorageSync('temp_attr_info', that.attr);
+                    uni.hideLoading();
+                }
+            },
+            pop(index) {
+                this.index = index;
+                if(!this.list[this.index].attr_group_name && this.list[this.index].attr_list.length === 0) {
+                    this.list.splice(this.index,1);
+                    this.index = -1;
+                    this.attr = [];
+                    this.$storage.removeStorageSync('temp_attr_info');
+                }
+            },
+            close() {
+                this.index = -1;
+            },
+            changeValue(index) {
+                this.$storage.setStorageSync('temp_attr', this.list);
+                uni.navigateTo({
+                    url: `/plugins/mch/mch/goods-attr-edit/goods-attr-edit?index=${index}`
+                })
+            },
+            chooseDetail() {
+                if(this.list.length === 0) {
+                    uni.showToast({
+                        title: '请输入规格信息',
+                        icon: 'none',
+                        duration: 1000
+                    });
+                    return false
+                }else {
+                    let number = 1;
+                    for(let i in this.list) {
+                        number *= +this.list[i].attr_list.length;
+                    }
+                    if(number > 1000) {
+                        uni.showToast({
+                            title: '规格组合超出1000,请删减规格值再继续操作',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false
+                    }
+                }
+                for(let i in this.list) {
+                    if(!this.list[i].attr_group_name || this.list[i].attr_list.length == 0) {
+                        uni.showToast({
+                            title: '请完善规格信息',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false;
+                    }
+                }
+                this.$storage.setStorageSync('temp_attr', this.list);
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/goods-attr-info/goods-attr-info'
+                })
+            },
+            toDelete() {
+                this.list.splice(this.index,1);
+                this.index = -1;
+                this.attr = [];
+                this.$storage.removeStorageSync('temp_attr_info');
+            },
+            save() {
+                let that = this;
+                if(that.list.length === 0) {
+                    uni.showToast({
+                        title: '请输入规格信息',
+                        icon: 'none',
+                        duration: 1000
+                    });
+                    return false
+                }
+                for(let i in that.list) {
+                    if(!that.list[i].attr_group_name || that.list[i].attr_list.length === 0 || that.attr.length === 0) {
+                        uni.showToast({
+                            title: '请完善规格信息',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false;
+                    }
+                }
+                this.$storage.setStorageSync('goods_attr_groups', this.list);
+                uni.showLoading({
+                    mask: true,
+                    title: '保存中...'
+                });
+                this.$storage.setStorageSync('goods_attr', this.attr);
+                setTimeout(function() {
+                    uni.hideLoading();
+                    uni.navigateBack();
+                }, 500);
+                uni.setStorage({
+                    key: "goods_attr_groups",
+                    data: that.list
+                })
+            },
+            add_attr() {
+                this.list.push({
+                    attr_group_id: this.list.length + 1,
+                    attr_group_name: '',
+                    attr_list: []
+                });
+                this.attr = [];
+                uni.removeStorage({
+                    key: 'temp_attr_info'
+                });
+            }
+        },
+
+        onLoad() { this.$commonLoad.onload();
+            let that = this;
+            that.$showLoading({
+                type: 'global',
+                text: '加载中...'
+            });
+            let loadAttr = false;
+            if(that.$storage.getStorageSync('goods_attr_groups')) {
+                that.list = that.$storage.getStorageSync('goods_attr_groups');
+                that.$storage.setStorageSync('temp_attr', that.list);
+                loadAttr = true;
+            }else {
+                that.list = that.$storage.getStorageSync('temp_attr');
+                loadAttr = true;
+            }
+            if(that.$storage.getStorageSync('goods_attr')) {
+                that.attr = that.$storage.getStorageSync('goods_attr');
+                that.$storage.setStorageSync('temp_attr_info', that.$storage.getStorageSync('goods_attr'));
+                that.$hideLoading();
+                that.first = false;
+            }else {
+                that.first = false;
+                that.$hideLoading();
+            }
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            })
+        },
+        onShow() {
+            let that = this;
+            if(!this.first) {
+                that.list = that.$storage.getStorageSync('temp_attr') ? that.$storage.getStorageSync('temp_attr') : [];
+                that.attr = that.$storage.getStorageSync('temp_attr_info') ? that.$storage.getStorageSync('temp_attr_info') : [];
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .attr {
+        background-color: #fff;
+        position: relative;
+        padding-left: #{84rpx};
+        margin-bottom: #{20rpx};
+        .low-attr {
+            position: absolute;
+            z-index: 2;
+            top: #{24rpx};
+            height: #{40rpx};
+            width: #{40rpx};
+            left: #{24rpx};
+        }
+        .attr-item {
+            height: #{88rpx};
+            line-height: #{88rpx};
+            border-top: #{2rpx} solid #e2e2e2;
+            position: relative;
+            font-size: #{28rpx};
+            color: #999;
+            color: #353535;
+            .attr-label {
+                width: #{174rpx};
+                flex-shrink: 0;
+            }
+            .attr_name {
+                .to-more {
+                    right: #{24rpx};
+                    top: #{32rpx};
+                    position: absolute;
+                    margin-left: 0;
+                }
+                .attr-name-list {
+                    width: #{432rpx};
+                }
+            }
+            .cat-info {
+                width: #{442rpx};
+            }
+            .to-more {
+                height: #{24rpx};
+                width: #{12rpx};
+                margin-left: #{10rpx};
+            }
+        }
+        .attr-item:first-of-type {
+            border-top: 0;
+        }
+    }
+    .title {
+        font-size: #{28rpx};
+        color: #999;
+        margin: #{30rpx} #{24rpx} #{13rpx};
+    }
+    .info-item {
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{28rpx};
+        background-color: #fff;
+        padding: 0 #{24rpx};
+        color: #353535;
+        .form-label {
+            width: #{176rpx};
+        }
+        .cat-info {
+            width: #{526rpx};
+            color: #666;
+            .to-more {
+                height: #{24rpx};
+                width: #{12rpx};
+                margin-left: #{10rpx};
+            }
+        }
+    }
+
+    .add-attr {
+        height: #{120rpx};
+        background-color: #fff;
+        margin-top: 20rpx;
+        padding-top: #{24rpx};
+        .add-attr-btn {
+            height: #{72rpx};
+            width: #{320rpx};
+            border-radius: #{36rpx};
+            border: #{2rpx} solid #ff4544;
+            margin: 0 auto;
+            color: #ff4544;
+            font-size: #{26rpx};
+            line-height: #{72rpx};
+            image {
+                height: #{28rpx};
+                width: #{28rpx};
+                margin-right: #{12rpx};
+                margin-top: #{22rpx};
+            }
+        }
+    }
+    .add {
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        height: #{120rpx};
+        width: 100%;
+        z-index: 15;
+        background-color: #fff;
+        view {
+            width: #{702rpx};
+            line-height: #{80rpx};
+            height: #{80rpx};
+            margin: #{20rpx} auto;
+            border-radius: #{40rpx};
+            background-color: #ff4544;
+            color: #fff;
+            font-size: #{32rpx};
+            text-align: center;
+        }
+    }
+    .add.iphone_x {
+        height: #{170rpx};
+        padding-bottom: #{50rpx};
+    }
+    .placeholder {
+        height: #{120rpx};
+    }
+    .placeholder.iphone_x {
+        height: #{170rpx};
+    }
+    .dialog {
+        position: fixed;
+        height: 100%;
+        width: 100%;
+        bottom: 0;
+        left: 0;
+        z-index: 10;
+        background-color: rgba(0, 0, 0, .3);
+        .dialog-item {
+            padding-top: #{20rpx};
+            position: fixed;
+            top: 25%;
+            left: 0;
+            right: 0;
+            margin: 0 auto;
+            width: #{620rpx};
+            border-radius: #{16rpx};
+            background-color: #fff;
+            text-align: center;
+        }
+        .submit-info {
+            font-size: #{28rpx};
+            color: #999999;
+            padding: #{34rpx} 0 #{52rpx};
+        }
+        .btn-area {
+            height: #{88rpx};
+            position: relative;
+            border-top: #{1rpx} solid #e2e2e2;
+            .line {
+                height: #{32rpx};
+                width: #{1rpx};
+                background-color: #e2e2e2;
+                position: absolute;
+                top: #{28rpx};
+                left: 0;
+                right: 0;
+                margin: 0 auto;
+            }
+            .submit-btn {
+                height: #{88rpx};
+                line-height: #{88rpx};
+                font-size: #{32rpx};
+                color: #666;
+                width: #{310rpx};
+                text-align: center;
+            }
+            .submit-btn.be-submit {
+                color: #ff4544;
+            }
+        }
+        .dialog-title {
+            text-align: center;
+            font-size: #{32rpx};
+            color: #353535;
+            margin: #{23rpx} 0 0;
+        }
+    }
+</style>

+ 566 - 0
src/plugins/mch/mch/goods-detail/goods-detail.vue

xqd
@@ -0,0 +1,566 @@
+<template>
+    <view class="app-layout">
+        <app-layout :overflow="overflow">
+            <view class="show" v-if="list.length == 0">
+                <image @click="showMenu(0)" src='https://shop.9026.com/web/statics/img/mall/mch/add-detail.png'></image>
+                <view>快来添加内容,来介绍你的商品吧!</view>
+            </view>
+            <view v-else>
+                <view class="list-item dir-top-nowrap" v-for="(item,index) in list" :key="index">
+                    <image v-if="item.type =='line'" class="line" :src="adminImg.line"></image>
+                    <view v-if="item.type =='img' && item.pic_url == ''" class="loading main-center dir-top-nowrap cross-center">
+                        <image class="loading-img" src="https://shop.9026.com/web/statics/img/mall/static/loading.gif"></image>
+                        <view class="loading-text">图片上传中,请稍后...</view>
+                    </view>
+                    <image v-if="item.type =='img' && item.pic_url != ''" :style="[{'height':`${item.height}`}]" @load="imageLoad(index,$event)" :src="item.pic_url"></image>
+                    <view v-if="item.type=='text'" class="txt"><text>{{item.text}}</text></view>
+                    <view class="choose dir-right-nowrap">
+                        <view @click="showMenu(index)" class="choose-item">插入</view>
+                        <view v-if="item.type=='text'" @click="editText(index,item)" class="choose-item">编辑</view>
+                        <view v-if="item.type=='img'" @click="toggle(index)" class="choose-item">替换</view>
+                        <view @click="move(1,index,item)" v-if="index != list.length - 1" class="choose-item">下移</view>
+                        <view @click="move(2,index,item)" v-if="index != 0" class="choose-item">上移</view>
+                        <view @click="toRemove(index)" class="choose-item">删除</view>
+                    </view>
+                </view>
+                <view :class="['placeholder', `${iphone_x? 'iphone_x':''}`]"></view>
+                <view :class="['add', `${iphone_x? 'iphone_x':''}`]">
+                    <view @click="save">保存</view>
+                </view>
+            </view>
+            <view @click="showMenu" v-if="textDialog || menu || is_delete" class="dialog">
+                <view v-if="menu" class="menu">
+                    <view class="menu-list main-center">
+                        <view v-if="!toToggle" @click.stop="addLine" class="menu-item">
+                            <image src="https://shop.9026.com/web/statics/img/mall/mch//line.png"></image>
+                            <view>分割线</view>
+                        </view>
+                        <view v-if="!toToggle" @click.stop="showText" class="menu-item">
+                            <image src="https://shop.9026.com/web/statics/img/mall/mch//txt.png"></image>
+                            <view>文本</view>
+                        </view>
+                        <view @click="add('album')" class="menu-item">
+                            <image src="https://shop.9026.com/web/statics/img/mall/mch//image.png"></image>
+                            <view>图片</view>
+                        </view>
+                        <view class="toggle-placeholder" v-if="toToggle"></view>
+                        <view @click="add('camera')" class="menu-item">
+                            <image src="https://shop.9026.com/web/statics/img/mall/mch//camera.png"></image>
+                            <view>相机</view>
+                        </view>
+                    </view>
+                    <image @click="showMenu" class="close" src="https://shop.9026.com/web/statics/image/mall/static/icon/close.png"></image>
+                </view>
+                <view @click.stop="" v-if="textDialog" class="textarea">
+                    <textarea focus maxlength="-1" @confirm="toList" show-confirm-bar v-model="txt"></textarea>
+                </view>
+                <view class="dialog-item" v-if="is_delete">
+                    <view class="dialog-title">提示</view>
+                    <view class="dialog-txt">是否删除该组件</view>
+                    <view class="main-center btn-area">
+                        <view class="submit-btn" @click='cancel'>取消</view>
+                        <view class="line"></view>
+                        <view class="submit-btn be-submit" @click='remove'>确认</view>
+                    </view>
+                </view>
+            </view>
+        </app-layout>
+    </view>
+</template>
+
+<script>
+    import { mapState } from "vuex";
+    import uploadFile from '../../../../core/upload.js';
+
+    export default {
+        data() {
+            return {
+                tempFilePaths: '',
+                imgheight: 0,
+                menu: false,
+                list: [],
+                txt: '',
+                textDialog: false,
+                overflow: false,
+                is_delete: false,
+                toToggle: false,
+                index: 0,
+                reEdit: false,
+                loadingImg: false,
+                iphone_x: false
+            }
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+                adminImg: state => state.mallConfig.__wxapp_img.app_admin
+            })
+        },
+        methods: {
+            toList() {
+                this.textDialog = false;
+                let item = {
+                    type:'text',
+                    text: this.txt
+                };
+                if(this.reEdit) {
+                    this.list.splice(this.index,1,item);
+                    this.reEdit = false;
+                }else {
+                    this.list.splice(this.index,0,item);
+                }
+            },
+            editText(index,item) {
+                this.txt = item.text;
+                this.reEdit = true;
+                this.textDialog = true;
+                this.index = index;
+            },
+            move(type,index,item) {
+                this.list.splice(index,1);
+                if(type == 1) {
+                    this.list.splice(index + 1,0,item);
+                }else {
+                    this.list.splice(index - 1,0,item);
+                }
+            },
+
+            toRemove(index) {
+                this.txt = null;
+                this.is_delete = true;
+                this.index = index;
+            },
+
+            cancel() {
+                this.is_delete = false;
+            },
+
+            remove() {
+                this.is_delete = false;
+                this.list.splice(this.index,1);
+            },
+
+            showMenu(index) {
+                if(index > -1) {
+                    this.index = index + 1;
+                    this.menu = true;
+                    this.txt = '';
+                    this.toToggle = false;
+                }else {
+                    if(this.txt.length > 0) {
+                        this.toList();
+                    }else {
+                        this.textDialog = false;
+                    }
+                    this.menu = false;
+                }
+            },
+
+            toggle(index) {
+                this.index = index;
+                this.toToggle = true;
+                this.menu = true;
+            },
+
+            addLine() {
+                let item = {type:'line'}
+                this.list.splice(this.index,0,item)
+                this.menu = false;
+            },
+
+            showText() {
+                this.textDialog = !this.textDialog;
+                this.menu = false;
+            },
+
+            add(sourceType) {
+                let that = this;
+                this.menu = false;
+                // #ifdef MP
+                uni.chooseImage({
+                    count: 1,
+                    sizeType: ['original', 'compressed'],
+                    sourceType: [sourceType],
+                    success(res) {
+                        // tempFilePath可以作为img标签的src属性显示图片
+                        const tempFilePaths = res.tempFilePaths;
+                        let list = that.list;
+                        tempFilePaths.forEach(function (row, index) {
+                            let para = {
+                                pic_url: '',
+                                type: 'img',
+                                id: 0
+                            };
+                            that.loadingImg = true;
+                            that.toToggle ? list.splice(that.index,1,para) : list.splice(that.index,0,para);
+                            that.list = list;
+                            let fileName = '';
+                            // #ifdef MP-BAIDU
+                            fileName = row.substr(row.lastIndexOf('/') + 1);
+                            // #endif
+                            uploadFile({
+                                url: that.$api.upload.file,
+                                filePath: row,
+                                fileType: 'image',
+                                mch_id: 0,
+                                fileName: fileName
+                            }).then(res => {
+                                let imgInfo = undefined;
+
+                                // #ifndef MP-BAIDU
+                                imgInfo = JSON.parse(res.data);
+                                // #endif
+
+                                // #ifdef MP-BAIDU
+                                imgInfo = res.data;
+                                // #endif
+
+                                if (imgInfo.code == 0) {
+                                    for(let i in list) {
+                                        if(list[i].type === 'img' && list[i].pic_url === '') {
+                                            list[i].pic_url = imgInfo.data.url;
+                                            list[i].id = imgInfo.data.id;
+                                        }
+                                    }
+                                }
+                                that.list = list;
+
+                                if (index == tempFilePaths.length - 1) {
+                                    that.loadingImg = false;
+                                    uni.hideLoading();
+                                }
+                            });
+                        })
+                    }
+                })
+                // #endif
+
+                // #ifdef H5
+                uni.chooseImage({
+                    count: 1,
+                    sizeType: ['original', 'compressed'],
+                    sourceType: [sourceType],
+                    success: function(e) {
+                        uni.showLoading({
+                            mask: true,
+                            title: '上传中...'
+                        });
+                        let list = that.list;
+                        let image = new Image();
+                        image.src = e.tempFilePaths;
+                        let para = {
+                            pic_url: '',
+                            type: 'img',
+                            id: 0
+                        };
+                        that.loadingImg = true;
+                        that.toToggle ? list.splice(that.index,1,para) : list.splice(that.index,0,para);
+                        that.list = list;
+                        image.onload = () => {
+                            let canvas = document.createElement("canvas");
+                            canvas.width = image.width;
+                            canvas.height = image.height;
+                            let ctx = canvas.getContext("2d");
+                            ctx.drawImage(image, 0, 0, image.width, image.height);
+                            let ext = image.src.substring(image.src.lastIndexOf(".") + 1).toLowerCase();
+                            let dataURL = canvas.toDataURL("image/" + ext);
+                            uploadFile({
+                                url: that.$api.upload.file,
+                                maxNum: 1,
+                                success: function({res, header}) {
+                                    that.$request({
+                                        url: that.$api.upload.file + '&name=base64',
+                                        header: header,
+                                        method: 'post',
+                                        data: {
+                                            database: dataURL
+                                        }
+                                    }).then(res => {
+                                        uni.hideLoading();
+                                        if (res.code === 0) {
+                                            for(let i in list) {
+                                                if(list[i].type === 'img' && list[i].pic_url === '') {
+                                                    list[i].pic_url = res.data.url;
+                                                    list[i].id = res.data.id;
+                                                }
+                                            }
+                                            that.loadingImg = false;
+                                            uni.hideLoading();
+                                        } else {
+                                            uni.showModal({
+                                                title: '',
+                                                content: res.msg,
+                                                showCancel: false,
+                                            });
+                                        }
+                                    })
+                                }
+                            });
+                        };
+                    }
+                });
+                // #endif
+            },
+            imageLoad(index,e) {
+                let $height = e.detail.height; //获取图片真实高度
+                let $width = e.detail.width; //获取图片真实宽度
+                let height = $height * (750 / $width);
+                this.list[index].height = height + 'rpx';
+                this.$forceUpdate();
+            },
+            clear(index) {
+                this.img.splice(index,1)
+                this.$storage.setStorageSync('goods_detail', this.list);
+            },
+            save() {
+                if(!this.loadingImg) {
+                    this.$storage.setStorageSync('goods_detail', this.list);
+                    setTimeout(function() {
+                        uni.navigateBack();
+                    }, 500)
+                }else {
+                    uni.showToast({
+                        title: '上传图片中,请稍后...',
+                        icon: 'none',
+                        duration: 1000
+                    });
+                }
+            }
+        },
+
+        onLoad() { this.$commonLoad.onload();
+            let that = this;
+            this.list = this.$storage.getStorageSync('goods_detail') ? this.$storage.getStorageSync('goods_detail') : [];
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            })
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    #editor {
+        width: 100%;
+        height: 100%;
+        background-color: #fff;
+    }
+    .app-layout {
+        position: absolute;
+        top: 0;
+        left: 0;
+        height: 100%;
+        width: 100%;
+        background: #fff;
+    }
+    .app-layout /deep/ .app-layout {
+        background: #FFFFFF;
+    }
+    .show {
+        margin-top: #{220rpx};
+        width: 100%;
+        text-align: center;
+        color: #353535;
+        font-size: #{32rpx};
+        image {
+            width: #{310rpx};
+            height: #{310rpx};
+            margin-bottom: #{90rpx};
+        }
+    }
+    .dialog {
+        background-color: rgba(0,0,0,.3);
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 20;
+        .menu {
+            height: #{420rpx};
+            width: 100%;
+            position: fixed;
+            bottom: 0;
+            left: 0;
+            z-index: 21;
+            background-color: #fff;
+            border-top-left-radius: #{16rpx};
+            border-top-right-radius: #{16rpx};
+            padding-top: #{68rpx};
+            .toggle-placeholder {
+                height: #{194rpx};
+                width: #{134rpx};
+            }
+            .menu-list {
+                margin-left: #{23rpx};
+                .menu-item {
+                    margin: 0 #{28rpx};
+                    width: #{120rpx};
+                    text-align: center;
+                    color: #353535;
+                    font-size: #{28rpx};
+                    image {
+                        height: #{120rpx};
+                        width: #{120rpx};
+                        margin-bottom: #{20rpx};
+                    }
+                }
+            }
+            .close {
+                width: #{30rpx};
+                height: #{30rpx};
+                margin: #{88rpx} auto 0;
+                display: block;
+            }
+        }
+        .textarea {
+            position: fixed;
+            top: #{25rpx};
+            left: #{24rpx};
+            z-index: 50;
+            width: #{702rpx};
+            height: #{300rpx};
+            background-color: #fff;
+            border-radius: #{16rpx};
+            padding: #{24rpx} #{28rpx};
+            color: #353535;
+            font-size: #{28rpx};
+            textarea {
+                width: 100%;
+                height: 100%;
+            }
+        }
+        .dialog-item {
+            padding-top: #{35rpx};
+            position: fixed;
+            top: 30%;
+            left: 0;
+            right: 0;
+            margin: 0 auto;
+            width: #{620rpx};
+            border-radius: #{16rpx};
+            background-color: #fff;
+            .dialog-title {
+                font-size: #{32rpx};
+                color: #353535;
+                margin-bottom: #{6rpx};
+                text-align: center;
+            }
+            .dialog-txt {
+                margin: #{40rpx} auto;
+                text-align: center;
+                font-size: #{32rpx};
+                color: #353535;
+            }
+            .btn-area {
+                height: #{88rpx};
+                position: relative;
+                border-top: #{1rpx} solid #e2e2e2;
+                .line {
+                    height: #{32rpx};
+                    width: #{1rpx};
+                    background-color: #e2e2e2;
+                    position: absolute;
+                    top: #{28rpx};
+                    left: 0;
+                    right: 0;
+                    margin: 0 auto;
+                }
+                .submit-btn {
+                    height: #{88rpx};
+                    line-height: #{88rpx};
+                    font-size: #{32rpx};
+                    color: #666;
+                    width: #{310rpx};
+                    text-align: center;
+                }
+                .submit-btn.be-submit {
+                    color: #ff4544;
+                }
+            }
+        }
+    }
+    .list-item {
+        background-color: #fff;
+        margin-top: #{-2rpx};
+        image {
+            width: 100%;
+        }
+        .loading {
+            padding: #{75rpx} 0;
+            background-color: #fff;
+            .loading-img {
+                height: #{160rpx};
+                width: #{160rpx};
+            }
+            .loading-text {
+                font-size: #{28rpx};
+                color: #999999;
+                margin-top: #{28rpx};
+            }
+        }
+        .line {
+            height: #{72rpx};
+        }
+        .choose {
+            height: #{80rpx};
+            font-size: #{28rpx};
+            color: #353535;
+            background-color: #f7f7f7;
+            padding-bottom: #{16rpx};
+            .choose-item {
+                width: #{120rpx};
+                height: #{64rpx};
+                line-height: #{64rpx};
+                text-align: center;
+                border: #{2rpx} solid #ff4544;
+                background-color: #ffffff;
+                color: #ff4544;
+                margin-left: #{16rpx};
+            }
+        }
+        .txt {
+            padding: #{24rpx};
+        }
+    }
+    .list-item:first-of-type {
+        border-top: 0;
+        margin-top: 0;
+    }
+    .list-item:last-of-type {
+        border-bottom: 0;
+    }
+    .add {
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        height: #{120rpx};
+        width: 100%;
+        z-index: 15;
+        background-color: #fff;
+        view {
+            width: #{702rpx};
+            line-height: #{80rpx};
+            height: #{80rpx};
+            margin: #{20rpx} auto;
+            border-radius: #{40rpx};
+            background-color: #ff4544;
+            color: #fff;
+            font-size: #{32rpx};
+            text-align: center;
+        }
+    }
+    .add.iphone_x {
+        height: #{170rpx};
+        padding-bottom: #{50rpx};
+    }
+    .placeholder {
+        height: #{120rpx};
+    }
+    .placeholder.iphone_x {
+        height: #{170rpx};
+    }
+</style>

+ 706 - 0
src/plugins/mch/mch/goods/goods.vue

xqd
@@ -0,0 +1,706 @@
+<template>
+    <app-layout>
+        <view v-if="id" class="screen" @click='id=null'></view>
+        <view class="search main-between">
+            <view @click='beSearch' v-if="!toSearch" class="main-center search-content cross-center">
+                <image class="search-icon" src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-search.png"></image>
+                <text class="search-text">搜索</text>
+            </view>
+            <view v-else class="dir-left-nowrap">
+                <input focus @blur='beSearch' class="box-grow-1 t-small search-content" @confirm='reload' confirm-type='search' v-model='keyword'></input>
+            </view>
+            <view @click="toAdd">
+                <view class='add-goods dir-left-nowrap'>
+                    <image src='https://shop.9026.com/web/statics/img/mall/mch/add.png'></image>
+                    <view>添加商品</view>
+                </view>
+            </view>
+        </view>
+        <app-tab-nav setTop="88" :tabList="tabList" padding="0" :activeItem="activeTab" @click="tabStatus" :theme="theme"></app-tab-nav>
+        <view class="top-place"></view>
+        <view>
+            <view class="msg-item" @click='id=null' v-for="item in list" :key="item.id">
+                <image class="msg-img" :src='item.cover_pic'></image>
+                <view class="out-dialog" v-if="item.goods_stock == 0 && appSetting.is_show_stock == '1'">
+                    <image :src="appSetting.is_use_stock == '1' ? appImg.plugins_out : appSetting.sell_out_pic"></image>
+                </view>
+                <view class="t-omit-two goods-name">{{item.name}}</view>
+                <view class='goods-price'>¥{{item.price}}</view>
+                <view class='goods-num'>库存:{{item.goods_stock}}</view>
+                <image class='more-handle' @click.stop='showMenu(item.id)' src='https://shop.9026.com/web/statics/img/mall/mch/more-handle.png'></image>
+                <view v-if="item.id == id" class='main-between more'>
+                    <view @click.stop="toEdit(item.id)">
+                        <view class='more-item'>
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/goods-edit.png'></image>
+                            <view>编辑</view>
+                        </view>
+                    </view>
+                    <view v-if="item.status == 1" @click.stop="toSwitch(0,item.id)">
+                        <view class='more-item'>
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/goods-xiajia.png'></image>
+                            <view>下架</view>
+                        </view>
+                    </view>
+                    <view v-if="item.status == 0 && is_goods_audit == 0" @click.stop="toSwitch(1,item.id)">
+                        <view class='more-item'>
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/goods-xiajia.png' style="transform: rotate(180deg)"></image>
+                            <view>上架</view>
+                        </view>
+                    </view>
+                    <view v-if="(item.mch_goods.status == 0 || item.mch_goods.status == 3) && item.status == 0 && is_goods_audit == 1" @click.stop="toSwitch(2,item.id)">
+                        <view class='more-item'>
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/goods-xiajia.png' style="transform: rotate(180deg)"></image>
+                            <view>申请上架</view>
+                        </view>
+                    </view>
+                    <view @click.stop="toDelete(item.id)">
+                        <view class='more-item'>
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/goods-del.png'></image>
+                            <view>删除</view>
+                        </view>
+                    </view>
+                </view>
+                <view v-if="item.id == id" class='and-more'></view>
+            </view>
+        </view>
+        <view class='no-tip' v-if="list.length == 0">
+            <image :src='adminImg.no_goods'></image>
+            <view>没有任何商品哦~</view>
+        </view>
+        <view class="dialog" v-if="is_switch || is_delete || apply_up">
+            <view class="dialog-item" v-if="is_switch || is_delete || apply_up">
+                <view class="dialog-title">提示</view>
+                <view class="dialog-txt" v-if="is_switch && status== 0">是否下架该商品</view>
+                <view class="dialog-txt" v-if="is_switch && status== 1">是否上架该商品</view>
+                <view class="dialog-txt" v-if="apply_up">是否申请上架该商品</view>
+                <view class="dialog-txt" v-if="is_delete">是否删除该商品</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view v-if="is_switch" class="submit-btn be-submit" @click='goods_switch'>确认</view>
+                    <view v-if="is_delete" class="submit-btn be-submit" @click='goods_destroy'>确认</view>
+                    <view v-if="apply_up" class="submit-btn be-submit" @click='applyStatus'>确认</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import appTabNav from "../../../../components/basic-component/app-tab-nav/app-tab-nav.vue";
+
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                theme: {
+                    color: '#ff4544'
+                },
+                tabList: [
+                    {id:1, name: '出售中'},
+                    {id:2, name: '售罄'},
+                    {id:3, name: '仓库中'},
+                    {id:4, name: '最新'}
+                ],
+                activeTab: '1',
+                keyword: '',
+                page: 1,
+                id: null,
+                more_list: false,
+                iphone_x: false,
+                status: null,
+                page_loading: true,
+                sort_type: 0,
+                sort: 1,
+                is_goods_audit: 1,
+                go_status: 1,
+                is_sold_out: 0,
+                list: [],
+                is_switch: false,
+                is_delete: false,
+                apply_up: false,
+                toSearch: false,
+                device: null,
+                mch_id: 0
+            }
+        },
+        components: {
+            "app-tab-nav": appTabNav
+        },
+        computed: {
+            ...mapState({
+                appImg: state => state.mallConfig.__wxapp_img.mall,
+                appSetting: state => state.mallConfig.mall.setting,
+                adminImg: state => state.mallConfig.__wxapp_img.mch,
+            })
+        },
+        methods: {
+            toEdit(id) {
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/add-goods/add-goods?id=' + id + '&mch_id=' + this.mch_id
+                })
+                setTimeout(()=>{
+                    this.id = null
+                })
+            },
+            toAdd() {
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/add-goods/add-goods?mch_id=' + this.mch_id
+                })
+            },
+            beSearch() {
+                if (this.keyword.length == 0) {
+                    this.toSearch = !this.toSearch
+                }else {
+                    this.toSearch = this.toSearch;
+                }
+            },
+            reload() {
+                this.id = null;
+                this.getList();
+            },
+            cancel() {
+                this.id = null;
+                this.is_delete = false;
+                this.is_switch = false;
+                this.apply_up = false;
+            },
+            toDelete(e) {
+                this.is_delete = true;
+            },
+            showMenu(id) {
+                this.id = id;
+            },
+            toSwitch(status,id) {
+                let that = this;
+                that.id = id;
+                if(status == 2) {
+                    that.apply_up = true;
+                }else {
+                    that.status = status;
+                    that.is_switch = true;
+                }
+            },
+            tabStatus(e) {
+                this.activeTab = e.currentTarget.dataset.id;
+                this.getList();
+            },
+            applyStatus() {
+                let that = this;
+                that.apply_up = false;
+                uni.showLoading({
+                    title: '申请中...'
+                });
+                that.$request({
+                    url: that.$api.mch.apply_status,
+                    method: 'post',
+                    data: {
+                        mch_id: that.mch_id,
+                        id: that.id,
+                    }
+                }).then(response=>{
+                    uni.hideLoading();
+                    if(response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            duration: 1000
+                        });
+                        setTimeout(function(){
+                            that.reload();
+                        },1000)
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                });
+            },
+            getList() {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.list = [];
+                that.page = 1;
+                if(that.activeTab == '1') {
+                    that.go_status = 1;
+                    that.is_sold_out = 0;
+                }else if(that.activeTab == '2') {
+                    that.go_status = 1;
+                    that.is_sold_out = 1;
+                }else if(that.activeTab == '3') {
+                    that.go_status = 0;
+                    that.is_sold_out = 0;
+                }else if(that.activeTab == '4') {
+                    that.go_status = 1;
+                    that.is_sold_out = 0;
+                }
+                that.$request({
+                    url: that.$api.mch.goods,
+                    data: {
+                        page: that.page,
+                        mch_id: that.mch_id,
+                        sort: that.sort,
+                        sort_type: that.sort_type,
+                        keyword: that.keyword,
+                        status: that.go_status,
+                        is_sold_out: that.is_sold_out,
+                    }
+                }).then(response=>{
+                    uni.hideLoading();
+                    if(response.code == 0) {
+                        that.list = response.data.list;
+                        that.page++;
+                        that.more_list = false;
+                        if (response.data.list.length == 10) {
+                            that.more_list = true;
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                });
+            },
+            getMore() {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                if(that.activeTab == '1') {
+                    that.go_status = 1;
+                    that.is_sold_out = 0;
+                }else if(that.activeTab == '2') {
+                    that.go_status = 1;
+                    that.is_sold_out = 1;
+                }else if(that.activeTab == '3') {
+                    that.go_status = 0;
+                    that.is_sold_out = 0;
+                }else if(that.activeTab == '4') {
+                    that.go_status = 1;
+                    that.is_sold_out = 0;
+                }
+                that.$request({
+                    url: that.$api.mch.goods,
+                    data: {
+                        page: that.page,
+                        mch_id: that.mch_id,
+                        sort: that.sort,
+                        sort_type: that.sort_type,
+                        keyword: that.keyword,
+                        status: that.go_status,
+                        is_sold_out: that.is_sold_out,
+                    }
+                }).then(response=>{
+                    uni.hideLoading();
+                    if(response.code == 0) {
+                        that.list = that.list.concat(response.data.list);
+                        that.page++;
+                        that.more_list = false;
+                        if (response.data.list.length == 10) {
+                            that.more_list = true;
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                });
+            },
+            goods_destroy() {
+                let that = this;
+                that.is_delete = false;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.destroy,
+                    data: {
+                        mch_id: that.mch_id,
+                        id: that.id
+                    },
+                    method: 'post'
+                }).then(response=>{
+                    uni.hideLoading();
+                    if(response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            duration: 1000
+                        });
+                        setTimeout(function(){
+                            that.reload();
+                        },1000)
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    un
+                    
+                });
+            },
+
+            goods_switch() {
+                let that = this;
+                that.is_switch = false;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.switch_status,
+                    data: {
+                        mch_id: that.mch_id,
+                        id: that.id
+                    },
+                    method: 'post'
+                }).then(response=>{
+                    uni.hideLoading();
+                    if(response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            duration: 1000
+                        });
+                        setTimeout(function(){
+                            that.reload();
+                        },1000)
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                });
+            },
+
+            getSetting() {
+                let that = this;
+                that.$showLoading({
+                    type: 'global',
+                    text: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.setting
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.is_goods_audit = response.data.setting.is_goods_audit;
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+        },
+
+        onReachBottom: function() {
+            if (this.more_list) {
+                this.getMore();
+            }
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            that.mch_id = options.mch_id;
+            that.go_status = 1;
+            that.is_sold_out = 0;
+            that.getSetting();
+        },
+
+        onShow(options) {
+            let that = this;
+            var getInfo = setInterval(function(){
+                if(that.mch_id > 0) {
+                    clearInterval(getInfo);
+                    that.getList();
+                }
+            },500)
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .search {
+        z-index: 30;
+        height: #{88rpx};
+        padding: #{16rpx} #{35rpx};
+        background-color: #EFEFF4;
+        position: fixed;
+        top: 0;
+        left: 0;
+        right: 0;
+        width: 100%;
+    }
+
+    .search input {
+        padding: 0 #{30rpx};
+    }
+
+    .search-content {
+        background-color: #fff;
+        height: #{56rpx};
+        border-radius: #{28rpx};
+        width: #{502rpx};
+    }
+
+    input.search-content {
+        width: #{482rpx};
+        font-size: #{26rpx};
+    }
+
+    .msg-item {
+        margin: #{24rpx};
+        margin-bottom: 0;
+        background-color: #fff;
+        border-radius: #{16rpx};
+        position: relative;
+        padding: #{24rpx};
+        .out-dialog {
+            width: #{148rpx};
+            height: #{148rpx};
+            position: absolute;
+            top: #{24rpx};
+            left: #{24rpx};
+            z-index: 5;
+            background-color: rgba(0,0,0,.5);
+            image {
+                width: #{148rpx};
+                height: #{148rpx};
+            }
+        }
+    }
+
+    .msg-img {
+        height: #{148rpx};
+        width: #{148rpx};
+        display: block;
+    }
+
+    .goods-name {
+        font-size: #{26rpx};
+        color: #353535;
+        position: absolute;
+        top: #{22rpx};
+        left: #{192rpx};
+        width: #{486rpx};
+    }
+
+    .goods-price {
+        font-size: #{32rpx};
+        color: #ff4544;
+        position: absolute;
+        bottom: #{55rpx};
+        left: #{192rpx};
+    }
+
+    .goods-num {
+        font-size: #{24rpx};
+        color: #999999;
+        position: absolute;
+        bottom: #{20rpx};
+        left: #{192rpx};
+    }
+
+    .add-goods {
+        width: #{180rpx};
+        height: #{56rpx};
+        line-height: #{54rpx};
+        border-radius: #{28rpx};
+        border: #{1rpx} solid #ff4544;
+        padding-left: #{18rpx};
+        font-size: #{26rpx};
+        color: #ff4544;
+        margin-left: #{20rpx};
+        background-color: #fff;
+    }
+
+    .add-goods image{
+        height: #{28rpx};
+        width: #{28rpx};
+        margin-right: #{8rpx};
+        margin-top: #{14rpx};
+        display: block;
+    }
+
+    .more-handle {
+        height: #{56rpx};
+        width: #{56rpx};
+        position: absolute;
+        bottom: #{16rpx};
+        right: #{24rpx};
+    }
+
+    .more {
+        height: #{100rpx};
+        border-radius: #{8rpx};
+        background-color: rgba(0, 0, 0, .75);
+        padding: #{18rpx} 0 #{8rpx};
+        font-size: #{20rpx};
+        color: #fff;
+        z-index: 6;
+        position: absolute;
+        bottom: #{62rpx};
+        right: #{24rpx};
+    }
+
+    .more-item {
+        width: #{90rpx};
+        text-align: center;
+    }
+
+    .more .more-item image {
+        height: #{40rpx};
+        width: #{40rpx};
+    }
+
+    .and-more {
+        width: 0;
+        height: 0;
+        border-left: #{10rpx} solid transparent;
+        border-right: #{10rpx} solid transparent;
+        border-top: #{10rpx} solid rgba(0, 0, 0, .75);
+        position: absolute;
+        bottom: #{54rpx};
+        right: #{44rpx};
+        z-index: 6;
+    }
+
+    .screen {
+        position: fixed;
+        top: 0;
+        left: 0;
+        height: 100%;
+        width: 100%;
+        background-color: rgba(0, 0, 0, 0)
+    }
+
+    .btn-area {
+        height: #{88rpx};
+        position: relative;
+        border-top: #{1rpx} solid #e2e2e2;
+    }
+
+    .btn-area .line {
+        height: #{32rpx};
+        width: #{1rpx};
+        background-color: #e2e2e2;
+        position: absolute;
+        top: #{28rpx};
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+    }
+
+    .submit-btn {
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{32rpx};
+        color: #666;
+        width: #{310rpx};
+        text-align: center;
+    }
+
+    .submit-btn.be-submit {
+        color: #ff4544;
+    }
+
+    .dialog {
+        position: fixed;
+        height: 100%;
+        width: 100%;
+        bottom: 0;
+        left: 0;
+        z-index: 50;
+        background-color: rgba(0, 0, 0, .3);
+    }
+
+    .dialog-item {
+        padding-top: #{35rpx};
+        position: fixed;
+        top: 30%;
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+        width: #{620rpx};
+        border-radius: #{16rpx};
+        background-color: #fff;
+    }
+
+    .dialog-title {
+        font-size: #{32rpx};
+        color: #353535;
+        margin-bottom: #{6rpx};
+        text-align: center;
+    }
+
+    .dialog-txt {
+        margin: #{40rpx} auto;
+        text-align: center;
+        font-size: #{32rpx};
+        color: #353535;
+    }
+
+    .no-tip {
+        position: fixed;
+        top: #{350rpx};
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+        color: #666666;
+        font-size: #{24rpx};
+        width: #{240rpx};
+        text-align: center;
+    }
+
+    .no-tip image {
+        height: #{240rpx};
+        width: #{240rpx};
+        margin-bottom: #{20rpx};
+    }
+
+    .bottom-place {
+        height: #{116rpx};
+    }
+
+    .bottom-place.iphone_x {
+        height: #{166rpx};
+    }
+
+    .search-icon {
+        height: #{24rpx};
+        width: #{24rpx};
+    }
+
+    .search-text {
+        color: #b2b2b2;
+        font-size: #{24rpx};
+        margin: 0 #{5rpx};
+    }
+
+    .top-place {
+        height: #{88rpx};
+    }
+</style>

+ 281 - 0
src/plugins/mch/mch/login/login.vue

xqd
@@ -0,0 +1,281 @@
+<template>
+    <app-layout>
+        <view class="login-box">
+            <view class="login-null dir-left-nowrap cross-center">
+                <view>还没有商家账户?</view>
+                <view @click="navApply">
+                    <view class="main-center cross-center apply-btn">立即申请</view>
+                </view>
+            </view>
+            <view class="login-bg">
+                <image :src="appImg.mch_login_bg"></image>
+                <view></view>
+            </view>
+            <view class="account main-center cross-center">
+                <view class="dir-left-nowrap login-form">
+                    <view class="box-grow-0 cross-center">账号</view>
+                    <input placeholder="请输入账号" placeholder-style="color:#bbbbbb" size="28" type="text"
+                           v-model="form.username"/>
+                </view>
+            </view>
+            <view class="password main-center cross-center">
+                <view class="dir-left-nowrap login-form cross-center">
+                    <view class="box-grow-0 cross-center">密码</view>
+                    <input placeholder="请输入密码" placeholder-style="color:#bbbbbb" size="28" type="password"
+                           v-model="form.password"/>
+                </view>
+            </view>
+            <view @click="login">
+                <view class="main-center cross-center login-dl">
+                    <view class="main-center cross-center">登录</view>
+                </view>
+            </view>
+            <view class="dir-top-nowrap main-center cross-center">
+                <!-- #ifndef H5 -->
+                <view class="spacing main-center cross-center">
+                    <view class="line"></view>
+                    <view>或</view>
+                    <view class="line"></view>
+                </view>
+                <!-- #endif -->
+
+                <!-- #ifdef MP-WEIXIN -->
+                <image :src="appImg.wechat" @click="wxLogin" class="platform-pic"></image>
+                <view class="platform-name">微信授权登录</view>
+                <!-- #endif -->
+	            
+                <!-- #ifdef MP-ALIPAY -->
+                <image :src="appImg.alipay" @click="wxLogin" class="platform-pic"></image>
+                <view class="platform-name">支付宝授权登录</view>
+                <!-- #endif -->
+	            
+                <!-- #ifdef MP-BAIDU -->
+                <image :src="appImg.baidu" @click="wxLogin" class="platform-pic"></image>
+                <view class="platform-name">百度授权登录</view>
+                <!-- #endif -->
+	            
+                <!-- #ifdef MP-TOUTIAO -->
+                <image :src="appImg.byte_dance" @click="wxLogin" class="platform-pic"></image>
+                <view class="platform-name">授权登录</view>
+                <!-- #endif -->
+	            
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import {mapState} from 'vuex';
+
+    export default {
+        name: "login",
+	    
+        computed: {
+            ...mapState({
+                appImg: state => state.mallConfig.plugin.mch.app_image,
+            }),
+        },
+        data() {
+            return {
+                form: {
+                    username: '',
+                    password: '',
+                }
+            }
+        },
+        onLoad() { this.$commonLoad.onload();
+            uni.removeStorage({key: 'MCH2019'});
+        },
+	    
+        methods: {
+            navApply() {
+                uni.navigateTo({url: `/plugins/mch/apply/apply`});
+            },
+            login: function () {
+                const self = this;
+                self.$showLoading({title: '登陆中'});
+
+                self.$request({
+                    url: self.$api.mch.login,
+                    method: 'POST',
+                    data: {
+                        username: self.form.username,
+                        password: self.form.password,
+                    },
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        self.loginSuccess(info.data);
+                    } else {
+                        uni.showToast({icon: 'none', title: info.msg});
+                    }
+                }).catch(() => {
+                    self.$hideLoading();
+                })
+            },
+
+            wxLogin: function () {
+                const self = this;
+                self.$showLoading({title: '登陆中'});
+
+                self.$request({
+                    url: self.$api.mch.mch_status,
+                    data: {
+                        is_review_status: 1,
+                    },
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        let mch = info.data.mch;
+                        if (mch && mch.review_status == 1) {
+                            self.loginSuccess(info.data);
+                            return;
+                        }
+                        uni.showToast({icon: 'none', title: '账户不存在或账户异常'});
+                    } else {
+                        uni.showToast({icon: 'none', title: info.msg});
+                    }
+                }).catch(() => {
+                    self.$hideLoading();
+                });
+            },
+
+            loginSuccess(data) {
+                uni.showToast({title: '登陆成功'});
+
+                //缓存
+                this.$storage.setStorageSync("MCH2019", data);
+
+                //跳转
+                uni.redirectTo({
+                    url: '/plugins/mch/mch/myshop/myshop'
+                });
+            },
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+    .login-box {
+        background: #FFFFFF;
+        min-height: 100vh;
+    }
+
+    .login-null {
+        background: #feeeee;
+        height: #{80rpx};
+        width: 100%;
+        color: #ff4544;
+        font-size: #{28rpx};
+
+        > view {
+            margin-left: #{24rpx};
+        }
+    }
+
+    .account {
+        margin-top: #{88rpx - 24rpx};
+    }
+
+    .password {
+        margin-top: #{64rpx - 24rpx};
+        margin-bottom: #{72rpx}
+    }
+
+    .apply-btn {
+        height: #{44rpx};
+        width: #{162rpx};
+        color: #ff4544;
+        background: #feeeee;
+        border: #{1rpx} solid #ff4544;
+        border-radius: #{22rpx};
+        font-size: #{28rpx};
+        line-height: #{44rpx};
+    }
+
+    .login-bg {
+        position: relative;
+        height: #{300rpx};
+        width: 100%;
+    }
+
+    .login-bg view {
+        position: absolute;
+        left: #{200rpx};
+        bottom: #{0rpx};
+        width: #{0rpx};
+        height: #{0rpx};
+        border-left: #{24rpx} solid transparent;
+        border-right: #{24rpx} solid transparent;
+        border-bottom: #{40rpx} solid #ffffff;
+    }
+
+    .login-bg image {
+        height: 100%;
+        width: 100%;
+    }
+
+    .input-place {
+        color: red;
+        font-size: #{28rpx};
+    }
+
+    .login-form {
+        color: #353535;
+        width: #{560rpx};
+        border-bottom: 1px solid #e2e2e2;
+        padding-bottom: #{24rpx};
+    }
+
+    .login-form view {
+        color: #bbb;
+        font-size: #{28rpx};
+        margin-left: #{48rpx};
+        margin-right: #{32rpx};
+    }
+
+    .login-form input {
+        color: #353535;
+        font-size: #{28rpx};
+        width: 100%;
+    }
+
+    .login-dl {
+        height: #{80rpx};
+        width: 100%;
+    }
+
+    .login-dl view {
+        width: #{560rpx};
+        height: 100%;
+        background: #ff4544;
+        border-radius: #{40rpx};
+        color: #fff;
+        font-size: #{32rpx};
+    }
+
+    .spacing {
+        font-size: #{24rpx};
+        margin-top: #{80rpx};
+        color: #bbbbbb;
+
+        .line {
+            width: #{230rpx};
+            height: #{1px};
+            margin: 0 #{40rpx};
+            background: #e2e2e2;
+        }
+    }
+
+    .platform-pic {
+        height: #{120rpx};
+        width: #{120rpx};
+        margin-top: #{76rpx};
+        margin-bottom: #{32rpx};
+    }
+
+    .platform-name {
+        color: #bbbbbb;
+        font-size: #{28rpx};
+    }
+</style>

+ 358 - 0
src/plugins/mch/mch/myshop/myshop.vue

xqd
@@ -0,0 +1,358 @@
+<template>
+    <app-layout>
+        <block v-if="mch_id">
+            <!-- 页面内容 -->
+            <view class="myshop-header">
+                <view class="fk">今日付款金额(元)</view>
+                <view class="fk-num">{{detail.day_order_pay_price_count}}</view>
+                <view class="dir-left-nowrap">
+                    <view class="box-grow-1 data-col">
+                        <view>浏览人数</view>
+                        <view>{{detail.visit_count}}</view>
+                    </view>
+                    <view class="box-grow-1 data-col">
+                        <view>付款订单数</view>
+                        <view>{{detail.order_pay_count}}</view>
+                    </view>
+                    <view class="box-grow-1 data-col">
+                        <view>付款件数</view>
+                        <view>{{detail.order_goods_count}}</view>
+                    </view>
+                </view>
+                <view class="myshop-login">
+                    <app-form-id @click="navLogin">
+                        <view class="main-center cross-center myshop-account">切换账户</view>
+                    </app-form-id>
+                </view>
+            </view>
+
+            <view class="dir-left-wrap menu-list">
+                <view class="box-grow-0 menu-item">
+                    <app-form-id @click="navConfig">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//myshop-shop.png"></image>
+                        <view>店铺管理</view>
+                    </app-form-id>
+                </view>
+                <view class="box-grow-0 menu-item">
+                    <app-form-id @click="navGoods">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//myshop-goods.png"></image>
+                        <view>商品管理</view>
+                    </app-form-id>
+                </view>
+                <view class="box-grow-0 menu-item">
+                    <app-form-id @click="navOrder">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//myshop-order.png"></image>
+                        <view>订单管理</view>
+                    </app-form-id>
+                </view>
+                <view class="box-grow-0 menu-item">
+                    <app-form-id @click="navData">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//myshop-data.png"></image>
+                        <view>数据统计</view>
+                    </app-form-id>
+                </view>
+                <view class="box-grow-0 menu-item">
+                    <app-form-id @click="navAccount">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//myshop-zc.png"></image>
+                        <view>资产</view>
+                    </app-form-id>
+                </view>
+                <!-- #ifndef MP-BAIDU -->
+                <view class="box-grow-0 menu-item">
+                    <app-form-id @click="navQrcode">
+                        <image src="https://shop.9026.com/web/statics/img/mall/mch//myshop-shop.png"></image>
+                        <view>店铺二维码</view>
+                    </app-form-id>
+                </view>
+                <!--#endif -->
+            </view>
+            <view  @click="showPcUrl" class="myshop-pc">PC端管理网址</view>
+            <!-- #ifndef H5 -->
+            <view :style="{bottom: iphone ?  `${iphoneHeight}rpx` : '0rpx'}" class="myshop-msg main-center cross-center"
+                  v-if="detail.is_add_formid">
+                <view class="msg main-center cross-center" @click="setMessage">
+                    <view class="btn">消息提醒按钮</view>
+                    <!-- #ifndef MP-WEIXIN -->
+                    <view class="bout">(剩余{{detail.form_id_count}}次)</view>
+                    <!--#endif -->
+                </view>
+            </view>
+            <!--#endif -->
+            <view class="pc-url" :class="show_pc_url ? `show`: ``">
+                <view class="modal-bg" @click="hidePcUrl"></view>
+                <view class="modal-dialog" @click="copyPcUrl">
+                    <view class="page-url">{{detail.page_url}}</view>
+                    <view class="content">点击可复制内容</view>
+                </view>
+            </view>
+        </block>
+    </app-layout>
+</template>
+
+<script>
+    import {mapState} from 'vuex';
+
+    export default {
+        name: "myshop",
+        computed: {
+            ...mapState('gConfig', {
+                iphone: (data) => {
+                    return data.iphone;
+                },
+                iphoneHeight: (state) => {
+                    return state.iphoneHeight;
+                },
+            })
+        },
+
+        data() {
+            return {
+                show_pc_url: false,
+                mch_id: -1,
+                detail: {
+                    day_order_pay_price_count: 0,
+                    visit_count: 0,
+                    order_pay_count: 0,
+                    order_goods_count: 0,
+                    form_id_count: 0,
+                    template_message_list: null,
+                },
+            }
+        },
+        onShow() {
+            const self = this;
+            const mch = this.$storage.getStorageSync('MCH2019');
+            if (!mch) {
+                uni.redirectTo({
+                    url: '/plugins/mch/mch/login/login',
+                })
+                return;
+            }
+            self.mch_id = mch.mch.id;
+
+            self.$showLoading({title: '登陆中'});
+            self.$request({
+                url: self.$api.mch.manage_index,
+                data: {
+                    mch_id: self.mch_id
+                }
+            }).then(info => {
+                self.$hideLoading();
+                if (info.code === 0) {
+                    const detail = info.data.detail;
+                    if (detail.status === '0') {
+                        uni.showModal({
+                            title: '提示',
+                            content: '店铺已被关闭!请联系管理员',
+                            showCancel: false,
+                            success: function (e) {
+                                if (e.confirm) {
+                                    uni.redirectTo({
+                                        url: '/plugins/mch/mch/login/login',
+                                    })
+                                }
+                            }
+                        });
+                    }
+                    self.detail = detail;
+                } else {
+                    uni.redirectTo({
+                        url: '/plugins/mch/mch/login/login',
+                    })
+                }
+            });
+        },
+        methods: {
+            navLogin: function () {
+                uni.redirectTo({url: `/plugins/mch/mch/login/login`});
+            },
+            navConfig: function () {
+                uni.navigateTo({url: `/plugins/mch/mch/config/config?mch_id=` + this.mch_id});
+            },
+            navGoods: function () {
+                uni.navigateTo({url: `/plugins/mch/mch/goods/goods?mch_id=` + this.mch_id});
+            },
+            navOrder: function () {
+                uni.navigateTo({url: `/plugins/mch/mch/order/order?mch_id=` + this.mch_id});
+            },
+            navData: function () {
+                uni.navigateTo({url: `/plugins/mch/mch/count/count?mch_id=` + this.mch_id});
+            },
+            navAccount: function () {
+                uni.navigateTo({url: `/plugins/mch/mch/account/account?mch_id=` + this.mch_id});
+            },
+            navQrcode: function () {
+                uni.navigateTo({url: `/plugins/mch/mch/qrcode/qrcode?mch_id=` + this.mch_id});
+            },
+            //MESSAGE
+            setMessage: function () {
+                //#ifndef MP-WEIXIN
+                this.detail.form_id_count++;
+                // #endif
+
+                //#ifdef MP-WEIXIN
+                this.$subscribe(this.detail.template_message_list).then(res => {
+
+                }).catch();
+                // #endif
+            },
+            //MODEL
+            showPcUrl: function () {
+                this.show_pc_url = true;
+            },
+            hidePcUrl: function () {
+                this.show_pc_url = false;
+            },
+            copyPcUrl: function () {
+                let data = this.detail.page_url;
+                this.$utils.uniCopy({
+                    data: data,
+                    success(){
+                        //#ifndef MP-WEIXIN
+                        uni.showToast({ title: '复制成功'});
+                        // #endif
+                    }
+                });
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .myshop-header {
+        background: #26a5ef;
+        color: #fff;
+        background: -webkit-gradient(linear, 0 0, 0 bottom, from(#44b9fe), to(#028dde));
+        padding: #{48rpx} 0 #{32rpx};
+        overflow: hidden;
+        .fk {
+            font-size: #{26rpx};
+            text-align: center;
+            margin-bottom: #{40rpx};
+        }
+        .fk-num {
+            text-align: center;
+            font-size: 19pt;
+            font-weight: bold;
+            line-height: 1;
+            margin-bottom: #{64rpx};
+        }
+        .data-col {
+            text-align: center;
+            border-right: #{1rpx} solid rgba(255, 255, 255, 0.35);
+        }
+    }
+
+    .myshop-login {
+        position: absolute;
+        top: #{40rpx};
+        left: #{24rpx};
+
+        .myshop-account {
+            position: relative;
+            border: 1px solid #FFFFFF;
+            border-radius: #{20rpx};
+            width: #{120rpx};
+            font-size: #{24rpx};
+            height: #{40rpx};
+        }
+    }
+
+    .myshop-pc {
+        text-align: center;
+        margin-top: #{40rpx};
+        color: #999999;
+        font-size:#{24rpx};
+    }
+
+    .myshop-msg {
+        position: fixed;
+        bottom: #{0rpx};
+        width: 100%;
+        height: #{120rpx};
+        margin: 0 auto;
+
+        .msg {
+            width: #{702rpx};
+            height: #{80rpx};
+            border-radius: #{999rpx};
+            color: #fff;
+            background: #ff4544;
+
+            .btn {
+                font-size: #{32rpx};
+            }
+
+            .bout {
+                font-size: #{24rpx};
+            }
+        }
+    }
+
+
+    .menu-list {
+        flex-wrap: wrap;
+        margin-bottom: #{24rpx};
+        -webkit-flex-wrap: wrap;
+        background: #fff;
+        padding: #{60rpx} 0 0;
+        .menu-item {
+            width: 33.333333%;
+            text-align: center;
+            font-size: #{26rpx};
+            margin-bottom: #{80rpx};
+        }
+        .menu-item image {
+            width: #{94rpx};
+            height: #{94rpx};
+            margin-bottom: #{6rpx};
+        }
+
+    }
+    .pc-url.show {
+        visibility: visible;
+        opacity: 1;
+    }
+
+    .pc-url {
+        position: fixed;
+        left: 0;
+        top: 0;
+        height: 100%;
+        z-index: 100;
+        margin: #{100rpx};
+        visibility: hidden;
+        opacity: 0.5;
+        transition: 200ms;
+
+        .modal-bg {
+            position: fixed;
+            left: 0;
+            top: 0;
+            width: 100%;
+            height: 100%;
+            background: rgba(0, 0, 0, 0.5);
+        }
+
+        .modal-dialog {
+            background: #fff;
+            padding: #{32rpx};
+            border-radius: #{16rpx};
+            overflow: hidden;
+            word-break: break-all;
+            position: relative;
+
+            .page-url {
+                margin-bottom: #{32rpx};
+                color: #353535
+            }
+
+            .content {
+                font-size: #{24rpx};
+                color: #888;
+                text-align: center
+            }
+        }
+
+    }
+</style>

+ 438 - 0
src/plugins/mch/mch/open-time/open-time.vue

xqd
@@ -0,0 +1,438 @@
+<template>
+    <app-layout>
+        <view>
+            <view @click="openTime(item, index)" class="attr" v-for="(item, index) in list" :key="index">
+                <image @click.stop='toDelete(index)' class='low-attr' src='https://shop.9026.com/web/statics/img/mall/mch/low.png'></image>
+                <view class="attr-item main-between cross-center">
+                    <view v-if="item.value[0] && item.value[1]">{{item.value[0]}}-{{item.value[1]}}</view>
+                    <view v-else class="placeholder-text">请选择时间段</view>
+                    <image class="app-icon" src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
+                </view>
+            </view>
+        </view>
+        <view v-if="list.length < 3" class='add-attr' @click='add'>
+            <view class='add-attr-btn main-center'>
+                <image src='https://shop.9026.com/web/statics/img/mall/mch/add.png'></image>
+                <view>增加时间段</view>
+            </view>
+        </view>
+        <view :class="['placeholder', `${iphone_x? 'iphone_x':''}`]"></view>
+        <view :class="['add', `${iphone_x? 'iphone_x':''}`]">
+            <view @click="save">保存</view>
+        </view>
+        <view @touchmove.stop.prevent="" class="time-bg cross-center" v-if="timeDialog">
+            <view class="time-dialog">
+                <view class="dialog-title">选择时间段</view>
+                <view class="choose-time">
+                    <view class="time-title">起始时间</view>
+                    <view class="year-1">时</view>
+                    <view class="month-1">分</view>
+                    <view class="day-1">秒</view>
+                    <view class="year-2">时</view>
+                    <view class="month-2">分</view>
+                    <view class="day-2">秒</view>
+                    <picker-view :value="startVal" :indicator-style="indicatorStyle"  class="picker-view" @change="startChange">
+                        <picker-view-column>
+                            <view v-for="(item,idx) in hour" :key="item"
+                                :class="[`${startVal[0] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: startVal[0] == idx + 1 || startVal[0] == idx - 1 ? '#999999' : startVal[0] == idx + 2 || startVal[0] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in minutes" :key="item"
+                                :class="[`${startVal[1] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: startVal[1] == idx + 1 || startVal[1] == idx - 1 ? '#999999' : startVal[1] == idx + 2 || startVal[1] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in minutes" :key="item"
+                                :class="[`${startVal[2] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: startVal[2] == idx + 1 || startVal[2] == idx - 1 ? '#999999' : startVal[2] == idx + 2 || startVal[2] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                    </picker-view>
+                    <view class="time-title">结束时间时间</view>
+                    <picker-view :value="endVal" :indicator-style="indicatorStyle"  class="picker-view" @change="endChange">
+                        <picker-view-column>
+                            <view v-for="(item,idx) in hour" :key="item"
+                                :class="[`${endVal[0] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: endVal[0] == idx + 1 || endVal[0] == idx - 1 ? '#999999' : endVal[0] == idx + 2 || endVal[0] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in minutes" :key="item"
+                                :class="[`${endVal[1] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: endVal[1] == idx + 1 || endVal[1] == idx - 1 ? '#999999' : endVal[1] == idx + 2 || endVal[1] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                        <picker-view-column>
+                            <view v-for="(item,idx) in minutes" :key="item"
+                                :class="[`${endVal[2] == idx ?`a-m-text a`: ''}`]"
+                                :style="{ color: endVal[2] == idx + 1 || endVal[2] == idx - 1 ? '#999999' : endVal[2] == idx + 2 || endVal[2] == idx - 2 ? '#cdcdcd': '' , lineHeight: lineHeight}">{{item}}</view>
+                        </picker-view-column>
+                    </picker-view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="time-submit-btn" @click='cancel' style="color: #666;">取消</view>
+                    <view class="line"></view>
+                    <view class="time-submit-btn" style="color: #ff4544;" @click='submitTime'>确认</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                indicatorStyle: '',
+                lineHeight: '72rpx',
+                iphone_x: false,
+                list: [],
+                detail: {},
+                timeDialog: false,
+                choose: 2,
+                index: -1,
+                hour: [],
+                minutes: [],
+                startVal: [0,0,0],
+                endVal: [0,0,0],
+            }
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+                adminImg: state => state.mallConfig.__wxapp_img.app_admin
+            })
+        },
+        methods: {
+            submitTime() {
+                if(this.startVal[0] > this.endVal[0]) {
+                    uni.showToast({
+                        title: '结束时间不应早于开始时间',
+                        icon: 'none',
+                        duration: 1000
+                    })
+                }else if(this.startVal[0] == this.endVal[0] && this.startVal[1] > this.endVal[1]) {
+                    uni.showToast({
+                        title: '结束时间不应早于开始时间',
+                        icon: 'none',
+                        duration: 1000
+                    })
+                }else if(this.startVal[0] == this.endVal[0] && this.startVal[1] == this.endVal[1] && this.startVal[2] > this.endVal[2]) {
+                    uni.showToast({
+                        title: '结束时间不应早于开始时间',
+                        icon: 'none',
+                        duration: 1000
+                    })
+                }else if(this.startVal[0] == this.endVal[0] && this.startVal[1] == this.endVal[1] && this.startVal[2] == this.endVal[2]) {
+                    uni.showToast({
+                        title: '结束时间不应等于开始时间',
+                        icon: 'none',
+                        duration: 1000
+                    })
+                }else {
+                    this.list[this.index] = [];
+                    let start = this.hour[this.startVal[0]] + ':' + this.minutes[this.startVal[1]] + ':' + this.minutes[this.startVal[2]]
+                    let end = this.hour[this.endVal[0]] + ':' + this.minutes[this.endVal[1]] + ':' + this.minutes[this.endVal[2]]
+                    let para = {
+                        value : [start,end]
+                    }
+                    this.list[this.index] = para
+                    this.timeDialog = false;
+                }
+            },
+            cancel() {
+                this.timeDialog = false;
+                this.index = -1;
+            },
+            openTime(item, index) {
+                this.index = index;
+                if(item.value[0]) {
+                    this.startVal = item.value[0].split(':').map(Number);
+                }else {
+                    this.startVal = [0,0,0]
+                }
+                if(item.value[1]) {
+                    this.endVal = item.value[1].split(':').map(Number);
+                }else {
+                    this.endVal = [0,0,0]
+                }
+                this.timeDialog = true;
+            },
+            startChange: function(e) {
+                this.startVal = e.detail.value;
+            },
+            endChange: function(e) {
+                this.endVal = e.detail.value;
+            },
+            add() {
+                let para = {
+                    value: []
+                }
+                this.list.push(para);
+            },
+            toDelete(index) {
+                this.list.splice(index,1);
+            },
+            save() {
+                for(let item of this.list) {
+                    if(!item.value[0] || !item.value[1]) {
+                        uni.showToast({icon: 'none', title: '时间段请填写完整'});
+                        return false;
+                    }
+                }
+                uni.showLoading({
+                    title: '保存中...'
+                });
+                uni.setStorage({
+                    key: "openTime",
+                    data: this.list
+                })
+                setTimeout(function() {
+                    uni.navigateBack();
+                }, 500)
+            },
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            let screenWidth = uni.getSystemInfoSync().windowWidth;
+            let p = 375 / screenWidth;
+            this.indicatorStyle =  'height: 36px;font-size:14px;';
+            this.lineHeight = 72*p + 'rpx';
+            for(let i = 0;i < 60;i++) {
+                if(i < 10) {
+                    i = '0' + i
+                }
+                if(i < 24) {
+                    this.hour.push(i)
+                }
+                this.minutes.push(i)
+            }
+            this.list = JSON.parse(options.time_list);
+            if(this.list.length == 0) {
+                let para = {
+                    value: ['','']
+                }
+                this.list.push(para)
+            }
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            })
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .attr {
+        background-color: #fff;
+        position: relative;
+        padding-left: #{84rpx};
+        padding-right: #{26rpx};
+        .low-attr {
+            position: absolute;
+            z-index: 2;
+            top: #{24rpx};
+            height: #{40rpx};
+            width: #{40rpx};
+            left: #{24rpx};
+        }
+        .attr-item {
+            height: #{88rpx};
+            line-height: #{88rpx};
+            border-top: #{2rpx} solid #e2e2e2;
+            position: relative;
+            font-size: #{28rpx};
+            color: #353535;
+            .placeholder-text {
+                color: #e1e1e1;
+            }
+            .app-icon {
+                width: #{12rpx};
+                height: #{22rpx};
+            }
+        }
+        &:first-of-type {
+            .attr-item {
+                border-top: 0;
+            }
+        }
+    }
+    .add-attr {
+        height: #{120rpx};
+        background-color: #fff;
+        margin-top: #{20rpx};
+        padding-top: #{24rpx};
+        .add-attr-btn {
+            height: #{72rpx};
+            width: #{320rpx};
+            border-radius: #{36rpx};
+            border: #{1rpx} solid #ff4544;
+            margin: 0 auto;
+            color: #ff4544;
+            font-size: #{26rpx};
+            line-height: #{72rpx};
+            image {
+                height: #{28rpx};
+                width: #{28rpx};
+                margin-right: #{12rpx};
+                margin-top: #{22rpx};
+            }
+        }
+    }
+    .add {
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        height: #{120rpx};
+        width: 100%;
+        z-index: 15;
+        background-color: #fff;
+        view {
+            width: #{702rpx};
+            line-height: #{80rpx};
+            height: #{80rpx};
+            margin: #{20rpx} auto;
+            border-radius: #{40rpx};
+            background-color: #ff4544;
+            color: #fff;
+            font-size: #{32rpx};
+            text-align: center;
+        }
+    }
+    .add.iphone_x {
+        height: #{170rpx};
+        padding-bottom: #{50rpx};
+    }
+    .placeholder {
+        height: #{120rpx};
+    }
+    .placeholder.iphone_x {
+        height: #{170rpx};
+    }
+    .time-bg {
+        background-color: rgba(0, 0, 0, 0.3);
+        position: fixed;
+        top: 0;
+        left: 0;
+        height: 100%;
+        width: 100%;
+        z-index: 100;
+        .time-dialog {
+            width: #{620rpx};
+            border-radius: #{16rpx};
+            margin: 0 auto;
+            background-color: #fff;
+            z-index: 20;
+            .dialog-title {
+                font-size: #{32rpx};
+                color: #353535;
+                width: #{620rpx};
+                margin: #{32rpx} auto #{40rpx};
+                text-align: center;
+            }
+            .time-area {
+                margin-bottom: #{24rpx};
+                padding: 0 #{32rpx};
+                &.date-area {
+                    border-top: #{2rpx} solid #e2e2e2;
+                    padding: #{28rpx} #{32rpx};
+                    .dialog-choose-item {
+                        margin: #{12rpx} 0;
+                    }
+                }
+                .dialog-choose-item {
+                    margin: 0 12rpx;
+                    width: #{170rpx};
+                    height: #{68rpx};
+                    line-height: #{68rpx};
+                    text-align: center;
+                    border-radius: #{34rpx};
+                    border: #{2rpx} solid;
+                    font-size: #{28rpx};
+                    margin-bottom: #{16rpx};
+                    &.time-area-item {
+                        border-color: #ddd;
+                        color: #666;
+                    }
+                }
+            }
+            .choose-time {
+                position: relative;
+                .time-title {
+                    margin-left: #{32rpx};
+                    color: #666;
+                    font-size: #{28rpx};
+                    margin-bottom: #{20rpx};
+                }
+                .year-1 {
+                    position: absolute;
+                    left: #{192rpx};
+                    top: #{146rpx};
+                }
+                .month-1 {
+                    position: absolute;
+                    left: #{380rpx};
+                    top: #{146rpx};
+                }
+                .day-1 {
+                    position: absolute;
+                    right: #{32rpx};
+                    top: #{146rpx};
+                }
+                .year-2 {
+                    position: absolute;
+                    left: #{192rpx};
+                    bottom: #{88rpx};
+                }
+                .month-2 {
+                    position: absolute;
+                    left: #{380rpx};
+                    bottom: #{88rpx};
+                }
+                .day-2 {
+                    position: absolute;
+                    right: #{32rpx};
+                    bottom: #{88rpx};
+                }
+                .picker-view {
+                    width: #{556rpx};
+                    height: #{216rpx};
+                    margin: 0 auto #{20rpx};
+                    text-align: center;
+                    view {
+                        line-height: #{68rpx};
+                    }
+                }
+            }
+            .btn-area {
+                height: #{88rpx};
+                position: relative;
+                border-top: #{2rpx} solid #e2e2e2;
+                &.other-btn-area {
+                    margin-top: #{10rpx};
+                }
+                .line {
+                    height: #{32rpx};
+                    width: #{1rpx};
+                    background-color: #e2e2e2;
+                    position: absolute;
+                    top: #{28rpx};
+                    left: 0;
+                    right: 0;
+                    margin: 0 auto;
+                }
+                .time-submit-btn {
+                    height: #{88rpx};
+                    line-height: #{88rpx};
+                    font-size: #{32rpx};
+                    width: #{310rpx};
+                    text-align: center;
+                }
+            }
+        }
+    }
+</style>

+ 1610 - 0
src/plugins/mch/mch/order-detail/order-detail.vue

xqd
@@ -0,0 +1,1610 @@
+<template>
+    <app-layout>
+        <image class="head-img" :src='mchImg.detail_bg'></image>
+        <view v-if="status == 2 && order" class="head-txt main-between">
+            <view class="status-txt">{{order.status_text}}</view>
+        </view>
+        <view v-else-if="status == 1 && order" class="head-txt main-between">
+            <view class="status-txt" v-if="order.is_sale == 1">已完成</view>
+            <view class="status-txt" v-else-if="order.cancel_status == 2">取消订单 待处理</view>
+            <view class="status-txt" v-else-if="order.is_pay == 0 && order.pay_type != 2">等待买家付款</view>
+            <view class="status-txt" v-else-if="order.is_send == 0">等待卖家发货</view>
+            <view class="status-txt" v-else-if="order.is_confirm == 0">卖家已发货</view>
+            <view class="status-txt" v-else-if="order.is_confirm == 1">买家已收货</view>
+            <view v-if="order.auto_confirm > 0 && order.is_send == 1 && order.is_confirm == 0">剩余
+                <text v-if="dd>0">{{dd}}天</text>
+                <text v-if="hh>0 && dd==0">{{hh}}小时</text> {{mm}}分自动确认收货
+            </view>
+            <view v-else-if="order.auto_cancel > 0 && order.is_pay == 0 && order.pay_type != 2">剩余
+                <text v-if="dd>0">{{dd}}天</text>
+                <text v-if="hh>0 && dd==0">{{hh}}小时</text> {{mm}}分自动删除
+            </view>
+            <view v-else-if="order.auto_sales > 0 && order.is_sale == 0 && order.is_confirm == 1">剩余
+                <text v-if="dd>0">{{dd}}天</text>
+                <text v-if="hh>0 && dd==0">{{hh}}小时</text> {{mm}}分自动完成订单
+            </view>
+        </view>
+        <view class="user-info" v-if="order">
+            <image class="localhost-img" src='https://shop.9026.com/web/statics/img/mall/mch/localhost.png'></image>
+            <view class="user-text">
+                <text class="name">{{status == 2 && order.order ? order.order.name: order.name}}</text>
+                <text v-if="order.order && order.order.address">{{status == 2 && order.order?order.order.mobile:order.mobile}}</text>
+            </view>
+            <view class='user-text address-info' v-if="order.address || (order.order && order.order.address)">{{status == 2 && order.order ?order.order.address:order.address}}</view>
+            <view class='user-text address-info' v-else>{{status == 2 && order.order ?order.order.mobile:order.mobile}}</view>
+            <view class='main-center area'>
+                <view @click='toCall(order)' class="detail-btn">联系收货人</view>
+                <view class="line"></view>
+                <view class="detail-btn" @click='copy'>复制地址</view>
+            </view>
+        </view>
+        <view class="express" v-if="detail && detail.express">
+            <image class="logo" src='https://shop.9026.com/web/statics/img/mall/mch/express.png'></image>
+            <view class="express-company">{{detail.express}}</view>
+            <view class="express-number">运单编号:{{detail.express_no}}</view>
+        </view>
+        <view class="express" v-else-if="order && order.express">
+            <image class="logo" src='https://shop.9026.com/web/statics/img/mall/mch/express.png'></image>
+            <view class="express-company">{{order.express}}</view>
+            <view v-if="order.express" class="express-number">运单编号:{{order.express_no}}</view>
+        </view>
+        <view v-if="(detail.detailExpress && detail.detail && detail.detailExpress.length === 1 && detail.detail.length === 1) || (order.detailExpress && order.detail && order.detailExpress.length === 1 && order.detail.length === 1)">
+            <view @click="toExpressInfo(detail)" class="express" v-if="detail.detailExpress && detail.detailExpress[0].express_no">
+                <image class="logo" src='https://shop.9026.com/web/statics/img/mall/mch/express.png'></image>
+                <view class="express-company">{{detail.detailExpress[0].express}}</view>
+                <view class="express-number">运单编号:{{detail.detailExpress[0].express_no}}</view>
+                <image v-if="detail.detailExpress[0].express" class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+            </view>
+            <view @click="toExpressInfo(order)" class="express" v-else-if="order.detailExpress[0].express_no">
+                <image class="logo" src='https://shop.9026.com/web/statics/img/mall/mch/express.png'></image>
+                <view class="express-company">{{order.detailExpress[0].express}}</view>
+                <view v-if="order.detailExpress[0].express" class="express-number">运单编号:{{order.detailExpress[0].express_no}}</view>
+                <image v-if="order.detailExpress[0].express" class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+            </view>
+        </view>
+        <view class="express" v-if="(order.detailExpress && order.detailExpress.length > 1) || (order.is_send == 0 && order.detailExpress &&  order.detailExpress.length >= 1)" @click="toExpressMore(order)">
+            <view class="showMore">该订单已拆成多个包裹发货,点击查看详情</view>
+            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+        </view>
+        <view class="express" v-else-if="(detail.detailExpress && detail.detailExpress.length > 1) || (detail.is_send == 0 && detail.detailExpress && detail.detailExpress.length >= 1)" @click="toExpressMore(detail)">
+            <view class="showMore">该订单已拆成多个包裹发货,点击查看详情</view>
+            <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+        </view>
+        <view class="goods-info" v-if="order">
+            <view class="goods-title">自营商品</view>
+            <view v-for="goods in order.detail" class="goods" :key="goods.id">
+                <image class="goods-img" :src='goods.goods_info.pic_url'></image>
+                <view class='t-omit goods-name'>{{goods.goods_info.name}}</view>
+                <view class="goods-attr t-omit-two">
+                    <text v-for="attr in goods.goods_info.attr_list" :key="attr.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
+                </view>
+                <view class="goods-num">x{{goods.num}}</view>
+                <view class="goods-price">¥{{goods.total_original_price}}</view>
+            </view>
+            <view v-if="status == 1">
+                <view class="main-between price-item">
+                    <view class="price-label">商品总价</view>
+                    <view>¥{{ order.total_goods_price }}元</view>
+                </view>
+                <view class="main-between price-item">
+                    <view class="price-label">运费</view>
+                    <view>¥{{ order.express_price }}元</view>
+                </view>
+                <view class="main-between price-item" v-if="order.member_discount_price > 0">
+                    <view class="price-label">会员折扣</view>
+                    <view>¥{{ order.member_discount_price }}元</view>
+                </view>
+                <view class="main-between price-item" v-if="order.integral_deduction_price > 0">
+                    <view class="price-label">积分抵扣</view>
+                    <view>¥-{{ order.integral_deduction_price }}元</view>
+                </view>
+                <view class="main-between price-item" v-if="order.coupon_discount_price > 0">
+                    <view class="price-label">优惠券抵扣</view>
+                    <view>¥-{{ order.coupon_discount_price }}元</view>
+                </view>
+                <view class="main-between price-item" v-if="order.full_reduce_price > 0">
+                  <view class="price-label">满减</view>
+                  <view>-¥{{ order.full_reduce_price }}</view>
+                </view>
+                <view class="main-between price-item" style='margin-bottom: 0'>
+                    <view class="price-label total-label">订单总价</view>
+                    <view class="total-price">¥{{ order.total_pay_price }}元</view>
+                </view>
+            </view>
+            <view v-if="order.detail && status == 2">
+                <view class="main-between price-item">
+                    <view class="price-label">商品总价</view>
+                    <view>¥{{ order.detail[0].total_price }}元</view>
+                </view>
+                <view class="main-between price-item" style='margin-bottom: 0'>
+                    <view class="price-label total-label">退货金额</view>
+                    <view class="total-price">¥{{ order.detail[0].unit_price }}元</view>
+                </view>
+            </view>
+        </view>
+        <view v-if="order" class='goods-info mch-goods'>
+            <view class='goods-title'>订单信息</view>
+            <view class="dir-left-nowrap price-item">
+                <view class="price-label">{{status == 1? '下单时间':'申请时间'}}:</view>
+                <view>{{order.created_at}}</view>
+            </view>
+            <view class="dir-left-nowrap price-item">
+                <view class="price-label">订单号:</view>
+                <view>{{order.order_no}}</view>
+            </view>
+            <view class="dir-left-nowrap price-item" v-if="order.words">
+                <view class="price-label">卖家备注:</view>
+                <view>{{order.words}}</view>
+            </view>
+            <view class="dir-left-nowrap price-item" v-if="order.remark">
+                <view class="price-label">买家备注:</view>
+                <view>{{order.remark}}</view>
+            </view>
+            <view v-if="status == 1" class="dir-left-nowrap price-item">
+                <view class="price-label">支付方式:</view>
+                <view v-if="order.pay_type == 1">线上支付</view>
+                <view v-else-if="order.pay_type == 3">余额支付</view>
+                <view v-else-if="order.pay_type == 2">货到付款</view>
+                <view v-else-if="order.pay_type == 4">现金</view>
+                <view v-else-if="order.pay_type == 5">pos机</view>
+                <view v-else>未支付</view>
+            </view>
+            <view v-if="status == 1" class="dir-left-nowrap price-item">
+                <view class="price-label">收货方式:</view>
+                <view v-if="order.send_type == 1">到店自提</view>
+                <view v-if="order.send_type == 0">快递配送</view>
+            </view>
+            <view v-if="order.order_form != '[]'" v-for="item in order.order_form" :key="item" class="dir-left-nowrap price-item">
+                <view class="price-label">{{item.label}}:</view>
+                <view v-if="item.key == 'img_upload'"><image @click='look(item.value)' class="form-img" :src='item.value'></image></view>
+                <view v-else>{{item.value}}</view>
+            </view>
+        </view>
+        <view class='goods-info' v-if="order && showForm&& status == 1">
+            <view class='goods-title form-title'>其他信息</view>
+            <view v-for="(goods,idx) in order.detail" :class="['goods-form', `${idx == 0? 'more':''}`]" :key="goods.id">
+                <view class="goods" v-if="order.detail.length > 1">
+                    <image class="goods-img" :src='goods.goods_info.pic_url'></image>
+                    <view class='t-omit goods-name'>{{goods.goods_info.name}}</view>
+                    <view class="goods-attr t-omit-two">
+                        <text v-for="attr in goods.goods_info.attr_list" :key="attr.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
+                    </view>
+                    <view class="goods-num">x{{goods.num}}</view>
+                    <view class="goods-price">¥{{goods.total_original_price}}</view>
+                </view>
+                <view v-for="(item,index) in goods.form_data" v-if="goods.form_data && item.value && order.sign !== 'booking'" :key="index" :class="[ `${item.key !== 'img_upload' ? 'dir-left-nowrap' : ''}`,`price-item`]">
+                    <view class="price-label">{{item.label}}:</view>
+                    <view v-if="item.key === 'img_upload'">
+                        <view v-if="Array.isArray(item.value)">
+                            <block v-for="(img,key) in item.value" :key="key">
+                                <image v-show="!item.loadOver" @load="imageFormLoad(idx,index)" @click='look(img)' class="form-img" :src='img'></image>
+                            </block>
+                        </view>
+                        <view v-else>
+                            <image v-show="!item.loadOver" @load="imageFormLoad(idx,index)" @click='look(item.value)' class="form-img" :src='item.value'></image>
+                        </view>
+                    </view>
+                    <view style="word-break: break-all" v-else>{{item.value}}</view>
+                </view>
+                <view v-for="(item,index) in order.order_form" v-if="goods.form_data && item.value && order.sign === 'booking'" :key="index" :class="[ `${item.key !== 'img_upload' ? 'dir-left-nowrap' : ''}`,`price-item`]">
+                    <view class="price-label">{{item.label}}:</view>
+                    <view v-if="item.key === 'img_upload'">
+                        <view v-if="Array.isArray(item.value)">
+                            <block v-for="(img,key) in item.value" :key="key">
+                                <image v-if="img" v-show="!item.loadOver" @load="imageLoad(index)" @click='look(img)' class="form-img" :src='img'></image>
+                            </block>
+                        </view>
+                        <view v-else>
+                            <image v-if="item.value" v-show="!item.loadOver" @load="imageLoad(index)" @click='look(item.value)' class="form-img" :src='item.value'></image>
+                        </view>
+                    </view>
+                    <view style="word-break: break-all" v-else>{{item.value}}</view>
+                </view>
+            </view>
+        </view>
+        <view :class="['bottom-place', `${iphone_x? 'iphone_x':''}`]"></view>
+        <view :class="['dir-right-nowrap','btn', `${iphone_x ? 'iphone_x':''}`]" v-if="order && (order.is_confirm != 1 || status == 2)">
+            <view @click="toAgreeCancel(order)" v-if="order.cancel_status == 2" class="handle-btn other">同意</view>
+            <view @click="beNotRefund(order)" v-if="order.cancel_status == 2" class="handle-btn">拒绝</view>
+            <view @click="toChange(order)" v-if="order.cancel_status == 0 && order.is_pay == 0 && order.is_send == 0" class="handle-btn other">修改价格</view>
+            <view @click="toSend(order)" v-if="order.cancel_status == 0 && order.is_send == 0 && order.is_pay == 1" class="handle-btn other">发货</view>
+            <view @click="toSend(order)" v-else-if="order.cancel_status == 0 && order.is_send == 0 && order.pay_type == 2" class="handle-btn other">发货</view>
+
+            <view open-type="navigate" @click="toSend(order)" v-if="order.cancel_status == 0 && order.is_send == 1 && order.is_confirm == 0 && order.detailExpress.length > 0 && status != 2" class="handle-btn other">修改物流信息</view>
+            <view @click="toCancelorder(order)" v-if="order.is_send == 0 && order.cancel_status == 0" class="handle-btn">取消订单</view>
+            <view @click="toChangeAddress(order)" v-if="order.action_status && order.action_status.is_edit_address == 1" class="handle-btn">修改地址</view>
+            <view @click.stop="toRefund(order)" v-if="order.status_text == '待退款' && order.type != 2" class="handle-btn other">退款</view>
+            <view @click="toSend(order)" v-if="order.is_confirm == 0 && status == 2 && order.is_send == 1 && order.type == 2" class="handle-btn other">发货</view>
+            <view @click.stop="refundHandle(2,order,1)" v-if="status == 2 && order.status == 2 && order.status_text != '已换货' && order.status_text != '已退款'" :class="['handle-btn',`${order.status_text == '待商家处理' || order.status_text == '待退款'?'':'other'}`]">取消售后</view>
+            <view @click="refundHandle(1,order)" v-if="status == 2 && order.status == 1" class="handle-btn other">同意</view>
+            <view @click="refundHandle(2,order)" v-if="status == 2 && order.status == 1" class="handle-btn">拒绝</view>
+            <view @click="lookAbout(order)" v-if="status == 2" class="handle-btn">售后理由</view>
+        </view>
+
+        <view class="bg cross-center" v-if="chooseTime || isRefund || noRefund || changePrice || cancelOrder || callPhone || isSend || notRefund || isReason || openAddress || noAddress || beToSend">
+            <!-- 到店自提未填发货地址的提示 -->
+            <view class="dialog" v-if="beToSend">
+                <view class="dialog-title">提示</view>
+                <view class="main-center dir-top-nowrap cancel-tip" style="text-align: center">
+                    <view>是否将配送方式改为快递配送</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toChangeAddress'>确认</view>
+                </view>
+            </view>
+            <!-- 退款 -->
+            <view class="dialog" v-if="isRefund">
+                <view class="dialog-title">退款</view>
+                <view class="main-center refund-pay" v-if="status == 1">¥{{detail.total_pay_price}}</view>
+                <view class="main-center cross-center refund-pay" v-if="status == 2">¥
+                    <input class="refund-price" type='digit' v-model="refund_price"></input>
+                </view>
+                <view class="main-center refund-tip">是否确认退款给买家</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" v-if="status == 1" @click='cancelSubmit'>确认</view>
+                    <view class="submit-btn be-submit" v-if="status == 2" @click='agree'>确认</view>
+                </view>
+            </view>
+            <view class="dialog-bg" :style="{'display': `${noRefund || notRefund ? 'block' : 'none'}`}"></view>
+            <!-- 拒绝退款 -->
+            <view class="dialog" v-if="noRefund || notRefund">
+                <view v-if="noRefund" class="dialog-title">拒绝取消</view>
+                <view v-if="notRefund" class="dialog-title">拒绝售后</view>
+                <textarea fixed class="textarea" bindinput="toAbout" placeholder="请输入拒绝理由" placeholder-style="color:#999999;font-size:14px" auto-focus />
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view v-if="noRefund" class="submit-btn be-submit" @click='noCancel'>确认</view>
+                    <view v-if="notRefund" class="submit-btn be-submit" @click='decline(0)'>确认</view>
+                </view>
+            </view>
+            <!-- 提示 -->
+            <view class="dialog" v-if="noAddress">
+                <view class="main-center cancel-tip">请到商户后台添加退货地址</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn be-submit" @click='cancel'>确认</view>
+                </view>
+            </view>
+            <!-- 改价 -->
+            <view class="dialog" v-if="changePrice">
+                <view class="dialog-title">修改价格</view>
+                <view class="dir-left-nowrap change-price-item">
+                    <view class="label">商品总价</view>
+                    <view class="money">¥</view>
+                    <input type="digit" class="price-input" @input="priceInput" focus v-model='price'></input>
+                </view>
+                <view class="dir-left-nowrap change-price-item">
+                    <view class="label">运费</view>
+                    <view class="money">¥</view>
+                    <input type="digit" class="price-input" @input="expressInput" focus v-model='express'></input>
+                </view>
+                <view class="dir-left-nowrap change-price-item">
+                    <view class="label">合计</view>
+                    <view class="change-total-price">{{total}}</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='submitChange'>确认</view>
+                </view>
+            </view>
+            <!-- 取消订单 -->
+            <view class="dialog" v-if="cancelOrder">
+                <view class="main-center cancel-tip">确定取消该订单?</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='cancelSubmit'>确认</view>
+                </view>
+            </view>
+            <!-- 打电话  -->
+            <view class="dialog" v-if="callPhone">
+                <view class="main-center cancel-tip">{{mobile}}</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='call'>确认</view>
+                </view>
+            </view>
+            <!-- 发货 -->
+            <view class="dialog" v-if="isSend">
+                <view class="dialog-title">选择发货方式</view>
+                <view class="flex-wrap main-center send-type">
+                    <view @click="setSendType(0)" :class="[`${sendType == 0 ? 'active':'' }`, 'send-item']">快递配送</view>
+                    <view @click="setSendType(1)" :class="[`${sendType == 1 ? 'active':'' }`, 'send-item']">无需物流</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toSendType'>确认</view>
+                </view>
+            </view>
+            <!-- 理由 -->
+            <view class="dialog" v-if="isReason">
+                <view class="dialog-title">售后理由</view>
+                <view class="reason">
+                    <view class="reason-title">申请原因</view>
+                    <view class="reason-content">{{order.remark}}</view>
+                    <view v-if="order.pic_list.length > 0" class="reason-title">图片</view>
+                    <view class="dir-left-wrap reason-img" v-if="order.pic_list.length > 0">
+                        <image @click='look(item)' v-for="item in order.pic_list" :key="item" :src="item"></image>
+                    </view>
+                </view>
+                <view class="main-center btn-area other-btn-area">
+                    <view class="submit-btn be-submit" @click='cancel'>确认</view>
+                </view>
+            </view>
+            <!-- 选地址 -->
+            <view class="dialog" v-if="openAddress">
+                <view class="dialog-title">选择退货地址</view>
+                <view class="add-list">
+                    <view class="add-item" v-for="item in address" :key="item">
+                        <image v-if="item.id == addressId" @click='chooseAddress(item.id)' src="https://shop.9026.com/web/statics/img/mall/mch//apply-ok.png"></image>
+                        <image v-else @click='chooseAddress(item.id)' src="https://shop.9026.com/web/statics/img/mall/mch//apply-er.png"></image>
+                        <view @click='chooseAddress(item.id)' class="add-info">
+                            <view class="main-between">
+                                <view class="add-name">{{item.name}}</view>
+                                <view>{{item.mobile}}</view>
+                            </view>
+                            <view>{{item.address_detail}}</view>
+                        </view>
+                    </view>
+                </view>
+                <view class="main-center btn-area other-btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='decline(1)'>确认</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                mch_id: 0,
+                order: {
+                    total_pay_price: '',
+                    express_price: '',
+                    total_goods_price: '',
+                    total_goods_original_price: ''
+                },
+                cancelRefund: false,
+                addressId: '0',
+                notRefund: false,
+                isRefund: false,
+                openAddress: false,
+                isReason: false,
+                beToSend: false,
+                showForm: false,
+                noAddress: false,
+                active: null,
+                show: false,
+                start: [],
+                end: [],
+                search: false,
+                keyword: '',
+                list: [],
+                candidate: [],
+                date_start: '',
+                date_end: '',
+                time: 0,
+                inSearch: false,
+                address: [],
+                today: '',
+                yesterday: '',
+                weekday: '',
+                chooseTime: false,
+                noRefund: false,
+                cancelOrder: false,
+                detail: {},
+                changePrice: false,
+                callPhone: false,
+                custom: false,
+                mobile: '',
+                isSend: false,
+                sendType: 0,
+                price: 0,
+                express: 0,
+                total: 0,
+                about: '',
+                reset_time: 0,
+                dd: 0,
+                hh: 0,
+                mm: 0,
+                status: 1,
+                first: false,
+                refund_price: 0,
+                iphone_x: false
+            }
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+                mchImg: state => state.mallConfig.__wxapp_img.mch,
+            })
+        },
+        methods: {
+            toExpressInfo(item) {
+                uni.navigateTo({
+                    url: '/pages/app_admin/express/express?id='+item.id+'&express='+item.detailExpress[0].express+'&express_no='+item.detailExpress[0].express_no+'&customer_name='+item.detailExpress[0].customer_name
+                })
+            },
+            toExpressMore(item) {
+                uni.navigateTo({
+                    url: '/pages/order/express-list/express-list?order_id='+item.id
+                })
+            },
+            setSendType(e) {
+                this.sendType = e;
+            },
+            imageFormLoad(idx,index) {
+                this.order.detail[idx].form_data[index].loadOver = false;
+            },
+            toChangeAddress(item) {
+                this.beToSend = false;
+                let order_no = this.order.order_no ? this.order.order_no : this.detail.order_no
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/change-add/change-add?mch_id='+this.mch_id+'&order_no='+order_no
+                })
+            },
+            copy() {
+                this.$utils.uniCopy({
+                    data: this.status == 2 ? this.order.order.address:this.order.address,
+                    success() {
+                        //#ifndef MP-WEIXIN
+                        uni.showToast({title: '复制成功'});
+                        // #endif
+                    },
+                })
+            },
+            look(e) {
+                uni.previewImage({
+                    current: e, // 当前显示图片的http链接
+                    urls: [e] // 需要预览的图片http链接列表
+                })
+            },
+            agree() {
+                let that = this;
+                if (that.detail.refund_price > 0) {
+                    uni.showLoading({
+                        title: '处理中...'
+                    });
+                    that.$request({
+                        url: that.$api.mch.refund_handle,
+                        data: {
+                            order_refund_id: that.detail.id,
+                            type: that.detail.type,
+                            is_agree: 1,
+                            mch_id: that.mch_id,
+                            refund_price: that.refund_price,
+                            merchant_remark: that.about
+                        },
+                        method: 'post'
+                    }).then(response => {
+                        uni.hideLoading();
+                        if (response.code == 0) {
+                            uni.showModal({
+                                title: '提示',
+                                content: response.msg,
+                                showCancel: false,
+                                success: function (res) {
+                                    if (res.confirm) {
+                                        that.list = [];
+                                        that.notRefund = false;
+                                        that.openAddress = false;
+                                        that.isRefund = false;
+                                        that.addressId = 0;
+                                        that.getList();
+                                    }
+                                }
+                            });
+                        } else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(response => {
+                        uni.hideLoading();
+                        uni.showToast({
+                            title: response,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    });
+                } else {
+                    uni.showToast({
+                        title: '退款金额需大于零',
+                        icon: 'none',
+                        duration: 1000
+                    });
+                }
+            },
+            getTime() {
+                let reset_time = this.reset_time - 1;
+                let dd = 0;
+                let hh = parseInt(reset_time / 3600);
+                if (reset_time > 86400) {
+                    dd = parseInt(reset_time / 86400);
+                    hh = parseInt((reset_time - 86400 * dd) / 3600);
+                }
+                let h = reset_time % 3600;
+                let mm = parseInt(h / 60);
+                if (hh < 10) {
+                    hh = '0' + hh.toString();
+                }
+                if (mm < 10) {
+                    mm = '0' + mm.toString();
+                }
+                this.reset_time = reset_time;
+                this.dd = dd;
+                this.hh = hh;
+                this.mm = mm;
+            },
+            toSendType() {
+                let that = this;
+                if (that.sendType == 1) {
+                    if (that.status == 2) {
+                        uni.showLoading({
+                            title: '加载中...'
+                        });
+                        that.$request({
+                            url: that.$api.mch.refund_handle,
+                            data: {
+                                is_express: 0,
+                                merchant_remark: '',
+                                type: that.detail.type,
+                                mch_id: that.mch_id,
+                                is_agree: 1,
+                                order_refund_id: that.detail.id
+                            },
+                            method: 'post'
+                        }).then(response => {
+                            uni.hideLoading();
+                            if (response.code == 0) {
+                                uni.showToast({
+                                    title: response.msg,
+                                    type: 'success',
+                                    mask: false,
+                                    duration: 2000
+                                });
+                                that.isSend = false;
+                                setTimeout(()=>{
+                                    that.list = [];
+                                    that.page = 1;
+                                    that.sendType = 0;
+                                    that.getList();
+                                },1000)
+                            } else {
+                                uni.showToast({
+                                    title: response.msg,
+                                    icon: 'none',
+                                    duration: 1000
+                                });
+                            }
+                        }).catch(response => {
+                            uni.hideLoading();
+                            uni.showToast({
+                                title: response,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        });
+                    } else {
+                        uni.showLoading({
+                            title: '加载中...'
+                        });
+                        let para = {
+                            is_express: 2,
+                            mch_id: that.mch_id,
+                            words: '',
+                            order_id: that.detail.id
+                        }
+                        if(that.detail.detailExpress.length > 0) {
+                            para.express_id = that.detail.detailExpress[0].id
+                        }
+                        that.$request({
+                            url: that.$api.mch.order_send,
+                            data: para,
+                            method: 'post'
+                        }).then(response => {
+                            uni.hideLoading();
+                            if (response.code == 0) {
+                                uni.showToast({
+                                    title: response.msg,
+                                    type: 'success',
+                                    mask: false,
+                                    duration: 2000
+                                });
+                                that.list = [];
+                                that.page = 1;
+                                that.isSend = false;
+                                that.sendType = 0;
+                                that.getList();
+                            } else {
+                                uni.showToast({
+                                    title: response.msg,
+                                    icon: 'none',
+                                    duration: 1000
+                                });
+                            }
+                        }).catch(response => {
+                            uni.hideLoading();
+                            uni.showToast({
+                                title: response,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        });
+                    }
+                } else {
+                    that.isSend = false;
+                    if (that.status == 2) {
+                        uni.navigateTo({
+                            url: '/plugins/mch/mch/send/send?order_refund_id=' + this.detail.id + '&mch_id=' + this.mch_id + '&is_send=' + that.detail.is_send
+                        })
+                    } else {
+                        uni.navigateTo({
+                            url: '/plugins/mch/mch/send/send?id=' + this.detail.id + '&mch_id=' + this.mch_id + '&is_send=' + that.detail.is_send
+                        })
+                    }
+                }
+            },
+            toExpress(e,is_send) {
+                let id = e.id;
+                let order_refund_id = e.refund;
+                if (id > 0) {
+                    uni.navigateTo({
+                        url: '/plugins/mch/mch/send/send?id=' + id + '&is_send=' + is_send + '&mch_id=' + this.mch_id
+                    })
+                } else if (order_refund_id) {
+                    uni.navigateTo({
+                        url: '/plugins/mch/mch/send/send?order_refund_id=' + order_refund_id + '&is_send=' + is_send + '&mch_id=' + this.mch_id
+                    })
+                }
+            },
+            getList() {
+                let that = this;
+                that.about = '';
+                let url = that.$api.mch.order_detail;
+                if(that.status == 2) {
+                    url = that.$api.mch.refund_detail;
+                }
+                that.$request({
+                    url: url,
+                    data: {
+                        id: that.id,
+                        mch_id: that.mch_id,
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        that.first = true;
+                        let order = response.data.detail;
+                        if(that.status == 2) {
+                            that.address = response.data.address;
+                        }else {
+                            order.address = order.address.replace(/\s*/g, "");
+                        }
+                        let reset_time = 0;
+                        if (order.auto_cancel > 0) {
+                            reset_time = order.auto_cancel;
+                        } else if (order.auto_confirm > 0) {
+                            reset_time = order.auto_confirm;
+                        } else if (order.auto_sales > 0) {
+                            reset_time = order.auto_sales;
+                        }
+                        that.showForm = false;
+                        if(order.detail.length > 0) {
+                            for(let i in order.detail) {
+                                if(order.detail[i].form_data != null && order.detail[i].form_data.length > 0) {
+                                    for(let item of order.detail[i].form_data) {
+                                        if(item.value != null) {
+                                            that.showForm = true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                        that.order = order;
+                        that.reset_time = reset_time;
+                        setInterval(function() {
+                            that.getTime();
+                        }, 1000)
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+            toCall(e) {
+                if(this.status == 1) {
+                    this.mobile = e.mobile;
+                }else {
+                    this.mobile = e.order.mobile;
+                }
+                this.callPhone = !this.callPhone;
+            },
+            decline(type) {
+                let that = this;
+                if (type == 1) {
+                    if (that.addressId < 1) {
+                        uni.showToast({
+                            title: '请选择地址',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false;
+                    }
+                }
+                if (that.cancelRefund) {
+                    type = 2;
+                }
+                uni.showLoading({
+                    title: '处理中...'
+                });
+                that.$request({
+                    url: that.$api.mch.refund_handle,
+                    data: {
+                        order_refund_id: that.detail.id,
+                        type: that.detail.type,
+                        mch_id: that.mch_id,
+                        is_agree: type,
+                        address_id: that.addressId,
+                        refund_price: that.detail.refund_price,
+                        merchant_remark: that.about
+                    },
+                    method: 'post'
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showModal({
+                            title: '提示',
+                            content: response.msg,
+                            showCancel: false,
+                            success: function (res) {
+                                if (res.confirm) {
+                                    that.list = [];
+                                    that.notRefund = false;
+                                    that.cancelOrder = false;
+                                    that.openAddress = false;
+                                    that.addressId = 0;
+                                    that.getList();
+                                }
+                            }
+                        });
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+            },
+            call() {
+                uni.makePhoneCall({
+                    phoneNumber: this.mobile
+                })
+                this.callPhone = !this.callPhone;
+            },
+            toRefund(e) {
+                this.detail = e;
+                this.refund_price = e.refund_price;
+                this.isRefund = !this.isRefund;
+            },
+            // 取消
+            cancel() {
+                this.about = '';
+                this.date_start = '';
+                this.date_end = '';
+                this.isRefund = false;
+                this.beToSend = false;
+                this.chooseTime = false;
+                this.noRefund = false;
+                this.changePrice = false;
+                this.cancelOrder = false;
+                this.callPhone = false;
+                this.isSend = false;
+                this.notRefund = false;
+                this.openAddress = false;
+                this.isReason = false;
+                this.noAddress = false;
+                this.addressId = 0;
+            },
+            noCancel() {
+                let that = this;
+                uni.showLoading({
+                    title: '处理中...'
+                });
+                that.$request({
+                    url: that.$api.mch.cancel,
+                    data: {
+                        status: 2,
+                        remark: that.about,
+                        mch_id: that.mch_id,
+                        order_id: that.detail.id
+                    },
+                    method: 'post'
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            type: 'success',
+                            mask: false,
+                            duration: 2000
+                        });
+                        that.noRefund = false;
+                        that.getList();
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+            },
+            cancelSubmit() {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.cancel,
+                    data: {
+                        status: 1,
+                        mch_id: that.mch_id,
+                        remark: '',
+                        order_id: that.detail.id
+                    },
+                    method: 'post'
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showToast({
+                            title: '取消成功',
+                            duration: 2000,
+                            type: 'success',
+                            mask: false
+                        });
+                        that.list = [];
+                        that.isRefund = false;
+                        that.cancelOrder = false;
+                        that.page = 1;
+                        that.getList();
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+            },
+            lookAbout(e) {
+                this.detail = e;
+                this.isReason = true;
+            },
+            chooseAddress(e) {
+                if (this.addressId == e) {
+                    this.addressId = ''
+                }else {
+                    this.addressId = e
+                }
+            },
+            refundHandle(type,detail,cancel) {
+                if (cancel == 1) {
+                    this.cancelRefund = true;
+                }
+                if (type == 1) {
+                    if (this.address.length == 0) {
+                        this.noAddress = true;
+                    } else {
+                        this.detail = detail;
+                        this.openAddress = true;
+                    }
+                } else if (type == 2) {
+                    this.detail = detail;
+                    this.notRefund = true;
+                }
+            },
+            beNotRefund(e) {
+                this.detail = e;
+                this.noRefund = !this.noRefund;
+            },
+            toCancelorder(e) {
+                this.detail = e;
+                this.cancelOrder = !this.cancelOrder;
+            },
+            // 确认修改价格
+            submitChange() {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                if (that.price > -0.01 && that.express > -0.01) {
+                    that.$request({
+                        url: that.$api.mch.update_total_price,
+                        data: {
+                            order_id: that.detail.id,
+                            mch_id: that.mch_id,
+                            total_price: that.price,
+                            express_price: that.express
+                        },
+                        method: 'post'
+                    }).then(response => {
+                        uni.hideLoading();
+                        if (response.code == 0) {
+                            uni.showToast({
+                                title: response.msg,
+                                duration: 2000,
+                                type: 'success',
+                                mask: false
+                            });
+                            that.changePrice = false;
+                            that.getList();
+                        } else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(response => {
+                        uni.hideLoading();
+                        uni.showToast({
+                            title: response,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    });
+                } else {
+                    if (!that.price || typeof(that.price) != 'number') {
+                        uni.showToast({
+                            title: '商品总价必须大于等于0',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    } else if (!that.express || typeof(that.express) != 'number') {
+                        uni.showToast({
+                            title: '运费必须大于等于0',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }
+            },
+            toSend(e) {
+                this.detail = e;
+                if(e.send_type == 1 && !e.address) {
+                    this.beToSend = true;
+                }else {
+                    this.isSend = true;
+                }
+            },
+            toChange(e) {
+                this.detail = e;
+                this.changePrice = !this.changePrice;
+                this.price = e.total_goods_price;
+                this.express = e.express_price;
+                this.total = '¥' + e.total_pay_price;
+            },
+            priceInput: function(e) {
+                if (e.detail.value > -0.01) {
+                    this.total = '¥' + (+e.detail.value + +this.express).toFixed(2)
+                } else {
+                    this.total = '数据有误'
+                }
+            },
+            expressInput: function(e) {
+                if (e.detail.value > -0.01) {
+                    this.total = '¥' + (+e.detail.value + +this.price).toFixed(2)
+                } else {
+                    this.total = '数据有误'
+                }
+            },
+            toAgreeCancel(e) {
+                this.detail = e;
+                this.isRefund = !this.isRefund;
+            },
+        },
+        onShow: function() {
+            if(this.first) {
+                this.getList();
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            that.$showLoading({
+                type: 'global',
+                text: '加载中...'
+            });
+            uni.getSystemInfo({
+                success: function (res) {
+                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
+                        that.iphone_x = true;
+                    }
+                }
+            })
+            that.id = options.id;
+            that.status = options.status;
+            that.mch_id = options.mch_id;
+            that.getList();
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .goods-form {
+        border-top: #{2rpx solid #e2e2e2};
+        margin-top: #{20rpx};
+        .price-label {
+            margin-right: #{10rpx};
+        }
+    }
+
+    .goods-form.more {
+        border-top: 0;
+        margin-top: #{10rpx};
+    }
+
+    .dialog-bg {
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        background-color: rgba(0, 0, 0, 0.5);
+        left: 0;
+        top: 0;
+    }
+
+    .goods {
+        height: #{160rpx};
+        margin-top: #{24rpx};
+        position: relative;
+        font-size: #{24rpx};
+        color: #353535;
+        margin-bottom: #{24rpx};
+    }
+
+    .goods .goods-img {
+        height: #{160rpx};
+        width: #{160rpx};
+        float: left;
+        margin-right: #{20rpx};
+        border-radius: #{4rpx};
+    }
+
+    .goods .goods-attr {
+        font-size: #{24rpx};
+        color: #999;
+        position: absolute;
+        top: #{40rpx};
+        left: #{180rpx};
+    }
+
+    .goods .goods-attr text {
+        margin-right: #{20rpx};
+    }
+
+    .goods .goods-num {
+        font-size: #{24rpx};
+        color: #999;
+        position: absolute;
+        top: #{126rpx};
+        left: #{180rpx};
+    }
+
+    .goods .goods-price {
+        font-size: #{24rpx};
+        color: #353535;
+        position: absolute;
+        bottom: 0;
+        right: 0;
+    }
+
+    .head-img {
+        height: #{220rpx};
+        width: 100%;
+        position: absolute;
+        top: 0;
+        left: 0;
+        z-index: 1;
+    }
+
+    .head-txt {
+        font-size: #{28rpx};
+        color: #fff;
+        position: absolute;
+        top: #{45rpx};
+        left: #{48rpx};
+        right: #{48rpx};
+        line-height: #{40rpx};
+        height: #{40rpx};
+        z-index: 2;
+    }
+
+    .status-txt {
+        font-size: #{32rpx};
+    }
+
+    .user-info {
+        position: relative;
+        background-color: #fff;
+        margin: #{140rpx} #{24rpx} 0;
+        border-radius: #{16rpx};
+        padding: #{28rpx} #{24rpx} 0;
+        z-index: 2;
+        font-size: #{26rpx};
+        color: #353535;
+    }
+
+    .localhost-img {
+        height: #{44rpx};
+        width: #{44rpx};
+        position: absolute;
+        top: #{40rpx};
+        left: #{24rpx};
+    }
+
+    .user-text {
+        padding-left: #{68rpx};
+    }
+
+    .user-text:last-of-type {
+        margin: #{10rpx} 0 #{28rpx};
+    }
+
+    .area {
+        height: #{72rpx};
+        border-top: #{1rpx} solid #e2e2e2;
+        position: relative;
+    }
+
+    .detail-btn {
+        width: 50%;
+        height: #{72rpx};
+        text-align: center;
+        line-height: #{72rpx};
+        color: #ff4544;
+        font-size: #{24rpx};
+    }
+
+    .line {
+        position: absolute;
+        top: #{16rpx};
+        left: 0;
+        right: 0;
+        width: #{1rpx};
+        margin: 0 auto;
+        background-color: #e2e2e2;
+        height: #{40rpx};
+    }
+
+    .logo {
+        height: #{100rpx};
+        width: #{100rpx};
+        float: left;
+        margin-right: #{34rpx};
+    }
+
+    .express {
+        margin: #{24rpx};
+        display: block;
+        margin-bottom: 0;
+        padding: #{32rpx};
+        padding-left: #{24rpx};
+        position: relative;
+        font-size: #{32rpx};
+        background-color: #fff;
+        color: #353535;
+        border-radius: #{16rpx};
+    }
+
+    .to-more {
+        height: #{24rpx};
+        width: #{12rpx};
+        position: absolute;
+        right: #{24rpx};
+        top: 50%;
+        margin-top: #{-6rpx};
+    }
+
+    .goods-info {
+        padding: #{24rpx};
+        background-color: #fff;
+        margin: #{24rpx};
+        margin-bottom: 0;
+    }
+
+    .goods-title {
+        color: #353535;
+        font-size: #{24rpx};
+        &.form-title {
+            margin-bottom: #{10rpx};
+        }
+    }
+
+    .price-item {
+        margin-bottom: #{10rpx};
+        font-size: #{24rpx};
+        color: #353535;
+    }
+
+    .price-label {
+        color: #999;
+        font-size: #{24rpx};
+    }
+
+    .total-price {
+        font-size: #{28rpx};
+        color: #ff4544;
+        font-weight: bold;
+    }
+
+    .btn.iphone_x {
+        height: #{146rpx};
+        padding-bottom: #{50rpx};
+    }
+
+    .btn {
+        height: #{96rpx};
+        position: fixed;
+        bottom: 0;
+        width: 100%;
+        right: 0;
+        border-top: #{1rpx} solid #e2e2e2;
+        z-index: 10;
+        padding: #{24rpx};
+        background-color: #fff;
+    }
+
+    .handle-btn {
+        height: #{48rpx};
+        line-height: #{46rpx};
+        padding: 0 #{24rpx};
+        border-radius: #{24rpx};
+        border: #{1rpx} solid #bbb;
+        color: #353535;
+        font-size: #{24rpx};
+        margin-left: #{16rpx};
+    }
+
+    .handle-btn.other {
+        border: #{1rpx} solid #ff4544;
+        color: #ff4544;
+    }
+
+    .dialog {
+        width: #{620rpx};
+        border-radius: #{16rpx};
+        margin: 0 auto;
+        background-color: #fff;
+        z-index: 20;
+    }
+
+    .dialog-title {
+        font-size: #{32rpx};
+        color: #353535;
+        width: #{620rpx};
+        margin: #{32rpx} auto #{40rpx};
+        text-align: center;
+    }
+
+    .dialog-choose-item {
+        width: #{170rpx};
+        height: #{68rpx};
+        line-height: #{68rpx};
+        text-align: center;
+        border-radius: #{34rpx};
+        border: #{1rpx} solid #ddd;
+        color: #666;
+        font-size: #{28rpx};
+        margin-bottom: #{16rpx};
+    }
+
+    .send-item {
+        width: #{180rpx};
+        height: #{68rpx};
+        line-height: #{66rpx};
+        text-align: center;
+        border-radius: #{34rpx};
+        border: #{1rpx} solid #ddd;
+        color: #666;
+        background-color: #fff;
+        font-size: #{28rpx};
+        margin: 0 #{30rpx} #{36rpx};
+    }
+
+    .send-item.active {
+        color: #fff;
+        border: #{1rpx} solid #ff4544;
+        background-color: #ff4544;
+    }
+
+    .dialog-choose-item.active {
+        color: #ff4544;
+        border: #{1rpx} solid #ff4544;
+    }
+
+    .btn-area {
+        height: #{88rpx};
+        position: relative;
+        border-top: #{1rpx} solid #e2e2e2;
+    }
+
+    .btn-area .line {
+        height: #{32rpx};
+        width: #{1rpx};
+        background-color: #e2e2e2;
+        position: absolute;
+        top: #{28rpx};
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+    }
+
+    .submit-btn {
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{32rpx};
+        color: #666;
+        width: #{310rpx};
+        text-align: center;
+    }
+
+    .submit-btn.be-submit {
+        color: #ff4544;
+    }
+
+    .textarea {
+        height: #{252rpx};
+        width: #{492rpx};
+        padding: #{24rpx} #{32rpx};
+        font-size: #{28rpx};
+        border-radius: #{16rpx};
+        border: #{1rpx} solid #e2e2e2;
+        text-align: left;
+        margin: #{32rpx} auto;
+    }
+
+    .change-price-item {
+        position: relative;
+        height: #{64rpx};
+        line-height: #{64rpx};
+        color: #353535;
+        font-size: #{28rpx};
+        margin-bottom: #{32rpx};
+    }
+
+    .label {
+        height: #{64rpx};
+        line-height: #{64rpx};
+        text-align: right;
+        width: #{178rpx};
+    }
+
+    .price-input {
+        height: #{64rpx};
+        margin-left: #{24rpx};
+        border-radius: #{32rpx};
+        padding-left: #{62rpx};
+        background-color: #f7f7f7;
+    }
+
+    .money {
+        position: absolute;
+        left: #{234rpx};
+    }
+
+    .bg {
+        background-color: rgba(0, 0, 0, .3);
+        position: fixed;
+        top: 0;
+        left: 0;
+        height: 100%;
+        width: 100%;
+        z-index: 100;
+    }
+
+    .time-title {
+        margin-left: #{32rpx};
+        color: #666;
+        font-size: #{28rpx};
+        margin-bottom: #{20rpx};
+    }
+
+    .choose-time {
+        position: relative;
+    }
+
+    .reason-title {
+        font-size: #{28rpx};
+        color: #999;
+        margin-bottom: #{20rpx};
+    }
+
+    .reason-content {
+        font-size: #{28rpx};
+        color: #353535;
+        width: #{556rpx};
+        margin-bottom: #{26rpx};
+    }
+
+    .reason-img {
+        margin-bottom: #{14rpx};
+    }
+
+    .reason-img image {
+        height: #{180rpx};
+        width: #{180rpx};
+        margin: 0 #{8rpx} #{8rpx} 0;
+    }
+
+    .add-list {
+        margin-top: #{50rpx};
+        max-height: #{388rpx};
+        overflow: auto;
+        padding: 0 #{36rpx};
+    }
+
+    .add-item {
+        padding: #{32rpx} 0;
+        margin-left: #{64rpx};
+        position: relative;
+        font-size: #{28rpx};
+        color: #353535;
+        border-bottom: #{1rpx} solid #e2e2e2;
+    }
+
+    .add-item:last-of-type {
+        border-bottom: 0;
+    }
+
+    .add-item image {
+        height: #{36rpx};
+        width: #{36rpx};
+        position: absolute;
+        left: #{-64rpx};
+        top: 50%;
+        margin-top: #{-18rpx};
+    }
+
+    .add-name {
+        width: #{220rpx};
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+
+    .bottom-place {
+        height: #{120rpx};
+    }
+
+    .bottom-place.iphone_x {
+        height: #{170rpx};
+    }
+
+    .refund-price {
+        width: #{160rpx};
+        border: #{1rpx} solid #e2e2e2;
+        border-radius: #{5rpx};
+        font-size: #{32rpx};
+        padding: 0 #{5rpx};
+    }
+
+    .name {
+        margin-right: #{20rpx};
+    }
+
+    .express-company {
+        margin-top: #{10rpx};
+    }
+
+    .express-number {
+        color: #666666;
+        font-size: #{28rpx};
+        margin-top: #{10rpx}
+    }
+
+    .total-label {
+        font-size: #{24rpx};
+        color: #353535;
+    }
+
+    .mch-goods .goods-title {
+        margin-bottom: #{24rpx};
+    }
+
+    .mch-goods .price-label {
+        margin-right: #{20rpx};
+    }
+
+    .form-img {
+        height: #{120rpx};
+        width: #{120rpx};
+        margin-right: #{10rpx};
+        margin-top: #{10rpx};
+    }
+
+    .refund-tip {
+        font-size: #{32rpx};
+        color: #353535;
+        margin: #{4rpx} 0 #{45rpx};
+    }
+
+    .change-total-price {
+        margin-left: #{56rpx};
+    }
+
+    .cancel-tip {
+        font-size: #{32rpx};
+        color: #353535;
+        margin: #{74rpx} 0 #{60rpx};
+    }
+
+    .send-type {
+        margin-bottom: #{24rpx};
+        padding: 0 #{32rpx};
+    }
+
+    .reason {
+        padding-left: #{32rpx};
+    }
+
+    .btn-area.other-btn-area {
+        margin-top: #{10rpx};
+    }
+
+    .refund-pay {
+        font-size: #{36rpx};
+        color: #353535;
+        font-weight: blod;
+    }
+
+    .goods-name {
+        padding-top: #{5rpx};
+    }
+
+    .address-info {
+        margin-bottom: #{28rpx};
+    }
+</style>

+ 1827 - 0
src/plugins/mch/mch/order/order.vue

xqd
@@ -0,0 +1,1827 @@
+<template>
+    <app-layout>
+        <!-- #ifdef H5 -->
+        <bd-h5-back v-if="!search" :iconStyle="2" :moreRank="true"></bd-h5-back>
+        <!-- #endif -->
+        <view v-if="!search" class="tab-info">
+            <view class='main-center tab'>
+                <view @click="tabStatus(1)" :class="['tab-item','tab-left',`${status==1?'active': ''}`]">订单列表</view>
+                <view @click="tabStatus(2)" :class="['tab-item','tab-right',`${status==2?'active': ''}`]">售后订单</view>
+            </view>
+        </view>
+        <view v-if="search" class="search-item main-between cross-center">
+            <view class="search-input">
+                <image src='https://shop.9026.com/web/statics/image/mall/static/icon/icon-search.png'></image>
+                <input :focus="!msg" @confirm='searchMethod' confirm-type='search' v-model='keyword' placeholder-style='color:#999999;font-size:13px;' placeholder='请输入订单号搜索'></input>
+            </view>
+            <view @click="cancelSeacrch">取消</view>
+        </view>
+        <view v-if="!searchResult && search" :class="['search-history', `${list.length == 0 ? '' : 'go-out'}`]">
+            <view v-if="candidate.length != 0" class='main-between search-title'>
+                <view>历史搜索</view>
+                <view @click="clear">
+                    <image class="delete-icon" src="https://shop.9026.com/web/statics/image/mall/static/icon/delete.png"></image>
+                </view>
+            </view>
+            <view class='flex-wrap candidate-list'>
+                <view @click="keywordSearch(item)" class="keyword-item box-grow-0" v-for="item in candidate" :key="item">
+                    <text class="t-omit">{{item}}</text>
+                </view>
+            </view>
+        </view>
+        <view v-if="!search" class="search-area main-between cross-center">
+            <view class="search main-center" @click="toSearch">
+                <image class="icon-search" src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-search.png"></image>
+                <text>搜索</text>
+            </view>
+            <view class="choose" @click='toTime'>
+                <text v-if="time == 0">汇总</text>
+                <text v-else-if="time == 1">今日</text>
+                <text v-else-if="time == 2">昨日</text>
+                <text v-else-if="time == 3">7日</text>
+                <text v-else>自定义</text>
+                <image src='https://shop.9026.com/web/statics/img/mall/mch/open.png'></image>
+            </view>
+        </view>
+        <view v-if="!search && status==1" class="main-between navs-info">
+            <view @click="tab(0)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==0?'active':'nav-text'}`]">全部</text>
+            </view>
+            <view @click="tab(1)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==1?'active':'nav-text'}`]">待付款</text>
+            </view>
+            <view @click="tab(2)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==2?'active':'nav-text'}`]">待发货</text>
+            </view>
+            <view @click="show=!show" v-if="active" class="box-grow-1 main-center navs more-navs">
+                <text :class="[`${_num==active.value?'active':'nav-text'}`]">{{active.name}}</text>
+                <image src="https://shop.9026.com/web/statics/img/mall/mch//more-active.png"></image>
+            </view>
+            <view @click="show=!show" v-if="!active" class="box-grow-1 main-center navs more-navs">
+                <text class="nav-text">更多状态</text>
+                <image src="https://shop.9026.com/web/statics/img/mall/mch//more.png"></image>
+            </view>
+        </view>
+        <view v-if="!search && status==2" class="main-between navs-info">
+            <view @click="tab(0)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==0?'active':'nav-text'}`]">全部</text>
+            </view>
+            <view @click="tab(1)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==1?'active':'nav-text'}`]">待审核</text>
+            </view>
+            <view @click="tab(2)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==2?'active':'nav-text'}`]">待买家处理</text>
+            </view>
+            <view @click="tab(3)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==3?'active':'nav-text'}`]">待卖家处理</text>
+            </view>
+            <view @click="tab(4)" class="box-grow-1 main-center cross-center navs">
+                <text :class="[`${_num==4?'active':'nav-text'}`]">已完成</text>
+            </view>
+        </view>
+        <view v-if="!search && show" class="more-menu">
+            <view @click="chooseItem(item.value)" v-for="item in menu" :key="item.value">{{item.name}}</view>
+        </view>
+        <view v-if="!search" class="search-palce"></view>
+        <!-- 订单信息 -->
+        <view>
+            <view class="order-item" v-for="item in list" :key="item.id">
+                <view @click="toDetail(item,status)">
+                    <view class="main-between order-info" v-if="status ==1">
+                        <view>订单号 {{item.order_no}}</view>
+                        <view v-if="item.is_sale == 1">已完成</view>
+                        <view v-else-if="item.cancel_status == 1">已取消</view>
+                        <view v-else-if="item.cancel_status == 2">待退款</view>
+                        <view v-else-if="item.is_pay == 0 && item.pay_type != 2">待付款</view>
+                        <view v-else-if="item.is_send == 0">待发货</view>
+                        <view v-else-if="item.is_confirm == 0">待收货</view>
+                        <view v-else-if="item.is_confirm == 1">已收货</view>
+                    </view>
+                    <view class="main-between order-info" v-if="status ==2">
+                        <view>订单号 {{item.order_no}}</view>
+                        <view v-if="item.type == 1" class="status-txt">退货退款</view>
+                        <view v-if="item.type == 2" class="status-txt">换货</view>
+                        <view v-if="item.type == 3" class="status-txt">仅退款</view>
+                    </view>
+                    <view class="dir-left-nowrap cross-center order-user">
+                        <view>{{status == 1 ? item.name : item.order.name}}</view>
+                        <view>{{status == 1 ? item.mobile : item.order.mobile}}</view>
+                        <view @click.stop='toCall(item)' class="to-tel">
+                            <image src='https://shop.9026.com/web/statics/img/mall/mch/tel.png'></image>
+                            <text>联系收货人</text>
+                        </view>
+                    </view>
+                    <view v-for="goods in item.detail" class="goods" :key="goods.id">
+                        <image class="goods-img" :src='goods.goods_info.pic_url'></image>
+                        <view class='t-omit-two goods-name'>{{goods.goods_info.name}}</view>
+                        <view class="goods-attr t-omit">
+                            <text v-for="attr in goods.goods_info.attr_list" :key="attr.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
+                        </view>
+                        <view class="goods-num">x{{goods.num ? goods.num : goods.goods_info.num}}</view>
+                        <view class="goods-price">¥{{goods.total_price ? goods.total_price : item.refund_price}}</view>
+                    </view>
+                    <view class="dir-right-nowrap">
+                        <view class="price-info">
+                            <text class="other">合计</text>
+                            <text v-if="status == 1">¥{{item.total_pay_price}}</text>
+                            <text v-if="status == 2">¥{{item.refund_price}}</text>
+                            <text v-if="status == 1" class="other">(含运费¥{{item.express_price}})</text>
+                        </view>
+                    </view>
+                </view>
+                <view class="dir-right-nowrap menu-button" v-if="item">
+                    <view @click.stop="toAgreeCancel(item)" v-if="item.cancel_status == 2" class="handle-btn other">同意</view>
+                    <view @click.stop="beNotRefund(item)" v-if="item.cancel_status == 2" class="handle-btn">拒绝</view>
+                    <view @click.stop="toChange(item)" v-if="item.cancel_status == 0 && item.is_pay == 0 && item.is_send == 0" class="handle-btn other">修改价格</view>
+                    <view @click.stop="toSend(item)" v-if="item.have_refund != 1 && item.cancel_status == 0 && item.is_send == 1 && item.is_confirm == 0 && item.detailExpress.length > 0" class="handle-btn other">修改物流信息</view>
+                    <view @click.stop="toSend(item)" v-if="item.cancel_status == 0 && item.is_send == 0 && item.is_pay == 1" class="handle-btn other">发货</view>
+                    <view @click.stop="toSend(item)" v-else-if="item.cancel_status == 0 && item.is_send == 0 && item.pay_type == 2" class="handle-btn other">发货</view>
+                    <view @click.stop="toRefundOrder(item.order_no)" v-if="item.have_refund == 1 && status == 1 && item.is_sale == 0" class="handle-btn">售后中</view>
+                    <view @click.stop="toCancelorder(item)" v-if="item.is_send == 0 && item.cancel_status == 0" class="handle-btn">取消订单</view>
+                    <view @click.stop="toRefund(item)" v-if="item.status == 2 && item.status_text == '待退款' && item.is_confirm == 1 && status == 2 && item.type != 2" class="handle-btn other">退款</view>
+                    <view @click.stop="toConfirm(item)" v-if="item.status == 2 && item.is_send == 1 && item.is_confirm == 0 && status == 2 && item.type == 1" class="handle-btn other">确认收货</view>
+                    <view @click.stop="toSend(item)" data-send="1" v-if="item.is_confirm == 0 && status == 2 && item.is_send == 1 && item.type == 2" class="handle-btn other">发货</view>
+                    <view @click="toChangeAddress(item)" v-if="item.action_status && item.action_status.is_edit_address == 1" class="handle-btn">修改地址</view>
+                    <view @click.stop="refundHandle(2,item,1)" v-if="item.status == 2 && status == 2 && item.is_refund == 0" :class="['handle-btn', `${_num == 2 || _num == -1?'other':''}`]">取消售后</view>
+                    <view @click.stop="refundHandle(1,item)" v-if="item.status == 1 && status == 2" class="handle-btn other">同意</view>
+                    <view @click.stop="refundHandle(2,item)" v-if="item.status == 1 && status == 2" class="handle-btn">拒绝</view>
+                    <view @click.stop="lookAbout(item)" v-if=" status == 2" class="handle-btn">售后理由</view>
+                </view>
+            </view>
+        </view>
+        <view class='no-tip' v-if="list.length == 0">
+            <image :src='adminImg.no_order'></image>
+            <view>没有任何订单哦~</view>
+        </view>
+        <app-time-screening :theme="theme" @click="toChoose" @cancel="cancel" color="#ff4544" v-if="chooseTime" :time="time" :start-date="date_start" :end-date="date_end"></app-time-screening>
+        <view class="bg cross-center" v-if="isRefund || noRefund || changePrice || cancelOrder || callPhone || isSend || notRefund || isReason || openAddress || noAddress || confirmOrder || beToSend">
+            <!-- 到店自提未填发货地址的提示 -->
+            <view class="dialog" v-if="beToSend">
+                <view class="dialog-title">提示</view>
+                <view class="main-center dir-top-nowrap cancel-tip" style="text-align: center">
+                    <view>是否将配送方式改为快递配送</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toChangeAddress'>确认</view>
+                </view>
+            </view>
+            <!-- 退款 -->
+            <view class="dialog" v-if="isRefund">
+                <view class="dialog-title">退款</view>
+                <view class="main-center refund-pay" v-if="status == 1">¥{{detail.total_pay_price}}</view>
+                <view class="main-center cross-center refund-pay" v-if="status == 2">¥
+                    <input class="refund-price" type='digit' v-model="refund_price"></input>
+                </view>
+                <view class="main-center refund-tip">是否确认退款给买家</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" v-if="status == 1" @click='cancelSubmit(1)'>确认</view>
+                    <view class="submit-btn be-submit" v-if="status == 2" @click='agree'>确认</view>
+                </view>
+            </view>
+            <view class="dialog-bg" :style="{'display': `${noRefund || notRefund ? 'block' : 'none'}`}"></view>
+            <!-- 拒绝退款 -->
+            <view class="dialog" v-if="noRefund || notRefund">
+                <view v-if="noRefund" class="dialog-title">拒绝取消</view>
+                <view v-if="notRefund" class="dialog-title">拒绝售后</view>
+                <textarea fixed class="textarea" v-model="about" placeholder="请输入拒绝理由" placeholder-style="color:#999999;font-size:14px" auto-focus />
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view v-if="noRefund" class="submit-btn be-submit" @click='noCancel'>确认</view>
+                    <view v-if="notRefund" class="submit-btn be-submit" @click='decline(0)'>确认</view>
+                </view>
+            </view>
+            <!-- 改价 -->
+            <view class="dialog" v-if="changePrice">
+                <view v-if="changePrice" class="dialog-title">修改价格</view>
+                <view v-if="changePrice" class="dir-left-nowrap change-price-item">
+                    <view class="label">商品总价</view>
+                    <view class="money">¥</view>
+                    <input fixed type="digit" class="price-input" @input="priceInput" :focus="changePrice?true:false" v-model='price'></input>
+                </view>
+                <view v-if="changePrice" class="dir-left-nowrap change-price-item">
+                    <view class="label">运费</view>
+                    <view class="money">¥</view>
+                    <input fixed type="digit" class="price-input" @input="expressInput" focus v-model='express'></input>
+                </view>
+                <view v-if="changePrice" class="dir-left-nowrap change-price-item">
+                    <view class="label">合计</view>
+                    <view class="total-money">{{total}}</view>
+                </view>
+                <view v-if="changePrice" class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='submitChange'>确认</view>
+                </view>
+            </view>
+            <!-- 取消订单 -->
+            <view class="dialog" v-if="cancelOrder">
+                <view class="main-center cancel-tip">确定取消该订单?</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='cancelSubmit(2)'>确认</view>
+                </view>
+            </view>
+            <!-- 售后确认收货 -->
+            <view class="dialog" v-if="confirmOrder">
+                <view class="main-center cancel-tip">是否确认收货?</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='beConfirm'>确认</view>
+                </view>
+            </view>
+            <!-- 提示 -->
+            <view class="dialog" v-if="noAddress">
+                <view class="main-center cancel-tip">请到商户后台添加退货地址</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn be-submit" @click='cancel'>确认</view>
+                </view>
+            </view>
+            <!-- 打电话  -->
+            <view class="dialog" v-if="callPhone">
+                <view class="main-center cancel-tip">{{mobile}}</view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='call'>确认</view>
+                </view>
+            </view>
+            <!-- 发货 -->
+            <view class="dialog" v-if="isSend">
+                <view class="dialog-title">选择发货方式</view>
+                <view class="flex-wrap main-center send-type">
+                    <view @click="sendType=0" :class="[`${sendType == 0 ? 'active':'' }`,'send-item']">快递配送</view>
+                    <view @click="sendType=1" :class="[`${sendType == 1 ? 'active':'' }`,'send-item']">无需物流</view>
+                </view>
+                <view class="main-center btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='toSendType'>确认</view>
+                </view>
+            </view>
+            <!-- 理由 -->
+            <view class="dialog" v-if="isReason">
+                <view class="dialog-title">售后理由</view>
+                <view class="reason">
+                    <view class="reason-title">申请原因</view>
+                    <view class="reason-content">{{detail.remark}}</view>
+                    <view v-if="detail.pic_list.length > 0" class="reason-title">图片</view>
+                    <view class="dir-left-wrap reason-img" v-if="detail.pic_list.length > 0">
+                        <image @click='look(item)' v-for="(item, index) in detail.pic_list" :key="index" :src="item"></image>
+                    </view>
+                </view>
+                <view class="main-center btn-area other-btn-area">
+                    <view class="submit-btn be-submit" @click='cancel'>确认</view>
+                </view>
+            </view>
+            <!-- 选地址 -->
+            <view class="dialog" v-if="openAddress">
+                <view class="dialog-title">选择退货地址</view>
+                <view class="add-list">
+                    <view class="add-item" v-for="item in address" :key="item.id">
+                        <image v-if="item.id == addressId" @click='chooseAddress(item.id)' src="https://shop.9026.com/web/statics/img/mall/mch//apply-ok.png"></image>
+                        <image v-else @click='chooseAddress(item.id)' src="https://shop.9026.com/web/statics/img/mall/mch//apply-er.png"></image>
+                        <view @click='chooseAddress(item.id)' class="add-info">
+                            <view class="main-between">
+                                <view class="add-name">{{item.name}}</view>
+                                <view>{{item.mobile}}</view>
+                            </view>
+                            <view>{{item.address}}{{item.address_detail}}</view>
+                        </view>
+                    </view>
+                </view>
+                <view class="main-center btn-area other-btn-area">
+                    <view class="submit-btn" @click='cancel'>取消</view>
+                    <view class="line"></view>
+                    <view class="submit-btn be-submit" @click='decline(1)'>确认</view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import appTimeScreening from "../../../../components/page-component/app-time-screening/app-time-screening.vue";
+    // #ifdef H5
+    import bdH5Back from "../../../../components/page-component/goods/bd-h5-back.vue";
+    // #endif
+    import { mapState } from "vuex";
+    export default {
+        data() {
+            return {
+                theme: {
+                    color: '#ff4544'
+                },
+                mch_id: 0,
+                cancelRefund: false,
+                time_start: [],
+                noAddress: false,
+                status: '1',
+                _num: '0',
+                more_list: false,
+                addressId: '0',
+                refund_price: 0,
+                page: 1,
+                notRefund: false,
+                openAddress: false,
+                isReason: false,
+                menu: [
+                    {
+                        name: '待收货',
+                        value: '3'
+                    },
+                    {
+                        name: '待处理',
+                        value: '7'
+                    },
+                    {
+                        name: '已取消',
+                        value: '6'
+                    },
+                    {
+                        name: '已完成',
+                        value: '8'
+                    }
+                ],
+                active: null,
+                show: false,
+                start: [],
+                end: [],
+                search: false,
+                keyword: '',
+                list: [],
+                candidate: [],
+                date_start: '',
+                date_end: '',
+                time: 0,
+                inSearch: false,
+                address: [],
+                chooseTime: false,
+                isRefund: false,
+                noRefund: false,
+                beToSend: false,
+                cancelOrder: false,
+                confirmOrder: false,
+                detail: {},
+                changePrice: false,
+                callPhone: false,
+                custom: false,
+                mobile: '',
+                isSend: false,
+                sendType: 0,
+                price: 0,
+                express: 0,
+                msg: false,
+                first: false,
+                searchResult: false,
+                total: 0,
+                about: '',
+                actions: [{
+                        name: '取消',
+                        color: '#666666',
+                    },
+                    {
+                        name: '去设置',
+                        color: '#ff4544',
+                        loading: false
+                    }
+                ]
+            }
+        },
+        components: {
+            // #ifdef H5
+            bdH5Back,
+            // #endif
+            "app-time-screening": appTimeScreening
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+                adminImg: state => state.mallConfig.__wxapp_img.mch,
+            })
+        },
+        methods: {
+            toDetail(item,status) {
+                let id = item.order_id;
+                if(status == 2) {
+                    id = item.id
+                }
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/order-detail/order-detail?id='+id+'&status='+status+'&mch_id='+this.mch_id
+                })
+            },
+            toRedirect(url) {
+                uni.redirectTo({
+                    url: url
+                })
+            },
+            // 取消
+            cancel() {
+                this.about = '';
+                this.isRefund = false;
+                this.chooseTime = false;
+                this.noRefund = false;
+                this.changePrice = false;
+                this.cancelOrder = false;
+                this.confirmOrder = false;
+                this.beToSend = false;
+                this.callPhone = false;
+                this.isSend = false;
+                this.notRefund = false;
+                this.openAddress = false;
+                this.isReason = false;
+                this.addressId = 0;
+                this.noAddress = false;
+            },
+            toChangeAddress(item) {
+                this.beToSend = false;
+                let order_no = item.order_no ? item.order_no : this.detail.order_no
+                uni.navigateTo({
+                    url: '/plugins/mch/mch/change-add/change-add?mch_id='+this.mch_id+'&order_no='+order_no
+                })
+            },
+            // 切换类别
+            tabStatus(e) {
+                let that = this;
+                that.status = e;
+                that.active = null;
+                that.list = [];
+                that.date_start = '';
+                that.date_end = '';
+                that.keyword = '';
+                that.time = 0;
+                that.show = false;
+                that._num = '0';
+                if(e == 2) {
+                    that._num = 0
+                }
+                that.page = 1;
+                this.getList();
+            },
+            toCall(e) {
+                if(this.status == 1) {
+                    this.mobile = e.mobile;
+                }else {
+                    this.mobile = e.order.mobile;
+                }
+                this.callPhone = !this.callPhone;
+            },
+            beConfirm() {
+                let that = this;
+                that.$request({
+                    url: that.$api.app_admin.shou_huo,
+                    data: {
+                        refund_order_id: that.detail.id
+                    },
+                    method: 'post'
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            duration: 1000,
+                            type: 'success',
+                            mask: false
+                        });
+                        that.cancel();
+                        setTimeout(v=>{
+                            that.list = [];
+                            that.page = 1;
+                            uni.showLoading({
+                                title: '加载中...'
+                            });
+                            that.getList();
+                        },1000)
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+            call() {
+                uni.makePhoneCall({
+                    phoneNumber: this.mobile
+                })
+                this.callPhone = !this.callPhone;
+            },
+            toSearch() {
+                this.search = true;
+                this.list = [];
+                this.searchResult = false;
+                this.candidate = this.$storage.getStorageSync('mch_keyword') ? this.$storage.getStorageSync('mch_keyword') : [];
+                this.inSearch = false;
+            },
+            keywordSearch(e) {
+                this.keyword = e;
+                this.searchResult = true;
+                this.getList();
+            },
+            // 清除搜索记录
+            clear() {
+                let that = this;
+                this.$storage.removeStorageSync('mch_keyword');
+                that.candidate = [];
+                uni.showToast({
+                    title: '清理成功',
+                    duration: 1000,
+                    type: 'success',
+                    mask: false
+                });
+            },
+            // 搜索
+            searchMethod() {
+                let value = this.$storage.getStorageSync('mch_keyword') ? this.$storage.getStorageSync('mch_keyword') : [];
+                if (this.keyword.length == 0) {
+                    return
+                } else if (value.length > 0) {
+                    value.unshift(this.keyword)
+                } else {
+                    value = [this.keyword]
+                }
+                this.page = 1;
+                this.list = [];
+                this.getList();
+                value.forEach(function(row, index) {
+                    if (value[0] == value[index] && index > 0) {
+                        value.splice(index, 1)
+                    }
+                })
+                this.$storage.setStorageSync('mch_keyword', value);
+                this.inSearch = true;
+                this.searchResult = true;
+            },
+            // 取消搜索
+            cancelSeacrch() {
+                this.search = false;
+                this.keyword = '';
+                this.list = [];
+                this.page = 1;
+                this.getList();
+            },
+            // 
+            // 确认选择时间
+            toChoose(res) {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.date_start = res.date_start;
+                that.date_end = res.date_end;
+                that.time = res.choose;
+                that.page = 1;
+                that.list = [];
+                that.getList();
+                that.chooseTime = false;
+            },
+            // 打开时间筛选
+            toTime() {
+                let that = this;
+                that.chooseTime = !that.chooseTime;
+                that.show = false;
+            },
+            // 选择更多状态
+            chooseItem(e) {
+                let that = this;
+                that._num = e;
+                that.menu.forEach(function(row, index) {
+                    if (row.value == that._num) {
+                        that.active = row;
+                    }
+                })
+                that.show = !that.show;
+                that.page = 1;
+                that.list = [];
+                that.getList();
+            },
+            // 切换状态
+            tab(e) {
+                this._num = e;
+                this.show = false;
+                this.active = null;
+                this.list = [];
+                this.page = 1;
+                this.getList();
+            },
+            getList() {
+                let that = this;
+                that.about = '';
+                let url;
+                let refund_status = 0;
+                if (that.status == 2) {
+                    refund_status = that._num;
+                }
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.order_list,
+                    data: {
+                        status: that.status == 2 ? '0': that._num,
+                        mch_id: that.mch_id,
+                        end_date: that.date_end,
+                        start_date: that.date_start,
+                        order_type: that.status == 2 ? 'refund_order':'order',
+                        refund_status: refund_status,
+                        page: that.page,
+                        keyword: that.keyword
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    uni.hideLoading();
+                    that.first = true;
+                    if(response.code == 0) {
+                        let list = response.data.list;
+                        if (that.status == 2) {
+                            let address = response.data.address;
+                            address.forEach(function(row, index) {
+                                row.address = row.address.replace(/"/g, '')
+                                row.address = row.address.replace(/,/g, '')
+                                row.address = row.address.replace('[', '')
+                                row.address = row.address.replace(']', '')
+                            })
+                            that.address = address;
+                        } else {
+                            list.forEach(function(row) {
+                                row.order_id = row.id;
+                                row.detail.forEach(function(res) {
+                                    if (res.refund_status > 0) {
+                                        row.have_refund = 1;
+                                    }
+                                })
+                            })
+                        }
+                        that.more_list = false;
+                        if (list.length == response.data.pagination.pageSize) {
+                            that.more_list = true;
+                        }
+                        that.page++;
+                        that.list = that.list.concat(list);
+                        that.$forceUpdate();
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                    uni.hideLoading();
+                });
+            },
+            toCancelorder(e) {
+                this.detail = e;
+                this.cancelOrder = !this.cancelOrder;
+            },
+            toConfirm(e) {
+                this.detail = e;
+                this.confirmOrder = !this.confirmOrder;
+            },
+            cancelSubmit(type) {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                let url = type == 1 ? that.$api.mch.cancel : that.$api.mch.force_cancel
+                that.$request({
+                    url: url,
+                    data: {
+                        status: 1,
+                        mch_id: that.mch_id,
+                        remark: '',
+                        order_id: that.detail.id
+                    },
+                    method: 'post'
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showToast({
+                            title: '取消成功',
+                            duration: 2000,
+                            type: 'success',
+                            mask: false
+                        });
+                        that.isRefund = false;
+                        that.cancelOrder = false;
+                        setTimeout(()=>{
+                            that.list = [];
+                            that.page = 1;
+                            that.getList();
+                        },1000)
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+            },
+            toChange(e) {
+                this.detail = e;
+                this.changePrice = !this.changePrice;
+                this.price = e.total_goods_price;
+                this.express = e.express_price;
+                this.total = '¥' + e.total_pay_price;
+            },
+            priceInput: function(e) {
+                if (e.detail.value > -0.01) {
+                    this.total = '¥' + (+e.detail.value + +this.express).toFixed(2)
+                } else {
+                    this.total = '数据有误'
+                }
+            },
+            expressInput: function(e) {
+                if (e.detail.value > -0.01) {
+                    this.total = '¥' + (+e.detail.value + +this.price).toFixed(2)
+                } else {
+                    this.total = '数据有误'
+                }
+            },
+            // 确认修改价格
+            submitChange() {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                if (that.price > -0.01 && that.express > -0.01) {
+                    that.$request({
+                        url: that.$api.mch.update_total_price,
+                        data: {
+                            order_id: that.detail.id,
+                            mch_id: that.mch_id,
+                            total_price: that.price,
+                            express_price: that.express
+                        },
+                        method: 'post'
+                    }).then(response => {
+                        uni.hideLoading();
+                        if (response.code == 0) {
+                            uni.showToast({
+                                title: response.msg,
+                                duration: 2000,
+                                type: 'success',
+                                mask: false
+                            });
+                            that.page = 1;
+                            that.list = [];
+                            that.changePrice = false;
+                            that.getList();
+                        } else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(response => {
+                        uni.hideLoading();
+                        uni.showToast({
+                            title: response,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    });
+                } else {
+                    if (!that.price || typeof(that.price) != 'number') {
+                        uni.showToast({
+                            title: '商品总价必须大于等于0',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    } else if (!that.express || typeof(that.express) != 'number') {
+                        uni.showToast({
+                            title: '运费必须大于等于0',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }
+            },
+            toRefundOrder(e) {
+                let that = this;
+                
+                that.list = [];
+                that.more_list = false;
+                that.keyword = e;
+                that.status = 2;
+                that._num = 0;
+                that.search = true;
+                that.searchMethod();
+            },
+            toSend(e) {
+                this.detail = e;
+                if(e.send_type == 1 && !e.address) {
+                    this.beToSend = true;
+                }else {
+                    this.isSend = true;
+                }
+            },
+            toExpress(e,is_send) {
+                let id = e.id;
+                let order_refund_id = e.refund;
+                if (id > 0) {
+                    uni.navigateTo({
+                        url: '/plugins/mch/mch/send/send?id=' + id + '&is_send=' + is_send + '&mch_id=' + this.mch_id
+                    })
+                } else if (order_refund_id) {
+                    uni.navigateTo({
+                        url: '/plugins/mch/mch/send/send?order_refund_id=' + order_refund_id + '&is_send=' + is_send + '&mch_id=' + this.mch_id
+                    })
+                }
+            },
+            toSendType() {
+                let that = this;
+                if (that.sendType == 1) {
+                    if (that.detail.status_text) {
+                        uni.showLoading({
+                            title: '加载中...'
+                        });
+                        that.$request({
+                            url: that.$api.mch.refund_handle,
+                            data: {
+                                is_express: 0,
+                                merchant_remark: '',
+                                mch_id: that.mch_id,
+                                type: that.detail.type,
+                                is_agree: 1,
+                                order_refund_id: that.detail.id
+                            },
+                            method: 'post'
+                        }).then(response => {
+                            uni.hideLoading();
+                            if (response.code == 0) {
+                                uni.showToast({
+                                    title: response.msg,
+                                    type: 'success',
+                                    mask: false,
+                                    duration: 2000
+                                });
+                                that.list = [];
+                                that.page = 1;
+                                that.isSend = false;
+                                that.sendType = 0;
+                                that.getList();
+                            } else {
+                                uni.showToast({
+                                    title: response.msg,
+                                    icon: 'none',
+                                    duration: 1000
+                                });
+                            }
+                        }).catch(response => {
+                            uni.hideLoading();
+                            uni.showToast({
+                                title: response,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        });
+                    } else {
+                        uni.showLoading({
+                            title: '加载中...'
+                        });
+                        let para = {
+                            is_express: 2,
+                            mch_id: that.mch_id,
+                            words: '',
+                            order_id: that.detail.id
+                        }
+                        if(that.detail.detailExpress.length > 0) {
+                            para.express_id = that.detail.detailExpress[0].id
+                        }
+                        that.$request({
+                            url: that.$api.mch.order_send,
+                            data: para,
+                            method: 'post'
+                        }).then(response => {
+                            uni.hideLoading();
+                            if (response.code == 0) {
+                                uni.showToast({
+                                    title: response.msg,
+                                    type: 'success',
+                                    mask: false,
+                                    duration: 2000
+                                });
+                                that.isSend = false;
+                                setTimeout(()=>{
+                                    that.list = [];
+                                    that.page = 1;
+                                    that.sendType = 0;
+                                    that.getList();
+                                },1000)
+                            } else {
+                                uni.showToast({
+                                    title: response.msg,
+                                    icon: 'none',
+                                    duration: 1000
+                                });
+                            }
+                        }).catch(response => {
+                            uni.hideLoading();
+                            uni.showToast({
+                                title: response,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        });
+                    }
+                } else {
+                    that.isSend = false;
+                    if (that.detail.status_text) {
+                        uni.navigateTo({
+                            url: '/plugins/mch/mch/send/send?order_refund_id=' + that.detail.id + '&mch_id=' + that.mch_id + '&is_send=' + that.detail.is_send
+                        })
+                    } else {
+                        uni.navigateTo({
+                            url: '/plugins/mch/mch/send/send?id=' + that.detail.id + '&mch_id=' + that.mch_id + '&is_send=' + that.detail.is_send
+                        })
+                    }
+                }
+            },
+            look(e) {
+                uni.previewImage({
+                    current: e, // 当前显示图片的http链接
+                    urls: [e] // 需要预览的图片http链接列表
+                })
+            },
+            lookAbout(e) {
+                this.detail = e;
+                this.isReason = true;
+            },
+            toRefund(e) {
+                this.detail = e;
+                this.refund_price = e.refund_price;
+                this.isRefund = !this.isRefund;
+            },
+            agree() {
+                let that = this;
+                uni.showLoading({
+                    title: '处理中...'
+                });
+                if (that.detail.refund_price > 0) {
+                    that.$request({
+                        url: that.$api.mch.refund_handle,
+                        data: {
+                            order_refund_id: that.detail.id,
+                            type: that.detail.type,
+                            is_agree: 1,
+                            mch_id: that.mch_id,
+                            refund_price: that.refund_price,
+                            merchant_remark: that.about
+                        },
+                        method: 'post'
+                    }).then(response => {
+                        uni.hideLoading();
+                        if (response.code == 0) {
+                            uni.showModal({
+                                title: '提示',
+                                content: response.msg,
+                                showCancel: false,
+                                success: function (res) {
+                                    if (res.confirm) {
+                                        that.list = [];
+                                        that.notRefund = false;
+                                        that.openAddress = false;
+                                        that.isRefund = false;
+                                        that.addressId = 0;
+                                        that.page = 1;
+                                        that.getList();
+                                    }
+                                }
+                            });
+                        } else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(response => {
+                        uni.hideLoading();
+                        uni.showToast({
+                            title: response,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    });
+                } else {
+                    uni.showToast({
+                        title: '退款金额需大于零',
+                        icon: 'none',
+                        duration: 1000
+                    });
+                }
+            },
+            refundHandle(type,detail,cancel) {
+                if (cancel == 1) {
+                    this.cancelRefund = true;
+                }
+                if (type == 1) {
+                    if (this.address.length == 0) {
+                        this.noAddress = true;
+                    } else {
+                        this.detail = detail;
+                        this.openAddress = true;
+                    }
+                } else if (type == 2) {
+                    this.detail = detail;
+                    this.notRefund = true;
+                }
+                this.$forceUpdate();
+            },
+
+            toAgreeCancel(e) {
+                this.detail = e;
+                this.isRefund = !this.isRefund;
+            },
+            decline(type) {
+                let that = this;
+                if (type == 1) {
+                    if (that.addressId < 1) {
+                        uni.showToast({
+                            title: '请选择地址',
+                            icon: 'none',
+                            duration: 1000
+                        });
+                        return false;
+                    }
+                }
+                if (that.cancelRefund) {
+                    type = 2;
+                }
+                uni.showLoading({
+                    title: '处理中...'
+                });
+                that.$request({
+                    url: that.$api.mch.refund_handle,
+                    data: {
+                        order_refund_id: that.detail.id,
+                        type: that.detail.type,
+                        is_agree: type,
+                        mch_id: that.mch_id,
+                        address_id: that.addressId,
+                        refund_price: that.detail.refund_price,
+                        merchant_remark: that.about
+                    },
+                    method: 'post'
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showModal({
+                            title: '提示',
+                            content: response.msg,
+                            showCancel: false,
+                            success: function (res) {
+                                if (res.confirm) {
+                                    that.page = 1;
+                                    that.list = [];
+                                    that.notRefund = false;
+                                    that.cancelOrder = false;
+                                    that.openAddress = false;
+                                    that.addressId = 0;
+                                    that.getList();
+                                }
+                            }
+                        });
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+            },
+            chooseAddress(e) {
+                if (this.addressId == e) {
+                    this.addressId = ''
+                }else {
+                    this.addressId = e
+                }
+            },
+            noCancel() {
+                let that = this;
+                uni.showLoading({
+                    title: '处理中...'
+                });
+                that.$request({
+                    url: that.$api.mch.cancel,
+                    data: {
+                        status: 2,
+                        remark: that.about,
+                        mch_id: that.mch_id,
+                        order_id: that.detail.id
+                    },
+                    method: 'post'
+                }).then(response => {
+                    uni.hideLoading();
+                    if (response.code == 0) {
+                        uni.showToast({
+                            title: response.msg,
+                            type: 'success',
+                            mask: false,
+                            duration: 2000
+                        });
+                        that.list = [];
+                        that.page = 1;
+                        that.noRefund = false;
+                        that.getList();
+                    } else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: response,
+                        icon: 'none',
+                        duration: 1000
+                    });
+                });
+            },
+            beNotRefund(e) {
+                this.detail = e;
+                this.noRefund = !this.noRefund;
+            },
+        },
+        onReachBottom: function() {
+            if (this.more_list) {
+                this.getList();
+            }
+        },
+        onShow: function() {
+            if (!this.search && this.first) {
+                this.list = [];
+                this.page = 1;
+                this.getList();
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            that.$showLoading({
+                type: 'global',
+                text: '加载中...'
+            });
+            that.status = '1';
+            that._num = '0';
+            that.mch_id = options.mch_id;
+            that.getList();
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .dialog-bg {
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        background-color: rgba(0, 0, 0, 0.5);
+        left: 0;
+        top: 0;
+    }
+
+    .tab {
+        margin: #{24rpx} auto;
+        width: #{320rpx};
+        height: #{56rpx};
+    }
+
+    .tab-info {
+        background-color: #fff;
+        position: fixed;
+        z-index: 2;
+        top: 0;
+        left: 0;
+        right: 0;
+        height: #{104rpx};
+    }
+
+    .tab-item {
+        width: #{160rpx};
+        text-align: center;
+        height: #{56rpx};
+        line-height: #{54rpx};
+        background-color: #fff;
+        color: #666;
+        font-size: #{24rpx};
+        display: block;
+    }
+
+    .tab-item.tab-left {
+        border-top-left-radius: #{28rpx};
+        border-bottom-left-radius: #{28rpx};
+        border: #{1rpx} solid #ff4544;
+        border-right: 0;
+    }
+
+    .tab-item.tab-right {
+        border-top-right-radius: #{28rpx};
+        border-bottom-right-radius: #{28rpx};
+        border: #{1rpx} solid #ff4544;
+        border-left: 0;
+    }
+
+    .tab-item.active {
+        background-color: #ff4544;
+        color: #fff;
+    }
+
+    .search-area {
+        position: fixed;
+        z-index: 2;
+        top: #{104rpx};
+        left: 0;
+        right: 0;
+        height: #{88rpx};
+        line-height: #{88rpx};
+        background-color: #efeff4;
+        padding: 0 #{48rpx} 0 #{24rpx};
+    }
+
+    .search {
+        height: #{56rpx};
+        line-height: #{56rpx};
+        border-radius: #{28rpx};
+        background-color: #fff;
+        color: #b2b2b2;
+        width: #{528rpx};
+        text-align: center;
+    }
+
+    .choose {
+        color: #ff4544;
+        font-size: #{26rpx};
+    }
+
+    .choose image {
+        width: #{22rpx};
+        height: #{12rpx};
+        margin-left: #{12rpx};
+    }
+
+    .navs-info {
+        background-color: #fff;
+        border-bottom: #{1rpx} solid #e2e2e2;
+        position: fixed;
+        z-index: 2;
+        top: #{192rpx};
+        left: 0;
+        right: 0;
+    }
+
+    .navs {
+        height: #{100rpx};
+        font-size: #{28rpx};
+        color: #666;
+        text-align: center;
+        position: relative;
+    }
+
+    .navs.more-navs {
+        line-height: #{100rpx};
+    }
+
+    .navs .active {
+        color: #ff4544;
+        display: inline-block;
+        height: #{100rpx};
+        line-height: #{102rpx};
+        border-bottom: #{2rpx} solid #ff4544;
+    }
+
+    .navs image {
+        height: #{16rpx};
+        width: #{16rpx};
+        margin-left: #{16rpx};
+        display: block;
+        float: right;
+        margin-top: #{42rpx};
+    }
+
+    .order-item {
+        background-color: #fff;
+        padding: #{24rpx};
+        margin: #{20rpx} #{24rpx} 0;
+        border-radius: #{16rpx};
+        display: block;
+    }
+
+    .order-info {
+        font-size: #{24rpx};
+        color: #353535;
+        margin-bottom: #{24rpx};
+    }
+
+    .order-user {
+        height: #{72rpx};
+        background-color: #f7f7f7;
+        padding-left: #{28rpx};
+        font-size: #{24rpx};
+        color: #353535;
+    }
+
+    .order-user view:first-of-type {
+        margin-right: #{32rpx};
+    }
+
+    .to-tel {
+        color: #ff4544;
+        font-size: #{24rpx};
+        margin-left: #{20rpx};
+        height: #{72rpx};
+        line-height: #{72rpx};
+    }
+
+    .to-tel image {
+        height: #{28rpx};
+        width: #{28rpx};
+        display: block;
+        margin-top: #{22rpx};
+        margin-right: #{12rpx};
+        float: left;
+    }
+
+    .goods {
+        height: #{160rpx};
+        margin-top: #{24rpx};
+        position: relative;
+        font-size: #{24rpx};
+        color: #353535;
+        margin-bottom: #{24rpx};
+    }
+
+    .goods .goods-img {
+        height: #{160rpx};
+        width: #{160rpx};
+        float: left;
+        margin-right: #{20rpx};
+        border-radius: #{4rpx};
+    }
+
+    .goods .goods-attr {
+        font-size: #{24rpx};
+        color: #999;
+        position: absolute;
+        top: #{78rpx};
+        left: #{180rpx};
+    }
+
+    .goods .goods-attr text {
+        margin-right: #{20rpx};
+    }
+
+    .goods .goods-num {
+        font-size: #{24rpx};
+        color: #999;
+        position: absolute;
+        top: #{126rpx};
+        left: #{180rpx};
+    }
+
+    .goods .goods-price {
+        font-size: #{24rpx};
+        color: #353535;
+        position: absolute;
+        bottom: 0;
+        right: 0;
+    }
+
+    .price-info {
+        font-size: #{28rpx};
+        color: #353535;
+    }
+
+    .price-info .other {
+        font-size: #{24rpx};
+        color: #999;
+    }
+
+    .handle-btn {
+        height: #{48rpx};
+        display: flex;
+        align-items: center;
+        padding: 0 #{24rpx};
+        border-radius: #{24rpx};
+        border: #{1rpx} solid #bbb;
+        color: #353535;
+        font-size: #{24rpx};
+        margin-left: #{16rpx};
+    }
+
+    .handle-btn.other {
+        border: #{1rpx} solid #ff4544;
+        color: #ff4544;
+    }
+
+    .more-menu {
+        position: fixed;
+        z-index: 5;
+        top: #{270rpx};
+        padding-top: #{22rpx};
+        right: #{22rpx};
+        width: #{196rpx};
+        background-color: #fff;
+        font-size: #{28rpx};
+        color: #666;
+        border-bottom: #{1rpx} solid #e0e0e0;
+    }
+
+    .more-menu.go-out, .search-history.go-out {
+        display: none;
+    }
+
+    .more-menu view {
+        width: #{196rpx};
+        height: #{68rpx};
+        line-height: #{68rpx};
+        text-align: center;
+        border-left: #{1rpx} solid #e0e0e0;
+        border-right: #{1rpx} solid #e0e0e0;
+    }
+
+    .search-item {
+        height: #{96rpx};
+        background-color: #efeff4;
+        padding: 0 #{24rpx};
+        font-size: #{28rpx};
+        color: #00c203;
+    }
+
+    .search-input {
+        height: #{64rpx};
+        position: relative;
+        width: #{620rpx};
+    }
+
+    .search-input image {
+        height: #{22rpx};
+        width: #{22rpx};
+        position: absolute;
+        top: #{21rpx};
+        left: #{28rpx};
+        z-index: 10;
+    }
+
+    .search-input input {
+        padding-left: #{62rpx};
+        background-color: #fff;
+        border-radius: #{32rpx};
+        height: #{64rpx};
+        font-size: #{26rpx};
+        color: #353535;
+    }
+
+    .search-history {
+        position: absolute;
+        top: #{96rpx};
+        left: 0;
+        right: 0;
+        height: 100%;
+        background-color: #fff;
+        padding: #{24rpx} #{4rpx};
+        font-size: #{28rpx};
+        color: #666;
+        z-index: 20;
+    }
+
+    .search-title {
+        padding: 0 #{20rpx};
+        margin-bottom: #{24rpx};
+    }
+
+    .keyword-item {
+        height: #{64rpx};
+        line-height: #{64rpx};
+        padding: 0 #{20rpx};
+        background-color: #f7f7f7;
+        color: #333;
+        border-radius: #{32rpx};
+        font-size: #{28rpx};
+        margin-left: #{20rpx};
+        margin-bottom: #{20rpx};
+        max-width: 90%;
+    }
+
+    .bg {
+        background-color: rgba(0, 0, 0, 0.3);
+        position: fixed;
+        top: 0;
+        left: 0;
+        height: 100%;
+        width: 100%;
+        z-index: 100;
+    }
+
+    .dialog {
+        width: #{620rpx};
+        border-radius: #{16rpx};
+        margin: 0 auto;
+        background-color: #fff;
+        z-index: 20;
+    }
+
+    .dialog-title {
+        font-size: #{32rpx};
+        color: #353535;
+        width: #{620rpx};
+        margin: #{32rpx} auto #{40rpx};
+        text-align: center;
+    }
+
+    .dialog-choose-item {
+        width: #{170rpx};
+        height: #{68rpx};
+        line-height: #{68rpx};
+        text-align: center;
+        border-radius: #{34rpx};
+        border: #{2rpx} solid #ddd;
+        color: #666;
+        font-size: #{28rpx};
+        margin-bottom: #{16rpx};
+    }
+
+    .send-item {
+        width: #{180rpx};
+        height: #{68rpx};
+        line-height: #{66rpx};
+        text-align: center;
+        border-radius: #{34rpx};
+        border: #{1rpx} solid #ddd;
+        color: #666;
+        background-color: #fff;
+        font-size: #{28rpx};
+        margin: 0 #{30rpx} #{36rpx};
+    }
+
+    .send-item.active {
+        color: #fff;
+        border: #{1rpx} solid #ff4544;
+        background-color: #ff4544;
+    }
+
+    .dialog-choose-item.active {
+        color: #ff4544;
+        border: #{2rpx} solid #ff4544;
+    }
+
+    .btn-area {
+        height: #{88rpx};
+        position: relative;
+        border-top: #{1rpx} solid #e2e2e2;
+    }
+
+    .btn-area.other-btn-area {
+        margin-top: #{10rpx};
+    }
+
+    .btn-area .line {
+        height: #{32rpx};
+        width: #{1rpx};
+        background-color: #e2e2e2;
+        position: absolute;
+        top: #{28rpx};
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+    }
+
+    .submit-btn {
+        height: #{88rpx};
+        line-height: #{88rpx};
+        font-size: #{32rpx};
+        color: #666;
+        width: #{310rpx};
+        text-align: center;
+    }
+
+    .submit-btn.be-submit {
+        color: #ff4544;
+    }
+
+    .textarea {
+        height: #{252rpx};
+        width: #{492rpx};
+        padding: #{24rpx} #{32rpx};
+        font-size: #{28rpx};
+        border-radius: #{16rpx};
+        border: #{1rpx} solid #e2e2e2;
+        text-align: left;
+        margin: #{32rpx} auto;
+    }
+
+    .change-price-item {
+        position: relative;
+        height: #{64rpx};
+        line-height: #{64rpx};
+        color: #353535;
+        font-size: #{28rpx};
+        margin-bottom: #{32rpx};
+    }
+
+    .label {
+        height: #{64rpx};
+        line-height: #{64rpx};
+        text-align: right;
+        width: #{178rpx};
+    }
+
+    .price-input {
+        width: #{298rpx};
+        height: #{64rpx};
+        margin-left: #{24rpx};
+        border-radius: #{32rpx};
+        padding-left: #{62rpx};
+        background-color: #f7f7f7;
+    }
+
+    .money {
+        position: absolute;
+        left: #{234rpx};
+    }
+
+    .time-title {
+        margin-left: #{32rpx};
+        color: #666;
+        font-size: #{28rpx};
+        margin-bottom: #{20rpx};
+    }
+
+    .reason {
+        padding-left: #{32rpx};
+    }
+
+    .reason-title {
+        font-size: #{28rpx};
+        color: #999;
+        margin-bottom: #{20rpx};
+    }
+
+    .reason-content {
+        font-size: #{28rpx};
+        color: #353535;
+        width: #{556rpx};
+        margin-bottom: #{26rpx};
+    }
+
+    .reason-img {
+        margin-bottom: #{14rpx};
+    }
+
+    .reason-img image {
+        height: #{180rpx};
+        width: #{180rpx};
+        margin: 0 #{8rpx} #{8rpx} 0;
+    }
+
+    .add-list {
+        margin-top: #{50rpx};
+        max-height: #{388rpx};
+        overflow: auto;
+        padding: 0 #{36rpx};
+    }
+
+    .add-item {
+        padding: #{32rpx} 0;
+        margin-left: #{64rpx};
+        position: relative;
+        font-size: #{28rpx};
+        color: #353535;
+        border-bottom: #{1rpx} solid #e2e2e2;
+    }
+
+    .add-item:last-of-type {
+        border-bottom: 0;
+    }
+
+    .add-item image {
+        height: #{36rpx};
+        width: #{36rpx};
+        position: absolute;
+        left: #{-64rpx};
+        top: 50%;
+        margin-top: #{-18rpx};
+    }
+
+    .add-name {
+        width: #{220rpx};
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+
+    .no-tip {
+        position: fixed;
+        top: #{400rpx};
+        left: 0;
+        right: 0;
+        margin: 0 auto;
+        color: #666666;
+        font-size: #{24rpx};
+        width: #{240rpx};
+        text-align: center;
+    }
+
+    .no-tip image {
+        height: #{240rpx};
+        width: #{240rpx};
+        margin-bottom: #{20rpx};
+    }
+
+    .refund-price {
+        width: #{160rpx};
+        border: #{1rpx} solid #e2e2e2;
+        border-radius: #{5rpx};
+        font-size: #{32rpx};
+        padding: 0 #{5rpx};
+    }
+
+    .delete-icon {
+        height: #{34rpx};
+        width: #{28rpx};
+    }
+
+    .candidate-list {
+        max-height: #{420rpx};
+        overflow: hidden;
+    }
+
+    .icon-search {
+        height: #{24rpx};
+        width: #{24rpx};
+        margin-top: #{16rpx};
+    }
+
+    .icon-search+text {
+        color:#b2b2b2;
+        font-size:#{24rpx};
+        margin:0 #{5rpx};
+    }
+
+    .search-palce {
+        height: #{292rpx};
+    }
+
+    .goods-name {
+        padding-top: #{5rpx};
+    }
+
+    .menu-button {
+        margin-top: #{24rpx};
+    }
+
+    .refund-pay {
+        font-size: #{36rpx};
+        color: #353535;
+        font-weight: blod;
+    }
+
+    .refund-tip {
+        font-size: #{32rpx};
+        color: #353535;
+        margin: #{4rpx} 0 #{45rpx};
+    }
+
+    .total-money {
+        margin-left: #{56rpx};
+    }
+
+    .cancel-tip {
+        font-size: #{32rpx};
+        color: #353535;
+        margin: #{74rpx} 0 #{60rpx};
+    }
+
+    .send-type {
+        margin-bottom: #{24rpx};
+        padding: 0 #{32rpx};
+    }
+</style>

+ 140 - 0
src/plugins/mch/mch/password/password.vue

xqd
@@ -0,0 +1,140 @@
+<template>
+    <app-layout>
+        <view style="background:#FFFFFF">
+            <view class="dir-left-nowrap cross-center select">
+                <view class="box-grow-0 first-child main-right">新密码</view>
+                <view class="box-grow-1">
+                    <input @input="expressNoInput"
+                           data-name="password"
+                           placeholder-class="plugins-mch-password-input"
+                           placeholder="必填"
+                           :value="form.password"/>
+                </view>
+            </view>
+            <view class="dir-left-nowrap cross-center select">
+                <view class="box-grow-0 first-child main-right">确认新密码</view>
+                <view class="box-grow-1">
+                    <input @input="expressNoInput"
+                           data-name="checkPass"
+                           placeholder-class="plugins-mch-password-input"
+                           placeholder="必填"
+                           :value="form.checkPass"/>
+                </view>
+            </view>
+        </view>
+
+        <view class="submit-btn main-center">
+            <app-button @click="passwordSubmit" height="80" width="702" font-size="32" background="#ff4544"
+                        color="#ffffff" round>提交
+            </app-button>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "password",
+        components: {},
+        data() {
+            return {
+                form: {},
+                mch_id: -1,
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+        },
+        methods: {
+            expressNoInput: function (e) {
+                let name = e.currentTarget.dataset.name;
+                this.form[name] = e.detail.value;
+            },
+
+            passwordSubmit() {
+                const self = this;
+                const form = self.form;
+
+                let content = function () {
+                    if (!form.password) {
+                        return "密码不能为空";
+                    }
+                    if (form.password !== form.checkPass) {
+                        return "密码不一致";
+                    }
+                    return false;
+                }();
+                if (content) {
+                    uni.showToast({icon: 'none', title: content});
+                    return;
+                }
+
+                self.$showLoading({text: '修改中'});
+                self.$request({
+                    url: self.$api.mch.update_password,
+                    method: 'POST',
+                    data: {
+                        mch_id: self.mch_id,
+                        password: form.password,
+                    },
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        uni.showModal({
+                            title: '提示',
+                            content: info.msg,
+                            showCancel: false,
+                            success: function (e) {
+                                if (e.confirm) {
+                                    uni.navigateBack({
+                                        delta: 1
+                                    });
+                                }
+                            }
+                        })
+                    } else {
+                        uni.showToast({icon: 'none', title: info.msg});
+                    }
+                }).catch((info) => {
+                    self.$hideLoading();
+                })
+            }
+        }
+    }
+</script>
+<style lang="scss">
+    .plugins-mch-password-input {
+        color: #bbb;
+        font-size: #{28rpx};
+    }
+</style>
+<style scoped lang="scss">
+    input {
+        height: 100%;
+        padding: 0 #{32rpx};
+        font-size: inherit;
+        line-height: inherit;
+        color: #666;
+    }
+
+    .select {
+        margin: 0 #{24rpx};
+        border-bottom: 1px solid #e2e2e2;
+        height: #{100rpx};
+
+        .first-child {
+            padding-left: #{3rpx};
+            font-size: #{28rpx};
+            width: #{160rpx};
+            color: #353535;
+        }
+    }
+
+    .select:last-child {
+        border-bottom: none
+    }
+
+    .submit-btn {
+        margin-top: #{56rpx};
+        margin-bottom: #{24rpx};
+    }
+</style>

+ 104 - 0
src/plugins/mch/mch/qrcode/qrcode.vue

xqd
@@ -0,0 +1,104 @@
+<template>
+    <app-layout>
+        <view class="qrcode-bg">
+            <view class="icon-bg" :style="{'background-image': `url(${appImg.qrcode_header_bg})`}" type></view>
+            <image class="mch-pic" :src="mch.store.cover_url"></image>
+            <view class="mch-name">{{mch.store.name}}</view>
+            <image class="mch-qrcode" :src="qr_code.file_path"></image>
+            <view class="mch-text">扫一扫,进入店铺</view>
+            <view class="main-center">
+                <app-button height="80" width="300" background="#ffffff" color="#ff4544" @click="saveQrcode" round>保存二维码
+                </app-button>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+import {mapState} from 'vuex';
+
+export default {
+    name: "qrcode",
+    computed: {
+        ...mapState({
+            appImg: state => state.mallConfig.plugin.mch.app_image,
+        }),
+    },
+    components: {},
+    data() {
+        return {
+            qr_code: {},
+                mch: {
+                    store: {}
+                },
+                mch_id: 0,
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            const self = this;
+            self.mch_id = options.mch_id;
+            self.$request({
+                url: self.$api.mch.qr_code,
+                data: {
+                    mch_id: self.mch_id,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    self.mch = info.data.mch;
+                    self.qr_code = info.data.qr_code;
+                } else {
+                    uni.showToast({title: info.msg, icon: 'none'})
+                }
+            })
+        },
+
+        methods: {
+            //TODO 公用
+            saveQrcode: function () {
+                let qrcode_pic = this.qr_code.file_path;
+                this.$utils.batchSave(qrcode_pic, 'image').then(result => {
+                    uni.showToast({title: '保存成功'});
+                });
+            },
+        }
+    }
+</script>
+<style scoped lang="scss">
+    .qrcode-bg {
+        text-align: center;
+        color: #353535;
+
+        .icon-bg {
+            height: #{240rpx};
+            width: 100%;
+            background-size: 100% auto;
+            background-repeat: no-repeat;
+        }
+
+        .mch-pic {
+            display: inline-block;
+            margin-top: #{-100rpx};
+            height: #{200rpx};
+            width: #{200rpx};
+            border-radius: #{16rpx};
+            box-shadow: 0 0 #{16rpx} rgba(0, 0, 0, 0.4);
+        }
+
+        .mch-name {
+            font-size: #{36rpx};
+            margin-top: #{48rpx};
+            margin-bottom: #{80rpx};
+        }
+
+        .mch-qrcode {
+            height: #{400rpx};
+            width: #{400rpx};
+        }
+
+        .mch-text {
+            font-size: #{32rpx};
+            margin-top: #{40rpx};
+            margin-bottom: #{32rpx};
+        }
+    }
+</style>

+ 422 - 0
src/plugins/mch/mch/send/send.vue

xqd
@@ -0,0 +1,422 @@
+<template>
+    <app-layout>
+        <view>
+            <view class="input-list">
+                <view class="dir-left-nowrap input-item">
+                    <view class='label'>快递公司</view>
+                    <view @click='toPick' width="width:30%;" class="dir-right-nowrap cross-center">
+                        <image class="to-more" src='https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png'></image>
+                        <text>{{express}}</text>
+                    </view>
+                </view>
+                <view class="dir-left-nowrap input-item" style='position:relative'>
+                    <view class='label'>快递单号</view>
+                    <input v-model="express_no"></input>
+                    <text v-if="id > 0" @click="getExpressNo" class='get'>获取面单</text>
+                </view>
+                <view class="dir-left-nowrap input-item">
+                    <view class='label'>邮政编码</view>
+                    <input v-model="code"></input>
+                </view>
+                <view class="dir-left-nowrap input-item">
+                    <view class='label'>商家留言</view>
+                    <input v-model="words"></input>
+                </view>
+            </view>
+            <button @click="saveAddress" class='address-bottom'>确认发货</button>
+        </view>
+        <!-- 选择列表 -->
+        <view class="dialog" v-if="dialog">
+            <view class="picker-list">
+                <view class="main-between picker-header">
+                    <view @click="toPick(2)">取消</view>
+                    <view @click="toPick(1)">确定</view>
+                </view>
+                <picker-view indicator-style="height: 36px;" class="picker" :value="[value]" @change="bindChange">
+                    <picker-view-column>
+                        <view v-for="item in list" :key="item.id" class="pick-view">{{item.name}}</view>
+                    </picker-view-column>
+                </picker-view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+
+    import { mapState } from "vuex";
+
+    export default {
+        data() {
+            return {
+                express_no: '',
+                express: '',
+                customer_name: '',
+                code: '',
+                words: '',
+                list: [],
+                dialog: false,
+                id: '',
+                value: 0,
+                is_send: 0,
+                mch_id: 0,
+                express_id: 0,
+                order_refund_id: 0,
+                order_detail_ids: [],
+            }
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info
+            })
+        },
+        methods: {
+            bindChange(e) {
+                let index = +e.detail.value[0]
+                this.express = this.list[index].name
+            },
+            toPick(type) {
+                let that = this;
+                if(type == 1) {
+                    that.customer_name = '';
+                    for(let index in that.list) {
+                        if (that.list[index].name == that.express) {
+                            that.value = +index;
+                        }
+                    }
+                }
+                that.express = that.list[that.value].name
+                that.dialog = !that.dialog;
+            },
+            getExpressNo() {
+                let that = this;
+                uni.showLoading({
+                    title: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.order_print,
+                    data: {
+                        express: that.express,
+                        code: that.code,
+                        mch_id: that.mch_id,
+                        order_id: that.id,
+                        order_detail_ids: JSON.stringify(that.order_detail_ids)
+                    },
+                }).then(response=>{
+                    uni.hideLoading();
+                    if(response.code == 0) {
+                        that.express_no = response.data.Order.LogisticCode;
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    uni.hideLoading();
+                });
+            },
+            getExpress() {
+                let that = this;
+                that.$showLoading({
+                    text: '加载中...'
+                });
+                that.$request({
+                    url: that.$api.mch.express_list
+                }).then(response=>{
+                    if(response.code == 0) {
+                        that.list = response.data.list;
+                        that.getList();
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+            getList() {
+                let that = this;
+                that.$request({
+                    url: that.$api.mch.order_detail,
+                    data: {
+                        id: that.id,
+                        mch_id: that.mch_id,
+                    }
+                }).then(response=>{
+                    that.$hideLoading();
+                    if(response.code == 0) {
+                        let detail = response.data.detail.detailExpress[0];
+                        if(detail != undefined) {
+                            that.express = detail.express ? detail.express : response.data.detail.last_express ? response.data.detail.last_express : that.list[0].name;
+                            that.express_no = detail.express_no ? detail.express_no : '';
+                            that.customer_name = detail.customer_name ? detail.customer_name : '';
+                            that.express_id = detail.id ? detail.id : '';
+                            that.code = detail.code > 0 ? detail.code : '';
+                            that.words = detail.words ? detail.words : '';
+                        }else {
+                            that.express = response.data.detail.last_express ? response.data.detail.last_express : that.list[0].name;
+                        }
+                        that.order_detail_ids = response.data.detail.detail.map(item => {
+                            return item['id']
+                        });
+                        for(let index in that.list) {
+                            if (that.list[index].name == that.express) {
+                                that.value = +index;
+                            }
+                        }
+                    }else {
+                        uni.showToast({
+                            title: response.msg,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    }
+                }).catch(response => {
+                    that.$hideLoading();
+                });
+            },
+            saveAddress: function (e) {
+                let that = this;
+                if (!that.express_no) {
+                    uni.showToast({
+                        title: '快递单号不得为空',
+                        icon: 'none',
+                        duration: 1000,
+                    });
+                    return;
+                }
+                uni.showLoading({
+                    title: '提交中...'
+                });
+                if(that.id > 0) {
+                    let para ={
+                        is_express: 1,
+                        order_id: that.id,
+                        express_no: that.express_no,
+                        mch_id: that.mch_id,
+                        express: that.express,
+                        code: that.code,
+                        customer_name: that.customer_name,
+                        words: that.words,
+                    }
+                    if(that.express_id) {
+                        para.express_id = that.express_id
+                    }
+                    that.$request({
+                        url: that.$api.mch.order_send,
+                        method: "POST",
+                        data: para
+                    }).then(response => {
+                        uni.hideLoading();
+                        if (response.code == 0) {
+                            let msg = response.msg;
+                            if(that.is_send == 2) {
+                                msg = '修改成功'
+                            }
+                            uni.showToast({
+                                title: msg,
+                                duration: 1000,
+                                type: 'success',
+                                mask: false
+                            });
+                            setTimeout(function(){
+                                uni.navigateBack();
+                            },500)
+                        } else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(response => {
+                        uni.hideLoading();
+                        uni.showToast({
+                            title: response,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    });   
+                }else {
+                    let para ={
+                        is_express: 1,
+                        type: 2,
+                        is_agree: 1,
+                        mch_id: that.mch_id,
+                        order_refund_id: that.order_refund_id,
+                        express_no: that.express_no,
+                        express: that.express,
+                        merchant_remark: that.words,
+                    }
+                    if(para.express_id) {
+                        para.express_id = that.express_id
+                    }
+                    that.$request({
+                        url: that.$api.mch.refund_handle,
+                        method: "POST",
+                        data: para
+                    }).then(response => {
+                        uni.hideLoading();
+                        if (response.code == 0) {
+                            let msg = response.msg;
+                            uni.showToast({
+                                title: msg,
+                                duration: 1000,
+                                type: 'success',
+                                mask: false
+                            });
+                            setTimeout(function(){
+                                uni.navigateBack();
+                            },500)
+                        } else {
+                            uni.showToast({
+                                title: response.msg,
+                                icon: 'none',
+                                duration: 1000
+                            });
+                        }
+                    }).catch(response => {
+                        uni.hideLoading();
+                        uni.showToast({
+                            title: response,
+                            icon: 'none',
+                            duration: 1000
+                        });
+                    });
+                }
+
+            },
+        },
+
+        onLoad(options) { this.$commonLoad.onload(options);
+            let that = this;
+            if (options.id > 0) {
+                that.id = options.id
+            }
+            that.mch_id = options.mch_id;
+            if (options.order_refund_id > 0) {
+                that.order_refund_id = options.order_refund_id
+            }
+            that.getExpress();
+            if (options.is_send > 0) {
+                that.is_send = options.is_send
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .picker {
+        width: 100%;
+        height: #{440rpx}
+    }
+    
+    .pick-view {
+        line-height: #{72rpx};
+        text-align:center;
+        color:#ff4544;
+        font-size: #{32rpx};
+    }
+
+    .address-bottom {
+        width: #{702rpx};
+        height: #{80rpx};
+        line-height: #{80rpx};
+        border-radius: #{40rpx};
+        padding: 0;
+        text-align: center;
+        margin: #{40rpx} auto;
+        color: #fff;
+        z-index: 7;
+        font-size: #{28rpx};
+        background-color: #ff4544;
+    }
+
+    .to-more {
+        height: #{24rpx};
+        width: #{12rpx};
+        margin-left: #{10rpx};
+    }
+
+    .input-list {
+        background-color: #fff;
+        padding-left: #{30rpx};
+    }
+
+    .input-item {
+        border-top: #{1rpx} solid #eee;
+        padding: #{24rpx} #{30rpx} #{24rpx} 0;
+        height: #{96rpx};
+        font-size: #{28rpx};
+        color: #495060;
+    }
+
+    .input-item:first-of-type {
+        border-top: 0;
+    }
+
+    .input-item .label {
+        width: #{200rpx};
+        height: #{48rpx};
+        line-height: #{48rpx};
+    }
+
+    .input-item input {
+        //width: #{550rpx};
+        height: #{48rpx};
+        line-height: #{48rpx};
+        font-size: #{28rpx};
+    }
+
+
+    .input-item view {
+        width: #{550rpx};
+        height: #{48rpx};
+        line-height: #{48rpx};
+        font-size: #{28rpx};
+    }
+
+    .dialog {
+        position: fixed;
+        height: 100%;
+        width: 100%;
+        bottom: #{96rpx};
+        left: 0;
+        z-index: 10;
+        background-color: rgba(0, 0, 0, .3);
+    }
+
+    .picker-list {
+        background-color: #fff;
+        padding-top: #{20rpx};
+        position: fixed;
+        bottom: #{96rpx};
+        left: 0;
+        width: 100%;
+    }
+
+    .picker-header {
+        padding: 0 #{24rpx};
+        color: #ff4544;
+        font-size: #{32rpx};
+    }
+
+    .get {
+        width: #{160rpx};
+        height: #{48rpx};
+        line-height: #{48rpx};
+        text-align: center;
+        border: #{1rpx} solid #ff4544;
+        border-radius: #{24rpx};
+        position: absolute;
+        top: #{20rpx};
+        right: #{24rpx};
+        display: block;
+        color: #ff4544;
+    }
+</style>

+ 142 - 0
src/plugins/mch/mch/settle-detail/settle-detail.vue

xqd
@@ -0,0 +1,142 @@
+<template>
+    <app-layout>
+        <view class="no-content" v-if="!list || !list.length">暂无记录</view>
+        <block v-else>
+            <view v-for="(item, index) in list" :key="index" class="settle">
+                <view class="settle-status">{{item.order_status_text}}</view>
+                <view class="price dir-left-nowrap main-center cross-bottom">
+                    <view class="num">{{item.total_pay_price}}</view>
+                    <text class="yuan">元</text>
+                </view>
+                <view class="item-info dir-top-nowrap main-center">
+                    <view class="dir-left-nowrap">
+                        <view class="box-grow-0 item-label main-right">订单号</view>
+                        <view class="item-value">{{item.order_no}}</view>
+                    </view>
+                    <view class="dir-left-nowrap goods">
+                        <view class="box-grow-0 item-label main-right">商品名称</view>
+                        <view class="goods-name t-omit-two item-value">{{item.goods_name}}{{item.goods_name}}</view>
+                    </view>
+                </view>
+            </view>
+        </block>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "settle-detail",
+        components: {},
+        data() {
+            return {
+                page: 1,
+                args: false,
+                load: false,
+                mch_id: -1,
+                is_transfer: 0,
+                list: [],
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.mch_id = options.mch_id;
+            this.is_transfer = options.is_transfer;
+
+            uni.setNavigationBarTitle({title: this.is_transfer === `1` ? `已结算金额` : `未结算金额`});
+            this.loadData();
+        },
+        onReachBottom: function () {
+            const self = this;
+            if (self.args || self.load)
+                return;
+            self.load = true;
+            let page = self.page + 1;
+
+            self.$request({
+                url: self.$api.mch.cash_log,
+                data: {
+                    is_transfer: self.is_transfer,
+                    mch_id: self.mch_id,
+                    page: page,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    [self.page, self.args, self.list] = [page, info.data.list.length === 0, self.list.concat(info.data.list)];
+                }
+                self.load = false;
+            });
+        },
+
+        methods: {
+            loadData() {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.order_close_log,
+                    data: {
+                        is_transfer: self.is_transfer,
+                        mch_id: self.mch_id
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    self.list = info.data.list;
+                }).catch(e => {
+                    self.$hideLoading();
+                })
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .no-content {
+        color: #888;
+        padding-top: #{100rpx};
+        text-align: center;
+    }
+
+    .settle {
+        color: #353535;
+        padding: 0 #{24rpx};
+        background: #FFFFFF;
+        margin-top: #{20rpx};
+
+        .settle-status {
+            font-size: #{32rpx};
+            padding-top: #{24rpx};
+        }
+
+        .price {
+            text-align: center;
+            line-height: 1;
+            margin-top: #{8rpx};
+            margin-bottom: #{32rpx};
+
+            .num {
+                font-size: #{60rpx};
+            }
+
+            .yuan {
+                font-size: #{28rpx};
+            }
+        }
+
+        .item-info {
+            font-size: #{28rpx};
+            border-top: #{1rpx} solid #e2e2e2;
+            padding: #{40rpx} 0;
+
+            .goods {
+                margin-top: #{24rpx};
+            }
+
+            .item-label {
+                width: #{134rpx};
+            }
+
+            .item-value {
+                margin-left: #{32rpx};
+                color: #999999
+            }
+        }
+    }
+</style>

+ 99 - 0
src/plugins/mch/mch/web-login/web-login.vue

xqd
@@ -0,0 +1,99 @@
+<template>
+    <app-layout>
+        <view class="web-login">
+            <view class="icon"></view>
+            <view class="text">即将登录网页端,是否允许登录?</view>
+            <view class="main-center">
+                <app-button @click="loginSubmit" width="560" height="80" font-size="32" background="#ff4544"
+                            color="#FFFFFF" round>确认登录
+                </app-button>
+            </view>
+            <view class="cancel" @click="navIndex">取消</view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "web-login",
+        data() {
+            return {
+                token: '',
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            this.token = options.token;
+            if (!this.token) {
+                uni.showModal({
+                    title: '提示',
+                    content: '无效的Token,请刷新页面后重新扫码登录',
+                    showCancel: false,
+                    success: function (e) {
+                        if (e.confirm) {
+                            uni.redirectTo({
+                                url: '/pages/index/index',
+                            });
+                        }
+                    }
+                });
+            }
+        },
+        methods: {
+            navIndex() {
+                uni.redirectTo({url: `/pages/index/index`});
+            },
+
+            loginSubmit: function () {
+                const self = this;
+                self.$showLoading({text: '正在处理'});
+                self.$request({
+                    url: self.$api.mch.qr_code_login,
+                    data: {
+                        token: self.token,
+                    },
+                    method: 'post'
+                }).then(info => {
+                    self.$hideLoading();
+                    uni.showModal({
+                        title: '提示',
+                        content: info.msg,
+                        showCancel: false,
+                        success: function (e) {
+                            if (e.confirm) {
+                                uni.redirectTo({url: '/pages/index/index'});
+                            }
+                        }
+                    });
+                });
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .web-login {
+        margin: #{150rpx} 0;
+        text-align: center;
+
+        .icon {
+            width: #{400rpx};
+            height: #{300rpx};
+            background-image: url("../../image/web-login.png");
+            background-repeat: no-repeat;
+            background-size: 100% auto;
+            margin: 0 auto #{100rpx};
+        }
+
+        .text {
+            margin-bottom: #{120rpx};
+            font-size: #{32rpx};
+            color: #666;
+        }
+
+        .cancel {
+            margin-top: #{60rpx};
+            font-size: #{32rpx};
+            color: #999999;
+        }
+    }
+</style>

+ 692 - 0
src/plugins/mch/shop/shop.vue

xqd
@@ -0,0 +1,692 @@
+<template>
+    <app-layout>
+        <view class="shop" :class=" fixed ? `shop-tab-` + tab:``">
+            <!-- v1 -->
+            <view class="shop-head">
+                <view class="tt-bg"></view>
+                <view class="black">
+                    <image :src="detail.store.pic_url && detail.store.pic_url.length && detail.store.pic_url[0].pic_url" class="shop-pic" lazy-load mode="aspectFill"></image>
+                </view>
+                <view class="shop-summary dir-left-nowrap cross-center" v-if="detail">
+                    <image :src="detail.store.cover_url" class="icon-pic"></image>
+                    <view class="dir-top-nowrap box-grow-1 main-center">
+                        <view class="shop-name t-omit">{{detail.store.name}}</view>
+                        <view class="box-grow-1 shop-goods">
+                            <text>商品:{{detail.goods_count}}</text>
+                            <text>已售:{{detail.order_goods_count}}</text>
+                        </view>
+                    </view>
+                    <view @click="openKfModal" class="cross-center dir-top-nowrap kf" v-if="is_service">
+                        <icon class="icon-kf" type></icon>
+                        <view>客服</view>
+                    </view>
+                </view>
+            </view>
+            <!-- v2 -->
+            <view class="cross-center main-center shop-tab">
+
+                <view class="main-center cross-center box-grow-0 shop-search" @click="goodsSearch">
+                    <icon class="icon-search" type></icon>
+                </view>
+                <view class="cross-center main-center box-grow-1" style="padding: 0 32rpx">
+                    <view @click="tabChange(1)" class="cross-center main-center box-grow-1 dir-top-nowrap">
+                        <view :style="{'color': tab === 1 ? getTheme.color : ''}">首页</view>
+                        <view v-if="tab === 1" class="shop-tab-active" :style="{'background-color': getTheme.background}"></view>
+                    </view>
+                    <view @click="tabChange(2)" class="cross-center main-center box-grow-1 dir-top-nowrap">
+                        <view :style="{'color': tab === 2 ? getTheme.color : ''}">全部</view>
+                        <view v-if="tab === 2" class="shop-tab-active" :style="{'background-color': getTheme.background}"></view>
+                    </view>
+                    <view @click="tabChange(5)" class="cross-center main-center box-grow-1 dir-top-nowrap">
+                        <view :style="{'color': tab === 5 ? getTheme.color : ''}">新品</view>
+                        <view v-if="tab === 5" class="shop-tab-active" :style="{'background-color': getTheme.background}"></view>
+                    </view>
+                    <view @click="navigateSummary" class="cross-center main-center box-grow-1 dir-top-nowrap">
+                        <view>简介</view>
+                    </view>
+                </view>
+            </view>
+
+            <!-- v3 -->
+            <block v-if="tab === 1">
+                <view class="shop-home">热销推荐</view>
+                <u-ordinary-list :reset="reset" :pagination="true" :isShowAttr="true" :previewUrl="order_preview" :submitUrl="order_submit" :list="goods_list" :theme="getTheme" :list-style="2"></u-ordinary-list>
+            </block>
+
+            <block v-if="tab === 2">
+                <view class="dir-left-nowrap shop-all">
+                    <view class="box-grow-1 dir-left-nowrap main-center cross-center" @click="navCat">
+                        <view>分类</view>
+                        <icon class="icon-cat" type></icon>
+                    </view>
+                    <view class="box-grow-1 dir-left-nowrap main-center cross-center" @click="changeStyle(1)">
+                        <view :style="{'color': sort === 1 ? getTheme.color : ''}">综合</view>
+                    </view>
+                    <view class="box-grow-1 dir-left-nowrap main-center cross-center" @click="changeStyle(4)">
+                        <view :style="{'color': sort === 4 ? getTheme.color : ''}">销量</view>
+                    </view>
+                    <view class="box-grow-1 dir-left-nowrap main-center cross-center" @click="changeStyle(3)">
+                        <view :style="{'color': sort === 3 ? getTheme.color : ''}">价格</view>
+                        <icon v-if="sort === 3 && sort_type === 1" class="icon-price-plus" :style="{'color': getTheme.color,'background-color': getTheme.background}" type></icon>
+                        <icon v-else-if="sort === 3 && sort_type === 0" class="icon-price-less" :style="{'color': getTheme.color,'background-color': getTheme.background}" type></icon>
+                        <icon v-else class="icon-price-default" type></icon>
+                    </view>
+                </view>
+                <u-ordinary-list :reset="reset" :pagination="true" :isShowAttr="true" :previewUrl="order_preview" :submitUrl="order_submit" :list="goods_list" :theme="getTheme" :list-style="2"></u-ordinary-list>
+            </block>
+
+            <block v-if="tab === 5">
+                <view v-for="(v,k) in goods_list" :key="k" v-if="v.goods_list && v.goods_list.length">
+                    <view class="cross-center main-center dir-left-nowrap shop-new">
+                        <view class="line"></view>
+                        <view class="label">{{v.label}}</view>
+                        <view class="line"></view>
+                    </view>
+                    <u-ordinary-list :reset="reset" :pagination="true" :isShowAttr="true" :previewUrl="order_preview" :submitUrl="order_submit" :list="v.goods_list" :theme="getTheme" :list-style="2"></u-ordinary-list>
+                </view>
+            </block>
+            <!-- v4 -->
+            <view v-if="shopKf">
+                <view class="act-modal show">
+                    <view class="act-modal-bg" @click="closeKfModal"></view>
+                    <view class="act-modal-pic main-center cross-center">
+                        <view class="shop-model">
+                            <image @click="closeKfModal" src="https://shop.9026.com/web/statics/image/mall/static/icon/close.png"></image>
+                            <view class="kf">联系客服</view>
+                            <view class="cross-center dir-top-nowrap">
+                                <view v-if="mch_setting.is_web_service" @click="navigateCs"
+                                      class="shop-info main-center cross-center dir-left-nowrap">
+                                    <image :src="mch_setting.web_service_pic ? mch_setting.web_service_pic : './../image/shop-contact.png'"></image>
+                                    <view>在线沟通</view>
+                                </view>
+                                <view v-if="detail.store.mobile" @click="callPhone"
+                                      class="shop-info main-center cross-center dir-left-nowrap">
+                                    <image src="https://shop.9026.com/web/statics/img/mall/mch//shop-phone.png"></image>
+                                    <view>致电商家</view>
+                                </view>
+                                <view v-if="detail.wechat" @click="copyInfo"
+                                      class="shop-info main-center cross-center dir-left-nowrap">
+                                    <image src="https://shop.9026.com/web/statics/img/mall/mch//shop-wechat.png"></image>
+                                    <view>复制微信号</view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import {mapGetters, mapState} from 'vuex';
+    import uOrdinaryList from '../../../components/page-component/u-goods-list/u-ordinary-list.vue';
+
+    export default {
+        name: "shop",
+        components: {
+            uOrdinaryList
+        },
+        computed: {
+            ...mapState({
+                userInfo: state => state.user.info,
+            }),
+            ...mapGetters('mallConfig', {
+                getTheme: 'getTheme',
+            }),
+        },
+        data() {
+            return {
+                mch_id: -1,
+                sort: 1,
+                cat_id: 0,
+                sort_type: 0,
+                page: 1,
+                load: false,
+                args: false,
+                is_service: 0,
+
+                detail: {store: {}},
+                mch_setting: {},
+
+                tab: 2,
+                shopKf: false,
+                coupon_list: [],
+                goods_list: [],
+                fixed: false,
+                order_preview: this.$api.mch.order_preview,
+                order_submit: this.$api.mch.order_submit,
+
+                attrGoods: {
+                    attrShow: 0,
+                    goods: {}
+                },
+                reset: true
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            //this.$store.dispatch('user/info');
+            this.mch_id = options.mch_id;
+            this.cat_id = options.cat_id ? options.cat_id : 0;
+            this.loadShop();
+            this.getGoods();
+            this.getOption();
+            this.addVisit();
+        },
+        onReachBottom: function () {
+            const self = this;
+            this.reset = false;
+            if (self.args || self.load) return;
+            self.load = true;
+            let page = self.page + 1;
+            self.$request({
+                url: self.$api.mch.goods,
+                data: {
+                    page: page,
+                    mch_id: self.mch_id,
+                    sort: self.sort,
+                    sort_type: self.sort_type,
+                    mch_status: 2,
+                    cat_id: self.cat_id,
+                }
+            }).then(info => {
+                if (info.code === 0) {
+                    let goods_list;
+                    if (self.sort === 5) {
+                        goods_list = self.formatList(self.goods_list, info.data.list);
+                    } else {
+                        goods_list = self.goods_list.concat(info.data.list);
+                    }
+                    [self.page, self.args, self.goods_list] = [page, info.data.list.length === 0, goods_list];
+                }
+                self.load = false;
+            });
+        },
+        // #ifdef MP
+        onShareAppMessage () {
+            return this.$shareAppMessage({
+                title: this.detail.store.name,
+                path: '/plugins/mch/shop/shop',
+                params: {
+                    mch_id: this.mch_id,
+                }
+            });
+        },
+        // #endif
+        methods: {
+            goodsSearch() {
+                uni.navigateTo({url: '/pages/search/search?mch_id=' + this.mch_id});
+            },
+            navCat() {
+                uni.navigateTo({url: '/plugins/mch/cat/cat?mch_id=' + this.mch_id});
+            },
+            navigateSummary() {
+                uni.navigateTo({url: `/plugins/mch/summary/summary?mch_id=` + this.mch_id});
+            },
+            navigateCs() {
+                uni.navigateTo({url: `/pages/web/web?url=` + this.mch_setting.web_service_url});
+            },
+            getOption() {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.setting,
+                }).then(info => {
+                    if (info.code === 0) {
+                        self.is_service = info.data.setting.is_service;
+                    }
+                })
+            },
+
+            loadShop() {
+                const self = this;
+
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.detail,
+                    data: {
+                        id: self.mch_id
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        [self.detail, self.mch_setting] = [info.data.detail, info.data.mchSetting];
+                        uni.setNavigationBarTitle({
+                            title: self.detail.store.name,
+                        });
+                    }
+                }).catch(info => {
+                    self.$hideLoading();
+                })
+            },
+
+            addVisit() {
+                const self = this;
+                self.$request({
+                    url: self.$api.mch.visit,
+                    method: "POST",
+                    data: {
+                        mch_id: self.mch_id
+                    }
+                }).then(info => {
+                })
+            },
+
+            getGoods: function () {
+                const self = this;
+                self.$showLoading();
+                self.$request({
+                    url: self.$api.mch.goods,
+                    data: {
+                        page: 1,
+                        mch_id: self.mch_id,
+                        sort: self.sort,
+                        sort_type: self.sort_type,
+                        mch_status: 2,
+                        cat_id: self.cat_id,
+                    }
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        self.goods_list = info.data.list;
+                    }
+                }).catch(info => {
+                    self.$hideLoading();
+                })
+            },
+
+            //TODO
+            changeStyle: function (sort) {
+                let old_sort = this.sort;
+                if (old_sort === 3 && sort === 3) {
+                    this.sort_type = this.sort_type ? 0 : 1;
+                }
+                this.reset = true;
+                [this.sort, this.goods_list, this.page, this.args, this.cat_id, this.goods_list] = [sort, [], 1, false, 0,[]];
+                this.getGoods();
+            },
+
+            tabChange: function (e) {
+                this.reset = true;
+                [this.sort, this.tab, this.page, this.args, this.cat_id, this.goods_list] = [e, e, 1, false, 0, []];
+                this.getGoods();
+            },
+
+            //KfModel
+            copyInfo() {
+                this.$utils.uniCopy({
+                    data: this.detail.wechat,
+                    success(){
+                        //#ifndef MP-WEIXIN
+                        uni.showToast({ title: '复制成功'});
+                        // #endif
+                    }
+                });
+            },
+
+            callPhone() {
+                uni.makePhoneCall({
+                    phoneNumber: this.detail.store.mobile
+                })
+            },
+
+            openKfModal() {
+                this.shopKf = true;
+            },
+
+            closeKfModal() {
+                this.shopKf = false;
+            },
+            formatList: function (oldArray, addArray) {
+                if (!addArray.length) {
+                    return odlArray;
+                }
+                let newList, list;
+                let end = oldArray.pop();
+                let start = addArray.shift();
+                if (end.label === start.label) {
+                    end.goods_list = end.goods_list.concat(start.goods_list);
+                    list = end;
+                } else {
+                    oldArray = oldArray.concat(end);
+                    list = start;
+                }
+                newList = oldArray.concat(list);
+                newList = newList.concat(addArray);
+                return newList;
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .shop {
+        width: 100%;
+
+        .shop-head {
+            height: #{200rpx};
+            width: 100%;
+            position: relative;
+
+            .tt-bg {
+                background: rgba(0, 0, 0, .3);
+                height: 100%;
+                width: 100%;
+                position: absolute;
+                top: 0;
+                left: 0;
+            }
+
+            .black {
+                height: 100%;
+                width: 100%;
+            }
+        }
+        .shop-pic {
+            height: 100%;
+            width: 100%;
+        }
+
+        .shop-summary {
+            position: absolute;
+            top: #{74rpx};
+            left: 0;
+            width: 100%;
+            color: #FFFFFF;
+            font-size: #{24rpx};
+
+            .icon-pic {
+                border-radius: #{8rpx};
+                height: #{80rpx};
+                width: #{80rpx};
+                margin: 0 #{24rpx};
+                display: block;
+            }
+
+            .shop-name {
+                margin-bottom: #{20rpx};
+                max-width: #{520rpx};
+            }
+
+            .shop-goods {
+                font-size: #{24rpx};
+            }
+
+            .shop-goods text:first-child {
+                margin-right: #{32rpx};
+            }
+
+            .kf {
+                margin-right: #{50rpx};
+
+                .icon-kf {
+                    height: #{40rpx};
+                    width: #{40rpx};
+                    margin-bottom: #{8rpx};
+                    background-image: url("./../image/shop-kf.png");
+                    background-repeat: no-repeat;
+                    background-size: 100% auto;
+                }
+            }
+        }
+
+        .shop-tab {
+            height: #{77rpx};
+            background: #ffffff;
+            font-size: #{28rpx};
+            color: #666666;
+            border-radius: #{16rpx};
+            position: relative;
+            top: #{-18rpx};
+            margin: 0 #{24rpx} #{-18rpx} #{24rpx};
+
+            .shop-search {
+                width: #{136rpx};
+                height: #{40rpx};
+                border-right: 1px solid #E2E2E2;
+            }
+
+            .shop-text-active {
+                color: #ff4544;
+            }
+
+            .shop-tab-active {
+                height: #{4rpx};
+                width: #{30rpx};
+                border-radius: #{2rpx};
+                position: absolute;
+                bottom: #{8rpx};
+            }
+
+            > view {
+                height: 100%;
+            }
+
+            icon {
+                height: #{48rpx};
+                width: #{48rpx};
+                display: block;
+                background-size: 100% auto;
+                background-repeat: no-repeat;
+            }
+
+            .active {
+                border-bottom: #{1rpx} solid;
+            }
+
+            .icon-search {
+                height: #{40rpx};
+                width: #{40rpx};
+                background-image: url("../image/search.png");
+            }
+
+            .icon-home {
+                background-image: url("./../image/shop-home.png");
+            }
+
+
+
+            .icon-all {
+                background-image: url("./../image/shop-all.png");
+            }
+
+
+
+            .icon-new {
+                background-image: url("./../image/shop-new.png");
+            }
+
+
+
+            .icon-summary {
+                background-image: url("./../image/shop-summary.png");
+            }
+        }
+
+        .shop-home {
+            /*height: #{80rpx};
+            line-height: #{80rpx};*/
+            line-height: 1;
+            padding: #{32rpx} #{24rpx} #{28rpx - 18rpx} #{24rpx};
+            width: 100%;
+            font-size: #{28rpx};
+            color: #353535;
+        }
+
+        .shop-all {
+            /*height: #{88rpx};*/
+            font-size: #{26rpx};
+            line-height: 1;
+            color: #353535;
+            padding: #{32rpx} #{25rpx} #{32rpx - 14rpx} #{25rpx};
+
+            .icon-cat {
+                background-repeat: no-repeat;
+                background-size: 100% 100%;
+                height: #{20rpx};
+                width: #{26rpx};
+                margin-left: #{12rpx};
+                background-image: url("./../image/shop-cat.png");
+            }
+
+            .active {
+                color: #ff4544;
+            }
+
+            .icon-price-plus {
+                background-repeat: no-repeat;
+                background-size: 100% 100%;
+                height: #{19rpx};
+                width: #{12rpx};
+                margin-left: #{12rpx};
+                background-image: url("./../image/shop-price-plus.png");
+            }
+
+            .icon-price-less {
+                background-repeat: no-repeat;
+                background-size: 100% 100%;
+                height: #{19rpx};
+                width: #{12rpx};
+                margin-left: #{12rpx};
+                background-image: url("./../image/shop-price-less.png");
+            }
+
+            .icon-price-default {
+                background-repeat: no-repeat;
+                background-size: 100% 100%;
+                height: #{19rpx};
+                width: #{12rpx};
+                margin-left: #{12rpx};
+                background-image: url("https://shop.9026.com/web/statics/image/mall/static/icon/price-sort-default.png");
+            }
+        }
+
+        .shop-new {
+            margin-top: #{40rpx};
+            margin-bottom: #{24rpx};
+
+            .line {
+                height: #{1px};
+                width: #{260rpx};
+                margin: 0 #{28rpx};
+                background: #cdcdcd;
+            }
+
+            .label {
+                font-size: #{22rpx};
+                color: #999999;
+            }
+        }
+    }
+
+    .act-modal {
+        position: fixed;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 2001;
+        transition: 200ms;
+
+        .show {
+            visibility: visible;
+            opacity: 1;
+            -webkit-animation-name: fadeIn; /*动画名称*/
+            -webkit-animation-duration: 0.25s; /*动画持续时间*/
+            -webkit-animation-iteration-count: 1; /*动画次数*/
+            -webkit-animation-delay: 0s; /*延迟时间*/
+        }
+
+        .act-modal-bg {
+            background: rgba(0, 0, 0, 0.5);
+            position: fixed;
+            left: 0;
+            top: 0;
+            width: 100%;
+            height: 100%;
+            z-index: 1;
+        }
+
+        .act-modal-pic {
+            background: rgba(0, 0, 0, 0.25);
+            position: fixed;
+            left: 0;
+            top: 0;
+            width: 100%;
+            height: 100%;
+            z-index: 1;
+        }
+    }
+
+    .shop-model {
+        position: relative;
+        color: #353535;
+        width: #{620rpx};
+        background: #ffffff;
+        border-radius: #{16rpx};
+        text-align: center;
+
+        > view:last-child {
+            margin-bottom: #{16rpx};
+        }
+
+        .kf {
+            margin: #{40rpx} 0;
+            font-size: #{32rpx};
+        }
+
+        > image {
+            position: absolute;
+            right: #{27rpx};
+            top: #{27rpx};
+            width: #{35rpx};
+            height: #{35rpx};
+        }
+
+        .shop-info {
+            height: #{80rpx};
+            width: #{360rpx};
+            margin-bottom: #{24rpx};
+            border: 1px solid #cdcdcd;
+            border-radius: #{40rpx};
+            color: #666666;
+            font-size: #{28rpx};
+        }
+
+        .shop-info image {
+            height: #{32rpx};
+            width: #{32rpx};
+            margin-right: #{16rpx};
+        }
+    }
+
+    .shop-tab-1,
+    .shop-tab-5 {
+        margin-top: #{120rpx};
+    }
+
+    .shop-tab-1 .shop-tab,
+    .shop-tab-5 .shop-tab {
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        z-index: 10;
+    }
+
+
+    .shop-tab-2 {
+        margin-top: #{95rpx};
+    }
+
+    .shop-tab-2 .shop-all {
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        z-index: 10;
+        border-bottom: #{1rpx} solid #e3e3e3;
+    }
+    .icon-default {
+        background-color: #666666;
+    }
+</style>

+ 235 - 0
src/plugins/mch/summary/summary.vue

xqd
@@ -0,0 +1,235 @@
+<template>
+    <app-layout>
+        <view class="summary-head">
+            <image class="shop-pic" :src="shop.store.pic_url && shop.store.pic_url[0].pic_url" lazy-load></image>
+            <view class="home cross-center" @click="navHome">
+                <image src="https://shop.9026.com/web/statics/img/mall/mch//arrow-left-white.png"></image>
+                <view>返回店铺首页</view>
+            </view>
+            <image class="cover-pic" :src="shop.store.cover_url" lazy-load></image>
+        </view>
+
+        <view class="summary-info">
+            <view class="summary-name">{{shop.store.name}}</view>
+            <view v-if="mchSetting.is_web_service" @click="navCs"
+                  class="summary-contact main-center cross-center dir-left-nowrap">
+                <image :src="mchSetting.web_service_pic ? mchSetting.web_service_pic : '/plugins/mch/images/summary-blue.png'"></image>
+                <view>在线沟通</view>
+            </view>
+
+            <view class="dir-left-nowrap tag" v-if="shop.store.scope">
+                <image class="box-grow-0" src="https://shop.9026.com/web/statics/img/mall/mch//summary-yw.png"></image>
+                <view>{{shop.store.scope}}</view>
+            </view>
+            <view class="dir-left-nowrap tag" v-if="shop.store.mobile">
+                <image class="box-grow-0" src="https://shop.9026.com/web/statics/img/mall/mch//summary-phone.png"></image>
+                <view class="dir-left-nowrap">
+                    <view class="max">{{shop.mobile}}</view>
+                    <view @click="callPhone" class="box-grow-0 main-center cross-center tv">拨号</view>
+                </view>
+            </view>
+            <view class="dir-left-nowrap tag" v-if="shop.store.address">
+                <image class="box-grow-0" src="https://shop.9026.com/web/statics/img/mall/mch//summary-address.png"></image>
+                <view class="dir-left-nowrap">
+                    <view class="max">{{shop.store.address}}</view>
+                    <view @click="mapPower" class="box-grow-0 main-center cross-center tv">导航
+                    </view>
+                </view>
+            </view>
+
+            <view class="dir-left-nowrap tag" v-if="shop.store.description">
+                <image class="box-grow-0" src="https://shop.9026.com/web/statics/img/mall/mch//summary-synopsis.png"></image>
+                <view>{{shop.store.description}}</view>
+            </view>
+        </view>
+
+        <view v-if="shop.store.latitude>0 && shop.store.longitude>0" class="main-center summary-end">
+            <map :longitude="shop.store.longitude" :markers="markers" :latitude="shop.store.latitude"
+                 class="map"></map>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "summary",
+        components: {},
+        data() {
+            return {
+                markers: [],
+                shop: {store: {}},
+                mchSetting: {},
+            }
+        },
+        onLoad(options) { this.$commonLoad.onload(options);
+            const self = this;
+
+            self.$showLoading();
+            self.$request({
+                url: self.$api.mch.detail,
+                data: {
+                    id: options.mch_id,
+                }
+            }).then(info => {
+                self.$hideLoading();
+                if (info.code === 0) {
+                    let shop = info.data.detail;
+                    let markers = [{
+                        iconPath: "./../image/summary-map.png",
+                        id: 0,
+                        width: 43,
+                        height: 43,
+                        longitude: shop.store.longitude,
+                        latitude: shop.store.latitude,
+                    }];
+                    [
+                        self.markers,
+                        self.shop,
+                        self.mchSetting
+                    ] = [
+                        markers,
+                        shop,
+                        info.data.mchSetting
+                    ]
+                }
+            }).catch(e => {
+                self.$hideLoading();
+            })
+        },
+        methods: {
+            navHome() {
+                uni.redirectTo({url: `/plugins/mch/shop/shop?mch_id=` + this.shop.id});
+            },
+            navCs() {
+                uni.navigateTo({url: `/pages/web/web?url=` + this.mchSetting.web_service_url});
+            },
+            callPhone() {
+                const phoneNumber = this.shop.mobile;
+                uni.makePhoneCall({
+                    phoneNumber: phoneNumber
+                })
+            },
+            mapPower() {
+                const shop = this.shop;
+                uni.openLocation({
+                    latitude: parseFloat(shop.store.latitude),
+                    longitude: parseFloat(shop.store.longitude),
+                    name: shop.store.name,
+                    address: shop.store.address,
+                });
+                openLocation
+            }
+        },
+    }
+</script>
+
+<style scoped lang="scss">
+    .summary-head {
+        height: #{200rpx};
+        width: 100%;
+        position: relative;
+
+        .shop-pic {
+            height: 100%;
+            width: 100%;
+            opacity: 0.8;
+        }
+
+        .home {
+            position: absolute;
+            top: #{55rpx};
+            left: #{0rpx};
+            background: #ff4544;
+            border-radius: 0 #{28rpx} #{28rpx} 0;
+            height: #{56rpx};
+        }
+
+        .home view {
+            color: #fff;
+            font-size: #{26rpx};
+            padding-right: #{24rpx};
+        }
+
+        .home image {
+            height: #{22rpx};
+            width: #{12rpx};
+            margin: #{12rpx};
+        }
+
+        .cover-pic {
+            border-radius: #{16rpx};
+            position: absolute;
+            top: #{130rpx};
+            left: #{305rpx};
+            height: #{140rpx};
+            width: #{140rpx};
+        }
+    }
+
+    .summary-info {
+        margin: #{100rpx} #{55rpx} 0 #{55rpx};
+
+        .summary-name {
+            text-align: center;
+            color: #353535;
+        }
+
+        .summary-contact {
+            height: #{80rpx};
+            width: #{360rpx};
+            margin: #{40rpx} auto;
+            color: #5292ed;
+            font-size: #{28rpx};
+            border-radius: #{40rpx};
+            border: #{1rpx} solid #5292ed;
+        }
+
+        .summary-contact image {
+            height: #{32rpx};
+            width: #{32rpx};
+            margin-right: #{16rpx};
+        }
+
+        .tag {
+            margin: #{15rpx} 0;
+        }
+
+        .tag > image {
+            padding-top: #{5rpx};
+            height: #{32rpx};
+            width: #{32rpx};
+        }
+
+        .tag > view {
+            margin-left: #{24rpx};
+            font-size: #{28rpx};
+            color: #353535;
+        }
+
+        .tag .max {
+            max-width: #{448rpx};
+        }
+
+        .tag .tv {
+            text-align: center;
+            display: inline-block;
+            border-radius: #{22rpx};
+            margin: 0 #{32rpx};
+            padding: 0 #{20rpx};
+            font-size: #{26rpx};
+            height: #{44rpx};
+            line-height: #{44rpx};
+            border: 1px solid #5292ed;
+            color: #5292ed;
+        }
+    }
+
+    .summary-end {
+        margin: #{36rpx} 0;
+    }
+
+    .map {
+        width: #{640rpx};
+        height: #{560rpx};
+    }
+</style>

+ 6 - 0
src/store/modules/user.js

xqd xqd
@@ -1,5 +1,6 @@
 import Vue from 'vue';
 import user from '../../core/user.js';
+import platDiff from '../../core/platDiff.js'
 
 const state = {
 	accessToken: null,
@@ -77,6 +78,11 @@ const mutations = {
 	},
 	info(state, data) {
 		state.info = data;
+		if(platDiff.route()==='/pages/sale/sale-user-center' && !state.info.salesperson_info){
+			uni.redirectTo({
+				url:'/pages/sale/sale_login/sale_login'
+			})
+		}
 	},
 	cart_nums(state, data) {
 		state.cart_nums = data;