Commit a9609f96 by yangchen

Merge remote-tracking branch 'origin/develop' into develop-yangchen

parents 6e1d035b f7f79047
...@@ -9,8 +9,18 @@ export default { ...@@ -9,8 +9,18 @@ export default {
data: bill.getBuillData(), data: bill.getBuillData(),
detailData: [], detailData: [],
} }
).then(() => { ).then((res) => {
if (res.data && res.data.code == 0) {
GMS.$hideContainer.$Message.success('操作成功!') 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)
......
...@@ -4,10 +4,21 @@ export default { ...@@ -4,10 +4,21 @@ export default {
let name = GMS.$hideContainer.addComponent(lincaoView, {}, function (c) { let name = GMS.$hideContainer.addComponent(lincaoView, {}, function (c) {
const year = nros.getUser().loginDate.substring(0,4) const year = nros.getUser().loginDate.substring(0,4)
const unitCode = nros.getUser().loginUnit const unitCode = nros.getUser().loginUnit
let orgParam ={
orgCodes:[unitCode],
pagination: true,
queryDataStructure: 'ALL',
}
let sjcode;
GMS.$http
.post('/org/data/get', orgParam)
.then((res) => {
sjcode=res.data.sjcode
})
c.bill = bill.dom c.bill = bill.dom
const projectNum = bill.dom.getMasterData().getData().billCode.value const projectNum = bill.dom.getMasterData().getData().billCode.value
// c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=${unitCode}&type=${param.param.type}&projectNum=${projectNum}&year=${year}` c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=${sjcode}&type=${param.param.type}&projectNum=${projectNum}&year=${year}`
c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=130324&type=jhltlx&projectNum=1&year=2021` // c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=130324&type=jhltlx&projectNum=1&year=2021`
c.name = name c.name = name
c.modalShow = true; c.modalShow = true;
}) })
......
...@@ -9,6 +9,15 @@ export const SIGNATURE_TABLE = { ...@@ -9,6 +9,15 @@ export const SIGNATURE_TABLE = {
APPROVAL_COMMENT: 'approvalComment', APPROVAL_COMMENT: 'approvalComment',
} }
export const APPROVAL_TRACK_TABLE = {
CREATE_TIME: 'createTime',
APPROVAL_COMMENT: 'approvalcomments',
NODE_NAME: 'approvalnodename',
CURRENT_NODE: 'currnode',
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',
......
...@@ -302,7 +302,9 @@ export default { ...@@ -302,7 +302,9 @@ export default {
this.selectIndex = -1 this.selectIndex = -1
} }
else if ( else if (
this.selectValue != this.selectedItem.code this.selectedItem
&& (this.selectedItem.code || this.selectedItem.name)
&& this.selectValue != this.selectedItem.code
&& this.selectValue != this.selectedItem.name && this.selectValue != this.selectedItem.name
) { ) {
this.clearList() this.clearList()
...@@ -475,6 +477,7 @@ export default { ...@@ -475,6 +477,7 @@ export default {
} }
else if (value && value.length) { else if (value && value.length) {
this.handleMainSearchSelectClick(value[0]) this.handleMainSearchSelectClick(value[0])
this.sendEvent(value[0])
} }
}, },
......
...@@ -149,7 +149,16 @@ export default { ...@@ -149,7 +149,16 @@ export default {
}) })
}, },
getBillStateDisable(val, btnItem) { getBillStateDisable(val, btnItem) {
console.log(this.define.btnGroupAction[btnItem], val, btnItem); let disableState = val.split(";");
const getBillState = () => {
if (this.tmpBill.state === "") {
return disableState.includes("billEdit");
} else if (this.tmpBill.state === "readOnly") {
return disableState.includes("billReadOnly");
} else {
return false;
}
};
if (//不走工作流的情况下,执行自定义的按钮禁用状态 if (//不走工作流的情况下,执行自定义的按钮禁用状态
this.define.btnGroupAction && this.define.btnGroupAction &&
this.define.btnGroupAction[btnItem] && this.define.btnGroupAction[btnItem] &&
...@@ -166,7 +175,7 @@ export default { ...@@ -166,7 +175,7 @@ export default {
break; break;
} }
} }
return flag; return flag || getBillState();
} else { } else {
if (!val) return false; if (!val) return false;
let approveState = null; let approveState = null;
...@@ -177,7 +186,7 @@ export default { ...@@ -177,7 +186,7 @@ export default {
} else { } else {
approveState = this.workflowState; approveState = this.workflowState;
} }
let disableState = val.split(";");
// 配置工作流已提交未审批90, billReadOnly状态下可用 // 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改·· // 主要用于保存在审批状态下可用,审批还能修改··
if ( if (
...@@ -193,15 +202,6 @@ export default { ...@@ -193,15 +202,6 @@ export default {
} }
}); });
} }
const getBillState = () => {
if (this.tmpBill.state === "") {
return disableState.includes("billEdit");
} else if (this.tmpBill.state === "readOnly") {
return disableState.includes("billReadOnly");
} else {
return false;
}
};
switch (approveState) { switch (approveState) {
case 90: // 待审批 case 90: // 待审批
return disableState.includes("90"); return disableState.includes("90");
......
...@@ -30,12 +30,17 @@ export default { ...@@ -30,12 +30,17 @@ export default {
if(this.define.config.defineId && this.define.config.defineId.split('.').length>1){ if(this.define.config.defineId && this.define.config.defineId.split('.').length>1){
configId = this.define.config.defineId.split('.')[1]; configId = this.define.config.defineId.split('.')[1];
} }
if(this.define.config.defineName && this.define.config.defineName.split('.').length>1){ let defineName = '';
if(this.define.config.viewName){//跳转界面
defineName = this.define.config.viewName;
}else if(this.define.config.defineName && this.define.config.defineName.split('.').length>1){
configDefineName = this.define.config.defineName.split('.')[1]; configDefineName = this.define.config.defineName.split('.')[1];
defineName = this.context.dataObject.getValue(configDefineName)+ '_E';
}else{
defineName = this.context.dataObject.getValue(configDefineName)+ '_E';
} }
let defineName = this.context.dataObject.getValue(configDefineName);
let id = this.context.dataObject.getValue(configId); let id = this.context.dataObject.getValue(configId);
let a = "/showBillForm/" + defineName + '_E/' + id; let a = "/showBillForm/" + defineName + '/' + id;
let routeData = GMS.routerManager.getRouter().resolve({ let routeData = GMS.routerManager.getRouter().resolve({
path: a, path: a,
query:{ query:{
......
...@@ -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>
...@@ -37,13 +37,18 @@ ...@@ -37,13 +37,18 @@
</div> </div>
<div>{{formatDate(step.createTime)}}</div> <div>{{formatDate(step.createTime)}}</div>
<div class="comment"> <div class="comment">
<div class="modification"> <div class="collapse-header" @click="toggleDetail(k)">
<Icon type="md-arrow-dropup" v-if="expandMap[k]" />
<Icon type="md-arrow-dropdown" v-else />
</div>
<div class="modification" v-show="expandMap[k]">
<div <div
v-for="modification in step.modifyDesc" v-for="modification, modificationIndex in step.modifyDesc"
:key="modification.label" :key="modification.label"
> >
<div class="label text-main">{{modification.label}}</div> <div class="label text-main">{{modification.label}}</div>
<div v-if="isArray(modification.value)"> <div v-if="isArray(modification.value)">
<div class="sub-table-modification-overview">{{modification.value[1].value}}</div>
<div <div
class="sub-table-modification-header" class="sub-table-modification-header"
@click="currentExpandBlock == modification ? currentExpandBlock = null : currentExpandBlock = modification" @click="currentExpandBlock == modification ? currentExpandBlock = null : currentExpandBlock = modification"
...@@ -63,7 +68,7 @@ ...@@ -63,7 +68,7 @@
</div> </div>
</div> </div>
<ValueChangeDetail v-else :value="modification.value" /> <ValueChangeDetail v-else :value="modification.value" />
<Divider /> <Divider v-if="modificationIndex != step.modifyDesc.length - 1" />
</div> </div>
</div> </div>
</div> </div>
...@@ -97,22 +102,22 @@ export default { ...@@ -97,22 +102,22 @@ export default {
showDrawer: false, showDrawer: false,
data: [], data: [],
currentExpandBlock: null, currentExpandBlock: null,
expandMap: [],
} }
}, },
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,17 +127,20 @@ export default { ...@@ -122,17 +127,20 @@ 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
}) })
this.expandMap = new Array(this.data.length).fill(false)
} }
console.log(this.data)
}, },
beforeDestroy() { beforeDestroy() {
}, },
methods:{ methods:{
toggleDetail(index) {
this.expandMap[index] = !this.expandMap[index]
this.expandMap = [...this.expandMap]
},
isCurrentExpandBlock(block) { isCurrentExpandBlock(block) {
return this.currentExpandBlock === block return this.currentExpandBlock === block
}, },
...@@ -153,7 +161,7 @@ export default { ...@@ -153,7 +161,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 +187,9 @@ export default { ...@@ -179,6 +187,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 +231,7 @@ export default { ...@@ -220,7 +231,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 {
...@@ -249,8 +260,23 @@ export default { ...@@ -249,8 +260,23 @@ export default {
line-height: 20px; line-height: 20px;
} }
.comment { .comment {
.collapse-header {
background-color: #e5e5e5;
height: 26px;
font-size: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
user-select: none;
}
.modification { .modification {
margin-top: 5px; border: 1px solid #e5e5e5;
padding: 18px 5px;
.sub-table-modification-overview {
color: black;
margin: 5px 0;
}
.sub-table-modification-header { .sub-table-modification-header {
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
......
<template> <template>
<div class="bill-achievements"> <div class="bill-achievements">
<vxe-table border ref="xTable" :data="tableData" :show-header="false"> <vxe-table
border
ref="xTable"
:data="tableData"
:show-header="false"
:cell-style="cellStyle"
>
<vxe-table-column <vxe-table-column
field="name" field="name"
title="name" title="name"
...@@ -11,6 +17,7 @@ ...@@ -11,6 +17,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<component <component
:is="scope.row.type" :is="scope.row.type"
:disabled="state == 'readOnly'"
:attr="{ field: 'value', row: scope.row, attr: scope.row.attr }" :attr="{ field: 'value', row: scope.row, attr: scope.row.attr }"
:detailData=" :detailData="
scope.row.attr && scope.row.attr.tableData scope.row.attr && scope.row.attr.tableData
...@@ -31,8 +38,9 @@ import vxeTableControl from "./components/vxe-table.vue"; ...@@ -31,8 +38,9 @@ import vxeTableControl from "./components/vxe-table.vue";
import radioGroupControl from "./components/radioGroupControl.vue"; import radioGroupControl from "./components/radioGroupControl.vue";
import inputControl from "./components/inputControl.vue"; import inputControl from "./components/inputControl.vue";
import textAreaControl from "./components/textAreaControl.vue"; import textAreaControl from "./components/textAreaControl.vue";
import input from "../util/bc_input.js";
export default { export default {
mixins: [vxeAchievements], mixins: [vxeAchievements, input],
components: { components: {
vxeTableControl, vxeTableControl,
dateControl, dateControl,
...@@ -128,12 +136,12 @@ export default { ...@@ -128,12 +136,12 @@ export default {
{ {
name: "单位(部门)职能概述", name: "单位(部门)职能概述",
type: "textAreaControl", type: "textAreaControl",
value: "xx", value: "",
}, },
{ {
name: "项目概况", name: "项目概况",
type: "textAreaControl", type: "textAreaControl",
value: "33", value: "",
}, },
{ {
name: "项目立项情况", name: "项目立项情况",
...@@ -656,7 +664,7 @@ export default { ...@@ -656,7 +664,7 @@ export default {
name: "填报人:", name: "填报人:",
type: "vxeTableControl", type: "vxeTableControl",
attr: { attr: {
border:'none', border: "none",
showHeader: false, showHeader: false,
addObj: { addObj: {
name: "", name: "",
...@@ -666,18 +674,18 @@ export default { ...@@ -666,18 +674,18 @@ export default {
{ {
person: "单位(部门)负责人:", person: "单位(部门)负责人:",
time: "填报时间:", time: "填报时间:",
} },
], ],
columns: [ columns: [
{ {
field: "person", field: "person",
title: "部门负责人", title: "部门负责人",
type: "inputControl" type: "inputControl",
}, },
{ {
field: "time", field: "time",
title: "填报时间", title: "填报时间",
type: "inputControl" type: "inputControl",
}, },
], ],
}, },
...@@ -686,34 +694,46 @@ export default { ...@@ -686,34 +694,46 @@ export default {
}; };
}, },
props: { props: {
define: { // define: {
type: Object, // type: Object,
default: () => {}, // default: () => {},
}, // },
context: { // context: {
type: Object, // type: Object,
default: () => {}, // default: () => {},
}, // },
}, },
watch: { watch: {
tableData: { tableData: {
handler(nv, ov) { handler(nv, ov) {
console.log(nv, ov); console.log(nv, ov);
if (this.define.config.field) { if (this.define.config.field) {
this.context.dataObject.setValue(this.define.config.field, nv); this.context.dataObject.setValue(
this.define.config.field.split(".")[1],
JSON.stringify(nv)
);
} }
}, },
deep: true, deep: true,
}, },
value: {
handler(nv, ov) {
console.log("value", nv, ov);
this.tableData = JSON.parse(nv);
},
deep: true,
},
}, },
computed: {}, computed: {},
methods: { methods: {
Primary() {
console.log(this.tableData);
},
updataTableData(nv, rowIndex) { updataTableData(nv, rowIndex) {
this.tableData[rowIndex].attr.tableData = nv; this.tableData[rowIndex].attr.tableData = nv;
}, },
cellStyle({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex }) {
return {
backgroundColor:this.state == 'readOnly'? "#F3F3F3":''
}
},
}, },
mounted() {}, mounted() {},
created() {}, created() {},
...@@ -736,10 +756,9 @@ export default { ...@@ -736,10 +756,9 @@ export default {
.rbcInputControl textarea.ivu-input { .rbcInputControl textarea.ivu-input {
max-width: inherit; max-width: inherit;
font-size: 14px; font-size: 14px;
vertical-align:revert; vertical-align: revert;
} }
.bill-achievements { .bill-achievements {
.vxe-table--render-default .vxe-body--column:not(.col--ellipsis) { .vxe-table--render-default .vxe-body--column:not(.col--ellipsis) {
padding: 0; padding: 0;
line-height: 44px; line-height: 44px;
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
" "
:placement="attr.column && attr.column.placement" :placement="attr.column && attr.column.placement"
v-model="attr.row[attr.field]" v-model="attr.row[attr.field]"
:disabled="disabled"
transfer
transfer-class-name="transferred-cell-element"
:readonly="true"
></DatePicker> ></DatePicker>
</div> </div>
</template> </template>
...@@ -22,6 +26,9 @@ export default { ...@@ -22,6 +26,9 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
disabled: {
require: false
}
}, },
watch: {}, watch: {},
computed: {}, computed: {},
......
<template> <template>
<div class="rbcInputControl"> <div class="rbcInputControl">
<Input v-model="attr.row[attr.field]"/> <Input v-model="attr.row[attr.field]" :disabled="disabled"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -14,6 +14,9 @@ export default { ...@@ -14,6 +14,9 @@ export default {
attr:{ attr:{
type:Object, type:Object,
default:()=>{} default:()=>{}
},
disabled: {
require: false
} }
}, },
watch: {}, watch: {},
......
<template> <template>
<div class=""> <div class="">
<RadioGroup v-model="attr.row[attr.field]"> <RadioGroup v-model="attr.row[attr.field]" >
<Radio label="新增项目"></Radio>&nbsp;&nbsp;&nbsp; <Radio label="新增项目" :disabled="disabled"></Radio>&nbsp;&nbsp;&nbsp;
<Radio label="延续项目"></Radio> <Radio label="延续项目" :disabled="disabled"></Radio>
</RadioGroup> </RadioGroup>
</div> </div>
</template> </template>
...@@ -15,6 +15,9 @@ export default { ...@@ -15,6 +15,9 @@ export default {
attr:{ attr:{
type:Object, type:Object,
default:()=>{} default:()=>{}
},
disabled: {
require: false
} }
}, },
watch: {}, watch: {},
......
<template> <template>
<div class="rbcInputControl"> <div class="rbcInputControl">
<Input v-model="attr.row[attr.field]" type="textarea"/> <Input v-model="attr.row[attr.field]" type="textarea" :disabled="disabled"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -14,6 +14,9 @@ export default { ...@@ -14,6 +14,9 @@ export default {
attr:{ attr:{
type:Object, type:Object,
default:()=>{} default:()=>{}
},
disabled: {
require: false
} }
}, },
watch: {}, watch: {},
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
:span-method="spanMethods" :span-method="spanMethods"
:menu-config="tableMenu" :menu-config="tableMenu"
@menu-click="contextMenuClickEvent" @menu-click="contextMenuClickEvent"
:cell-style="cellStyle"
> >
<template v-for="(column, index) in attr.attr.columns"> <template v-for="(column, index) in attr.attr.columns">
<vxe-table-column <vxe-table-column
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<component <component
:disabled="disabled"
:is="column.type" :is="column.type"
:attr="{ field: column.field, row: scope.row, column: column }" :attr="{ field: column.field, row: scope.row, column: column }"
></component> ></component>
...@@ -44,7 +46,7 @@ export default { ...@@ -44,7 +46,7 @@ export default {
dateControl, dateControl,
radioGroupControl, radioGroupControl,
inputControl, inputControl,
textAreaControl textAreaControl,
}, },
data() { data() {
return { return {
...@@ -57,6 +59,7 @@ export default { ...@@ -57,6 +59,7 @@ export default {
], ],
], ],
}, },
visibleMethod: this.visibleMethod,
}, },
}; };
}, },
...@@ -69,10 +72,18 @@ export default { ...@@ -69,10 +72,18 @@ export default {
type: Array, type: Array,
default: () => {}, default: () => {},
}, },
disabled: {
require: false,
},
}, },
watch: {}, watch: {},
computed: {}, computed: {},
methods: { methods: {
cellStyle({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex }) {
return {
backgroundColor:this.disabled? "#F3F3F3":''
}
},
headerCellClassName({ column, columnIndex }) { headerCellClassName({ column, columnIndex }) {
if (column.property === "content") { if (column.property === "content") {
return "col-white"; return "col-white";
...@@ -97,18 +108,30 @@ export default { ...@@ -97,18 +108,30 @@ export default {
} }
} }
}, },
contextMenuClickEvent({ menu, row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }) { visibleMethod({ options, column }) {
return this.disabled?false:true;
},
contextMenuClickEvent({
menu,
row,
rowIndex,
$rowIndex,
column,
columnIndex,
$columnIndex,
$event,
}) {
console.log(menu, row, rowIndex, column, columnIndex); console.log(menu, row, rowIndex, column, columnIndex);
let detailXTable = this.$refs.detailXTable; let detailXTable = this.$refs.detailXTable;
switch (menu.code) { switch (menu.code) {
case "addRow": case "addRow":
detailXTable.insertAt(this.attr.attr.addObj,row); detailXTable.insertAt(this.attr.attr.addObj, row);
this.$emit('dataChange',detailXTable.tableFullData); this.$emit("dataChange", detailXTable.tableFullData);
break; break;
case "removeRow": case "removeRow":
if(detailXTable.tableFullData.length>1){ if (detailXTable.tableFullData.length > 1) {
detailXTable.remove(row); detailXTable.remove(row);
this.$emit('dataChange',detailXTable.tableFullData); this.$emit("dataChange", detailXTable.tableFullData);
} }
break; break;
default: default:
...@@ -122,8 +145,8 @@ export default { ...@@ -122,8 +145,8 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.detail-table { .detail-table {
margin-left:-11px; margin-left: -11px;
margin-top:-1px; margin-top: -1px;
width: calc(100% + 23px); width: calc(100% + 23px);
.vxe-header--column .col-white { .vxe-header--column .col-white {
background-color: #fff !important; background-color: #fff !important;
......
...@@ -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,37 @@ export default { ...@@ -159,6 +160,37 @@ 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)
const currNode = obj.getValue(APPROVAL_TRACK_TABLE.CURRENT_NODE)
return {
state: 2,
result:
currNode == 99
? -2
: 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),
}
})
this.data = this.data.reverse()
}
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 +303,13 @@ export default { ...@@ -271,13 +303,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 +323,7 @@ export default { ...@@ -291,7 +323,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 +388,7 @@ export default { ...@@ -356,7 +388,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,
...@@ -63,6 +110,12 @@ export default { ...@@ -63,6 +110,12 @@ export default {
"ref": "BillClassVO.attributes", "ref": "BillClassVO.attributes",
"disableReload": false, "disableReload": false,
"title": "单据定义" "title": "单据定义"
},{
"isRequired": true,
"ref": "bill",
"type": "metaData",
"title": "跳转页面",
"key": "viewName"
}] }]
}, },
"value": "linkShowDetail", "value": "linkShowDetail",
...@@ -1306,6 +1359,24 @@ export default { ...@@ -1306,6 +1359,24 @@ export default {
"title": "导出Excel" "title": "导出Excel"
}, },
{ {
"value": "importExcel",
"discard": false,
"path": "云报销",
"extends": {
"paramDes": [
{
"isRequired": true,
"ref": "bill",
"type": "metaData",
"title": "billDefine",
"key": "billDefine"
},
]
},
"description": "导入Excel",
"title": "导入Excel"
},
{
"value": "customDeleteAction", "value": "customDeleteAction",
"discard": false, "discard": false,
"path": "云报销", "path": "云报销",
...@@ -2055,7 +2126,7 @@ export default { ...@@ -2055,7 +2126,7 @@ export default {
] ]
}, },
"description": "", "description": "",
"title": "财务_同意[GH_agreeAction]", "title": "工会_同意[GH_agreeAction]",
"value": "GH_agreeAction", "value": "GH_agreeAction",
"btnDisable": "billEdit" "btnDisable": "billEdit"
}, },
...@@ -2154,7 +2225,7 @@ export default { ...@@ -2154,7 +2225,7 @@ export default {
] ]
}, },
"description": "", "description": "",
"title": "财务_驳回[GH_rejectAction]", "title": "工会_驳回[GH_rejectAction]",
"value": "GH_rejectAction", "value": "GH_rejectAction",
"btnDisable": "billEdit" "btnDisable": "billEdit"
}, },
...@@ -2202,7 +2273,7 @@ export default { ...@@ -2202,7 +2273,7 @@ export default {
] ]
}, },
"description": "", "description": "",
"title": "财务_提交[GH_submitAction]", "title": "工会_提交[GH_submitAction]",
"value": "GH_submitAction", "value": "GH_submitAction",
"btnDisable": "billEdit;1;90;92" "btnDisable": "billEdit;1;90;92"
}, },
...@@ -2264,18 +2335,6 @@ export default { ...@@ -2264,18 +2335,6 @@ export default {
}, },
{ {
"discard": false, "discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_同意[GH_agreeAction]",
"value": "GH_agreeAction",
"btnDisable": "false"
},
{
"discard": false,
"path": "报销/工会", "path": "报销/工会",
"extends": { "extends": {
"param": [ "param": [
...@@ -2286,30 +2345,6 @@ export default { ...@@ -2286,30 +2345,6 @@ export default {
"value": "GH_retrieveAction", "value": "GH_retrieveAction",
"btnDisable": "billEdit" "btnDisable": "billEdit"
}, },
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_拒绝[GH_rejectAction]",
"value": "GH_rejectAction",
"btnDisable": "billEdit"
},
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_提交[GH_submitAction]",
"value": "GH_submitAction",
"btnDisable": "billEdit"
},
], ],
billFormula: [ billFormula: [
{ {
......
...@@ -25,7 +25,8 @@ const formulaObject = { ...@@ -25,7 +25,8 @@ const formulaObject = {
'MdFilterByStartsWithFieldValue','MdFilterInfiniteValue','MdFilterOneToMulti', 'MdFilterByStartsWithFieldValue','MdFilterInfiniteValue','MdFilterOneToMulti',
'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne', 'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne',
'UpdateAccount','UpdateBillMoneyFunction','UpdateBillReferenceRelationshipFunction','UpdateBorrowMoneyState', 'UpdateAccount','UpdateBillMoneyFunction','UpdateBillReferenceRelationshipFunction','UpdateBorrowMoneyState',
'UpdateImageInfoRefState','UpdatePaymentState','UpdateRalationBillValueFunction','MdStringMultiFilter','GetYqddBaseDataWithGroupField','ConvertMicrometer','UpdateBillMoneyByDifferenceFunction','UpdateBillMoneyByJKDFunction'].forEach((name) => { 'UpdateImageInfoRefState','UpdatePaymentState','UpdateRalationBillValueFunction','MdStringMultiFilter','GetYqddBaseDataWithGroupField',
'ConvertMicrometer','UpdateBillMoneyByDifferenceFunction','UpdateBillMoneyByJKDFunction','GenerateMdData','UpdateJKDSHJE'].forEach((name) => {
formulaObject[name] = gen() formulaObject[name] = gen()
}) })
export default formulaObject export default formulaObject
\ No newline at end of file
...@@ -63,6 +63,7 @@ import createBill from './query-actions/createBill.js'; ...@@ -63,6 +63,7 @@ import createBill from './query-actions/createBill.js';
import editBill from './query-actions/editBill.js'; import editBill from './query-actions/editBill.js';
import examineAction from './query-actions/examineAction.js' import examineAction from './query-actions/examineAction.js'
import exportExcel from './query-actions/exportExcel.js' import exportExcel from './query-actions/exportExcel.js'
import importExcel from './query-actions/importExcel.js'
import createBills from './query-actions/createBills' import createBills from './query-actions/createBills'
import payment from "./query-actions/payments/payment"; import payment from "./query-actions/payments/payment";
import batchPayment from "./query-actions/payments/batchPayment"; import batchPayment from "./query-actions/payments/batchPayment";
...@@ -198,6 +199,7 @@ export default { ...@@ -198,6 +199,7 @@ export default {
editBill, editBill,
examineAction, examineAction,
exportExcel, exportExcel,
importExcel,
customDeleteAction, customDeleteAction,
createBills, createBills,
batchPayment, batchPayment,
......
function popFileSelector () {
return new Promise((resolve, reject) => {
let input = document.createElement('input')
input.value = '选择文件'
input.type = 'file'
input.onchange = event => {
let file = event.target.files[0]
resolve(file)
};
input.click()
});
}
export default {
execute (context, param) {
popFileSelector().then((res) => {
const postParam = new FormData()
postParam.append('file', res)
postParam.append('billDefine', param.billDefine)
window.GMS.$http.post(
`/rbcquery/importExcelBudgetItems`,
postParam,
{
headers: {
'Content-Type': 'multipart/form-data'
}
}
).then((res) => {
if (res.data && res.data.code == 0) {
GMS.$hideContainer.$Message.success(`导入成功,共导入${res.data.successNum}条`)
}
else {
throw new Error()
}
}).catch(() => {
GMS.$hideContainer.$Message.error('导入失败')
})
})
}
}
\ No newline at end of file
/* /*
* @Description:余额结转 * @Description:余额结转
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
if (!param.billId || !param.billDefine) { if (!param.billId || !param.billDefine) {
context.dom.$Message.info("请配置查询单据参数"); context.dom.$Message.info("请配置查询单据参数");
return; return;
} }
if(context.selects.length==0){ if (context.selects && context.selects.length == 0) {
context.dom.$Message.info("请勾择需要结转的数据"); context.dom.$Message.info("请勾择需要结转的数据");
return; return;
} }
let billDefine = param.billDefine.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let billDefine = param.billDefine
.replace(/_E/gi, "")
this.generateVoucher(context.selects,billDefine,param.billId,context); .replace(/_R/gi, "")
.replace(/_A/gi, "");
let list = context.selects.map(v=>{
v.billDefine = billDefine;
v.billId = v[param.billId];
return v
})
this.generateVoucher(list, context);
}, },
generateVoucher(list,billDefine,billId,context){ generateVoucher(list, context) {
axios({ window.GMS.$http
          method: 'POST', .post("/rbczgh/carryForward/balance",list)
          url:GMS.url+'/rbczgh/carryForward/balance', .then((res) => {
          headers: { if(res.data.code == 0){
              Authorization:GMS.token, context.dom.$Modal.warning({
          }, title: "信息提示",
data:{ content: res.data.msg,
jsonArry:list, onOk: () => {
billDefine:billDefine, GMS.vbus.$emit("custom-query-refresh");
billId:billId GMS.vbus.$emit("tab-count-refresh");
} },
        }).then(res => { });
          if (res.status === 200) { }else{
context.dom.$Modal.warning({ context.dom.$Modal.warning({
title: '信息提示', title: "信息提示",
content: res.data.data.processMsg, content: res.data.msg,
onOk: () => {}, onOk: () => {},
}); });
          } }
        }) });
}, },
};
}
\ No newline at end of file
/* /*
* @Description:项目结转 * @Description:项目结转
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
if (!param.billId || !param.billDefine) { if (!param.billId || !param.billDefine) {
context.dom.$Message.info("请配置查询单据参数"); context.dom.$Message.info("请配置查询单据参数");
return; return;
} }
if(context.selects.length==0){ if (context.selects && context.selects.length == 0) {
context.dom.$Message.info("请勾择需要结转的数据"); context.dom.$Message.info("请勾择需要结转的数据");
return; return;
} }
let billDefine = param.billDefine.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let billDefine = param.billDefine
.replace(/_E/gi, "")
this.generateVoucher(context.selects,billDefine,param.billId,context); .replace(/_R/gi, "")
.replace(/_A/gi, "");
let list = context.selects.map((v) => {
v.billDefine = billDefine;
v.billId = v[param.billId];
return v;
});
this.generateVoucher(list, context);
}, },
generateVoucher(list,billDefine,billId,context){ generateVoucher(list, context) {
axios({ window.GMS.$http
          method: 'POST', .post("/rbczgh/carryForward/project",list)
          url:GMS.url+'/rbczgh/carryForward/project', .then((res) => {
          headers: { if(res.data.code == 0){
              Authorization:GMS.token,
          },
data:{
jsonArry:list,
billDefine:billDefine,
billId:billId
}
        }).then(res => {
          if (res.status === 200) {
context.dom.$Modal.warning({ context.dom.$Modal.warning({
title: '信息提示', title: "信息提示",
content: res.data.data.processMsg, content: res.data.message,
onOk: () => {
GMS.vbus.$emit("custom-query-refresh");
GMS.vbus.$emit("tab-count-refresh");
},
});
}else{
context.dom.$Modal.warning({
title: "信息提示",
content: res.data.message,
onOk: () => {}, onOk: () => {},
}); });
          } }
        }) });
}, },
};
}
\ No newline at end of file
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