零件图维护

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

@@ -30,6 +30,7 @@
"v-viewer": "^1.3.1",
"vue": "2.5.17",
"vue-count-to": "^1.0.13",
"vue-direction-key": "^1.0.5",
"vue-router": "3.0.1",
"vuex": "3.0.1",
"xlsx": "^0.14.0",

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1563845561597" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2388" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M919.722769 822.006065l-80.179791-84.387809a72.957924 72.957924 0 0 0-104.063134 0 77.677727 77.677727 0 0 0 0 105.769087l82.681856 87.117334c-16.092823 5.57278-32.981758 8.4729-50.041288 8.4729-42.137039 0-81.828879-17.343856-111.739922-48.847122-51.007995-53.62379-61.641769-137.386082-25.816756-203.406463a24.395128 24.395128 0 0 0-3.809962-28.432551L561.700098 589.71213l35.028901-36.791719 63.347722 66.759627c7.847384 8.188574 20.471436 9.951393 30.195369 4.094288 60.390737-36.166204 140.741123-25.020644 190.156895 26.954057 42.990016 45.26462 57.320021 111.796787 39.293784 171.277682m-3.866827-204.884956c-60.277006-63.347722-155.98097-81.260228-233.146911-44.582239L614.357181 500.661383a24.338263 24.338263 0 0 0-35.313228 0L510.294047 572.936926a24.451993 24.451993 0 0 0 0 33.664139l69.375422 72.957924c-35.938743 81.601419-20.016515 179.693717 41.284063 244.235606a201.47305 201.47305 0 0 0 147.110015 63.973238c36.336799 0 72.104947-9.951393 103.494482-28.716876a24.565723 24.565723 0 0 0 5.117859-37.758427l-105.939682-111.455596a28.660011 28.660011 0 0 1 0-38.668268 23.087231 23.087231 0 0 1 33.322949 0L910.055702 882.681127a24.224533 24.224533 0 0 0 39.180054-5.117859c45.719541-84.558404 32.015051-191.635388-33.379814-260.442159M201.232227 962.519728a39.009459 39.009459 0 0 1-56.182719-0.056865L61.059754 874.151362a46.231327 46.231327 0 0 1 0-62.835936l231.725284-248.841679 57.206291 60.163277c6.539487 6.823812 16.888935 9.325876 25.589295 6.255161a24.451993 24.451993 0 0 0 5.004129 25.87362l57.206291 58.684784-236.558817 249.012274zM789.899745 148.837008l76.312965-80.236657a28.43255 28.43255 0 0 1 40.942872 0 34.687711 34.687711 0 0 1 0 46.629382L830.899483 195.636985a27.920764 27.920764 0 0 1-30.820885 6.823812 25.134374 25.134374 0 0 0-17.17326-0.511786 24.338263 24.338263 0 0 0 0.22746-17.514451 34.460251 34.460251 0 0 1 6.823812-35.540687z m-357.965806 489.096727l366.438706-385.54538c24.622588 3.866827 50.268749-4.606073 67.840065-23.200961l76.312965-80.350386a83.648563 83.648563 0 0 0 0-113.900796 78.416973 78.416973 0 0 0-111.683057 0l-76.312965 80.293521c-17.855642 18.765483-25.589295 45.207755-21.324413 70.68332L367.790106 570.377996l-39.521245-41.511523a46.288192 46.288192 0 0 0-65.963517-0.11373l-236.558817 248.955409a95.533369 95.533369 0 0 0 0 129.993619l83.932888 88.254636a86.662413 86.662413 0 0 0 126.922904 0l236.558817-248.898544a47.652954 47.652954 0 0 0 0-65.792921l-41.227197-43.388072z m-341.418063-473.117634l80.179792 84.444674a72.957924 72.957924 0 0 0 104.063133 0 77.791457 77.791457 0 0 0 0-105.882817L192.133811 56.317489a154.673073 154.673073 0 0 1 161.724345 40.374222c51.007995 53.62379 61.641769 137.329217 25.816756 203.406463a24.395128 24.395128 0 0 0 3.809961 28.432551l65.053675 68.522446-34.972037 36.90545-63.404587-66.759628a24.565723 24.565723 0 0 0-30.195368-4.094287c-23.826477 14.216275-50.894265 21.779333-78.360108 21.779333-42.193904 0-81.885744-17.343856-111.796787-48.847121-43.046881-45.207755-57.320021-111.796787-39.236919-171.163952m151.033706 268.858194c29.683582 0 59.139704-6.710082 85.980032-19.447864l68.23812 71.877487a24.451993 24.451993 0 0 0 35.426958 0l68.693041-72.218678a24.508858 24.508858 0 0 0 0-33.721004l-69.375423-73.014789c35.881878-81.601419 19.95965-179.693717-41.284062-244.178741C324.458899-5.096819 218.178027-19.768015 138.623751 27.771209a24.451993 24.451993 0 0 0-5.117859 37.758427l105.882817 111.455596a28.716876 28.716876 0 0 1 0 38.668269 22.973501 22.973501 0 0 1-33.266084 0l-105.939682-111.455597a24.850049 24.850049 0 0 0-20.869491-7.392463 24.679454 24.679454 0 0 0-18.253698 12.510322c-45.719541 84.558404-32.015051 191.635388 33.379814 260.385294a201.643646 201.643646 0 0 0 147.16688 64.030103" p-id="2389" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -20,8 +20,10 @@ import htmlToPdf from '@/vendor/htmlToPdf'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
import VueBarcode from '@xkeshi/vue-barcode'
Vue.component('barcode', VueBarcode)
import Direction from 'vue-direction-key'
Vue.component('barcode', VueBarcode)
Vue.use(Direction)
Vue.use(curd)
Vue.use(htmlToPdf)
Vue.use(ElementUI)

View File

@@ -201,7 +201,7 @@
border
style="width: 100%;min-height: 400px;"
size="mini">
<el-table-column prop="num" label="序号" width="50" align="center" type="index"/>
<el-table-column prop="num" label="序号" width="45" align="center" type="index"/>
<el-table-column prop="name" label="工艺名称" width="180" align="center">
<template slot-scope="scope">
<el-cascader
@@ -213,7 +213,7 @@
@change="handleChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="hard" label="难度等级" width="110" align="center">
<el-table-column prop="hard" label="难度等级" width="90" align="center">
<template slot-scope="scope">
<el-select
v-model="scope.row.工艺难度等级"
@@ -238,17 +238,17 @@
@select="blurRequest(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="singleton" label="单件" width="100" align="center">
<el-table-column prop="单件定额工时" label="单件" width="100" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.单件定额工时" style="width:100%" placeholder="" @change="singleChange(scope.row)"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-model="scope.row.单件定额工时" style="width:100%" placeholder="" @change="singleChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="Settlement" label="准结" width="100" align="center">
<el-table-column prop="准结定额工时" label="准结" width="100" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.准结定额工时" style="width:100%" placeholder="" @change="readyChange(scope.row)"/>
<el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.准结定额工时" style="width:100%" placeholder="" @change="readyChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right">
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<div>
<el-button
@@ -699,6 +699,9 @@ export default {
'token'
])
},
created() {
this.initDirection()
},
mounted() {
this.fetchData()
this.initPerson()
@@ -706,6 +709,24 @@ export default {
this.openCascader()
},
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()
}
})
},
// 保存已编制
saveCompiled() {
if (this.partNumValue) {

View File

@@ -517,7 +517,7 @@
</el-table-column>
<el-table-column label="实际询价(采购)数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" size="mini" style="width:100%"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-model="scope.row.数量" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="60">
@@ -527,7 +527,7 @@
</el-table-column>
<el-table-column label="询价备注" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" style="width:100%"/>
<el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.备注" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="120">
@@ -1038,8 +1038,27 @@ export default {
this.searchTable2() // 查表2
this.searchUnInquiryPartNumber()
this.searchUnBuyPartNumber()
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()
}
})
},
clickCard1(project, machine) {
this.projectValue = project
this.machine = []

View File

@@ -135,13 +135,13 @@
</el-table-column>
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
<template slot-scope="scope">
<el-input-number v-show="hasTax==='未税'" :min="0" v-model="scope.row.未税单价" controls-position="right" size="mini" style="width:100%" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-show="hasTax!=='未税'"></b>
</template>
</el-table-column>
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
<template slot-scope="scope">
<el-input-number v-show="hasTax==='含税'" :min="0" v-model="scope.row.含税单价" controls-position="right" size="mini" style="width:100%" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-show="hasTax!=='含税'"></b>
</template>
</el-table-column>
@@ -157,7 +157,7 @@
</el-table-column>
<el-table-column label="备注" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-if="quickChangePrice" v-model="scope.row.备注" size="mini" style="width:100%" @change="remarkChange(scope.row.备注, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input v-direction="{x: 1, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.备注" size="mini" style="width:100%" @change="remarkChange(scope.row.备注, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-else>{{ scope.row.备注 || '' }}</b>
</template>
</el-table-column>
@@ -265,8 +265,27 @@ export default {
},
created() {
this.fetchData()
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()
}
})
},
// 合同头实时保存
contractHeaderChange() {
if (this.contractNumValue) {

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
},