Commit 7a2b77bd by qiaozhi

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

parents 1996bcfc 95c7f5ce
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-unused-vars': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/no-unused-components': 'off',
'vue/no-side-effects-in-computed-properties': 'off',
// 'vue/require-v-for-key': 'off',
'vue/no-unused-vars': 'off',
'no-prototype-builtins': 'off',
'no-extra-semi': 'off',
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "@gms/gms-plugin-billexpand",
"version": "0.0.8",
"version": "0.0.9",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
......@@ -9,6 +9,8 @@
},
"dependencies": {
"@rbc/icon": "^0.0.1",
"@yhs/components": "^1.1.0-SNAPSHOT",
"@yhs/icon": "^1.1.0-SNAPSHOT",
"core-js": "^3.6.5",
"currency.js": "^1.2.2",
"element-ui": "^2.15.6",
......@@ -27,6 +29,7 @@
},
"files": [
"dist",
"public",
"src",
"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 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 (!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('请配置审批轨迹')
return
}
......@@ -39,7 +46,9 @@ export default {
title: "信息提示",
content: "信息发生变化, 是否保存",
onOk: () => {
this.saveLogical(bill, param, {data: bill.getBuillData(), detailData: []}, this)
saveBill(bill, param).then(() => {
this.approvalLogical(bill, param)
})
},
onCancel: () => {
}
......@@ -56,44 +65,19 @@ export default {
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) {
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)
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
......@@ -128,17 +112,12 @@ export default {
)
},
onOk: () => {
window.GMS.$http.post(
'/bpm/bill/selectApprover/addApprovers',
{
...nodeData,
approvers: selectedApprovers,
}
).then(() => {
this.executeApproval(bill, param)
}).catch(() => {
GMS.$hideContainer.$Message.error('选择审批人发生错误')
const data = JSON.stringify({
...nodeData,
approvers: selectedApprovers,
})
setApprover(data)
this.executeApproval(bill, param)
},
onCancel: () => {
}
......@@ -170,48 +149,80 @@ export default {
}
},
executeApproval: function(bill, param) {
let taskId = bill.getGlobalParam('reviewParam').taskId;
let comments = bill.getGlobalParam('reviewParam').suggestions ? bill.getGlobalParam('reviewParam').suggestions : "";
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) {
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
: '';
if (!comments) {
comments = '同意'
bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT, {
taskId,
suggestions: comments
})
}
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)
GMS.$hideContainer.$Message.error('工作流配置错误,请联系管理员')
}.bind(this)
);
})
}
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('reviewParam').taskId}`,
url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId}`,
async: false,
contentType: "application/json;",
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'
export default {
execute: function (bill, param) {
// if (param.param.ipAddress && param.param.layerIds && bill.dom.billdata.JBR) {
GMS.$hideContainer.addComponent(lincaoView, {}, function (c) {
debugger
c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=${nros.getUser().loginUnit}&layerIds=${param.param.layerIds}&projectNum=${bill.dom.billdata.JBR}`
let name = GMS.$hideContainer.addComponent(lincaoView, {}, function (c) {
const year = nros.getUser().loginDate.substring(0,4)
const unitCode = nros.getUser().loginUnit
c.bill = bill.dom
const projectNum = bill.dom.getMasterData().getData().billCode.value
c.url =`http://${param.param.ipAddress}/jq/addAssociateDatas.do?unitCode=${unitCode}&type=${param.param.type}&projectNum=${projectNum}&year=${year}`
c.name = name
c.modalShow = true;
})
// } else {
......
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 { verifyBill } from './util'
export default {
execute: function (bill, param) {
if (param) {
if (!verifyBill(bill)) {
GMS.$hideContainer.$Message.error('验签失败')
return
}
GMS.$hideContainer.addComponent(printBill, {}, function (c) {
c.billId = bill.getMasterData().getValue('id');
c.billDefineName = param.define;
......
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");
......@@ -17,7 +20,9 @@ export default {
title: "信息提示",
content: "信息发生变化, 是否保存",
onOk: () => {
this.saveLogical(bill, param, {data: bill.getBuillData(), detailData: []}, this)
saveBill(bill, param).then(() => {
this.approvalLogical(bill, param)
})
},
onCancel: () => {
}
......@@ -45,72 +50,71 @@ export default {
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){
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('请配置审批轨迹')
return
}
let taskId = bill.getGlobalParam('reviewParam').taskId;
let comments = bill.getGlobalParam('reviewParam').suggestions ? bill.getGlobalParam('reviewParam').suggestions:"";
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=3&comments='+comments).then(
if (
!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT)
|| !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
) {
GMS.$hideContainer.$Message.error('请输入审批意见')
bill.setControlsSate(param["_control_name_"], "enable", true)
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')
if (response.status == 200 || response.statusText == 'OK') {
if (response.data.code != 0) {
GMS.$hideContainer.$Message.error(response.data.message)
return
}
}.bind(this)
)
.catch(
function(error) {
bill.setControlsSate(param["_control_name_"], "enable", true)
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)
);
);
})
},
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('reviewParam').taskId}`,
url: `${osConfig.baseUrl}/rbc/workflow/confirmApprover/getUserId/${bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId}`,
async: false,
contentType: "application/json;",
beforeSend: function (request) {
......
......@@ -31,7 +31,7 @@ export default {
c.subBillData = obj.BILLDETAILOBJ;
c.modal_visible = true;
c.state = 'readOnly'
c.hideButtonGroup = true
c.hideButtonGroup = param.param.showButtonGroup? false: true;
c.$nextTick(()=>{
component.addListener({
close: function() {
......
......@@ -12,7 +12,7 @@ export default {
c.bill = bill;
c.isReadOnly = true;
c.state = 'readOnly';
c.hideButtonGroup = true;
c.hideButtonGroup = param.param.showButtonGroup? false: true;
let tableName = null;
if(param.param && param.param.tableName){
tableName = param.param.tableName
......
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) {
......@@ -71,38 +73,54 @@ export default {
submitExecute(bill, param){
if (bill) {
bill.setControlsSate(param["_control_name_"], 'enable', false)
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)
})
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('缺少参数');
......
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 {
return {
isReadOnly: false,
showDetail: false,
state: null,
state: '',
billId: "",
modal_visible: false,
showBiffForm: false,
......@@ -231,7 +231,13 @@ export default {
}, 100);
},
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(
(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
......@@ -2,7 +2,7 @@
<div class="news-container">
<div class="news-detail">
<div class="detail-title">{{title}}</div>
<div class="detail-description">摘要:{{description}} &nbsp&nbsp&nbsp&nbsp 时间:{{time}}</div>
<div class="detail-description">摘要:{{description}} &nbsp;&nbsp;&nbsp;&nbsp; 时间:{{time}}</div>
<div class="detail-content" v-html="content"></div>
</div>
</div>
......
......@@ -89,7 +89,12 @@ export default {
}, 0);
return
}
const workflowState = bill.getMasterData().getValue('billState')
// 给bill设置默认值
let defaultValueList = this.defaultValueList || []
for(let item of defaultValueList){
bill.getMasterData().setValue(item.field,item.defaultValue)
}
const workflowState = bill.getMasterData().getValue('billState') // setV
let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑
if (this.state != 'readOnly' && readArr.includes(workflowState)) {
this.state = 'readOnly';
......@@ -102,7 +107,7 @@ export default {
setTimeout(() => {
that.billClass = bill;
GMS.oldBillData = bill.getBuillData();
that.oldBillData = bill.getBuillData();
that.oldBillData = bill.getBuillData(); // 单据整体对象
}, 100);
},
handleCancel() {
......
import { SIGNATURE_TABLE_NAME } from '../../constant'
function convertDate(date) {
if (typeof date === "number") {
return date;
......@@ -9,7 +11,10 @@ function convertDate(date) {
}
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) {
if (i.endsWith("RQ") || i.endsWith("Time") || i.endsWith("SJ")) {
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',
}
<template>
<div class="input-control-wrapper">
<Input
v-if="vifValue && !isContent && controlDisplay"
ref="setfocus"
v-show="vshowValue"
style="width: 100%"
v-model="value"
:placeholder="define.config.placeholder"
:type="define.config.inputType || 'text'"
:disabled="state == 'readOnly'"
@on-blur="inputBlur"
@on-focus="inputFocus"
></Input>
<div v-if="isContent && controlDisplay">
{{ getValue() }}
</div>
<Modal v-model="modal" :title="define.title" :mask-closable="false">
<div class="input-modal">
<Input
v-model="areaValue"
type="textarea"
:autosize="{ minRows: 4, maxRows: 10 }"
/>
</div>
<div slot="footer">
<Button @click="cancel">取消</Button>
<Button type="primary" @click="handleSubmit">确定</Button>
</div>
</Modal>
</div>
</template>
<script>
import input from "./util/bc_input.js";
export default {
mixins: [input],
data() {
return {
modal: false,
areaValue: "",
};
},
mounted() {
if (this.tableStyle) {
this.$nextTick(() => {
this.$refs.setfocus && this.$refs.setfocus.focus();
});
}
},
methods: {
cancel() {
this.areaValue = this.value;
this.modal = false;
},
/*
弹框点击确认
1.弹框数据传回input
2.关闭弹框
3.更新数据到上下文
*/
handleSubmit() {
this.value = this.areaValue;
this.modal = false;
this.onBlur();
},
inputBlur() {},
inputFocus() {
this.areaValue = this.value;
this.modal = true;
},
},
};
</script>
<style lang="less" scoped>
@import "./style/dynamic-from-common.less";
/deep/ .ivu-input {
text-overflow: ellipsis;
}
.input-modal {
max-height: calc(100vh - 20vh - 100px);
}
</style>
<template>
<div @click.stop="canGoDetail ? goDetail() : ''" :class="{ 'can-go-detail':canGoDetail }">
<Input
v-if="vifValue && !isContent && controlDisplay"
ref="setfocus"
v-show="vshowValue"
style="width: 100%"
v-model="value"
:rows="define.config.maxRows"
:placeholder="define.config.placeholder"
:maxlength="computedDefinition.length"
:type="define.config.inputType || 'text'"
:readonly="true"
clearable
@on-blur="onBlur"
>
<Icon
type="ios-menu"
slot="suffix"
style="cursor: point"
@click.stop="executeAction"
v-if="isShowIcon"
/>
</Input>
<div v-if="isContent && controlDisplay">
{{ getValue() }}
</div>
</div>
</template>
<script>
import bc_input from "./util/bc_input.js";
function validateNull(val) {
if (val instanceof Array) {
if (val.length === 0) {
return true;
}
} else if (val instanceof Object) {
if (JSON.stringify(val) === "{}") {
return true;
}
} else {
if (
val === "null" ||
val === null ||
val === "undefined" ||
val === undefined ||
val === ""
) {
return true;
}
return false;
}
return false;
}
export default {
mixins: [bc_input],
data() {
return {
value: "",
};
},
computed: {
button() {
const define = this.define;
const button =
(define.slots &&
define.slots.children &&
define.slots.children.elements &&
define.slots.children.elements[0]) ||
{};
return button;
},
isShowIcon() {
return !validateNull(this.button);
},
canGoDetail() {
return !!this.value;
},
computedDefinition() {
const MAX_LENGTH = 255;
const PRECISION = 19;
const SCALE = 6;
const field = this.define.config.field;
const [tableName, fieldName] = field.split(".");
const tableType = this.context.bill.getTableType(tableName);
const maxLength = Math.min(
this.define.config.maxlength || MAX_LENGTH,
MAX_LENGTH
);
const precision = Math.min(
this.define.config.precision || PRECISION,
PRECISION
);
const scale = Math.min(this.define.config.scale || SCALE, SCALE);
let curDefinition = {};
let flag = false;
const getColumnDefinition = (attr) => {
let obj = {};
for (let annotation of attr.annotations) {
if (annotation.type == "javax.persistence.Column") {
obj = { ...annotation.values };
} else if (annotation.type == "org.hibernate.annotations.Type") {
if (annotation.values.type == "text") {
flag = true;
}
}
}
return obj;
};
for (let attribute of tableType.attributes) {
if (attribute.name == fieldName) {
curDefinition = { ...getColumnDefinition(attribute) };
}
}
curDefinition = {
...curDefinition,
length: flag
? 1e5
: Math.min(maxLength, curDefinition.length || MAX_LENGTH),
precision: Math.min(precision, curDefinition.precision || PRECISION),
scale: Math.min(scale, curDefinition.scale || SCALE),
};
return curDefinition;
},
getInputStyle() {
let style = {};
this.getTextAlign(style);
this.getTextColor(style);
this.getInputHeight(style);
this.getInputWidth(style);
return style;
},
},
methods: {
goDetail() {
let param = this.context.bill.getActionParam(this.button.config.action);
if(!param || !param.param) return
let defineName = param.param.billDefine && param.param.billDefine[0]
let templateName = param.param.templateName
const datasource = 'querysource.' + templateName.split('.')[1]
const postBody = {"datasource": datasource,"page":{"pageNum":1,"size":20000},"groupBy":[],"orders":[],"queryFields":["id","单据编号"],"conditions":[{"type":"UNDEFINED"}]}
GMS.$http.post("/bcp/query/advance/query", postBody).then((res) => {
const data = res.data.rows
let map = {}
data.forEach(d=>{
map[d['单据编号']] = d.id
})
let id = map[this.value]
let a = "/showBillForm/" + defineName + "_E/" + id;
let routeData = GMS.routerManager.getRouter().resolve({
path: a,
query:{
params:"{'isEdit':true}"
}
});
window.open(routeData.href, "_blank");
});
},
executeAction() {
this.context.bill.executeAction(this.button.config.action);
},
},
};
</script>
<style lang="less" scoped>
.input-height {
/deep/.ivu-input-default {
height: 100%;
}
}
.input-center {
/deep/.ivu-input-default {
text-align: center;
}
}
.input-left {
/deep/.ivu-input-default {
text-align: left;
}
}
.input-right {
/deep/.ivu-input-default {
text-align: right;
}
}
.input-control-wrapper {
display: inline-block;
width: 100%;
position: relative;
}
.can-go-detail {
/deep/ .ivu-input {
cursor: pointer;
}
}
/deep/ .ivu-input-suffix{
cursor: pointer;
}
/deep/ .ivu-input{
background:#f3f3f3!important;
}
</style>
\ No newline at end of file
......@@ -124,6 +124,8 @@
<script>
const TABLE_NAME = "MD_SPYJ"
import ConfirmPopover from './confirm-popover'
import { BILL_GLOBAL_PARAM } from '../../constant';
export default {
name: 'ApprovalUserControl',
components: {
......@@ -179,15 +181,15 @@ export default {
watch: {
value(newV) {
this.reviewParam['suggestions'] = newV;
this.context.bill.setGlobalParam('reviewParam',this.reviewParam);
this.context.bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT,this.reviewParam);
}
},
mounted() {
this.reviewParam['taskId'] = GMS.workflowTaskId
this.taskId = GMS.workflowTaskId;
// this.reviewParam['billid'] = this.$route.query.id;
this.context.bill.setGlobalParam('reviewParam',this.reviewParam);
this.value = this.context.bill.getGlobalParam('reviewParam').suggestions
this.context.bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT,this.reviewParam);
this.value = this.context.bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
this.currentTagId = window.nros.context.getCurrTag()
window.GMS.vbus.$on('approval-user-control-edit', this.openEditModal)
window.GMS.vbus.$on('approval-user-control-add', this.handleAdd)
......
......@@ -136,10 +136,10 @@ export default {
window.onresize = () => {
this.getModalHeight()
}
this.$refs.modal.$el.addEventListener('click', this.stopPropagation)
this.$refs.modal.$el.addEventListener('mousedown', this.stopPropagation)
},
beforeDestroy() {
this.$refs.modal.$el.removeeventlistener('click', this.stopPropagation)
this.$refs.modal.$el.removeEventListener('mousedown', this.stopPropagation)
},
methods: {
stopPropagation(event) {
......
......@@ -15,7 +15,7 @@
v-for="(item,index) in baseDataList"
:key="item.code"
:value="item.code"
@click="handleMainSearchSelectClick(item)"
@mousedown="handleMainSearchSelectClick(item)"
>
<span class="acct-search-label">{{ getLable(item) }}</span>
</li>
......@@ -165,7 +165,6 @@ export default {
},
'groupTableName.define.showFields': {
handler(nv) {
console.log({nv})
let choiceColumns = this.groupTableName.define.choiceColumns;
let column = nv.filter(item => item.isQueryColumn && choiceColumns.indexOf(item.columnName)>-1);
let width = 0
......@@ -194,12 +193,17 @@ export default {
},
mounted () {
this.addDomListener()
this.$refs.searchList.addEventListener('mousedown', this.stopPropagation)
addResizeListener(this.$el, this.handleResize)
},
beforeDestroy() {
this.$refs.searchList.removeEventListener('mousedown', this.stopPropagation)
this.removeDomListener()
},
methods: {
stopPropagation(event) {
event.stopPropagation()
},
getLable(val) {
if (this.showtype === 'CODE' || this.showtype === '0') {
return val.code
......@@ -282,10 +286,33 @@ export default {
this.getBaseDataList()
},
handleBlur() {
if (!this.onResultList) {
this.hasFocus = false
this.dataListShow = false
if (this.onResultList) {
this.$refs.searchInput.focus()
return
}
if (
this.selectIndex >= 0
&& this.selectIndex < this.baseDataList.length
) {
this.selectValue = this.baseDataList[this.selectIndex].name
this.value = this.baseDataList[this.selectIndex]
this.selectedItem = this.baseDataList[this.selectIndex]
this.$emit('data-change', this.value)
this.selectIndex = -1
}
else if (
this.selectValue != this.selectedItem.code
&& this.selectValue != this.selectedItem.name
) {
this.clearList()
}
else {
this.$emit('data-change', this.value)
}
this.hasFocus = false
this.dataListShow = false
},
// 输入查询时
handleChange() {
......@@ -397,9 +424,10 @@ export default {
this.selectValue = item.code
this.hasFocus = false
this.dataListShow = false
this.onResultList = false
this.value = item
this.selectedItem = item
this.$emit('data-change', this.value)
this.handleSelected()
},
// 列表上、下、回车
handleSelectPrev() {
......@@ -419,17 +447,6 @@ export default {
}
},
handleSelected() {
for (var i = 0; i < this.baseDataList.length; i++) {
if (this.selectIndex === i) {
this.selectValue = this.baseDataList[i].code
this.value = this.baseDataList[i]
this.selectedItem = this.baseDataList[i]
}
}
this.hasFocus = false
this.dataListShow = false
this.$emit('data-change', this.value)
this.selectIndex = -1
this.$refs.searchInput.blur()
},
// 查找索引位置
......@@ -451,9 +468,15 @@ export default {
this.$emit('data-change', this.value)
},
onSelectOk(value) {
this.selection = value
let result = this.getReturnInfo()
this.sendEvent(result)
if (this.multiple) {
this.selection = value
let result = this.getReturnInfo()
this.sendEvent(result)
}
else if (value && value.length) {
this.handleMainSearchSelectClick(value[0])
}
},
},
}
......
......@@ -149,48 +149,74 @@ export default {
})
},
getBillStateDisable(val, btnItem) {
if (!val) return false
let approveState = null
if (this.workflowState === 0) {
approveState = this.context.bill.getMasterData().getValue('billState')
console.log(this.define.btnGroupAction[btnItem], val, btnItem);
if (//不走工作流的情况下,执行自定义的按钮禁用状态
this.define.btnGroupAction &&
this.define.btnGroupAction[btnItem] &&
this.define.btnGroupAction[btnItem].disArr &&
this.define.btnGroupAction[btnItem].disArr.length > 0
) {
let arr = this.define.btnGroupAction[btnItem].disArr;
let flag = false;//不禁用
for(let i=0;i<arr.length;i++){
let valueArr = arr[i].value.split(";");
let billField = this.context.bill.getMasterData().getValue(arr[i].key.split('.')[1]);
if(valueArr.includes(billField)){
flag = true;//禁用
break;
}
}
return flag;
} else {
approveState = this.workflowState
}
let disableState = val.split(';')
// 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改··
if (this.define.btnGroupAction && this.define.btnGroupAction[btnItem] && this.define.btnGroupAction[btnItem].isApprove) {
disableState = disableState.filter(item => {
if (item === '90') {
return false
if (!val) return false;
let approveState = null;
if (this.workflowState === 0) {
approveState = this.context.bill
.getMasterData()
.getValue("billState");
} else {
approveState = this.workflowState;
}
let disableState = val.split(";");
// 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改··
if (
this.define.btnGroupAction &&
this.define.btnGroupAction[btnItem] &&
this.define.btnGroupAction[btnItem].isApprove
) {
disableState = disableState.filter((item) => {
if (item === "90") {
return false;
} else {
return true;
}
});
}
const getBillState = () => {
if (this.tmpBill.state === "") {
return disableState.includes("billEdit");
} else if (this.tmpBill.state === "readOnly") {
return disableState.includes("billReadOnly");
} else {
return true
return false;
}
})
}
const getBillState = () => {
if (this.tmpBill.state === '') {
return disableState.includes('billEdit')
} else if (this.tmpBill.state === 'readOnly') {
return disableState.includes('billReadOnly')
} else {
return false
};
switch (approveState) {
case 90: // 待审批
return disableState.includes("90");
case 91: // 被驳回
return disableState.includes("91") || getBillState();
case 92: // 审批完成
return disableState.includes("92");
case 1: // 已暂存
return disableState.includes("1") || getBillState();
case 2: // 已保存
return disableState.includes("2") || getBillState();
default:
return getBillState();
}
}
switch (approveState) {
case 90: // 待审批
return disableState.includes('90')
case 91: // 被驳回
return disableState.includes('91') || getBillState()
case 92: // 审批完成
return disableState.includes('92')
case 1: // 已暂存
return disableState.includes('1') || getBillState()
case 2: // 已保存
return disableState.includes('2') || getBillState()
default:
return getBillState()
}
},
},
}
......
<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>
<div>
<el-dialog
<el-dialog
class = "abow_dialog_lincao"
:fullscreen ="true"
width="90%"
:visible.sync="dialogVisible"
width="80%"
v-dialogDrag
: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>
</div>
</template>
<script>
export default {
......@@ -20,18 +18,72 @@ export default {
return {
dialogVisible:true,
url:"",
bill:null,
name :null,
subBillName :"XMJHLTZB"
};
},
watch: {
},
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() {
windows.addEventListener('message',eventListener)
window.addEventListener('message',this.lincaoEventListener)
},
};
</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 {
let id = this.context.dataObject.getValue(configId);
let a = "/showBillForm/" + defineName + '_E/' + id;
let routeData = GMS.routerManager.getRouter().resolve({
path: a
path: a,
query:{
params:"{'isEdit':true}"
}
});
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>
.input-height{
/deep/.ivu-input-default{
height: 100%;
}
}
.input-center{
/deep/.ivu-input-default{
text-align: center;
}
}
.input-left{
/deep/.ivu-input-default{
text-align: left;
}
}
.input-right{
/deep/.ivu-input-default{
text-align: right;
}
}
.input-control-wrapper{
display: inline-block;
width: 100%;
position: relative;
}
\ No newline at end of file
export default {
data() {
return {
state:"",
controlDisplay:true
}
},
methods: {
addControlStateListener(){
this.controlState = this.context.bill.addControlStateListener(this.define.name,{
display:function(type){
if(type){
this.controlDisplay = true;
}else{
this.controlDisplay = false;
}
}.bind(this),
editable:function(nv){
this.state = nv;
}.bind(this),
enable:function(){
}.bind(this),
confirm:function(msg){
/**
* 主动调用
*/
// if(msg){
// this.showTipMessage(msg);
// return false;
// }
}.bind(this)
});
},
getControlState(config){
if(config&&config.formulas){
for (const key in config.formulas) {
if(config.formulas[key] === "false"){
this[`setControl${key}`]&&this[`setControl${key}`]();
}else{
this.context.bill.getControlState(key,this.define.name);
}
}
}
},
setControldisplay(){
this.controlDisplay = false;
},
setControleditable(){
this.state = 'readOnly';
},
showTipMessage(message){
this.$Modal.confirm({
title: '提示',
content: message,
onOk: () => {
},
onCancel: () => {
if(this.context.dataObject){
this.context.dataObject.resetFieldValue();
}
return ;
}
})
}
},
mounted() {
this.getControlState(this.define.config);
},
created(){
this.addControlStateListener();
},
beforeDestroy() {
this.controlState&&this.controlState();
}
}
.input-height{
/deep/.ivu-input-default{
height: 100%;
}
}
.input-center{
/deep/.ivu-input-default{
text-align: center;
}
}
.input-left{
/deep/.ivu-input-default{
text-align: left;
}
}
.input-right{
/deep/.ivu-input-default{
text-align: right;
}
}
.input-control-wrapper{
display: inline-block;
width: 100%;
position: relative;
}
\ No newline at end of file
export default {
inject: ['tmpBill'],
props:{
define: {
type: Object,
required: false,
default:function() {
return {}
}
},
context: {
type: Object,
required: false,
default:function() {
return {}
}
},
index:{
type:Number
},
buttonDisplayStatus: {
type: Boolean,
default: true
},
billStateDisable: {
type: Boolean,
default: false
},
customExecute:{
type:Boolean,
default:false
}
},
data(){
return {
state:false,
description:'',
determineShowActions:[],
actionTitle:'',
actionIcon:'',
controlDisplay:true,
loading:false,
changeLoading: null,
isEdit:false
}
},
methods:{
getWorkflowStep(callBack){
GAMS.Util.invokeServer({
contentType: "application/json",
path: "/workflow/getWorkflowStep/" + this.context.bill.getMasterData().getValue('id'),
type: 'GET'
}).then(function(data){
if(data&&data.code === 0){
callBack(JSON.parse(data.content));
}else{
callBack('');
}
}.bind(this)).catch((XMLHttpRequest, textStatus, errorThrown) => {
callBack('');
});
},
executeAction(){
debugger
this.context.bill.setSubFocus(this.index);
let actionParam = this.context.bill.getActionParam(this.define.config.action);
if(actionParam && actionParam.param && actionParam.param.loading){
this.loading = true;
// this.changeLoading = this.context.bill.addButtonLoadingListener(this.define.config.action, {
// load:function(){
// this.loading = false
// }.bind(this)
// })
}
if(this.define.config.formulas&&(this.define.config.formulas.display||this.define.config.formulas.enable)){
let _resout = this.getControlState(this.define.config);
if(_resout.enable == 'disabled'){
this.setControleditable();
}else if(_resout.display == false){
this.setControldisplay();
}else{
!this.customExecute&&this.context.bill.executeAction(this.define.config.action);
this.customExecute&&this.$emit('executeAction',this.define.config.action);
}
}else{
!this.customExecute&&this.context.bill.executeAction(this.define.config.action);
this.customExecute&&this.$emit('executeAction',this.define.config.action);
}
},
loadShowActions(val) {
this.getActionName();
if(this.isEdit){//编辑和详情单据是一个的情况下,只读界面按钮是否可编辑
let actionParam = this.context.bill.getActionParam(this.define.config.action);
if(this.context.controlState === 'readOnly' && this.define.config.action.endsWith('action_gams') && !actionParam.param.alwaysUse){//如果单据是只读状态,则按钮禁用
this.state = 'disabled';
return;
}
}
if(!this.context.bill.getGlobalParam('_old_action_status')){
this.getControlState(this.define.config);
}
},
getActionName(){
if(!this.define.config){
return;
}
if(this.define.config.rule){
this.dealWithRule();
}else {
this.setBtnDefaultName();
}
},
setBtnDefaultName(){
if(!this.define.config.clear_btn_title){
this.actionTitle = this.define.config.text;
this.actionIcon = this.define.config.icon;
}
},
dealWithRule(){
let actionParam = this.context.bill.getActionParam(this.define.config.action);
if(this.define.config.rule.type === 'roles'){
if(this.define.config.rule[this.$store.state.role]){
this.actionTitle = this.define.config.rule[this.$store.state.role];
}else{
this.actionTitle = this.define.config.rule['default'];
}
}else if(this.define.config.rule.type === 'node'){
this.getWorkflowStep(function(data){
if(data&&this.define.config.rule[data.stepCurrent]){
this.actionTitle = this.define.config.rule[data.stepCurrent];
}else{
this.actionTitle = this.define.config.rule['default']
}
}.bind(this));
}
},
getControlHideStatus(name){
name&&this.context.bill.getControlHideStatus(name,'runtime');
},
addControlDisplayListener(){
this.hideRemove = this.context.bill.addControlHideListener(this.define.name,{
hideControl:function(type){
if(type){
this.controlDisplay = true;
}else{
this.controlDisplay = false;
}
}.bind(this)
});
},
addControlStateListener(){
this.controlState = this.context.bill.addControlStateListener(this.define.name,{
display:function(type){
if(type){
this.controlDisplay = true;
}else{
this.controlDisplay = false;
}
}.bind(this),
enable:function(nv){
this.state = nv;
}.bind(this),
loading:function(nv){
this.loading = nv;
}.bind(this)
});
},
getControlState(config){
if(config&&config.formulas){
let _resout = {};
for (const key in config.formulas) {
if(config.formulas[key] === "false"){
this[`setControl${key}`]&&this[`setControl${key}`]();
}else if(config.formulas[key] !== "true"){
// _resout[key] = this.context.bill.getControlState(key,this.define.name.split('.')[1]);
_resout[key] = this.context.bill.getControlState(key,this.define.name.split('.')[1]?this.define.name.split('.')[1]:this.define.name);
}
}
return _resout;
}
},
setControldisplay(){
this.controlDisplay = false;
},
setControlenable(){
this.state = 'disabled';
},
setLoading(){
this.loading = true;
}
},
mounted(){
if(this.define.config&&this.define.config.action){
this.remove = this.context.bill.addActionStateListener(this.define.config.action,this.context.dataObject,{
stateChange:function(nv){
this.state = nv;
}.bind(this),
descriptionChange:function(nv){
this.description = nv;
}.bind(this)
});
}
if(this.define.config&&this.define.config.formulaName){
this.addControlDisplayListener();
this.define.config&&this.getControlHideStatus(this.define.config.formulaName);
}else {
this.addControlStateListener();
}
this.$nextTick(function(){
this.loadShowActions()
}.bind(this));
},
watch:{
buttonDisplayStatus:{
handler(nv,ov){
if( Object.prototype.toString.call(nv) == '[object Boolean]'){
this.controlDisplay = nv;
}
},
immediate:true
},
billStateDisable: {
handler(nv) {
if(nv) {
this.state = 'disabled'
} else {
this.state = ''
}
},
immediate:true
},
"tmpBill.$attrs.params": {
handler(nv) {
if(typeof nv == 'string'){
nv = eval('('+nv+')')
}
if (nv && 'isEdit' in nv) {
this.isEdit = true;
}
},
immediate: true,
}
},
computed: {
showToolTip: {
get: function() {
if(this.description.length > 0 && this.state==='disabled'){
return false;
}else{
return true;
}
}
}
},
beforeDestroy(){
if(this.remove){
this.remove();
}
if(this.hideRemove){
this.hideRemove();
}
this.controlState&&this.controlState();
this.changeLoading&&this.changeLoading();
}
}
\ No newline at end of file
<template>
<div class="rbcInputControl">
<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="rbcInputControl">
<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="detailXTable"
:data="attr.attr.tableData"
:show-header="attr.attr.showHeader || false"
:header-cell-class-name="headerCellClassName"
:span-method="spanMethods"
:menu-config="tableMenu"
@menu-click="contextMenuClickEvent"
>
<template v-for="(column, index) in attr.attr.columns">
<vxe-table-column
:field="column.field"
:title="column.title"
:width="column.width"
:height="column.height"
:align="column.align"
:key="index"
>
<template slot-scope="scope">
<component
v-if="
attr.attr.headerOne
? !attr.attr.headerOne.includes(scope.$rowIndex) &&
column.type
: column.type
"
:is="column.type"
:attr="{ field: column.field, row: scope.row, column: column }"
></component>
<span v-else style="display: inline-block; height: 38px">{{
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 {
tableMenu: {
body: {
options: [
[
{ code: "addRow", name: "增行", disabled: false },
{ code: "removeRow", name: "删行", disabled: false },
],
],
},
},
};
},
props: {
attr: {
type: Object,
default: () => {},
},
},
watch: {},
computed: {},
methods: {
headerCellClassName({ column, columnIndex }) {
if (column.property === "content") {
return "col-white";
}
},
spanMethods({ row, $rowIndex, column, data }) {
let fields = ["firstIndex", "secondIndex"];
let cellValue = row[column.property];
if (cellValue && fields.includes(column.property)) {
let prevRow = data[$rowIndex - 1];
let nextRow = data[$rowIndex + 1];
if (prevRow && prevRow[column.property] === cellValue) {
return { rowspan: 0, colspan: 0 };
} else {
let countRowspan = 1;
while (nextRow && nextRow[column.property] === cellValue) {
nextRow = data[++countRowspan + $rowIndex];
}
if (countRowspan > 1) {
return { rowspan: countRowspan, colspan: 1 };
}
}
}
},
contextMenuClickEvent({ menu, row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }) {
console.log(menu, row, rowIndex, column, columnIndex);
let detailXTable = this.$refs.detailXTable;
switch (menu.code) {
case "addRow":
this.attr.attr.tableData.splice(rowIndex+1,0,this.attr.attr.addObj)
break;
case "removeRow":
if(this.attr.attr.tableData.length>1){
detailXTable.remove(row)
}
break;
default:
}
},
},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="less" scoped>
.detail-table {
margin-left:-11px;
margin-top:-1px;
width: calc(100% + 23px);
.vxe-header--column .col-white {
background-color: #fff !important;
}
}
</style>
export default {
data() {
return {
};
},
props: {},
watch: {},
computed: {},
methods: {
},
mounted() {
},
created() {},
beforeDestroy() {},
};
<template>
<div class="input-control-wrapper">
<SubjectModalTree
v-if="!isContent && controlDisplay"
:nodeKey="nodeKey"
:multiple="define.config.multiple"
:placeholder="define.config.placeholder"
:entryTitle="define.config.title"
:modalName="define.config.title"
:onlyChooseLeaf="true"
:defaultExpandAll="defaultExpandAll"
:lazy="lazy"
:customListFunc="customListFunc()"
:customTreeFunc="customTreeFunc()"
:value="value"
ref="subjectModalTree"
@on-subject-selected="subjectSelectedHandler"
/>
<div v-if="isContent">
{{ getValue() }}
</div>
</div>
</template>
<script>
import input from "../util/bc_input.js";
import { SubjectModalTree } from "@yhs/components";
export default {
mixins: [input],
components: {
SubjectModalTree,
},
props: {
rowIndex: {
type: Number,
default: -1,
},
context: {},
expandConfig: {},
isVxe: {},
},
data() {
return {
nodeKey: "code",
multiple: false,
defaultExpandAll: false,
lazy: false,
value: "",
orgcode: "",
username: "",
bookcode: "",
logindate: "",
};
},
mounted() {
console.log(this.isVxe);
this.addDomListener();
},
methods: {
addDomListener() {
if (this.isVxe) {
let doms = document.querySelectorAll(".rootClass");
if (doms.length) {
doms.forEach((item) => {
item.addEventListener("scroll", this.refreshPopover);
});
}
}
},
removeDomListener() {
if (this.isVxe) {
let doms = document.querySelectorAll(".rootClass");
if (doms.length) {
doms.forEach((item) => {
item.removeEventListener("scroll", this.refreshPopover);
});
}
}
},
refreshPopover() {
this.$refs.subjectModalTree.$refs.popoverSubject.updatePopper();
},
stopPropagation(event) {
event.stopPropagation();
},
subjectSelectedHandler(selectedObj) {
const code = selectedObj.code;
const name = selectedObj.name || selectedObj.title;
let nv = code + " " + name;
this.value = code;
this.setDataObjectValue(nv);
},
splitKey(str = "") {
return String(str).split(".")[1] || "";
},
getParams() {
let userContext = GMS.userContext || window.nros.getUser();
console.log("userContext===>", userContext);
let loginDate = userContext.loginDate;
let orgCode = userContext.conetxtUser.orgCode;
let userName = userContext.username;
let bookInfoStr =
(userContext.extInfo && userContext.extInfo.bookInfo) || "{}";
let bookInfo = JSON.parse(bookInfoStr);
let bookCode = bookInfo.rbcBookCode;
console.log(loginDate, orgCode, userName, bookCode);
return { loginDate, orgCode, userName, bookCode };
},
customListFunc() {
let { loginDate, orgCode, userName, bookCode } = this.getParams();
console.log(loginDate, orgCode, userName, bookCode);
userName = encodeURIComponent(userName);
let url = `/rbc/acct-sys/subject/list?orgcode=${orgCode}&bookcode=${bookCode}&logindate=${loginDate}&username=${userName}`;
console.log(url);
return (callback) => {
GMS.$http.post(url, { pagination: false }).then((res) => {
let data = res.data.data.rows;
callback(data);
});
};
},
customTreeFunc() {
const { loginDate, orgCode, userName, bookCode } = this.getParams();
let url = `/rbc/acct-sys/subject/tree?orgcode=${orgCode}&username=${userName}&bookcode=${bookCode}&logindate=${loginDate}`;
return (callback) => {
GMS.$http.post(url, { pagination: false }).then((res) => {
let data = res.data.data;
callback(data);
});
};
},
getSubjectDataList() {},
getSubjectDataTree() {},
},
beforeDestroy() {
this.removeDomListener();
},
};
</script>
<style lang="less" scoped>
@import "../util/dynamic-from-common.less";
.input-control-wrapper {
/deep/ .ivu-input-suffix {
z-index: 999;
}
/deep/ .ivu-input-suffix i {
position: relative;
top: 50%;
transform: translate(0, -50%);
}
}
</style>
<style>
.el-dialog__wrapper .el-dialog__header {
border-bottom: 1px solid #ccc;
padding: 14px 16px;
line-height: 1;
}
.tree-select-modal .filter-box {
display: none !important;
}
.el-dialog__wrapper .el-dialog__footer {
border-top: 1px solid #ccc;
padding: 12px 18px 12px 18px;
text-align: right;
}
</style>
\ No newline at end of file
import SubjectControl from './SubjectControl.vue'
export default {
renderEdit:(h, renderOpts, params,hide)=>{
const {
row,
column,
rowIndex
} = params;
let props = column.editRender.props;
let define = props.define;
let expandConfig = props.colItem && props.colItem.expandConfigValue || {}
let context = props.context;
return [
h(SubjectControl, {
class:"InputControl",
attrs:{
id:props.id
},
props: {
define:define,
expandConfig:expandConfig,
context:context,
rowIndex:rowIndex,
isVxe:{width:props.colItem.width,height:props.colItem.height}
},
on: {},
})
]
}
}
......@@ -57,7 +57,10 @@
</div>
</div>
<div v-if="isCurrentStep(step, k) || step.state == 2">{{formatStepTime(step)}}</div>
<div v-if="step.comments">审批意见:{{step.comments}}</div>
<div class="comment" v-if="step.comments">
<div class="label">审批意见:</div>
<div class="text">{{step.comments}}</div>
</div>
<div v-if="step.title" :class="isRejectStep(step) ? 'text-error' : 'text-main'">环节名称: {{step.title}}</div>
</div>
</div>
......@@ -115,7 +118,7 @@ export default {
formatStepTime(step) {
const currentTimestamp = Date.now()
if (step.state === 1) {
let ans = '已等待'
let ans = ''
const createTimestamp = (new Date(step.createTime)).getTime()
let seconds = (currentTimestamp - createTimestamp) / 1000
const formatList = [
......@@ -147,6 +150,7 @@ export default {
seconds -= num * o.rate
}
}
ans = '已等待' + ans
return ans
}
else {
......@@ -166,6 +170,51 @@ export default {
}).then((res) => {
const formatTrack = (curTrack) => {
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 commentList = []
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)
}
}
if (task.comments) {
commentList.push(task.comments)
}
const curResult = task.result || 0
resultFlag |= 1 << curResult
}
step.result =
resultFlag & 8
? 3
: resultFlag & 1
? 0
: 1
rejectFlag && (step.state = 2)
step.comments = commentList.join(';\n')
step.participants = participants
step.actualOwner = actualOwnerList.join('、')
}
return step
})
curTrack.steps.push({
title: "提交申请",
state: 2,
......@@ -335,6 +384,12 @@ export default {
font-size: 14px;
line-height: 20px;
}
.comment {
display: flex;
.text {
white-space: pre-line;
}
}
}
}
}
......
// 判断子表某个字段值相同则提示不然保存前端公式
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 {
if (arguments && arguments[0] && arguments[1]) {
let context = arguments[1]
let tableName = arguments[0][0].StaticValue
let data = context.getSubData(tableName)
let dataLength = data.length
if (data.length > 0) {
for (let i = 0; i < dataLength; i++) {
context.deleteSubData(tableName, 0,null)
}
}
context.clearSubDatas(tableName)
}
},
getResultType: function () {
......
// 通过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前几位获取指定基础数据项(当前版本)
import { getValue } from './util'
export default {
execute:async function(){
console.log("通过code前几位获取指定基础数据项");
......@@ -8,12 +10,7 @@ export default {
,mdcodeArg = arguments[0][1]//基础数据code
,num =arguments[0][2].StaticValue
,context = arguments[1];
let mdcode = ""
if(mdcodeArg instanceof BillDataNode){
mdcode = arguments[0][1].getResult().Value
}else if(mdcodeArg instanceof StaticDataNode ){
mdcode = arguments[0][1].StaticValue
}
let mdcode = await getValue(mdcodeArg)
let lastCode = mdcode.substring(0,Number(num))
let mdObject = await this.getMDObject(tablename,lastCode);
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 {
if (targetField instanceof BillDataNode) {
let tableObj = bill.getTableType(targetField.FieldTableCode);
if (tableObj.type == "master") {
let res = propName ? result[propName] : result
oldVal = targetField.dynamicNodeFactory.methodJson.GetFieldData('',targetFieldLink, '')
if (recoverFlag == 1 || !oldVal) {
targetField.dynamicNodeFactory.methodJson.SetFieldData('', targetFieldLink, propName ? result[propName] : result, '')
if (oldVal instanceof Object && res instanceof Object && "id" in oldVal && "id" in res && oldVal.id === res.id ) {
// short circuit to avoid loop call
}else{
if (recoverFlag === 1 || !oldVal) {
targetField.dynamicNodeFactory.methodJson.SetFieldData('', targetFieldLink, res, '')
}
}
} else {
let _data = bill.getSubData(tableObj.title);
......@@ -53,10 +58,7 @@ export default {
}
}
// 刷新表格
if (!bill.isRefresh) {
bill.refreshSubDataRow(tableObj.title)
bill.isRefresh = true
}
bill.refreshSubDataRow(tableObj.title)
}
}
}
......@@ -65,4 +67,4 @@ export default {
getResultType: function () {
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 {
context.setSubFocus(oldIndex)
}
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]
if (oldIndex !== newIndex) {
context.setSubFocus(newIndex)
......
......@@ -8,6 +8,10 @@ export default {
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) {
......@@ -26,8 +30,12 @@ export default {
}
let subTableObject = context.getTableType(targetSubField.FieldTableCode)
let oldIndex = context.getSubFocus()
let focusData = context.getAllSubData()[subTableObject.title][oldIndex].getData()
focusData[targetSubField.FieldCode]._field_old_value_ = focusData[targetSubField.FieldCode].value = result
context.getAllSubData()[subTableObject.title][oldIndex].setValue(
targetSubField.FieldTableCode + '.' + targetSubField.FieldCode,
result,
null,
triggerFormula ? 'all' : 'none'
)
context.refreshSubDataRow(subTableObject.title);
}
return result
......
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,12 @@ import relateInvoiceAction from './actions/relateInvoiceAction.js'
import deleteInvoiceAction from './actions/deleteInvoiceAction.js'
import saveActionBXD from './actions/saveActionBXD';
import lincaoAddView from './actions/lincaoAddView';
import CW_verifySignature from './actions/verifySignature';
import lincaoReadView from './actions/lincaoReadView';
import GH_agreeAction from './actions/labourUnion/gh_agreeAction.js';
import GH_rejectAction from './actions/labourUnion/gh_rejectAction.js';
import GH_submitAction from './actions/labourUnion/gh_submitAction.js';
//queryAction
import leafletGenerationAction from './query-actions/leafletGenerationAction.js'
import leafletGenerationTYAction from './query-actions/leafletGenerationTYAction.js'
......@@ -70,12 +76,17 @@ import applyDetail from './control/applyDetail';
import linkShowDetail from './control/linkShowDetail';
import ApprovalUserControl from './control/approval-user-control/approval-user-control.vue'
import WorkflowTrack from './control/workflow-track.vue'
import SignatureList from './control/signature-list.vue'
import buttonGroupControl from './control/buttonGrouop'
import rbcBasedataTree from './control/baseDataSelect/index.vue'
import newsDetail from './components-control/news-detail.vue'
import queryDate from './control/query-date.vue'
import userSelectControl from './control/userSelect.vue'
import integerControl from './control/integerControl.vue'
import IntroduceInputControl from './control/IntroduceInputControl.vue'
import InputModalControl from './control/InputModalControl.vue'
import Achievements from './control/vxe-achievements/achievements.vue'
import VxeSubjectControl from './control/vxeTableExpand/VxeSubjectControl.js'
//formula
import GeneralImportFile from './formula/GeneralImportFile.js';
......@@ -111,6 +122,7 @@ import PhoneCheck from './formula/PhoneCheck'
import IDCardCheck from './formula/IDCardCheck'
import LenFunction from './formula/LenFunction'
import CheckDuplicateSubField from './formula/CheckDuplicateSubField'
import CheckUnDuplicateSubField from './formula/CheckUnDuplicateSubField'
import ClearSubData from './formula/ClearSubData'
import DateOpera from './formula/DateOpera'
import GetSubStandard from './formula/GetSubStandard'
......@@ -159,6 +171,10 @@ import AmountComp from "./formula/AmountComp";
import SubTableHasContainField from "./formula/SubTableHasContainField";
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 {
actions: {
updateFieldAction,
......@@ -193,7 +209,11 @@ export default {
simpleAdvanceDeleteAction,
queryDeleteBill,
lincaoAddView,
openNewPageDetail
lincaoReadView,
openNewPageDetail,
GH_agreeAction,
GH_rejectAction,
GH_submitAction
},
billAction: {
printMultiAction,
......@@ -235,7 +255,8 @@ export default {
CW_submitAction,
CW_closeAction,
CW_imageView,
saveActionBXD
saveActionBXD,
CW_verifySignature,
},
billControl: {
applyDetail,
......@@ -243,9 +264,14 @@ export default {
buttonGroupControl,
ApprovalUserControl,
WorkflowTrack,
SignatureList,
rbcBasedataTree,
userSelectControl,
integerControl
integerControl,
IntroduceInputControl,
InputModalControl,
Achievements,
VxeSubjectControl
},
formula: {
SubTableSetBaseData,
......@@ -285,6 +311,7 @@ export default {
IDCardCheck,
LenFunction,
CheckDuplicateSubField,
CheckUnDuplicateSubField,
DateOpera,
ClearSubData,
GetSubStandard,
......@@ -319,7 +346,11 @@ export default {
SubTableHasContainField,
ApplyTemplateString,
SubTableSetData,
...GeneralImportFile
GetMDByObjectcode,
GetOwnProperty,
SetSubValueToMaster,
UnsafeApplyFunction,
...GeneralImportFile,
},
routes : {
showPrint: {
......
import mcon from './mcon';
import emcon from './emcon';
import { loadScript } from './utils'
import '@rbc/icon/iconfont'
import '@rbc/icon/iconfont.css'
import '@rbc/icon/icon.css'
import './styles/common/normalize.less'
import '@yhs/icon/iconfont.css'
import '@yhs/icon/iconfont.js'
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 {
install: function(){
GMS.getContext().getCollector().addElements(mcon); // 收集所有配置文件
......
......@@ -11,6 +11,8 @@ export default {
} else {
templateName = param.viewName;
}
let defaultValueList = param.defaultValueList || []
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
......@@ -23,6 +25,7 @@ export default {
templateName: templateName,
init: true,
state: '',
defaultValueList,
},
{
openWay: "FUNCTAB",
......@@ -35,6 +38,7 @@ export default {
c.init = true;
c.modal_visible = true;
c.state = ''
c.defaultValueList = defaultValueList
})
}
},
......
......@@ -15,4 +15,35 @@ textarea {
display: flex;
align-items: center;
}
.ivu-message {
z-index: 9999 !important;
}
//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 基础数据表名
......@@ -30,4 +36,84 @@ export const getBaseData = (tableName, param = {}) => {
const result = res && res.data || {}
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)
})
}
export const formatCurrency = (number) => {
const rawNumber = number
try {
number = Number(number).toFixed(2)
return isNaN(number)
? rawNumber
: (number + '').replace(/\d{1,3}(?=(\d{3})+(\.))/g, (match) => {
return match + ',';
})
} catch (error) {
return rawNumber
}
}
<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'
import Leadership from './actions/components/leadership-participant.vue'
import RoleParticipant from './actions/components/role-participant.vue'
import SelectApprover from './control/select-approver.vue'
import UseSignature from './control/use-signature.vue'
import AutoTask from './control/autotask.vue'
import EditableAttr from './control/editable-attr.vue'
......@@ -11,6 +12,7 @@ export default {
SelectApprover,
AutoTask,
EditableAttr,
UseSignature,
},
EventPanel: {},
ParticipantStrategyComponents: {
......
......@@ -20,8 +20,13 @@ export default {
`/yxgl/deleteImage`,
[...this.selectedRows],
).then((res) => {
if (res.data && res.data.code != 0) {
this.$Message.error(res.data.msg)
if (res.data) {
if (res.data.code != 0) {
this.$Message.error(res.data.msg)
}
else {
this.$Message.success('删除成功')
}
}
}).catch(() => {
this.$Message.warning('删除失败');
......
......@@ -28,8 +28,13 @@ export default {
`/yxgl/ocr`,
{ ...this.selectedRows[0] }
).then((res) => {
if (res.data && res.data.code != 0) {
this.$Message.error(res.data.msg)
if (res.data) {
if (res.data.code != 0) {
this.$Message.error(res.data.msg)
}
else {
this.$Message.success(res.data.msg)
}
}
}).finally(() => {
this.$emit('after-click')
......
......@@ -4,6 +4,7 @@
:on-change="handleFileChange"
:http-request="handleClick"
:show-file-list="false"
:multiple="true"
>
<Button size="small" type="text" @click="handleClick">票据导入</Button>
</el-upload>
......@@ -24,9 +25,6 @@ export default {
}
},
computed: {
baseUrl() {
return'http://10.2.9.28:8091'
}
},
methods: {
handleFileChange(file) {
......
......@@ -54,6 +54,7 @@
size="small"
v-model="imageInfo[item.key]"
></Input>
<span v-else-if="item.type == 'currency'">{{ formatCurrency(imageInfo[item.key]) }}</span>
<span v-else>{{ imageInfo[item.key] }}</span>
</div>
......@@ -66,6 +67,8 @@
<script>
import moment from 'moment'
import { formatCurrency } from '../../../../@gms/gms-plugin-billexpand/src/utils'
export default {
props: {
isInfoEdit: {
......@@ -166,14 +169,17 @@ export default {
noTaxMoney: {
label: '金额',
key: 'noTaxMoney',
type: 'currency',
},
taxMoney: {
label: '税额',
key: 'taxMoney',
type: 'currency',
},
totalMoney: {
label: '价税合计',
key: 'totalMoney',
type: 'currency',
},
invoiceCheckCode: {
label: '校验码',
......@@ -217,6 +223,7 @@ export default {
trainMoney: {
label: '火车票总金额',
key: 'trainMoney',
type: 'currency',
},
seatType: {
label: '坐位类别',
......@@ -250,11 +257,12 @@ export default {
fareMoney: {
label: '票价',
key: 'fareMoney',
type: 'money',
type: 'currency',
},
fuelsurCharge: {
label: '燃油附加费',
key: 'fuelsurCharge',
type: 'currency',
},
caacDevelopmentFund: {
label: '民航发展基金',
......@@ -263,6 +271,7 @@ export default {
insurance: {
label: '保险费',
key: 'insurance',
type: 'currency',
},
},
itemTypeMap: {
......@@ -409,6 +418,9 @@ export default {
}
},
methods: {
formatCurrency(number) {
return formatCurrency(number)
},
formatDate(date) {
return moment(date).format('YYYY-MM-DD')
},
......@@ -423,7 +435,6 @@ export default {
.invoice-image-info-content {
position: relative;
overflow: hidden;
height: 265px;
overflow-y: scroll;
form {
.ivu-row {
......
......@@ -69,11 +69,16 @@ export default {
`/yxgl/verification`,
{ ...this.imageInfo }
).then((res) => {
if (res.data && res.data.code != 0) {
this.$Message.error(res.data.msg)
if (res.data) {
if (res.data.code != 0) {
this.$Message.error(res.data.msg)
}
else {
this.$Message.success(res.data.msg)
}
}
}).finally(() => {
this.queryImageInfo()
this.queryImageInfo(this.tabKey)
})
},
handleSave() {
......@@ -85,7 +90,7 @@ export default {
this.queryImageInfo()
})
},
queryImageInfo() {
queryImageInfo(tabKey = 0) {
this.loading = true
window.GMS.$http.post(
`/yxgl/selectDetails`,
......@@ -97,7 +102,7 @@ export default {
label: `发票${index + 1}`,
value: index,
}))
this.tabKey = 0
this.tabKey = tabKey
this.imageInfo = { ...(res?.data?.rows?.[this.tabKey] || {}) }
this.$emit('load-info', this.imageInfoList)
})
......@@ -124,7 +129,7 @@ export default {
content: "";
width: 3px;
height: 16px;
background: #4bc0c6;
background: #005791;
}
.title {
margin-left: 12px;
......
......@@ -57,7 +57,7 @@ export default {
font-weight: 400;
line-height: 20px;
font-weight: 500;
color: #03A4AD;
color: #005791;
}
}
}
......
......@@ -17,7 +17,18 @@
{{row.sourceType == 1 ? '移动端' : 'PC端'}}
</template>
<template slot-scope="{ row }" slot="taskType">
{{row.taskType == 0 ? '识别失败' : row.taskType == 1 ? '识别成功' : '未识别'}}
{{
row.taskType == 0
? '识别失败'
: row.taskType == 1
? '识别成功'
: row.taskType == 2
? '无需识别'
: '未识别'
}}
</template>
<template slot-scope="{ row }" slot="createTime">
{{formatTime(row.createTime)}}
</template>
</Table>
<div class="pagination">
......@@ -51,6 +62,7 @@
</template>
<script>
import moment from 'moment'
import ImageTab from './image-tab.vue'
import ImageInfo from './image-info.vue'
import { getImgUrl, verificationTypeList } from '../utils'
......@@ -113,11 +125,11 @@ export default {
},
{
title: '文件名称',
key: 'imageFileName',
key: 'customName',
},
{
title: '上传时间',
key: 'createTime',
slot: 'createTime',
}
],
tableData: [
......@@ -160,6 +172,9 @@ export default {
}
},
methods: {
formatTime(str) {
return moment(str).format('YYYY-MM-DD HH:mm:ss')
},
viewImage() {
const imageId = this.currentSelection[0].id
const yearFlag = this.currentSelection[0].yearFlag
......
<template>
<div class="main">
<Toolbar>
<UploadButton @after-click="queryImageInfo" />
<DeleteButton :selectedRows="currentSelection" @after-click="queryImageInfo" />
<EditDescriptionButton v-if="mode == 0" :selectedRows="currentSelection" @after-click="queryImageInfo" />
......@@ -9,7 +8,7 @@
<TransmitButton v-if="mode == 0" :selectedRows="currentSelection" @after-click="queryImageInfo" />
<TransmitTrackButton v-if="mode == 0" :selectedRows="currentSelection" />
</Toolbar>
<SearchBar @search="handleSearch" />
<SearchBar style="margin-top: 32px" @search="handleSearch" />
<div class="image-table-wrapper">
<ImageTable :mode="mode" :searchParams="searchParams" ref="imageTable" @selectionChange="handleSelectionChange" />
</div>
......@@ -75,14 +74,12 @@ export default {
<style lang="less" scoped>
.main {
width: 100%;
height: 100%;
background-color: white;
display: flex;
flex-direction: column;
position: relative;
.image-table-wrapper {
flex: 1;
width: 100%;
height: 850px;
padding: 12px;
background-color: #F8F8F8;
}
......
......@@ -7,14 +7,20 @@
:value="dateRange"
@on-change="dateRange = $event"
></DatePicker>
<div class="margin-left-5"></div>
<span class="search-bar-label">数据来源:</span>
<Select v-model="searchParam.sourceType" style="width:200px" clearable>
<Option v-for="item in sourceTypeOptions" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<div class="margin-left-5"></div>
<span class="search-bar-label">识别任务状态:</span>
<Select v-model="searchParam.taskType" style="width:200px" clearable>
<Option v-for="item in taskTypeOptions" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<div class="margin-left-5"></div>
<Button size="small" ghost type="primary" @click="handleSearch">查询</Button>
<Button size="small" @click="resetSearch">重置</Button>
</div>
......@@ -46,8 +52,8 @@ export default {
label: '识别成功',
},
{
value: 2,
label: '识别',
value: 3,
label: '识别',
},
],
searchParam: {},
......@@ -85,6 +91,9 @@ export default {
button {
margin-right: 10px;
}
.margin-left-5 {
margin-left: 10px;
}
.search-bar-label {
height: 17px;
font-size: 12px;
......@@ -92,15 +101,5 @@ export default {
color: #888888;
line-height: 17px;
}
.ivu-date-picker {
input {
border: none;
}
}
.ivu-select {
.ivu-select-selection {
border: none;
}
}
}
</style>
\ No newline at end of file
......@@ -12,7 +12,11 @@ export default {
}
return h(
'div',
{ attrs: { class: 'toolbar-wrapper' } },
{
attrs: {
class: `toolbar-wrapper ${'toolbar-wrapper-fixed'}`
}
},
children,
)
},
......@@ -23,9 +27,12 @@ export default {
.toolbar-wrapper {
padding: 0 16px;
height: 32px;
width: 100%;
background-color: white;
border-bottom: 1px solid #DDD;
display: flex;
align-items: center;
z-index: 999;
.divider {
margin: 0 16px;
width: 1px;
......@@ -34,4 +41,8 @@ export default {
}
}
.toolbar-wrapper-fixed {
position: fixed;
}
</style>
\ No newline at end of file
......@@ -11,6 +11,7 @@ export const verificationTypeList = [
'00103',
'002',
'00104',
'008',
]
export const getImgUrl = (objId, yearFlag) => {
......
......@@ -252,23 +252,26 @@ export default {
this.loginTitle = obj[0] && obj[0].title || this.loginTitle
bgImgCode
? this.getImgUrl(bgImgCode).then((url) => {
this.loginImageBg = url
this.imgLoading -= 1
})
this.loginImageBg = url
}).finally(() => {
this.imgLoading -= 1
})
: this.imgLoading -= 1
iconCode
? this.getImgUrl(iconCode).then((url) => {
this.loginIcon = url
this.imgLoading -= 1
})
this.loginIcon = url
}).finally(() => {
this.imgLoading -= 1
})
: this.imgLoading -= 1
const boxImgCode = obj[1] && obj[1].icon
this.titleColor = obj[1] && obj[1].ext1 || this.titleColor
boxImgCode
? this.getImgUrl(boxImgCode).then((url) => {
this.boxImgUrl = url
this.imgLoading -= 1
})
this.boxImgUrl = url
}).finally(() => {
this.imgLoading -= 1
})
: this.imgLoading -= 1
}).catch(() => {
this.imgLoading = 0
......
......@@ -8,6 +8,7 @@
:state="state"
:params="params"
:hideButtonGroup="hideButtonGroup"
:defaultValueList="defaultValueList"
@loadFinish="loadFinishFun"
></gms-bill-form>
</div>
......@@ -43,6 +44,7 @@ export default {
};
},
created() {
this.defaultValueList = this.config.defaultValueList || []
this.type = this.config.id ? "load" : "init";
this.billId = this.config.id;
this.state = this.config.state || '';
......@@ -124,6 +126,11 @@ export default {
}, 0);
return
}
// 给bill设置默认值
let defaultValueList = this.defaultValueList || []
for(let item of defaultValueList){
bill.getMasterData().setValue(item.field,item.defaultValue)
}
this.curBill = bill;
const billState = bill.getMasterData().getValue('billState')
let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑
......
......@@ -3,7 +3,7 @@
<div class="string" v-if="initData.dataType == 'STRING'">
<div class="numberItem" :style="`paddingLeft:${initData.labelWidth}px`">
<div class="title" :style="`width:${initData.labelWidth}px`">{{ initData.title }}</div>
<div
<!-- <div
class="noChecked"
:class="{ checked: numHasAll == numLocationIndex }"
v-if="initData.config.hasAll"
......@@ -15,7 +15,7 @@
:key="index"
:class="{ checked: numLocationIndex == index }"
@click="numChose(index)"
>{{ val.title }}</div>
>{{ val.title }}</div> -->
<div class="custom" v-if="initData.config.custom">
<Input
:placeholder="'请输入起始段' + initData.title"
......@@ -36,7 +36,7 @@
<div class="number" v-if="initData.dataType == 'NUMBER'">
<div class="numberItem" :style="`paddingLeft:${initData.labelWidth}px`">
<div class="title" :style="`width:${initData.labelWidth}px`">{{ initData.title }}</div>
<div
<!-- <div
class="noChecked"
:class="{ checked: numHasAll == numLocationIndex }"
v-if="initData.config.hasAll"
......@@ -48,7 +48,7 @@
:key="index"
:class="{ checked: numLocationIndex == index }"
@click="numChose(index)"
>{{ val.title }}</div>
>{{ val.title }}</div> -->
<div class="custom" v-if="initData.config.custom">
<div
class="isHavePrecision"
......@@ -118,6 +118,7 @@
:transfer="transfer"
placeholder="请选择日期范围"
style="width: 100%"
:editable="editable"
@on-change="getBeginAndEndDate"
@on-open-change="getTitle(initData.title)"
/>
......@@ -132,6 +133,7 @@ export default {
name: "rangeQuery",
data() {
return {
editable:false,
min: 0,
changeColor: "blue",
transfer: true,
......
......@@ -101,65 +101,65 @@
},
{
"name": "gms-plugin-billexpand",
"version": "latest"
"version": "0.0.9"
},
{
"name": "gms-plugin-mainpage-reimburseBill",
"version": "latest"
"version": "0.0.3"
},
{
"name": "gms-plugin-mainpage-reimburseExpense",
"version": "latest"
"version": "0.0.2"
},
{
"name": "gms-plugin-mainpage-fileList",
"version": "latest"
"version": "0.0.2"
},
{
"name": "gms-plugin-mainpage-newsList",
"version": "latest"
"version": "0.0.2"
},
{
"name": "gms-plugin-mainpage-feedback",
"version": "latest"
"version": "0.0.1"
},
{
"name": "gms-plugin-workflow",
"version": "latest"
"version": "0.0.2"
},
{
"name": "gms-plugin-mainpage-workflowcard",
"version": "latest"
"version": "0.0.2"
},
{
"name": "gms-plugin-mainpage-mybill",
"version": "latest"
"version": "0.0.2"
},
{
"name": "gms-plugin-mainpage-commonfunctions",
"version": "latest"
"version": "0.0.2"
}
],
"@rbc":[
{
"name": "control-strategy",
"version": "latest"
"version": "0.1.0"
},
{
"name": "voucher-center",
"version": "latest"
"version": "0.1.0"
},
{
"name": "file-management",
"version": "latest"
"version": "0.1.0"
},
{
"name": "workflow-job-view",
"version": "latest"
"version": "1.1.0--SNAPSHOT"
},
{
"name": "runner-bill-form",
"version": "latest"
"version": "0.0.2"
},
{
"name": "icon",
......@@ -167,19 +167,19 @@
},
{
"name":"bill-runner-query",
"version": "latest"
"version": "0.0.1"
},
{
"name": "welcome-page",
"version": "latest"
"version": "1.1.0--SNAPSHOT"
},
{
"name": "rbc-news",
"version": "latest"
"version": "0.0.1"
},
{
"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