This commit is contained in:
liushuai
2020-03-11 18:09:43 +08:00
15 changed files with 973 additions and 187 deletions

View File

@@ -42,6 +42,19 @@ export function searchTable1(machineNumberValue, check2) {
}
})
}
export function editData(machineNumberValue, num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: 'PDM_机床名称_机床状态_修改数据_编辑',
param: '机床流水号=' + machineNumberValue + '&机床装配开始时间=' + num1 + '=datetime' + '&机床装配实际完成时间=' + num2 + '=datetime' + '&调试开始时间=' + num3 + '=datetime' + '&调试结束时间=' + num4 + '=datetime'
}
})
}
// // 组件查询
// export function searchTable2(machineNumberValue, check2, groupNumberValue, check3) {
// return request({

View File

@@ -0,0 +1,46 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 初始化采购员
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '人事档案管理_人员与角色_查询数据_采购员'
}
})
}
// 采购合同查询
export function searchTable1(radio, check1, supplier, check2, start, end, check3, name, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_合同审核查询_查询数据',
param: '查询全部=' + radio + '&供应商名称_check=' + check1 + '&供应商名称=' + supplier + '&时间段_check=' + check2 + '&开始时间=' + start + '&结束时间=' + end + '&人员编号_check=' + check3 + '&人员编号=' + name,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 采购合同明细查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})
}

View File

@@ -0,0 +1,46 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 初始化采购员
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '人事档案管理_人员与角色_查询数据_采购员'
}
})
}
// 采购合同查询
export function searchTable1(radio, check1, supplier, check2, start, end, check3, name, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_情况审核查询_查询数据',
param: '查询全部=' + radio + '&供应商名称_check=' + check1 + '&供应商名称=' + supplier + '&时间段_check=' + check2 + '&开始时间=' + start + '&结束时间=' + end + '&人员编号_check=' + check3 + '&人员编号=' + name,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 采购合同明细查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})
}

View File

@@ -27,17 +27,17 @@
<el-card>
<h3 style="text-align: center">总装调试</h3>
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
<el-table-column label="项目名称" align="center">
<el-table-column label="项目名称" align="center" width="90px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<el-table-column label="机床编号" align="center" width="90PX" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" width="120px">
<el-table-column label="机床名称" align="center" width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
@@ -47,27 +47,71 @@
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="装配开始时间" align="center">
<el-table-column label="装配开始时间" align="center" width="170px">
<template slot-scope="scope">
{{ scope.row.机床装配实际开始时间 }}
<template v-if="scope.row.edit&&!(scope.row.装配状态===null || scope.row.装配状态===0)">
<el-date-picker
v-model="scope.row.机床装配开始时间"
type="datetime"
size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 165px"
placeholder="选择日期时间"/>
</template>
<template v-else >
{{ scope.row.机床装配开始时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="装配结束时间" align="center">
<el-table-column label="装配结束时间" align="center" width="170px">
<template slot-scope="scope">
<template v-if="scope.row.edit && scope.row.装配状态===2">
<el-date-picker
v-model="scope.row.机床装配实际完成时间"
type="datetime"
size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 165px"
placeholder="选择日期时间"/>
</template>
<template v-else >
{{ scope.row.机床装配实际完成时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="调试开始时间" align="center">
<el-table-column label="调试开始时间" align="center" width="170px">
<template slot-scope="scope">
<template v-if="scope.row.edit && !(scope.row.调试状态===null || scope.row.调试状态===0)">
<el-date-picker
v-model="scope.row.调试开始时间"
type="datetime"
size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 165px"
placeholder="选择日期时间"/>
</template>
<template v-else >
{{ 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" width="430px" fixed="right">
<el-table-column label="调试结束时间" align="center" width="170px">
<template slot-scope="scope">
<template v-if="scope.row.edit && scope.row.调试状态===2">
<el-date-picker
v-model="scope.row.调试结束时间"
type="datetime"
size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 165px"
placeholder="选择日期时间"/>
</template>
<template v-else >
{{ scope.row.调试结束时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="340px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="text" size="small" @click="handlestart_1(scope.row)">开始装配</el-button>
<el-button v-if="scope.row.装配状态===1" type="text" size="small" @click="handleend_1(scope.row)">结束装配</el-button>
@@ -79,6 +123,13 @@
<el-button v-if="scope.row.调试状态===2" type="text" size="small" >调试完成</el-button>
<el-button v-if="scope.row.调试状态===1" size="small" type="text" @click="handleCancelStart_2(scope.row)">取消开始调试</el-button>
<el-button v-if="scope.row.调试状态===2" size="small" type="text" @click="handleCancelEnd_2(scope.row)">取消结束调试</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top" style="margin-left: 10px">
<div style="display: inline-block">
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit"/>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="cancel(scope.row)">取消</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
@@ -86,50 +137,50 @@
<el-card>
<h3 style="text-align: center">部装</h3>
<el-table :data="tableData2" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
<el-table-column label="组号" align="center">
<el-table-column label="组号" align="center" width="60px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="任务名称" align="center">
<el-table-column label="任务名称" align="center" width="130px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column label="计划工时" align="center">
<el-table-column label="计划工时" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center">
<el-table-column label="实际工时" align="center" width="140px">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
<el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini" @input="filterNuber(scope.row.实际工时, scope.$index, '实际工时')"/>
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
</template>
</el-table-column>
<el-table-column label="修补工时" align="center">
<el-table-column label="修补工时" align="center" width="140px">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
<el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini" @input="filterNuber(scope.row.修补工时, scope.$index, '修补工时')"/>
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center">
<el-table-column label="开始时间" align="center" width="160px">
<template slot-scope="scope">
{{ scope.row.开始时间 }}
</template>
</el-table-column>
<el-table-column label="结束时间" align="center">
<el-table-column label="结束时间" align="center" width="160px">
<template slot-scope="scope">
{{ scope.row.结束时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<el-table-column label="备注" align="center" width="200px">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300px" fixed="right">
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="编辑部装工时" placement="top">
<el-button v-if="!scope.row.isEditing" type="text" icon="el-icon-edit-outline" size="small" @click="editTable2(scope.row)"/>
@@ -149,7 +200,7 @@
</template>
<script>
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/AssemblyExecution'
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2, editData } from '@/api/Assembly/AssemblyExecution'
// import { mapGetters } from 'vuex'
export default {
data() {
@@ -169,15 +220,51 @@ export default {
this.initProject()
},
methods: {
// 保留两位小数的正实数
filterNuber(val, index, date) {
console.log(index, 6666)
let value = '' + val
value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
if (value.indexOf('.') < 0 && value !== '') {
value = parseFloat(value)
}
console.log(value)
this.tableData2[index][date] = value
},
confirmEdit(row) {
console.log(row)
editData(row.机床流水号, row.机床装配开始时间, row.机床装配实际完成时间, row.调试开始时间, row.调试结束时间).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.$message.success('编辑成功')
this.searchTable1()
} else {
this.$message.error('编辑失败')
this.searchTable1()
}
})
},
cancel(row) {
console.log(row)
row.edit = !row.edit
this.searchTable1()
},
submitTable2(row) {
row.备注 ? row.备注 : ''
row.实际工时 ? row.实际工时 : ''
row.修补工时 ? row.修补工时 : ''
console.log(row.备注, row.计划流水号, row.实际工时, row.修补工时)
row.实际工时 ? Number(row.实际工时).toFixed(2) : ''
row.修补工时 ? Number(row.修补工时).toFixed(2) : ''
console.log(row)
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
if (res.data[0].result === '1') {
this.$message.success('编辑成功')
row.isEditing = !row.isEditing
this.searchTable2()
} else {
this.$message.error('编辑失败')
}
@@ -265,17 +352,50 @@ export default {
}
})
},
searchTable1() {
searchTable1: function() {
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1
} else {
this.check2 = 0
}
if (this.check2 === 0) {
this.tableData1 = []
this.tableData2 = []
} else {
searchTable1(this.machineNumberValue, this.check2).then(response => {
this.tableData1 = response.data
}).then(() => {
this.searchTable2()
// this.tableData1 = response.data
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
项目流水号: response.data[i].项目流水号,
机床流水号: response.data[i].机床流水号,
机床图号: response.data[i].机床图号,
机床名称: response.data[i].机床名称,
项目名称: response.data[i].项目名称,
项目计划完成时间: response.data[i].项目计划完成时间,
是否启用: response.data[i].是否启用,
客户流水号: response.data[i].客户流水号,
操作日期: response.data[i].操作日期,
是否下发装配计划: response.data[i].是否下发装配计划,
是否定额: response.data[i].是否定额,
调试状态: response.data[i].调试状态,
装配状态: response.data[i].装配状态,
机床数量: response.data[i].机床数量,
机床装配开始时间: response.data[i].机床装配开始时间,
机床装配实际完成时间: response.data[i].机床装配实际完成时间,
调试开始时间: response.data[i].调试开始时间,
调试结束时间: response.data[i].调试结束时间,
电气开始装配时间: response.data[i].电气开始装配时间,
电气结束装配时间: response.data[i].电气结束装配时间,
电气开始调试时间: response.data[i].电气开始调试时间,
电气结束调试时间: response.data[i].电气结束调试时间,
电气装配状态: response.data[i].电气装配状态,
电气调试状态: response.data[i].电气调试状态,
edit: false
})
}
})
}
},
@@ -287,6 +407,9 @@ export default {
console.log(response.data, 111)
this.tableData2 = response.data
this.tableData2.map(v => {
v.计划工时 = Number(v.计划工时).toFixed(2)
v.实际工时 = Number(v.实际工时).toFixed(2)
v.修补工时 = Number(v.修补工时).toFixed(2)
this.$set(v, 'isEditing', false)
this.$set(v, '原实际工时', '')
this.$set(v, '原修补工时', '')
@@ -336,7 +459,7 @@ export default {
ComponentStateUpdate(row.计划流水号, 1).then(response => {
this.searchTable1()
row.buttonStatus = 2
// this.searchTable2()
this.searchTable2()
})
},
// 部装结束装配
@@ -344,7 +467,7 @@ export default {
ComponentStateUpdate(row.计划流水号, 2).then(response => {
this.searchTable1()
row.buttonStatus = 3
// this.searchTable2()
this.searchTable2()
})
}
}

View File

@@ -13,7 +13,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 25%" @click="addTable()">增加装配计划</el-button>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTable()">增加装配计划</el-button>
<el-button type="danger" plain size="small" icon="el-icon-delete" style="float: right;margin-right: 20px" @click="deleteData()">删除</el-button>
</el-row>
</el-card>
@@ -33,33 +33,33 @@
</div>
</div>
</el-card>
<el-card style="width: 40%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center">
<el-card style="width: 39%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 515px;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<el-table-column label="机床编号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" show-overflow-tooltip>
<el-table-column label="机床名称" align="center" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<el-table-column label="机床数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 59.5%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center">
<el-card style="width: 61%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 525px;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center" width="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
@@ -75,7 +75,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="任务名称" align="center">
<el-table-column label="任务名称" align="center" width="160px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
@@ -85,23 +85,30 @@
</template>
</template>
</el-table-column>
<el-table-column label="计划工时" align="center">
<el-table-column label="计划工时" align="center" width="100px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
</template>
<template v-else>
{{ scope.row.计划工时 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<el-table-column label="操作" align="center" width="120px">
<template slot-scope="scope">
<!--<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">-->
<!--<div style="display: inline-block">-->
<!--<el-button v-if="scope.row.edit" type="success" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>-->
<!--<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit"/>-->
<!--<el-button v-if="scope.row.edit" type="warning" plain size="small" @click="cancel(scope.row)">取消</el-button>-->
<!--</div>-->
<!--</el-tooltip>-->
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button v-if="scope.row.edit" type="success" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit"/>
<el-button v-if="scope.row.edit" type="warning" plain size="small" @click="cancel(scope.row)">取消</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="cancel(scope.row)">取消</el-button>
</div>
</el-tooltip>
</template>
@@ -134,6 +141,23 @@ export default {
this.initProject()
},
methods: {
// 保留两位小数的正实数
filterNuber(val, index, date) {
console.log(index, 6666)
let value = '' + val
value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
if (value.indexOf('.') < 0 && value !== '') {
value = parseFloat(value)
}
console.log(value)
this.tableData2[index][date] = value
},
getFileData(machineValue) {
this.hadFile = []
getFileData(machineValue).then(res => {
@@ -185,7 +209,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -212,7 +236,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -232,7 +256,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -264,7 +288,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}

View File

@@ -13,7 +13,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 25%" @click="addTable()">增加装配计划</el-button>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTable()">增加装配计划</el-button>
<el-button type="danger" plain size="small" icon="el-icon-delete" style="float: right;margin-right: 20px" @click="deleteData()">删除</el-button>
</el-row>
</el-card>
@@ -33,33 +33,33 @@
</div>
</div>
</el-card>
<el-card style="width: 40%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center">
<el-card style="width: 39%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 515px;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<el-table-column label="机床编号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center">
<el-table-column label="机床名称" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<el-table-column label="机床数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 59.5%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center">
<el-card style="width: 61%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 525px;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center" width="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
@@ -75,7 +75,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="任务名称" align="center">
<el-table-column label="任务名称" align="center" width="160px" show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
@@ -85,23 +85,23 @@
</template>
</template>
</el-table-column>
<el-table-column label="计划工时" align="center">
<el-table-column label="计划工时" align="center" width="100px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
</template>
<template v-else>
{{ scope.row.计划工时 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<el-table-column label="操作" align="center" width="120px">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button v-if="scope.row.edit" type="success" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit"/>
<el-button v-if="scope.row.edit" type="warning" plain size="small" @click="cancel(scope.row)">取消</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="cancel(scope.row)">取消</el-button>
</div>
</el-tooltip>
</template>
@@ -134,6 +134,33 @@ export default {
this.initProject()
},
methods: {
// 保留两位小数的正实数
filterNuber(val, index, date) {
console.log(index, 6666)
let value = '' + val
value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
if (value.indexOf('.') < 0 && value !== '') {
value = parseFloat(value)
}
console.log(value)
this.tableData2[index][date] = value
},
changenum(e, index, row) {
var val = e.target.value
if (val >= 0) {
console.log(this.tableData1[index]['计划工时'], 9090)
this.tableData1[index]['计划工时'] = val.toFixed(2)
console.log(val.toFixed(2), index, row)
} else {
this.tableData1[index].计划工时 = 0.00
}
},
getFileData(machineValue) {
this.hadFile = []
getFileData(machineValue).then(res => {
@@ -175,18 +202,20 @@ export default {
})
},
confirmEdit(row) {
console.log(row.计划流水号, row, this.groupNumberValue, row.任务名称, row.计划工时)
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.tableData2 = []
searchTable2(this.machineNumberValue, 3).then(response => {
console.log(response)
for (let i = 0; i < response.data.length; i++) {
this.tableData2.push({
计划流水号: response.data[i].计划流水号,
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -213,7 +242,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -233,7 +262,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -265,7 +294,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}

View File

@@ -13,7 +13,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 25%" @click="addTable()">增加装配计划</el-button>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTable()">增加装配计划</el-button>
<el-button type="danger" plain size="small" icon="el-icon-delete" style="float: right;margin-right: 20px" @click="deleteData()">删除</el-button>
</el-row>
</el-card>
@@ -33,33 +33,33 @@
</div>
</div>
</el-card>
<el-card style="width: 40%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center">
<el-card style="width: 39%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 515px;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<el-table-column label="机床编号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center">
<el-table-column label="机床名称" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<el-table-column label="机床数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 59.5%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center">
<el-card style="width: 61%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 525px;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center" width="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
@@ -75,17 +75,17 @@
</template>
</template>
</el-table-column>
<el-table-column label="任务名称" align="center">
<el-table-column label="任务名称" align="center" width="160px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
</template>
<template v-else>
{{ scope.row.任务名称 }}
</template>
</template>
</el-table-column>
<el-table-column label="计划工时" align="center">
<el-table-column label="计划工时" align="center" width="100px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
@@ -95,13 +95,13 @@
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<el-table-column label="操作" align="center" width="120px">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button v-if="scope.row.edit" type="success" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit"/>
<el-button v-if="scope.row.edit" type="warning" plain size="small" @click="cancel(scope.row)">取消</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="cancel(scope.row)">取消</el-button>
</div>
</el-tooltip>
</template>
@@ -134,6 +134,23 @@ export default {
this.initProject()
},
methods: {
// 保留两位小数的正实数
filterNuber(val, index, date) {
console.log(index, 6666)
let value = '' + val
value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
if (value.indexOf('.') < 0 && value !== '') {
value = parseFloat(value)
}
console.log(value)
this.tableData2[index][date] = value
},
getFileData(machineValue) {
this.hadFile = []
getFileData(machineValue).then(res => {
@@ -186,7 +203,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -213,7 +230,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -233,7 +250,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -265,7 +282,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}

View File

@@ -13,7 +13,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 25%" @click="addTable()">增加装配计划</el-button>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTable()">增加装配计划</el-button>
<el-button type="danger" plain size="small" icon="el-icon-delete" style="float: right;margin-right: 20px" @click="deleteData()">删除</el-button>
</el-row>
</el-card>
@@ -33,33 +33,33 @@
</div>
</div>
</el-card>
<el-card style="width: 40%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center">
<el-card style="width: 39%; float: left">
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 515px;margin-top: 15px" height="720px" @row-click="searchTable2">
<el-table-column label="项目名称" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<el-table-column label="机床编号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" show-overflow-tooltip>
<el-table-column label="机床名称" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<el-table-column label="机床数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 59.5%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center">
<el-card style="width: 61%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 525px;margin-top: 15px" height="720px" @row-dblclick="changeState" @row-click="deleteData1">
<el-table-column label="组号" align="center" width="120">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
@@ -75,7 +75,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="任务名称" align="center">
<el-table-column label="任务名称" align="center" width="160">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
@@ -85,23 +85,23 @@
</template>
</template>
</el-table-column>
<el-table-column label="计划工时" align="center">
<el-table-column label="计划工时" align="center" width="100">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
</template>
<template v-else>
{{ scope.row.计划工时 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<el-table-column label="操作" align="center" width="120px">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button v-if="scope.row.edit" type="success" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit"/>
<el-button v-if="scope.row.edit" type="warning" plain size="small" @click="cancel(scope.row)">取消</el-button>
<el-button v-if="scope.row.edit" type="text" plain size="small" @click="cancel(scope.row)">取消</el-button>
</div>
</el-tooltip>
</template>
@@ -134,6 +134,23 @@ export default {
this.initProject()
},
methods: {
// 保留两位小数的正实数
filterNuber(val, index, date) {
console.log(index, 6666)
let value = '' + val
value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
if (value.indexOf('.') < 0 && value !== '') {
value = parseFloat(value)
}
console.log(value)
this.tableData2[index][date] = value
},
getFileData(machineValue) {
this.hadFile = []
getFileData(machineValue).then(res => {
@@ -186,7 +203,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -213,7 +230,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -233,7 +250,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}
@@ -265,7 +282,7 @@ export default {
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
计划工时: response.data[i].计划工时,
计划工时: Number(response.data[i].计划工时).toFixed(2),
edit: false
})
}

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card style="width: 72%">
<el-card style="width: 100%">
<div slot="header">
<el-row>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px" @change="machineChange">
@@ -32,7 +32,7 @@
</div>
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件">
<el-table ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px;width: 865px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table v-loading="loading0" ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px;width: 867px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="43"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120" show-overflow-tooltip>
<template slot-scope="scope">
@@ -88,39 +88,39 @@
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-table ref="multipleTable" :data="tableData1" size="mini" style="max-height: 500px;width: 890px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="130px" show-overflow-tooltip>
<el-table v-loading="loading1" ref="multipleTable" :data="tableData1" size="mini" style="max-height: 600px;width: 867px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="43"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="组号" label="组号" width="80px">
<el-table-column align="center" prop="组号" label="组号" width="70px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料名称" label="名称" width="100px" show-overflow-tooltip>
<el-table-column align="center" prop="物料名称" label="名称" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="型号" label="型号" min-width="130px" show-overflow-tooltip>
<el-table-column align="center" prop="型号" label="型号" width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料规格" label="规格" min-width="200px" show-overflow-tooltip>
<el-table-column align="center" prop="物料规格" label="规格" width="150px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="总数量" width="60px">
<el-table-column align="center" label="总数量" width="70px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="备件数" width="60px">
<el-table-column align="center" label="备件数" width="70px">
<template slot-scope="scope">
{{ scope.row.备件总数量 }}
</template>
@@ -144,44 +144,44 @@
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-table ref="multipleTable" :data="tableData2" size="mini" style="max-height: 500px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="130px" show-overflow-tooltip>
<el-table v-loading="loading2" ref="multipleTable" :data="tableData2" size="mini" style="max-height: 600px;width: 976px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="42"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="组号" label="组号" width="80px">
<el-table-column align="center" prop="组号" label="组号" width="70px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="零件名称" label="名称" width="100px" show-overflow-tooltip>
<el-table-column align="center" prop="零件名称" label="名称" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号" sortable prop="零件图号" min-width="130px" show-overflow-tooltip>
<el-table-column align="center" label="图号" sortable prop="零件图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="规格" label="规格" min-width="80px">
<el-table-column align="center" prop="规格" label="规格" width="120px">
<template slot-scope="scope">
{{ scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="材料" width="80px">
<el-table-column align="center" label="材料" width="120px">
<template slot-scope="scope">
{{ scope.row.材料 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="总数量" width="60px">
<el-table-column align="center" label="总数量" width="70px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="备件数" width="60px">
<el-table-column align="center" label="备件数" width="70px">
<template slot-scope="scope">
{{ scope.row.备件总数量 }}
</template>
@@ -205,24 +205,24 @@
</div>
</el-tab-pane>
<el-tab-pane label="离线采购件" name="离线采购件">
<el-table v-loading="listLoading" :data="tableDataBasic" highlight-current-row size="mini" border stripe style="width: 100%;" height="500px" @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable1" type="selection" align="center" width="50"/>
<el-table-column label="物料名称" prop="物料名称" align="center" min-width="140" show-overflow-tooltip>
<el-table v-loading="listLoading" :data="tableDataBasic" highlight-current-row size="mini" border stripe style="width: 823px;" height="500px" @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable1" type="selection" align="center" width="42"/>
<el-table-column label="物料名称" prop="物料名称" align="center" width="153" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" prop="物料型号" align="center" min-width="150" show-overflow-tooltip>
<el-table-column label="物料型号" prop="物料型号" align="center" width="191" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" prop="物料规格" align="center" min-width="200" show-overflow-tooltip>
<el-table-column label="物料规格" prop="物料规格" align="center" width="184" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="库存量" align="center" min-width="100px">
<el-table-column label="库存量" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
@@ -251,6 +251,7 @@
<div slot="header">
<el-card>
<el-row style="margin-top: 5px">
<el-input v-model="pickingListPeople" clearable size="small" placeholder="制单人" style="width:100px;margin-left: 0px" />
<el-date-picker
v-model="startTime"
size="small"
@@ -259,23 +260,22 @@
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px"
style="width:250px;margin-left: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-input v-model="pickingListPeople" clearable size="small" placeholder="制单人" style="width:120px;margin-left: 10px" />
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button>
<el-button size="small" type="distribution" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="createList()">创建领料单</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">
<el-button size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button>
</el-tooltip>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>
</el-row>
</el-card>
</div>
<div style="width: 26%;float: left;margin-right: 16px">
<div style="width: 26%;float: left;margin-right: 19px">
<el-card>
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" stripe highlight-current-row border size="mini" width="100%" height="400px" @row-click="clickList">
<el-table v-loading="listDetailsloading" :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="400px" @row-click="clickList">
<el-table-column prop="领料单编号" label="领料单编号" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
@@ -306,7 +306,7 @@
</div>
<div style="width: 72.5%;float: left">
<el-card>
<el-table :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="400px" @row-click="searchMX">
<el-table v-loading="listDetailsloading" :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="447px" @row-click="searchMX">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" prop="名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
@@ -328,22 +328,22 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" prop="组号" min-width="70">
<el-table-column label="组号" align="center" prop="组号" width="60">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="领用数" align="center" width="60">
<el-table-column label="领用数" align="center" width="65">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="备件数" align="center" width="60">
<el-table-column label="备件数" align="center" width="65">
<template slot-scope="scope">
{{ scope.row.备件数量 }}
</template>
</el-table-column>
<el-table-column label="已领数" align="center" width="60">
<el-table-column label="已领数" align="center" width="65">
<template slot-scope="scope">
{{ scope.row.出库数量1 }}
</template>
@@ -354,7 +354,7 @@
<!--<el-tag v-else type="warning" size="mini">未备料</el-tag>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column v-if="true" label="领料确认" align="center" prop="是否领料确认" width="75px">
<el-table-column v-if="true" label="确认" align="center" prop="是否领料确认" width="70px">
<template slot-scope="scope">
<span v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领完</span>
<span v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">部分领用</span>
@@ -463,7 +463,11 @@ export default {
total4: 0,
pickListTable2: [],
dialogFormVisible1: false,
loading0: false,
loading1: false,
loading2: false,
listLoading: false,
listDetailsloading: false,
materialSpec: '', // 物料规格
materialModel: '', // 物料型号
form1: {
@@ -478,7 +482,11 @@ export default {
pickingListNumberShow: '', // 领料单编号
pickingListNum: '', // 领料单流水号
multipleSelection: [],
multipleSelection1: []
multipleSelection1: [],
listDetailsName: '',
listDetailsPicnum: '',
listDetailsSpecifications: '',
listMachinenum: ''
}
},
computed: {
@@ -594,9 +602,13 @@ export default {
this.Name ? check3 = 1 : check3 = 0
console.log(this.PickingValue, 111)
if (this.PickingValue === false) {
this.loading0 = true
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent0, this.pageSize0, 1).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
this.loading0 = false
}).catch(() => {
this.loading0 = false
})
} else {
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent0, this.pageSize0, 1).then(response => {
@@ -606,16 +618,20 @@ export default {
}
},
// 外购件
searchTable1() {
searchTable1: function() {
let check1, check2, check3
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
this.Name ? check3 = 1 : check3 = 0
console.log(this.PickingValue, 111)
if (this.PickingValue === false) {
this.loading1 = true
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent1, this.pageSize1, 2).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
this.loading1 = false
}).catch(() => {
this.loading1 = false
})
} else {
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent1, this.pageSize1, 2).then(response => {
@@ -632,9 +648,13 @@ export default {
this.Name ? check3 = 1 : check3 = 0
console.log(this.PickingValue, 111)
if (this.PickingValue === false) {
this.loading2 = true
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent2, this.pageSize2, 3).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
this.loading2 = false
}).catch(() => {
this.loading2 = false
})
} else {
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent2, this.pageSize2, 3).then(response => {
@@ -653,6 +673,8 @@ export default {
this.tableDataBasic = response.data.rows
this.total4 = response.data.total
this.listLoading = false
}).catch(() => {
this.listLoading = false
})
},
searchTable02(row) {
@@ -778,14 +800,20 @@ export default {
},
// 删除领料单
dropList() {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
this.$confirm(`确定删除<p style="color: red;display: inline-block"> ${this.pickingListNumberShow}</p> 领料单吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
dropList(this.pickingListNum).then(response => {
if (Number(response.data[0].result) === 1) {
this.$message.success('删除成功')
this.listDetailsName = ''
this.listDetailsPicnum = ''
this.listDetailsSpecifications = ''
this.listMachinenum = ''
this.pickListTable2 = []
this.searchList()
} else {
this.$message.error('数据占用')
@@ -870,23 +898,42 @@ export default {
},
// 查看领料单明细
clickList(row) {
this.listDetailsName = ''
this.listDetailsPicnum = ''
this.listDetailsSpecifications = ''
this.listMachinenum = ''
row ? this.审批情况 = row.是否审批 : this.审批情况
row ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
row ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
row ? this.peopleName = row.姓名 : this.peopleName
this.listDetailsloading = true
searchListDetail(this.pickingListNum).then(res => {
this.pickListTable2 = []
this.pickListTable2 = res.data
this.listDetailsloading = false
}).catch(() => {
this.listDetailsloading = false
})
},
searchMX(row) {
this.ListMX = row.领料单明细流水号
this.listDetailsName = row.名称
this.listDetailsPicnum = row.图号或型号
this.listDetailsSpecifications = row.规格 ? row.规格 : '--'
this.listMachinenum = row.机床图号
console.log(this.listDetailsName, this.listDetailsPicnum, this.listDetailsSpecifications, this.listMachinenum, 8989)
},
// 删除领料单明细
dropListDetail() {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
if (this.listDetailsName) {
//
// this.listDetailsSpecifications = row.规格 ? row.规格 : '--'
// this.listMachinenum = row.机床图号
this.$confirm(`确定删除</br> <p style="color: red;display: inline-block"> 领料单:${this.listDetailsName} ${' '}图号或型号:${this.listDetailsPicnum}</p><p style="color: red;display: inline-block">规格:${this.listDetailsSpecifications}${' '}机床图号:${this.listMachinenum} </p> 的明细吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
dropListDetail(this.ListMX).then(response => {
if (Number(response.data[0].result) === 1) {
@@ -903,6 +950,9 @@ export default {
message: '已取消删除'
})
})
} else {
this.$message('请先选择领料单')
}
}
}
}

View File

@@ -0,0 +1,175 @@
<template>
<div class="app-container">
<el-card>
<el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 0">提交时间:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-radio v-model="radio" label="1" style="margin: 0 0 0 10px">全部</el-radio>
<el-radio v-model="radio" label="2" style="margin: 0 0 0 10px">通过</el-radio>
<el-radio v-model="radio" label="3" style="margin: 0 0 0 10px">未过</el-radio>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
</el-card>
<el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="合同金额(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="预付款(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.预付款 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.提交时间 }}
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核时间 }}
</template>
</el-table-column>
<el-table-column label="审核人" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核人 }}
</template>
</el-table-column>
<el-table-column label="审核结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核结果 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="合同审批通知" center style="min-height: 300px;" width="370px">
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
</el-dialog>
</div>
</template>
<script>
import { initBuyer, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/ContractApprovalQuery'
export default {
data() {
return {
radio: '1',
billNames: '',
person: [],
personValue: '',
dateRange: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 50,
tableData1: [],
loading1: false,
dialogFormVisible: false,
returns: ''
}
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
this.person = []
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.loading1 = true
var check1, check2, check3
this.billNames ? check1 = 1 : check1 = 0
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
this.personValue ? check3 = 1 : check3 = 0
searchTable1(this.radio, check1, this.billNames, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
console.log(response.data)
this.loading1 = false
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2(row) {
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
</style>
<style>
#table .el-form-item {
margin: 0;
}
</style>

View File

@@ -0,0 +1,193 @@
<template>
<div class="app-container">
<el-card>
<el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 0">提交时间:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-radio v-model="radio" label="1" style="margin: 0 0 0 10px">全部</el-radio>
<el-radio v-model="radio" label="2" style="margin: 0 0 0 10px">通过</el-radio>
<el-radio v-model="radio" label="3" style="margin: 0 0 0 10px">未过</el-radio>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
</el-card>
<el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="合同金额(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="预付款(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.预付款 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.提交时间 }}
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核时间 }}
</template>
</el-table-column>
<el-table-column label="审核人" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核人 }}
</template>
</el-table-column>
<el-table-column label="审核结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核结果 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
</template>
<script>
import { initBuyer, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { mapGetters } from 'vuex'
export default {
data() {
return {
radio: '1',
billNames: '',
person: [],
personValue: '',
dateRange: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 50,
tableData1: [],
loading1: false,
dialogFormVisible: false,
returns: ''
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
this.person = []
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.loading1 = true
var check1, check2, check3
this.billNames ? check1 = 1 : check1 = 0
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
this.personValue ? check3 = 1 : check3 = 0
searchTable1(this.radio, check1, this.billNames, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
console.log(response.data)
this.loading1 = false
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2(row) {
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 0px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -246,6 +246,9 @@ export default {
// this.searchTable2()
},
searchTable1() {
this.tableData1 = []
this.gridData1 = []
this.contractDetail2 = []
initApproval(this.pageCurrent1, this.pageSize1, 0).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total

View File

@@ -287,6 +287,9 @@ export default {
this.searchTable2()
},
searchTable1() {
this.tableData1 = []
this.gridData1 = []
this.contractDetail2 = []
initApproval(this.pageCurrent1, this.pageSize1, 1).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total

View File

@@ -38,16 +38,7 @@
<!-- </el-card>-->
<el-card>
<el-table
v-loading="loading1"
:data="tableData1"
size="mini"
border
stripe
style="width: 60%; max-height: 500px"
height="150px"
highlight-current-row
@row-click="searchTable2">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 60%; max-height: 500px" height="150px" highlight-current-row @row-click="searchTable2">
<el-table-column type="expand" label="详情">
<template slot-scope="scope">
<el-form id="table" label-position="left" inline class="demo-table-expand">
@@ -106,7 +97,9 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审核</el-button>
<el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
<!--<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审核</el-button>-->
</template>
</el-table-column>
</el-table>
@@ -299,6 +292,59 @@ export default {
this.total1 = response.data.total
})
},
// 通过审核
yesApproval(row) {
this.ProcurementContractNum = row.采购合同流水号
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
submitApproval(this.ProcurementContractNum, 1, '').then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核成功')
this.dialogVisible3 = false
this.fetchData() // 重新初始化
this.contractNumValue = ''
this.personValue = ''
this.supplierName = ''
this.searchTable1()
this.returns = ''
} else { this.$message.error('审核失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
// 不通过审核
noApproval(row) {
this.ProcurementContractNum = row.采购合同流水号
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
submitApproval(this.ProcurementContractNum, 2, value).then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核成功')
this.dialogVisible3 = false
this.fetchData() // 重新初始化
this.contractNumValue = ''
this.personValue = ''
this.supplierName = ''
this.searchTable1()
this.returns = ''
} else { this.$message.error('审核失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
Open(row) {
this.dialogVisible3 = true
this.ProcurementContractNum = row.采购合同流水号

View File

@@ -140,7 +140,8 @@ export default {
})
})
},
noApproval(row) { // 不通过审核
// 不通过审核
noApproval(row) {
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'