This commit is contained in:
lixin
2018-12-29 19:30:20 +08:00
24 changed files with 352 additions and 118 deletions

View File

@@ -59,6 +59,7 @@ import { searchtable, searchtable2, edit, handlechange } from '@/api/Manufacturi
export default {
data() {
return {
num: 0,
arrest: [],
all: false,
partName: '',
@@ -114,9 +115,12 @@ export default {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest.length; i++) {
edit(this.arrest[i].工艺计划流水号)
handlechange(this.arrest[i].工序流水号, '0000')
if (i === this.arrest.length - 1) {
edit(this.arrest[i].工艺计划流水号).then(() => {
handlechange(this.arrest[i].工序流水号, '0000').then(response => {
this.num = this.num + response.data[0].result
})
})
if (this.num === this.arrest.length) {
this.searchTable()
}
}

View File

@@ -19,9 +19,9 @@
type="index"
align="center"
width="50"/>
<el-table-column label="工艺名称" align="center" width="280px">
<el-table-column label="零件图号" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
{{ scope.row.零件图号_零件工艺计划 }}
</template>
</el-table-column>
<el-table-column label="修补工时" align="center" width="110px">
@@ -44,18 +44,23 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作时间" align="center">
<el-table-column label="修补工艺" align="center">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
{{ scope.row.修补工艺 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150px" fixed="right">
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
<el-button
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -72,51 +77,97 @@
</div>
</el-card>
<el-dialog :title="title1" :visible.sync="dialogFormVisible" center>
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm" style="width: 48%;margin: auto">
<el-form-item label="工艺" prop="TechnologyValue">
<el-select v-model="form.TechnologyValue" filterable size="small">
<el-option
v-for="item in Technology"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="年" prop="yearNumberValue">
<el-select v-model="form.yearNumberValue" size="small">
<el-option
v-for="item in yearNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="月" prop="monthNumberValue">
<el-select v-model="form.monthNumberValue" size="small">
<el-option
v-for="item in monthNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="修补工时" prop="timeNumber">
<el-input v-model="form.timeNumber" placeholder="修补工时" clearable size="small" style="width: 200px"/>
</el-form-item>
<el-dialog :title="title1" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="700px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
<el-row>
<el-col :span="14"/>
<el-form-item >
<el-button size="small" @click="callOff('form')">取消</el-button>
<el-button size="small" type="primary" @click="submit('form')"> </el-button>
</el-form-item>
<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="零件">
<el-select v-model="form.零件" filterable size="small">
<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="yearNumberValue">
<el-select v-model="form.yearNumberValue" size="small">
<el-option
v-for="item in yearNumber"
: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="monthNumberValue">
<el-select v-model="form.monthNumberValue" size="small">
<el-option
v-for="item in monthNumber"
: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="timeNumber">
<el-input v-model="form.timeNumber" placeholder="修补工时" clearable size="small" style="width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="修补工艺" prop="修补工艺">
<el-input v-model="form.修补工艺" placeholder="修补工艺" clearable size="small" style="width: 200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit('form')" >确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible1" title="人员信息" center width="750px">
@@ -162,8 +213,12 @@
</template>
<script>
import { getTable8, getTree, fn, dialogtablevisible, searchTechnology, searchperson, searchtable, edittype, handlechange } from '@/api/ManufacturingCenter/RepairTimeEntry'
import { delList, getTable8, getNames, getMachines, getGroups, getParts, getTree, fn, dialogtablevisible, searchTechnology, searchperson, searchtable, edittype, handlechange } from '@/api/ManufacturingCenter/RepairTimeEntry'
import elInput from 'element-ui/packages/input'
export default {
components: {
elInput
},
data() {
return {
codes2: '',
@@ -179,11 +234,20 @@ export default {
liushuihao: '', // 编辑流水号
renyuanbianhao: '', // 编辑人员编号
personnelNumber: '', // 人员编号
projects: [],
Machines: [],
Groups: [],
Parts: [],
form: {
零件: '',
project: '',
Machine: '',
Group: '',
TechnologyValue: '',
yearNumberValue: '',
monthNumberValue: '',
timeNumber: ''
timeNumber: '',
修补工艺: ''
},
Technology: [], // 工艺
yearNumber: [], // 年
@@ -198,8 +262,11 @@ export default {
dialogFormVisible: false,
title1: '',
rules: {
TechnologyValue: [{ required: true, message: '请选择工艺', trigger: 'change' }],
timeNumber: [{ required: true, message: '请输入修补工时', trigger: 'blur' }]
零件: [{ required: true, message: '请选择零件', trigger: 'change' }],
timeNumber: [{ required: true, message: '请输入修补工时', trigger: 'blur' }],
yearNumberValue: [{ required: true, message: '请选择年份', trigger: 'blur' }],
monthNumberValue: [{ required: true, message: '请选择月份', trigger: 'blur' }],
修补工艺: [{ required: true, message: '请输入修补工艺', trigger: 'blur' }]
}
}
},
@@ -207,8 +274,81 @@ export default {
this.fetchData()
this.fetchData3()
this.searchTable()
this.fetchData2()
this.getParts()
},
methods: {
fetchData2() {
this.projects = []
getNames().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.projects.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
getMachine() {
this.form.Machine = ''
this.Machines = []
this.form.Group = ''
this.Groups = []
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 = []
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() {
if (this.project === '') {
this.checkbox_project = false
} else {
this.checkbox_project = true
}
if (this.Machine === '') {
this.checkbox_Machine = false
} else {
this.checkbox_Machine = true
}
if (this.Group === '') {
this.checkbox_Group = false
} else {
this.checkbox_Group = true
}
if (this.number === '') {
this.checkbox_number = false
} else {
this.checkbox_number = true
}
this.form.零件 = ''
this.Parts = []
getParts(this.checkbox_project, this.form.project, this.checkbox_Machine, this.form.Machine, this.checkbox_Group, 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].工艺计划流水号
})
}
})
},
handleCurrentChange2(row) { // 获取当前行人员信息
this.ssks = row.节点名称
this.Number1 = row.人员编号
@@ -286,18 +426,43 @@ export default {
})
}
},
// 删除
handleDelete(index, row) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delList(row.员工月修补工时流水号).then(response => {
if (response.data[0].result === '1') {
this.searchTable()
this.$message({
message: '已被成功删除',
type: 'success'
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 增加打开
editType1(formName) {
if (this.personnelNumber === '' || this.personnelNumber === null) {
this.$message.error('请输入人员编号')
} else {
this.form.TechnologyValue = ''
this.form.timeNumber = ''
this.form.零件 = ''
this.form.修补工艺 = ''
this.count1 = this.count1 + 1
if (this.count1 !== 1) {
this.$refs[formName].resetFields()
}
this.title1 = '增加'
this.form.TechnologyValue = ''
this.form.timeNumber = ''
this.dialogFormVisible = true
}
},
@@ -305,7 +470,7 @@ export default {
editType() {
searchperson(this.codes2).then(response => {
if (response.data.length !== 0) {
edittype(response.data[0].人员编号, this.form.TechnologyValue, this.form.yearNumberValue, this.form.monthNumberValue, this.form.timeNumber).then(response => {
edittype(this.form.零件, response.data[0].人员编号, this.form.yearNumberValue, this.form.monthNumberValue, this.form.timeNumber, this.form.修补工艺).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.pageCurrent = 1
@@ -331,16 +496,17 @@ export default {
}
this.renyuanbianhao = row.人员编号
this.liushuihao = row.员工月修补工时流水号
this.form.TechnologyValue = parseInt(row.工艺)
this.form.零件 = parseInt(row.工艺计划流水)
this.form.yearNumberValue = row.
this.form.monthNumberValue = row.
this.form.timeNumber = row.修补工时
this.form.修补工艺 = row.修补工艺
this.dialogFormVisible = true
this.title1 = '编辑'
},
// 编辑确定
handleChange() {
handlechange(this.liushuihao, this.renyuanbianhao, this.form.TechnologyValue, this.form.yearNumberValue, this.form.monthNumberValue, this.form.timeNumber).then(response => {
handlechange(this.liushuihao, this.form.零件, this.renyuanbianhao, this.form.yearNumberValue, this.form.monthNumberValue, this.form.timeNumber, this.form.修补工艺).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.searchTable()

View File

@@ -264,8 +264,8 @@ export default {
this.form.设备加工能力 = 1
this.form.班次类型 = 1
this.form.设备工时系数 = 1
this.form.整改工时系数 = 1
this.form.预留工时系数 = 1
this.form.整改工时系数 = 0
this.form.预留工时系数 = 0
this.dialogFormVisible = true
},
handleEdit(row) {

View File

@@ -255,7 +255,7 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="随技术文件" name="third">
<el-tab-pane label="随技术文件" name="third">
<el-table
v-loading="tableData3Loading"
:data="tableData3"
@@ -1279,6 +1279,7 @@ export default {
this.invoiceNum = row.发货单编号
this.DeliveryVisiable = true
selectDelivery(this.invoiceNum).then(response => {
console.log(response)
this.table = response.data
this.装箱单名称 = response.data[0].装箱单名称
this.发货单号 = response.data[0].发货单号
@@ -1318,7 +1319,7 @@ export default {
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
body.children().not('script').show()
printNode.remove()
},
callOffDownLoadDelivery() {

View File

@@ -143,7 +143,7 @@
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="Number(scope.row.离线合同状态)===2&&Number(scope.row.总采购数量)!==Number(scope.row.总到货数量)" type="primary" size="small">已采购</el-tag>
<el-tag v-if="Number(scope.row.总采购数量)===Number(scope.row.总到货数量)" type="success" size="small">全部到货</el-tag>
<el-tag v-if="Number(scope.row.总采购数量)===Number(scope.row.总到货数量)&&Number(scope.row.总采购数量)!==0" type="success" size="small">全部到货</el-tag>
</template>
</el-table-column>
<el-table-column label="离线合同编号" align="center" min-width="170">
@@ -755,6 +755,7 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable2()
this.disable = true
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
@@ -973,7 +974,8 @@ export default {
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
body.children().not('script').show()
body.children().not('#app').hide()
printNode.remove()
}).catch(res => {
console.log(res)

View File

@@ -254,7 +254,8 @@ export default {
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
body.children().not('script').show()
body.children().not('#app').hide()
printNode.remove()
} else {
this.$message.error('请选择合同')

View File

@@ -606,7 +606,6 @@ export default {
console.log(resp)
const groupData = resp.data.map(item => {
item.类别 = '机床所属部件'
item.代号 = data[i].代号 + '-' + item.代号 + '组'
return item
})
console.log(groupData)

View File

@@ -168,6 +168,7 @@ export default {
this.disabled = false
return
} else {
console.log(this.worksheet[j], 111111111)
if (this.worksheet[j].M2.v.substring(0, 1) !== '9') {
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''

View File

@@ -160,6 +160,7 @@
size="mini"
type="danger"
icon="el-icon-delete"
disabled
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>

View File

@@ -543,6 +543,11 @@ export default {
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].创立日期 !== '' && response.data[i].创立日期 !== null) {
response.data[i].创立日期 = response.data[i].创立日期.split(' ')[0]
}
}
this.tableData01 = response.data
})
},

View File

@@ -431,7 +431,7 @@ export default {
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
body.children().not('script').show()
printNode.remove()
},
handleSizeChange1(val) {

View File

@@ -76,7 +76,7 @@
</div>
</el-card>
<el-card>
<div style="width:750px">
<div style="width:715px">
<el-card>
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
@@ -289,7 +289,7 @@
</div>
</el-card>
<el-card>
<div style="width:750px">
<div style="width:715px">
<el-card>
<table id="3" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">

View File

@@ -15,14 +15,6 @@
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width: 200px"/>
<span>零件名称:</span>
<el-select v-model="PartNumberValue" placeholder="零件名称" size="small" filterable clearable>
<el-option
v-for="item in PartNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
</el-row>
</el-card>
@@ -102,7 +94,7 @@
</template>
<script>
import { initPayState, initParts, searchParts } from '@/api/WorkshopProcurement/QualityInspectionQuery'
import { initPayState, searchParts } from '@/api/WorkshopProcurement/QualityInspectionQuery'
import { mapGetters } from 'vuex'
export default {
@@ -115,8 +107,6 @@ export default {
contractNumValue: '',
contractNum: [],
supplierName: '',
PartNumberValue: '',
PartNumber: [],
tableData: [],
pageSize: 10,
pageCurrent: 1,
@@ -145,21 +135,12 @@ export default {
})
}
})
initParts().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.PartNumber.push({
label: response.data[i].物料名称,
value: response.data[i].物料流水号
})
}
})
},
searchTable() {
this.loading = true
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
this.PartNumberValue ? this.check3 = 1 : this.check3 = 0
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName, this.check3, this.PartNumberValue).then(response => {
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
this.loading = false
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].交检日期 !== '') {