Commit 3aae4873 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 9a63c3ad 991a98fe
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<Radio label="2">已排产</Radio> <Radio label="2">已排产</Radio>
</RadioGroup> </RadioGroup>
{{listTask.length}} {{listTask.length}}
<!-- <Button :disabled="disablFlag" @click="allCheack" class="ml10">全选</Button>
<Button :disabled="disablFlager" @click="uncheack" class="ml10">全不选</Button> -->
<span class="check"> <span class="check">
<RadioGroup v-model="listShow" type="button" size="small"> <RadioGroup v-model="listShow" type="button" size="small">
<Radio label="订单" title="订单分类"> <Radio label="订单" title="订单分类">
...@@ -305,6 +307,8 @@ export default { ...@@ -305,6 +307,8 @@ export default {
button2: "设备", button2: "设备",
listShow: "订单", listShow: "订单",
shebei: "", shebei: "",
disablFlag: false,//全选
disablFlager: true,//不选
curTask:null, curTask:null,
dateRange: {//禁选工时时间区间 dateRange: {//禁选工时时间区间
disabledDate(date) { disabledDate(date) {
...@@ -412,6 +416,9 @@ export default { ...@@ -412,6 +416,9 @@ export default {
setShebeiId(id) { setShebeiId(id) {
this.shebeiId = id; this.shebeiId = id;
this.footerToolbar = true; this.footerToolbar = true;
// console.log(this.showOperate)
// console.log(this.ids.length)
// console.log(this.shebeiId)
}, },
// 获取查询人员 // 获取查询人员
getselectuser(id) { getselectuser(id) {
...@@ -468,6 +475,11 @@ export default { ...@@ -468,6 +475,11 @@ export default {
savedUl.push(detailnew); savedUl.push(detailnew);
}); });
this.listTask = savedUl; this.listTask = savedUl;
// if(savedUl.length<1){
// this.disablFlag = true
// }else{
// this.disablFlag = false
// }
}); });
}, },
// 时间改变方法 // 时间改变方法
...@@ -487,6 +499,43 @@ export default { ...@@ -487,6 +499,43 @@ export default {
changeStatus(a) { changeStatus(a) {
this.getUserInfoFn(); this.getUserInfoFn();
}, },
// 全选、全不选切换
allCheack(){
let fameData = this.listTask
console.log(fameData)
this.listTask.map(u => {
u.checked = true
this.ids.push(u.id);
})
this.ids.length = this.listTask.length
this.showOperate = true
console.log(this.listTask)
// console.log(this.ids.length)
// console.log(this.shebeiId)
// console.log(this.footerToolbar)
// console.log(this.showOperate)
this.footerToolbar = true
this.disablFlag = true
this.disablFlager = false
},
uncheack(){
console.log(this.listTask)
this.listTask.map(u => {
u.checked = false
})
if(this.ids.length>0){
// this.ids = this.ids.splice(0, this.ids.length)
this.ids.length = 0
}
console.log(this.listTask)
// console.log(this.footerToolbar)
// console.log(this.showOperate)
// console.log(this.shebeiId)
// console.log(this.ids)
this.footerToolbar = false
this.disablFlag = false
this.disablFlager = true
},
// 打开抽屉 // 打开抽屉
openDrawer() { openDrawer() {
let chekids = this.ids; let chekids = this.ids;
...@@ -508,7 +557,8 @@ export default { ...@@ -508,7 +557,8 @@ export default {
} else { } else {
this.pentity.taskTime = [timebegin, timend]; this.pentity.taskTime = [timebegin, timend];
this.manModal = true; this.manModal = true;
}// console.log("选中的数据", this.newList); }
console.log("选中的数据", this.newList);
}, },
// 设备派工 // 设备派工
sendSheBei() { sendSheBei() {
...@@ -614,13 +664,26 @@ export default { ...@@ -614,13 +664,26 @@ export default {
} }
}, },
computed: { computed: {
ids() { ids(){
let ids = []; // get(){
this.listTask.map(u => { // console.warn("oldids");
if (u.checked) { ids.push(u.id);} let ids = [];
}); this.listTask.map(u => {
if (ids.length > 0) {this.footerToolbar = true;} if (u.checked) { ids.push(u.id);}
return ids; });
if (ids.length > 0) {this.footerToolbar = true;}
return ids;
// },
// set(newVal){
// console.warn("newids");
// let ids = [];
// this.listTask.map(u => {
// if (u.checked) { ids.push(u.id);}
// });
// if (ids.length > 0) {this.footerToolbar = true;}
// return ids;
// this.ids = newVal
// }
}, },
listOrder() { listOrder() {
let orders = this.$u.group(this.listTask, u => { let orders = this.$u.group(this.listTask, u => {
...@@ -638,12 +701,31 @@ export default { ...@@ -638,12 +701,31 @@ export default {
this.footerToolbar = true; this.footerToolbar = true;
return peploeId; return peploeId;
}, },
showOperate() { showOperate(){
// get(){
// console.info(this.ids.length)
// console.info(this.shebeiId)
// debugger
return ( return (
this.ids.length > 0 && (this.shebeiId > 0 || this.peploeId.length > 0) this.ids.length > 0 && (this.shebeiId > 0 || this.peploeId.length > 0)
); )
// },
// set(newVal){
// console.log("newVal")
// this.showOperate = newVal;
// return (
// this.ids.length > 0 && (this.shebeiId > 0 || this.peploeId.length > 0)
// )
// }
} }
}, },
watch: {} watch: {
// ids(n,o){
// console.info(n)
// console.info(o)
// console.warn(this.listTask);
// console.info(this.shebeiId)
// }
}
}; };
</script> </script>
\ No newline at end of file
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