Commit d1821d72 by yangchen

单据复制参数修改

parent d6eed906
...@@ -16,13 +16,15 @@ export default { ...@@ -16,13 +16,15 @@ export default {
return; return;
} }
const index = context.selects[0]._index || (context.selects[0]._serialIndex) * 1 - 1; const index = context.selects[0]._index || (context.selects[0]._serialIndex) * 1 - 1;
setQueryTag(context.currentDataQueryConditionSet, index, param.viewName, uuid); //上张下张用 let billId = context.selects[0][param.billId];
let billDefine = context.selects[0][param.billDefine];
let templateName = context.selects[0][param.viewName];
setQueryTag(context.currentDataQueryConditionSet, index, templateName, uuid); //上张下张用
if (param.hideCertainComponent) { if (param.hideCertainComponent) {
GMS.queryObject[uuid || 'router'].hidePageSwitcher = true GMS.queryObject[uuid || 'router'].hidePageSwitcher = true
} }
GMS.vbus.$emit('onCloseDrawer'); //关闭右侧划出面板 GMS.vbus.$emit('onCloseDrawer'); //关闭右侧划出面板
let billId = context.selects[0][param.billId];
let billDefine = context.selects[0][param.billDefine];
const params = { const params = {
billId, billId,
billName: billDefine billName: billDefine
...@@ -32,7 +34,7 @@ export default { ...@@ -32,7 +34,7 @@ export default {
const data = res && res.data || {} const data = res && res.data || {}
if (data.code === 0) { if (data.code === 0) {
const id = data.billdata.id const id = data.billdata.id
previewBill(id, param, uuid) previewBill(id, param, uuid, templateName)
} else { } else {
GMS.$hideContainer.$Message.error(data.msg || '复制单据失败') GMS.$hideContainer.$Message.error(data.msg || '复制单据失败')
} }
...@@ -40,7 +42,7 @@ export default { ...@@ -40,7 +42,7 @@ export default {
}, },
}; };
function previewBill(billId, param, uuid) { function previewBill(billId, param, uuid,templateName) {
if ( if (
window.osConfig.appOpenMode && window.osConfig.appOpenMode &&
...@@ -52,7 +54,7 @@ function previewBill(billId, param, uuid) { ...@@ -52,7 +54,7 @@ function previewBill(billId, param, uuid) {
openWay: "FUNCTAB", openWay: "FUNCTAB",
title: param.displayName || "单据详情", title: param.displayName || "单据详情",
config: { config: {
templateName: param.viewName, templateName: templateName,
id: billId, id: billId,
state: 'readOnly', state: 'readOnly',
hideButtonGroup: param.hideButton ? true : false hideButtonGroup: param.hideButton ? true : false
...@@ -60,7 +62,7 @@ function previewBill(billId, param, uuid) { ...@@ -60,7 +62,7 @@ function previewBill(billId, param, uuid) {
}) })
} else { } else {
GMS.$hideContainer.addComponent(typesBill, {}, function (c) { GMS.$hideContainer.addComponent(typesBill, {}, function (c) {
c.templateName = param.viewName; c.templateName = templateName;
c.billId = billId; c.billId = billId;
c.init = true; c.init = true;
c.modal_visible = true; c.modal_visible = true;
......
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