Commit 7837f0c0 by 乔延琦

Merge branch 'develop-yangchen' into 'develop'

Develop yangchen

See merge request GFP/RBC/rbc-frontend!299
parents 56247cc7 6772d87a
......@@ -89,11 +89,18 @@ export default {
}
// 监听工作流状态改变
GMS.vbus.$on("workflow-state-change", this.handleWorkflowStateChange)
this.handleButtonShow()
},
beforeDestroy() {
GMS.vbus.$off("workflow-state-change", this.handleWorkflowStateChange);
},
methods: {
handleButtonShow(){
const display = this.define.config && this.define.config.formulas && this.define.config.formulas.display || true
if(display === false || display === 'false'){
this.buttonShow = false
}
},
handleWorkflowStateChange(val) {
this.workflowState = val
this.getBtnGroup()
......
......@@ -140,10 +140,13 @@ export default {
"extends": {
"config": [
{
"key": "btnName",
"type": "String",
"title": "按钮名称"
}
"key": "formulas.display",
"type": "formula",
"title": "控件是否展示",
"configFormula": true,
"disableSwitch": false,
"formulas.display": true
}
]
},
"value": "buttonGroupControl",
......@@ -544,6 +547,12 @@ export default {
"path": "单据/通用",
"title": "单据公式执行扩展",
"value": "bill.BasicExtend.formulaSecond"
},
{
"discard": true,
"path": "单据/通用",
"title": "单据执行扩展(不保存单据)",
"value": "bill.BasicExtend.formulaThree"
}
],
queryAction: [
......@@ -1068,6 +1077,51 @@ export default {
"title": "在当前页签打开"
},
{
"value": "copyBillQueryAction",
"discard": false,
"path": "通用",
"extends": {
"paramDes": [
{
"isRequired": true,
"ref": "bill",
"type": "metaData",
"title": "跳转页面",
"key": "viewName"
},
{
"isRequired": true,
"ref": "columnField",
"type": "field",
"title": "单据id",
"key": "billId"
},
{
"isRequired": true,
"type": "string",
"title": "页签名称",
"key": "displayName"
},
{
"isRequired": true,
"ref": "columnField",
"type": "Boolean",
"title": "隐藏工具栏",
"key": "hideButton"
},
{
"isRequired": true,
"ref": "columnField",
"type": "Boolean",
"title": "隐藏特定组件",
"key": "hideCertainComponent"
},
]
},
"description": "单据复制",
"title": "单据复制"
},
{
"value": "goToDetail",
"discard": false,
"path": "通用",
......
......@@ -58,6 +58,7 @@ import undoGenerationTYAction from './query-actions/undoGenerationTYAction.js'
import voucherQueryAction from './query-actions/voucherQueryAction.js'
import voucherQueryTYAction from './query-actions/voucherQueryTYAction.js'
import seeDetailAction from './query-actions/seeDetailAction.js'
import copyBillQueryAction from './query-actions/copyBillQueryAction.js'
import goToDetail from './query-actions/goToDetail.js'
import updateStateAction from './query-actions/updateStateAction.js'
import createBill from './query-actions/createBill.js';
......@@ -198,6 +199,7 @@ export default {
undoGenerationAction,
undoGenerationTYAction,
seeDetailAction,
copyBillQueryAction,
goToDetail,
updateStateAction,
createBill,
......
import typesBill from "../components-control/typesBill.vue";
import {
getUUID
} from "./util/lib.js";
import {
setQueryTag
} from './util/queryTag.js';
export default {
execute(context, param) {
const uuid = getUUID();
if (!param.billId || !param.viewName) {
context.dom.$Message.info({
content: "请配置跳转页面的参数",
duration: 5
});
return;
}
const index = context.selects[0]._index || (context.selects[0]._serialIndex) * 1 - 1;
setQueryTag(context.currentDataQueryConditionSet, index, param.viewName, uuid); //上张下张用
if (param.hideCertainComponent) {
GMS.queryObject[uuid || 'router'].hidePageSwitcher = true
}
GMS.vbus.$emit('onCloseDrawer'); //关闭右侧划出面板
let billId = context.selects[0][param.billId];
let billDefine = param.viewName
.replace(/_E/gi, "")
.replace(/_R/gi, "")
.replace(/_A/gi, "");
const params = {
billId,
billName: billDefine
}
// 调接口获取 copyBillId
GMS.$http.post('/rbcquery/budgetModify', params).then(res => {
const data = res && res.data || {}
if (data.code === 0) {
const id = data.billdata.id
previewBill(id, param, uuid)
} else {
GMS.$hideContainer.$Message.error(data.msg || '复制单据失败')
}
})
},
};
function previewBill(billId, param, uuid) {
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
) {
GMS.util.nros.getPlugin('event').emit('open-page', {
id: uuid,
appName: "runner-bill-form",
openWay: "FUNCTAB",
title: param.displayName || "单据详情",
config: {
templateName: param.viewName,
id: billId,
state: 'readOnly',
hideButtonGroup: param.hideButton ? true : false
}
})
} else {
GMS.$hideContainer.addComponent(typesBill, {}, function (c) {
c.templateName = param.viewName;
c.billId = billId;
c.init = true;
c.modal_visible = true;
c.isReadOnly = true;
c.state = 'readOnly'
c.hideButtonGroup = param.hideButton ? true : false
});
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment