This commit is contained in:
liushuai
2020-01-07 12:17:45 +08:00
parent 1d3c82904d
commit 66a4d3e816
2 changed files with 20 additions and 28 deletions

View File

@@ -11,15 +11,6 @@
<el-tooltip :open-delay="1200" effect="dark" content="将所有机床零件入库" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="将所有机床零件入库" placement="top">
<el-button type="warning" size="small" class="el-icon-success" style="margin: 0 0 0 10px" plain @click="Innumber">入库</el-button> <el-button type="warning" size="small" class="el-icon-success" style="margin: 0 0 0 10px" plain @click="Innumber">入库</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="清除该条零件信息" placement="top">
<el-button
size="small"
type="danger"
style="float: right; margin-right: 10px;margin-top: 12px"
plain
class="el-icon-delete"
@click="handleDelete()">移除</el-button>
</el-tooltip>
</el-row> </el-row>
</el-card> </el-card>
@@ -27,7 +18,6 @@
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="tableDataNum" :data="tableDataNum"
:row-class-name="tableRowClassName"
stripe stripe
highlight-current-row highlight-current-row
border border
@@ -80,6 +70,16 @@
<el-input v-model="tableData[scope.$index].note" clearable size="mini"/> <el-input v-model="tableData[scope.$index].note" clearable size="mini"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="100" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.是否禁用"
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</div> </div>
@@ -122,17 +122,9 @@ export default {
}, },
methods: { methods: {
// 移除 // 移除
handleDelete() { handleDelete(index, row) {
this.tableDataNum.splice(this.NUM, 1) this.tableDataNum.splice(index, 1)
this.tableData.splice(this.NUM, 1) this.tableData.splice(index, 1)
this.NUM = ''
},
tableRowClassName({ row, rowIndex }) {
console.log(rowIndex)
this.NUM = rowIndex
},
searchData(index) {
this.NUM = index
}, },
// 获取人员编号 // 获取人员编号
getpeopleid() { getpeopleid() {

View File

@@ -37,19 +37,19 @@
{{ scope.row.工序顺序 }} {{ scope.row.工序顺序 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="工序名称" width="100px"> <el-table-column align="center" label="工序名称" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工艺名称 }} {{ scope.row.工艺名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="准结工时" width="80px"> <el-table-column align="center" label="录入准结工时" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.准结工时 }} {{ scope.row.修补准结工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="定额工时" width="80px"> <el-table-column align="center" label="实际工时" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.单件工时 }} {{ scope.row.设备工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="合格品" width="70px"> <el-table-column align="center" label="合格品" width="70px">
@@ -132,8 +132,8 @@ export default {
return return
} }
import('@/vendor/Export2Excel').then(excel => { import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['姓名', '图号', '跟单号', '序号', '工序名称', '准结工时', '定额工时', '合格数', '不合格数', '备注', '日期', '计划准结工时', '计划定额工时', '项目名称', '机床图号', '组号', '设计', '材料'] const tHeader = ['姓名', '图号', '跟单号', '序号', '工序名称', '录入准结工时', '实际工时', '合格数', '不合格数', '备注', '日期', '计划准结工时', '计划定额工时', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['姓名', '零件图号_短', '跟单号', '工序顺序', '工艺名称', '准结工时', '单件工时', '合格数', '不合格数', '备注', '操作时间', '准结定额工时', '单件定额工时', '项目名称', '机床图号', '组号', '设计者', '材料'] const filterVal = ['姓名', '零件图号_短', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '合格数', '不合格数', '备注', '操作时间', '准结定额工时', '单件定额工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const list = this.tableData const list = this.tableData
const data = this.formatJson(filterVal, list) const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({ excel.export_json_to_excel({