MrShi
2024-02-23 6d6fadc1ead24fde59386f96d384795c803e4a89
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
    >
      <!--    驳回退回申请    -->
      <div class="form">
        <div class="form_item">
          <div class="form_item_label"><span>*</span>审核说明:</div>
          <div class="form_item_val">
            <el-input type="textarea" v-model="checkInfo" :rows="2" placeholder="请输入"></el-input>
          </div>
        </div>
      </div>
       <div class="box" v-for="(item, index) in duSolutionList" :key="index">
        <div   class="box_label">保险方案:{{item.solutionName}}</div>
        <el-table
          v-if="item.duWorktypeList && item.duWorktypeList.length>0"
          :data="item.duWorktypeList"
          border
          style="width: 100%">
          <el-table-column label="序号" width="80px">
            <template slot-scope="scope">
              <span>{{scope.$index + 1}}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="workTypeName"
            label="所属工种">
          </el-table-column>
          <el-table-column
            prop="name"
            label="操作视频">
            <template slot-scope="{row}">
              <video loop controls width="150px" height="150px" :src="row.videoUrlFull" v-if="row.videoUrlFull"></video>
            </template>
          </el-table-column>
          <el-table-column
            label="状态">
            <template slot-scope="{row}">
              <span :class="'du-status'+row.status" v-if="row.status === 0">待审核</span>
              <span :class="'du-status'+row.status"  v-if="row.status === 1">审核通过</span>
              <span :class="'du-status'+row.status"  v-if="row.status === 2">审核不通过</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <template v-slot:footer>
        <el-button type="primary" @click="doSubmit(1)">审核通过</el-button>
        <el-button type="danger" @click="doSubmit(2)">审核退回</el-button>
        <el-button @click="visible=false">取消</el-button>
      </template>
    </GlobalWindow>
</template>
 
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import {checkWorktype} from "@/api/business/dispatchUnit";
    export default {
        name: 'dispatchReview',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                // 表单数据
              checkInfo:'',
                form: {
                  duSolutionList:[]
                },
              duSolutionList:[],
                // 验证规则
                rules: {
                },
                tableData: [],
                visible5: false
            }
        },
        created () {
            this.config({
                api: '/business/insuranceApply',
                'field.id': 'id'
            })
        },
        methods: {
          open(title, target){
            this.title=title
            this.visible=true
            this.form ={}
            this.checkInfo=''
            this.form = target
            this.duSolutionList=[]
            var duSolutionList = this.form.duSolutionList;
            duSolutionList.forEach(item => {
                var worktyps = item.duWorktypeList;
                var flag = 0;
              var tempworktyps = new Array();
                worktyps.forEach(item1 => {
                   if(item1.status == null || item1.status == 0){
                     //如果是待审核工种
                     flag = 1;
                     tempworktyps.push(item1);
                   }
                })
              if(flag ==1){
                this.duSolutionList.push({duWorktypeList:tempworktyps,solutionName:item.solutionName})
              }
            })
 
            console.log(this.form)
          },
          doSubmit(type){
            if (!this.checkInfo) {
              this.$message.warning('请输入审核说明!')
              return
            }
            this.$dialog.messageConfirm('确认进行该操作吗?')
              .then(() => {
                this.isWorking = true
                checkWorktype({id:this.form.id,checkInfo:this.checkInfo,worktypeStatus:type})
                  .then(response => {
                    this.visible = false
                    this.$emit('success')
                  }).catch(err => {
                    this.$tip.apiFailed(err)
                  })
              })
          }
 
        }
    }
</script>
 
<style lang="scss" scoped>
    .box {
        width: 100%;
        .box_label {
            width: 100%;
            color: black;
            font-size: 14px;
            margin-bottom: 15px;
        }
    }
    .form {
        width: 100%;
        display: flex;
        align-items: center;
        flex-direction: column;
      margin-bottom: 50px;
        .form_span {
            width: 100%;
            display: flex;
            align-items: start;
            flex-direction: column;
            margin-bottom: 20px;
            span {
                font-size: 14px;
                &:nth-child(1) {
                    color: black;
                    margin-bottom: 5px;
                }
                &:nth-child(2) {
                    color: #8c939d;
                }
            }
        }
        .form_item {
            width: 100%;
            display: flex;
            align-items: center;
            margin-bottom: 50px;
            &:last-child {
                margin: 0 !important;
            }
            .form_item_label {
                flex-shrink: 0;
                //width: 170px;
                color: black;
                font-size: 14px;
                span {
                    color: red;
                    font-size: 14px;
                }
            }
            .form_item_val {
                flex: 1;
                /*height: 40px;*/
                margin-left: 20px;
                textarea {
                    width: 100%;
                    height: 70px;
                    border: 1px solid #cbcbcb;
                    padding: 10px;
                    outline: none;
                    box-sizing: border-box;
                }
                input {
                    width: 100%;
                    height: 40px;
                    outline: none;
                    border-radius: 5px;
                    border: 1px solid #cbcbcb;
                    padding: 0 20px;
                    box-sizing: border-box;
                }
            }
        }
    }
</style>