1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048 |
- <template>
- <template-page
- v-if="pageShow"
- ref="pageRef"
- :get-list="getList"
- :exportList="exportList"
- :table-attributes="tableAttributes"
- :table-events="tableEvents"
- :options-evens-group="optionsEvensGroup"
- :moreParameters="moreParameters"
- :column-parsing="columnParsing"
- :operation="operation()"
- key="pageType"
- >
- <div class="cartographer_big">
- <el-dialog title="工作联络函" width="100%" :modal="false" :visible.sync="formDialog" :before-close="handleClose">
- <zj-page-container>
- <zj-page-fill>
- <div style="box-sizing: border-box; padding: 20px 20px 0 20px">
- <zj-form-container
- v-if="formDialog"
- ref="formRef"
- :form-data="formData"
- :form-attributes="{ size: 'mini' }"
- >
- <zj-form-module title="基本信息" label-width="100px" :form-data="formData" :form-items="formItems">
- </zj-form-module>
- <template v-if="[-1].includes(openType) && formData.leLetterItems && formData.leLetterItems.length">
- <template v-for="(item, index) in formData.leLetterItems">
- <zj-form-module
- :key="`${index}1`"
- :title="`网点审核${index + 1}`"
- label-width="100px"
- :form-data="item"
- :form-items="formItems1"
- >
- </zj-form-module>
- <zj-form-module
- :key="`${index}2`"
- :title="`中心审核${index + 1}`"
- label-width="100px"
- :form-data="item"
- :form-items="formItems2"
- >
- </zj-form-module>
- </template>
- </template>
- </zj-form-container>
- <zj-form-container
- v-if="formDialog && [1, 2].includes(openType)"
- ref="formRef1"
- :form-data="formData1"
- :form-attributes="{ size: 'mini' }"
- >
- <zj-form-module title="网点审核" label-width="100px" :form-data="formData1" :form-items="formItems1">
- </zj-form-module>
- </zj-form-container>
- <zj-form-container
- v-if="formDialog && [2].includes(openType)"
- ref="formRef2"
- :form-data="formData2"
- :form-attributes="{ size: 'mini' }"
- >
- <zj-form-module title="中心审核" label-width="100px" :form-data="formData2" :form-items="formItems2">
- </zj-form-module>
- </zj-form-container>
- </div>
- </zj-page-fill>
- <div style="text-align: right; box-sizing: border-box; padding: 16px 20px">
- <el-button size="mini" @click="handleClose">取消</el-button>
- <el-button v-if="openType == 0" size="mini" type="primary" @click="save">保存</el-button>
- <el-button v-if="openType == 1" size="mini" type="primary" @click="networkAudit">网点审核</el-button>
- <el-button v-if="openType == 2" size="mini" type="primary" @click="centralAudit">中心审核</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 operation_mixin from '@/components/template/operation_mixin.js'
- import {
- letterProcessList,
- letterProcessListExport,
- letterProcessDetailLetter,
- letterProcessAddLetter,
- letterProcessUpdateLetter,
- letterProcessDelLetter,
- letterProcessAppeal, // 网点申诉
- letterProcessCancel, // 作废
- letterProcessExamine, // 中心批复
- letterProcessReject, // 驳回
- letterProcessSend // 发送
- } from '@/api/workContactLetterPage.js'
- import { required } from '@/components/template/rules_verify.js'
- import { getWebsit } from '@/api/customerManagement.js'
- import { letterManagerList } from '@/api/departmentSetting.js'
- import { letterManagerListProject } from '@/api/assessmentItemSetting.js'
- import { listPageV2 } from '@/api/workOrder/orderType'
- import { getClassifyList } from '@/api/goods'
- import ImageUpload from '@/components/file-upload'
- import { orderBaseDetail } from '@/api/workOrderPool.js'
- export default {
- components: { TemplatePage, ImageUpload },
- mixins: [import_mixin, operation_mixin],
- data() {
- return {
- pageType: 'list',
- pageShow: true,
- // 表格属性
- tableAttributes: {
- // 启用勾选列
- selectColumn: true
- },
- // 表格事件
- tableEvents: {
- 'selection-change': this.selectionChange
- },
- // 勾选选中行
- recordSelected: [],
- /** 表单变量 */
- formDialog: false,
- formData: {
- belongCompany: '',
- belongCompanyCode: '',
- companyWechatId: '',
- companyWechatName: '',
- context: '',
- dapartment: '',
- dapartmentId: '',
- examineFration: 0,
- examineName: '',
- examinePrice: 0,
- examineStatus: '',
- examineTime: '',
- fraction: 0,
- leLetterId: '',
- leLetterItems: [],
- letteWebsitNum: 0,
- letterNum: 0,
- letterNumber: '',
- mainId: '',
- mainName: '',
- orderCreateTime: '',
- orderId: '',
- orderSmallType: '',
- orderSmallTypeText: '',
- price: 0,
- projectId: '',
- projectName: '',
- projectReg: '',
- projectText: '',
- remark: '',
- sendTime: '',
- status: '',
- type: '',
- websitId: '',
- websitName: '',
- fileUrl: []
- },
- websitList: [],
- managerList: [],
- managerListProject: [],
- orderSmallTypeData: [],
- classifyList: [],
- openType: 0,
- formData1: {
- appealRemark: '',
- appealUrl: [],
- createBy: '',
- createTime: '',
- examineFration: 0,
- examineName: '',
- examinePrice: 0,
- examineRemark: '',
- examineStatus: '',
- examineTime: '',
- leLetterId: '',
- leLetterItemId: '',
- websitAppeal: ''
- },
- formData2: {
- appealRemark: '',
- appealUrl: '',
- createBy: '',
- createTime: '',
- examineFration: 0,
- examineName: '',
- examinePrice: 0,
- examineRemark: '',
- examineStatus: '',
- examineTime: '',
- leLetterId: '',
- leLetterItemId: '',
- websitAppeal: ''
- }
- }
- },
- computed: {
- // 事件组合
- optionsEvensGroup() {
- return [
- [
- [
- this.optionsEvensAuth('add', {
- click: this.openForm
- })
- ]
- ],
- [
- [
- this.optionsEvensAuth('void', {
- click: () => {
- if (this.recordSelected.length === 0) {
- this.$message.warning('请勾选数据')
- return
- }
- this.$confirm(' 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- letterProcessCancel({
- ids: this.recordSelected.map(item => item.id)
- })
- .then(res => {
- this.$refs?.pageRef?.refreshList()
- this.recordSelected = []
- this.$message({
- message: '操作成功',
- type: 'success'
- })
- })
- .catch(err => {
- this.$message.error('操作失败')
- })
- })
- .catch(() => {})
- }
- })
- ]
- ],
- [
- [
- this.optionsEvensAuth('send', {
- click: () => {
- if (this.recordSelected.length === 0) {
- this.$message.warning('请勾选数据')
- return
- }
- this.$confirm(' 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- letterProcessSend({
- ids: this.recordSelected.map(item => item.id)
- })
- .then(res => {
- this.$refs?.pageRef?.refreshList()
- this.recordSelected = []
- this.$message({
- message: '操作成功',
- type: 'success'
- })
- })
- .catch(err => {
- this.$message.error('操作失败')
- })
- })
- .catch(() => {})
- }
- })
- ]
- ],
- [
- [
- this.optionsEvensAuth('oneCaseRejected', {
- click: () => {
- if (this.recordSelected.length === 0) {
- this.$message.warning('请勾选数据')
- return
- }
- this.$confirm(' 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- letterProcessReject({
- ids: this.recordSelected.map(item => item.id)
- })
- .then(res => {
- this.$refs?.pageRef?.refreshList()
- this.recordSelected = []
- this.$message({
- message: '操作成功',
- type: 'success'
- })
- })
- .catch(err => {
- this.$message.error('操作失败')
- })
- })
- .catch(() => {})
- }
- })
- ]
- ]
- ]
- },
- // 更多参数
- moreParameters() {
- return []
- },
- formItems() {
- return [
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '联络函编号',
- prop: 'letterNumber',
- rules: []
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '下发时间',
- prop: 'sendTime',
- rules: []
- }
- },
- {
- name: 'el-radio',
- options: [
- { label: '考核函', value: '考核函' },
- { label: '奖励函', value: '奖励函' },
- { label: '整改函', value: '整改函' }
- ],
- md: 6,
- attributes: {
- disabled: this.openType != 0,
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '函件类型',
- prop: 'type',
- rules: [...required]
- }
- },
- {
- name: 'el-select',
- options: this.managerList.map(item => ({
- data: item,
- label: item.dapartment,
- value: item.id
- })),
- echoInsertion: true,
- md: 6,
- attributes: {
- disabled: this.openType != 0,
- placeholder: '请选择',
- clearable: true,
- filterable: true
- },
- formItemAttributes: {
- label: '来源科室',
- prop: 'dapartmentId',
- propName: 'dapartment',
- rules: [...required]
- },
- events: {
- change: val => {
- if (val) {
- this.formData.dapartment = this.managerList?.find(item => item.id === val)?.dapartment
- } else {
- this.formData.dapartment = ''
- }
- }
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: this.openType != 0
- },
- formItemAttributes: {
- label: '工单编号',
- prop: 'orderId',
- rules: [...required]
- },
- events: {
- input: val => {
- if (val) {
- orderBaseDetail({
- orderBaseId: val,
- returnErr: true
- })
- .then(res => {
- if (res.data.orderProducts.length == 1) {
- this.formData.mainId = res.data.orderProducts?.[0]?.mainId || ''
- this.formData.mainName = res.data.orderProducts?.[0]?.mainName || ''
- }
- this.formData.orderSmallType = res.data?.orderSmallType || ''
- this.formData.orderSmallTypeText = res.data?.orderSmallTypeText || ''
- this.formData.orderCreateTime = res.data?.createTime || ''
- })
- .catch(err => {
- this.formData.mainId = ''
- this.formData.mainName = ''
- this.formData.orderSmallType = ''
- this.formData.orderSmallTypeText = ''
- this.formData.orderCreateTime = ''
- })
- }
- }
- }
- },
- {
- name: 'el-select',
- options: this.classifyList.map(item => ({
- data: item,
- label: item.name,
- value: item.categoryId
- })),
- echoInsertion: true,
- md: 6,
- attributes: {
- disabled: this.openType != 0,
- placeholder: '请选择',
- clearable: true,
- filterable: true
- },
- formItemAttributes: {
- label: '产品大类',
- prop: 'mainId',
- propName: 'mainName',
- rules: [...required]
- },
- events: {
- change: val => {
- if (val) {
- this.formData.mainName = this.classifyList?.find(item => item.categoryId === val)?.name
- } else {
- this.formData.mainName = ''
- }
- }
- }
- },
- {
- name: 'el-select',
- md: 6,
- options: this.orderSmallTypeData,
- attributes: {
- disabled: this.openType != 0,
- placeholder: '请选择',
- clearable: true,
- filterable: true
- },
- formItemAttributes: {
- label: '工单类型',
- prop: 'orderSmallType',
- rules: [...required]
- },
- events: {
- change: val => {
- if (val) {
- this.orderInfo.orderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
- } else {
- this.orderInfo.orderSmallTypeText = ''
- }
- }
- }
- },
- {
- md: 6,
- name: 'el-date-picker',
- attributes: {
- disabled: this.openType != 0,
- style: { width: '100%' },
- type: 'datetime',
- 'value-format': 'yyyy-MM-dd HH:mm:ss'
- },
- formItemAttributes: {
- label: '工单创建日期',
- prop: 'orderCreateTime',
- rules: []
- }
- },
- {
- name: 'el-select',
- options: this.websitList.map(item => ({
- data: item,
- label: item.name,
- value: item.websitId
- })),
- echoInsertion: true,
- md: 12,
- attributes: {
- disabled: this.openType != 0,
- placeholder: '请选择',
- clearable: true,
- filterable: true
- },
- formItemAttributes: {
- label: '接收网点',
- prop: 'websitId',
- propName: 'websitName',
- rules: [...required]
- },
- events: {
- change: val => {
- if (val) {
- this.formData.websitName = this.websitList?.find(item => item.websitId === val)?.name
- } else {
- this.formData.websitName = ''
- }
- }
- }
- },
- {
- name: 'el-select',
- options: this.managerListProject.map(item => ({
- data: item,
- label: item.projectName,
- value: item.projectId
- })),
- echoInsertion: true,
- md: 12,
- attributes: {
- disabled: this.openType != 0,
- placeholder: '请选择',
- clearable: true,
- filterable: true
- },
- formItemAttributes: {
- label: '考核项目',
- prop: 'projectId',
- propName: 'projectName',
- rules: [...required]
- },
- events: {
- change: val => {
- if (val) {
- var data = this.managerListProject?.find(item => item.projectId === val)
- this.formData.projectName = data?.projectName
- this.formData.projectReg = data?.projectReg || ''
- this.formData.projectText = data?.projectText || ''
- this.formData.price = data?.price || ''
- this.formData.fraction = data?.fraction || ''
- } else {
- this.formData.projectReg = ''
- this.formData.projectText = ''
- this.formData.price = ''
- this.formData.fraction = ''
- this.formData.projectName = ''
- }
- }
- }
- },
- {
- md: 12,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '考核条例',
- prop: 'projectReg',
- rules: [...required]
- }
- },
- {
- md: 24,
- name: 'el-input',
- attributes: {
- disabled: true,
- type: 'textarea',
- rows: 3
- },
- formItemAttributes: {
- label: '考核规定',
- prop: 'projectText',
- rules: [...required]
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '考核金额',
- prop: 'price',
- rules: [...required]
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '考核分数',
- prop: 'fraction',
- rules: [...required]
- }
- },
- {
- md: 24,
- name: 'el-input',
- attributes: {
- disabled: this.openType != 0,
- type: 'textarea',
- rows: 3
- },
- formItemAttributes: {
- label: '函件内容',
- prop: 'context',
- rules: [...required]
- }
- },
- {
- md: 24,
- name: 'el-input',
- attributes: {
- disabled: this.openType != 0,
- type: 'textarea',
- rows: 3
- },
- formItemAttributes: {
- label: '备注',
- prop: 'remark',
- rules: []
- }
- },
- {
- md: 24,
- isShow: true,
- name: 'slot-component',
- formItemAttributes: {
- label: '附件',
- prop: 'fileUrl',
- rules: []
- },
- render: (h, { props, onInput }) => {
- return (
- <div>
- <ImageUpload fileList={this.formData.fileUrl} limit={1} isEdit={this.openType == 0} />
- </div>
- )
- }
- }
- ]
- },
- formItems1() {
- return [
- {
- name: 'el-radio',
- options: [
- { label: '接受', value: 'OK' },
- { label: '申诉', value: 'AP' }
- ],
- md: 8,
- attributes: {
- disabled: [-1, 2].includes(this.openType),
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '核实结果',
- prop: 'websitAppeal',
- rules: [...required]
- }
- },
- {
- md: 8,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '申诉人',
- prop: 'createBy',
- rules: []
- }
- },
- {
- md: 8,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '申诉时间',
- prop: 'createTime',
- rules: []
- }
- },
- {
- md: 24,
- name: 'el-input',
- attributes: {
- disabled: [-1, 2].includes(this.openType),
- type: 'textarea',
- rows: 3
- },
- formItemAttributes: {
- label: '申诉内容',
- prop: 'appealRemark',
- rules: [...required]
- }
- },
- {
- md: 24,
- name: 'slot-component',
- formItemAttributes: {
- label: '申诉附件',
- prop: 'appealUrl',
- rules: []
- },
- render: (h, { props, onInput }) => {
- return (
- <div>
- <ImageUpload fileList={this.formData1.appealUrl} limit={1} isEdit={this.openType == 1} />
- </div>
- )
- }
- }
- ]
- },
- formItems2() {
- return [
- {
- name: 'el-radio',
- options: [
- { label: '通过', value: 'OK' },
- { label: '驳回', value: 'FAIL' },
- { label: '减免', value: 'SUB' }
- ],
- md: 24,
- attributes: {
- disabled: [-1].includes(this.openType),
- placeholder: '请输入'
- },
- formItemAttributes: {
- label: '审核结果',
- prop: 'examineStatus',
- rules: [...required]
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: [-1].includes(this.openType)
- },
- formItemAttributes: {
- label: '审批金额',
- prop: 'examinePrice',
- rules: [...required]
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: [-1].includes(this.openType)
- },
- formItemAttributes: {
- label: '审批分数',
- prop: 'examineFration',
- rules: [...required]
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '审批人',
- prop: 'examineName',
- rules: []
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: true
- },
- formItemAttributes: {
- label: '审批时间',
- prop: 'createTime',
- rules: []
- }
- },
- {
- md: 24,
- name: 'el-input',
- attributes: {
- disabled: [-1].includes(this.openType),
- type: 'textarea',
- rows: 3
- },
- formItemAttributes: {
- label: '审批内容',
- prop: 'examineRemark',
- rules: [...required]
- }
- }
- ]
- }
- },
- methods: {
- // 列表请求函数
- getList: letterProcessList,
- // 列表导出函数
- exportList: letterProcessListExport,
- // 表格列解析渲染数据更改
- columnParsing(item, defaultData) {
- return defaultData
- },
- // 监听勾选变化
- selectionChange(data) {
- this.recordSelected = data
- },
- // 打开创建弹窗
- openForm() {
- Promise.all([
- getWebsit({ status: true }),
- letterManagerList({ pageNum: 1, pageSize: -1, params: [] }),
- letterManagerListProject({ pageNum: 1, pageSize: -1, params: [] }),
- listPageV2({ pageNum: 1, pageSize: -1, params: [{ param: 'a.status', compare: '=', value: 'true' }] }),
- getClassifyList({ type: 2, status: true })
- ]).then(([res2, res3, res4, res5, res6]) => {
- this.openType = 0
- this.websitList = res2.data
- this.managerList = res3.data.records
- this.managerListProject = res4.data.records
- this.orderSmallTypeData = res5.data.records.map(item => ({
- value: item.id,
- label: item.orderSmallTypeText
- }))
- this.classifyList = res6.data.map(item => {
- var { children, ...data } = item
- return {
- ...data
- }
- })
- this.formDialog = true
- })
- },
- // 打开详情弹窗
- openDetailForm(row) {
- Promise.all([
- letterProcessDetailLetter({ id: row.leLetterId }),
- getWebsit({ status: true }),
- letterManagerList({ pageNum: 1, pageSize: -1, params: [] }),
- letterManagerListProject({ pageNum: 1, pageSize: -1, params: [] }),
- listPageV2({ pageNum: 1, pageSize: -1, params: [{ param: 'a.status', compare: '=', value: 'true' }] }),
- getClassifyList({ type: 2, status: true })
- ]).then(([res1, res2, res3, res4, res5, res6]) => {
- this.formData = {
- ...res1.data,
- fileUrl: res1.data.fileUrl ? res1.data.fileUrl.split(',') : []
- }
- // 中心审批时需要把申述数据转换到formData1
- if (this.openType == 2 && res1.data.leLetterItems?.[0]) {
- this.formData1 = {
- ...res1.data.leLetterItems?.[0],
- appealUrl: res1.data.leLetterItems?.[0]?.appealUrl ? res1.data.leLetterItems?.[0]?.appealUrl.split(',') : []
- }
- }
- // 查看详情数据转换
- if (this.openType == -1) {
- this.formData = {
- ...this.formData,
- leLetterItems: this.formData.leLetterItems
- ? this.formData.leLetterItems.map(item => {
- return {
- ...item,
- appealUrl: item?.appealUrl ? item?.appealUrl.split(',') : []
- }
- })
- : []
- }
- }
- this.websitList = res2.data
- this.managerList = res3.data.records
- this.managerListProject = res4.data.records
- this.orderSmallTypeData = res5.data.records.map(item => ({
- value: item.id,
- label: item.orderSmallTypeText
- }))
- this.classifyList = res6.data.map(item => {
- var { children, ...data } = item
- return {
- ...data
- }
- })
- this.formDialog = true
- })
- },
- handleClose() {
- this.$refs?.formRef?.resetFields()
- this.$data.formData = this.$options.data().formData
- this.$data.formData1 = this.$options.data().formData1
- this.$data.formData2 = this.$options.data().formData2
- this.formDialog = false
- this.openType = 0
- },
- // 操作按钮
- operation() {
- return this.operationBtn({
- details: {
- click: ({ row, index, column }) => {
- this.openType = -1
- this.openDetailForm(row)
- }
- },
- edit: {
- conditions: ({ row, index, column }) => {
- return row.status === 'WAIT'
- },
- click: ({ row, index, column }) => {
- this.openType = 0
- this.openDetailForm(row)
- }
- },
- networkAppeal: {
- conditions: ({ row, index, column }) => {
- return row.status === 'SEND'
- },
- click: ({ row, index, column }) => {
- this.openType = 1
- this.openDetailForm(row)
- }
- },
- centralRebatch: {
- conditions: ({ row, index, column }) => {
- return row.status === 'WAIT_EXAMINE'
- },
- click: ({ row, index, column }) => {
- this.openType = 2
- this.openDetailForm(row)
- }
- }
- // del: {
- // conditions: ({ row, index, column }) => {
- // return true
- // },
- // prompt: '确定删除?',
- // click: ({ row, index, column }) => {
- // letterProcessDelLetter({
- // id: row.id
- // })
- // .then(res => {
- // this.$refs.pageRef.refreshList()
- // this.$message({
- // type: 'success',
- // message: `删除成功!`
- // })
- // })
- // .catch(err => {
- // console.log(err)
- // })
- // }
- // }
- })
- },
- // 保存
- save() {
- this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
- if (valid) {
- ;(this.formData?.leLetterId ? letterProcessUpdateLetter : letterProcessAddLetter)({
- ...this.formData,
- fileUrl: this.formData.fileUrl.length ? this.formData.fileUrl.map(item => item.url).join(',') : ''
- }).then(res => {
- this.$message({
- type: 'success',
- message: '保存成功'
- })
- this.handleClose()
- this.$refs.pageRef.refreshList()
- })
- }
- })
- },
- networkAudit() {
- this.$refs.formRef1.validate((valid, invalidFields, errLabels) => {
- if (valid) {
- letterProcessAppeal({
- ...this.formData1,
- appealUrl: this.formData1.appealUrl.length ? this.formData1.appealUrl.map(item => item.url).join(',') : '',
- leLetterId: this.formData?.leLetterId
- }).then(res => {
- this.$message({
- type: 'success',
- message: '审核成功'
- })
- this.handleClose()
- this.$refs.pageRef.refreshList()
- })
- }
- })
- },
- centralAudit() {
- this.$refs.formRef2.validate((valid, invalidFields, errLabels) => {
- if (valid) {
- letterProcessExamine({
- ...this.formData2,
- leLetterItemId: this.formData.leLetterItems?.[0]?.leLetterItemId,
- leLetterId: this.formData?.leLetterId
- }).then(res => {
- this.$message({
- type: 'success',
- message: '审核成功'
- })
- this.handleClose()
- this.$refs.pageRef.refreshList()
- })
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped></style>
|