order-detail.vue 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847
  1. <template>
  2. <app-layout>
  3. <image class="head-img" :src='adminImg.detail_bg'></image>
  4. <view v-if="status == 2" class="head-txt main-between">
  5. <view class="status-txt">{{order.refund}}</view>
  6. </view>
  7. <view v-else class="head-txt main-between">
  8. <view class="status-txt" v-if="order.is_sale == 1">已完成</view>
  9. <view class="status-txt" v-else-if="order.cancel_status == 2">取消订单 待处理</view>
  10. <view class="status-txt" v-else-if="order.is_pay == 0 && order.pay_type != 2">等待买家付款</view>
  11. <view class="status-txt" v-else-if="order.is_send == 0">等待卖家发货</view>
  12. <view class="status-txt" v-else-if="order.is_confirm == 0">卖家已发货</view>
  13. <view class="status-txt" v-else-if="order.is_confirm == 1">买家已收货</view>
  14. <view v-if="order.auto_confirm > 0 && order.is_send == 1 && order.is_confirm == 0">剩余
  15. <text v-if="dd>0">{{dd}}天</text>
  16. <text v-if="hh>0 && dd==0">{{hh}}小时</text> {{mm}}分自动确认收货
  17. </view>
  18. <view v-else-if="order.auto_cancel > 0 && order.is_pay == 0 && order.pay_type != 2">剩余
  19. <text v-if="dd>0">{{dd}}天</text>
  20. <text v-if="hh>0 && dd==0">{{hh}}小时</text> {{mm}}分自动删除
  21. </view>
  22. <view v-else-if="order.auto_sales > 0 && order.is_sale == 0 && order.is_confirm == 1">剩余
  23. <text v-if="dd>0">{{dd}}天</text>
  24. <text v-if="hh>0 && dd==0">{{hh}}小时</text> {{mm}}分自动完成订单
  25. </view>
  26. </view>
  27. <view class="user-info" v-if="order.address || order.send_type == 1">
  28. <image class="localhost-img" src='./../image/localhost.png'></image>
  29. <view class="user-text">
  30. <text class="name">{{order.name}}</text>
  31. <text v-if="order.send_type != 1">{{order.mobile}}</text>
  32. </view>
  33. <view class='user-text address-info'>{{order.send_type == 1 ? order.mobile : order.address}}</view>
  34. <view class='main-center area'>
  35. <view @click='toCall(order.mobile)' class="detail-btn box-grow-1">联系收货人</view>
  36. <view :class="[`${order.send_type == 2 ? 'line left-line':'line'}`]"></view>
  37. <view class="detail-btn box-grow-1" @click='copy'>{{order.send_type == 1 ? '复制联系方式' : '复制地址'}}</view>
  38. <view class="line" v-if="order.send_type == 2" :class="[`${order.send_type == 2 ? 'line right-line':'line'}`]"></view>
  39. <view class="detail-btn box-grow-1" v-if="order.send_type == 2" @click='openMap'>地图导航</view>
  40. </view>
  41. </view>
  42. <view v-if="(detail.detailExpress.length == 1 && detail.detail.length == 1) || (order.detailExpress.length == 1 && order.detail.length == 1)">
  43. <view @click="toExpressInfo(detail)" class="express" v-if="detail.detailExpress[0].express_no">
  44. <image class="logo" src='./../image/express.png'></image>
  45. <view class="express-company">{{detail.detailExpress[0].express}}</view>
  46. <view class="express-number">运单编号:{{detail.detailExpress[0].express_no}}</view>
  47. <image v-if="detail.detailExpress[0].express" class="to-more" src='/static/image/icon/arrow-right.png'></image>
  48. </view>
  49. <view @click="toExpressInfo(order)" class="express" v-else-if="order.detailExpress[0].express_no">
  50. <image class="logo" src='./../image/express.png'></image>
  51. <view class="express-company">{{order.detailExpress[0].express}}</view>
  52. <view v-if="order.detailExpress[0].express" class="express-number">运单编号:{{order.detailExpress[0].express_no}}</view>
  53. <image v-if="order.detailExpress[0].express" class="to-more" src='/static/image/icon/arrow-right.png'></image>
  54. </view>
  55. </view>
  56. <view class="express" v-if="order.detailExpress.length > 0 && order.detail.length > 1" @click="toExpressMore(order)">
  57. <view class="showMore">该订单已拆成多个包裹发货,点击查看详情</view>
  58. <image class="to-more" src='/static/image/icon/arrow-right.png'></image>
  59. </view>
  60. <view class="express" v-else-if="detail.detailExpress.length > 0 && detail.detail.length > 1" @click="toExpressMore(detail)">
  61. <view class="showMore">该订单已拆成多个包裹发货,点击查看详情</view>
  62. <image class="to-more" src='/static/image/icon/arrow-right.png'></image>
  63. </view>
  64. <view class="sc" v-if="order.city_info != null">
  65. <view class="sc-info dir-left-nowrap cross-center">
  66. <image class="sc-icon" src="./../image/distributor.png"></image>
  67. <view class="sc-about">
  68. <view>配送员</view>
  69. <view class="sc-person">
  70. <view class="sc-name" :style="{'display': `${order.city_name.length > 6 ? 'block' : 'inline-block'}`}">{{order.city_name}}</view>
  71. <text>{{order.city_mobile}}</text>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="sc-to-call main-center cross-center" @click='toCall(order.city_mobile)'>
  76. <image src="/static/image/icon/store-tel.png"></image>
  77. </view>
  78. </view>
  79. <view class="composition" v-if="order.sign == 'composition'">
  80. <view v-for="(list,idx) in order.composition_list" class="composition-item" :key="goods.id">
  81. <view class="main-between composition-title">
  82. <view class="composition-type" v-if="list.type == 1">固定套餐</view>
  83. <view class="composition-type" v-else>搭配套餐</view>
  84. <view>套餐总价 ¥{{list.total_price}}</view>
  85. </view>
  86. <view v-if="list.show || index == 0" v-for="(goods,index) in list.goods_list" class="goods" :key="goods.id">
  87. <image class="goods-img" :src='goods.pic_url'></image>
  88. <view class='t-omit-two goods-name'>{{goods.name}}</view>
  89. <view class="goods-attr t-omit">
  90. <text v-for="attr in goods.attr_list" :key="item.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
  91. </view>
  92. <view class="goods-num">x{{goods.num}}</view>
  93. <view class="goods-price">¥{{goods.total_price}}</view>
  94. </view>
  95. <view class="composition-open main-center">
  96. <view @click="toggle(idx)" class="composition-btn">
  97. <text>{{list.show ? '点击收起套餐详情' : '点击展开套餐详情'}}</text>
  98. <image v-if="!list.show" src="/static/image/icon/icon-down.png"></image>
  99. <image v-else src="/static/image/icon/icon-up.png"></image>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view :class="[`${!order.address && order.send_type != 1 ? 'goods-info card-info':'goods-info'}`]">
  105. <view v-if="order.sign != 'composition'">
  106. <view class="goods-title">自营商品</view>
  107. <view v-for="goods in order.detail" class="goods" :key="goods.id">
  108. <image class="goods-img" :src='goods.goods_info.goods_attr.pic_url ? goods.goods_info.goods_attr.pic_url : goods.goods_info.goods_attr.cover_pic'></image>
  109. <view class='t-omit-two goods-name'>{{goods.goods_info.goods_attr.name}}</view>
  110. <view class="goods-attr t-omit">
  111. <text v-for="attr in goods.attr_list" :key="item.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
  112. </view>
  113. <view class="goods-num">x{{goods.num}}</view>
  114. <view class="goods-price">¥{{goods.total_original_price}}</view>
  115. </view>
  116. </view>
  117. <view class="main-between price-item">
  118. <view class="price-label">商品总价</view>
  119. <view>¥{{ order.total_goods_original_price }}</view>
  120. </view>
  121. <view class="main-between price-item">
  122. <view class="price-label">运费</view>
  123. <view>¥{{ order.express_price }}</view>
  124. </view>
  125. <view class="main-between price-item" v-if="order.member_discount_price > 0">
  126. <view class="price-label">会员折扣</view>
  127. <view>-¥{{ order.member_discount_price }}</view>
  128. </view>
  129. <view class="main-between price-item" v-if="order.integral_deduction_price > 0">
  130. <view class="price-label">积分抵扣</view>
  131. <view>-¥{{ order.integral_deduction_price }}</view>
  132. </view>
  133. <view class="main-between price-item" v-if="order.coupon_discount_price > 0">
  134. <view class="price-label">优惠券抵扣</view>
  135. <view>-¥{{ order.coupon_discount_price }}</view>
  136. </view>
  137. <view v-if="order.plugin_data" class="main-between price-item" v-for="(pluginData,index) in order.plugin_data" :key="index">
  138. <view class="price-label">{{pluginData.label}}</view>
  139. <view>-¥{{ pluginData.value }}</view>
  140. </view>
  141. <view class="main-between price-item" style='margin-bottom: 0'>
  142. <view class="price-label total-label">订单总价</view>
  143. <view class="total-price">¥{{ order.total_pay_price }}</view>
  144. </view>
  145. <view v-if="order.refund_info.type == 1" class="refund-info">申请退款 ¥{{order.refund_info.refund_price}} <text v-if="order.refund_info.is_refund == 1"> 实际退款 ¥{{order.refund_info.reality_refund_price}}</text></view>
  146. </view>
  147. <view class='goods-info' v-if="showForm && status == 2">
  148. <view class='goods-title'>表单内容</view>
  149. <view v-for="(goods,idx) in order.detail" :class="['goods-form', `${idx == 0? 'more':''}`]" :key="goods.id">
  150. <view v-for="(item,index) in goods.form_data" v-if="item.value != null" :key="index" :class="[ `${item.key != 'img_upload' ? 'dir-left-nowrap' : ''}`,`price-item`]" >
  151. <view class="price-label">{{item.label}}:</view>
  152. <view v-if="item.key == 'img_upload'"><image v-show="!item.loadOver" @load="imageFormLoad(idx,index)" @click='look(item.value)' class="form-img" :src='item.value'></image></view>
  153. <view v-else>{{item.value}}</view>
  154. </view>
  155. </view>
  156. </view>
  157. <view class='goods-info mch-goods'>
  158. <view class='goods-title'>订单信息</view>
  159. <view class="dir-left-nowrap price-item">
  160. <view class="price-label">下单时间:</view>
  161. <view>{{order.created_at}}</view>
  162. </view>
  163. <view class="dir-left-nowrap price-item">
  164. <view class="price-label">订单号:</view>
  165. <view>{{order.order_no}}</view>
  166. </view>
  167. <view class="dir-left-nowrap price-item" v-if="order.words || order.seller_remark">
  168. <view class="price-label">商家备注:</view>
  169. <view>{{order.words || order.seller_remark}}</view>
  170. </view>
  171. <view class="dir-left-nowrap price-item" v-if="order.remark">
  172. <view class="price-label">买家订单留言:</view>
  173. <view>{{order.remark}}</view>
  174. </view>
  175. <view v-if="order.detailExpress.length == 1 && (order.detailExpress[0].merchant_remark || order.detailExpress[0].express_contentd)" class="dir-left-nowrap price-item">
  176. <view class="price-label">卖家物流留言:</view>
  177. <view>{{order.detailExpress[0].merchant_remark || order.detailExpress[0].express_content}}</view>
  178. </view>
  179. <view class="dir-left-nowrap price-item">
  180. <view class="price-label">支付方式:</view>
  181. <view v-if="order.pay_type == 1">线上支付</view>
  182. <view v-else-if="order.pay_type == 3">余额支付</view>
  183. <view v-else-if="order.pay_type == 2">货到付款</view>
  184. <view v-else>未支付</view>
  185. </view>
  186. <view class="dir-left-nowrap price-item" v-if="order.sign != 'vip_card'">
  187. <view class="price-label">收货方式:</view>
  188. <view v-if="order.send_type == 1">到店自提</view>
  189. <view v-if="order.send_type == 0">快递配送</view>
  190. <view v-if="order.send_type == 2">同城配送</view>
  191. </view>
  192. <view v-for="(item,index) in order.order_form" v-if="item.value != null" :key="index" class="dir-left-nowrap price-item">
  193. <view class="price-label">{{item.label}}:</view>
  194. <view v-if="item.key == 'img_upload'"><image v-show="!item.loadOver" @load="imageLoad(index)" @click='look(item.value)' class="form-img" :src='item.value'></image></view>
  195. <view v-else>{{item.value}}</view>
  196. </view>
  197. </view>
  198. <view class='goods-info' v-if="showForm && status == 1">
  199. <view class='goods-title'>表单内容</view>
  200. <view v-for="(goods,idx) in order.detail" :class="['goods-form', `${idx == 0? 'more':''}`]" :key="goods.id">
  201. <view class="goods">
  202. <image class="goods-img" :src='goods.goods_info.goods_attr.pic_url ? goods.goods_info.goods_attr.pic_url : goods.goods_info.goods_attr.cover_pic'></image>
  203. <view class='t-omit-two goods-name'>{{goods.goods_info.goods_attr.name}}</view>
  204. <view class="goods-attr t-omit">
  205. <text v-for="attr in goods.attr_list" :key="item.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
  206. </view>
  207. <view class="goods-num">x{{goods.num}}</view>
  208. <view class="goods-price">¥{{goods.total_original_price}}</view>
  209. </view>
  210. <view v-for="(item,index) in goods.form_data" v-if="item.value != null" :key="index" :class="[ `${item.key != 'img_upload' ? 'dir-left-nowrap' : ''}`,`price-item`]" >
  211. <view class="price-label">{{item.label}}:</view>
  212. <view v-if="item.key == 'img_upload'"><image v-show="!item.loadOver" @load="imageFormLoad(idx,index)" @click='look(item.value)' class="form-img" :src='item.value'></image></view>
  213. <view v-else>{{item.value}}</view>
  214. </view>
  215. </view>
  216. </view>
  217. <view :class="['bottom-place', `${iphone_x? 'iphone_x':''}`]"></view>
  218. <view :class="['dir-right-nowrap','btn', `${iphone_x ? 'iphone_x':''}`]" v-if="order.is_sale != 1 || status == 2">
  219. <view @click="toAgreeCancel(order)" v-if="order.cancel_status == 2" class="handle-btn other">同意</view>
  220. <view @click="beNotRefund(order)" v-if="order.cancel_status == 2" class="handle-btn">拒绝</view>
  221. <view @click="toChange(order)" v-if="order.cancel_status == 0 && order.is_pay == 0 && order.is_send == 0" class="handle-btn other">修改价格</view>
  222. <view @click.stop="toConfirm(order)" v-if="order.cancel_status == 0 && order.is_confirm == 0 && order.is_send == 1 && order.is_confirm_show == 1" class="handle-btn other">确认收货</view>
  223. <view @click="toSend(order)" v-if="order.address && order.cancel_status == 0 && order.is_send == 0 && order.is_pay == 1" class="handle-btn other">发货</view>
  224. <view @click="toSend(order)" v-else-if="order.address && order.cancel_status == 0 && order.is_send == 0 && order.pay_type == 2" class="handle-btn other">发货</view>
  225. <view open-type="navigate" @click="toExpress(order,2)" v-if="order.cancel_status == 0 && order.is_send == 1 && order.is_confirm == 0 && order.express && status != 2" class="handle-btn other">修改物流信息</view>
  226. <view open-type="navigate" @click="toChangeAddress(order)" v-if="order.address && order.cancel_status == 0 && order.is_send == 0 && order.is_pay == 1" class="handle-btn">修改地址</view>
  227. <view @click="toCancelorder(order)" v-if="order.sign != 'gift' && order.is_send == 0 && order.cancel_status == 0" class="handle-btn">取消订单</view>
  228. <view @click.stop="toConfirm(detail)" v-if="order.refund == '退货退款 买家已发货' || order.refund == '已发货,待商家处理'" class="handle-btn other">确认收货</view>
  229. <view @click.stop="toRefund(detail)" v-if="order.refund == '退货退款 待卖家退款'" class="handle-btn other">退款</view>
  230. <view @click="toSend(detail)" v-if="order.refund == '换货 买家已发货'" class="handle-btn other">发货</view>
  231. <view @click.stop="refundHandle(2,detail,1)" v-if="status == 2 && detail.status == 2 && order.refund != '换货 卖家已发货' && order.refund != '退货退款 卖家已退款'" :class="['handle-btn',`${order.refund == '换货 买家已发货' || order.refund == '退货退款 买家已发货'?'':'other'}`]">取消售后</view>
  232. <view @click="refundHandle(1,detail)" v-if="status == 2 && detail.status == 1" class="handle-btn other">同意</view>
  233. <view @click="refundHandle(2,detail)" v-if="status == 2 && detail.status == 1" class="handle-btn">拒绝</view>
  234. <view @click="lookAbout(detail)" v-if="status == 2" class="handle-btn">售后理由</view>
  235. </view>
  236. <view class="bg cross-center" v-if="chooseTime || isRefund || noRefund || changePrice || cancelOrder || callPhone || isSend || notRefund || isReason || openAddress || noAddress || confirmOrder">
  237. <!-- 退款 -->
  238. <view class="dialog" v-if="isRefund">
  239. <view class="dialog-title">退款</view>
  240. <view class="main-center refund-pay" v-if="status == 1">¥{{detail.total_pay_price}}</view>
  241. <view class="main-center cross-center refund-pay" v-if="status == 2">¥
  242. <input class="refund-price" type='digit' v-model="refund_price"></input>
  243. </view>
  244. <view class="main-center refund-tip">是否确认退款给买家</view>
  245. <view class="main-center btn-area">
  246. <view class="submit-btn" @click='cancel'>取消</view>
  247. <view class="line"></view>
  248. <view class="submit-btn be-submit" v-if="status == 1" @click='cancelSubmit'>确认</view>
  249. <view class="submit-btn be-submit" v-if="status == 2" @click='agree'>确认</view>
  250. </view>
  251. </view>
  252. <view class="dialog-bg" :style="{'display': `${noRefund || notRefund ? 'block' : 'none'}`}"></view>
  253. <!-- 拒绝退款 -->
  254. <view class="dialog" v-if="noRefund || notRefund">
  255. <view v-if="noRefund" class="dialog-title">拒绝取消</view>
  256. <view v-if="notRefund" class="dialog-title">拒绝售后</view>
  257. <textarea fixed class="textarea" bindinput="toAbout" placeholder="请输入拒绝理由" placeholder-style="color:#999999;font-size:14px" auto-focus />
  258. <view class="main-center btn-area">
  259. <view class="submit-btn" @click='cancel'>取消</view>
  260. <view class="line"></view>
  261. <view v-if="noRefund" class="submit-btn be-submit" @click='noCancel'>确认</view>
  262. <view v-if="notRefund" class="submit-btn be-submit" @click='decline(0)'>确认</view>
  263. </view>
  264. </view>
  265. <!-- 改价 -->
  266. <view class="dialog" v-if="changePrice">
  267. <view class="dialog-title">修改价格</view>
  268. <view class="dir-left-nowrap change-price-item">
  269. <view class="label">商品总价</view>
  270. <view class="money">¥</view>
  271. <input type="digit" class="price-input" @input="priceInput" focus v-model='price'></input>
  272. </view>
  273. <view class="dir-left-nowrap change-price-item">
  274. <view class="label">运费</view>
  275. <view class="money">¥</view>
  276. <input type="digit" class="price-input" @input="expressInput" v-model='express'></input>
  277. </view>
  278. <view class="dir-left-nowrap change-price-item">
  279. <view class="label">合计</view>
  280. <view class="change-total-price">{{total}}</view>
  281. </view>
  282. <view class="main-center btn-area">
  283. <view class="submit-btn" @click='cancel'>取消</view>
  284. <view class="line"></view>
  285. <view class="submit-btn be-submit" @click='submitChange'>确认</view>
  286. </view>
  287. </view>
  288. <!-- 售后确认收货 -->
  289. <view class="dialog" v-if="confirmOrder">
  290. <view class="main-center cancel-tip">是否确认收货?</view>
  291. <view class="main-center btn-area">
  292. <view class="submit-btn" @click='cancel'>取消</view>
  293. <view class="line"></view>
  294. <view class="submit-btn be-submit" v-if="status == 1" @click='beOrderConfirm'>确认</view>
  295. <view class="submit-btn be-submit" v-else @click='beConfirm'>确认</view>
  296. </view>
  297. </view>
  298. <!-- 取消订单 -->
  299. <view class="dialog" v-if="cancelOrder">
  300. <view class="main-center cancel-tip">确定取消该订单?</view>
  301. <view class="main-center btn-area">
  302. <view class="submit-btn" @click='cancel'>取消</view>
  303. <view class="line"></view>
  304. <view class="submit-btn be-submit" @click='cancelSubmit'>确认</view>
  305. </view>
  306. </view>
  307. <!-- 打电话 -->
  308. <view class="dialog" v-if="callPhone">
  309. <view class="main-center cancel-tip">{{mobile}}</view>
  310. <view class="main-center btn-area">
  311. <view class="submit-btn" @click='cancel'>取消</view>
  312. <view class="line"></view>
  313. <view class="submit-btn be-submit" @click='call'>确认</view>
  314. </view>
  315. </view>
  316. <!-- 理由 -->
  317. <view class="dialog" v-if="isReason">
  318. <view class="dialog-title">售后理由</view>
  319. <view class="reason">
  320. <view class="reason-title">申请原因</view>
  321. <view class="reason-content">{{detail.remark}}</view>
  322. <view v-if="detail.pic_list.length > 0" class="reason-title">图片</view>
  323. <view class="dir-left-wrap reason-img" v-if="detail.pic_list.length > 0">
  324. <image @click='look(item)' v-for="item in detail.pic_list" :key="item" :src="item"></image>
  325. </view>
  326. </view>
  327. <view class="main-center btn-area other-btn-area">
  328. <view class="submit-btn be-submit" @click='cancel'>确认</view>
  329. </view>
  330. </view>
  331. <!-- 提示 -->
  332. <view class="dialog" v-if="noAddress">
  333. <view class="main-center dir-top-nowrap cancel-tip" style="text-align: center">
  334. <view>您还没有退货地址</view>
  335. <view>请先设置</view>
  336. </view>
  337. <view class="main-center btn-area">
  338. <view class="submit-btn" @click='noAddress=false'>取消</view>
  339. <view class="line"></view>
  340. <view class="submit-btn be-submit" @click='toRefundAdd'>去设置</view>
  341. </view>
  342. </view>
  343. <!-- 选地址 -->
  344. <view class="dialog" v-if="openAddress">
  345. <view class="dialog-title">选择退货地址</view>
  346. <view class="add-list">
  347. <view class="add-item" v-for="item in address" :key="item.id">
  348. <image class="add-active" v-if="item.id == addressId" @click='chooseAddress(item.id)' src="./../image/active.png"></image>
  349. <image class="add-active" v-else @click='chooseAddress(item.id)' src="/static/image/icon/form-er.png"></image>
  350. <view @click='chooseAddress(item.id)' class="add-info">
  351. <view class="main-between">
  352. <view class="add-name">{{item.name}}</view>
  353. <view>{{item.mobile}}</view>
  354. </view>
  355. <view>{{item.address_detail}}</view>
  356. </view>
  357. </view>
  358. </view>
  359. <view class="main-center btn-area other-btn-area">
  360. <view class="submit-btn" @click='cancel'>取消</view>
  361. <view class="line"></view>
  362. <view class="submit-btn be-submit" @click='decline(1)'>确认</view>
  363. </view>
  364. </view>
  365. <!-- 选择配送员 -->
  366. <view class="dialog" v-if="isSend && order.send_type == 2">
  367. <view class="dialog-title">选择配送员</view>
  368. <view class="add-list">
  369. <view class="add-item delivery-item" v-for="item in cityList" :key="item">
  370. <view @click='chooseDelivery(item)' class="add-info">
  371. <view class="main-between">
  372. <view class="add-name">{{item.name}}</view>
  373. <image v-if="item.id == deliveryId" @click='chooseDelivery(item)' src="./../image/active.png"></image>
  374. <image v-else @click='chooseDelivery(item)' src="/static/image/icon/form-er.png"></image>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. <view class="main-center btn-area other-btn-area">
  380. <view class="submit-btn" @click='cancel'>取消</view>
  381. <view class="line"></view>
  382. <view class="submit-btn be-submit" @click='toSendType'>确认</view>
  383. </view>
  384. </view>
  385. </view>
  386. </app-layout>
  387. </template>
  388. <script>
  389. import { mapState } from "vuex";
  390. export default {
  391. data() {
  392. return {
  393. order: {
  394. total_pay_price: '',
  395. express_price: '',
  396. total_goods_price: '',
  397. },
  398. noAddress: false,
  399. cancelRefund: false,
  400. addressId: '0',
  401. notRefund: false,
  402. isRefund: false,
  403. openAddress: false,
  404. isReason: false,
  405. confirmOrder: false,
  406. cityList: [],
  407. deliveryId: '0',
  408. delivery: '',
  409. active: null,
  410. show: false,
  411. start: [],
  412. end: [],
  413. search: false,
  414. keyword: '',
  415. list: [],
  416. candidate: [],
  417. date_start: '',
  418. date_end: '',
  419. time: 0,
  420. inSearch: false,
  421. address: [],
  422. today: '',
  423. yesterday: '',
  424. weekday: '',
  425. chooseTime: false,
  426. noRefund: false,
  427. cancelOrder: false,
  428. detail: {},
  429. changePrice: false,
  430. callPhone: false,
  431. custom: false,
  432. mobile: '',
  433. isSend: false,
  434. sendType: 0,
  435. price: 0,
  436. express: 0,
  437. total: 0,
  438. about: '',
  439. reset_time: 0,
  440. dd: 0,
  441. hh: 0,
  442. mm: 0,
  443. status: 1,
  444. refund_price: 0,
  445. showForm: false,
  446. first: true,
  447. iphone_x: false
  448. }
  449. },
  450. computed: {
  451. ...mapState({
  452. theme: state => state.mallConfig.theme,
  453. userInfo: state => state.user.info,
  454. adminImg: state => state.mallConfig.__wxapp_img.app_admin,
  455. })
  456. },
  457. methods: {
  458. toggle(index) {
  459. this.order.composition_list[index].show = !this.order.composition_list[index].show;
  460. },
  461. openMap() {
  462. let location = this.order.location.split(',');
  463. console.log(location)
  464. uni.openLocation({
  465. latitude: +location[1],
  466. longitude: +location[0],
  467. success: function () {
  468. console.log('success');
  469. }
  470. });
  471. },
  472. beConfirm(item) {
  473. let that = this;
  474. that.$request({
  475. url: that.$api.app_admin.shou_huo,
  476. data: {
  477. refund_order_id: that.detail.id
  478. },
  479. method: 'post'
  480. }).then(response=>{
  481. that.$hideLoading();
  482. if(response.code == 0) {
  483. that.list = [];
  484. that.cancel();
  485. that.getList();
  486. }else {
  487. uni.showToast({
  488. title: response.msg,
  489. icon: 'none',
  490. duration: 1000
  491. });
  492. }
  493. }).catch(response => {
  494. that.$hideLoading();
  495. });
  496. },
  497. beOrderConfirm() {
  498. let that = this;
  499. that.$request({
  500. url: that.$api.app_admin.confirm,
  501. data: {
  502. order_id: that.detail.id
  503. },
  504. method: 'post'
  505. }).then(response=>{
  506. that.$hideLoading();
  507. if(response.code == 0) {
  508. uni.showToast({
  509. title: response.msg,
  510. duration: 1000,
  511. type: 'success',
  512. mask: false
  513. });
  514. that.cancel();
  515. setTimeout(v=>{
  516. that.list = [];
  517. uni.showLoading({
  518. title: '加载中...'
  519. });
  520. that.getList();
  521. },1000)
  522. }else {
  523. uni.showToast({
  524. title: response.msg,
  525. icon: 'none',
  526. duration: 1000
  527. });
  528. }
  529. }).catch(response => {
  530. that.$hideLoading();
  531. });
  532. },
  533. toConfirm(e) {
  534. this.detail = e;
  535. this.confirmOrder = !this.confirmOrder;
  536. },
  537. imageLoad(index) {
  538. this.order.order_form[index].loadOver = false;
  539. },
  540. imageFormLoad(idx,index) {
  541. this.order.detail[idx].form_data[index].loadOver = false;
  542. },
  543. toExpressMore(item) {
  544. uni.navigateTo({
  545. url: '/pages/order/express-list/express-list?order_id='+item.id
  546. })
  547. },
  548. toExpressInfo(item) {
  549. uni.navigateTo({
  550. url: '/pages/app_admin/express/express?id='+item.id+'&express='+item.detailExpress[0].express+'&express_no='+item.detailExpress[0].express_no+'&customer_name='+item.detailExpress[0].customer_name
  551. })
  552. },
  553. toRefundAdd() {
  554. this.noAddress = false;
  555. uni.navigateTo({
  556. url: `/pages/address/address?manual_btn_bg=#446dfd&is_hide_default_btn=1&is_refund_address=1`
  557. })
  558. },
  559. copy() {
  560. let address = `${this.order.name} ${this.order.mobile} ${this.order.address}`;
  561. uni.setClipboardData({
  562. data: address,
  563. success() {
  564. uni.hideToast();
  565. uni.getClipboardData({
  566. success() {
  567. uni.showToast({
  568. title: '复制成功',
  569. duration: 1000,
  570. icon: 'none'
  571. });
  572. }
  573. })
  574. }
  575. })
  576. },
  577. getAddress() {
  578. let that = this;
  579. that.$request({
  580. url: that.$api.app_admin.refund_address
  581. }).then(response => {
  582. that.$hideLoading();
  583. if (response.code == 0) {
  584. that.address = response.data.list;
  585. } else {
  586. uni.showToast({
  587. title: response.msg,
  588. icon: 'none',
  589. duration: 1000
  590. });
  591. }
  592. }).catch(response => {
  593. that.$hideLoading();
  594. uni.showToast({
  595. title: response,
  596. icon: 'none',
  597. duration: 1000
  598. });
  599. });
  600. },
  601. look(e) {
  602. uni.previewImage({
  603. current: e, // 当前显示图片的http链接
  604. urls: [e] // 需要预览的图片http链接列表
  605. })
  606. },
  607. toChangeAddress(item) {
  608. uni.navigateTo({
  609. url: '/pages/app_admin/change-add/change-add?order_no='+item.order_no
  610. })
  611. },
  612. agree() {
  613. let that = this;
  614. uni.showLoading({
  615. title: '处理中...'
  616. });
  617. if (that.detail.refund_price > 0) {
  618. that.$request({
  619. url: that.$api.app_admin.refund_handle,
  620. data: {
  621. order_refund_id: that.detail.id,
  622. type: that.detail.type,
  623. is_agree: 1,
  624. refund_price: that.refund_price,
  625. merchant_remark: that.about
  626. },
  627. method: 'post'
  628. }).then(response => {
  629. that.$hideLoading();
  630. if (response.code == 0) {
  631. uni.showModal({
  632. title: '提示',
  633. content: response.msg,
  634. showCancel: false,
  635. success: function (res) {
  636. if (res.confirm) {
  637. that.list = [];
  638. that.notRefund = false;
  639. that.openAddress = false;
  640. that.isRefund = false;
  641. that.addressId = 0;
  642. that.getList();
  643. }
  644. }
  645. });
  646. } else {
  647. uni.showToast({
  648. title: response.msg,
  649. icon: 'none',
  650. duration: 1000
  651. });
  652. }
  653. }).catch(response => {
  654. uni.hideLoading();
  655. uni.showToast({
  656. title: response,
  657. icon: 'none',
  658. duration: 1000
  659. });
  660. });
  661. } else {
  662. uni.showToast({
  663. title: '退款金额需大于零',
  664. icon: 'none',
  665. duration: 1000
  666. });
  667. }
  668. },
  669. getTime() {
  670. let reset_time = this.reset_time - 1;
  671. let dd = 0;
  672. let hh = parseInt(reset_time / 3600);
  673. if (reset_time > 86400) {
  674. dd = parseInt(reset_time / 86400);
  675. hh = parseInt((reset_time - 86400 * dd) / 3600);
  676. }
  677. let h = reset_time % 3600;
  678. let mm = parseInt(h / 60);
  679. if (hh < 10) {
  680. hh = '0' + hh.toString();
  681. }
  682. if (mm < 10) {
  683. mm = '0' + mm.toString();
  684. }
  685. this.reset_time = reset_time;
  686. this.dd = dd;
  687. this.hh = hh;
  688. this.mm = mm;
  689. },
  690. toSendType() {
  691. let that = this;
  692. let para;
  693. if (that.sendType == 1 || that.order.send_type == 2) {
  694. uni.showLoading({
  695. title: '加载中...'
  696. });
  697. para = {
  698. is_express: 0,
  699. words: '',
  700. order_id: that.detail.id
  701. };
  702. if(that.order.send_type == 2) {
  703. para.man = that.delivery;
  704. }
  705. that.$request({
  706. url: that.$api.app_admin.send,
  707. data: para,
  708. method: 'post'
  709. }).then(response => {
  710. console.log(response)
  711. uni.hideLoading();
  712. if (response.code == 0) {
  713. uni.showToast({
  714. title: response.msg,
  715. type: 'success',
  716. mask: false,
  717. duration: 2000
  718. });
  719. that.list = [];
  720. that.page = 1;
  721. that.isSend = false;
  722. that.sendType = 0;
  723. that.getList();
  724. } else {
  725. uni.showToast({
  726. title: response.msg,
  727. icon: 'none',
  728. duration: 1000
  729. });
  730. }
  731. }).catch(response => {
  732. uni.hideLoading();
  733. uni.showToast({
  734. title: response,
  735. icon: 'none',
  736. duration: 1000
  737. });
  738. });
  739. }
  740. },
  741. toExpress(e,is_send) {
  742. let id = e.id;
  743. let order_refund_id = e.refund;
  744. if (id > 0) {
  745. uni.navigateTo({
  746. url: '/pages/app_admin/send/send?id=' + id + '&is_send=' + is_send
  747. })
  748. } else if (order_refund_id) {
  749. uni.navigateTo({
  750. url: '/pages/app_admin/send/send?order_refund_id=' + order_refund_id + '&is_send=' + is_send
  751. })
  752. }
  753. },
  754. getList() {
  755. let that = this;
  756. that.about = '';
  757. uni.showLoading({
  758. title: '加载中...'
  759. });
  760. that.$request({
  761. url: that.$api.app_admin.detail,
  762. data: {
  763. order_id: that.id
  764. },
  765. method: 'post'
  766. }).then(response=>{
  767. uni.hideLoading();
  768. if(response.code == 0) {
  769. let order = response.data.order;
  770. if(order.send_type == 2) {
  771. that.getDelivery();
  772. }
  773. order.address = order.address.replace(/\s*/g, "");
  774. let reset_time = 0;
  775. if (order.auto_cancel > 0) {
  776. reset_time = order.auto_cancel;
  777. } else if (order.auto_confirm > 0) {
  778. reset_time = order.auto_confirm;
  779. } else if (order.auto_sales > 0) {
  780. reset_time = order.auto_sales;
  781. }
  782. if (order.refund_info.id > 0) {
  783. order.refund_info.pic_list = JSON.parse(order.refund_info.pic_list)
  784. that.detail = order.refund_info
  785. }
  786. if(that.first) {
  787. if(order.order_form !=null && order.order_form.length > 0) {
  788. for(let i = 0;i < order.order_form.length;i++) {
  789. if(order.order_form[i].key == 'img_upload') {
  790. order.order_form[i].loadOver = true;
  791. }
  792. }
  793. }
  794. that.first = false;
  795. }
  796. for(let i in order.detail) {
  797. if(order.detail[i].form_data != null && order.detail[i].form_data.length > 0) {
  798. that.showForm = true;
  799. }
  800. }
  801. that.order = order;
  802. that.reset_time = reset_time;
  803. setInterval(function() {
  804. that.getTime();
  805. }, 1000)
  806. }else {
  807. uni.showToast({
  808. title: response.msg,
  809. icon: 'none',
  810. duration: 1000
  811. });
  812. }
  813. }).catch(response => {
  814. uni.hideLoading();
  815. });
  816. },
  817. getDelivery() {
  818. let that = this;
  819. that.$request({
  820. url: that.$api.app_admin.delivery
  821. }).then(response=>{
  822. if(response.code == 0) {
  823. this.cityList = response.data.list;
  824. this.deliveryId = response.data.list[0].id;
  825. this.delivery = "(" + response.data.list[0].id + ")" + response.data.list[0].name
  826. }else {
  827. uni.showToast({
  828. title: response.msg,
  829. icon: 'none',
  830. duration: 1000
  831. });
  832. }
  833. }).catch(response => {
  834. uni.hideLoading();
  835. });
  836. },
  837. toCall(e) {
  838. this.mobile = e;
  839. this.callPhone = !this.callPhone;
  840. },
  841. decline(type) {
  842. let that = this;
  843. if (type == 1) {
  844. if (that.addressId < 1) {
  845. uni.showToast({
  846. title: '请选择地址',
  847. icon: 'none',
  848. duration: 1000
  849. });
  850. return false;
  851. }
  852. }
  853. if (that.cancelRefund) {
  854. type = 2;
  855. }
  856. uni.showLoading({
  857. title: '处理中...'
  858. });
  859. that.$request({
  860. url: that.$api.app_admin.refund_handle,
  861. data: {
  862. order_refund_id: that.detail.id,
  863. type: that.detail.type,
  864. is_agree: type,
  865. address_id: that.addressId,
  866. refund_price: that.detail.refund_price,
  867. merchant_remark: that.about
  868. },
  869. method: 'post'
  870. }).then(response => {
  871. uni.hideLoading();
  872. if (response.code == 0) {
  873. uni.showModal({
  874. title: '提示',
  875. content: response.msg,
  876. showCancel: false,
  877. success: function (res) {
  878. if (res.confirm) {
  879. that.list = [];
  880. that.notRefund = false;
  881. that.cancelOrder = false;
  882. that.openAddress = false;
  883. that.addressId = 0;
  884. that.getList();
  885. }
  886. }
  887. });
  888. } else {
  889. uni.showToast({
  890. title: response.msg,
  891. icon: 'none',
  892. duration: 1000
  893. });
  894. }
  895. }).catch(response => {
  896. uni.hideLoading();
  897. uni.showToast({
  898. title: response,
  899. icon: 'none',
  900. duration: 1000
  901. });
  902. });
  903. },
  904. call() {
  905. uni.makePhoneCall({
  906. phoneNumber: this.mobile
  907. })
  908. this.callPhone = !this.callPhone;
  909. },
  910. toRefund(e) {
  911. this.detail = e;
  912. this.refund_price = e.refund_price;
  913. this.isRefund = !this.isRefund;
  914. },
  915. // 取消
  916. cancel() {
  917. this.about = '';
  918. this.date_start = '';
  919. this.date_end = '';
  920. this.isRefund = false;
  921. this.chooseTime = false;
  922. this.noRefund = false;
  923. this.changePrice = false;
  924. this.cancelOrder = false;
  925. this.callPhone = false;
  926. this.isSend = false;
  927. this.notRefund = false;
  928. this.openAddress = false;
  929. this.isReason = false;
  930. this.confirmOrder = false;
  931. this.addressId = 0;
  932. },
  933. noCancel() {
  934. let that = this;
  935. uni.showLoading({
  936. title: '处理中...'
  937. });
  938. that.$request({
  939. url: that.$api.apiUrl.app_admin.cancel,
  940. data: {
  941. status: 2,
  942. remark: that.about,
  943. order_id: that.detail.id
  944. },
  945. method: 'post'
  946. }).then(response => {
  947. uni.hideLoading();
  948. if (response.code == 0) {
  949. uni.showToast({
  950. title: response.msg,
  951. type: 'success',
  952. mask: false,
  953. duration: 2000
  954. });
  955. that.noRefund = false;
  956. that.getList();
  957. } else {
  958. uni.showToast({
  959. title: response.msg,
  960. icon: 'none',
  961. duration: 1000
  962. });
  963. }
  964. }).catch(response => {
  965. uni.hideLoading();
  966. uni.showToast({
  967. title: response,
  968. icon: 'none',
  969. duration: 1000
  970. });
  971. });
  972. },
  973. cancelSubmit() {
  974. let that = this;
  975. uni.showLoading({
  976. title: '加载中...'
  977. });
  978. that.$request({
  979. url: that.$api.app_admin.cancel,
  980. data: {
  981. status: 1,
  982. remark: '',
  983. order_id: that.detail.id
  984. },
  985. method: 'post'
  986. }).then(response => {
  987. uni.hideLoading();
  988. if (response.code == 0) {
  989. uni.showToast({
  990. title: '取消成功',
  991. duration: 2000,
  992. type: 'success',
  993. mask: false
  994. });
  995. that.list = [];
  996. that.isRefund = false;
  997. that.cancelOrder = false;
  998. that.page = 1;
  999. that.getList();
  1000. } else {
  1001. uni.showToast({
  1002. title: response.msg,
  1003. icon: 'none',
  1004. duration: 1000
  1005. });
  1006. }
  1007. }).catch(response => {
  1008. uni.hideLoading();
  1009. uni.showToast({
  1010. title: response,
  1011. icon: 'none',
  1012. duration: 1000
  1013. });
  1014. });
  1015. },
  1016. lookAbout(e) {
  1017. this.detail = e;
  1018. this.isReason = true;
  1019. },
  1020. chooseAddress(e) {
  1021. if (this.addressId == e) {
  1022. this.addressId = ''
  1023. }else {
  1024. this.addressId = e
  1025. }
  1026. },
  1027. chooseDelivery(e) {
  1028. if (this.getDeliveryId == e.id) {
  1029. this.deliveryId = ''
  1030. }else {
  1031. this.deliveryId = e.id
  1032. this.delivery = "(" + e.id + ")" + e.name;
  1033. }
  1034. },
  1035. refundHandle(type,detail,cancel) {
  1036. if (cancel == 1) {
  1037. this.cancelRefund = true;
  1038. }
  1039. if (type == 1) {
  1040. if (this.address.length == 0) {
  1041. this.noAddress = true;
  1042. } else {
  1043. this.detail = detail;
  1044. this.openAddress = true;
  1045. }
  1046. } else if (type == 2) {
  1047. this.detail = detail;
  1048. this.notRefund = true;
  1049. }
  1050. },
  1051. beNotRefund(e) {
  1052. this.detail = e;
  1053. this.noRefund = !this.noRefund;
  1054. },
  1055. toCancelorder(e) {
  1056. this.detail = e;
  1057. this.cancelOrder = !this.cancelOrder;
  1058. },
  1059. // 确认修改价格
  1060. submitChange() {
  1061. let that = this;
  1062. uni.showLoading({
  1063. title: '提交中...'
  1064. });
  1065. if (that.price > -0.01 && that.express > -0.01) {
  1066. that.$request({
  1067. url: that.$api.app_admin.update_price,
  1068. data: {
  1069. order_id: that.detail.id,
  1070. total_price: that.price,
  1071. express_price: that.express
  1072. },
  1073. method: 'post'
  1074. }).then(response => {
  1075. uni.hideLoading();
  1076. if (response.code == 0) {
  1077. uni.showToast({
  1078. title: response.msg,
  1079. duration: 2000,
  1080. type: 'success',
  1081. mask: false
  1082. });
  1083. that.changePrice = false;
  1084. that.getList();
  1085. } else {
  1086. uni.showToast({
  1087. title: response.msg,
  1088. icon: 'none',
  1089. duration: 1000
  1090. });
  1091. }
  1092. }).catch(response => {
  1093. uni.hideLoading();
  1094. uni.showToast({
  1095. title: response,
  1096. icon: 'none',
  1097. duration: 1000
  1098. });
  1099. });
  1100. } else {
  1101. if (!that.price || typeof(that.price) != 'number') {
  1102. uni.showToast({
  1103. title: '商品总价必须大于等于0',
  1104. icon: 'none',
  1105. duration: 1000
  1106. });
  1107. } else if (!that.express || typeof(that.express) != 'number') {
  1108. uni.showToast({
  1109. title: '运费必须大于等于0',
  1110. icon: 'none',
  1111. duration: 1000
  1112. });
  1113. }
  1114. }
  1115. },
  1116. toSend(e) {
  1117. this.detail = e;
  1118. if(this.detail.send_type != 2) {
  1119. if (this.detail.status_cn) {
  1120. uni.navigateTo({
  1121. url: '/pages/app_admin/send/send?order_refund_id=' + this.detail.id
  1122. })
  1123. } else {
  1124. uni.navigateTo({
  1125. url: '/pages/app_admin/send/send?id=' + this.detail.id
  1126. })
  1127. }
  1128. }else {
  1129. this.isSend = true;
  1130. }
  1131. },
  1132. toChange(e) {
  1133. this.detail = e;
  1134. this.changePrice = !this.changePrice;
  1135. this.price = e.total_goods_price;
  1136. this.express = e.express_price;
  1137. this.total = '¥' + e.total_pay_price;
  1138. },
  1139. priceInput: function(e) {
  1140. if (e.detail.value > -0.01) {
  1141. this.total = '¥' + (+e.detail.value + +this.express).toFixed(2)
  1142. } else {
  1143. this.total = '数据有误'
  1144. }
  1145. },
  1146. expressInput: function(e) {
  1147. if (e.detail.value > -0.01) {
  1148. this.total = '¥' + (+e.detail.value + +this.price).toFixed(2)
  1149. } else {
  1150. this.total = '数据有误'
  1151. }
  1152. },
  1153. toAgreeCancel(e) {
  1154. this.detail = e;
  1155. this.isRefund = !this.isRefund;
  1156. },
  1157. },
  1158. onShow: function() {
  1159. this.getList();
  1160. },
  1161. onLoad(options) {
  1162. let that = this;
  1163. uni.getSystemInfo({
  1164. success: function (res) {
  1165. if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
  1166. that.iphone_x = true;
  1167. }
  1168. }
  1169. })
  1170. that.id = options.id;
  1171. that.status = options.status;
  1172. that.getAddress();
  1173. }
  1174. }
  1175. </script>
  1176. <style scoped lang="scss">
  1177. .goods-form {
  1178. border-top: 2rpx solid #e2e2e2;
  1179. margin-top: #{20rpx};
  1180. .price-label {
  1181. margin-right: #{10rpx};
  1182. }
  1183. }
  1184. .goods-form.more {
  1185. border-top: 0;
  1186. margin-top: #{10rpx};
  1187. }
  1188. .sc {
  1189. position: relative;
  1190. margin: #{24rpx};
  1191. background-color: #fff;
  1192. padding: #{24rpx};
  1193. border-radius: #{16rpx};
  1194. .sc-info {
  1195. padding-right: #{120rpx};
  1196. width: 100%;
  1197. .sc-icon {
  1198. height: #{72rpx};
  1199. width: #{72rpx};
  1200. margin-right: #{24rpx};
  1201. }
  1202. .sc-about {
  1203. font-size: #{24rpx};
  1204. color: #999999;
  1205. .sc-person {
  1206. margin-top: #{10rpx};
  1207. color: #666666;
  1208. font-size: #{28rpx};
  1209. .sc-name {
  1210. margin-right: #{16rpx};
  1211. }
  1212. }
  1213. }
  1214. }
  1215. .sc-to-call {
  1216. position: absolute;
  1217. top: 50%;
  1218. right: 0;
  1219. margin-top: #{-28rpx};
  1220. height: #{56rpx};
  1221. width: #{120rpx};
  1222. border-left: #{2rpx} solid #e2e2e2;
  1223. image {
  1224. height: #{40rpx};
  1225. width: #{40rpx};
  1226. }
  1227. }
  1228. }
  1229. .dialog-bg {
  1230. width: 100%;
  1231. height: 100%;
  1232. position: fixed;
  1233. background-color: rgba(0, 0, 0, 0.5);
  1234. left: 0;
  1235. top: 0;
  1236. }
  1237. .composition {
  1238. padding: 0;
  1239. margin-bottom: #{4rpx};
  1240. .composition-item {
  1241. background-color: #fff;
  1242. margin: #{24rpx};
  1243. padding: #{24rpx};
  1244. padding-top: 0;
  1245. border-radius: #{16rpx};
  1246. margin-bottom: #{20rpx};
  1247. .composition-open {
  1248. text-align: center;
  1249. background-color: #fff;
  1250. height: #{84rpx};
  1251. .composition-btn {
  1252. display: inline-block;
  1253. border: #{2rpx} solid #bbbbbb;
  1254. font-size: #{24rpx};
  1255. color: #999999;
  1256. padding: 0 #{24rpx};
  1257. margin: #{12rpx} 0 #{16rpx};
  1258. height: #{56rpx};
  1259. line-height: #{54rpx};
  1260. border-radius: #{28rpx};
  1261. image {
  1262. width: #{22rpx};
  1263. height: #{12rpx};
  1264. margin-left: #{16rpx};
  1265. }
  1266. }
  1267. }
  1268. .goods-list {
  1269. padding: 0 #{24rpx};
  1270. }
  1271. .composition-title {
  1272. height: #{80rpx};
  1273. line-height: #{80rpx};
  1274. font-size: #{24rpx};
  1275. color: #353535;
  1276. margin-bottom: #{24rpx};
  1277. }
  1278. }
  1279. }
  1280. .goods {
  1281. height: #{160rpx};
  1282. margin-top: #{24rpx};
  1283. position: relative;
  1284. font-size: #{24rpx};
  1285. color: #353535;
  1286. margin-bottom: #{24rpx};
  1287. .goods-img {
  1288. height: #{160rpx};
  1289. width: #{160rpx};
  1290. float: left;
  1291. margin-right: #{20rpx};
  1292. border-radius: #{4rpx};
  1293. }
  1294. .goods-attr {
  1295. font-size: #{24rpx};
  1296. color: #999;
  1297. width: 70%;
  1298. position: absolute;
  1299. width: 70%;
  1300. top: #{78rpx};
  1301. left: #{180rpx};
  1302. text {
  1303. margin-right: #{20rpx};
  1304. }
  1305. }
  1306. .goods-num {
  1307. font-size: #{24rpx};
  1308. color: #999;
  1309. position: absolute;
  1310. top: #{126rpx};
  1311. left: #{180rpx};
  1312. }
  1313. .goods-price {
  1314. font-size: #{24rpx};
  1315. color: #353535;
  1316. position: absolute;
  1317. bottom: 0;
  1318. right: 0;
  1319. }
  1320. }
  1321. .head-img {
  1322. height: #{220rpx};
  1323. width: 100%;
  1324. position: absolute;
  1325. top: 0;
  1326. left: 0;
  1327. z-index: 1;
  1328. }
  1329. .head-txt {
  1330. font-size: #{28rpx};
  1331. color: #fff;
  1332. position: absolute;
  1333. top: #{45rpx};
  1334. left: #{48rpx};
  1335. right: #{48rpx};
  1336. line-height: #{40rpx};
  1337. height: #{40rpx};
  1338. z-index: 2;
  1339. }
  1340. .status-txt {
  1341. font-size: #{32rpx};
  1342. }
  1343. .user-info {
  1344. position: relative;
  1345. background-color: #fff;
  1346. margin: #{140rpx} #{24rpx} 0;
  1347. border-radius: #{16rpx};
  1348. padding: #{28rpx} #{24rpx} 0;
  1349. z-index: 2;
  1350. font-size: #{26rpx};
  1351. color: #353535;
  1352. }
  1353. .localhost-img {
  1354. height: #{44rpx};
  1355. width: #{44rpx};
  1356. position: absolute;
  1357. top: #{40rpx};
  1358. left: #{24rpx};
  1359. }
  1360. .user-text {
  1361. padding-left: #{68rpx};
  1362. }
  1363. .user-text:last-of-type {
  1364. margin: #{10rpx} 0 #{28rpx};
  1365. }
  1366. .area {
  1367. height: #{72rpx};
  1368. border-top: #{1rpx} solid #e2e2e2;
  1369. position: relative;
  1370. }
  1371. .detail-btn {
  1372. // width: 50%;
  1373. height: #{72rpx};
  1374. text-align: center;
  1375. line-height: #{72rpx};
  1376. color: #446dfd;
  1377. font-size: #{24rpx};
  1378. }
  1379. .line {
  1380. position: absolute;
  1381. top: #{16rpx};
  1382. left: 50%;
  1383. width: #{1rpx};
  1384. margin-left: #{-1rpx};
  1385. background-color: #e2e2e2;
  1386. height: #{40rpx};
  1387. }
  1388. .line.left-line {
  1389. left: 36%;
  1390. width: #{2rpx};
  1391. }
  1392. .line.right-line {
  1393. left: 68%;
  1394. width: #{2rpx};
  1395. }
  1396. .logo {
  1397. height: #{100rpx};
  1398. width: #{100rpx};
  1399. float: left;
  1400. margin-right: #{34rpx};
  1401. }
  1402. .express {
  1403. margin: #{24rpx};
  1404. display: block;
  1405. margin-bottom: 0;
  1406. padding: #{32rpx};
  1407. padding-left: #{24rpx};
  1408. position: relative;
  1409. font-size: #{32rpx};
  1410. background-color: #fff;
  1411. color: #353535;
  1412. border-radius: #{16rpx};
  1413. .showMore {
  1414. font-size: #{28rpx};
  1415. }
  1416. .showMore+.to-more {
  1417. margin-top: #{-12rpx};
  1418. }
  1419. }
  1420. .to-more {
  1421. height: #{24rpx};
  1422. width: #{12rpx};
  1423. position: absolute;
  1424. right: #{24rpx};
  1425. top: 50%;
  1426. margin-top: #{-6rpx};
  1427. }
  1428. .goods-info {
  1429. padding: #{24rpx};
  1430. background-color: #fff;
  1431. margin: #{24rpx};
  1432. margin-bottom: 0;
  1433. }
  1434. .goods-info.card-info {
  1435. position: relative;
  1436. margin-top: #{140rpx};
  1437. z-index: 10;
  1438. border-top-left-radius: #{16rpx};
  1439. border-top-right-radius: #{16rpx};
  1440. }
  1441. .goods-title {
  1442. color: #353535;
  1443. font-size: #{24rpx};
  1444. }
  1445. .price-item {
  1446. margin-bottom: #{10rpx};
  1447. font-size: #{24rpx};
  1448. color: #353535;
  1449. }
  1450. .refund-info {
  1451. margin-top: #{15rpx};
  1452. background-color: #f7f7f7;
  1453. padding: #{15rpx} #{25rpx};
  1454. font-size: #{24rpx};
  1455. }
  1456. .price-label {
  1457. color: #999;
  1458. font-size: #{24rpx};
  1459. }
  1460. .total-price {
  1461. font-size: #{28rpx};
  1462. color: #446dfd;
  1463. font-weight: bold;
  1464. }
  1465. .btn.iphone_x {
  1466. height: #{146rpx};
  1467. padding-bottom: #{50rpx};
  1468. }
  1469. .btn {
  1470. height: #{96rpx};
  1471. position: fixed;
  1472. bottom: 0;
  1473. width: 100%;
  1474. right: 0;
  1475. border-top: #{1rpx} solid #e2e2e2;
  1476. z-index: 10;
  1477. padding: #{24rpx};
  1478. background-color: #fff;
  1479. }
  1480. .handle-btn {
  1481. height: #{48rpx};
  1482. line-height: #{46rpx};
  1483. padding: 0 #{24rpx};
  1484. border-radius: #{24rpx};
  1485. border: #{2rpx} solid #bbb;
  1486. color: #353535;
  1487. font-size: #{24rpx};
  1488. margin-left: #{16rpx};
  1489. }
  1490. .handle-btn.other {
  1491. border: #{2rpx} solid #446dfd;
  1492. color: #446dfd;
  1493. }
  1494. .dialog {
  1495. width: #{620rpx};
  1496. border-radius: #{16rpx};
  1497. margin: 0 auto;
  1498. background-color: #fff;
  1499. z-index: 20;
  1500. }
  1501. .dialog-title {
  1502. font-size: #{32rpx};
  1503. color: #353535;
  1504. width: #{620rpx};
  1505. margin: #{32rpx} auto #{40rpx};
  1506. text-align: center;
  1507. }
  1508. .dialog-choose-item {
  1509. width: #{170rpx};
  1510. height: #{68rpx};
  1511. line-height: #{68rpx};
  1512. text-align: center;
  1513. border-radius: #{34rpx};
  1514. border: #{2rpx} solid #ddd;
  1515. color: #666;
  1516. font-size: #{28rpx};
  1517. margin-bottom: #{16rpx};
  1518. }
  1519. .send-item {
  1520. width: #{180rpx};
  1521. height: #{68rpx};
  1522. line-height: #{66rpx};
  1523. text-align: center;
  1524. border-radius: #{34rpx};
  1525. border: #{2rpx} solid #ddd;
  1526. color: #666;
  1527. background-color: #fff;
  1528. font-size: #{28rpx};
  1529. margin: 0 #{30rpx} #{36rpx};
  1530. }
  1531. .send-item.active {
  1532. color: #fff;
  1533. border: #{2rpx} solid #446dfd;
  1534. background-color: #446dfd;
  1535. }
  1536. .dialog-choose-item.active {
  1537. color: #446dfd;
  1538. border: #{2rpx} solid #446dfd;
  1539. }
  1540. .btn-area {
  1541. height: #{88rpx};
  1542. position: relative;
  1543. border-top: #{1rpx} solid #e2e2e2;
  1544. }
  1545. .btn-area .line {
  1546. height: #{32rpx};
  1547. width: #{1rpx};
  1548. background-color: #e2e2e2;
  1549. position: absolute;
  1550. top: #{28rpx};
  1551. left: 0;
  1552. right: 0;
  1553. margin: 0 auto;
  1554. }
  1555. .submit-btn {
  1556. height: #{88rpx};
  1557. line-height: #{88rpx};
  1558. font-size: #{32rpx};
  1559. color: #666;
  1560. width: #{310rpx};
  1561. text-align: center;
  1562. }
  1563. .submit-btn.be-submit {
  1564. color: #446dfd;
  1565. }
  1566. .textarea {
  1567. height: #{252rpx};
  1568. width: #{492rpx};
  1569. padding: #{24rpx} #{32rpx};
  1570. font-size: #{28rpx};
  1571. border-radius: #{16rpx};
  1572. border: #{2rpx} solid #e2e2e2;
  1573. text-align: left;
  1574. margin: #{32rpx} auto;
  1575. }
  1576. .change-price-item {
  1577. position: relative;
  1578. height: #{64rpx};
  1579. line-height: #{64rpx};
  1580. color: #353535;
  1581. font-size: #{28rpx};
  1582. margin-bottom: #{26rpx};
  1583. }
  1584. .label {
  1585. height: #{64rpx};
  1586. line-height: #{64rpx};
  1587. text-align: right;
  1588. width: #{178rpx};
  1589. }
  1590. .price-input {
  1591. height: #{64rpx};
  1592. margin-left: #{24rpx};
  1593. border-radius: #{32rpx};
  1594. padding-left: #{62rpx};
  1595. background-color: #f7f7f7;
  1596. }
  1597. .money {
  1598. position: absolute;
  1599. left: #{234rpx};
  1600. }
  1601. .bg {
  1602. background-color: rgba(0, 0, 0, .3);
  1603. position: fixed;
  1604. top: 0;
  1605. left: 0;
  1606. height: 100%;
  1607. width: 100%;
  1608. z-index: 100;
  1609. }
  1610. .time-title {
  1611. margin-left: #{32rpx};
  1612. color: #666;
  1613. font-size: #{28rpx};
  1614. margin-bottom: #{20rpx};
  1615. }
  1616. .choose-time {
  1617. position: relative;
  1618. }
  1619. .reason-title {
  1620. font-size: #{28rpx};
  1621. color: #999;
  1622. margin-bottom: #{20rpx};
  1623. }
  1624. .reason-content {
  1625. font-size: #{28rpx};
  1626. color: #353535;
  1627. width: #{556rpx};
  1628. margin-bottom: #{26rpx};
  1629. }
  1630. .reason-img {
  1631. margin-bottom: #{14rpx};
  1632. }
  1633. .reason-img image {
  1634. height: #{180rpx};
  1635. width: #{180rpx};
  1636. margin: 0 #{8rpx} #{8rpx} 0;
  1637. }
  1638. .add-list {
  1639. margin-top: #{50rpx};
  1640. max-height: #{388rpx};
  1641. overflow: auto;
  1642. padding: 0 #{36rpx};
  1643. }
  1644. .add-item {
  1645. padding: #{32rpx} 0;
  1646. margin-left: #{64rpx};
  1647. position: relative;
  1648. font-size: #{28rpx};
  1649. color: #353535;
  1650. border-bottom: #{1rpx} solid #e2e2e2;
  1651. }
  1652. .add-item.delivery-item {
  1653. padding-left: #{64rpx};
  1654. margin-left: 0;
  1655. }
  1656. .add-item:last-of-type {
  1657. border-bottom: 0;
  1658. }
  1659. .add-item image {
  1660. height: #{36rpx};
  1661. width: #{36rpx};
  1662. }
  1663. .add-item .add-active {
  1664. position: absolute;
  1665. left: #{-64rpx};
  1666. top: 50%;
  1667. margin-top: #{-18rpx};
  1668. }
  1669. .add-item .add-name {
  1670. width: #{220rpx};
  1671. overflow: hidden;
  1672. text-overflow: ellipsis;
  1673. white-space: nowrap;
  1674. }
  1675. .add-item.delivery-item .add-name {
  1676. width: #{400rpx};
  1677. }
  1678. .bottom-place {
  1679. height: #{120rpx};
  1680. }
  1681. .bottom-place.iphone_x {
  1682. height: #{170rpx};
  1683. }
  1684. .refund-price {
  1685. width: #{160rpx};
  1686. border: #{2rpx} solid #e2e2e2;
  1687. border-radius: #{5rpx};
  1688. font-size: #{32rpx};
  1689. padding: 0 #{5rpx};
  1690. }
  1691. .name {
  1692. margin-right: #{20rpx};
  1693. }
  1694. .express-company {
  1695. margin-top: #{10rpx};
  1696. }
  1697. .express-number {
  1698. color: #666666;
  1699. font-size: #{28rpx};
  1700. margin-top: #{10rpx}
  1701. }
  1702. .total-label {
  1703. font-size: #{24rpx};
  1704. color: #353535;
  1705. }
  1706. .mch-goods .goods-title {
  1707. margin-bottom: #{24rpx};
  1708. }
  1709. .mch-goods .price-label {
  1710. margin-right: #{20rpx};
  1711. }
  1712. .form-img {
  1713. height: #{120rpx};
  1714. width: #{120rpx};
  1715. }
  1716. .refund-tip {
  1717. font-size: #{32rpx};
  1718. color: #353535;
  1719. margin: #{4rpx} 0 #{45rpx};
  1720. }
  1721. .change-total-price {
  1722. margin-left: #{56rpx};
  1723. }
  1724. .change-price-item:first-of-type {
  1725. margin-bottom: #{32rpx};
  1726. }
  1727. .change-price-item:last-of-type {
  1728. margin: #{24rpx} 0 #{34rpx};
  1729. }
  1730. .cancel-tip {
  1731. font-size: #{32rpx};
  1732. color: #353535;
  1733. margin: #{74rpx} 0 #{60rpx};
  1734. }
  1735. .send-type {
  1736. margin-bottom: #{24rpx};
  1737. padding: 0 #{32rpx};
  1738. }
  1739. .reason {
  1740. padding-left: #{32rpx};
  1741. }
  1742. .btn-area.other-btn-area {
  1743. margin-top: #{10rpx};
  1744. }
  1745. .refund-pay {
  1746. font-size: #{36rpx};
  1747. color: #353535;
  1748. font-weight: blod;
  1749. }
  1750. .goods-name {
  1751. padding-top: #{5rpx};
  1752. }
  1753. .address-info {
  1754. margin-bottom: #{28rpx};
  1755. }
  1756. </style>