您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172
  1. <template>
  2. <div>
  3. <crud-template v-if="itemStart" class="as-weight" :ref="(el) => (crudRef = el)" :home-data="field"
  4. @btnSearch="btnSearch" @selectionChangeHandle="selectionChangeHandle" @refreshLeft="refreshLeft"
  5. :tableData="tableData" @CurrentChange="handleCurrentChange" @cancel="cancel" @handleInfo="handleInfo"
  6. @pageSizeChange="(val) => {
  7. field.paging.currentPage = 1
  8. field.paging.pageSize = val
  9. getList()
  10. }">
  11. <template #search>
  12. <el-input maxlength="60" v-trim clearable v-model="searchForm.id" style="width: 200px" placeholder="请输入工单号码" />
  13. <el-select clearable v-model="searchForm.questionType" style="width: 200px" placeholder="请选择工单类型">
  14. <el-option v-for="item in vehicleTypes" :key="item.value" :label="item.label" :value="item.value" />
  15. </el-select>
  16. <el-select clearable v-model="searchForm.orderSourcePage" style="width: 200px" placeholder="请选择订单来源">
  17. <el-option v-for="item in SOURCE_TYPE" :key="item.value" :label="item.label" :value="item.value" />
  18. </el-select>
  19. <el-input maxlength="60" v-trim clearable v-model="searchForm.vehiclePlate" placeholder="请输入车牌号"
  20. :style="{ width: '320px', margin: '0 10px 10px 0' }">
  21. <template #append>
  22. <el-select clearable v-model="searchForm.vehiclePlateColor" placeholder="请选择车牌颜色"
  23. style="width: 150px; height: 32px">
  24. <el-option :label="item.label" :key="item.label" :value="item.value" v-for="item in VEHICLE_COLOR_TYPE" />
  25. </el-select>
  26. </template>
  27. </el-input>
  28. <el-select clearable v-model="searchForm.orderStatus" style="width: 200px" placeholder="请选择工单状态">
  29. <el-option v-for="item in orderType" :key="item.value" :label="item.label" :value="item.value" />
  30. </el-select>
  31. <el-select clearable v-model="searchForm.orderType" style="width: 200px" placeholder="工单是否领取">
  32. <el-option v-for="item in isReceive" :key="item.value" :label="item.label" :value="item.value" />
  33. </el-select>
  34. <!-- <div class="date-label">创建时间:</div> -->
  35. <el-date-picker unlink-panels v-model="searchForm.time" type="datetimerange" range-separator="到"
  36. start-placeholder="订单申请开始日期" end-placeholder="订单申请结束日期" format="YYYY-MM-DD HH:mm:ss"
  37. value-format="YYYY-MM-DD HH:mm:ss" />
  38. </template>
  39. <template #CustomButton>
  40. <el-button type="primary" @click="getOrderFn(1)">
  41. <span style="font-family: `楷体`">批量领取订单</span>
  42. </el-button>
  43. </template>
  44. <template #tableOperation>
  45. <el-tabs @tab-click="handleClick" v-model="activeName">
  46. <el-tab-pane v-for="(item, index) in tageList" :key="index" :label="item.label"
  47. :name="item.name"></el-tab-pane>
  48. </el-tabs>
  49. </template>
  50. <template #operation="{ scope }">
  51. <el-button style="margin: 10px 5px;" type="warning" size="small"
  52. @click="audit(scope.$index, scope.row, false)">
  53. 详情
  54. </el-button>
  55. <el-button style="margin: 10px 5px;" v-if=" (scope.row.orderStatus == 0 && scope.row.receiveStatus == 1 )" type="success" size="small"
  56. @click="audit(scope.$index, scope.row, true)">
  57. 处理
  58. </el-button>
  59. <el-button :loading="scope.row.btnLoading"
  60. v-if="scope.row.receiveStatus ==null"
  61. type="primary" size="small" @click="getOrderFn(2, scope.row)">
  62. <span style="margin: 10px 5px;">领取订单</span>
  63. </el-button>
  64. </template>
  65. </crud-template>
  66. <!-- <el-dialog v-model="check" width="30%" title="审核">-->
  67. <!-- <el-form ref="form" :model="autdis"-->
  68. <!-- :rules="{ reason: [{ required: true, message: '驳回类型不能为空', trigger: 'change' }] }" label-width="80px">-->
  69. <!-- <el-form-item label="">-->
  70. <!-- <el-radio-group v-model="autdis.auditStatus">-->
  71. <!-- <el-radio label="true">审核通过</el-radio>-->
  72. <!-- <el-radio label="false">审核不通过</el-radio>-->
  73. <!-- </el-radio-group>-->
  74. <!-- </el-form-item>-->
  75. <!-- <el-form-item v-if="autdis.auditStatus != 'true'" label="审核原因" prop="reason">-->
  76. <!-- <el-select clearable @change="autdisReasonChange" v-model="autdis.reason" placeholder="请选择审核原因类型">-->
  77. <!-- <el-option :label="item.label" :key="item.value" :value="item.value"-->
  78. <!-- v-for="item in NEW_CSMSN_APPLY_REASON" />-->
  79. <!-- </el-select>-->
  80. <!-- </el-form-item>-->
  81. <!-- <el-form-item v-if="autdisReasonType == '8' && autdis.auditStatus != 'true'" label="其他原因" prop="reason1">-->
  82. <!-- <el-input v-trim clearable type="textarea" v-model="autdis.reason1" :placeholder="`审核不通过原因`" maxlength="200"-->
  83. <!-- show-word-limit></el-input>-->
  84. <!-- </el-form-item>-->
  85. <!-- </el-form>-->
  86. <!-- <template #footer>-->
  87. <!-- <el-button @click="check = false">取 消</el-button>-->
  88. <!-- <el-button type="primary" @click="checkForm(form)">确 定</el-button>-->
  89. <!-- </template>-->
  90. <!-- </el-dialog>-->
  91. </div>
  92. <!-- 处理弹窗 -->
  93. <el-dialog v-model="exchangeInformationDialog" width="80%" :title="exchangeInformationDialogTitle"
  94. @close="exchangeInformationClose">
  95. <el-form ref="exchangeInformationRef" :rules="rules" :model="exchangeInformationForm" label-width="120px">
  96. <el-form-item style="font-weight: 900;" label="处理意见" v-if="exchangeInformationDialogTitle == '处理'"></el-form-item>
  97. <el-form-item label="处理意见" prop="appeal" v-if="exchangeInformationDialogTitle == '处理'">
  98. <el-input v-trim clearable type="textarea" maxlength="100" show-word-limit
  99. v-model="exchangeInformationForm.appeal" placeholder="请输入处理意见"></el-input>
  100. </el-form-item>
  101. <el-form-item label="处理结果" prop="auduitStatus" v-if="exchangeInformationDialogTitle == '处理'">
  102. <el-radio-group v-model="exchangeInformationForm.auduitStatus">
  103. <el-radio :label="1">补充资料</el-radio>
  104. <el-radio :label="0">处理</el-radio>
  105. </el-radio-group>
  106. </el-form-item>
  107. <el-form-item label="添加附件" v-if="exchangeInformationDialogTitle == '处理'">
  108. <el-upload ref="uploadRef" v-model:file-list="fileList" list-type="picture-card" :action="BaseService.getFileUploadUrl()" :limit="5"
  109. :on-exceed="handleExceed" :on-success="handleSuccess" :before-upload="beforeUpload" multiple
  110. accept="image/*,.pdf,.doc,.docx,.xls,.xlsx">
  111. <el-icon>
  112. <Plus />
  113. </el-icon>
  114. <template #file="{ file }">
  115. <div>
  116. <img v-if="file.type && file.type.includes('image')" class="el-upload-list__item-thumbnail"
  117. :src="file.url || file.raw?.url" alt="" />
  118. <div v-else class="file-icon">
  119. <el-icon :size="30">
  120. <Document />
  121. </el-icon>
  122. <span class="file-name">{{ file.name }}</span>
  123. </div>
  124. <span class="el-upload-list__item-actions">
  125. <span class="el-upload-list__item-preview" @click="handlePreview(file)">
  126. <el-icon><zoom-in /></el-icon>
  127. </span>
  128. <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
  129. <el-icon>
  130. <Delete />
  131. </el-icon>
  132. </span>
  133. </span>
  134. </div>
  135. </template>
  136. <template #tip>
  137. <div class="el-upload__tip">
  138. (不限于图片、文件,不超过5个)
  139. </div>
  140. </template>
  141. </el-upload>
  142. <el-dialog v-model="dialogVisible">
  143. <img w-full :src="dialogImageUrl" alt="Preview Image" />
  144. </el-dialog>
  145. </el-form-item>
  146. <el-form-item style="font-weight: 900;" label="基本信息"></el-form-item>
  147. <!-- <el-form-item label="是否需要邮寄" prop="sendStatus">
  148. <el-radio-group v-model="exchangeInformationForm.sendStatus">
  149. <el-radio label="1">邮寄</el-radio>
  150. <el-radio label="0">不邮寄</el-radio>
  151. </el-radio-group>
  152. </el-form-item> -->
  153. <div style="display: flex;justify-content: start;">
  154. <div style="flex:0.6">
  155. <el-form-item label="姓名" prop="consignee"><span style="color:gray;">{{ visiinfoDatableList.customerName
  156. }}</span>
  157. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.consignee"
  158. placeholder="请输入收件人姓名"></el-input> -->
  159. </el-form-item>
  160. <el-form-item label="联系方式" prop="consigneeTel"><span style="color:gray;">{{ visiinfoDatableList.customerTel
  161. }}</span>
  162. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.consigneeTel"
  163. placeholder="请输入收件人电话"></el-input> -->
  164. </el-form-item>
  165. </div>
  166. <div>
  167. <el-form-item label="车牌号码" prop="region"><span style="color:gray;">{{ visiinfoDatableList.vehiclePlate
  168. }}</span>
  169. <!-- <el-cascader v-model="exchangeInformationForm.region" placeholder="请选择收货地址" :options="pcaText" /> -->
  170. </el-form-item>
  171. <el-form-item label="车牌颜色" prop="address"><span style="color:gray;">{{ color }}</span>
  172. </el-form-item>
  173. </div>
  174. <!-- <el-form-item label="邮政编码" prop="postalCode">
  175. <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.postalCode"
  176. placeholder="请输入邮政编码"></el-input>
  177. </el-form-item> -->
  178. </div>
  179. <el-form-item style="font-weight: 900;" label="工单信息"></el-form-item>
  180. <div style="display: flex;justify-content: start;flex-wrap:wrap ;">
  181. <div style="flex:0.4">
  182. <el-form-item label="工单号码" prop="consignee"><span style="color:gray;">{{ visiinfoDatableList.id }}</span>
  183. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.consignee"
  184. placeholder="请输入收件人姓名"></el-input> -->
  185. </el-form-item>
  186. <el-form-item label="工单类型" prop="consigneeTel"><span style="color:gray;">{{ getDictLabel(SELF_SERVICE_TYPE, visiinfoDatableList.questionType) }}</span>
  187. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.consigneeTel"
  188. placeholder="请输入收件人电话"></el-input> -->
  189. </el-form-item>
  190. </div>
  191. <div style="flex:0.4">
  192. <el-form-item label="是否ETC用户" prop="consignee"><span style="color:gray;"
  193. v-if="visiinfoDatableList.etcUser == 0">否</span>
  194. <span style="color:gray;" v-if="visiinfoDatableList.etcUser == 1">是</span>
  195. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.consignee"
  196. placeholder="请输入收件人姓名"></el-input> -->
  197. </el-form-item>
  198. <el-form-item label="订单来源" prop="orderSource"><span style="color:gray;">{{ getDictLabel(SOURCE_TYPE, visiinfoDatableList.sourceType) }}</span>
  199. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.consigneeTel"
  200. placeholder="请输入收件人电话"></el-input> -->
  201. </el-form-item>
  202. </div>
  203. <div style="flex:0.4">
  204. <el-form-item label="发生时间" prop="region"><span style="color:gray;">{{ visiinfoDatableList.insertTime }}</span>
  205. <!-- <el-cascader v-model="exchangeInformationForm.region" placeholder="请选择收货地址" :options="pcaText" /> -->
  206. </el-form-item>
  207. <el-form-item label="申请时间" prop="address"><span style="color:gray;">{{ visiinfoDatableList.insertTime
  208. }}</span>
  209. <!-- <el-input maxlength="60" v-trim clearable v-model="exchangeInformationForm.address"
  210. placeholder="请输入详细地址"></el-input> -->
  211. </el-form-item>
  212. </div>
  213. </div>
  214. <div class="customer-appeals-section">
  215. <div class="section-title">客户诉求:</div>
  216. <div v-for="(item,index) in visiinfoDatableList.userAppeals" :key="index" class="appeal-item">
  217. <div class="appeal-date">
  218. <el-icon><Clock /></el-icon>
  219. 申请日期:{{ item.insertTime }}
  220. </div>
  221. <div class="appeal-content">
  222. <el-icon><ChatDotRound /></el-icon>
  223. 诉求:{{ item.userAppeals }}
  224. </div>
  225. </div>
  226. </div>
  227. <div class="file-section">
  228. <div class="section-title">文件:</div>
  229. <div v-for="(item,index) in visiinfoDatableList.supportingMaterialsUrls" :key="index" class="file-item">
  230. <div class="file-info">
  231. <el-icon><Document /></el-icon>
  232. <span class="file-label">附件{{index+1}}:</span>
  233. <span class="file-name">{{ item.supportingMaterialsUrls }}</span>
  234. <el-button type="primary" size="small" @click="download(item.supportingMaterialsUrls)" class="download-btn">
  235. 下载
  236. </el-button>
  237. </div>
  238. </div>
  239. </div>
  240. </el-form>
  241. <template #footer>
  242. <el-button @click="exchangeInformationDialog = false" v-if="exchangeInformationDialogTitle == '处理'">取
  243. 消</el-button>
  244. <el-button type="primary" @click="exchangeInformationsubmitForm(exchangeInformationRef)"
  245. v-if="exchangeInformationDialogTitle == '处理'">确 定</el-button>
  246. </template>
  247. </el-dialog>
  248. <!-- 详情弹窗 -->
  249. <el-dialog class="detail-dialog" :title="detailDialogTitle" v-model="visible">
  250. <div v-if="detailDialogTitle == '订单详情'">
  251. <el-affix style="position: absolute; top: 0; right: 80px" v-if="6 == visiinfoDatable.orderStep && autdisButton"
  252. :offset="offset + 50">
  253. <el-button type="danger" size="small" @click="handleAudit">
  254. 审核
  255. </el-button>
  256. </el-affix>
  257. <orderInfo :infoData="visiinfoDatable"></orderInfo>
  258. </div>
  259. </el-dialog>
  260. </template>
  261. <!-- 订单审核 -->
  262. <script lang="ts" setup>
  263. // @ts-ignore crudFrom模板
  264. import CrudTemplate from '@/crud/index.vue'
  265. import { ref, computed, onMounted, reactive, nextTick, ComputedRef } from 'vue'
  266. import $storeinitData from '@/store/initData' //引入tab vuex
  267. import { ElMessage, ElMessageBox } from 'element-plus'
  268. import { Plus, ZoomIn, Delete, Document, Clock, ChatDotRound, Download } from '@element-plus/icons-vue'
  269. import BaseService from '@/utils/baseService'
  270. import { useRoute } from 'vue-router'
  271. import { IsPermission } from '@/router/routerUtil'
  272. import moment from 'moment'
  273. import { getCache } from '@/utils/cache'
  274. import { getAudit, getOrderInfo } from '@/api/onlineBusinessHall/orderManagement'
  275. import orderInfo from './orderInfo.vue'
  276. import { log } from 'console'
  277. import { getDictLabel } from '@/utils/utils'
  278. //或取路由传入过来的对象数据
  279. const route = useRoute()
  280. const exchangeInformationDialog = ref(false) // 换货弹框
  281. const exchangeInformationDialogTitle = ref('')
  282. const visiinfoDatableList = ref({})
  283. const crudRef = ref()
  284. const itemStart = ref(true)
  285. const exchangeInformationRef = ref()
  286. const searchForm = ref({
  287. artificialStatus: '',
  288. id: '',
  289. questionType: '',
  290. vehiclePlate: '',
  291. orderSourcePage: '',
  292. orderType: '',
  293. orderStatus: '',
  294. // time: '',
  295. vehiclePlateColor: '',
  296. })
  297. const exchangeInformationForm = ref<any>({
  298. appeal: '',
  299. attachFile: '',
  300. auduitStatus: '',
  301. })
  302. const rules = {
  303. appeal: [
  304. {
  305. required: true,
  306. message: '请输入处理意见',
  307. trigger: 'blur',
  308. },
  309. ],
  310. auduitStatus: [
  311. {
  312. required: true,
  313. message: '请选择处理结果',
  314. trigger: 'blur',
  315. },
  316. ],
  317. }
  318. const overdueList = [
  319. {
  320. label: '逾期',
  321. value: '1',
  322. },
  323. {
  324. label: '未逾期',
  325. value: '0',
  326. },
  327. ]
  328. const artificialStatusList = [
  329. {
  330. label: '系统审核',
  331. value: 2
  332. },
  333. {
  334. label: '人工审核',
  335. value: 1
  336. },
  337. ]
  338. const isReceive = [
  339. {
  340. label: '是',
  341. value: 0
  342. },
  343. {
  344. label: '否',
  345. value: 1
  346. },
  347. ]
  348. const orderType = [
  349. {
  350. label: '待业务员处理',
  351. value: 0
  352. },
  353. {
  354. label: '待用户反馈',
  355. value: 1
  356. },
  357. {
  358. label: '结束',
  359. value: 2
  360. },
  361. ]
  362. //订单阶段
  363. const ORDER_STAGE_TYPE = computed(() => {
  364. return $storeinitData.state.dictData['ORDER_STAGE_TYPE'] || []
  365. })
  366. //订单状态
  367. const ORDER_TYPE = computed(() => {
  368. return $storeinitData.state.dictData['ORDER_TYPE'] || []
  369. })
  370. //车牌颜色
  371. const VEHICLE_COLOR_TYPE = computed(() => {
  372. return $storeinitData.state.dictData['VEHICLE_COLOR_TYPE'] || []
  373. })
  374. // 车辆类型
  375. const vehicleTypes = computed(() => {
  376. return $storeinitData.state.dictData['VAN_TYPE'] || []
  377. })
  378. //产品类型
  379. const PRODUCT_TYPE = computed(() => {
  380. return $storeinitData.state.dictData['PRODUCT_TYPE_NEW'] || []
  381. })
  382. //办理模式
  383. const PATTERN_TYPE = computed(() => {
  384. return $storeinitData.state.dictData['PATTERN_TYPE'] || []
  385. })
  386. //订单状态
  387. const ORDER_STATUS = computed(() => {
  388. return $storeinitData.state.dictData['ORDER_STATUS'] || []
  389. })
  390. const SOURCE_TYPE = computed(() => {
  391. return $storeinitData.state.dictData['SOURCE_TYPE'] || []
  392. })
  393. // 自助服务类型
  394. const SELF_SERVICE_TYPE = computed(() => {
  395. return $storeinitData.state.dictData['SELF_SERVICE_TYPE'] || []
  396. })
  397. const CERTIFICATE_TYPE = computed(() => {
  398. return $storeinitData.state.dictData["CERTIFICATE_TYPE"] ?? [];
  399. }); //用户证件类型
  400. const NEW_CSMSN_APPLY_REASON = computed(() => {
  401. return $storeinitData.state.dictData['NEW_CSMSN_APPLY_REASON'] || []
  402. })
  403. const value1 = ref() // 筛选时间
  404. const tableData: any = ref([])
  405. const initItem = {
  406. id: '',
  407. }
  408. const addForm: any = ref(initItem)
  409. let formLabelWidth = '180px'
  410. //表单数据配置
  411. const field = ref({
  412. tabSize: 'small', //Table 的尺寸 large / default /small (默认default)
  413. searchShow: true, //是否显示搜索模块(默认false) - 临时设置为true用于调试
  414. border: true, //是否添加边框(默认false)
  415. dialogCustom: false, //自定义Dialog (默认false)
  416. dialogFooter: true, //隐藏弹窗页脚显示 (默认false)
  417. dialogWidth: '60%', //dialog宽度 (默认40%)
  418. crudShow: true, //是否显示CURD操作栏 (默认true)
  419. crudChildShow: true, //是否显示CURD子操作栏 (默认true)
  420. paginStart: true, //是否显示分页查询 (默认false)
  421. titleDialog: '', //table 标题
  422. tableOperation: true,
  423. isPageSizes: true,
  424. pageLayout: 'total, sizes, prev, pager, next',
  425. paging: {
  426. pageSize: 10,
  427. currentPage: 1,
  428. total: 0,
  429. },
  430. crud: {
  431. add: false,
  432. edit: false,
  433. delete: false,
  434. derive: false,
  435. search: false,
  436. refresh: false,
  437. },
  438. searchOperation: {
  439. isDownload: false,
  440. isAdd: false,
  441. isTransferMachine: false,
  442. },
  443. tableSize: -1,
  444. operateShow: true, //是否为表格添加操作栏(默认true)
  445. operateTitle: '操作', //操作栏标题(默认为"")
  446. operateFixed: true, //操作栏是否固定(默认false)
  447. operateWidth: '180', //操作栏宽度
  448. operate: {
  449. edit: false, //是否编辑(默认true)
  450. delete: false, //是否删除(默认true)
  451. announcement: false, // 公告
  452. info: false, // 详情
  453. remark: false, // 详情
  454. },
  455. extend: [
  456. {
  457. type: 'index',
  458. label: '序号',
  459. },
  460. ],
  461. field: [
  462. {
  463. label: '',
  464. prop: '',
  465. hide: !IsPermission(route, 'GET_ORDER_LIST'),
  466. type: 'selection',
  467. },
  468. {
  469. prop: 'id',
  470. label: '工单号码',
  471. },
  472. {
  473. prop: 'questionType',
  474. label: '工单类型',
  475. listData: PRODUCT_TYPE
  476. },
  477. {
  478. prop: 'sourceType',
  479. label: '订单来源',
  480. listData: SOURCE_TYPE
  481. },
  482. {
  483. prop: 'customerTel',
  484. label: '用户电话',
  485. },
  486. {
  487. prop: 'customerName',
  488. label: '用户姓名',
  489. },
  490. {
  491. prop: 'appeal',
  492. label: '用户诉求',
  493. },
  494. {
  495. prop: 'vehiclePlate',
  496. label: '车牌号',
  497. },
  498. {
  499. prop: 'vehiclePlateColor',
  500. label: '车牌颜色',
  501. listData: VEHICLE_COLOR_TYPE
  502. },
  503. {
  504. prop: 'orderStatus',
  505. label: '工单状态',
  506. listData: orderType
  507. },
  508. // {
  509. // prop: 'promotionModes',
  510. // label: '办理方式',
  511. // listData: PATTERN_TYPE
  512. // },
  513. // {
  514. // prop: 'isValueCard',
  515. // label: '卡类型',
  516. // funRuleStarts: true,
  517. // funRule: (money: any) => {
  518. // //1-储值卡 2-记账卡
  519. // return money == '1' ? '储值卡' : '记账卡'
  520. // },
  521. // },
  522. // {
  523. // prop: 'type',
  524. // label: '车辆类型',
  525. // listData: vehicleTypes
  526. // },
  527. // {
  528. // prop: 'userType',
  529. // label: '用户类型', //PERSONAL_USER - 个人用户 UNIT_USER - 单位用户
  530. // funRuleStarts: true,
  531. // funRule: (money: any) => {
  532. // return money === 'PERSONAL_USER' ? '个人用户' : '单位用户'
  533. // },
  534. // },
  535. // {
  536. // prop: 'customerTel',
  537. // label: '手机号',
  538. // },
  539. // {
  540. // prop: 'customerIdtype',
  541. // label: '证件类型',
  542. // listData: CERTIFICATE_TYPE,
  543. // },
  544. // {
  545. // prop: 'cusotmerIdnum',
  546. // label: '证件号',
  547. // },
  548. // {
  549. // prop: 'cardId',
  550. // label: '卡号',
  551. // },
  552. // {
  553. // prop: 'obuId',
  554. // label: '签号',
  555. // },
  556. // {
  557. // prop: 'amount',
  558. // label: '订单金额',
  559. // funRuleStarts: true,
  560. // funRule: (money: any) => {
  561. // return !money || money === 0 ? '---' : money / 100 + ' 元'
  562. // },
  563. // },
  564. // {
  565. // prop: 'isMigrateData',
  566. // label: '系统来源',
  567. // funRuleStarts: true,
  568. // funRule: (isMigrateData: any) => {
  569. // return isMigrateData == '0' ? '新系统订单' : '老系统订单'
  570. // },
  571. // },
  572. // {
  573. // prop: 'orderStatus', //1 - 已取消 0 - 正常
  574. // label: '订单状态',
  575. // listData: ORDER_STATUS
  576. // // funRuleStarts: true,
  577. // // funRule: (money: any) => {
  578. // // return money === '0' ? '正常' : '已取消'
  579. // // },
  580. // },
  581. // {
  582. // width: '180px',
  583. // prop: 'orderStep', //
  584. // label: '订单阶段',
  585. // funRuleStarts: true,
  586. // funRule: (money: any) => {
  587. // return getLabel(ORDER_STAGE_TYPE, money)
  588. // },
  589. // },
  590. // {
  591. // width: '180px',
  592. // prop: 'orderType', //
  593. // label: '订单类型',
  594. // funRuleStarts: true,
  595. // funRule: (money: any) => {
  596. // return getLabel(ORDER_TYPE, money)
  597. // },
  598. // },
  599. // // {
  600. // // width: '180px',
  601. // // prop: 'artificialStatus', //
  602. // // label: '审核类型',
  603. // // funRuleStarts: true,
  604. // // funRule: (value: any) => {
  605. // // return value == '1' ? '人工审核' : '系统审核'
  606. // // },
  607. // // },
  608. // {
  609. // width: '180px',
  610. // prop: 'auditPerson', //
  611. // label: '审核人',
  612. // },
  613. {
  614. width: '150px',
  615. prop: 'insertTime',
  616. label: '申请日期',
  617. funRuleStarts: true,
  618. funRule: (money: any) => {
  619. return money ? money.replace('T', ' ') : '---'
  620. },
  621. },
  622. ],
  623. })
  624. const data = { bucket: '' }
  625. const fileList = ref([])
  626. const fileListData = ref([])
  627. const uploadImg = ref()
  628. const dialogVisible = ref(false);
  629. const dialogImageUrl = ref('');
  630. const disabled = ref(false);
  631. const handleExceed = () => {
  632. ElMessage.warning('最多只能上传5个文件');
  633. };
  634. const handleSuccess = (response: any) => {
  635. console.log(fileList.value, 'fileListfileList')
  636. console.log(response.data, 'response.dataresponse.data')
  637. fileListData.value.push( response.data.ossFilePath)
  638. console.log(fileListData.value, 'fileListData.valuefileListData.value')
  639. };
  640. const beforeUpload = (file) => {
  641. const isImage = file.type.includes('image');
  642. const isLt5M = file.size / 1024 / 1024 < 5;
  643. if (!isImage && !isLt5M) {
  644. ElMessage.error('文件大小不能超过5MB');
  645. return false;
  646. }
  647. // 可以在这里添加更多的文件类型验证
  648. return true;
  649. };
  650. const handleRemove = (file) => {
  651. const index = fileList.value.indexOf(file);
  652. if (index !== -1) {
  653. fileList.value.splice(index, 1);
  654. fileListData.value.splice(index, 1);
  655. console.log(fileListData.value, 'fileListData.valuefileListData.value')
  656. }
  657. };
  658. const handlePreview = (file) => {
  659. const isImage = file.type && file.type.includes('image');
  660. if (isImage) {
  661. dialogImageUrl.value = file.url || file.raw?.url;
  662. dialogVisible.value = true;
  663. } else {
  664. window.open(file.url || file.raw?.url);
  665. }
  666. };
  667. function getLabel(item, selectedValue) {
  668. let data = item.value
  669. let selectedLabel = ''
  670. for (var i = 0; i < data.length; i++) {
  671. if (data[i].code == selectedValue) {
  672. selectedLabel = data[i].name
  673. break
  674. }
  675. }
  676. return selectedLabel
  677. }
  678. function handleInfo(value, row) {
  679. }
  680. // 提交
  681. function exchangeInformationsubmitForm() {
  682. exchangeInformationRef.value.validate((valid: boolean) => {
  683. // if (!valid) {
  684. // return false;
  685. // }
  686. console.log(exchangeInformationForm.value, 'exchangeInformationForm');
  687. if (exchangeInformationForm.value.auduitStatus == 1) {
  688. ElMessageBox.confirm('需要补充资料吗?', '补充提示', {
  689. confirmButtonText: '确认补充',
  690. cancelButtonText: '取消',
  691. type: 'warning',
  692. draggable: true,
  693. })
  694. .then(() => {
  695. let api = '/managew/selfService/salesmanUpload';
  696. let params = {
  697. ...exchangeInformationForm.value,
  698. serviceOrderId:serviceOrderId.value
  699. }
  700. params.attachFile = fileListData.value.join(',')
  701. BaseService.postN(api, params).then((res: any) => {
  702. if (res && res.statusCode === 0) {
  703. let bizContent = res.data
  704. console.log(bizContent, 'bizContentbizContentbizContent')
  705. ElMessage.success(res.message)
  706. exchangeInformationDialog.value = false
  707. getList()
  708. } else {
  709. ElMessage.error(res.message)
  710. }
  711. })
  712. })
  713. } else {
  714. let api = '/managew/selfService/salesmanUpload';
  715. let params = {
  716. ...exchangeInformationForm.value,
  717. serviceOrderId:serviceOrderId.value
  718. }
  719. BaseService.postN(api, params).then((res: any) => {
  720. if (res && res.statusCode === 0) {
  721. let bizContent = res.data
  722. console.log(bizContent, 'bizContentbizContentbizContent')
  723. ElMessage.success(res.message)
  724. getList()
  725. exchangeInformationDialog.value = false
  726. } else {
  727. ElMessage.error(res.message)
  728. }
  729. })
  730. }
  731. });
  732. }
  733. // 审核
  734. const check = ref()
  735. //用户标识
  736. let cacheAccessToken = getCache(
  737. 'cacheAccessToken',
  738. { isSessionStorage: false },
  739. {}
  740. )
  741. console.log(cacheAccessToken, 'cacheAccessToken')
  742. const download = (file) => {
  743. BaseService.getDownload(
  744. file
  745. )
  746. }
  747. // 搜索按钮
  748. function btnSearch() {
  749. field.value.paging.currentPage = 1
  750. getList()
  751. }
  752. const activeName = ref('0')
  753. let tageList = [
  754. {
  755. label: '全部',
  756. name: '0',
  757. },
  758. {
  759. label: '已领取',
  760. name: '1',
  761. },
  762. {
  763. label: '待领取',
  764. name: '2',
  765. },
  766. {
  767. label: '待处理',
  768. name: '3',
  769. },
  770. // {
  771. // label: '审核不通过',
  772. // name: '1',
  773. // },
  774. ]
  775. //标签分页
  776. const pass = ref('3')
  777. function handleClick(tab, event) {
  778. activeName.value = tab.props.name
  779. // if (pass.value == '3') {
  780. // field.value.field[0].hide = false
  781. // } else {
  782. // field.value.field[0].hide = true
  783. // }
  784. getList()
  785. }
  786. // 搜索重置
  787. function refreshLeft() {
  788. field.value.paging.currentPage = 1
  789. searchForm.value = {
  790. artificialStatus: '',
  791. id: '',
  792. questionType: '',
  793. vehiclePlate: '',
  794. orderSourcePage: '',
  795. orderType: '',
  796. orderStatus: '',
  797. // time: '',
  798. vehiclePlateColor: '',
  799. }
  800. value1.value = null
  801. getList()
  802. }
  803. onMounted(() => {
  804. // 调试权限信息
  805. console.log('当前路由信息:', route)
  806. console.log('权限检查结果:', IsPermission(route, 'QUERY_BASE'))
  807. console.log('sessionStorage中的权限:', sessionStorage.getItem(route.path))
  808. console.log('路由query参数:', route.query)
  809. getList()
  810. })
  811. function getParams() {
  812. let params: any = {
  813. methods: 'page',
  814. pageNo: field.value.paging.currentPage,
  815. pageSize: field.value.paging.pageSize,
  816. receiveStatus: activeName.value
  817. }
  818. // if (pass.value == '4') {
  819. // params.operatorId = cacheAccessToken.openId
  820. // }
  821. //赋值查询参数
  822. let searchFormList = { ...searchForm.value }
  823. for (let key in searchFormList) {
  824. if (searchFormList[key]) {
  825. params[key] = searchFormList[key]
  826. }
  827. }
  828. if (params.time) {
  829. params.startTime = dateChange(params.time[0])
  830. params.endTime = dateChange(params.time[1])
  831. }
  832. return params
  833. }
  834. function dateChange(time) {
  835. if (time) {
  836. time = moment(time).format('YYYY-MM-DD HH:mm:ss')
  837. }
  838. return time
  839. }
  840. function getList() {
  841. crudRef.value.tableLoding = true
  842. BaseService.postN('/managew/selfService/page', getParams()).then((res: any) => {
  843. if (res && res.code === 0) {
  844. //数据转换
  845. let bizContent = res.data
  846. let data = bizContent.result || []
  847. console.log(data, 'tableData')
  848. //数据渲染
  849. tableData.value = data
  850. crudRef.value.tableLoding = false
  851. //分页总数
  852. field.value.paging.total = bizContent.totalCount
  853. } else {
  854. crudRef.value.tableLoding = false
  855. ElMessage.error(res.message)
  856. }
  857. })
  858. }
  859. function handleCurrentChange(val: number) {
  860. field.value.paging.currentPage = val
  861. getList()
  862. }
  863. // 领取订单***********************************
  864. const selectList = ref([])
  865. // 表格选中
  866. function selectionChangeHandle(val: any) {
  867. selectList.value = val.map(item => item.id)
  868. }
  869. function getOrderAll() {
  870. }
  871. function getOrderFn(type, row?) {
  872. // exchangeInformationDialog.value = true
  873. if (type == 1 && selectList.value.length == 0) {
  874. ElMessage.warning('请至少选择一条订单领取')
  875. return
  876. }
  877. let idList: any = []
  878. if (type == 1) {
  879. idList = selectList.value
  880. } else {
  881. idList = [row.id]
  882. }
  883. ElMessageBox.confirm('确认领取订单吗?', '领取提示', {
  884. confirmButtonText: '确认领取',
  885. cancelButtonText: '取消',
  886. type: 'warning',
  887. draggable: true,
  888. })
  889. .then(() => {
  890. let params = {
  891. idList: idList,
  892. // operatorId: cacheAccessToken.openId
  893. }
  894. console.log(params, 'paramsparams')
  895. BaseService.postN('/managew/selfService/orderReceive', params).then(
  896. (res: any) => {
  897. if (res && res.code === 0) {
  898. ElMessage.success('领取成功')
  899. refreshLeft()
  900. getList()
  901. } else {
  902. ElMessage.error(res.message)
  903. }
  904. }
  905. )
  906. })
  907. .catch(() => {
  908. ElMessage({
  909. type: 'info',
  910. message: '取消领取',
  911. })
  912. })
  913. }
  914. // 审核*****************************************
  915. const autdisReasonType = ref()
  916. function autdisReasonChange(value) {
  917. autdisReasonType.value = value
  918. }
  919. const autdis = reactive<any>({ auditStatus: 'true', reason: '', reason1: '' }) //审核对象
  920. let timer2: any = null
  921. const form = ref()
  922. //审核提交
  923. function checkForm(formEl) {
  924. if (timer2) return
  925. timer2 = setTimeout(() => {
  926. formEl.validate((valid: any, fields: any) => {
  927. if (valid) {
  928. if (autdisReasonType.value == '8' && autdis.reason1) {
  929. autdis.reason = autdis.reason1
  930. }
  931. if (autdis.auditStatus == 'true') {
  932. autdisReasonType.value = ''
  933. autdis.reason = ''
  934. autdis.reason1 = ''
  935. }
  936. BaseService.postN('/managew/order/orderManualVerify', autdis).then((res: any) => {
  937. if (res && res.code === 0) {
  938. ElMessage.success(res.message)
  939. check.value = false
  940. visible.value = false
  941. getList()
  942. } else {
  943. ElMessage.error(res.message)
  944. }
  945. })
  946. } else {
  947. return false
  948. }
  949. })
  950. timer2 = null
  951. }, 1000)
  952. }
  953. function handleAudit() {
  954. //审核
  955. autdisReasonType.value = ''
  956. autdis.auditStatus = 'true'
  957. autdis.reason = ''
  958. autdis.reason1 = ''
  959. check.value = true
  960. }
  961. //审核弹窗
  962. let beanData: any = {}
  963. const detailDialogTitle = ref('订单详情')
  964. const autdisButton = ref(false)
  965. const offset = ref(150)
  966. const serviceOrderId = ref('')
  967. let visible = ref(false)
  968. let visiinfoDatable: any = reactive({})
  969. let color = ref('')
  970. function audit(idx: number, data: any, type) {
  971. exchangeInformationDialog.value = true
  972. if (type === false) {
  973. exchangeInformationDialogTitle.value = '订单详情'
  974. } else {
  975. exchangeInformationDialogTitle.value = '处理'
  976. serviceOrderId.value = data.id
  977. }
  978. // autdisButton.value = type
  979. BaseService.postN('/managew/selfService/view', { id: data.id }).then((res: any) => {
  980. console.log(111111111111111111);
  981. if (res && res.code === 0) {
  982. console.log(res.data, 'res.data');
  983. console.log(111111111111111111);
  984. visiinfoDatableList.value = res.data
  985. const findUserByKey = (arr, key, value) => {
  986. for (const item of arr) {
  987. if (item[key] == value) {
  988. return item;
  989. }
  990. }
  991. return null; // 没找到返回 null
  992. };
  993. const result = findUserByKey(VEHICLE_COLOR_TYPE.value, 'value', res.data.vehiclePlateColor);
  994. color.value = result.name
  995. } else {
  996. ElMessage.error(res.message)
  997. }
  998. })
  999. }
  1000. //取消
  1001. function cancel() {
  1002. addForm.value = {
  1003. ...initItem,
  1004. }
  1005. }
  1006. </script>
  1007. <style scoped lang="scss">
  1008. .file-icon {
  1009. display: flex;
  1010. flex-direction: column;
  1011. align-items: center;
  1012. justify-content: center;
  1013. height: 100%;
  1014. }
  1015. .file-name {
  1016. margin-top: 8px;
  1017. font-size: 12px;
  1018. word-break: break-all;
  1019. text-align: center;
  1020. }
  1021. // 客户诉求样式
  1022. .customer-appeals-section {
  1023. padding-left: 55px;
  1024. padding-bottom: 20px;
  1025. margin-top: 15px;
  1026. .section-title {
  1027. font-size: 16px;
  1028. font-weight: 600;
  1029. color: #303133;
  1030. margin-bottom: 15px;
  1031. padding-bottom: 8px;
  1032. border-bottom: 2px solid #409eff;
  1033. display: inline-block;
  1034. }
  1035. .appeal-item {
  1036. background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  1037. border: 1px solid #dee2e6;
  1038. border-radius: 8px;
  1039. margin-bottom: 12px;
  1040. padding: 15px;
  1041. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  1042. transition: all 0.3s ease;
  1043. &:hover {
  1044. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  1045. transform: translateY(-1px);
  1046. }
  1047. .appeal-date {
  1048. color: #6c757d;
  1049. font-size: 14px;
  1050. margin-bottom: 8px;
  1051. display: flex;
  1052. align-items: center;
  1053. .el-icon {
  1054. margin-right: 6px;
  1055. color: #409eff;
  1056. }
  1057. }
  1058. .appeal-content {
  1059. color: #495057;
  1060. font-size: 15px;
  1061. line-height: 1.6;
  1062. display: flex;
  1063. align-items: flex-start;
  1064. .el-icon {
  1065. margin-right: 8px;
  1066. color: #67c23a;
  1067. margin-top: 2px;
  1068. flex-shrink: 0;
  1069. }
  1070. }
  1071. }
  1072. }
  1073. // 文件样式
  1074. .file-section {
  1075. padding-left: 55px;
  1076. margin-top: 15px;
  1077. .section-title {
  1078. font-size: 16px;
  1079. font-weight: 600;
  1080. color: #303133;
  1081. margin-bottom: 15px;
  1082. padding-bottom: 8px;
  1083. border-bottom: 2px solid #67c23a;
  1084. display: inline-block;
  1085. }
  1086. .file-item {
  1087. background: #fff;
  1088. border: 1px solid #e4e7ed;
  1089. border-radius: 6px;
  1090. margin-bottom: 10px;
  1091. padding: 12px 15px;
  1092. transition: all 0.3s ease;
  1093. &:hover {
  1094. border-color: #409eff;
  1095. box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
  1096. }
  1097. .file-info {
  1098. display: flex;
  1099. align-items: center;
  1100. gap: 10px;
  1101. .el-icon {
  1102. color: #409eff;
  1103. font-size: 16px;
  1104. }
  1105. .file-label {
  1106. color: #606266;
  1107. font-weight: 500;
  1108. min-width: 60px;
  1109. }
  1110. .file-name {
  1111. flex: 1;
  1112. color: #303133;
  1113. font-size: 14px;
  1114. word-break: break-all;
  1115. margin: 0;
  1116. }
  1117. .download-btn {
  1118. margin-left: auto;
  1119. padding: 5px 12px;
  1120. font-size: 12px;
  1121. .el-icon {
  1122. margin-right: 4px;
  1123. }
  1124. }
  1125. }
  1126. }
  1127. }
  1128. </style>