Commit 65f453a3 by wangzhihui

订单审核H5需求开发

1 parent 56b771cc
const url = '/rop-dj-smartcarlife/router'
export default {
/** 获取订单待审核详情 */
getOrderApplyDetail(data = {}) {
data.method = 'dj.api.smartcarlife.goodsOrderApplyRecord.detail.select'
return window.$HTTP({
url,
data,
returnAll: true
})
},
/** 订单申请审核 */
auditOrderApply(data = {}) {
data.method = 'dj.api.smartcarlife.goodsOrderApplyRecord.audit.update'
return window.$HTTP({
url,
data,
returnAll: true
})
}
}
...@@ -108,6 +108,18 @@ const pages = { ...@@ -108,6 +108,18 @@ const pages = {
showAction: true showAction: true
} }
}, },
],
orderApproval:[
{
name: 'index',
meta: {
keepAlive: true,
title: '审核详情',
noAuth: true,
backgroundColor: '#f7f8fa',
showAction: true
}
}
] ]
} }
let routes = [ let routes = [
......
...@@ -95,6 +95,7 @@ const actions = { ...@@ -95,6 +95,7 @@ const actions = {
let [userInfo] = item.loginList, let [userInfo] = item.loginList,
{ phone } = userInfo { phone } = userInfo
if (phone) util.setLocalStorage('ww_params_phone', phone) if (phone) util.setLocalStorage('ww_params_phone', phone)
//获取当前时间戳 //获取当前时间戳
userInfo.timestamp = Date.now(); userInfo.timestamp = Date.now();
util.setLocalStorage('ww_userInfo', userInfo); util.setLocalStorage('ww_userInfo', userInfo);
...@@ -126,11 +127,12 @@ const actions = { ...@@ -126,11 +127,12 @@ const actions = {
} }
}, },
navigation({ dispatch, commit }, to) { navigation({ dispatch, commit }, to) {
let { corpId, agentId, phone, name, id } = util.getQuery(), let { corpId, agentId, phone, name, id ,orderCode} = util.getQuery(),
userInfo = util.getLocalStorage('ww_userInfo') userInfo = util.getLocalStorage('ww_userInfo')
if (phone) util.setLocalStorage('ww_params_phone', phone) if (phone) util.setLocalStorage('ww_params_phone', phone)
if (name) util.setLocalStorage('ww_params_name', name) if (name) util.setLocalStorage('ww_params_name', name)
if (id) util.setLocalStorage('ww_params_id', id) if (id) util.setLocalStorage('ww_params_id', id)
if (orderCode) util.setLocalStorage('ww_orderCode', orderCode)
dispatch('registerHttp') dispatch('registerHttp')
if (corpId) { if (corpId) {
let ww_storage_info = {} let ww_storage_info = {}
......
<template>
<van-popup
round
v-model="visible"
position="bottom"
:style="{ height: '68%' }"
class="popup"
:close-on-click-overlay="false"
@close="onClose"
>
<div class="title">{{ infoData.title }}</div>
<div class="content">
<div class="container">
<div class="label">
{{ infoData.label }}
<span v-if="infoData.type == 2" class="required-label">*</span>
</div>
<div class="textarea-wrap">
<van-field
v-model="remark"
type="textarea"
placeholder="请输入"
maxlength="200"
rows="8"
:autosize="{ maxHeight: 220 }"
show-word-limit
class="textarea-input"
/>
</div>
<div v-if="infoData.type == 1" class="tips">审核通过后将自动流转至线上运营审核</div>
</div>
</div>
<div class="btn-group">
<div class="btn cancel" @click="onCancel">取消</div>
<div class="btn confirm" @click="onConfirm">确定</div>
</div>
</van-popup>
</template>
<script>
import { Toast } from 'vant'
export default {
name: 'ApprovalPopup',
props: {
infoData: {
type: Object,
default: () => ({})
},
show: {
type: Boolean,
default: false
}
},
data() {
return {
remark: ''
}
},
computed: {
visible: {
get() {
return this.show
},
set(val) {
if (!val) {
this.$emit('cancel')
}
}
}
},
watch: {
show(val) {
if (val) {
this.remark = ''
}
}
},
methods: {
onConfirm() {
if (this.infoData.type == 2 && !this.remark) {
Toast('请输入驳回备注')
return
}
this.$emit('confirm', this.remark)
},
onCancel() {
this.$emit('cancel')
},
onClose() {
this.$emit('cancel')
}
}
}
</script>
<style scoped lang="scss">
.popup {
.title {
height: 55px;
line-height: 55px;
color: #333333;
font-size: 16px;
text-align: center;
border-bottom: 1px solid #eff0f2;
}
.content {
height: calc(100% - 111px);
overflow-y: auto;
}
.container {
padding: 0 16px;
.label {
margin: 16px 0 8px;
font-size: 14px;
color: #222222;
.required-label {
color: #f24724;
}
}
.textarea-wrap {
.textarea-input {
background: #f4f5f7;
border-radius: 14px;
padding: 4px 0;
}
}
.tips {
color: #999999;
font-size: 13px;
margin: 8px 0;
}
}
.btn-group {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 16px;
.btn {
flex: 1;
border-radius: 6px;
height: 41px;
line-height: 41px;
font-size: 16px;
text-align: center;
}
.cancel {
border: 1px solid #dee0e3;
background: #f4f5f7;
color: #292d33;
}
.confirm {
background: #347bff;
color: #ffffff;
margin-left: 11px;
}
}
}
</style>
<template>
<div class="section">
<div class="section-title">{{ title }}</div>
<!-- 普通商品 -->
<div v-for="(item, index) in goodsData.subOrderList || []" :key="'sub-' + index" class="order-item">
<div class="flex just-space flex-start">
<div class="item-left">
<div class="flex flex-start">
<span class="dot"></span>
<span class="name">{{ item.upgradeGoodsName }}</span>
</div>
<div class="gray pl-24">
<span class="price-label">商品单价¥{{ item.upgradePrice }}</span>
<span v-if="item.discountType == 4" class="tag">赠品</span>
</div>
</div>
<div class="item-right">
<div class="price">¥{{ item.singleProductFinalPrice }}</div>
<div class="gray">
共<span class="split">{{ item.number }}</span>件
</div>
</div>
</div>
<div class="gray pl-24">
<span>商品销售单价¥{{ item.singleProductSalesPrice }}</span>
<template v-if="item.discountType && (item.discountType == 1 || item.discountType == 2)">
<span class="split">|</span>
<span v-if="item.discountType == 1">{{ item.discountValue }}折</span>
<span v-else>折扣¥{{ item.discountValue }}</span>
</template>
</div>
</div>
<!-- 套餐商品 -->
<div v-for="(item, index) in goodsData.packageGoodsList || []" :key="'pkg-' + index" class="order-item">
<div class="item flex just-space package-item">
<div class="item-left flex flex-start">
<span class="dot"></span>
<span class="name">{{ item.packageName }}</span>
</div>
<div class="item-right">
<span class="price">¥{{ item.packagePrice }}</span>
</div>
</div>
<div class="package-list">
<div
v-for="(subItem, subIndex) in item.packageGoodsOrderList || []"
:key="subIndex"
class="list-item"
>
<div class="flex just-space flex-start">
<div class="item-left">
<div class="flex flex-start pl-24">
<span class="name">{{ subItem.upgradeGoodsName }}</span>
</div>
<div class="gray pl-24">
<span class="price-label">商品单价¥{{ subItem.upgradePrice }}</span>
<span v-if="subItem.discountType == 4" class="tag">赠品</span>
</div>
</div>
<div class="item-right">
<div class="price">¥{{ subItem.singleProductFinalPrice }}</div>
<div class="gray">
共<span class="split">{{ subItem.number }}</span>件
</div>
</div>
</div>
<div class="gray pl-24">
<span>商品销售单价¥{{ subItem.singleProductSalesPrice }}</span>
<template v-if="subItem.discountType && (subItem.discountType == 1 || subItem.discountType == 2)">
<span class="split">|</span>
<span v-if="subItem.discountType == 1">{{ subItem.discountValue }}折</span>
<span v-else>折扣¥{{ subItem.discountValue }}</span>
</template>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GoodsOrderItem',
props: {
title: {
type: String,
default: '商品信息'
},
goodsData: {
type: Object,
default: () => ({
subOrderList: [],
packageGoodsList: []
})
}
}
}
</script>
<style scoped lang="scss">
.flex {
display: flex;
align-items: center;
}
.flex-start {
align-items: flex-start;
}
.just-space {
justify-content: space-between;
}
.section {
border-radius: 16px;
background: #ffffff;
margin: 12px 0;
padding: 12px 16px;
.section-title {
font-size: 15px;
font-weight: 500;
color: #222222;
margin-bottom: 12px;
}
.order-item {
border-radius: 10px;
background: #f7f8fa;
padding: 12px;
margin-bottom: 12px;
color: #222222;
font-size: 13px;
&:last-child {
margin-bottom: 0;
}
.package-item {
margin-bottom: 12px;
}
.name {
width: 205px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.dot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: #347bff;
margin: 6px 6px 0 0;
flex-shrink: 0;
}
.gray {
font-size: 12px;
color: #999999;
margin-top: 4px;
.price-label {
margin-right: 6px;
}
.tag {
display: inline-block;
width: 28px;
height: 14px;
line-height: 14px;
border-radius: 3px;
border: 1px solid #f4a08f;
text-align: center;
color: #f24724;
font-size: 12px;
}
}
.item-right {
text-align: right;
flex-shrink: 0;
}
.pl-24 {
padding-left: 12px;
}
.split {
margin: 0 6px;
}
.package-list {
.list-item {
padding: 12px;
margin: 0 -12px;
border-top: 1px solid #dfe4f2;
&:last-child {
padding-bottom: 0;
}
}
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!