零件图维护

This commit is contained in:
chenjianan
2019-07-23 09:36:04 +08:00
parent dec0ae4230
commit 9351c77ef8
7 changed files with 100 additions and 18 deletions

View File

@@ -379,7 +379,7 @@
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
<el-input v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
<b v-else>{{ scope.row.数量 }}</b>
</template>
</el-table-column>
@@ -395,13 +395,13 @@
</el-table-column>
<el-table-column label="单价(未税)" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px"/>
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px"/>
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="单价(含税)" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
<el-input v-show="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:70px"/>
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:70px"/>
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
@@ -417,13 +417,13 @@
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope">
<el-input v-if="quickChangePrice" v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:70px"/>
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:70px"/>
<b v-else>{{ scope.row.交货期要求 || '—' }}</b>
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="150" prop="备注">
<template slot-scope="scope">
<el-input v-if="quickChangePrice" v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
<el-input v-direction="{x: 3, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
<b v-else>{{ scope.row.备注 || '—' }}</b>
</template>
</el-table-column>
@@ -862,8 +862,27 @@ export default {
this.searchTable1()
this.searchTable2()
this.searchTable00()
this.initDirection()
},
methods: {
initDirection() {
const direction = this.$getDirection()
direction.on('keyup', function(e, val) {
console.log(val)
if (e.keyCode === 39) {
direction.next()
}
if (e.keyCode === 37) {
direction.previous()
}
if (e.keyCode === 38) {
direction.previousLine()
}
if (e.keyCode === 40) {
direction.nextLine()
}
})
},
filterHandler0(value, row) { // 筛选备注
return row['备注'] === value
},