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
| <template>
| <view>
| <uni-table border stripe style='width:100%;height: 100%;overflow: auto;'>
| <uni-tr>
| <uni-th align="center">
| 操作
| </uni-th>
| <uni-th v-for='(item,keys,index) in reviewTitle' align="center">{{item}}</uni-th>
| </uni-tr>
|
| <uni-tr v-for="items in quanlityReviewList">
| <uni-td align="center">
| <button
| @click="confirmOpen(items)"
| class="uni-button"
| size="mini"
| type="primary">审核</button>
| </uni-td>
| <uni-td align="center" v-for='(item,keys) in reviewTitle'>{{items[keys]}}</uni-td>
|
| </uni-tr>
| </uni-table>
| </view>
| </template>
|
| <script setup>
| import { ref,onMounted } from 'vue'
| import request from '../../utils/request'
| import userInfo from '@/stores/userInfo'
| const store=userInfo()
|
| const reviewTitle =ref({
| reportingWorkId:'报工编号',
| processId:'流程卡号',
| thisProcess:'工序',
| teamsGroupsName:'班组',
| thisCompletedQuantity:"完工",
| thisWornQuantity:'次破',
| reportingWorkTime:'报工时间'
| })
| const quanlityReviewList = ref([])
| onMounted(()=>{
| //查询破损记录信息
| getQuanlityReviewList()
| })
|
|
| const getQuanlityReviewList =async () => {
| await request.post("/reportingWork/qualityReviewSearch").then(res => {
| if(res.code==='200'){
| quanlityReviewList.value = res.data.data
| }
| }).catch(err => {
| uni.showModal({
| title: '提示',
| content: err,
| showCancel:false
| });
| })
| }
| const confirmOpen = (row) => {
| uni.showModal({
| title: '提示',
| content: '确认审核',
| success: async (res) => {
| if (res.confirm) {
| await reviewDamage(row)
| }
| }
| });
| }
|
| //质检审核
| const reviewDamage = async (row) => {
| await request.post(`/reportingWork/updateQualityStatus/${row.reportingWorkId}/${store.user.userName}`)
| .then(async res => {
| if(res.code==='200'){
| await getQuanlityReviewList()
| uni.showModal({
| title: '提示',
| content: '审核成功',
| showCancel:false
| });
| }
| }).catch(err => {
| uni.showModal({
| title: '提示',
| content: err,
| showCancel:false
| });
| })
| }
| </script>
|
| <style>
|
| </style>
|
|