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 { ...@@ -9,8 +9,18 @@ export default {
data: bill.getBuillData(), data: bill.getBuillData(),
detailData: [], detailData: [],
} }
).then(() => { ).then((res) => {
GMS.$hideContainer.$Message.success('操作成功!') 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_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false) bill.setControlsSate(param["_control_name_"], "loading", false)
}).catch(() => { }).catch(() => {
......
...@@ -5,7 +5,6 @@ import { showSignModal, saveBill } from "../util"; ...@@ -5,7 +5,6 @@ import { showSignModal, saveBill } from "../util";
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
bill = bill.dom || bill bill = bill.dom || bill
console.log(param, bill)
if (param && param.param && param.param.budgetcontrol) { if (param && param.param && param.param.budgetcontrol) {
let res = this.getBudgetControl(bill, true, param); let res = this.getBudgetControl(bill, true, param);
res.then((data) => { res.then((data) => {
...@@ -83,8 +82,6 @@ export default { ...@@ -83,8 +82,6 @@ export default {
} }
let url = `/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.submit`; let url = `/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.submit`;
window.GMS.$http.post(url, postData).then((response) => { window.GMS.$http.post(url, postData).then((response) => {
console.log('------------------------------------')
console.log(response)
const data = response.data const data = response.data
let code = 200 let code = 200
if (data.code != 0) { if (data.code != 0) {
...@@ -92,7 +89,6 @@ export default { ...@@ -92,7 +89,6 @@ export default {
} }
bill.setControlsSate(param["_control_name_"], 'enable', true) bill.setControlsSate(param["_control_name_"], 'enable', true)
if (code === 200) { if (code === 200) {
const id = data.content.billData.id;
minusIndex();//上张下张用 minusIndex();//上张下张用
GMS.$hideContainer.$Message.success('提交成功'); GMS.$hideContainer.$Message.success('提交成功');
let curTagId = window.nros.context.getCurrTag(); let curTagId = window.nros.context.getCurrTag();
...@@ -108,6 +104,7 @@ export default { ...@@ -108,6 +104,7 @@ export default {
GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员"); GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员");
} }
}).catch((err) => { }).catch((err) => {
console.error(err)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员'); GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员');
bill.setControlsSate(param["_control_name_"],"loading",false) bill.setControlsSate(param["_control_name_"],"loading",false)
bill.setControlsSate(param["_control_name_"], "enable", true) bill.setControlsSate(param["_control_name_"], "enable", true)
......
...@@ -9,6 +9,14 @@ export const SIGNATURE_TABLE = { ...@@ -9,6 +9,14 @@ export const SIGNATURE_TABLE = {
APPROVAL_COMMENT: 'approvalComment', 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 = { export const BILL_GLOBAL_PARAM = {
SIGNATURE_FIELDS: 'signatureFields', SIGNATURE_FIELDS: 'signatureFields',
APPROVAL_COMMENT: 'approvalComment', APPROVAL_COMMENT: 'approvalComment',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div :class="`step-line waiting-line`" v-if="k != data.length - 1"></div> <div :class="`step-line waiting-line`" v-if="k != data.length - 1"></div>
</div> </div>
<div class="step-main"> <div class="step-main">
<div class="main-body"> <div class="step-main-body">
<div class="text-black"> <div class="text-black">
<div> <div>
<span class="participants">{{step.createUserName}}</span> <span class="participants">{{step.createUserName}}</span>
...@@ -102,17 +102,16 @@ export default { ...@@ -102,17 +102,16 @@ export default {
computed: { computed: {
styleTop() { styleTop() {
return this.define.layout.top || '0px' return this.define.config.topDistance || '0px'
}, },
styleRight() { styleRight() {
return this.define.layout.right || '0px' return this.define.config.rightDistance || '0px'
}, },
styleDrawerWidth() { styleDrawerWidth() {
return this.define.layout.drawerWidth || '400px' return this.define.config.drawerWidth || '400px'
}, },
}, },
mounted() { mounted() {
console.log(this.define, this.context)
const { tableName } = this.define.config const { tableName } = this.define.config
const subTable = this.context.bill.getSubData(tableName) const subTable = this.context.bill.getSubData(tableName)
if (subTable instanceof Array) { if (subTable instanceof Array) {
...@@ -122,12 +121,10 @@ export default { ...@@ -122,12 +121,10 @@ export default {
ans[key] = o.getValue(key) ans[key] = o.getValue(key)
}) })
ans['createTime'] = new Date(ans['createTime']).format('yyyy-MM-dd HH:mm:ss') ans['createTime'] = new Date(ans['createTime']).format('yyyy-MM-dd HH:mm:ss')
console.log(ans['modifyDesc'])
ans['modifyDesc'] = JSON.parse(ans['modifyDesc']) ans['modifyDesc'] = JSON.parse(ans['modifyDesc'])
return ans return ans
}) })
} }
console.log(this.data)
}, },
beforeDestroy() { beforeDestroy() {
...@@ -153,7 +150,7 @@ export default { ...@@ -153,7 +150,7 @@ export default {
.modification-button { .modification-button {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
z-index: 1000; z-index: 700;
padding-top: 4px; padding-top: 4px;
width: 42px; width: 42px;
height: 36px; height: 36px;
...@@ -179,6 +176,9 @@ export default { ...@@ -179,6 +176,9 @@ export default {
} }
.modification-step-wrapper { .modification-step-wrapper {
width: 100%; width: 100%;
.ivu-divider-horizontal {
margin: 18px 0;
}
.modification-step { .modification-step {
width: 100%; width: 100%;
position: relative; position: relative;
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
line-height: 17px; line-height: 17px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
.main-body { .step-main-body {
padding-bottom: 30px; padding-bottom: 30px;
padding-left: 5px; padding-left: 5px;
> div { > div {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div :class="`step-line ${step.state === 2 ? 'finish-line' : 'waiting-line'}`" v-if="k != data.length - 1"></div> <div :class="`step-line ${step.state === 2 ? 'finish-line' : 'waiting-line'}`" v-if="k != data.length - 1"></div>
</div> </div>
<div class="step-main"> <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 :class="`${isCurrentStep(step, k) ? 'text-black' : isRejectStep(step) ? 'text-error' : 'text-grey'}`">
<div v-if="step.result == -2"> <div v-if="step.result == -2">
<span class="result">审批结束</span> <span class="result">审批结束</span>
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
</template> </template>
<script> <script>
import { APPROVAL_TRACK_TABLE } from '../constant'
export default { export default {
data() { data() {
...@@ -159,6 +160,33 @@ export default { ...@@ -159,6 +160,33 @@ export default {
}, },
}, },
mounted() { 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({ window.GAMS.Util.invokeServer({
path: 'gms/workflow/task/approved', path: 'gms/workflow/task/approved',
type: 'GET', type: 'GET',
...@@ -271,13 +299,13 @@ export default { ...@@ -271,13 +299,13 @@ export default {
}, },
computed: { computed: {
styleTop() { styleTop() {
return this.define.layout.top || '0px' return this.define.layout.top || this.define.config.topDistance || '0px'
}, },
styleRight() { styleRight() {
return this.define.layout.right || '0px' return this.define.layout.right || this.define.config.rightDistance || '0px'
}, },
styleDrawerWidth() { styleDrawerWidth() {
return this.define.layout.drawerWidth || '400px' return this.define.layout.drawerWidth || this.define.config.drawerWidth || '400px'
}, },
}, },
beforeDestroy() { beforeDestroy() {
...@@ -291,7 +319,7 @@ export default { ...@@ -291,7 +319,7 @@ export default {
.workflow-button { .workflow-button {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
z-index: 1000; z-index: 700;
padding-top: 4px; padding-top: 4px;
width: 42px; width: 42px;
height: 36px; height: 36px;
...@@ -356,7 +384,7 @@ export default { ...@@ -356,7 +384,7 @@ export default {
line-height: 17px; line-height: 17px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
.main-body { .step-main-body {
padding-bottom: 30px; padding-bottom: 30px;
padding-left: 5px; padding-left: 5px;
> div { > div {
......
...@@ -14,13 +14,60 @@ export default { ...@@ -14,13 +14,60 @@ export default {
"valueKey": "bagName", "valueKey": "bagName",
"key": "tableName" "key": "tableName"
}, },
{}, {
"key": "topDistance",
"type": "String",
"title": "顶部距离"
},
{
"key": "drawerWidth",
"type": "String",
"title": "抽屉宽度"
},
], ],
}, },
"value": "ModificationTrack", "value": "ModificationTrack",
"path": "报销/通用" "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": "绩效表样", "title": "绩效表样",
"description":"", "description":"",
"discard": false, "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