Browse Source

no message

linwenxin 4 months ago
parent
commit
5da6dc4bd9

+ 23 - 2
src/layout/components/TagsView/index.vue

@@ -7,7 +7,7 @@
         :key="tag.path + index"
         :class="['tags-view-item', isActive(tag) ? 'active' : '']"
         :data="JSON.stringify({ path: tag.path, query: tag.query, fullPath: tag.fullPath })"
-        @click="djclick({ path: tag.path, query: tag.query, fullPath: tag.fullPath })"
+        @click="djclick({ path: tag.path, query: tag.query, fullPath: tag.fullPath }, tag)"
         @dblclick="sjclick(tag)"
         @contextmenu.prevent="openMenu(tag, $event)"
       >
@@ -27,6 +27,7 @@
 <script>
 import ScrollPane from './ScrollPane'
 import { clickBG } from '@/utils/util.js'
+import { EventBus } from '@/utils/eventBus'
 const ev = new clickBG(200)
 export default {
   components: { ScrollPane },
@@ -63,9 +64,14 @@ export default {
   mounted() {
     this.initTags()
     this.addTags()
+    EventBus.$on('closeSelectedTag_wb', () => {
+      console.log(11111, this.selectedTag)
+      this.closeSelectedTag(this.selectedTag)
+    })
   },
   methods: {
-    djclick(item) {
+    djclick(item, tag) {
+      this.selectedTag = tag
       ev.click(() => {
         this.$router.push(item)
       })
@@ -114,6 +120,21 @@ export default {
       const { name, meta, params } = this.$route
       const { pageName, pageType, pageCode, pagePam } = params
       if (name) {
+        this.selectedTag = {
+          ...this.$route,
+          meta: {
+            ...meta,
+            ...(() => {
+              if (pageName) {
+                return {
+                  title: pageName && pageName != '-' ? `${meta.title}-${pageName}` : meta.title
+                }
+              }
+              return {}
+            })()
+          },
+          nameKey: `${name}_${pageType}_${pageCode}_${pagePam}_${Math.floor(Date.now() / 1000)}`
+        }
         this.$store.dispatch('tagsView/addView', {
           ...this.$route,
           meta: {

+ 19 - 1
src/views/workOrder/appraise/index.vue

@@ -8,6 +8,7 @@
     :moreParameters="moreParameters"
     :column-parsing="columnParsing"
     :exportList="exportList"
+    :operation="operation()"
   >
   </template-page>
 </template>
@@ -18,9 +19,10 @@ import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { listPageV2, pageExport } from '@/api/workOrder/appraise'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage, ImageUpload },
-  mixins: [import_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
       // 事件组合
@@ -62,6 +64,22 @@ export default {
     }
   },
   methods: {
+    operation() {
+      return this.operationBtn({
+        shenshu: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: 'appraisalStatement',
+              params: {
+                pageName: row.id,
+                pageType: 'zhidingshenshu',
+                pageCode: row.id
+              }
+            })
+          }
+        }
+      })
+    },
     // 列表请求函数
     getList(p, cb) {
       try {

+ 576 - 18
src/views/workOrder/appraiseAppeal/appraisalStatement/index.vue

@@ -12,22 +12,31 @@
     <div class="cartographer_big">
       <el-dialog title="配置" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
         <zj-page-container v-if="formBool">
-          <zj-page-fill>
+          <zj-page-fill class="neibuview">
             <zj-form-container
               ref="formRef"
               :form-data="formData"
               :form-rules="formRules"
               :form-attributes="{ size: 'mini' }"
             >
-              <zj-form-module title="评价信息" :form-data="formData" :form-items="items" />
-              <zj-form-module title="申诉信息" :form-data="formData" :form-items="items2" />
-              <zj-form-module title="中心审核信息" :form-data="formData" :form-items="items3" />
+              <zj-form-module title="评价信息" label-width="100px" :form-data="formData" :form-items="items" />
+              <zj-form-module title="申诉信息" label-width="100px" :form-data="formData" :form-items="items2" />
+              <zj-form-module
+                v-if="[3, 4, 5].includes(formType)"
+                title="中心审核信息"
+                label-width="140px"
+                :form-data="formData"
+                :form-items="items3"
+              />
             </zj-form-container>
           </zj-page-fill>
           <!-- 操作按钮 -->
           <div style="box-sizing: border-box; padding: 10px; text-align: right">
             <el-button size="mini" @click="handleClose">取 消</el-button>
-            <el-button v-if="~[0, 1].indexOf(formType)" size="mini" @click="formConfirm" type="primary"
+            <el-button v-if="~[0, 1, 2].indexOf(formType)" size="mini" @click="formConfirm" type="primary"
+              >确 定</el-button
+            >
+            <el-button v-if="~[3, 4].indexOf(formType)" size="mini" @click="quedingshenhe" type="primary"
               >确 定</el-button
             >
           </div>
@@ -51,6 +60,8 @@ import {
 } from '@/api/appraisalStatement'
 import operation_mixin from '@/components/template/operation_mixin.js'
 import { required, requiredValueMin } from '@/components/template/rules_verify.js'
+import { orderBaseDetail } from '@/api/workOrderPool.js'
+import { EventBus } from '@/utils/eventBus'
 export default {
   components: { TemplatePage },
   mixins: [import_mixin, operation_mixin],
@@ -58,7 +69,7 @@ export default {
     return {
       // 表格属性
       tableAttributes: {
-        selectColumn: false
+        selectColumn: true
       },
       // 表格事件
       tableEvents: {
@@ -66,8 +77,37 @@ export default {
       },
       recordSelected: [],
       formBool: false,
-      formType: 0,
-      formData: {},
+      formType: 0, //0新增,1指定申诉,2二次申诉,3第一次审核信息部审核,4第二次审核结算组审核,5详情
+      formData: {
+        applyBy: '',
+        applyTime: '',
+        appraiseContent: '',
+        appraiseStatus: '',
+        categoryId: '',
+        categoryName: '',
+        examineResult: '',
+        infoConfirmTime: '',
+        isWebsitCall: '',
+        items: [],
+        orderBaseId: '',
+        orderSmallType: '',
+        orderSmallTypeText: '',
+        orderType: '',
+        overTime: '',
+        parentCategoryId: '',
+        parentCategoryName: '',
+        reason: '',
+        settleConfirmTime: '',
+        websitId: '',
+        websitName: '',
+        websitResult: '',
+        workerId: '',
+        workerIdcard: '',
+        workerMobile: '',
+        workerName: '',
+        workerNumber: '',
+        workerResult: ''
+      },
       formRules: {}
     }
   },
@@ -82,21 +122,461 @@ export default {
                 this.formBool = true
               }
             })
+          ],
+          [
+            this.optionsEvensAuth('dismissedWithoutAppeal', {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选工单')
+                  return
+                }
+                appraiseApplyBatchUpdateEnd({ ids: this.recordSelected.map(item => item.id).join(',') }).then(res => {
+                  this.$message({ type: 'success', message: '成功!' })
+                  this.$refs.pageRef.refreshList()
+                })
+              }
+            })
+          ],
+          [
+            this.optionsEvensAuth('reappealDenied', {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选工单')
+                  return
+                }
+                appraiseApplyBatchUpdateReset({ ids: this.recordSelected.map(item => item.id).join(',') }).then(res => {
+                  this.$message({ type: 'success', message: '成功!' })
+                  this.$refs.pageRef.refreshList()
+                })
+              }
+            })
           ]
         ]
       ]
     },
     items() {
-      return []
+      return [
+        ...(() => {
+          if (this.formType == 0) {
+            return [
+              {
+                name: 'el-input',
+                md: 6,
+                attributes: {
+                  disabled: false,
+                  placeholder: '请输入'
+                },
+                formItemAttributes: {
+                  label: '工单单号',
+                  prop: 'orderBaseId',
+                  rules: [...required]
+                },
+                slots: {
+                  append: (h, { props, onInput }) => {
+                    return (
+                      <el-button type="primary" onClick={this.fuzhigongdanneirong}>
+                        确定
+                      </el-button>
+                    )
+                  }
+                }
+              }
+            ]
+          } else {
+            return [
+              {
+                name: 'el-input',
+                md: 6,
+                attributes: {
+                  disabled: true,
+                  placeholder: '请输入'
+                },
+                formItemAttributes: {
+                  label: '工单单号',
+                  prop: 'orderBaseId',
+                  rules: [...required]
+                }
+              }
+            ]
+          }
+        })(),
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '工单类型',
+            prop: 'orderSmallTypeText',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '客户姓名',
+            prop: 'userName',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '联系电话',
+            prop: 'userMobile',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '联系地址',
+            prop: 'address',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '主要工程师',
+            prop: 'workerName',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '完工时间',
+            prop: 'overTime',
+            rules: []
+          }
+        },
+        {
+          name: 'el-select',
+          options: [
+            { label: '默认好评', value: 'D' },
+            { label: '好评', value: 'A' },
+            { label: '中评', value: 'B' },
+            { label: '差评', value: 'C' },
+            { label: '未评价', value: 'N' },
+            { label: '其他', value: 'O' }
+          ],
+          md: 6,
+          attributes: { disabled: true, placeholder: '请选择', width: '100%' },
+          formItemAttributes: { label: '评价类型', prop: 'appraiseStatus' }
+        },
+        {
+          name: 'el-input',
+          md: 18,
+          attributes: {
+            disabled: !!this?.formData?.id,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '评价内容',
+            prop: 'appraiseContent',
+            rules: [...required]
+          }
+        }
+      ]
     },
     items2() {
-      return []
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '所属网点',
+            prop: 'websitName',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '申诉人',
+            prop: 'applyBy',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '申诉时间',
+            prop: 'applyTime',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: false,
+            type: 'textarea',
+            rows: 3,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '申诉理由',
+            prop: 'reason',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: false,
+            type: 'textarea',
+            rows: 3,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '申诉备注',
+            prop: '',
+            rules: []
+          }
+        }
+      ]
     },
     items3() {
-      return []
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '问题大类',
+            prop: 'parentCategoryId',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '问题小类',
+            prop: 'categoryId',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '审核人',
+            prop: 'confirmBy',
+            rules: []
+          }
+        },
+        ...(() => {
+          if (this.formData.isSecond) {
+            return [
+              {
+                name: 'el-input',
+                md: 6,
+                attributes: {
+                  disabled: true,
+                  placeholder: '请输入'
+                },
+                formItemAttributes: {
+                  label: '审核时间',
+                  prop: 'settleConfirmTime',
+                  rules: []
+                }
+              }
+            ]
+          } else {
+            return [
+              {
+                name: 'el-input',
+                md: 6,
+                attributes: {
+                  disabled: true,
+                  placeholder: '请输入'
+                },
+                formItemAttributes: {
+                  label: '审核时间',
+                  prop: 'infoConfirmTime',
+                  rules: []
+                }
+              }
+            ]
+          }
+        })(),
+        {
+          md: 24,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '是', value: true },
+            { label: '否', value: false }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '网点是否指引用户接听400回访电话',
+            prop: 'isWebsitCall',
+            rules: [...required]
+          }
+        },
+        {
+          md: 24,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '无责', value: 'NOT' },
+            { label: '全责', value: 'ALL' },
+            { label: '半责', value: 'HALF' }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '判定网点',
+            prop: 'websitResult',
+            rules: [...required]
+          }
+        },
+        {
+          md: 24,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '无责', value: 'NOT' },
+            { label: '全责', value: 'ALL' },
+            { label: '半责', value: 'HALF' }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '判定服务人员',
+            prop: 'workerResult',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: false,
+            type: 'textarea',
+            rows: 3,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '审核备注',
+            prop: 'examineResult',
+            rules: [...required]
+          }
+        }
+      ]
+    }
+  },
+  created() {
+    if (this.pageType == 'zhidingshenshu') {
+      this.formData.orderBaseId = this.pageCode
+      this.fuzhigongdanneirong()
+      this.formType = 1
+      this.formBool = true
     }
   },
   methods: {
+    fuzhigongdanneirong() {
+      if (!this.formData.orderBaseId) {
+        return
+      }
+      orderBaseDetail({
+        orderBaseId: this.formData.orderBaseId
+      }).then(res => {
+        var {
+          orderSmallType,
+          orderSmallTypeText,
+          orderType,
+          orderTypeText,
+          websitId,
+          websitName,
+          workerId,
+          workerIdcard,
+          workerMobile,
+          workerName,
+          workerNumber,
+          userName,
+          address,
+          userMobile,
+          overTime,
+          appraiseStatus,
+          appraiseContent
+        } = res.data
+        Object.assign(this.formData, {
+          orderSmallType,
+          orderSmallTypeText,
+          orderType,
+          orderTypeText,
+          websitId,
+          websitName,
+          workerId,
+          workerIdcard,
+          workerMobile,
+          workerName,
+          workerNumber,
+          userName,
+          address,
+          userMobile,
+          overTime,
+          appraiseStatus,
+          appraiseContent
+        })
+      })
+    },
     // 列表请求函数
     getList: appraiseApplyApplyList,
     // 导出
@@ -110,16 +590,38 @@ export default {
       this.recordSelected = data
     },
     handleClose() {
-      this.$refs?.pageRef?.refreshList()
-      this.$data.formData = this.$options.data().formData
-      this.formType = 0
-      this.formBool = false
+      if (this.pageType == 'zhidingshenshu') {
+        EventBus.$emit('closeSelectedTag_wb')
+      } else {
+        this.$refs?.pageRef?.refreshList()
+        this.$data.formData = this.$options.data().formData
+        this.formType = 0
+        this.formBool = false
+      }
     },
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
           appraiseApplyApplySubmit(this.formData).then(res => {
             this.$message({ type: 'success', message: '成功!' })
+            if (this.pageType == 'zhidingshenshu') {
+              // EventBus.$emit('closeSelectedTag_wb')
+              this.$router.push({
+                name: 'appraisalStatement'
+              })
+            } else {
+              this.$refs.pageRef.refreshList()
+              this.handleClose()
+            }
+          })
+        }
+      })
+    },
+    quedingshenhe() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          appraiseApplyApplyConfirm(this.formData).then(res => {
+            this.$message({ type: 'success', message: '成功!' })
             this.$refs.pageRef.refreshList()
             this.handleClose()
           })
@@ -128,14 +630,57 @@ export default {
     },
     operation() {
       return this.operationBtn({
-        edit: {
+        // 详情
+        details: {
           click: ({ row, index, column }) => {
             appraiseApplyApplyDetail({
               id: row.id
             }).then(res => {
               this.formData = { ...res.data }
               this.$nextTick(() => {
-                this.formType = 1
+                this.formType = 5
+                this.formBool = true
+              })
+            })
+          }
+        },
+        // 二次申诉
+        secondStatement: {
+          click: ({ row, index, column }) => {
+            appraiseApplyApplyDetail({
+              id: row.id
+            }).then(res => {
+              this.formData = { ...res.data }
+              this.$nextTick(() => {
+                this.formType = 2
+                this.formBool = true
+              })
+            })
+          }
+        },
+        // 信息部审核
+        InfoDepartmentAudit: {
+          click: ({ row, index, column }) => {
+            appraiseApplyApplyDetail({
+              id: row.id
+            }).then(res => {
+              this.formData = { ...res.data }
+              this.$nextTick(() => {
+                this.formType = 3
+                this.formBool = true
+              })
+            })
+          }
+        },
+        // 结算组审核
+        clearingSectionAudit: {
+          click: ({ row, index, column }) => {
+            appraiseApplyApplyDetail({
+              id: row.id
+            }).then(res => {
+              this.formData = { ...res.data }
+              this.$nextTick(() => {
+                this.formType = 4
                 this.formBool = true
               })
             })
@@ -147,4 +692,17 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+  ::v-deep & > .zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    & > div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+</style>