You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  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.orderNo" style="width: 200px"
  13. placeholder="请输入单号" />
  14. <el-input maxlength="60" v-trim clearable v-model="searchForm.customerIdNum" style="width: 200px"
  15. placeholder="请输入证件号" />
  16. <el-input maxlength="60" v-trim clearable v-model="searchForm.customerTel" style="width: 200px"
  17. placeholder="请输入用户手机号" />
  18. <el-input maxlength="60" v-trim clearable v-model="searchForm.productName" style="width: 200px"
  19. placeholder="请输入产品名称" />
  20. <el-input maxlength="60" v-trim clearable v-model="searchForm.vehiclePlate" placeholder="请输入车牌号"
  21. :style="{ width: '320px', margin: '0 10px 10px 0' }">
  22. <template #append>
  23. <el-select clearable v-model="searchForm.vehiclePlateColor" placeholder="请选择车牌颜色"
  24. style="width: 150px; height: 32px">
  25. <el-option :label="item.label" :key="item.label" :value="item.value" v-for="item in VEHICLE_COLOR_TYPE" />
  26. </el-select>
  27. </template>
  28. </el-input>
  29. <!-- <el-select clearable v-model="searchForm.artificialStatus" style="width: 200px" placeholder="请选择审核类型">
  30. <el-option v-for="item in artificialStatusList" :key="item.value" :label="item.label" :value="item.value" />
  31. </el-select> -->
  32. <el-select clearable v-model="searchForm.vanType" style="width: 200px" placeholder="请选择车辆类型">
  33. <el-option v-for="item in vehicleTypes" :key="item.value" :label="item.label" :value="item.value" />
  34. </el-select>
  35. <el-select clearable v-model="searchForm.promotionModes" style="width: 200px" placeholder="请选择办理方式">
  36. <el-option v-for="item in PATTERN_TYPE" :key="item.value" :label="item.label" :value="item.value" />
  37. </el-select>
  38. <!-- <el-select clearable v-model="searchForm.orderType" style="width: 200px" placeholder="请选择订单类型">
  39. <el-option v-for="item in ORDER_TYPE" :key="item.value" :label="item.label" :value="item.value" />
  40. </el-select> -->
  41. <!-- <div class="date-label">创建时间:</div> -->
  42. <el-date-picker unlink-panels v-model="searchForm.time" type="datetimerange" range-separator="到"
  43. start-placeholder="订单创建开始日期" end-placeholder="订单创建结束日期" format="YYYY-MM-DD HH:mm:ss"
  44. value-format="YYYY-MM-DD HH:mm:ss" />
  45. </template>
  46. <!-- <template #CustomButton>
  47. <el-button v-if="IsPermission(route, 'GET_ORDER_LIST')" type="primary" @click="getOrderFn(1)">
  48. <span style="font-family: '微软雅黑', 'KaiTi', serif;">批量领取订单</span>
  49. </el-button>
  50. </template> -->
  51. <template #tableOperation>
  52. <el-tabs @tab-click="handleClick" v-model="activeName">
  53. <el-tab-pane v-for="(item, index) in tageList" :key="index" :label="item.label"
  54. :name="item.name"></el-tab-pane>
  55. </el-tabs>
  56. </template>
  57. <template #operation="{ scope }">
  58. <el-button style="margin: 10px 5px;" v-if="IsPermission(route, 'INFO_LIST')" type="warning" size="small"
  59. @click="audit(scope.$index, scope.row, false)">
  60. 详情
  61. </el-button>
  62. <el-button style="margin: 10px 5px;"
  63. v-if="pass=='2'&&IsPermission(route, 'AUDIT_LIST')"
  64. type="success" size="small" @click="audit(scope.$index, scope.row, true)">
  65. 审核
  66. </el-button>
  67. <el-button :loading="scope.row.btnLoading"
  68. v-if="pass=='1' && IsPermission(route, 'GET_ORDER_LIST')"
  69. type="primary" size="small" @click="getOrderFn(2, scope.row)">
  70. <span style="font-family: '微软雅黑', 'KaiTi', serif;">领取订单</span>
  71. </el-button>
  72. </template>
  73. </crud-template>
  74. <el-dialog v-model="check" width="30%" title="审核">
  75. <el-form ref="form" :model="autdis"
  76. :rules="{ reason: [{ required: true, message: '驳回类型不能为空', trigger: 'change' }] }" label-width="80px">
  77. <el-form-item label="">
  78. <el-radio-group v-model="autdis.auditStatus">
  79. <el-radio label="true">审核通过</el-radio>
  80. <el-radio label="false">审核不通过</el-radio>
  81. </el-radio-group>
  82. </el-form-item>
  83. <el-form-item v-if="autdis.auditStatus != 'true'" label="审核原因" prop="reason">
  84. <!-- <el-select clearable @change="autdisReasonChange" v-model="autdis.reason" placeholder="请选择审核原因类型">
  85. <el-option :label="item.label" :key="item.value" :value="item.value"
  86. v-for="item in NEW_CSMSN_APPLY_REASON" />
  87. </el-select> -->
  88. <el-input v-trim clearable type="textarea" v-model="autdis.reason" :placeholder="`审核不通过原因`"
  89. maxlength="200" show-word-limit></el-input>
  90. </el-form-item>
  91. <el-form-item v-if="autdisReasonType == '8' && autdis.auditStatus != 'true'" label="其他原因" prop="reason1">
  92. <el-input v-trim clearable type="textarea" v-model="autdis.reason1" :placeholder="`审核不通过原因`"
  93. maxlength="200" show-word-limit></el-input>
  94. </el-form-item>
  95. </el-form>
  96. <template #footer>
  97. <el-button @click="check = false">取 消</el-button>
  98. <el-button type="primary" @click="checkForm(form)">确 定</el-button>
  99. </template>
  100. </el-dialog>
  101. </div>
  102. <!-- 详情弹窗 -->
  103. <el-dialog class="detail-dialog" :title="detailDialogTitle" v-model="visible">
  104. <div v-if="detailDialogTitle == '订单详情'">
  105. <el-affix style="position: absolute; top: 0; right: 80px" v-if="pass=='2'&& autdisButton"
  106. :offset="offset + 50">
  107. <el-button type="danger" size="small" @click="handleAudit">
  108. 审核
  109. </el-button>
  110. </el-affix>
  111. <orderInfo :infoData="rowData"></orderInfo>
  112. </div>
  113. </el-dialog>
  114. </template>
  115. <!-- 订单审核 -->
  116. <script lang="ts" setup>
  117. // @ts-ignore crudFrom模板
  118. import CrudTemplate from '@/crud/index.vue'
  119. import { ref, computed, onMounted, reactive, nextTick, ComputedRef } from 'vue'
  120. import $storeinitData from '@/store/initData' //引入tab vuex
  121. import { ElMessage, ElMessageBox } from 'element-plus'
  122. import BaseService from '@/utils/baseService'
  123. import { useRoute } from 'vue-router'
  124. import { IsPermission } from '@/router/routerUtil'
  125. import moment from 'moment'
  126. import { getCache } from '@/utils/cache'
  127. import { getAudit, getOrderInfo } from '@/api/onlineBusinessHall/orderManagement'
  128. // import orderInfo from './orderInfo.vue'
  129. import orderInfo from "@/components/orderInfo/index.vue";
  130. //或取路由传入过来的对象数据
  131. const route = useRoute()
  132. const crudRef = ref()
  133. const itemStart = ref(true)
  134. const searchForm = ref({
  135. artificialStatus: '',
  136. orderNo: '',
  137. productName: '',
  138. vehiclePlate: '',
  139. vanType: '',
  140. orderType: '',
  141. orderStep: '',
  142. time: '',
  143. vehiclePlateColor: '',
  144. promotionModes: '',
  145. customerIdNum: '',
  146. customerTel: ''
  147. })
  148. const overdueList = [
  149. {
  150. label: '逾期',
  151. value: '1',
  152. },
  153. {
  154. label: '未逾期',
  155. value: '0',
  156. },
  157. ]
  158. const artificialStatusList = [
  159. {
  160. label: '系统审核',
  161. value: 2
  162. },
  163. {
  164. label: '人工审核',
  165. value: 1
  166. },
  167. ]
  168. //订单阶段
  169. const ORDER_STAGE_TYPE = computed(() => {
  170. return $storeinitData.state.dictData['ISSUE_ORDER_STEP'] || []
  171. })
  172. //订单状态
  173. const ORDER_TYPE = computed(() => {
  174. return $storeinitData.state.dictData['ORDER_TYPE'] || []
  175. })
  176. //车牌颜色
  177. const VEHICLE_COLOR_TYPE = computed(() => {
  178. return $storeinitData.state.dictData['VEHICLE_COLOR_TYPE'] || []
  179. })
  180. // 车辆类型
  181. const vehicleTypes = computed(() => {
  182. return $storeinitData.state.dictData['VAN_TYPE'] || []
  183. })
  184. //办理模式
  185. const PATTERN_TYPE = computed(() => {
  186. return $storeinitData.state.dictData['PATTERN_TYPE'] || []
  187. })
  188. //订单状态
  189. const ORDER_STATUS = computed(() => {
  190. return $storeinitData.state.dictData['ISSUE_ORDER_STATUS'] || []
  191. })
  192. const ID_TYPE = computed(() => {
  193. return $storeinitData.state.dictData["ID_TYPE"] ?? [];
  194. }); //用户证件类型
  195. const NEW_CSMSN_APPLY_REASON = computed(() => {
  196. return $storeinitData.state.dictData['NEW_CSMSN_APPLY_REASON'] || []
  197. })
  198. const value1 = ref() // 筛选时间
  199. const tableData: any = ref([])
  200. const initItem = {
  201. id: '',
  202. }
  203. const addForm: any = ref(initItem)
  204. let formLabelWidth = '180px'
  205. //表单数据配置
  206. const field = ref({
  207. tabSize: 'small', //Table 的尺寸 large / default /small (默认default)
  208. searchShow: IsPermission(route, 'QUERY_BASE'), //是否显示搜索模块(默认false)
  209. border: true, //是否添加边框(默认false)
  210. dialogCustom: false, //自定义Dialog (默认false)
  211. dialogFooter: true, //隐藏弹窗页脚显示 (默认false)
  212. dialogWidth: '60%', //dialog宽度 (默认40%)
  213. crudShow: true, //是否显示CURD操作栏 (默认true)
  214. crudChildShow: true, //是否显示CURD子操作栏 (默认true)
  215. paginStart: true, //是否显示分页查询 (默认false)
  216. titleDialog: '', //table 标题
  217. tableOperation: true,
  218. isPageSizes: true,
  219. pageLayout: 'total, sizes, prev, pager, next',
  220. paging: {
  221. pageSize: 10,
  222. currentPage: 1,
  223. total: 0,
  224. },
  225. crud: {
  226. add: false,
  227. edit: false,
  228. delete: false,
  229. derive: false,
  230. search: false,
  231. refresh: false,
  232. },
  233. searchOperation: {
  234. isDownload: false,
  235. isAdd: false,
  236. isTransferMachine: false,
  237. },
  238. tableSize: -1,
  239. operateShow: true, //是否为表格添加操作栏(默认true)
  240. operateTitle: '操作', //操作栏标题(默认为"")
  241. operateFixed: true, //操作栏是否固定(默认false)
  242. operateWidth: '180', //操作栏宽度
  243. operate: {
  244. edit: false, //是否编辑(默认true)
  245. delete: false, //是否删除(默认true)
  246. announcement: false, // 公告
  247. info: false, // 详情
  248. remark: false, // 详情
  249. },
  250. extend: [
  251. {
  252. type: 'index',
  253. label: '序号',
  254. },
  255. ],
  256. field: [
  257. // {
  258. // label: '',
  259. // prop: '',
  260. // hide: !IsPermission(route, 'GET_ORDER_LIST'),
  261. // type: 'selection',
  262. // },
  263. {
  264. prop: 'orderNo',
  265. label: '单号',
  266. },
  267. {
  268. prop: 'productName',
  269. label: '产品名称',
  270. },
  271. {
  272. prop: 'productTypes',
  273. label: '产品类型',
  274. funRuleStarts: true,
  275. funRule: (value: any) => {
  276. return value == "1" ? "自营产品" : value == "0" ? "非自营产品" : "---";
  277. },
  278. },
  279. {
  280. prop: 'promotionModes',
  281. label: '办理方式',
  282. listData: PATTERN_TYPE
  283. },
  284. {
  285. prop: 'isValueCard',
  286. label: '卡类型',
  287. funRuleStarts: true,
  288. funRule: (money: any) => {
  289. //1-储值卡 2-记账卡
  290. return money == '1' ? '储值卡' : '记账卡'
  291. },
  292. },
  293. {
  294. prop: 'vehicleType',
  295. label: '车辆类型',
  296. // listData: vehicleTypes
  297. },
  298. {
  299. prop: 'userType',
  300. label: '用户类型', //PERSONAL_USER - 个人用户 UNIT_USER - 单位用户
  301. funRuleStarts: true,
  302. funRule: (money: any) => {
  303. return money === 'PERSONAL_USER' ? '个人用户' : '单位用户'
  304. },
  305. },
  306. {
  307. prop: 'customerTel',
  308. label: '手机号',
  309. },
  310. {
  311. prop: 'customerIdType',
  312. label: '证件类型',
  313. listData: ID_TYPE,
  314. },
  315. {
  316. prop: 'customerIdNum',
  317. label: '证件号',
  318. },
  319. {
  320. prop: 'vehiclePlate',
  321. label: '车牌号',
  322. },
  323. {
  324. prop: 'vehiclePlateColor',
  325. label: '车牌颜色',
  326. listData: VEHICLE_COLOR_TYPE
  327. },
  328. {
  329. prop: 'cardId',
  330. label: '卡号',
  331. },
  332. {
  333. prop: 'obuId',
  334. label: '签号',
  335. },
  336. {
  337. prop: 'amount',
  338. label: '订单金额',
  339. funRuleStarts: true,
  340. funRule: (money: any) => {
  341. return !money || money === 0 ? '---' : money / 100 + ' 元'
  342. },
  343. },
  344. {
  345. prop: 'isMigrateData',
  346. label: '系统来源',
  347. funRuleStarts: true,
  348. funRule: (isMigrateData: any) => {
  349. return isMigrateData == '0' ? '新系统订单' : '老系统订单'
  350. },
  351. },
  352. {
  353. prop: 'orderStatus', //1 - 已取消 0 - 正常
  354. label: '订单状态',
  355. listData: ORDER_STATUS
  356. // funRuleStarts: true,
  357. // funRule: (money: any) => {
  358. // return money === '0' ? '正常' : '已取消'
  359. // },
  360. },
  361. {
  362. width: "180px",
  363. prop: "orderStep", //
  364. label: "订单阶段",
  365. funRuleStarts: true,
  366. funRule: (money: any) => {
  367. return getLabel(ORDER_STAGE_TYPE, money);
  368. },
  369. },
  370. // {
  371. // width: '180px',
  372. // prop: 'orderType', //
  373. // label: '订单类型',
  374. // listData: ORDER_TYPE
  375. // },
  376. {
  377. width: '180px',
  378. prop: 'artificialStatus', //
  379. label: '审核类型',
  380. funRuleStarts: true,
  381. funRule: (value: any) => {
  382. return value == '1' ? '人工审核' : '系统审核'
  383. },
  384. },
  385. {
  386. width: '180px',
  387. prop: 'auditPerson', //
  388. label: '审核人',
  389. },
  390. {
  391. width: '150px',
  392. prop: 'insertTime',
  393. label: '创建时间',
  394. funRuleStarts: true,
  395. funRule: (money: any) => {
  396. return money ? money.replace('T', ' ') : '---'
  397. },
  398. },
  399. ],
  400. })
  401. function getLabel(item, selectedValue) {
  402. let data = item.value
  403. let selectedLabel = ''
  404. for (var i = 0; i < data.length; i++) {
  405. if (data[i].code == selectedValue) {
  406. selectedLabel = data[i].name
  407. break
  408. }
  409. }
  410. return selectedLabel
  411. }
  412. function handleInfo(value, row) {
  413. }
  414. // 审核
  415. const check = ref()
  416. //用户标识
  417. let cacheAccessToken = getCache(
  418. 'cacheAccessToken',
  419. { isSessionStorage: false },
  420. {}
  421. )
  422. // console.log(cacheAccessToken, 'cacheAccessToken')
  423. // 搜索按钮
  424. function btnSearch() {
  425. field.value.paging.currentPage = 1
  426. getList()
  427. }
  428. const activeName = ref('1')
  429. let tageList = [
  430. // {
  431. // label: '全部',
  432. // name: null,
  433. // value: ''
  434. // },
  435. {
  436. label: '待领取',
  437. name: '1',
  438. },
  439. {
  440. label: '待审核',
  441. name: '2',
  442. },
  443. // {
  444. // label: '审核通过',
  445. // name: '2',
  446. // },
  447. {
  448. label: '审核不通过',
  449. name: '3',
  450. },
  451. ]
  452. //标签分页
  453. const pass = ref('1')
  454. function handleClick(tab, event) {
  455. pass.value = tab.props.name
  456. if (pass.value == '3') {
  457. field.value.field[0].hide = false
  458. } else {
  459. field.value.field[0].hide = true
  460. }
  461. getList()
  462. }
  463. // 搜索重置
  464. function refreshLeft() {
  465. field.value.paging.currentPage = 1
  466. searchForm.value = {
  467. artificialStatus: '',
  468. orderNo: '',
  469. productName: '',
  470. vehiclePlate: '',
  471. vanType: '',
  472. orderType: '',
  473. orderStep: '',
  474. time: '',
  475. vehiclePlateColor: '',
  476. promotionModes: '',
  477. customerIdNum: '',
  478. customerTel: ''
  479. }
  480. value1.value = null
  481. getList()
  482. }
  483. onMounted(() => {
  484. getList()
  485. })
  486. function getParams() {
  487. let params: any = {
  488. methods: 'page',
  489. pageNo: field.value.paging.currentPage,
  490. pageSize: field.value.paging.pageSize,
  491. tabIndex: 0,
  492. pass: pass.value,
  493. source: 'WEB',
  494. }
  495. if (pass.value == '4') {
  496. params.operatorId = cacheAccessToken.openId
  497. }
  498. //赋值查询参数
  499. let searchFormList = { ...searchForm.value }
  500. for (let key in searchFormList) {
  501. if (searchFormList[key]) {
  502. params[key] = searchFormList[key]
  503. }
  504. }
  505. if (params.time) {
  506. params.startTime = dateChange(params.time[0])
  507. params.endTime = dateChange(params.time[1])
  508. }
  509. return params
  510. }
  511. function dateChange(time) {
  512. if (time) {
  513. time = moment(time).format('YYYY-MM-DD HH:mm:ss')
  514. }
  515. return time
  516. }
  517. function getList() {
  518. crudRef.value.tableLoding = true
  519. BaseService.postN('/managew/api/issue/orderExamine/page', getParams()).then((res: any) => {
  520. if (res && res.code === 0) {
  521. //数据转换
  522. let bizContent = res.data
  523. let data = bizContent.result || []
  524. // console.log(data, 'tableData')
  525. //数据渲染
  526. tableData.value = data
  527. crudRef.value.tableLoding = false
  528. //分页总数
  529. field.value.paging.total = bizContent.totalCount
  530. } else {
  531. crudRef.value.tableLoding = false
  532. ElMessage.error(res.message)
  533. }
  534. })
  535. }
  536. function handleCurrentChange(val: number) {
  537. field.value.paging.currentPage = val
  538. getList()
  539. }
  540. // 领取订单***********************************
  541. const selectList = ref([])
  542. // 表格选中
  543. function selectionChangeHandle(val: any) {
  544. selectList.value = val.map(item => item.orderId)
  545. }
  546. function getOrderFn(type, row?) {
  547. // if (type == 1 && selectList.value.length == 0) {
  548. // ElMessage.warning('请至少选择一条订单领取')
  549. // return
  550. // }
  551. let orderId: any = []
  552. // if (type == 1) {
  553. // orderId = selectList.value
  554. // } else {
  555. // orderId = [row.orderNo]
  556. // }
  557. orderId = row.orderNo
  558. ElMessageBox.confirm('确认领取订单吗?', '领取提示', {
  559. confirmButtonText: '确认领取',
  560. cancelButtonText: '取消',
  561. type: 'warning',
  562. draggable: true,
  563. })
  564. .then(() => {
  565. let params = {
  566. orderNo: orderId,
  567. // operatorId: cacheAccessToken.openId
  568. }
  569. // console.log(params, 'paramsparams')
  570. BaseService.postN('/managew/api/issue/orderExamine/receive', params).then(
  571. (res: any) => {
  572. if (res && res.code === 0) {
  573. ElMessage.success('领取成功')
  574. refreshLeft()
  575. } else {
  576. ElMessage.error(res.message)
  577. }
  578. }
  579. )
  580. })
  581. .catch(() => {
  582. ElMessage({
  583. type: 'info',
  584. message: '取消领取',
  585. })
  586. })
  587. }
  588. // 审核*****************************************
  589. const autdisReasonType = ref()
  590. function autdisReasonChange(value) {
  591. autdisReasonType.value = value
  592. }
  593. // const autdis = reactive<any>({ auditStatus: 'true', reason: '', reason1: '' }) //审核对象
  594. const autdis = reactive<any>({ auditStatus: 'true', reason: '' }) //审核对象
  595. let timer2: any = null
  596. const form = ref()
  597. //审核提交
  598. function checkForm(formEl) {
  599. if (timer2) return
  600. timer2 = setTimeout(() => {
  601. formEl.validate((valid: any, fields: any) => {
  602. if (valid) {
  603. // if (autdisReasonType.value == '8' && autdis.reason1) {
  604. // autdis.reason = autdis.reason1
  605. // }
  606. if (autdis.auditStatus == 'true') {
  607. autdisReasonType.value = ''
  608. autdis.reason = ''
  609. autdis.orderNo = beanData.orderNo
  610. // autdis.reason1 = ''
  611. }
  612. console.log("autdis", autdis)
  613. BaseService.postN('/managew/api/issue/orderExamine/examine', autdis).then((res: any) => {
  614. if (res && res.code === 0) {
  615. ElMessage.success(res.message)
  616. check.value = false
  617. visible.value = false
  618. getList()
  619. } else {
  620. ElMessage.error(res.message)
  621. }
  622. })
  623. } else {
  624. return false
  625. }
  626. })
  627. timer2 = null
  628. }, 1000)
  629. }
  630. function handleAudit() {
  631. //审核
  632. autdisReasonType.value = ''
  633. autdis.auditStatus = 'true'
  634. autdis.reason = ''
  635. // autdis.reason1 = ''
  636. check.value = true
  637. }
  638. //审核弹窗
  639. let beanData: any = {}
  640. const detailDialogTitle = ref('订单详情')
  641. const autdisButton = ref(false)
  642. const offset = ref(150)
  643. let visible = ref(false)
  644. const rowData = ref()
  645. function audit(idx: number, data: any, type) {
  646. // console.log(type, 'type')
  647. beanData = data
  648. detailDialogTitle.value = '订单详情'
  649. autdisButton.value = type
  650. BaseService.postN('/managew/api/issue/orderQuery/detail', { orderNo: data.orderNo }).then((res: any) => {
  651. if (res && res.code === 0) {
  652. try {
  653. rowData.value = res.data
  654. } catch (e) {
  655. console.log(e)
  656. ElMessage.error('未知错误')
  657. } //渲详情数据
  658. if (rowData) {
  659. // if (type) {
  660. // autdis.orderNo = rowData.orderInfo.orderNo
  661. visible.value = true
  662. // }
  663. } else {
  664. ElMessage.error('没有查到详情数据')
  665. }
  666. } else {
  667. ElMessage.error(res.message)
  668. }
  669. })
  670. }
  671. //取消
  672. function cancel() {
  673. addForm.value = {
  674. ...initItem,
  675. }
  676. }
  677. </script>
  678. <style scoped lang="scsss">
  679. </style>