123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808 |
- <template>
- <template-page
- ref="pageRef"
- :getList="getList"
- :exportList="exportList"
- :columnParsing="columnParsing"
- :optionsEvensGroup="optionsEvensGroup"
- :tableAttributes="tableAttributes"
- :tableEvents="tableEvents"
- :operation="operation()"
- >
- <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 class="neibuview">
- <zj-form-container
- ref="formRef"
- :form-data="formData"
- :form-rules="formRules"
- :form-attributes="{ size: 'mini' }"
- >
- <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].includes(formType) || (this.formData.parentCategoryId && [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, 2].includes(formType)" size="mini" @click="formConfirm" type="primary"
- >确 定</el-button
- >
- <el-button v-if="[3, 4].includes(formType)" size="mini" @click="quedingshenhe" type="primary"
- >确 定</el-button
- >
- </div>
- </zj-page-container>
- </el-dialog>
- </div>
- </template-page>
- </template>
- <script>
- import TemplatePage from '@/components/template/template-page-1.vue'
- import import_mixin from '@/components/template/import_mixin.js'
- import {
- appraiseApplyApplyList,
- appraiseApplyApplyListExport,
- appraiseApplyApplyDetail,
- appraiseApplyApplySubmit,
- appraiseApplyApplyConfirm,
- appraiseApplyBatchUpdateEnd,
- appraiseApplyBatchUpdateReset
- } 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'
- import ImageUpload from '@/components/file-upload'
- import { appraiseApplyCategoryList } from '@/api/explainTypeConfig.js'
- export default {
- components: { TemplatePage, ImageUpload },
- mixins: [import_mixin, operation_mixin],
- data() {
- return {
- // 表格属性
- tableAttributes: {
- selectColumn: true
- },
- // 表格事件
- tableEvents: {
- 'selection-change': this.selectionChange
- },
- recordSelected: [],
- formBool: false,
- 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: '',
- recordingFile: [],
- applicationDocument: []
- },
- formRules: {},
- appraiseApplyCategoryList: []
- }
- },
- computed: {
- optionsEvensGroup() {
- return [
- [
- [
- this.optionsEvensAuth('add', {
- click: () => {
- this.formType = 0
- this.formBool = true
- }
- })
- ],
- [
- this.optionsEvensAuth('dismissedWithoutAppeal', {
- click: () => {
- if (this.recordSelected.length === 0) {
- this.$message.warning('请勾选工单')
- return
- }
- appraiseApplyBatchUpdateEnd(this.recordSelected.map(item => item.id)).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(this.recordSelected.map(item => item.id)).then(res => {
- this.$message({ type: 'success', message: '成功!' })
- this.$refs.pageRef.refreshList()
- })
- }
- })
- ]
- ]
- ]
- },
- items() {
- 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: ![0, 1, 2].includes(this.formType),
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '评价内容',
- prop: 'appraiseContent',
- rules: [...required]
- }
- }
- ]
- },
- items2() {
- 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: ![0, 1, 2].includes(this.formType),
- type: 'textarea',
- rows: 3,
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '申诉理由',
- prop: 'reason',
- rules: [...required]
- }
- },
- {
- md: 24,
- name: 'slot-component',
- formItemAttributes: {
- label: '录音文件',
- prop: 'recordingFile',
- rules: []
- },
- render: (h, { props, onInput }) => {
- return (
- <div>
- <ImageUpload
- fileList={this.formData.recordingFile}
- limit={1}
- isEdit={[0, 1, 2].includes(this.formType)}
- fileType={['video']}
- />
- <h4>仅支持MP3/MP4</h4>
- </div>
- )
- }
- },
- {
- md: 24,
- name: 'slot-component',
- formItemAttributes: {
- label: '申请图片',
- prop: 'applicationDocument',
- rules: []
- },
- render: (h, { props, onInput }) => {
- return (
- <ImageUpload
- fileList={this.formData.applicationDocument}
- limit={100}
- isEdit={[0, 1, 2].includes(this.formType)}
- fileType={['image']}
- />
- )
- }
- },
- {
- name: 'el-input',
- md: 24,
- attributes: {
- disabled: ![0, 1, 2].includes(this.formType),
- type: 'textarea',
- rows: 3,
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '申诉备注',
- prop: '',
- rules: []
- }
- }
- ]
- },
- items3() {
- return [
- {
- name: 'el-select',
- md: 6,
- options: this.appraiseApplyCategoryList
- .filter(item => item.parentId == 0)
- .map(item => ({ label: item.name, value: item.id })),
- attributes: {
- disabled: ![3, 4].includes(this.formType),
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '问题大类',
- prop: 'parentCategoryId',
- rules: [...required]
- }
- },
- {
- name: 'el-select',
- md: 6,
- options: this.appraiseApplyCategoryList
- .filter(item => item.parentId == this.formData.parentCategoryId)
- .map(item => ({ label: item.name, value: item.id })),
- attributes: {
- disabled: ![3, 4].includes(this.formType),
- 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: [3, 4, 5].includes(this.formType),
- name: 'el-radio',
- options: [
- { label: '是', value: true },
- { label: '否', value: false }
- ],
- attributes: {},
- formItemAttributes: {
- label: '网点是否指引用户接听400回访电话',
- prop: 'isWebsitCall',
- rules: [...required]
- }
- },
- {
- md: 24,
- isShow: [3, 4, 5].includes(this.formType),
- name: 'el-radio',
- options: [
- { label: '无责', value: 'NOT' },
- { label: '全责', value: 'ALL' },
- { label: '半责', value: 'HALF' }
- ],
- attributes: {},
- formItemAttributes: {
- label: '判定网点',
- prop: 'websitResult',
- rules: [...required]
- }
- },
- {
- md: 24,
- isShow: [3, 4, 5].includes(this.formType),
- 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: ![3, 4].includes(this.formType),
- 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,
- // 导出
- exportList: appraiseApplyApplyListExport,
- // 表格列解析渲染数据更改
- columnParsing(item, defaultData) {
- return defaultData
- },
- // 获取勾选框数据
- selectionChange(data) {
- this.recordSelected = data
- },
- handleClose() {
- 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,
- items: [
- ...this.formData.recordingFile.map(item => ({ ...item, type: 'C' })),
- ...this.formData.applicationDocument.map(item => ({ ...item, type: 'I' }))
- ]
- }).then(res => {
- this.$message({ type: 'success', message: '成功!' })
- if (this.pageType == 'zhidingshenshu') {
- 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,
- items: [
- ...this.formData.recordingFile.map(item => ({ ...item, type: 'C' })),
- ...this.formData.applicationDocument.map(item => ({ ...item, type: 'I' }))
- ]
- }).then(res => {
- this.$message({ type: 'success', message: '成功!' })
- this.$refs.pageRef.refreshList()
- this.handleClose()
- })
- }
- })
- },
- operation() {
- return this.operationBtn({
- // 详情
- details: {
- click: ({ row, index, column }) => {
- appraiseApplyApplyDetail({
- id: row.id
- }).then(res => {
- appraiseApplyCategoryList({ pageNum: 1, pageSize: -1, params: [] }).then(res => {
- this.appraiseApplyCategoryList = res.data.records
- })
- this.formData = {
- ...res.data,
- recordingFile: (res.data?.items || []).filter(item => item.type == 'C'),
- applicationDocument: (res.data?.items || []).filter(item => item.type == 'I')
- }
- this.$nextTick(() => {
- this.formType = 5
- this.formBool = true
- })
- })
- }
- },
- // 二次申诉
- secondStatement: {
- conditions: ({ row, index, column }) => {
- return row.isSecond == false && row.websitResult == 'All' && row.status == 'OK'
- },
- click: ({ row, index, column }) => {
- appraiseApplyApplyDetail({
- id: row.id
- }).then(res => {
- appraiseApplyCategoryList({ pageNum: 1, pageSize: -1, params: [] }).then(res => {
- this.appraiseApplyCategoryList = res.data.records
- })
- this.formData = {
- ...res.data,
- recordingFile: (res.data?.items || []).filter(item => item.type == 'C'),
- applicationDocument: (res.data?.items || []).filter(item => item.type == 'I')
- }
- this.$nextTick(() => {
- this.formType = 2
- this.formBool = true
- })
- })
- }
- },
- // 信息部审核
- InfoDepartmentAudit: {
- conditions: ({ row, index, column }) => {
- return row.isSecond == false && row.status == 'WAIT_CENTER'
- },
- click: ({ row, index, column }) => {
- appraiseApplyApplyDetail({
- id: row.id
- }).then(res => {
- appraiseApplyCategoryList({ pageNum: 1, pageSize: -1, params: [] }).then(res => {
- this.appraiseApplyCategoryList = res.data.records
- })
- this.formData = {
- ...res.data,
- recordingFile: (res.data?.items || []).filter(item => item.type == 'C'),
- applicationDocument: (res.data?.items || []).filter(item => item.type == 'I')
- }
- this.$nextTick(() => {
- this.formType = 3
- this.formBool = true
- })
- })
- }
- },
- // 结算组审核
- clearingSectionAudit: {
- conditions: ({ row, index, column }) => {
- return row.isSecond == true && row.status == 'WAIT_CENTER'
- },
- click: ({ row, index, column }) => {
- appraiseApplyApplyDetail({
- id: row.id
- }).then(res => {
- appraiseApplyCategoryList({ pageNum: 1, pageSize: -1, params: [] }).then(res => {
- this.appraiseApplyCategoryList = res.data.records
- })
- this.formData = {
- ...res.data,
- recordingFile: (res.data?.items || []).filter(item => item.type == 'C'),
- applicationDocument: (res.data?.items || []).filter(item => item.type == 'I')
- }
- this.$nextTick(() => {
- this.formType = 4
- this.formBool = true
- })
- })
- }
- }
- })
- }
- }
- }
- </script>
- <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>
|