|
|
|
@ -56,37 +56,37 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="10" :offset="14">
|
|
|
|
|
<!-- <el-form-item style="float: right" >-->
|
|
|
|
|
<!-- <el-form-item style="float: right" >-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="success"-->
|
|
|
|
|
<!-- @click="toolbarButtonClickEvent('save')"-->
|
|
|
|
|
<!-- >保存</el-button>-->
|
|
|
|
|
<!-- <div style="float: right;margin-left: 5px" >-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="success"-->
|
|
|
|
|
<!-- @click="toolbarButtonClickEvent('save')"-->
|
|
|
|
|
<!-- >保存</el-button>-->
|
|
|
|
|
<!-- <div style="float: right;margin-left: 5px" >-->
|
|
|
|
|
|
|
|
|
|
<!-- <el-upload-->
|
|
|
|
|
<!-- :action="uploadAction"-->
|
|
|
|
|
<!-- :show-file-list="false"-->
|
|
|
|
|
<!-- :before-upload="beforeAvatarUpload"-->
|
|
|
|
|
<!-- :data="uploadData"-->
|
|
|
|
|
<!-- :on-success="handleAvatarSuccess"-->
|
|
|
|
|
<!-- :disabled="filedis"-->
|
|
|
|
|
<!-- :headers="heads"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-button type="success" @click="uploadExcel" > 批量表导入 </el-button>-->
|
|
|
|
|
<!-- </el-upload>-->
|
|
|
|
|
<!-- <el-upload-->
|
|
|
|
|
<!-- :action="uploadAction"-->
|
|
|
|
|
<!-- :show-file-list="false"-->
|
|
|
|
|
<!-- :before-upload="beforeAvatarUpload"-->
|
|
|
|
|
<!-- :data="uploadData"-->
|
|
|
|
|
<!-- :on-success="handleAvatarSuccess"-->
|
|
|
|
|
<!-- :disabled="filedis"-->
|
|
|
|
|
<!-- :headers="heads"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-button type="success" @click="uploadExcel" > 批量表导入 </el-button>-->
|
|
|
|
|
<!-- </el-upload>-->
|
|
|
|
|
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--<!– <el-button–>-->
|
|
|
|
|
<!--<!– type="danger"–>-->
|
|
|
|
|
<!--<!– @click="toolbarButtonClickEvent('delete')"–>-->
|
|
|
|
|
<!--<!– >删除–>-->
|
|
|
|
|
<!--<!– </el-button>–>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!--<!– <el-button–>-->
|
|
|
|
|
<!--<!– type="danger"–>-->
|
|
|
|
|
<!--<!– @click="toolbarButtonClickEvent('delete')"–>-->
|
|
|
|
|
<!--<!– >删除–>-->
|
|
|
|
|
<!--<!– </el-button>–>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
@ -112,7 +112,10 @@
|
|
|
|
|
highlight-hover-row
|
|
|
|
|
show-overflow
|
|
|
|
|
show-header-overflow
|
|
|
|
|
|
|
|
|
|
:footer-method="footerMethod"
|
|
|
|
|
:footer-cell-style="{'text-align':'center','color':'red'}"
|
|
|
|
|
show-footer
|
|
|
|
|
:span-method="mergeRowMethod"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -135,12 +138,12 @@ import {
|
|
|
|
|
} from '@/api/sjzx/jcsj'
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
import XEUtils from 'xe-utils'
|
|
|
|
|
import {null2str} from "@/utils/rpkj";
|
|
|
|
|
import {getSumAdd, getSumAddDicByName1, null2str} from "@/utils/rpkj";
|
|
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
|
import { startLoading, endLoading } from '@/utils'
|
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
export default {
|
|
|
|
|
name:'XctltCX',
|
|
|
|
|
name:'BctltCX',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
queryParam: {
|
|
|
|
@ -214,20 +217,27 @@ export default {
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination', },
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{ field: 'ljslZ', title: '零件数量', width: 100,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination', },
|
|
|
|
|
},
|
|
|
|
|
{ field: 'xgr', title: '编制人', width: 100,
|
|
|
|
|
{ field: 'wph', title: '零件编号', width: 100,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination', },
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{ field: 'zdrZ', title: '编制人', width: 100,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination', },
|
|
|
|
|
},
|
|
|
|
|
{ field: 'xgrq', title: '编制日期', width: 100,
|
|
|
|
|
{ field: 'zdrqZ', title: '编制日期', width: 100,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination', },
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
footerData1: [
|
|
|
|
|
['合计', '2', '44', '67', '-']
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -242,6 +252,31 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
mergeRowMethod ({ row, $rowIndex, column, data }) {
|
|
|
|
|
const fields = [ 'dcChZ','dcPlZ','dcZlZ','ylzd1Z','wpggZ','','hxcdZ','ylzd4Z','tzbhZ','ljslZ'
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
let tempcol=column.property
|
|
|
|
|
let cellValue = row[tempcol]
|
|
|
|
|
if (cellValue && fields.includes(column.property)) {
|
|
|
|
|
|
|
|
|
|
let prevRow = data[$rowIndex - 1]
|
|
|
|
|
let nextRow = data[$rowIndex + 1]
|
|
|
|
|
if (prevRow && prevRow[tempcol] === cellValue) {
|
|
|
|
|
return {rowspan: 0, colspan: 0}
|
|
|
|
|
} else {
|
|
|
|
|
let countRowspan = 1
|
|
|
|
|
while (nextRow && nextRow[tempcol] === cellValue) {
|
|
|
|
|
nextRow = data[++countRowspan + $rowIndex]
|
|
|
|
|
}
|
|
|
|
|
if (countRowspan > 1) {
|
|
|
|
|
return {rowspan: countRowspan, colspan: 1}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
cellClickEvent({row}) {
|
|
|
|
|
this.queryParam.dcch = row.cbbm
|
|
|
|
|
this.$refs.xDown4.hidePanel()
|
|
|
|
@ -253,7 +288,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.queryParam.dcch) {
|
|
|
|
|
this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1)
|
|
|
|
|
this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1)
|
|
|
|
|
} else {
|
|
|
|
|
this.projectData = this.projectData1.slice(0)
|
|
|
|
|
}
|
|
|
|
@ -274,7 +309,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
czbhChange(){
|
|
|
|
|
if (this.queryParam.cbbm === '') {
|
|
|
|
|
this.filedis=true
|
|
|
|
|
this.filedis=true
|
|
|
|
|
}else{
|
|
|
|
|
this.filedis=false
|
|
|
|
|
}
|
|
|
|
@ -324,6 +359,22 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
footerMethod ({ columns, data }) {
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
columns.map((column, columnIndex) => {
|
|
|
|
|
if (['hxcdZ','ylzd4Z','ljslZ'].includes(column.property)) {
|
|
|
|
|
console.log(1)
|
|
|
|
|
return getSumAddDicByName1(data, column.property,'tzbhZ')
|
|
|
|
|
}
|
|
|
|
|
if (columnIndex === 1) {
|
|
|
|
|
return '合计'
|
|
|
|
|
}
|
|
|
|
|
return null
|
|
|
|
|
})
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
initBase(){
|
|
|
|
|
getCzplBase({}).then(res=>{
|
|
|
|
|
this.dictData = res.data
|
|
|
|
@ -342,6 +393,7 @@ export default {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
getTLTList(this.queryParam).then((res) => {
|
|
|
|
|
|
|
|
|
|
this.list = res.data
|
|
|
|
|
if (this.$refs.xGrid) {
|
|
|
|
|
this.$refs.xGrid.loadData(this.list)
|
|
|
|
@ -363,7 +415,7 @@ export default {
|
|
|
|
|
selectChange(row) {
|
|
|
|
|
// this.$refs.xGrid.clearActived() // 清除单元格激活状态
|
|
|
|
|
this.$refs.xGrid.clearEdit() // 清除单元格激活状态
|
|
|
|
|
// this.$refs.xGrid.setEditCell(row.row, row.column.property) // 设置单元格为激活状态
|
|
|
|
|
// this.$refs.xGrid.setEditCell(row.row, row.column.property) // 设置单元格为激活状态
|
|
|
|
|
null2str(row.row)
|
|
|
|
|
},
|
|
|
|
|
getHeight() {
|
|
|
|
|