Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -129,3 +129,26 @@ where s1.group_idx= 1`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function searchWorkTime(code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: 1,
|
||||
name: '车间生产管理工艺_零件工艺计划_完成零件数量状态更改查询',
|
||||
param: '工序流水号=' + code + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submit2(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工艺计划_完成零件数量状态更改',
|
||||
param: `工序流水号=${num}&完成数量=${num1}&操作者=${num2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>
|
||||
<!--<el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>-->
|
||||
<el-button :disabled="isDisabled" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditConfirmNum">修改完成数量</el-button>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 185px;" placeholder="机床号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
@@ -35,13 +36,18 @@
|
||||
highlight-current-row
|
||||
empty-text=" "
|
||||
border
|
||||
@current-change="getRow">
|
||||
@row-click="getRow">
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column align="center" label="已完数量" show-overflow-tooltip min-width="70">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.完成数量 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column align="center" label="质检" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序间质检 }}
|
||||
@@ -57,11 +63,6 @@
|
||||
{{ scope.row.操作者 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="排产日期" width="95">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.排产日期 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="完成日期" width="95">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成日期 }}
|
||||
@@ -80,17 +81,12 @@
|
||||
highlight-current-row
|
||||
border
|
||||
height="630"
|
||||
@current-change="getCurrentRow">
|
||||
@row-click="getCurrentRow">
|
||||
<el-table-column type="index" align="center" label="跟单号" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.跟单号" v-model="radio"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="跟单号" width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.跟单号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
@@ -121,7 +117,7 @@
|
||||
{{ scope.row.计划结束时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="用户名称" show-overflow-tooltip width="110">
|
||||
<el-table-column align="center" label="用户名称" show-overflow-tooltip min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
@@ -207,11 +203,39 @@
|
||||
<el-button style="margin-left: 260px" @click="dialogFormVisible1 = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="修改完成数量" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
|
||||
<el-row width="200px">
|
||||
<el-form-item label="操作者:" prop="操作者" >
|
||||
<el-select v-model="form2.操作者" filterable style="width: 200px" placeholder="无" @change="czzChange">
|
||||
<el-option
|
||||
v-for="item in 操作者"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row width="200px">
|
||||
<el-form-item label="数量:" prop="数量" >
|
||||
<el-input-number :min="0" :max="max" v-model="form2.数量" placeholder="数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible2=false">取消</el-button>
|
||||
<el-button type="primary" @click="submit2('form')" >确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, getExport } from '@/api/ManufacturingCenter/ProcessingStatusNew'
|
||||
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, getExport, searchWorkTime, submit2 } from '@/api/ManufacturingCenter/ProcessingStatusNew'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
@@ -257,7 +281,15 @@ export default {
|
||||
ssks: '',
|
||||
Number1: '', // 人员编号
|
||||
row2: [],
|
||||
khbmbh: ''
|
||||
khbmbh: '',
|
||||
isDisabled: true,
|
||||
dialogFormVisible2: false,
|
||||
form2: {
|
||||
操作者: '',
|
||||
数量: ''
|
||||
},
|
||||
操作者: [],
|
||||
max: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -265,6 +297,43 @@ export default {
|
||||
this.getTable9()
|
||||
},
|
||||
methods: {
|
||||
EditConfirmNum() {
|
||||
this.form2.数量 = 0
|
||||
this.操作者 = []
|
||||
searchWorkTime(this.processSerialNumber).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.操作者.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号,
|
||||
value2: '完成数量:' + response.data[i].完成数量,
|
||||
value3: response.data[i].批次数量
|
||||
})
|
||||
}
|
||||
if (this.操作者.length !== 0) {
|
||||
this.form2.操作者 = parseInt(this.操作者[0].value)
|
||||
this.max = parseInt(this.操作者[0].value3) - 1
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
} else {
|
||||
this.$message.error('该工序暂无完成信息')
|
||||
}
|
||||
})
|
||||
},
|
||||
czzChange() {
|
||||
for (let i = 0; i < this.操作者.length; i++) {
|
||||
if (this.操作者[i].value === this.form2.操作者) {
|
||||
this.form2.数量 = 0
|
||||
this.max = parseInt(this.操作者[i].value3)
|
||||
}
|
||||
}
|
||||
},
|
||||
submit2() {
|
||||
submit2(this.processSerialNumber, this.form2.数量, this.form2.操作者).then(response => {
|
||||
this.getCurrentRow2(this.row2)
|
||||
this.dialogFormVisible2 = false
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
@@ -353,6 +422,8 @@ export default {
|
||||
}, // 按条件查询
|
||||
getTableData() {
|
||||
this.tableData = []
|
||||
this.tableData1 = []
|
||||
this.isDisabled = true
|
||||
this.Loading = true
|
||||
if (this.Machine === '') {
|
||||
this.checkbox_Machine = 0
|
||||
@@ -390,16 +461,18 @@ export default {
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
}, // 获取工序表
|
||||
},
|
||||
// 获取工序表
|
||||
getCurrentRow(row) {
|
||||
this.isDisabled = true
|
||||
this.completeTime = ''
|
||||
this.dateOfProduction = ''
|
||||
this.processSerialNumber = ''
|
||||
this.radio = true
|
||||
this.tableData1 = []
|
||||
this.row2 = row
|
||||
gettabledata1(row.工艺计划流水号).then(response => {
|
||||
console.log(response, 1212121)
|
||||
this.row2 = row.工艺计划流水号
|
||||
gettabledata1(this.row2).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
@@ -411,12 +484,40 @@ export default {
|
||||
不合格数量: response.data[i].不合格数量,
|
||||
质检数量: response.data[i].数量,
|
||||
工序流水号: response.data[i].工序流水号,
|
||||
工序状态: response.data[i].工序状态
|
||||
工序状态: response.data[i].工序状态,
|
||||
完成数量: response.data[i].完成数量
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}, // 补加完成日期
|
||||
},
|
||||
getCurrentRow2(row) {
|
||||
this.isDisabled = true
|
||||
this.completeTime = ''
|
||||
this.dateOfProduction = ''
|
||||
this.processSerialNumber = ''
|
||||
this.radio = true
|
||||
this.tableData1 = []
|
||||
gettabledata1(this.row2).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
工艺名称: response.data[i].工艺名称,
|
||||
序间质检: response.data[i].质检结果,
|
||||
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
|
||||
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
|
||||
操作者: response.data[i].操作者,
|
||||
不合格数量: response.data[i].不合格数量,
|
||||
质检数量: response.data[i].数量,
|
||||
工序流水号: response.data[i].工序流水号,
|
||||
工序状态: response.data[i].工序状态,
|
||||
完成数量: response.data[i].完成数量
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 补加完成日期
|
||||
EditData() {
|
||||
this.dialogFormVisible = true
|
||||
this.form.人员 = ''
|
||||
@@ -427,11 +528,7 @@ export default {
|
||||
this.completeTime = row.完成日期
|
||||
this.dateOfProduction = row.排产日期
|
||||
this.processSerialNumber = row.工序流水号
|
||||
if (this.completeTime === '' && this.dateOfProduction !== '') {
|
||||
this.isShow = false
|
||||
} else {
|
||||
this.isShow = true
|
||||
}
|
||||
if (this.processSerialNumber) { this.isDisabled = false } else { this.isDisabled = true }
|
||||
},
|
||||
dialogTableVisible() {
|
||||
this.dialogFormVisible1 = true
|
||||
|
||||
@@ -176,9 +176,9 @@
|
||||
<el-button size="medium" type="text" @click="toStatusQuery">零件状态查询</el-button>
|
||||
</el-tooltip>
|
||||
<el-divider direction="vertical"/>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="转到加工进度查询模块" placement="top">
|
||||
<el-button size="medium" type="text" @click="toProcessingStatus">加工进度查询</el-button>
|
||||
</el-tooltip>
|
||||
<!--<el-tooltip :open-delay="1000" effect="dark" content="转到加工进度查询模块" placement="top">-->
|
||||
<!--<el-button size="medium" type="text" @click="toProcessingStatus">加工进度查询</el-button>-->
|
||||
<!--</el-tooltip>-->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
@@ -372,7 +372,7 @@ export default {
|
||||
procedure: response.data[i].工艺名称,
|
||||
planningTime: response.data[i].计划日期_短,
|
||||
actualTime: response.data[i].完成日期_短 === null || response.data[i].完成日期_短 === '' ? '未完成' : response.data[i].完成日期_短,
|
||||
name: response.data[i].完成日期_短 === null || response.data[i].完成日期_短 === '' ? '未完成' : response.data[i].员工姓名,
|
||||
name: response.data[i].工序状态 === 4 ? response.data[i].员工姓名 : '未完成',
|
||||
color: response.data[i].进度颜色
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user