Merge branch 'master' of http://192.168.0.149:10010/r/高精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)
|
||||
|
||||
87
src/api/Assembly/AssemblyExecution.js
Normal file
87
src/api/Assembly/AssemblyExecution.js
Normal file
@@ -0,0 +1,87 @@
|
||||
import request from '@/utils/request'
|
||||
// 初始化机床项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function searchgroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床查询
|
||||
export function searchTable1(machineNumberValue, check2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_机床信息_查询数据',
|
||||
param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function searchTable2(machineNumberValue, check2, groupNumberValue, check3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间管理_基本件采购_查询数据',
|
||||
param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue + '&组件流水号_check=' + check3 + '&组件流水号=' + groupNumberValue
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床名称_机床状态_修改数据
|
||||
export function MachineToolStateUpdate(machineNumberValue, check) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_机床状态_修改数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&装配状态=' + check
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 机床名称_调试状态_修改数据
|
||||
export function DebugStatusUpdate(machineNumberValue, check) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_调试状态_修改数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&调试状态=' + check
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 组件名称_组件状态_修改数据
|
||||
export function ComponentStateUpdate(machineNumberValue, check) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_组件状态_修改数据',
|
||||
param: '组件流水号=' + machineNumberValue + '&组件是否完成=' + check
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
38
src/api/Assembly/DeliveryApplication.js
Normal file
38
src/api/Assembly/DeliveryApplication.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化机床项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// PDM_机床名称_发货状态_查询数据
|
||||
export function selecttable(check2, machineNumberValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_发货状态_查询数据',
|
||||
param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue
|
||||
}
|
||||
})
|
||||
}
|
||||
// PDM_机床名称_发货状态_编辑数据
|
||||
export function updatestate(machineNumberValue, state) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_发货状态_编辑数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&发货状态=' + state
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
49
src/api/Assembly/QualityInspectionInformationInquiry.js
Normal file
49
src/api/Assembly/QualityInspectionInformationInquiry.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化机床项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化质检类型
|
||||
export function QualityType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '质量管理_质检类型_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function searchgroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '质量管理_质量情况_查询数据',
|
||||
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 + '&质检类型代码_check=' + check4 + '&质检类型代码=' + value4
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
148
src/api/ManufacturingCenter/CreateIntakeList.js
Normal file
148
src/api/ManufacturingCenter/CreateIntakeList.js
Normal file
@@ -0,0 +1,148 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建领料单
|
||||
export function addList(peopleNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料管理_领料单增加',
|
||||
param: '领料人流水号=' + peopleNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领料单查询
|
||||
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 dropListDetailBasic(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料管理_备料领料单明细移除',
|
||||
param: `备料领料单明细流水号=${params[0]}&是否外购=${params[1]}&工艺计划流水号=${params[2]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_项目查询'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床查询
|
||||
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 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 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 addBasicList(listNumber, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料管理_自家备料选入',
|
||||
param: '备料领料单流水号=' + listNumber + '&工艺计划流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 外购备料选入
|
||||
export function addPurchaseList(listNumber, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料管理_外购备料选入',
|
||||
param: '备料领料单流水号=' + listNumber + '&工艺计划流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领料单明细查询
|
||||
export function searchListDetail(listNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_备料管理_备料领料单明细查询',
|
||||
param: '备料领料单流水号=' + listNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除领料单
|
||||
export function dropList(PickingListNumberx) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料管理_备料领料单删除',
|
||||
param: '备料领料单流水号=' + PickingListNumberx
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -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({
|
||||
|
||||
@@ -8,7 +8,7 @@ export function initCraftmen() {
|
||||
data: {
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=17'
|
||||
param: '考核部门编号=20'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
47
src/api/ManufacturingCenter/RawMaterialsMaintenance.js
Normal file
47
src/api/ManufacturingCenter/RawMaterialsMaintenance.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function searchTableData(num, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_原材料库存管理_查询',
|
||||
param: '原材料名称=' + num,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addData(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_原材料库存管理_新增',
|
||||
param: '原材料名称=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editData(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_原材料库存管理_编辑',
|
||||
param: '原材料流水号=' + num1 + '&原材料名称=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteCategory(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_原材料库存管理_删除',
|
||||
param: '原材料流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
47
src/api/ManufacturingCenter/SparePartsPurchase.js
Normal file
47
src/api/ManufacturingCenter/SparePartsPurchase.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function searchTableData(num, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_原材料库存管理_查询',
|
||||
param: '原材料名称=' + num,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addData(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_原材料库存管理_新增',
|
||||
param: '原材料名称=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editData(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_原材料库存管理_编辑',
|
||||
param: '原材料流水号=' + num1 + '&原材料名称=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteCategory(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_原材料库存管理_删除',
|
||||
param: '原材料流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -8,7 +8,7 @@ export function searchTable1(...group) {
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单_查询数据',
|
||||
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1`,
|
||||
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1&角色编号=${group[5]}`,
|
||||
Pagination: group[3] + '&' + group[4]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询库存数
|
||||
// 询价状态修改
|
||||
export function changeInquiryStatus(num) {
|
||||
return request({
|
||||
url: '',
|
||||
|
||||
@@ -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({
|
||||
|
||||
1
src/icons/svg/FundApproval2workshop.svg
Normal file
1
src/icons/svg/FundApproval2workshop.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1540798965773" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3335" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M 929.1 736.8 c 0 -17.4 -14.1 -31.6 -31.6 -31.6 H 163.1 V 128.4 c 0 -17.4 -14.1 -31.6 -31.6 -31.6 h -1.9 C 112.2 96.9 98 111 98 128.4 v 639.9 h 799.5 c 17.5 0.1 31.6 -14.1 31.6 -31.5 Z M 929.3 825.5 h -64 V 866 l -63.5 -0.1 v -40.4 h -64 v 40.4 l -63.7 -0.1 V 826 h -64 v 39.8 h -64.3 v -39.3 h -64 v 39.2 h -63.7 v -39.2 h -64 v 39.1 h -63.8 v -40.1 h -64 v 40.1 h -64 V 826 H 98 v 100.8 h 831.1 v -37.3 h 0.2 Z" p-id="3336"></path><path d="M 414.4 631.7 c 3.9 3.6 8.9 5.5 14.1 5.5 c 0.8 0 1.6 0 2.4 -0.1 h 0.4 l 145.1 -22.7 l 330.1 -347.5 c 10.6 -10.7 16.5 -25.5 16.1 -40.5 c -0.3 -15.1 -6.8 -29.6 -17.9 -39.9 l -74.6 -71.9 c -10.1 -9.4 -22.1 -14.3 -34.7 -14.3 c -14.8 0 -29.4 7 -41.1 19.7 L 422.4 469 l -14.7 145.3 l -0.1 0.7 v 0.4 c -0.2 6.1 2.2 12 6.8 16.3 Z M 795 158.6 h 0.3 l 71.2 68.8 v 0.3 l -14.1 15.2 l -71.4 -69.1 l 14 -15.2 Z M 476.5 493.2 L 742.7 215 l 71.5 69.2 l -266.1 278.1 l -82.9 13.6 l 11.3 -82.7 Z" p-id="3337"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
229
src/views/Assembly/AssemblyExecution/index.vue
Normal file
229
src/views/Assembly/AssemblyExecution/index.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1();searchTable2()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <span>组号:</span>-->
|
||||
<!-- <el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable @change="searchTable2()">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in groupNumber"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable1();searchTable2()">查询</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">总装调试</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="100px">
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<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="机床名称" align="center">
|
||||
<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="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="success" size="small" @click="handlestart_1(scope.row)">开始装配</el-button>
|
||||
<el-button v-else-if="scope.row.装配状态===1" type="danger" size="small" @click="handleend_1(scope.row)">结束装配</el-button>
|
||||
<el-button v-else type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.调试状态===null || scope.row.调试状态===0" type="success" size="small" @click="handlestart_2(scope.row)">开始调试</el-button>
|
||||
<el-button v-else-if="scope.row.调试状态==1" type="danger" size="small" @click="handleend_2(scope.row)">结束调试</el-button>
|
||||
<el-button v-else type="info" size="small" >调试完成</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">部装</h3>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<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="机床名称" align="center">
|
||||
<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="组件名称" align="center">
|
||||
<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="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.组件是否完成===null || scope.row.组件是否完成===0" type="success" size="small" @click="handlestart_3(scope.row)">开始装配</el-button>
|
||||
<el-button v-else-if="scope.row.组件是否完成===1" type="danger" size="small" @click="handleend_3(scope.row)">结束装配</el-button>
|
||||
<el-button v-else type="info" size="small" >装配完成</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate } from '@/api/Assembly/AssemblyExecution'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
console.log(response.data, 1111)
|
||||
})
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.groupNumberValue !== '') { this.check3 = 1 } else { this.check3 = 0 }
|
||||
searchTable2(this.machineNumberValue, this.check2).then(response => {
|
||||
console.log(response.data, 222)
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
// 总装开始装配
|
||||
handlestart_1(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束装配
|
||||
handleend_1(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装开始调试
|
||||
handlestart_2(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束调试
|
||||
handleend_2(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装开始装配
|
||||
handlestart_3(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
ComponentStateUpdate(row.组件流水号, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装结束装配
|
||||
handleend_3(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
ComponentStateUpdate(row.组件流水号, 2).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
110
src/views/Assembly/DeliveryApplication/index.vue
Normal file
110
src/views/Assembly/DeliveryApplication/index.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="selecttable()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<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="机床名称" align="center">
|
||||
<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="注意事项" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.注意事项 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.发货状态===null || scope.row.发货状态===0" type="success" size="small" @click="handlconfirm(scope.row)">确认发货</el-button>
|
||||
<el-button v-else-if="scope.row.发货状态===1" type="danger" size="small">待 审批</el-button>
|
||||
<el-button v-else type="info" size="small" >已审批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, selecttable, updatestate } from '@/api/Assembly/DeliveryApplication'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
|
||||
selecttable(this.check2, this.machineNumberValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
console.log(response.data)
|
||||
})
|
||||
},
|
||||
handlconfirm(row) {
|
||||
updatestate(row.机床流水号, 1).then(response => {
|
||||
this.selecttable()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
180
src/views/Assembly/QualityInspectionInformationInquiry/index.vue
Normal file
180
src/views/Assembly/QualityInspectionInformationInquiry/index.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>质检类型:</span>
|
||||
<el-select v-model="QualityTypeValue" filterable placeholder="质检类型" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in QualityTypeNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件:</span>
|
||||
<el-input v-model="SpareParts" filterable placeholder="请输入零件名称" style="width: 200px" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<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="机床名称" align="center">
|
||||
<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="零件图号" align="center">
|
||||
<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="质检类型" align="center">
|
||||
<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="不合格数量" align="center">
|
||||
<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="处理结果" align="center">
|
||||
<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>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, selecttable, QualityType } from '@/api/Assembly/QualityInspectionInformationInquiry'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
QualityTypeNumber: [],
|
||||
QualityTypeValue: '',
|
||||
tableData1: [],
|
||||
SpareParts: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
this.QualityType()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
QualityType() {
|
||||
QualityType().then(response => {
|
||||
console.log(response.data)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.QualityTypeNumber.push({
|
||||
label: response.data[i].质检类型,
|
||||
value: response.data[i].质检类型代码
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
console.log(response.data, 1111)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
507
src/views/ManufacturingCenter/CreateIntakeList/index.vue
Normal file
507
src/views/ManufacturingCenter/CreateIntakeList/index.vue
Normal file
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span style="margin: 5px">领料单编号</span>
|
||||
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px"/>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchListinfor()">查询</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addListinfor()">创建</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="listLoading0" :data="tableData1" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="chooseListinfor">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="领料单编号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料时间" align="center" min-width="200" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="true" label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent0"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSize0"
|
||||
:total="total0"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange0"
|
||||
@current-change="handleCurrentChange0"/>
|
||||
</div>
|
||||
<el-table :data="tableDataPicking" border style="width: 100%;" size="mini" height="300">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="来源" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.是否外购===1">外购</el-tag>
|
||||
<el-tag v-else>自家</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="true" label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="dropListdetail(scope.row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<!--<span>项目名称:</span>-->
|
||||
<el-select v-show="false" v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h4>自家备料</h4>
|
||||
<el-table v-loading="listLoading1" :data="tableDataBasic" border style="width: 100%;" size="mini" height="440">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSize1"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>外购备料</h4>
|
||||
<el-table v-loading="listLoading2" :data="tableDataPurchase" border style="width: 100%;" size="mini" height="440">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ scope.row.物料编码 + scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" @click="addPurchaseList(scope.row)">领料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
: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 { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart,
|
||||
searchList, addList, dropList, searchListDetail, dropListDetailBasic, addBasicList, addPurchaseList } from '@/api/ManufacturingCenter/CreateIntakeList'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listLoading0: false, // 领料单
|
||||
listLoading1: false, // 自制件
|
||||
listLoading2: false, // 采购部采购件
|
||||
PageCurrent0: 1,
|
||||
PageSize0: 10,
|
||||
total0: 0,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: 0,
|
||||
PageCurrent2: 1,
|
||||
PageSize2: 10,
|
||||
total2: 0,
|
||||
ProjectValue: '',
|
||||
Project: [],
|
||||
ProjectValue_check: 0,
|
||||
MachineValue: '',
|
||||
Machine: [],
|
||||
MachineValue_check: 0,
|
||||
GroupNumValue: '',
|
||||
GroupNum: [],
|
||||
GroupNumValue_check: 0,
|
||||
tableData1: [], // 领料单
|
||||
tableDataPicking: [], // 领料单明细
|
||||
tableDataBasic: [], // 自制件
|
||||
tableDataPurchase: [], // 采购部采购件
|
||||
tableDataBacklog: [], // 滞货件
|
||||
tableDataHouse: [], // 车间采购件
|
||||
enableOut: '', // 可出库数量
|
||||
partPiant: '', // 零件图号
|
||||
material: '', // 材料
|
||||
outType: '',
|
||||
pickingListNumber: null, // 领料单编号
|
||||
pickingListNumberx: '', // 领料单流水号
|
||||
picikingPeople: '', // 领料人流水号
|
||||
partProjectNumber: '', // 项目流水号
|
||||
partMachineNumber: '', // 机床流水号
|
||||
partGroupNumber: '', // 分组流水号
|
||||
receive: '', // 收件信息ID
|
||||
locatenumber: '', // 货位流水号
|
||||
materialName: '',
|
||||
materialNumber: '',
|
||||
materialType: '',
|
||||
purchaseDetailNum: '', // 采购合同明细流水号
|
||||
askPurchaseNumber: '', // 请购单明细流水号
|
||||
materialLocate: '',
|
||||
partType: '', // 零件类型
|
||||
craftplannumber: '' // 工艺计划流水号
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchListinfor()
|
||||
this.searchPartinfo()
|
||||
this.searchMachine()
|
||||
},
|
||||
methods: {
|
||||
// 创建领料单
|
||||
addListinfor() {
|
||||
this.$confirm('确认创建新的领料单?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
addList(this.picikingPeople).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchListinfor()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message('已取消操作')
|
||||
})
|
||||
},
|
||||
// 查询领料单
|
||||
searchListinfor() {
|
||||
let check
|
||||
this.pickingListNumber ? check = 1 : check = 0
|
||||
this.listLoading0 = true
|
||||
searchList(this.PageCurrent0, this.PageSize0, check, this.pickingListNumber).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
this.listLoading0 = false
|
||||
})
|
||||
},
|
||||
// 领料单分页
|
||||
handleSizeChange0(val) {
|
||||
this.PageCurrent0 = 1
|
||||
this.PageSize0 = val
|
||||
this.searchListinfor()
|
||||
},
|
||||
handleCurrentChange0(val) {
|
||||
this.PageCurrent0 = val
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 选择领料单
|
||||
chooseListinfor(row) {
|
||||
this.pickingListNumberx = row.备料领料单流水号
|
||||
// this.pickingListNumber = row.领料单编号
|
||||
this.searchListDetailt()
|
||||
},
|
||||
// 查询领料单明细
|
||||
searchListDetailt() {
|
||||
searchListDetail(this.pickingListNumberx).then(response => {
|
||||
this.tableDataPicking = response.data
|
||||
})
|
||||
},
|
||||
// 移除
|
||||
dropListdetail(row) {
|
||||
this.$confirm('确认移除该零件?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropListDetailBasic(row.备料领料单明细流水号, row.是否外购, row.工艺计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListDetailt()
|
||||
this.searchPartinfo()
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 初始化项目,获取人员编号
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
this.picikingPeople = this.id
|
||||
},
|
||||
// 查询机床
|
||||
searchMachine() {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询组号
|
||||
searchGroupList() {
|
||||
if (this.MachineValue) {
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
}
|
||||
},
|
||||
// 根据项目机床分组查零件/物料
|
||||
searchPartinfo() {
|
||||
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
|
||||
this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
|
||||
this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
|
||||
this.searchOwnPart() // 自制件
|
||||
this.searchPurchasePart() // 采购部采购件
|
||||
},
|
||||
// 删除领料单
|
||||
dropListinfor(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.tableDataPicking.length === 0) {
|
||||
dropList(row.备料领料单流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListinfor()
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查询自家备料
|
||||
searchOwnPart() {
|
||||
this.tableDataBasic = []
|
||||
this.listLoading1 = true
|
||||
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataBasic = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
// 自制件分页
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.searchOwnPart()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.searchOwnPart()
|
||||
},
|
||||
// 查询外购备料
|
||||
searchPurchasePart() {
|
||||
this.tableDataPurchase = []
|
||||
this.listLoading2 = true
|
||||
searchPurchasePart(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
// 采购部采购件分页
|
||||
handleSizeChange2(val) {
|
||||
this.PageCurrent2 = 1
|
||||
this.PageSize2 = val
|
||||
this.searchPurchasePart()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.PageCurrent2 = val
|
||||
this.searchPurchasePart()
|
||||
},
|
||||
// 自家备料领料
|
||||
addBasicList(row) {
|
||||
addBasicList(this.pickingListNumberx, row.工艺计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListDetailt()
|
||||
this.searchPartinfo()
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 外购备料领料
|
||||
addPurchaseList(row) {
|
||||
addPurchaseList(this.pickingListNumberx, row.工艺计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListDetailt()
|
||||
this.searchPartinfo()
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
@@ -285,6 +285,13 @@
|
||||
{{ scope.row.机床主管 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="装配状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="success" size="small">未装配</el-tag>
|
||||
<el-tag v-else-if="scope.row.装配状态===1" type="danger" size="small" >装配中</el-tag>
|
||||
<el-tag v-else type="info" size="small" >装配完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -329,9 +336,11 @@
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组件介绍">
|
||||
<el-table-column align="center" label="装配状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件介绍 }}
|
||||
<el-tag v-if="scope.row.组件是否完成===null || scope.row.组件是否完成===0" type="success" size="small">未装配</el-tag>
|
||||
<el-tag v-else-if="scope.row.组件是否完成===1" type="danger" size="small" >装配中</el-tag>
|
||||
<el-tag v-else type="info" size="small" >装配完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,14 +10,13 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" clearable @clear="returnDate = ''">
|
||||
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" @change="tableData1=[];tableData2=[];returnDate = '';searchData();">
|
||||
<el-option
|
||||
v-for="item in partNum"
|
||||
: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="searchData()">查询</el-button>
|
||||
<span>打回时间:</span>
|
||||
<el-date-picker v-model="returnDate" :clearable="false" type="datetime" placeholder="打回时间" size="small" readonly/>
|
||||
</el-card>
|
||||
@@ -219,15 +218,11 @@ export default {
|
||||
tableRowClassName2({ row }) {
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
|
||||
if (this.tableData1[i].工序顺序 === row.工序顺序) {
|
||||
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级) {
|
||||
return 'change'
|
||||
} else {
|
||||
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||
return 'change'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -235,15 +230,11 @@ export default {
|
||||
tableRowClassName1({ row }) {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
|
||||
if (this.tableData2[i].工序顺序 === row.工序顺序) {
|
||||
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
|
||||
return 'change'
|
||||
} else {
|
||||
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||
return 'change'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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('保存成功')
|
||||
})
|
||||
}
|
||||
|
||||
169
src/views/ManufacturingCenter/RawMaterialsMaintenance/index.vue
Normal file
169
src/views/ManufacturingCenter/RawMaterialsMaintenance/index.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 330px">
|
||||
<span style="margin-left: 10px">原材料名称:</span>
|
||||
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="small" clearable/>
|
||||
</el-col>
|
||||
<el-col style="width: 200px">
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table :data="tableData" style="width: 100%;min-height: 500px" height="500" size="mini" highlight-current-row border>
|
||||
<el-table-column align="center" label="原材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-form-item label="原材料名称" prop="RawMaterialName">
|
||||
<el-input v-model="form.RawMaterialName" placeholder="原材料名称" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTableData, addData, editData, deleteCategory } from '@/api/ManufacturingCenter/RawMaterialsMaintenance'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RawMaterialNumber: '',
|
||||
RawMaterialName: '',
|
||||
param: 0,
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
dialogFormVisible: false,
|
||||
title: '',
|
||||
form: {
|
||||
RawMaterialName: ''
|
||||
},
|
||||
rules: {
|
||||
RawMaterialName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTableData()
|
||||
},
|
||||
methods: {
|
||||
// 获取原材料
|
||||
searchTableData() {
|
||||
searchTableData(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
})
|
||||
},
|
||||
// 增加
|
||||
handleAdd() {
|
||||
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加'])
|
||||
},
|
||||
// 提交增加
|
||||
submitAdd() {
|
||||
this.addTable(addData, [this.form.RawMaterialName], 'form', function() {
|
||||
this.dialogFormVisible = false
|
||||
this.pageCurrent = 1
|
||||
this.searchTableData()
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible = true])
|
||||
this.form.RawMaterialName = row.原材料名称
|
||||
this.RawMaterialNumber = row.原材料流水号
|
||||
},
|
||||
// 提交编辑
|
||||
submitEdit() {
|
||||
this.editTable(editData, [this.RawMaterialNumber, this.form.RawMaterialName], 'form', function() {
|
||||
this.searchTableData()
|
||||
this.dialogFormVisible = false
|
||||
})
|
||||
},
|
||||
// 取消
|
||||
cancel() {
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteCategory(row.原材料流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
if (this.tableData && this.tableData.length === 1 && this.pageCurrent > 1) { // 判断删除的是否是最后一页最后一行,如果是且不是第一页,页数减一
|
||||
this.pageCurrent--
|
||||
}
|
||||
this.searchTableData()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span {
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
.el-select{
|
||||
width:190px
|
||||
}
|
||||
.el-input{
|
||||
width:190px
|
||||
}
|
||||
</style>
|
||||
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>
|
||||
130
src/views/ManufacturingCenter/SparePartsPurchase/index.vue
Normal file
130
src/views/ManufacturingCenter/SparePartsPurchase/index.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 5px">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<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;searchTableData()">查询</el-button>
|
||||
<el-table :data="tableData" style="margin-top: 15px;width: 100%" height="500" size="mini" border @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column align="center" label="原材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="16" style="margin-left: 20px">
|
||||
<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;searchTableData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="handleAdd()">增加</el-button>
|
||||
<el-table :data="tableData" style="margin-top: 15px;width: 100%" height="500" size="mini" highlight-current-row border>
|
||||
<el-table-column align="center" label="原材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-table :data="tableData" style="width: 100%" height="500" size="mini" highlight-current-row border>
|
||||
<el-table-column align="center" label="原材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTableData } from '@/api/ManufacturingCenter/SparePartsPurchase'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RawMaterialNumber: '',
|
||||
RawMaterialName: '',
|
||||
param: 0,
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
dialogFormVisible: false,
|
||||
title: '',
|
||||
form: {
|
||||
RawMaterialName: ''
|
||||
},
|
||||
rules: {
|
||||
RawMaterialName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTableData()
|
||||
},
|
||||
methods: {
|
||||
// 获取原材料
|
||||
searchTableData() {
|
||||
searchTableData(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
})
|
||||
},
|
||||
// tabledata分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTableData()
|
||||
},
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
this.materielGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.materielGroup.push(val[i].物料流水号)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span {
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
.el-select{
|
||||
width:190px
|
||||
}
|
||||
.el-input{
|
||||
width:190px
|
||||
}
|
||||
</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>
|
||||
|
||||
@@ -117,9 +117,48 @@
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/>
|
||||
<h3 style="">离线合同</h3>
|
||||
<h3 id="firstAnchor" style="margin-top: 0">采购合同</h3>
|
||||
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/><hr>
|
||||
<h3 id="secondAnchor" style="">离线合同</h3>
|
||||
<div id="offlineContract" style="min-height:500px;margin: 0 auto;width: 800px;border:1px solid black">
|
||||
<table v-show="contractDetail2.length > 0" class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr>
|
||||
<th colspan="14"><h1>离线合同</h1></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
|
||||
<td width="80px">合同名称</td>
|
||||
<td id="contractName" colspan="2" style="text-align: left;"/>
|
||||
<td width="80px">供应商</td>
|
||||
<td id="supplier" colspan="5" style="text-align: left;"/>
|
||||
<td id="qrCode" colspan="2" rowspan="2"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">合同编号</td>
|
||||
<td id="contractNum" colspan="2" style="text-align: left;"/>
|
||||
<td width="80px">采购员</td>
|
||||
<td id="buyer" colspan="5" style="text-align: left;"/>
|
||||
</tr>
|
||||
<tr id="tablehead">
|
||||
<td width="50px">序号</td>
|
||||
<td colspan="2">名称</td>
|
||||
<td>规格</td>
|
||||
<td colspan="2">型号</td>
|
||||
<td>数量</td>
|
||||
<td colspan="2">单价</td>
|
||||
<td colspan="2">合计</td>
|
||||
<td>交货期</td>
|
||||
<td colspan="2">备注</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>总计</td>
|
||||
<td id="remark" colspan="10"/>
|
||||
<td id="total" colspan="2" style="text-align: left;"/>
|
||||
<td/>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!--
|
||||
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -167,12 +206,14 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline, searchContactDetail, searchMateriel } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
|
||||
export default {
|
||||
name: '', // 管理审批
|
||||
@@ -204,14 +245,56 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
showOffline(row) {
|
||||
console.log(row, 222)
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementsByClassName('offlineContract')[0]
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
let length = 0
|
||||
this.contractDetail2.length < 15 ? length = 15 : length = this.contractDetail2.length
|
||||
for (let i = 0; i < length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
|
||||
$('#tablehead').after(tr[i])
|
||||
}
|
||||
let total = 0
|
||||
for (let j = 0; j < this.contractDetail2.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.contractDetail2[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.contractDetail2[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.contractDetail2[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.contractDetail2[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.contractDetail2[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.contractDetail2[j].数量 * this.contractDetail2[j].单价).toFixed(2)
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.contractDetail2[j].交货期要求
|
||||
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.contractDetail2[j].备注
|
||||
total += Number(this.contractDetail2[j].数量 * this.contractDetail2[j].单价)
|
||||
}
|
||||
total = total.toFixed(2)
|
||||
document.getElementById('contractNum').innerHTML = row.离线合同编号
|
||||
document.getElementById('contractName').innerHTML = row.离线合同名称
|
||||
document.getElementById('supplier').innerHTML = row.供应商名称
|
||||
document.getElementById('buyer').innerHTML = row.采购员
|
||||
document.getElementById('total').innerHTML = total
|
||||
document.getElementById('remark').innerHTML = row.离线合同备注
|
||||
},
|
||||
searchContactDetail(row) {
|
||||
document.documentElement.scrollTop = this.$el.querySelector('#firstAnchor').offsetTop
|
||||
searchContactDetail(row.采购合同流水号).then(response => {
|
||||
this.contractDetail1 = response.data[0].合同内容
|
||||
})
|
||||
},
|
||||
searchOfflineContactDetail(row) { // 查询离线合同明细
|
||||
document.documentElement.scrollTop = this.$el.querySelector('#secondAnchor').offsetTop
|
||||
searchMateriel(row.离线合同流水号).then(response => {
|
||||
this.contractDetail2 = response.data
|
||||
this.showOffline(row)
|
||||
})
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
@@ -245,7 +328,6 @@ export default {
|
||||
},
|
||||
searchTable1() {
|
||||
initApproval(this.pageCurrent1, this.pageSize1, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
@@ -261,7 +343,6 @@ export default {
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
|
||||
@@ -76,17 +76,17 @@
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="115">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购审批" align="center" min-width="60">
|
||||
<el-table-column label="采购审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||
</template>
|
||||
@@ -76,17 +76,7 @@
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="115">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<el-table-column label="总经理审批" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
|
||||
</template>
|
||||
@@ -96,6 +86,16 @@
|
||||
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="115">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
|
||||
@@ -194,11 +194,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
console.log(this.token)
|
||||
// console.log(this.token)
|
||||
},
|
||||
searchTable1() {
|
||||
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
|
||||
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1, this.token).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
|
||||
@@ -93,12 +93,12 @@
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配数量" align="center" min-width="80">
|
||||
<el-table-column label="分配数量" align="center" min-width="80" prop="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货数量" align="center" min-width="100">
|
||||
<el-table-column label="使用滞货数量" align="center" min-width="100" prop="使用滞货数量">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
@@ -108,11 +108,21 @@
|
||||
{{ scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="100">
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注筛选">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商筛选">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型筛选">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0 0 0;">
|
||||
<el-pagination
|
||||
@@ -653,6 +663,18 @@ export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
source: [
|
||||
{
|
||||
text: 'BZ',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: 'WG',
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
remarkFilters: [],
|
||||
supplierFilters: [],
|
||||
groupPartNumGroup: [], // 组件零件流水号组
|
||||
offlineContractsValue: '',
|
||||
offlineContracts: [],
|
||||
@@ -806,6 +828,15 @@ export default {
|
||||
this.searchTable00()
|
||||
},
|
||||
methods: {
|
||||
filterHandler0(value, row) { // 筛选备注
|
||||
return row['备注'] === value
|
||||
},
|
||||
filterHandler(value, row) { // 筛选供货商
|
||||
return row['供货商'] === value
|
||||
},
|
||||
filterSource(value, row) {
|
||||
return Number(row['零件类型']) === Number(value)
|
||||
},
|
||||
// 变更询价状态
|
||||
changeInquiryStatus() {
|
||||
this.$confirm('确定变更询价状态?', '提示', {
|
||||
@@ -1332,6 +1363,18 @@ export default {
|
||||
searchMaterial(this.pageCurrent00, this.pageSize00, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
|
||||
this.tableData00 = response.data.rows
|
||||
this.total00 = response.data.total
|
||||
const remark = []
|
||||
const supplier = []
|
||||
this.remarkFilters = []
|
||||
this.supplierFilters = []
|
||||
response.data.rows.map(v => {
|
||||
if (!remark.includes(v.备注)) {
|
||||
remark.push(v.备注)
|
||||
supplier.push(v.供货商)
|
||||
this.remarkFilters.push({ text: v.备注, value: v.备注 })
|
||||
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange00(val) { // 标准件和外购件列表分页
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -25,19 +25,94 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
|
||||
import { searchTable1 } from '@/api/PurchasingCenter/PurchaseContractApproval'
|
||||
import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { searchTable1 as searchTableInvoice } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer: '',
|
||||
noticeContract: null,
|
||||
noticeFund: null,
|
||||
noticeInvoice: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar'
|
||||
'avatar',
|
||||
'name',
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
if (this.id.toString() === '3') {
|
||||
this.checkApproval()
|
||||
this.timer = setInterval(this.checkApproval, 1000 * 60 * 5)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
checkApproval() {
|
||||
searchTable1(1, 999, 0, null, null, 0, 0, 0, 0, 0, 0).then(res => {
|
||||
if (res.data.total) {
|
||||
this.noticeContract = null
|
||||
this.noticeContract = this.$notify.info({
|
||||
title: '提示',
|
||||
message: '您有采购合同待审批,请及时处理,点击查看',
|
||||
onClick: () => {
|
||||
this.$router.push({ path: '/PurchaseContractApproval/index' })
|
||||
setTimeout(this.noticeContract.close(), 1000)
|
||||
},
|
||||
duration: 1000 * 60
|
||||
})
|
||||
}
|
||||
})
|
||||
const p1 = new Promise((resolve, reject) => {
|
||||
initApproval(1, 999, 1).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
const p2 = new Promise((resolve, reject) => {
|
||||
initApprovalOffline(1, 999, 1).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
Promise.race([p1, p2]).then(res => {
|
||||
if (res.data.total) {
|
||||
this.noticeFund = this.$notify.info({
|
||||
title: '提示',
|
||||
message: '您有合同请款申请待审批,请及时处理,点击查看',
|
||||
onClick: () => {
|
||||
this.$router.push({ path: '/FundApproval2/index' })
|
||||
setTimeout(this.noticeFund.close(), 1000)
|
||||
},
|
||||
duration: 1000 * 60 * 5
|
||||
})
|
||||
}
|
||||
})
|
||||
searchTableInvoice(0, null, null, 1, 999, this.token).then(res => {
|
||||
if (res.data.total) {
|
||||
this.noticeInvoice = null
|
||||
this.noticeInvoice = this.$notify.info({
|
||||
title: '提示',
|
||||
message: '您有发票结算申请待审批,请及时处理,点击查看',
|
||||
onClick: () => {
|
||||
this.$router.push({ path: '/InvoiceSettlementApprove/index' })
|
||||
setTimeout(this.noticeInvoice.close(), 1000)
|
||||
},
|
||||
duration: 1000 * 60 * 5
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('ToggleSideBar')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user