领料单

This commit is contained in:
chenjianan
2019-06-18 09:15:58 +08:00
parent 654efe806a
commit 0a800a2d65
2 changed files with 45 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ export function searchList(pageCurrent, pageSize, listNumber_check, listNumber)
data: {
type: '1',
name: '车间装配管理_领料单_查询数据',
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber,
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber + '&是否审批=1',
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -221,6 +221,12 @@
{{ scope.row.领料单备注 }}
</template>
</el-table-column>
<el-table-column v-if="Number(token)===21" label="审批" align="center" min-width="90">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
<el-button v-else size="mini" type="primary" plain icon="el-icon-check" @click="approvalPass(scope.row)">审批</el-button>
</template>
</el-table-column>
<el-table-column label="领回确认" align="center" min-width="80">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning">未确认</el-tag>
@@ -321,6 +327,7 @@
<script>
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail } from '@/api/Inventory/CreatePickingList'
import request from '@/utils/request'
import { mapGetters } from 'vuex'
export default {
name: 'CreatePickingList',
data() {
@@ -362,12 +369,49 @@ export default {
multipleSelection: []
}
},
computed: {
...mapGetters([
'id',
'token'
])
},
mounted() {
this.fetchData()
this.searchTable()
this.searchList()
},
methods: {
// 审批通过
approvalPass(row) {
this.$confirm('是否审批通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const param = {
url: '',
method: 'post',
data: {
type: '4',
name: `update 车间装配管理_领料单 set 是否审批 = 1 where 领料单流水号 = ${row.领料单流水号}`
}
}
request(param).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.pickingListNumber = ''
this.searchList()
} else {
this.$message.error('操作失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
// 初始化数据
fetchData() {
initPickPerson().then(response => {