Commit a9609f96 by yangchen

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

parents 6e1d035b f7f79047
......@@ -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)
......
......@@ -4,10 +4,21 @@ export default {
let name = GMS.$hideContainer.addComponent(lincaoView, {}, function (c) {
const year = nros.getUser().loginDate.substring(0,4)
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
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=130324&type=jhltlx&projectNum=1&year=2021`
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.name = name
c.modalShow = true;
})
......
......@@ -9,6 +9,15 @@ export const SIGNATURE_TABLE = {
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 = {
SIGNATURE_FIELDS: 'signatureFields',
APPROVAL_COMMENT: 'approvalComment',
......
......@@ -302,7 +302,9 @@ export default {
this.selectIndex = -1
}
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.clearList()
......@@ -475,6 +477,7 @@ export default {
}
else if (value && value.length) {
this.handleMainSearchSelectClick(value[0])
this.sendEvent(value[0])
}
},
......
......@@ -149,7 +149,16 @@ export default {
})
},
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 (//不走工作流的情况下,执行自定义的按钮禁用状态
this.define.btnGroupAction &&
this.define.btnGroupAction[btnItem] &&
......@@ -166,7 +175,7 @@ export default {
break;
}
}
return flag;
return flag || getBillState();
} else {
if (!val) return false;
let approveState = null;
......@@ -177,7 +186,7 @@ export default {
} else {
approveState = this.workflowState;
}
let disableState = val.split(";");
// 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改··
if (
......@@ -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) {
case 90: // 待审批
return disableState.includes("90");
......@@ -255,4 +255,4 @@ export default {
}
}
}
</style>
</style>
\ No newline at end of file
......@@ -30,12 +30,17 @@ export default {
if(this.define.config.defineId && this.define.config.defineId.split('.').length>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];
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 a = "/showBillForm/" + defineName + '_E/' + id;
let a = "/showBillForm/" + defineName + '/' + id;
let routeData = GMS.routerManager.getRouter().resolve({
path: a,
query:{
......
......@@ -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>
......@@ -37,13 +37,18 @@
</div>
<div>{{formatDate(step.createTime)}}</div>
<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
v-for="modification in step.modifyDesc"
v-for="modification, modificationIndex in step.modifyDesc"
:key="modification.label"
>
<div class="label text-main">{{modification.label}}</div>
<div v-if="isArray(modification.value)">
<div class="sub-table-modification-overview">{{modification.value[1].value}}</div>
<div
class="sub-table-modification-header"
@click="currentExpandBlock == modification ? currentExpandBlock = null : currentExpandBlock = modification"
......@@ -63,7 +68,7 @@
</div>
</div>
<ValueChangeDetail v-else :value="modification.value" />
<Divider />
<Divider v-if="modificationIndex != step.modifyDesc.length - 1" />
</div>
</div>
</div>
......@@ -97,22 +102,22 @@ export default {
showDrawer: false,
data: [],
currentExpandBlock: null,
expandMap: [],
}
},
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,17 +127,20 @@ 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
})
this.expandMap = new Array(this.data.length).fill(false)
}
console.log(this.data)
},
beforeDestroy() {
},
methods:{
toggleDetail(index) {
this.expandMap[index] = !this.expandMap[index]
this.expandMap = [...this.expandMap]
},
isCurrentExpandBlock(block) {
return this.currentExpandBlock === block
},
......@@ -153,7 +161,7 @@ export default {
.modification-button {
cursor: pointer;
position: absolute;
z-index: 1000;
z-index: 700;
padding-top: 4px;
width: 42px;
height: 36px;
......@@ -179,6 +187,9 @@ export default {
}
.modification-step-wrapper {
width: 100%;
.ivu-divider-horizontal {
margin: 18px 0;
}
.modification-step {
width: 100%;
position: relative;
......@@ -220,7 +231,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 {
......@@ -249,8 +260,23 @@ export default {
line-height: 20px;
}
.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 {
margin-top: 5px;
border: 1px solid #e5e5e5;
padding: 18px 5px;
.sub-table-modification-overview {
color: black;
margin: 5px 0;
}
.sub-table-modification-header {
user-select: none;
cursor: pointer;
......
<template>
<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
field="name"
title="name"
......@@ -11,6 +17,7 @@
<template slot-scope="scope">
<component
:is="scope.row.type"
:disabled="state == 'readOnly'"
:attr="{ field: 'value', row: scope.row, attr: scope.row.attr }"
:detailData="
scope.row.attr && scope.row.attr.tableData
......@@ -31,8 +38,9 @@ import vxeTableControl from "./components/vxe-table.vue";
import radioGroupControl from "./components/radioGroupControl.vue";
import inputControl from "./components/inputControl.vue";
import textAreaControl from "./components/textAreaControl.vue";
import input from "../util/bc_input.js";
export default {
mixins: [vxeAchievements],
mixins: [vxeAchievements, input],
components: {
vxeTableControl,
dateControl,
......@@ -128,12 +136,12 @@ export default {
{
name: "单位(部门)职能概述",
type: "textAreaControl",
value: "xx",
value: "",
},
{
name: "项目概况",
type: "textAreaControl",
value: "33",
value: "",
},
{
name: "项目立项情况",
......@@ -656,7 +664,7 @@ export default {
name: "填报人:",
type: "vxeTableControl",
attr: {
border:'none',
border: "none",
showHeader: false,
addObj: {
name: "",
......@@ -666,18 +674,18 @@ export default {
{
person: "单位(部门)负责人:",
time: "填报时间:",
}
},
],
columns: [
{
field: "person",
title: "部门负责人",
type: "inputControl"
type: "inputControl",
},
{
field: "time",
title: "填报时间",
type: "inputControl"
type: "inputControl",
},
],
},
......@@ -686,34 +694,46 @@ export default {
};
},
props: {
define: {
type: Object,
default: () => {},
},
context: {
type: Object,
default: () => {},
},
// define: {
// type: Object,
// default: () => {},
// },
// context: {
// type: Object,
// default: () => {},
// },
},
watch: {
tableData: {
handler(nv, ov) {
console.log(nv, ov);
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,
},
value: {
handler(nv, ov) {
console.log("value", nv, ov);
this.tableData = JSON.parse(nv);
},
deep: true,
},
},
computed: {},
methods: {
Primary() {
console.log(this.tableData);
},
updataTableData(nv, rowIndex) {
this.tableData[rowIndex].attr.tableData = nv;
},
cellStyle({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex }) {
return {
backgroundColor:this.state == 'readOnly'? "#F3F3F3":''
}
},
},
mounted() {},
created() {},
......@@ -736,10 +756,9 @@ export default {
.rbcInputControl textarea.ivu-input {
max-width: inherit;
font-size: 14px;
vertical-align:revert;
vertical-align: revert;
}
.bill-achievements {
.vxe-table--render-default .vxe-body--column:not(.col--ellipsis) {
padding: 0;
line-height: 44px;
......
......@@ -9,6 +9,10 @@
"
:placement="attr.column && attr.column.placement"
v-model="attr.row[attr.field]"
:disabled="disabled"
transfer
transfer-class-name="transferred-cell-element"
:readonly="true"
></DatePicker>
</div>
</template>
......@@ -22,6 +26,9 @@ export default {
type: Object,
default: () => {},
},
disabled: {
require: false
}
},
watch: {},
computed: {},
......
<template>
<div class="rbcInputControl">
<Input v-model="attr.row[attr.field]"/>
<Input v-model="attr.row[attr.field]" :disabled="disabled"/>
</div>
</template>
<script>
......@@ -14,6 +14,9 @@ export default {
attr:{
type:Object,
default:()=>{}
},
disabled: {
require: false
}
},
watch: {},
......
<template>
<div class="">
<RadioGroup v-model="attr.row[attr.field]">
<Radio label="新增项目"></Radio>&nbsp;&nbsp;&nbsp;
<Radio label="延续项目"></Radio>
<RadioGroup v-model="attr.row[attr.field]" >
<Radio label="新增项目" :disabled="disabled"></Radio>&nbsp;&nbsp;&nbsp;
<Radio label="延续项目" :disabled="disabled"></Radio>
</RadioGroup>
</div>
</template>
......@@ -15,6 +15,9 @@ export default {
attr:{
type:Object,
default:()=>{}
},
disabled: {
require: false
}
},
watch: {},
......
<template>
<div class="rbcInputControl">
<Input v-model="attr.row[attr.field]" type="textarea"/>
<Input v-model="attr.row[attr.field]" type="textarea" :disabled="disabled"/>
</div>
</template>
<script>
......@@ -14,6 +14,9 @@ export default {
attr:{
type:Object,
default:()=>{}
},
disabled: {
require: false
}
},
watch: {},
......
......@@ -9,6 +9,7 @@
:span-method="spanMethods"
:menu-config="tableMenu"
@menu-click="contextMenuClickEvent"
:cell-style="cellStyle"
>
<template v-for="(column, index) in attr.attr.columns">
<vxe-table-column
......@@ -21,6 +22,7 @@
>
<template slot-scope="scope">
<component
:disabled="disabled"
:is="column.type"
:attr="{ field: column.field, row: scope.row, column: column }"
></component>
......@@ -44,11 +46,11 @@ export default {
dateControl,
radioGroupControl,
inputControl,
textAreaControl
textAreaControl,
},
data() {
return {
tableMenu: {
tableMenu: {
body: {
options: [
[
......@@ -57,6 +59,7 @@ export default {
],
],
},
visibleMethod: this.visibleMethod,
},
};
},
......@@ -69,10 +72,18 @@ export default {
type: Array,
default: () => {},
},
disabled: {
require: false,
},
},
watch: {},
computed: {},
methods: {
cellStyle({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex }) {
return {
backgroundColor:this.disabled? "#F3F3F3":''
}
},
headerCellClassName({ column, columnIndex }) {
if (column.property === "content") {
return "col-white";
......@@ -97,18 +108,30 @@ export default {
}
}
},
contextMenuClickEvent({ menu, row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }) {
console.log(menu, row, rowIndex, column, columnIndex);
visibleMethod({ options, column }) {
return this.disabled?false:true;
},
contextMenuClickEvent({
menu,
row,
rowIndex,
$rowIndex,
column,
columnIndex,
$columnIndex,
$event,
}) {
console.log(menu, row, rowIndex, column, columnIndex);
let detailXTable = this.$refs.detailXTable;
switch (menu.code) {
case "addRow":
detailXTable.insertAt(this.attr.attr.addObj,row);
this.$emit('dataChange',detailXTable.tableFullData);
detailXTable.insertAt(this.attr.attr.addObj, row);
this.$emit("dataChange", detailXTable.tableFullData);
break;
case "removeRow":
if(detailXTable.tableFullData.length>1){
if (detailXTable.tableFullData.length > 1) {
detailXTable.remove(row);
this.$emit('dataChange',detailXTable.tableFullData);
this.$emit("dataChange", detailXTable.tableFullData);
}
break;
default:
......@@ -122,9 +145,9 @@ export default {
</script>
<style lang="less" scoped>
.detail-table {
margin-left:-11px;
margin-top:-1px;
width: calc(100% + 23px);
margin-left: -11px;
margin-top: -1px;
width: calc(100% + 23px);
.vxe-header--column .col-white {
background-color: #fff !important;
}
......
......@@ -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,37 @@ 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)
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({
path: 'gms/workflow/task/approved',
type: 'GET',
......@@ -271,13 +303,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 +323,7 @@ export default {
.workflow-button {
cursor: pointer;
position: absolute;
z-index: 1000;
z-index: 700;
padding-top: 4px;
width: 42px;
height: 36px;
......@@ -356,7 +388,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,
......@@ -63,6 +110,12 @@ export default {
"ref": "BillClassVO.attributes",
"disableReload": false,
"title": "单据定义"
},{
"isRequired": true,
"ref": "bill",
"type": "metaData",
"title": "跳转页面",
"key": "viewName"
}]
},
"value": "linkShowDetail",
......@@ -1306,6 +1359,24 @@ export default {
"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",
"discard": false,
"path": "云报销",
......@@ -2055,7 +2126,7 @@ export default {
]
},
"description": "",
"title": "财务_同意[GH_agreeAction]",
"title": "工会_同意[GH_agreeAction]",
"value": "GH_agreeAction",
"btnDisable": "billEdit"
},
......@@ -2154,7 +2225,7 @@ export default {
]
},
"description": "",
"title": "财务_驳回[GH_rejectAction]",
"title": "工会_驳回[GH_rejectAction]",
"value": "GH_rejectAction",
"btnDisable": "billEdit"
},
......@@ -2202,7 +2273,7 @@ export default {
]
},
"description": "",
"title": "财务_提交[GH_submitAction]",
"title": "工会_提交[GH_submitAction]",
"value": "GH_submitAction",
"btnDisable": "billEdit;1;90;92"
},
......@@ -2264,18 +2335,6 @@ export default {
},
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_同意[GH_agreeAction]",
"value": "GH_agreeAction",
"btnDisable": "false"
},
{
"discard": false,
"path": "报销/工会",
"extends": {
"param": [
......@@ -2286,30 +2345,6 @@ export default {
"value": "GH_retrieveAction",
"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: [
{
......
......@@ -25,7 +25,8 @@ const formulaObject = {
'MdFilterByStartsWithFieldValue','MdFilterInfiniteValue','MdFilterOneToMulti',
'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne',
'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()
})
export default formulaObject
\ No newline at end of file
......@@ -63,6 +63,7 @@ import createBill from './query-actions/createBill.js';
import editBill from './query-actions/editBill.js';
import examineAction from './query-actions/examineAction.js'
import exportExcel from './query-actions/exportExcel.js'
import importExcel from './query-actions/importExcel.js'
import createBills from './query-actions/createBills'
import payment from "./query-actions/payments/payment";
import batchPayment from "./query-actions/payments/batchPayment";
......@@ -198,6 +199,7 @@ export default {
editBill,
examineAction,
exportExcel,
importExcel,
customDeleteAction,
createBills,
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:余额结转
*/
import axios from 'axios'
export default {
execute(context, param) {
if (!param.billId || !param.billDefine) {
context.dom.$Message.info("请配置查询单据参数");
return;
execute(context, param) {
if (!param.billId || !param.billDefine) {
context.dom.$Message.info("请配置查询单据参数");
return;
}
if (context.selects && context.selects.length == 0) {
context.dom.$Message.info("请勾择需要结转的数据");
return;
}
let billDefine = param.billDefine
.replace(/_E/gi, "")
.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, context) {
window.GMS.$http
.post("/rbczgh/carryForward/balance",list)
.then((res) => {
if(res.data.code == 0){
context.dom.$Modal.warning({
title: "信息提示",
content: res.data.msg,
onOk: () => {
GMS.vbus.$emit("custom-query-refresh");
GMS.vbus.$emit("tab-count-refresh");
},
});
}else{
context.dom.$Modal.warning({
title: "信息提示",
content: res.data.msg,
onOk: () => {},
});
}
if(context.selects.length==0){
context.dom.$Message.info("请勾择需要结转的数据");
return;
}
let billDefine = param.billDefine.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
this.generateVoucher(context.selects,billDefine,param.billId,context);
},
generateVoucher(list,billDefine,billId,context){
axios({
          method: 'POST',
          url:GMS.url+'/rbczgh/carryForward/balance',
          headers: {
              Authorization:GMS.token,
          },
data:{
jsonArry:list,
billDefine:billDefine,
billId:billId
}
        }).then(res => {
          if (res.status === 200) {
context.dom.$Modal.warning({
title: '信息提示',
content: res.data.data.processMsg,
onOk: () => {},
});
          }
        })
},
}
\ No newline at end of file
});
},
};
/*
* @Description:项目结转
*/
import axios from 'axios'
export default {
execute(context, param) {
if (!param.billId || !param.billDefine) {
context.dom.$Message.info("请配置查询单据参数");
return;
execute(context, param) {
if (!param.billId || !param.billDefine) {
context.dom.$Message.info("请配置查询单据参数");
return;
}
if (context.selects && context.selects.length == 0) {
context.dom.$Message.info("请勾择需要结转的数据");
return;
}
let billDefine = param.billDefine
.replace(/_E/gi, "")
.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, context) {
window.GMS.$http
.post("/rbczgh/carryForward/project",list)
.then((res) => {
if(res.data.code == 0){
context.dom.$Modal.warning({
title: "信息提示",
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: () => {},
});
}
if(context.selects.length==0){
context.dom.$Message.info("请勾择需要结转的数据");
return;
}
let billDefine = param.billDefine.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
this.generateVoucher(context.selects,billDefine,param.billId,context);
},
generateVoucher(list,billDefine,billId,context){
axios({
          method: 'POST',
          url:GMS.url+'/rbczgh/carryForward/project',
          headers: {
              Authorization:GMS.token,
          },
data:{
jsonArry:list,
billDefine:billDefine,
billId:billId
}
        }).then(res => {
          if (res.status === 200) {
context.dom.$Modal.warning({
title: '信息提示',
content: res.data.data.processMsg,
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