Browse Source

yshop1.7.1,修复后台表单等问题题

master
hupeng 5 years ago
parent
commit
82430ae52a
  1. 18
      src/api/yxStoreOrder.js
  2. 18
      src/utils/index.js
  3. 4
      src/views/activity/bargain/form.vue
  4. 4
      src/views/activity/bargain/index.vue
  5. 51
      src/views/shop/order/detail.vue
  6. 196
      src/views/shop/order/edit.vue
  7. 337
      src/views/shop/order/form-bak.vue
  8. 22
      src/views/shop/order/form.vue
  9. 212
      src/views/shop/order/index.vue
  10. 10
      src/views/shop/order/refund.vue
  11. 193
      src/views/shop/order/remark.vue

18
src/api/yxStoreOrder.js

@ -31,9 +31,25 @@ export function refund(data) {
}) })
} }
export function editOrder(data) {
return request({
url: 'api/yxStoreOrder/edit',
method: 'post',
data
})
}
export function remark(data) {
return request({
url: 'api/yxStoreOrder/remark',
method: 'post',
data
})
}
export function get() { export function get() {
return request({ return request({
url: 'api/yxExpress', url: 'api/yxExpress',
method: 'get' method: 'get',
}) })
} }

18
src/utils/index.js

@ -91,6 +91,24 @@ export function formatTime(time, option) {
} }
} }
export function formatTimeTwo(time) {
time = time * 1000
const d = new Date(time)
return (
d.getFullYear()+'年'+
(d.getMonth() + 1) +
'月' +
d.getDate() +
'日' +
d.getHours() +
'时' +
d.getMinutes() +
'分'
)
}
/** /**
* @param {string} url * @param {string} url
* @returns {Object} * @returns {Object}

4
src/views/activity/bargain/form.vue

@ -11,7 +11,7 @@
<el-input v-model="form.unitName" style="width: 500px;" /> <el-input v-model="form.unitName" style="width: 500px;" />
</el-form-item> </el-form-item>
<el-form-item label="秒杀开始时间"> <el-form-item label="活动开始时间">
<template> <template>
<el-date-picker <el-date-picker
v-model="form.startTimeDate" v-model="form.startTimeDate"
@ -20,7 +20,7 @@
/> />
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="秒杀结束时间"> <el-form-item label="活动结束时间">
<template> <template>
<el-date-picker <el-date-picker
v-model="form.endTimeDate" v-model="form.endTimeDate"

4
src/views/activity/bargain/index.vue

@ -158,7 +158,9 @@ export default {
postage: data.postage, postage: data.postage,
rule: data.rule, rule: data.rule,
look: data.look, look: data.look,
share: data.share share: data.share,
startTimeDate: new Date(data.startTimeDate),
endTimeDate: new Date(data.endTimeDate)
} }
_this.dialog = true _this.dialog = true
} }

51
src/views/shop/order/detail.vue

@ -3,12 +3,11 @@
<el-card> <el-card>
<div slot="header"> <div slot="header">
<span>收货信息</span> <span>收货信息</span>
<!--<el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
</div> </div>
<div>用户昵称:{{ form.nickname }}</div> <div class="text item">用户昵称:{{ form.nickname }}</div>
<div>收货人: {{ form.realName }}</div> <div class="text item">收货人: {{ form.realName }}</div>
<div>联系电话: {{ form.userPhone }}</div> <div class="text item">联系电话: {{ form.userPhone }}</div>
<div>收货地址: {{ form.userAddress }}</div> <div class="text item">收货地址: {{ form.userAddress }}</div>
</el-card> </el-card>
<el-card> <el-card>
<div slot="header"> <div slot="header">
@ -16,21 +15,34 @@
</div> </div>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<div>订单编号: {{ form.orderId }}</div> <div class="text item">订单编号: {{ form.orderId }}</div>
<div>商品总数: {{ form.totalNum }}</div> <div class="text item">商品总数: {{ form.totalNum }}</div>
<div>支付邮费: {{ form.totalPostage }}</div> <div class="text item">支付邮费: {{ form.totalPostage }}</div>
<div>实际支付: {{ form.payPrice }}</div> <div class="text item">实际支付: {{ form.payPrice }}</div>
<div>支付方式: {{ form.payTypeName }}</div> <div class="text item">支付方式: {{ form.payTypeName }}</div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div>订单状态: {{ form.statusName }}</div> <div class="text item">订单状态: {{ form.statusName }}</div>
<div>商品总价: {{ form.totalPrice }}</div> <div class="text item">商品总价: {{ form.totalPrice }}</div>
<div>优惠券金额: {{ form.couponPrice }}</div> <div class="text item">优惠券金额: {{ form.couponPrice }}</div>
<div>创建时间: {{ formatTime(form.addTime) }}</div> <div class="text item">创建时间: {{ formatTime(form.addTime) }}</div>
<div>支付时间: {{ formatTime(form.payTime) }}</div> <div class="text item">支付时间: {{ formatTime(form.payTime) }}</div>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card>
<div slot="header">
<span>物流信息</span>
</div>
<div class="text item">快递公司:{{ form.deliveryName }}</div>
<div class="text item">快递单号:{{ form.deliveryId }}</div>
</el-card>
<el-card>
<div slot="header">
<span>备注信息</span>
</div>
<div class="text item">{{ form.remark }}</div>
</el-card>
</el-dialog> </el-dialog>
</template> </template>
@ -103,7 +115,7 @@ export default {
rules: { rules: {
unique: [ unique: [
{ required: true, message: 'please enter', trigger: 'blur' } { required: true, message: 'please enter', trigger: 'blur' }
] ],
} }
} }
}, },
@ -210,5 +222,12 @@ export default {
</script> </script>
<style scoped> <style scoped>
.text {
font-size: 12px;
}
.item {
padding: 6px 0;
}
</style> </style>

196
src/views/shop/order/edit.vue

@ -0,0 +1,196 @@
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="订单号" >
<el-input v-model="form.orderId" :disabled="true" style="width: 370px;" />
</el-form-item>
<el-form-item label="原始邮费" >
<el-input v-model="form.totalPostage" :disabled="true" style="width: 370px;" />
</el-form-item>
<el-form-item label="实际支付" >
<el-input v-model="form.payPrice" style="width: 370px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, editOrder } from '@/api/yxStoreOrder'
export default {
props: {
isAdd: {
type: Boolean,
required: true
}
},
data() {
return {
loading: false, dialog: false,
form: {
id: '',
orderId: '',
uid: '',
realName: '',
userPhone: '',
userAddress: '',
cartId: '',
freightPrice: '',
totalNum: '',
totalPrice: '',
totalPostage: '',
payPrice: '',
payPostage: '',
deductionPrice: '',
couponId: '',
couponPrice: '',
paid: '',
payTime: '',
payType: '',
addTime: '',
status: '',
refundStatus: '',
refundReasonWapImg: '',
refundReasonWapExplain: '',
refundReasonTime: '',
refundReasonWap: '',
refundReason: '',
refundPrice: '',
deliveryName: '',
deliveryType: '',
deliveryId: '',
gainIntegral: '',
useIntegral: '',
backIntegral: '',
mark: '',
isDel: '',
unique: '',
remark: '',
merId: '',
isMerCheck: '',
combinationId: '',
pinkId: '',
cost: '',
seckillId: '',
bargainId: '',
verifyCode: '',
storeId: '',
shippingType: '',
isChannel: '',
isRemind: '',
isSystemDel: ''
},
rules: {
unique: [
{ required: true, message: 'please enter', trigger: 'blur' }
],
}
}
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
editOrder(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: '',
orderId: '',
uid: '',
realName: '',
userPhone: '',
userAddress: '',
cartId: '',
freightPrice: '',
totalNum: '',
totalPrice: '',
totalPostage: '',
payPrice: '',
payPostage: '',
deductionPrice: '',
couponId: '',
couponPrice: '',
paid: '',
payTime: '',
payType: '',
addTime: '',
status: '',
refundStatus: '',
refundReasonWapImg: '',
refundReasonWapExplain: '',
refundReasonTime: '',
refundReasonWap: '',
refundReason: '',
refundPrice: '',
deliveryName: '',
deliveryType: '',
deliveryId: '',
gainIntegral: '',
useIntegral: '',
backIntegral: '',
mark: '',
isDel: '',
unique: '',
remark: '',
merId: '',
isMerCheck: '',
combinationId: '',
pinkId: '',
cost: '',
seckillId: '',
bargainId: '',
verifyCode: '',
storeId: '',
shippingType: '',
isChannel: '',
isRemind: '',
isSystemDel: ''
}
}
}
}
</script>
<style scoped>
</style>

337
src/views/shop/order/form-bak.vue

@ -1,337 +0,0 @@
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="订单号">
<el-input v-model="form.orderId" style="width: 370px;" />
</el-form-item>
<el-form-item label="用户id">
<el-input v-model="form.uid" style="width: 370px;" />
</el-form-item>
<el-form-item label="用户姓名">
<el-input v-model="form.realName" style="width: 370px;" />
</el-form-item>
<el-form-item label="用户电话">
<el-input v-model="form.userPhone" style="width: 370px;" />
</el-form-item>
<el-form-item label="详细地址">
<el-input v-model="form.userAddress" style="width: 370px;" />
</el-form-item>
<el-form-item label="购物车id">
<el-input v-model="form.cartId" style="width: 370px;" />
</el-form-item>
<el-form-item label="运费金额">
<el-input v-model="form.freightPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="订单商品总数">
<el-input v-model="form.totalNum" style="width: 370px;" />
</el-form-item>
<el-form-item label="订单总价">
<el-input v-model="form.totalPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="邮费">
<el-input v-model="form.totalPostage" style="width: 370px;" />
</el-form-item>
<el-form-item label="实际支付金额">
<el-input v-model="form.payPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="支付邮费">
<el-input v-model="form.payPostage" style="width: 370px;" />
</el-form-item>
<el-form-item label="抵扣金额">
<el-input v-model="form.deductionPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="优惠券id">
<el-input v-model="form.couponId" style="width: 370px;" />
</el-form-item>
<el-form-item label="优惠券金额">
<el-input v-model="form.couponPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="支付状态">
<el-input v-model="form.paid" style="width: 370px;" />
</el-form-item>
<el-form-item label="支付时间">
<el-input v-model="form.payTime" style="width: 370px;" />
</el-form-item>
<el-form-item label="支付方式">
<el-input v-model="form.payType" style="width: 370px;" />
</el-form-item>
<el-form-item label="创建时间">
<el-input v-model="form.addTime" style="width: 370px;" />
</el-form-item>
<el-form-item label="订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款)">
<el-input v-model="form.status" style="width: 370px;" />
</el-form-item>
<el-form-item label="0 未退款 1 申请中 2 已退款">
<el-input v-model="form.refundStatus" style="width: 370px;" />
</el-form-item>
<el-form-item label="退款图片">
<el-input v-model="form.refundReasonWapImg" style="width: 370px;" />
</el-form-item>
<el-form-item label="退款用户说明">
<el-input v-model="form.refundReasonWapExplain" style="width: 370px;" />
</el-form-item>
<el-form-item label="退款时间">
<el-input v-model="form.refundReasonTime" style="width: 370px;" />
</el-form-item>
<el-form-item label="前台退款原因">
<el-input v-model="form.refundReasonWap" style="width: 370px;" />
</el-form-item>
<el-form-item label="不退款的理由">
<el-input v-model="form.refundReason" style="width: 370px;" />
</el-form-item>
<el-form-item label="退款金额">
<el-input v-model="form.refundPrice" style="width: 370px;" />
</el-form-item>
<el-form-item label="快递名称/送货人姓名">
<el-input v-model="form.deliveryName" style="width: 370px;" />
</el-form-item>
<el-form-item label="发货类型">
<el-input v-model="form.deliveryType" style="width: 370px;" />
</el-form-item>
<el-form-item label="快递单号/手机号">
<el-input v-model="form.deliveryId" style="width: 370px;" />
</el-form-item>
<el-form-item label="消费赚取积分">
<el-input v-model="form.gainIntegral" style="width: 370px;" />
</el-form-item>
<el-form-item label="使用积分">
<el-input v-model="form.useIntegral" style="width: 370px;" />
</el-form-item>
<el-form-item label="给用户退了多少积分">
<el-input v-model="form.backIntegral" style="width: 370px;" />
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.mark" style="width: 370px;" />
</el-form-item>
<el-form-item label="是否删除">
<el-input v-model="form.isDel" style="width: 370px;" />
</el-form-item>
<el-form-item label="唯一id(md5加密)类似id" prop="unique">
<el-input v-model="form.unique" style="width: 370px;" />
</el-form-item>
<el-form-item label="管理员备注">
<el-input v-model="form.remark" style="width: 370px;" />
</el-form-item>
<el-form-item label="商户ID">
<el-input v-model="form.merId" style="width: 370px;" />
</el-form-item>
<el-form-item label="isMerCheck">
<el-input v-model="form.isMerCheck" style="width: 370px;" />
</el-form-item>
<el-form-item label="拼团产品id0一般产品">
<el-input v-model="form.combinationId" style="width: 370px;" />
</el-form-item>
<el-form-item label="拼团id 0没有拼团">
<el-input v-model="form.pinkId" style="width: 370px;" />
</el-form-item>
<el-form-item label="成本价">
<el-input v-model="form.cost" style="width: 370px;" />
</el-form-item>
<el-form-item label="秒杀产品ID">
<el-input v-model="form.seckillId" style="width: 370px;" />
</el-form-item>
<el-form-item label="砍价id">
<el-input v-model="form.bargainId" style="width: 370px;" />
</el-form-item>
<el-form-item label="核销码">
<el-input v-model="form.verifyCode" style="width: 370px;" />
</el-form-item>
<el-form-item label="门店id">
<el-input v-model="form.storeId" style="width: 370px;" />
</el-form-item>
<el-form-item label="配送方式 1=快递 ,2=门店自提">
<el-input v-model="form.shippingType" style="width: 370px;" />
</el-form-item>
<el-form-item label="支付渠道(0微信公众号1微信小程序)">
<el-input v-model="form.isChannel" style="width: 370px;" />
</el-form-item>
<el-form-item label="isRemind">
<el-input v-model="form.isRemind" style="width: 370px;" />
</el-form-item>
<el-form-item label="isSystemDel">
<el-input v-model="form.isSystemDel" style="width: 370px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, edit } from '@/api/yxStoreOrder'
export default {
props: {
isAdd: {
type: Boolean,
required: true
}
},
data() {
return {
loading: false, dialog: false,
form: {
id: '',
orderId: '',
uid: '',
realName: '',
userPhone: '',
userAddress: '',
cartId: '',
freightPrice: '',
totalNum: '',
totalPrice: '',
totalPostage: '',
payPrice: '',
payPostage: '',
deductionPrice: '',
couponId: '',
couponPrice: '',
paid: '',
payTime: '',
payType: '',
addTime: '',
status: '',
refundStatus: '',
refundReasonWapImg: '',
refundReasonWapExplain: '',
refundReasonTime: '',
refundReasonWap: '',
refundReason: '',
refundPrice: '',
deliveryName: '',
deliveryType: '',
deliveryId: '',
gainIntegral: '',
useIntegral: '',
backIntegral: '',
mark: '',
isDel: '',
unique: '',
remark: '',
merId: '',
isMerCheck: '',
combinationId: '',
pinkId: '',
cost: '',
seckillId: '',
bargainId: '',
verifyCode: '',
storeId: '',
shippingType: '',
isChannel: '',
isRemind: '',
isSystemDel: ''
},
rules: {
unique: [
{ required: true, message: 'please enter', trigger: 'blur' }
]
}
}
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: '',
orderId: '',
uid: '',
realName: '',
userPhone: '',
userAddress: '',
cartId: '',
freightPrice: '',
totalNum: '',
totalPrice: '',
totalPostage: '',
payPrice: '',
payPostage: '',
deductionPrice: '',
couponId: '',
couponPrice: '',
paid: '',
payTime: '',
payType: '',
addTime: '',
status: '',
refundStatus: '',
refundReasonWapImg: '',
refundReasonWapExplain: '',
refundReasonTime: '',
refundReasonWap: '',
refundReason: '',
refundPrice: '',
deliveryName: '',
deliveryType: '',
deliveryId: '',
gainIntegral: '',
useIntegral: '',
backIntegral: '',
mark: '',
isDel: '',
unique: '',
remark: '',
merId: '',
isMerCheck: '',
combinationId: '',
pinkId: '',
cost: '',
seckillId: '',
bargainId: '',
verifyCode: '',
storeId: '',
shippingType: '',
isChannel: '',
isRemind: '',
isSystemDel: ''
}
}
}
}
</script>
<style scoped>
</style>

22
src/views/shop/order/form.vue

@ -1,19 +1,18 @@
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '去发货'" width="500px"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '去发货'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="快递公司"> <el-form-item label="快递公司" >
<!--<el-input v-model="form.deliveryName" style="width: 370px;"/>--> <!--<el-input v-model="form.deliveryName" style="width: 370px;"/>-->
<el-select v-model="form.deliveryName" filterable placeholder="请选择" style="width: 370px;"> <el-select v-model="form.deliveryName" filterable placeholder="请选择" style="width: 370px;">
<el-option <el-option
v-for="item in express" v-for="item in express"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id" />
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="快递单号"> <el-form-item label="快递单号" >
<el-input v-model="form.deliveryId" style="width: 370px;" /> <el-input v-model="form.deliveryId" style="width: 370px;"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -24,10 +23,13 @@
</template> </template>
<script> <script>
import initDict from '@/mixins/crud'
import { add, edit, get } from '@/api/yxStoreOrder' import { add, edit, get } from '@/api/yxStoreOrder'
export default { export default {
mixins: [initDict],
created() {
this.get()
},
props: { props: {
isAdd: { isAdd: {
type: Boolean, type: Boolean,
@ -46,14 +48,10 @@ export default {
rules: { rules: {
unique: [ unique: [
{ required: true, message: 'please enter', trigger: 'blur' } { required: true, message: 'please enter', trigger: 'blur' }
] ],
} }
} }
}, },
created() {
this.get()
},
methods: { methods: {
cancel() { cancel() {
this.resetForm() this.resetForm()

212
src/views/shop/order/index.vue

@ -4,25 +4,27 @@
<div class="head-container"> <div class="head-container">
<!-- 搜索 --> <!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" /> <el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px"> <el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" /> <el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select> </el-select>
<el-select v-model="status" clearable placeholder="订单状态" class="filter-item" style="width: 130px"> <el-select v-model="status" clearable placeholder="订单状态" class="filter-item" style="width: 130px">
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value">
/> </el-option>
</el-select> </el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button> <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 --> <!-- 新增 -->
</div> </div>
<!--表单组件--> <!--表单组件-->
<eForm ref="form" :is-add="isAdd" /> <eForm ref="form" :is-add="isAdd"/>
<eDetail ref="form1" :is-add="isAdd" /> <eDetail ref="form1" :is-add="isAdd"/>
<eRefund ref="form2" :is-add="isAdd" /> <eRefund ref="form2" :is-add="isAdd"/>
<editOrder ref="form3" :is-add="isAdd"/>
<eRemark ref="form4" :is-add="isAdd"/>
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="orderId" width="140" label="订单号"> <el-table-column prop="orderId" width="140" label="订单号">
@ -31,31 +33,27 @@
<p>{{ scope.row.pinkName }}</p> <p>{{ scope.row.pinkName }}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="realName" label="用户姓名" /> <el-table-column prop="realName" label="用户姓名"/>
<el-table-column prop="cartInfoList" width="300" label="商品信息"> <el-table-column prop="cartInfoList" width="300" label="商品信息">
<template slot-scope="scope"> <template slot-scope="scope" >
<div v-for="(item,index) in scope.row.cartInfoList"> <div v-for="(item,index) in scope.row.cartInfoList">
<span><img <span><img style="width: 30px;height: 30px;margin:0;cursor: pointer;"
style="width: 30px;height: 30px;margin:0;cursor: pointer;" :src="item.cartInfoMap.productInfo.image"/></span>
:src="item.cartInfoMap.productInfo.image" <span>{{item.cartInfoMap.productInfo.storeName}}</span>
></span> <span> | {{item.cartInfoMap.truePrice}}×{{item.cartInfoMap.cartNum}}</span>
<span>{{ item.cartInfoMap.productInfo.storeName }}</span>
<span> | {{ item.cartInfoMap.truePrice }}×{{ item.cartInfoMap.cartNum }}</span>
</div> </div>
<div v-for="(item,index) in scope.row.cartInfoList" v-if="item.cartInfoMap.productInfo.attrInfo"> <div v-if="item.cartInfoMap.productInfo.attrInfo" v-for="(item,index) in scope.row.cartInfoList">
<span> <span>
<img <img style="width: 30px;height: 30px;margin:0;cursor: pointer;"
style="width: 30px;height: 30px;margin:0;cursor: pointer;" :src="item.cartInfoMap.productInfo.attrInfo.image">
:src="item.cartInfoMap.productInfo.attrInfo.image"
>
</span> </span>
<span>{{ item.cartInfoMap.productInfo.storeName }}&nbsp;{{ item.cartInfoMap.productInfo.attrInfo.suk }}</span> <span>{{item.cartInfoMap.productInfo.storeName}}&nbsp;{{item.cartInfoMap.productInfo.attrInfo.suk}}</span>
<span> | {{ item.cartInfoMap.truePrice }}×{{ item.cartInfoMap.cartNum }}</span> <span> | {{item.cartInfoMap.truePrice}}×{{item.cartInfoMap.cartNum}}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payPrice" label="实际支付" /> <el-table-column prop="payPrice" label="实际支付"/>
<el-table-column prop="payTypeName" label="支付状态" /> <el-table-column prop="payTypeName" label="支付状态"/>
<el-table-column prop="statusName" label="订单状态"> <el-table-column prop="statusName" label="订单状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-html="scope.row.statusName">{{ scope.row.addTime }}</span> <span v-html="scope.row.statusName">{{ scope.row.addTime }}</span>
@ -68,43 +66,38 @@
</el-table-column> </el-table-column>
<el-table-column v-if="checkPermission(['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT','YXSTOREORDER_DELETE'])" label="操作" width="200" align="center"> <el-table-column v-if="checkPermission(['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT','YXSTOREORDER_DELETE'])" label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" size="mini" type="primary"
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" @click="detail(scope.row)">
size="mini"
type="primary"
@click="detail(scope.row)"
>
订单详情</el-button> 订单详情</el-button>
<el-dropdown size="mini" split-button type="primary" trigger="click"> <el-dropdown size="mini" split-button type="primary" trigger="click">
操作 操作
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item> <el-dropdown-item>
<el-button <el-button v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" size="mini" type="success"
v-if="scope.row._status == 2" @click="remark(scope.row)">
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" 订单备注</el-button>
size="mini" </el-dropdown-item>
type="primary" <el-dropdown-item>
@click="edit(scope.row)" <el-button v-if="scope.row._status == 2" v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" size="mini" type="primary"
> @click="edit(scope.row)">
去发货</el-button> 去发货</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item> <el-dropdown-item>
<el-button <el-button v-if="scope.row._status == 3" v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" size="mini" type="primary"
v-if="scope.row._status == 3" @click="refund(scope.row)">
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']"
size="mini"
type="primary"
@click="refund(scope.row)"
>
立刻退款</el-button> 立刻退款</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-if="scope.row._status == 1 || scope.row._status == 6 || scope.row._status == 7"> <el-dropdown-item v-if="scope.row._status == 1">
<el-button v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" size="mini" type="primary"
@click="editOrder(scope.row)">
修改订单</el-button>
</el-dropdown-item>
<el-dropdown-item v-if="scope.row._status == 1">
<el-popover <el-popover
:ref="scope.row.id"
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_DELETE']" v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_DELETE']"
:ref="scope.row.id"
placement="top" placement="top"
width="180" width="180">
>
<p>确定删除本条数据吗</p> <p>确定删除本条数据吗</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button> <el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
@ -126,8 +119,7 @@
style="margin-top: 8px;" style="margin-top: 8px;"
layout="total, prev, pager, next, sizes" layout="total, prev, pager, next, sizes"
@size-change="sizeChange" @size-change="sizeChange"
@current-change="pageChange" @current-change="pageChange"/>
/>
</div> </div>
</template> </template>
@ -138,9 +130,11 @@ import { del } from '@/api/yxStoreOrder'
import eForm from './form' import eForm from './form'
import eDetail from './detail' import eDetail from './detail'
import eRefund from './refund' import eRefund from './refund'
import editOrder from './edit'
import eRemark from './remark'
import { formatTime } from '@/utils/index' import { formatTime } from '@/utils/index'
export default { export default {
components: { eForm, eDetail, eRefund }, components: { eForm, eDetail, eRefund, editOrder, eRemark },
mixins: [initData], mixins: [initData],
data() { data() {
return { return {
@ -261,6 +255,122 @@ export default {
} }
_this.dialog = true _this.dialog = true
}, },
editOrder(data) {
this.isAdd = false
const _this = this.$refs.form3
_this.form = {
id: data.id,
orderId: data.orderId,
uid: data.uid,
realName: data.realName,
userPhone: data.userPhone,
userAddress: data.userAddress,
cartId: data.cartId,
freightPrice: data.freightPrice,
totalNum: data.totalNum,
totalPrice: data.totalPrice,
totalPostage: data.totalPostage,
payPrice: data.payPrice,
payPostage: data.payPostage,
deductionPrice: data.deductionPrice,
couponId: data.couponId,
couponPrice: data.couponPrice,
paid: data.paid,
payTime: data.payTime,
payType: data.payType,
addTime: data.addTime,
status: data.status,
refundStatus: data.refundStatus,
refundReasonWapImg: data.refundReasonWapImg,
refundReasonWapExplain: data.refundReasonWapExplain,
refundReasonTime: data.refundReasonTime,
refundReasonWap: data.refundReasonWap,
refundReason: data.refundReason,
refundPrice: data.refundPrice,
deliveryName: data.deliveryName,
deliveryType: data.deliveryType,
deliveryId: data.deliveryId,
gainIntegral: data.gainIntegral,
useIntegral: data.useIntegral,
backIntegral: data.backIntegral,
mark: data.mark,
isDel: data.isDel,
unique: data.unique,
remark: data.remark,
merId: data.merId,
isMerCheck: data.isMerCheck,
combinationId: data.combinationId,
pinkId: data.pinkId,
cost: data.cost,
seckillId: data.seckillId,
bargainId: data.bargainId,
verifyCode: data.verifyCode,
storeId: data.storeId,
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
isSystemDel: data.isSystemDel
}
_this.dialog = true
},
remark(data) {
this.isAdd = false
const _this = this.$refs.form4
_this.form = {
id: data.id,
orderId: data.orderId,
uid: data.uid,
realName: data.realName,
userPhone: data.userPhone,
userAddress: data.userAddress,
cartId: data.cartId,
freightPrice: data.freightPrice,
totalNum: data.totalNum,
totalPrice: data.totalPrice,
totalPostage: data.totalPostage,
payPrice: data.payPrice,
payPostage: data.payPostage,
deductionPrice: data.deductionPrice,
couponId: data.couponId,
couponPrice: data.couponPrice,
paid: data.paid,
payTime: data.payTime,
payType: data.payType,
addTime: data.addTime,
status: data.status,
refundStatus: data.refundStatus,
refundReasonWapImg: data.refundReasonWapImg,
refundReasonWapExplain: data.refundReasonWapExplain,
refundReasonTime: data.refundReasonTime,
refundReasonWap: data.refundReasonWap,
refundReason: data.refundReason,
refundPrice: data.refundPrice,
deliveryName: data.deliveryName,
deliveryType: data.deliveryType,
deliveryId: data.deliveryId,
gainIntegral: data.gainIntegral,
useIntegral: data.useIntegral,
backIntegral: data.backIntegral,
mark: data.mark,
isDel: data.isDel,
unique: data.unique,
remark: data.remark,
merId: data.merId,
isMerCheck: data.isMerCheck,
combinationId: data.combinationId,
pinkId: data.pinkId,
cost: data.cost,
seckillId: data.seckillId,
bargainId: data.bargainId,
verifyCode: data.verifyCode,
storeId: data.storeId,
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
isSystemDel: data.isSystemDel
}
_this.dialog = true
},
refund(data) { refund(data) {
this.isAdd = false this.isAdd = false
const _this = this.$refs.form2 const _this = this.$refs.form2

10
src/views/shop/order/refund.vue

@ -1,11 +1,11 @@
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '退款'" width="500px"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '退款'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="订单号"> <el-form-item label="订单号" >
<el-input v-model="form.orderId" :disabled="true" style="width: 370px;" /> <el-input v-model="form.orderId" :disabled="true" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="退款金额"> <el-form-item label="退款金额" >
<el-input v-model="form.payPrice" style="width: 370px;" /> <el-input v-model="form.payPrice" style="width: 370px;"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -83,7 +83,7 @@ export default {
rules: { rules: {
unique: [ unique: [
{ required: true, message: 'please enter', trigger: 'blur' } { required: true, message: 'please enter', trigger: 'blur' }
] ],
} }
} }
}, },

193
src/views/shop/order/remark.vue

@ -0,0 +1,193 @@
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="订单号" >
<el-input v-model="form.orderId" :disabled="true" style="width: 370px;" />
</el-form-item>
<el-form-item label="订单备注" >
<el-input v-model="form.remark" style="width: 370px;" rows="5" type="textarea"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import { add, remark } from '@/api/yxStoreOrder'
export default {
props: {
isAdd: {
type: Boolean,
required: true
}
},
data() {
return {
loading: false, dialog: false,
form: {
id: '',
orderId: '',
uid: '',
realName: '',
userPhone: '',
userAddress: '',
cartId: '',
freightPrice: '',
totalNum: '',
totalPrice: '',
totalPostage: '',
payPrice: '',
payPostage: '',
deductionPrice: '',
couponId: '',
couponPrice: '',
paid: '',
payTime: '',
payType: '',
addTime: '',
status: '',
refundStatus: '',
refundReasonWapImg: '',
refundReasonWapExplain: '',
refundReasonTime: '',
refundReasonWap: '',
refundReason: '',
refundPrice: '',
deliveryName: '',
deliveryType: '',
deliveryId: '',
gainIntegral: '',
useIntegral: '',
backIntegral: '',
mark: '',
isDel: '',
unique: '',
remark: '',
merId: '',
isMerCheck: '',
combinationId: '',
pinkId: '',
cost: '',
seckillId: '',
bargainId: '',
verifyCode: '',
storeId: '',
shippingType: '',
isChannel: '',
isRemind: '',
isSystemDel: ''
},
rules: {
unique: [
{ required: true, message: 'please enter', trigger: 'blur' }
],
}
}
},
methods: {
cancel() {
this.resetForm()
},
doSubmit() {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
},
doAdd() {
add(this.form).then(res => {
this.resetForm()
this.$notify({
title: '添加成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
doEdit() {
remark(this.form).then(res => {
this.resetForm()
this.$notify({
title: '修改成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: '',
orderId: '',
uid: '',
realName: '',
userPhone: '',
userAddress: '',
cartId: '',
freightPrice: '',
totalNum: '',
totalPrice: '',
totalPostage: '',
payPrice: '',
payPostage: '',
deductionPrice: '',
couponId: '',
couponPrice: '',
paid: '',
payTime: '',
payType: '',
addTime: '',
status: '',
refundStatus: '',
refundReasonWapImg: '',
refundReasonWapExplain: '',
refundReasonTime: '',
refundReasonWap: '',
refundReason: '',
refundPrice: '',
deliveryName: '',
deliveryType: '',
deliveryId: '',
gainIntegral: '',
useIntegral: '',
backIntegral: '',
mark: '',
isDel: '',
unique: '',
remark: '',
merId: '',
isMerCheck: '',
combinationId: '',
pinkId: '',
cost: '',
seckillId: '',
bargainId: '',
verifyCode: '',
storeId: '',
shippingType: '',
isChannel: '',
isRemind: '',
isSystemDel: ''
}
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save