Commit 57f98c4a by Jaxon

feat(purchase): 添加经理审核节点并重构审核流程

1 parent 152d660b
...@@ -8,6 +8,43 @@ ...@@ -8,6 +8,43 @@
*/ */
const url = '/rop-dj-smartcarlife/router' const url = '/rop-dj-smartcarlife/router'
export default { export default {
// /**采购发货-详情 */
// purchaseOrderDetail(data = {}) {
// data.method = 'dj.api.smarcarlife.purchaseOrder.h5.detail'
// return window.$HTTP({
// url,
// data,
// returnAll: true
// })
// },
managerAudit(data = {}) {
data.method = 'dj.api.smarcarlife.managerreview.managerAudit'
return window.$HTTP({
url,
data,
returnAll: true
})
},
managerReject(data = {}) {
data.method = 'dj.api.smarcarlife.managerreview.managerReject'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// purchaseOrderDetail(data = {}) {
// data.method = 'dj.api.smarcarlife.purchaseOrder.h5.detail'
// return window.$HTTP({
// url,
// data,
// returnAll: true
// })
// },
/**采购发货-详情 */ /**采购发货-详情 */
purchaseOrderDetail(data = {}) { purchaseOrderDetail(data = {}) {
data.method = 'dj.api.smarcarlife.purchaseOrder.h5.detail' data.method = 'dj.api.smarcarlife.purchaseOrder.h5.detail'
...@@ -106,5 +143,5 @@ export default { ...@@ -106,5 +143,5 @@ export default {
data, data,
returnAll: true returnAll: true
}) })
}, }
} }
<template> <template>
<h-dialog ref="myDialog" :title="title" :isVisible="isVisible" @confirm="handleSubmit" @cancel="handleCancel"> <h-dialog ref="myDialog" :title="title" :isVisible="isVisible" @confirm="handleSubmit" @cancel="handleCancel">
<div class="formObj"> <div class="formObj">
<div class="cell" @click="handleSelect" v-if="['2', '5'].includes(staffType)"> <div class="cell" @click="handleSelect" v-if="['2', '5', '6'].includes(staffType)">
<div class="label"> <div class="label">
发货主体 发货主体
<span class="require">*</span> <span class="require">*</span>
...@@ -13,9 +12,10 @@ ...@@ -13,9 +12,10 @@
<div class="label">备注</div> <div class="label">备注</div>
<van-field class="textarea" v-model="approveForm.remark" rows="8" :autosize="{ maxHeight: 220 }" label="" type="textarea" maxlength="200" placeholder="请输入备注" show-word-limit /> <van-field class="textarea" v-model="approveForm.remark" rows="8" :autosize="{ maxHeight: 220 }" label="" type="textarea" maxlength="200" placeholder="请输入备注" show-word-limit />
</div> </div>
<div class="explain" v-if="staffType==2">说明:订单审核后自动流转至下一节点进行复审。</div> <div class="explain" v-if="staffType == 2">说明:订单审核后自动流转至下一节点进行复审。</div>
<div class="explain" v-if="staffType==3">说明:订单审核后会自动流转至供应商进行确认并发货。</div> <div class="explain" v-if="staffType == 6">说明:订单审核后自动流转至下一节点进行复审。</div>
<div class="explain" v-if="staffType==5">说明:订单审核后自动流转至商务进行复审。</div> <div class="explain" v-if="staffType == 3">说明:订单审核后会自动流转至供应商进行确认并发货。</div>
<div class="explain" v-if="staffType == 5">说明:订单审核后自动流转至商务进行复审。</div>
</div> </div>
<send-out-comp :isVisible="sendOutVisible" v-if="sendOutVisible" @cancel="handleSendCancel" @submit="handleSendSumit" :sendOutMerchantId="approveForm.sendOutMerchantId"></send-out-comp> <send-out-comp :isVisible="sendOutVisible" v-if="sendOutVisible" @cancel="handleSendCancel" @submit="handleSendSumit" :sendOutMerchantId="approveForm.sendOutMerchantId"></send-out-comp>
</h-dialog> </h-dialog>
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
components: { hDialog, sendOutComp }, components: { hDialog, sendOutComp },
data() { data() {
return { return {
isSubmit:false, isSubmit: false,
name: this.$route.query.name, name: this.$route.query.name,
staffType: this.$route.query.staffType, staffType: this.$route.query.staffType,
sendOutVisible: false, sendOutVisible: false,
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
this.handleSendCancel() this.handleSendCancel()
}, },
initData(val) { initData(val) {
this.approveForm.sendOutMerchantName = val.sendOutMerchantName? val.sendOutMerchantName:'' this.approveForm.sendOutMerchantName = val.sendOutMerchantName ? val.sendOutMerchantName : ''
this.approveForm.sendOutMerchantId = val.sendOutMerchantId this.approveForm.sendOutMerchantId = val.sendOutMerchantId
}, },
handleSelect() { handleSelect() {
...@@ -98,7 +98,8 @@ export default { ...@@ -98,7 +98,8 @@ export default {
const methodMap = { const methodMap = {
2: 'operatorAudit', 2: 'operatorAudit',
3: 'businessAudit', 3: 'businessAudit',
5: 'directorAudit' 5: 'directorAudit',
6: 'managerAudit'
} }
return methodMap[this.staffType] return methodMap[this.staffType]
}, },
......
...@@ -60,18 +60,31 @@ export default { ...@@ -60,18 +60,31 @@ export default {
const baseOptions = [ const baseOptions = [
{ label: '采购商户', value: '1' }, { label: '采购商户', value: '1' },
{ label: '运营审核', value: '2' }, { label: '运营审核', value: '2' },
{ label: '经理审核', value: '6' },
{ label: '商务审核', value: '3' } { label: '商务审核', value: '3' }
] ]
switch (this.staffType) { switch (this.staffType) {
case '2': // 运营审核 // 运营审核
return [baseOptions[0]] // 只返回采购审核 case '2':
case '3': // 商务审核 // 只返回采购审核
return baseOptions.slice(0, 2) // 返回采购审核、运营审核 return [baseOptions[0]]
case '4': // 采购发货审核 // 商务审核
return baseOptions // 返回全部 case '3':
case '5': // 总监审核 // 返回采购审核、运营审核
return baseOptions.slice(0, 2) // 返回采购审核、运营审核 return baseOptions.slice(0, 3)
// 采购发货审核
case '4':
// 返回全部
return baseOptions
// 总监审核
case '5':
// 返回采购审核、运营审核
return baseOptions.slice(0, 2)
// 经理审核
case '6':
// 返回采购审核、运营审核
return baseOptions.slice(0, 2)
default: default:
return [] // 默认无选项 return [] // 默认无选项
} }
...@@ -100,7 +113,8 @@ export default { ...@@ -100,7 +113,8 @@ export default {
2: 'operatorReject', 2: 'operatorReject',
3: 'businessReject', 3: 'businessReject',
4: 'shipmentReject', 4: 'shipmentReject',
5: 'directorReject' 5: 'directorReject',
6: 'managerReject'
} }
return methodMap[this.staffType] return methodMap[this.staffType]
}, },
......
<!-- 采购发货 --> <!-- 采购发货 -->
<template> <template>
<div class="layout"> <div class="layout">
<div class="purchase" :style="{height:isHeight?'calc(100vh - 68px)' : '100%'}"> <div class="purchase" :style="{ height: isHeight ? 'calc(100vh - 68px)' : '100%' }">
<!-- 订单基本信息 --> <!-- 订单基本信息 -->
<div class="info-section"> <div class="info-section">
<div class="title"> <div class="title">
...@@ -17,17 +17,22 @@ ...@@ -17,17 +17,22 @@
<div v-for="(item, index) in orderBasicInfoList" :key="index" class="info-item"> <div v-for="(item, index) in orderBasicInfoList" :key="index" class="info-item">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<span class="value" v-if="item.formatter">{{ item.formatter(purchaseOrderInfo) }}</span> <span class="value" v-if="item.formatter">{{ item.formatter(purchaseOrderInfo) }}</span>
<span class="value" v-else>{{ purchaseOrderInfo[item.value]||'--' }}</span> <span class="value" v-else>{{ purchaseOrderInfo[item.value] || '--' }}</span>
</div> </div>
</div> </div>
<!-- 订单基本信息 --> <!-- 订单基本信息 -->
<div class="info-section"> <div class="info-section">
<div class="title"> <div class="title">
商品信息<span class="title-tip">点击商品名称可查看商品全部信息</span> 商品信息
<span class="title-tip">点击商品名称可查看商品全部信息</span>
</div> </div>
<sticky-table :columns="tableColumns" :data="purchaseOrderInfo.goodsList" :height="purchaseOrderInfo&&purchaseOrderInfo.goodsList&&purchaseOrderInfo.goodsList.length > 5 ? '216px' : 'auto'"> <sticky-table
:columns="tableColumns"
:data="purchaseOrderInfo.goodsList"
:height="purchaseOrderInfo && purchaseOrderInfo.goodsList && purchaseOrderInfo.goodsList.length > 5 ? '216px' : 'auto'"
>
<template #upgradeGoodsName="{ row }"> <template #upgradeGoodsName="{ row }">
<span style="color: #347bff; cursor: pointer;" @click="handleProductClick(row)">{{ row.upgradeGoodsName }}</span> <span style="color: #347bff; cursor: pointer" @click="handleProductClick(row)">{{ row.upgradeGoodsName }}</span>
</template> </template>
</sticky-table> </sticky-table>
</div> </div>
...@@ -51,18 +56,8 @@ ...@@ -51,18 +56,8 @@
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
<div class="reject btn" @click="handleReject" v-if=" <div class="reject btn" @click="handleReject" v-if="showRejectBtn">驳回</div>
(purchaseOrderInfo.status === 1 && staffType == 2) || <div class="approve btn" @click="handleApprove" v-if="showApproveBtn">通过</div>
(purchaseOrderInfo.status === 2 && staffType == 5) ||
(purchaseOrderInfo.status === 8 && staffType == 3) ||
(purchaseOrderInfo.deliveryStatus === 1 && staffType == 4 && purchaseOrderInfo.status == 5)
">
驳回
</div>
<div class="approve btn" @click="handleApprove"
v-if="(purchaseOrderInfo.status === 1 && staffType == 2)
|| (purchaseOrderInfo.status === 2 && staffType == 5)
|| (purchaseOrderInfo.status === 8 && staffType == 3)">通过</div>
</div> </div>
<reject-comp :isVisible="rejectVisible" v-if="rejectVisible" :infoData="purchaseOrderInfo" @cancel="handleCancel" @success="handleSuccess"></reject-comp> <reject-comp :isVisible="rejectVisible" v-if="rejectVisible" :infoData="purchaseOrderInfo" @cancel="handleCancel" @success="handleSuccess"></reject-comp>
<approve-comp :isVisible="approveVisible" v-if="approveVisible" :infoData="purchaseOrderInfo" @cancel="handleApproveCancel" @success="handleApproveSuccess"></approve-comp> <approve-comp :isVisible="approveVisible" v-if="approveVisible" :infoData="purchaseOrderInfo" @cancel="handleApproveCancel" @success="handleApproveSuccess"></approve-comp>
...@@ -173,7 +168,13 @@ export default { ...@@ -173,7 +168,13 @@ export default {
label: '当前审核节点', label: '当前审核节点',
value: '商务审核', value: '商务审核',
formatter: cellValue => { formatter: cellValue => {
return cellValue.status == 1 ? '运营审核' : cellValue.status == 8 ? '商务审核' : cellValue.status == 2 ? '总监审核' : '--' const keys = {
1:'运营审核',
8:'商务审核',
10:'总监审核',
2:'经理审核'
}
return keys[cellValue.status] || '--'
} }
} }
], ],
...@@ -200,7 +201,11 @@ export default { ...@@ -200,7 +201,11 @@ export default {
color: '#F24724' color: '#F24724'
} }
}, },
// 订单状态 1.待审核,2运营已审核,3.已取消,4.运营已驳回,5.商务已审核,6.商务已驳回,7.发货已驳回 // 订单状态
// 1.待审核,2运营已审核,3.已取消,4.运营已驳回,5.商务已审核,6.商务已驳回,7.发货已驳回
// 4.20更新
// 1.待审核,2运营已审核,3.已取消,4.运营已驳回,5.商务已审核,6.商务已驳回,7.发货已驳回,8.总监已审核,9.总监已驳回,10.经理审核,11.经理已驳回
orderStatusOpts: { orderStatusOpts: {
1: { 1: {
label: '待审核', label: '待审核',
...@@ -210,18 +215,30 @@ export default { ...@@ -210,18 +215,30 @@ export default {
label: '待审核', label: '待审核',
color: '#FF9D0A' color: '#FF9D0A'
}, },
3: { 10: {
label: '已取消', label: '待审核',
color: '#999999' color: '#FF9D0A'
}, },
4: { 8: {
label: '已驳回', label: '待审核',
color: '#F24724' color: '#FF9D0A'
}, },
5: { 5: {
label: '已审核', label: '已审核',
color: '#35C376' color: '#35C376'
}, },
4: {
label: '已驳回',
color: '#F24724'
},
3: {
label: '已取消',
color: '#999999'
},
6: { 6: {
label: '已驳回', label: '已驳回',
color: '#F24724' color: '#F24724'
...@@ -230,13 +247,13 @@ export default { ...@@ -230,13 +247,13 @@ export default {
label: '已驳回', label: '已驳回',
color: '#F24724' color: '#F24724'
}, },
8: {
label: '待审核',
color: '#FF9D0A'
},
9: { 9: {
label: '已驳回', label: '已驳回',
color: '#F24724' color: '#F24724'
},
11: {
label: '已驳回',
color: '#F24724'
} }
}, },
baseData: { baseData: {
...@@ -257,11 +274,38 @@ export default { ...@@ -257,11 +274,38 @@ export default {
const staffType = this.staffType const staffType = this.staffType
return ( return (
(status === 1 && staffType == 2) || (status === 1 && staffType == 2) ||
(status === 2 && staffType == 5) || (status === 2 && staffType == 6) ||
(status === 8 && staffType == 3) || (status === 8 && staffType == 3) ||
(status === 10 && staffType == 5) ||
(deliveryStatus === 1 && staffType == 4 && status == 5) (deliveryStatus === 1 && staffType == 4 && status == 5)
) )
} },
showRejectBtn(){
const purchaseOrderInfo = this.purchaseOrderInfo;
const staffType = this.staffType
// 运营审核
return (purchaseOrderInfo.status === 1 && staffType == 2) ||
// 经理审核
(purchaseOrderInfo.status === 2 && staffType == 6) ||
// 商务审核
(purchaseOrderInfo.status === 8 && staffType == 3) ||
// 总监审核
(purchaseOrderInfo.status === 10 && staffType == 5) ||
// 采购发货
(purchaseOrderInfo.deliveryStatus === 1 && staffType == 4 && purchaseOrderInfo.status == 5)
},
showApproveBtn(){
const purchaseOrderInfo = this.purchaseOrderInfo;
const staffType = this.staffType
// 运营审核
return (purchaseOrderInfo.status === 1 && staffType == 2) ||
// 经理审核
(purchaseOrderInfo.status === 2 && staffType == 6) ||
// 商务审核
(purchaseOrderInfo.status === 8 && staffType == 3) ||
// 总监审核
(purchaseOrderInfo.status === 10 && staffType == 5)
},
}, },
mounted() { }, mounted() { },
methods: { methods: {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
{{ getStepText(item.status, 'status') }} {{ getStepText(item.status, 'status') }}
</div> </div>
<span v-if="item.rejectedStatus"> <span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span> <span style="display: inline-block; margin: 0 8px">至</span>
<span>{{ getRejectText(item.rejectedStatus, 'rejectedStatus') }}</span> <span>{{ getRejectText(item.rejectedStatus, 'rejectedStatus') }}</span>
</span> </span>
</div> </div>
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
props: { props: {
recordList: { recordList: {
type: Array, type: Array,
default: () => ([]) default: () => []
} }
}, },
data() { data() {
...@@ -66,7 +66,9 @@ export default { ...@@ -66,7 +66,9 @@ export default {
6: { text: '商务审核', status: '驳回' }, 6: { text: '商务审核', status: '驳回' },
7: { text: '采购驳回', status: '驳回' }, 7: { text: '采购驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' }, 8: { text: '总监审核', status: '通过' },
9: { text: '总监审核', status: '驳回' } 9: { text: '总监审核', status: '驳回' },
10: { text: '经理审核', status: '通过' },
11: { text: '经理审核', status: '驳回' }
}, },
examineStatusClass: { examineStatusClass: {
2: '#35C376', 2: '#35C376',
...@@ -75,12 +77,15 @@ export default { ...@@ -75,12 +77,15 @@ export default {
6: '#F24724', 6: '#F24724',
7: '#F24724', 7: '#F24724',
8: '#35C376', 8: '#35C376',
9: '#F24724' 9: '#F24724',
10: '#35C376',
11: '#F24724'
}, },
rejectedForShow: { rejectedForShow: {
1: { rejectedStatus: '采购商户' }, 1: { rejectedStatus: '采购商户' },
2: { rejectedStatus: '运营审核' }, 2: { rejectedStatus: '运营审核' },
3: { rejectedStatus: '商务审核' } 3: { rejectedStatus: '商务审核' },
6: { rejectedStatus: '经理审核' }
} }
} }
}, },
......
<template> <template>
<div> <div class="wrapper">
<div class="status-wrap"> <div class="status-wrap">
<div class="status-item" v-for="(item, index) in statusList" :key="index"> <div class="status-item" v-for="(item, index) in statusList" :key="index">
<div class="step-icon-wrapper">
<div :class="['info', item.active && item.type == 1 ? 'active' : '']"> <div :class="['info', item.active && item.type == 1 ? 'active' : '']">
<div class="circle-box"> <div class="circle-box">
<div class="circle"> <div class="circle">
<img v-if="item.active" class="status-img" :src="IMG_URL + 'equity/review_icon.png'" /> <img v-if="item.active" class="status-img" :src="IMG_URL + 'equity/review_icon.png'" />
<img v-if="item.type == 2" class="status-img" :src="IMG_URL + 'equity/review_success_icon.png'" /> <img v-if="item.type == 2" class="status-img" :src="IMG_URL + 'equity/review_success_icon.png'" />
<!-- <img v-if="item.active && item.type == 3" class="status-img" :src="IMG_URL + 'equity/review_error_icon.png'" /> -->
<div v-if="!item.active && item.type < 2" class="circle_text">{{ index + 1 }}</div> <div v-if="!item.active && item.type < 2" class="circle_text">{{ index + 1 }}</div>
</div> </div>
</div> </div>
<!-- <div class="name" :style="{ color: item.active || item.type > 1 ? '#292D33' : '#999EA8' }">{{ item.name }}</div> -->
<!-- <template>
<div v-if="(index == 1 || index == 2) && item.type > 1" class="status-text" :style="{ color: item.type == 2 ? '#292D33' : '#E75E58' }">{{ item.type == 2 ? '通过' : '不通过' }}</div>
<div style="height: var(--fontSize32)" v-else>{{ ' ' }}</div>
</template> -->
</div> </div>
<div :class="['line', item.type == 2 ? 'line_color' : '']" v-if="index != statusList.length - 1"></div> <div :class="['line', item.type == 2 ? 'line_color' : '']" v-if="index != statusList.length - 1"></div>
</div> </div>
</div> <div class="step-label">
<div class="status-txt-box">
<div v-for="(item, index) in statusList" :key="index">
<div :class="['name', `name${index}`]" :style="{ color: item.active || item.type > 1 ? '#292D33' : '#999EA8' }">{{ item.name }}</div> <div :class="['name', `name${index}`]" :style="{ color: item.active || item.type > 1 ? '#292D33' : '#999EA8' }">{{ item.name }}</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
infoData: { infoData: {
type: Object, type: Object,
default: () => { } default: () => {}
}, },
status: { status: {
type: Number, type: Number,
...@@ -46,10 +40,11 @@ export default { ...@@ -46,10 +40,11 @@ export default {
}, },
data() { data() {
return { return {
staffType: this.$route.query.staffType,// (2-运营审核 3-商务审核 4-采购发货审核,5-总监审核) staffType: this.$route.query.staffType, // (2-运营审核 3-商务审核 4-采购发货审核,5-总监审核)
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/', IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/',
statusList: [ statusList: [
{ name: '运营审核', active: false, type: 1 }, { name: '运营审核', active: false, type: 1 },
{ name: '经理审核', active: false, type: 1 },
{ name: '总监审核', active: false, type: 1 }, { name: '总监审核', active: false, type: 1 },
{ name: '商务审核', active: false, type: 1 }, { name: '商务审核', active: false, type: 1 },
{ name: '采购发货审核', active: false, type: 1 } { name: '采购发货审核', active: false, type: 1 }
...@@ -62,6 +57,7 @@ export default { ...@@ -62,6 +57,7 @@ export default {
item.active = false item.active = false
item.type = 1 item.type = 1
}) })
// 待运营审核 // 待运营审核
if (val.status == 1) { if (val.status == 1) {
this.statusList[0].active = true this.statusList[0].active = true
...@@ -69,52 +65,66 @@ export default { ...@@ -69,52 +65,66 @@ export default {
if (this.staffType == 2) { if (this.staffType == 2) {
this.statusList[0].active = true this.statusList[0].active = true
} }
} else if (val.status == 2) { }
// 待总监审核 // 待经理审核
if (val.status == 2) {
this.statusList[0].type = 2 this.statusList[0].type = 2
this.statusList[1].active = true this.statusList[1].active = true
this.statusList[1].type = 1 this.statusList[1].type = 1
} else if (val.status == 8) { }
// 待商务审核 // 待总监审核
if (val.status == 10) {
this.statusList[0].type = 2 this.statusList[0].type = 2
this.statusList[1].type = 2 this.statusList[1].type = 2
this.statusList[2].active = true this.statusList[2].active = true
this.statusList[2].type = 1 this.statusList[2].type = 1
}
// 待商务审核
if (val.status == 8) {
this.statusList[0].type = 2
this.statusList[1].type = 2
this.statusList[2].type = 2
this.statusList[3].active = true
this.statusList[3].type = 1
// if (this.staffType == 3) { // if (this.staffType == 3) {
// this.statusList[1].active = true // this.statusList[1].active = true
// } // }
} else if (val.status == 5) { }
if (val.status == 5) {
this.statusList.forEach(item => { this.statusList.forEach(item => {
item.active = true item.active = true
item.type = 2 item.type = 2
}) })
this.statusList[3].active = true
this.statusList[3].type = 2
// if (this.staffType == 4) {
// this.statusList[2].active = true
// }
} else {
this.statusList.forEach(item => {
item.active = false
})
} }
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrapper {
overflow: hidden;
width: 100%;
}
.status-wrap { .status-wrap {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: center;
align-items: center; align-items: center;
margin: 16px 0 0; margin: 16px 0 0;
overflow: scroll;
.status-item { .status-item {
display: flex; display: flex;
flex-direction: column;
.step-icon-wrapper {
display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
color: #999ea8; color: #999ea8;
}
.step-label {
white-space: nowrap;
margin: 10px 0;
}
.info { .info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!