|
|
@@ -1,12 +1,5 @@
|
|
|
<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>
|
|
|
@@ -17,24 +10,24 @@
|
|
|
@on-change="selectChange2(pagination.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>
|
|
|
+ <Col class="ivu-text-left mr">
|
|
|
+ <FormItem label="员工:">
|
|
|
+ <Select v-model="pagination.work_member_id" style="width: 250px">
|
|
|
+ <Option value="">全部</Option>
|
|
|
+ <Option v-for="item in ygList" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </Col>
|
|
|
+ <Col class="ivu-text-left mr">
|
|
|
+ <FormItem label="用户ID:" label-for="title">
|
|
|
+ <div class='flex-search'>
|
|
|
+ <Input v-model="pagination.uid" icon="ios-search" @on-click='openuid' placeholder="请输入用户ID"
|
|
|
+ class="input-add mr14" />
|
|
|
+ </div>
|
|
|
</FormItem>
|
|
|
- </Col> -->
|
|
|
+ </Col>
|
|
|
<Col class="ivu-text-left">
|
|
|
<FormItem label="订单搜索:" label-for="title">
|
|
|
<Input enter-button v-model="pagination.order_id" placeholder="请输入订单号" style="width: 250px" />
|
|
|
@@ -46,7 +39,6 @@
|
|
|
</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">
|
|
|
@@ -54,6 +46,10 @@
|
|
|
<span v-show="row.is_del === 1 && row.delete_time == null"
|
|
|
style="color: #ed4014; display: block">用户已删除</span>
|
|
|
</template>
|
|
|
+ <template slot-scope="{ row }" slot="real_name">
|
|
|
+ <div>用户名:{{ row.real_name }}()</div>
|
|
|
+ <div>手机号:{{ row.user_phone }}</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>
|
|
|
@@ -83,27 +79,8 @@
|
|
|
<template slot-scope="{ row, index }" slot="kf">
|
|
|
<span class="tabBox_pice">{{showName(row.work_member_id)}}</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>
|
|
|
+ <a @click="changeMenu(row, 0)" v-if="row.status == 0">修改员工</a>
|
|
|
</template>
|
|
|
</Table>
|
|
|
<div class="acea-row row-right page">
|
|
|
@@ -111,15 +88,6 @@
|
|
|
: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
|
|
|
@@ -141,6 +109,12 @@
|
|
|
<Button @click="cancal">取消</Button>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
+ <Modal v-model="userListShow" width='80' mask title="用户选择">
|
|
|
+ <userlist @getUserId='checkUser'></userlist>
|
|
|
+ <template #footer>
|
|
|
+ <Button @click="userListShow=false">取消</Button>
|
|
|
+ </template>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -152,62 +126,37 @@
|
|
|
getYgList
|
|
|
} from "@/api/check";
|
|
|
import {
|
|
|
- orderRefundList,
|
|
|
- getDataInfo,
|
|
|
- getRefundDataInfo,
|
|
|
- getRefundFrom,
|
|
|
- getnoRefund,
|
|
|
- refundIntegral,
|
|
|
- getDistribution,
|
|
|
- getRefundOrderFrom,
|
|
|
getServeOrder,
|
|
|
member_update
|
|
|
} 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'
|
|
|
+ import userlist from "@/components/userList/index";
|
|
|
export default {
|
|
|
components: {
|
|
|
- editFrom,
|
|
|
- detailsFrom,
|
|
|
- orderRemark,
|
|
|
- orderRecord
|
|
|
+ userlist
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 显示用户列表
|
|
|
+ userListShow: false,
|
|
|
order_id: '',
|
|
|
ygList: [],
|
|
|
chooseId: 0,
|
|
|
- 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,
|
|
|
+ minWidth: 160,
|
|
|
},
|
|
|
{
|
|
|
- title: '用户联系方式',
|
|
|
- key: 'user_phone',
|
|
|
- minWidth: 130,
|
|
|
+ title: '用户信息',
|
|
|
+ slot: 'real_name',
|
|
|
+ minWidth: 150,
|
|
|
},
|
|
|
{
|
|
|
title: '预约员工',
|
|
|
slot: 'kf',
|
|
|
- minWidth: 130,
|
|
|
+ minWidth: 80,
|
|
|
},
|
|
|
{
|
|
|
title: '商品信息',
|
|
|
@@ -222,12 +171,12 @@
|
|
|
{
|
|
|
title: '下单时间',
|
|
|
slot: 'add_time',
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 130,
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
slot: 'action',
|
|
|
- // fixed: "right",
|
|
|
+ fixed: "right",
|
|
|
minWidth: 150,
|
|
|
align: 'center',
|
|
|
},
|
|
|
@@ -245,152 +194,19 @@
|
|
|
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]
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ work_member_id:'',
|
|
|
+ order_id:'',
|
|
|
+ uid: '',
|
|
|
+ status: 0,
|
|
|
},
|
|
|
- timeVal: [],
|
|
|
- modal: false,
|
|
|
- qrcode: null,
|
|
|
- name: '',
|
|
|
- spin: false,
|
|
|
- rowActive: {},
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState('order', ['orderChartType']),
|
|
|
- // ...mapState("admin/layout", ["isMobile"]),
|
|
|
labelWidth() {
|
|
|
return this.isMobile ? undefined : 75
|
|
|
},
|
|
|
@@ -401,14 +217,21 @@
|
|
|
created() {
|
|
|
this.getOrderList()
|
|
|
this.getygList()
|
|
|
- // this.getYgList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 选中用户
|
|
|
+ checkUser(res) {
|
|
|
+ this.userListShow = false;
|
|
|
+ this.pagination.uid = res.uid;
|
|
|
+ },
|
|
|
+ // 打开弹窗
|
|
|
+ openuid(e) {
|
|
|
+ this.userListShow = true;
|
|
|
+ },
|
|
|
showName( id) {
|
|
|
let yg = this.ygList.find(item => {
|
|
|
return item.id == id
|
|
|
})
|
|
|
- console.log(yg,'ygygygyg')
|
|
|
return yg? yg.name: ''
|
|
|
},
|
|
|
getygList() {
|
|
|
@@ -422,9 +245,7 @@
|
|
|
},
|
|
|
cancal() {
|
|
|
this.modals = false
|
|
|
- this.remark = ''
|
|
|
},
|
|
|
- //goCancal
|
|
|
goCancal() {
|
|
|
if(this.chooseId == '' ) {
|
|
|
return this.$Message.error('请选择员工')
|
|
|
@@ -459,125 +280,17 @@
|
|
|
})
|
|
|
return price.toFixed(2)
|
|
|
},
|
|
|
- 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) {
|
|
|
this.modals = true
|
|
|
this.order_id = row.id
|
|
|
},
|
|
|
- // 获取退款表单数据
|
|
|
- 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
|
|
|
@@ -598,11 +311,6 @@
|
|
|
|
|
|
})
|
|
|
this.num = num
|
|
|
- list.forEach((item) => {
|
|
|
- if (item.id == this.orderId) {
|
|
|
- this.rowActive = item
|
|
|
- }
|
|
|
- })
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.loading = false
|
|
|
@@ -614,27 +322,11 @@
|
|
|
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>
|