Commit 80dbd26c by qiaoyanqi

上张下张参数通过name获取

parent f76c37a7
...@@ -2,21 +2,23 @@ import { compareData } from "../components-control/util/dataChange.js"; ...@@ -2,21 +2,23 @@ import { compareData } from "../components-control/util/dataChange.js";
export default { export default {
execute(bill, param) { execute(bill, param) {
// 首张、上张、下张、末张 // 首张、上张、下张、末张
let actionName = null;//记录当前是哪个动作
if (param.name.split('_action_gams')) {
actionName = param.name.split('_action_gams')[1];
}
let flag = let flag =
GMS.queryObject && GMS.queryObject.isReadOnly GMS.queryObject && GMS.queryObject.isReadOnly
? true ? true
: compareData(GMS.oldBillData, bill.getBuillData()); : compareData(GMS.oldBillData, bill.getBuillData());
if (flag) { if (flag) {
if (Object.keys(param.param).length > 0) { this.getOtherPage(actionName);
this.getOtherPage(Object.keys(param.param)[0]);
}
} else { } else {
GMS.$hideContainer.$Modal.confirm({ GMS.$hideContainer.$Modal.confirm({
title: "信息提示", title: "信息提示",
content: "信息发生变化,确认切换?", content: "信息发生变化,确认切换?",
onOk: () => { onOk: () => {
if (Object.keys(param.param).length > 0) { if (Object.keys(param.param).length > 0) {
this.getOtherPage(Object.keys(param.param)[0]); this.getOtherPage(actionName);
} }
}, },
onCancel: () => { onCancel: () => {
......
...@@ -1473,15 +1473,7 @@ export default { ...@@ -1473,15 +1473,7 @@ export default {
"discard": false, "discard": false,
"path": "财务/通用", "path": "财务/通用",
"extends": { "extends": {
"param": [ "param": []
{
"type": "Boolean",
"title": "上张",
"key": "upward",
"upward": true,
"isRequired": true,
}
]
}, },
"description": "", "description": "",
"title": "上张[upward]", "title": "上张[upward]",
...@@ -1492,15 +1484,7 @@ export default { ...@@ -1492,15 +1484,7 @@ export default {
"discard": false, "discard": false,
"path": "财务/通用", "path": "财务/通用",
"extends": { "extends": {
"param": [ "param": []
{
"type": "Boolean",
"title": "下张",
"key": "down",
"down": true,
"isRequired": true,
}
]
}, },
"description": "", "description": "",
"title": "下张[down]", "title": "下张[down]",
...@@ -1511,15 +1495,7 @@ export default { ...@@ -1511,15 +1495,7 @@ export default {
"discard": false, "discard": false,
"path": "财务/通用", "path": "财务/通用",
"extends": { "extends": {
"param": [ "param": []
{
"type": "Boolean",
"title": "首张",
"key": "first",
"first":true,
"isRequired": true,
}
]
}, },
"description": "", "description": "",
"title": "首张[first]", "title": "首张[first]",
...@@ -1530,15 +1506,7 @@ export default { ...@@ -1530,15 +1506,7 @@ export default {
"discard": false, "discard": false,
"path": "财务/通用", "path": "财务/通用",
"extends": { "extends": {
"param": [ "param": []
{
"isRequired": true,
"type": "Boolean",
"title": "末张",
"key": "last",
"last":true
}
]
}, },
"description": "", "description": "",
"title": "末张[last]", "title": "末张[last]",
......
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