Commit 02e5e7c7 by qiaozhi

Merge remote-tracking branch 'remotes/origin/develop' into develop-qiaozhi

parents 7a2b77bd 9a9e2e60
This source diff could not be displayed because it is too large. You can view the blob instead.
import Bridge from '../../components-control/util/bridge' import Bridge from '../../components-control/util/bridge'
import SelectApprovers from '../../components-control/select-approvers.vue'
import { compareData } from "../../components-control/util/dataChange" import { compareData } from "../../components-control/util/dataChange"
import { showSignModal, saveBill, verifyBill } from '../util' import { saveBill, verifyBill, showCommentModal } from '../util'
import { BILL_GLOBAL_PARAM } from '../../constant' import { BILL_GLOBAL_PARAM } from '../../constant'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
bill = bill.dom || bill
if (bill) { if (bill) {
if (!verifyBill(bill)) { if (!verifyBill(bill)) {
GMS.$hideContainer.$Message.error('验签失败') GMS.$hideContainer.$Message.error('验签失败')
return return
} }
if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
GMS.$hideContainer.$Message.error('请配置审批轨迹') // if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
return // GMS.$hideContainer.$Message.error('请配置审批轨迹')
} // return
if (!this.isApproverEqulloginer(bill, param)) { // }
GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面')
return // if (!this.isApproverEqulloginer(bill, param)) {
} // GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面')
// return
// }
bill.setControlsSate(param["_control_name_"], "enable", false)
let curTagId = window.nros.context.getCurrTag(); let curTagId = window.nros.context.getCurrTag();
let oldObj = curTagId && GMS.oldBillDataMap[curTagId]?GMS.oldBillDataMap[curTagId]:GMS.oldBillData; let oldObj = curTagId && GMS.oldBillDataMap && GMS.oldBillDataMap[curTagId]?GMS.oldBillDataMap[curTagId]:GMS.oldBillData;
const dataChangeFlag = compareData(oldObj, bill.getBuillData()) const dataChangeFlag = compareData(oldObj, bill.getBuillData())
const noRunTimeFormula = bill.getGlobalParam("noRunTimeFormula") const noRunTimeFormula = bill.getGlobalParam("noRunTimeFormula")
if (noRunTimeFormula) { if (noRunTimeFormula) {
...@@ -67,63 +71,12 @@ export default { ...@@ -67,63 +71,12 @@ export default {
}, },
approvalLogical: function (bill, param) { approvalLogical: function (bill, param) {
const getApprovalList = () => { const fn = () => {
showCommentModal(bill, param).then(() => {
const setApprover = (data) => { this.executeApproval(bill, param)
bill.getMasterData().setValue('APPROVERPROPERTIES', data, null, 'none')
}
let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
bill.setControlsSate(param["_control_name_"], "enable", false)
let selectedApprovers = []
window.GMS.$http.get(`/bpm/bill/selectApprover/ApproverList/${taskId}`).then((res) => {
setApprover(null)
if (res.data.code == 204) {
this.executeApproval(bill, param)
return
}
else if (res.data.code != 200) {
bill.setControlsSate(param["_control_name_"], "enable", true)
GMS.$hideContainer.$Message.error(res.data.msg || '提交失败,请联系系统管理员');
return
}
bill.setControlsSate(param["_control_name_"], "enable", true)
const nodeData = res.data.ApproverVo
const optionList = [...nodeData.approvers]
if (optionList.length == 0) {
GMS.$hideContainer.$Message.error('未找到下一节点的审批人')
return
}
GMS.$hideContainer.$Modal.confirm({
width: 700,
render: (h) => {
return h(
SelectApprovers,
{
props: {
optionList,
},
on: {
'on-change': (val) => {
selectedApprovers = val
}
}
}
)
},
onOk: () => {
const data = JSON.stringify({
...nodeData,
approvers: selectedApprovers,
})
setApprover(data)
this.executeApproval(bill, param)
},
onCancel: () => {
}
});
}).catch(() => { }).catch(() => {
GMS.$hideContainer.$Message.error('未找到下一节点的审批人'); bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
}) })
} }
...@@ -133,7 +86,7 @@ export default { ...@@ -133,7 +86,7 @@ export default {
} }
bill.executeServerAction(saveParam, function (code, data) { bill.executeServerAction(saveParam, function (code, data) {
if (code === 200) { if (code === 200) {
getApprovalList() fn()
} else { } else {
bill.setControlsSate(param["_control_name_"], "enable", true) bill.setControlsSate(param["_control_name_"], "enable", true)
if (data.message.includes('还款金额不能大于未还金额')) { if (data.message.includes('还款金额不能大于未还金额')) {
...@@ -145,7 +98,7 @@ export default { ...@@ -145,7 +98,7 @@ export default {
} }
}.bind(this)); }.bind(this));
} else { } else {
getApprovalList() fn()
} }
}, },
executeApproval: function(bill, param) { executeApproval: function(bill, param) {
...@@ -155,10 +108,26 @@ export default { ...@@ -155,10 +108,26 @@ export default {
? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions ? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
: ''; : '';
if (!comments) {
comments = '同意'
bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT, {
taskId,
suggestions: comments
})
}
const fn = () => { const fn = () => {
saveBill(bill, param).then(() => { saveBill(bill, param).then(() => {
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=1&comments=' + comments).then( GMS.$http.post(
`/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.accept`,
{
approvalComments: comments,
data: bill.getBuillData(),
detailData: [],
}
).then(
function (response) { function (response) {
console.log('response', response)
if (response.status == 200 || response.statusText == 'OK') { if (response.status == 200 || response.statusText == 'OK') {
if (response.data.code != 0) { if (response.data.code != 0) {
GMS.$hideContainer.$Message.error(response.data.message) GMS.$hideContainer.$Message.error(response.data.message)
...@@ -193,39 +162,7 @@ export default { ...@@ -193,39 +162,7 @@ export default {
}) })
} }
window.GMS.$http.get(`/rbc/workflow/signatureConfig/${taskId}`).then((res) => { fn()
const { isUseSignature, nodeName } = res.data && res.data.data || {}
if (isUseSignature) {
showSignModal(bill, param, nodeName).then(fn).catch((err) => {
if (err) console.error(err)
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
})
}
else {
fn()
}
})
return
}, },
isApproverEqulloginer: function (bill, param) {
const loginer = GMS.userContext && GMS.userContext.id || window.nros.getUser().conetxtUser.id;
let approver = []
$.ajax({
type: "GET",
url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId}`,
async: false,
contentType: "application/json;",
beforeSend: function (request) {
request.setRequestHeader("Authorization", GMS.util.getAuthorization());
},
success: function (data1) {
approver = data1.ownerIds
},
error: function () {
}
})
return approver.includes(loginer)
}
} }
\ No newline at end of file
import Bridge from '../../components-control/util/bridge' import Bridge from '../../components-control/util/bridge'
import { compareData } from "../../components-control/util/dataChange" import { compareData } from "../../components-control/util/dataChange"
import { SIGNATURE_TABLE_NAME, BILL_GLOBAL_PARAM } from '../../constant' import { SIGNATURE_TABLE_NAME, BILL_GLOBAL_PARAM } from '../../constant'
import { saveBill } from '../util' import { saveBill, showCommentModal } from '../util'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
if(bill){ if (bill) {
if (!this.isApproverEqulloginer(bill, param)) { bill = bill.dom || bill
GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面') let curTagId = window.nros.context.getCurrTag();
return let oldObj = curTagId && GMS.oldBillDataMap[curTagId] ? GMS.oldBillDataMap[curTagId] : GMS.oldBillData;
} let flag = compareData(oldObj, bill.getBuillData()) || bill.getGlobalParam("noRunTimeFormula");
let curTagId = window.nros.context.getCurrTag(); if (flag) {
let oldObj = curTagId && GMS.oldBillDataMap[curTagId]?GMS.oldBillDataMap[curTagId]:GMS.oldBillData; this.approvalLogical(bill, param, this)
let flag = compareData(oldObj, bill.getBuillData()) || bill.getGlobalParam("noRunTimeFormula"); } else {
if (flag) { GMS.$hideContainer.$Modal.confirm({
this.approvalLogical(bill, param, this) title: "信息提示",
} else { content: "信息发生变化, 是否保存",
GMS.$hideContainer.$Modal.confirm({ onOk: () => {
title: "信息提示", saveBill(bill, param).then(() => {
content: "信息发生变化, 是否保存", this.approvalLogical(bill, param)
onOk: () => { })
saveBill(bill, param).then(() => { },
this.approvalLogical(bill, param) onCancel: () => {
}) }
}, })
onCancel: () => {
}
})
}
}else{
GMS.$hideContainer.$Message.error('缺少参数');
} }
} else {
GMS.$hideContainer.$Message.error('缺少参数');
}
}, },
approvalLogical: function (bill, param) { approvalLogical: function (bill, param) {
bill.setControlsSate(param["_control_name_"], "enable", false) bill.setControlsSate(param["_control_name_"], "enable", false)
if(param.param.actions){ if (param.param.actions) {
let saveParam = { let saveParam = {
actions: param.param.actions, actions: param.param.actions,
}
bill.executeServerAction(saveParam, function (code, data) {
if (code === 200) {
this.approval(bill, param);
} else {
bill.setControlsSate(param["_control_name_"], "enable", true)
GMS.$hideContainer.$message.error("操作异常请联系管理员");
} }
bill.executeServerAction(saveParam,function(code,data){ }.bind(this));
if(code===200){
this.approval(bill, param);
}else{
bill.setControlsSate(param["_control_name_"], "enable", true)
GMS.$hideContainer.$message.error("操作异常请联系管理员");
}
}.bind(this));
} else { } else {
this.approval(bill, param); this.approval(bill, param);
} }
}, },
approval: function(bill, param){ approval: function (bill, param) {
if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
GMS.$hideContainer.$Message.error('请配置审批轨迹') const fn = () => {
return
}
let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
let comments = let comments =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions ? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
: '' : ''
bill.clearSubDatas(SIGNATURE_TABLE_NAME) bill.clearSubDatas(SIGNATURE_TABLE_NAME)
saveBill(bill, param).then(() => { saveBill(bill, param).then(() => {
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=3&comments='+comments).then( GMS.$http.post(
function(response) { `/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.reject`,
{
approvalComments: comments,
data: bill.getBuillData(),
detailData: [],
},
).then(
function (response) {
if (response.status == 200 || response.statusText == 'OK') { if (response.status == 200 || response.statusText == 'OK') {
if (response.data.code != 0) { if (response.data.code != 0) {
GMS.$hideContainer.$Message.error(response.data.message) GMS.$hideContainer.$Message.error(response.data.message)
return return
} }
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)
let curTagId = window.nros.context.getCurrTag(); let curTagId = window.nros.context.getCurrTag();
GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId) GMS.vbus.$emit('change-form-state', { state: 'readOnly' }, curTagId)
GMS.$hideContainer.$Message.success('驳回成功!') GMS.$hideContainer.$Message.success('驳回成功!')
if ( if (
window.osConfig.appOpenMode && window.osConfig.appOpenMode &&
...@@ -88,32 +90,20 @@ export default { ...@@ -88,32 +90,20 @@ export default {
} }
}.bind(this) }.bind(this)
) )
.catch( .catch(
function(error) { function (error) {
bill.setControlsSate(param["_control_name_"], "enable", true) bill.setControlsSate(param["_control_name_"], "loading", false)
bill.setControlsSate(param["_control_name_"],"loading",false) bill.setControlsSate(param["_control_name_"], "enable", true)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员') GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员')
}.bind(this) }.bind(this)
); );
}) })
}
showCommentModal(bill, param, true).then(fn).catch((error) => {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
})
}, },
isApproverEqulloginer: function (bill, param) {
const loginer = GMS.userContext && GMS.userContext.id || window.nros.getUser().conetxtUser.id;
let approver = []
$.ajax({
type: "GET",
url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId}`,
async: false,
contentType: "application/json;",
beforeSend: function (request) {
request.setRequestHeader("Authorization", GMS.util.getAuthorization());
},
success: function (data1) {
approver = data1.ownerIds
},
error: function () {
}
})
return approver.includes(loginer)
}
} }
\ No newline at end of file
export default {
execute(bill, param) {
bill = bill.dom || bill
bill.setControlsSate(param["_control_name_"], "enable", false)
GMS.$http.post(
`/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.retrieve`,
{
approvalComments: comments,
data: bill.getBuillData(),
detailData: [],
}
).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(() => {
GMS.$hideContainer.$Message.error('系统错误,请联系管理员')
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
})
},
}
...@@ -4,6 +4,7 @@ import { showSignModal, saveBill } from "../util"; ...@@ -4,6 +4,7 @@ import { showSignModal, saveBill } from "../util";
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
bill = bill.dom || 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) => {
...@@ -77,9 +78,10 @@ export default { ...@@ -77,9 +78,10 @@ export default {
const submitFn = () => { const submitFn = () => {
let postData = { let postData = {
data: bill.getBuillData(), data: bill.getBuillData(),
}; detailData: [],
let url = `/rbc/bill/workflowAction/executed/${param.define}/workflow.submitToFlow?transmission=total`; }
window.GMS.$http.post(url, JSON.stringify(postData)).then((response) => { let url = `/rbc/bill/action/zgh/change/work/${param.define}/bill.Basic.submit`;
window.GMS.$http.post(url, postData).then((response) => {
const data = response.data const data = response.data
let code = 200 let code = 200
if (data.code != 0) { if (data.code != 0) {
...@@ -87,7 +89,6 @@ export default { ...@@ -87,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();
...@@ -103,9 +104,10 @@ export default { ...@@ -103,9 +104,10 @@ 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_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false) bill.setControlsSate(param["_control_name_"],"loading",false)
bill.setControlsSate(param["_control_name_"], "enable", true)
}) })
} }
......
...@@ -6,7 +6,8 @@ export default { ...@@ -6,7 +6,8 @@ export default {
const unitCode = nros.getUser().loginUnit const unitCode = nros.getUser().loginUnit
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=${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.name = name c.name = name
c.modalShow = true; c.modalShow = true;
}) })
......
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
import { getValueListString } from '../../utils' import { getValueListString } from '../../utils'
import { btnVerifySync } from '../../BJCAWebsign' import { btnVerifySync } from '../../BJCAWebsign'
import ElectronicSignature from '../../components-control/electronic-signature.vue' import ElectronicSignature from '../../components-control/electronic-signature.vue'
import ApprovalUserControl from '../../control/approval-user-control/approval-user-control.vue'
export const saveBill = (bill, param, postData) => { export const saveBill = (bill, param, postData) => {
if (!postData) { if (!postData) {
...@@ -122,6 +123,50 @@ export const showSignModal = (bill, param, nodeName) => { ...@@ -122,6 +123,50 @@ export const showSignModal = (bill, param, nodeName) => {
}) })
} }
export const showCommentModal = (bill, param, checkComment) => {
const h = GMS.$hideContainer.$createElement
const vNode = h(
ApprovalUserControl,
{
props: {
define: {
isModal: true,
config: {
placeholder: '请直接输入您的意见或在下方选择常用意见'
},
},
context: {
bill,
},
},
}
)
window.GMS.vbus.$emit(GLOBAL_EVENT.APPROVAL_USER_CONTROL_RESETVALUE)
return GMS.$hideContainer.$msgbox({
title: '审批意见',
message: vNode,
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
let comments =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT)
&& bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
if (comments || !checkComment) {
done()
}
else {
GMS.$hideContainer.$Message.error('请输入审批意见')
}
} else {
done()
}
}
})
}
export const verifyBill = (bill) => { export const verifyBill = (bill) => {
const dataObjList = bill.getSubData(SIGNATURE_TABLE_NAME) const dataObjList = bill.getSubData(SIGNATURE_TABLE_NAME)
if (!(dataObjList instanceof Array && dataObjList.length)) return true if (!(dataObjList instanceof Array && dataObjList.length)) return true
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
this.init = true; this.init = true;
}); });
}, },
loadFinishFun(bill, err) { async loadFinishFun(bill, err) {
if (err) { if (err) {
this.$Message.error(err) this.$Message.error(err)
setTimeout(() => { setTimeout(() => {
...@@ -90,8 +90,24 @@ export default { ...@@ -90,8 +90,24 @@ export default {
return return
} }
// 给bill设置默认值 // 给bill设置默认值
let defaultValueList = this.defaultValueList || [] let defaultValueList = JSON.parse(JSON.stringify(this.defaultValueList || []))
for(let item of defaultValueList){ for(let item of defaultValueList){
if(item.tableName){
const postData = {
pagination: false,
tableName: item.tableName,
searchKey: "",
queryDataStructure: "ALL",
queryChildrenType: "ALL_CHILDREN_WITH_SELF",
code: item.defaultValue,
authType: "ACCESS",
versionDate: "",
expression: "",
}
const {data} = await GMS.$http.post(`/baseData/data/list`, postData)
const value = data.rows && data.rows[0] || ''
item.defaultValue = value
}
bill.getMasterData().setValue(item.field,item.defaultValue) bill.getMasterData().setValue(item.field,item.defaultValue)
} }
const workflowState = bill.getMasterData().getValue('billState') // setV const workflowState = bill.getMasterData().getValue('billState') // setV
...@@ -106,6 +122,9 @@ export default { ...@@ -106,6 +122,9 @@ export default {
let that = this; let that = this;
setTimeout(() => { setTimeout(() => {
that.billClass = bill; that.billClass = bill;
if (!GMS.oldBillDataMap) GMS.oldBillDataMap = {}
let curTagId = window.nros.context.getCurrTag()
curTagId && (GMS.oldBillDataMap[curTagId] = bill.getBuillData())
GMS.oldBillData = bill.getBuillData(); GMS.oldBillData = bill.getBuillData();
that.oldBillData = bill.getBuillData(); // 单据整体对象 that.oldBillData = bill.getBuillData(); // 单据整体对象
}, 100); }, 100);
......
...@@ -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',
...@@ -16,4 +24,6 @@ export const BILL_GLOBAL_PARAM = { ...@@ -16,4 +24,6 @@ export const BILL_GLOBAL_PARAM = {
export const GLOBAL_EVENT = { export const GLOBAL_EVENT = {
VERIFY_SIGNATURE_FAIL: 'verifySignatureFail', VERIFY_SIGNATURE_FAIL: 'verifySignatureFail',
APPROVAL_USER_CONTROL_RESETVALUE: 'approvalUserControlResetValue',
} }
<style scoped lang="less">
.scrollable {
/*height: 700px;*/
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 7px;
}
::-webkit-scrollbar-thumb {
opacity: 0.5;
border-radius: 3.5px;
background-color: #888888;
}
.from-second-title {
height: 16px;
line-height: 16px;
margin-left: 24px;
/*margin: 15px 0;*/
margin-bottom: 15px;
padding-left: 4px;
border-left: 2px solid #3477cb;
}
.title {
font-family: Microsoft YaHei;
margin-left: 4px;
font-size: 14px;
color: #222222;
letter-spacing: 0;
text-align: left;
}
</style>
<template>
<div class="modal_content">
<Modal
v-model="modal_visible"
title="批量填充"
@on-cancel="cancel"
:mask-closable="false"
>
<Form ref='form' :model="cashOutDetail" :label-width="120" :rules="ruleValidate">
<FormItem label="请款金额下限" prop="QKJEXX">
<Input
number
v-model="cashOutDetail.QKJEXX"
placeholder="请输入请款金额下限"
></Input>
</FormItem>
<FormItem label="是否请款" prop="SFQK">
<i-switch v-model="cashOutDetail.SFQK" size="large">
<template #open>
<span></span>
</template>
<template #close>
<span></span>
</template>
</i-switch>
</FormItem>
</Form>
<div slot="footer">
<Button @click="cancel">取消</Button>
<Button type="primary" :loading="loading" @click="handleSubmit">确定</Button>
</div>
</Modal>
</div>
</template>
<script>
export default {
data() {
return {
modal_visible: false,
loading: false,
cashOutDetail: {
SFQK: true,
QKJEXX: 300000,
},
ruleValidate: {
QKJEXX: [
{
required: true,
type: "number",
message: "请输入数值类型的请款金额下限",
trigger: "blur",
},
],
SFQK: [
{
required: true,
type: "boolean",
message: "是否请款为必填项",
trigger: "change",
},
],
},
};
},
methods: {
cancel() {
this.modal_visible = false;
this.$emit('close')
},
handleSubmit() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.loading = true
const param ={
idList: this.idList,
cashOutDetail: this.cashOutDetail,
billDefine: this.billDefine
}
GMS.$http.post('/rbcquery/batchUpdateCashOut',param).then(res=>{
GMS.vbus.$emit('custom-query-refresh');
GMS.vbus.$emit('tab-count-refresh');
this.loading = false
this.modal_visible = false;
setTimeout(() => {
if(this.context && this.context.callback){
this.context.callback(true);
}
GMS.$hideContainer.$Message.success('批量填充设置成功');
this.$emit('close')
}, 500);
},error=>{
this.loading = false
GMS.$hideContainer.$Message.error('批量填充设置失败')
})
} else {
GMS.$hideContainer.$Message.error('参数输入不合规')
}
});
},
},
watch: {},
};
</script>
<template> <template>
<div> <div class="approval-user-control">
<div v-if="isModal" class="top-button-group">
<Button @click="openEditModal" size="small">
<svg aria-hidden="true" class="icon">
<use xlink:href="#icon-a-16_BILLEXPAND_C_RBC_EDIT"></use>
</svg>
</Button>
&nbsp;&nbsp;
<Button @click="handleAdd" size="small">
<svg aria-hidden="true" class="icon">
<use xlink:href="#icon-a-16_BILLEXPAND_A_RBC_ADD"></use>
</svg>
</Button>
</div>
<div class="suggestion-wrapper"> <div class="suggestion-wrapper">
<div class="label">{{this.define.title}}</div> <div v-if="!isModal" class="label">{{this.define.title}}</div>
<div class="input-wrapper"> <div class="input-wrapper">
<Input v-model="value" type="textarea" :placeholder="define.config.placeholder" :maxlength="240" /> <Input v-model="value" type="textarea" :placeholder="define.config.placeholder" :maxlength="240" />
<div class="suggestion-button-wrapper"> <div class="suggestion-button-wrapper">
...@@ -31,10 +44,6 @@ ...@@ -31,10 +44,6 @@
</div> </div>
</ConfirmPopover> </ConfirmPopover>
</div> </div>
<!-- <div>
<Button size="small" @click="suggestionOptionModal = true">edit</Button>
<Button size="small" @click="handleAdd">add</Button>
</div> -->
</div> </div>
</div> </div>
<el-dialog <el-dialog
...@@ -124,7 +133,7 @@ ...@@ -124,7 +133,7 @@
<script> <script>
const TABLE_NAME = "MD_SPYJ" const TABLE_NAME = "MD_SPYJ"
import ConfirmPopover from './confirm-popover' import ConfirmPopover from './confirm-popover'
import { BILL_GLOBAL_PARAM } from '../../constant'; import { BILL_GLOBAL_PARAM, GLOBAL_EVENT } from '../../constant';
export default { export default {
name: 'ApprovalUserControl', name: 'ApprovalUserControl',
...@@ -185,6 +194,7 @@ export default { ...@@ -185,6 +194,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.isModal = this.define.isModal
this.reviewParam['taskId'] = GMS.workflowTaskId this.reviewParam['taskId'] = GMS.workflowTaskId
this.taskId = GMS.workflowTaskId; this.taskId = GMS.workflowTaskId;
// this.reviewParam['billid'] = this.$route.query.id; // this.reviewParam['billid'] = this.$route.query.id;
...@@ -193,6 +203,7 @@ export default { ...@@ -193,6 +203,7 @@ export default {
this.currentTagId = window.nros.context.getCurrTag() this.currentTagId = window.nros.context.getCurrTag()
window.GMS.vbus.$on('approval-user-control-edit', this.openEditModal) window.GMS.vbus.$on('approval-user-control-edit', this.openEditModal)
window.GMS.vbus.$on('approval-user-control-add', this.handleAdd) window.GMS.vbus.$on('approval-user-control-add', this.handleAdd)
window.GMS.vbus.$on(GLOBAL_EVENT.APPROVAL_USER_CONTROL_RESETVALUE, this.resetValue)
this.getSuggestionOptions() this.getSuggestionOptions()
}, },
beforeDestroy() { beforeDestroy() {
...@@ -200,6 +211,10 @@ export default { ...@@ -200,6 +211,10 @@ export default {
window.GMS.vbus.$off('approval-user-control-add', this.handleAdd) window.GMS.vbus.$off('approval-user-control-add', this.handleAdd)
}, },
methods: { methods: {
resetValue() {
if (this.currentTagId && this.currentTagId != window.nros.context.getCurrTag()) return
this.value = ''
},
showDeletePopover(suggestion) { showDeletePopover(suggestion) {
this.$set(suggestion, 'visible', true) this.$set(suggestion, 'visible', true)
}, },
...@@ -348,52 +363,59 @@ export default { ...@@ -348,52 +363,59 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.suggestion-wrapper { .approval-user-control {
display: flex; .top-button-group {
.label { display: flex;
width: 90px; padding: 0 0 10px 15px;
text-align: right;
} }
.input-wrapper { .suggestion-wrapper {
flex: 1; display: flex;
padding-left: 15px; .label {
.suggestion-button-wrapper { width: 90px;
display: flex; text-align: right;
flex-wrap: wrap; }
padding-top: 12px; .input-wrapper {
max-height: 84px; flex: 1;
overflow: hidden; padding-left: 15px;
.suggestion-button { .suggestion-button-wrapper {
cursor: pointer; display: flex;
height: 28px; flex-wrap: wrap;
padding: 0px 11px; padding-top: 12px;
margin: 0px 8px 8px 0px; max-height: 84px;
border-radius: 3px; overflow: hidden;
position: relative; .suggestion-button {
.delete-icon { cursor: pointer;
width: 12px;
height: 12px;
font-size: 10px;
color: red;
position: absolute;
top: -10px;
right: -6px;
}
.text {
height: 28px; height: 28px;
max-width: 140px; padding: 0px 11px;
white-space: nowrap; margin: 0px 8px 8px 0px;
overflow: hidden; border-radius: 3px;
text-overflow: ellipsis; position: relative;
font-size: 14px; .delete-icon {
font-family: PingFangSC-Regular, PingFang SC; width: 12px;
font-weight: 400; height: 12px;
line-height: 28px; font-size: 10px;
color: red;
position: absolute;
top: -10px;
right: -6px;
}
.text {
height: 28px;
max-width: 140px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 28px;
}
} }
} }
} }
} }
} }
.suggestion-edit-table-popper[style] { .suggestion-edit-table-popper[style] {
z-index: 3000 !important; z-index: 3000 !important;
} }
......
...@@ -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");
...@@ -255,4 +255,4 @@ export default { ...@@ -255,4 +255,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -42,8 +42,12 @@ export default { ...@@ -42,8 +42,12 @@ export default {
"SHI" : datas[i].tbInfos[a].SHI_DESC, "SHI" : datas[i].tbInfos[a].SHI_DESC,
"XIANG" : datas[i].tbInfos[a].XIANG_DESC, "XIANG" : datas[i].tbInfos[a].XIANG_DESC,
"XIAN" : datas[i].tbInfos[a].XIAN_DESC, "XIAN" : datas[i].tbInfos[a].XIAN_DESC,
"CUN" : datas[i].tbInfos[a].CUN_DESC,
"MZGUID" : datas[i].tbInfos[a].MZGUID, "MZGUID" : datas[i].tbInfos[a].MZGUID,
"ZL_TU_BAN" :datas[i].tbInfos[a].ZL_TU_BAN "ZL_TU_BAN" :datas[i].tbInfos[a].ZL_TU_BAN,
"LIN_YE_JU" :datas[i].tbInfos[a].LIN_YE_JU,
"ZL_FS" :datas[i].tbInfos[a].ZL_FS_DESC,
"MIAN_JI" :datas[i].tbInfos[a].ZS_MJ,
} }
valueAll.push(value) valueAll.push(value)
} }
......
<template>
<div>
<div class="modification-button" :style="{top: styleTop, right: styleRight}" @click="showDrawer = true">
<div class="icon">
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<use xlink:href="#icon-a-28_BILLEXPAND_C_RBC_xinshenpiguiji"></use>
</svg>
</div>
</div>
<Drawer
:transfer="false"
title="变更轨迹"
:closable="true"
v-model="showDrawer"
:width="styleDrawerWidth"
:inner="true"
:mask="false"
>
<div v-if="!data || data.length == 0">暂无数据</div>
<div v-if="data && data.length" class="modification-step-wrapper">
<div
class="modification-step"
v-for="step, k in data"
:key="k"
>
<div class="step-head">
<div class="step-circle">
</div>
<div :class="`step-line waiting-line`" v-if="k != data.length - 1"></div>
</div>
<div class="step-main">
<div class="step-main-body">
<div class="text-black">
<div>
<span class="participants">{{step.createUserName}}</span>
</div>
</div>
<div>{{formatDate(step.createTime)}}</div>
<div class="comment">
<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, 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"
>
<Icon v-if="isCurrentExpandBlock(modification)" type="ios-arrow-down" />
<Icon v-else type="ios-arrow-forward" />
<div>{{ isCurrentExpandBlock(modification) ? '收起明细' : '展开明细' }}</div>
</div>
<div style="margin-left: 10px" v-if="isCurrentExpandBlock(modification)">
<div
v-for="subModification in modification.value[0]"
:key="subModification.label"
>
<div class="label text-main">{{subModification.label}}</div>
<ValueChangeDetail :value="subModification.value" />
</div>
</div>
</div>
<ValueChangeDetail v-else :value="modification.value" />
<Divider v-if="modificationIndex != step.modifyDesc.length - 1" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</Drawer>
</div>
</template>
<script>
import ValueChangeDetail from './value-change-detail.vue'
export default {
components: {
ValueChangeDetail,
},
props: {
define: {
type: Object,
required: true,
},
context: {
type: Object,
default: () => { }
}
},
data() {
return {
showDrawer: false,
data: [],
currentExpandBlock: null,
expandMap: [],
}
},
computed: {
styleTop() {
return this.define.config.topDistance || '0px'
},
styleRight() {
return this.define.config.rightDistance || '0px'
},
styleDrawerWidth() {
return this.define.config.drawerWidth || '400px'
},
},
mounted() {
const { tableName } = this.define.config
const subTable = this.context.bill.getSubData(tableName)
if (subTable instanceof Array) {
this.data = subTable.map((o) => {
const ans = {}
;['createTime', 'createUserName', 'deptName', 'modifyDesc'].forEach((key) => {
ans[key] = o.getValue(key)
})
ans['createTime'] = new Date(ans['createTime']).format('yyyy-MM-dd HH:mm:ss')
ans['modifyDesc'] = JSON.parse(ans['modifyDesc'])
return ans
})
this.expandMap = new Array(this.data.length).fill(false)
}
},
beforeDestroy() {
},
methods:{
toggleDetail(index) {
this.expandMap[index] = !this.expandMap[index]
this.expandMap = [...this.expandMap]
},
isCurrentExpandBlock(block) {
return this.currentExpandBlock === block
},
isArray(obj) {
return obj instanceof Array
},
formatDate(datetime) {
const t = new Date(datetime)
return t.format('yyyy-MM-dd HH:mm:ss')
},
},
}
</script>
<style lang="less" scoped>
@icon-width: 24px;
@main-color: #0DA2E6;
.modification-button {
cursor: pointer;
position: absolute;
z-index: 700;
padding-top: 4px;
width: 42px;
height: 36px;
background: #005791;
box-shadow: 0 0 4px 0 rgba(109,109,109,0.50);
border-radius: 100px 0 0 100px;
.icon {
width: 28px;
height: 28px;
margin-left: 11px;
}
.text {
margin-top: 2px;
text-align: center;
height: 17px;
font-size: 12px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 17px;
text-shadow: 0px 1px 6px rgba(255, 169, 56, 0.8);
}
}
.modification-step-wrapper {
width: 100%;
.ivu-divider-horizontal {
margin: 18px 0;
}
.modification-step {
width: 100%;
position: relative;
.step-head {
width: @icon-width;
position: absolute;
height: 100%;
.step-circle {
width: 10px;
height: 10px;
border-radius: 50%;
margin: 5px auto 0 auto;
border: 1px @main-color solid;
}
.waiting-icon {
color: @main-color;
}
.finish-icon {
color: #888;
}
.step-line {
margin-left: @icon-width / 2;
width: 1px;
height: calc(100% - 10px);
}
.finish-line {
background-color: #C8C8C8;
}
.waiting-line {
background-color: @main-color;
}
}
.step-main {
width: 100%;
min-height: calc(@icon-width + 10px);
padding-left: @icon-width;
font-size: 12px;
color: #888888;
line-height: 17px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
.step-main-body {
padding-bottom: 30px;
padding-left: 5px;
> div {
margin-bottom: 5px;
}
.text-gray {
color: #888888;
}
.text-black {
color: #222222;
}
.text-main {
color: @main-color;
}
.text-error {
color: #ED664B;
}
.participants {
height: 20px;
font-size: 14px;
line-height: 20px;
}
.result {
height: 20px;
font-size: 14px;
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 {
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;
display: flex;
align-items: center;
}
}
}
}
}
}
}
</style>
<template>
<div class="value-change-detail">
<div class="value-block">{{value.oldDesc || 'null'}}</div>
<div class="arrow"><Icon type="md-arrow-round-forward" /></div>
<div class="value-block">{{value.newDesc || 'null'}}</div>
</div>
</template>
<script>
export default {
props: {
value: {
default: () => ({}),
type: Object,
},
}
}
</script>
<style lang="less" scoped>
.value-change-detail {
display: flex;
.value-block {
width: 45%;
}
.arrow {
width: 10%;
height: 100%;
align-self: center;
color: #0DA2E6;
}
}
</style>
\ No newline at end of file
<template> <template>
<div class="bill-achievements"> <div class="bill-achievements">
<Button type="primary" @click="Primary">Primary</Button>
<vxe-table <vxe-table
border border
ref="xTable" ref="xTable"
:data="tableData" :data="tableData"
:show-header="false" :show-header="false"
:cell-style="cellStyle"
> >
<vxe-table-column <vxe-table-column
field="name" field="name"
...@@ -17,7 +17,14 @@ ...@@ -17,7 +17,14 @@
<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="
scope.row.attr && scope.row.attr.tableData
? scope.row.attr.tableData
: []
"
@dataChange="updataTableData($event, scope.$rowIndex)"
></component> ></component>
</template> </template>
</vxe-table-column> </vxe-table-column>
...@@ -26,18 +33,22 @@ ...@@ -26,18 +33,22 @@
</template> </template>
<script> <script>
import vxeAchievements from "./vxe-achievements.js"; import vxeAchievements from "./vxe-achievements.js";
import dataControl from "./components/dataControl.vue"; import dateControl from "./components/dateControl.vue";
import vxeTableControl from "./components/vxe-table.vue"; 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 input from "../util/bc_input.js";
export default { export default {
mixins: [vxeAchievements], mixins: [vxeAchievements, input],
components: { components: {
vxeTableControl, vxeTableControl,
dataControl, dateControl,
radioGroupControl, radioGroupControl,
inputControl, inputControl,
textAreaControl,
}, },
data() { data() {
return { return {
tableData: [ tableData: [
...@@ -53,8 +64,8 @@ export default { ...@@ -53,8 +64,8 @@ export default {
}, },
{ {
name: "项目起止时间", name: "项目起止时间",
type: "dataControl", type: "dateControl",
value: "", value: [],
}, },
{ {
name: "项目资金申请(万元)", name: "项目资金申请(万元)",
...@@ -124,13 +135,13 @@ export default { ...@@ -124,13 +135,13 @@ export default {
}, },
{ {
name: "单位(部门)职能概述", name: "单位(部门)职能概述",
type: "inputControl", type: "textAreaControl",
value: "xx", value: "",
}, },
{ {
name: "项目概况", name: "项目概况",
type: "inputControl", type: "textAreaControl",
value: "33", value: "",
}, },
{ {
name: "项目立项情况", name: "项目立项情况",
...@@ -160,7 +171,7 @@ export default { ...@@ -160,7 +171,7 @@ export default {
field: "name", field: "name",
title: "立项情况", title: "立项情况",
width: 230, width: 230,
type: "inputControl" type: "inputControl",
}, },
{ {
field: "value", field: "value",
...@@ -208,7 +219,7 @@ export default { ...@@ -208,7 +219,7 @@ export default {
{ {
field: "startTime", field: "startTime",
title: "开始时间", title: "开始时间",
type: "dataControl", type: "dateControl",
daterange: "date", daterange: "date",
placement: "bottom", placement: "bottom",
align: "center", align: "center",
...@@ -216,7 +227,7 @@ export default { ...@@ -216,7 +227,7 @@ export default {
{ {
field: "endTime", field: "endTime",
title: "完成时间", title: "完成时间",
type: "dataControl", type: "dateControl",
daterange: "date", daterange: "date",
placement: "bottom", placement: "bottom",
align: "center", align: "center",
...@@ -646,23 +657,82 @@ export default { ...@@ -646,23 +657,82 @@ export default {
}, },
{ {
name: "其他说明的问题", name: "其他说明的问题",
type: "inputControl", type: "textAreaControl",
value: "", value: "",
}, },
{ {
name: "填报人:", name: "填报人:",
type: "inputControl", type: "vxeTableControl",
value: "", attr: {
border: "none",
showHeader: false,
addObj: {
name: "",
value: "",
},
tableData: [
{
person: "单位(部门)负责人:",
time: "填报时间:",
},
],
columns: [
{
field: "person",
title: "部门负责人",
type: "inputControl",
},
{
field: "time",
title: "填报时间",
type: "inputControl",
},
],
},
}, },
], ],
}; };
}, },
props: {}, props: {
watch: {}, // 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.split(".")[1],
JSON.stringify(nv)
);
}
},
deep: true,
},
value: {
handler(nv, ov) {
console.log("value", nv, ov);
this.tableData = JSON.parse(nv);
},
deep: true,
},
},
computed: {}, computed: {},
methods: { methods: {
Primary() { updataTableData(nv, rowIndex) {
console.log(this.tableData); this.tableData[rowIndex].attr.tableData = nv;
},
cellStyle({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex }) {
return {
backgroundColor:this.state == 'readOnly'? "#F3F3F3":''
}
}, },
}, },
mounted() {}, mounted() {},
...@@ -678,9 +748,17 @@ export default { ...@@ -678,9 +748,17 @@ export default {
margin-top: -3px; margin-top: -3px;
border: none; border: none;
} }
.rbcInputControl textarea {
margin-left: -10px;
width: calc(100% + 18px);
border: none;
}
.rbcInputControl textarea.ivu-input {
max-width: inherit;
font-size: 14px;
vertical-align: revert;
}
.bill-achievements { .bill-achievements {
width: 1300px;
.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;
......
<template>
<div class="rbcInputControl">
{{attr.column && attr.column.text?attr.column.text:''}}
<DatePicker
:type="
attr.column && attr.column.daterange
? attr.column.daterange
: 'daterange'
"
: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>
<script>
export default {
data() {
return {};
},
props: {
attr: {
type: Object,
default: () => {},
},
disabled: {
require: false
}
},
watch: {},
computed: {},
methods: {},
mounted() {
console.log('日期',this.attr.row,this.attr.field)
},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped></style>
<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> <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>
<div class="rbcInputControl">
<Input v-model="attr.row[attr.field]" type="textarea" :disabled="disabled"/>
</div>
</template>
<script>
export default {
data() {
return {
};
},
props: {
attr:{
type:Object,
default:()=>{}
},
disabled: {
require: false
}
},
watch: {},
computed: {},
methods: {
},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped>
</style>
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
<vxe-table <vxe-table
border border
ref="detailXTable" ref="detailXTable"
:data="attr.attr.tableData" :data="detailData"
:show-header="attr.attr.showHeader || false" :show-header="attr.attr.showHeader || false"
:header-cell-class-name="headerCellClassName" :header-cell-class-name="headerCellClassName"
: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,18 +22,10 @@ ...@@ -21,18 +22,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<component <component
v-if=" :disabled="disabled"
attr.attr.headerOne
? !attr.attr.headerOne.includes(scope.$rowIndex) &&
column.type
: column.type
"
: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>
<span v-else style="display: inline-block; height: 38px">{{
scope.row[column.field]
}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
</template> </template>
...@@ -41,21 +34,23 @@ ...@@ -41,21 +34,23 @@
</template> </template>
<script> <script>
import vxeAchievements from "../vxe-achievements.js"; import vxeAchievements from "../vxe-achievements.js";
import dataControl from "./dataControl.vue"; import dateControl from "./dateControl.vue";
import vxeTableControl from "./vxe-table.vue"; import vxeTableControl from "./vxe-table.vue";
import radioGroupControl from "./radioGroupControl.vue"; import radioGroupControl from "./radioGroupControl.vue";
import inputControl from "./inputControl.vue"; import inputControl from "./inputControl.vue";
import textAreaControl from "./textAreaControl.vue";
export default { export default {
mixins: [vxeAchievements], mixins: [vxeAchievements],
components: { components: {
vxeTableControl, vxeTableControl,
dataControl, dateControl,
radioGroupControl, radioGroupControl,
inputControl, inputControl,
textAreaControl,
}, },
data() { data() {
return { return {
tableMenu: { tableMenu: {
body: { body: {
options: [ options: [
[ [
...@@ -64,6 +59,7 @@ export default { ...@@ -64,6 +59,7 @@ export default {
], ],
], ],
}, },
visibleMethod: this.visibleMethod,
}, },
}; };
}, },
...@@ -72,10 +68,22 @@ export default { ...@@ -72,10 +68,22 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
detailData: {
type: Array,
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";
...@@ -100,16 +108,30 @@ export default { ...@@ -100,16 +108,30 @@ export default {
} }
} }
}, },
contextMenuClickEvent({ menu, row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }) { visibleMethod({ options, column }) {
console.log(menu, row, rowIndex, column, columnIndex); 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; let detailXTable = this.$refs.detailXTable;
switch (menu.code) { switch (menu.code) {
case "addRow": case "addRow":
this.attr.attr.tableData.splice(rowIndex+1,0,this.attr.attr.addObj) detailXTable.insertAt(this.attr.attr.addObj, row);
this.$emit("dataChange", detailXTable.tableFullData);
break; break;
case "removeRow": case "removeRow":
if(this.attr.attr.tableData.length>1){ if (detailXTable.tableFullData.length > 1) {
detailXTable.remove(row) detailXTable.remove(row);
this.$emit("dataChange", detailXTable.tableFullData);
} }
break; break;
default: default:
...@@ -123,9 +145,9 @@ export default { ...@@ -123,9 +145,9 @@ 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,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 {
......
export default { export default {
billControl: [ billControl: [
{ {
"title": "变更轨迹",
"description": "",
"discard": false,
"dynamicComponent": 'billForm',
"extends": {
"config": [
{
"ref": "BillClassVO.all",
"type": "field",
"title": "操作表名称",
"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": "绩效表样", "title": "绩效表样",
"description":"", "description":"",
"discard": false, "discard": false,
...@@ -1273,6 +1340,12 @@ export default { ...@@ -1273,6 +1340,12 @@ export default {
"type": "Boolean", "type": "Boolean",
"title": "导出当页", "title": "导出当页",
"key": "currentPage" "key": "currentPage"
},
{
"isRequired": true,
"type": "Boolean",
"title": "是否导出id",
"key": "isId"
} }
] ]
}, },
...@@ -1280,6 +1353,24 @@ export default { ...@@ -1280,6 +1353,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": "云报销",
...@@ -1334,6 +1425,17 @@ export default { ...@@ -1334,6 +1425,17 @@ export default {
}, },
"description": "", "description": "",
"title": "自定义删除" "title": "自定义删除"
},
{
"value": "DEQKD_batchEditorAction",
"discard": false,
"path": "工会",
"extends": {
"paramDes": [
]
},
"description": "",
"title": "批量填充"
} }
], ],
billAction: [ billAction: [
...@@ -2239,6 +2341,18 @@ export default { ...@@ -2239,6 +2341,18 @@ export default {
}, },
{ {
"discard": false, "discard": false,
"path": "报销/工会",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_取回[GH_retrieveAction]",
"value": "GH_retrieveAction",
"btnDisable": "billEdit"
},
{
"discard": false,
"path": "资产/通用", "path": "资产/通用",
"extends": { "extends": {
"param": [ "param": [
......
...@@ -45,6 +45,7 @@ import lincaoReadView from './actions/lincaoReadView'; ...@@ -45,6 +45,7 @@ import lincaoReadView from './actions/lincaoReadView';
import GH_agreeAction from './actions/labourUnion/gh_agreeAction.js'; import GH_agreeAction from './actions/labourUnion/gh_agreeAction.js';
import GH_rejectAction from './actions/labourUnion/gh_rejectAction.js'; import GH_rejectAction from './actions/labourUnion/gh_rejectAction.js';
import GH_submitAction from './actions/labourUnion/gh_submitAction.js'; import GH_submitAction from './actions/labourUnion/gh_submitAction.js';
import GH_retrieveAction from './actions/labourUnion/gh_retrieveAction.js';
//queryAction //queryAction
import leafletGenerationAction from './query-actions/leafletGenerationAction.js' import leafletGenerationAction from './query-actions/leafletGenerationAction.js'
...@@ -62,6 +63,7 @@ import createBill from './query-actions/createBill.js'; ...@@ -62,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";
...@@ -71,6 +73,9 @@ import refreshTransactionStatus from "./query-actions/payments/refreshTransactio ...@@ -71,6 +73,9 @@ import refreshTransactionStatus from "./query-actions/payments/refreshTransactio
import throughQuery from "./query-actions/throughQuery"; import throughQuery from "./query-actions/throughQuery";
import queryDeleteBill from "./query-actions/queryDeleteBill"; import queryDeleteBill from "./query-actions/queryDeleteBill";
import openNewPageDetail from "./query-actions/openNewPageDetail"; import openNewPageDetail from "./query-actions/openNewPageDetail";
import GH_cfBalance from "./query-actions/labourUnion/gh_cfBalance.js"
import GH_cfProject from "./query-actions/labourUnion/gh_cfProject.js"
import DEQKD_batchEditorAction from "./query-actions/DEQKD_batchEditorAction";
//control //control
import applyDetail from './control/applyDetail'; import applyDetail from './control/applyDetail';
import linkShowDetail from './control/linkShowDetail'; import linkShowDetail from './control/linkShowDetail';
...@@ -87,6 +92,7 @@ import IntroduceInputControl from './control/IntroduceInputControl.vue' ...@@ -87,6 +92,7 @@ import IntroduceInputControl from './control/IntroduceInputControl.vue'
import InputModalControl from './control/InputModalControl.vue' import InputModalControl from './control/InputModalControl.vue'
import Achievements from './control/vxe-achievements/achievements.vue' import Achievements from './control/vxe-achievements/achievements.vue'
import VxeSubjectControl from './control/vxeTableExpand/VxeSubjectControl.js' import VxeSubjectControl from './control/vxeTableExpand/VxeSubjectControl.js'
import ModificationTrack from './control/modification-track/modification-track.vue'
//formula //formula
import GeneralImportFile from './formula/GeneralImportFile.js'; import GeneralImportFile from './formula/GeneralImportFile.js';
...@@ -193,6 +199,7 @@ export default { ...@@ -193,6 +199,7 @@ export default {
editBill, editBill,
examineAction, examineAction,
exportExcel, exportExcel,
importExcel,
customDeleteAction, customDeleteAction,
createBills, createBills,
batchPayment, batchPayment,
...@@ -211,9 +218,9 @@ export default { ...@@ -211,9 +218,9 @@ export default {
lincaoAddView, lincaoAddView,
lincaoReadView, lincaoReadView,
openNewPageDetail, openNewPageDetail,
GH_agreeAction, GH_cfBalance,
GH_rejectAction, GH_cfProject,
GH_submitAction DEQKD_batchEditorAction
}, },
billAction: { billAction: {
printMultiAction, printMultiAction,
...@@ -257,6 +264,10 @@ export default { ...@@ -257,6 +264,10 @@ export default {
CW_imageView, CW_imageView,
saveActionBXD, saveActionBXD,
CW_verifySignature, CW_verifySignature,
GH_agreeAction,
GH_rejectAction,
GH_submitAction,
GH_retrieveAction
}, },
billControl: { billControl: {
applyDetail, applyDetail,
...@@ -271,7 +282,8 @@ export default { ...@@ -271,7 +282,8 @@ export default {
IntroduceInputControl, IntroduceInputControl,
InputModalControl, InputModalControl,
Achievements, Achievements,
VxeSubjectControl VxeSubjectControl,
ModificationTrack,
}, },
formula: { formula: {
SubTableSetBaseData, SubTableSetBaseData,
...@@ -372,5 +384,4 @@ export default { ...@@ -372,5 +384,4 @@ export default {
seniorQuery: { seniorQuery: {
queryDate queryDate
} }
} }
\ No newline at end of file
import batchEditorControlModal from '../control/DEQKD_batchEditorModal.vue'
export default {
execute(context, param) {
const tableSelection = context.selects || []
// 未选择table行->请选择填充的行
if (tableSelection.length === 0) {
GMS.$hideContainer.$Message['info']({
content: '请先选择将要填充的行',
});
return
}
const idList = tableSelection.map(d=>d.id)
const billDefine = tableSelection[0].billDefine
let component = null;
let name = GMS.$hideContainer.addComponent(batchEditorControlModal, {}, function (c) {
component = c;
c.context = context
c.modal_visible = true;
c.idList = idList
c.billDefine = billDefine
c.$nextTick(()=>{
component.$on('close', function () {
GMS.$hideContainer.remove(name);
})
})
});
},
};
\ No newline at end of file
...@@ -7,6 +7,7 @@ export default { ...@@ -7,6 +7,7 @@ export default {
} }
GMS.$http.post(`/rbcquery/exportExcel`, { GMS.$http.post(`/rbcquery/exportExcel`, {
queryParameter: queryParam, queryParameter: queryParam,
enableId:param.isId||false,
queryViewVO: context.dom.queryBus.config, queryViewVO: context.dom.queryBus.config,
currentGroup: context.dom.queryBus.currGroup, currentGroup: context.dom.queryBus.currGroup,
},{ },{
......
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:余额结转
*/
export default {
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: () => {},
});
}
});
},
};
/*
* @Description:项目结转
*/
export default {
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: () => {},
});
}
});
},
};
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
}); });
} }
}, },
loadFinishFun(bill, err) { async loadFinishFun(bill, err) {
if (!GMS.oldBillDataMap) GMS.oldBillDataMap = {} if (!GMS.oldBillDataMap) GMS.oldBillDataMap = {}
if (err) { if (err) {
this.$Message.error(errMap[err]? errMap[err]: err) this.$Message.error(errMap[err]? errMap[err]: err)
...@@ -127,8 +127,24 @@ export default { ...@@ -127,8 +127,24 @@ export default {
return return
} }
// 给bill设置默认值 // 给bill设置默认值
let defaultValueList = this.defaultValueList || [] let defaultValueList = JSON.parse(JSON.stringify(this.defaultValueList || []))
for(let item of defaultValueList){ for(let item of defaultValueList){
if(item.tableName){
const postData = {
pagination: false,
tableName: item.tableName,
searchKey: "",
queryDataStructure: "ALL",
queryChildrenType: "ALL_CHILDREN_WITH_SELF",
code: item.defaultValue,
authType: "ACCESS",
versionDate: "",
expression: "",
}
const {data} = await GMS.$http.post(`/baseData/data/list`, postData)
const value = data.rows && data.rows[0] || ''
item.defaultValue = value
}
bill.getMasterData().setValue(item.field,item.defaultValue) bill.getMasterData().setValue(item.field,item.defaultValue)
} }
this.curBill = bill; this.curBill = bill;
......
baseDir=`pwd`
# basedir = $(cd "$(dirname "$0")";pwd)
echo $baseDir
for folder in \
"@gms/gms-plugin-billexpand" \
"@gms/gms-plugin-mainpage-commonfunctions" \
"@gms/gms-plugin-mainpage-feedback" \
"@gms/gms-plugin-mainpage-fileList" \
"@gms/gms-plugin-mainpage-mybill" \
"@gms/gms-plugin-mainpage-newsList" \
"@gms/gms-plugin-mainpage-reimburseBill" \
"@gms/gms-plugin-mainpage-reimburseExpense" \
"@gms/gms-plugin-mainpage-workflowcard" \
# "@gms/gms-plugin-workflow" \
# "@rbc/bill-runner-query" \
# "@rbc/control-strategy" \
# "@rbc/file-management" \
# "@rbc/invoice" \
# "@rbc/rbc-news" \
# "@rbc/runner-bill-form" \
# "@rbc/voucher-center" \
# "@rbc/welcome-page" \
# "@rbc/workflow-job-view"
do
cd $baseDir/$folder
# rm package-lock.json
# npm install
npm run build-dev
# npm publish
done
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "nvwa", "name": "nvwa",
"index": { "index": {
"name": "@gms/gms-entry", "name": "@gms/gms-entry",
"version": "latest" "version": "0.2.93-rbc"
}, },
"login": { "login": {
"name": "@rbc/rbc-login", "name": "@rbc/rbc-login",
......
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