Commit ef513b6c by Jaxon

Merge branch 'feature/manager-approval' into 'SAAS+V5.7.4'

Feature/manager approval

See merge request !612
2 parents 35b60255 0acae464
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"glsx" "glsx"
], ],
"workbench.tree.indent": 24, "workbench.tree.indent": 24,
"eslint.enable": false,
"explorer.compactFolders": false, "explorer.compactFolders": false,
"scm.compactFolders": false, "scm.compactFolders": false,
"problems.decorations.enabled": false, "problems.decorations.enabled": false,
...@@ -30,4 +29,4 @@ ...@@ -30,4 +29,4 @@
"[javascriptreact]": {}, "[javascriptreact]": {},
"i18n-ally.sourceLanguage": "zh-chs", "i18n-ally.sourceLanguage": "zh-chs",
"javascript.suggest.autoImports": true "javascript.suggest.autoImports": true
}
\ No newline at end of file \ No newline at end of file
}
<template>
<div class="examine-record">
<div class="title">
审核记录
</div>
<template v-if="list && list.length">
<div v-if="list.length > 2 && useExpand"
class="up-down"
@click="handleToggleVisible">
<el-button size="mini"
type="text"
:icon="visible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" />
{{ visible ? "收起" : "展开" }}
</div>
<div style="width:100%;">
<div class="record-div">
<div v-for="(item, index) in getList"
:key="index"
class="record-div-d">
<span class="span-txt-one text-hide">
{{ item.status ? $$(statusForShow, [item.status], "text") : "" }}
</span>
<span class="span-txt-two status-wrapper">
<span :class="item.status ? examineStatusClass[item.status] : ''">
{{
item.status
? $$(statusForShow, [item.status], "status")
: ""
}}
</span>
<span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px">至</span>
<span>
{{
item.rejectedStatus
? $$(
rejectedForShow,
[item.rejectedStatus],
"rejectedStatus",
)
: ""
}}
</span>
</span>
</span>
<span class="span-txt-two reviewer item-wrapper ">
<span>审核人:</span>
<div class="value">
<el-tooltip class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.reviewedBy"
placement="bottom">
<el-button type="text" class="value-btn text-hide">
{{ item.reviewedBy }}
</el-button>
</el-tooltip>
</div>
</span>
<span class="span-txt-two ">
审核时间:{{ item.reviewedDateFormat || item.reviewedDate }}
</span>
<span v-if="item.remark" class="span-txt-two remark item-wrapper">
<span class="label">备注:</span>
<div class="value">
<el-tooltip class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.remark"
placement="bottom">
<el-button type="text" class="value-btn text-hide">
{{ item.remark }}
</el-button>
</el-tooltip>
</div>
</span>
<span v-if="[4, 6, 7, 9, 11].includes(item.status)"
class="span-txt-two reject-cause item-wrapper">
<span class="label">驳回原因:</span>
<div class="value">
<el-tooltip class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.rejectCause"
placement="bottom">
<el-button type="text" class="text-hide value-btn">
{{ item.rejectCause }}
</el-button>
</el-tooltip>
</div>
</span>
</div>
</div>
</div>
</template>
<div v-else class="emptyCom">
<img :src="emptyImg"
class="emptyImg"
alt="" />
<span class="tips">暂无数据</span>
</div>
</div>
</template>
<script>
import emptyImg from "@/assets/empty.png";
export default {
name: "",
props: {
list: {
required: true,
type: Array,
},
useExpand: {
type: Boolean,
default: true,
},
},
data() {
return {
visible: false,
emptyImg,
examineStatusClass: {
2: "greenSp",
4: "redSp",
5: "greenSp",
6: "redSp",
7: "redSp",
8: "greenSp",
9: "redSp",
10: "greenSp",
11: "redSp",
},
statusForShow: {
2: { text: "运营审核", status: "通过" },
4: { text: "运营审核", status: "驳回" },
5: { text: "商务审核", status: "通过" },
6: { text: "商务审核", status: "驳回" },
7: { text: "采购驳回", status: "驳回" },
8: { text: "总监审核", status: "通过" },
9: { text: "总监审核", status: "驳回" },
10: { text: "经理通过", status: "通过" },
11: { text: "经理驳回", status: "驳回" },
},
rejectedForShow: {
1: { rejectedStatus: "采购商户" },
2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: "商务审核" },
6: { rejectedStatus: "经理审核" },
},
};
},
computed: {
getList() {
// 如果不使用展开功能, 直接返回整个list
if (!this.useExpand) {
return this.list;
}
if (this.visible) {
return this.list;
} else {
return this.list.slice(0, 2);
}
},
},
mounted() {
},
methods: {
handleToggleVisible() {
this.visible = !this.visible;
},
},
};
</script>
<style scoped lang="scss">
.examine-record {
position: relative;
width: 100%;
min-height: 60px;
border-radius: 4px;
border: 1px solid #fafafa;
background: #fafafa;
> .title {
padding: 16px 20px;
line-height: 20px;
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: left;
}
.up-down {
position: absolute;
right: 20px;
top: 20px;
width: 42px;
height: 20px;
font-family: PingFangSC-Regular;
color: #2a58ad;
font-size: 12px;
cursor: pointer;
}
.record-div {
padding: 0 20px 16px;
font-size: 14px;
color: #666666;
overflow: hidden;
width: 100%;
box-sizing: border-box;
.record-div-d {
margin-top: 10px;
overflow: hidden;
width: 100%;
position: relative;
display: flex;
align-items: center;
padding: 4px 0 4px 24px;
box-sizing: border-box;
&::before {
position: absolute;
content: "";
left: 6px;
top: 50%;
transform: translateY(-50%);
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
}
> .span-txt-one {
max-width: 5em;
}
.span-txt-two {
margin-left: 12px;
flex-shrink: 0;
&.status-wrapper {
width: 180px;
}
&.reviewer {
width: 140px;
}
&.remark {
flex: 1;
}
&.reject-cause {
flex: 1;
}
&.item-wrapper {
overflow: hidden;
display: flex;
align-items: center;
.label {
flex-shrink: 0;
}
.value {
flex: 1;
text-align: left;
overflow: hidden;
.value-btn {
max-width: 100%;
padding: 0;
}
}
}
}
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
...@@ -326,7 +326,7 @@ export default { ...@@ -326,7 +326,7 @@ export default {
...this.dowloadList, ...this.dowloadList,
{ {
// name: '采购审核', // name: '采购审核',
name: '运营审核', name: '总监审核',
exportParam: JSON.stringify(params), exportParam: JSON.stringify(params),
status: 'waiting', status: 'waiting',
timeid: new Date().getTime() timeid: new Date().getTime()
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
:search-form="tableSearchForm" :search-form="tableSearchForm"
:table-params="tableParams" :table-params="tableParams"
:table-data="tableData" :table-data="tableData"
:selectable-fn="selectableFn" :selectable-fn="selectableFn"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<template #auth-button="scope"> <template #auth-button="scope">
...@@ -307,18 +307,6 @@ export default { ...@@ -307,18 +307,6 @@ export default {
} }
}); });
}, },
// 根据所选场景获取类目
// handleChangeSelect(value) {
// this.searchForm.goodsType = ''
// this.baseData.productTypeList = []
// getProductTypeBySceneId({ sceneType: value }).then(res => {
// this.baseData.productTypeList = res
// this.getBaseData()
// })
// },
// selectableFn(row, index) {
// return row.status == 1 && row.sendOutMerchantId != null
// },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
......
...@@ -136,14 +136,10 @@ ...@@ -136,14 +136,10 @@
:visible.sync="allocateVisible" :visible.sync="allocateVisible"
@editClose="allocateClose"> @editClose="allocateClose">
</AllocateDialog> </AllocateDialog>
<!-- :config="rejectConfig.setting" :dialog-config="rejectConfig.config" :config="rejectConfig.setting" -->
<baseDialog :dialog-config="rejectConfig.config" <baseDialog :dialog-config="rejectConfig.config"
:is-show.sync="rejectVisible" :is-show.sync="rejectVisible"
@handleClick="handleRejectConfirm"> @handleClick="handleRejectConfirm">
<!-- <d2-dialog v-if="rejectVisible" :is-visible="rejectVisible" title="驳回提2" @confirmDialog="handleRejectConfirm"
@closeDialog="handleRejectClose"> -->
<div class="reject-dialog" style="margin: 0;"> <div class="reject-dialog" style="margin: 0;">
<div class="edit-page edit-tmpl"> <div class="edit-page edit-tmpl">
<div class="title"> <div class="title">
商品信息 商品信息
...@@ -239,81 +235,8 @@ ...@@ -239,81 +235,8 @@
<p style="margin-left: 150px; color: #999999;"> <p style="margin-left: 150px; color: #999999;">
说明:驳回后,整个采购订单进行驳回,无法再重新进行发货操作。 说明:驳回后,整个采购订单进行驳回,无法再重新进行发货操作。
</p> </p>
<div class="examine-record"> <ExamineRecord :list="originalAuditDetaiList" style="margin-top:20px;" />
<div class="title">
审核记录
</div>
<div v-if="auditDetaiList && auditDetaiList.length"
class="up-down"
@click="handleUpDown">
<el-button :icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
size="mini"
type="text" />
{{ isVisible ? "收起" : "展开" }}
</div>
<div>
<div v-if="auditDetaiList && auditDetaiList.length" class="record-div">
<div v-for="(item, index) in auditDetaiList"
:key="index"
class="record-div-d">
<span class="dot"></span>
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span>
<span class="span-txt-two" style="display: inline-block; width: 116px;">
<span :class="item.status ? examineStatusClass[item.status] : ''">
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}
</span>
<span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span>
</span>
<span class="span-txt-two reviewer ellipsis">
审核人:
<el-tooltip class="item"
:content="item.reviewedBy"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{ item.reviewedBy }}
</el-button>
</el-tooltip>
</span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span>
<span v-if="item.remark" class="span-txt-two">
备注:
<el-tooltip class="item"
:content="item.remark"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{ item.remark ? (item.remark.length > 5 ? (`${item.remark.slice(0, 5)}...`) : item.remark) : '' }}
</el-button>
</el-tooltip>
</span>
<span v-if="[4, 6, 7, 9, 11].includes(item.status)" class="span-txt-two">
驳回原因:
<el-tooltip class="item"
:content="item.rejectCause"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{ item.rejectCause ? (item.rejectCause.length > 5 ? (`${item.rejectCause.slice(0, 5)}...`) : item.rejectCause) : '' }}
</el-button>
</el-tooltip>
</span>
</div>
</div>
<div v-else class="emptyCom">
<img alt=""
class="emptyImg"
:src="emptyImgUrl">
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div> </div>
<!-- <div class="footer"> <!-- <div class="footer">
<el-button @click="handleRejectClose">取消</el-button> <el-button @click="handleRejectClose">取消</el-button>
...@@ -369,7 +292,8 @@ import { deepClone, Util } from "@/common/util"; ...@@ -369,7 +292,8 @@ import { deepClone, Util } from "@/common/util";
import { baseConfig } from "@/main"; import { baseConfig } from "@/main";
import AllocateDialog from "./components/AllocateDialog"; import AllocateDialog from "./components/AllocateDialog";
import EditOrderDialog from "./components/EditOrderDialog"; import EditOrderDialog from "./components/EditOrderDialog";
import orderDeatilDialog from "./components/orderDetailDialog"; import ExamineRecord from "./components/examineRecord.vue";
import OrderDeatilDialog from "./components/orderDetailDialog";
import { import {
defaultDeliveryStatusOptions, defaultDeliveryStatusOptions,
defaultPutStatusOptions, defaultPutStatusOptions,
...@@ -379,13 +303,14 @@ import { ...@@ -379,13 +303,14 @@ import {
rejectNodeOptions, rejectNodeOptions,
signStatusType, signStatusType,
} from "./constant"; } from "./constant";
// import { limitPrice } from '@/common/format'
export default { export default {
name: "PurchaseAndDelivery", name: "PurchaseAndDelivery",
components: { components: {
OrderDeatilDialog: orderDeatilDialog, OrderDeatilDialog,
EditOrderDialog, EditOrderDialog,
AllocateDialog, AllocateDialog,
ExamineRecord,
}, },
data() { data() {
return { return {
...@@ -443,8 +368,8 @@ export default { ...@@ -443,8 +368,8 @@ export default {
7: "redSp", 7: "redSp",
8: "greenSp", 8: "greenSp",
9: "redSp", 9: "redSp",
10: 'greenSp', 10: "greenSp",
11: 'redSp' 11: "redSp",
}, },
examineStatus: 1, examineStatus: 1,
statusForShow: { statusForShow: {
...@@ -455,8 +380,8 @@ export default { ...@@ -455,8 +380,8 @@ export default {
7: { text: "采购驳回", status: "驳回" }, 7: { text: "采购驳回", status: "驳回" },
8: { text: "总监审核", status: "通过" }, 8: { text: "总监审核", status: "通过" },
9: { text: "总监审核", status: "驳回" }, 9: { text: "总监审核", status: "驳回" },
10: { text: '经理通过', status: '通过' }, 10: { text: "经理通过", status: "通过" },
11: { text: '经理驳回', status: '驳回' }, 11: { text: "经理驳回", status: "驳回" },
}, },
rejectedForShow: { rejectedForShow: {
1: { rejectedStatus: "采购商户" }, 1: { rejectedStatus: "采购商户" },
...@@ -1158,10 +1083,6 @@ export default { ...@@ -1158,10 +1083,6 @@ export default {
} }
}); });
}, },
handleUpDown() {
this.auditDetaiList = this.isVisible ? deepClone(this.originalAuditDetaiList.slice(0, 2)) : deepClone(this.originalAuditDetaiList);
this.isVisible = !this.isVisible;
},
rejectRefreshTable(pageObj) { rejectRefreshTable(pageObj) {
this.getDetail(pageObj); this.getDetail(pageObj);
}, },
...@@ -1180,7 +1101,6 @@ export default { ...@@ -1180,7 +1101,6 @@ export default {
return item; return item;
}); });
} }
this.auditDetaiList = deepClone(this.originalAuditDetaiList.slice(0, 2));
}); });
}, },
// 批量分配 // 批量分配
...@@ -1427,100 +1347,6 @@ export default { ...@@ -1427,100 +1347,6 @@ export default {
vertical-align: middle; vertical-align: middle;
} }
.examine-record {
position: relative;
width: 850px;
min-height: 60px;
border-radius: 4px;
border: 1px solid #fafafa;
background: #fafafa;
margin-top: 23px;
.title {
margin: 16px 20px;
width: 64px;
height: 19px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: center;
}
.up-down {
position: absolute;
right: 20px;
top: 20px;
width: 42px;
height: 20px;
font-family: PingFangSC-Regular;
color: #2a58ad;
font-size: 12px;
cursor: pointer;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
.record-div {
margin: 16px 20px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
margin-top: 10px;
}
.span-txt-one {
margin-left: 14px;
width: 203px;
height: 21px;
}
.reviewer {
display: inline-block;
width: 140px;
}
.span-txt-two {
margin-left: 20px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
.footer { .footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!