Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||
[0531/081503.881:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||
|
||||
187
src/api/ManufacturingCenter/CreateIntakeList.js
Normal file
187
src/api/ManufacturingCenter/CreateIntakeList.js
Normal file
@@ -0,0 +1,187 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床查询
|
||||
export function searchmachine(check, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据',
|
||||
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 分组查询
|
||||
export function searchTeam(machineNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + machineNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 外购件、标准件查询
|
||||
export function searchPurchasePart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_外购件出库_零件查询',
|
||||
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 基本件、通用件查询
|
||||
export function searchBasicPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_基本件出库_零件查询',
|
||||
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 车间采购件查询
|
||||
export function searchHoursePart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_车间采购出库_零件查询',
|
||||
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领料单查询
|
||||
export function searchList(pageCurrent, pageSize, listNumber_check, listNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_领料单_领料单查询',
|
||||
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 领料单明细查询
|
||||
export function searchListDetail(listNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_领料单_领料单明细查询',
|
||||
param: '领料单流水号=' + listNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 创建领料单
|
||||
export function addList(peopleNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_领料单增加',
|
||||
param: '领料人流水号=' + peopleNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除领料单
|
||||
export function dropList(PickingListNumberx) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_领料单删除',
|
||||
param: '领料单流水号=' + PickingListNumberx
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除领料单明细
|
||||
export function dropListDetail(DetailNumberx, isBacklog) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_领料单明细删除',
|
||||
param: '领料单明细流水号=' + DetailNumberx + '&是否是滞货=' + isBacklog
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除领料单明细/基本件
|
||||
export function dropListDetailBasic(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_领料单明细删除_基本件',
|
||||
param: `领料单明细流水号=${params[0]}&收件信息ID=${params[1]}&返还数量=${params[2]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加领料单明细
|
||||
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, outNumber, partType, Note, data1, data2, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_领料单明细增加',
|
||||
param: '领料单流水号=' + PickingListNumberx + '&项目流水号=' + projectnumber + '&机床流水号=' + machinenumber + '&组件流水号=' + teamNumber + '&出库数量=' + outNumber + '&零件类型=' + partType + '&备注\\=' + Note + '&工艺计划流水号=' + data1 + '&收件信息ID=' + data2 + '&采购合同明细流水号=' + data4 + '&请购单明细流水号=' + data5 + '&货位流水号=' + data6 + '&出库类型=' + data7 + '&物料与货位对照流水号=' + data8 + '&名称=' + data9 + '&物料规格\\=' + data10 + '&物料型号=' + data11 + '&零件图号=' + data12 + '&材料=' + data13
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询滞货件
|
||||
export function searchBacklogPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_滞货件领料_查询数据',
|
||||
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领料滞货件
|
||||
export function submitAddBacklogList(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_领料单明细_滞货件_增加数据',
|
||||
param: `领料单流水号=${params[0]}&项目流水号=${params[1]}&机床流水号=${params[2]}&组件流水号=${params[3]}&出库数量=${params[4]}&备注\\=${params[5]}&货位流水号=${params[6]}&物料与货位对照流水号=${params[7]}&名称=${params[8]}&物料规格\\=${params[9]}&物料型号=${params[10]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,5 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 外购备料出库
|
||||
export function change3(Number, code, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_自家备料到货更改',
|
||||
param: '工序流水号组=' + Number + '&工作者考勤编号=' + code + '&工艺计划流水号组=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询零件
|
||||
export function searchtable(num1, num2, num3, pageCurrent, pageSize) {
|
||||
return request({
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询零件未编制(包含借用件)
|
||||
export function getPartnames3(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_编制工艺_按人员机床组号或图号查',
|
||||
param: '工艺人员编号=' + num1 + '&机床组号或图号=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询零件已编制(包含借用件)
|
||||
export function getPartnames4(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_查询已完成工艺制定零件_按人员机床组号或图号查',
|
||||
param: '工艺人员编号=' + num1 + '&机床组号或图号=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 典艺查询<高精原有数据>
|
||||
export function searchProcess11(num) {
|
||||
return request({
|
||||
@@ -479,3 +503,15 @@ export function TableAddLi(a, b, c, num0, num1) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改备注
|
||||
export function modifyRemark(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工艺计划_工艺修改记录_增加数据',
|
||||
param: `修改人员编号=${params[0]}&修改备注=${params[1]}&工艺计划流水号=${params[2]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
88
src/api/ManufacturingCenter/SparePartsOut.js
Normal file
88
src/api/ManufacturingCenter/SparePartsOut.js
Normal file
@@ -0,0 +1,88 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询零件
|
||||
export function searchtable(num1, num2, num3, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料到货查询',
|
||||
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料到货_check=' + num3,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询零件工艺
|
||||
export function searchtable2(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_备料打印_查询工序信息',
|
||||
param: '工艺计划流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 完成备料工序
|
||||
export function handlechange(Number, code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工序_修改数据_工作者',
|
||||
param: '工序流水号=' + Number + '&工作者考勤编号=' + code
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询外购备料零件
|
||||
export function searchtable3(num, num1, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_外购备料查询',
|
||||
param: '零件图号_check=' + num + '&零件图号=' + num1,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 自家备料出库
|
||||
export function change(Number, code, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料到货_状态更改',
|
||||
param: '工艺计划流水号=' + Number + '&重量=' + code + '&单价=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 外购备料出库
|
||||
export function change2(Number, code, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_外购备料到货更改',
|
||||
param: '工序流水号组=' + Number + '&工作者考勤编号=' + code + '&工艺计划流水号组=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function handlechange2(Number, code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工序_修改数据_修改实际完成时间',
|
||||
param: '工序流水号=' + Number + '&实际完成时间=' + code
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询原材料库存
|
||||
export function searchRawMaterial(num, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_原材料库存管理_查询',
|
||||
param: '原材料名称=' + num,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加采购计划明细
|
||||
export function addMateriel2(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_采购计划明细_增加数据2',
|
||||
param: `采购计划流水号=${num1}&原材料流水号组=${num2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// ////////////////////////////////////////////////////////////////////////////////0529新加↑
|
||||
|
||||
// 查询外购备料列表
|
||||
export function initPartDrawing(check1, name) {
|
||||
return request({
|
||||
|
||||
1139
src/views/ManufacturingCenter/CreateIntakeList/index.vue
Normal file
1139
src/views/ManufacturingCenter/CreateIntakeList/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,14 +5,13 @@
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
|
||||
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
|
||||
<!--<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料出库</el-button>-->
|
||||
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
|
||||
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit2()">自家备料确认</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
@@ -28,25 +27,6 @@
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="request" label="重量(kg)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.重量" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="request" label="单价(元)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleChange1(scope.row)">出库</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -64,14 +44,11 @@
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="total2=0;pageSize2=10; pageCurrent2=1;searchTable2()">查询</el-button>
|
||||
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料出库</el-button>
|
||||
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料确认</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
@@ -115,11 +92,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2, change3 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
arrest2: [],
|
||||
editTime: '',
|
||||
bianliang1: [],
|
||||
bianliang2: [],
|
||||
@@ -153,6 +131,25 @@ export default {
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange2(val) {
|
||||
this.arrest2 = val
|
||||
},
|
||||
edit2() {
|
||||
this.bianliang1 = []
|
||||
this.bianliang2 = []
|
||||
if (this.arrest2.length === 0) {
|
||||
this.$message.warning('请选择零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.arrest2.length; i++) {
|
||||
this.bianliang1.push(this.arrest2[i].工艺计划流水号)
|
||||
this.bianliang2.push(this.arrest2[i].工序流水号)
|
||||
}
|
||||
change3(this.bianliang2, '0000', this.bianliang1).then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
}
|
||||
},
|
||||
// ////////////////////////////////////////////////////////////////////////////0530新↑
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
@@ -195,25 +192,19 @@ export default {
|
||||
return i
|
||||
}
|
||||
},
|
||||
// 自家备料出库
|
||||
// 自家备料确认
|
||||
handleChange1(row) {
|
||||
if (row.重量 === '' || row.重量 === null) {
|
||||
this.$message.error('请输入重量')
|
||||
} else if (row.单价 === '' || row.单价 === null) {
|
||||
this.$message.error('请输入单价')
|
||||
} else {
|
||||
var date = new Date()
|
||||
var month = this.zeroFill(date.getMonth() + 1)
|
||||
var day = this.zeroFill(date.getDate())
|
||||
this.editTime = date.getFullYear() + '-' + month + '-' + day
|
||||
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
|
||||
handlechange(row.工序流水号, '0000').then(response => {
|
||||
handlechange2(row.工序流水号, this.form.完成时间)
|
||||
})
|
||||
}).then(response => {
|
||||
this.searchTable()
|
||||
var date = new Date()
|
||||
var month = this.zeroFill(date.getMonth() + 1)
|
||||
var day = this.zeroFill(date.getDate())
|
||||
this.editTime = date.getFullYear() + '-' + month + '-' + day
|
||||
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
|
||||
handlechange(row.工序流水号, '0000').then(response => {
|
||||
handlechange2(row.工序流水号, this.form.完成时间)
|
||||
})
|
||||
}
|
||||
}).then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.arrest = val
|
||||
|
||||
@@ -76,6 +76,11 @@
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺员" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="checked = false;partNum=[];partNumValue = '';typeValue = '';partName = '';material = '';materialName = '';prepareMateriel = '';spec = '';batchNum = '';searchPartsByMachineGroup();">
|
||||
<el-radio v-model="radio" :label="1">未编制</el-radio>
|
||||
<el-radio v-model="radio" :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>工艺员:</span>
|
||||
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();">
|
||||
<el-option
|
||||
@@ -9,22 +13,28 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<!--<span>零件号:</span>
|
||||
<el-input v-model="partNumber" clearable placeholder="零件号" size="small" style="width:200px">
|
||||
<el-button slot="append" icon="el-icon-right" @click="searchParts();partNumValue=''"/>
|
||||
</el-input>-->
|
||||
<span>机床-分组 或 零件号:</span>
|
||||
<el-input v-model="machine_Group_part" clearable placeholder="例:机床号-组号 或 零件号" size="small" style="width:260px">
|
||||
<el-button slot="append" icon="el-icon-right" @click="searchPartsByMachineGroup();partNumValue=''"/>
|
||||
</el-input>
|
||||
<el-select v-model="partNumValue" placeholder="选择零件编制工艺定额" size="small" @clear="clearDetail" @change="searchDetail()">
|
||||
<el-option
|
||||
v-for="item in partNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
:value="item.value">
|
||||
<b style="float: left">{{ item.label }}</b>
|
||||
<b style="float: right; color: #8492a6; font-size: 13px">-{{ item.group }}</b>
|
||||
<b style="float: right; color: #8492a6; font-size: 13px"> {{ item.machine }}</b>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整
|
||||
</el-button>
|
||||
<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式
|
||||
</el-button>
|
||||
<!--<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>-->
|
||||
<!--<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式</el-button>-->
|
||||
<div v-show="isShow">
|
||||
<span>种类:</span>
|
||||
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
|
||||
@@ -42,7 +52,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-col style="width:210px">
|
||||
<span>物料类型:</span>
|
||||
<el-select v-model="materielValue" size="small" style="margin-top: 20px;width:120px" placeholder="物料类型" @change="clear()">
|
||||
<el-option
|
||||
@@ -160,6 +170,7 @@
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="saveApprove">保存
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isShow1" type="warning" size="small" icon="el-icon-tickets" @click="saveCompiled">记录修改备注</el-button>
|
||||
</el-row>
|
||||
<div style="margin-top: 5px;margin-bottom: 10px;display: inline-block"><span>符号:</span>
|
||||
<el-tag type="info">∮</el-tag>
|
||||
@@ -203,21 +214,10 @@
|
||||
@change="handleChange(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" prop="name" label="工艺名称" width="130" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺名称"
|
||||
:disabled="disabled"
|
||||
readonly
|
||||
style="width:100%"
|
||||
@dblclick.native="tableSearch(scope.$index)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="hard" label="难度等级" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.工艺难度等级"
|
||||
:disabled="disabled"
|
||||
clearable
|
||||
placeholder=""
|
||||
@change="hardEdit(scope.row)">
|
||||
@@ -227,17 +227,6 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" prop="request" label="工艺要求" align="center" min-width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺要求"
|
||||
:rows="1"
|
||||
:disabled="disabled"
|
||||
type="textarea"
|
||||
@dblclick.native="tableSearch(scope.$index)"
|
||||
@change="requestEdit(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="request" label="工艺要求" align="center" min-width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-autocomplete
|
||||
@@ -264,22 +253,18 @@
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteOne(scope.row)"/>
|
||||
@@ -543,7 +528,10 @@ import {
|
||||
singleChange,
|
||||
readyChange,
|
||||
TableAddLi1,
|
||||
TableAddLi
|
||||
TableAddLi,
|
||||
getPartnames3,
|
||||
getPartnames4,
|
||||
modifyRemark
|
||||
} from '@/api/ManufacturingCenter/ProcessQuotaEstablishment'
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -554,6 +542,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
machine_Group_part: '',
|
||||
partNumber: '',
|
||||
options: [],
|
||||
weight: '',
|
||||
@@ -710,13 +699,33 @@ export default {
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.fetchData()
|
||||
this.initPerson()
|
||||
this.getList()
|
||||
this.openCascader()
|
||||
},
|
||||
methods: {
|
||||
// 保存已编制
|
||||
saveCompiled() {
|
||||
if (this.partNumValue) {
|
||||
this.$prompt('请输入工艺修改备注', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
console.log(value, '日期', this.id, this.partNumValue)
|
||||
modifyRemark(this.id, value, this.partNumValue)
|
||||
this.$message.success('记录成功')
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择零件')
|
||||
}
|
||||
},
|
||||
blurRequest(row) {
|
||||
selectRequest(row.工序流水号, row.工艺计划流水号, row.工艺编号, row.工序顺序, row.工艺要求).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -1073,6 +1082,43 @@ export default {
|
||||
this.tableMaterial = response.data.rows
|
||||
})
|
||||
},
|
||||
// 根据机床号-组号查询零件(包含借用件)
|
||||
searchPartsByMachineGroup() {
|
||||
this.tableData = []
|
||||
this.partNum = []
|
||||
if (this.radio === 1) { // 未编制
|
||||
this.disabled = false
|
||||
this.isShow1 = true
|
||||
this.isShow2 = false
|
||||
this.checked1 = true
|
||||
getPartnames3(this.CraftmenValue, this.machine_Group_part).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partNum.push({
|
||||
label: response.data[i].零件图号,
|
||||
value: response.data[i].工艺计划流水号,
|
||||
machine: response.data[i].机床图号,
|
||||
group: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else { // 已编制
|
||||
this.isShow = true
|
||||
this.isShow1 = false
|
||||
this.isShow2 = true
|
||||
this.disabled = true
|
||||
this.checked1 = false
|
||||
getPartnames4(this.CraftmenValue, this.machine_Group_part).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partNum.push({
|
||||
label: response.data[i].零件图号,
|
||||
value: response.data[i].工艺计划流水号,
|
||||
machine: response.data[i].机床图号,
|
||||
group: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
searchParts() { // 根据条件查零件号
|
||||
this.tableData = []
|
||||
this.partNum = []
|
||||
@@ -1457,6 +1503,7 @@ export default {
|
||||
this.spec = ''
|
||||
this.newNum = ''
|
||||
this.searchParts()
|
||||
this.searchPartsByMachineGroup()
|
||||
this.$message.success('保存成功')
|
||||
})
|
||||
}
|
||||
|
||||
294
src/views/ManufacturingCenter/SparePartsOut/index.vue
Normal file
294
src/views/ManufacturingCenter/SparePartsOut/index.vue
Normal file
@@ -0,0 +1,294 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
|
||||
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
|
||||
<!--<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料确认</el-button>-->
|
||||
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="240px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备料" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量(kg)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.重量" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(元)" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleChange1(scope.row)">备料确认</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="total2=0;pageSize2=10; pageCurrent2=1;searchTable2()">查询</el-button>
|
||||
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料确认</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="240px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading2"
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
editTime: '',
|
||||
bianliang1: [],
|
||||
bianliang2: [],
|
||||
num: 0,
|
||||
arrest: [],
|
||||
all: false,
|
||||
partName: '',
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
loading2: false,
|
||||
partName2: '',
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.Data = []
|
||||
if (this.partName !== '' && this.partName !== null) {
|
||||
this.partNamecheck = true
|
||||
} else {
|
||||
this.partNamecheck = false
|
||||
}
|
||||
searchtable(this.partNamecheck, this.partName, !this.all, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading = false
|
||||
} else {
|
||||
this.Data = response.data.rows
|
||||
this.total = response.data.total
|
||||
}
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.Data.length; i++) {
|
||||
searchtable2(this.Data[i].工艺计划流水号).then(response => {
|
||||
this.tableData.push({
|
||||
工艺计划流水号: this.Data[i].工艺计划流水号,
|
||||
零件名称: this.Data[i].零件名称,
|
||||
零件图号: this.Data[i].零件图号,
|
||||
备料到货: this.Data[i].备料到货,
|
||||
工艺要求: response.data[0].工艺要求,
|
||||
工序流水号: response.data[0].工序流水号,
|
||||
重量: response.data[0].重量,
|
||||
单价: 0
|
||||
})
|
||||
})
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
zeroFill(i) {
|
||||
if (i >= 0 && i <= 9) {
|
||||
return '0' + i
|
||||
} else {
|
||||
return i
|
||||
}
|
||||
},
|
||||
// 自家备料确认
|
||||
handleChange1(row) {
|
||||
if (row.重量 === '' || row.重量 === null) {
|
||||
this.$message.error('请输入重量')
|
||||
} else if (row.单价 === '' || row.单价 === null) {
|
||||
this.$message.error('请输入单价')
|
||||
} else {
|
||||
var date = new Date()
|
||||
var month = this.zeroFill(date.getMonth() + 1)
|
||||
var day = this.zeroFill(date.getDate())
|
||||
this.editTime = date.getFullYear() + '-' + month + '-' + day
|
||||
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
|
||||
handlechange(row.工序流水号, '0000').then(response => {
|
||||
handlechange2(row.工序流水号, this.form.完成时间)
|
||||
})
|
||||
}).then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.arrest = val
|
||||
},
|
||||
searchTable2() {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.Data2 = []
|
||||
if (this.partName2 !== '' && this.partName2 !== null) {
|
||||
this.partNamecheck2 = 1
|
||||
} else {
|
||||
this.partNamecheck2 = 0
|
||||
}
|
||||
searchtable3(this.partNamecheck2, this.partName2, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading2 = false
|
||||
} else {
|
||||
this.Data2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.Data2.length; i++) {
|
||||
searchtable2(this.Data2[i].工艺计划流水号).then(response => {
|
||||
this.tableData2.push({
|
||||
工艺计划流水号: this.Data2[i].工艺计划流水号,
|
||||
零件名称: this.Data2[i].零件名称,
|
||||
零件图号: this.Data2[i].零件图号,
|
||||
重量1: this.Data2[i].重量1,
|
||||
单价: this.Data2[i].单价,
|
||||
备注1: this.Data2[i].备注1,
|
||||
工序流水号: response.data[0].工序流水号
|
||||
})
|
||||
})
|
||||
this.loading2 = false
|
||||
}
|
||||
})
|
||||
},
|
||||
edit() {
|
||||
this.bianliang1 = []
|
||||
this.bianliang2 = []
|
||||
if (this.arrest.length === 0) {
|
||||
this.$message.warning('请选择零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.arrest.length; i++) {
|
||||
this.bianliang1.push(this.arrest[i].工艺计划流水号)
|
||||
this.bianliang2.push(this.arrest[i].工序流水号)
|
||||
}
|
||||
change2(this.bianliang2, '0000', this.bianliang1).then(response => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -50,28 +50,28 @@
|
||||
<el-table
|
||||
v-loading="loading0"
|
||||
:data="tableData"
|
||||
style="width: 100%;max-height: 600px"
|
||||
height="600"
|
||||
style="width: 100%;max-height: 610px"
|
||||
height="610"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="序号" type="index" width="60px"/>
|
||||
<el-table-column align="center" label="机床图号" width="170px">
|
||||
<el-table-column align="center" label="序号" type="index" width="50px"/>
|
||||
<el-table-column align="center" label="机床图号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="140px">
|
||||
<el-table-column align="center" label="组号" width="60px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" width="200px">
|
||||
<el-table-column align="center" label="零件图号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" width="180px">
|
||||
<el-table-column align="center" label="零件名称" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -81,17 +81,17 @@
|
||||
{{ scope.row.投产总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="投产时间" width="130px">
|
||||
<el-table-column align="center" label="投产时间" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传递时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件状态" width="750px">
|
||||
<el-table-column align="center" label="零件状态" min-width="960px">
|
||||
<template slot-scope="scope">
|
||||
<el-steps :active="scope.row.考核状态" finish-status="success" simple>
|
||||
<el-steps id="StatusQuery" :active="scope.row.考核状态" finish-status="success" simple>
|
||||
<el-step title="投产" />
|
||||
<el-step title="工艺" />
|
||||
<el-step title="定额" />
|
||||
<el-step title="工艺定额" />
|
||||
<!--<el-step title="定额" />-->
|
||||
<el-step title="平衡" />
|
||||
<el-step title="完成" />
|
||||
<el-step title="入库" />
|
||||
@@ -491,3 +491,8 @@ export default {
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
#StatusQuery {
|
||||
padding: 8px 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,75 +1,69 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>零件图号:</span>
|
||||
<el-select v-model="partDrawingNumberValue" placeholder="零件图号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in partDrawingNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
</div>
|
||||
<div v-show="showMaterialTable">
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;max-height: 460px;"
|
||||
height="330"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-col :span="9">
|
||||
<span>原材料名称:</span>
|
||||
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
|
||||
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchRawMaterial()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel2">选入原材料</el-button>
|
||||
<el-table :data="tableData" border style="width: 100%;height: 460px;margin-top: 15px;" height="330" size="mini" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="零件图号" min-width="150" align="center">
|
||||
<el-table-column label="原材料名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14" style="margin-left: 20px">
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="mini" clearable style="width: 120px"/>
|
||||
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入物料</el-button>
|
||||
<el-table v-loading="loading1" :data="tableData1" border style="width: 100%;height: 460px;margin-top: 15px;" height="330" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="零件图号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" min-width="150" align="center">
|
||||
<el-table-column label="零件名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" min-width="150" align="center">
|
||||
<el-table-column label="数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" min-width="150" align="center">
|
||||
<el-table-column label="材料" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<div class="block" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -78,30 +72,9 @@
|
||||
<el-input v-model="purchasingOrder" placeholder="采购单号" size="small" clearable/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left: 10px"
|
||||
@click="addPurchaseOrder">创建采购单</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px"
|
||||
@click="addMateriel">选入物料</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px"
|
||||
@click="saveMateriel">保存</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购单</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="单号状态" align="center" width="100" fixed="left">
|
||||
@@ -161,9 +134,14 @@
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="零件图号" align="center" min-width="150">
|
||||
<el-table-column label="物料编码" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原材料名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="150">
|
||||
@@ -176,11 +154,6 @@
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单位" :disabled="disable" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
@@ -414,8 +387,9 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchMateriel,
|
||||
addMateriel, deleteMateriel, saveMateriel } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
|
||||
<script>
|
||||
import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchMateriel,
|
||||
addMateriel, deleteMateriel, saveMateriel, searchRawMaterial, addMateriel2 } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
|
||||
import QRCode from 'qrcode'
|
||||
import $ from 'jquery'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -423,10 +397,14 @@ export default {
|
||||
name: '', // 采购计划
|
||||
data() {
|
||||
return {
|
||||
partDrawingNumberValue: '',
|
||||
partDrawingNumber: [],
|
||||
RawMaterialGroup: [],
|
||||
RawMaterialName: '',
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
partDrawingNumber: '',
|
||||
Buyer: '',
|
||||
showMaterialTable: true,
|
||||
loading1: false,
|
||||
title2: '',
|
||||
check1: 0,
|
||||
@@ -509,11 +487,43 @@ export default {
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchRawMaterial()
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
// 获取原材料
|
||||
searchRawMaterial() {
|
||||
searchRawMaterial(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
})
|
||||
},
|
||||
addMateriel2() { // 将材料选入请购单
|
||||
if (!this.purchasingOrderNumber) {
|
||||
this.$message.warning('请选择采购单')
|
||||
} else if (this.RawMaterialGroup.length === 0) {
|
||||
this.$message.warning('请勾选原材料')
|
||||
} else {
|
||||
addMateriel2(this.purchasingOrderNumber, this.RawMaterialGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('选入成功')
|
||||
this.searchTable1()
|
||||
this.searchRawMaterial()
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('选入失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChange2(val) {
|
||||
this.RawMaterialGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.RawMaterialGroup.push(val[i].原材料流水号)
|
||||
}
|
||||
},
|
||||
// ///////////////////////////////////////////////////////////////////////////////////////0529新加↑
|
||||
useqrcode(contractNum) {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
@@ -540,8 +550,8 @@ export default {
|
||||
},
|
||||
searchTable1() { // 查询外购备料
|
||||
this.loading1 = true
|
||||
this.partDrawingNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchPurchasedMaterials(this.pageCurrent1, this.pageSize1, this.check1, this.partDrawingNumberValue).then(response => {
|
||||
this.partDrawingNumber ? this.check1 = 1 : this.check1 = 0
|
||||
searchPurchasedMaterials(this.pageCurrent1, this.pageSize1, this.check1, this.partDrawingNumber).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.loading1 = false
|
||||
@@ -600,7 +610,6 @@ export default {
|
||||
} else { this.$message.error('新建采购单失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
@@ -620,7 +629,6 @@ export default {
|
||||
submitEditPurchaseOrder() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.供应商流水号, this.form2.计划完成日期)
|
||||
editPurchaseOrder(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.供应商流水号, this.form2.计划完成日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改采购单成功')
|
||||
@@ -629,7 +637,6 @@ export default {
|
||||
} else { this.$message.error('修改采购单失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
@@ -717,7 +724,6 @@ export default {
|
||||
this.计划完成日期 = row.计划完成日期.split(' ')[0]
|
||||
this.下单日期 = row.下单日期.split(' ')[0]
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
@@ -773,7 +779,6 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
console.log(row)
|
||||
deleteMateriel(row.采购计划明细流水号, row.工艺计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('移除成功')
|
||||
@@ -807,7 +812,6 @@ export default {
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
}).catch(res => {
|
||||
console.log(res)
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<!-- or name="fade" -->
|
||||
<!-- <router-view :key="key"></router-view> -->
|
||||
<!--<keep-alive>-->
|
||||
<router-view/>
|
||||
<!--</keep-alive>-->
|
||||
<keep-alive>
|
||||
<router-view/>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user