Commit 53930fc8 by qiaoyanqi

代码优化

parent 968f104e
...@@ -29,6 +29,13 @@ export default { ...@@ -29,6 +29,13 @@ export default {
} else { } else {
GAMS.Common.messagePrompt('请在单据中录入数据'); GAMS.Common.messagePrompt('请在单据中录入数据');
} }
c.$nextTick(()=>{
component.addListener({
close: function() {
GMS.$hideContainer.remove(name);
}
});
})
}); });
} else { } else {
GAMS.Common.messagePrompt('缺少参数'); GAMS.Common.messagePrompt('缺少参数');
......
...@@ -29,6 +29,13 @@ export default { ...@@ -29,6 +29,13 @@ export default {
c.modal_visible = true; c.modal_visible = true;
GMS.editSubIndex = bill.getSubFocus(); GMS.editSubIndex = bill.getSubFocus();
console.log('param',param,obj); console.log('param',param,obj);
c.$nextTick(()=>{
component.addListener({
close: function() {
GMS.$hideContainer.remove(name);
}
});
})
}); });
} else { } else {
GAMS.Common.messagePrompt('缺少参数'); GAMS.Common.messagePrompt('缺少参数');
......
...@@ -30,7 +30,13 @@ export default { ...@@ -30,7 +30,13 @@ export default {
c.billId = obj[BILLID]; c.billId = obj[BILLID];
c.subBillData = obj.BILLDETAILOBJ; c.subBillData = obj.BILLDETAILOBJ;
c.modal_visible = true; c.modal_visible = true;
console.log('param',param,obj); c.$nextTick(()=>{
component.addListener({
close: function() {
GMS.$hideContainer.remove(name);
}
});
})
}); });
} else { } else {
GAMS.Common.messagePrompt('无详情参数'); GAMS.Common.messagePrompt('无详情参数');
......
...@@ -7,7 +7,6 @@ export default { ...@@ -7,7 +7,6 @@ export default {
let BILLID = param.param.billId||'BILLID'; let BILLID = param.param.billId||'BILLID';
let BILLNAME = param.param.billName||'BILLNAME'; let BILLNAME = param.param.billName||'BILLNAME';
let BILLEDITNAME = param.param.billDefineName||'BILLEDITNAME'; let BILLEDITNAME = param.param.billDefineName||'BILLEDITNAME';
GMS.showDetailAction = true;//详情,点击确定按钮。记录此参数 GMS.showDetailAction = true;//详情,点击确定按钮。记录此参数
component = c; component = c;
c.bill = bill; c.bill = bill;
...@@ -32,7 +31,13 @@ export default { ...@@ -32,7 +31,13 @@ export default {
c.billId = obj[BILLID]; c.billId = obj[BILLID];
c.subBillData = obj.BILLDETAILOBJ; c.subBillData = obj.BILLDETAILOBJ;
c.modal_visible = true; c.modal_visible = true;
console.log('param',param,obj); c.$nextTick(()=>{
component.addListener({
close: function() {
GMS.$hideContainer.remove(name);
}
});
})
}); });
} else { } else {
GAMS.Common.messagePrompt('无详情参数'); GAMS.Common.messagePrompt('无详情参数');
......
...@@ -614,7 +614,6 @@ export default { ...@@ -614,7 +614,6 @@ export default {
path: billPath, path: billPath,
}); });
window.open(routeData.href, "_blank"); window.open(routeData.href, "_blank");
//this.close();
}, },
handleAddAssetsSave() { handleAddAssetsSave() {
this.chekData( this.chekData(
......
...@@ -198,24 +198,6 @@ export default { ...@@ -198,24 +198,6 @@ export default {
this.hasFocus = true this.hasFocus = true
this.getBaseDataList() this.getBaseDataList()
}, },
// handleBlur() {
// if (!this.onResultList) {
// this.hasFocus = false
// this.dataListShow = false
// }
// this.selectValue = String(this.selectValue)
// if (this.value === null) {
// this.selectValue = ''
// this.selectIndex = -1
// this.selectedItem = {}
// } else {
// this.selectValue = this.value.name
// this.selectedItem = this.value
// this.findIndex()
// }
// this.$emit('data-change', this.value)
// },
// 输入查询时 // 输入查询时
handleChange() { handleChange() {
if (this.selectValue === '' || this.selectValue === null) { if (this.selectValue === '' || this.selectValue === null) {
......
...@@ -110,7 +110,21 @@ export default { ...@@ -110,7 +110,21 @@ export default {
.catch((XMLHttpRequest, textStatus, errorThrown) => {}); .catch((XMLHttpRequest, textStatus, errorThrown) => {});
}, },
handleCancel() { handleCancel() {
this.close();
},
addListener(l) {
this.listener = l;
},
close() {
this.modal_visible = false; this.modal_visible = false;
if (this.listener) {
this.$nextTick(
function() {
this.$destroy();
this.listener.close();
}.bind(this)
);
}
}, },
}, },
watch: {}, watch: {},
......
...@@ -2,9 +2,7 @@ import mcon from './mcon'; ...@@ -2,9 +2,7 @@ import mcon from './mcon';
import emcon from './emcon'; import emcon from './emcon';
import './styles/common/normalize.less' import './styles/common/normalize.less'
import Vue from 'vue'; import Vue from 'vue';
// import ElementUI from 'element-ui';
import { Popover } from 'element-ui'; import { Popover } from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Popover) Vue.use(Popover)
export default { export default {
install: function(){ install: function(){
......
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