Commit 6772d87a by yangchen

增加按钮:单据复制

parent 0886f482
......@@ -1077,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