Commit d7fc7c1b by Joey

feat(@gms/gms-plugin-billexpand): 审批轨迹、变更轨迹调整

- 审批轨迹增加从子表读取数据的选项

- 审批轨迹增加emcon配置

- 变更轨迹样式调整
parent 2e32e3bf
......@@ -9,6 +9,14 @@ export const SIGNATURE_TABLE = {
APPROVAL_COMMENT: 'approvalComment',
}
export const APPROVAL_TRACK_TABLE = {
CREATE_TIME: 'createTime',
APPROVAL_COMMENT: 'approvalcomments',
NODE_NAME: 'approvalnodename',
CREATOR_FULL_NAME: 'creatorfullname',
OPERATION: 'operation',
}
export const BILL_GLOBAL_PARAM = {
SIGNATURE_FIELDS: 'signatureFields',
APPROVAL_COMMENT: 'approvalComment',
......
......@@ -29,7 +29,7 @@
<div :class="`step-line waiting-line`" v-if="k != data.length - 1"></div>
</div>
<div class="step-main">
<div class="main-body">
<div class="step-main-body">
<div class="text-black">
<div>
<span class="participants">{{step.createUserName}}</span>
......@@ -102,17 +102,16 @@ export default {
computed: {
styleTop() {
return this.define.layout.top || '0px'
return this.define.config.topDistance || '0px'
},
styleRight() {
return this.define.layout.right || '0px'
return this.define.config.rightDistance || '0px'
},
styleDrawerWidth() {
return this.define.layout.drawerWidth || '400px'
return this.define.config.drawerWidth || '400px'
},
},
mounted() {
console.log(this.define, this.context)
const { tableName } = this.define.config
const subTable = this.context.bill.getSubData(tableName)
if (subTable instanceof Array) {
......@@ -122,12 +121,10 @@ export default {
ans[key] = o.getValue(key)
})
ans['createTime'] = new Date(ans['createTime']).format('yyyy-MM-dd HH:mm:ss')
console.log(ans['modifyDesc'])
ans['modifyDesc'] = JSON.parse(ans['modifyDesc'])
return ans
})
}
console.log(this.data)
},
beforeDestroy() {
......@@ -153,7 +150,7 @@ export default {
.modification-button {
cursor: pointer;
position: absolute;
z-index: 1000;
z-index: 700;
padding-top: 4px;
width: 42px;
height: 36px;
......@@ -179,6 +176,9 @@ export default {
}
.modification-step-wrapper {
width: 100%;
.ivu-divider-horizontal {
margin: 18px 0;
}
.modification-step {
width: 100%;
position: relative;
......@@ -220,7 +220,7 @@ export default {
line-height: 17px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
.main-body {
.step-main-body {
padding-bottom: 30px;
padding-left: 5px;
> div {
......
......@@ -41,7 +41,7 @@
<div :class="`step-line ${step.state === 2 ? 'finish-line' : 'waiting-line'}`" v-if="k != data.length - 1"></div>
</div>
<div class="step-main">
<div class="main-body">
<div class="step-main-body">
<div :class="`${isCurrentStep(step, k) ? 'text-black' : isRejectStep(step) ? 'text-error' : 'text-grey'}`">
<div v-if="step.result == -2">
<span class="result">审批结束</span>
......@@ -71,6 +71,7 @@
</template>
<script>
import { APPROVAL_TRACK_TABLE } from '../constant'
export default {
data() {
......@@ -159,6 +160,33 @@ export default {
},
},
mounted() {
const { tableName, subTableSource } = this.define.config
if (subTableSource) {
const subTable = this.context.bill.getSubData(tableName)
if (subTable instanceof Array) {
this.data = subTable.map((obj) => {
const operation = obj.getValue(APPROVAL_TRACK_TABLE.OPERATION)
return {
state: 2,
result:
operation == '提交'
? -1
: operation == '同意'
? 1
: operation == '驳回'
? 3
: -2,
actualOwner: obj.getValue(APPROVAL_TRACK_TABLE.CREATOR_FULL_NAME),
createTime: obj.getValue(APPROVAL_TRACK_TABLE.CREATE_TIME),
completeTime: obj.getValue(APPROVAL_TRACK_TABLE.CREATE_TIME),
comments: obj.getValue(APPROVAL_TRACK_TABLE.APPROVAL_COMMENT),
title: obj.getValue(APPROVAL_TRACK_TABLE.NODE_NAME),
}
})
}
return
}
window.GAMS.Util.invokeServer({
path: 'gms/workflow/task/approved',
type: 'GET',
......@@ -271,13 +299,13 @@ export default {
},
computed: {
styleTop() {
return this.define.layout.top || '0px'
return this.define.layout.top || this.define.config.topDistance || '0px'
},
styleRight() {
return this.define.layout.right || '0px'
return this.define.layout.right || this.define.config.rightDistance || '0px'
},
styleDrawerWidth() {
return this.define.layout.drawerWidth || '400px'
return this.define.layout.drawerWidth || this.define.config.drawerWidth || '400px'
},
},
beforeDestroy() {
......@@ -291,7 +319,7 @@ export default {
.workflow-button {
cursor: pointer;
position: absolute;
z-index: 1000;
z-index: 700;
padding-top: 4px;
width: 42px;
height: 36px;
......@@ -356,7 +384,7 @@ export default {
line-height: 17px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
.main-body {
.step-main-body {
padding-bottom: 30px;
padding-left: 5px;
> div {
......
......@@ -14,13 +14,60 @@ export default {
"valueKey": "bagName",
"key": "tableName"
},
{},
{
"key": "topDistance",
"type": "String",
"title": "顶部距离"
},
{
"key": "drawerWidth",
"type": "String",
"title": "抽屉宽度"
},
],
},
"value": "ModificationTrack",
"path": "报销/通用"
},
{
"title": "审批轨迹",
"description": "",
"discard": false,
"dynamicComponent": 'billForm',
"extends": {
"config": [
{
"ref": "BillClassVO.all",
"type": "field",
"title": "操作表名称",
"valueKey": "bagName",
"key": "tableName"
},
{
"key": "subTableSource",
"type": "formula",
"title": "是否使用子表数据",
"configFormula": true,
"disableSwitch": false,
"subTableSource": false
},
{
"key": "topDistance",
"type": "String",
"title": "顶部距离"
},
{
"key": "drawerWidth",
"type": "String",
"title": "抽屉宽度"
},
],
},
"value": "WorkflowTrack",
"path": "报销/通用"
},
{
"title": "绩效表样",
"description":"",
"discard": false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment