添加典型装配工艺模块及修复一些问题
This commit is contained in:
@@ -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('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
|
||||
Reference in New Issue
Block a user