cosmoim-852 fix 代码优化

master
hou 3 years ago
parent b5342f8ee1
commit ca33c87ba4

@ -131,7 +131,9 @@ export default class RawReceiptDetail extends BasePage {
materialCode: any = '';
async propoWindow() {
this.show = !this.show;
// await this.query();
if (this.obj != undefined) {
this.PopupList = this.obj[0];
}
if (this.PopupList.length == 0) {
this.PageShow = false;
} else {
@ -141,6 +143,7 @@ export default class RawReceiptDetail extends BasePage {
async query() {
this.PageShow = false;
this.PopupList = [];
this.obj = undefined;
let params = {
prdOrder: this.prdOrder,
materialCode: this.materialCode,
@ -166,17 +169,14 @@ export default class RawReceiptDetail extends BasePage {
}
selectItem(e: any) {
console.log(e);
this.PopupList.forEach((item: any) => {
if (item.checked) {
this.some = item;
}
});
}
onOk() {
let flag = false;
this.PopupList.forEach((item: any) => {
let dataIndex = 0;
this.PopupList.forEach((item: any, index: any) => {
if (item.checked) {
flag = true;
dataIndex = index;
}
});
if (flag == false) {
@ -186,6 +186,7 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
this.some = this.PopupList[dataIndex];
this.show = !this.show;
this.prdOrder = '';
this.materialCode = '';

Loading…
Cancel
Save