Commit e43e5a47 by 前端

Merge branch 'SAAS+V5.7.4' into 'SAAS+V5.8.0'

上线合并

See merge request !19
2 parents 329ff95f 7a6d2201
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
'vue/max-attributes-per-line': [ 'vue/max-attributes-per-line': [
2, 2,
{ {
singleline: 10, singleline: 2,
multiline: { multiline: {
max: 1, max: 1,
allowFirstLine: false allowFirstLine: false
......
...@@ -13,7 +13,6 @@ yarn-error.log* ...@@ -13,7 +13,6 @@ yarn-error.log*
# Editor directories and files # Editor directories and files
.idea .idea
.vscode
*.suo *.suo
*.ntvs* *.ntvs*
*.njsproj *.njsproj
......
{
"i18n-ally.localesPaths": [
"src/locales"
],
"cSpell.words": [
"vuex",
"Cascader",
"glsx"
],
"workbench.tree.indent": 24,
"eslint.enable": false,
"explorer.compactFolders": false,
"scm.compactFolders": false,
"problems.decorations.enabled": false,
"eslint.format.enable": true,
"vetur.validation.template": false,
"vetur.validation.script": false,
"vetur.validation.style": true,
"vetur.ignoreProjectWarning": false,
"vetur.experimental.templateInterpolationService": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.autoIndent": "full",
"editor.codeActionsOnSave": {
// "source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
},
"[vue]": {},
"[javascript]": {},
"[javascriptreact]": {},
"i18n-ally.sourceLanguage": "zh-chs",
"javascript.suggest.autoImports": true
}
\ No newline at end of file \ No newline at end of file
{
"compilerOptions": {
"target": "ES2020",
// "jsx": "react-jsx",
// "lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": [
"ES2020"
],
"useDefineForClassFields": true,
/* Paths */
"baseUrl": ".",
"module": "ESNext",
/* Bundler mode */
// 按 Node 规则解析模块
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
],
"@api/*": [
"src/api/*"
]
},
"resolveJsonModule": true,
"allowImportingTsExtensions": false,
"allowJs": true,
"checkJs": false,
"noEmit": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist",
".git"
]
// 对齐 Webpack 的 extensions 优先级
// "extensions": [".vue", ".js", ".ts", ".json"]
}
\ No newline at end of file \ No newline at end of file
...@@ -49,5 +49,8 @@ ...@@ -49,5 +49,8 @@
"vue-loader": "^15.9.8", "vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.11", "vue-template-compiler": "^2.6.11",
"webpack-bundle-analyzer": "^3.8.0" "webpack-bundle-analyzer": "^3.8.0"
},
"volta": {
"node": "14.21.3"
} }
} }
...@@ -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
}) })
}, }
} }
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<table class="sticky-table"> <table class="sticky-table">
<thead> <thead>
<tr> <tr>
<th v-for="(col, index) in columns" :key="index" :class="{ 'fixed-col': index === 0 && fixedFirstColumn }" :style="getHeaderStyle(index)"> <th v-for="(col, index) in columns" v-if="!col.isHidden" :key="index" :class="{ 'fixed-col': index === 0 && fixedFirstColumn }" :style="getHeaderStyle(index)">
{{ col.label }} {{ col.label }}
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(row, rowIndex) in data" :key="rowIndex"> <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)"> <td v-for="(col, colIndex) in columns" v-if="!col.isHidden" :key="colIndex" :class="{ 'fixed-col': colIndex === 0 && fixedFirstColumn }" :style="getCellStyle(colIndex)">
<div class="cell-content"> <div class="cell-content">
<slot :name="col.prop" :row="row" :index="rowIndex"> <slot :name="col.prop" :row="row" :index="rowIndex">
{{ col.formatter ? col.formatter(row) : ((row[col.prop] ||row[col.prop]===0) ? row[col.prop] : '-') }} {{ col.formatter ? col.formatter(row) : row[col.prop] || row[col.prop] === 0 ? row[col.prop] : '-' }}
</slot> </slot>
</div> </div>
</td> </td>
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
}, },
methods: { methods: {
getHeaderStyle(index) { getHeaderStyle(index) {
const style = {}; const style = {}
if (this.columns[index].width) { if (this.columns[index].width) {
style.minWidth = this.columns[index].width style.minWidth = this.columns[index].width
style.maxWidth = this.columns[index].width style.maxWidth = this.columns[index].width
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="detail-container"> <div class="detail-container">
<div class="info-section"> <div class="info-section">
<div class="title">基本信息</div> <div class="title">基本信息</div>
<div v-for="(item, index) in orderBasicInfoList" :key="index" class="info-item"> <div v-for="(item, index) in orderBasicInfoList" v-if="!item.isHidden" :key="index" class="info-item">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<span class="value" v-if="item.formatter">{{ item.formatter(orderInfo) }}</span> <span class="value" v-if="item.formatter">{{ item.formatter(orderInfo) }}</span>
<span class="value" v-else>{{ orderInfo[item.value] || orderInfo[item.value] === 0 ? orderInfo[item.value] : '--' }}</span> <span class="value" v-else>{{ orderInfo[item.value] || orderInfo[item.value] === 0 ? orderInfo[item.value] : '--' }}</span>
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
<template v-for="(item, index) in StockList"> <template v-for="(item, index) in StockList">
<div class="item" :key="index"> <div class="item" :key="index">
<div class="name">{{ item.merchantName }}</div> <div class="name">{{ item.merchantName }}</div>
<div class="line"> <!-- 运营审核角色需要隐藏 -->
<div class="line" v-if="staffType != 2">
<!-- [1, 4, 6, 12, 14] --> <!-- [1, 4, 6, 12, 14] -->
<div class="label">当前库存</div> <div class="label">当前库存</div>
<div class="value">{{ item.stock || item.stock === 0 ? item.stock + ([1, 4, 6, 12, 14].includes(item.goodsType) ? '米' : '件') : '--' }}</div> <div class="value">{{ item.stock || item.stock === 0 ? item.stock + ([1, 4, 6, 12, 14].includes(item.goodsType) ? '米' : '件') : '--' }}</div>
...@@ -49,13 +50,13 @@ import allocateApi from '@/api/allocate' ...@@ -49,13 +50,13 @@ import allocateApi from '@/api/allocate'
export default { export default {
data() { data() {
return { return {
staffType:this.$route.query.staffType, staffType: this.$route.query.staffType,
page: { page: {
currentPage: 1, currentPage: 1,
pageSize: 10 pageSize: 10
}, },
flag: false, flag: false,
total:0, total: 0,
StockList: [], StockList: [],
id: this.$route.query.id, id: this.$route.query.id,
orderInfo: {}, orderInfo: {},
...@@ -83,13 +84,20 @@ export default { ...@@ -83,13 +84,20 @@ export default {
value: 'outStockQty', value: 'outStockQty',
formatter: cellValue => { formatter: cellValue => {
return cellValue.outStockQty || cellValue.outStockQty === 0 ? cellValue.outStockQty + ([1, 4, 6, 12, 14].includes(cellValue.goodsType) ? '米' : '件') : '--' return cellValue.outStockQty || cellValue.outStockQty === 0 ? cellValue.outStockQty + ([1, 4, 6, 12, 14].includes(cellValue.goodsType) ? '米' : '件') : '--'
} },
isHidden: false
}, },
{ label: '膜卷号', value: 'filmRollNo' } { label: '膜卷号', value: 'filmRollNo' }
] ]
} }
}, },
created() { created() {
this.orderBasicInfoList.forEach(item => {
//运营审核屏蔽调出门店
if (item.label == '调出门店库存' && this.staffType == 2) {
item.isHidden = true
}
})
this.getAllocateGoodsDetail() this.getAllocateGoodsDetail()
}, },
methods: { methods: {
...@@ -105,13 +113,13 @@ export default { ...@@ -105,13 +113,13 @@ export default {
}, },
getList() { getList() {
let list = this.StockList let list = this.StockList
allocateApi.getAllocateGoodsStockDetail({ ...this.page, merchantName: this.keyword, upgradeGoodsId: this.orderInfo.goodsId}).then(({ code, data, message }) => { allocateApi.getAllocateGoodsStockDetail({ ...this.page, merchantName: this.keyword, upgradeGoodsId: this.orderInfo.goodsId }).then(({ code, data, message }) => {
this.hideLoading() this.hideLoading()
if (code == 0) { if (code == 0) {
this.total = data.total this.total = data.total
this.StockList = [...list, ...data.list] this.StockList = [...list, ...data.list]
if (this.page.currentPage > 1) this.$refs.scrollView.loading = false if (this.page.currentPage > 1) this.$refs.scrollView.loading = false
if( this.StockList.length<this.total) this.$refs.scrollView.finished = false if (this.StockList.length < this.total) this.$refs.scrollView.finished = false
if (data.list == 0 && this.flag) { if (data.list == 0 && this.flag) {
this.$refs.scrollView.finished = true this.$refs.scrollView.finished = true
} }
...@@ -253,7 +261,7 @@ export default { ...@@ -253,7 +261,7 @@ export default {
margin-right: 12px; margin-right: 12px;
} }
.value { .value {
width:calc(100% - 100px); width: calc(100% - 100px);
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
white-space: wrap; white-space: wrap;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
<StickyTable :columns="tableColumns" :data="allocateOrderInfo.stockAllocateDetailList" :height="allocateOrderInfo.stockAllocateDetailList.length > 5 ? '216px' : 'auto'"> <StickyTable :columns="tableColumns" :data="allocateOrderInfo.stockAllocateDetailList" :height="allocateOrderInfo.stockAllocateDetailList.length > 5 ? '216px' : 'auto'">
<template #goodsName="{ row }"> <template #goodsName="{ row }">
<span style="color: #347bff; cursor: pointer" @click="handleProductClick(row)">{{ row.goodsName||'-' }}</span> <span style="color: #347bff; cursor: pointer" @click="handleProductClick(row)">{{ row.goodsName || '-' }}</span>
</template> </template>
</StickyTable> </StickyTable>
</div> </div>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="title">其他信息</div> <div class="title">其他信息</div>
<div class="info-item"> <div class="info-item">
<span>备注</span> <span>备注</span>
<span class="word-break">{{formatOpinionText(allocateOrderInfo.remark) }}</span> <span class="word-break">{{ formatOpinionText(allocateOrderInfo.remark) }}</span>
</div> </div>
</div> </div>
<!-- 审核流程进度 --> <!-- 审核流程进度 -->
...@@ -110,7 +110,8 @@ export default { ...@@ -110,7 +110,8 @@ export default {
width: '120px', width: '120px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.inStockQty || cellValue.inStockQty === 0 ? cellValue.inStockQty + ([1, 4, 6, 12, 14].includes(cellValue.goodsType) ? '米' : '件') : '--' return cellValue.inStockQty || cellValue.inStockQty === 0 ? cellValue.inStockQty + ([1, 4, 6, 12, 14].includes(cellValue.goodsType) ? '米' : '件') : '--'
} },
isHidden:false
}, },
{ {
label: '调出门店库存', prop: 'outStockQty', width: '120px', formatter: cellValue => { label: '调出门店库存', prop: 'outStockQty', width: '120px', formatter: cellValue => {
...@@ -192,9 +193,10 @@ export default { ...@@ -192,9 +193,10 @@ export default {
} }
} }
}, },
// 第一步:http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=CG26012916474916&staffType=2&name=glsadmin 运营审核 //D+调拨管理查找调拨单号
// 第二步:http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=CG202407158682&staffType=3&name=glsadmin 商务审核 // 第一步:http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=DB202604152929&staffType=2&name=glsadmin 运营审核
// 第二步: http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=CG202407158682&staffType=4&name=glsadmin 采购发货审核 // 第二步:http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=DB202604152929&staffType=3&name=glsadmin 商务审核
// 第二步: http://192.168.2.111:9527/dj-scrm-wx-work-main-test/#/cannibalize?orderCode=DB202604152929&staffType=4&name=glsadmin 采购发货审核
created() { created() {
this.allocateOrderDetail() this.allocateOrderDetail()
...@@ -210,7 +212,14 @@ export default { ...@@ -210,7 +212,14 @@ export default {
) )
} }
}, },
mounted() { }, mounted() {
this.tableColumns.forEach(item=>{
//运营审核屏蔽调出门店
if(item.label == '调出门店库存'&&this.staffType == 2){
item.isHidden = true
}
})
},
methods: { methods: {
formatOpinionText(opinion) { formatOpinionText(opinion) {
const s = String(opinion == null ? "-" : opinion); const s = String(opinion == null ? "-" : opinion);
...@@ -363,6 +372,6 @@ export default { ...@@ -363,6 +372,6 @@ export default {
.word-break { .word-break {
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
} }
} }
</style> </style>
<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, 3)
// 经理审核
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,59 +65,73 @@ export default { ...@@ -69,59 +65,73 @@ 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;
padding-left: 12px;
}
.step-label {
white-space: nowrap;
margin: 10px 0;
}
.info { .info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 80rpx; width: 80rpx;
.circle-box { .circle-box {
width: 28px;
height: 28px; height: 28px;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -157,8 +167,8 @@ export default { ...@@ -157,8 +167,8 @@ export default {
} }
} }
.line { .line {
margin: 12px 6px 0; margin: 12px 0px 0 12px;
width: 46px; width: 28px;
height: 4px; height: 4px;
background: #dee0e3; background: #dee0e3;
border-radius: 4px; border-radius: 4px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!