details.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <view style="width: 100%; height: 100vh">
  3. <zj-page-container>
  4. <zj-page-fill>
  5. <view class="accessories_nfo_card_view" v-if="info">
  6. <!-- 配件信息 -->
  7. <view class="accessories_nfo_card">
  8. <view class="accessories_nfo_card_title">
  9. <text>配件信息</text>
  10. <text class="colorts">{{ info.flagName }}</text>
  11. </view>
  12. <view class="accessories_list_card">
  13. <view
  14. class="accessories_list_a"
  15. v-for="(item, index) in info.partsOldRefundManageRecordList || []"
  16. :key="index"
  17. >
  18. <view class="accessories_list_a_info">
  19. <view>
  20. {{ item.partsName }}
  21. </view>
  22. <view> *{{ item.qty }} </view>
  23. <view> ¥{{ item.totalAmount }} </view>
  24. </view>
  25. <view class="accessories_list_a_number">
  26. <text>{{ item.partsNumber }}</text>
  27. <view
  28. v-if="~['REFUNDED'].indexOf(info.flag)"
  29. class="viewtkstate"
  30. @tap.stop="
  31. () => {
  32. listItem = item
  33. showPopup = true
  34. }
  35. "
  36. >
  37. 查看退款状态
  38. </view>
  39. </view>
  40. </view>
  41. <view class="accessories_list_amount">
  42. 合计:<text class="colorts">
  43. ¥{{
  44. [...(info.partsOldRefundManageRecordList || []).map(a => a.totalAmount || 0), 0].reduce((a, b) => {
  45. return a + b
  46. })
  47. }}
  48. </text>
  49. </view>
  50. </view>
  51. <view class="accessories_nfo_card_title"> 备注信息 </view>
  52. <view class="accessories_nfo_card_note">
  53. {{ info.remark }}
  54. </view>
  55. </view>
  56. <!-- 申请信息 -->
  57. <view class="accessories_nfo_card">
  58. <view class="accessories_nfo_card_title"> 申请信息 </view>
  59. <view class="accessories_nfo_ac">
  60. <view class="accessories_nfo_title"> 申请单号: </view>
  61. <view class="accessories_nfo_info">
  62. <view>
  63. {{ info.applyNo }}
  64. </view>
  65. </view>
  66. </view>
  67. <view class="accessories_nfo_ac">
  68. <view class="accessories_nfo_title"> 申请日期: </view>
  69. <view class="accessories_nfo_info">
  70. <view>
  71. {{ info.createTime }}
  72. </view>
  73. </view>
  74. </view>
  75. <view class="accessories_nfo_ac">
  76. <view class="accessories_nfo_title"> 申请人: </view>
  77. <view class="accessories_nfo_info">
  78. <view> {{ info.workerName }}({{ info.workerId }}) </view>
  79. </view>
  80. </view>
  81. <view class="accessories_nfo_ac">
  82. <view class="accessories_nfo_title"> 网点: </view>
  83. <view class="accessories_nfo_info">
  84. <view> {{ info.websiteName }}({{ info.websiteNumber }}) </view>
  85. </view>
  86. </view>
  87. <!-- <view class="accessories_nfo_ac">
  88. <view class="accessories_nfo_title">
  89. {{info.flag==='SAVE' && info.settlementState?"*":""}}申请类别:
  90. </view>
  91. <view class="accessories_nfo_info">
  92. <radio-group v-if="info.flag==='SAVE' && info.settlementState"
  93. @change="(d)=>{info.applyCategory=d.detail.value}">
  94. <label style="margin-right: 20upx;">
  95. <radio value="HOME" :checked="info.applyCategory==='HOME'" />家用空调
  96. </label>
  97. <label>
  98. <radio value="TRADE" :checked="info.applyCategory==='TRADE'" />商用空调
  99. </label>
  100. <br />
  101. <br />
  102. <label>
  103. <radio value="ELEC" :checked="info.applyCategory==='ELEC'" />生活电器(小家电)
  104. </label>
  105. </radio-group>
  106. <view v-else>
  107. {{['家用空调', '商用空调', '生活电器(小家电)'][['HOME', 'TRADE', 'ELEC'].indexOf(info.applyCategory)]}}
  108. </view>
  109. </view>
  110. </view>
  111. <view class="accessories_nfo_ac">
  112. <view class="accessories_nfo_title">
  113. {{info.flag==='SAVE' && info.settlementState?"*":""}}申请类型:
  114. </view>
  115. <view class="accessories_nfo_info">
  116. <radio-group v-if="info.flag==='SAVE' && info.settlementState"
  117. @change="(d)=>{info.applyType=d.detail.value}">
  118. <label style="margin-right: 20upx;">
  119. <radio value="NEW" :checked="info.applyType==='NEW'" />新件返还
  120. </label>
  121. <label>
  122. <radio value="LOST" :checked="info.applyType==='LOST'" />破损返还
  123. </label>
  124. <br />
  125. <br />
  126. <label>
  127. <radio value="BUG" :checked="info.applyType==='BUG'" />故障返还
  128. </label>
  129. </radio-group>
  130. <view v-else>
  131. {{['新件返还', '破损返还', '故障返还'][['NEW', 'LOST', 'BUG'].indexOf(info.applyType)]}}
  132. </view>
  133. </view>
  134. </view>
  135. <view class="accessories_nfo_ac">
  136. <view class="accessories_nfo_title">
  137. {{info.flag==='SAVE' && info.settlementState?"*":""}}返件方式:
  138. </view>
  139. <view class="accessories_nfo_info">
  140. <radio-group v-if="info.flag==='SAVE' && info.settlementState"
  141. @change="(d)=>{info.refundMode=d.detail.value}">
  142. <label style="margin-right: 20upx;">
  143. <radio value="EXPRESS" :checked="info.refundMode==='EXPRESS'" />物流快递
  144. </label>
  145. <label>
  146. <radio value="SELF" :checked="info.refundMode==='SELF'" />网点自还
  147. </label>
  148. </radio-group>
  149. <view v-else>
  150. {{['物流快递', '网点自还'][['EXPRESS', 'SELF'].indexOf(info.refundMode)]}}
  151. </view>
  152. </view>
  153. </view> -->
  154. <view class="accessories_nfo_ac">
  155. <view class="accessories_nfo_title"> 审批人: </view>
  156. <view class="accessories_nfo_info">
  157. <view>
  158. {{ info.examineBy }}
  159. </view>
  160. </view>
  161. </view>
  162. <view class="accessories_nfo_ac">
  163. <view class="accessories_nfo_title"> 审批时间: </view>
  164. <view class="accessories_nfo_info">
  165. <view>
  166. {{ info.examineTime }}
  167. </view>
  168. </view>
  169. </view>
  170. <view class="accessories_nfo_ac">
  171. <view class="accessories_nfo_title"> 审批备注: </view>
  172. <view class="accessories_nfo_info">
  173. <view>
  174. {{ info.examineRemark }}
  175. </view>
  176. </view>
  177. </view>
  178. <view class="accessories_nfo_ac">
  179. <view class="accessories_nfo_title"> 状态: </view>
  180. <view class="accessories_nfo_info">
  181. <view>
  182. {{ info.flagName }}
  183. </view>
  184. </view>
  185. </view>
  186. <view class="accessories_nfo_ac">
  187. <view class="accessories_nfo_title"> 返还日期: </view>
  188. <view class="accessories_nfo_info">
  189. <view>
  190. {{ info.refundedTime }}
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. <popup
  196. :value="showPopup"
  197. @input="
  198. val => {
  199. showPopup = val
  200. }
  201. "
  202. >
  203. <view v-if="listItem" style="background: #fff; width: 500upx">
  204. <view class="accessories_nfo_card">
  205. <view class="accessories_nfo_ac">
  206. <view class="accessories_nfo_title"> 退款金额: </view>
  207. <view class="accessories_nfo_info">
  208. <view>
  209. {{ listItem.refundAmount }}
  210. </view>
  211. </view>
  212. </view>
  213. <view class="accessories_nfo_ac">
  214. <view class="accessories_nfo_title"> 退款状态: </view>
  215. <view class="accessories_nfo_info">
  216. <view>
  217. {{ ['成功', '失败', '等待'][['OK', 'FAIL', 'WAIT'].indexOf(listItem.refundState)] || '' }}
  218. </view>
  219. </view>
  220. </view>
  221. <view class="accessories_nfo_ac">
  222. <view class="accessories_nfo_title"> 退款时间: </view>
  223. <view class="accessories_nfo_info">
  224. <view>
  225. {{ listItem.refundTime }}
  226. </view>
  227. </view>
  228. </view>
  229. <view class="accessories_nfo_ac">
  230. <view class="accessories_nfo_title"> 退款方式: </view>
  231. <view class="accessories_nfo_info">
  232. <view> 微信 </view>
  233. </view>
  234. </view>
  235. <view class="accessories_nfo_ac">
  236. <view class="accessories_nfo_title"> 微信接收账号: </view>
  237. <view class="accessories_nfo_info">
  238. <view>
  239. {{ listItem.refundMchNo }}
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. </view>
  245. </popup>
  246. </view>
  247. </zj-page-fill>
  248. <!-- <bt-container v-if="info && info.flag === 'SAVE' && info.settlementState">
  249. <view class="btcon pv30 ph10">
  250. <view class="confirm-btn" @tap.stop="confirmation">确认返还</view>
  251. </view>
  252. </bt-container> -->
  253. </zj-page-container>
  254. </view>
  255. </template>
  256. <script>
  257. import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
  258. import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
  259. import popup from '@/components/popup.vue'
  260. export default {
  261. components: {
  262. zjPageContainer,
  263. zjPageFill,
  264. popup
  265. },
  266. // 额外添加的原生按钮
  267. onNavigationBarButtonTap(e) {
  268. if (e.text === '工单查看') {
  269. this.$navToPage({
  270. url: '/packageAttachment/pages/returnOfOldParts/workOrderView'
  271. })
  272. }
  273. },
  274. data() {
  275. return {
  276. showPopup: false,
  277. info: null,
  278. listItem: null
  279. }
  280. },
  281. onLoad: function (option) {
  282. this.getDetails(option.applyNo)
  283. },
  284. methods: {
  285. getDetails(applyNo) {
  286. this.$api
  287. .get('/app/worker/old-refund/detail', {
  288. applyNo
  289. })
  290. .then(res => {
  291. this.info = res.data
  292. })
  293. .catch(() => {})
  294. },
  295. confirmation() {
  296. var { applyCategory, applyNo, applyType, refundMode } = this.info
  297. if (applyCategory && applyNo && applyType && refundMode) {
  298. this.$api
  299. .post('/app/worker/old-refund/submit', {
  300. applyCategory,
  301. applyNo,
  302. applyType,
  303. refundMode
  304. })
  305. .then(res => {
  306. this.getDetails(applyNo)
  307. uni.$emit('updataReturnOfOldPartsList')
  308. })
  309. .catch(() => {})
  310. }
  311. }
  312. }
  313. }
  314. </script>
  315. <style scoped lang="scss">
  316. @import '@/static/style/accessories_nfo_card.scss';
  317. </style>