添加典型装配工艺模块及修复一些问题
This commit is contained in:
@@ -95,26 +95,26 @@ export function searchDetail(num) {
|
||||
})
|
||||
}
|
||||
// 增加组件工艺
|
||||
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask) {
|
||||
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_增加数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask
|
||||
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑组件工艺
|
||||
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask) {
|
||||
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_编辑数据',
|
||||
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask
|
||||
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
240
src/api/Assembly/TypicalAssemblyMaintenance.js
Normal file
240
src/api/Assembly/TypicalAssemblyMaintenance.js
Normal file
@@ -0,0 +1,240 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化 工艺员A
|
||||
export function initCraftmen() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=17'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化 工序分类
|
||||
export function initprocessNameClass() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_工序分类_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化 机床分类
|
||||
export function initmachineType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_机床分类_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询机床编号
|
||||
export function SearchMachine(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_典型机床_查询数据',
|
||||
param: '机床分类流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询工序名称
|
||||
export function initProcessName(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_工序名称_查询数据',
|
||||
param: '工序分类流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询组件
|
||||
export function searchGroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询组件工艺
|
||||
export function searchDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_组件工艺_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加组件工艺
|
||||
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_增加数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑组件工艺
|
||||
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_编辑数据',
|
||||
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除组件工艺
|
||||
export function deleteGroup(GroupProcessNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_删除数据',
|
||||
param: '组件工艺流水号=' + GroupProcessNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询工序
|
||||
export function searchProcess(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_装配工序_查询数据',
|
||||
param: '组件工艺流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加工序
|
||||
export function insertOne(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_增加数据',
|
||||
param: '组件工艺流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工序
|
||||
export function update(num, num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_编辑数据',
|
||||
param: '装配工序流水号=' + num + '&序号=' + num1 + '&工序名称=' + num2 + '&工艺内容及装配具体要求=' + num3 + '&质检=' + num4
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工序1
|
||||
export function update1(num, num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_编辑数据',
|
||||
param: '装配工序流水号=' + num + '&序号=' + num1 + '&工序名称=' + num2 + '&工艺内容及装配具体要求=' + num3
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工时
|
||||
export function update2(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序工时_编辑数据',
|
||||
param: '装配工序流水号=' + num + '&工艺工时=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 保存
|
||||
export function saveApprove(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_机床工艺_定额完成',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上移
|
||||
export function upOne(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_上移',
|
||||
param: '装配工序流水号=' + num + '&组件工艺流水号=' + num1 + '&工序顺序=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 下移
|
||||
export function downOne(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_下移',
|
||||
param: '装配工序流水号=' + num + '&组件工艺流水号=' + num1 + '&工序顺序=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除工序
|
||||
export function deleteOne(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_删除数据',
|
||||
param: '装配工序流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 工艺删除
|
||||
export function deleteTable(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_机床工艺_删除数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
|
||||
@@ -143,6 +143,12 @@ export default {
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
console.log(response.data.rows[i].项目计划完成时间)
|
||||
if (response.data.rows[i].项目计划完成时间 !== '') {
|
||||
response.data.rows[i].项目计划完成时间 = (response.data.rows[i].项目计划完成时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -206,7 +206,7 @@
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="典型工艺机床分类">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
@@ -231,7 +231,7 @@
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll1" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -310,7 +310,7 @@
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll1" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -433,7 +433,8 @@ export default {
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue: '',
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
@@ -448,7 +449,6 @@ export default {
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
@@ -527,12 +527,11 @@ export default {
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
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].组号
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -670,37 +669,55 @@ export default {
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
// this.title = '增加组件工艺'
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = ''])
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
console.log(this.$refs[formName])
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
// this.editForm(row, 'form2', [this.title = '编辑组件工艺', this.GroupProcessNumber = row.组件工艺流水号, this.dialogFormVisible4 = true, this.Group = '', this.form2.组件 = []])
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
this.form2.组件 = []
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
|
||||
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
@@ -0,0 +1,477 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<span>机床分类:</span>
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machineNumber2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin-left: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, key) in dataAll" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteGroup(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工序名称"
|
||||
size="mini"
|
||||
style="width:200px"
|
||||
@dblclick.native="tableSearch(scope.row)"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺内容及装配具体要求"
|
||||
:rows="1"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺工时" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" size="mini" align="center" @change="update2(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteOne(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="工序名称、工序要求选择" center width="400px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工序名称分类">
|
||||
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()">
|
||||
<el-option
|
||||
v-for="item in processNameClass"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称">
|
||||
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()">
|
||||
<el-option
|
||||
v-for="item in processName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序要求">
|
||||
<el-input v-model="processRequestValue" placeholder="要求" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button size="mini" type="primary" @click="confirmSelect()">确定选择</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="序号" prop="序号">
|
||||
<el-input v-model="form2.序号" placeholder="序号" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组件" prop="组件">
|
||||
<el-select v-model="form2.组件" multiple placeholder="组件" size="small">
|
||||
<el-option
|
||||
v-for="item in GroupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="装配任务" prop="装配任务">
|
||||
<el-input v-model="form2.装配任务" placeholder="装配任务" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4=false">取消</el-button>
|
||||
<el-button v-show="title==='增加组件工艺'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑组件工艺'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SearchMachine, searchDetail, searchProcess, update, submitAdd, submitEdit, insertOne, update2, upOne, downOne, deleteOne,
|
||||
deleteGroup, initmachineType, initprocessNameClass, initProcessName, update1, searchGroup } from '@/api/Assembly/TypicalAssemblyMaintenance'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
radio: 0,
|
||||
checked: false,
|
||||
number: '',
|
||||
machineNumberValue1: '',
|
||||
machineNumber2: [],
|
||||
machineTypeValue: '',
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
SerialNumber: '',
|
||||
SerialNumberGroup: [],
|
||||
isShow2: false,
|
||||
processNameClassValue: '',
|
||||
processNameClass: [],
|
||||
processNameValue: '',
|
||||
Process: '',
|
||||
processName: [],
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
form1: {},
|
||||
form2: {
|
||||
序号: '',
|
||||
组件: [],
|
||||
装配任务: ''
|
||||
},
|
||||
rules: {
|
||||
序号: [{ required: true, message: '请输入序号', trigger: 'blur' }],
|
||||
组件: [{ required: true, message: '请选择组件', trigger: 'change' }],
|
||||
装配任务: [{ required: true, message: '请输入装配任务', trigger: 'blur' }]
|
||||
},
|
||||
num1: '',
|
||||
result: 0,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible4: false,
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initprocessNameClass().then(response => { // 初始化工序分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processNameClass.push({
|
||||
label: response.data[i].工序分类名称,
|
||||
value: response.data[i].工序分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initmachineType().then(response => { // 初始化机床分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineType.push({
|
||||
label: response.data[i].机床分类名称,
|
||||
value: response.data[i].机床分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
SearchMachine() {
|
||||
this.machineNumberValue1 = ''
|
||||
this.machineNumber2 = []
|
||||
SearchMachine(this.machineTypeValue).then(response => { // 典型机床查询
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber2.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue1)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
update2(row) {
|
||||
update2(row.装配工序流水号, row.工艺工时).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue1, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteGroup(row.组件工艺流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
insertOne(row) {
|
||||
insertOne(row.组件工艺流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteTable() {
|
||||
this.$confirm('此操作将永久删除该工艺, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = 0
|
||||
for (var i = 0; i < this.dataAll.length; i++) {
|
||||
deleteGroup(this.dataAll[i].table1[0].组件工艺流水号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.dataAll.length) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
upOne(row) {
|
||||
upOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
downOne(row) {
|
||||
downOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteOne(row) {
|
||||
deleteOne(row.装配工序流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
cChange() {
|
||||
this.processName = []
|
||||
initProcessName(this.processNameClassValue).then(response => { // 初始化工序分类
|
||||
this.tableData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processName.push({
|
||||
label: response.data[i].工序名称,
|
||||
value: response.data[i].工序名称流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
nChange() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.processNameValue === this.tableData[i].工序名称流水号) {
|
||||
this.Process = this.tableData[i].工序名称
|
||||
this.processRequestValue = this.tableData[i].工艺内容及装配具体要求
|
||||
}
|
||||
}
|
||||
},
|
||||
tableSearch(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.processNameClassValue = ''
|
||||
this.processNameValue = ''
|
||||
this.processRequestValue = ''
|
||||
this.Procedure = row.装配工序流水号
|
||||
this.number = row.序号
|
||||
},
|
||||
confirmSelect() {
|
||||
update1(this.Procedure, this.number, this.Process, this.processRequestValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message.success('选择成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.success('选择失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -19,9 +19,9 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<span>年:</span>
|
||||
<el-date-picker
|
||||
v-model="year"
|
||||
@@ -155,7 +155,9 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitName">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
|
||||
@@ -202,7 +204,9 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitGroup">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请购人" prop="请购人">
|
||||
<el-form-item label="请购人">
|
||||
<el-input
|
||||
v-model="name"
|
||||
size="small"
|
||||
@@ -496,6 +496,12 @@ export default {
|
||||
this.check4 = 0
|
||||
}
|
||||
searchTable1(this.PurchaseOrder, this.check4).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
console.log(response.data[i].请购时间)
|
||||
if (response.data[i].请购时间 !== '') {
|
||||
response.data[i].请购时间 = (response.data[i].请购时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" clearable style="width:200px" @dblclick.native="SearchMachine" @change="empty1"/>
|
||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="SearchMachine" @change="empty1"/>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
<br>
|
||||
@@ -187,7 +187,9 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitName">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
|
||||
@@ -234,7 +236,9 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitGroup">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -253,6 +253,7 @@ export default {
|
||||
this.form.设备型号 = row.设备型号
|
||||
this.form.设备性能指标 = row.设备性能指标
|
||||
this.form.设备加工能力 = row.设备加工能力工时
|
||||
this.form.设备加工工艺 = parseInt(row.工艺属性代码)
|
||||
this.form.班次类型 = row.班次类型
|
||||
this.form.设备工时系数 = row.设备工时系数
|
||||
this.form.整改工时系数 = row.整改工时比例
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="supplierName" size="small" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
<el-input v-model="supplierName" size="small" placeholder="请双击选择" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" readonly clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
@@ -266,7 +266,9 @@ export default {
|
||||
审批是否通过: '',
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
rules2: {
|
||||
审批是否通过: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
},
|
||||
tableData2: [],
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
@@ -152,7 +152,7 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
@@ -163,7 +163,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName1" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
<el-input v-model="buyerName1" placeholder="请双击选择" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
|
||||
Reference in New Issue
Block a user