This commit is contained in:
liushuai
2019-08-20 13:03:06 +08:00
parent 3d6e2e043c
commit d02ecfcdf9
15 changed files with 852 additions and 45 deletions

View File

@@ -59,6 +59,19 @@ export function selecttable(check1, value1, check2, value2, check3, value3, chec
}
})
}
// 质检管理_质量情况_查询数据
export function selecttable22(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '质检管理_质量情况_查询数据',
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 +
'&质检类型代码_check=' + check4 + '&质检类型代码=' + value4 + '&开始时间_check=' + check5 + '&开始时间=' + value5 + '&结束时间_check=' + check6 + '&结束时间=' + value6 + '&质检情况_check=' + check7 + '&质检情况=' + value7 + '&人员编号_check=' + check8 + '&人员编号=' + value8
}
})
}
export function searchPic(num) {
return request({
url: '',
@@ -115,3 +128,14 @@ export function processingStatus(num) {
}
})
}
export function Prohibit(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '质检管理_质检情况_禁用',
param: '质检流水号=' + num + '&质检类型代码=' + num1
}
})
}

View File

@@ -72,26 +72,26 @@ export function getStaff() {
})
}
export function addTable(equipmentNumber, equipment, shift, operator, operatorNumber) {
export function addTable(equipmentNumber, shift, operator, operatorNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备名称_人员关系_增加数据',
param: '设备流水号=' + equipmentNumber + '=int&设备名称=' + equipment + '=string&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int'
param: '设备流水号=' + equipmentNumber + '=int&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int'
}
})
}
export function editTable(equipment, equipmentNumber, shift, operator, operatorNumber, Number) {
export function editTable(equipmentNumber, shift, operator, operatorNumber, Number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备名称_人员关系_修改数据',
param: '设备流水号=' + equipmentNumber + '=int&设备名称=' + equipment + '=string&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int&设备人员关系流水号=' + Number + '=int'
param: '设备流水号=' + equipmentNumber + '=int&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int&设备人员关系流水号=' + Number + '=int'
}
})
}

View File

@@ -0,0 +1,97 @@
import request from '@/utils/request'
// 查询加工工时统计表
export function searchTable() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计_综合_查询数据',
param: '工艺名称=' + arguments[0] + '&工艺名称_check=' + arguments[1] + '&工作者姓名=' + arguments[2] + '&工作者姓名_check=' + arguments[3] + '&开始加工时间_check=' + arguments[4] + '&开始加工时间结束=' + arguments[5] + '&开始加工时间开始=' + arguments[6] + '&零件图号=' + arguments[7] + '&零件图号_check=' + arguments[8] + '&完成加工时间_check=' + arguments[9] + '&完成加工时间结束=' + arguments[10] + '&完成加工时间开始=' + arguments[11],
Pagination: arguments[12] + '&' + arguments[13]
}
})
}
// 查询加工工时统计表
export function editTime() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_工时统计_修补工时_修改数据',
param: '人员编号=' + arguments[0] + '&完成过程流水号=' + arguments[1] + '&修补工时=' + arguments[2] + '&数量=' + arguments[3]
}
})
}
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
}
})
}
// 查机床
export function getMachines(gongyi) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床',
param: '项目流水号=' + gongyi + '=int'
}
})
}
// 查分组
export function getGroups(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组',
param: '机床流水号=' + stepNumber + '=int'
}
})
}
// 查零件
export function getParts(stepNumber, a, b, c, d, e, f, g) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_基础表_员工月修补工时_查询零件',
param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=0'
}
})
}
// 提交新增
export function submitAdd(num1, time, num2, person) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理_修补工时_增加数据',
param: `工序流水号=${num1}&修补工时=${time}&数量=${num2}&修补人员编号=${person}`
}
})
}
// 根据部门查人员
export function getTable8(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + code + '=int'
}
})
}

View File

@@ -62,14 +62,14 @@ export function production(num, a, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q,
})
}
// 合并投产
export function production2(num1, num, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, x, s, t, u, v, w) {
export function production2(num1, num2, num, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, x, s, t, u, v, w) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_可安排生产计划零件排序_制定组时间_同时传递_合并投产',
param: '零件图号=' + num1 + '&机床流水号=' + num + '&投产类型流水号=' + 1 + '=int&数据类型=' + b + '=int&投产批次=1=int&批次数量=' + d + '=string&计划开始时间=' + e + '=string&计划结束时间=' + f + '=string&工艺计划开始时间=' + g + '=string&工艺计划结束时间=' + h + '=string&定额计划开始时间=' + i + '=string&定额计划结束时间=' + j + '=string&计划编制计划开始时间=' + k + '=string&计划编制计划结束时间=' + l + '=string&机加工开始时间=' + m + '=string&机加工结束时间=' + n + '=string&单件外协时间=' + o + '=string&单件是否外协=' + p + '=int&单件是否外协分类=' + q + '=string&计划制定人员编号=' + x + '&材料流水号=' + s + '=int&是否临时件=' + t + '=int&是否难度件=' + u + '=string&是否着急=' + v + '=int&是否白图=' + w + '=int'
param: '零件图号=' + num1 + '&规格=' + num2 + '&机床流水号=' + num + '&投产类型流水号=' + 1 + '=int&数据类型=' + b + '=int&投产批次=1=int&批次数量=' + d + '=string&计划开始时间=' + e + '=string&计划结束时间=' + f + '=string&工艺计划开始时间=' + g + '=string&工艺计划结束时间=' + h + '=string&定额计划开始时间=' + i + '=string&定额计划结束时间=' + j + '=string&计划编制计划开始时间=' + k + '=string&计划编制计划结束时间=' + l + '=string&机加工开始时间=' + m + '=string&机加工结束时间=' + n + '=string&单件外协时间=' + o + '=string&单件是否外协=' + p + '=int&单件是否外协分类=' + q + '=string&计划制定人员编号=' + x + '&材料流水号=' + s + '=int&是否临时件=' + t + '=int&是否难度件=' + u + '=string&是否着急=' + v + '=int&是否白图=' + w + '=int'
}
})
}

View File

@@ -106,7 +106,7 @@ export function InvoiceSave() {
data: {
type: '2',
name: '发货管理_发货申请_发货单_保存',
param: '发货单流水号=' + arguments[0] + '\\&收货单位=' + arguments[1] + '\\&收货地址=' + arguments[2] + '\\&收货人员=' + arguments[3] + '\\&联系电话=' + arguments[4] + '\\&注意事项=' + arguments[5] + '\\&发货单名称=' + arguments[6]
param: '发货单流水号=' + arguments[0] + '\\&收货单位=' + arguments[1] + '\\&收货地址=' + arguments[2] + '\\&收货人员=' + arguments[3] + '\\&联系电话=' + arguments[4] + '\\&注意事项=' + arguments[5] + '\\&发货单名称=' + arguments[6] + '\\&机床流水号=' + arguments[7]
}
})
}

View File

@@ -1,14 +1,14 @@
import request from '@/utils/request'
// 初始化获取已生成的外协加工任务单
export function getTable(checked, contractNumber, checked1, manufacturers, checked2, time1, time2, num, pageCurrent, pageSize) {
export function getTable(checked, contractNumber, checked1, manufacturers, checked2, time1, time2, num, pageCurrent, pageSize, documentStatus, num3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_外协加工任务单_查询数据',
param: '外协加工任务单_check=0&外协加工任务单流水号=null&表单号_check=' + checked + '&表单号=' + contractNumber + '&外协厂家_check=' + checked1 + '&外协厂家=' + manufacturers + '&任务下达日期_时间段=' + checked2 + '&开始时间=' + time1 + '&结束时间=' + time2 + '&单据状态_check=0&单据状态=1&外协员编号_check=0&外协员编号=' + num,
param: '外协加工任务单_check=0&外协加工任务单流水号=null&表单号_check=' + checked + '&表单号=' + contractNumber + '&外协厂家_check=' + checked1 + '&外协厂家=' + manufacturers + '&任务下达日期_时间段=' + checked2 + '&开始时间=' + time1 + '&结束时间=' + time2 + '&单据状态_check=' + num3 + '&单据状态=' + documentStatus + '&外协员编号_check=0&外协员编号=' + num,
Pagination: pageCurrent + '&' + pageSize
}
})
@@ -104,7 +104,7 @@ export function editData(Number, manufacturers, freight, Explain) {
data: {
type: '2',
name: '车间生产管理_外协加工任务单_修改数据',
param: '外协加工任务单流水号=' + Number + '=int&外协厂家=' + manufacturers + '=int&运费=' + freight + '=int&单据状态=2&入库标志=1&扣款说明=' + Explain
param: '外协加工任务单流水号=' + Number + '=int&外协厂家=' + manufacturers + '=int&运费=' + freight + '=int&扣款说明=' + Explain
}
})
}

View File

@@ -318,6 +318,7 @@ export default {
}
},
handleDelete(row) {
console.log(row)
if (row.不合格原因) {
this.deleteRow(deleteReasons, row.不合格原因, function() { this.searchReasons() })
} else if (row.不合格处理) {

View File

@@ -66,10 +66,17 @@
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportExcel()">导出</el-button>
</el-row>
</el-card>
<el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
<el-table-column align="center" label="禁用情况" width="80px">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否禁用)===0||scope.row.是否禁用===''" type="success" size="small" @click="approvalPass(scope.row)">未禁用</el-tag>
<el-tag v-if="parseInt(scope.row.是否禁用)===1" type="error" size="small">已禁用</el-tag>
</template>
</el-table-column>
<el-table-column label="机床图号" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -444,7 +451,7 @@
</template>
<script>
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus, initPerson } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus, initPerson, Prohibit, selecttable22 } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { readFile } from '@/utils/request'
// import { mapGetters } from 'vuex'
export default {
@@ -534,6 +541,57 @@ export default {
}
})
},
approvalPass(row) {
this.$confirm('是否禁用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
Prohibit(row.质检流水号, row.质检类型代码).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.selecttable()
} else {
this.$message.error('操作失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
exportExcel() {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum).then(response => {
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工序名称', '质检类型', '检验数量', '不合格数量', '不合格原因', '处理结果', '质检时间', '备注']
const filterVal = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工艺名称', '质检类型', '数量', '不合格数量', '不合格原因文本', '不合格处理文本', '操作时间', '备注']
const list = response.data
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '质检情况表',
autoWidth: true,
bookType: 'xlsx'
})
})
})
},
fetchData() {
searchData(this.pageSize1, this.pageCurrent1).then(response => {
this.tableData10 = response.data.rows

View File

@@ -104,7 +104,7 @@
</el-select>
</el-form-item>
<el-form-item label="班次" prop="班次" >
<el-select v-model="form.班次" placeholder="班次" style="width:200px" size="small" clearable filterable>
<el-select v-model="form.班次代码" placeholder="班次" style="width:200px" size="small" clearable filterable>
<el-option
v-for="item in staff"
:key="item.value"
@@ -150,15 +150,13 @@ export default {
dialogFormVisible_form: false,
param: null,
form: {
设备名称: '',
设备流水号: null,
班次: '',
设备流水号: '',
班次代码: '',
操作者: '',
操作者编号: null
},
rules: {
设备名称: [{ required: true, message: '请选择设备名称', trigger: 'blur' }],
设备流水号: [{ required: true, message: '请选择设备名称', trigger: 'blur' }],
操作者: [{ required: true, message: '请选择操作者', change: 'blur' }]
},
staff: [],
@@ -212,6 +210,7 @@ export default {
handleEdit(row) {
this.No = row.设备人员关系流水号
this.editForm(row, 'form', [this.dialogFormVisible_form = true, this.title = '编辑'])
console.log(this.form, 111)
},
submitAdd() {
for (let i = 0; i < this.equipmentName.length; i++) {
@@ -220,10 +219,11 @@ export default {
break
}
}
this.addTable(addTable, [this.form.设备流水号, this.form.设备名称, this.form.班次, this.form.操作者, this.form.操作者编号], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
this.addTable(addTable, [this.form.设备流水号, this.form.班次代码, this.form.操作者, this.form.操作者编号], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
},
submitEdit() {
this.editTable(editTable, [this.form.设备名称, this.form.设备流水号, this.form.班次代码, this.form.操作者, this.form.操作者编号, this.No], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
console.log(this.form, 222)
this.editTable(editTable, [this.form.设备流水号, this.form.班次代码, this.form.操作者, this.form.操作者编号, this.No], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
},
cancel() {
this.dialogFormVisible_form = false

View File

@@ -0,0 +1,529 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<span class="demonstration">开始加工时间:</span>
<el-date-picker
v-model="startTime1"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime1"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">完成加工时间:</span>
<el-date-picker
v-model="startTime2"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime2"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
</el-row>
<el-row>
<span>操作者:</span>
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px"/>
<span>零件图号:</span>
<el-input v-model="partNumber" placeholder="零件图号" size="small" clearable style="width:200px"/>
<span>工艺名称:</span>
<el-input v-model="technologyName" placeholder="工艺名称" size="small" clearable style="width:200px"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total=0;searchTable();">查询</el-button>
<el-button type="primary" class="el-icon-plus" size="small" style="margin: 10px 0 0 10px" @click="addSupplement();">新增</el-button>
</el-row>
</el-card>
<el-card>
<el-table :data="tableData" height="650" style="width: 100%;" border>
<el-table-column label="序号" type="index" align="center" width="50"/>
<el-table-column label="零件图号" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="完成数量" align="center" min-width="80px">
<template slot-scope="scope">
{{ scope.row.完成数量 }}
</template>
</el-table-column>
<el-table-column label="工艺名称" align="center" min-width="80px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column label="操作者" align="center" min-width="80px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="实际开始时间" align="center" min-width="160px">
<template slot-scope="scope">
{{ scope.row.加工开始时间 || '—' }}
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="160px">
<template slot-scope="scope">
{{ scope.row.加工完成时间 || '—' }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center" min-width="80px">
<template slot-scope="scope">
{{ scope.row.实际加工时间段 || '—' }}
</template>
</el-table-column>
<el-table-column label="修补数量" align="center" min-width="100px">
<template slot-scope="scope">
<template v-if="scope.row.isEditing">
<el-input v-model="scope.row.数量" class="edit-input" size="mini"/>
</template>
<span v-else>{{ scope.row.数量 }}</span>
</template>
</el-table-column>
<el-table-column label="修补工时" align="center" min-width="100px">
<template slot-scope="scope">
<template v-if="scope.row.isEditing">
<el-input v-model="scope.row.修补工时" class="edit-input" size="mini"/>
</template>
<span v-else>{{ scope.row.修补工时 }}</span>
</template>
</el-table-column>
<el-table-column label="修补操作时间" align="center" min-width="160px">
<template slot-scope="scope">
{{ scope.row.修补操作时间 || '—' }}
</template>
</el-table-column>
<el-table-column label="修补人" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.修补人 || '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="240px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.isEditing" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.isEditing" class="cancel-btn" size="mini" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
<el-button
v-else
:disabled="!(scope.row.加工开始时间 || scope.row.加工完成时间)"
size="mini"
type="primary"
class="el-icon-edit"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
:disabled="!!(scope.row.加工开始时间 || scope.row.加工完成时间)"
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="650px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="80px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="项目" prop="project">
<el-select v-model="form.project" filterable size="small" @change="getMachine">
<el-option
v-for="item in projects"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="机床" prop="machine">
<el-select v-model="form.machine" filterable size="small" @change="getGroup">
<el-option
v-for="item in machines"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="分组" prop="group">
<el-select v-model="form.group" filterable size="small" @change="getParts">
<el-option
v-for="item in groups"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="零件" prop="part">
<el-select v-model="form.part" filterable size="small" @change="getTechnology">
<el-option
v-for="item in parts"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工艺" prop="technology">
<el-select v-model="form.technology" size="small">
<el-option
v-for="item in technologys"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="修补工时" prop="timeNumber">
<el-input v-model="form.timeNumber" placeholder="修补工时" clearable size="small" style="width: 200px"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="数量" prop="number">
<el-input v-model="form.number" placeholder="数量" clearable size="small" style="width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="操作工" prop="opNum">
<el-select v-model="form.opNum" size="small" filterable>
<el-option
v-for="item in opNums"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button>
<el-button type="primary" @click="submitAdd()" >确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchTable, editTime, initProject, getMachines, getGroups, getParts, submitAdd } from '@/api/ManufacturingCenter/ActualTimeSupplement'
import { mapGetters } from 'vuex'
import request from '@/utils/request'
export default {
name: 'ActualTimeSupplement',
data() {
return {
workerName: '',
partNumber: '',
technologyName: '',
startTime1: '',
endTime1: '',
startTime2: '',
endTime2: '',
pageCurrent: 1,
pageSize: 10,
total: 0,
tableData: [],
dialogFormVisible: false,
title: '',
form: {
project: '',
machine: '',
group: '',
part: '',
technology: '',
timeNumber: '',
number: '',
opNum: ''
},
rules: {
part: [{ required: true, message: '请选择零件' }],
technology: [{ required: true, message: '请选择工艺' }],
timeNumber: [{ required: true, message: '请填写修补工时' }],
number: [{ required: true, message: '请填写数量' }],
opNum: [{ required: true, message: '请选择操作工' }]
},
projects: [],
machines: [],
groups: [],
parts: [],
technologys: [],
opNums: []
}
},
computed: {
...mapGetters([
'id' // 人员编号
])
},
created() {
this.initData()
this.searchTable()
},
methods: {
// 新增修补工时
addSupplement() {
this.dialogFormVisible = true
},
// 提交新增
submitAdd() {
this.$refs['form'].validate((valid) => {
if (valid) {
submitAdd(this.form.technology, this.form.timeNumber, this.form.number, this.id).then(res => {
if (res.data[0].result === '1') {
this.dialogFormVisible = false
this.$message.success('操作成功')
this.searchTable()
} else {
this.$message.error('操作失败')
}
})
} else {
console.log('error submit!!')
return false
}
})
},
// 提交编辑
confirmEdit(row) {
editTime(this.id, row.完成过程流水号, row.修补工时, row.数量).then(response => {
if (response.data[0].result === '1') {
row.isEditing = false
this.$message.success('修改成功')
this.searchTable()
} else {
this.$message.error('修改失败')
}
})
},
// 取消编辑
cancelEdit(row) {
row.修补工时 = row.原修补工时
row.isEditing = false
this.$message('取消修改')
},
// 初始化数据
initData() {
this.projects = []
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.projects.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
this.opNums = []
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select *
from 人事档案管理_人员名单
where 考核部门编号 = 12`
}
}).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.opNums.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
// 查机床
getMachine() {
this.form.machine = ''
this.machines = []
this.form.group = ''
this.groups = []
this.form.part = ''
this.parts = []
this.form.technology = ''
this.technologys = []
if (this.form.project !== '') {
getMachines(this.form.project).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machines.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}
},
// 查分组
getGroup() {
this.form.group = ''
this.groups = []
this.form.part = ''
this.parts = []
this.form.technology = ''
this.technologys = []
getGroups(this.form.machine).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groups.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
// 查零件
getParts() {
this.form.part = ''
this.parts = []
this.form.technology = ''
this.technologys = []
let check1, check2, check3
this.form.project ? check1 = 1 : check1 = 0
this.form.machine ? check2 = 1 : check2 = 0
this.form.group ? check3 = 1 : check3 = 0
this.parts = []
getParts(check1, this.form.project, check2, this.form.machine, check3, this.form.group).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.parts.push({
label: response.data[i].零件图号,
value: response.data[i].工艺计划流水号
})
}
})
},
// 查工艺
getTechnology() {
this.form.technology = ''
this.technologys = []
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 工艺计划流水号,车间生产管理工艺_基础表_工艺名称.工艺编号,工艺名称,工序流水号
from 车间生产管理工艺_零件工序 inner join 车间生产管理工艺_基础表_工艺名称
on 车间生产管理工艺_零件工序.工艺编号 = 车间生产管理工艺_基础表_工艺名称.工艺编号
where 工艺计划流水号 = ${this.form.part}`
}
}).then(res => {
for (let i = 0; i < res.data.length; i++) {
this.technologys.push({
label: res.data[i].工艺名称,
value: res.data[i].工序流水号
})
}
})
},
// 删除
handleDelete(row) {
this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(row.修补工时流水号)
request({
url: '',
method: 'post',
data: {
type: '4',
name: `delete from 车间生产管理_修补工时
where 修补工时流水号 = ${row.修补工时流水号}`
}
}).then(res => {
if (res.data[0].result === '1') {
this.searchTable()
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消删除'
})
})
},
// 编辑
handleEdit(row) {
row.isEditing = !row.isEditing
},
// 查询加工工时统计表
searchTable() {
let check1, check2, check3, check4, check5
this.technologyName ? check1 = 1 : check1 = 0
this.workerName ? check2 = 1 : check2 = 0
this.startTime1 && this.endTime1 ? check3 = 1 : check3 = 0
this.partNumber ? check4 = 1 : check4 = 0
this.startTime2 && this.endTime2 ? check5 = 1 : check5 = 0
searchTable(this.technologyName, check1, this.workerName, check2, check3, this.endTime1, this.startTime1, this.partNumber, check4, check5, this.endTime2, this.startTime2, this.pageCurrent, this.pageSize).then(res => {
this.tableData = res.data.rows
this.total = res.data.total
this.tableData.map(v => {
this.$set(v, 'isEditing', false)
v.原修补工时 = v.修补工时
return v
})
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -112,6 +112,11 @@
{{ 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">
<template slot-scope="scope">
{{ scope.row.投产总数量 }}
@@ -835,7 +840,7 @@ export default {
} else {
this.checked_baitu = 1
}
production2(this.multipleSelection[i].零件图号, this.toolNumValue, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
production2(this.multipleSelection[i].零件图号, this.multipleSelection[i].规格, this.toolNumValue, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('投产成功')

View File

@@ -202,13 +202,15 @@
placeholder="请输入内容"/>
</div>
<div class="text item">
<span style="width:80px;display:inline-block;">发货单名</span>
<el-input
<span style="width:80px;display:inline-block;">机床名称</span>
<el-autocomplete
:disabled="disabledName"
:fetch-suggestions="querySearchMachine"
v-model="input_Name"
clearable
style="width: 200px;margin-right: 10px"
size="mini"/>
size="mini"
class="inline-input"
@select="handleSelectMachine"/>
<span style="width:80px;display:inline-block;">注意事项</span>
<el-input
:disabled="disabledRemake"
@@ -606,6 +608,10 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
machineNum: '',
machineName: '',
searchCriteria_Machine: '',
restaurants_Machine: [],
input_Record: '',
disabled: true,
disabledAdd: false, // 增加按钮启用状态
@@ -709,6 +715,40 @@ export default {
// }
},
methods: {
querySearchMachine(queryString, cb) {
this.restaurants_Machine = []
if (this.input_Name !== '' && this.input_Name !== null) {
SelectMachine(this.input_Name).then(response => {
const res = response.data
res.forEach(item => {
this.restaurants_Machine.push({
value: item.货品编号,
num: item.机床流水号
})
})
return this.restaurants_Machine
}).then(data => {
var restaurants = data
var results = queryString ? restaurants.filter(this.createFilterMachine(queryString)) : restaurants
return results
}).then(data => {
// 调用 callback 返回建议列表的数据
cb(data)
})
}
},
createFilterMachine(queryString) {
return (restaurant) => {
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1)
// !== -1为全字匹配 === 0为首字匹配
}
},
handleSelectMachine(item) {
// 在此方法中可以把下拉框选中值中的内容赋值给其他变量使用
console.log(item, 998)
this.machineNum = item.num
this.machineName = item.value
},
// function_Refresh() {
// this.$confirm('检测到有未保存的单据', {
// confirmButtonText: '确定',
@@ -888,7 +928,7 @@ export default {
this.typeE = []
this.typeF = []
this.typeG = []
InvoiceSave(this.invoiceNum, this.input_Company, this.input_Adress, this.input_People, this.input_Mobile, this.input_Remake, this.input_Name).then(response => {
InvoiceSave(this.invoiceNum, this.input_Company, this.input_Adress, this.input_People, this.input_Mobile, this.input_Remake, this.machineName, this.machineNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功!')
this.function_InvoiceFeach()

View File

@@ -11,6 +11,17 @@
type="date"
size="small"
placeholder="选择日期"/>
<span>单据状态:</span>
<el-select v-model="documentStatus" filterable placeholder="请选择" size="small" clearable>
<el-option
v-for="item in options"
: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.name }}</div>
</el-option>
</el-select>
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="pageSize=10;pageList=1;fetchData()">查询</el-button>
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">增加</el-button>
</el-card>
@@ -50,7 +61,7 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<template slot-scope="scope">
<el-button :disabled="scope.row.单据状态==='成交'" type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button :disabled="scope.row.单据状态==='成交'" type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@@ -489,6 +500,7 @@ export default {
num: null,
num1: null,
num2: null,
num3: null,
name1: '',
time: '',
time1: '',
@@ -558,7 +570,14 @@ export default {
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageList: 1, // 后台获取页
currentPage: 1 // 显示当前页
currentPage: 1, // 显示当前页
options: [{
value: '1',
label: '未成交'
}, {
value: '2',
label: '成交'
}]
}
},
computed: {
@@ -628,6 +647,11 @@ export default {
} else {
this.num2 = 1
}
if (this.documentStatus === '' || this.documentStatus === null) {
this.num3 = 0
} else {
this.num3 = 1
}
if (this.time1 === 'NaN/NaN/NaN') {
this.time1 = ''
}
@@ -636,7 +660,7 @@ export default {
}
this.List = []
this.List3 = []
getTable(this.num, this.formNumber, this.num1, this.manufacturers, this.num2, this.time1, this.time2, this.id, this.pageList, this.pageSize).then(response => {
getTable(this.num, this.formNumber, this.num1, this.manufacturers, this.num2, this.time1, this.time2, this.id, this.pageList, this.pageSize, this.documentStatus, this.num3).then(response => {
this.total = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].任务下达日期 !== null) {

View File

@@ -114,6 +114,11 @@
<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }}
@@ -202,11 +207,6 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="100">
<template slot-scope="scope">
<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b>
@@ -307,6 +307,11 @@
<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }}
@@ -362,11 +367,6 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="100">
<template slot-scope="scope">
<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b>

View File

@@ -48,7 +48,12 @@
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small" @click="unbindPart(scope.row)">已采购</el-tag>
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100">
@@ -111,11 +116,6 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商筛选">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
@@ -691,6 +691,7 @@ import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, sear
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
import request from '@/utils/request'
export default {
name: '', // 离线合同
@@ -865,6 +866,34 @@ export default {
this.initDirection()
},
methods: {
unbindPart(row) {
this.$confirm('确定还原状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
request({
url: '',
method: 'post',
data: {
type: '4',
name: `update MRP_计划订单_组件零件清单 set 询价状态编号 = 1 , 采购状态编号 = 1 where 标准件和外购件流水号 =${row.标准件和外购件流水号}`
}
}).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable00()
} else {
this.$message.error('操作失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
initDirection() {
const direction = this.$getDirection()
direction.on('keyup', function(e, val) {
@@ -884,10 +913,10 @@ export default {
})
},
filterHandler0(value, row) { // 筛选备注
return row['备注'] === value
return row['备注'].trim() === value
},
filterHandler(value, row) { // 筛选供货商
return row['供货商'] === value
return row['供货商'].trim() === value
},
filterSource(value, row) {
return Number(row['零件类型']) === Number(value)