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

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