按垮道(1,2,3,4跨)显示完成和未完成数量

查看已完工和未完工的批次
master
xiaoning 2 months ago
parent 6300d8e0d5
commit b0434eff1e

@ -2,7 +2,7 @@
<!-- 月度计划管理 --> <!-- 月度计划管理 -->
<el-container> <el-container>
<el-header style="width: 100%; height: 50px;font-size: 12px"> <el-header style="width: 100%; height: 50px;font-size: 12px">
<el-form :inline="true" label-width="65px" label-position="left"> <el-form :inline="true" label-width="82px" label-position="left">
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="月份:"> <el-form-item label="月份:">
@ -44,6 +44,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="20">
<el-form-item label="完工情况:" >
<el-radio-group v-model="wgqk" @change="changeData" >
<el-radio label="0" >全部</el-radio>
<el-radio label="1" >已完工</el-radio>
<el-radio label="2" >未完工</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-header> </el-header>
<el-container style="padding-top: 0px"> <el-container style="padding-top: 0px">
@ -67,7 +78,6 @@
highlight-hover-row highlight-hover-row
show-overflow show-overflow
:cell-style="cellStyle" :cell-style="cellStyle"
:tooltip-config="{showAll:true, enterable: true,contentMethod:showWarning}"
:scroll-y="{enabled: true}" :scroll-y="{enabled: true}"
@cell-dblclick="getListhzBymx1" @cell-dblclick="getListhzBymx1"
> >
@ -120,6 +130,9 @@ export default {
components: {ScrollPane}, components: {ScrollPane},
data() { data() {
return { return {
wgqk:"0",
allList:[],
dateTime:'',
statusOptions:[], statusOptions:[],
dialogVisible:false, dialogVisible:false,
title1:'修改明细信息', title1:'修改明细信息',
@ -193,15 +206,55 @@ export default {
{ field: 'pwCount', title: '抛丸板数',width: 80, { field: 'pwCount', title: '抛丸板数',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }}, filterRender: { name: 'FilterCombination', }},
{ field: 'llCount', title: '理料板数',width: 80, // { field: 'llCount', title: '',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], // filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }}, // filterRender: { name: 'FilterCombination', }},
{ field: 'hxCount', title: '划线板数',width: 80, { field: 'hxCount', title: '划线板数',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }}, filterRender: { name: 'FilterCombination', }},
{ field: 'qgCount', title: '切割板数',width: 80, { field: 'qgCount', title: '切割板数',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }}, filterRender: { name: 'FilterCombination', }},
{ title: '1跨',
children: [
{ field: 'qgCount1k', title: '完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } },
{ field: 'qgCount1kw', title: '未完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } }
]
},
{ title: '2跨',
children: [
{ field: 'qgCount2k', title: '完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } },
{ field: 'qgCount2kw', title: '未完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } }
]
},
{ title: '3跨',
children: [
{ field: 'qgCount3k', title: '完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } },
{ field: 'qgCount3kw', title: '未完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } }
]
},
{ title: '4跨',
children: [
{ field: 'qgCount4k', title: '完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } },
{ field: 'qgCount4kw', title: '未完成',width: 80,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', } }
]
},
], ],
tableColumn:[ tableColumn:[
{ type: 'checkbox', width: 50 ,}, { type: 'checkbox', width: 50 ,},
@ -730,8 +783,33 @@ export default {
this.initBase() this.initBase()
this.initgxList() this.initgxList()
this.initWorkers() this.initWorkers()
this.getNowTime()
}, },
methods: { methods: {
getNowTime(){
this.dateTime=XEUtils.toDateString(XEUtils.getWhatDay(new Date(), 0, 'first'),'yyyy/MM/dd')
},
changeData(){
this.dataChange(this.allList)
},
dataChange(arr){
this.list1=[]
//
if(this.wgqk=='0'){ this.list1=arr}
if(this.wgqk=='1'){
arr.forEach(item=>{
if (item.qgCount==item.slxhthCount){
this.list1.push(item)
}
})
}
if(this.wgqk=='2'){
arr.forEach(item=>{
if (item.qgCount<item.slxhthCount){
this.list1.push(item)
}
})
} },
formatWorker({cellValue}){ formatWorker({cellValue}){
return this.workers[cellValue] return this.workers[cellValue]
}, },
@ -779,17 +857,14 @@ export default {
}, },
// //
cellStyle({row, column}){ cellStyle({row, column}){
if (column.field === 'slCount') { if (row.qgCount==row.slxhthCount) {
if (row.slCount > '0' && row.slCount<row.slxhthCount) {
return { return {
backgroundColor: '#FF0000FF', backgroundColor: 'rgba(165,255,40,0.71)',
color: '#fff',
cursor: 'pointer' cursor: 'pointer'
} }
} }else {
} if (column.field === 'slCount') {
if (column.field === 'pwCount') { if (row.slCount > '0' && row.slCount<row.slxhthCount && row.sljhrq<this.dateTime) {
if (row.pwCount > '0' && row.pwCount<row.slxhthCount) {
return { return {
backgroundColor: '#FF0000FF', backgroundColor: '#FF0000FF',
color: '#fff', color: '#fff',
@ -797,8 +872,8 @@ export default {
} }
} }
} }
if (column.field === 'llCount') { if (column.field === 'pwCount') {
if (row.llCount > '0' && row.llCount<row.slxhthCount) { if (row.pwCount > '0' && row.pwCount<row.slxhthCount && this.dateTime>row.pwjhrq) {
return { return {
backgroundColor: '#FF0000FF', backgroundColor: '#FF0000FF',
color: '#fff', color: '#fff',
@ -806,8 +881,17 @@ export default {
} }
} }
} }
// if (column.field === 'llCount') {
// if (row.llCount > '0' && row.llCount<row.slxhthCount && this.dateTime>row.hxjhrq) {
// return {
// backgroundColor: '#FF0000FF',
// color: '#fff',
// cursor: 'pointer'
// }
// }
// }
if (column.field === 'hxCount') { if (column.field === 'hxCount') {
if (row.hxCount > '0' && row.hxCount<row.slxhthCount) { if (row.hxCount > '0' && row.hxCount<row.slxhthCount && this.dateTime>row.hxjhrq) {
return { return {
backgroundColor: '#FF0000FF', backgroundColor: '#FF0000FF',
color: '#fff', color: '#fff',
@ -816,7 +900,7 @@ export default {
} }
} }
if (column.field === 'qgCount') { if (column.field === 'qgCount') {
if (row.qgCount > '0' && row.qgCount<row.slxhthCount) { if (row.qgCount > '0' && row.qgCount<row.slxhthCount && this.dateTime>row.qgjhrq) {
return { return {
backgroundColor: '#FF0000FF', backgroundColor: '#FF0000FF',
color: '#fff', color: '#fff',
@ -825,6 +909,7 @@ export default {
} }
} }
return null return null
}
}, },
save(){ save(){
const data=this.$refs.xGrid.getCheckboxRecords() const data=this.$refs.xGrid.getCheckboxRecords()
@ -921,7 +1006,9 @@ export default {
return return
} }
getListhz(this.queryParam).then((res) => { getListhz(this.queryParam).then((res) => {
this.list1 = res.data this.allList=res.data
// <
this.dataChange(this.allList)
if (this.$refs.xGrid) { if (this.$refs.xGrid) {
this.$refs.xGrid.loadData(this.list) this.$refs.xGrid.loadData(this.list)
} }

Loading…
Cancel
Save