updateInspBtn.vue
3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<template>
<div>
<el-button @click="dialogVisible = !dialogVisible">批量复核</el-button>
<el-dialog title="批量复核" :visible.sync="dialogVisible" width="30%">
<el-form ref="form" label-width="120px">
<el-form-item label="复核状态">
<el-select v-model="fInspStatusName" placeholder="请选择" style="width: 100%">
<el-option label="同意" value="同意"></el-option>
<el-option label="不同意" value="不同意"></el-option>
</el-select>
</el-form-item>
<el-form-item label="复核备注">
<el-input v-model="fInspNotes"></el-input>
</el-form-item>
</el-form>
<span slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onSubmit">确 认</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {updateInsp} from '@/api/service/dailyFunds'
import moment from 'moment'
export default {
props: {
row: {
type: Object
},
column: {
type: Object
},
index: {
type: String
},
desc: {
type: String
},
selectRows: {
type: Object
}
},
data() {
return {
dialogVisible: false,
fInspStatusName: null,
fInspNotes: null,
};
},
created() {
},
methods: {
onSubmit() {
console.log('selectRows', this.selectRows);
if (!this.selectRows || this.selectRows.length == 0) {
this.$message.error('请选择数据!');
return false;
} else {
this.$confirm('是否确认批量复核1?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let wDailyFundsList = [];
this.selectRows.forEach(d => {
wDailyFundsList.push({
id: d.id_,
fDate: d.wdailyfundsfdate + " 00:00:00",
fOrgName: d.wdailyfundsforgname,
fOrgId: d.wdailyfundsforgid,
fOrgType: d.wdailyfundsforgtype
})
})
updateInsp({
wDailyFundsList: wDailyFundsList,
fInspStatusName: this.fInspStatusName,
fInspNotes: this.fInspNotes
}).then((res) => {
if (res.state) {
this.$message.success(res.message)
this.$emit("RefreshTable");
this.dialogVisible = false;
} else {
this.$emit("RefreshTable");
this.$message.warning(res.message)
this.dialogVisible = false;
}
})
});
}
},
onClick() {
// console.log('selectRows',this.selectRows);
// console.log('row',this.row);
// console.log('column',this.column);
// console.log('index',this.index);
// console.log('desc',this.desc);
}
}
}
</script>
<style scoped lang='scss'>
::v-deep {
.el-dialog__footer {
text-align: center !important;
.el-button {
margin-left: 20px;
}
}
}
</style>