更新
This commit is contained in:
199
src/api/BasicData/PartsNumberMaintenance.js
Normal file
199
src/api/BasicData/PartsNumberMaintenance.js
Normal file
@@ -0,0 +1,199 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function projectSelect() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function machineSelect(projectValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据2',
|
||||
param: `项目流水号=${projectValue}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function groupSelect(machineValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_组件流水号_查询数据_根据机床',
|
||||
param: `机床流水号=${machineValue}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function basicPartsData(project_check, project, machine_check, machine, group_check, group, pageSize, pageCurrent) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_基本件_查询数据_综合gj',
|
||||
param: `项目流水号_check=${project_check}&项目流水号=${project}&机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function purchasePartsData(num, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_标准件和外购件_查询数据',
|
||||
param: `组件流水号=${num}`,
|
||||
pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteBasicParts(basicNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_删除数据',
|
||||
param: `基本件流水号=${basicNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deletePurchaseData(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_标准件和外购件_删除数据',
|
||||
param: '标准件和外购件流水号=' + num + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editPurchaseData(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_标准件和外购件_修改数据',
|
||||
param: '标准件和外购件流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editBasicParts(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_编辑数据',
|
||||
param: '基本件流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getTable(num, pageList, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_已投产_按组查',
|
||||
param: '组件流水号=' + num + '=int',
|
||||
Pagination: pageList + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editProductNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'MRP_计划订单_组件零件清单_基本件_编辑数据',
|
||||
param: '组件零件基本件流水号=' + num + '&数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getTable1(num, a, b, c, d, e, f, g, pageList, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件',
|
||||
param: '项目流水号_check=' + num + '=string&项目流水号=' + a + '=int&机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int',
|
||||
Pagination: pageList + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editProduceNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工艺计划_修改数据',
|
||||
param: '工艺计划流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1标准件和外购件
|
||||
export function searchTable1(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_数量维护',
|
||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&机床流水号_check=${params[4]}&机床流水号=${params[5]}&组件流水号_check=${params[6]}&组件流水号=${params[7]}&物料状态=1`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1基本件
|
||||
export function searchTable2(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_基本件_数量维护',
|
||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&机床流水号_check=${params[4]}&机床流水号=${params[5]}&组件流水号_check=${params[6]}&组件流水号=${params[7]}&物料状态=1`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editGroupPartNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'MRP_计划订单_组件零件清单_编辑数据',
|
||||
param: '组件零件流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editGroupBasicPartNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'MRP_计划订单_组件零件清单_基本件_采购_编辑数据',
|
||||
param: '组件零件基本件流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -67,14 +67,14 @@ export function searchtable(num1, num2, num3, num4, num5, num6, num7, num8, num9
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editTable(num1, num2, num3, num5, num6, num7, num8, num9, num10, num11, num12) {
|
||||
export function editTable(num1, num2, num3, num5, num13, num14, num15, num6, num7, num8, num9, num10, num11, num12) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '项目计划管理_项目总计划_编辑数据',
|
||||
param: `项目流水号=` + num1 + '&机床流水号=' + num2 + '&项目编号=' + num3 + '&设计者=' + num5 + '&机床设计完成时间=' + num6 + '&采购完成时间=' + num7 + '&备料完成时间=' + num8 + '&机床生产完成时间=' + num9 + '&机床装配完成时间=' + num10 + '&完成顺序=' + num11 + '&更新=' + num12
|
||||
param: `项目流水号=` + num1 + '&机床流水号=' + num2 + '&项目编号=' + num3 + '&设计者=' + num5 + '&审图计划开始时间=' + num13 + '&审图计划完成时间=' + num14 + '&审图实际完成时间=' + num15 + '&机床设计完成时间=' + num6 + '&采购完成时间=' + num7 + '&备料完成时间=' + num8 + '&机床生产完成时间=' + num9 + '&机床装配完成时间=' + num10 + '&完成顺序=' + num11 + '&更新=' + num12
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -56,6 +56,17 @@ export function update(projectName, machineNum, id, type, drawingNum) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function update1(id, type) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_外购件和标准件_数据导入保存_编辑整改类型',
|
||||
param: `id=${id}&整改类型=${type}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchOldParts(projectName, machineNum, drawingNum) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -134,6 +145,17 @@ export function specificationQueryWB(projectCheck, project, machineCheck, machin
|
||||
}
|
||||
})
|
||||
}
|
||||
export function specificationQueryWB1(projectCheck, project, machineCheck, machine, groupCheck, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_外购件和标准件_整改件_规范数据查询_gj',
|
||||
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function unSpecificationQuery(projectCheck, project, machineCheck, machine, groupCheck, group) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -167,6 +189,17 @@ export function unSpecificationQueryWB(projectCheck, project, machineCheck, mach
|
||||
}
|
||||
})
|
||||
}
|
||||
export function unSpecificationQueryWB1(projectCheck, project, machineCheck, machine, groupCheck, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_外购件和标准件_整改件_不规范数据查询gj',
|
||||
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteBasicParts(id) {
|
||||
return request({
|
||||
@@ -334,6 +367,17 @@ export function transferWG(groupNum, materialNum, totalNum, remarks, mark, desig
|
||||
}
|
||||
})
|
||||
}
|
||||
export function transferWG1(groupNum, materialNum, totalNum, remarks, mark, designNum, isTransfer, dataType, No, id, Num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_标准件和外购件_大量导入',
|
||||
param: `组件流水号=${groupNum}&物料流水号=${materialNum}&零件数量=${totalNum}&备注\\=${remarks}&标记=${mark}&设计者编号=${designNum}&是否传递=${isTransfer}&数据类型=${dataType}&序号=${No}&id=${id}&备件数量=${Num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchMaterial1(num, name, Specifications) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -345,3 +389,14 @@ export function searchMaterial1(num, name, Specifications) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getMachineNames(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据_获取数量和名称',
|
||||
param: `机床图号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
907
src/views/BasicData/PartsNumberMaintenance/index.vue
Normal file
907
src/views/BasicData/PartsNumberMaintenance/index.vue
Normal file
@@ -0,0 +1,907 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small">
|
||||
<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" placeholder="请选择机床图号" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>组号</span>
|
||||
<el-select v-model="groupValue" placeholder="请选择组号" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partNumber" clearable filterable size="small" placeholder="零件图号" style="width: 200px;"/>
|
||||
|
||||
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData();pageCurrent1 = 1;pageSize1 = 10;getTable();pageCurrent2 = 1;pageSize2 = 10;getTable1()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="font-size: 20px;margin-bottom: 20px">基本件三表数量</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
style="width: 100%;max-height: 520px"
|
||||
height="320">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
label="机床图号"
|
||||
align="center"
|
||||
min-width="150px">
|
||||
<template slot-scope="scope">{{ scope.row.机床图号 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件图号"
|
||||
align="center"
|
||||
min-width="200px">
|
||||
<template slot-scope="scope">{{ scope.row.零件图号 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件名称"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<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 align="center" label="分类码" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分类码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="旧零件图号" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.前零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="整改类型" width="150">
|
||||
<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="type=1;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]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="font-size: 20px;margin-bottom: 20px">外购件和标准件三表数量</div>
|
||||
<el-table
|
||||
v-loading="loadingWB"
|
||||
:data="tableDataWB"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
height="320"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column align="center" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料规格">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料型号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件数量">
|
||||
<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 align="center" label="零件类型">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供货商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="标记" width="100">
|
||||
<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="type=1;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="pageCurrentWB"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSizeWB"
|
||||
:total="totalWB"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChangeWB"
|
||||
@current-change="handleCurrentChangeWB"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div>
|
||||
<div style="font-size: 20px;margin-bottom: 20px">未投产数量</div>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="320">
|
||||
<el-table-column label="零件号" align="center" min-width="220">
|
||||
<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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="type=1;handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="width:50%;display:inline-block;"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="font-size: 20px;margin-bottom: 20px">未平衡数量</div>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
border
|
||||
style="max-height: 400px;margin-top:10px"
|
||||
height="320">
|
||||
<el-table-column label="零件图号" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" width="100">
|
||||
<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="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="float:left"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="font-size: 20px;margin-bottom: 20px">未分配采购零件数量</div>
|
||||
<el-tabs type="border-card" @tab-click="searchTable1();searchTable2()">
|
||||
<el-tab-pane label="标准件和外购件">
|
||||
<el-table :data="tableData3" size="mini" style="max-height: 320px" height="320px" border>
|
||||
<el-table-column align="center" label="机床图号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料类别" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料品种" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料品种 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图号或型号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="名称" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="type=2;handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="基本件">
|
||||
<el-table :data="tableData4" size="mini" style="max-height: 320px" height="320px" border>
|
||||
<el-table-column align="center" label="机床图号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="名称" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="type=2;handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent4"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize4"
|
||||
:total="total4"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="更改数量" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="数量" prop="数量">
|
||||
<el-input
|
||||
v-model="form3.数量"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitEdit('form3')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { projectSelect, machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData, editPurchaseData, editBasicParts, getTable, editProductNum, getTable1, editProduceNum, searchTable1, searchTable2, editGroupBasicPartNum, editGroupPartNum } from '@/api/BasicData/PartsNumberMaintenance'
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
BasicParts: '',
|
||||
PurchaseData: '',
|
||||
productNum: '',
|
||||
produceNum: '',
|
||||
partNumber: '',
|
||||
groupPartNum: '',
|
||||
groupBasicPartNum: '',
|
||||
type: '',
|
||||
project: [],
|
||||
machineValue: '',
|
||||
machine: [],
|
||||
groupValue: '',
|
||||
group: [],
|
||||
form3: {
|
||||
数量: ''
|
||||
},
|
||||
rules3: {
|
||||
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||
},
|
||||
dialogFormVisible3: false,
|
||||
loading: false,
|
||||
loadingWB: false,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
tableDataWB: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
pageCurrent3: 1,
|
||||
pageSize3: 10,
|
||||
total3: 0,
|
||||
pageCurrent4: 1,
|
||||
pageSize4: 10,
|
||||
total4: 0,
|
||||
pageCurrentWB: 1,
|
||||
pageSizeWB: 10,
|
||||
totalWB: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
groupName() {
|
||||
for (let i = 0; i < this.group.length; i++) {
|
||||
if (this.group[i].value === this.groupValue) {
|
||||
return this.group[i].label
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
project(val) {
|
||||
console.log(val)
|
||||
if (val.length > 0) {
|
||||
this.projectValue = val[0].value
|
||||
}
|
||||
},
|
||||
projectValue(val) {
|
||||
this.machineValue = ''
|
||||
this.machine = []
|
||||
this.groupValue = ''
|
||||
this.group = []
|
||||
if (val) {
|
||||
this.getMachineSelect(val)
|
||||
}
|
||||
},
|
||||
machine(val) {
|
||||
if (val.length > 0) {
|
||||
this.machineValue = val[0].value
|
||||
}
|
||||
},
|
||||
machineValue(val) {
|
||||
this.groupValue = ''
|
||||
this.group = []
|
||||
if (val) {
|
||||
this.getGroupSelect(val)
|
||||
}
|
||||
},
|
||||
group(val) {
|
||||
if (val.length > 0) {
|
||||
this.groupValue = val[0].value
|
||||
}
|
||||
},
|
||||
groupValue(val) {
|
||||
if (val) {
|
||||
this.pageCurrentWB = 1
|
||||
this.pageSizeWB = 10
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
this.getTableData()
|
||||
this.getTable()
|
||||
this.getTable1()
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(projectSelect, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
getMachineSelect(val) {
|
||||
this.getSelect(machineSelect, ['机床图号', '机床流水号'], 'machine', val)
|
||||
},
|
||||
getGroupSelect(val) {
|
||||
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group', val)
|
||||
},
|
||||
getTableData() {
|
||||
const project_check = this.projectValue ? 1 : 0
|
||||
const machine_check = this.machineValue ? 1 : 0
|
||||
const group_check = this.groupValue ? 1 : 0
|
||||
this.loading = true
|
||||
basicPartsData(project_check, this.projectValue, machine_check, this.machineValue, group_check, this.groupValue, this.pageSize, this.pageCurrent).then(response => {
|
||||
this.loading = false
|
||||
const res = response.data
|
||||
this.total = res.total
|
||||
console.log(this.tableData)
|
||||
this.tableData = res.rows.map(item => {
|
||||
if (item.整改类型 === '1') {
|
||||
item.整改类型 = '新增'
|
||||
} else if (item.整改类型 === '2') {
|
||||
item.整改类型 = '替换'
|
||||
} else if (item.整改类型 === '3') {
|
||||
item.整改类型 = '补充加工'
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
this.loadingWB = true
|
||||
purchasePartsData(this.groupValue, this.pageCurrentWB, this.pageSizeWB).then(response => {
|
||||
this.loadingWB = false
|
||||
const data = response.data
|
||||
this.totalWB = data.total
|
||||
this.tableDataWB = data.rows.map(item => {
|
||||
console.log(item)
|
||||
item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
|
||||
return item
|
||||
})
|
||||
})
|
||||
},
|
||||
getTable() {
|
||||
this.tableData1 = []
|
||||
getTable(this.groupValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.total1 = parseInt(response.data.total)
|
||||
this.tableData1 = []
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1.push({
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
投产总数量: response.data.rows[i].投产总数量,
|
||||
最大投产批次: response.data.rows[i].最大投产批次,
|
||||
已投产数量: response.data.rows[i].已投产数量,
|
||||
未投产数量: response.data.rows[i].未投产数量,
|
||||
零件类型名称: response.data.rows[i].零件类型名称,
|
||||
组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号,
|
||||
投产类型流水号: response.data.rows[i].投产类型流水号,
|
||||
数据类型: response.data.rows[i].数据类型,
|
||||
材料流水号: response.data.rows[i].材料流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getTable1() {
|
||||
this.tableData2 = []
|
||||
this.checked_entryName = false
|
||||
if (this.machineValue === '') {
|
||||
this.checked_toolNum = false
|
||||
} else {
|
||||
this.checked_toolNum = true
|
||||
}
|
||||
if (this.groupValue === '') {
|
||||
this.checked_Num = false
|
||||
} else {
|
||||
this.checked_Num = true
|
||||
}
|
||||
if (this.partNumber !== '' && this.partNumber !== null) {
|
||||
this.checked_partNumber = true
|
||||
} else {
|
||||
this.checked_partNumber = false
|
||||
}
|
||||
getTable1(this.checked_entryName, '', this.checked_toolNum, this.machineValue, this.checked_Num, this.groupValue, this.checked_partNumber, this.partNumber, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].机加工开始时间_长日期 = response.data.rows[i].机加工开始时间_长日期.substring(0, response.data.rows[i].机加工开始时间_长日期.indexOf(' '))
|
||||
response.data.rows[i].机加工结束时间_长日期 = response.data.rows[i].机加工结束时间_长日期.substring(0, response.data.rows[i].机加工结束时间_长日期.indexOf(' '))
|
||||
}
|
||||
this.total2 = parseInt(response.data.total)
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData2.push({
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
投产数量: response.data.rows[i].投产数量,
|
||||
机加工开始时间: response.data.rows[i].机加工开始时间_长日期,
|
||||
机加工结束时间: response.data.rows[i].机加工结束时间_长日期,
|
||||
工序数量: response.data.rows[i].工序数量,
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询标准件和外购件
|
||||
let check0, check1, check2
|
||||
this.projectValue ? check2 = 1 : check2 = 0
|
||||
this.machineValue ? check0 = 1 : check0 = 0
|
||||
this.groupValue ? check1 = 1 : check1 = 0
|
||||
searchTable1(this.pageCurrent3, this.pageSize3, check2, this.projectValue, check0, this.machineValue, check1, this.groupValue).then(response => {
|
||||
this.tableData3 = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询基本件
|
||||
let check0, check1, check2
|
||||
this.projectValue ? check2 = 1 : check2 = 0
|
||||
this.machineValue ? check0 = 1 : check0 = 0
|
||||
this.groupValue ? check1 = 1 : check1 = 0
|
||||
searchTable2(this.pageCurrent4, this.pageSize4, check2, this.projectValue, check0, this.machineValue, check1, this.groupValue).then(response => {
|
||||
this.tableData4 = response.data.rows
|
||||
this.total4 = response.data.total
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.BasicParts = ''
|
||||
this.PurchaseData = ''
|
||||
this.productNum = ''
|
||||
this.produceNum = ''
|
||||
if (this.$refs['form3'] !== undefined) {
|
||||
this.$refs['form3'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible3 = true
|
||||
if (row.基本件流水号 && this.type === 1) {
|
||||
this.BasicParts = row.基本件流水号
|
||||
this.form3.数量 = row.零件数量
|
||||
} else if (row.标准件和外购件流水号 && this.type === 1) {
|
||||
this.PurchaseData = row.标准件和外购件流水号
|
||||
this.form3.数量 = row.零件数量
|
||||
} else if (row.组件零件基本件流水号 && this.type === 1) {
|
||||
this.productNum = row.组件零件基本件流水号
|
||||
this.form3.数量 = row.投产总数量
|
||||
} else if (row.工艺计划流水号) {
|
||||
this.produceNum = row.工艺计划流水号
|
||||
this.form3.数量 = row.投产数量
|
||||
} else if (row.组件零件流水号 && this.type === 2) {
|
||||
this.groupPartNum = row.组件零件流水号
|
||||
this.form3.数量 = row.零件数量
|
||||
} else if (row.组件零件基本件流水号 && this.type === 2) {
|
||||
this.groupBasicPartNum = row.组件零件基本件流水号
|
||||
this.form3.数量 = row.数量
|
||||
}
|
||||
},
|
||||
submitEdit(formName) { // 提交单据编辑
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.BasicParts !== '') {
|
||||
editBasicParts(this.BasicParts, this.form3.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.getTableData()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else if (this.PurchaseData !== '') {
|
||||
editPurchaseData(this.PurchaseData, this.form3.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.getTableData()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else if (this.productNum !== '') {
|
||||
editProductNum(this.productNum, this.form3.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.getTable()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else if (this.produceNum !== '') {
|
||||
editProduceNum(this.produceNum, this.form3.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.getTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else if (this.groupPartNum !== '') {
|
||||
editGroupPartNum(this.groupPartNum, this.form3.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else if (this.groupBasicPartNum !== '') {
|
||||
editGroupBasicPartNum(this.groupBasicPartNum, this.form3.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
if (row.基本件流水号) {
|
||||
this.deleteRow(deleteBasicParts, row.基本件流水号, function() {
|
||||
this.getTableData()
|
||||
})
|
||||
} else {
|
||||
this.deleteRow(deletePurchaseData, row.标准件和外购件流水号, function() {
|
||||
this.getTableData()
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleSizeChangeWB(val) {
|
||||
this.pageCurrentWB = 1
|
||||
this.pageSizeWB = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChangeWB(val) {
|
||||
this.pageCurrentWB = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.getTable()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.getTable()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.getTable1()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.getTable1()
|
||||
},
|
||||
handleSizeChange3(val) {
|
||||
this.pageSize3 = val
|
||||
this.pageCurrent3 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent3 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleSizeChange4(val) {
|
||||
this.pageSize4 = val
|
||||
this.pageCurrent4 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.pageCurrent4 = val
|
||||
this.searchTable2()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -90,6 +90,36 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审图(计划开始)" align="center" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-date-picker v-model="scope.row.审图计划开始时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.审图计划开始时间 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审图(计划完成)" align="center" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-date-picker v-model="scope.row.审图计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.审图计划完成时间 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审图(实际完成)" align="center" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-date-picker v-model="scope.row.审图实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.审图实际完成时间 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发图(计划)" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
@@ -207,7 +237,11 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h2 style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划:{{ machineNum }}</h2>
|
||||
<h2 v-if="code===1" style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划:{{ machineNum }} 发图</h2>
|
||||
<h2 v-if="code===2" style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划:{{ machineNum }} 采购</h2>
|
||||
<h2 v-if="code===3" style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划:{{ machineNum }} 备料</h2>
|
||||
<h2 v-if="code===4" style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划:{{ machineNum }} 制造</h2>
|
||||
<h2 v-if="code===5" style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划:{{ machineNum }} 装配</h2>
|
||||
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
|
||||
<el-table v-loading="loading2" :data="tableData2" style="margin-top: 10px;width: 100%;" stripe border element-loading-text="拼命加载中">
|
||||
<el-table-column min-width="100px" label="组号" align="center">
|
||||
@@ -455,6 +489,15 @@ export default {
|
||||
if (response.data.rows[i].机床装配实际完成时间 !== '' && response.data.rows[i].机床装配实际完成时间 !== null) {
|
||||
response.data.rows[i].机床装配实际完成时间 = response.data.rows[i].机床装配实际完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].审图计划开始时间 !== '' && response.data.rows[i].审图计划开始时间 !== null) {
|
||||
response.data.rows[i].审图计划开始时间 = response.data.rows[i].审图计划开始时间.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].审图计划完成时间 !== '' && response.data.rows[i].审图计划完成时间 !== null) {
|
||||
response.data.rows[i].审图计划完成时间 = response.data.rows[i].审图计划完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].审图实际完成时间 !== '' && response.data.rows[i].审图实际完成时间 !== null) {
|
||||
response.data.rows[i].审图实际完成时间 = response.data.rows[i].审图实际完成时间.split(' ')[0]
|
||||
}
|
||||
this.tableData.push({
|
||||
edit: false,
|
||||
项目编号: response.data.rows[i].项目编号,
|
||||
@@ -476,6 +519,9 @@ export default {
|
||||
备料实际完成时间: response.data.rows[i].备料实际完成时间,
|
||||
机床生产实际完成时间: response.data.rows[i].机床生产实际完成时间,
|
||||
机床装配实际完成时间: response.data.rows[i].机床装配实际完成时间,
|
||||
审图计划开始时间: response.data.rows[i].审图计划开始时间,
|
||||
审图计划完成时间: response.data.rows[i].审图计划完成时间,
|
||||
审图实际完成时间: response.data.rows[i].审图实际完成时间,
|
||||
完成顺序: response.data.rows[i].完成顺序,
|
||||
更新: response.data.rows[i].更新,
|
||||
项目流水号: response.data.rows[i].项目流水号,
|
||||
@@ -490,7 +536,7 @@ export default {
|
||||
},
|
||||
// 表格1保存
|
||||
confirmEdit(row) {
|
||||
editTable(row.项目流水号, row.机床流水号, row.项目编号, row.机床设计者, row.机床设计完成时间, row.采购完成时间, row.备料完成时间, row.机床生产完成时间, row.机床装配完成时间, row.完成顺序, row.更新).then(response => {
|
||||
editTable(row.项目流水号, row.机床流水号, row.项目编号, row.机床设计者, row.审图计划开始时间, row.审图计划完成时间, row.审图实际完成时间, row.机床设计完成时间, row.采购完成时间, row.备料完成时间, row.机床生产完成时间, row.机床装配完成时间, row.完成顺序, row.更新).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.$notify({
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">类型:</span>
|
||||
<el-select v-model="groupName" filterable size="small" placeholder="类型">
|
||||
<el-option
|
||||
v-for="item in Group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</div>
|
||||
<upload-excel-component @on-selected-file="selected"/>
|
||||
</div>
|
||||
@@ -26,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<specification-data1 ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" @machineChange="machineChange"/>
|
||||
<specification-data1 ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" :group-name="groupName" @machineChange="machineChange"/>
|
||||
<!--<el-upload-->
|
||||
<!--class="upload-demo"-->
|
||||
<!--drag-->
|
||||
@@ -52,6 +60,18 @@ export default {
|
||||
return {
|
||||
project: [],
|
||||
projectValue: '',
|
||||
groupName: '',
|
||||
Group: [{
|
||||
value: 'MX',
|
||||
name: 'MX'
|
||||
}, {
|
||||
value: 'WG',
|
||||
name: 'WG'
|
||||
}, {
|
||||
value: 'BZ',
|
||||
name: 'BZ'
|
||||
}],
|
||||
group: '',
|
||||
worksheet: [],
|
||||
itemFile: [],
|
||||
loading: false,
|
||||
@@ -160,6 +180,7 @@ export default {
|
||||
remarks,
|
||||
classificationCode
|
||||
console.log(this.worksheet[j].M2.v.substring(0, 1))
|
||||
this.group = this.worksheet[j].M2.v.substring(0, this.worksheet[j].M2.v.indexOf('-')) + '组'
|
||||
if (this.worksheet[j].M2.v.substring(0, 1) === '9') {
|
||||
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
|
||||
const res = response.data
|
||||
@@ -226,7 +247,7 @@ export default {
|
||||
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
|
||||
try {
|
||||
if (groupNum.indexOf('MX') > -1) {
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
console.log(res)
|
||||
if (res[0].result === '0') {
|
||||
@@ -236,7 +257,7 @@ export default {
|
||||
this.$notify.error(`${drawingNum}导入重复`)
|
||||
}
|
||||
} else {
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div style="width: 700px;margin: 0 auto">
|
||||
<div style="width: 900px;margin: 0 auto">
|
||||
<span>机床名称:</span>
|
||||
<el-select v-model="machineValue" filterable clearable size="small" placeholder="机床名称" @change="getGroups">
|
||||
<el-option
|
||||
@@ -19,6 +19,13 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button :loading="listLoading" :disabled="disabled" type="primary" icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="small" @click="allDelete">一键删除</el-button>
|
||||
<el-row style="margin-top: 20px">
|
||||
<span>机床名称:</span>
|
||||
<el-input v-model="machineName" readonly size="small" placeholder="机床名称" style="width: 200px;"/>
|
||||
<span>机床数量:</span>
|
||||
<el-input v-model="machineNum" readonly size="small" placeholder="机床数量" style="width: 200px;"/>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
@@ -97,20 +104,6 @@
|
||||
{{ 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
|
||||
@@ -296,7 +289,7 @@
|
||||
|
||||
<script>
|
||||
import { sleep } from '../../../utils/tool'
|
||||
import { unSpecificationQuery1, specificationQuery1, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX1, update, searchOldParts } from '../../../api/TechnologyCenter/ImportParts'
|
||||
import { unSpecificationQuery1, specificationQuery1, unSpecificationQueryWB1, specificationQueryWB1, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX1, update, searchOldParts, getMachineNames, transferWG1, allDelete, update1 } from '../../../api/TechnologyCenter/ImportParts'
|
||||
export default {
|
||||
name: 'SpecificationData',
|
||||
props: {
|
||||
@@ -311,6 +304,10 @@ export default {
|
||||
projectName: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
groupName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -318,6 +315,8 @@ export default {
|
||||
componentNum: '',
|
||||
groupValue: '',
|
||||
machineValue: '',
|
||||
machineName: '',
|
||||
machineNum: '',
|
||||
tableData: [],
|
||||
tableDataAll: [],
|
||||
listLoading: false,
|
||||
@@ -387,15 +386,23 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
machineNames(val) {
|
||||
this.machineName = ''
|
||||
this.machineNum = ''
|
||||
this.total = 0
|
||||
this.machineValue = val.length > 0 ? val[0].value : ''
|
||||
this.getGroups()
|
||||
},
|
||||
machineValue() {
|
||||
this.getMachineNames()
|
||||
},
|
||||
groupsNames(val) {
|
||||
this.groupValue = val.length > 0 ? val[0].value : ''
|
||||
},
|
||||
groupValue(val) {
|
||||
val ? this.fetchData() : this.tableData = []
|
||||
},
|
||||
groupName(val) {
|
||||
val ? this.fetchData() : this.tableData = []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -411,17 +418,30 @@ export default {
|
||||
const projectCheck = this.projectName ? 1 : 0
|
||||
const machineCheck = this.machineValue ? 1 : 0
|
||||
const groupCheck = this.groupValue ? 1 : 0
|
||||
// if (this.groupValue.indexOf('MX') > -1) { // 当分组为基本件时,查询基本件规范和不规范数据,否则查询外购件或标准件规范和不规范数据
|
||||
// 分别查出规范和不规范数据,将规范数据放前面在一个总数组中
|
||||
this.type = 1
|
||||
this.unSpecification = await unSpecificationQuery1(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
|
||||
this.unSpecification.data.forEach(item => {
|
||||
this.tableDataAll.push(item)
|
||||
})
|
||||
const specification = await specificationQuery1(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
|
||||
specification.data.forEach(item => {
|
||||
this.tableDataAll.push(item)
|
||||
})
|
||||
console.log(this.groupName)
|
||||
if (this.groupName.indexOf('MX') > -1) { // 当分组为基本件时,查询基本件规范和不规范数据,否则查询外购件或标准件规范和不规范数据
|
||||
// 分别查出规范和不规范数据,将规范数据放前面在一个总数组中
|
||||
this.type = 1
|
||||
this.unSpecification = await unSpecificationQuery1(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
|
||||
this.unSpecification.data.forEach(item => {
|
||||
this.tableDataAll.push(item)
|
||||
})
|
||||
const specification = await specificationQuery1(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
|
||||
specification.data.forEach(item => {
|
||||
this.tableDataAll.push(item)
|
||||
})
|
||||
} else {
|
||||
this.type = 2
|
||||
this.unSpecification = await unSpecificationQueryWB1(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
|
||||
console.log(this.unSpecification)
|
||||
this.unSpecification.data.forEach(item => {
|
||||
this.tableDataAll.push(item)
|
||||
})
|
||||
const specification = await specificationQueryWB1(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
|
||||
specification.data.forEach(item => {
|
||||
this.tableDataAll.push(item)
|
||||
})
|
||||
}
|
||||
this.total = this.tableDataAll.length
|
||||
this.pagination(this.pageCurrent, this.pageSize) // 前端分页,数据很多生成DOM节点也多,分页效果很明显。
|
||||
this.listLoading = false
|
||||
@@ -433,11 +453,19 @@ export default {
|
||||
this.Number = row.id
|
||||
this.Type = row.整改类型
|
||||
if (row.整改类型 === 1) {
|
||||
update(this.projectName, this.machineValue, row.id, row.整改类型).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.fetchData()
|
||||
}
|
||||
})
|
||||
if (this.groupName.indexOf('MX') > -1) {
|
||||
update(this.projectName, this.machineValue, row.id, row.整改类型).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.fetchData()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
update1(row.id, row.整改类型).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.fetchData()
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (row.整改类型 === 2) {
|
||||
this.title1 = '替换'
|
||||
@@ -455,6 +483,41 @@ export default {
|
||||
this.dialogParts = true
|
||||
}
|
||||
},
|
||||
allDelete() {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.projectName !== '' && this.machineValue !== '' && this.groupValue !== '') {
|
||||
allDelete(this.projectName, this.machineValue, this.groupValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.tableData = []
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择好项目机床分组')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
getMachineNames() {
|
||||
console.log(this.machineValue, 2222)
|
||||
getMachineNames(this.machineValue).then(response => {
|
||||
console.log(response.data, 3333)
|
||||
if (response.data.length !== 0) {
|
||||
this.machineName = response.data[0].机床名称
|
||||
this.machineNum = response.data[0].机床数量
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.dialogParts = false
|
||||
update(this.projectName, this.machineValue, this.Number, this.Type, this.PartsValueNum).then(response => {
|
||||
@@ -564,44 +627,34 @@ export default {
|
||||
this.err = 0
|
||||
if (this.groupValue) {
|
||||
this.listLoading = true
|
||||
for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
console.log(data.分类码)
|
||||
const resp = await transferMX1(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.分类码, data.整改类型, data.id, data.前id, data.前图号或者型号)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
if (this.groupName.indexOf('MX') > -1) {
|
||||
for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
const resp = await transferMX1(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.分类码, data.整改类型, data.id, data.前id, data.前图号或者型号)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
let dataType
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
if (this.groupName.indexOf('WG') > -1) {
|
||||
dataType = 2
|
||||
} else {
|
||||
dataType = 1
|
||||
}
|
||||
const resp = await transferWG1(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
this.$notify.error(`传递零件失败`)
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (this.groupValue.indexOf('MX') > -1) {
|
||||
// for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
// const data = this.tableDataAll[i]
|
||||
// const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
// const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id)
|
||||
// await sleep(10)
|
||||
// if (resp.data[0].result === '0') {
|
||||
// this.err++
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
// let dataType
|
||||
// const data = this.tableDataAll[i]
|
||||
// const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
// if (this.groupValue.indexOf('WG') > -1) {
|
||||
// dataType = 2
|
||||
// } else {
|
||||
// dataType = 1
|
||||
// }
|
||||
// const resp = await transferWG(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id)
|
||||
// await sleep(10)
|
||||
// if (resp.data[0].result === '0') {
|
||||
// this.err++
|
||||
// this.$notify.error(`传递零件失败`)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (this.err === 0) { // 传递成功后,清除该分组。当所有组都传递完成后,该项目下的机床和分组消失
|
||||
const index = this.groupsNames.indexOf(this.groupValue)
|
||||
this.groupsNames.splice(index, 1)
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
</el-select>
|
||||
<el-button :loading="listLoading" :disabled="disabled" type="primary" icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="small" @click="allDelete">一键删除</el-button>
|
||||
<el-row style="margin-top: 20px">
|
||||
<span>机床名称:</span>
|
||||
<el-input v-model="machineName" readonly size="small" placeholder="机床名称" style="width: 200px;"/>
|
||||
<span>机床数量:</span>
|
||||
<el-input v-model="machineNum" readonly size="small" placeholder="机床数量" style="width: 200px;"/>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
@@ -259,7 +265,7 @@
|
||||
|
||||
<script>
|
||||
import { sleep } from '../../../utils/tool'
|
||||
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1 } from '../../../api/TechnologyCenter/ImportParts'
|
||||
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames } from '../../../api/TechnologyCenter/ImportParts'
|
||||
export default {
|
||||
name: 'SpecificationData',
|
||||
props: {
|
||||
@@ -285,6 +291,8 @@ export default {
|
||||
componentNum: '',
|
||||
groupValue: '',
|
||||
machineValue: '',
|
||||
machineName: '',
|
||||
machineNum: '',
|
||||
tableData: [],
|
||||
tableDataAll: [],
|
||||
tableData10: [],
|
||||
@@ -347,10 +355,15 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
machineNames(val) {
|
||||
this.machineName = ''
|
||||
this.machineNum = ''
|
||||
this.total = 0
|
||||
this.machineValue = val.length > 0 ? val[0].value : ''
|
||||
this.getGroups()
|
||||
},
|
||||
machineValue() {
|
||||
this.getMachineNames()
|
||||
},
|
||||
groupsNames(val) {
|
||||
this.groupValue = val.length > 0 ? val[0].value : ''
|
||||
},
|
||||
@@ -461,6 +474,14 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
getMachineNames() {
|
||||
console.log(this.machineValue, 2222)
|
||||
getMachineNames(this.machineValue).then(response => {
|
||||
console.log(response.data, 3333)
|
||||
this.machineName = response.data[0].机床名称
|
||||
this.machineNum = response.data[0].机床数量
|
||||
})
|
||||
},
|
||||
getGroups() {
|
||||
this.$emit('machineChange', this.machineValue)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user