Commit be35de58 by qiaoyanqi

bug修改

parent e3dc1da8
...@@ -6,28 +6,23 @@ export default { ...@@ -6,28 +6,23 @@ export default {
if (param.name.split('_action_gams')) { if (param.name.split('_action_gams')) {
actionName = param.name.split('_action_gams')[1]; actionName = param.name.split('_action_gams')[1];
} }
let flag = let flag = compareData(GMS.oldBillData, bill.getBuillData());
GMS.queryObject && GMS.queryObject.isReadOnly if (flag) {
? true this.getOtherPage(actionName);
: compareData(GMS.oldBillData, bill.getBuillData()); } else {
if (flag) { GMS.$hideContainer.$Modal.confirm({
this.getOtherPage(actionName); title: "信息提示",
} else { content: "信息发生变化,确认切换?",
GMS.$hideContainer.$Modal.confirm({ onOk: () => {
title: "信息提示", this.getOtherPage(actionName);
content: "信息发生变化,确认切换?", },
onOk: () => { onCancel: () => {
if (Object.keys(param.param).length > 0) { GMS.$hideContainer.$Message["info"]({
this.getOtherPage(actionName); content: "已取消",
} });
}, },
onCancel: () => { });
GMS.$hideContainer.$Message["info"]({ }
content: "已取消",
});
},
});
}
}, },
async getOtherPage(action) { async getOtherPage(action) {
let page = GMS.queryObject.currentDataQueryConditionSet.page; let page = GMS.queryObject.currentDataQueryConditionSet.page;
...@@ -56,7 +51,7 @@ export default { ...@@ -56,7 +51,7 @@ export default {
} else if (action == "last") { } else if (action == "last") {
GMS.queryObject.index = data.data.count - 1; GMS.queryObject.index = data.data.count - 1;
} }
let state = GMS.queryObject.isReadOnly?'readOnly':''; let state = 'readOnly';
if ( if (
window.osConfig.appOpenMode && window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader" window.osConfig.appOpenMode == "apploader"
......
<template> <template>
<div> <div>
<Modal v-model="modalShow" title="打印" @on-ok="printAsync"> <Modal v-model="modalShow" title="打印">
<span>打印模板</span> <span>打印模板</span>
<Select v-model="printTemplate" clearable> <Select v-model="printTemplate" clearable>
<Option <Option
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
>{{ item.title }}</Option >{{ item.title }}</Option
> >
</Select> </Select>
<div slot="footer">
<Button @click="modalShow = false">取消</Button>
<Button @click="printAsync" type="primary">确定</Button>
</div>
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -41,6 +45,10 @@ export default { ...@@ -41,6 +45,10 @@ export default {
}, },
methods: { methods: {
printAsync() { printAsync() {
if(!this.printTemplate){
GMS.$hideContainer.$Message.info('请选择打印模板');
return;
}
//打印接口 //打印接口
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// let url=`/gms/bill/print/${this.billDefineName}/${this.billId}/${this.printTemplate}`; // let url=`/gms/bill/print/${this.billDefineName}/${this.billId}/${this.printTemplate}`;
...@@ -61,6 +69,7 @@ export default { ...@@ -61,6 +69,7 @@ export default {
let href = window.URL.createObjectURL(blob); //创建下载的链接 let href = window.URL.createObjectURL(blob); //创建下载的链接
downloadElement.href = href; downloadElement.href = href;
window.open(href) window.open(href)
this.modalShow = false;
// let routeData = GMS.routerManager.getRouter().resolve({ // let routeData = GMS.routerManager.getRouter().resolve({
// path: "/showPrint", // path: "/showPrint",
// query: { src: href }, // query: { src: href },
......
{ {
"name": "@rbc/runner-bill-form", "name": "@rbc/runner-bill-form",
"version": "0.0.1", "version": "0.0.2",
"scripts": { "scripts": {
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build-dev": "vue-cli-service build --mode development", "build-dev": "vue-cli-service build --mode development",
......
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