diff --git a/src/api/part/workCenter.js b/src/api/part/workCenter.js
index 25dfae1..3845ca3 100644
--- a/src/api/part/workCenter.js
+++ b/src/api/part/workCenter.js
@@ -6,3 +6,8 @@ import { createAPI } from "@/utils/httpRequest.js";
* @returns {*}
*/
export const searchWorkCenter = data => createAPI(`/plm/workCenter/searchWorkCenter`,'get',data);
+
+/**
+ * 分页查询工作中心列表
+ */
+export const queryWorkCenterList = data => createAPI(`/plm/workCenter/queryWorkCenterList`,'post',data);
diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue
index c091be4..b14d5eb 100644
--- a/src/views/modules/part/routingManagement.vue
+++ b/src/views/modules/part/routingManagement.vue
@@ -67,12 +67,16 @@
:label="item.columnLabel">
-
{{ scope.row[item.columnProp] }}
-
![]()
+
+ {{ scope.row[item.columnProp] }}
+
+
{{ scope.row[item.columnProp] }}
-
![]()
+
@@ -94,22 +98,24 @@
+ @size-change="sizeChangeHandle"
+ @current-change="currentChangeHandle"
+ :current-page="pageIndex"
+ :page-sizes="[20, 50, 100, 200, 500]"
+ :page-size="pageSize"
+ :total="totalPage"
+ layout="total, sizes, prev, pager, next, jumper">
-
+
物料编码
物料编码
-
+
@@ -118,14 +124,16 @@
-
+
-
+
- 保存
- Copy
+ 保存
+
+ Copy
+
-
+
-
+
@@ -168,19 +182,26 @@
删除
编辑
Copy
- Build
- Retire
- 转正式Routing
+ Build
+
+ Retire
+
+ 转正式Routing
+
+ v-for="(i, index) in detailDataList"
+ :key="index"
+ :label="i.alternativeNo"
+ :value="i.alternativeNo">
@@ -193,7 +214,8 @@
-
+
@@ -225,8 +247,9 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
-
+ {{ scope.row[item.columnProp] }}
+
-
+
@@ -272,8 +296,9 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
-
+ {{ scope.row[item.columnProp] }}
+
-
-
+
+
@@ -311,7 +338,8 @@
-
+
@@ -354,7 +382,7 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
+ {{ scope.row[item.columnProp] }}
@@ -377,7 +405,8 @@
-
+
@@ -406,8 +435,9 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
-
+ {{ scope.row[item.columnProp] }}
+
@@ -447,7 +477,7 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
+ {{ scope.row[item.columnProp] }}
@@ -472,17 +502,20 @@
-
+
-
+
-
+
- 加工中心编码
+ 加工中心编码
@@ -492,35 +525,48 @@
-
+
-
+
-
+
-
+
- 调机过程中人员等级
-
+ 调机过程中人员等级
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
@@ -534,22 +580,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -561,39 +612,51 @@
-
+
-
+
+ v-for="i in alternativeList"
+ :key="i.alternativeNo"
+ :label="i.alternativeDescription"
+ :value="i.alternativeNo">
{{ i.alternativeNo }}
- {{ i.alternativeDescription }}
+ {{
+ i.alternativeDescription
+ }}
-
+
- 工序
+ 工序
工序
-
+
-
+
- 工具
+ 工具
工具
-
+
-
+
@@ -606,7 +669,8 @@
-
+
-
+
-
+
-
+
@@ -700,7 +772,8 @@
-
+
-
+
@@ -773,7 +849,8 @@
-
+
@@ -834,7 +911,8 @@
:label="item.columnLabel">
{{ scope.row[item.columnProp] }}
-
+
-
-
+
+
-
+
@@ -868,7 +949,8 @@
-
+
@@ -881,7 +963,8 @@
-
+
@@ -896,7 +979,8 @@
-
+
@@ -928,8 +1012,9 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
-
+ {{ scope.row[item.columnProp] }}
+
@@ -951,6 +1036,59 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
+ 关闭
+
+
@@ -998,6 +1136,7 @@ import {
} from '@/api/part/routingOperationWorkGuidelines.js'
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import ChooseList from '@/views/modules/common/Chooselist'
+import {queryWorkCenterList} from "../../../api/part/workCenter";
export default {
// 组件
@@ -1052,9 +1191,9 @@ export default {
}
},
// 对象
- data () {
+ data() {
return {
- initPage:false,
+ initPage: false,
// 导出
exportData: [],
exportName: 'Routing列表' + this.dayjs().format('YYYYMMDDHHmmss'),
@@ -1084,10 +1223,12 @@ export default {
plmPartNo: '',
ifsPartNo: '',
partDesc: '',
- routingType:'',
- routingRevision:'',
+ routingType: '',
+ routingRevision: '',
page: 1,
- limit: 10
+ limit: 10,
+ workCenterNo: '',
+ workCenterDesc: ''
},
// loading
queryLoading: false,
@@ -1096,6 +1237,7 @@ export default {
saveAllLoading: false,
toBecomeOfficialLoading: false,
copyLoading: false,
+ workCenterModelFlag: false,
// 初始页签
detailTable: 'routing_detail',
subDetailTable: 'routing_sub_detail',
@@ -1343,6 +1485,7 @@ export default {
workGuidelineList: [],
copyPartList: [],
toolList: [],
+ workCenterList: [],
// ======== 列表表头 ========
columnList: [
{
@@ -2325,6 +2468,47 @@ export default {
columnWidth: 80
}
],
+ workCenterColumnList: [
+ {
+ userId: this.$store.state.user.name,
+ tableName: '加工中心表',
+ columnProp: 'workCenterNo',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ userId: this.$store.state.user.name,
+ tableName: '加工中心表',
+ columnProp: 'workCenterDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 200
+ },
+ {
+ userId: this.$store.state.user.name,
+ tableName: '加工中心表',
+ columnProp: 'workCenterType',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '类型',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ ],
componentPartColumnList: [
{
columnProp: 'plmPartNo',
@@ -2434,35 +2618,35 @@ export default {
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
partDesc: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
routingType: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
phaseInDate: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
routingRevision: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
]
},
@@ -2471,21 +2655,21 @@ export default {
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
alternativeDescription: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
status: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
]
},
@@ -2494,91 +2678,91 @@ export default {
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
operationName: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
workCenterNo: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
machSetupTime: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
laborSetupTime: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
setupLaborClassNo: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
setupCrewSize: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
machRunFactor: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
laborRunFactor: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
runTimeCode: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
laborClassNo: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
efficiencyFactor: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
crewSize: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
]
},
@@ -2587,42 +2771,42 @@ export default {
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
guidelineDesc: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
guidelineType: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
signOffRequired: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
inspectionSignOffRequired: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
guidelineText: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
]
},
@@ -2631,28 +2815,28 @@ export default {
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
toolQty: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
operationNo: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
toolId: [
{
required: true,
message: ' ',
- trigger: ['blur','change']
+ trigger: ['blur', 'change']
}
],
},
@@ -2681,13 +2865,14 @@ export default {
}
},
- mounted () {
+ mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 170
})
},
- created () {},
+ created() {
+ },
activated() {
if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote') {
@@ -2704,7 +2889,7 @@ export default {
// js
methods: {
// === 报价查询 ===
- handleQueryRoutingByQuote(){
+ handleQueryRoutingByQuote() {
let params = {
site: this.$store.state.user.site,
plmPartNo: this.$route.params.partNo,
@@ -2714,13 +2899,13 @@ export default {
limit: this.pageSize
}
this.queryLoading = true
- routingManagementSearch(params).then(({data})=>{
+ routingManagementSearch(params).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
- this.$refs.selectDiv.setLengthAll( this.dataList.length)
+ this.$refs.selectDiv.setLengthAll(this.dataList.length)
}
this.queryLoading = false
})
@@ -2728,59 +2913,59 @@ export default {
// ======== 分页相关方法 ========
// 每页数
- sizeChangeHandle (val) {
+ sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
- currentChangeHandle (val) {
+ currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
// 每页数
- sizeChangeHandle2 (val) {
+ sizeChangeHandle2(val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.queryPartList()
},
// 当前页
- currentChangeHandle2 (val) {
+ currentChangeHandle2(val) {
this.pageIndex2 = val
this.queryPartList()
},
// 每页数
- sizeChangeHandle3 (val) {
+ sizeChangeHandle3(val) {
this.pageSize3 = val
this.pageIndex3 = 1
- this.queryToolList()
+ this.queryWorkCenter()
},
// 当前页
- currentChangeHandle3 (val) {
+ currentChangeHandle3(val) {
this.pageIndex3 = val
- this.queryToolList()
+ this.queryWorkCenter()
},
// 每页数
- sizeChangeHandle4 (val) {
+ sizeChangeHandle4(val) {
this.pageSize4 = val
this.pageIndex4 = 1
this.queryCopyPartModal()
},
// 当前页
- currentChangeHandle4 (val) {
+ currentChangeHandle4(val) {
this.pageIndex4 = val
this.queryCopyPartModal()
},
// copy物料列表
- queryCopyPartModal () {
+ queryCopyPartModal() {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
// 查询所有物料
@@ -2800,7 +2985,7 @@ export default {
},
// copy物料查询列表
- queryCopyPartList () {
+ queryCopyPartList() {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
// 查询所有物料
@@ -2817,7 +3002,7 @@ export default {
},
// copy物料编码失焦事件
- copyPartBlur () {
+ copyPartBlur() {
if (this.copyPartData.type === '1') {
if (this.copyRoutingData.partNo != null && this.copyRoutingData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
@@ -2852,7 +3037,7 @@ export default {
},
// 双击选择copy物料
- getCopyRowData (row) {
+ getCopyRowData(row) {
if (this.copyPartData.type === '1') {
this.copyRoutingData.partNo = row.partNo
this.copyRoutingData.partDesc = row.partDesc
@@ -2865,7 +3050,7 @@ export default {
},
// copy BOM类型改变
- copyRoutingTypeChange () {
+ copyRoutingTypeChange() {
// 获取物料的routing版本号
getRottingRevision(this.copyRoutingData).then(({data}) => {
if (data && data.code === 0) {
@@ -2878,19 +3063,19 @@ export default {
// ======== 页签切换相关方法 ========
// 明细页签选择替换
- tabDetailClick (tab, event) {
+ tabDetailClick(tab, event) {
// 刷新列表数据
this.refreshDetailTable()
},
// 子明细页签选择替换
- tabSubDetailClick (tab, event) {
+ tabSubDetailClick(tab, event) {
// 刷新列表数据
this.refreshSubDetailTable()
},
// 刷新明细页签的table数据
- refreshDetailTable () {
+ refreshDetailTable() {
if (this.detailTable === 'routing_detail') {
} else if (this.detailTable === 'routing_tool') {
@@ -2899,7 +3084,7 @@ export default {
},
// 刷新子明细页签的table数据
- refreshSubDetailTable () {
+ refreshSubDetailTable() {
if (this.subDetailTable === 'routing_sub_detail') {
}
@@ -2908,7 +3093,7 @@ export default {
// ======== 列表数据操作方法 ========
// 获取数据列表
- getDataList () {
+ getDataList() {
//如果是跳转过来的 要判断
if (localStorage.getItem('routeData')) {
let data = JSON.parse(localStorage.getItem('routeData'))
@@ -2925,17 +3110,17 @@ export default {
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
- this.$refs.selectDiv.setLengthAll( this.dataList.length)
+ this.$refs.selectDiv.setLengthAll(this.dataList.length)
if (localStorage.getItem('routeData')) {
let data = JSON.parse(localStorage.getItem('routeData'))
- if(data.routingRevision&&data.routingRevision!==''&&data.routingRevision!==null) {
+ if (data.routingRevision && data.routingRevision !== '' && data.routingRevision !== null) {
this.updateModal(this.dataList[0])
}
}
}
this.queryLoading = false
if (localStorage.getItem('routeData')) {
- this.$nextTick(()=> {
+ this.$nextTick(() => {
localStorage.removeItem('routeData')
})
}
@@ -2943,13 +3128,13 @@ export default {
},
// 复选列表信息
- selectionRouting (val) {
+ selectionRouting(val) {
this.routingSelections = val
this.$refs.selectDiv.setLengthselected(this.routingSelections.length)
},
// 查询 routingTools
- searchRoutingTools () {
+ searchRoutingTools() {
searchRoutingTools(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.routingToolList = data.rows
@@ -2961,7 +3146,7 @@ export default {
// ======== 新增/编辑模态框 ========
// routing新增模态框
- addModal () {
+ addModal() {
this.modalData = {
flag: '1',
title: 'Routing新增',
@@ -2971,7 +3156,7 @@ export default {
routingRevision: '',
routingType: 'Manufacturing',
noteText: '',
- phaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
+ phaseInDate: new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
phaseOutDate: '',
createBy: this.$store.state.user.name,
printUnit: '',
@@ -3008,7 +3193,7 @@ export default {
},
// routing编辑模态框
- async updateModal (row) {
+ async updateModal(row) {
this.modalData = {
flag: '2',
site: row.site,
@@ -3047,7 +3232,7 @@ export default {
},
// 新增替代模态框
- saveRoutingDetail () {
+ saveRoutingDetail() {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请先选择Routing物料!')
return
@@ -3101,7 +3286,7 @@ export default {
},
// 替代编辑模态框
- updateRoutingDetail () {
+ updateRoutingDetail() {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请先选择Routing物料!')
return
@@ -3154,7 +3339,7 @@ export default {
},
// 新增子明细模态框
- saveComponentModal () {
+ saveComponentModal() {
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
this.$message.warning('请先选择替代!')
return
@@ -3202,7 +3387,7 @@ export default {
},
// 查询最大工序号
- queryMaxOperationNo () {
+ queryMaxOperationNo() {
queryMaxOperationNo(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.componentData.operationNo = data.operationNo
@@ -3211,7 +3396,7 @@ export default {
},
// 编辑模态框
- updateComponentModal (row) {
+ updateComponentModal(row) {
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
// this.$message.warning('不可编辑的替代状态!')
// return
@@ -3254,7 +3439,7 @@ export default {
},
// routingTool 新增模态框
- saveRoutingTool () {
+ saveRoutingTool() {
this.routingToolData = {
flag: '1',
id: '',
@@ -3282,7 +3467,7 @@ export default {
},
// routingTool 编辑模态框
- updateToolModal (row) {
+ updateToolModal(row) {
this.routingToolData = {
flag: '2',
id: row.id,
@@ -3311,7 +3496,7 @@ export default {
// ======== 新增/编辑/删除方法 ========
// routing新增/编辑
- saveData () {
+ saveData() {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请选择物料编码!')
return
@@ -3367,7 +3552,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3386,7 +3572,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3399,22 +3586,22 @@ export default {
},
// 新增编辑模态框关闭
- closeModal () {
+ closeModal() {
this.modalFlag = false
},
// 新增编辑模态框关闭
- closeModalX (done) {
+ closeModalX(done) {
done()
},
// routing删除
- delModal () {
- if(this.routingSelections.length === 0){
+ delModal() {
+ if (this.routingSelections.length === 0) {
this.$message.warning('请勾选要删除的Routing!')
return
}
- this.$confirm(`是否删除这 `+ this.routingSelections.length +` 条Routing?`, '提示', {
+ this.$confirm(`是否删除这 ` + this.routingSelections.length + ` 条Routing?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -3430,7 +3617,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3442,7 +3630,7 @@ export default {
},
// 查询物料
- queryPartList () {
+ queryPartList() {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
queryPartListRouting(this.partData).then(({data}) => {
@@ -3461,7 +3649,7 @@ export default {
},
// 物料编码失焦事件
- partNoBlur () {
+ partNoBlur() {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
this.partData.ifsPartNo = this.modalData.partNo
@@ -3490,7 +3678,7 @@ export default {
},
// 双击选中物料
- getRowData (row) {
+ getRowData(row) {
this.modalData.partNo = row.partNo
this.modalData.partDesc = row.partDesc
this.modalData.printUnit = row.printUnit
@@ -3509,7 +3697,7 @@ export default {
},
// 工艺类型改变
- routingTypeChange () {
+ routingTypeChange() {
// 获取物料的routing版本号
getRottingRevision(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@@ -3523,7 +3711,7 @@ export default {
},
// 选中工序
- getComponentRowData (row) {
+ getComponentRowData(row) {
this.routingToolData.operationId = row.operationId
this.routingToolData.operationNo = row.operationNo
this.routingToolData.operationName = row.operationName
@@ -3531,7 +3719,7 @@ export default {
},
// 工序列表
- queryOperationList () {
+ queryOperationList() {
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
this.$message.warning('请先选择替代!')
return
@@ -3555,7 +3743,7 @@ export default {
},
// 查工具列表
- queryToolList () {
+ queryToolList() {
this.toolData.limit = this.pageSize3
this.toolData.page = this.pageIndex3
queryToolList(this.toolData).then(({data}) => {
@@ -3570,7 +3758,7 @@ export default {
},
// 工序输入校验
- routingToolOperationBlur () {
+ routingToolOperationBlur() {
let tempData = {
site: this.routingToolData.site,
partNo: this.routingToolData.partNo,
@@ -3593,7 +3781,7 @@ export default {
},
// 工具输入校验
- routingToolBlur (tagNo) {
+ routingToolBlur(tagNo) {
let tempData = {
tagno: tagNo,
conditionSql: " and tool_id = '" + this.routingToolData.toolId + "'" + " and site = '" + this.routingToolData.site + "'"
@@ -3611,14 +3799,14 @@ export default {
},
// 双击选中工具
- doubleClickTool (row) {
+ doubleClickTool(row) {
this.routingToolData.toolId = row.toolId
this.routingToolData.toolDescription = row.toolDescription
this.toolModelFlag = false
},
// 替代列表
- queryAlternativeList () {
+ queryAlternativeList() {
// 查询所有替代
queryAlternativeListByPartNo(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@@ -3632,7 +3820,7 @@ export default {
},
// 表格的新增
- rowClassName({ row, rowIndex }) {
+ rowClassName({row, rowIndex}) {
row.xh = rowIndex + 1
},
@@ -3641,12 +3829,12 @@ export default {
this.checkedDetail = selection
},
- toolSelectionChange (selection) {
+ toolSelectionChange(selection) {
this.checkedTool = selection
},
// 删除子物料
- deleteComponentPart () {
+ deleteComponentPart() {
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
// this.$message.warning('不可编辑的替代状态!')
// return
@@ -3671,7 +3859,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3684,16 +3873,16 @@ export default {
},
// 子物料
- componentClickRow (row) {
+ componentClickRow(row) {
this.$refs.componentTable.toggleRowSelection(row)
},
- toolClickRow (row) {
+ toolClickRow(row) {
this.$refs.toolTable.toggleRowSelection(row)
},
// 新增子明细方法
- componentDataSave (isClose) {
+ componentDataSave(isClose) {
if (this.componentData.partNo === '' || this.componentData.partNo == null) {
this.$message.warning('请选择主记录物料编码!')
return
@@ -3771,7 +3960,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3788,7 +3978,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3800,7 +3991,7 @@ export default {
},
// 回车事件
- focusNextInput (index, type) {
+ focusNextInput(index, type) {
let aaa = ''
if (this.subDetailList.length - 1 === index) {
aaa = `${type}0`
@@ -3813,7 +4004,7 @@ export default {
},
// 保存主表信息
- saveRoutingHeader () {
+ saveRoutingHeader() {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请先选择Routing物料!')
return
@@ -3859,7 +4050,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3871,7 +4063,7 @@ export default {
},
// 复制Routing的模态框
- copyRoutingRevision () {
+ copyRoutingRevision() {
this.copyRoutingData = {
site: this.modalData.site,
partNo: this.modalData.partNo,
@@ -3904,7 +4096,7 @@ export default {
},
// 复制Routing的方法
- copyRouting () {
+ copyRouting() {
if (this.copyRoutingData.partNo === '' || this.copyRoutingData.partNo == null) {
this.$message.warning('请选择Routing物料!')
return
@@ -3932,7 +4124,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -3940,13 +4133,13 @@ export default {
})
}
this.copyLoading = false
- }).catch(()=>{
+ }).catch(() => {
this.copyLoading = false
})
},
// 复制alternative的模态框
- copyRoutingAlternative () {
+ copyRoutingAlternative() {
this.copyAlternativeData = {
site: this.detailData.site,
partNo: this.detailData.partNo,
@@ -3984,7 +4177,7 @@ export default {
},
// 工艺指导模态框
- workGuidelineModal (row) {
+ workGuidelineModal(row) {
this.workGuidelineData = {
site: this.modalData.site,
partNo: this.modalData.partNo,
@@ -4002,7 +4195,7 @@ export default {
},
// 获取 workGuideline
- getRoutingWorkGuideline () {
+ getRoutingWorkGuideline() {
getRoutingWorkGuideline(this.workGuidelineData).then(({data}) => {
if (data && data.code === 0) {
this.workGuidelineList = data.rows
@@ -4013,12 +4206,12 @@ export default {
},
// 复选列表信息
- selectionWorkGuideline (val) {
+ selectionWorkGuideline(val) {
this.workGuidelineSelections = val
},
// workGuideline 新增模态框
- saveWorkGuideline () {
+ saveWorkGuideline() {
this.saveWorkGuidelineData = {
flag: '1',
id: '',
@@ -4055,7 +4248,7 @@ export default {
},
// workGuideline 编辑模态框
- updateWorkGuidelineModal (row) {
+ updateWorkGuidelineModal(row) {
this.saveWorkGuidelineData = {
flag: '2',
id: row.id,
@@ -4086,7 +4279,7 @@ export default {
},
// workGuideline 新增方法
- workGuidelineCommit () {
+ workGuidelineCommit() {
if (this.saveWorkGuidelineData.guidelineSeq === '' || this.saveWorkGuidelineData.guidelineSeq == null) {
this.$message.warning('请输入序号!')
return
@@ -4120,7 +4313,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4137,7 +4331,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4149,12 +4344,12 @@ export default {
},
// 删除 workGuideline
- deleteModal () {
- if(this.workGuidelineSelections.length === 0){
+ deleteModal() {
+ if (this.workGuidelineSelections.length === 0) {
this.$message.warning('请勾选要删除的工艺指导!')
return
}
- this.$confirm(`是否删除这 `+ this.workGuidelineSelections.length +` 条工艺指导?`, '提示', {
+ this.$confirm(`是否删除这 ` + this.workGuidelineSelections.length + ` 条工艺指导?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -4171,7 +4366,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4183,7 +4379,7 @@ export default {
},
// 复制alternative的方法
- copyAlternative () {
+ copyAlternative() {
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) {
this.$message.warning('请选择Routing物料!')
return
@@ -4210,7 +4406,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4218,13 +4415,13 @@ export default {
})
}
this.copyLoading = false
- }).catch(()=>{
+ }).catch(() => {
this.copyLoading = false
})
},
// 新增替代方法
- detailDataSave () {
+ detailDataSave() {
if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) {
this.$message.warning('请先选择Routing物料!')
return
@@ -4261,7 +4458,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4281,7 +4479,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4294,7 +4493,7 @@ export default {
},
// 删除替代
- deleteRoutingDetail () {
+ deleteRoutingDetail() {
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
this.$message.warning('请选择要删除的替代编码!')
return
@@ -4318,7 +4517,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4330,7 +4530,7 @@ export default {
},
// 修改替代状态为 Buildable
- updateStatusToBuildable () {
+ updateStatusToBuildable() {
this.$confirm(`是否修改状态为Buildable?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -4346,7 +4546,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
@@ -4358,7 +4559,7 @@ export default {
},
// 修改替代状态为 Obsolete
- updateStatusToObsolete () {
+ updateStatusToObsolete() {
this.$confirm(`是否修改状态为Obsolete?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -4373,7 +4574,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
@@ -4385,7 +4587,7 @@ export default {
},
// 替代改变事件
- alternativeChange () {
+ alternativeChange() {
queryRoutingComponent(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailDataList = data.rows.detailDataList
@@ -4400,7 +4602,7 @@ export default {
},
// 临时Routing转为正式Routing
- toBecomeOfficialRouting () {
+ toBecomeOfficialRouting() {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
toBecomeOfficialRouting(this.detailData).then(({data}) => {
@@ -4411,7 +4613,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4419,13 +4622,13 @@ export default {
})
}
this.toBecomeOfficialLoading = false
- }).catch(()=>{
+ }).catch(() => {
this.toBecomeOfficialLoading = false
})
},
// 新增 routingTool
- routingToolSave () {
+ routingToolSave() {
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
this.$message.warning('请选择替代!')
return
@@ -4451,7 +4654,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4468,7 +4672,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4480,7 +4685,7 @@ export default {
},
// 删除 routingTool
- deleteRoutingTool () {
+ deleteRoutingTool() {
if (this.checkedTool.length === 0) {
this.$message.warning('请选择要删除的工具!')
return
@@ -4501,7 +4706,8 @@ export default {
message: '操作成功',
type: 'success',
duration: 1500,
- onClose: () => {}
+ onClose: () => {
+ }
})
} else {
this.$alert(data.msg, '错误', {
@@ -4514,9 +4720,9 @@ export default {
},
// ======= 正则校验 =======
- handleInput (value, type) {
+ handleInput(value, type) {
// 大于等于0,且只能输入4位小数
- let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
+ let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/, '$1')
if (val == null || val == undefined || val == '') {
val = 0
}
@@ -4537,13 +4743,13 @@ export default {
// ======== chooseList相关方法 ========
// 获取基础数据列表S
- getBaseList (val, type) {
+ getBaseList(val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 118) {
- if(type === 1) {
+ if (type === 1) {
strVal = this.componentData.laborClassNo
} else if (type === 2) {
strVal = this.componentData.setupLaborClassNo
@@ -4560,7 +4766,7 @@ export default {
},
// 列表方法的回调
- getBaseData (val) {
+ getBaseData(val) {
if (this.tagNo === 118) {
if (this.tagNo1 === 1) {
this.componentData.laborClassNo = val.level_id
@@ -4583,7 +4789,7 @@ export default {
},
// 通过加工中心查人员等级
- getLaborClassByWorkCenter () {
+ getLaborClassByWorkCenter() {
let tempData = {
site: this.$store.state.user.site,
levelId: this.componentData.workCenterNo
@@ -4601,17 +4807,17 @@ export default {
},
// 机器调机时间改变
- changeMachSetupTime () {
+ changeMachSetupTime() {
this.componentData.laborSetupTime = this.componentData.machSetupTime
},
// 机器单位产出改变
- changeMachRunFactor () {
+ changeMachRunFactor() {
this.componentData.laborRunFactor = this.componentData.machRunFactor
},
// 加工中心输入校验
- workCenterBlur (tagNo) {
+ workCenterBlur(tagNo) {
if (this.componentData.workCenterNo != null && this.componentData.workCenterNo !== '') {
let tempData = {
tagno: tagNo,
@@ -4634,7 +4840,7 @@ export default {
},
// 人员等级输入校验
- laborClassBlur (tagNo) {
+ laborClassBlur(tagNo) {
if (this.componentData.laborClassNo != null && this.componentData.laborClassNo !== '') {
let tempData = {
tagno: tagNo,
@@ -4654,7 +4860,7 @@ export default {
},
// 调机时人员等级输入校验
- setupLaborClassBlur (tagNo) {
+ setupLaborClassBlur(tagNo) {
if (this.componentData.setupLaborClassNo != null && this.componentData.setupLaborClassNo !== '') {
let tempData = {
tagno: tagNo,
@@ -4675,7 +4881,7 @@ export default {
// ======== 导出相关方法 ========
// 导出excel
- async createExportData () {
+ async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await routingManagementSearch(this.searchData).then(({data}) => {
@@ -4684,11 +4890,13 @@ export default {
return this.resultList
},
- startDownload () {},
+ startDownload() {
+ },
- finishDownload () {},
+ finishDownload() {
+ },
- fields () {
+ fields() {
let json = '{'
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
@@ -4703,22 +4911,47 @@ export default {
},
// 切换到Bom
- checkOutToBom (partNo) {
+ checkOutToBom(partNo) {
if (this.$router.resolve('part-bomManagement').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
} else {
- this.$router.push({name:"part-bomManagement",params:{partNo: partNo}})
+ this.$router.push({name: "part-bomManagement", params: {partNo: partNo}})
}
},
// 切换到inventoryPart
- toPartMenu (ifsPartNo) {
+ toPartMenu(ifsPartNo) {
if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
} else {
- this.$router.push({name:`part-partInformation`,params:{ifsPartNo: ifsPartNo},})
+ this.$router.push({name: `part-partInformation`, params: {ifsPartNo: ifsPartNo},})
}
},
+
+ // 查询加工中心列表
+ queryWorkCenter() {
+ this.searchData.limit = this.pageSize3
+ this.searchData.page = this.pageIndex3
+ queryWorkCenterList(this.searchData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.workCenterList = data.page.list
+ this.pageIndex3 = data.page.currPage
+ this.pageSize3 = data.page.pageSize
+ this.totalPage3 = data.page.totalCount
+ this.workCenterModelFlag = true
+ } else {
+ this.workCenterList = []
+ }
+ })
+ },
+
+ // 双击选中加工中心
+ getWorkCenterRowData (row) {
+ this.modalData.workCenterNo = row.workCenterNo
+ this.modalData.workCenterDesc = row.workCenterDesc
+ this.modalData.workCenterType = row.workCenterType
+ this.workCenterModelFlag = false
+ },
}
}
@@ -4727,23 +4960,28 @@ export default {
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
+
/deep/ .detail-tab .el-tabs__content {
height: 165px;
padding: 15px 0px 0px 0px;
}
+
/deep/ .sub_detail-tab .el-tabs__content {
height: 280px;
padding: 0px;
}
-.numInput /deep/ .el-input__inner{
+
+.numInput /deep/ .el-input__inner {
text-align: right;
}
-/deep/ .inlineNumber input::-webkit-outer-spin-button,
-/deep/ .inlineNumber input::-webkit-inner-spin-button {
+
+/deep/ .inlineNumber input::-webkit-outer-spin-button,
+/deep/ .inlineNumber input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
-/deep/ .inlineNumber input[type="number"]{
+
+/deep/ .inlineNumber input[type="number"] {
-moz-appearance: textfield;
padding-right: 5px !important;
}