Commit 64f88049 by 乔延琦

Merge branch 'develop-zhouyi' into 'develop'

Develop zhouyi

See merge request GFP/RBC/rbc-frontend!200
parents 9332e3c4 02b61df6
......@@ -9,8 +9,18 @@ export default {
data: bill.getBuillData(),
detailData: [],
}
).then(() => {
GMS.$hideContainer.$Message.success('操作成功!')
).then((res) => {
if (res.data && res.data.code == 0) {
GMS.$hideContainer.$Message.success('操作成功!')
}
else {
const { data } = res
data.message && GMS.$hideContainer.$Message.error({
content: errorMessageUtil.submitAction.getErrorMessage(data.message),
duration: 3
});
}
bill.setControlsSate(param["_control_name_"], "loading", false)
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
}).catch(() => {
......
......@@ -5,7 +5,6 @@ import { showSignModal, saveBill } from "../util";
export default {
execute: function (bill, param) {
bill = bill.dom || bill
console.log(param, bill)
if (param && param.param && param.param.budgetcontrol) {
let res = this.getBudgetControl(bill, true, param);
res.then((data) => {
......@@ -83,8 +82,6 @@ export default {
}
let url = `/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.submit`;
window.GMS.$http.post(url, postData).then((response) => {
console.log('------------------------------------')
console.log(response)
const data = response.data
let code = 200
if (data.code != 0) {
......@@ -92,7 +89,6 @@ export default {
}
bill.setControlsSate(param["_control_name_"], 'enable', true)
if (code === 200) {
const id = data.content.billData.id;
minusIndex();//上张下张用
GMS.$hideContainer.$Message.success('提交成功');
let curTagId = window.nros.context.getCurrTag();
......@@ -108,6 +104,7 @@ export default {
GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员");
}
}).catch((err) => {
console.error(err)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员');
bill.setControlsSate(param["_control_name_"],"loading",false)
bill.setControlsSate(param["_control_name_"], "enable", true)
......
......@@ -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