Browse Source

银行卡绑定

xhj 2 years ago
parent
commit
a4cfe13ff8
84 changed files with 4385 additions and 229 deletions
  1. 143 0
      merchant/deliverExtend.vue
  2. 680 0
      merchant/express.vue
  3. 528 0
      merchant/index.vue
  4. 415 0
      merchant/order.vue
  5. 341 0
      merchant/refund.vue
  6. 333 0
      merchant/refundDetail.vue
  7. 280 0
      merchant/search.vue
  8. 484 0
      merchant/show - 副本.vue
  9. 485 0
      merchant/show.vue
  10. 263 0
      merchant/static/css/main.css
  11. BIN
      merchant/static/images/achievement.png
  12. BIN
      merchant/static/images/activityOrder.png
  13. BIN
      merchant/static/images/bg.png
  14. BIN
      merchant/static/images/clear.png
  15. BIN
      merchant/static/images/clerk.png
  16. BIN
      merchant/static/images/code.png
  17. BIN
      merchant/static/images/ddico0.png
  18. BIN
      merchant/static/images/default_logo.png
  19. BIN
      merchant/static/images/deliveredOrder.png
  20. BIN
      merchant/static/images/distribution.png
  21. BIN
      merchant/static/images/dlbg.png
  22. BIN
      merchant/static/images/dpico.png
  23. BIN
      merchant/static/images/drop-down.png
  24. BIN
      merchant/static/images/drop-right.png
  25. BIN
      merchant/static/images/dwico.png
  26. BIN
      merchant/static/images/dzbg.png
  27. BIN
      merchant/static/images/dzico.png
  28. BIN
      merchant/static/images/empty.png
  29. BIN
      merchant/static/images/empty_dd.png
  30. BIN
      merchant/static/images/extractionOrder.png
  31. BIN
      merchant/static/images/gou.png
  32. BIN
      merchant/static/images/icon1.png
  33. BIN
      merchant/static/images/icon10.png
  34. BIN
      merchant/static/images/icon2.png
  35. BIN
      merchant/static/images/icon3.png
  36. BIN
      merchant/static/images/icon4.png
  37. BIN
      merchant/static/images/icon5.png
  38. BIN
      merchant/static/images/icon6.png
  39. BIN
      merchant/static/images/icon7.png
  40. BIN
      merchant/static/images/icon8.png
  41. BIN
      merchant/static/images/icon9.png
  42. BIN
      merchant/static/images/img1.png
  43. BIN
      merchant/static/images/jishida.png
  44. BIN
      merchant/static/images/jishidaioc.png
  45. BIN
      merchant/static/images/kanjia.png
  46. BIN
      merchant/static/images/logo.jpg
  47. BIN
      merchant/static/images/member.png
  48. BIN
      merchant/static/images/newbornZone.png
  49. BIN
      merchant/static/images/order.png
  50. BIN
      merchant/static/images/phone.png
  51. BIN
      merchant/static/images/pingtuan.png
  52. BIN
      merchant/static/images/qiehuan.png
  53. BIN
      merchant/static/images/ranking.png
  54. BIN
      merchant/static/images/redfunt.png
  55. BIN
      merchant/static/images/refundOrder.png
  56. BIN
      merchant/static/images/rico.png
  57. BIN
      merchant/static/images/sao.png
  58. BIN
      merchant/static/images/saoma.png
  59. BIN
      merchant/static/images/seckill.png
  60. BIN
      merchant/static/images/set.png
  61. BIN
      merchant/static/images/shousuo.png
  62. BIN
      merchant/static/images/ssico.png
  63. BIN
      merchant/static/images/thico.png
  64. BIN
      merchant/static/images/title.png
  65. BIN
      merchant/static/images/tuangou.png
  66. BIN
      merchant/static/images/tuikuan.png
  67. BIN
      merchant/static/images/turnover.png
  68. BIN
      merchant/static/images/user.png
  69. BIN
      merchant/static/images/wdbg.jpg
  70. BIN
      merchant/static/images/wechat.png
  71. BIN
      merchant/static/images/xyico.png
  72. BIN
      merchant/static/images/xyico_h.png
  73. BIN
      merchant/static/images/youji.png
  74. BIN
      merchant/static/images/ziti.png
  75. 52 0
      pages.json
  76. 3 3
      pages/index/index.vue
  77. 1 1
      pages/user/user.vue
  78. 130 58
      promote/withdrawal/bindCard/bindCard.vue
  79. 86 29
      promote/withdrawal/cardList/cardList.vue
  80. 19 2
      promote/withdrawal/index/index.css
  81. 72 107
      promote/withdrawal/index/index.vue
  82. 70 29
      promote/withdrawal/myCard/myCard.vue
  83. BIN
      static/pages/images/crico1.png
  84. BIN
      static/pages/images/sfz.png

+ 143 - 0
merchant/deliverExtend.vue

@@ -0,0 +1,143 @@
+<template>
+	<view>
+		<view class="deliver">
+			<view v-for="(item, index) in deliverExtends" :key="index">
+				<view class="extends">
+					<view class="exTop dflex">
+						<span class="fahuo">发货单{{ index + 1 }}</span>
+						<span class="state">{{ item.state == 1 ? '待发货' : item.state == 2 ? '已发货' : '' }}</span>
+					</view>
+					<view class="cont dflex" v-for="(it, idx) in item.extendDTOList" :key="idx">
+						<img :src="it.pic" class="eimg" />
+						<view class="zhinfo">
+							<view class="zhtit" v-text="it.productName"></view>
+							<view class="guige">
+								<!-- <span>规格:</span> -->
+								<span v-if="it.productNumber != '' || it.productNumber != null">编码:{{ it.productNumber }}</span>
+							</view>
+						</view>
+						<view class="num">X{{ it.quantity }}</view>
+					</view>
+					<view class="deliverId dflex">
+						<span class="deliveri">发货号:{{ item.id }}</span>
+						<span class="supplierName">{{ item.supplierName }}</span>
+					</view>
+					<view v-if="item.state == 1" class="btn dflex"><view v-if="item.state == 1" @click="deliverGoods(item)">确认发货</view></view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			deliverExtends: '',
+			id: '',
+			merchantId: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.merchantId = opt.merchantId;
+		this.deliverExtend();
+	},
+
+	methods: {
+		deliverGoods(item) {
+			this.jumpUrl('express?id=' + item.orderId + '&merchantId=' + this.merchantId+'&deliverId='+item.id);
+		},
+		// 获取发货单号
+		deliverExtend() {
+			req.postRequest(
+				'/api/order/deliverExtend',
+				{
+					id: this.id
+				},
+				data => {
+					this.deliverExtends = data;
+					console.log(data);
+				}
+			);
+		}
+	}
+};
+</script>
+
+<style>
+@import './static/css/main.css';
+.extends {
+	margin: 10px 20px;
+	padding: 15px;
+	background-color: #fff;
+	border-radius: 10px;
+}
+
+.exTop {
+	justify-content: space-between;
+}
+
+.fahuo {
+	font-size: 16px;
+	/* font-weight: bold; */
+	color: #000000;
+}
+
+.state {
+	color: #ff341e;
+}
+
+.cont {
+	margin: 10px 0;
+	padding: 10px;
+	background-color: #f5f5f5;
+	align-items: center;
+}
+
+.eimg {
+	width: 40px;
+	height: 40px;
+	border-radius: 0.1rem;
+	margin-right: 0.2rem;
+	border: 0.02rem solid #e5e5e5;
+	box-sizing: border-box;
+}
+
+.guige {
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
+}
+
+.num {
+	font-size: 15px;
+}
+
+.deliverId {
+	justify-content: space-between;
+	align-items: center;
+	padding: 0 0 6px 0;
+}
+
+.deliveri {
+	color: #999;
+}
+
+.deliverId span {
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
+}
+
+.supplierName {
+	font-size: 15px;
+	color: #000000;
+}
+
+.btn {
+	border-top: 1px solid #ebebeb;
+	padding: 5px 0 0 0;
+	justify-content: flex-end;
+}
+</style>

+ 680 - 0
merchant/express.vue

@@ -0,0 +1,680 @@
+<!-- 邮寄发货 -->
+<template>
+	<view>
+		<view class="tits">收货信息</view>
+		<ul class="ddinfo">
+			<li>
+				<span>收货人</span>
+				<view v-text="order.name"></view>
+			</li>
+			<li>
+				<span>收货人电话</span>
+				<view v-text="order.phone"></view>
+			</li>
+			<li>
+				<span>收货人地址</span>
+				<view v-text="order.address"></view>
+			</li>
+		</ul>
+		<view class="tits">发货方式</view>
+		<view class="express">
+			<view class="li dflex">
+				<label class="label">发货方式</label>
+				<view class="item flex">
+					<picker class="picker active" :range="goodstype" @change="onSelect" range-key="label">
+						<view>{{ goodstype[psSwyIndex].label }}</view>
+						<image src="../merchant/static/images/rico.png" class="rico"></image>
+					</picker>
+				</view>
+			</view>
+			<block v-if="index == 2">
+				<view class="li dflex">
+					<label class="label">快递公司</label>
+					<view class="item flex">
+						<picker :class="'picker ' + (expressIndex > -1 ? 'active' : '')" @change="bindPickerExpressChange" :range="express" range-key="label">
+							<view v-if="expressIndex >= 0">{{ express[expressIndex].label }}</view>
+							<view v-else>请选择</view>
+							<image src="../merchant/static/images/rico.png" class="rico"></image>
+						</picker>
+					</view>
+				</view>
+				<view class="li dflex">
+					<label class="label">快递单号</label>
+					<view class="item flex dflex">
+						<input v-model="valueOrder" placeholder="请输入快递单号" placeholder-class="placeholder" class="ipt flex" />
+						<view class="sao" @click="toScanCode()"><image src="../merchant/static/images/sao.png"></image></view>
+					</view>
+				</view>
+			</block>
+			<block v-if="index == 4">
+				<view class="li dflex">
+					<label class="label">配送人员</label>
+					<view class="item flex dflex"><input v-model="distributionName" placeholder="请输入配送人姓名" placeholder-class="placeholder" class="ipt flex" /></view>
+				</view>
+				<view class="li dflex">
+					<label class="label">联系方式</label>
+					<view class="item flex dflex"><input v-model="distributionPhone" placeholder="请输入联系方式" placeholder-class="placeholder" class="ipt flex" /></view>
+				</view>
+			</block>
+
+			<block v-if="index == 3">
+				<view class="li dflex">
+					<label class="label">订单类型</label>
+					<view class="dflex flex radio-rr">
+						<radio-group @change="radioTypeGroup">
+							<label class="radio" v-for="(item, index) in type" :key="index">
+								<radio :value="item.value" />
+								{{ item.label }}
+							</label>
+						</radio-group>
+					</view>
+				</view>
+
+				<view class="li dflex">
+					<label class="label">需要打包</label>
+					<view class="dflex flex radio-rr">
+						<radio-group @change="radioIsGroup">
+							<label class="radio" v-for="(item, index) in is" :key="index">
+								<radio :value="item.value" />
+								{{ item.label }}
+							</label>
+						</radio-group>
+					</view>
+				</view>
+
+				<!-- 	<van-cell is-link @click="showTime = true"
+				 v-if="orderType == 2" 
+				 :value="time" 
+				 title=":" class="time" />
+				<van-popup v-model="showTime" 
+				position="bottom" 
+				:style="{ height: '50%' }" round>
+					<van-datetime-picker
+						v-model="currentDate"
+						type="datetime"
+						title="选择送达时间"
+						:min-date="minDate"
+						:max-date="maxDate"
+						@confirm="getTiem"
+						@cancel="showTime = false"
+					/>
+				</van-popup> -->
+			</block>
+
+			<view class="bot"><view class="sta-btn w" @click="showlog()">确定</view></view>
+		</view>
+		<view class="ceng" v-if="showexp"></view>
+		<view class="dialog" v-if="showexp">
+			<view class="dialog-tit">请核对信息</view>
+			<view class="pad20">
+				<view class="expressinfo">
+					发货方式:
+					<view>{{ goodstype[psSwyIndex].label }}</view>
+				</view>
+				<block v-if="index == 2">
+					<view class="expressinfo">
+						快递公司:
+						<view>{{ expressRadio }}</view>
+					</view>
+					<view class="expressinfo" v-if="index == 2">
+						快递单号:
+						<view>{{ valueOrder }}</view>
+					</view>
+				</block>
+				<block v-if="index == 3">
+					<view class="expressinfo">
+						快递公司:
+						<view>{{ expressRadio }}</view>
+					</view>
+					<view class="expressinfo">
+						订单类型:
+						<view>{{ orderType != '' ? type[orderType - 1].label : '无' }}</view>
+					</view>
+					<view class="expressinfo">
+						需要打包:
+						<view>{{ pack != '' ? is[pack].label : '无' }}</view>
+					</view>
+					<view class="expressinfo" v-if="orderType == 2">
+						送达时间:
+						<view>{{ time }}</view>
+					</view>
+				</block>
+				<block v-if="index == 4">
+					<view class="expressinfo">
+						配送人员姓名:
+						<view>{{ distributionName }}</view>
+					</view>
+					<view class="expressinfo">
+						配送人员电话:
+						<view>{{ distributionPhone }}</view>
+					</view>
+				</block>
+			</view>
+			<view class="dialog-btn dflex">
+				<view class="dia-cancel" @click="beforeClose(false)">取消</view>
+				<view class="dia-confirm" @click="beforeClose(true)">确认</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+const req = require('../utils/request');
+export default {
+	data: () => ({
+		minDate: new Date(2020, 0, 1),
+		maxDate: new Date(2025, 10, 1),
+		currentDate: new Date(),
+		pack: '',
+		psSwyIndex: 0,
+		orderType: '',
+		showexp: false,
+		showFH: false,
+		popup: false,
+		expressNo: true,
+		merchant: {},
+		express: [],
+		radio: '请选择',
+		expressRadio: '请选择',
+		valueOrder: '',
+		index: 2,
+		expressIndex: -1,
+		goodstype: [
+			{
+				label: '快递',
+				value: 2,
+				disabled: false
+			},
+			// {
+			// 	label: '同城配送',
+			// 	value: 3,
+			// 	disabled: true
+			// },
+			{
+				label: '自主配送',
+				value: 4,
+				disabled: false
+			}
+		],
+		type: [
+			{
+				label: '及时单',
+				value: '1'
+			},
+			{
+				label: '预约单',
+				value: '2'
+			}
+		],
+		is: [
+			{
+				label: '否',
+				value: '0'
+			},
+			{
+				label: '是',
+				value: '1'
+			}
+		],
+		id: '',
+		merchantId: '',
+		time: '',
+		showTime: false,
+		distributionName: '',
+		distributionPhone: '',
+		times: '',
+
+		orderId: '',
+
+		order: ''
+	}),
+	onLoad(opt) {
+		this.id = opt.id;
+		this.merchantId = opt.merchantId;
+		this.orderType = opt.orderType;
+		this.deliverId = opt.deliverId;
+
+		this.getType(1);
+		this.loadDetail();
+	},
+	methods: {
+		// 发货方式切换
+		onSelect(e) {
+			this.psSwyIndex = e.target.value;
+			this.kuidimethod(this.goodstype[this.psSwyIndex].value);
+		},
+
+		toScanCode(e) {
+			var tah = this;
+			console.log('扫描二维码>>>>');
+			uni.scanCode({
+				success: function(res) {
+					console.log('条码类型:' + res.scanType);
+					console.log('条码内容:' + res.result);
+					tah.valueOrder = res.result;
+					tah.$forceUpdate();
+				}
+			});
+		},
+
+		loadDetail() {
+			let from = {
+				id: this.id
+			};
+			req.getRequest(
+				'/api/order/detail',
+				from,
+				data => {
+					this.order = data;
+					this.isShowView = true;
+				},
+				true
+			);
+		},
+
+		// 显示发货方式弹窗
+		showPopup() {
+			this.showFH = true;
+			console.log(this.showFH);
+		},
+
+		bindPickerExpressChange(event) {
+			this.expressIndex = event.detail.value;
+			this.expressRadio = this.express[this.expressIndex].label;
+		},
+		// 得到发货方式 2快递,3同城配送,4自主配送
+		kuidimethod(index) {
+			console.log(index);
+			this.index = index;
+		},
+		onClick(name, index) {
+			// console.log( event.currentTarget.dataset)
+			// const { name } = event.currentTarget.dataset;
+			this.index = index;
+			this.radio = name;
+		},
+		// 得到快递公司
+		expressMethod(name, value) {
+			this.expressIndex = value;
+			this.expressRadio = name;
+			console.log(this.expressIndex);
+		},
+		// 获取快递单号
+		getValue(event) {
+			this.value = event.detail;
+		},
+		// 获取配送人员姓名
+		getdistributionName(event) {
+			this.distributionName = event.detail;
+		},
+		// 获取配送人员联系方式
+		getdistributionPhone(event) {
+			this.distributionPhone = event.detail;
+		},
+		// 获取订单类型
+		getorderType(event) {
+			this.orderType = event.detail;
+		},
+		// 二次确认
+		showlog() {
+			// 发货方式为2快递
+			if (this.index == 2) {
+				if (this.expressIndex < 0) {
+					req.msg('请选择快递公司');
+				} else if (this.valueOrder == '') {
+					req.msg('请输入快递单号');
+				} else {
+					this.showexp = true;
+				}
+			}
+			// 发货方式为3同城配送
+			if (this.index == 3) {
+				// 及时单
+				if (this.orderType != 0) {
+					if (this.orderType == 1) {
+						if (this.expressIndex < 0) {
+							req.msg('请选择快递公司');
+						} else if (this.pack == '') {
+							req.msg('请选择是否需要打包');
+						} else {
+							this.showexp = true;
+						}
+					}
+					// 预约单
+					if (this.orderType == 2) {
+						if (this.expressIndex < 0) {
+							req.msg('请选择快递公司');
+						} else if (this.pack == '') {
+							req.msg('请选择是否需要打包');
+						} else if (this.time == '') {
+							req.msg('请选择送达时间');
+						} else {
+							this.showexp = true;
+						}
+					}
+				} else {
+					req.msg('请选择订单类型');
+				}
+			}
+			// 自主配送
+			if (this.index == 4) {
+				if (this.distributionName == '') {
+					req.msg('请输入配送人员姓名');
+				} else if (this.distributionPhone == '') {
+					req.msg('请输入配送人员电话');
+				} else {
+					this.showexp = true;
+				}
+			}
+			// this.showexp = true
+		},
+		// 获取快递信息
+		getexpress() {
+			// this.req.getexpress({}, (data) => {
+			let express = [];
+			req.getRequest('/api/orderRefund/refundReason', {}, data => {
+				this.express = data.express;
+			});
+			if (this.index == 3) {
+				// if (this.merchant.syncEle == 1) {
+				// this.express = []
+				this.expressRadio = '请选择';
+				this.expressIndex = -1;
+				// this.express.push(data.express[21])
+				this.express = express;
+				this.expressNo = false;
+				// }
+			}
+			if (this.index == 2) {
+				// express.splice(data.express.length - 3, 3)
+				this.expressRadio = '请选择';
+				this.expressIndex = -1;
+				this.express = express;
+				this.expressNo = true;
+			}
+			// })
+		},
+		// 确认按钮的,弹窗显示隐藏
+		getType(index) {
+			this.showFH = false;
+			this.popup = false;
+			if (index == 1) {
+				this.getexpress();
+			}
+		},
+		// 传发货信息给后台
+		beforeClose(isOk) {
+			if (isOk) {
+				this.deliver();
+				// this.save();
+				setTimeout(() => {
+					this.showexp = false;
+				}, 1000);
+			} else {
+				// done() // 关闭
+				this.showexp = false;
+			}
+		},
+		// 发货信息保存
+		deliver() {
+			let param;
+			// param = {
+			// 	id: this.orderId,
+			// 	deliverId: this.id,
+			// 	express: this.expressRadio,
+			// 	expressNo: this.valueOrder
+			// };
+
+			if (this.index == 2) {
+				param = {
+					mode: this.index,
+					id: this.id,
+					expressCode: this.expressIndex,
+					express: this.expressRadio,
+					expressNo: this.value
+				};
+			}
+			if (this.index == 3) {
+				param = {
+					id: this.id,
+					expressCode: this.expressIndex,
+					express: this.expressRadio,
+					orderSendType: this.orderType,
+					isPack: this.pack,
+					mode: this.index
+				};
+				if (this.orderType == 2) {
+					param.sendTime = this.times;
+				}
+			}
+			if (this.index == 4) {
+				param = {
+					id: this.id,
+					mode: this.index,
+					deliveryUserName: this.distributionName,
+					deliveryUserPhone: this.distributionPhone
+				};
+			}
+			if (!this.deliverId) {
+			} else {
+				param.deliverId = this.deliverId;
+			}
+
+			console.log(param);
+			let that = this;
+
+			req.postRequest(
+				'/api/order/confirm',
+				param,
+				data => {
+					if (data == 1) {
+						uni.showToast({
+							title: '发货成功',
+							icon: 'none'
+						});
+						setTimeout(function() {
+							uni.navigateBack();
+						}, 1000);
+					}
+				},
+				true
+			);
+		},
+		back() {
+			// 返回上一层
+			uni.navigateBack();
+		},
+		// 时间显示
+		getTiem(value) {
+			let date = new Date(value);
+			const year = date.getFullYear();
+			const month = date.getMonth() + 1;
+			const day = date.getDate();
+			const hour = date.getHours();
+			const minute = date.getMinutes();
+			console.log(year, month, day, hour, minute);
+			this.time = year + '年' + month + '月' + day + '日' + hour + '点' + minute + '分';
+			this.times = year + '-' + month + '-' + day + ' ' + hour + ':' + minute;
+			this.showTime = false;
+			console.log(this.times);
+		}
+	}
+};
+</script>
+<style scoped>
+@import './static/css/main.css';
+.express {
+	background: #fff;
+	padding: 0 30rpx;
+}
+.express .li {
+	border-bottom: 1rpx solid #e5e5e5;
+	align-items: center;
+}
+.express .li:last-child {
+	border: none;
+}
+.label {
+	font-size: 30rpx;
+	color: #333;
+	margin-right: 20rpx;
+	padding: 30rpx 0;
+}
+.item {
+	align-items: center;
+}
+.picker {
+	position: relative;
+}
+.picker view {
+	display: inline-block;
+	width: 100%;
+	padding: 30rpx 0;
+	font-size: 30rpx;
+	color: #999;
+	text-align: right;
+	padding-right: 35rpx;
+	box-sizing: border-box;
+}
+.picker.active view {
+	color: #333;
+}
+.rico {
+	width: 15rpx;
+	height: 26rpx;
+	position: absolute;
+	right: 0;
+	top: 50%;
+	transform: translateY(-50%);
+}
+.ipt {
+	font-size: 30rpx;
+	color: #333;
+	text-align: right;
+}
+.placegolder {
+	color: #999;
+}
+.sao {
+	padding: 10rpx 10rpx 10rpx 30rpx;
+}
+.sao image {
+	width: 30rpx;
+	height: 34rpx;
+}
+.bot {
+	height: 70rpx;
+}
+.sta-btn {
+	background: #fe0419;
+	color: #fff;
+	width: 100%;
+	height: 70rpx;
+	line-height: 70rpx;
+	font-size: 30rpx;
+}
+
+.expressinfo {
+	display: flex;
+	justify-content: space-between;
+	margin-bottom: 10px;
+}
+
+.pad20 {
+	padding: 0 20px;
+}
+
+.delivertype {
+	height: 300px;
+}
+
+/*  .delivertype .radio {
+    height: 211px;
+    position: fixed;
+    overflow-y: auto;
+    width: 100%;
+  } */
+
+.delivertype .bottom {
+	width: 335px;
+	height: 50px;
+	background: linear-gradient(to left, #ff5548, #fe0419);
+	border-radius: 25px;
+	text-align: center;
+	line-height: 50px;
+	color: #ffffff;
+	font-size: 18px;
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 15px;
+	margin: 0 auto;
+}
+
+/*  .van-radio:not(:last-child) {
+    margin-right: 10px;
+  } */
+
+/* .time{font-size: 13px;} */
+.van-cell__title {
+	flex: 0.9;
+}
+.tits {
+	font-size: 28rpx;
+	color: #666;
+	padding: 20rpx 30rpx;
+}
+.ddinfo {
+	margin: 0;
+	border-radius: 0;
+}
+.ddinfo li span {
+	font-size: 30rpx;
+	color: #333;
+	margin-right: 20rpx;
+}
+.ceng {
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	background: rgba(0, 0, 0, 0.5);
+	z-index: 99;
+}
+.dialog {
+	position: fixed;
+	top: 50%;
+	transform: translateY(-50%);
+	left: 40rpx;
+	right: 40rpx;
+	background: #fff;
+	border-radius: 15rpx;
+	z-index: 100;
+}
+.dialog-tit {
+	font-size: 32rpx;
+	color: #333;
+	padding: 40rpx 0;
+	text-align: center;
+}
+.dialog-btn {
+	border-top: 1rpx solid #e5e5e5;
+	margin-top: 40rpx;
+}
+.dia-cancel {
+	width: 50%;
+	font-size: 30rpx;
+	color: #666;
+	text-align: center;
+	padding: 30rpx 0;
+	box-sizing: border-box;
+	border-right: 1rpx solid #e5e5e5;
+}
+.dia-confirm {
+	width: 50%;
+	font-size: 30rpx;
+	color: #1678ff;
+	text-align: center;
+	padding: 30rpx 0;
+}
+</style>

+ 528 - 0
merchant/index.vue

@@ -0,0 +1,528 @@
+<template>
+	<view v-if="isShowView">
+		<view class="top">
+			<!-- 背景 -->
+			<image src="../merchant/static/images/bg.png" alt class="bg" />
+			<!-- 用戶信息 -->
+			<view class="minec">
+				<image :src="merchant.logo" v-if="merchant.logo" mode="aspectFill" class="user" />
+				<image v-else src="../merchant/static/images/user.png" mode="aspectFill" class="user" />
+				<view class="mines">
+					<view class="mines_top">
+						<view class="title">{{ merchant.title }}</view>
+					</view>
+					<view class="edu">编号:{{ merchant.id }}</view>
+				</view>
+			</view>
+			<!-- 搜索 -->
+			<!-- <view class="ssbox">
+        <view class="search">
+          <image src="../../static/images/shousuo.png" class="shousuo" />
+          <input placeholder="搜索您想要找的门店" placeholder-class="placeholder" class="flex" />
+          <image src="../../static/images/saoma.png" class="saoma" @click="Scan" />
+        </view>
+      </view>-->
+			<!-- right-icon="/static/images/saoma.png" -->
+			<view class="ssbox dflex">
+				<view class="search dflex">
+					<image src="../merchant/static/images/ssico.png"></image>
+					<input placeholder="请输入订单号、客户手机号后4位、提货码" class="flex" :value="searchTitle" @input="onSearch" @confirm="confirm" confirm-type="search" />
+					<image src="../merchant/static/images/clear.png" @tap="clearInput" v-if="searchTitle != ''"></image>
+				</view>
+				<!-- <view class="sousuo" @tap="confirmSearch">搜索</view> -->
+			</view>
+		</view>
+		<view class="data">
+			<!-- 订单 -->
+			<view class="order">
+				<!-- <view url="/mine/order/order" hover-class="none" class="tits dflex"> -->
+				<view @click="toOrderList(3)" class="tits dflex">
+					<view class="flex">我的订单</view>
+					查看全部
+					<image src="../merchant/static/images/drop-right.png" class="rico"></image>
+				</view>
+				<!-- </view> -->
+				<view class="list1">
+					<view class="li" @click="toOrderList(0)">
+						<view class="cont">
+							<!-- <view class="shuliang" v-text="statistics.t3"></view> -->
+							<!-- <van-badge :content="statistics.t3"> -->
+							<image src="../merchant/static/images/deliveredOrder.png" class="orderimage" />
+							<!-- </van-badge> -->
+							<text class="dots" v-if="statistics && statistics.t4 > 0">{{ statistics.t4 }}</text>
+							<view class="start">待自提</view>
+						</view>
+					</view>
+					<view class="li" @click="toOrderList(1)">
+						<view class="cont">
+							<!-- <van-badge :content="statistics.t12"> -->
+							<image src="../merchant/static/images/activityOrder.png" class="orderimage" />
+							<!-- </van-badge> -->
+							<text class="dots" v-if="statistics && statistics.t3 > 0">{{ statistics.t3 }}</text>
+							<view class="start">待发货</view>
+						</view>
+					</view>
+					<view class="li" @click="toOrderList(2)">
+						<view class="">
+							<!-- <van-badge :content="statistics.t12"> -->
+							<image src="../merchant/static/images/ddico0.png" class="orderimage" />
+							<!-- </van-badge> -->
+							<text class="dots" v-if="statistics && statistics.t12 > 0">{{ statistics.t12 }}</text>
+							<view class="start">退款/售后</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="lists">
+			<ul class="list">
+				<li v-for="(item, index) in pageLists" :key="index">
+					<view class="ddbh dflex" @click="toOrederDel(item.id)">
+						<view class="ordid">
+							<image src="../merchant/static/images/ziti.png" class="ziti" v-if="item.mode == 1" />
+							<image src="../merchant/static/images/youji.png" class="youji" v-if="item.mode == 2" />
+							<image src="../merchant/static/images/jishida.png" class="jsd" v-if="item.mode == 3" />
+							{{ item.id }}
+						</view>
+						<view class="flex dflex right ddddd">
+							<view class="th-code red" v-if="item.mode === 1">
+								提货码:
+								<text>{{ item.code }}</text>
+							</view>
+							<image src="../merchant/static/images/jishidaioc.png" class="type" v-if="item.orderType === 5" />
+							<image src="../merchant/static/images/tuangou.png" class="type" v-if="item.orderType === 2" />
+							<image src="../merchant/static/images/pingtuan.png" class="type" v-if="item.orderType == 4" />
+							<image src="../merchant/static/images/seckill.png" class="type" v-if="item.orderType == 3" />
+							<image src="../merchant/static/images/newbornZone.png" class="type" v-if="item.orderType == 6" />
+							<image src="../merchant/static/images/kanjia.png" class="type" v-if="item.orderType == 7" />
+						</view>
+					</view>
+					<view class="lis" v-for="(pro, ind) in item.products" :key="ind" @click="toOrederDel(item.id)">
+						<image :src="pro.pic" class="cimage" />
+						<view class="zhinfo">
+							<view class="zhtit" v-text="pro.title"></view>
+
+							<view class="jiage">
+								<view class="price">
+									<span>¥</span>
+									{{ pro.salePrice }}
+								</view>
+								<view class="num">×{{ pro.quantity }}</view>
+							</view>
+						</view>
+					</view>
+					<view class="total" @click="toOrederDel(item.id)">
+						<view>共{{ item.count }}件</view>
+						<view>
+							总计:
+							<span>¥{{ item.money }}</span>
+						</view>
+					</view>
+					<view class="status">
+						<span class="ordidss flex">{{ item.stateName }}</span>
+						<view class="sta-btn" v-if="merchant.printer != 0 && (item.state == 3 || item.state == 4)" @click="orderPrinting(item.id, index)">打印小票</view>
+						<!-- <view class="sta-btn" v-if="item.state > 29 && item.state < 41 && item.state != 32" @click="jumpUrl('refundDetail?id=' + item.id)">审核</view> -->
+						<view class="sta-btn" v-if="item.state == 3" @click="deliverGoods(item.id, merchant.id, item.orderType)">确认发货</view>
+						<view class="sta-btn" v-if="item.state === 4" @click="send(item.id)">通知取件</view>
+						<view class="sta-btn" v-if="item.state === 4" @click="deliver(item.id, index)">已提货</view>
+					</view>
+				</li>
+			</ul>
+		</view>
+		<div class="datas">
+			<h3 class="tit">经营简报</h3>
+			<div class="dflex">
+				<ul>
+					<li>
+						<span>{{ statistics.dTotal ? statistics.dTotal : '0' }}/{{ statistics.yTotal ? statistics.yTotal : '0' }}</span>
+						今日订单/昨日订单
+					</li>
+					<li>
+						<span>{{ statistics.wTotal ? statistics.wTotal : '0' }}</span>
+						本周订单
+					</li>
+					<li>
+						<span>{{ statistics.mTotal ? statistics.mTotal : '0' }}</span>
+						本月订单
+					</li>
+				</ul>
+				<ul>
+					<li>
+						<span>{{ statistics.dMoney ? statistics.dMoney : '0' }}/{{ statistics.yMoney ? statistics.yMoney : '0' }}</span>
+						今日营业额/昨日营业额
+					</li>
+					<li>
+						<span>{{ statistics.wMoney ? statistics.wMoney : '0' }}</span>
+						本周营业额
+					</li>
+					<li>
+						<span>{{ statistics.mMoney ? statistics.mMoney : '0' }}</span>
+						本月营业额
+					</li>
+				</ul>
+			</div>
+		</div>
+	</view>
+</template>
+
+<script>
+const req = require('../utils/request');
+export default {
+	// inject: ['getMerchant', 'getToken'],
+	data() {
+		return {
+			searchTitle: '',
+			appId: '',
+			token: '',
+			isShowView: false,
+			statistics: {},
+			merchant: '',
+			form: {
+				page: 1,
+				limit: 100,
+				merchantId: null,
+				isToDay: false
+			},
+			isLoad: true,
+			isFrist: true,
+			pageLists: ''
+		};
+	},
+	onLoad(opt) {
+		this.getMy();
+	},
+	onShow() {
+		if (!this.isFrist) {
+			this.form.page = 1;
+			this.isLoad = true;
+			this.getOrderList();
+		}
+	},
+
+	methods: {
+		jumpUrl(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		getMy() {
+			req.getRequest('/api/user/my', {}, resp => {
+				if (resp.listShopBase && resp.listShopBase.length > 0) {
+					this.form.merchantId = resp.listShopBase[0].id;
+				} else if (resp.listMerchant && resp.listMerchant.length > 0) {
+					this.form.merchantId = resp.listMerchant[0].id;
+				} else if (resp.merchantId) {
+					this.form.merchantId = resp.merchantId;
+				}
+				this.merchantDetail();
+				this.getstatistics(resp);
+				this.getOrderList();
+			});
+		},
+
+		// 店铺详情
+		merchantDetail() {
+			let fromP = {};
+			fromP.id = this.form.merchantId;
+			req.getRequest('/api/merchant/detail', fromP, data => {
+				this.merchant = data;
+			});
+		},
+
+		// 门店统计
+		getstatistics(data) {
+			let from = {};
+			if (data.listShopBase && data.listShopBase != null && data.listShopBase.length > 0) {
+				from.shopId = data.listShopBase[0].id;
+			}
+
+			if (data.listMerchant && data.listMerchant != null && data.listMerchant.length > 0 && data.listShopBase.length < 1) {
+				from.merchantId = data.listMerchant[0].id;
+			}
+
+			req.getRequest(
+				'/api/order/statistics',
+				from,
+				data => {
+					this.statistics = data;
+					this.isShowView = true;
+				},
+				this.isFrist
+			);
+		},
+
+		// 获取订单列表
+		getOrderList() {
+			if (!this.isLoad) {
+				return false;
+			}
+			this.isLoad = false;
+			let form = this.form;
+			req.getRequest(
+				'/api/order/merchant/list',
+				form,
+				data => {
+					if (this.form.page == 1) {
+						this.pageLists = [];
+					}
+					data = data.filter(
+						ele => ele.state == 3 || ele.state == 4 || ele.state == 30 || ele.state == 31 || ele.state == 36 || ele.state == 39 || ele.state == 40 || ele.state == 36
+					);
+					this.isLoad = true;
+					if (data && data.length > 0) {
+						this.pageLists = data.slice(0, 3);
+					}
+					this.isShowView = true;
+					this.isFrist = false;
+				},
+				this.isFrist
+			);
+		},
+		// 搜索订单 获取用户输入的内容
+		onSearch(e) {
+			this.searchTitle = e.detail.value;
+		},
+		//清除输入框
+		clearInput() {
+			this.searchTitle = '';
+		},
+
+		// 搜索订单
+		confirm() {
+			let value = this.searchTitle;
+			uni.navigateTo({
+				url: 'search?searchValue=' + value + '&merchantId=' + this.merchant.id
+			});
+		},
+		// 查看订单详情
+		toOrederDel(id) {
+			this.jumpUrl('show?id=' + id + '&merchantId=' + this.merchant.id);
+		},
+		// 跳转订单列表
+		toOrderList(index) {
+			uni.navigateTo({
+				url: 'order?merchantId=' + this.merchant.id + '&tabIndex=' + index
+			});
+		},
+		// 打印
+		orderPrinting(id, index) {
+			req.getRequest(
+				'/api/merchant/printOrderInfo',
+				id,
+				data => {
+					req.msg(data.msg);
+				},
+				true
+			);
+		},
+		// 确认发货
+		deliverGoods(id, merchantId, orderType) {
+			req.postRequest(
+				'/api/order/deliverExtend',
+				{
+					id: id
+				},
+				res => {
+					if (res && res.length > 1) {
+						this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+					if (res && res.length <= 1) {
+						this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+				},
+				true
+			);
+		},
+		// 通知取件
+		send(id) {
+			req.getRequest(
+				'/api/wxmes/send',
+				{
+					orderId: id,
+					bsusinessType: 11
+				},
+				data => {
+					req.msg('通知成功');
+				},
+				true
+			);
+		},
+		// 已提货
+		deliver(id, index) {
+			req.postRequest(
+				'/api/order/confirm',
+				{
+					id: id,
+					mode: '1'
+				},
+				data => {
+					this.pageList[index].state = 6;
+					this.pageList[index].stateName = '已签收';
+				},
+				true
+			);
+		}
+	}
+};
+</script>
+<style scoped>
+@import './static/css/main.css';
+.expressinfo {
+	display: flex;
+	justify-content: space-between;
+	margin-bottom: 10px;
+}
+
+/* #main {
+		padding: 15px
+	} */
+
+.histogram {
+	margin: 0.2rem;
+	background: #fff;
+	border-radius: 7px;
+	position: relative;
+}
+
+.histogramDay {
+	position: absolute;
+	right: 15px;
+	top: 14px;
+	z-index: 1;
+}
+
+.histogramDay image {
+	width: 9px;
+	height: 6px;
+	margin: 0 0 2px 0;
+}
+
+.orderimage {
+	width: 25px;
+	height: 26px;
+	margin-bottom: 10px;
+}
+
+.rico {
+	width: 6px;
+	height: 9px;
+	margin-left: 5px;
+	margin-bottom: 2px;
+}
+
+.tits {
+	font-size: 12px;
+	color: #999;
+	align-items: center;
+	height: 40px;
+	line-height: 40px;
+	position: relative;
+	z-index: 2;
+}
+
+.tits view {
+	font-size: 14px;
+	color: #333;
+	font-weight: bold;
+}
+
+.pad20 {
+	padding: 20px;
+}
+
+.refundFalseRes {
+	text-align: right;
+}
+
+.van-button:not(:last-child) {
+	margin-right: 5px;
+}
+
+.code {
+	width: 16px;
+	margin: 0 0 0 5px;
+}
+
+.tips {
+	position: fixed;
+	background: rgba(0, 0, 0, 0.6);
+	left: 0;
+	right: 0;
+	height: 40px;
+	line-height: 40px;
+	font-size: 12px;
+	color: #fff;
+	text-align: center;
+	z-index: 50;
+	justify-content: center;
+}
+
+.wxtips {
+	flex: 0.8;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+
+.towx {
+	flex: 0.2;
+}
+
+.van-search {
+	background-color: rgba(255, 255, 255, 0) !important;
+}
+</style>
+<style>
+.loginout {
+	background: #fff;
+	width: 140rpx;
+	font-size: 24rpx;
+	height: 60rpx;
+	line-height: 60rpx;
+	border-radius: 30rpx;
+	text-align: center;
+	color: #1678ff;
+}
+.dots {
+	display: block;
+	height: 15px;
+	border-radius: 15px;
+	padding: 0 4px;
+	font-size: 12px;
+	color: #fff;
+	line-height: 15px;
+	background: #f51a1a;
+	min-width: 15px;
+	box-sizing: border-box;
+	text-align: center;
+	position: absolute;
+	top: 12px;
+	right: 36%;
+}
+
+.van-popover__action {
+	width: 100% !important;
+	height: 100% !important;
+	padding: 10px 16px !important;
+}
+
+.list1 .li .start {
+	color: #2f3440 !important;
+}
+
+.red {
+	color: #f51a1a;
+}
+
+.van-popover {
+	z-index: 1 !important;
+}
+
+.van-tabbar {
+	z-index: 2 !important;
+}
+.search input {
+	font-size: 28rpx !important;
+	color: #333;
+}
+</style>

+ 415 - 0
merchant/order.vue

@@ -0,0 +1,415 @@
+<template>
+	<view>
+		<view class="search-box">
+			<view class="ssbot dflex">
+				<view class="searchbot dflex">
+					<image src="../merchant/static/images/ssico.png"></image>
+					<input placeholder="请输入订单号、客户手机号后4位" class="flex" :value="searchTitle" @input="onSearch" @confirm="confirm" confirm-type="search" />
+					<!-- <image src="/static/images/clear.png" @tap="clearInput" v-if="searchTitle != ''"></image> -->
+					<view class="sousuo" @tap="confirm">搜索</view>
+				</view>
+			</view>
+			<!-- <span>搜索</span> -->
+		</view>
+		<view class="tab">
+			<view v-for="(item, index) in TabList" :key="index" :class="'li ' + (item.active ? 'active' : '')" @click="switchTab(index)">{{ item.label }}</view>
+		</view>
+		<view class="tabcon">
+			<block v-if="pageList && pageList.length > 0">
+			<ul class="list" v-if="tabIndex == 2">
+				<li v-for="(item, index) in pageList" :key="index" @click="jumpUrl('refundDetail?id=' + item.id)">
+					<view class="ddbh dflex" @click="toOrederDel(item.id)">
+						<view class="ordid">
+							{{ item.orderId }}
+						</view>
+					</view>
+					<view class="lis" v-for="(pro, ind) in item.productList" :key="ind">
+						<image :src="pro.image" class="cimage" />
+						<view class="zhinfo">
+							<view class="zhtit" v-text="pro.title"></view>
+							<view v-if="pro.specsList && pro.specsList.length > 0" class="guige">
+								规格:
+								<text v-for="(itemGuige, index) in pro.specsList" :key="index" class="guige" decode="true">{{ itemGuige.value }}&nbsp;</text>
+							</view>
+							<view class="jiage">
+								<view class="price">
+									<span>¥</span>
+									{{ pro.money }}
+								</view>
+								<view class="num">×{{ pro.quantity }}</view>
+							</view>
+						</view>
+					</view>
+					<view class="total">
+						<view>共{{ item.quantity }}件</view>
+						<view>
+							总计:
+							<span>¥{{ item.refundMoney }}</span>
+						</view>
+					</view>
+					<view class="status">
+						<span class="ordidss flex">{{ item.refundStateName }}</span>
+						<!-- <view class="sta-btn" v-if="item.refundState > 29 && item.refundState < 41 && item.refundState != 32">审核</view> -->
+					</view>
+				</li>
+			</ul>
+			<ul class="list" v-else>
+				<li v-for="(item, index) in pageList" :key="index">
+					<view class="ddbh dflex" @click="toOrederDel(item.id)">
+						<view class="ordid">
+							<image src="../merchant/static/images/ziti.png" class="ziti" v-if="item.mode == 1" />
+							<image src="../merchant/static/images/youji.png" class="youji" v-if="item.mode == 2" />
+							<image src="../merchant/static/images/jishida.png" class="jsd" v-if="item.mode == 3" />
+							{{ item.id }}
+						</view>
+						<view class="flex dflex right ddddd">
+							<view class="th-code red" v-if="item.mode === 1">
+								提货码:
+								<text>{{ item.code }}</text>
+							</view>
+							<image src="../merchant/static/images/jishidaioc.png" class="type" v-if="item.orderType === 5" />
+							<image src="../merchant/static/images/tuangou.png" class="type" v-if="item.orderType === 2" />
+							<image src="../merchant/static/images/pingtuan.png" class="type" v-if="item.orderType == 4" />
+							<image src="../merchant/static/images/seckill.png" class="type" v-if="item.orderType == 3" />
+							<image src="../merchant/static/images/newbornZone.png" class="type" v-if="item.orderType == 6" />
+							<image src="../merchant/static/images/kanjia.png" class="type" v-if="item.orderType == 7" />
+						</view>
+					</view>
+					<view class="lis" v-for="(pro, ind) in item.products" :key="ind" @click="toOrederDel(item.id)">
+						<image :src="pro.pic" class="cimage" />
+						<view class="zhinfo">
+							<view class="zhtit" v-text="pro.title"></view>
+							<view v-if="pro.propertiesList && pro.propertiesList.length > 0" class="guige">
+								规格:
+								<text v-for="(itemGuige, index) in pro.propertiesList" :key="index" class="guige" decode="true">{{ itemGuige.value }}&nbsp;</text>
+							</view>
+							<view class="jiage">
+								<view class="price">
+									<span>¥</span>
+									{{ pro.salePrice }}
+								</view>
+								<view class="num">×{{ pro.quantity }}</view>
+							</view>
+						</view>
+					</view>
+					<view class="total" @click="toOrederDel(item.id)">
+						<view>共{{ item.count }}件</view>
+						<view>
+							总计:
+							<span>¥{{ item.money }}</span>
+						</view>
+					</view>
+					<view class="status">
+						<span class="ordidss flex">{{ item.stateName }}</span>
+						<view class="sta-btn" v-if="merchant.printer != 0 && (item.state == 3 || item.state == 4)" @click="orderPrinting(item.id, index)">打印小票</view>
+						<!-- <view class="sta-btn" v-if="item.state > 29 && item.state < 41 && item.state != 32" @click="jumpUrl('refund?id=' + item.id)">审核</view> -->
+						<view class="sta-btn" v-if="item.state == 3" @click="deliverGoods(item.id, merchantId, item.orderType)">确认发货</view>
+						<view class="sta-btn" v-if="item.state === 4" @click="send(item.id)">通知取件</view>
+						<view class="sta-btn" v-if="item.state === 4" @click="deliver(item.id, index)">已提货</view>
+					</view>
+				</li>
+			</ul>
+			</block>
+			<view v-else class="nodata">
+				<image src="../merchant/static/images/empty.png"></image>
+				<view>暂无数据</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../utils/request');
+export default {
+	data() {
+		return {
+			TabList: [
+				{
+					label: '待提货',
+					state: 4,
+					active: false
+				},
+				{
+					label: '待发货',
+					state: 3,
+					active: false
+				},
+				{
+					label: '售后',
+					active: false
+				},
+				{
+					label: '全部',
+					active: true
+				}
+			],
+			merchant: {},
+			tabIndex: '',
+			active: 3,
+			pageList: [],
+			ishow: false,
+			id: '',
+			index: 0,
+			searchTitle: '',
+			form: {
+				page: 0,
+				limit: 10
+			},
+			isLoad: true,
+			userInfo: {},
+			type: 1,
+			merchantId: ''
+		};
+	},
+	onLoad(opt) {
+		this.active = opt.tabIndex;
+		this.merchantId = opt.merchantId;
+		this.isPrinting();
+		this.switchTab(this.active);
+	},
+	onReachBottom() {
+		this.form.page++;
+		this.getOrderlist();
+	},
+	methods: {
+		jumpUrl(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// s是否开启云打印
+		isPrinting() {
+			let fromP = {};
+			fromP.id = this.merchantId;
+			req.getRequest('/api/merchant/detail', fromP, data => {
+				this.merchant = data;
+			});
+		},
+
+		// 查看订单详情
+		toOrederDel(id) {
+			this.jumpUrl('show?id=' + id + '&merchantId=' + this.merchant.id);
+		},
+
+		// 确认发货
+		deliverGoods(id, merchantId, orderType) {
+			req.postRequest(
+				'/api/order/deliverExtend',
+				{
+					id: id
+				},
+				res => {
+					if (res && res.length > 1) {
+						this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+					if (res && res.length <= 1) {
+						this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+				},
+				true
+			);
+		},
+
+		// 打印
+		orderPrinting(id, index) {
+			req.getRequest(
+				'/api/merchant/printOrderInfo',
+				id,
+				data => {
+					req.msg(data.msg);
+				},
+				true
+			);
+		},
+
+		// 通知取件
+		send(id) {
+			req.getRequest(
+				'/api/wxmes/send',
+				{
+					orderId: id,
+					bsusinessType: 11
+				},
+				data => {
+					req.msg('通知成功');
+				},
+				true
+			);
+		},
+		// 已提货
+		deliver(id, index) {
+			req.postRequest(
+				'/api/order/confirm',
+				{
+					id: id,
+					mode: '1'
+				},
+				data => {
+					this.pageList[index].state = 6;
+					this.pageList[index].stateName = '已签收';
+				},
+				true
+			);
+		},
+
+		// 获取订单列表
+		getOrderlist() {
+			if (!this.isLoad) return false;
+			this.isLoad = false;
+			let fromP = {
+				merchantId: this.merchantId,
+				page: this.form.page,
+				limit: this.form.limit
+			};
+			let that = this;
+			if (this.tabIndex == 2) {
+				//售后
+				this.getRefundList(fromP);
+			} else {
+				fromP.state = this.TabList[this.tabIndex].state;
+				//正常其它订单
+				this.getOrderlists(fromP)
+			}
+		},
+		getRefundList(fromP){
+			req.getRequest('/api/v3/store/refund/page', fromP, data => {
+				if (data.list && data.list.length == 10) {
+					this.isLoad = true;
+				}
+				if (this.form.page > 0) {
+					data.list = this.pageList.concat(data.list);
+				}
+				this.pageList = data.list;
+			});
+		},
+		getOrderlists(fromP){
+			req.getRequest('/api/order/merchant/list', fromP, data => {
+				if (data && data.length == 10) {
+					this.isLoad = true;
+				}
+				if (this.form.page > 0) {
+					data = this.pageList.concat(data);
+				}
+				this.pageList = data;
+			});
+		},
+		// tab栏切换
+		switchTab(tabIndex) {
+			this.tabIndex = tabIndex;
+			let def = this.TabList.findIndex(it => it.active);
+			this.TabList[def].active = false;
+			this.TabList[this.tabIndex].active = true;
+			this.isLoad = true;
+			this.form.page = 1;
+			this.pageList = [];
+			this.form.state = this.TabList[this.tabIndex].state;
+			this.getOrderlist();
+		},
+		// 搜索订单 获取用户输入的内容
+		onSearch(e) {
+			console.log(e.detail.value);
+			this.searchTitle = e.detail.value;
+		},
+		//清除输入框
+		clearInput() {
+			this.searchTitle = '';
+		},
+		// 搜索订单
+		confirm() {
+			let value = this.searchTitle;
+			uni.navigateTo({
+				url: 'search?searchValue=' + value + '&merchantId=' + this.merchant.id
+			});
+		}
+	}
+};
+</script>
+<style scoped>
+@import './static/css/main.css';
+.noguige {
+	height: 15px;
+}
+
+.ssbot {
+	padding: 5px 10px 7px;
+	-webkit-box-pack: center;
+	-webkit-justify-content: center;
+	justify-content: center;
+	-webkit-box-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+}
+
+.ssbot .searchbot {
+	background: #fff;
+	height: 33px;
+	border-radius: 15px;
+	padding: 0 0 0 10px;
+	font-size: 13px;
+	color: #666;
+	width: 100%;
+	box-sizing: border-box;
+	align-items: center;
+}
+.searchbot input {
+	font-size: 28rpx !important;
+	color: #333;
+}
+
+.searchbot image {
+	width: 15px;
+	height: 15px;
+	margin-right: 6px;
+}
+
+.expressinfo {
+	display: flex;
+	justify-content: space-between;
+	margin-bottom: 10px;
+}
+
+.pad20 {
+	padding: 20px;
+}
+
+.refundFalseRes {
+	text-align: right;
+}
+
+.van-button:not(:last-child) {
+	margin-right: 5px;
+}
+
+.tab {
+	padding: 0 17px;
+	display: flex;
+	display: -webkit-flex;
+	height: 50px;
+	background: #fff;
+	line-height: 50px;
+}
+
+.tab .li {
+	font-size: 14px;
+	color: #999;
+	width: 25%;
+	text-align: center;
+	position: relative;
+}
+
+.tab .li.active {
+	color: #333;
+}
+
+.tab .li.active::after {
+	content: '';
+	display: block;
+	width: 49rpx;
+	height: 6rpx;
+	background: #0065ac !important;
+	position: absolute;
+	left: 50%;
+	transform: translateX(-50%);
+	bottom: 0;
+}
+</style>

+ 341 - 0
merchant/refund.vue

@@ -0,0 +1,341 @@
+<template>
+	<view class="refundnew">
+		<view class="van-cell">
+			<view class="vvan-tit">售后信息</view>
+			<view class="van-list">
+				<view class="li" v-for="item in refundDetail.dto" :key="item.id">
+					<image src="static/images/gou.png" class="gou"></image>
+					<view>{{ item.remarks }}:{{ item.userName }},最后状态:{{ item.updateNowValue }}</view>
+					<text>{{ item.createDate }}</text>
+				</view>
+			</view>
+		</view>
+		<view>
+			<ul class="ddinfo">
+				<li>
+					<span>退款类型:</span>
+					<view>
+						<picker v-if="refundDetail.refundState == 30 || refundDetail.refundState == 39" class="picker" :value="psSwyIndex" :range="actions" @change="onSelect" range-key="name">
+							<view>{{ actions[psSwyIndex].name }}</view>
+							<image src="static/images/rico.png" class="rico"></image>
+						</picker>
+						<view v-else :class="refundDetail.refundState == 30 || refundDetail.refundState == 39 ? 'black' : ''">{{ refundDetail.refundTypeName }}</view>
+					</view>
+				</li>
+				<li v-if="refundDetail.refundType == 2">
+					<span>退货方式:</span>
+					<view v-text="refundMethod"></view>
+				</li>
+				<li>
+					<span>退款金额:</span>
+					<view>¥ {{ refundDetail.refundMoney }}</view>
+				</li>
+				<li>
+					<span>退款原因:</span>
+					<view>{{ refundDetail.refundReasonName ? refundDetail.refundReasonName : '无理由退款' }}</view>
+				</li>
+				<li>
+					<span>退款说明:</span>
+					<view>{{ refundDetail.remarks ? refundDetail.remarks : '暂无' }}</view>
+				</li>
+
+				<li @click="refundDetail.imgUrl == '' || refundDetail.imgUrl == null ? (imgShow = false) : (imgShow = true)">
+					<span>凭证:</span>
+					<view v-text="refundDetail.imgUrl == '' || refundDetail.imgUrl == null ? '暂无凭证' : '查看'"></view>
+				</li>
+			</ul>
+			<ul class="ddinfo" v-if="refundDetail.refundMethod == 1 && refundDetail.refundState == 36">
+				<li>
+					<span>快递公司:</span>
+					<view v-text="refundDetail.express"></view>
+				</li>
+				<li>
+					<span>快递编号:</span>
+					<view v-text="refundDetail.expressNo"></view>
+				</li>
+			</ul>
+
+			<ul class="ddinfo" v-if="refundDetail.refundState != 32 && refundDetail.refundState != 35 && refundDetail.refundState <= 39" style="display: none;">
+				<li>
+					<span>审核:</span>
+					<!-- <template #right-icon>
+						<van-radio name="1">成功</van-radio>
+						<van-radio name="0">失败</van-radio>
+					</template> -->
+					<view class="dflex radio-rr">
+						<radio-group @change="radioChange">
+							<label class="radio">
+								<radio value="1" />
+								成功
+							</label>
+							<label class="radio">
+								<radio value="0" />
+								失败
+							</label>
+						</radio-group>
+					</view>
+				</li>
+				<li v-if="checkState == 0">
+					<span class="label">商家留言:</span>
+					<view class="item flex dflex"><input v-model="refundFalseRes" placeholder="请输入审核失败原因" placeholder-class="placeholder" class="ipt flex" /></view>
+				</li>
+
+				<li v-if="refundDetail.refundState == 32">
+					<span class="label">商家留言:</span>
+					<view value="" v-if="refundDetail.refundState == 32">{{ refundDetail.refundFalseRes }}</view>
+				</li>
+			</ul>
+		</view>
+
+		<view class="bot">
+			<view class="sta-btn" @click="back">返回</view>
+			<!-- <view class="sta-btn red" @click="confirm" v-if="refundDetail.refundState == 30 || refundDetail.refundState == 39">售后审核</view>
+			<view class="sta-btn" @click="confirm" v-if="refundDetail.refundState == 36">退货确认</view> -->
+		</view>
+		<!-- <view class="chufangy" v-if="refundDetail.refundState == 40">请您到后台管理页面进行退款支付操作</view> -->
+	</view>
+</template>
+<script>
+const req = require('../utils/request');
+const utils = require("../utils/util");
+export default {
+	data() {
+		return {
+			refundReason: {},
+			refundFalseRes: '',
+			refundType: '',
+			refundMethod: '',
+			action: false,
+			psSwyIndex: 0,
+			actions: [
+				{
+					name: '只退款'
+				},
+				{
+					name: '退货并退款'
+				}
+			],
+			refundTypenum: 1,//默认1只退款
+			refundDetail: {},
+			imgUrl: [],
+			imgIndex: 0,
+			imgShow: false,
+			show: false,
+			orderId: '',
+			active: 0,
+			radio: 2,
+			checkState: -1
+		};
+	},
+
+	onLoad(opt) {
+		this.orderId = opt.id;
+		console.log('id》》》》》》');
+		this.refundDataShow();
+	},
+
+	methods: {
+		// 退款类型切换
+		onSelect(e) {
+			this.psSwyIndex = e.target.value;
+			var name = this.actions[this.psSwyIndex].name;
+			if (name == '只退款') {
+				this.refundTypenum = 1;
+			} else if (name == '退货并退款') {
+				this.refundTypenum = 2;
+			}
+			this.refundDetail.refundTypeName = name;
+			console.log(this.refundTypenum);
+		},
+		// 图片切换下标
+		imgonChange(index) {
+			this.imgIndex = index;
+		},
+		// 售后信息详情
+		refundDataShow() {
+			req.getRequest(
+				'/api/orderRefund/refundDataShow',
+				{
+					orderId: this.orderId
+				},
+				res => {
+					if (res.refundMethod == 1) {
+						this.refundMethod = '邮寄';
+					} else if (res.refundMethod == 2) {
+						this.refundMethod = '送回门店';
+					} else if (res.refundMethod == 3) {
+						this.refundMethod = '货物拒收';
+					}
+					// res.dto.forEach(it => {
+					// 	const pattern = /[`~!@#$^&*()=|{}':;',\\\[\]\.<>\/?~!@#¥……&*()——|{}【】';:""' + - - _ % 。,、?\s]/g;
+					// 	it.userName = it.userName.replace(pattern, '');
+					// });
+					this.refundDetail = res;
+					if (res.imgUrl) {
+						this.imgUrl = res.imgUrl.split(',');
+					}
+					console.log(res.dto.length);
+					this.active = res.dto.length - 1;
+				},
+				true
+			);
+		},
+		// 二次确认框
+		confirm() {
+			console.log(this.checkState);
+			if (this.checkState == -1) {
+				req.msg('请您选择审核成功或审核失败');
+			} else {
+				this.showDialog();
+			}
+		},
+
+		showDialog() {
+			var tha=this;
+			var msg = '';
+			if (this.refundDetail.refundState == 40 && this.checkState == 1) {
+				msg = '是否确认退款?';
+			} else if (this.refundDetail.refundState == 40 && this.checkState == 0) {
+				msg = '您确定拒绝退款?';
+			} else if (this.checkState == 0 && (this.refundDetail.refundState == 39 || this.refundDetail.refundState == 30)) {
+				msg = '您确认要拒绝客户的售后审核吗?';
+			} else if (this.checkState == 1 && this.refundDetail.refundState != 40) {
+				msg = '请确认是否发货,发货后的售后就让客户先退货?';
+			} else if (this.refundDetail.refundState == 36 && this.checkState == 0) {
+				msg = '您确认客户退回的商品不能入库,您要结束本次售后服务?';
+			}
+			uni.showModal({
+				title: '提示',
+				content: msg,
+				success(res) {
+					if (res.confirm) {
+						// 售后申请
+						if (tha.refundDetail.refundState == 39 || tha.refundDetail.refundState == 30) {
+							console.log('您确认要拒绝客户的售后审核吗?');
+							tha.applyRefund();
+						}
+						// 退款支付
+						if (tha.refundDetail.refundState == 40) {
+							req.msg('请您到后台管理页面进行最后一步退款操作');
+						}
+						//  退货中
+						if (tha.refundDetail.refundState == 36) {
+							tha.goodRefund();
+						}
+					} else if (res.cancel) {
+						
+					}
+				}
+			});
+		},
+
+		back() {
+			uni.navigateBack(); // 返回上一层
+		},
+
+		radioChange: function(evt) {
+			this.checkState = evt.detail.value;
+		},
+
+		applyRefund() {
+			if (this.checkState == 1) {
+				this.refundFalseRes = '';
+			}
+			if (this.checkState == '') {
+				req.msg('请您选择审核成功或审核失败');
+			}
+			let dto = {
+				id: this.refundDetail.id,
+				orderId: this.orderId,
+				checkState: this.checkState,
+				refundType: this.refundTypenum
+			};
+			if (this.checkState == 0) {
+				dto.refundFalseRes = this.refundFalseRes;
+			}
+			//+ JSON.stringify(dto)
+			req.putRequestJson('/api/orderRefund/apply?'+utils.convertUrlObj(dto), dto, res => {
+				req.msg('操作成功');
+				this.refundDataShow();
+				console.log(res);
+			});
+		},
+		goodRefund() {
+			if (this.checkState == 1) {
+				this.refundFalseRes = '';
+			}
+			let dto = {
+				id: this.refundDetail.id,
+				orderId: this.orderId,
+				checkState: this.checkState,
+				refundType: this.refundTypenum
+			};
+			if (dto.checkState == '') {
+				req.msg('请您选择审核成功或审核失败');
+			}
+			if (this.checkState == 0) {
+				dto.refundFalseRes = this.refundFalseRes;
+			}
+			//+ JSON.stringify(dto)
+			req.putRequestJson('/api/orderRefund/goodRefund?'+utils.convertUrlObj(dto), dto, res => {
+				req.msg('操作成功');
+				this.refundDataShow();
+				console.log(res);
+			});
+		}
+	}
+};
+</script>
+
+<style scoped>
+@import './static/css/main.css';
+.view:not(:last-child) {
+	margin-right: 10px;
+}
+
+.van-radio:not(:last-child) {
+	margin-right: 10px;
+}
+.refundnew {
+	padding: 0 0 70px 0;
+}
+.black {
+	color: #000000;
+}
+.chufangy {
+	position: fixed;
+	background: rgba(247, 3, 3, 0.6);
+	left: 0;
+	right: 0;
+	bottom: 50px;
+	height: 30px;
+	line-height: 30px;
+	font-size: 12px;
+	color: #fff;
+	text-align: center;
+	z-index: 50;
+}
+.ddinfo {
+	margin: 0;
+	border-radius: 0;
+}
+.ddinfo li:last-child {
+	border-bottom: 1px solid #eeeeee;
+}
+.sta-btn {
+	padding: 0 6px;
+	border-color: #fe0419;
+	/* background: #FE0419; */
+	border-radius: 12px;
+	text-align: center;
+	line-height: 25px;
+	font-size: 11px;
+	color: #fe0419;
+	margin-left: 5px;
+}
+
+.sta-btn.red {
+	color: #fff;
+	background: #fe0419;
+}
+</style>

+ 333 - 0
merchant/refundDetail.vue

@@ -0,0 +1,333 @@
+<template>
+	<view style="padding-bottom: 70px;">
+		<view class="box">
+			<view class="tits">商品信息</view>
+			<view class="list product">
+				<view class="lis ddflex" v-for="(pro, index) in refundDetail.productList" :key="index">
+					<image :src="pro.image" mode="aspectFill" class="cimage"></image>
+					<view class="zhinfo fflex">
+						<view class="zhtit">{{pro.title}}</view>
+						<view v-if="pro.specsList && pro.specsList.length > 0" class="guige">
+							规格:
+							<text v-for="(itemGuige, index) in pro.specsList" :key="index" class="guige" decode="true">{{ itemGuige.value }}&nbsp;</text>
+						</view>
+						<view class="jiage">
+							<view class="price">
+								<span>¥</span>
+								{{ pro.money }}
+							</view>
+							<view class="num">×{{ pro.quantity }}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="tits">售后信息</view>
+			<view class="refund-list">
+				<view class="li ddflex">
+					<view class="label">订单号</view>
+					<view class="li-r li-color fflex">{{refundDetail.orderId}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">申请售后时间</view>
+					<view class="li-r fflex">{{refundDetail.createdDate}}</view>
+				</view>
+				<!-- <view class="li ddflex">
+					<view class="label">发货单号</view>
+					<view class="li-r fflex">{{refundDetail.deliverId}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">退款单号</view>
+					<view class="li-r fflex">{{refundDetail.id}}</view>
+				</view> -->
+				<view class="li ddflex">
+					<view class="label">退款类型</view>
+					<view class="li-r fflex">{{refundDetail.refundType == 1 ? '只退款' : '退货并退款'}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">退款金额</view>
+					<view class="li-r li-red fflex">¥{{refundDetail.refundMoney}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">退款状态</view>
+					<view class="li-r fflex">{{refundDetail.refundStateName}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">售后原因</view>
+					<view class="li-r fflex">{{refundDetail.refundReasonName ? refundDetail.refundReasonName : '无理由退款'}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">备注</view>
+					<view class="li-r fflex">{{refundDetail.remarks ? refundDetail.remarks : '暂无'}}</view>
+				</view>
+				<view class="li" v-if="refundDetail.imgUrl&&refundDetail.imgUrl.length>0">
+					<view class="label">售后凭证</view>
+					<view class="imgbox">
+						<image :src="it" mode="aspectFill" v-for="(it,index) in refundDetail.imgUrl" :key="index" @click="preview(index)"></image>
+					</view>
+				</view>
+				<view class="li ddflex" v-if="refundDetail.refundFalseRes">
+					<view class="label">商家留言</view>
+					<view class="li-r fflex">{{refundDetail.refundFalseRes}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="box" v-if="refundDetail.express.express">
+			<view class="tits">物流信息</view>
+			<view class="refund-list">
+				<view class="li ddflex">
+					<view class="label">快递公司</view>
+					<view class="li-r fflex">{{refundDetail.express.express}}</view>
+				</view>
+				<view class="li ddflex">
+					<view class="label">快递编号</view>
+					<view class="li-r fflex">{{refundDetail.express.expressNo}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="bot">
+			<view class="sta-btn" @click="back">返回</view>
+			<!-- <view class="sta-btn red" @click="showPop(0)" v-if="refundDetail.refundState == 30 || refundDetail.refundState == 39">售后审核</view>
+			<view class="sta-btn" @click="showPop(1)" v-if="refundDetail.refundState == 36">退货确认</view> -->
+		</view>
+		<view class="chufangy" v-if="refundDetail.refundState == 40">请您到后台管理页面进行退款支付操作</view>
+		
+		<view class="ceng" v-if="isShowPop" @click="hidePop"></view>
+		<view class="popup" v-if="isShowPop">
+			<view class="pop-lis ddflex">
+				<view class="pop-tit">售后类型</view>
+				<view class="pop-type ddflex fflex">
+					<view :class="'lis ddflex' + (psSwyIndex == index+1 ? ' active':'')" v-for="(item,index) in actions" :key="index" @click="onSelect(index)"><image :src="'static/images/' + (psSwyIndex == index+1 ? 'xyico_h.png' : 'xyico.png')"></image>{{item.name}}</view>
+				</view>
+			</view>
+			<view class="pop-lis ddflex">
+				<view class="pop-tit">退款金额<text>*实付金额</text></view>
+				<view class="pop-money fflex">¥{{refundDetail.refundMoney}}</view>
+			</view>
+			<view class="pop-lis ddflex">
+				<view class="pop-tit">审核</view>
+				<view class="pop-type ddflex fflex">
+					<view :class="'lis ddflex' + (checkState == 0 ? ' active':'')" @click="checkStates(0)"><image :src="'static/images/' + (checkState == 0 ? 'xyico_h.png' : 'xyico.png')"></image>拒绝</view>
+					<view :class="'lis ddflex' + (checkState == 1 ? ' active':'')" @click="checkStates(1)"><image :src="'static/images/' + (checkState == 1 ? 'xyico_h.png' : 'xyico.png')"></image>通过</view>
+				</view>
+			</view>
+			<textarea v-model="refundFalseRes" placeholder="请输入审核失败原因" placeholder-class="placeholder" class="reason" v-if="checkState == 0"></textarea>
+			<view class="pop-btn ddflex">
+				<view class="pop-cancel" @click="hidePop">取消</view>
+				<view class="pop-confirm" @click="confirm">{{popType == 0 ? '审核' : '退货'}}确认</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../utils/request');
+const utils = require("../utils/util");
+export default {
+	data() {
+		return {
+			refundReason: {},
+			refundFalseRes: '',
+			refundType: '',
+			refundMethod: '',
+			action: false,
+			psSwyIndex: 0,
+			actions: [
+				{
+					name: '只退款'
+				},
+				{
+					name: '退货并退款'
+				}
+			],
+			refundTypenum: 1,//默认1只退款
+			refundDetail: {},
+			imgUrl: [],
+			imgIndex: 0,
+			imgShow: false,
+			show: false,
+			refundId: '',
+			active: 0,
+			radio: 2,
+			checkState: 1,
+			isShowPop: false,
+			popType: 0
+		};
+	},
+
+	onLoad(opt) {
+		this.refundId = opt.id;
+		console.log('id》》》》》》');
+		this.refundDataShow();
+	},
+
+	methods: {
+		// 退款类型切换
+		onSelect(index) {
+			if(this.refundDetail.refundState == 36) return false;
+			this.psSwyIndex = index + 1;
+			this.refundDetail.refundType = index + 1
+		},
+		// 图片切换下标
+		imgonChange(index) {
+			this.imgIndex = index;
+		},
+		showPop(index){
+			this.isShowPop = true
+			this.popType = index
+		},
+		hidePop(){
+			this.isShowPop = false
+		},
+		checkStates(index){
+			this.checkState = index
+		},
+		preview(index){
+			uni.previewImage({
+			  current: index,//点击显示的图片
+			  urls: this.refundDetail.imgUrl,//全部图片
+			})
+		},
+		// 售后信息详情
+		refundDataShow() {
+			req.getRequest(
+				'/api/v3/store/refund/detail',
+				{
+					id: this.refundId
+				},
+				res => {
+					if (res.refundMethod == 1) {
+						this.refundMethod = '邮寄';
+					} else if (res.refundMethod == 2) {
+						this.refundMethod = '送回门店';
+					} else if (res.refundMethod == 3) {
+						this.refundMethod = '货物拒收';
+					}
+					// res.dto.forEach(it => {
+					// 	const pattern = /[`~!@#$^&*()=|{}':;',\\\[\]\.<>\/?~!@#¥……&*()——|{}【】';:""' + - - _ % 。,、?\s]/g;
+					// 	it.userName = it.userName.replace(pattern, '');
+					// });
+					this.psSwyIndex = res.refundType
+					this.refundDetail = res;
+					if (res.imgUrl) {
+						res.imgUrl = res.imgUrl.split(',');
+					}
+					// console.log(res.dto.length);
+					// this.active = res.dto.length - 1;
+				},
+				true
+			);
+		},
+		// 二次确认框
+		confirm() {
+			console.log(this.checkState);
+			if (this.checkState == -1) {
+				req.msg('请您选择审核成功或审核失败');
+			} else {
+				this.showDialog();
+			}
+		},
+
+		showDialog() {
+			var tha=this;
+			var msg = '';
+			if (this.refundDetail.refundState == 40 && this.checkState == 1) {
+				msg = '是否确认退款?';
+			} else if (this.refundDetail.refundState == 40 && this.checkState == 0) {
+				msg = '您确定拒绝退款?';
+			} else if (this.checkState == 0 && (this.refundDetail.refundState == 39 || this.refundDetail.refundState == 30)) {
+				msg = '您确认要拒绝客户的售后审核吗?';
+			} else if (this.checkState == 1 && this.refundDetail.refundState != 40) {
+				msg = '请确认是否发货,发货后的售后就让客户先退货?';
+			} else if (this.refundDetail.refundState == 36 && this.checkState == 0) {
+				msg = '您确认客户退回的商品不能入库,您要结束本次售后服务?';
+			}
+			uni.showModal({
+				title: '提示',
+				content: msg,
+				success(res) {
+					if (res.confirm) {
+						// 售后申请
+						if (tha.refundDetail.refundState == 39 || tha.refundDetail.refundState == 30) {
+							console.log('您确认要拒绝客户的售后审核吗?');
+							tha.applyRefund();
+						}
+						// 退款支付
+						if (tha.refundDetail.refundState == 40) {
+							req.msg('请您到后台管理页面进行最后一步退款操作');
+						}
+						//  退货中
+						if (tha.refundDetail.refundState == 36) {
+							tha.goodRefund();
+						}
+					} else if (res.cancel) {
+						
+					}
+				}
+			});
+		},
+
+		back() {
+			uni.navigateBack(); // 返回上一层
+		},
+
+		radioChange: function(evt) {
+			this.checkState = evt.detail.value;
+		},
+
+		applyRefund() {
+			if (this.checkState == 1) {
+				this.refundFalseRes = '';
+			}
+			// if (this.checkState == '') {
+			// 	req.msg('请您选择审核成功或审核失败');
+			// }
+			let dto = {
+				id: this.refundDetail.id,
+				orderId: this.refundDetail.orderId,
+				checkState: this.checkState,
+				refundType: this.psSwyIndex
+			};
+			if (this.checkState == 0) {
+				dto.refundFalseRes = this.refundFalseRes;
+			}
+			//+ JSON.stringify(dto)
+			req.putRequestJson('/api/orderRefund/apply?'+utils.convertUrlObj(dto), dto, res => {
+				req.msg('操作成功');
+				this.hidePop()
+				this.refundDataShow();
+				console.log(res);
+			});
+		},
+		goodRefund() {
+			if (this.checkState == 1) {
+				this.refundFalseRes = '';
+			}
+			let dto = {
+				id: this.refundDetail.id,
+				orderId: this.refundDetail.orderId,
+				checkState: this.checkState,
+				refundType: this.psSwyIndex
+			};
+			// if (dto.checkState == '') {
+			// 	req.msg('请您选择审核成功或审核失败');
+			// }
+			if (this.checkState == 0) {
+				dto.refundFalseRes = this.refundFalseRes;
+			}
+			//+ JSON.stringify(dto)
+			req.putRequestJson('/api/orderRefund/goodRefund?'+utils.convertUrlObj(dto), dto, res => {
+				req.msg('操作成功');
+				this.hidePop()
+				this.refundDataShow();
+				console.log(res);
+			});
+		}
+	}
+};
+</script>
+
+<style scoped>
+@import './static/css/main.css';
+</style>

+ 280 - 0
merchant/search.vue

@@ -0,0 +1,280 @@
+<template>
+	<view>
+		<view class="search-box">
+			<view class="ssbot dflex">
+				<view class="searchbot dflex">
+					<image src="../merchant/static/images/ssico.png"></image>
+					<input placeholder="请输入订单号、客户手机号后4位" class="flex" :value="searchTitle" @input="onSearch" @confirm="confirm" confirm-type="search" />
+					<!-- <image src="/static/images/clear.png" @tap="clearInput" v-if="searchTitle != ''"></image> -->
+					<view class="sousuo" @click="searchClick()">搜索</view>
+				</view>
+			</view>
+			<!-- <span>搜索</span> -->
+		</view>
+		<!-- <view class="nodata" v-if="ishow">
+			<image src="/static/images/empty_dd.png" />
+			<view>还没有订单哦</view>
+		</view> -->
+		<ul class="list" v-if="pageList && pageList.length > 0">
+				<li v-for="(item, index) in pageList" :key="index">
+					<view class="ddbh dflex" @click="toOrederDel(item.id)">
+						<view class="ordid">
+							<image src="../merchant/static/images/ziti.png" class="ziti" v-if="item.mode == 1" />
+							<image src="../merchant/static/images/youji.png" class="youji" v-if="item.mode == 2" />
+							<image src="../merchant/static/images/jishida.png" class="jsd" v-if="item.mode == 3" />
+							{{ item.id }}
+						</view>
+						<view class="flex dflex right ddddd">
+							<view class="th-code red" v-if="item.mode === 1">
+								提货码:
+								<text>{{ item.code }}</text>
+							</view>
+							<image src="../merchant/static/images/jishidaioc.png" class="type" v-if="item.orderType === 5" />
+							<image src="../merchant/static/images/tuangou.png" class="type" v-if="item.orderType === 2" />
+							<image src="../merchant/static/images/pingtuan.png" class="type" v-if="item.orderType == 4" />
+							<image src="../merchant/static/images/seckill.png" class="type" v-if="item.orderType == 3" />
+							<image src="../merchant/static/images/newbornZone.png" class="type" v-if="item.orderType == 6" />
+							<image src="../merchant/static/images/kanjia.png" class="type" v-if="item.orderType == 7" />
+						</view>
+					</view>
+					<view class="lis" v-for="(pro, ind) in item.products" :key="ind" @click="toOrederDel(item.id)">
+						<image :src="pro.pic" class="cimage" />
+						<view class="zhinfo">
+							<view class="zhtit" v-text="pro.title"></view>
+
+							<view class="jiage">
+								<view class="price">
+									<span>¥</span>
+									{{ pro.salePrice }}
+								</view>
+								<view class="num">×{{ pro.quantity }}</view>
+							</view>
+						</view>
+					</view>
+					<view class="total" @click="toOrederDel(item.id)">
+						<view>共{{ item.count }}件</view>
+						<view>
+							总计:
+							<span>¥{{ item.money }}</span>
+						</view>
+					</view>
+					<view class="status">
+						<span class="ordidss flex">{{ item.stateName }}</span>
+						<view class="sta-btn" v-if="merchant.printer != 0 && (item.state == 3 || item.state == 4)" @click="orderPrinting(item.id, index)">打印小票</view>
+						<view class="sta-btn" v-if="item.state > 29 && item.state < 41 && item.state != 32" @click="jumpUrl('refund?id=' + item.id)">审核</view>
+						<view class="sta-btn" v-if="item.state == 3" @click="deliverGoods(item.id, merchantId, item.orderType)">确认发货</view>
+						<view class="sta-btn" v-if="item.state === 4" @click="send(item.id)">通知取件</view>
+						<view class="sta-btn" v-if="item.state === 4" @click="deliver(item.id, index)">已提货</view>
+					</view>
+				</li>
+
+			</ul>
+		<view v-else class="nodata">
+			<image src="../merchant/static/images/empty.png"></image>
+			<view>暂无数据</view>
+		</view>
+	</view>
+</template>
+<script>
+// import cache from '../datas/cache'
+const req = require('../utils/request');
+export default {
+	data: () => ({
+		pageList: [],
+		searchTitle: '',
+		ishow: false,
+		params: {
+			page: 0,
+			limit: 10
+		},
+		merchant: {},
+		userInfo: {},
+		isLoad: true,
+		merchantId: ''
+	}),
+	onLoad(opt) {
+		this.userInfo = req.getStorage('userInfo');
+		this.searchTitle = opt.searchValue;
+		this.merchantId = opt.merchantId;
+		this.isPrinting();
+		this.confirm(true);
+	},
+	onShow() {},
+	onReachBottom() {
+		this.params.page++;
+		this.confirm(false);
+	},
+	methods: {
+		jumpUrl(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// s是否开启云打印
+		isPrinting() {
+			let fromP = {};
+			fromP.id = this.merchantId;
+			req.getRequest('/api/merchant/detail', fromP, data => {
+				this.merchant = data;
+			});
+		},
+		//是否为自己发货
+		isMyDeliver(item) {
+			return item.supplierId == this.userInfo.supplierId;
+		},
+
+		// 搜索订单 获取用户输入的内容
+		onSearch(e) {
+			this.searchTitle = e.detail.value;
+			this.isLoad = true;
+			console.log(this.searchTitle);
+		},
+		// 查看订单详情
+		toOrederDel(id) {
+			this.jumpUrl('show?id=' + id+ '&merchantId=' + this.merchant.id);
+		},
+
+		searchClick() {
+			this.isLoad = true;
+			this.params.page = 0;
+			this.confirm(true);
+		},
+		// 搜索订单
+		confirm(isShowLoad) {
+			let that = this;
+			let value = this.searchTitle;
+			let form = this.params;
+
+			form.search = value;
+			form.merchantId = this.merchantId;
+			if (!this.isLoad) return false;
+			this.isLoad = false;
+			req.getRequest(
+				'/api/order/merchant/list',
+				form,
+				data => {
+					if (data && data.length == 10) {
+						this.isLoad = true;
+					}
+					if (that.params.page > 0) {
+						data = that.pageList.concat(data);
+					}
+					this.pageList = data;
+				},
+				isShowLoad
+			);
+		},
+		//清除输入框
+		clearInput() {
+			this.searchTitle = '';
+		},
+
+		// 查看订单详情
+		toOrederDel(id) {
+			this.jumpUrl('show?id=' + id+ '&merchantId=' + this.merchant.id);
+		},
+
+		// 打印
+		orderPrinting(id, index) {
+			req.getRequest(
+				'/api/merchant/printOrderInfo',
+				id,
+				data => {
+					req.msg(data.msg);
+				},
+				true
+			);
+		},
+
+		// 确认发货
+		deliverGoods(id, merchantId, orderType) {
+			req.postRequest(
+				'/api/order/deliverExtend',
+				{
+					id: id
+				},
+				res => {
+					if (res && res.length > 1) {
+						this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+					if (res && res.length <= 1) {
+						this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+				},
+				true
+			);
+		},
+		// 通知取件
+		send(id) {
+			req.getRequest(
+				'/api/wxmes/send',
+				{
+					orderId: id,
+					bsusinessType: 11
+				},
+				data => {
+					req.msg('通知成功');
+				},
+				true
+			);
+		},
+		// 已提货
+		deliver(id, index) {
+			req.postRequest(
+				'/api/order/confirm',
+				{
+					id: id,
+					mode: '1'
+				},
+				data => {
+					this.pageList[index].state = 6;
+					this.pageList[index].stateName = '已签收';
+				},
+				true
+			);
+		}
+	}
+};
+</script>
+<style scoped>
+@import './static/css/main.css';
+.ssbot {
+	padding: 5px 10px 7px;
+	-webkit-box-pack: center;
+	-webkit-justify-content: center;
+	justify-content: center;
+	-webkit-box-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+}
+
+.ssbot .searchbot {
+	background: #fff;
+	height: 33px;
+	border-radius: 15px;
+	padding: 0 0 0 10px;
+	font-size: 13px;
+	color: #666;
+	width: 100%;
+	box-sizing: border-box;
+	align-items: center;
+}
+.searchbot input {
+	font-size: 28rpx !important;
+	color: #333;
+}
+
+.searchbot image {
+	width: 15px;
+	height: 15px;
+	margin-right: 6px;
+}
+
+.van-button:not(:last-child) {
+	margin-right: 5px;
+}
+
+.list {
+	padding: 0.2rem 0.2rem 0;
+}
+</style>

+ 484 - 0
merchant/show - 副本.vue

@@ -0,0 +1,484 @@
+<template>
+	<view>
+		<view class="show">
+			<!-- 售后 -->
+			<view @click="jumpUrl('refund?id=' + id)" v-if="state >= 30">
+				<view class="examine">
+					<view class="cont dflex">
+						<view v-if="(state == 39 && orderRefund.refundType == 1) || (state == 40 && orderRefund.refundType == 1) || state == 30 || state == 31">
+							<view style="font-size: 14px; color: #fe0419">客户提交了退款申请,退款处理中</view>
+							<view style="font-size: 12px; color: #999999">{{ orderRefund.createDate }}</view>
+						</view>
+						<view v-if="(state == 41 && orderRefund.refundType == 1) || (state == 35 && orderRefund.refundType == 2)">
+							<view style="font-size: 14px; color: #fe0419">
+								客户提交了退款审核{{ state == 41 && orderRefund.refundType == 1 ? ',退款处理中' : ',等待用户寄货中' }}
+							</view>
+							<view style="font-size: 12px; color: #999999">
+								{{ state == 41 && orderRefund.refundType == 1 ? orderRefund.refundReviewTime : orderRefund.refundGoodReviewTime }}
+							</view>
+						</view>
+						<view v-if="state == 36 && orderRefund.refundType == 2 && orderRefund.refundMethod == 2">
+							<view style="font-size: 14px; color: #fe0419">等待客户送回门店</view>
+							<view style="font-size: 12px; color: #999999">
+								{{ state == 41 && orderRefund.refundType == 1 ? orderRefund.refundReviewTime : orderRefund.refundGoodReviewTime }}
+							</view>
+						</view>
+						<template v-if="orderRefund.refundType == 1">
+							<view v-if="state == 32">
+								<view style="font-size: 14px; color: #fe0419">审核失败</view>
+								<view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
+							</view>
+						</template>
+						<template v-if="orderRefund.refundType == 2">
+							<view v-if="state == 32">
+								<view style="font-size: 14px; color: #fe0419">审核失败</view>
+								<view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
+							</view>
+							<view v-if="state == 36 && (orderRefund.refundMethod == 1 || orderRefund.refundMethod == 3)">
+								<view style="font-size: 14px; color: #fe0419">
+									客户已退货
+									<template v-if="orderRefund.refundMethod == 1">
+										,{{ orderRefund.express }}{{ orderRefund.expressNo }}
+									</template>
+								</view>
+								<view style="font-size: 12px; color: #999999">
+									{{ orderRefund.refundMethod == 1 ? orderRefund.expressTime : orderRefund.refundGoodReviewTime }}
+								</view>
+							</view>
+							<view v-if="state == 40 || state == 39 || state == 41">
+								<view style="font-size: 14px; color: #fe0419">商品已接收,等待支付中</view>
+								<view style="font-size: 12px; color: #999999">{{ orderRefund.receiveTime }}</view>
+							</view>
+						</template>
+						<view v-if="state >= 42">
+							<view style="font-size: 14px; color: #fe0419">{{ state == 43 ? '退款完成' : '退款失败' }}</view>
+							<view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
+						</view>
+						<image src="../merchant/static/images/tuikuan.png" />
+					</view>
+				</view>
+			</view>
+			<view class="tihuo dflex" v-if="mode === 1">
+				<view class="tihuoma dflex">
+					<image src="../merchant/static/images/thico.png" />
+					提货号码:
+					<span v-text="code"></span>
+				</view>
+			</view>
+			<!-- 门店自提 -->
+
+			<!-- 物流配送 -->
+			<view class="ddtop">
+				<ul class="ddstatus" v-if="state < 8 && state >= 1 && mode == 2">
+					<li :class="{ ing: state >= 1 }">
+						<span></span>
+						待付款
+					</li>
+					<li :class="{ ing: state >= 3 }">
+						<span></span>
+						待发货
+					</li>
+					<li :class="{ ing: state >= 5 }" v-if="state != 4">
+						<span></span>
+						待收货
+					</li>
+					<li :class="{ ing: state == 7 }">
+						<span></span>
+						已完成
+					</li>
+				</ul>
+				<!-- 退货 -->
+				<ul class="ddstatus" v-if="state >= 39 || state >= 30">
+					<li :class="{ ing: state >= 39 || state >= 30 }">
+						<span></span>
+						待审核
+					</li>
+					<li :class="{ ing: state == 32 }" v-if="state == 32">
+						<span></span>
+						审核失败
+					</li>
+					<template v-else>
+						<template v-if="orderRefund.refundType == 2 && orderRefund.refundMethod == 1">
+							<li :class="{ ing: state >= 35 }">
+								<span></span>
+								待寄回
+							</li>
+							<li :class="{ ing: state >= 36 }">
+								<span></span>
+								退货中
+							</li>
+						</template>
+						<template v-if="(orderRefund.refundType == 2 && orderRefund.refundMethod == 2) || orderRefund.refundMethod == 3">
+							<li :class="{ ing: state >= 36 }">
+								<span></span>
+								退货中
+							</li>
+						</template>
+						<li
+							:class="{
+								ing: (state >= 41 && orderRefund.refundType == 1) || (state >= 39 && orderRefund.refundType == 2)
+							}"
+							v-if="state != 4"
+						>
+							<span></span>
+							退款中
+						</li>
+						<li :class="{ ing: state >= 42 }">
+							<span></span>
+							已退款
+						</li>
+					</template>
+				</ul>
+
+				<view class="addr" v-if="mode == 2">
+					<span class="areas">地址:{{ order.address }}</span>
+					<view
+						style="
+		          display: flex;
+		          align-items: center;
+		          margin: 0.2rem 0 0;
+		          justify-content: space-between;
+		        "
+					>
+						<view>
+							收货人: {{ name }}
+							<span>{{ phone }}</span>
+						</view>
+					</view>
+					<image src="../merchant/static/images/dzbg.png" class="dzbg" />
+				</view>
+
+				<view class="addr" v-if="mode == 1">
+					<span class="areas">门店:{{ shopName ? shopName : merchantName }}</span>
+					<view
+						style="
+		          display: flex;
+		          align-items: center;
+		          margin: 0.2rem 0 0;
+		          justify-content: space-between;
+		        "
+					>
+						<view>
+							提货人: {{ name }}
+							<span>{{ phone }}</span>
+						</view>
+					</view>
+					<image src="../merchant/static/images/dzbg.png" class="dzbg" />
+				</view>
+				<!-- 物流配送 -->
+				<view class="lists ddlist">
+					<ul class="list bgfff">
+						<view class="lis" v-for="(pro, ind) in products" :key="ind">
+							<view class="cimgs"><image :src="pro.pic" class="cimg" /></view>
+							<view class="zhinfo">
+								<view class="zhtit" v-text="pro.title"></view>
+								<view v-if="pro.propertiesList&&pro.propertiesList.length>0" class="guige">规格:
+									<text v-for="(itemGuige, index) in pro.propertiesList" :key="index" class="guige" decode="true">{{itemGuige.value}}&nbsp;
+									</text>
+								</view>
+								<view class="jiage">
+									<view class="price">
+										<span>¥</span>
+										{{ pro.salePrice }}
+									</view>
+									<view class="num">×{{ pro.quantity }}</view>
+								</view>
+							</view>
+						</view>
+					</ul>
+				</view>
+			</view>
+			<ul class="ddinfo">
+				<li>
+					<span>订单编号</span>
+					<view v-text="id"></view>
+				</li>
+				<li>
+					<span>创建时间</span>
+					<view v-text="createDate"></view>
+				</li>
+				<li v-if="deliverTime">
+					<span>发货时间</span>
+					<view v-text="deliverTime"></view>
+				</li>
+				<li>
+					<span>订单金额</span>
+					<view class="price">¥{{ money }}</view>
+				</li>
+				<li v-if="discountMoney">
+					<span>优惠券</span>
+					<view class="price">-¥{{ discountMoney }}</view>
+				</li>
+				<li>
+					<span>支付金额</span>
+					<view class="price">¥{{ payMoney }}</view>
+				</li>
+			</ul>
+			<ul class="ddinfo">
+				<li>
+					<span>备注:</span>
+					<view v-text="note ? note : '无'">速速发货!</view>
+				</li>
+			</ul>
+			<view class="bot">
+				<!-- <a href="javascript:;" class="sta-btn">取消</a> -->
+				<view class="sta-btn" v-if="merchant.printer != 0 && (state == 3 || state == 4)" color="#FE0419" @click="orderPrinting(id, index)">打印小票</view>
+				<!-- <view class="sta-btn" @click="jumpUrl('refund?id=' + id)" v-if="state > 29 && state < 41 && state != 32">审核</view> -->
+				<view class="sta-btn" v-if="state == 3" @click="deliverGoods(id, merchantId, orderType)">确认发货</view>
+				<view class="sta-btn" @click="send(id)" color="#FE0419" v-if="state === 4">通知取件</view>
+				<view class="sta-btn" @click="deliver(id, index)" color="#FE0419" v-if="state === 4">已提货</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+// import wx from 'weixin-jsapi'
+const req = require('../utils/request');
+export default {
+	data() {
+		return {
+			isShowView: false,
+			id: '',
+			note: '',
+			money: 0,
+			mode: 1,
+			code: '',
+			createDate: '',
+			discountMoney: '',
+			payMoney: '',
+			deliverTime: '',
+			products: [],
+			orderType: 1,
+			state: 1,
+			order: '',
+			orderRefund: {},
+			show: false,
+			merchant: {},
+			express: '',
+			reason: '',
+			merchantName: '',
+			shopName: '',
+			name: '',
+			phone: '',
+			imgUrl: [],
+			imgIndex: 0,
+			imgShow: false,
+			id: '',
+			index: '',
+			Refundstate: '',
+			title: '',
+			hinde: false,
+			receivingGoods: false,
+			refundReason: {},
+			refundFalseRes: '',
+			refundType: '',
+			refundMethod: '',
+			action: false,
+			actions: [
+				{
+					name: '只退款'
+				},
+				{
+					name: '退货并退款'
+				}
+			],
+			refundTypenum: '',
+			merchantId: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.merchantId = opt.merchantId;
+		this.isPrinting();
+		this.loadDetail();
+	},
+
+	onShow() {},
+	methods: {
+		jumpUrl(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// s是否开启云打印
+		isPrinting() {
+			let fromP = {};
+			fromP.id = this.merchantId;
+			req.getRequest('/api/merchant/detail', fromP, data => {
+				this.merchant = data;
+			});
+		},
+
+		deliverGoods() {
+			uni.navigateTo({
+				url: 'express?orderId=' + this.orderId + '&id=' + this.deliverId + '&supplierId=' + this.supplierId
+			});
+		},
+		// 确认发货
+		deliverGoods(id, merchantId, orderType) {
+			req.postRequest(
+				'/api/order/deliverExtend',
+				{
+					id: id
+				},
+				res => {
+					if (res && res.length > 1) {
+						this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+					if (res && res.length <= 1) {
+						this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+				},
+				true
+			);
+		},
+		// 已提货
+		deliver(id, index) {
+			req.postRequest(
+				'/api/order/confirm',
+				{
+					id: id,
+					mode: '1'
+				},
+				data => {
+					this.pageList[index].state = 6;
+					this.pageList[index].stateName = '已签收';
+				},
+				true
+			);
+		},
+
+		// 通知取件
+		send(id) {
+			req.getRequest(
+				'/api/wxmes/send',
+				{
+					orderId: id,
+					bsusinessType: 11
+				},
+				data => {
+					req.msg('通知成功');
+				},
+				true
+			);
+		},
+
+		// 打印
+		orderPrinting(id, index) {
+			req.getRequest(
+				'/api/merchant/printOrderInfo',
+				id,
+				data => {
+					req.msg(data.msg);
+				},
+				true
+			);
+		},
+
+		loadDetail() {
+			let from = {
+				id: this.id
+			};
+			req.getRequest(
+				'/api/order/detail',
+				from,
+				data => {
+					this.order = data;
+					for (let key in data) {
+						this[key] = data[key];
+					}
+					if (data.state >= 30 && data.state <= 43) {
+						this.refundDetail();
+						// this.refundExpress();
+					}
+					this.isShowView = true;
+				},
+				true
+			);
+		},
+
+		//获取退货详情
+		refundDetail() {
+			req.getRequest(
+				'/api/orderRefund/queryRefund',
+				{
+					orderId: this.id
+				},
+				data => {
+					this.orderRefund = data;
+					if (data.refundMethod == 1) {
+						this.refundMethod = '邮寄';
+					} else if (data.refundMethod == 2) {
+						this.refundMethod = '送回门店';
+					} else if (data.refundMethod == 3) {
+						this.refundMethod = '货物拒收';
+					}
+					if (data.refundType == 1) {
+						this.refundType = '只退款';
+					} else if (data.refundType == 2) {
+						this.refundType = '退款并退货';
+					}
+				},
+				true
+			);
+		}
+	}
+};
+</script>
+
+<style scoped>
+@import './static/css/main.css';
+.dpname {
+	display: flex;
+	display: -webkit-flex;
+	align-items: center;
+	font-size: 13px;
+	color: #333;
+	padding: 25rpx 20rpx;
+	border-bottom: 2rpx solid #eee;
+}
+.dpname image {
+	width: 32rpx;
+	height: 27rpx;
+	margin-right: 15rpx;
+}
+.tabe {
+	font-size: 24rpx;
+	color: #999;
+	line-height: 40rpx;
+	margin-top: 15rpx;
+}
+
+.expressinfo {
+	display: flex;
+	justify-content: space-between;
+	margin-bottom: 10px;
+}
+
+.pad20 {
+	padding: 20px;
+}
+
+.refundFalseRes {
+	text-align: right;
+}
+
+.van-button:not(:last-child) {
+	margin-right: 5px;
+}
+
+.bot {
+	height: 70rpx;
+	justify-content: center;
+}
+.sta-btn {
+	/* background: #fe0419; */
+	border-color: #fe0419;
+	color: #fe0419;
+	width: 100%;
+	height: 70rpx;
+	line-height: 70rpx;
+	font-size: 30rpx;
+}
+</style>

+ 485 - 0
merchant/show.vue

@@ -0,0 +1,485 @@
+<template>
+	<view>
+		<view class="show">
+			<!-- 售后 -->
+			<view @click="jumpUrl('refund?id=' + id)" v-if="state >= 30">
+				<view class="examine">
+					<view class="cont dflex">
+						<view v-if="(state == 39 && orderRefund.refundType == 1) || (state == 40 && orderRefund.refundType == 1) || state == 30 || state == 31">
+							<view style="font-size: 14px; color: #fe0419">客户提交了退款申请,退款处理中</view>
+							<view style="font-size: 12px; color: #999999">{{ orderRefund.createDate }}</view>
+						</view>
+						<view v-if="(state == 41 && orderRefund.refundType == 1) || (state == 35 && orderRefund.refundType == 2)">
+							<view style="font-size: 14px; color: #fe0419">
+								客户提交了退款审核{{ state == 41 && orderRefund.refundType == 1 ? ',退款处理中' : ',等待用户寄货中' }}
+							</view>
+							<view style="font-size: 12px; color: #999999">
+								{{ state == 41 && orderRefund.refundType == 1 ? orderRefund.refundReviewTime : orderRefund.refundGoodReviewTime }}
+							</view>
+						</view>
+						<view v-if="state == 36 && orderRefund.refundType == 2 && orderRefund.refundMethod == 2">
+							<view style="font-size: 14px; color: #fe0419">等待客户送回门店</view>
+							<view style="font-size: 12px; color: #999999">
+								{{ state == 41 && orderRefund.refundType == 1 ? orderRefund.refundReviewTime : orderRefund.refundGoodReviewTime }}
+							</view>
+						</view>
+						<template v-if="orderRefund.refundType == 1">
+							<view v-if="state == 32">
+								<view style="font-size: 14px; color: #fe0419">审核失败</view>
+								<view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
+							</view>
+						</template>
+						<template v-if="orderRefund.refundType == 2">
+							<view v-if="state == 32">
+								<view style="font-size: 14px; color: #fe0419">审核失败</view>
+								<view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
+							</view>
+							<view v-if="state == 36 && (orderRefund.refundMethod == 1 || orderRefund.refundMethod == 3)">
+								<view style="font-size: 14px; color: #fe0419">
+									客户已退货
+									<template v-if="orderRefund.refundMethod == 1">
+										,{{ orderRefund.express }}{{ orderRefund.expressNo }}
+									</template>
+								</view>
+								<view style="font-size: 12px; color: #999999">
+									{{ orderRefund.refundMethod == 1 ? orderRefund.expressTime : orderRefund.refundGoodReviewTime }}
+								</view>
+							</view>
+							<view v-if="state == 40 || state == 39 || state == 41">
+								<view style="font-size: 14px; color: #fe0419">商品已接收,等待支付中</view>
+								<view style="font-size: 12px; color: #999999">{{ orderRefund.receiveTime }}</view>
+							</view>
+						</template>
+						<view v-if="state >= 42">
+							<view style="font-size: 14px; color: #fe0419">{{ state == 43 ? '退款完成' : '退款失败' }}</view>
+							<view style="font-size: 12px; color: #999999">{{ orderRefund.refundOverTime }}</view>
+						</view>
+						<image src="../merchant/static/images/tuikuan.png" />
+					</view>
+				</view>
+			</view>
+			<view class="tihuo dflex" v-if="mode === 1">
+				<view class="tihuoma dflex">
+					<image src="../merchant/static/images/thico.png" />
+					提货号码:
+					<span v-text="code"></span>
+				</view>
+			</view>
+			<!-- 门店自提 -->
+
+			<!-- 物流配送 -->
+			<view class="ddtop">
+				<ul class="ddstatus" v-if="state < 8 && state >= 1 && mode == 2">
+					<li :class="{ ing: state >= 1 }">
+						<span></span>
+						待付款
+					</li>
+					<li :class="{ ing: state >= 3 }">
+						<span></span>
+						待发货
+					</li>
+					<li :class="{ ing: state >= 5 }" v-if="state != 4">
+						<span></span>
+						待收货
+					</li>
+					<li :class="{ ing: state == 7 }">
+						<span></span>
+						已完成
+					</li>
+				</ul>
+				<!-- 退货 -->
+				<ul class="ddstatus" v-if="state >= 39 || state >= 30">
+					<li :class="{ ing: state >= 39 || state >= 30 }">
+						<span></span>
+						待审核
+					</li>
+					<li :class="{ ing: state == 32 }" v-if="state == 32">
+						<span></span>
+						审核失败
+					</li>
+					<template v-else>
+						<template v-if="orderRefund.refundType == 2 && orderRefund.refundMethod == 1">
+							<li :class="{ ing: state >= 35 }">
+								<span></span>
+								待寄回
+							</li>
+							<li :class="{ ing: state >= 36 }">
+								<span></span>
+								退货中
+							</li>
+						</template>
+						<template v-if="(orderRefund.refundType == 2 && orderRefund.refundMethod == 2) || orderRefund.refundMethod == 3">
+							<li :class="{ ing: state >= 36 }">
+								<span></span>
+								退货中
+							</li>
+						</template>
+						<li
+							:class="{
+								ing: (state >= 41 && orderRefund.refundType == 1) || (state >= 39 && orderRefund.refundType == 2)
+							}"
+							v-if="state != 4"
+						>
+							<span></span>
+							退款中
+						</li>
+						<li :class="{ ing: state >= 42 }">
+							<span></span>
+							已退款
+						</li>
+					</template>
+				</ul>
+
+				<view class="addr" v-if="mode == 2">
+					<span class="areas">地址:{{ order.address }}</span>
+					<view
+						style="
+		          display: flex;
+		          align-items: center;
+		          margin: 0.2rem 0 0;
+		          justify-content: space-between;
+		        "
+					>
+						<view>
+							收货人: {{ name }}
+							<span>{{ phone }}</span>
+						</view>
+					</view>
+					<image src="../merchant/static/images/dzbg.png" class="dzbg" />
+				</view>
+
+				<view class="addr" v-if="mode == 1">
+					<span class="areas">门店:{{ shopName ? shopName : merchantName }}</span>
+					<view
+						style="
+		          display: flex;
+		          align-items: center;
+		          margin: 0.2rem 0 0;
+		          justify-content: space-between;
+		        "
+					>
+						<view>
+							提货人: {{ name }}
+							<span>{{ phone }}</span>
+						</view>
+					</view>
+					<image src="../merchant/static/images/dzbg.png" class="dzbg" />
+				</view>
+				<!-- 物流配送 -->
+				<view class="lists ddlist">
+					<ul class="list bgfff" v-for="(items, index) in order.deliverList" :key="index">
+						<view class="lis" v-for="(pro, index1) in items.extendDTOList" :key="index1">
+							<view class="cimgs"><image :src="pro.pic" class="cimg" /></view>
+							<view class="zhinfo">
+								<view class="zhtit" v-text="pro.productName"></view>
+								<view v-if="pro.specsList&&pro.specsList.length>0" class="guige">规格:
+									<text v-for="(itemGuige, index) in pro.specsList" :key="index" class="guige" decode="true">{{itemGuige.value}}&nbsp;
+									</text>
+								</view>
+								<view class="jiage">
+									<view class="price">
+										<span>¥</span>
+										{{ pro.money }}
+									</view>
+									<view class="num">×{{ pro.deliverQuantity }}</view>
+								</view>
+								<view class="pro-tui" v-if="pro.refundOrderList&&pro.refundOrderList.length>0"><text>售后</text>{{pro.refundOrderList.length}}</view>
+							</view>
+						</view>
+					</ul>
+				</view>
+			</view>
+			<ul class="ddinfo">
+				<li>
+					<span>订单编号</span>
+					<view v-text="id"></view>
+				</li>
+				<li>
+					<span>创建时间</span>
+					<view v-text="createDate"></view>
+				</li>
+				<li v-if="deliverTime">
+					<span>发货时间</span>
+					<view v-text="deliverTime"></view>
+				</li>
+				<li>
+					<span>订单金额</span>
+					<view class="price">¥{{ money }}</view>
+				</li>
+				<li v-if="discountMoney">
+					<span>优惠券</span>
+					<view class="price">-¥{{ discountMoney }}</view>
+				</li>
+				<li>
+					<span>支付金额</span>
+					<view class="price">¥{{ payMoney }}</view>
+				</li>
+			</ul>
+			<ul class="ddinfo">
+				<li>
+					<span>备注:</span>
+					<view v-text="note ? note : '无'">速速发货!</view>
+				</li>
+			</ul>
+			<view class="bot">
+				<!-- <a href="javascript:;" class="sta-btn">取消</a> -->
+				<view class="sta-btn" v-if="merchant.printer != 0 && (state == 3 || state == 4)" color="#FE0419" @click="orderPrinting(id, index)">打印小票</view>
+				<!-- <view class="sta-btn" @click="jumpUrl('refund?id=' + id)" v-if="state > 29 && state < 41 && state != 32">审核</view> -->
+				<view class="sta-btn" v-if="state == 3" @click="deliverGoods(id, merchantId, orderType)">确认发货</view>
+				<view class="sta-btn" @click="send(id)" color="#FE0419" v-if="state === 4">通知取件</view>
+				<view class="sta-btn" @click="deliver(id, index)" color="#FE0419" v-if="state === 4">已提货</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+// import wx from 'weixin-jsapi'
+const req = require('../utils/request');
+export default {
+	data() {
+		return {
+			isShowView: false,
+			id: '',
+			note: '',
+			money: 0,
+			mode: 1,
+			code: '',
+			createDate: '',
+			discountMoney: '',
+			payMoney: '',
+			deliverTime: '',
+			products: [],
+			orderType: 1,
+			state: 1,
+			order: '',
+			orderRefund: {},
+			show: false,
+			merchant: {},
+			express: '',
+			reason: '',
+			merchantName: '',
+			shopName: '',
+			name: '',
+			phone: '',
+			imgUrl: [],
+			imgIndex: 0,
+			imgShow: false,
+			id: '',
+			index: '',
+			Refundstate: '',
+			title: '',
+			hinde: false,
+			receivingGoods: false,
+			refundReason: {},
+			refundFalseRes: '',
+			refundType: '',
+			refundMethod: '',
+			action: false,
+			actions: [
+				{
+					name: '只退款'
+				},
+				{
+					name: '退货并退款'
+				}
+			],
+			refundTypenum: '',
+			merchantId: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.merchantId = opt.merchantId;
+		this.isPrinting();
+		this.loadDetail();
+	},
+
+	onShow() {},
+	methods: {
+		jumpUrl(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// s是否开启云打印
+		isPrinting() {
+			let fromP = {};
+			fromP.id = this.merchantId;
+			req.getRequest('/api/merchant/detail', fromP, data => {
+				this.merchant = data;
+			});
+		},
+
+		deliverGoods() {
+			uni.navigateTo({
+				url: 'express?orderId=' + this.orderId + '&id=' + this.deliverId + '&supplierId=' + this.supplierId
+			});
+		},
+		// 确认发货
+		deliverGoods(id, merchantId, orderType) {
+			req.postRequest(
+				'/api/order/deliverExtend',
+				{
+					id: id
+				},
+				res => {
+					if (res && res.length > 1) {
+						this.jumpUrl('deliverExtend?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+					if (res && res.length <= 1) {
+						this.jumpUrl('express?id=' + id + '&merchantId=' + merchantId + '&orderType=' + orderType);
+					}
+				},
+				true
+			);
+		},
+		// 已提货
+		deliver(id, index) {
+			req.postRequest(
+				'/api/order/confirm',
+				{
+					id: id,
+					mode: '1'
+				},
+				data => {
+					this.pageList[index].state = 6;
+					this.pageList[index].stateName = '已签收';
+				},
+				true
+			);
+		},
+
+		// 通知取件
+		send(id) {
+			req.getRequest(
+				'/api/wxmes/send',
+				{
+					orderId: id,
+					bsusinessType: 11
+				},
+				data => {
+					req.msg('通知成功');
+				},
+				true
+			);
+		},
+
+		// 打印
+		orderPrinting(id, index) {
+			req.getRequest(
+				'/api/merchant/printOrderInfo',
+				id,
+				data => {
+					req.msg(data.msg);
+				},
+				true
+			);
+		},
+
+		loadDetail() {
+			let from = {
+				id: this.id
+			};
+			req.getRequest(
+				'/api/order/detail',
+				from,
+				data => {
+					this.order = data;
+					for (let key in data) {
+						this[key] = data[key];
+					}
+					if (data.state >= 30 && data.state <= 43) {
+						this.refundDetail();
+						// this.refundExpress();
+					}
+					this.isShowView = true;
+				},
+				true
+			);
+		},
+
+		//获取退货详情
+		refundDetail() {
+			req.getRequest(
+				'/api/orderRefund/queryRefund',
+				{
+					orderId: this.id
+				},
+				data => {
+					this.orderRefund = data;
+					if (data.refundMethod == 1) {
+						this.refundMethod = '邮寄';
+					} else if (data.refundMethod == 2) {
+						this.refundMethod = '送回门店';
+					} else if (data.refundMethod == 3) {
+						this.refundMethod = '货物拒收';
+					}
+					if (data.refundType == 1) {
+						this.refundType = '只退款';
+					} else if (data.refundType == 2) {
+						this.refundType = '退款并退货';
+					}
+				},
+				true
+			);
+		}
+	}
+};
+</script>
+
+<style scoped>
+@import './static/css/main.css';
+.dpname {
+	display: flex;
+	display: -webkit-flex;
+	align-items: center;
+	font-size: 13px;
+	color: #333;
+	padding: 25rpx 20rpx;
+	border-bottom: 2rpx solid #eee;
+}
+.dpname image {
+	width: 32rpx;
+	height: 27rpx;
+	margin-right: 15rpx;
+}
+.tabe {
+	font-size: 24rpx;
+	color: #999;
+	line-height: 40rpx;
+	margin-top: 15rpx;
+}
+
+.expressinfo {
+	display: flex;
+	justify-content: space-between;
+	margin-bottom: 10px;
+}
+
+.pad20 {
+	padding: 20px;
+}
+
+.refundFalseRes {
+	text-align: right;
+}
+
+.van-button:not(:last-child) {
+	margin-right: 5px;
+}
+
+.bot {
+	height: 70rpx;
+	justify-content: center;
+}
+.sta-btn {
+	/* background: #fe0419; */
+	border-color: #fe0419;
+	color: #fe0419;
+	width: 100%;
+	height: 70rpx;
+	line-height: 70rpx;
+	font-size: 30rpx;
+}
+</style>

+ 263 - 0
merchant/static/css/main.css

@@ -0,0 +1,263 @@
+/* CSS Document */
+*, dl, dt {margin: 0;padding: 0;}
+body {font-size: 14px;color: #666;background: #fff;overflow-x: hidden;font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体";-webkit-font-smoothing: antialiased;}
+image {border: none;}
+ul, li {list-style: none;margin: 0;}
+a {text-decoration: none;color: #666;cursor: pointer;outline: none;}
+a:hover {
+	/* -webkit-transition: all 0.3s ease; transition: all 0.3s ease;*/
+	text-decoration: none;outline: 0;}
+input, select, button, textarea {font-family: microsoft yahei;vertical-align: middle;border: none;color: #666;outline: none;}
+h1, h2, h3, h4, h5, h6, h7, b, label, dt {font-weight: normal;margin: 0;}
+p {margin: 0;}
+i, em {font-style: normal;}
+.fix {zoom: 1}
+.fix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden}
+.fl {float: left;display: inline;}
+.fr {float: right;display: inline;}
+.pr {position: relative;}
+.pa {position: absolute;}
+.dflex {display: flex;display: -webkit-flex;}
+.flex {flex: 1;-webkit-flex: 1;}
+.right {position: absolute;right: 0px;margin-right: 20px;}
+body {background: #f5f5f5;}
+.top {padding: 30rpx 30rpx 0;}
+.bg {display: block;width: 100%;height: 195px;position: absolute;top: 0;left: 0;z-index: -1;}
+/* 暂无数据 */
+.nodata {border-top: 2rpx solid #f9f9f9;text-align: center;padding: 300rpx 0 80rpx;}
+.nodata image {width: 371rpx;height: 200rpx;margin: 0 auto 50rpx;}
+.nodata view {font-size: 28rpx;color: #999;}
+/* 用户信息 */
+.minec {position: relative;z-index: 1;display: flex;display: -webkit-flex;align-items: center;margin-bottom: 30rpx;}
+.user {display: block;width: 100rpx;height: 100rpx;border-radius: 50%;background: #fff;margin-right: 20rpx;}
+.mines {flex: 1;-webkit-flex: 1;margin-right: 20rpx;}
+.qiehuan {width: 16px;height: 16px;margin-left: 4px;
+	/* margin-right: 43px; */
+	margin-top: 5px;}
+.sousuo {background: #1678ff;height: 33px;line-height: 33px;padding: 0 15px;color: #fff;border-radius: 0 17px 17px 0;margin-left: 10px;}
+.mines_top {width: 204px;display: flex;align-items: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
+.edu {display: block;font-size: 12px;color: #fff;margin: 5px 0 0;opacity: 0.4;}
+.set {width: 16px;height: 16px;margin: 0 0 0 5px;}
+.set image {display: block;width: 16px;height: 16px;}
+.title {font-size: 16px;color: #fff;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
+/* 搜索 */
+.ssbox {padding: 5px 10px 7px;justify-content: center;align-items: center;}
+.search {background: #fff;height: 33px;border-radius: 15px;padding: 0 10px;font-size: 13px;color: #666;width: 336px;}
+.search image {width: 15px;height: 15px;margin-right: 6px;}
+.sousuo {margin-left: 17px;font-size: 14px;}
+.van-button--small {width: 66px !important;}
+.search input {border: 0;margin-left: 9px;width: 336px;outline: none;}
+.search {display: flex;align-items: center;}
+.search .shousuo {width: 14px;height: 14px;}
+.search .saoma {width: 16px;height: 16px;}
+/* 订单 */
+.order {margin: 10px 15px 10px;border-radius: 10px;background: #fff;position: relative;z-index: 1;}
+.list1 {display: flex;display: -webkit-flex;}
+.list1 .li {width: 50%;text-align: center;color: #333;padding: 17px 0;position: relative;box-sizing: border-box;}
+.list1 .li .cont {border-right: 1px solid rgba(65, 65, 65, 0.1);}
+.list1 .li .orderimage {margin: 0 auto 15rpx;}
+.list1 .li .shuliang {color: #057bff;font-size: 18px;font-weight: bold;}
+.list1 .li .start {color: #999999;font-size: 13px;}
+/* .user {
+	display: block;
+	width: 1rem;
+	height: 1rem;
+	border-radius: 50%;
+	margin-right: .3rem;
+} */
+.top h3 {font-size: .3rem;color: #fff;}
+.jianbao {width: 1.5rem;height: .5rem;line-height: .5rem;border: .02rem solid #fff;border-radius: .4rem;font-size: .24rem;color: #fff;text-align: center;}
+.data {background: #fff;border-radius: 7px;margin: 9px;}
+.data li {width: 33.33%;text-align: center;font-size: .24rem;color: #999;}
+.data li a {display: block;padding: .3rem 0;}
+.data li span {display: block;font-size: .36rem;color: #333;margin-top: .1rem;}
+.datas .top {border-bottom: 1px solid #EEEEEE;padding: .2rem;justify-content: space-between;background: #197AFF;border-radius: 14px 14px 0 0;align-items: center;display: flex;}
+.datas {background: #fff;border-radius: .1rem;margin: .2rem;}
+.tit {border-bottom: .02rem solid #eee;padding: .3rem;font-size: 28rpx;color: #333;font-weight: bold;}
+.datas .dflex {padding: 0 .2rem .2rem 0;justify-content: space-between;align-items: center;}
+.datas .datas_top {display: flex;align-items: center;margin: 0 auto;}
+.datas .datas_top image {width: 12px;height: 15px;margin-right: 8px;}
+.datas .datas_top .txt {font-size: 15px;font-weight: bold;color: #fff;}
+.datas .datas_top .txt span {color: #FE9613;margin: 0 5px;}
+.datas .day {font-size: 12px;color: #999999;display: flex;align-items: center;}
+.datas .day image {width: 9px;height: 5px;margin-left: 5px;}
+.datas ul {width: 50%;}
+.datas ul:first-child {border-right: 1px solid #EEEEEE;}
+.datas li {text-align: center;font-size: 24rpx;color: #999;padding: 24px 0 26px 0;border-bottom: 1px solid #EEEEEE;}
+.datas li:last-child {border-bottom: none;}
+.datas li span {display: block;font-size: 24rpx;color: #333;margin-bottom: .1rem;}
+.datas .orders image {width: 9px;height: 12px;margin-right: 5px;}
+.datas .member image {width: 13px;height: 12px;margin-right: 4px;}
+.datas .clerk image, .datas .achievement image {width: 12px;height: 12px;margin-right: 5px;}
+.datas .turnover image {width: 13px;height: 11px;margin-right: 3px;}
+.datas .distribution image {width: 16px;height: 12px;margin-right: 5px;}
+.datas .orders view, .datas .member view, .datas .clerk view, .datas .turnover view, .datas .achievement view, .datas .distribution view {display: flex;align-items: center;justify-content: center;}
+.lists {margin: 9px;}
+/* .lists .list{background: #fff;} */
+.list li {padding: 0 10px;border-bottom: .02rem solid #e5e5e5;background: #fff;margin-bottom: 10px;border-radius: 5px;}
+.list li:last-child {border-bottom: none;}
+.ddbh {height: 50px;line-height: 50px;border-bottom: .02rem solid #F5F5F5;display: flex;display: -webkit-flex;align-items: center;margin-bottom: .1rem;justify-content: space-between;}
+.ddbh .ordid {display: flex;font-size: 14px;color: #999;align-items: center;}
+.ordidss {display: flex;font-size: 14px;color: #999;align-items: center;}
+.ddbh .tihuo1 .deliveryma {margin-left: 10rpx;}
+.ddbh .tihuo1 .deliveryma text {color: #FE0419;}
+.ddbh .type {width: 41px;height: 18px;margin-left: 5px;}
+.ddbh view {font-size: 14px;color: #333;}
+.list .lis {display: flex;display: -webkit-flex;align-items: center;padding: 10px 0;}
+.cimgs {position: relative;width: 90px;height: 90px;box-sizing: border-box;border: 1rpx solid #E5E5E5;border-radius: 10rpx;margin-right: 20rpx;}
+.cimgs .cimg {border: none;border-radius: 0;width: 100%;height: 100%;}
+.cimgs .type {position: absolute;top: .1rem;left: .1rem;width: 41px;height: 18px;}
+.cimage {width: 90px;height: 90px;border-radius: .1rem;margin-right: 10px;border: .02rem solid #E5E5E5;box-sizing: border-box;}
+.zhinfo {flex: 1;-webkit-flex: 1;overflow: hidden;position: relative;}
+.zhtit {font-size: 15px;color: #333;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;}
+.guige, .kucun {font-size: 11px;color: #999;margin-top: .05rem;}
+.kucun {text-align: right;}
+.jiage {display: flex;display: -webkit-flex;align-items: center;justify-content: space-between;margin-top: 13px;}
+.price {font-size: 15px;color: #333;}
+.price span {font-size: 15px;}
+.num {font-size: 12px;color: #333;}
+.num span {font-size: 14px;}
+.total {display: flex;display: -webkit-flex;justify-content: flex-end;align-items: center;font-size: 12;color: #333;margin: 7px 0 10px;}
+.total view {margin-left: 10px;}
+.deliver-text {font-size: 12;color: #FE0419;}
+.deliver-text-center {font-size: 12;text-align: center;color: #FE0419;}
+.deliver-text-g-center {font-size: 12;text-align: center;}
+.total view.flex {margin-left: 0;}
+.total span {color: #FE0419;}
+.ma10 {margin-left: 10px;}
+.status {border-top: .02rem solid #F5F5F5;display: flex;display: -webkit-flex;justify-content: flex-end;align-items: center;padding: 10px 0;font-size: 14px;color: #333;}
+.ddddd {align-items: center;}
+.status .sta-btn {padding: 0 6px;border-color: #FE0419;
+	/* background: #FE0419; */
+	border-radius: 12px;text-align: center;line-height: 25px;font-size: 11px;color: #FE0419;margin-left: 5px;}
+.status .sta-btn.red {color: #FE0419;border-color: #FE0419;}
+.status .sta-btn.w {color: #ffffff;border-color: #FE0419;}
+.youji {width: 20px;height: 14px;margin-right: 8px;}
+.jsd {width: 16px;height: 14px;margin-right: 7px;}
+.ziti {width: 15px;height: 14px;margin-right: 8px;}
+.tihuo1 {display: flex;align-items: center;color: #FE0419 !important;}
+.tab {padding: 0 .2rem;display: flex;display: -webkit-flex;height: 1rem;background: #fff;line-height: 1rem;}
+.tab a {font-size: .28rem;color: #999;width: 33.33%;text-align: center;position: relative;}
+.tab a.active {color: #333;}
+.tab a.active::after {content: '';display: block;width: .49rem;height: .03rem;background: #0065AC;position: absolute;left: 50%;transform: translateX(-50%);bottom: 0;}
+.tabcon .list {padding: 10px 10px 0;}
+.tabcon .list li {background: #fff;border: none;border-radius: 6px;margin-bottom: 10px;padding: 0;}
+.tabcon .ddbh {padding: 0 10px;}
+.tabcon .list .lis {padding: 10px;}
+.tabcon .total {margin-left: 10px;margin-right: 10px;}
+.tabcon .status {padding: 10px;}
+.tihuo {height: 70px;align-items: center;justify-content: space-between;margin: 10px;padding: 0 10px;background: #fff;border-radius: .1rem;}
+.tihuoma {align-items: center;font-size: 15px;color: #333;font-weight: bold;}
+.tihuoma span {color: #FE0419;}
+.tihuoma image {width: 17px;height: 18px;margin-right: 10px;}
+.bgfff {background-color: #fff;}
+/* 物流配送 */
+.ddtop {background: #fff;margin: 10px;border-radius: 6px;}
+.ddstatus {display: flex;display: -webkit-flex;justify-content: center;font-size: 12px;color: #999;padding: 26px 0 13px;border-bottom: 1px solid #E5E5E5;}
+.ddstatus .list {border-radius: 5px;}
+.ddstatus li {width: 25%;position: relative;text-align: center;}
+.ddstatus li::after {content: '';display: block;height: 2px;background: #CCD0D9;position: absolute;top: 3px;left: -50%;right: 50%;z-index: 1;}
+.ddstatus li:first-child::after {display: none;}
+.ddstatus span {display: block;width: 8px;height: 8px;border-radius: 50%;background: #CCD0D9;margin: 0 auto 12px;position: relative;z-index: 2;}
+.ddstatus li.ing {color: #FE0419;}
+.ddstatus li.ing::after {background: #FE0419;}
+.ddstatus li.ing span {background: #FE0419;}
+.addr {margin-top: 10px;padding: 12px 10px;border-radius: 6px;position: relative;overflow: hidden;}
+.addr view {font-size: 14px;color: #999;position: relative;}
+.addr .areasus {display: flex;align-items: center;margin: 10px 0 0;justify-content: space-between;}
+.addr view span {margin-left: 10px;}
+.areas {display: block;font-size: 15px;color: #333;font-weight: bold;line-height: 18px;align-items: center;position: relative;}
+.dzbg {display: block;position: absolute;bottom: 0;left: 0;right: 0;width: 100%;height: 4px;}
+.ddlist .lis {margin: 0 10px;}
+.cimages {position: relative;width: 90px;height: 90px;box-sizing: border-box;border: 1px solid #E5E5E5;border-radius: 6px;margin-right: 10px;}
+.cimages .cimage {border: none;border-radius: 0;width: 100%;height: 100%;}
+.cimages .type {position: absolute;top: .1rem;left: .1rem;width: 41px;height: 18px;}
+.ddinfo {background: #fff;padding: 0 10px;margin: 10px;border-radius: 6px;}
+.ddinfo li {display: flex;display: -webkit-flex;align-items: center;padding: 15px 0;border-bottom: 1px solid #EEEEEE;}
+.ddinfo li:last-child {border-bottom: none;}
+.ddinfo li span {display: block;font-size: 14px;color: #999;}
+.ddinfo li view {flex: 1;-webkit-flex: 1;font-size: 14px;color: #333;text-align: right;}
+.ddinfo li view.price {color: #FE0419;}
+.bottop {height: 60px;}
+.bot {position: fixed;left: 0;right: 0;bottom: 0;background: #fff;display: flex;display: -webkit-flex;justify-content: flex-end;align-items: center;height: 30px;padding: 10px;}
+.bot a {width: 1.78rem;height: .56rem;border: .02rem solid #666666;border-radius: .48rem;text-align: center;line-height: .56rem;font-size: .28rem;color: #666666;margin-left: .1rem;}
+.bot a.red {background: linear-gradient(to left, #FF5548, #FE0419);color: #FFFFFF;border: none}
+.show {padding-bottom: 100rpx;}
+/* .search-box{background: #fff;padding: 0 .2rem 0;} */
+.van-tabbar-item__icon {font-size: 20px !important;}
+.van-search {padding: 10px 3px !important;}
+.delivertype {font-size: 15px;}
+.delivertype .top {text-align: center;padding-bottom: 15px;}
+/* .delivertype .van-radio {
+	padding: 18px 10px;
+	border-bottom: 1px solid #E5E5E5;
+	justify-content: space-between;
+} */
+.mabot {margin-bottom: 10px;}
+/* .search-box input{box-sizing: border-box;width: 100%;border-radius: .1rem;padding: .2rem .2rem .2rem .7rem;height: .8rem;line-height: .4rem;font-size: .28rem;color: #333;background: #f5f5f5 url(../images/ssico.png) no-repeat .2rem center;background-size: .3rem auto;} */
+/* .express{padding: .6rem 0 0;} */
+.examine {background: #fff;margin: 10px;border-radius: 5px;}
+.examine .cont {padding: 20px 14.5px;justify-content: space-between;align-items: center;}
+.examine image {width: 27.5px;height: 25px;}
+.redfund {padding: 24px 0;text-align: center;}
+.redfund image {width: 112px;height: 75px;margin: 0 auto;}
+.redfund view {margin-top: 15px;padding: 0 20px;}
+/* 为空 */
+.nodata {text-align: center;padding: 50px 0 20px 0;font-size: 15px;color: #333;}
+.nodata image {display: block;width: 167px;height: 153.5;margin: 0 auto 25px;}
+.nodata view {font-size: 15px;color: #777;}
+.van-field {border-radius: 999px;}
+.btn_coloer {color: #D2D2D2;}
+/* 按钮样式 */
+.sta-btn {width: 138rpx;height: 48rpx;border: 2rpx solid #D2D2D2;border-radius: 48rpx;text-align: center;line-height: 48rpx;font-size: 22rpx;color: #333;margin-left: 10rpx;}
+.sta-btn.red {color: #FE0419;border-color: #FE0419;}
+.th-code.red {color: #FE0419;}
+/* 售后信息 */
+.van-cell {background: #fff;}
+.vvan-tit {font-size: 28rpx;color: #333;padding: 20rpx 30rpx;}
+.van-list {padding-left: 65rpx;}
+.van-list .li {font-size: 30rpx;color: #969799;line-height: 40rpx;padding: 20rpx 20rpx 20rpx 0;border-bottom: 1rpx solid #ebedf0;position: relative;}
+.van-list .li::before {content: '';display: block;width: 10rpx;height: 10rpx;background: #969799;border-radius: 50%;position: absolute;top: 38rpx;left: -34rpx;z-index: 2;}
+.van-list .li::after {content: '';display: block;width: 1rpx;background: #ebedf0;position: absolute;left: -30rpx;top: 32rpx;bottom: -53rpx;z-index: 1;}
+.van-list .li:last-child {border-bottom: none;}
+.van-list .li:last-child::after {display: none;}
+.van-list .li:first-child {color: #07c160;}
+.gou {display: none;width: 28rpx;height: 28rpx;position: absolute;top: 28rpx;left: -45rpx;z-index: 3;}
+.van-list .li:first-child .gou {display: block;}
+.picker {text-align: right;position: relative;padding-right: 30rpx;width: 100%;box-sizing: border-box;}
+.rico {width: 11rpx;height: 19rpx;margin-left: 20rpx;position: absolute;top: 50%;transform: translateY(-50%);right: 0;}
+.radio-rr {justify-content: flex-end;}
+.radio-rr label {margin-left: 20rpx;}
+
+
+/* 售后详情 */
+.box{background: #fff;border-radius: 15rpx;margin: 20rpx 30rpx;}
+.tits{font-size: 30rpx;color: #333;font-weight: bold;padding: 20rpx 30rpx;border-bottom: 1rpx solid #e9e9e9;}
+.product .lis{padding: 10px;}
+.refund-list .li{padding: 25rpx 30rpx;border-bottom: 1rpx solid #e9e9e9;font-size: 28rpx;color: #666;}
+.refund-list .li:last-child{border-bottom: none;}
+.label{color: #999;margin-right: 20rpx;}
+.li-r{text-align: right;}
+.li-color{color: #057bff;}
+.li-red{color: #FE0419;}
+.imgbox image{width: 216rpx;height: 216rpx;border-radius: 10rpx;margin: 20rpx 20rpx 0 0;}
+.imgbox image:nth-child(3n){margin-right: 0;}
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0,0,0,.5);z-index: 99;}
+.popup{background: #fff;border-radius: 30rpx 30rpx 0 0;padding: 20rpx 50rpx 50rpx;position: fixed;left: 0;right: 0;bottom: 0;z-index: 100;}
+.pop-lis{padding: 30rpx 0;border-bottom: 1rpx solid #e9e9e9;}
+.pop-tit{font-size: 30rpx;color: #333;font-weight: bold;}
+.pop-tit text{font-size: 26rpx;color: #999;margin-left: 15rpx;font-weight: normal;}
+.pop-type{justify-content: flex-end;}
+.pop-type .lis{font-size: 28rpx;color: #333;margin-left: 40rpx;}
+.pop-type .lis image{width: 28rpx;height: 28rpx;margin-right: 10rpx;}
+.pop-type .lis.active{color: #057bff;}
+.pop-money{font-size: 30rpx;color: #FE0419;text-align: right;}
+.reason{background: #f5f5f5;padding: 20rpx;margin-top: 20rpx;width: 100%;height: 100rpx;font-size: 28rpx;color: #666;box-sizing: border-box;border-radius: 10rpx;}
+.pop-btn{margin-top: 50rpx;justify-content: space-between;}
+.pop-cancel{width: 300rpx;height: 80rpx;background: #f5f5f5;border-radius: 40rpx;font-size: 30rpx;color: #666;text-align: center;line-height: 80rpx;}
+.pop-confirm{width: 300rpx;height: 80rpx;background: #057bff;border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;line-height: 80rpx;}
+.chufangy {position: fixed;background: rgba(247, 3, 3, 0.6);left: 0;right: 0;bottom: 50px;height: 30px;line-height: 30px;font-size: 12px;color: #fff;text-align: center;z-index: 50;}
+
+
+.pro-tui{font-size: 26rpx;color: #FE0419;margin-top: 20rpx;}
+.pro-tui text{margin-right: 10rpx;}

BIN
merchant/static/images/achievement.png


BIN
merchant/static/images/activityOrder.png


BIN
merchant/static/images/bg.png


BIN
merchant/static/images/clear.png


BIN
merchant/static/images/clerk.png


BIN
merchant/static/images/code.png


BIN
merchant/static/images/ddico0.png


BIN
merchant/static/images/default_logo.png


BIN
merchant/static/images/deliveredOrder.png


BIN
merchant/static/images/distribution.png


BIN
merchant/static/images/dlbg.png


BIN
merchant/static/images/dpico.png


BIN
merchant/static/images/drop-down.png


BIN
merchant/static/images/drop-right.png


BIN
merchant/static/images/dwico.png


BIN
merchant/static/images/dzbg.png


BIN
merchant/static/images/dzico.png


BIN
merchant/static/images/empty.png


BIN
merchant/static/images/empty_dd.png


BIN
merchant/static/images/extractionOrder.png


BIN
merchant/static/images/gou.png


BIN
merchant/static/images/icon1.png


BIN
merchant/static/images/icon10.png


BIN
merchant/static/images/icon2.png


BIN
merchant/static/images/icon3.png


BIN
merchant/static/images/icon4.png


BIN
merchant/static/images/icon5.png


BIN
merchant/static/images/icon6.png


BIN
merchant/static/images/icon7.png


BIN
merchant/static/images/icon8.png


BIN
merchant/static/images/icon9.png


BIN
merchant/static/images/img1.png


BIN
merchant/static/images/jishida.png


BIN
merchant/static/images/jishidaioc.png


BIN
merchant/static/images/kanjia.png


BIN
merchant/static/images/logo.jpg


BIN
merchant/static/images/member.png


BIN
merchant/static/images/newbornZone.png


BIN
merchant/static/images/order.png


BIN
merchant/static/images/phone.png


BIN
merchant/static/images/pingtuan.png


BIN
merchant/static/images/qiehuan.png


BIN
merchant/static/images/ranking.png


BIN
merchant/static/images/redfunt.png


BIN
merchant/static/images/refundOrder.png


BIN
merchant/static/images/rico.png


BIN
merchant/static/images/sao.png


BIN
merchant/static/images/saoma.png


BIN
merchant/static/images/seckill.png


BIN
merchant/static/images/set.png


BIN
merchant/static/images/shousuo.png


BIN
merchant/static/images/ssico.png


BIN
merchant/static/images/thico.png


BIN
merchant/static/images/title.png


BIN
merchant/static/images/tuangou.png


BIN
merchant/static/images/tuikuan.png


BIN
merchant/static/images/turnover.png


BIN
merchant/static/images/user.png


BIN
merchant/static/images/wdbg.jpg


BIN
merchant/static/images/wechat.png


BIN
merchant/static/images/xyico.png


BIN
merchant/static/images/xyico_h.png


BIN
merchant/static/images/youji.png


BIN
merchant/static/images/ziti.png


+ 52 - 0
pages.json

@@ -434,6 +434,58 @@
 					}
 				}
 			]
+		},
+		{
+			"root": "merchant",
+			"pages": [{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "门店管理"
+					}
+				},
+				{
+					"path": "express",
+					"style": {
+						"navigationBarTitleText": "发货"
+					}
+				},
+				{
+					"path": "refund",
+					"style": {
+						"navigationBarTitleText": "售后"
+					}
+				},
+				{
+					"path": "deliverExtend",
+					"style": {
+						"navigationBarTitleText": "拆单发货"
+					}
+				},
+				{
+					"path": "order",
+					"style": {
+						"navigationBarTitleText": "订单管理"
+					}
+				},
+				{
+					"path": "show",
+					"style": {
+						"navigationBarTitleText": "订单详情"
+					}
+				},
+				{
+					"path": "search",
+					"style": {
+						"navigationBarTitleText": "订单搜索"
+					}
+				},
+				{
+					"path": "refundDetail",
+					"style": {
+						"navigationBarTitleText": "售后详情"
+					}
+				}
+			]
 		}
 	]
 }

+ 3 - 3
pages/index/index.vue

@@ -11,7 +11,7 @@
 					<view class="ljsy">{{statisticData.totalProfit?statisticData.totalProfit:0}}</view>
 					<view class="ljsy-label">累计收益(元)</view>
 				</view>
-				<view class="tx-btn" v-if="userInfo.storeId||userInfo.merchantId">提现</view>
+				<view class="tx-btn" v-if="userInfo.storeId||userInfo.merchantId" @click="showPop = true">提现</view>
 			</view>
 
 			<view class="jy ddflex">
@@ -177,7 +177,7 @@
 		<view class="ceng" v-show="showPop" @click="showPop=false"></view>
 		<view :style="showPop?'bottom:0;':''" class="pop">
 			<view class="pop-title">选择提现方式</view>
-			<view class="pop-c-item ddflex" @click="jumpUrl('/promote/withdrawal/index/index')">
+			<view class="pop-c-item ddflex" @click="jumpUrl('/promote/withdrawal/index/index?cardType=1')">
 				<image src="../../static/pages/images/tx1.png"></image>
 				<view class="fflex">线上提现</view>
 				<view class="pop-c-item-r ddflex">
@@ -185,7 +185,7 @@
 					<image style="width: 12rpx;height:22rpx;margin-left: 12rpx;" src="../../static/images/n_rico.png"></image>
 				</view>
 			</view>
-			<view class="pop-c-item ddflex" @click="jumpUrl('/promote/withdrawal/index/index')">
+			<view class="pop-c-item ddflex" @click="jumpUrl('/promote/withdrawal/index/index?cardType=2')">
 				<image src="../../static/pages/images/tx2.png"></image>
 				<view class="fflex">线下提现</view>
 			</view>

+ 1 - 1
pages/user/user.vue

@@ -83,7 +83,7 @@
 					<image src="../../static/pages/images/user_service4.png"></image>
 					<text>运营数据</text>
 				</navigator>
-				<navigator url="" hover-class="none" class="li" @click="jumpUrl('')">
+				<navigator url="" hover-class="none" class="li" @click="jumpUrl('merchant/order')">
 					<image src="../../static/pages/images/user_service9.png"></image>
 					<text>商城订单</text>
 				</navigator>

+ 130 - 58
promote/withdrawal/bindCard/bindCard.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="step ddflex">
-			<view :class="'li' + (stepOne ? ' ing' : '') + (stepOneComplete ? ' end' : '')">
+			<view :class="'li' + (stepOne ? ' ing' : '') + (stepOneComplete ? ' end' : '')" @click="toStepOne">
 				<view class="num">1</view>
 				<image src="../../static/promote/images/gou_h.png" class="s-gou"></image>
 				<text>验证身份信息</text>
@@ -22,23 +22,23 @@
 							<view>身份证人像面</view>
 						</view>
 						<view class="linsence" @click="uploadImgs(2)">
-							<image :src="fileInfo.egalPersonidOppositePic ? fileInfo.egalPersonidOppositePic : '../../static/promote/images/card_back.png'"></image>
+							<image :src="fileInfo.legalPersonidOppositePic ? fileInfo.legalPersonidOppositePic : '../../static/promote/images/card_back.png'"></image>
 							<view>身份证国徽面</view>
 						</view>
 					</view>
 				</view>
 				<view class="li ddflex">
 					<label class="label">姓名</label>
-					<view class="item fflex"><input v-model="rName" placeholder="上传身份证人像面自动获取" placeholder-class="placeholder" class="ipt" /></view>
+					<view class="item fflex"><input :disabled="!isEdit" v-model="rName" placeholder="上传身份证人像面自动获取" placeholder-class="placeholder" class="ipt" /></view>
 				</view>
 				<view class="li ddflex">
 					<label class="label">身份证号</label>
-					<view class="item fflex"><input v-model="rCode" placeholder="上传身份证人像面自动获取" placeholder-class="placeholder" class="ipt" /></view>
+					<view class="item fflex"><input :disabled="!isEdit" v-model="rCode" placeholder="上传身份证人像面自动获取" placeholder-class="placeholder" class="ipt" /></view>
 				</view>
 				<view class="li ddflex">
 					<label class="label">有效期限</label>
 					<view class="item ddflex fflex">
-						<input v-model="rValidDate" placeholder="上传身份证国徽面自动获取" placeholder-class="placeholder" class="ipt fflex" />
+						<input v-model="rValidDate" :disabled="!isEdit" placeholder="上传身份证国徽面自动获取" placeholder-class="placeholder" class="ipt fflex" />
 						<!-- <view class="chang ddflex">
 							<image src="../../static/promote/images/gou1.png"></image>
 							长期
@@ -49,7 +49,7 @@
 					<label class="label">所在城市</label>
 					<view class="item dflex flex">
 						<input :disabled="true" v-model="address" placeholder="点击右侧图标获取" placeholder-class="placeholder" class="ipt flex" />
-						<image src="../../static/promote/images/dzico.png" class="location" @click="chooseLocation()"></image>
+						<image src="../../static/promote/images/dzico.png" class="location" @click="isEdit?chooseLocation():''"></image>
 					</view>
 				</view>
 			</view>
@@ -60,7 +60,7 @@
 				<view class="li cards">
 					<label class="label">银行卡</label>
 					<view class="linsence" @click="uploadImgs(3)">
-						<image :src="bankUrl ? bankUrl : '../../static/promote/images/card.png'"></image>
+						<image :src="fileInfo.bankUrl ? fileInfo.bankUrl : '../../static/promote/images/card.png'"></image>
 						<view>上传储蓄银行卡正面照</view>
 					</view>
 				</view>
@@ -71,7 +71,7 @@
 				<view class="li ddflex">
 					<label class="label">开户银行</label>
 					<view class="item fflex">
-						<picker :class="'pickers ' + (bankName ? 'active' : '')" @change="bindPickerBank" range-key="name" :range="bankList">
+						<picker :disabled="!isEdit" :class="'pickers ' + (bankName ? 'active' : '')" @change="bindPickerBank" range-key="name" :range="bankList">
 							<view v-if="bankName" class="ipt">{{ bankName }}</view>
 							<view v-else class="ipt_g">请选择开户银行</view>
 							<image src="../../../static/pages/images/crico1.png" class="rico"></image>
@@ -80,17 +80,17 @@
 				</view>
 				<view class="li ddflex">
 					<label class="label">银行卡号</label>
-					<view class="item fflex"><input v-model="bankNo" placeholder="上传后自动获取" placeholder-class="placeholder" class="ipt" /></view>
+					<view class="item fflex"><input :disabled="!isEdit" v-model="bankNo" placeholder="上传后自动获取" placeholder-class="placeholder" class="ipt" /></view>
 				</view>
 
 				<view class="li flexs dflex">
 					<label class="label">预留手机</label>
 					<view class="item flex">
-						<input type="number" v-model="bankAcctPhone" maxlength="11" placeholder="请输入银行预留手机号" placeholder-class="placeholder" class="ipt" />
+						<input type="number" :disabled="!isEdit" v-model="bankAcctPhone" maxlength="11" placeholder="请输入银行预留手机号" placeholder-class="placeholder" class="ipt" />
 					</view>
 				</view>
 			</view>
-			<view class="next" @click="submit()">确定绑卡</view>
+			<view class="next" @click="isEdit?submit():''">{{isEdit?'确定绑卡':'审核中'}}</view>
 		</block>
 	</view>
 </template>
@@ -111,7 +111,8 @@ export default {
 			stepTwoComplete: false,
 			fileInfo: {
 				legalPersonidPositivePic: '', //正面
-				egalPersonidOppositePic: '' //反面
+				legalPersonidOppositePic: '', //反面
+				bankUrl:''
 			},
 			//身份信息
 			rName: '',
@@ -134,34 +135,77 @@ export default {
 			bankAcctPhone: '',
 
 			settlementInfo: '',
-			isEnd: false //是否为查看编辑
+			isEnd: false, //是否为查看编辑
+			userId:null,
+			userType:null,//1 商户 2 门店
+			cardType:2,//1 线上提现卡 2 线下提现卡
+			
+			id:null
 		};
 	},
 	onLoad(opt) {
+		// 门店
+		if(req.getStorage('userInfo').merchantId){
+			this.userId = req.getStorage('userInfo').merchantId
+			this.userType = 2
+		}
+		// 商户
+		if(req.getStorage('userInfo').storeId){
+			this.userId = req.getStorage('userInfo').storeId
+			this.userType = 1
+		}
+		if(opt.cardType){
+			this.cardType = opt.cardType
+		}
+		if(opt.id){
+			this.id = opt.id
+		}
 		this.cityList = hfParams.mArea();
 		this.bankList = hfParams.bank();
+		if(this.id){
+			this.getDetail()
+		}
 		if (opt.isEnd) {
 			this.isEnd = opt.isEnd;
 			//默认选中上面的标签
-			let pages = getCurrentPages(); //获取所有页面栈实例列表
-			let prevPage = pages[pages.length - 2]; //上一页页面实例
-			this.settlementInfo = prevPage.$vm.settlementInfo;
-			if (this.settlementInfo) {
-				this.addIds = this.settlementInfo.provCode + ',' + this.settlementInfo.areaCode;
-				this.address = this.settlementInfo.address;
-				this.rName = this.settlementInfo.cardName;
-				this.bankName = this.getBankName(this.settlementInfo.bankCode);
-				this.bankAcctName = this.settlementInfo.cardName;
-				this.bankUrl = this.settlementInfo.bankUrl;
-				this.bankNo = this.settlementInfo.cardNo.replace(' ','');
-				this.fileInfo = JSON.parse(this.settlementInfo.fileJson);
-				this.rCode = this.settlementInfo.legalCertId;
-				this.rValidDate = this.settlementInfo.legalCertIdExpires;
-				this.bankAcctPhone = this.settlementInfo.legalMp;
-			}
+			// let pages = getCurrentPages(); //获取所有页面栈实例列表
+			// let prevPage = pages[pages.length - 2]; //上一页页面实例
+			// this.settlementInfo = prevPage.$vm.settlementInfo;
+			// if (this.settlementInfo) {
+			// 	this.addIds = this.settlementInfo.provCode + ',' + this.settlementInfo.areaCode;
+			// 	this.address = this.settlementInfo.address;
+			// 	this.rName = this.settlementInfo.cardName;
+			// 	this.bankName = this.getBankName(this.settlementInfo.bankCode);
+			// 	this.bankAcctName = this.settlementInfo.cardName;
+			// 	// this.bankUrl = this.settlementInfo.bankUrl;
+			// 	this.bankNo = this.settlementInfo.cardNo.replace(' ','');
+			// 	this.fileInfo = JSON.parse(this.settlementInfo.fileJson);
+			// 	this.rCode = this.settlementInfo.legalCertId;
+			// 	this.rValidDate = this.settlementInfo.legalCertIdExpires;
+			// 	this.bankAcctPhone = this.settlementInfo.legalMp;
+			// }
 		}
 	},
 	methods: {
+		getDetail(){
+			req.getRequest('/admin/v2/bank/'+this.id,{},res=>{
+				this.addIds = res.provCode + ',' + res.areaCode;
+				this.address = res.address;
+				this.rName = res.cardName;
+				this.bankName = this.getBankName(res.bankCode);
+				this.bankAcctName = res.cardName;
+				// this.bankUrl = res.bankUrl;
+				this.bankNo = res.cardNo.replace(' ','');
+				this.fileInfo = JSON.parse(res.fileJson);
+				this.rCode = res.legalCertId;
+				this.rValidDate = res.legalCertIdExpires;
+				this.bankAcctPhone = res.legalMp;
+				if(res.status==0) this.isEdit = false
+				else{
+					this.isEdit = true
+				}
+			})
+		},
 		getBankName(code) {
 			for (var i = 0; i < this.bankList.length; i++) {
 				var bankObj = this.bankList[i];
@@ -171,13 +215,17 @@ export default {
 				}
 			}
 		},
-
+		toStepOne(){
+			this.stepOne = true;
+			this.stepOneComplete = false;
+			this.stepTwo = false;
+		},
 		toStepTwo() {
 			if (!this.fileInfo.legalPersonidPositivePic) {
 				req.msg('请上传身份证人像面');
 				return;
 			}
-			if (!this.fileInfo.egalPersonidOppositePic) {
+			if (!this.fileInfo.legalPersonidOppositePic) {
 				req.msg('请上传身份证国徽面');
 				return;
 			}
@@ -204,9 +252,9 @@ export default {
 		},
 
 		uploadImgs(type) {
-			// if (!this.isEdit) {
-			// 	return;
-			// }
+			if (!this.isEdit) {
+				return;
+			}
 			let that = this;
 			uni.chooseImage({
 				count: 1,
@@ -216,28 +264,31 @@ export default {
 					uni.showLoading({
 						title: '上传中'
 					});
-					req.uploadFile('/api/upload', res.tempFilePaths[0], res => {
+					req.uploadFile('/api/nocheck/upload', res.tempFilePaths[0], res => {
 						uni.hideLoading();
 						if (type == 1) {
 							//正面
 							that.fileInfo.legalPersonidPositivePic = res.src;
-							that.ocrCard(res.src, 1);
+							// that.ocrCard(res.src, 1);
 						} else if (type == 2) {
 							//反面
-							that.fileInfo.egalPersonidOppositePic = res.src;
-							that.ocrCard(res.src, 2);
+							that.fileInfo.legalPersonidOppositePic = res.src;
+							// that.ocrCard(res.src, 2);
 						} else if (type == 3) {
-							that.bankUrl = res.src;
-							uni.showLoading({
-								title: '识别中'
-							});
-							req.getRequest('/baiduAI/bank', { imgUrl: res.src }, json => {
-								uni.hideLoading();
-								if (json.result) {
-									that.bankNo = json.result.bank_card_number;
-									that.initCheckBank(json.result.bank_name);
-								}
-							});
+							console.log(that.fileInfo)
+							that.fileInfo.bankUrl = res.src;
+							that.fileInfo = JSON.parse(JSON.stringify(that.fileInfo))
+							console.log('console.log(that.fileInfo)',that.fileInfo)
+							// uni.showLoading({
+							// 	title: '识别中'
+							// });
+							// req.getRequest('/baiduAI/bank', { imgUrl: res.src }, json => {
+							// 	uni.hideLoading();
+							// 	if (json.result) {
+							// 		that.bankNo = json.result.bank_card_number;
+							// 		that.initCheckBank(json.result.bank_name);
+							// 	}
+							// });
 						}
 					});
 				}
@@ -355,7 +406,7 @@ export default {
 		},
 
 		submit() {
-			if (!this.bankUrl) {
+			if (!this.fileInfo.bankUrl) {
 				req.msg('请上传银行卡正面照');
 				return;
 			}
@@ -379,7 +430,7 @@ export default {
 				bankAcctType: 2,
 				cardName: this.rName,
 				bankCode: this.bankList[this.bankPosition].code,
-				bankUrl: this.bankUrl,
+				// bankUrl: this.bankUrl,
 				cardNo: this.bankNo.replace(' ',''),
 				fileJson: JSON.stringify(this.fileInfo),
 				haveLicenseNo: 2,
@@ -387,14 +438,35 @@ export default {
 				legalCertId: this.rCode,
 				legalCertIdExpires: this.rValidDate,
 				isOpen: 0,
-				legalMp: this.bankAcctPhone
+				legalMp: this.bankAcctPhone,
+				bindId:this.userId,
+				bindType:this.userType,
+				type:this.cardType
 			};
-			req.postRequest('/api/v3/settlement/create', params, json => {
-				req.msg('添加成功');
-				setTimeout(() => {
-					uni.navigateBack();
-				}, 1500);
-			});
+			if(this.id) {
+				params.id=this.id
+				uni.showModal({
+					title:'提示',
+					content:'修改银行卡信息将重新审核,确定提交?',
+					success: (res) => {
+						if(res.confirm){
+							req.putRequest('/admin/v2/bank', params, json => {
+								req.msg('修改成功');
+								setTimeout(() => {
+									uni.navigateBack();
+								}, 1500);
+							});
+						}
+					}
+				})
+			}else{
+				req.postRequest('/admin/v2/bank', params, json => {
+					req.msg('添加成功');
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 1500);
+				});
+			}
 		}
 	}
 };

+ 86 - 29
promote/withdrawal/cardList/cardList.vue

@@ -1,46 +1,65 @@
 <template>
 	<view>
 		<view class="card-box">
-			<view class="card ddflex">
+			<view class="card ddflex" v-for="item,index in cardList" :key="index" @click="selectCard(item)">
 				<view class="yhk">
 					<image src="../../../static/pages/images/yhk.png" mode="aspectFit"></image>
 				</view>
 				<view class="fflex">
-					<view class="card-name">建设银行(5541)</view>
+					<view class="card-name">{{getBankName(item.bankCode)}}({{getbankNo(item.cardNo)}})</view>
 					<view class="card-text">单日上限5万</view>
 				</view>
 				<view class="card-state ddflex">
-					<view>待审核</view>
+					<view>{{getStateText(item)}}</view>
 					<image class="rico" src="/static/images/n_rico.png"></image>
 				</view>
 			</view>
-			<view class="card-add" @click="toaddCard">
+			<view class="card-add" @click="toaddCard(1)">
 				<view class="ddflex" style="justify-content: center;height: 100%;">
 					<image class="add-icon" src="../../../static/pages/images/add.png"></image>
 					<view>添加银行卡</view>
 				</view>
 			</view>
 		</view>
+		</view>
 	</view>
 </template>
 
 <script>
 	const app = getApp();
 	const req = require("../../../utils/request.js");
+	const hfParams = require('../../../utils/hfParams.js');
 
 	export default {
 		components: {},
 		props: {},
 		data() {
 			return {
-				settlementInfo: '',
+				bankList: [],
+				cardList: [],
+				cardType:2,
+				id:null,
+				userType:null,//1 商户 2 门店
+				cardType:2,//1 线上提现卡 2 线下提现卡
 			}
 		},
 		onLoad(options) {
-
+			// 门店
+			if(req.getStorage('userInfo').merchantId){
+				this.userId = req.getStorage('userInfo').merchantId
+				this.userType = 2
+			}
+			// 商户
+			if(req.getStorage('userInfo').storeId){
+				this.userId = req.getStorage('userInfo').storeId
+				this.userType = 1
+			}
+			this.bankList = hfParams.bank();
+			if(options.cardType) this.cardType = options.cardType
+			if(options.id) this.id = options.id
 		},
 		onShow() {
-			this.getSettlementInfo();
+			this.getCardList()
 		},
 		methods: {
 			jumpUrl(url) {
@@ -48,35 +67,73 @@
 					url:url
 				})
 			},
-			getSettlementInfo() {
-				req.getRequest('/api/v3/settlement/info', '', data => {
-					this.settlementInfo = data;
+			getCardList(){
+				req.getRequest('/admin/v2/bank/page',{page:1,limit:9999,type:this.cardType},res=>{
+					this.cardList = res.list
+				})
+			},
+			toaddCard() {
+				var url = '/promote/withdrawal/bindCard/bindCard';
+				uni.navigateTo({
+					url: url
 				});
 			},
-			//是否可提现
-			isOkState() {
-				var is = false;
-				if (this.settlementInfo && this.settlementInfo.channelList && this.settlementInfo.channelList.length > 0) {
-					var obj = this.settlementInfo.channelList[0];
-					if (obj.state == 1 && obj.settlementState == 1) {
-						is = true;
+			// 选择银行卡
+			selectCard(item){
+				if(item.id==this.id) return false
+				let d = {
+					bindId:this.userId,
+					bindType:this.userType,
+					id:item.id
+				}
+				uni.showModal({
+					title:"提示",
+					content:'是否切换默认提现银行卡?',
+					success: (res) => {
+						if(res.confirm){
+							req.postRequest('/admin/v2/bank/setDefault',d,res=>{
+								// let pages = getCurrentPages();
+								// var prevPage = pages[pages.length - 2];
+								// if (prevPage) {
+								// 	prevPage.$vm.settlementInfo = item
+								// }
+								req.msg('切换成功')
+								setTimeout(()=>{
+									uni.navigateBack()
+								},1000)
+							})
+						}
 					}
+				})
+			},
+			getbankNo(bankNo) {
+				if (bankNo) {
+					return bankNo.substring(bankNo.length - 4, bankNo.length);
 				}
-				return is;
 			},
-			toaddCard() {
-				var url = '/promote/withdrawal/bindCard/bindCard';
-				if (this.settlementInfo) {
-					if (this.isOkState()) {
-						url = '/promote/withdrawal/bindCardCheck/bindCardCheck';
-					} else {
-						url = url + '?isEnd=true';
+			getBankName(code) {
+				if (code) {
+					for (var i = 0; i < this.bankList.length; i++) {
+						var bankObj = this.bankList[i];
+						if (bankObj.code == code) {
+							return bankObj.name;
+						}
 					}
 				}
-				uni.navigateTo({
-					url: url
-				});
-			}
+			},
+			getStateText(item) {
+				var text = '待审核';
+				//银行卡状态 - 0、待审核 1、审核通过 2、审核失败
+				if (item.status == 0) {
+					text = '待审核';
+				} else if (item.status == 1) {
+					text = '审核通过';
+				} else if (item.status == 2) {
+					text = '审核失败';
+				}
+				return text;
+			},
+			
 		},
 		mounted() {
 		},

+ 19 - 2
promote/withdrawal/index/index.css

@@ -28,10 +28,27 @@ input {font-size: 40rpx;font-weight: bold;padding: 10rpx;}
 .information .li{align-items: flex-start;padding: 30rpx 0;border-bottom: 1rpx solid #E9E9E9;}
 .information .li:last-child{border-bottom: none;}
 .txico{width: 52rpx;height: 41rpx;margin-right: 17rpx;}
-.t-name{font-size: 28rpx;color: #000;}
+.t-name{font-size: 36rpx;color: #333333;font-weight: bold;}
 .t-bri{font-size: 24rpx;color: #999;margin-top: 8rpx;}
-.t-sta{font-size: 26rpx;color: #666;}
+.t-sta{font-size: 26rpx;color: #999;font-weight: normal;}
 .t-sta image{width: 31rpx;height: 31rpx;margin-right: 8rpx;}
 .t-sta image.rico{width: 13rpx;height: 22rpx;margin-right: 0;}
 
 .jlbtn{position: fixed;left: 0;right: 0;bottom: 30rpx;font-size: 28rpx;color: #999;text-align: center;}
+
+
+.yhk{
+	width: 96rpx;
+	height: 96rpx;
+	background: #F5F5F5;
+	opacity: 1;
+	border-radius: 100%;
+	padding: 20rpx;
+	box-sizing: border-box;
+	margin-right: 30rpx;
+}
+.yhk image{
+	width: 100%;
+	height: 100%;
+	/* margin: auto; */
+}

+ 72 - 107
promote/withdrawal/index/index.vue

@@ -2,7 +2,7 @@
 	<!--promote/withdrawal/index/index.wxml-->
 	<view>
 		<view class=" mt20 r10">
-			<block v-if="wechat == 0">
+			<block>
 				<icon class="iconfont icon-tianjia"></icon>
 				<view class="top">
 					<view class="add" v-if="!settlementInfo" @click="toaddCard()">
@@ -10,32 +10,36 @@
 						<text>添加银行卡</text>
 					</view>
 					<view class="information" v-else>
-						<view class="li ddflex">
-							<image src="../../static/promote/images/txico1.png" class="txico"></image>
+						<view class="li ddflex" @click="toaddCard()">
+							<view class="yhk">
+								<image src="/static/pages/images/sfz.png" mode="aspectFit" class="txico"></image>
+							</view>
 							<view class="fflex">
 								<view class="t-name ddflex">
 									<view class="fflex">{{ settlementInfo.legalCertName }}</view>
 									<view class="t-sta ddflex">
 										<!-- <image src="../../static/promote/images/txico3.png"></image> -->
-										{{ getStateText(1) }}
-										<image src="../../../static/pages/images/crico1.png" class="rico"></image>
+										已实名
+										<!-- <image src="../../../static/pages/images/crico1.png" class="rico"></image> -->
 									</view>
 								</view>
 								<view class="t-bri">{{ styleHintText(settlementInfo.legalCertId) }}</view>
 							</view>
 						</view>
-						<view class="li ddflex" @click="toaddCard()">
-							<image src="../../static/promote/images/txico2.png" class="txico"></image>
+						<view class="li ddflex" @click="jumpUrl('/promote/withdrawal/cardList/cardList?cardType='+cardType+'&id='+settlementInfo.id)">
+							<view class="yhk">
+								<image src="/static/pages/images/yhk.png" mode="aspectFit" class="txico"></image>
+							</view>
 							<view class="fflex">
 								<view class="t-name ddflex">
-									<view class="fflex">{{ getBankName(settlementInfo.bankCode) }}</view>
+									<view class="fflex">{{ getBankName(settlementInfo.bankCode) }}({{getbankNo(settlementInfo.cardNo)}})</view>
 									<view class="t-sta ddflex">
 										<!-- <image src="../../static/promote/images/txico3.png"></image> -->
 										{{ getStateText(2) }}
-										<image src="../../../static/pages/images/crico1.png" class="rico"></image>
+										<image src="/static/images/rico1.png" class="rico"></image>
 									</view>
 								</view>
-								<view class="t-bri" v-if="settlementInfo.cardNo">{{ '尾号' + getbankNo(settlementInfo.cardNo) }}</view>
+								<view class="t-bri">单日上限5万</view>
 							</view>
 						</view>
 					</view>
@@ -54,7 +58,7 @@
 					<input adjust-position="false" placeholder="输入提现金额" placeholder-class="placeholder" type="number" :value="allmoney" @input="getwithdrawal" />
 				</view>
 				<view class="dflex tx mt20">
-					<text class="mcolor">可提现金额 {{ countMoney.ktx }}元</text>
+					<text class="mcolor">可提现金额 {{ countMoney }}元</text>
 					<text @tap="allmoneyFun">全部提现</text>
 				</view>
 				<view class="btn mt50" @tap="withdrawmoney">提现</view>
@@ -68,6 +72,7 @@
 </template>
 
 <script>
+import { type } from 'os';
 // promote/withdrawal/index/index.js
 const app = getApp();
 const util = require('../../../utils/util.js');
@@ -79,16 +84,15 @@ export default {
 	data() {
 		return {
 			txmoney: 0,
-			wechat: 0,
 			minMoney: '',
-			// card: '',
-			// isShow: false,
-			// Firstcard: '',
-			// Lastcard: '',
 			allmoney: '',
-			countMoney: {},
+			countMoney: 0,
 			settlementInfo: '',
-			bankList: []
+			bankList: [],
+			cardList:[],//银行卡列表
+			userId:null,
+			userType:null,//1 商户 2 门店
+			cardType:2,//1 线上提现卡 2 线下提现卡
 		};
 	},
 
@@ -99,6 +103,17 @@ export default {
 	 * 生命周期函数--监听页面加载
 	 */
 	onLoad: function(options) {
+		// 门店
+		if(req.getStorage('userInfo').merchantId){
+			this.userId = req.getStorage('userInfo').merchantId
+			this.userType = 2
+		}
+		// 商户
+		if(req.getStorage('userInfo').storeId){
+			this.userId = req.getStorage('userInfo').storeId
+			this.userType = 1
+		}
+		if(options.cardType) this.cardType = options.cardType
 		this.getminMoney();
 		this.bankList = hfParams.bank();
 	},
@@ -107,12 +122,15 @@ export default {
 	 * 生命周期函数--监听页面显示
 	 */
 	onShow: function() {
-		this.getMoney(); //分销统计
-		// this.getCard();
 		this.getProfit(); //用户收益统计
-		this.getSettlementInfo();
+		this.getSettlementInfo();//获取提现卡
 	},
 	methods: {
+		jumpUrl(url){
+			uni.navigateTo({
+				url:url
+			})
+		},
 		getbankNo(bankNo) {
 			if (bankNo) {
 				return bankNo.substring(bankNo.length - 4, bankNo.length);
@@ -130,37 +148,15 @@ export default {
 			}
 		},
 
-		getStateText(type) {
-			var text = '';
-			if (this.settlementInfo && this.settlementInfo.channelList && this.settlementInfo.channelList.length > 0) {
-				var obj = this.settlementInfo.channelList[0];
-				if (type == 1) {
-					//商户状态 -1 资料完善中 0、审核中 1、审核成功 2、审核失败
-					if (obj.state == -1) {
-						text = '资料完善中';
-					} else if (obj.state == 0) {
-						text = '审核中';
-					} else if (obj.state == 1) {
-						text = '已实名';
-					} else if (obj.state == 2) {
-						text = '审核失败';
-					}
-				}
-
-				if (type == 2) {
-					//结算账户状态 0、未创建 1、正常 2、已删除 3、删除失败 4、创建失败 ,
-					if (obj.settlementState == 0) {
-						if (obj.errMsg) {
-							text = obj.errMsg;
-						} else {
-							text = '审核中';
-						}
-					} else if (obj.settlementState == 1) {
-						text = '已绑定';
-					} else if (obj.settlementState == 4) {
-						text = obj.errMsg;
-					}
-				}
+		getStateText() {
+			var text = '待审核';
+			//银行卡状态 - 0、待审核 1、审核通过 2、审核失败
+			if (this.settlementInfo.status == 0) {
+				text = '待审核';
+			} else if (this.settlementInfo.status == 1) {
+				text = '审核通过';
+			} else if (this.settlementInfo.status == 2) {
+				text = '审核失败';
 			}
 			return text;
 		},
@@ -182,12 +178,13 @@ export default {
 		},
 
 		getProfit() {
-			req.getRequest('/api/rrLogs/profit', {}, res => {
-				this.countMoney = res;
+			req.getRequest('/admin/v2/merchant/balance', {id:this.userId,type:this.userType}, res => {
+				this.countMoney = res?res.balance:0;
 			});
 		},
+		
 		getminMoney() {
-			req.g('/api/config', res => {
+			req.getRequest('/api/other/config', res => {
 				req.setStorage('configRes', JSON.stringify(res)); // 获取最小金额
 
 				if (res.CONFIG_WITHDRAW_Min && res.CONFIG_WITHDRAW_Min >= 1) {
@@ -198,65 +195,33 @@ export default {
 					this.setData({
 						minMoney: 1
 					});
-				} //获取是否开通提现到微信零钱
-
-				if (res.withdraw_wechat_small) {
-					this.wechat = res.withdraw_wechat_small;
 				}
 			});
 		},
 
 		getSettlementInfo() {
-			req.getRequest('/api/v3/settlement/info', '', data => {
+			let d = {
+				bindId:this.userId,
+				bindType:this.userType,
+				type:2
+			}
+			req.getRequest('/admin/v2/bank/defaultBank', d, data => {
 				this.settlementInfo = data;
 			});
 		},
 
-		// // 获取用户银行卡信息
-		// getCard() {
-		// 	req.getRequest('/api/bank', '', data => {
-		// 		console.log(data);
-
-		// 		if (data) {
-		// 			let Firstcard = data.card.substring(0, 4);
-		// 			let Lastcard = data.card.substring(data.card.length - 4, data.card.length);
-		// 			console.log(Firstcard, Lastcard);
-		// 			this.setData({
-		// 				card: data,
-		// 				isShow: false,
-		// 				Firstcard: Firstcard,
-		// 				Lastcard: Lastcard
-		// 			});
-		// 		} else {
-		// 			this.setData({
-		// 				isShow: true
-		// 			});
-		// 		}
-		// 	});
-		// },
-
-		// 获取用户金额
-		getMoney() {
-			req.getRequest('/api/distribution/info', {}, data => {
-				this.setData(data);
-				// console.log(this);
-			});
-		},
-
 		// 提现
 		withdrawmoney() {
-			if (this.wechat == 0) {
-				if (!this.isOkState()) {
-					return req.msg('请先添加正确的银行卡信息');
-				}
+			if (!this.isOkState()) {
+				return req.msg('请先添加正确的银行卡信息');
 			}
 			if (this.txmoney == 0) {
 				return req.msg('请输入提现金额');
-			} else if (this.txmoney > this.countMoney.ktx) {
+			} else if (this.txmoney > this.countMoney) {
 				return req.msg('提现金额不能大于可提金额');
 			} else if (this.txmoney < this.minMoney) {
 				return req.msg('提现金额不能低于最小提现金额');
-			} else if (this.txmoney > 0 && this.txmoney <= this.countMoney.ktx && +this.txmoney >= +this.minMoney) {
+			} else if (this.txmoney > 0 && this.txmoney <= this.countMoney && +this.txmoney >= +this.minMoney) {
 				req.postRequest(
 					'/api/withdraw',
 					{
@@ -277,8 +242,8 @@ export default {
 		//全部提现
 		allmoneyFun() {
 			this.setData({
-				allmoney: this.countMoney.ktx,
-				txmoney: this.countMoney.ktx
+				allmoney: this.countMoney,
+				txmoney: this.countMoney
 			});
 		},
 
@@ -290,14 +255,14 @@ export default {
 		},
 
 		toaddCard() {
-			var url = '/promote/withdrawal/bindCard/bindCard';
-			if (this.settlementInfo) {
-				if (this.isOkState()) {
-					url = '/promote/withdrawal/bindCardCheck/bindCardCheck';
-				} else {
-					url = url + '?isEnd=true';
-				}
-			}
+			var url = '/promote/withdrawal/bindCard/bindCard?cardType='+this.cardType+'&id='+this.settlementInfo.id;
+			// if (this.settlementInfo) {
+			// 	if (this.isOkState()) {
+			// 		url = '/promote/withdrawal/bindCardCheck/bindCardCheck';
+			// 	} else {
+			// 		url = url + '?isEnd=true';
+			// 	}
+			// }
 			uni.navigateTo({
 				url: url
 			});

+ 70 - 29
promote/withdrawal/myCard/myCard.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view style="overflow: hidden;">
 		<view class="card-note ddflex">
 			<image src="../../../static/pages/images/ts.png"></image>
 			<view>自动提现银行卡: 目前账户可提现银行卡仅支持绑定一张</view>
@@ -11,20 +11,20 @@
 				<image class="ts-icon" src="/static/pages/images/ts2.png"></image>
 				<view class="ts-text">仅限个人账户</view>
 			</view>
-			<view class="card ddflex">
+			<view class="card ddflex" v-for="item,index in cardListOn" :key="index">
 				<view class="yhk">
 					<image src="../../../static/pages/images/yhk.png" mode="aspectFit"></image>
 				</view>
 				<view class="fflex">
-					<view class="card-name">建设银行(5541)</view>
+					<view class="card-name">{{getBankName(item.bankCode)}}({{getbankNo(item.cardNo)}})</view>
 					<view class="card-text">单日上限5万</view>
 				</view>
 				<view class="card-state ddflex">
-					<view>待审核</view>
+					<view>{{getStateText(item)}}</view>
 					<image class="rico" src="/static/images/n_rico.png"></image>
 				</view>
 			</view>
-			<view class="card-add" @click="toaddCard">
+			<view class="card-add" @click="toaddCard(1)">
 				<view class="ddflex" style="justify-content: center;height: 100%;">
 					<image class="add-icon" src="../../../static/pages/images/add.png"></image>
 					<view>添加银行卡</view>
@@ -36,7 +36,20 @@
 			<view class="ddflex">
 				<view class="ts-title">线下提现银行卡</view>
 			</view>
-			<view class="card-add">
+			<view class="card ddflex" v-for="item,index in cardList" :key="index">
+				<view class="yhk">
+					<image src="../../../static/pages/images/yhk.png" mode="aspectFit"></image>
+				</view>
+				<view class="fflex">
+					<view class="card-name">{{getBankName(item.bankCode)}}({{getbankNo(item.cardNo)}})</view>
+					<view class="card-text">单日上限5万</view>
+				</view>
+				<view class="card-state ddflex">
+					<view>{{getStateText(item)}}</view>
+					<image class="rico" src="/static/images/n_rico.png"></image>
+				</view>
+			</view>
+			<view class="card-add" @click="toaddCard(2)">
 				<view class="ddflex" style="justify-content: center;height: 100%;">
 					<image class="add-icon" src="../../../static/pages/images/add.png"></image>
 					<view>添加银行卡</view>
@@ -49,20 +62,23 @@
 <script>
 	const app = getApp();
 	const req = require("../../../utils/request.js");
+	const hfParams = require('../../../utils/hfParams.js');
 
 	export default {
 		components: {},
 		props: {},
 		data() {
 			return {
-				settlementInfo: '',
+				bankList: [],
+				cardList: [],//线下银行卡
+				cardListOn:[],//线上银行卡
 			}
 		},
 		onLoad(options) {
-
+			this.bankList = hfParams.bank();
 		},
 		onShow() {
-			this.getSettlementInfo();
+			this.getCardList()
 		},
 		methods: {
 			jumpUrl(url) {
@@ -70,31 +86,56 @@
 					url:url
 				})
 			},
-			getSettlementInfo() {
-				req.getRequest('/api/v3/settlement/info', '', data => {
-					this.settlementInfo = data;
-				});
+			// 获取线下提现银行卡
+			getCardList(){
+				req.getRequest('/admin/v2/bank/page',{page:1,limit:999,type:2},res=>{
+					this.cardList = res.list
+				})
 			},
-			//是否可提现
-			isOkState() {
-				var is = false;
-				if (this.settlementInfo && this.settlementInfo.channelList && this.settlementInfo.channelList.length > 0) {
-					var obj = this.settlementInfo.channelList[0];
-					if (obj.state == 1 && obj.settlementState == 1) {
-						is = true;
-					}
+			// 获取线上提现银行卡
+			getCardListOn(){
+				req.getRequest('/admin/v2/bank/page',{page:2,limit:999,type:2},res=>{
+					this.cardListOn = res.list
+				})
+			},
+			getbankNo(bankNo) {
+				if (bankNo) {
+					return bankNo.substring(bankNo.length - 4, bankNo.length);
 				}
-				return is;
 			},
-			toaddCard() {
-				var url = '/promote/withdrawal/bindCard/bindCard';
-				if (this.settlementInfo) {
-					if (this.isOkState()) {
-						url = '/promote/withdrawal/bindCardCheck/bindCardCheck';
-					} else {
-						url = url + '?isEnd=true';
+			getBankName(code) {
+				if (code) {
+					for (var i = 0; i < this.bankList.length; i++) {
+						var bankObj = this.bankList[i];
+						if (bankObj.code == code) {
+							return bankObj.name;
+						}
 					}
 				}
+			},
+			getStateText(item) {
+				var text = '待审核';
+				//银行卡状态 - 0、待审核 1、审核通过 2、审核失败
+				if (item.status == 0) {
+					text = '待审核';
+				} else if (item.status == 1) {
+					text = '审核通过';
+				} else if (item.status == 2) {
+					text = '审核失败';
+				}
+				return text;
+			},
+			// 添加银行卡
+			toaddCard(type) {
+				// 1 线上 2 线下
+				var url = '/promote/withdrawal/bindCard/bindCard?cardType='+type;
+				// if (this.settlementInfo) {
+				// 	if (this.isOkState()) {
+				// 		url = '/promote/withdrawal/bindCardCheck/bindCardCheck';
+				// 	} else {
+				// 		url = url + '?isEnd=true';
+				// 	}
+				// }
 				uni.navigateTo({
 					url: url
 				});

BIN
static/pages/images/crico1.png


BIN
static/pages/images/sfz.png