Commit a0b117f8 authored by renjintao's avatar renjintao

footerbar

parent 76ea36cf
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<slot name="batch"></slot> <slot name="batch"></slot>
</div> </div>
<Button @click="footerToolbar=false">取消</Button> <Button @click="cancelFooterToolbar">取消</Button>
</FooterToolbar> </FooterToolbar>
</div> </div>
</template> </template>
...@@ -476,6 +476,11 @@ export default { ...@@ -476,6 +476,11 @@ export default {
}, },
selectAll(status) { selectAll(status) {
this.$refs.table.selectAll(status); this.$refs.table.selectAll(status);
},
cancelFooterToolbar()
{
this.$refs.table.selectAll(false);
this.footerToolbar=false
} }
}, },
computed: { computed: {
......
...@@ -895,11 +895,18 @@ export default { ...@@ -895,11 +895,18 @@ export default {
}, },
//单条删除 //单条删除
remove(row) { remove(row) {
let metCodesSingle = []; //没有子订单的订单
let metCodesFather = []; //有子订单的原始订单
this.delMsg = "";
this.delNum = 0; this.delNum = 0;
this.actIds = []; this.actIds = [];
this.$refs.grid.cancelFooterToolbar();
this.actIds.push(row.id); this.actIds.push(row.id);
if (row.id != row.rootId) { if (row.id != row.rootId) {
this.sondeletecheck(row.rootId); this.sondeletecheck(row.rootId);
metCodesFather.push(row.rootCode);
} else {
metCodesSingle.push(row.mesCode);
} }
setTimeout(() => { setTimeout(() => {
if (this.delNum > 0) { if (this.delNum > 0) {
...@@ -907,6 +914,19 @@ export default { ...@@ -907,6 +914,19 @@ export default {
this.actIds = []; this.actIds = [];
return false; return false;
} else { } else {
let metCodesSingleStr = JSON.stringify(metCodesSingle)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
let metCodesFatherStr = JSON.stringify(metCodesFather)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
if (row.id == row.rootId) {
this.delMsg = metCodesSingleStr;
} else {
this.delMsg = metCodesFatherStr + " 的子订单";
}
this.deletelModal = true; this.deletelModal = true;
} }
}, 400); }, 400);
...@@ -960,7 +980,10 @@ export default { ...@@ -960,7 +980,10 @@ export default {
this.delMsg = metCodesFatherStr + " 的子订单"; this.delMsg = metCodesFatherStr + " 的子订单";
} else if (metCodesSingle.length > 0 && metCodesFather.length > 0) { } else if (metCodesSingle.length > 0 && metCodesFather.length > 0) {
this.delMsg = this.delMsg =
metCodesSingleStr + " 以及 订单:" + metCodesFatherStr + " 的子订单"; metCodesSingleStr +
" 以及 订单:" +
metCodesFatherStr +
" 的子订单";
} }
this.deletelModal = true; this.deletelModal = 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