Commit c0a5c209 by 前端

Merge branch 'V5.5.1' into 'master'

上线合并

See merge request !2
2 parents 8dd3af7c 379356de
......@@ -37,13 +37,22 @@ export default {
})
},
/**运营驳回 */
operatorReject(data = {}){
operatorReject(data = {}) {
data.method = 'dj.api.smarcarlife.operatorreview.operatorReject'
return window.$HTTP({
url,
data,
returnAll: true
})
url,
data,
returnAll: true
})
},
/** 总监驳回 */
directorReject(data = {}) {
data.method = 'dj.api.smarcarlife.directorreview.directorReject'
return window.$HTTP({
url,
data,
returnAll: true
})
},
/**查看审核记录 */
operatorreview(data = {}) {
......@@ -63,6 +72,15 @@ export default {
returnAll: true
})
},
/** 总监审核 */
directorAudit(data = {}) {
data.method = 'dj.api.smarcarlife.directorreview.directorAudit'
return window.$HTTP({
url,
data,
returnAll: true
})
},
/**商务审核 */
businessAudit(data = {}) {
data.method = 'dj.api.smarcarlife.businessreview.businessAudit'
......@@ -73,7 +91,7 @@ export default {
})
},
/**发货主体 */
selectShippingEntityInfoAll(data = {}) {
selectShippingEntityInfoAll(data = {}) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll'
return window.$HTTP({
url,
......
<template>
<div class="sticky-table-container" :style="{ height: height }">
<div class="sticky-table-wrapper" :style="{ height: data.length > 5 ? '100%' : '' }">
<table class="sticky-table">
<thead>
<tr>
<th v-for="(col, index) in columns" :key="index" :class="{ 'fixed-col': index === 0 && fixedFirstColumn }" :style="getHeaderStyle(index)">
{{ col.label }}
</th>
</tr>
</thead>
<tbody>
<tr v-for="(row, rowIndex) in data" :key="rowIndex">
<td v-for="(col, colIndex) in columns" :key="colIndex" :class="{ 'fixed-col': colIndex === 0 && fixedFirstColumn }" :style="getCellStyle(colIndex)">
<div class="cell-content">
<slot :name="col.prop" :row="row" :index="rowIndex">
{{ col.formatter ? col.formatter(row) : (row[col.prop] || '-') }}
</slot>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
name: 'StickyTable',
props: {
// 列定义 [{ label: '名称', prop: 'name', width: '100px' }]
columns: {
type: Array,
required: true
},
// 数据源
data: {
type: Array,
default: () => []
},
// 表格高度
height: {
type: String,
default: 'auto'
},
// 是否固定第一列
fixedFirstColumn: {
type: Boolean,
default: true
}
},
methods: {
getHeaderStyle(index) {
const style = {};
if (this.columns[index].width) {
style.minWidth = this.columns[index].width
style.maxWidth = this.columns[index].width
}
return style
},
getCellStyle(index) {
const style = {}
// 如果有其他样式逻辑可以在这里添加
return style
}
}
}
</script>
<style lang="scss" scoped>
.sticky-table-container {
overflow: hidden;
position: relative;
width: 100%;
background: #fff;
}
.sticky-table-wrapper {
overflow: auto;
// height: 100%;
.sticky-table {
border-collapse: separate; // sticky需要separate或collapse配合特定处理,separate较安全
border-spacing: 0;
min-width: 100%;
th,
td {
box-sizing: border-box;
padding: 0 15px; // 调整为水平内边距
height: 15px;
background: #fff;
text-align: left;
color: #333333;
font-size: 12px;
}
th {
line-height: 15px; // 表头单行垂直居中
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
td {
vertical-align: middle; // 内容垂直居中
}
.cell-content {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
line-height: 1.4;
white-space: normal;
}
// 最后一列去掉右边框
// th:last-child,
// td:last-child {
// border-right: none;
// }
th:first-child,
td:first-child {
padding: 4px 8px 4px 0;
}
th {
position: sticky;
top: 0;
z-index: 10;
color: #999999;
font-size: 12px;
padding-top: 0;
}
// 固定第一列样式
.fixed-col {
position: sticky;
left: 0;
z-index: 5;
background: #fff; // 必须指定背景色,否则透明
// border-right: 1px solid #ebedf0;
box-shadow: 2px 0 0 0 #adadad1a;
// 添加阴影效果增加层次感
&::after {
content: '';
position: absolute;
top: 0;
right: -4px;
bottom: 0;
width: 4px;
// background: linear-gradient(90deg, rgba(0, 0, 0, 0.05), transparent );
pointer-events: none;
}
}
// 表头和第一列交叉的单元格
th.fixed-col {
padding: 4px 8px 4px 0;
z-index: 15; // 最高层级
background: #fff;
}
}
}
</style>
......@@ -2,7 +2,7 @@
<template>
<h-dialog ref="myDialog" :title="title" :isVisible="isVisible" @confirm="handleSubmit" @cancel="handleCancel">
<div class="formObj">
<div class="cell" @click="handleSelect" v-if="staffType == 2">
<div class="cell" @click="handleSelect" v-if="[2, 5].includes(staffType)">
<div class="label">
发货主体
<span class="require">*</span>
......@@ -13,8 +13,9 @@
<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 />
</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==5">说明:订单审核后自动流转至商务进行复审。</div>
</div>
<send-out-comp :isVisible="sendOutVisible" v-if="sendOutVisible" @cancel="handleSendCancel" @submit="handleSendSumit" :sendOutMerchantId="approveForm.sendOutMerchantId"></send-out-comp>
</h-dialog>
......@@ -96,7 +97,8 @@ export default {
getMethodByStaffType() {
const methodMap = {
2: 'operatorAudit',
3: 'businessAudit'
3: 'businessAudit',
5: 'directorAudit'
}
return methodMap[this.staffType]
},
......
<template>
<h-dialog ref="myDialog" :title="title" :isVisible="isVisible" :hideCancelBtn="hideBtn" :hideConfirmBtn="hideBtn" :showCloseBtn="hideBtn" @confirm="handleSubmit" @cancel="handleCancel">
<div class="formObj">
<div class="cell" v-for="(item, index) in editFormData" :key="index">
<div class="label">
{{ item.label }}
</div>
<div>{{ item.formatter ? item.formatter(infoData) : (infoData[item.prop] || '-') }}</div>
</div>
</div>
</h-dialog>
</template>
<script>
import hDialog from './dialog'
import { Toast } from 'vant'
import purchaseApi from '@/api/purchase'
export default {
components: { hDialog },
data() {
return {
name: this.$route.query.name,
title: '商品详情',
hideBtn: true,
editFormData: [
{
label: '商品名称',
prop: 'upgradeGoodsName'
},
{ label: '商品编码', prop: 'type', width: '100px' },
{ label: '规格', prop: 'specificationData', width: '90px' },
{
label: '采购数量',
prop: 'goodsNumber',
width: '100px',
formatter: (row) => {
const unit = row.conversionValue ? '卷' : '件'
return (row.goodsNumber || 0) + unit
}
},
{
label: '库存总量',
prop: 'inventoryTotal',
width: '100px',
formatter: (row) => {
const total = (row.goodsNumber || 0) * (row.conversionValue || 1)
if (!row.conversionValue) {
return (row.goodsNumber || 0) + '件'
} else {
// 乘法可能存在精度问题,简单处理
return ((row.goodsNumber || 0) * row.conversionValue).toFixed(2) + '米'
}
}
},
{
label: '已发货数量', prop: 'purchaseNumber', width: '100px',
formatter: (row) => {
const unit = row.conversionValue ? '卷' : '件'
return (row.purchaseNumber || 0) + unit
}
},
{
label: '单价', prop: 'upgradePurchasePrice', width: '90px',
formatter: (row) => {
return '¥' + row.upgradePurchasePrice
}
},
{
label: '总价', prop: 'goodsTotalPrice', width: '90px',
formatter: (row) => {
return '¥' + row.goodsTotalPrice
}
}
]
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
infoData: {
type: Object,
default: () => ({})
}
},
mounted() {
console.log('mounted', this.infoData)
},
methods: {
handleSubmit() {
},
handleCancel() {
this.$emit('cancel')
// this.isVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.formObj {
margin: 0 12px;
font-size: 14px;
.cell {
display: flex;
align-items: center;
margin-top: 14px;
color: #222222;
// height: 52px;
// border-bottom: 1px solid #eff0f2;
}
.label {
width: 72px;
color: #999999;
font-size: 14px;
display: flex;
align-items: center;
white-space: nowrap;
line-height: 17px;
margin-right: 10px;
.require {
color: #f24724;
font-size: 14px;
margin-left: 4px;
line-height: 52px;
margin-top: 5px;
}
}
.line-feed {
.label {
line-height: 52px;
}
.textarea {
border-radius: 8px;
border: 1px solid #eff0f2;
// height: 220px;
}
}
.explain {
color: #999999;
font-size: 14px;
margin-top: 10px;
}
}
</style>
<template>
<van-popup
round
v-model="isShow"
position="bottom"
:style="{ height: '75%' }"
class="popup"
@close="onClose"
:close-on-click-overlay="false"
>
<van-popup round v-model="isShow" position="bottom" :style="{ height: '75%' }" class="popup" @close="onClose" :close-on-click-overlay="false">
<div class="title">{{ title }}</div>
<!-- <div v-if="loading"> -->
<div class="content">
<div class="content">
<slot></slot>
</div>
<div class="btn-group">
<div class="btn cancel" @click="handleCancel">取消</div>
<div
class="btn confirm"
@click="handleConfirm"
:class="{ disabled: loading }"
>
<div v-if="!hideCancelBtn" class="btn cancel" @click="handleCancel">取消</div>
<div v-if="!hideConfirmBtn" class="btn confirm" @click="handleConfirm" :class="{ disabled: loading }">
{{ loading ? '提交中...' : '确定' }}
</div>
<div v-if="showCloseBtn" class="close-btn" @click="handleCancel">关闭</div>
</div>
<!-- </div> -->
<template v-if="loading">
<div class="mask">
<div class="loading-home">
<van-loading size="50" color="#1989fa" />
<div class="loading-home">
<van-loading size="50" color="#1989fa" />
</div>
</div>
</div>
</template>
</van-popup>
</template>
......@@ -52,6 +41,18 @@ export default {
isVisible: {
type: Boolean,
default: true
},
hideCancelBtn: {
type: Boolean,
default: false
},
hideConfirmBtn: {
type: Boolean,
default: false
},
showCloseBtn: {
type: Boolean,
default: false
}
},
watch: {
......@@ -62,9 +63,9 @@ export default {
methods: {
async handleConfirm() {
if (this.loading) return; // 避免重复点击
this.$emit('confirm');
this.$emit('confirm');
},
handleCancel() {
......@@ -128,6 +129,17 @@ export default {
pointer-events: none;
}
}
.close-btn {
width: 100%;
height: 40px;
line-height: 40px;
border-radius: 6px;
opacity: 1;
background: #f4f5f7;
text-align: center;
color: #333333;
font-size: 16px;
}
.cancel {
border: 1px solid #dee0e3;
......@@ -143,21 +155,19 @@ export default {
margin-left: 11px;
}
}
.mask{
.mask {
position: absolute;
height:100%;
width:100%;
height: 100%;
width: 100%;
background: #ffffff;
opacity: 0.6;
top:0;
top: 0;
}
.loading-home{
position:absolute;
left:50%;
top:50%;
transform:translate(-50%,-50%);
.loading-home {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
</style>
\ No newline at end of file
</style>
......@@ -70,6 +70,8 @@ export default {
return baseOptions.slice(0, 2) // 返回采购审核、运营审核
case '4': // 采购发货审核
return baseOptions // 返回全部
case '5': // 总监审核
return baseOptions.slice(0, 2) // 返回采购审核、运营审核
default:
return [] // 默认无选项
}
......@@ -97,7 +99,8 @@ export default {
const methodMap = {
2: 'operatorReject',
3: 'businessReject',
4: 'shipmentReject'
4: 'shipmentReject',
5: 'directorReject'
}
return methodMap[this.staffType]
},
......
......@@ -20,7 +20,17 @@
<span class="value" v-else>{{ purchaseOrderInfo[item.value]||'--' }}</span>
</div>
</div>
<!-- 订单基本信息 -->
<div class="info-section">
<div class="title">
商品信息<span class="title-tip">点击商品名称可查看商品全部信息</span>
</div>
<StickyTable :columns="tableColumns" :data="purchaseOrderInfo.goodsList" :height="purchaseOrderInfo?.goodsList?.length > 5 ? '216px' : 'auto'">
<template #upgradeGoodsName="{ row }">
<span style="color: #347bff; cursor: pointer;" @click="handleProductClick(row)">{{ row.upgradeGoodsName }}</span>
</template>
</StickyTable>
</div>
<!-- 收件信息 -->
<div class="info-section">
<div class="title">收件信息</div>
......@@ -41,21 +51,22 @@
</div>
</div>
<div class="footer">
<div
class="reject btn"
@click="handleReject"
v-if="
<div class="reject btn" @click="handleReject" v-if="
(purchaseOrderInfo.status === 1 && staffType == 2) ||
(purchaseOrderInfo.status === 2 && staffType == 3) ||
(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 == 3)">通过</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>
<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>
<detail-comp :isVisible="detailVisible" v-if="detailVisible" :infoData="productInfo" @cancel="handleDetailCancel"></detail-comp>
</div>
</template>
......@@ -67,17 +78,72 @@ import reviewStatus from './reviewStatus.vue'
import record from './record.vue'
import rejectComp from './components/rejectComp.vue'
import ApproveComp from './components/approveComp.vue'
import detailComp from './components/detailComp.vue'
import purchaseApi from '@/api/purchase'
import StickyTable from '@/components/StickyTable.vue'
export default {
components: { reviewStatus, record, rejectComp, ApproveComp },
components: { reviewStatus, record, rejectComp, ApproveComp, StickyTable, detailComp },
name: '',
data() {
return {
staffType: this.$route.query.staffType, // (2-运营审核 3-商务审核 4-采购发货审核)
orderCode: this.$route.query.orderCode,
purchaseOrderInfo: {},
productInfo: {},
approveVisible: false,
rejectVisible: false,
detailVisible: false,
tableColumns: [
{ label: '商品名称', prop: 'upgradeGoodsName', width: '120px' },
{ label: '商品编码', prop: 'type', width: '100px' },
{ label: '规格', prop: 'specificationData', width: '90px' },
{
label: '采购数量',
prop: 'goodsNumber',
width: '100px',
formatter: (row) => {
const unit = row.conversionValue ? '卷' : '件'
return (row.goodsNumber || 0) + unit
}
},
{
label: '库存总量',
prop: 'inventoryTotal',
width: '100px',
formatter: (row) => {
const total = (row.goodsNumber || 0) * (row.conversionValue || 1)
// 如果conversionValue为空,应该怎么算?题目说"库存数量 = goodsNumber * conversionValue 就是库存总量",但如果conversionValue为空,通常意味着是1或者就是goodsNumber。题目后半句说"如果conversionValue为空,单位就是件",暗示这种情况下库存总量可能就是goodsNumber。 这里假设 conversionValue 为空时按 1 计算,或者直接取 goodsNumber。
// 根据题目: "库存数量 = goodsNumber * conversionValue 就是库存总量。单位,如果conversionValue 为空,单位就是件,如果conversionValue 不为空,单位就是米。"
// 如果 conversionValue 为空/0/null,则总量 = goodsNumber (单位:件)
// 如果 conversionValue 有值,则总量 = goodsNumber * conversionValue (单位:米)
if (!row.conversionValue) {
return (row.goodsNumber || 0) + '件'
} else {
// 乘法可能存在精度问题,简单处理
return ((row.goodsNumber || 0) * row.conversionValue).toFixed(2) + '米'
}
}
},
{
label: '已发货数量', prop: 'purchaseNumber', width: '100px',
formatter: (row) => {
const unit = row.conversionValue ? '卷' : '件'
return (row.purchaseNumber || 0) + unit
}
},
{
label: '单价', prop: 'upgradePurchasePrice', width: '90px',
formatter: (row) => {
return '¥' + row.upgradePurchasePrice
}
},
{
label: '总价', prop: 'goodsTotalPrice', width: '90px',
formatter: (row) => {
return '¥' + row.goodsTotalPrice
}
}
],
orderBasicInfoList: [
{ label: '订单编号', value: 'orderCode' },
{ label: '下单门店', value: 'merchantName' },
......@@ -102,7 +168,7 @@ export default {
label: '当前审核节点',
value: '商务审核',
formatter: cellValue => {
return cellValue.status == 1 ? '运营审核' : cellValue.status == 2 ? '商务审核' : '--'
return cellValue.status == 1 ? '运营审核' : cellValue.status == 8 ? '商务审核' : cellValue.status == 2 ? '总监审核' : '--'
}
}
],
......@@ -158,6 +224,14 @@ export default {
7: {
label: '已驳回',
color: '#F24724'
},
8: {
label: '待审核',
color: '#FF9D0A'
},
9: {
label: '已驳回',
color: '#F24724'
}
},
baseData: {
......@@ -166,20 +240,22 @@ export default {
}
},
created() {
this.purchaseOrderDetailData()
},
computed: {
isHeight() {
const { status, deliveryStatus } = this.purchaseOrderInfo || {}
const staffType = this.staffType
const staffType = this.staffType
return (
(status === 1 && staffType == 2) ||
(status === 2 && staffType == 3) ||
(status === 2 && staffType == 5) ||
(status === 8 && staffType == 3) ||
(deliveryStatus === 1 && staffType == 4 && status == 5)
)
}
},
mounted() {},
mounted() { },
methods: {
handleApproveCancel() {
this.approveVisible = false
......@@ -216,6 +292,14 @@ export default {
this.purchaseOrderInfo = result.data
}
},
handleDetailCancel() {
this.detailVisible = !this.detailVisible
},
handleProductClick(row) {
console.log(row)
this.productInfo = row
this.handleDetailCancel()
},
//驳回
handleReject() {
this.rejectVisible = true
......@@ -287,6 +371,12 @@ export default {
font-weight: normal;
top: 0px;
}
.title-tip {
color: #999999;
font-size: 12px;
font-weight: 400;
margin-left: 4px;
}
}
}
.info-item {
......
......@@ -9,12 +9,16 @@
<div class="status" :style="{ color: examineStatusClass[item.status] }">
{{ getStepText(item.status, 'status') }}
</div>
<span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ getRejectText(item.rejectedStatus, 'rejectedStatus') }}</span>
</span>
</div>
<div class="details">
<div class="detail-row" v-if="item.rejectCause">
<span>驳回原因:</span>
<span>{{ item.rejectCause }}</span>
<span class="word-break">{{ item.rejectCause }}</span>
</div>
<div class="detail-row">
<span>审核人:</span>
......@@ -26,7 +30,7 @@
</div>
<div v-if="item.remark" class="detail-row">
<span>备注:</span>
<span class="remark">{{ item.remark }}</span>
<span class="remark word-break">{{ item.remark }}</span>
</div>
</div>
<!-- 圆点 -->
......@@ -60,14 +64,23 @@ export default {
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '采购驳回', status: '驳回' }
7: { text: '采购驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监审核', status: '驳回' }
},
examineStatusClass: {
2: '#35C376',
4: '#F24724',
5: '#35C376',
6: '#F24724',
7: '#F24724'
7: '#F24724',
8: '#35C376',
9: '#F24724'
},
rejectedForShow: {
1: { rejectedStatus: '采购商户' },
2: { rejectedStatus: '运营审核' },
3: { rejectedStatus: '商务审核' }
}
}
},
......@@ -76,6 +89,11 @@ export default {
const mapping = this.statusForShow[status]
return mapping ? mapping[key] : ''
},
getRejectText(status, key) {
const mapping = this.rejectedForShow[status]
return mapping ? mapping[key] : ''
},
formatReviewTime(timestamp) {
if (!timestamp) return '-'
return parseTime(timestamp, '{y}-{m}-{d} {h}:{i}:{s}')
......@@ -168,10 +186,13 @@ export default {
display: inline-block;
width: 84px;
color: #999999;
margin-right:9px;
margin-right: 9px;
}
.detail-row :nth-child(2) {
color: #333333;
width: calc(100% - 84px);
}
.word-break {
word-break: break-all;
}
</style>
<template>
<div class="status-wrap">
<div class="status-item" v-for="(item, index) in statusList" :key="index">
<div :class="['info', item.active && item.type == 1 ? 'active' : '']">
<div class="circle-box">
<div class="circle">
<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.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>
<div class="status-wrap">
<div class="status-item" v-for="(item, index) in statusList" :key="index">
<div :class="['info', item.active && item.type == 1 ? 'active' : '']">
<div class="circle-box">
<div class="circle">
<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.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>
</div>
</div>
<div class="name" :style="{ color: item.active || item.type > 1 ? '#292D33' : '#999EA8' }">{{ item.name }}</div>
<!-- <template>
<!-- <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 :class="['line', item.type == 2 ? 'line_color' : '']" v-if="index != statusList.length - 1"></div>
</div>
</div>
<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>
<div :class="['line', item.type == 2 ? 'line_color' : '']" v-if="index != statusList.length - 1"></div>
</div>
</div>
</template>
......@@ -25,7 +32,7 @@ export default {
props: {
infoData: {
type: Object,
default: () => {}
default: () => { }
},
status: {
type: Number,
......@@ -39,10 +46,11 @@ export default {
},
data() {
return {
staffType: this.$route.query.staffType,// (2-运营审核 3-商务审核 4-采购发货审核)
staffType: this.$route.query.staffType,// (2-运营审核 3-商务审核 4-采购发货审核,5-总监审核)
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/',
statusList: [
{ name: '运营审核', active: false, type: 1 },
{ name: '总监审核', active: false, type: 1 },
{ name: '商务审核', active: false, type: 1 },
{ name: '采购发货审核', active: false, type: 1 }
]
......@@ -52,8 +60,9 @@ export default {
updateSatus(val) {
this.statusList.forEach(item => {
item.active = false
item.type=1
item.type = 1
})
// 待运营审核
if (val.status == 1) {
this.statusList[0].active = true
this.statusList[0].type = 1
......@@ -61,9 +70,16 @@ export default {
this.statusList[0].active = true
}
} else if (val.status == 2) {
// 待总监审核
this.statusList[0].type = 2
this.statusList[1].active = true
this.statusList[1].type = 1
} else if (val.status == 8) {
// 待商务审核
this.statusList[0].type = 2
this.statusList[1].type = 2
this.statusList[2].active = true
this.statusList[2].type = 1
// if (this.staffType == 3) {
// this.statusList[1].active = true
// }
......@@ -72,8 +88,8 @@ export default {
item.active = true
item.type = 2
})
this.statusList[2].active = true
this.statusList[2].type = 2
this.statusList[3].active = true
this.statusList[3].type = 2
// if (this.staffType == 4) {
// this.statusList[2].active = true
// }
......@@ -92,7 +108,7 @@ export default {
flex-wrap: nowrap;
justify-content: center;
align-items: center;
margin: 16px 0;
margin: 16px 0 0;
.status-item {
display: flex;
flex-wrap: nowrap;
......@@ -139,19 +155,10 @@ export default {
height: 28px;
}
}
.name {
margin-top: 10px;
font-weight: 500;
white-space: nowrap;
color: #7a8299;
margin-bottom: 2px;
}
}
.line {
margin: 12px 4px 0;
width: 50px;
margin: 12px 6px 0;
width: 46px;
height: 4px;
background: #dee0e3;
border-radius: 4px;
......@@ -161,4 +168,36 @@ export default {
}
}
}
.status-txt-box {
position: relative;
margin: 10px 0;
height: 17px;
.name {
display: inline-block;
font-weight: 500;
white-space: nowrap;
color: #7a8299;
}
.name0 {
position: absolute;
top: 0;
left: 0;
}
.name1 {
position: absolute;
top: 0;
left: 26%;
}
.name2 {
position: absolute;
top: 0;
left: 54%;
}
.name3 {
position: absolute;
top: 0;
left: 77%;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!