This commit is contained in:
zhangdingyu
2019-02-12 09:30:46 +08:00
parent 39787dcea3
commit eafbf35346
7 changed files with 40 additions and 60 deletions

View File

@@ -185,11 +185,14 @@ export default {
} else {
this.a = 0
for (let i = 0; i < this.tableData2.length; i++) {
edit(this.tableData2[i].工艺计划流水号)
this.a = this.a + 1
}
if (this.a === this.tableData2.length) {
this.searchTable()
edit(this.tableData2[i].工艺计划流水号).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData2.length) {
this.pageSize = 10
this.pageCurrent = 1
this.searchTable()
}
})
}
}
},

View File

@@ -528,11 +528,10 @@ export default {
this.$message.error('请选择机床组号')
} else {
this.listLoading = true
this.tableData = []
this.tableData1 = []
getTable(this.NumValue, this.pageList, this.pageSize).then(response => {
console.log(this.NumValue, this.pageList, this.pageSize)
this.total = parseInt(response.data.total)
this.tableData = []
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
零件图号: response.data.rows[i].零件图号,

View File

@@ -41,13 +41,10 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询
</el-button>
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询</el-button>
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整
</el-button>
<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式
</el-button>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>
<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式</el-button>
<div v-show="isShow">
<span>种类:</span>
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
@@ -816,7 +813,6 @@ export default {
insertThestring(NewCode) {
this.lastFocusText = event.srcElement
this.lastFocusText.focus()
console.log(this.lastFocusText)
var sel = document.selection.createRange()
sel.text = NewCode
return
@@ -1064,7 +1060,6 @@ export default {
numChange() {
numChange(this.processNumValue).then(response => {
this.tableData2 = response.data
console.log(this.tableData2)
})
},
// 典艺工艺拷贝
@@ -1072,14 +1067,13 @@ export default {
if (this.partNumValue === '') {
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
this.dialogFormVisible = false
} else if (this.partNameValue1 === '') {
this.$message.error('请选择零件名称')
} else if (this.processNumValue === '') {
this.$message.error('请选择零件图号')
} else {
for (let i = 0; i < this.tableData2.length; i++) {
this.tableData[i].工艺名称 = this.tableData2[i].工艺名称
this.tableData[i].工艺难度等级 = this.tableData2[i].工艺难度等级
this.tableData[i].工艺要求 = this.tableData2[i].工艺要求
console.log(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工序顺序, this.tableData2[i].工艺要求)
selectRequest(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工序顺序, this.tableData2[i].工艺要求)
hardEdit(this.tableData[i].工序流水号, this.tableData2[i].工艺难度等级)
}
@@ -1124,12 +1118,13 @@ export default {
if (this.partNumValue === '') {
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
} else {
gongyiCopy(this.num, this.partNumValue).then(() => { // 工艺计划流水号_完成工艺, 工艺计划流水号_被拷工艺
gongyiCopy(this.num, this.partNumValue).then(res => { // 工艺计划流水号_完成工艺, 工艺计划流水号_被拷工艺
this.searchDetail()
})
}
},
numChange1() { // 当完成工艺号改变时,零件名称改变,并获取工艺要求
// 当完成工艺号改变时,零件名称改变,并获取工艺要求
numChange1() {
this.remark1 = ''
this.tableData4 = null
for (let i = 0; i < this.tuhao.length; i++) {

View File

@@ -456,12 +456,16 @@ export default {
for (let i = 0; i < this.零件图号.length; i++) {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i], 1).then(response => {
this.liushuihao = response.data[0].工艺计划流水号
console.log(response.data)
for (let k = 0; k < response.data.length; k++) {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].员工姓名 === '超级管理员') {
response.data[k].员工姓名 = '请选择'
}
this.worker[i][k] = response.data[k].员工姓名
if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
this.colorCode[i][k] = 'grey'
} else {

View File

@@ -15,7 +15,7 @@
:value="item.value"/>
</el-select>
<span style="margin: 10px">零件号:</span>
<el-select v-model="partNumValue" size="small" filterable placeholder="零件号" style="margin: 10px">
<el-select v-model="partNumValue" size="small" filterable placeholder="零件号" style="margin: 10px" @change="typeChange()">
<el-option
v-for="item in partNum"
:key="item.value"
@@ -26,60 +26,41 @@
<span v-if="radio === 1" style="color: #53A3F7;font-size: 14px"> 未编制的数量{{ partNum.length }}</span>
<span v-if="radio === 2" style="color: #53A3F7;font-size: 14px"> {{ shuliang }}</span>
</div>
<div>
<span>种类:</span>
<el-input
v-model="typeValue"
size="small"
placeholder="种类"
readonly
style="margin: 10px;width:180px"/>
<el-input v-model="typeValue" size="small" placeholder="种类" readonly style="margin: 10px;width:180px"/>
<span>零件名称:</span>
<el-input
v-model="partName"
size="small"
placeholder="零件名称"
readonly
style="margin: 10px;width:180px"/>
<el-input v-model="partName" size="small" placeholder="零件名称" readonly style="margin: 10px;width:180px"/>
<span>投产总数量:</span>
<el-input
v-model="batchNum"
size="small"
placeholder="投产总数量"
readonly
style="margin: 10px;width:180px"/>
<el-input v-model="batchNum" size="small" placeholder="投产总数量" readonly style="margin: 10px;width:180px"/>
<span>材质:</span>
<el-input
v-model="material"
size="small"
placeholder="材质"
readonly
style="margin: 10px;width:180px"/>
<el-input v-model="material" size="small" placeholder="材质" readonly style="margin: 10px;width:180px"/>
<el-button v-if="radio === 2" type="primary" icon="el-icon-cjn-09" size="small" @click="ADD">保存</el-button>
<el-button v-if="radio === 1" type="primary" icon="el-icon-cjn-09" size="small" @click="ADD1">保存</el-button>
</div>
</el-card>
<el-card>
<div>
<el-table v-loading="listLoading" :data="tableData" border style="width: 100%;" height="550px">
<el-table v-loading="listLoading" :data="tableData" border style="width: 100%;" height="550px" size="small">
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="name" label="工艺名称" width="180" align="center">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].name" style="width:150px" placeholder="工艺名称" readonly/>
<el-input v-model="tableData[scope.$index].name" style="width:150px" size="small" placeholder="工艺名称" readonly/>
</template>
</el-table-column>
<el-table-column prop="request" label="工艺要求" align="center">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].request" :rows="1" placeholder="工艺要求" type="textarea" readonly/>
<el-input v-model="tableData[scope.$index].request" :rows="1" size="small" placeholder="工艺要求" type="textarea" readonly/>
</template>
</el-table-column>
<el-table-column prop="singleton" label="单件" width="180" align="center">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].singleton" :readonly="tableData[scope.$index].name===''" style="width:150px" placeholder="单件"/>
<el-input v-model="tableData[scope.$index].singleton" :readonly="tableData[scope.$index].name===''" style="width:150px" size="small" placeholder="单件"/>
</template>
</el-table-column>
<el-table-column prop="Settlement" label="准结" width="180" align="center">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].Settlement" :readonly="tableData[scope.$index].name===''" style="width:150px" placeholder="准结"/>
<el-input v-model="tableData[scope.$index].Settlement" :readonly="tableData[scope.$index].name===''" style="width:150px" size="small" placeholder="准结"/>
</template>
</el-table-column>
<el-table-column v-if="isShow" prop="budget" label="外协预算" width="180" align="center">
@@ -88,9 +69,6 @@
</template>
</el-table-column>
</el-table>
<el-button v-if="radio === 2" type="primary" icon="el-icon-cjn-09" size="small" style="float:right;margin: 10px" @click="ADD">保存</el-button>
<el-button v-if="radio === 1" type="primary" icon="el-icon-cjn-09" size="small" style="float:right;margin: 10px" @click="ADD1">保存</el-button>
</div>
</el-card>
</div>

View File

@@ -115,7 +115,7 @@
</el-card>
<el-card>
<el-table v-loading="loading0" :data="tableData" :summary-method="getSummaries" border style="width: 100%;max-height: 390px;" height="340px" stripe show-summary>
<el-table v-loading="loading0" :data="tableData" :summary-method="getSummaries" border style="width: 100%;max-height: 390px;" height="340px" size="small" stripe show-summary>
<el-table-column label="序号" width="80" align="center" type="index"/>
<el-table-column label="工艺名称" width="200" align="center">
<template slot-scope="scope">
@@ -124,7 +124,7 @@
</el-table-column>
<el-table-column label="工艺要求" align="center">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].工艺要求" size="mini" readonly type="textarea"/>
<el-input v-model="tableData[scope.$index].工艺要求" :autosize="{ minRows: 1, maxRows: 1}" size="mini" readonly type="textarea"/>
</template>
</el-table-column>
<el-table-column label="单件" width="110" align="center">

View File

@@ -79,7 +79,7 @@
</el-card>
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="350" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table v-loading="loading2" :data="tableData2" height="350" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-table-column
label=" "
type="index"
@@ -88,14 +88,14 @@
<el-table-column label="加工状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.工序状态)===3" type="success" size="small">未加工</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)===4" size="small">已完成</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)===4&&parseInt(scope.row.工艺编号)!==29" size="small">已完成</el-tag>
<el-tag v-if="parseInt(scope.row.工艺编号)===29" size="small">备料</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)===5" size="small">停产</el-tag>
</template>
</el-table-column>
<el-table-column label="序间外协" width="100" align="center">
<template slot-scope="scope">
<el-checkbox :disabled="parseInt(scope.row.工序状态)!==3" v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
<el-checkbox :disabled="parseInt(scope.row.工序状态)!==3||parseInt(scope.row.工艺编号)===29" v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
</template>
</el-table-column>
<el-table-column label="是否外协" width="100" align="center">
@@ -244,6 +244,7 @@ export default {
this.checkBox = []
this.tableData2 = []
searchTable2(row.工艺计划流水号).then(response => {
console.log(response.data)
this.num1 = row.工艺计划流水号
if (response.data.length === 0) {
this.loading0 = false