Browse Source

BOM和Routing页签

master
han\hanst 4 months ago
parent
commit
39743b5a52
  1. 6
      src/api/qc/qc.js
  2. 184
      src/views/modules/qc/bomListComponent.vue
  3. 24
      src/views/modules/qc/qcPartAttribute.vue
  4. 184
      src/views/modules/qc/routingListComponent.vue

6
src/api/qc/qc.js

@ -238,3 +238,9 @@ export const sopAvailableFiles = data => createAPI(`/pms/qc/sopAvailableFiles`,'
export const sopFileUploadSave = data => createAPI(`/pms/qc/sopFileUploadSave`,'post',data)
export const sopRecordDelete = data => createAPI(`/pms/qc/sopList/delete`,'post',data)
// ===================================== BOM清单 =====================================
export const bomListSearch = data => createAPI(`/pms/qc/bomListSearch`,'post',data)
// ===================================== Routing清单 =====================================
export const routingListSearch = data => createAPI(`/pms/qc/routingListSearch`,'post',data)

184
src/views/modules/qc/bomListComponent.vue

@ -0,0 +1,184 @@
<template>
<div class="bom-list-component">
<el-table
:data="dataList"
border
v-loading="dataListLoading"
:height="tableHeight"
style="width: 100%;">
<el-table-column
prop="site"
header-align="center"
align="center"
label="工厂"
width="80">
</el-table-column>
<el-table-column
prop="buNo"
header-align="center"
align="center"
label="料号"
width="150">
</el-table-column>
<el-table-column
prop="revno"
header-align="center"
align="center"
label="版本号"
width="100">
</el-table-column>
<el-table-column
prop="bomtype"
header-align="center"
align="center"
label="BOM类型"
width="120">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="center"
label="状态"
width="80">
<template slot-scope="scope">
<el-tag :type="scope.row.status === 'Active' ? 'success' : 'info'">
{{ scope.row.status }}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="phaseindate"
header-align="center"
align="center"
label="生效日期"
width="120">
</el-table-column>
<el-table-column
prop="phaseoutdate"
header-align="center"
align="center"
label="失效日期"
width="120">
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
style="margin-top: 10px;">
</el-pagination>
</div>
</template>
<script>
import { bomListSearch } from '@/api/qc/qc.js'
export default {
name: 'BomListComponent',
props: {
partNo: {
type: String,
default: ''
},
site: {
type: [String, Number],
default: ''
},
buNo: {
type: String,
default: ''
},
tableHeight: {
type: Number,
default: 200
}
},
data () {
return {
dataList: [],
pageIndex: 1,
pageSize: 20,
totalPage: 0,
dataListLoading: false
}
},
watch: {
partNo: {
handler (newVal) {
if (newVal) {
this.getDataList()
}
},
immediate: true
},
site: {
handler (newVal) {
if (newVal && this.partNo) {
this.getDataList()
}
}
},
buNo: {
handler (newVal) {
if (newVal && this.partNo) {
this.getDataList()
}
}
}
},
methods: {
//
getDataList () {
if (!this.partNo || !this.site || !this.buNo) {
this.dataList = []
this.totalPage = 0
return
}
this.dataListLoading = true
bomListSearch({
page: this.pageIndex,
limit: this.pageSize,
partNo: this.partNo,
site: this.site,
buNo: this.buNo
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list || []
this.totalPage = data.page.totalCount || 0
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
}).catch(() => {
this.dataList = []
this.totalPage = 0
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
}
}
</script>
<style scoped>
.bom-list-component {
padding: 10px;
}
</style>

24
src/views/modules/qc/qcPartAttribute.vue

@ -303,9 +303,23 @@
<!-- 页签 -->
<el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab">
<!-- BOM页签 -->
<el-tab-pane label="BOM" name="bom"></el-tab-pane>
<el-tab-pane label="BOM" name="bom">
<bom-list-component
v-if="activeTable === 'bom'"
:part-no="partCurrentRow.partNo"
:site="partCurrentRow.site"
:bu-no="partCurrentRow.buNo">
</bom-list-component>
</el-tab-pane>
<!-- Routing页签 -->
<el-tab-pane label="Routing" name="routing"></el-tab-pane>
<el-tab-pane label="Routing" name="routing">
<routing-list-component
v-if="activeTable === 'routing'"
:part-no="partCurrentRow.partNo"
:site="partCurrentRow.site"
:bu-no="partCurrentRow.buNo">
</routing-list-component>
</el-tab-pane>
<!-- SOP清单 -->
<el-tab-pane label="SOP清单" name="partSop">
<sop-list-component
@ -1197,12 +1211,16 @@
import qcUpload from "./qc_upload"
import qcSOPUploadFile from "./qc_SOP_upload_file"
import SopListComponent from "./sopListComponent"
import BomListComponent from "./bomListComponent"
import RoutingListComponent from "./routingListComponent"
export default {
components: {
qcSOPUploadFile,
Chooselist,
qcUpload,
SopListComponent
SopListComponent,
BomListComponent,
RoutingListComponent
},
data () {
return {

184
src/views/modules/qc/routingListComponent.vue

@ -0,0 +1,184 @@
<template>
<div class="routing-list-component">
<el-table
:data="dataList"
border
v-loading="dataListLoading"
:height="tableHeight"
style="width: 100%;">
<el-table-column
prop="site"
header-align="center"
align="center"
label="工厂"
width="80">
</el-table-column>
<el-table-column
prop="buNo"
header-align="center"
align="center"
label="料号"
width="150">
</el-table-column>
<el-table-column
prop="revno"
header-align="center"
align="center"
label="版本号"
width="100">
</el-table-column>
<el-table-column
prop="routingtype"
header-align="center"
align="center"
label="工艺路径类型"
width="140">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="center"
label="状态"
width="80">
<template slot-scope="scope">
<el-tag :type="scope.row.status === 'Active' ? 'success' : 'info'">
{{ scope.row.status }}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="phaseindate"
header-align="center"
align="center"
label="生效日期"
width="120">
</el-table-column>
<el-table-column
prop="phaseoutdate"
header-align="center"
align="center"
label="失效日期"
width="120">
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
style="margin-top: 10px;">
</el-pagination>
</div>
</template>
<script>
import { routingListSearch } from '@/api/qc/qc.js'
export default {
name: 'RoutingListComponent',
props: {
partNo: {
type: String,
default: ''
},
site: {
type: [String, Number],
default: ''
},
buNo: {
type: String,
default: ''
},
tableHeight: {
type: Number,
default: 200
}
},
data () {
return {
dataList: [],
pageIndex: 1,
pageSize: 20,
totalPage: 0,
dataListLoading: false
}
},
watch: {
partNo: {
handler (newVal) {
if (newVal) {
this.getDataList()
}
},
immediate: true
},
site: {
handler (newVal) {
if (newVal && this.partNo) {
this.getDataList()
}
}
},
buNo: {
handler (newVal) {
if (newVal && this.partNo) {
this.getDataList()
}
}
}
},
methods: {
//
getDataList () {
if (!this.partNo || !this.site || !this.buNo) {
this.dataList = []
this.totalPage = 0
return
}
this.dataListLoading = true
routingListSearch({
page: this.pageIndex,
limit: this.pageSize,
partNo: this.partNo,
site: this.site,
buNo: this.buNo
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list || []
this.totalPage = data.page.totalCount || 0
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
}).catch(() => {
this.dataList = []
this.totalPage = 0
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
}
}
</script>
<style scoped>
.routing-list-component {
padding: 10px;
}
</style>
Loading…
Cancel
Save