lhl 2 lat temu
rodzic
commit
395e3a5ea4

+ 18 - 1
src/api/order.js

@@ -673,4 +673,21 @@ export function getServeRefund(data) {
 	    method: 'post',
 	    data
 	});
-}
+}
+
+export function getServeOrder(params) {
+	return request({
+	    url: `order/subscribe/lst`,
+	    method: 'get',
+	    params
+	});
+}
+
+//服务项目退款审核
+export function serveRefund(data) {
+	return request({
+	    url: `refund/refund_order_examine`,
+	    method: 'post',
+	    data});
+}
+

+ 60 - 49
src/pages/check/components/addStaff.vue

@@ -33,8 +33,13 @@
 							</FormItem>
 							</Col>
 							<Col span="24">
-							<FormItem label="浮动比例:" label-for="floating_ratio" prop="floating_ratio">
-								<Input v-model="formItem.floating_ratio" placeholder="请输入浮动比例" />
+							<FormItem label="销售比例:" label-for="sale_ratio" prop="sale_ratio">
+								<Input v-model="formItem.sale_ratio" placeholder="请输入销售比例" />
+							</FormItem>
+							</Col>
+							<Col span="24">
+							<FormItem label="手工比例:" label-for="craft_ratio " prop="craft_ratio">
+								<Input v-model="formItem.craft_ratio" placeholder="请输入手工比例" />
 							</FormItem>
 							</Col>
 							<Col span="24">
@@ -171,7 +176,8 @@
 					main_department: '',
 					direct_leader: 'ZhouFengYu',
 					position: '',
-					floating_ratio: ''
+					sale_ratio: 0,
+					craft_ratio: 0
 				},
 				spinShow: false,
 				addresData: [],
@@ -186,9 +192,14 @@
 						message: '请输入地址地址',
 						trigger: 'blur'
 					}],
-					floating_ratio: [{
+					sale_ratio: [{
+						required: true,
+						message: '请输入销售比例',
+						trigger: 'blur'
+					}],
+					craft_ratio: [{
 						required: true,
-						message: '请输入浮动比例',
+						message: '请输入手工比例',
 						trigger: 'blur'
 					}],
 					mobile: [{
@@ -247,7 +258,8 @@
 					main_department: '',
 					direct_leader: 'ZhouFengYu',
 					position: '',
-					floating_ratio: ''
+					sale_ratio: 0,
+					craft_ratio: 0
 				}
 			}
 		},
@@ -292,8 +304,9 @@
 					address: '',
 					main_department: '',
 					direct_leader: 'ZhouFengYu',
-					floating_ratio: '',
-					is_reservation: 0
+					sale_ratio: 0,
+					is_reservation: 0,
+					craft_ratio: 0
 				}
 				this.add = 0;
 				this.isApi = 0;
@@ -315,47 +328,45 @@
 			// 提交
 			handleSubmit(name) {
 				console.log(this.formItem)
-				// this.$refs[name].validate((valid) => {
-				// 	if (valid) {
-				// 		if (this.formItem.id) {
-				// 			editYg({
-				// 				floating_ratio: this.formItem.floating_ratio,
-				// 				id: this.formItem.id,
-				// 				name: this.formItem.name,
-				// 				avatar: this.formItem.avatar,
-				// 				mobile: this.formItem.mobile,
-				// 				alias: this.formItem.alias,
-				// 				address: this.formItem.address,
-				// 				main_department: this.formItem.main_department,
-				// 				department: this.formItem.department,
-				// 				uid: this.formItem.uid,
-				// 				userid: this.formItem.userid,
-				// 				direct_leader: 'ZhouFengYu',
-				// 				position: this.formItem.position
-				// 			}).then(async res => {
-				// 				this.$Message.success(res.msg);
-				// 				this.isTemplate = false;
-				// 				this.$emit('success')
-				// 				// this.clearFrom();
-				// 			}).catch(res => {
-				// 				this.$Message.error(res.msg);
-				// 			})
-				// 		} else {
-				// 			addYg(this.formItem).then(async res => {
-				// 				this.$Message.success(res.msg);
-				// 				this.isTemplate = false;
-				// 				this.$emit('success')
-				// 				// this.clearFrom();
-				// 			}).catch(res => {
-				// 				this.$Message.error(res.msg);
-				// 			})
-				// 		}
-
-				// 	} else {
-				// 		return false;
-				// 	}
-				// })
-
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						if(this.formItem.id) {
+							editYg({
+								id: this.formItem.id,
+								name:  this.formItem.name,
+								avatar:  this.formItem.avatar,
+								mobile:  this.formItem.mobile,
+								alias:  this.formItem.alias,
+								address:  this.formItem.address,
+								main_department:  this.formItem.main_department,
+								department: this.formItem.department,
+								uid: this.formItem.uid,
+								userid: this.formItem.userid,
+								direct_leader: 'ZhouFengYu',
+								position: this.formItem.position
+							}).then(async res => {
+								this.$Message.success(res.msg);
+								this.isTemplate = false;
+								this.$emit('success')
+								// this.clearFrom();
+							}).catch(res => {
+								this.$Message.error(res.msg);
+							})
+						}else {
+							addYg(this.formItem).then(async res => {
+								this.$Message.success(res.msg);
+								this.isTemplate = false;
+								this.$emit('success')
+								// this.clearFrom();
+							}).catch(res => {
+								this.$Message.error(res.msg);
+							})
+						}
+						
+					} else {
+						return false;
+					}
+				})
 			}
 		}
 	}

+ 695 - 0
src/pages/order/serveOrder/index.vue

@@ -0,0 +1,695 @@
+<template>
+	<div>
+		<!-- <div class="i-layout-page-header"> -->
+		<!-- <PageHeader
+        class="product_tabs"
+        :title="$route.meta.title"
+        hidden-breadcrumb
+      ></PageHeader> -->
+		<!-- </div> -->
+		<Card :bordered="false" dis-hover class="ivu-mt mt15">
+			<Form ref="pagination" :model="pagination" :label-width="labelWidth" :label-position="labelPosition"
+				@submit.native.prevent>
+				<Row type="flex" class="mt10">
+					<Col class="ivu-text-left mr">
+					<FormItem label="订单状态:">
+						<Select v-model="pagination.refund_status" style="width: 250px"
+							@on-change="selectChange2(pagination.refund_status)">
+							<Option v-for="item in num" :key="item.value" :value="item.value">{{ item.name }}</Option>
+						</Select>
+						<!-- <RadioGroup
+              v-model="pagination.refund_type"
+              type="button"
+              @on-change="selectChange2(pagination.refund_type)"
+            >
+              <Radio v-for="(item, index) in num" :key="index" :label="index"
+                >{{ item.name }} {{ '(' + item.num + ')' }}</Radio
+              >
+            </RadioGroup> -->
+					</FormItem>
+					</Col>
+					<Col class="ml15">
+					<FormItem label="退款时间:">
+						<DatePicker :editable="false" @on-change="onchangeTime" :value="timeVal" format="yyyy/MM/dd"
+							type="daterange" placement="bottom-start" placeholder="自定义时间" style="width: 250px"
+							:options="options"></DatePicker>
+					</FormItem>
+					</Col>
+					<Col class="ivu-text-left">
+					<FormItem label="订单搜索:" label-for="title">
+						<Input enter-button v-model="pagination.order_id" placeholder="请输入订单号" style="width: 250px" />
+						<Button type="primary" class="ml10 search" @click="orderSearch">搜索</Button>
+					</FormItem>
+					</Col>
+
+				</Row>
+			</Form>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt mt15">
+
+			<Table :columns="thead" :data="tbody" ref="table" class="mt10" :loading="loading" highlight-row
+				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block"></span>
+					<span v-show="row.is_del === 1 && row.delete_time == null"
+						style="color: #ed4014; display: block">用户已删除</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="user">
+					<div>用户名:{{ row.nickname }}</div>
+					<div>用户ID:{{ row.uid }}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="refund_status">
+					<div v-if="row.refund_status == 1">待审核</div>
+					<div v-else-if="row.refund_status == 2">第一次审核通过</div>
+					<div v-else-if="row.refund_status == 3">第二次审核通过</div>
+					<div v-else-if="row.refund_status == 4">已全部退款</div>
+					<div v-else-if="row.refund_status == 5">已部分退款</div>
+					<div v-else-if="row.refund_status == -1">
+						<div>拒绝退款</div>
+						<div>原因:{{ row.refuse_reason }}</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="info">
+					<div class="tabBox" v-for="(val, i) in row.info" :key="i">
+						<div class="tabBox_img" v-viewer>
+							<img v-lazy="val.slider_image" />
+						</div>
+						<span class="tabBox_tit">{{ val.store_name }}</span>
+						<span class="tabBox_pice">{{'¥' + val.pay_price}}</span>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="pay_price">
+					<span class="tabBox_pice">{{'¥' + showPrice(row.info)}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<span class="tabBox_pice">{{showTime(row.add_time)}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="statusName">
+					<div v-html="row.refund_reason" class="pt5"></div>
+					<div v-html="row.refund_explain" class="pt5"></div>
+					<div class="pictrue-box">
+						<div v-viewer v-if="row.refund_img" v-for="(item, index) in row.refund_img || []" :key="index">
+							<img class="pictrue mr10" v-lazy="item" :src="item" />
+						</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="statusGoodName">
+					<div v-html="row.refund_goods_explain" class="pt5"></div>
+					<div class="pictrue-box">
+						<div v-viewer v-if="row.refund_goods_img" v-for="(item, index) in row.refund_goods_img || []"
+							:key="index">
+							<img class="pictrue mr10" v-lazy="item" :src="item" />
+						</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					
+					<a @click="changeMenu(row, 0)" v-if="row.status == 0">修改服务员工</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="pagination.page" show-elevator show-total @on-change="pageChange"
+					:page-size="pagination.limit" />
+			</div>
+		</Card>
+		<!-- 编辑 退款 退积分 不退款-->
+		<edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
+		<!-- 详情 -->
+		<details-from ref="detailss" :orderDatalist="orderDatalist" :orderId="orderId"
+			:rowActive="rowActive"></details-from>
+		<!-- 备注 -->
+		<order-remark ref="remarks" remarkType="refund" :orderId="orderId" @submitFail="submitFail"></order-remark>
+		<!-- 记录 -->
+		<order-record ref="record"></order-record>
+		<Modal
+		  v-model="modals"
+		  scrollable
+		  title="订单备注"
+		  class="order_box"
+		  :closable="false"
+		>
+		  <Form
+		    :label-width="80"
+		  >
+		    <FormItem label="备注:" prop="remark">
+		      <Input
+		        v-model="remark"
+		        maxlength="200"
+		        show-word-limit
+		        type="textarea"
+		        placeholder="订单备注"
+		        style="width: 100%"
+		      />
+		    </FormItem>
+		  </Form>
+		  <div slot="footer">
+		    <Button type="primary" @click="goCancal">提交</Button>
+		    <Button @click="cancal">取消</Button>
+		  </div>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex'
+	import {
+		orderRefundList,
+		getDataInfo,
+		getRefundDataInfo,
+		getRefundFrom,
+		getnoRefund,
+		refundIntegral,
+		getDistribution,
+		getRefundOrderFrom,
+		getServeOrder
+	} from '@/api/order'
+	import editFrom from '@/components/from/from'
+	import detailsFrom from '../orderList/components/orderDetails'
+	import orderRemark from '../orderList/components/orderRemark'
+	import orderRecord from '../orderList/components/orderRecord'
+	export default {
+		components: {
+			editFrom,
+			detailsFrom,
+			orderRemark,
+			orderRecord
+		},
+		data() {
+			return {
+				remark: '',
+				modals:false,
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				thead: [{
+						title: '订单号',
+						align: 'center',
+						slot: 'order_id',
+						minWidth: 150,
+					},
+					{
+						title: '用户昵称',
+						key: 'real_name',
+						minWidth: 130,
+					},
+					{
+						title: '用户联系方式',
+						key: 'user_phone',
+						minWidth: 130,
+					},
+					{
+						title: '商品信息',
+						slot: 'info',
+						minWidth: 300,
+					},
+					{
+						title: '实际支付',
+						slot: 'pay_price',
+						minWidth: 70,
+					},
+					{
+						title: '下单时间',
+						slot: 'add_time',
+						minWidth: 100,
+					},
+					{
+						title: '操作',
+						slot: 'action',
+						// fixed: "right",
+						minWidth: 150,
+						align: 'center',
+					},
+				],
+				tbody: [],
+				num: [{
+					name: '待审核',
+					value: 1,
+				},
+				{
+					name: '第一次审核完成',
+					value: 2,
+				},
+				{
+					name: '已拒绝',
+					value: -1,
+				}],
+				orderDatalist: null,
+				loading: false,
+				FromData: null,
+				total: 0,
+				orderId: 0,
+				animal: 1,
+				pagination: {
+					page: 1,
+					limit: 15,
+					refund_status: 1,
+					order_id: '',
+					time: '',
+					refund_type: 0,
+				},
+				options: {
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date()
+								const start = new Date()
+								start.setTime(
+									new Date(
+										new Date().getFullYear(),
+										new Date().getMonth(),
+										new Date().getDate()
+									)
+								)
+								return [start, end]
+							},
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date()
+								const start = new Date()
+								start.setTime(
+									start.setTime(
+										new Date(
+											new Date().getFullYear(),
+											new Date().getMonth(),
+											new Date().getDate() - 1
+										)
+									)
+								)
+								end.setTime(
+									end.setTime(
+										new Date(
+											new Date().getFullYear(),
+											new Date().getMonth(),
+											new Date().getDate() - 1
+										)
+									)
+								)
+								return [start, end]
+							},
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date()
+								const start = new Date()
+								start.setTime(
+									start.setTime(
+										new Date(
+											new Date().getFullYear(),
+											new Date().getMonth(),
+											new Date().getDate() - 6
+										)
+									)
+								)
+								return [start, end]
+							},
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date()
+								const start = new Date()
+								start.setTime(
+									start.setTime(
+										new Date(
+											new Date().getFullYear(),
+											new Date().getMonth(),
+											new Date().getDate() - 29
+										)
+									)
+								)
+								return [start, end]
+							},
+						},
+						{
+							text: "上月",
+							value() {
+								const end = new Date();
+								const start = new Date();
+								const day = new Date(start.getFullYear(), start.getMonth(), 0).getDate();
+								start.setTime(
+									start.setTime(
+										new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1)
+									)
+								);
+								end.setTime(
+									end.setTime(
+										new Date(new Date().getFullYear(), new Date().getMonth() - 1, day)
+									)
+								);
+								return [start, end];
+							},
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date()
+								const start = new Date()
+								start.setTime(
+									start.setTime(
+										new Date(new Date().getFullYear(), new Date().getMonth(), 1)
+									)
+								)
+								return [start, end]
+							},
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date()
+								const start = new Date()
+								start.setTime(
+									start.setTime(new Date(new Date().getFullYear(), 0, 1))
+								)
+								return [start, end]
+							},
+						},
+					],
+				},
+				timeVal: [],
+				modal: false,
+				qrcode: null,
+				name: '',
+				spin: false,
+				rowActive: {},
+			}
+		},
+		computed: {
+			...mapState('order', ['orderChartType']),
+			// ...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 75
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'right'
+			},
+		},
+		created() {
+			this.getOrderList()
+			// this.getYgList()
+		},
+		methods: {
+			
+			cancal() {
+				this.modals = false
+				this.remark = ''
+			},
+			//goCancal
+			goCancal() {
+				if(this.remark == '' ) {
+					return this.$Message.error('请输入退款理由')
+				}
+				
+				
+				this.modals = false
+			},
+			showTime(time) {
+				var date = new Date(time * 1000);
+				var year = date.getFullYear(); // 获取年份
+				var month = ("0" + (date.getMonth() + 1)).slice(-2); // 获取月份(注意月份从 0 开始,需要加 1)
+				var day = ("0" + date.getDate()).slice(-2); // 获取日期
+				var hours = ("0" + date.getHours()).slice(-2); // 获取小时
+				var minutes = ("0" + date.getMinutes()).slice(-2); // 获取分钟
+				var seconds = ("0" + date.getSeconds()).slice(-2); // 获取秒钟
+				var dateString = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds; // 自定义时间格式
+				return dateString
+			},
+			showPrice(list) {
+				let price = 0;
+				list.forEach(item => {
+					price += item.pay_price * 1
+				})
+				return price
+			},
+			onchangeCode(e) {
+				this.animal = e
+				this.qrcodeShow()
+			},
+			// 具体日期搜索();
+			onchangeTime(e) {
+				this.pagination.page = 1
+				this.timeVal = e
+				this.pagination.time = this.timeVal[0] ? this.timeVal.join('-') : ''
+				this.getOrderList()
+			},
+			// 操作
+			changeMenu(row, name) {
+				let titile;
+				if(name == 1) {
+					titile = '通过该退款审核?'
+					this.delfromData = {
+						title: titile,
+						url: `/refund/agree/${id}`,
+						method: 'get',
+						ids: {
+							id: row.id,
+							
+						}
+					}
+					this.$modalSure(this.delfromData)
+						.then((res) => {
+							this.$Message.success(res.msg)
+							this.getOrderList()
+							this.getData(this.orderId, 1)
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg)
+						})
+				}else {
+					titile = '拒绝该退款审核?'
+					this.modals = true
+				}
+				
+			},
+			// 获取退款表单数据
+			getRefundData(id, refund_type) {
+				if (refund_type == 2) {
+					this.delfromData = {
+						title: '立即退货',
+						url: `/service/refund_order_examine`,
+						method: 'post',
+						ids: {
+							id
+						}
+					}
+					this.$modalSure(this.delfromData)
+						.then((res) => {
+							this.$Message.success(res.msg)
+							this.getOrderList()
+							// this.getData(this.orderId, 1)
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg)
+						})
+				} else {
+					this.$modalForm(getRefundOrderFrom(id)).then(() => {
+						this.getOrderList()
+						this.getData(this.orderId, 1)
+						this.$emit('changeGetTabs')
+					})
+				}
+			},
+			// 获取退积分表单数据
+			getRefundIntegral(id) {
+				refundIntegral(id)
+					.then(async (res) => {
+						this.FromData = res.data
+						this.$refs.edits.modals = true
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 获取详情表单数据
+			getData(id, type) {
+				getRefundDataInfo(id)
+					.then(async (res) => {
+						if (!type) {
+							this.$refs.detailss.modals = true
+						}
+						this.$refs.detailss.activeName = 'detail'
+						this.orderDatalist = res.data
+						// if (this.orderDatalist.orderInfo.refund_reason_wap_img) {
+						//   try {
+						//     this.orderDatalist.orderInfo.refund_reason_wap_img = JSON.parse(
+						//       this.orderDatalist.orderInfo.refund_reason_wap_img
+						//     );
+						//   } catch (e) {
+						//     this.orderDatalist.orderInfo.refund_reason_wap_img = [];
+						//   }
+						// }
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+			// 删除单条订单
+			delOrder(row, data) {
+				if (row.is_del === 1) {
+					this.$modalSure(data)
+						.then((res) => {
+							this.$Message.success(res.msg)
+							this.getOrderList()
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg)
+						})
+				} else {
+					const title = '错误!'
+					const content =
+						'<p>您选择的的订单存在用户未删除的订单,无法删除用户未删除的订单!</p>'
+					this.$Modal.error({
+						title: title,
+						content: content,
+					})
+				}
+			},
+			// 修改成功
+			submitFail() {
+				this.getOrderList()
+				this.getData(this.orderId, 1)
+			},
+			// 订单选择状态
+			selectChange2(tab) {
+				this.pagination.page = 1
+				this.pagination.refund_status = tab
+				this.getOrderList(tab)
+			},
+			// 不退款表单数据
+			getNoRefundData(id) {
+				this.$modalForm(getnoRefund(id)).then(() => {
+					this.getOrderList()
+					this.getData(this.orderId, 1)
+					this.$emit('changeGetTabs')
+				})
+			},
+			// 订单列表
+			getOrderList() {
+				this.loading = true
+				getServeOrder(this.pagination)
+					.then((res) => {
+						this.loading = false
+						const {
+							count,
+							list,
+							num
+						} = res.data
+						this.total = count
+						this.tbody = list
+						num.forEach((item, index) => {
+							num[index] = ((Object.assign({}, item, {
+								value: index
+							})))
+
+						})
+						this.num = num
+						list.forEach((item) => {
+							if (item.id == this.orderId) {
+								this.rowActive = item
+							}
+						})
+					})
+					.catch((err) => {
+						this.loading = false
+						this.$Message.error(err.msg)
+					})
+			},
+			// 分页
+			pageChange(index) {
+				this.pagination.page = index
+				this.getOrderList()
+			},
+			nameSearch() {
+				this.pagination.page = 1
+				this.getOrderList()
+			},
+			// 订单搜索
+			orderSearch() {
+				this.pagination.page = 1
+				console.log(111)
+				this.getOrderList()
+			},
+			// 配送信息表单数据
+			delivery(row) {
+				getDistribution(row.id)
+					.then(async (res) => {
+						this.FromData = res.data
+						this.$refs.edits.modals = true
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	/deep/.ivu-select-selected-value {
+		font-size: 12px !important;
+	}
+
+	.code {
+		position: relative;
+	}
+
+	.QRpic {
+		width: 180px;
+		height: 259px;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.search {
+		width: 86px;
+		height: 32px;
+	}
+
+	.tabBox {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		align-items: center;
+
+		.tabBox_img {
+			width: 36px;
+			height: 36px;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.tabBox_tit {
+			width: 60%;
+			font-size: 12px !important;
+			margin: 0 2px 0 10px;
+			letter-spacing: 1px;
+			padding: 5px 0;
+			box-sizing: border-box;
+		}
+	}
+
+	.pictrue-box {
+		display: flex;
+		align-item: center;
+	}
+
+	.pictrue {
+		width: 25px;
+		height: 25px;
+	}
+</style>

+ 101 - 51
src/pages/order/serveRefund/index.vue

@@ -13,28 +13,13 @@
 				<Row type="flex" class="mt10">
 					<Col class="ivu-text-left mr">
 					<FormItem label="订单状态:">
-						<Select v-model="pagination.refund_type" style="width: 250px"
-							@on-change="selectChange2(pagination.refund_type)">
+						<Select v-model="pagination.refund_status" style="width: 250px"
+							@on-change="selectChange2(pagination.refund_status)">
 							<Option v-for="item in num" :key="item.value" :value="item.value">{{ item.name }}</Option>
 						</Select>
-						<!-- <RadioGroup
-              v-model="pagination.refund_type"
-              type="button"
-              @on-change="selectChange2(pagination.refund_type)"
-            >
-              <Radio v-for="(item, index) in num" :key="index" :label="index"
-                >{{ item.name }} {{ '(' + item.num + ')' }}</Radio
-              >
-            </RadioGroup> -->
-					</FormItem>
-					</Col>
-					<Col class="ml15">
-					<FormItem label="退款时间:">
-						<DatePicker :editable="false" @on-change="onchangeTime" :value="timeVal" format="yyyy/MM/dd"
-							type="daterange" placement="bottom-start" placeholder="自定义时间" style="width: 250px"
-							:options="options"></DatePicker>
 					</FormItem>
 					</Col>
+					
 					<Col class="ivu-text-left">
 					<FormItem label="订单搜索:" label-for="title">
 						<Input enter-button v-model="pagination.order_id" placeholder="请输入订单号" style="width: 250px" />
@@ -66,7 +51,8 @@
 					<div v-else-if="row.refund_status == 5">已部分退款</div>
 					<div v-else-if="row.refund_status == -1">
 						<div>拒绝退款</div>
-						<div>原因:{{ row.refuse_reason }}</div>
+						<div>第一次审核意见:{{ row.first_remarks }}</div>
+						<div>第二次审核意见:{{ row.second_remarks }}</div>
 					</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="info">
@@ -104,8 +90,8 @@
 				</template>
 				<template slot-scope="{ row, index }" slot="action">
 					<a @click="changeMenu(row, 1)" v-show="[1].includes(row.refund_status)">通过</a>
-					<Divider type="vertical" v-show="[1].includes(row.refund_status)"/>
-					<a @click="changeMenu(row, 0)">拒绝</a>
+					<Divider type="vertical" v-show="[1].includes(row.refund_status)" />
+					<a @click="changeMenu(row, 0)" v-show="[1].includes(row.refund_status)">拒绝</a>
 				</template>
 			</Table>
 			<div class="acea-row row-right page">
@@ -122,6 +108,18 @@
 		<order-remark ref="remarks" remarkType="refund" :orderId="orderId" @submitFail="submitFail"></order-remark>
 		<!-- 记录 -->
 		<order-record ref="record"></order-record>
+		<Modal v-model="modals" scrollable title="拒绝原因" class="order_box" :closable="false">
+			<Form :label-width="80" @submit.native.prevent>
+				<FormItem label="原因:" prop="remark">
+					<Input v-model="remark" maxlength="200" show-word-limit type="textarea" placeholder="订单备注"
+						style="width: 100%" />
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button type="primary" @click="goCancal">提交</Button>
+				<Button @click="cancal">取消</Button>
+			</div>
+		</Modal>
 	</div>
 </template>
 
@@ -138,7 +136,8 @@
 		refundIntegral,
 		getDistribution,
 		getRefundOrderFrom,
-		getServeRefund
+		getServeRefund,
+		serveRefund 
 	} from '@/api/order'
 	import editFrom from '@/components/from/from'
 	import detailsFrom from '../orderList/components/orderDetails'
@@ -153,6 +152,8 @@
 		},
 		data() {
 			return {
+				remark: '',
+				modals: false,
 				grid: {
 					xl: 7,
 					lg: 7,
@@ -187,7 +188,7 @@
 						minWidth: 70,
 					},
 					{
-						title: '发起退款时间',
+						title: '下单时间',
 						slot: 'add_time',
 						minWidth: 100,
 					},
@@ -196,21 +197,6 @@
 						slot: 'refund_status',
 						minWidth: 100,
 					},
-					// {
-					// 	title: '退款信息',
-					// 	slot: 'statusName',
-					// 	minWidth: 100,
-					// },
-					// {
-					// 	title: '退货信息',
-					// 	slot: 'statusGoodName',
-					// 	minWidth: 100,
-					// },
-					// {
-					// 	title: '售后备注',
-					// 	key: 'remark',
-					// 	minWidth: 80,
-					// },
 					{
 						title: '操作',
 						slot: 'action',
@@ -220,7 +206,19 @@
 					},
 				],
 				tbody: [],
-				num: [],
+				num: [{
+						name: '待审核',
+						value: 1,
+					},
+					{
+						name: '第一次审核完成',
+						value: 2,
+					},
+					{
+						name: '已拒绝',
+						value: -1,
+					}
+				],
 				orderDatalist: null,
 				loading: false,
 				FromData: null,
@@ -378,6 +376,31 @@
 			this.getOrderList()
 		},
 		methods: {
+
+			cancal() {
+				this.modals = false
+				this.remark = ''
+			},
+			//goCancal
+			goCancal() {
+				if (this.remark == '') {
+					return this.$Message.error('请输入拒绝理由')
+				}
+				serveRefund({
+					id: this.delfromData.ids.id,
+					status: 0,
+					remarks: this.remark,
+					refund_status: this.delfromData.ids.refund_status
+				}).then(res => {
+					this.getOrderList()
+					this.$Message.success(res.msg)
+					this.remark = ''
+				}).catch((res) => {
+					this.$Message.error(res.msg)
+				})
+
+				this.modals = false
+			},
 			showTime(time) {
 				var date = new Date(time * 1000);
 				var year = date.getFullYear(); // 获取年份
@@ -410,35 +433,62 @@
 			// 操作
 			changeMenu(row, name) {
 				let titile;
-				if(name == 1) {
+				let that = this
+				if (name == 1) {
 					titile = '通过该退款审核?'
-				}else {
-					titile = '拒绝该退款审核?'
-				}
-				this.delfromData = {
-					title: titile,
-					url: `/refund/agree/${id}`,
-					method: 'get',
+					this.delfromData = {
+						title: titile,
+						url: `/refund/refund_order_examine`,
+						method: 'post',
+						ids: {
+							id: row.id,
+							status: 1,
+							remakes: '通过',
+							refund_status: row.refund_status
+						}
+					}
+					this.$modalSure(this.delfromData)
+						.then((res) => {
+							this.$Message.success(res.msg)
+							this.getOrderList()
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg)
+						})
+				} else {
+					this.delfromData = {
+						title: titile,
+						url: `/refund/refund_order_examine`,
+						method: 'post',
+						ids: {
+							id: row.id,
+							status: 0,
+							refund_status: row.refund_status
+						}
+					}
+					this.modals = true
 				}
+
 			},
 			// 获取退款表单数据
 			getRefundData(id, refund_type) {
 				if (refund_type == 2) {
 					this.delfromData = {
 						title: '立即退货',
-						url: `/refund/agree/${id}`,
-						method: 'get',
+						url: `/service/refund_order_examine`,
+						method: 'post',
 					}
 					this.$modalSure(this.delfromData)
 						.then((res) => {
 							this.$Message.success(res.msg)
 							this.getOrderList()
-							this.getData(this.orderId, 1)
+							// this.getData(this.orderId, 1)
 						})
 						.catch((res) => {
 							this.$Message.error(res.msg)
 						})
 				} else {
+
 					this.$modalForm(getRefundOrderFrom(id)).then(() => {
 						this.getOrderList()
 						this.getData(this.orderId, 1)
@@ -510,7 +560,7 @@
 			// 订单选择状态
 			selectChange2(tab) {
 				this.pagination.page = 1
-				this.pagination.refund_type = tab
+				this.pagination.refund_status = tab
 				this.getOrderList(tab)
 			},
 			// 不退款表单数据

+ 9 - 0
src/router/modules/order.js

@@ -34,6 +34,15 @@ export default {
 			},
 			component: () => import('@/pages/order/orderList/index')
 		},
+		{
+			path: 'serveOrder',
+			name: `${pre}serveOrder`,
+			meta: {
+				auth: ['store-order-serveOrder'],
+				title: '预约订单'
+			},
+			component: () => import('@/pages/order/serveOrder/index')
+		},
 		{
 			path: 'split_list',
 			name: `${pre}split_list`,