detail.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. <template>
  2. <div class="app-container">
  3. <div class="app-header-top" style="width: 100%; float: right; margin-bottom: 10px">
  4. <div class="app-title">订单详情</div>
  5. <el-button
  6. type="primary"
  7. icon="el-icon-back"
  8. style="float: right"
  9. @click="backToList"
  10. >返回</el-button>
  11. </div>
  12. <el-card v-if="listLoading" class="box-card">
  13. <div class="refund-item">
  14. <el-row :gutter="24" class="box-row">
  15. <el-col :span="5"><b>下单时间:</b> {{ order.orderTime }}</el-col>
  16. <el-col
  17. :span="6"
  18. ><b>订单编号(ID):</b> {{ order.orderNo + "(" + order.orderId + ")" }}</el-col>
  19. <el-col :span="6"><b>订单来源:</b> 【丽格集采联盟】平台</el-col>
  20. <el-col :span="7">
  21. <b>订单类型:</b>
  22. <span style="margin: 0;">{{ order.orderType === 1 ? '自主订单' : '采购员订单' }}</span>
  23. <span v-if="order.orderType === 0" style="margin: 0;">({{ order.spName }})</span>
  24. </el-col>
  25. </el-row>
  26. <el-row :gutter="24" class="box-row">
  27. <!-- <el-col
  28. :span="5"
  29. ><b>订单状态:</b>
  30. <template
  31. v-if="
  32. ['11', '12', '13', '21', '22', '23', '31', '32', '33'].indexOf(
  33. order.status
  34. ) >= 0
  35. "
  36. >
  37. <el-tag type="success" size="small">交易中</el-tag>
  38. </template>
  39. <template v-else>
  40. <el-tag :type="order.status * 1 === 6 ? 'info' : ''" size="small">{{
  41. order.status | orderStatusFilter
  42. }}</el-tag>
  43. </template>
  44. </el-col> -->
  45. <el-col
  46. :span="5"
  47. ><b>收款状态:</b>
  48. <el-tag
  49. v-if="order.receiptStatus * 1 === 1"
  50. type="danger"
  51. size="small"
  52. >待收款</el-tag>
  53. <el-tag
  54. v-if="order.receiptStatus * 1 === 2"
  55. type="warning"
  56. size="small"
  57. >部分收款</el-tag>
  58. <el-tag
  59. v-if="order.receiptStatus * 1 === 3"
  60. type="success"
  61. size="small"
  62. >已收款</el-tag>
  63. </el-col>
  64. <el-col
  65. :span="5"
  66. ><b>发货状态:</b>
  67. <el-tag
  68. v-if="order.sendOutStatus * 1 === 1"
  69. type="danger"
  70. size="small"
  71. >待发货</el-tag>
  72. <el-tag
  73. v-if="order.sendOutStatus * 1 === 2"
  74. type="warning"
  75. size="small"
  76. >部分发货</el-tag>
  77. <el-tag
  78. v-if="order.sendOutStatus * 1 === 3"
  79. type="success"
  80. size="small"
  81. >已发货</el-tag>
  82. </el-col>
  83. <!-- <el-col
  84. :span="5"
  85. ><b>付款状态:</b>
  86. <el-tag
  87. v-if="order.payStatus * 1 === 1"
  88. type="danger"
  89. size="small"
  90. >待付款</el-tag>
  91. <el-tag
  92. v-if="order.payStatus * 1 === 2"
  93. type="warning"
  94. size="small"
  95. >部分付款</el-tag>
  96. <el-tag
  97. v-if="order.payStatus * 1 === 3"
  98. type="success"
  99. size="small"
  100. >已付款</el-tag>
  101. </el-col>
  102. <el-col
  103. :span="4"
  104. ><b>退款状态:</b>
  105. <el-tag
  106. v-if="order.refundType * 1 === 1"
  107. type="warning"
  108. size="small"
  109. >部分退款</el-tag>
  110. <el-tag
  111. v-else-if="order.refundType * 1 === 2"
  112. type="danger"
  113. size="small"
  114. >已退款</el-tag>
  115. <el-tag v-else type="info" size="small">无退款</el-tag>
  116. </el-col> -->
  117. </el-row>
  118. </div>
  119. <div class="refund-item">
  120. <el-row v-if="order.bpOrderUserinfo" :gutter="24" class="box-row">
  121. <el-col
  122. v-if="order.bpOrderUserinfo"
  123. :span="6"
  124. ><b>机构:</b> {{ order.clubName }}</el-col>
  125. </el-row>
  126. <el-row v-if="order.bpOrderUserinfo" :gutter="24" class="box-row">
  127. <el-col
  128. :span="6"
  129. ><b>收货人:</b> {{ order.bpOrderUserinfo.shouHuoRen }}</el-col>
  130. <el-col :span="6"><b>手机:</b> {{ order.bpOrderUserinfo.mobile }}</el-col>
  131. <el-col
  132. :span="12"
  133. ><b>地址:</b>
  134. {{
  135. order.bpOrderUserinfo.province +
  136. " " +
  137. order.bpOrderUserinfo.city +
  138. " " +
  139. order.bpOrderUserinfo.town +
  140. " " +
  141. order.bpOrderUserinfo.address
  142. }}</el-col>
  143. </el-row>
  144. <el-row :gutter="24" class="box-row">
  145. <el-col
  146. :span="6"
  147. ><b>订单金额:</b> ¥{{ order.payTotalFee | toThousandFloatFilter }}</el-col>
  148. <el-col
  149. :span="6"
  150. ><b>应收金额:</b> ¥{{ order.payTotalFee | toThousandFloatFilter }}
  151. </el-col>
  152. <el-col
  153. :span="12"
  154. ><b>已收金额:</b>
  155. <template v-if="order.receiptStatus * 1 === 1">¥0.00</template>
  156. <template v-else>¥{{ receiptAmount | toThousandFloatFilter }}</template>
  157. </el-col>
  158. </el-row>
  159. </div>
  160. <div class="refund-item">
  161. <div
  162. v-for="shopOrder in order.newShopOrders"
  163. :key="shopOrder.shopOrderId"
  164. class="order-item"
  165. >
  166. <el-row :gutter="22" class="box-row">
  167. <el-col :span="6"><b>下单时间:</b> {{ shopOrder.orderTime }}</el-col>
  168. <el-col
  169. :span="6"
  170. ><b>子订单号(ID):</b>
  171. {{ shopOrder.shopOrderNo + "(" + shopOrder.shopOrderId + ")" }}</el-col>
  172. <el-col
  173. :span="6"
  174. ><b>子订单金额:</b> ¥{{
  175. shopOrder.needPayAmount | toThousandFloatFilter
  176. }}</el-col>
  177. <el-col
  178. :span="6"
  179. ><b>运费:</b>
  180. <span>{{ shopOrder.postageInfo }}</span>
  181. </el-col>
  182. <el-col :span="4" class="function">
  183. <el-dropdown class="dropdown">
  184. <el-button type="primary" size="mini">
  185. 功能<i class="el-icon-arrow-down el-icon--right" />
  186. </el-button>
  187. <el-dropdown-menu slot="dropdown">
  188. <el-dropdown-item v-if="shopOrder.sendOutStatus * 1 > 1">
  189. <div
  190. @click="handeleDropdown(2, order.orderId, shopOrder.shopOrderId)"
  191. >
  192. 发货记录
  193. </div>
  194. </el-dropdown-item>
  195. <el-dropdown-item>
  196. <div
  197. @click="handeleDropdown(3, order.orderId, shopOrder.shopOrderId)"
  198. >
  199. 收付款记录
  200. </div>
  201. </el-dropdown-item>
  202. <el-dropdown-item>
  203. <div
  204. @click="handeleDropdown(4, order.orderId, shopOrder.shopOrderId)"
  205. >
  206. 退款(退货)记录
  207. </div>
  208. </el-dropdown-item>
  209. <el-dropdown-item>
  210. <div
  211. @click="handeleDropdown(5, order.orderId, shopOrder.shopOrderId)"
  212. >
  213. 订单备注
  214. </div>
  215. </el-dropdown-item>
  216. </el-dropdown-menu>
  217. </el-dropdown>
  218. </el-col>
  219. </el-row>
  220. <el-row :gutter="22" class="box-row">
  221. <el-col
  222. :span="6"
  223. ><b>商品总额:</b> ¥{{
  224. shopOrder.productAmount | toThousandFloatFilter
  225. }}</el-col>
  226. <el-col
  227. :span="6"
  228. ><b>应收金额:</b> ¥{{
  229. shopOrder.needPayAmount | toThousandFloatFilter
  230. }}</el-col>
  231. <el-col
  232. :span="6"
  233. ><b>已收金额:</b> ¥{{
  234. shopOrder.receiptAmount | toThousandFloatFilter
  235. }}</el-col>
  236. <el-col
  237. :span="6"
  238. ><b>待收金额:</b> ¥{{
  239. shopOrder.restAmount | toThousandFloatFilter
  240. }}</el-col>
  241. </el-row>
  242. <el-row :gutter="22" class="box-row">
  243. <el-col
  244. :span="6"
  245. ><b>子订单状态:</b>
  246. <el-tag type="success" size="small">
  247. {{ shopOrder.shopStatus | orderStatusFilter }}
  248. </el-tag>
  249. </el-col>
  250. <el-col
  251. :span="6"
  252. ><b>收款状态:</b>
  253. <el-tag
  254. v-if="shopOrder.receiptStatus * 1 === 1"
  255. type="danger"
  256. size="small"
  257. >待收款</el-tag>
  258. <el-tag
  259. v-if="shopOrder.receiptStatus * 1 === 2"
  260. type="warning"
  261. size="small"
  262. >部分收款</el-tag>
  263. <el-tag
  264. v-if="shopOrder.receiptStatus * 1 === 3"
  265. type="success"
  266. size="small"
  267. >已收款</el-tag>
  268. </el-col>
  269. <el-col
  270. :span="6"
  271. ><b>发货状态:</b>
  272. <el-tag
  273. v-if="shopOrder.sendOutStatus * 1 === 1"
  274. type="danger"
  275. size="small"
  276. >待发货</el-tag>
  277. <el-tag
  278. v-if="shopOrder.sendOutStatus * 1 === 2"
  279. type="warning"
  280. size="small"
  281. >部分发货</el-tag>
  282. <el-tag
  283. v-if="shopOrder.sendOutStatus * 1 === 3"
  284. type="success"
  285. size="small"
  286. >已发货</el-tag>
  287. </el-col>
  288. <el-col
  289. :span="6"
  290. ><b>退款状态:</b>
  291. <el-tag
  292. v-if="shopOrder.refundStatus * 1 === 1"
  293. type="info"
  294. size="small"
  295. >无退款</el-tag>
  296. <el-tag
  297. v-if="shopOrder.refundStatus * 1 === 2"
  298. type="warning"
  299. size="small"
  300. >退款中</el-tag>
  301. <el-tag
  302. v-if="shopOrder.refundStatus * 1 === 3"
  303. type="success"
  304. size="small"
  305. >已退款</el-tag>
  306. </el-col>
  307. <!-- <el-col
  308. :span="6"
  309. ><b>付款状态:</b>
  310. <el-tag
  311. v-if="shopOrder.payStatus * 1 === 1"
  312. type="danger"
  313. size="small"
  314. >待付款</el-tag>
  315. <el-tag
  316. v-if="shopOrder.payStatus * 1 === 2"
  317. type="warning"
  318. size="small"
  319. >部分付款</el-tag>
  320. <el-tag
  321. v-if="shopOrder.payStatus * 1 === 3"
  322. type="success"
  323. size="small"
  324. >已付款</el-tag>
  325. </el-col> -->
  326. </el-row>
  327. <el-row :gutter="22" class="box-row">
  328. <el-col
  329. :span="6"
  330. ><b>留言:</b> {{ shopOrder.note ? shopOrder.note : "无" }}</el-col>
  331. </el-row>
  332. <el-row :gutter="22" class="box-row">
  333. <el-col
  334. :span="22"
  335. ><b>供应商:</b>
  336. {{ shopOrder.shopName ? shopOrder.shopName : "无" }}</el-col>
  337. </el-row>
  338. <el-row :gutter="22">
  339. <el-table :data="shopOrder.newOrderProducts" border>
  340. <el-table-column label="商品图片" align="center" prop="productImage">
  341. <template slot-scope="{ row }">
  342. <el-popover placement="top-start" title="" width="120" trigger="hover">
  343. <img
  344. :src="row.productImage"
  345. alt=""
  346. style="width: 100px; height: 100px"
  347. >
  348. <img
  349. slot="reference"
  350. :src="row.productImage"
  351. alt=""
  352. style="width: 50px; height: 50px"
  353. >
  354. </el-popover>
  355. </template>
  356. </el-table-column>
  357. <el-table-column label="商品名" align="center" prop="name" />
  358. <el-table-column label="规格" align="center" prop="unit" />
  359. <el-table-column label="数量" align="center" prop="num" width="60" />
  360. <el-table-column label="单价" align="center" prop="price">
  361. <template slot-scope="{ row }">
  362. <span>¥{{ row.price | amountfilters }}</span>
  363. </template>
  364. </el-table-column>
  365. <el-table-column label="总价" align="center" prop="totalFee">
  366. <template slot-scope="{ row }">
  367. <span>¥{{ row.totalFee | amountfilters }}</span>
  368. </template>
  369. </el-table-column>
  370. <el-table-column
  371. label="已发/已收"
  372. align="center"
  373. prop="returnedPurchaseProductNum"
  374. >
  375. <template slot-scope="{ row }">
  376. <span>{{
  377. `${row.sendOutNum ? row.sendOutNum : 0}/${
  378. row.receivedNum ? row.receivedNum : 0
  379. }`
  380. }}</span>
  381. </template>
  382. </el-table-column>
  383. <el-table-column
  384. label="退款(退货)中/已完成"
  385. align="center"
  386. prop="returnedPurchaseProductNum"
  387. >
  388. <template slot-scope="{ row }">
  389. <span>{{ row.returningNum ? row.returningNum : 0 }} /
  390. {{ row.returnedNum ? row.returnedNum : 0 }}</span>
  391. </template>
  392. </el-table-column>
  393. </el-table>
  394. </el-row>
  395. <div v-if="shopOrder.vouchers.length > 0">
  396. <h1 style="font-size: 14px; color: #409eff">线下支付凭证:</h1>
  397. <el-row v-for="(vouch, index) in shopOrder.vouchers" :key="index" style="padding: 5px 0">
  398. <p class="refund-item-p">{{ vouch.addTime }}</p>
  399. <div class="refund-item-imgs">
  400. <div
  401. v-for="(imgage, imgIndex) in vouch.images"
  402. :key="imgIndex"
  403. class="item-image"
  404. >
  405. <a :href="imgage" target="_blank" rel="noopener noreferrer">
  406. <img :src="imgage" alt="">
  407. </a>
  408. </div>
  409. </div>
  410. <p v-if="vouch.remarks" class="refund-item-p">备注:{{ vouch.remarks }}</p>
  411. </el-row>
  412. </div>
  413. </div>
  414. </div>
  415. <div class="refund-item">
  416. <template v-if="orderInvoice">
  417. <el-row :gutter="24" class="box-row">
  418. <el-col
  419. :span="6"
  420. ><b>发票信息:</b> {{ setInvoiceText(orderInvoice) }}</el-col>
  421. </el-row>
  422. <el-row :gutter="24" class="box-row">
  423. <el-col
  424. :span="6"
  425. ><b>发票抬头:</b>
  426. {{ orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : "无" }}</el-col>
  427. <el-col
  428. v-if="orderInvoice.type*1 === 2 || orderInvoice.invoiceTitleType*1 === 1"
  429. :span="6"
  430. ><b>单位税号:</b>
  431. {{
  432. orderInvoice.corporationTaxNum ? orderInvoice.corporationTaxNum : "无"
  433. }}</el-col>
  434. <el-col
  435. v-if="orderInvoice.type*1 === 2 || orderInvoice.invoiceTitleType*1 === 1"
  436. :span="8"
  437. ><b>注册地址:</b>
  438. {{
  439. orderInvoice.registeredAddress ? orderInvoice.registeredAddress : "无"
  440. }}</el-col>
  441. </el-row>
  442. <el-row v-if="orderInvoice.type*1 === 2 || orderInvoice.invoiceTitleType*1 === 1" :gutter="24" class="box-row">
  443. <el-col
  444. :span="6"
  445. ><b>注册电话:</b>
  446. {{
  447. orderInvoice.registeredPhone ? orderInvoice.registeredPhone : "无"
  448. }}</el-col>
  449. <el-col
  450. :span="6"
  451. ><b>开户银行:</b>
  452. {{ orderInvoice.openBank ? orderInvoice.openBank : "无" }}</el-col>
  453. <el-col
  454. :span="8"
  455. ><b>银行账号:</b>
  456. {{ orderInvoice.bankAccountNo ? orderInvoice.bankAccountNo : "无" }}</el-col>
  457. </el-row>
  458. </template>
  459. <template v-else>
  460. <el-row :gutter="24" class="box-row">
  461. <el-col :span="24"><b>发票信息:</b> 不开发票</el-col>
  462. </el-row>
  463. </template>
  464. </div>
  465. <!-- <div v-if="voucher.length > 0" class="refund-item"></div> -->
  466. <el-dialog title="更改收款状态" :visible.sync="dialogFormVisible" width="600px">
  467. <el-form
  468. ref="dataForm"
  469. :rules="rules"
  470. :model="chengeOrder"
  471. label-position="right"
  472. label-width="150px"
  473. >
  474. <el-row :gutter="24" class="box-row" style="margin-bottom: 40px">
  475. <el-col
  476. :span="8"
  477. ><b>应收金额:</b> ¥{{ order.payTotalFee | amountfilters }}</el-col>
  478. <el-col
  479. :span="8"
  480. ><b>已收金额:</b>¥{{ receiptAmount | amountfilters }}</el-col>
  481. <el-col
  482. :span="8"
  483. ><b>未收金额:</b> ¥{{
  484. (order.payTotalFee - receiptAmount) | amountfilters
  485. }}</el-col>
  486. </el-row>
  487. <el-form-item label="订单本次收款金额:" prop="amount" :rules="rules.amount">
  488. <el-input v-model="chengeOrder.amount" style="width: 200px">
  489. <template slot="prepend">¥</template>
  490. </el-input>
  491. </el-form-item>
  492. </el-form>
  493. <div slot="footer" class="dialog-footer">
  494. <el-button @click="dialogFormVisible = false">取消</el-button>
  495. <el-button
  496. type="primary"
  497. :disabled="disabled"
  498. @click="handleChangOrder"
  499. >确定</el-button>
  500. </div>
  501. </el-dialog>
  502. <Remarks
  503. dialog-title="订单备注信息"
  504. :is-visible.sync="dialogRemarksVisible"
  505. :order-id="dialogRemarksorderId"
  506. :remark-list="dialogRemarkList"
  507. />
  508. </el-card>
  509. </div>
  510. </template>
  511. <script>
  512. import { getDetail, getRemarks, orderCheckReceipt } from '@/api/order'
  513. import Remarks from './components/remarks'
  514. export default {
  515. components: { Remarks },
  516. filters: {
  517. invoiceFilters(value) {
  518. const map = {
  519. 0: '不开发票',
  520. 1: '普通发票',
  521. 2: '增值税发票'
  522. }
  523. return map[value]
  524. }
  525. },
  526. data() {
  527. const picValidator = (rule, value, callback) => {
  528. if (!this.chengeOrder.amount) {
  529. callback(new Error('请输入本次收款金额'))
  530. } else if (
  531. this.chengeOrder.amount >
  532. this.SubtrAount(this.order.payTotalFee, this.receiptAmount) * 1
  533. ) {
  534. callback(new Error('本次收款金额不能大于未收金额'))
  535. } else {
  536. callback()
  537. }
  538. }
  539. return {
  540. activeIndex: '2',
  541. order: null,
  542. receiptAmount: 0,
  543. returnValue: 0,
  544. returnedPurchaseFee: 0,
  545. bpClauses: null,
  546. dialogRemarkList: [],
  547. dialogRemarksVisible: false,
  548. dialogRemarksorderId: 0,
  549. dialogFormVisible: false,
  550. chengeOrder: {
  551. orderId: this.$route.query.orderId * 1,
  552. amount: null
  553. },
  554. orderInvoice: {},
  555. voucher: [],
  556. rules: {
  557. amount: [{ required: true, validator: picValidator, trigger: 'blur' }]
  558. },
  559. listLoading: false
  560. }
  561. },
  562. computed: {
  563. orderId: function() {
  564. return this.$route.query.orderId * 1
  565. },
  566. disabled() {
  567. return !(this.chengeOrder.amount > 0)
  568. }
  569. },
  570. created() {
  571. this.fetchData()
  572. },
  573. methods: {
  574. // 订单状态更新
  575. orderStatus(state) {
  576. const status = {
  577. 0: '待确认',
  578. 1: '已确认',
  579. 2: '交易完成',
  580. 3: '订单完成',
  581. 4: '已关闭',
  582. 5: '交易全退'
  583. }
  584. return status[state]
  585. },
  586. fetchData() {
  587. getDetail({ id: this.orderId })
  588. .then((response) => {
  589. this.order = response.data.order
  590. this.bpClauses = response.data.bpClauses
  591. this.receiptAmount = response.data.receiptAmount
  592. this.returnValue = response.data.returnValue
  593. this.returnedPurchaseFee = response.data.returnedPurchaseFee
  594. this.orderInvoice = this.order.orderInvoice
  595. this.voucher = response.data.voucher
  596. this.listLoading = true
  597. })
  598. .catch(() => {
  599. this.listLoading = true
  600. })
  601. },
  602. // 设置发票文案
  603. setInvoiceText(data) {
  604. const map = {
  605. 0: '个人',
  606. 1: '单位'
  607. }
  608. let invoiceText = ''
  609. switch (data.type * 1) {
  610. case 0:
  611. invoiceText = `不开发票`
  612. break
  613. case 1:
  614. invoiceText = `普票-${map[data.invoiceTitleType * 1]}`
  615. break
  616. case 2:
  617. invoiceText = `专票`
  618. break
  619. }
  620. return invoiceText
  621. },
  622. RemarksOrder: function(id) {
  623. getRemarks(id).then((response) => {
  624. this.dialogRemarkList = response.data
  625. })
  626. this.dialogRemarksorderId = id
  627. this.dialogRemarksVisible = true
  628. },
  629. handeleDialogFormVisible() {
  630. this.dialogFormVisible = true
  631. },
  632. handeleDropdown(type, orderId, shopOrderId) {
  633. switch (type) {
  634. case 1: // 发货
  635. this.$router.push({ path: '/order/deliver', query: { orderId: orderId }})
  636. break
  637. case 2: // 发货记录
  638. this.$router.push({
  639. path: '/order/deliver-record',
  640. query: { orderId: orderId, shopOrderId }
  641. })
  642. break
  643. case 3: // 收付款记录
  644. this.$router.push({
  645. path: '/finance/remit-record',
  646. query: { orderId: orderId, shopOrderId }
  647. })
  648. break
  649. case 4: // 退款(退货)记录
  650. this.$router.push({
  651. path: '/finance/refund-record',
  652. query: { orderId: orderId, shopOrderId }
  653. })
  654. break
  655. case 5: // 订单备注
  656. this.$router.push({
  657. path: '/order/order-remarks',
  658. query: { orderId: orderId, shopOrderId }
  659. })
  660. break
  661. case 6: // 上传线下支付凭证
  662. this.$router.push({ path: '/order/pay-remarks', query: { orderId: orderId }})
  663. break
  664. }
  665. },
  666. async handleChangOrder() {
  667. // 确认本次收款金额
  668. this.$refs['dataForm'].validate((valid) => {
  669. if (valid) {
  670. this.orderCheckReceipt()
  671. } else {
  672. return false
  673. }
  674. })
  675. },
  676. async orderCheckReceipt() {
  677. try {
  678. await orderCheckReceipt(this.chengeOrder)
  679. this.$message.success('操作成功')
  680. this.dialogFormVisible = false
  681. this.fetchData()
  682. } catch (error) {
  683. console.log('error', error)
  684. }
  685. },
  686. SubtrAount(arg1, arg2) {
  687. var r1, r2, m, n
  688. try {
  689. r1 = arg1.toString().split('.')[1].length
  690. } catch (e) {
  691. r1 = 0
  692. }
  693. try {
  694. r2 = arg2.toString().split('.')[1].length
  695. } catch (e) {
  696. r2 = 0
  697. }
  698. m = Math.pow(10, Math.max(r1, r2))
  699. n = r1 >= r2 ? r1 : r2
  700. return ((arg1 * m - arg2 * m) / m).toFixed(n)
  701. },
  702. backToList() {
  703. this.$store.dispatch('tagsView/delView', this.$route).then(() => {
  704. this.$nextTick(() => {
  705. this.$router.replace({
  706. path: '/order/list'
  707. })
  708. })
  709. })
  710. }
  711. }
  712. }
  713. </script>
  714. <style scoped>
  715. ::v-deep .el-row {
  716. position: relative;
  717. }
  718. .function {
  719. position: absolute;
  720. right: 0;
  721. width: auto;
  722. }
  723. .app-title {
  724. float: left;
  725. line-height: 36px;
  726. font-size: 18px;
  727. font-weight: bold;
  728. color: #999999;
  729. }
  730. .box-card {
  731. margin-top: 20px;
  732. font-size: 14px;
  733. }
  734. .box-row {
  735. padding: 10px 0;
  736. }
  737. .box-row .dropdown {
  738. margin-top: -10px;
  739. }
  740. .refund-item {
  741. padding: 10px 0;
  742. border-bottom: 1px dashed #e4e7ed;
  743. }
  744. .refund-item-p {
  745. width: 100%;
  746. line-height: 18px;
  747. font-size: 14px;
  748. color: #666666;
  749. float: left;
  750. }
  751. .refund-item-imgs {
  752. width: 100%;
  753. height: auto;
  754. margin: 5px 0;
  755. }
  756. .refund-item-imgs .item-image {
  757. width: 148px;
  758. height: 148px;
  759. margin-right: 10px;
  760. border: 1px dashed #e1e1e1;
  761. float: left;
  762. }
  763. .refund-item-imgs .item-image a {
  764. width: 148px;
  765. height: 148px;
  766. display: block;
  767. }
  768. .refund-item-imgs .item-image a img {
  769. width: 148px;
  770. height: 148px;
  771. display: block;
  772. }
  773. .order-item {
  774. background: #f7f7f7;
  775. padding: 10px 20px;
  776. box-sizing: border-box;
  777. border-radius: 5px;
  778. margin-bottom: 10px;
  779. }
  780. .product-row {
  781. padding: 10px 0;
  782. background: #ebeef5;
  783. border-top: 1px dashed #dcdfe6;
  784. }
  785. .op-item {
  786. padding: 5px 0;
  787. }
  788. </style>