租赁推送数据接收
This commit is contained in:
parent
b6389c92c1
commit
15e5983776
|
|
@ -16,4 +16,8 @@ export const receiveNotificationsDetailsApi = (params) => {
|
|||
params
|
||||
})
|
||||
}
|
||||
// 接收
|
||||
export const saveMachineApi = (params) => {
|
||||
return request.post('/material/base/receive/saveMachine', params)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" size="mini" @click="accept(row.id)"
|
||||
<el-button
|
||||
v-if="row.receiveStatus == 0"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="accept(row.id)"
|
||||
>接收</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="pushDetail(row)"
|
||||
|
|
|
|||
|
|
@ -341,13 +341,17 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { receiveNotificationsDetailsApi } from '@/api/dataPush/index.js'
|
||||
import {
|
||||
receiveNotificationsDetailsApi,
|
||||
saveMachineApi,
|
||||
} from '@/api/dataPush/index.js'
|
||||
export default {
|
||||
name: 'pushAndAcceptDetail',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showSearch: true,
|
||||
selectList: [],
|
||||
queryForm: {
|
||||
keyWord: '',
|
||||
machineName: '',
|
||||
|
|
@ -502,8 +506,25 @@ export default {
|
|||
this.$router.push({ path: 'pushAndAccept' })
|
||||
},
|
||||
// 接收
|
||||
accept() {
|
||||
async accept() {
|
||||
console.log('🚀 ~ accept ~ 接收:')
|
||||
this.$message.closeAll()
|
||||
if (this.selectList.length < 1) {
|
||||
this.$message.error('请选择需要接收的设备!')
|
||||
return
|
||||
}
|
||||
|
||||
const res = await saveMachineApi({
|
||||
id: this.$route.query.id,
|
||||
dataReceiveDetailList: this.selectList,
|
||||
})
|
||||
|
||||
if (res.code === 200) {
|
||||
this.$message.success('接收成功!')
|
||||
this.getList()
|
||||
}
|
||||
|
||||
// console.log(res, '接收结果!!')
|
||||
// this.loading = true
|
||||
// 接口().then(res => {
|
||||
// this.getList()
|
||||
|
|
@ -516,6 +537,7 @@ export default {
|
|||
// 选择
|
||||
selection(val) {
|
||||
console.log('🚀 ~ selection ~ 选择:', val)
|
||||
this.selectList = val
|
||||
},
|
||||
// 机手详情 - 弹框
|
||||
getMachinistDetail(row) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue