12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076 |
- <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 == 0" size="mini" type="primary" @click="save('SEND')">发送</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.leLetterId).join(',')
- })
- .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.leLetterId).join(',')
- })
- .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.leLetterId).join(',')
- })
- .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 || ''
- this.formData.websitId = res.data?.websitId || ''
- this.formData.websitName = res.data?.websitName || ''
- })
- .catch(err => {
- this.formData.mainId = ''
- this.formData.mainName = ''
- this.formData.orderSmallType = ''
- this.formData.orderSmallTypeText = ''
- this.formData.orderCreateTime = ''
- this.formData.websitId = ''
- this.formData.websitName = ''
- })
- }
- }
- }
- },
- {
- 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]
- },
- events: {
- change: val => {
- if (val == 'OK') {
- this.formData2.examinePrice = 0
- this.formData2.examineFration = 0
- } else if (val == 'FAIL') {
- this.formData2.examinePrice = this.formData.price
- this.formData2.examineFration = this.formData.fraction
- } else if (val == 'SUB') {
- this.formData2.examinePrice = ''
- this.formData2.examineFration = ''
- }
- }
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: [-1].includes(this.openType) || ['OK', 'FAIL'].includes(this.formData2.examineStatus)
- },
- formItemAttributes: {
- label: '审批金额',
- prop: 'examinePrice',
- rules: [...required]
- }
- },
- {
- md: 6,
- name: 'el-input',
- attributes: {
- disabled: [-1].includes(this.openType) || ['OK', 'FAIL'].includes(this.formData2.examineStatus)
- },
- 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: [{ param: 'a.status', compare: '=', value: 'ON' }]
- }),
- 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: [{ param: 'a.status', compare: '=', value: 'ON' }]
- }),
- 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(status) {
- this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
- if (valid) {
- ;(this.formData?.leLetterId ? letterProcessUpdateLetter : letterProcessAddLetter)({
- ...this.formData,
- status: status || this.formData.status,
- 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>
|