Commit 991a98fe authored by kangzhenfei's avatar kangzhenfei

班组派工处理

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