Commit 3d4eb3a1 by wangql

提交4.10.0部分代码

1 parent 3de2f569
...@@ -59,3 +59,9 @@ export function commonConfigApi(data) { ...@@ -59,3 +59,9 @@ export function commonConfigApi(data) {
data.method = `${path}common.config.list` data.method = `${path}common.config.list`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// Excel异步导出
export function asyncExportEecel(data) {
data.method = `${path}common.async.exportExcel`
return request(data, RequestMethods.POST)
}
...@@ -523,6 +523,14 @@ export const resources = { ...@@ -523,6 +523,14 @@ export const resources = {
parentId: '90401' parentId: '90401'
} }
] ]
},
{
authId: '9040105',
parentId: '90401',
label: '标记退款',
category: 'Button',
type: 'primary',
handle: 'signRefund'
} }
], ],
component: _import('orderManage/orderList') component: _import('orderManage/orderList')
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
<template> <template>
<d2-container class="order-detail"> <d2-container class="order-detail">
<div class="d2-container-content"> <div class="d2-container-content">
<p class="edit-title">订单详情</p> <p class="edit-title">订单详情<el-button v-if="signRefundFlag"
icon="signRefundIcon"
@click="refund">标记为退款</el-button>
</p>
<div class="form_gp"> <div class="form_gp">
<p class="edit-sub-title">订单详情</p> <p class="edit-sub-title">订单详情</p>
<el-form class="edit-sub-block" <el-form class="edit-sub-block"
...@@ -143,14 +146,21 @@ ...@@ -143,14 +146,21 @@
:src="detail.payVoucher" :src="detail.payVoucher"
alt="图片"> alt="图片">
</el-dialog> </el-dialog>
<sign-refund-dialog :signRefundVisible="signRefundVisible"
v-if="signRefundVisible"
@dialogClose="dialogClose"></sign-refund-dialog>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
// import { getOrderDetail } from '@api/order' import signRefundDialog from './signRefundDialog'
export default { export default {
name: 'orderDetail', name: 'orderDetail',
components: {
signRefundDialog
},
data() { data() {
return { return {
imgVisible: false, imgVisible: false,
...@@ -165,7 +175,10 @@ export default { ...@@ -165,7 +175,10 @@ export default {
4: '已支付', 4: '已支付',
// 5: '已退款', // 5: '已退款',
6: '已完成', 6: '已完成',
9: '已撤销' 9: '已撤销',
10: '已关闭',
11: '错误订单',
12: '已退款'
}, },
payStatusOpts: { payStatusOpts: {
1: '未支付', 1: '未支付',
...@@ -192,13 +205,17 @@ export default { ...@@ -192,13 +205,17 @@ export default {
}, { }, {
}], }],
progressList: [] progressList: [],
signRefundVisible: false,
signRefundFlag: false,
} }
}, },
mounted() { mounted() {
this.detail = this.$route.params.detail this.detail = this.$route.params.detail
// console.log(this.detail) this.signRefundFlag = this.$route.params.signRefundFlag
console.log(this.signRefundFlag);
}, },
methods: { methods: {
...@@ -251,7 +268,15 @@ export default { ...@@ -251,7 +268,15 @@ export default {
this.$router.push({ name: 'orderList' }) this.$router.push({ name: 'orderList' })
} }
this.close({ tagName: '/orderDetail' }) this.close({ tagName: '/orderDetail' })
} },
refund() {
this.signRefundVisible = !this.signRefundVisible
},
dialogClose() {
this.signRefundVisible = !this.signRefundVisible
},
} }
} }
...@@ -297,4 +322,9 @@ export default { ...@@ -297,4 +322,9 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
} }
.signRefundIcon {
background: url('images/sign.png') no-repeat;
font-size: 16px;
background-size: cover;
}
</style> </style>
...@@ -187,7 +187,9 @@ export default { ...@@ -187,7 +187,9 @@ export default {
// 5: '已退款', // 5: '已退款',
6: '已评价', 6: '已评价',
9: '已撤销', 9: '已撤销',
10: '已关闭' 10: '已关闭',
11: '错误订单',
12: '已退款'
}, },
upgradeOpts: { upgradeOpts: {
'Y': '已升级', 'Y': '已升级',
...@@ -309,6 +311,14 @@ export default { ...@@ -309,6 +311,14 @@ export default {
{ {
confId: 10, confId: 10,
confLabel: '已关闭' confLabel: '已关闭'
},
{
confId: 11,
confLabel: '错误订单'
},
{
confId: 12,
confLabel: '已退款'
} }
], ],
upgradeList: [{ upgradeList: [{
...@@ -342,7 +352,8 @@ export default { ...@@ -342,7 +352,8 @@ export default {
pageSize: 20 pageSize: 20
}, },
totalCount: '', totalCount: '',
jurisdictionFlag: false // 待补录按钮权限标识 jurisdictionFlag: false, // 待补录按钮权限标识
signRefundFlag: false // 标记退款权限标识
} }
}, },
...@@ -361,11 +372,16 @@ export default { ...@@ -361,11 +372,16 @@ export default {
} }
const $store = this.$store.getters['d2admin/auth/curBtns'] const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = '9040103' // 待补录订单权限ID const btnId = '9040103' // 待补录订单权限ID
const signRefund_btnId = '9040105' // 标记退款权限ID
const _item = $store.find(i => (i.authId === btnId)) const _item = $store.find(i => (i.authId === btnId))
const signRefund_item = $store.find(i => (i.authId === signRefund_btnId))
if (_item) { if (_item) {
this.jurisdictionFlag = true // 是否有待补录订单按钮权限 this.jurisdictionFlag = true // 是否有待补录订单按钮权限
this.getWaitinputorderCount() this.getWaitinputorderCount()
} }
if (signRefund_item) {
this.signRefundFlag = true // 是否有标记退款权限
}
this.getList() this.getList()
this.getOrderCount() this.getOrderCount()
}, },
...@@ -463,7 +479,8 @@ export default { ...@@ -463,7 +479,8 @@ export default {
this.$router.push({ this.$router.push({
name: 'orderDetail', name: 'orderDetail',
params: { params: {
detail: data.row detail: data.row,
signRefundFlag: this.signRefundFlag
} }
}) })
}, },
......
<!-- 下载对账单 -->
<template>
<d2-dialog title="退款备注"
:isVisible="signRefundVisible"
class="accountDailog"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<el-form ref="refundForm"
:model="infoForm"
:rules="formRules">
<el-form-item prop="remark">
<el-input type="textarea"
:rows="5"
placeholder="不超过100个字。"
v-model="infoForm.remark">
</el-input>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { getMerchantPageSearch } from '@api/publicAccount'
export default {
name: 'signRefundDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
merchantType: '',
merchant: [],
payStartDate: '',
payEndDate: '',
reportType: '1'
},
formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }],
},
}
},
props: {
signRefundVisible: {
type: Boolean,
default: false
}
},
watch: {
},
created() {
},
components: {},
mounted() {
},
methods: {
handleAddConfirm() {
this.$refs.refundForm.validate(valid => {
if (valid) {
var infoForm = _.cloneDeep(this.infoForm)
console.log(infoForm)
var params = {}
var merchantList = []
var obj
infoForm.merchant.forEach(item => {
obj = {}
obj.merchantId = item
obj.merchantName = this.baseData.merchantList.find(
mer => mer.merchantId === item
).merchantName
merchantList.push(obj)
})
params.payStartDate = infoForm.payStartDate + ' 00:00:00'
params.payEndDate = infoForm.payEndDate + ' 23:59:59'
params.merchantList = merchantList
params.merchantType = infoForm.merchantType
if (infoForm.merchantType == '7') {
params.reportType = infoForm.reportType
}
console.log(params)
api.exportAccountStatement(params).then(res => {
window.location.href = res
this.handleClose()
})
}
})
},
handleClose() {
this.$emit('dialogClose', true)
}
}
}
</script>
<style>
.dateItem {
display: flex;
}
.dateItem .el-form-item__content {
display: flex;
margin-left: 0 !important;
}
.accountDailog .el-dialog {
min-width: 700px;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!