Commit 3c44ca49 by yangchen

科目组件图标添加

parents 9722f7ac d3c77909
{ {
"name": "@gms/gms-plugin-billexpand", "name": "@gms/gms-plugin-billexpand",
"version": "0.0.8", "version": "0.0.9",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
}, },
"files": [ "files": [
"dist", "dist",
"public",
"src", "src",
"app.config.json" "app.config.json"
], ],
......
/*bjca_gangj 2021-4-25
回调层,用户可根据需求修改
*/
/**
* 直接签章回调
*/
function $DirectSignCallback(ret) {
$_$CurSignData[$_$CurStampID] = ret.retVal;
var stampID = $_$CurStampID;
$_$Seal_Pic_Main_Div_Name = "sealPicMain" + stampID;
$_$Seal_Pic_Div_Name = "sealPicDiv" + stampID;
$_$Seal_Img_Name = "sealImg" + stampID;
BWS_GetSignMethod($_$CurSignData[$_$CurStampID], function(ret) {
$_$CurSignMethod[$_$CurStampID] = ret.retVal;
})
var temp = "<div id='sealPicMain" + stampID + "' class='sealPicMain" + stampID + "' style='position: relative; display: block;'><div id='sealPicDiv" + stampID + "'><img id='sealImg" + stampID + "' src='data:image/gif;base64,"+ret.picData+"' /></div></div>";
return temp;
}
function $DirectSignSync(ret) {
$_$CurSignData[$_$CurStampID] = ret.retVal;
var stampID = $_$CurStampID;
$_$Seal_Pic_Main_Div_Name = "sealPicMain" + stampID;
$_$Seal_Pic_Div_Name = "sealPicDiv" + stampID;
$_$Seal_Img_Name = "sealImg" + stampID;
var retMethod = sealSync.GetSignMethod();
if(retMethod == "") {
alert("获取算法失败!");
return;
}
$_$CurSignMethod[$_$CurStampID] = retMethod;
return ret.picData;
}
/**
* 回显签章回调
*/
function $ShowSignCallback(stampID, picData) {
var temp = "<div id='sealPicMain" + stampID + "' class='sealPicMain" + stampID + "' style='position: relative; display: block;'><div id='sealPicDiv" + stampID + "'><img id='sealImg" + stampID + "' src='data:image/gif;base64,"+picData+"' /></div></div>";
return temp;
}
/**
* 拖拽签章回调
*/
function $DragSignCallback(ret) {
if (ret.retVal == "") {
$GetLastErrJS();
document.getElementById($_$Seal_Pic_Div_Name).style.display = "none";
} else {
document.getElementById($_$Seal_Pic_Div_Name).style.display = "block";
document.getElementById("signatureData" + $_$CurStampID).value = ret.retVal;
console.log($getDragSignPosition());
$_$CurSignData[$_$CurStampID] = ret.retVal;
BWS_GetSignMethod($_$CurSignData[$_$CurStampID], function(ret) {
$_$CurSignMethod[$_$CurStampID] = ret.retVal;
})
}
}
function $DragSignRetSync(ret) {
if (ret == "") {
$GetLastErrJS();
document.getElementById($_$Seal_Pic_Div_Name).style.display = "none";
} else {
document.getElementById($_$Seal_Pic_Div_Name).style.display = "block";
document.getElementById("signatureData" + $_$CurStampID).value = ret;
console.log($getDragSignPosition());
$_$CurSignData[$_$CurStampID] = ret;
var retMethod = sealSync.GetSignMethod();
if(retMethod == "") {
alert("获取算法失败!");
return;
}
$_$CurSignMethod[$_$CurStampID] = retMethod;
}
}
/**
* 撤销签章回调
*/
function $RemoveCallback(ret) {
$_$Seal_Pic_Div_Name = "sealPicDiv" + $_$CurStampID;
$_$Seal_Img_Name = "sealImg" + $_$CurStampID;
if (ret.retVal == "") {
$GetLastErrJS();
} else if (ret.retVal == $_$REMOVE_NOT_ALLOWED || ret.retVal == $_$NOT_LOGIN) {
return;
} else {
document.getElementById($_$Seal_Pic_Div_Name).style.display = "none";
if ($_$CurStampID) {
if (document.getElementById("signatureData" + $_$CurStampID)) {
document.getElementById("signatureData" + $_$CurStampID).value = "";
}
}
}
}
/**
* 验证签章回调
*/
function $VerifyCallback(ret) {
$_$Seal_Pic_Div_Name = "sealPicDiv" + $_$CurStampID;
$_$Seal_Img_Name = "sealImg" + $_$CurStampID;
if (document.getElementById($_$Seal_Img_Name)) {
var sealObj = document.getElementById($_$Seal_Img_Name);
sealObj.src = "data:image/gif;base64," + ret.retVal;
}
}
\ No newline at end of file
export function positionSignSync(stampID, orgdata, imgData) {
$_$CurStampID = stampID;
$_$CurOrgData[$_$CurStampID] = orgdata;
// ESeaL_CreateSignMenu("verifyedgif");
var retImg
var retSign
if (imgData) {
retSign = sealSync.SignPic(orgdata, imgData);
if(retSign == "") {
throw new Error('签章失败!')
}
retImg = sealSync.GetESealFromSignature(retSign);
if(retImg == "") {
throw new Error('获取签章后的图片失败!')
}
}
else {
retImg = sealSync.GetStampPic();
if(retImg == "") {
throw new Error('获取印章失败!')
}
retSign = sealSync.Sign(orgdata);
if(retSign == "") {
throw new Error('签章失败!')
}
}
//显示验证后的印章图片
var retObj = {
retVal:retSign,
picData:retImg
};
var imgData = $DirectSignSync(retObj);
const signatureData = $_$CurSignData[$_$CurStampID]
return { imgData, signatureData }
}
//同步验章
export function btnVerifySync(stampID, orgdata, signdata) {
$_$CurOrgData[stampID] = orgdata;
//验证
var sInfo;
var method_name = $_$CurSignMethod[stampID];
var sVerifyResult;
var sVerifyResult = sealSync.Verify(orgdata, signdata);
if (sVerifyResult == true || sVerifyResult == 'true') {
return true
} else if (sVerifyResult == false || sVerifyResult == 'false') {
return false
} else{
//当前接口不存在,客户端版本不匹配
alert($_$METHOD_NOT_EXIST);
return false
}
}
export function getVerifyImage(stampID, orgdata, signdata) {
btnVerifySync(stampID, orgdata, signdata)
//获取验证图片
let ret = sealSync.GetStampPicAfterVerified();
if (typeof(ret) == "undefined"){
//当前接口不存在,客户端版本不匹配
throw new Error($_$METHOD_NOT_EXIST)
} else if (ret != "") {
return ret
} else {
//获取错误信息,并弹框显示
ret = sealSync.$GetLastErr();
throw new Error(ret)
}
}
export function OnceStartSign() {
//初始化,每次采集都需要调用
var ret = AS_InitSign(1);
if (0 != ret) {
throw new Error('初始化失败 : ' + GetErrorMessage(ret))
}
//设置原文,由于只负责采集手写图片,所以原文内容随意值的base64编码值即可
var plain_base64 = "MTIzNDU=";
ret = AS_SetSignPlain(plain_base64);
if(ret != 0){
throw new Error('设置签名数据原文错误 : ' + GetErrorMessage(ret))
}
//设置采集模式,0为只采集手写
var result = AS_SetEvidenceCollectionModel(0);
if (result != 0) {
throw new Error('设置证据采集模式失败')
}
//设置输出图片格式
var dataType = 0;//手写图片
var fmt = 0;//gif格式
var result = AS_SetImageFormat(dataType, fmt);
if (result != 0) {
throw new Error('设置手写图片格式失败')
}
//设置签名人信息成功,随意设置即可
ret = AS_SetSignerInfo("random", 1, "123");
if (0 != ret) {
throw new Error('设置签名人信息错误')
}
//采集手写图片
ret = AS_AddSignEvidenceData();
if (0 != ret) {
throw new Error('采集签名证据数据错误')
}
//获取手写图片
var resultEvidence = AS_GetSignEvidenceData(0);
if (resultEvidence == "") {
var rv = AS_GetLastError();
throw new Error('当前签名证据数据为空 : ' + GetErrorMessage(rv))
}
return resultEvidence
}
import Bridge from '../components-control/util/bridge' import Bridge from '../components-control/util/bridge'
import SelectApprovers from '../components-control/select-approvers.vue' 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 { BILL_GLOBAL_PARAM } from '../constant'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
if (bill) { if (bill) {
if (!bill.getGlobalParam('reviewParam') || !bill.getGlobalParam('reviewParam').taskId) { if (!verifyBill(bill)) {
GMS.$hideContainer.$Message.error('验签失败')
return
}
if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
GMS.$hideContainer.$Message.error('请配置审批轨迹') GMS.$hideContainer.$Message.error('请配置审批轨迹')
return return
} }
...@@ -39,7 +46,9 @@ export default { ...@@ -39,7 +46,9 @@ export default {
title: "信息提示", title: "信息提示",
content: "信息发生变化, 是否保存", content: "信息发生变化, 是否保存",
onOk: () => { onOk: () => {
this.saveLogical(bill, param, {data: bill.getBuillData(), detailData: []}, this) saveBill(bill, param).then(() => {
this.approvalLogical(bill, param)
})
}, },
onCancel: () => { onCancel: () => {
} }
...@@ -56,44 +65,19 @@ export default { ...@@ -56,44 +65,19 @@ export default {
GMS.$hideContainer.$Message.error('缺少参数'); GMS.$hideContainer.$Message.error('缺少参数');
} }
}, },
saveLogical: function (bill, param, postData) {
let url = `/rbc/bill/action/executed/${param.define}/bill.Basic.save?transmission=total`
GMS.$http.post(url, JSON.stringify(postData), {
headers: {
post: {
"Content-Type": "application/json",
},
},
})
.then((response) => {
if (response.data.code == 0) {
//存储返回回来的创建时间、修改时间
bill.getMasterData().setValue("createTime", response.data.content.billData.createTime);
bill.getMasterData().setValue("modifyTime", response.data.content.billData.modifyTime);
bill.getMasterData().setValue("recver", response.data.content.billData.recver);
bill.getMasterData().setValue("billCode", response.data.content.billData.billCode);
let curTagId = window.nros.context.getCurrTag();
if (curTagId) {
GMS.oldBillDataMap[curTagId] = bill.getBuillData()
}
else {
GMS.oldBillData = bill.getBuillData()
}
this.approvalLogical(bill, param)
} else {
response.data.message && GMS.vbus.$Message.error({
content: response.data.message,
duration: 3
});
}
})
},
approvalLogical: function (bill, param) { approvalLogical: function (bill, param) {
const getApprovalList = () => { const getApprovalList = () => {
let taskId = bill.getGlobalParam('reviewParam').taskId;
const setApprover = (data) => {
bill.getMasterData().setValue('APPROVERPROPERTIES', data, null, 'none')
}
let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
bill.setControlsSate(param["_control_name_"], "enable", false) bill.setControlsSate(param["_control_name_"], "enable", false)
let selectedApprovers = [] let selectedApprovers = []
window.GMS.$http.get(`/bpm/bill/selectApprover/ApproverList/${taskId}`).then((res) => { window.GMS.$http.get(`/bpm/bill/selectApprover/ApproverList/${taskId}`).then((res) => {
setApprover(null)
if (res.data.code == 204) { if (res.data.code == 204) {
this.executeApproval(bill, param) this.executeApproval(bill, param)
return return
...@@ -128,17 +112,12 @@ export default { ...@@ -128,17 +112,12 @@ export default {
) )
}, },
onOk: () => { onOk: () => {
window.GMS.$http.post( const data = JSON.stringify({
'/bpm/bill/selectApprover/addApprovers', ...nodeData,
{ approvers: selectedApprovers,
...nodeData,
approvers: selectedApprovers,
}
).then(() => {
this.executeApproval(bill, param)
}).catch(() => {
GMS.$hideContainer.$Message.error('选择审批人发生错误')
}) })
setApprover(data)
this.executeApproval(bill, param)
}, },
onCancel: () => { onCancel: () => {
} }
...@@ -170,48 +149,72 @@ export default { ...@@ -170,48 +149,72 @@ export default {
} }
}, },
executeApproval: function(bill, param) { executeApproval: function(bill, param) {
let taskId = bill.getGlobalParam('reviewParam').taskId; let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
let comments = bill.getGlobalParam('reviewParam').suggestions ? bill.getGlobalParam('reviewParam').suggestions : ""; let comments =
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=1&comments=' + comments).then( bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
function (response) { ? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
if (response.status == 200 || response.statusText == 'OK') { : '';
if (response.data.code != 0) {
GMS.$hideContainer.$Message.error(response.data.message) const fn = () => {
return saveBill(bill, param).then(() => {
} GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=1&comments=' + comments).then(
bill.setControlsSate(param["_control_name_"], "enable", true) function (response) {
bill.setControlsSate(param["_control_name_"], "loading", false) if (response.status == 200 || response.statusText == 'OK') {
GMS.$hideContainer.$Message.success('审批成功!') if (response.data.code != 0) {
let curTagId = window.nros.context.getCurrTag(); GMS.$hideContainer.$Message.error(response.data.message)
GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId) return
}
if ( bill.setControlsSate(param["_control_name_"], "enable", true)
window.osConfig.appOpenMode && bill.setControlsSate(param["_control_name_"], "loading", false)
window.osConfig.appOpenMode == "apploader" GMS.$hideContainer.$Message.success('审批成功!')
) { let curTagId = window.nros.context.getCurrTag();
GMS.$hideContainer.$portalAPI.emit('entry-tag-close') GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId)
}
else if (Bridge.vm) { if (
Bridge.vm.modal_visible = false window.osConfig.appOpenMode &&
} window.osConfig.appOpenMode == "apploader"
window.GMS.vbus.$emit('refresh-workflow-job-view') ) {
} GMS.$hideContainer.$portalAPI.emit('entry-tag-close')
}.bind(this) }
) else if (Bridge.vm) {
.catch( Bridge.vm.modal_visible = false
function (error) { }
window.GMS.vbus.$emit('refresh-workflow-job-view')
}
}.bind(this)
)
.catch(
function (error) {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员')
}.bind(this)
);
})
}
window.GMS.$http.get(`/rbc/workflow/signatureConfig/${taskId}`).then((res) => {
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_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false) bill.setControlsSate(param["_control_name_"], "loading", false)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员') })
}.bind(this) }
); else {
fn()
}
})
return
}, },
isApproverEqulloginer: function (bill, param) { isApproverEqulloginer: function (bill, param) {
const loginer = GMS.userContext && GMS.userContext.id || window.nros.getUser().conetxtUser.id; const loginer = GMS.userContext && GMS.userContext.id || window.nros.getUser().conetxtUser.id;
let approver = [] let approver = []
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam('reviewParam').taskId}`, url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId}`,
async: false, async: false,
contentType: "application/json;", contentType: "application/json;",
beforeSend: function (request) { beforeSend: function (request) {
......
import Bridge from '../components-control/util/bridge'
import SelectApprovers from '../components-control/select-approvers.vue'
import { compareData } from "../components-control/util/dataChange"
import { showSignModal, saveBill, verifyBill } from './util'
import { BILL_GLOBAL_PARAM } from '../constant'
export default {
execute: function (bill, param) {
if (bill) {
if (!verifyBill(bill)) {
GMS.$hideContainer.$Message.error('验签失败')
return
}
if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
GMS.$hideContainer.$Message.error('请配置审批轨迹')
return
}
if (!this.isApproverEqulloginer(bill, param)) {
GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面')
return
}
let curTagId = window.nros.context.getCurrTag();
let oldObj = curTagId && GMS.oldBillDataMap[curTagId]?GMS.oldBillDataMap[curTagId]:GMS.oldBillData;
const dataChangeFlag = compareData(oldObj, bill.getBuillData())
const noRunTimeFormula = bill.getGlobalParam("noRunTimeFormula")
if (noRunTimeFormula) {
this.approvalLogical(bill, param, this)
}
else if (dataChangeFlag) {
bill.runFormulaCheckData(param, (msg) => {
if (msg.length == 0) {
this.approvalLogical(bill, param, this)
}
else {
GMS.vbus.$Modal.warning({
title: "信息错误",
content: msg,
});
}
})
}
else {
bill.runFormulaCheckData(param, (msg) => {
if (msg.length == 0) {
GMS.$hideContainer.$Modal.confirm({
title: "信息提示",
content: "信息发生变化, 是否保存",
onOk: () => {
saveBill(bill, param).then(() => {
this.approvalLogical(bill, param)
})
},
onCancel: () => {
}
})
} else {
GMS.vbus.$Modal.warning({
title: "信息错误",
content: msg,
});
}
});
}
} else {
GMS.$hideContainer.$Message.error('缺少参数');
}
},
approvalLogical: function (bill, param) {
const getApprovalList = () => {
const setApprover = (data) => {
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(() => {
GMS.$hideContainer.$Message.error('未找到下一节点的审批人');
})
}
if (param.param.actions) {
let saveParam = {
actions: param.param.actions
}
bill.executeServerAction(saveParam, function (code, data) {
if (code === 200) {
getApprovalList()
} else {
bill.setControlsSate(param["_control_name_"], "enable", true)
if (data.message.includes('还款金额不能大于未还金额')) {
GMS.$hideContainer.$message.error("还款金额不能大于未还金额!");
}
else {
GMS.$hideContainer.$message.error("操作异常请联系管理员");
}
}
}.bind(this));
} else {
getApprovalList()
}
},
executeApproval: function(bill, param) {
let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
let comments =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
: '';
const fn = () => {
saveBill(bill, param).then(() => {
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=1&comments=' + comments).then(
function (response) {
if (response.status == 200 || response.statusText == 'OK') {
if (response.data.code != 0) {
GMS.$hideContainer.$Message.error(response.data.message)
return
}
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
GMS.$hideContainer.$Message.success('审批成功!')
let curTagId = window.nros.context.getCurrTag();
GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId)
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
) {
GMS.$hideContainer.$portalAPI.emit('entry-tag-close')
}
else if (Bridge.vm) {
Bridge.vm.modal_visible = false
}
window.GMS.vbus.$emit('refresh-workflow-job-view')
}
}.bind(this)
)
.catch(
function (error) {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"], "loading", false)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员')
}.bind(this)
);
})
}
window.GMS.$http.get(`/rbc/workflow/signatureConfig/${taskId}`).then((res) => {
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 { compareData } from "../components-control/util/dataChange"
import { SIGNATURE_TABLE_NAME, BILL_GLOBAL_PARAM } from '../constant'
import { saveBill } from './util'
export default {
execute: function (bill, param) {
if(bill){
if (!this.isApproverEqulloginer(bill, param)) {
GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面')
return
}
let curTagId = window.nros.context.getCurrTag();
let oldObj = curTagId && GMS.oldBillDataMap[curTagId]?GMS.oldBillDataMap[curTagId]:GMS.oldBillData;
let flag = compareData(oldObj, bill.getBuillData()) || bill.getGlobalParam("noRunTimeFormula");
if (flag) {
this.approvalLogical(bill, param, this)
} else {
GMS.$hideContainer.$Modal.confirm({
title: "信息提示",
content: "信息发生变化, 是否保存",
onOk: () => {
saveBill(bill, param).then(() => {
this.approvalLogical(bill, param)
})
},
onCancel: () => {
}
})
}
}else{
GMS.$hideContainer.$Message.error('缺少参数');
}
},
approvalLogical: function (bill, param) {
bill.setControlsSate(param["_control_name_"], "enable", false)
if(param.param.actions){
let saveParam = {
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("操作异常请联系管理员");
}
}.bind(this));
} else {
this.approval(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('请配置审批轨迹')
return
}
let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
let comments =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
: ''
bill.clearSubDatas(SIGNATURE_TABLE_NAME)
saveBill(bill, param).then(() => {
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=3&comments='+comments).then(
function(response) {
if (response.status == 200 || response.statusText == 'OK') {
if (response.data.code != 0) {
GMS.$hideContainer.$Message.error(response.data.message)
return
}
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
let curTagId = window.nros.context.getCurrTag();
GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId)
GMS.$hideContainer.$Message.success('驳回成功!')
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
) {
GMS.$hideContainer.$portalAPI.emit('entry-tag-close')
}
else if (Bridge.vm) {
Bridge.vm.modal_visible = false
}
window.GMS.vbus.$emit('refresh-workflow-job-view')
}
}.bind(this)
)
.catch(
function(error) {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员')
}.bind(this)
);
})
},
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 errorMessageUtil from "./util/errorMessageUtil";
import {minusIndex} from '../query-actions/util/queryTag.js';
import { showSignModal, saveBill } from "./util";
export default {
execute: function (bill, param) {
if (param && param.param && param.param.budgetcontrol) {
let res = this.getBudgetControl(bill, true, param);
res.then((data) => {
if (data.code == 0) {
let result = this.getBudgetControl(bill, false, param);
result.then((data1) => {
if (data1.code == 0) {
this.submitExecute(bill, param);
} else if (data1.code == 1) {
GAMS.Common.messagePrompt(data1.msg);
}
});
} else if (data.code == 1) {
setTimeout(() => {
GAMS.Common.messagePrompt(data.msg);
}, 500);
} else if (data.code == 2) {
setTimeout(() => {
this.getModal(bill, param, data);
}, 500);
}
});
} else {
this.submitExecute(bill, param);
}
},
getModal(bill, param, data) {
GMS.$hideContainer.$Modal.confirm({
title: "信息提示",
content: data.msg,
onOk: () => {
let result = this.getBudgetControl(bill, false, param);
result.then((data1) => {
if (data1.code == 0) {
this.submitExecute(bill, param);
} else if (data1.code == 1) {
GAMS.Common.messagePrompt(data1.msg);
}
});
},
onCancel: () => {
GMS.$hideContainer.$Message["error"]({
content: "已取消",
});
},
});
},
getBudgetControl(bill, check, param) {
let postData = {
data: bill.getBuillData(),
};
let url = `/v1/budget/control/${param.define}/${check}`;
return new Promise((resolve, reject) => {
GMS.$http
.post(url, postData, {
headers: {
post: {
"Content-Type": "application/json",
},
},
})
.then((res) => {
resolve(res.data);
});
});
},
submitExecute(bill, param){
if (bill) {
bill.setControlsSate(param["_control_name_"], 'enable', false)
const submitFn = () => {
let postData = {
data: bill.getBuillData(),
};
let url = `/rbc/bill/workflowAction/executed/${param.define}/workflow.submitToFlow?transmission=total`;
window.GMS.$http.post(url, JSON.stringify(postData)).then((response) => {
const data = response.data
let code = 200
if (data.code != 0) {
code = 201
}
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();
GMS.vbus.$emit("workflow-state-change", 90,curTagId);
} else if (code === 201) {
GMS.$hideContainer.$Spin.hide()
data.message && GMS.$hideContainer.$Message.error({
content: errorMessageUtil.submitAction.getErrorMessage(data.message),
duration: 3
});
} else if (code === 202) {
GMS.$hideContainer.$Spin.hide();
GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员");
}
}).catch((err) => {
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员');
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
})
}
if (param && param.param && param.param.useSignature) {
showSignModal(bill, param, '提交人').then(() => {
saveBill(bill, param).then(submitFn)
}).catch(() => {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
})
}
else {
submitFn()
}
} else {
GMS.$hideContainer.$Spin.hide();
alert('缺少参数');
}
}
}
\ No newline at end of file
import lincaoView from '../control/lincaoView.vue' import lincaoView from '../control/lincaoView.vue'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
// if (param.param.ipAddress && param.param.layerIds && bill.dom.billdata.JBR) { let name = GMS.$hideContainer.addComponent(lincaoView, {}, function (c) {
GMS.$hideContainer.addComponent(lincaoView, {}, function (c) { const year = nros.getUser().loginDate.substring(0,4)
debugger c.bill = bill.dom
c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=${nros.getUser().loginUnit}&layerIds=${param.param.layerIds}&projectNum=${bill.dom.billdata.JBR}` c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=130324&type=${param.param.type}&projectNum=1&year=${year}`
c.name = name
c.modalShow = true; c.modalShow = true;
}) })
// } else {
// GAMS.Common.messagePrompt('缺少参数')
// }
} }
} }
\ No newline at end of file
import lincaoReadView from '../control/lincaoReadView.vue'
import axios from 'axios'
export default {
execute: function (bill, param) {
let nowBill = bill.dom
let ipAddress = param.param.ipAddress
let name = GMS.$hideContainer.addComponent(lincaoReadView, {}, function (c) {
const index = nowBill.getSubFocus()
let nowSubData =nowBill.getSubDataRow("XMJHLTZB",index)
if(nowSubData.getValue("LAYERID") && nowSubData.getValue("MZGUID")){
let param = []
let rowData = {
"layerId" : nowSubData.getValue("LAYERID"),
"type" : nowSubData.getValue("LTTYPE"),
"year" : nowSubData.getValue("LTYEAR"),
"tbNums" : nowSubData.getValue("MZGUID"),
//预留后期会修改
// tbNums : "3583682,3583686",
}
param.push(rowData)
c.param = param
c.ipAddress = ipAddress
// const datas = new FormData()
// datas.append("param",JSON.stringify(param))
// let url = `http://${ipAddress}/jq/getDatasView.do`
// const options = {
// method: 'POST',
// headers: { 'content-type': 'application/x-www-form-urlencoded' },
// data: datas,
// url,
// };
// axios(options).then((res) => {
// console.log(res)
// c.htmlValue = res.data
// });
}
c.name = name
c.modalShow = true;
})
}
}
\ No newline at end of file
import printBill from '../control/printBill.vue' import printBill from '../control/printBill.vue'
import { verifyBill } from './util'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
if (param) { if (param) {
if (!verifyBill(bill)) {
GMS.$hideContainer.$Message.error('验签失败')
return
}
GMS.$hideContainer.addComponent(printBill, {}, function (c) { GMS.$hideContainer.addComponent(printBill, {}, function (c) {
c.billId = bill.getMasterData().getValue('id'); c.billId = bill.getMasterData().getValue('id');
c.billDefineName = param.define; c.billDefineName = param.define;
......
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 { saveBill } from './util'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
if(bill){ if(bill){
...@@ -17,7 +20,9 @@ export default { ...@@ -17,7 +20,9 @@ export default {
title: "信息提示", title: "信息提示",
content: "信息发生变化, 是否保存", content: "信息发生变化, 是否保存",
onOk: () => { onOk: () => {
this.saveLogical(bill, param, {data: bill.getBuillData(), detailData: []}, this) saveBill(bill, param).then(() => {
this.approvalLogical(bill, param)
})
}, },
onCancel: () => { onCancel: () => {
} }
...@@ -45,72 +50,59 @@ export default { ...@@ -45,72 +50,59 @@ export default {
this.approval(bill, param); this.approval(bill, param);
} }
}, },
saveLogical: function (bill, param, postData) {
let url = `/rbc/bill/action/executed/${param.define}/bill.Basic.save?transmission=total`
GMS.$http.post(url, JSON.stringify(postData), {
headers: {
post: {
"Content-Type": "application/json",
},
},
})
.then((response) => {
if (response.data.code == 0) {
this.approvalLogical(bill, param)
} else {
response.data.message && GMS.vbus.$Message.error({
content: response.data.message,
duration: 3
});
}
})
},
approval: function(bill, param){ approval: function(bill, param){
if (!bill.getGlobalParam('reviewParam') || !bill.getGlobalParam('reviewParam').taskId) { if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
GMS.$hideContainer.$Message.error('请配置审批轨迹') GMS.$hideContainer.$Message.error('请配置审批轨迹')
return return
} }
let taskId = bill.getGlobalParam('reviewParam').taskId; let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
let comments = bill.getGlobalParam('reviewParam').suggestions ? bill.getGlobalParam('reviewParam').suggestions:""; let comments =
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=3&comments='+comments).then( bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
: ''
bill.clearSubDatas(SIGNATURE_TABLE_NAME)
saveBill(bill, param).then(() => {
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=3&comments='+comments).then(
function(response) { 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_"],"loading",false)
let curTagId = window.nros.context.getCurrTag();
GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId)
GMS.$hideContainer.$Message.success('驳回成功!')
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
) {
GMS.$hideContainer.$portalAPI.emit('entry-tag-close')
}
else if (Bridge.vm) {
Bridge.vm.modal_visible = false
}
window.GMS.vbus.$emit('refresh-workflow-job-view')
} }
}.bind(this)
)
.catch(
function(error) {
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)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员') let curTagId = window.nros.context.getCurrTag();
GMS.vbus.$emit('change-form-state', { state: 'readOnly'},curTagId)
GMS.$hideContainer.$Message.success('驳回成功!')
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
) {
GMS.$hideContainer.$portalAPI.emit('entry-tag-close')
}
else if (Bridge.vm) {
Bridge.vm.modal_visible = false
}
window.GMS.vbus.$emit('refresh-workflow-job-view')
}
}.bind(this)
)
.catch(
function(error) {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员')
}.bind(this) }.bind(this)
); );
})
}, },
isApproverEqulloginer: function (bill, param) { isApproverEqulloginer: function (bill, param) {
const loginer = GMS.userContext && GMS.userContext.id || window.nros.getUser().conetxtUser.id; const loginer = GMS.userContext && GMS.userContext.id || window.nros.getUser().conetxtUser.id;
let approver = [] let approver = []
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam('reviewParam').taskId}`, url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId}`,
async: false, async: false,
contentType: "application/json;", contentType: "application/json;",
beforeSend: function (request) { beforeSend: function (request) {
......
...@@ -6,6 +6,7 @@ export default { ...@@ -6,6 +6,7 @@ export default {
let name = GMS.$hideContainer.addComponent(addInfoModal, {}, function (c) { let name = GMS.$hideContainer.addComponent(addInfoModal, {}, function (c) {
component = c; component = c;
c.masterFieldsObj={}; c.masterFieldsObj={};
if(param.param && param.param.masterFields){ if(param.param && param.param.masterFields){
param.param.masterFields.forEach(v=>{ param.param.masterFields.forEach(v=>{
v.fieldBillRelation.forEach(item=>{ v.fieldBillRelation.forEach(item=>{
...@@ -15,9 +16,12 @@ export default { ...@@ -15,9 +16,12 @@ export default {
}) })
}) })
} }
c.bill = bill; c.bill = bill;
c.actionParam = param; c.actionParam = param;
c.actionParam.param.viewArr.map(v=>v.title=v.title.split('[')[0]) c.actionParam.param.viewArr.map(v=>v.title=v.title.split('[')[0])
// 不知道这玩意哪来的,先用这个替代吧
c.actionParam.param.masterSubRelation = bill.getTableType('sub_table')
c.getAssetsModal(); c.getAssetsModal();
c.currentRowData = {}; c.currentRowData = {};
c.selectBill=''; c.selectBill='';
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
c.subBillData = obj.BILLDETAILOBJ; c.subBillData = obj.BILLDETAILOBJ;
c.modal_visible = true; c.modal_visible = true;
c.state = 'readOnly' c.state = 'readOnly'
c.hideButtonGroup = true c.hideButtonGroup = param.param.showButtonGroup? false: true;
c.$nextTick(()=>{ c.$nextTick(()=>{
component.addListener({ component.addListener({
close: function() { close: function() {
......
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
c.bill = bill; c.bill = bill;
c.isReadOnly = true; c.isReadOnly = true;
c.state = 'readOnly'; c.state = 'readOnly';
c.hideButtonGroup = true; c.hideButtonGroup = param.param.showButtonGroup? false: true;
let tableName = null; let tableName = null;
if(param.param && param.param.tableName){ if(param.param && param.param.tableName){
tableName = param.param.tableName tableName = param.param.tableName
......
import errorMessageUtil from "./util/errorMessageUtil"; import errorMessageUtil from "./util/errorMessageUtil";
import {minusIndex} from '../query-actions/util/queryTag.js'; import {minusIndex} from '../query-actions/util/queryTag.js';
import { showSignModal, saveBill } from "./util";
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
if (param && param.param && param.param.budgetcontrol) { if (param && param.param && param.param.budgetcontrol) {
...@@ -71,38 +73,54 @@ export default { ...@@ -71,38 +73,54 @@ export default {
submitExecute(bill, param){ submitExecute(bill, param){
if (bill) { if (bill) {
bill.setControlsSate(param["_control_name_"], 'enable', false) bill.setControlsSate(param["_control_name_"], 'enable', false)
let postData = {
data: bill.getBuillData(), const submitFn = () => {
}; let postData = {
let url = `/rbc/bill/workflowAction/executed/${param.define}/workflow.submitToFlow?transmission=total`; data: bill.getBuillData(),
window.GMS.$http.post(url, JSON.stringify(postData)).then((response) => { };
const data = response.data let url = `/rbc/bill/workflowAction/executed/${param.define}/workflow.submitToFlow?transmission=total`;
let code = 200 window.GMS.$http.post(url, JSON.stringify(postData)).then((response) => {
if (data.code != 0) { const data = response.data
code = 201 let code = 200
} if (data.code != 0) {
bill.setControlsSate(param["_control_name_"], 'enable', true) code = 201
if (code === 200) { }
const id = data.content.billData.id; bill.setControlsSate(param["_control_name_"], 'enable', true)
minusIndex();//上张下张用 if (code === 200) {
GMS.$hideContainer.$Message.success('提交成功'); const id = data.content.billData.id;
let curTagId = window.nros.context.getCurrTag(); minusIndex();//上张下张用
GMS.vbus.$emit("workflow-state-change", 90,curTagId); GMS.$hideContainer.$Message.success('提交成功');
} else if (code === 201) { let curTagId = window.nros.context.getCurrTag();
GMS.$hideContainer.$Spin.hide() GMS.vbus.$emit("workflow-state-change", 90,curTagId);
data.message && GMS.$hideContainer.$Message.error({ } else if (code === 201) {
content: errorMessageUtil.submitAction.getErrorMessage(data.message), GMS.$hideContainer.$Spin.hide()
duration: 3 data.message && GMS.$hideContainer.$Message.error({
}); content: errorMessageUtil.submitAction.getErrorMessage(data.message),
} else if (code === 202) { duration: 3
GMS.$hideContainer.$Spin.hide(); });
GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员"); } else if (code === 202) {
} GMS.$hideContainer.$Spin.hide();
}).catch((err) => { GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员");
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员'); }
bill.setControlsSate(param["_control_name_"], "enable", true) }).catch((err) => {
bill.setControlsSate(param["_control_name_"],"loading",false) GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员');
}) bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
})
}
if (param && param.param && param.param.useSignature) {
showSignModal(bill, param, '提交人').then(() => {
saveBill(bill, param).then(submitFn)
}).catch(() => {
bill.setControlsSate(param["_control_name_"], "enable", true)
bill.setControlsSate(param["_control_name_"],"loading",false)
})
}
else {
submitFn()
}
} else { } else {
GMS.$hideContainer.$Spin.hide(); GMS.$hideContainer.$Spin.hide();
alert('缺少参数'); alert('缺少参数');
......
import {
SIGNATURE_TABLE_NAME,
SIGNATURE_TABLE,
BILL_GLOBAL_PARAM,
GLOBAL_EVENT,
} from '../../constant'
import { getValueListString } from '../../utils'
import { btnVerifySync } from '../../BJCAWebsign'
import ElectronicSignature from '../../components-control/electronic-signature.vue'
export const saveBill = (bill, param, postData) => {
if (!postData) {
postData = { data: bill.getBuillData(), detailData: [] }
}
let url = `/rbc/bill/action/executed/${param.define}/bill.Basic.save?transmission=total`
return GMS.$http.post(url, JSON.stringify(postData), {
headers: {
post: {
"Content-Type": "application/json",
},
},
})
.then((response) => {
if (response.data.code == 0) {
//存储返回回来的创建时间、修改时间
bill.getMasterData().setValue("createTime", response.data.content.billData.createTime);
bill.getMasterData().setValue("modifyTime", response.data.content.billData.modifyTime);
bill.getMasterData().setValue("recver", response.data.content.billData.recver);
bill.getMasterData().setValue("billCode", response.data.content.billData.billCode);
let curTagId = window.nros.context.getCurrTag();
if (curTagId) {
GMS.oldBillDataMap[curTagId] = bill.getBuillData()
}
else {
GMS.oldBillData = bill.getBuillData()
}
} else {
response.data.message && GMS.vbus.$Message.error({
content: response.data.message,
duration: 3
})
throw new Error()
}
})
}
export const showSignModal = (bill, param, nodeName) => {
const saveSubTableData = ({ signatureValue, operateTime, imgData }) => {
bill.addSubData(SIGNATURE_TABLE_NAME)
const approvalComment =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT)
&& bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
|| ''
const subDataObj = bill.getSubData(SIGNATURE_TABLE_NAME)
const tableLength = subDataObj.length || 0
const subDataIndex = tableLength - 1
subDataObj[subDataIndex].setValue(SIGNATURE_TABLE.SIGNATURE_VALUE, signatureValue, null, 'none')
subDataObj[subDataIndex].setValue(SIGNATURE_TABLE.NODE_NAME, nodeName, null, 'none')
subDataObj[subDataIndex].setValue(SIGNATURE_TABLE.CREATE_TIME, operateTime, null, 'none')
subDataObj[subDataIndex].setValue(SIGNATURE_TABLE.SIGN_IMAGE, imgData, null, 'none')
subDataObj[subDataIndex].setValue(
SIGNATURE_TABLE.PROTECT_FIELDS,
JSON.stringify(bill.getGlobalParam(BILL_GLOBAL_PARAM.SIGNATURE_FIELDS)),
null,
'none'
)
subDataObj[subDataIndex].setValue(
SIGNATURE_TABLE.APPROVAL_COMMENT,
approvalComment,
null,
'none'
)
bill.refreshSubDataRow(SIGNATURE_TABLE_NAME)
}
let signInfoObj = {}
return new Promise((resolve, reject) => {
const h = GMS.$hideContainer.$createElement
const vNode = h(
ElectronicSignature,
{
props: {
bill,
nodeName,
},
on: {
'on-sign': (val) => {
signInfoObj = val
},
}
}
)
GMS.$hideContainer.$msgbox({
title: '电子签章',
message: vNode,
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
if (signInfoObj && signInfoObj.imgData) {
done()
}
else {
GMS.$hideContainer.$Message.error('请添加电子签章')
}
} else {
done()
}
}
}).then(action => {
saveSubTableData(signInfoObj)
vNode.componentInstance && vNode.componentInstance.init()
resolve()
}).catch(() => {
vNode.componentInstance && vNode.componentInstance.init()
reject()
})
})
}
export const verifyBill = (bill) => {
const dataObjList = bill.getSubData(SIGNATURE_TABLE_NAME)
if (!(dataObjList instanceof Array && dataObjList.length)) return true
const valueString = getValueListString(bill)
if (dataObjList instanceof Array) {
const dataObj = dataObjList[dataObjList.length - 1]
const flag = btnVerifySync(
dataObj.getValue(SIGNATURE_TABLE.CREATE_TIME),
valueString,
dataObj.getValue(SIGNATURE_TABLE.SIGNATURE_VALUE)
)
if (!flag) {
window.GMS.vbus.$emit(GLOBAL_EVENT.VERIFY_SIGNATURE_FAIL, window.nros.getCurrTag())
}
return flag
}
return true
}
import { verifyBill } from './util'
export default {
execute: function (bill, param) {
if (verifyBill(bill)) {
GMS.$hideContainer.$Message.success('验签成功')
}
else {
GMS.$hideContainer.$Message.error('验签失败')
}
}
}
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
return { return {
isReadOnly: false, isReadOnly: false,
showDetail: false, showDetail: false,
state: null, state: '',
billId: "", billId: "",
modal_visible: false, modal_visible: false,
showBiffForm: false, showBiffForm: false,
...@@ -231,7 +231,13 @@ export default { ...@@ -231,7 +231,13 @@ export default {
}, 100); }, 100);
}, },
setFieldFromMaster(bill){ setFieldFromMaster(bill){
if(!this.actionParam.param.masterFields) return if(
!this.actionParam
|| !this.actionParam.param
|| !this.actionParam.param.masterFields
) {
return
}
let obj = this.actionParam.param.masterFields.find( let obj = this.actionParam.param.masterFields.find(
(v) => v.billName == this.selectBill (v) => v.billName == this.selectBill
); );
......
<template>
<div class="electronic-signature-wrapper">
<Button size="small" type="primary" ghost @click="getSign('usb')">u-key</Button>&nbsp;&nbsp;
<Button size="small" type="primary" ghost @click="getSign('writingPad')">手写板</Button>
<div class="img-wrapper">
<img :src="imgData" alt="">
</div>
</div>
</template>
<script>
import { getValueListString } from '../utils'
import { positionSignSync, OnceStartSign } from '../BJCAWebsign'
export default {
props: {
bill: {},
},
data() {
return {
imgData: null,
operateTime: null,
valueString: null,
signatureValue: null,
}
},
mounted() {
this.init()
},
methods: {
init() {
this.imgData = null
this.operateTime = null
this.valueString = null
},
getSign(type) {
try {
this.operateTime = Date.now()
this.valueString = getValueListString(this.bill)
const signData = type === 'writingPad' ? OnceStartSign() : null
const {
imgData,
signatureData: signatureValue,
} = positionSignSync(this.operateTime, this.valueString, signData)
this.signatureValue = signatureValue
this.imgData = 'data:image/gif;base64,' + imgData
this.$emit('on-sign', { signatureValue: this.signatureValue, operateTime: this.operateTime, imgData })
} catch (error) {
this.$Message.error(error.message)
console.error(error)
}
}
}
}
</script>
<style lang="less">
.electronic-signature-wrapper {
.img-wrapper {
width: 250px;
height: 200px;
display: flex;
align-items: center;
justify-content: center;
img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
}
}
</style>
\ No newline at end of file
import { SIGNATURE_TABLE_NAME } from '../../constant'
function convertDate(date) { function convertDate(date) {
if (typeof date === "number") { if (typeof date === "number") {
return date; return date;
...@@ -9,7 +11,10 @@ function convertDate(date) { ...@@ -9,7 +11,10 @@ function convertDate(date) {
} }
export function compareData(oldBillData, newBill) { export function compareData(oldBillData, newBill) {
let that = this; oldBillData = _.cloneDeep(oldBillData)
newBill = _.cloneDeep(newBill)
delete oldBillData[SIGNATURE_TABLE_NAME]
delete newBill[SIGNATURE_TABLE_NAME]
for (let i in oldBillData) { for (let i in oldBillData) {
if (i.endsWith("RQ") || i.endsWith("Time") || i.endsWith("SJ")) { if (i.endsWith("RQ") || i.endsWith("Time") || i.endsWith("SJ")) {
oldBillData[i] = convertDate(oldBillData[i]); oldBillData[i] = convertDate(oldBillData[i]);
......
export const SIGNATURE_TABLE_NAME = 'DZQZZB'
export const SIGNATURE_TABLE = {
SIGNATURE_VALUE: 'signature',
NODE_NAME: 'nodeName',
CREATE_TIME: 'createTime',
SIGN_IMAGE: 'signImage',
PROTECT_FIELDS: 'guardFields',
APPROVAL_COMMENT: 'approvalComment',
}
export const BILL_GLOBAL_PARAM = {
SIGNATURE_FIELDS: 'signatureFields',
APPROVAL_COMMENT: 'approvalComment',
}
export const GLOBAL_EVENT = {
VERIFY_SIGNATURE_FAIL: 'verifySignatureFail',
}
...@@ -156,6 +156,9 @@ export default { ...@@ -156,6 +156,9 @@ export default {
let a = "/showBillForm/" + defineName + "_E/" + id; let a = "/showBillForm/" + defineName + "_E/" + id;
let routeData = GMS.routerManager.getRouter().resolve({ let routeData = GMS.routerManager.getRouter().resolve({
path: a, path: a,
query:{
params:"{'isEdit':true}"
}
}); });
window.open(routeData.href, "_blank"); window.open(routeData.href, "_blank");
}); });
......
...@@ -124,6 +124,8 @@ ...@@ -124,6 +124,8 @@
<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';
export default { export default {
name: 'ApprovalUserControl', name: 'ApprovalUserControl',
components: { components: {
...@@ -179,15 +181,15 @@ export default { ...@@ -179,15 +181,15 @@ export default {
watch: { watch: {
value(newV) { value(newV) {
this.reviewParam['suggestions'] = newV; this.reviewParam['suggestions'] = newV;
this.context.bill.setGlobalParam('reviewParam',this.reviewParam); this.context.bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT,this.reviewParam);
} }
}, },
mounted() { mounted() {
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;
this.context.bill.setGlobalParam('reviewParam',this.reviewParam); this.context.bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT,this.reviewParam);
this.value = this.context.bill.getGlobalParam('reviewParam').suggestions this.value = this.context.bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
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)
......
...@@ -136,10 +136,10 @@ export default { ...@@ -136,10 +136,10 @@ export default {
window.onresize = () => { window.onresize = () => {
this.getModalHeight() this.getModalHeight()
} }
this.$refs.modal.$el.addEventListener('click', this.stopPropagation) this.$refs.modal.$el.addEventListener('mousedown', this.stopPropagation)
}, },
beforeDestroy() { beforeDestroy() {
this.$refs.modal.$el.removeeventlistener('click', this.stopPropagation) this.$refs.modal.$el.removeEventListener('mousedown', this.stopPropagation)
}, },
methods: { methods: {
stopPropagation(event) { stopPropagation(event) {
......
...@@ -194,12 +194,17 @@ export default { ...@@ -194,12 +194,17 @@ export default {
}, },
mounted () { mounted () {
this.addDomListener() this.addDomListener()
this.$refs.searchList.addEventListener('mousedown', this.stopPropagation)
addResizeListener(this.$el, this.handleResize) addResizeListener(this.$el, this.handleResize)
}, },
beforeDestroy() { beforeDestroy() {
this.$refs.searchList.removeEventListener('mousedown', this.stopPropagation)
this.removeDomListener() this.removeDomListener()
}, },
methods: { methods: {
stopPropagation(event) {
event.stopPropagation()
},
getLable(val) { getLable(val) {
if (this.showtype === 'CODE' || this.showtype === '0') { if (this.showtype === 'CODE' || this.showtype === '0') {
return val.code return val.code
......
<template>
<el-dialog
class = "abow_dialog_lincao"
:fullscreen ="true"
width="90%"
:visible.sync="dialogVisible"
v-dialogDrag
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="closeDialog"
>
<iframe class="iframeStyle" id="_iframe" name ="_iframe_name" src="" > </iframe>
</el-dialog>
</template>
<script>
export default {
props: {},
data() {
return {
param :null,
dialogVisible:true,
htmlValue : null,
ipAddress:null,
name :null,
};
},
watch: {
ipAddress() {
debugger
if (!this.ipAddress) return
var data = this.param
var form=document.createElement('form');
form.action=`http://${this.ipAddress}/jq/getDatasView.do`;
form.target='_iframe_name';
form.method='post';
form.style='display:none;';
var paramInput =document.createElement('input');
paramInput.name ='param';
paramInput.type='hidden';
paramInput.value =JSON.stringify(data)
form.appendChild(paramInput)
document.body.appendChild(form)
form.submit();
document.body.removeChild(form);
}
},
methods: {
closeDialog(){
GMS.$hideContainer.remove(this.name)
}
},
mounted() {
},
};
</script>
<style lang="less">
.iframeStyle{
height:100%;
width:100%
}
.abow_dialog_lincao {
.el-dialog {
.el-dialog__body{
height:100%;
}
.el-dialog__header{
padding: 5px 20px 10px;
}
}
}
</style>
<template> <template>
<div> <el-dialog
class = "abow_dialog_lincao"
<el-dialog :fullscreen ="true"
width="90%"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="80%"
v-dialogDrag v-dialogDrag
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
> >
<iframe :src="url"></iframe> <iframe class="iframeStyle" :src="url"></iframe>
</el-dialog> </el-dialog>
</div>
</template> </template>
<script> <script>
export default { export default {
...@@ -20,18 +18,72 @@ export default { ...@@ -20,18 +18,72 @@ export default {
return { return {
dialogVisible:true, dialogVisible:true,
url:"", url:"",
bill:null,
name :null,
subBillName :"XMJHLTZB"
}; };
}, },
watch: { watch: {
}, },
methods: { methods: {
eventListener(message){ lincaoEventListener(message){
debugger
const valueAll = []
//获取iframe的回调数据
const datas = message.data.datas;
for (let i = 0; i < datas.length; i++) {
for (let a = 0; a < datas[i].tbInfos.length; a++) {
//处理给子表赋值的数据
let value = {
"LAYERID": datas[i].layerId,
"LTTYPE" :datas[i].type,
"LTYEAR": datas[i].year,
"SHENG" : datas[i].tbInfos[a].SHENG_DESC,
"SHI" : datas[i].tbInfos[a].SHI_DESC,
"XIANG" : datas[i].tbInfos[a].XIANG_DESC,
"XIAN" : datas[i].tbInfos[a].XIAN_DESC,
"MZGUID" : datas[i].tbInfos[a].MZGUID,
"ZL_TU_BAN" :datas[i].tbInfos[a].ZL_TU_BAN
}
valueAll.push(value)
}
}
for (let i = 0; i < valueAll.length; i++) {
//先增行,然后给增行的子表进行赋值
this.bill.addSubData(this.subBillName)
const obj = this.bill.getSubData(this.subBillName)
const index = obj.length - 1
for (let key of Object.keys(valueAll[i])) {
const keyVal = valueAll[i][key]
obj[index].setValue(key, keyVal)
}
}
GMS.$hideContainer.remove(this.name)
//刷新子表
this.bill.refreshSubDataRow(this.subBillName)
} }
}, },
mounted() { mounted() {
windows.addEventListener('message',eventListener) window.addEventListener('message',this.lincaoEventListener)
}, },
}; };
</script> </script>
<style scoped lang="less"></style> <style lang="less">
.iframeStyle{
height:100%;
width:100%
}
.abow_dialog_lincao {
.el-dialog {
.el-dialog__body{
height:100%;
}
.el-dialog__header{
padding: 5px 20px 10px;
}
}
}
</style>
...@@ -37,7 +37,10 @@ export default { ...@@ -37,7 +37,10 @@ export default {
let id = this.context.dataObject.getValue(configId); let id = this.context.dataObject.getValue(configId);
let a = "/showBillForm/" + defineName + '_E/' + id; let a = "/showBillForm/" + defineName + '_E/' + id;
let routeData = GMS.routerManager.getRouter().resolve({ let routeData = GMS.routerManager.getRouter().resolve({
path: a path: a,
query:{
params:"{'isEdit':true}"
}
}); });
window.open(routeData.href, "_blank"); window.open(routeData.href, "_blank");
} }
......
<template>
<div>
<div class="signature-list">
<div
class="signature-node"
v-for="node in signatureNode"
:key="node.name"
>
<div class="node-name">{{ node.name }}</div>
<div class="img-wrapper">
<img :src="node.src" alt="">
</div>
</div>
</div>
</div>
</template>
<script>
import {
SIGNATURE_TABLE_NAME,
SIGNATURE_TABLE,
BILL_GLOBAL_PARAM,
GLOBAL_EVENT,
} from '../constant'
import { getValueListString } from '../utils'
import { getVerifyImage } from '../BJCAWebsign'
export default {
data() {
return {
imgData: null,
signatureTableData: [],
signatureNode: [],
tagId: null,
}
},
props: {
define: {
type: Object,
required: true,
},
context: {
type: Object,
default: () => { },
}
},
computed: {
},
mounted() {
this.tagId = window.nros.getCurrTag()
window.GMS.vbus.$on(GLOBAL_EVENT.VERIFY_SIGNATURE_FAIL, this.loadVerifiedImage)
let protectFields =
this.context.settings
&& this.context.settings.content
&& this.context.settings.content.signatureConfig
&& this.context.settings.content.signatureConfig.fields
const masterTableName = this.context.bill.getTableType('masterName').name
if (!protectFields || !protectFields.length) {
protectFields = [{ title: 'billCode', field: masterTableName + '.billCode' }]
}
this.context.bill.setGlobalParam(
BILL_GLOBAL_PARAM.SIGNATURE_FIELDS,
protectFields
)
this.getSignatureTableData()
this.initSignatureImg()
},
beforeDestroy() {
window.GMS.vbus.$off(GLOBAL_EVENT.VERIFY_SIGNATURE_FAIL, this.loadVerifiedImage)
},
methods:{
loadVerifiedImage(tagId) {
if (tagId != this.tagId) return
const valueString = getValueListString(this.context.bill)
this.signatureNode = this.signatureTableData.map((dataObj) => {
let verifyImage
try {
verifyImage = getVerifyImage(
dataObj.getValue(SIGNATURE_TABLE.CREATE_TIME),
valueString,
dataObj.getValue(SIGNATURE_TABLE.SIGNATURE_VALUE)
)
} catch (error) {
GMS.$hideContainer.$message.error(error)
}
return {
name: dataObj.getValue(SIGNATURE_TABLE.NODE_NAME),
src: 'data:image/gif;base64,' + verifyImage,
}
})
},
getSignatureTableData() {
const dataObj = this.context.bill.getSubData(SIGNATURE_TABLE_NAME)
if (dataObj instanceof Array) {
this.signatureTableData = dataObj
}
else {
this.getSignatureTableData = []
}
},
initSignatureImg() {
this.signatureNode = this.signatureTableData.map((dataObj) => {
return {
name: dataObj.getValue(SIGNATURE_TABLE.NODE_NAME),
src: 'data:image/gif;base64,' + dataObj.getValue(SIGNATURE_TABLE.SIGN_IMAGE),
}
})
}
},
}
</script>
<style lang="less" scoped>
.signature-list {
display: flex;
flex-wrap: wrap;
align-items: center;
.signature-node {
display: flex;
align-items: center;
margin-right: 10px;
.node-name {
font-size: 16px;
}
.img-wrapper {
width: 250px;
height: 200px;
display: flex;
align-items: center;
justify-content: center;
img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
}
}
}
</style>
<template>
<div class="bill-achievements">
<vxe-table border ref="xTable" :data="tableData" :show-header="false">
<vxe-table-column
field="name"
title="name"
width="160"
align="center"
></vxe-table-column>
<vxe-table-column field="value" title="type">
<template slot-scope="scope">
<component
:is="scope.row.type"
:attr="{ field: 'value', row: scope.row, attr: scope.row.attr }"
></component>
</template>
</vxe-table-column>
</vxe-table>
</div>
</template>
<script>
import vxeAchievements from "./vxe-achievements.js";
import dataControl from "./components/dataControl.vue";
import vxeTableControl from "./components/vxe-table.vue";
import radioGroupControl from "./components/radioGroupControl.vue";
import inputControl from "./components/inputControl.vue";
export default {
mixins: [vxeAchievements],
components: {
vxeTableControl,
dataControl,
radioGroupControl,
inputControl,
},
data() {
return {
tableData: [
{
name: "项目名称",
type: "inputControl",
value: "",
},
{
name: "项目属性",
type: "radioGroupControl",
value: "",
},
{
name: "项目起止时间",
type: "dataControl",
value: "",
},
{
name: "项目资金申请(万元)",
type: "vxeTableControl",
attr: {
showHeader: false,
tableData: [
{
name: "资金总额:",
value: "",
width: 200,
},
{
name: " (一)上级工会预算拨款:",
value: "",
width: 200,
},
{
name: "1.工会经费:",
value: "",
width: 200,
},
{
name: "2.财政拨款:",
value: "",
width: 200,
},
{
name: "(二)自有资金:",
value: "",
width: 200,
},
{
name: "1.工会经费:",
value: "",
width: 200,
},
{
name: "2.财政补助收入:",
value: "",
width: 200,
},
{
name: "3.行政补助收入:",
value: "",
width: 200,
},
{
name: "4.事业收入:",
value: "",
width: 200,
},
{
name: "5.经营性收入:",
value: "",
width: 200,
},
],
columns: [
{
field: "name",
title: "收入名称",
width: 150,
type: "inputControl",
},
{
field: "value",
title: "数值",
type: "inputControl",
},
],
},
},
{
name: "单位(部门)职能概述",
type: "inputControl",
},
{
name: "项目概况",
type: "inputControl",
},
{
name: "项目立项情况",
type: "vxeTableControl",
attr: {
showHeader: false,
tableData: [
{
name: "项目立项的依据",
value: "",
width: 200,
},
{
name: "项目申报的可行性",
value: "",
width: 200,
},
{
name: "项目申报的必要性",
value: "",
width: 200,
},
],
columns: [
{
field: "name",
title: "立项情况",
width: 200,
},
{
field: "value",
title: "描述",
type: "inputControl",
},
],
},
},
{
name: "项目实施进度计划",
type: "vxeTableControl",
attr: {
showHeader: true,
tableData: [
{
content: "",
startTime: "",
endTime: "",
},
{
content: "",
startTime: "",
endTime: "",
},
],
columns: [
{
field: "content",
title: "项目实施内容",
type: "inputControl",
},
{
field: "startTime",
title: "开始时间",
type: "dataControl",
daterange: "date",
placement: "bottom",
},
{
field: "endTime",
title: "完成时间",
type: "dataControl",
daterange: "date",
placement: "bottom",
},
],
},
},
{
name: "项目绩效目标",
type: "vxeTableControl",
attr: { showHeader: false },
},
{
name: "长期绩效指标",
type: "vxeTableControl",
attr: { showHeader: false },
},
{
name: "年度绩效指标",
type: "vxeTableControl",
attr: {
showHeader: true,
tableData: [
{
longGoal: "",
yearGoal: "",
},
{
longGoal: "",
yearGoal: "",
},
],
columns: [
{
field: "longGoal",
title: "长期目标",
type: "inputControl",
},
{
field: "yearGoal",
title: "年度目标",
type: "dataControl",
type: "inputControl",
}
],
},
},
{
name: "其他说明的问题",
type: "inputControl",
},
{
name: "填报人:",
type: "inputControl",
},
],
};
},
props: {},
watch: {},
computed: {},
methods: {},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped>
.bill-achievements {
}
</style>
<template>
<div class="">
<DatePicker :type="attr.column && attr.column.daterange?attr.column.daterange:'daterange'" :placement="attr.column && attr.column.placement" :value="attr.row[attr.field]"></DatePicker>
</div>
</template>
<script>
export default {
data() {
return {
};
},
props: {
attr:{
type:Object,
default:()=>{}
}
},
watch: {},
computed: {},
methods: {
},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped>
</style>
<template>
<div class="">
<Input v-model="attr.row[attr.field]"/>
</div>
</template>
<script>
export default {
data() {
return {
};
},
props: {
attr:{
type:Object,
default:()=>{}
}
},
watch: {},
computed: {},
methods: {
},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped>
</style>
<template>
<div class="">
<RadioGroup v-model="attr.row[attr.field]">
<Radio label="新增项目"></Radio>
<Radio label="延续项目"></Radio>
</RadioGroup>
</div>
</template>
<script>
export default {
data() {
return {};
},
props: {
attr:{
type:Object,
default:()=>{}
}
},
watch: {},
computed: {},
methods: {},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped></style>
<template>
<div class="detail-table">
<vxe-table border ref="xTable" :data="attr.attr.tableData" :show-header="attr.attr.showHeader||false"
:header-cell-class-name="headerCellClassName">
<template v-for="(column, index) in attr.attr.columns">
<vxe-table-column :field="column.field" :title="column.title" :width="column.width" :key="index">
<template slot-scope="scope">
<component
v-if="column.type"
:is="column.type"
:attr="{field:column.field,row:scope.row,column:column}"
></component>
<span v-else>{{scope.row[column.field]}}</span>
</template>
</vxe-table-column>
</template>
</vxe-table>
</div>
</template>
<script>
import vxeAchievements from "../vxe-achievements.js";
import dataControl from "./dataControl.vue";
import vxeTableControl from "./vxe-table.vue";
import radioGroupControl from "./radioGroupControl.vue";
import inputControl from "./inputControl.vue";
export default {
mixins: [vxeAchievements],
components: {
vxeTableControl,
dataControl,
radioGroupControl,
inputControl
},
data() {
return {
};
},
props: {
attr:{
type:Object,
default:()=>{}
}
},
watch: {},
computed: {},
methods: {
headerCellClassName ({ column, columnIndex }) {
if (column.property === 'content') {
return 'col-white'
}
},
},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped>
.detail-table {
.vxe-header--column .col-white {
background-color: #fff !important;
}
}
</style>
export default {
data() {
return {
};
},
props: {},
watch: {},
computed: {},
methods: {
},
mounted() {
},
created() {},
beforeDestroy() {},
};
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
formatStepTime(step) { formatStepTime(step) {
const currentTimestamp = Date.now() const currentTimestamp = Date.now()
if (step.state === 1) { if (step.state === 1) {
let ans = '已等待' let ans = ''
const createTimestamp = (new Date(step.createTime)).getTime() const createTimestamp = (new Date(step.createTime)).getTime()
let seconds = (currentTimestamp - createTimestamp) / 1000 let seconds = (currentTimestamp - createTimestamp) / 1000
const formatList = [ const formatList = [
...@@ -147,6 +147,7 @@ export default { ...@@ -147,6 +147,7 @@ export default {
seconds -= num * o.rate seconds -= num * o.rate
} }
} }
ans = '已等待' + ans
return ans return ans
} }
else { else {
...@@ -166,6 +167,46 @@ export default { ...@@ -166,6 +167,46 @@ export default {
}).then((res) => { }).then((res) => {
const formatTrack = (curTrack) => { const formatTrack = (curTrack) => {
if (!curTrack) return [] if (!curTrack) return []
curTrack.steps = curTrack.steps.reverse()
curTrack.steps = curTrack.steps.map((step) => {
if (step.subTasks && step.subTasks.length) {
let participants = []
let actualOwnerList = []
let resultFlag = 0
let rejectFlag = false
for (let task of step.subTasks) {
if (task.state == 2 && task.result == 3 || task.state == 3) {
rejectFlag = true
break
}
}
for (let task of step.subTasks) {
if (task.participants) {
participants = participants.concat(task.participants)
}
if (task.actualOwner) {
if (!rejectFlag || task.state == 2 && task.result == 3) {
actualOwnerList.push(task.actualOwner)
}
}
const curResult = task.result || 0
resultFlag |= 1 << curResult
}
step.result =
resultFlag & 8
? 3
: resultFlag & 1
? 0
: 1
rejectFlag && (step.state = 2)
step.participants = participants
step.actualOwner = actualOwnerList.join('、')
}
return step
})
curTrack.steps.push({ curTrack.steps.push({
title: "提交申请", title: "提交申请",
state: 2, state: 2,
......
export default { export default {
billControl: [ billControl: [
{ {
"title": "绩效表样",
"description":"",
"discard": false,
"dynamicComponent": 'billForm',
"extends": {
"config": [
{
"background": "#fff",
"key": "background",
"type": "Color",
"title": "背景色"
}
],
"layout":[]
},
"value": "Achievements",
"path": "单据/通用"
},
{
"title": "Tab切换容器",
"description":"",
"discard": false,
"extends": {
"config": [
{
"key": "tabsType",
"type": "enum",
"tabsType":"card",
"title": "页签展示样式",
"ref": [
{
"key": "line",
"value": "普通样式"
},
{
"key": "card",
"value": "卡片样式"
}
]
},
{
"background": "#fff",
"key": "background",
"type": "Color",
"title": "背景色"
}
],
"layout":[
{
"key": "height",
"type": "int",
"title": "内容高度"
},
{
"key": "labelHeight",
"type": "int",
"title": "标签高度"
}
]
},
"value": "TabContainer",
"path": "单据/通用"
},
{
"title": "链接扩展", "title": "链接扩展",
"description": "", "description": "",
"discard": false, "discard": false,
...@@ -1612,6 +1676,12 @@ export default { ...@@ -1612,6 +1676,12 @@ export default {
"title": "单据界面", "title": "单据界面",
"key": "billDefineName", "key": "billDefineName",
"type": "String", "type": "String",
},{
 "isRequired": true,
"ref": "columnField",
"type": "Boolean",
"title": "展示工具栏",
"key": "showButtonGroup"
}] }]
}, },
"description": "", "description": "",
...@@ -1638,6 +1708,12 @@ export default { ...@@ -1638,6 +1708,12 @@ export default {
"title": "单据界面", "title": "单据界面",
"key": "billDefineName", "key": "billDefineName",
"type": "String", "type": "String",
},{
 "isRequired": true,
"ref": "columnField",
"type": "Boolean",
"title": "展示工具栏",
"key": "showButtonGroup"
}] }]
}, },
"description": "", "description": "",
...@@ -1755,8 +1831,8 @@ export default { ...@@ -1755,8 +1831,8 @@ export default {
"type": "String", "type": "String",
},{ },{
"isRequired": false, "isRequired": false,
"title": "layerIds", "title": "type",
"key": "layerIds", "key": "type",
"type": "String", "type": "String",
}] }]
}, },
...@@ -1767,6 +1843,22 @@ export default { ...@@ -1767,6 +1843,22 @@ export default {
}, },
{ {
"discard": false, "discard": false,
"path": "林草报销/专用",
"extends": {
"param": [{
"isRequired": false,
"title": "请求路径ip地址",
"key": "ipAddress",
"type": "String",
}]
},
"description": "",
"title": "林草查看视图[lincaoReadView]",
"value": "lincaoReadView",
"alwaysUse":true
},
{
"discard": false,
"path": "资产/通用", "path": "资产/通用",
"extends": { "extends": {
"param": [{ "param": [{
...@@ -1966,6 +2058,18 @@ export default { ...@@ -1966,6 +2058,18 @@ export default {
"path": "资产/通用", "path": "资产/通用",
"extends": { "extends": {
"param": [ "param": [
]
},
"description": "",
"title": "验签[CW_verifySignature]",
"value": "CW_verifySignature",
"alwaysUse": true,
},
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
{ {
"ref": "BillClassVO.all", "ref": "BillClassVO.all",
"type": "field", "type": "field",
...@@ -2032,6 +2136,12 @@ export default { ...@@ -2032,6 +2136,12 @@ export default {
"type": "Boolean", "type": "Boolean",
"title": "启用预算控制", "title": "启用预算控制",
"key": "budgetcontrol" "key": "budgetcontrol"
},
{
"useSignature": false,
"type": "Boolean",
"title": "电子签章",
"key": "useSignature"
} }
] ]
}, },
...@@ -2254,6 +2364,45 @@ export default { ...@@ -2254,6 +2364,45 @@ export default {
"title": "通过code获取指定基础数据项", "title": "通过code获取指定基础数据项",
"value": "GetMDByCode" "value": "GetMDByCode"
}, },
{
"discard": false,
"path": "通用",
"extends": {
"info": {
"param": [
],
"name": "GetOwnProperty",
"description": "GetOwnProperty",
"title": "GetOwnProperty",
"return": 0
}
},
"description": "GetOwnProperty",
"title": "GetOwnProperty",
"value": "GetOwnProperty"
},
{
"discard": false,
"path": "通用",
"extends": {
"info": {
"param": [
],
"name": "GetMDByObjectcode",
"description": "GetMDByObjectcode",
"title": "GetMDByObjectcode",
"return": 0
}
},
"description": "GetMDByObjectcode",
"title": "GetMDByObjectcode",
"value": "GetMDByObjectcode"
},
{ {
"discard": false, "discard": false,
"path": "通用", "path": "通用",
...@@ -3353,6 +3502,41 @@ export default { ...@@ -3353,6 +3502,41 @@ export default {
{ {
"isOmitable": true, "isOmitable": true,
"dataType": 0, "dataType": 0,
"name": "field",
"title": "要判断的字段"
},
{
"isOmitable": true,
"dataType": 0,
"name": "field",
"title": "是否执行该公式的判断依据[是否需要]"
},
{
"isOmitable": true,
"dataType": 0,
"name": "string",
"title": "需要判断的判断条件[是否需要]"
}
],
"name": "CheckUnDuplicateSubField",
"description": "判段子表字段值是否重复",
"title": "判段子表字段值是否重复",
"return": 0
}
},
"description": "判段子表字段值是否重复",
"title": "判段子表字段值是否重复",
"value": "CheckUnDuplicateSubField"
},
{
"discard": false,
"path": "通用",
"extends": {
"info": {
"param": [
{
"isOmitable": true,
"dataType": 0,
"name": "_name", "name": "_name",
"title": "子表在主表列表中的表名" "title": "子表在主表列表中的表名"
} }
...@@ -4679,6 +4863,38 @@ export default { ...@@ -4679,6 +4863,38 @@ export default {
"discard": false, "discard": false,
"path": "通用", "path": "通用",
"extends": { "extends": {
"info": {
"param": [],
"name": "SetSubValueToMaster",
"description": "1.子表字段,2.赋值的主表字段",
"title": "从子表一个字段选一个值赋值到主表",
"return": 0
}
},
"description": "1.子表字段,2.赋值的主表字段",
"title": "从子表一个字段选一个值赋值到主表",
"value": "SetSubValueToMaster"
},
{
"discard": false,
"path": "通用",
"extends": {
"info": {
"param": [],
"name": "UnsafeApplyFunction",
"description": "1.context,2.其它参数",
"title": "执行js函数",
"return": 0
}
},
"description": "1.context,2.其它参数",
"title": "执行js函数",
"value": "UnsafeApplyFunction"
},
{
"discard": false,
"path": "通用",
"extends": {
"info": { "info": {
"param": [ "param": [
...@@ -4757,6 +4973,35 @@ export default { ...@@ -4757,6 +4973,35 @@ export default {
"title": "修改引用的回写金额公式,例如还款单引用借款单后需要修改借款单的剩余金额", "title": "修改引用的回写金额公式,例如还款单引用借款单后需要修改借款单的剩余金额",
"value": "UpdateBillMoneyFunction" "value": "UpdateBillMoneyFunction"
}, },
{
"discard": false,
"path": "通用",
"extends": {
"info": {
"param": [
{
"isOmitable": true,
"dataType": 0,
"name": "subField",
"title": "子表字段"
},
{
"isOmitable": true,
"dataType": 0,
"name": "value",
"title": "子表字段值"
}
],
"name": "SubTableSetData",
"description": "子表字段赋值",
"title": "子表字段赋值",
"return": 0
}
},
"description": "子表字段赋值",
"title": "子表字段赋值",
"value": "SubTableSetData"
},
], ],
dropdownOptionList: [ dropdownOptionList: [
{ {
......
// 判断子表某个字段值相同则提示不然保存前端公式
export default {
execute: function () {
let subTable = arguments[0][0].FieldTableCode
// 字段名
let subFieldCode = arguments[0][0].FieldCode
// bill
let context = arguments[1]
// 表所有字段
let tableObj = context.getTableType(subTable)
let dataFun = context.getSubData(tableObj.title)
if (dataFun.length > 1) {
for (let i = 0; i < dataFun.length; i++) {
let _data1 = dataFun[i].getData()
for (let j = i + 1; j < dataFun.length; j++) {
let _data2 = dataFun[j].getData()
const data1Val = typeof _data1[subFieldCode].value == 'object' ? _data1[subFieldCode].value.objectcode : _data1[subFieldCode].value
const data2Val = typeof _data2[subFieldCode].value == 'object' ? _data2[subFieldCode].value.objectcode : _data2[subFieldCode].value
if (data1Val !== data2Val) {
return false
}
}
}
return true
} else if (dataFun.length <= 1) {
return true
}else{
return true
}
},
getResultType:function(){
return FMR.ConstDataTypes.Bool;
}
}
\ No newline at end of file
...@@ -8,13 +8,7 @@ export default { ...@@ -8,13 +8,7 @@ export default {
if (arguments && arguments[0] && arguments[1]) { if (arguments && arguments[0] && arguments[1]) {
let context = arguments[1] let context = arguments[1]
let tableName = arguments[0][0].StaticValue let tableName = arguments[0][0].StaticValue
let data = context.getSubData(tableName) context.clearSubDatas(tableName)
let dataLength = data.length
if (data.length > 0) {
for (let i = 0; i < dataLength; i++) {
context.deleteSubData(tableName, 0,null)
}
}
} }
}, },
getResultType: function () { getResultType: function () {
......
...@@ -25,7 +25,7 @@ const formulaObject = { ...@@ -25,7 +25,7 @@ const formulaObject = {
'MdFilterByStartsWithFieldValue','MdFilterInfiniteValue','MdFilterOneToMulti', 'MdFilterByStartsWithFieldValue','MdFilterInfiniteValue','MdFilterOneToMulti',
'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne', 'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne',
'UpdateAccount','UpdateBillMoneyFunction','UpdateBillReferenceRelationshipFunction','UpdateBorrowMoneyState', 'UpdateAccount','UpdateBillMoneyFunction','UpdateBillReferenceRelationshipFunction','UpdateBorrowMoneyState',
'UpdateImageInfoRefState','UpdatePaymentState','UpdateRalationBillValueFunction','MdStringMultiFilter','GetYqddBaseDataWithGroupField'].forEach((name) => { 'UpdateImageInfoRefState','UpdatePaymentState','UpdateRalationBillValueFunction','MdStringMultiFilter','GetYqddBaseDataWithGroupField','ConvertMicrometer','UpdateBillMoneyByDifferenceFunction','UpdateBillMoneyByJKDFunction'].forEach((name) => {
formulaObject[name] = gen() formulaObject[name] = gen()
}) })
export default formulaObject export default formulaObject
\ No newline at end of file
// 通过code获取指定基础数据项(当前版本)
import { getValue } from './util'
export default {
execute: async function () {
if (arguments && arguments[0] && arguments[0][0] && arguments[0][1] && arguments[1]) {
let
tablename = arguments[0][0].StaticValue//基础数据表名
, mdcodeArg = arguments[0][1]//基础数据code
, context = arguments[1];
let mdcode = await getValue(mdcodeArg)
let mdObject = await this.getMDObject(tablename, mdcode);
return mdObject;
} else {
GAMS.Common.messagePrompt('GetMDByCode公式:参数配置有误');
return '';
}
},
getResultType: function () {
return FMR.ConstDataTypes.General;
},
// 获取基础数据
getMDObject(name, code) {
let param = {
"limit": 1,
"offset": 0,
"pagination": true,
"tableName": name,
"objectcode": code,//按code和name过滤
"queryDataStructure": "ALL"//返回的接口类型
}
return new Promise((resolve, reject) => {
let promise = GMS.$http.post("/baseData/data/list", param);
promise
.then((data) => {
if (data.data && data.data.rows && data.data.rows.length > 0) {
resolve(data.data.rows[0]);
} else {
resolve([]);
}
})
.catch((error) => {
resolve([]);
});
});
}
}
\ No newline at end of file
// 通过code前几位获取指定基础数据项(当前版本) // 通过code前几位获取指定基础数据项(当前版本)
import { getValue } from './util'
export default { export default {
execute:async function(){ execute:async function(){
console.log("通过code前几位获取指定基础数据项"); console.log("通过code前几位获取指定基础数据项");
...@@ -8,12 +10,7 @@ export default { ...@@ -8,12 +10,7 @@ export default {
,mdcodeArg = arguments[0][1]//基础数据code ,mdcodeArg = arguments[0][1]//基础数据code
,num =arguments[0][2].StaticValue ,num =arguments[0][2].StaticValue
,context = arguments[1]; ,context = arguments[1];
let mdcode = "" let mdcode = await getValue(mdcodeArg)
if(mdcodeArg instanceof BillDataNode){
mdcode = arguments[0][1].getResult().Value
}else if(mdcodeArg instanceof StaticDataNode ){
mdcode = arguments[0][1].StaticValue
}
let lastCode = mdcode.substring(0,Number(num)) let lastCode = mdcode.substring(0,Number(num))
let mdObject = await this.getMDObject(tablename,lastCode); let mdObject = await this.getMDObject(tablename,lastCode);
return mdObject; return mdObject;
......
import { getValue } from './util'
export default {
execute: async function () {
if (arguments && arguments[0] && arguments[0][0] && arguments[0][1] && arguments[1]) {
let
resultArg = arguments[0][0]
, key = arguments[0][1].StaticValue
, context = arguments[1];
let result = await getValue(resultArg)
if (!(typeof result == 'object')) return null
return result[key]
} else {
return '';
}
},
getResultType: function () {
return FMR.ConstDataTypes.General;
},
}
\ No newline at end of file
...@@ -35,9 +35,14 @@ export default { ...@@ -35,9 +35,14 @@ export default {
if (targetField instanceof BillDataNode) { if (targetField instanceof BillDataNode) {
let tableObj = bill.getTableType(targetField.FieldTableCode); let tableObj = bill.getTableType(targetField.FieldTableCode);
if (tableObj.type == "master") { if (tableObj.type == "master") {
let res = propName ? result[propName] : result
oldVal = targetField.dynamicNodeFactory.methodJson.GetFieldData('',targetFieldLink, '') oldVal = targetField.dynamicNodeFactory.methodJson.GetFieldData('',targetFieldLink, '')
if (recoverFlag == 1 || !oldVal) { if (oldVal instanceof Object && res instanceof Object && "id" in oldVal && "id" in res && oldVal.id === res.id ) {
targetField.dynamicNodeFactory.methodJson.SetFieldData('', targetFieldLink, propName ? result[propName] : result, '') // short circuit to avoid loop call
}else{
if (recoverFlag === 1 || !oldVal) {
targetField.dynamicNodeFactory.methodJson.SetFieldData('', targetFieldLink, res, '')
}
} }
} else { } else {
let _data = bill.getSubData(tableObj.title); let _data = bill.getSubData(tableObj.title);
...@@ -53,10 +58,7 @@ export default { ...@@ -53,10 +58,7 @@ export default {
} }
} }
// 刷新表格 // 刷新表格
if (!bill.isRefresh) { bill.refreshSubDataRow(tableObj.title)
bill.refreshSubDataRow(tableObj.title)
bill.isRefresh = true
}
} }
} }
} }
...@@ -65,4 +67,4 @@ export default { ...@@ -65,4 +67,4 @@ export default {
getResultType: function () { getResultType: function () {
return FMR.ConstDataTypes.General; return FMR.ConstDataTypes.General;
} }
} }
\ No newline at end of file
export default {
execute: async function ([originField, targetField, triggerFormula], context) {
console.log("主表字段赋值");
const subTable = context.getSubData(context.getTableType(originField.FieldTableCode).title)
triggerFormula = triggerFormula && triggerFormula.StaticValue
let originData = ''
if (subTable instanceof Array && subTable.length) {
originData = subTable[0].getValue(originField.FieldCode)
}
context.getMasterData().setValue(
targetField.FieldTableCode + '.' + targetField.FieldCode,
originData,
null,
triggerFormula ? 'all' : 'none'
)
return originData
},
getResultType: function () {
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
...@@ -28,10 +28,6 @@ export default { ...@@ -28,10 +28,6 @@ export default {
context.setSubFocus(oldIndex) context.setSubFocus(oldIndex)
} }
focusData[arguments[0][0].FieldCode]._field_old_value_ = focusData[arguments[0][0].FieldCode].value focusData[arguments[0][0].FieldCode]._field_old_value_ = focusData[arguments[0][0].FieldCode].value
// focusData.ZJ._field_old_value_ = focusData.ZJ.value
// focusData.RZRQ._field_old_value_ = focusData.RZRQ.value
// focusData.LDRQ._field_old_value_ = focusData.LDRQ.value
// targetSubField.dynamicNodeFactory.methodJson.SetFieldData('', linkId, data.cSontent, '')
focusData[targetSubField.FieldCode]._field_old_value_ = focusData[targetSubField.FieldCode].value = data.rows[0] focusData[targetSubField.FieldCode]._field_old_value_ = focusData[targetSubField.FieldCode].value = data.rows[0]
if (oldIndex !== newIndex) { if (oldIndex !== newIndex) {
context.setSubFocus(newIndex) context.setSubFocus(newIndex)
......
// 子表中字段赋值
export default {
execute: async function () {
console.log("子表中字段赋值");
let result = ''
//根据SetDefaultValue和SubTableSetBaseData写的,能实现目前遇到的问题
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
let context = arguments[1]
let targetSubField = arguments[0][0]
let sourceValueField = arguments[0][1]
let triggerFormula = false
if (arguments[0][2] && arguments[0][2].StaticValue) {
triggerFormula = true
}
if (sourceValueField instanceof FunctionNode) {
let funcResult = sourceValueField.getResult()
if(funcResult instanceof AbstractData) {
await funcResult.Value.then(res => {
result = res
})
}
} else if (sourceValueField instanceof BillDataNode) {
let tableObj = bill.getTableType(sourceValueField.FieldTableCode);
if (tableObj.type == "sub") {
} else {
result = sourceValueField.dynamicNodeFactory.methodJson.GetFieldData('', sourceValueField.FieldTableCode + "." + sourceValueField.FieldCode, '')
}
} else if (sourceValueField instanceof StaticDataNode) {
result = sourceValueField.StaticValue
}
let subTableObject = context.getTableType(targetSubField.FieldTableCode)
let oldIndex = context.getSubFocus()
context.getAllSubData()[subTableObject.title][oldIndex].setValue(
targetSubField.FieldTableCode + '.' + targetSubField.FieldCode,
result,
null,
triggerFormula ? 'all' : 'none'
)
context.refreshSubDataRow(subTableObject.title);
}
return result
},
getResultType: function () {
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
import * as util from './util'
export default {
execute: function ([functionString, ...args], context) {
return Function('"use strict";return (' + functionString.StaticValue + ')')()(
{ context, util }, ...args
)
},
getResultType: function () {
return FMR.ConstDataTypes.General;
}
}
export async function getValue(obj) {
let result = ''
if (obj instanceof FunctionNode) {
let funcResult = obj.getResult()
if (funcResult instanceof AbstractData) {
result = await funcResult.Value
}
}
else if (obj instanceof BillDataNode) {
result = obj.getResult().Value
}
else if (obj instanceof StaticDataNode) {
result = obj.StaticValue
}
return result
}
...@@ -40,6 +40,9 @@ import relateInvoiceAction from './actions/relateInvoiceAction.js' ...@@ -40,6 +40,9 @@ import relateInvoiceAction from './actions/relateInvoiceAction.js'
import deleteInvoiceAction from './actions/deleteInvoiceAction.js' import deleteInvoiceAction from './actions/deleteInvoiceAction.js'
import saveActionBXD from './actions/saveActionBXD'; import saveActionBXD from './actions/saveActionBXD';
import lincaoAddView from './actions/lincaoAddView'; import lincaoAddView from './actions/lincaoAddView';
import CW_verifySignature from './actions/verifySignature';
import lincaoReadView from './actions/lincaoReadView';
//queryAction //queryAction
import leafletGenerationAction from './query-actions/leafletGenerationAction.js' import leafletGenerationAction from './query-actions/leafletGenerationAction.js'
import leafletGenerationTYAction from './query-actions/leafletGenerationTYAction.js' import leafletGenerationTYAction from './query-actions/leafletGenerationTYAction.js'
...@@ -70,6 +73,7 @@ import applyDetail from './control/applyDetail'; ...@@ -70,6 +73,7 @@ import applyDetail from './control/applyDetail';
import linkShowDetail from './control/linkShowDetail'; import linkShowDetail from './control/linkShowDetail';
import ApprovalUserControl from './control/approval-user-control/approval-user-control.vue' import ApprovalUserControl from './control/approval-user-control/approval-user-control.vue'
import WorkflowTrack from './control/workflow-track.vue' import WorkflowTrack from './control/workflow-track.vue'
import SignatureList from './control/signature-list.vue'
import buttonGroupControl from './control/buttonGrouop' import buttonGroupControl from './control/buttonGrouop'
import rbcBasedataTree from './control/baseDataSelect/index.vue' import rbcBasedataTree from './control/baseDataSelect/index.vue'
import newsDetail from './components-control/news-detail.vue' import newsDetail from './components-control/news-detail.vue'
...@@ -78,6 +82,8 @@ import userSelectControl from './control/userSelect.vue' ...@@ -78,6 +82,8 @@ import userSelectControl from './control/userSelect.vue'
import integerControl from './control/integerControl.vue' import integerControl from './control/integerControl.vue'
import IntroduceInputControl from './control/IntroduceInputControl.vue' import IntroduceInputControl from './control/IntroduceInputControl.vue'
import InputModalControl from './control/InputModalControl.vue' import InputModalControl from './control/InputModalControl.vue'
import TabContainer from './control/tab-container/tab-container.vue'
import Achievements from './control/vxe-achievements/achievements.vue'
import VxeSubjectControl from './control/vxeTableExpand/VxeSubjectControl.js' import VxeSubjectControl from './control/vxeTableExpand/VxeSubjectControl.js'
//formula //formula
...@@ -114,6 +120,7 @@ import PhoneCheck from './formula/PhoneCheck' ...@@ -114,6 +120,7 @@ import PhoneCheck from './formula/PhoneCheck'
import IDCardCheck from './formula/IDCardCheck' import IDCardCheck from './formula/IDCardCheck'
import LenFunction from './formula/LenFunction' import LenFunction from './formula/LenFunction'
import CheckDuplicateSubField from './formula/CheckDuplicateSubField' import CheckDuplicateSubField from './formula/CheckDuplicateSubField'
import CheckUnDuplicateSubField from './formula/CheckUnDuplicateSubField'
import ClearSubData from './formula/ClearSubData' import ClearSubData from './formula/ClearSubData'
import DateOpera from './formula/DateOpera' import DateOpera from './formula/DateOpera'
import GetSubStandard from './formula/GetSubStandard' import GetSubStandard from './formula/GetSubStandard'
...@@ -161,6 +168,11 @@ import ApplyTemplateString from "@/formula/ApplyTemplateString" ...@@ -161,6 +168,11 @@ import ApplyTemplateString from "@/formula/ApplyTemplateString"
import AmountComp from "./formula/AmountComp"; import AmountComp from "./formula/AmountComp";
import SubTableHasContainField from "./formula/SubTableHasContainField"; import SubTableHasContainField from "./formula/SubTableHasContainField";
import SetSubFieldsByBaseData from "./formula/SetSubFieldsByBaseData"; import SetSubFieldsByBaseData from "./formula/SetSubFieldsByBaseData";
import SubTableSetData from "./formula/SubTableSetData";
import GetOwnProperty from "./formula/GetOwnProperty";
import GetMDByObjectcode from "./formula/GetMDByObjectcode";
import SetSubValueToMaster from "./formula/SetSubValueToMaster";
import UnsafeApplyFunction from "./formula/UnsafeApplyFunction";
export default { export default {
actions: { actions: {
updateFieldAction, updateFieldAction,
...@@ -195,6 +207,7 @@ export default { ...@@ -195,6 +207,7 @@ export default {
simpleAdvanceDeleteAction, simpleAdvanceDeleteAction,
queryDeleteBill, queryDeleteBill,
lincaoAddView, lincaoAddView,
lincaoReadView,
openNewPageDetail openNewPageDetail
}, },
billAction: { billAction: {
...@@ -237,7 +250,8 @@ export default { ...@@ -237,7 +250,8 @@ export default {
CW_submitAction, CW_submitAction,
CW_closeAction, CW_closeAction,
CW_imageView, CW_imageView,
saveActionBXD saveActionBXD,
CW_verifySignature,
}, },
billControl: { billControl: {
applyDetail, applyDetail,
...@@ -245,11 +259,14 @@ export default { ...@@ -245,11 +259,14 @@ export default {
buttonGroupControl, buttonGroupControl,
ApprovalUserControl, ApprovalUserControl,
WorkflowTrack, WorkflowTrack,
SignatureList,
rbcBasedataTree, rbcBasedataTree,
userSelectControl, userSelectControl,
integerControl, integerControl,
IntroduceInputControl, IntroduceInputControl,
InputModalControl, InputModalControl,
TabContainer,
Achievements,
VxeSubjectControl VxeSubjectControl
}, },
formula: { formula: {
...@@ -290,6 +307,7 @@ export default { ...@@ -290,6 +307,7 @@ export default {
IDCardCheck, IDCardCheck,
LenFunction, LenFunction,
CheckDuplicateSubField, CheckDuplicateSubField,
CheckUnDuplicateSubField,
DateOpera, DateOpera,
ClearSubData, ClearSubData,
GetSubStandard, GetSubStandard,
...@@ -323,7 +341,12 @@ export default { ...@@ -323,7 +341,12 @@ export default {
AmountComp, AmountComp,
SubTableHasContainField, SubTableHasContainField,
ApplyTemplateString, ApplyTemplateString,
...GeneralImportFile SubTableSetData,
GetMDByObjectcode,
GetOwnProperty,
SetSubValueToMaster,
UnsafeApplyFunction,
...GeneralImportFile,
}, },
routes : { routes : {
showPrint: { showPrint: {
......
import mcon from './mcon'; import mcon from './mcon';
import emcon from './emcon'; import emcon from './emcon';
import { loadScript } from './utils'
import '@rbc/icon/iconfont' import '@rbc/icon/iconfont'
import '@rbc/icon/iconfont.css' import '@rbc/icon/iconfont.css'
import '@rbc/icon/icon.css' import '@rbc/icon/icon.css'
...@@ -8,6 +9,27 @@ import '@yhs/icon/iconfont.css' ...@@ -8,6 +9,27 @@ import '@yhs/icon/iconfont.css'
import '@yhs/icon/iconfont.js' import '@yhs/icon/iconfont.js'
import '@yhs/icon/icon.css' import '@yhs/icon/icon.css'
(function() {
if (window.__rcb_bjcawebsign__) return
window.__rcb_bjcawebsign__ = true
const fileList = [
'BJCAWebSign.js',
'config.js',
'BJCAWebSignCallback.js',
'DragSeal.js',
'PopMenu.js',
'clientSealSync.js',
'ASAppComSync.js',
]
const promiseList = fileList.map((fileName) => {
const url = `/output/@gms/gms-plugin-billexpand/public/${fileName}`
return loadScript(url)
})
Promise.all(promiseList).then(() => {
BWS_InitSync()
})
})()
export default { export default {
install: function(){ install: function(){
......
...@@ -15,4 +15,35 @@ textarea { ...@@ -15,4 +15,35 @@ textarea {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ivu-message {
z-index: 9999 !important;
}
//element 样式修改 //element 样式修改
.el-message-box__wrapper {
.el-message-box {
border-radius: 6px;
.el-message-box__btns {
.el-button {
font-size: 14px;
border-color: transparent;
&:hover {
text-decoration: none;
color: #005791;
border-color: transparent;
background-color: white;
}
}
.el-button--primary {
background-color: #005791;
border-color: #005791;
&:hover {
text-decoration: none;
color: white;
border-color: #005791;
background-color: #005791;
}
}
}
}
}
import {
SIGNATURE_TABLE_NAME,
BILL_GLOBAL_PARAM,
SIGNATURE_TABLE
} from './constant'
/** /**
* 请求基础数据 * 请求基础数据
* @param {string} tableName 基础数据表名 * @param {string} tableName 基础数据表名
...@@ -30,4 +36,69 @@ export const getBaseData = (tableName, param = {}) => { ...@@ -30,4 +36,69 @@ export const getBaseData = (tableName, param = {}) => {
const result = res && res.data || {} const result = res && res.data || {}
return result return result
}) })
} }
\ No newline at end of file
/**
* 从bill中根据字段列表取值,拼字符串
*/
export const getValueListString = (bill) => {
let list = bill.getGlobalParam(BILL_GLOBAL_PARAM.SIGNATURE_FIELDS)
const signatureTable = bill.getSubData(SIGNATURE_TABLE_NAME)
if (signatureTable instanceof Array && signatureTable.length) {
list = JSON.parse(signatureTable[0].getValue(SIGNATURE_TABLE.PROTECT_FIELDS))
}
const isDateType = (fieldName, tableType) => {
for (let attribute of tableType.attributes) {
if (attribute.name == fieldName) {
return attribute.type && attribute.type.name == 'bcp.type.datetime'
}
}
return false
}
const getValue = (v, isDateType) => {
if (isDateType) return (new Date(v)).getTime()
if (typeof v == 'object' && !Object.is(v, null)) {
return v.code
}
return v
}
const strList = []
for (let field of list) {
const [tableName, fieldName] = field.field.split('.')
const tableType = bill.getTableType(tableName)
if (tableType.type == 'master') {
strList.push(
`${field.field}|${getValue(
bill.getMasterData().getValue(fieldName),
isDateType(fieldName, tableType)
)}`
)
}
else {
const subTableObj = bill.getSubData(tableType.title)
if (!(subTableObj instanceof Array)) continue
subTableObj.forEach((o) => {
strList.push(
`${field.field}|${getValue(
o.getValue(fieldName),
isDateType(fieldName, tableType)
)}`
)
})
}
}
return strList.join(';')
}
export const loadScript = (url) => {
return new Promise((resolve) => {
const scriptElement = document.createElement('script')
scriptElement.onload = resolve
scriptElement.src = url
document.head.appendChild(scriptElement)
})
}
<template>
<div>
<Card title="电子签章" :padding="0" shadow style="margin: 4px">
<Checkbox slot="extra" v-model="useSignature"></Checkbox>
</Card>
</div>
</template>
<script>
export default {
props: {
currentNode: {
type: Object,
required: true,
},
},
data() {
return {
useSignature: false,
};
},
watch: {
useSignature(val) {
this.currentNode.properties.useSignature = val
},
currentNode: {
deep: true,
handler(newValue, oldValue) {
this.$emit("property-change", newValue);
this.initData();
},
},
},
mounted() {
this.initData();
},
methods: {
initData() {
if (!this.currentNode.hasOwnProperty("properties")) {
this.currentNode.properties = new Object();
}
this.useSignature = this.currentNode.properties.useSignature
},
},
};
</script>
<style>
.tablecell {
height: 30px;
display: table-cell;
border: #e8e8e8 1px solid;
vertical-align: middle;
text-align: center;
}
</style>
\ No newline at end of file
...@@ -2,6 +2,7 @@ import UserParticipant from './actions/components/user-participant.vue' ...@@ -2,6 +2,7 @@ import UserParticipant from './actions/components/user-participant.vue'
import Leadership from './actions/components/leadership-participant.vue' import Leadership from './actions/components/leadership-participant.vue'
import RoleParticipant from './actions/components/role-participant.vue' import RoleParticipant from './actions/components/role-participant.vue'
import SelectApprover from './control/select-approver.vue' import SelectApprover from './control/select-approver.vue'
import UseSignature from './control/use-signature.vue'
import AutoTask from './control/autotask.vue' import AutoTask from './control/autotask.vue'
import EditableAttr from './control/editable-attr.vue' import EditableAttr from './control/editable-attr.vue'
...@@ -11,6 +12,7 @@ export default { ...@@ -11,6 +12,7 @@ export default {
SelectApprover, SelectApprover,
AutoTask, AutoTask,
EditableAttr, EditableAttr,
UseSignature,
}, },
EventPanel: {}, EventPanel: {},
ParticipantStrategyComponents: { ParticipantStrategyComponents: {
......
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
:disabled="disabled" :disabled="disabled"
true-value="1" true-value="1"
false-value="0" false-value="0"
></Checkbox> >未使用工作流控制单据流程的项目使用,更新预算状态</Checkbox>
</FormItem> </FormItem>
</i-col> </i-col>
</Row> </Row>
...@@ -374,7 +374,7 @@ export default { ...@@ -374,7 +374,7 @@ export default {
data() { data() {
return { return {
toolbarButtons: [ toolbarButtons: [
{ {
key: 'create', key: 'create',
name: '新建', name: '新建',
icon: "xinjian", icon: "xinjian",
...@@ -911,4 +911,4 @@ export default { ...@@ -911,4 +911,4 @@ export default {
// } // }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="string" v-if="initData.dataType == 'STRING'"> <div class="string" v-if="initData.dataType == 'STRING'">
<div class="numberItem" :style="`paddingLeft:${initData.labelWidth}px`"> <div class="numberItem" :style="`paddingLeft:${initData.labelWidth}px`">
<div class="title" :style="`width:${initData.labelWidth}px`">{{ initData.title }}</div> <div class="title" :style="`width:${initData.labelWidth}px`">{{ initData.title }}</div>
<div <!-- <div
class="noChecked" class="noChecked"
:class="{ checked: numHasAll == numLocationIndex }" :class="{ checked: numHasAll == numLocationIndex }"
v-if="initData.config.hasAll" v-if="initData.config.hasAll"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:key="index" :key="index"
:class="{ checked: numLocationIndex == index }" :class="{ checked: numLocationIndex == index }"
@click="numChose(index)" @click="numChose(index)"
>{{ val.title }}</div> >{{ val.title }}</div> -->
<div class="custom" v-if="initData.config.custom"> <div class="custom" v-if="initData.config.custom">
<Input <Input
:placeholder="'请输入起始段' + initData.title" :placeholder="'请输入起始段' + initData.title"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="number" v-if="initData.dataType == 'NUMBER'"> <div class="number" v-if="initData.dataType == 'NUMBER'">
<div class="numberItem" :style="`paddingLeft:${initData.labelWidth}px`"> <div class="numberItem" :style="`paddingLeft:${initData.labelWidth}px`">
<div class="title" :style="`width:${initData.labelWidth}px`">{{ initData.title }}</div> <div class="title" :style="`width:${initData.labelWidth}px`">{{ initData.title }}</div>
<div <!-- <div
class="noChecked" class="noChecked"
:class="{ checked: numHasAll == numLocationIndex }" :class="{ checked: numHasAll == numLocationIndex }"
v-if="initData.config.hasAll" v-if="initData.config.hasAll"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
:key="index" :key="index"
:class="{ checked: numLocationIndex == index }" :class="{ checked: numLocationIndex == index }"
@click="numChose(index)" @click="numChose(index)"
>{{ val.title }}</div> >{{ val.title }}</div> -->
<div class="custom" v-if="initData.config.custom"> <div class="custom" v-if="initData.config.custom">
<div <div
class="isHavePrecision" class="isHavePrecision"
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
:transfer="transfer" :transfer="transfer"
placeholder="请选择日期范围" placeholder="请选择日期范围"
style="width: 100%" style="width: 100%"
:editable="editable"
@on-change="getBeginAndEndDate" @on-change="getBeginAndEndDate"
@on-open-change="getTitle(initData.title)" @on-open-change="getTitle(initData.title)"
/> />
...@@ -132,6 +133,7 @@ export default { ...@@ -132,6 +133,7 @@ export default {
name: "rangeQuery", name: "rangeQuery",
data() { data() {
return { return {
editable:false,
min: 0, min: 0,
changeColor: "blue", changeColor: "blue",
transfer: true, transfer: true,
......
...@@ -101,65 +101,65 @@ ...@@ -101,65 +101,65 @@
}, },
{ {
"name": "gms-plugin-billexpand", "name": "gms-plugin-billexpand",
"version": "latest" "version": "0.0.9"
}, },
{ {
"name": "gms-plugin-mainpage-reimburseBill", "name": "gms-plugin-mainpage-reimburseBill",
"version": "latest" "version": "0.0.3"
}, },
{ {
"name": "gms-plugin-mainpage-reimburseExpense", "name": "gms-plugin-mainpage-reimburseExpense",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "gms-plugin-mainpage-fileList", "name": "gms-plugin-mainpage-fileList",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "gms-plugin-mainpage-newsList", "name": "gms-plugin-mainpage-newsList",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "gms-plugin-mainpage-feedback", "name": "gms-plugin-mainpage-feedback",
"version": "latest" "version": "0.0.1"
}, },
{ {
"name": "gms-plugin-workflow", "name": "gms-plugin-workflow",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "gms-plugin-mainpage-workflowcard", "name": "gms-plugin-mainpage-workflowcard",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "gms-plugin-mainpage-mybill", "name": "gms-plugin-mainpage-mybill",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "gms-plugin-mainpage-commonfunctions", "name": "gms-plugin-mainpage-commonfunctions",
"version": "latest" "version": "0.0.2"
} }
], ],
"@rbc":[ "@rbc":[
{ {
"name": "control-strategy", "name": "control-strategy",
"version": "latest" "version": "0.1.0"
}, },
{ {
"name": "voucher-center", "name": "voucher-center",
"version": "latest" "version": "0.1.0"
}, },
{ {
"name": "file-management", "name": "file-management",
"version": "latest" "version": "0.1.0"
}, },
{ {
"name": "workflow-job-view", "name": "workflow-job-view",
"version": "latest" "version": "1.1.0--SNAPSHOT"
}, },
{ {
"name": "runner-bill-form", "name": "runner-bill-form",
"version": "latest" "version": "0.0.2"
}, },
{ {
"name": "icon", "name": "icon",
...@@ -167,19 +167,19 @@ ...@@ -167,19 +167,19 @@
}, },
{ {
"name":"bill-runner-query", "name":"bill-runner-query",
"version": "latest" "version": "0.0.1"
}, },
{ {
"name": "welcome-page", "name": "welcome-page",
"version": "latest" "version": "1.1.0--SNAPSHOT"
}, },
{ {
"name": "rbc-news", "name": "rbc-news",
"version": "latest" "version": "0.0.1"
}, },
{ {
"name": "invoice", "name": "invoice",
"version": "latest" "version": "1.1.0--SNAPSHOT"
} }
] ]
} }
......
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