工时查询修改工时
This commit is contained in:
@@ -158,7 +158,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
sortChange(column) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
if (column.prop === '零件名称') {
|
||||
this.ordername = 1
|
||||
} else if (column.prop === '零件图号') {
|
||||
|
||||
@@ -335,9 +335,7 @@ export default {
|
||||
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]
|
||||
|
||||
@@ -191,7 +191,6 @@ export default {
|
||||
this.searchRecord1()
|
||||
},
|
||||
searchRecord1() {
|
||||
console.log(111111)
|
||||
let check1, check2, check3, check4, check5, check6, check7
|
||||
this.projectValue ? check1 = 1 : check1 = 0
|
||||
this.machineValue ? check2 = 1 : check2 = 0
|
||||
|
||||
@@ -622,7 +622,6 @@ export default {
|
||||
this.dialogFormVisible10 = true
|
||||
},
|
||||
typeChange() {
|
||||
console.log(Cookie.get('machineValue'), 1111111)
|
||||
this.toolNumValue = ''
|
||||
this.toolNum = []
|
||||
this.NumValue = ''
|
||||
|
||||
@@ -70,7 +70,6 @@ export default {
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.project = []
|
||||
console.log(1111)
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.project.push({
|
||||
|
||||
@@ -541,7 +541,6 @@ export default {
|
||||
this.length = 0
|
||||
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, 1, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.length = parseInt(response.data.total)
|
||||
console.log(response.data.rows, 11111)
|
||||
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
|
||||
this.num111.push(response.data.rows[i].工艺计划流水号)
|
||||
this.零件图号.push(response.data.rows[i].零件图号)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-button type="primary" class="el-icon-search" size="small" plain style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-col :span="8">
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row size="mini" stripe style="width: 100%;" height="700px" border element-loading-text="拼命加载中" @row-click="searchTable2">
|
||||
<el-table-column label="操作者" align="center" show-overflow-tooltip>
|
||||
@@ -27,11 +27,6 @@
|
||||
{{ scope.row.操作工 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="计划工时(分)" align="center" width="70px">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.计划总工时 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="完成数量" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
@@ -63,7 +58,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" style="width: 100%;" height="700px" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="零件图号" align="center" width="135px" show-overflow-tooltip>
|
||||
@@ -91,16 +86,21 @@
|
||||
<!--{{ scope.row.计划工时 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="单件工时(分)" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补单件工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工工时(分)" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="录入准结" align="center" width="70px">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.修补准结工时 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="录入准结" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="扫码工时(分)" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扫码工时 }}
|
||||
@@ -111,6 +111,11 @@
|
||||
{{ scope.row.完成日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="130px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
<el-pagination
|
||||
@@ -125,6 +130,32 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" :close-on-click-modal="false" class="dialog3" title="编辑" center width="500px">
|
||||
<el-form ref="form1" :model="form1" label-position="right" label-width="160px">
|
||||
<el-form-item label="完成数量:" prop="完成数量">
|
||||
<el-input-number :min="0" :max="剩余数量" v-model="form1.完成数量" style="width: 200px" @change="timeChange()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单件工时(分):" prop="录入工时">
|
||||
<el-input-number :min="0" v-model="form1.录入工时" style="width: 200px" @change="timeChange()"/>
|
||||
<!--<el-input class="editWorkTime" v-positive="'float'" v-model="form1.录入工时" placeholder="录入工时" style="width:200px;" type="number"/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="录入准结(分):" prop="录入准结">
|
||||
<el-input-number :min="0" v-model="form1.录入准结" style="width: 200px"/>
|
||||
<!--<el-input class="editWorkTime" v-positive="'float'" v-model="form1.录入准结" placeholder="录入准结" style="width:200px;" type="number"/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="加工工时(分):" prop="加工时间">
|
||||
<span style="font-size: 20px">{{ 加工时间 }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="false" label="备注:" prop="备注">
|
||||
<el-input v-model="form1.备注" :rows="4" type="textarea" placeholder="备注" clearable size="small" style="width:200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff1('form1')">取消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')" >确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -137,9 +168,9 @@ export default {
|
||||
startTime: getNowShotTime(), // 开始时间
|
||||
endTime: getNowShotTime(), // 结束时间
|
||||
tableData: [], // 操作者工时统计
|
||||
loading: '',
|
||||
loading: false,
|
||||
tableData2: [], // 工序统计表
|
||||
loading2: '',
|
||||
loading2: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10000,
|
||||
total: 0,
|
||||
@@ -147,7 +178,17 @@ export default {
|
||||
pageSize2: 10000,
|
||||
total2: 0,
|
||||
timeCheck: '',
|
||||
operater: ''
|
||||
operater: '',
|
||||
row: [],
|
||||
dialogVisible1: false,
|
||||
form1: {
|
||||
完成数量: '',
|
||||
录入工时: '',
|
||||
录入准结: '',
|
||||
备注: ''
|
||||
},
|
||||
加工时间: 0,
|
||||
剩余数量: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -178,6 +219,7 @@ export default {
|
||||
// 获取工序表
|
||||
searchTable2(row) {
|
||||
this.loading2 = true
|
||||
this.row = row
|
||||
this.tableData2 = []
|
||||
this.pageCurrent2 = 1
|
||||
var STime = ''
|
||||
@@ -185,7 +227,6 @@ export default {
|
||||
STime = this.startTime + ' 00:00:00'
|
||||
ETime = this.endTime + ' 23:59:59'
|
||||
searchtable2(row.人员编号, STime, ETime, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
console.log(response.data, 222)
|
||||
if (response.data.rows.length !== 0) {
|
||||
this.tableData2 = response.data.rows
|
||||
}
|
||||
@@ -193,6 +234,66 @@ export default {
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
var param = []
|
||||
param[0] = ['工序流水号', row.工序流水号]
|
||||
param[1] = ['完成过程流水号', row.完成过程流水号]
|
||||
var Data1 = this.CreateData('11', 'MES_机加工MES_修改完成工时数量查询', param)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
this.剩余数量 = response.data[0].剩余数量
|
||||
this.完成过程流水号 = row.完成过程流水号
|
||||
this.工序流水号 = row.工序流水号
|
||||
this.完成数量_原 = row.完成数量
|
||||
this.form1.录入工时 = row.修补单件工时
|
||||
this.form1.录入准结 = row.修补工时
|
||||
this.form1.备注 = row.备注
|
||||
this.加工时间 = this.form1.录入工时
|
||||
this.form1.完成数量 = row.完成数量
|
||||
this.timeChange()
|
||||
this.dialogVisible1 = true
|
||||
})
|
||||
},
|
||||
callOff1() {
|
||||
this.dialogVisible1 = false
|
||||
},
|
||||
timeChange() {
|
||||
if (this.form1.完成数量 > 0) {
|
||||
this.加工时间 = this.form1.录入工时 * this.form1.完成数量
|
||||
} else {
|
||||
this.加工时间 = this.form1.录入工时
|
||||
}
|
||||
},
|
||||
submit1() {
|
||||
this.工位号 = this.$route.query.OPNAME
|
||||
var param = []
|
||||
param[0] = ['工序流水号', this.工序流水号]
|
||||
param[1] = ['完成过程流水号', this.完成过程流水号]
|
||||
param[2] = ['完成数量', this.form1.完成数量]
|
||||
param[3] = ['完成数量_原', this.完成数量_原]
|
||||
param[4] = ['录入工时', this.form1.录入工时]
|
||||
param[5] = ['录入准结', this.form1.录入准结]
|
||||
param[6] = ['备注', this.form1.备注]
|
||||
var Data1 = this.CreateData('11', 'MES_机加工MES_编辑备注_Vue_New', param)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
if (response.data[0].result === 1) {
|
||||
console.log('成功,数量减少 1')
|
||||
} else if (response.data[0].result === 2) {
|
||||
console.log('失败,工序状态已为4,不能继续增加 2')
|
||||
this.$message.error('此工序已经全部完成,不能继续增加数量!')
|
||||
} else if (response.data[0].result === 3) {
|
||||
console.log('失败,剩余数量不足 3')
|
||||
this.$message.error('检测到数量变化,请重新修改完成数量!')
|
||||
} else if (response.data[0].result === 4) {
|
||||
console.log('成功,数量增加,增加后工序状态完成 4')
|
||||
} else if (response.data[0].result === 5) {
|
||||
console.log('成功,数量增加,增加后工序状态仍未完成 5')
|
||||
} else if (response.data[0].result === 6) {
|
||||
console.log('成功,未修改数量 6')
|
||||
}
|
||||
this.searchTable2(this.row)
|
||||
this.dialogVisible1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
|
||||
@@ -983,7 +983,6 @@ export default {
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
console.log(valid, 111111)
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.addTableData1()
|
||||
|
||||
@@ -1351,7 +1351,6 @@ export default {
|
||||
// 2020 03 04 刘路加表头排序
|
||||
// 1 供货商 2 机床图号 3 物料名称 4 物料型号
|
||||
sortChange(column, prop, order) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
if (column.prop === '供货商') {
|
||||
this.ordername = 1
|
||||
} else if (column.prop === '机床图号') {
|
||||
|
||||
@@ -1042,7 +1042,6 @@ export default {
|
||||
})
|
||||
},
|
||||
tabClick(tab) {
|
||||
console.log(tab.name, 1111)
|
||||
if (tab.name === '外购件') {
|
||||
this.tabName = '外购件'
|
||||
this.searchTable11()
|
||||
@@ -1388,7 +1387,6 @@ export default {
|
||||
})
|
||||
},
|
||||
saveContract() {
|
||||
console.log(11111)
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
|
||||
@@ -188,9 +188,7 @@ export default {
|
||||
manufacturer,
|
||||
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('-')) + '组'
|
||||
console.log(this.worksheet[j].J2.v.substring(0, 2), 11111111111)
|
||||
if (this.worksheet[j].M2.v.substring(0, 1) === '9' && this.worksheet[j].J2.v.substring(0, 2) === '整改') {
|
||||
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
|
||||
const res = response.data
|
||||
|
||||
@@ -499,7 +499,6 @@ export default {
|
||||
},
|
||||
getMachineNames() {
|
||||
getMachineNames(this.machineValue).then(response => {
|
||||
console.log(response.data, 1111)
|
||||
this.machineName = response.data[0].机床名称
|
||||
this.machineNum = response.data[0].机床数量
|
||||
})
|
||||
|
||||
@@ -403,7 +403,6 @@ export default {
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
tableRowClassName1({ row }) {
|
||||
console.log(row, 11111)
|
||||
if (row.是否加急件 === '1') {
|
||||
return 'isUrgentItem1'
|
||||
}
|
||||
|
||||
@@ -411,7 +411,6 @@ export default {
|
||||
},
|
||||
// 按零件图号 组号 材料排序
|
||||
sortChange(column) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
if (column.prop === '组号') {
|
||||
this.ordername = 1
|
||||
} else if (column.prop === '零件图号') {
|
||||
|
||||
@@ -643,7 +643,6 @@ export default {
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = function() {
|
||||
if (xhr.status === 200) {
|
||||
console.log(xhr, 1111)
|
||||
const name = xhr.getResponseHeader('content-disposition').split('=')[1]
|
||||
cb(xhr.response, name)
|
||||
}
|
||||
|
||||
@@ -251,7 +251,6 @@ export default {
|
||||
},
|
||||
// 按供应商名称,下单日期,零件名称,材料
|
||||
sortChange(column) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
if (column.prop === '供应商名称') {
|
||||
this.ordername = 1
|
||||
} else if (column.prop === '零件名称') {
|
||||
|
||||
@@ -362,7 +362,6 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
console.log(row, 1111)
|
||||
// if (this.a === 1) {
|
||||
// this.expands.push(row.采购计划请款流水号)
|
||||
// this.b = row.采购计划请款流水号
|
||||
|
||||
@@ -263,7 +263,6 @@ export default {
|
||||
})
|
||||
},
|
||||
comfirmUrgentItem() {
|
||||
console.log(1111)
|
||||
searchUrgentItem().then(res => {
|
||||
if (res.data.length > 0) {
|
||||
this.noticeContractJJ = null
|
||||
|
||||
Reference in New Issue
Block a user