index.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250
  1. <template>
  2. <view class="order-details pos-order-details">
  3. <view class="header acea-row row-middle">
  4. <view class="state">{{ title }}</view>
  5. <view class="data">
  6. <view class="order-num">订单号:{{ orderInfo.order_id }}</view>
  7. <view>
  8. <span class="time">下单时间:{{ orderInfo._add_time }}</span>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="remarks acea-row" v-if="goname != 'looks'">
  13. <span class="iconfont icon-zhinengkefu-"></span>
  14. <div class="tip on" v-if="orderInfo.remark" @click="modify('1')">{{orderInfo.remark}}</div>
  15. <div class="tip" v-else @click="modify('1')">订单未备注,点击添加备注信息</div>
  16. </view>
  17. <view class="orderingUser acea-row row-middle">
  18. <span class="iconfont icon-yonghu2"></span>{{ orderInfo.uid?orderInfo.nickname:'游客' }}
  19. </view>
  20. <view class="address" v-if="orderInfo.real_name && orderInfo.user_phone && orderInfo.user_address">
  21. <view class="name">
  22. {{ orderInfo.real_name }}
  23. <span class="phone">{{ orderInfo.user_phone }}</span>
  24. <!-- #ifdef H5 -->
  25. <span class="copy copy-data"
  26. :data-clipboard-text="`${orderInfo.real_name} ${orderInfo.user_phone} ${orderInfo.user_address}`">复制</span>
  27. <!-- #endif -->
  28. <!-- #ifdef MP -->
  29. <span class="copy copy-data"
  30. @click="copyNum(`${orderInfo.real_name} ${orderInfo.user_phone} ${orderInfo.user_address}`)">复制</span>
  31. <!-- #endif -->
  32. </view>
  33. <view>{{ orderInfo.user_address }}</view>
  34. </view>
  35. <view class="line">
  36. <image src="/static/images/line.jpg" />
  37. </view>
  38. <!-- 拆单时 -->
  39. <view v-for="(j, indexw) in orderInfo.split" v-if="orderInfo.split && orderInfo.split.length">
  40. <view class="splitTitle acea-row row-between-wrapper">
  41. <view>订单包裹{{indexw + 1}}</view>
  42. <view class="title">{{j._status._title}}</view>
  43. </view>
  44. <view class="pos-order-goods">
  45. <navigator :url="`/pages/admin/orderDetail/index?id=${j.order_id}`" hover-class="none"
  46. class="goods acea-row row-between-wrapper" v-for="(item, index) in j.cartInfo" :key="index">
  47. <view class="picTxt acea-row row-between-wrapper">
  48. <view class="pictrue">
  49. <image :src="item.productInfo.attrInfo?item.productInfo.attrInfo.image:item.productInfo.image" />
  50. </view>
  51. <view class="text acea-row row-between row-column">
  52. <view class="info line2">
  53. {{ item.productInfo.store_name }}
  54. </view>
  55. <view class="attr">{{ item.productInfo.attrInfo.suk }}</view>
  56. </view>
  57. </view>
  58. <view class="money">
  59. <view class="x-money">¥{{ item.productInfo.attrInfo?item.productInfo.attrInfo.price:item.productInfo.price }}</view>
  60. <view class="num">x{{ item.cart_num }}</view>
  61. <!-- <view class="y-money">¥{{ item.productInfo.ot_price }}</view> -->
  62. </view>
  63. </navigator>
  64. </view>
  65. </view>
  66. <!-- 结束 -->
  67. <!-- 未拆单时,正常单 -->
  68. <view class="pos-order-goods split" v-if="orderInfo.cartInfo && orderInfo.cartInfo.length">
  69. <view class="title acea-row row-between-wrapper" v-if="orderInfo.status == 4">
  70. <text>共{{totalNmu}}件商品</text>
  71. <!-- <navigator class="bnt" :url="'/pages/admin/store/deliverGoods/index?id='+orderInfo.order_id+'&listId='+orderInfo.id+'&totalNum='+orderInfo.total_num+'&orderStatus='+orderInfo.status+'&comeType=2'">去发货</navigator> -->
  72. </view>
  73. <view class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo.cartInfo" :key="index">
  74. <view class="picTxt acea-row row-between-wrapper">
  75. <view class="pictrue">
  76. <image :src="item.productInfo.attrInfo?item.productInfo.attrInfo.image:item.productInfo.image" />
  77. </view>
  78. <view class="text acea-row row-between row-column">
  79. <view class="info line2">
  80. {{ item.productInfo.store_name }}
  81. </view>
  82. <view class="attr">{{ item.productInfo.attrInfo.suk }}</view>
  83. </view>
  84. </view>
  85. <view class="money">
  86. <view class="x-money">¥{{ item.productInfo.attrInfo?item.productInfo.attrInfo.price:item.productInfo.price }}</view>
  87. <view class="num">x {{ item.cart_num }}</view>
  88. <view class="acea-row row-right">
  89. <view class="writeOff" v-if="item.refund_num && orderInfo.refund_type != 6">{{item.refund_num}}件退款中</view>
  90. <view class="writeOff" v-if="(orderInfo._status._type==1 || orderInfo._status._type==5) && orderInfo.shipping_type == 2">
  91. <text v-if="item.refund_num">,</text>
  92. <text class="on" v-if="item.is_writeoff">已核销</text>
  93. <text v-if="!item.is_writeoff && item.surplus_num<item.cart_num">核销{{parseInt(item.cart_num)-parseInt(item.surplus_num)}}件</text>
  94. <text v-if="!item.is_writeoff && item.surplus_num==item.cart_num">未核销</text>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="giveGoods">
  100. <view class="item acea-row row-between-wrapper" v-for="(item,index) in giveCartInfo" :key="index">
  101. <view class="picTxt acea-row row-middle">
  102. <view class="pictrue">
  103. <image :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo"></image>
  104. <image :src="item.productInfo.image" v-else></image>
  105. </view>
  106. <view class="texts">
  107. <view class="name line1">[赠品]{{item.productInfo.store_name}}</view>
  108. <view class="limit line1" v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
  109. </view>
  110. </view>
  111. <view class="num">x{{item.cart_num}}</view>
  112. </view>
  113. <view class="item acea-row row-between-wrapper" v-for="(item,index) in giveData.give_coupon" :key="index" v-if="giveData.give_coupon.length">
  114. <view class="picTxt acea-row row-middle">
  115. <view class="pictrue acea-row row-center-wrapper">
  116. <text class="iconfont icon-pc-youhuiquan"></text>
  117. </view>
  118. <view class="texts">
  119. <view class="line1">[赠品]{{item.coupon_title}}</view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="item acea-row row-between-wrapper" v-if="giveData.give_integral>0">
  124. <view class="picTxt acea-row row-middle">
  125. <view class="pictrue acea-row row-center-wrapper">
  126. <text class="iconfont icon-pc-jifen"></text>
  127. </view>
  128. <view class="texts">
  129. <view class="line1">[赠品]{{giveData.give_integral}}积分</view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="public-total" v-if="!orderInfo.split || !orderInfo.split.length">
  136. 共{{ orderInfo.total_num }}件商品,商品总价
  137. <span class="money">¥{{ sum }}</span> ( 邮费 ¥{{
  138. orderInfo.pay_postage
  139. }}
  140. )
  141. </view>
  142. <!-- 结束 -->
  143. <!-- <view v-if="types == 1" class="wrapper topnone">
  144. <view class="title">
  145. <view class="font">配送员信息</view>
  146. <view class="mapbtn"><span class="iconfont icon-weizhi"></span>查看地址</view>
  147. </view>
  148. <view class="item acea-row row-between">
  149. <view>联系人:</view>
  150. <view class="conter">啊哈啊</view>
  151. </view>
  152. <view class="item acea-row row-between">
  153. <view>联系电话:</view>
  154. <view class="conter">13007466338</view>
  155. </view>
  156. </view> -->
  157. <customForm :customForm="orderInfo.custom_form"></customForm>
  158. <view class="wrapper">
  159. <!-- <view class="title">
  160. <view class="font">订单信息</view>
  161. </view> -->
  162. <view class="item acea-row row-between">
  163. <view>订单编号:</view>
  164. <view class="conter acea-row row-middle row-right">
  165. {{ orderInfo.order_id
  166. }}
  167. <!-- #ifdef H5 -->
  168. <span class="copy copy-data" :data-clipboard-text="orderInfo.order_id">复制</span>
  169. <!-- #endif -->
  170. <!-- #ifdef MP -->
  171. <span class="copy copy-data" @click="copyNum(orderInfo.order_id)">复制</span>
  172. <!-- #endif -->
  173. </view>
  174. </view>
  175. <view class="item acea-row row-between">
  176. <view>下单时间:</view>
  177. <view class="conter">{{ orderInfo._add_time }}</view>
  178. </view>
  179. <view class="item acea-row row-between">
  180. <view>支付状态:</view>
  181. <view class="conter">
  182. {{ orderInfo.paid == 1 ? "已支付" : "未支付" }}
  183. </view>
  184. </view>
  185. <view class="item acea-row row-between">
  186. <view>支付方式:</view>
  187. <view class="conter">{{ payType }}</view>
  188. </view>
  189. <view class="item acea-row row-between" v-if="orderInfo.mark">
  190. <view v-if="statusType == -3">退款留言:</view>
  191. <view v-else>买家留言:</view>
  192. <view class="conter">{{ orderInfo.mark }}</view>
  193. </view>
  194. <view class="item acea-row row-between" v-if="orderInfo.refund_goods_explain">
  195. <view>退货留言:</view>
  196. <view class='conter'>{{orderInfo.refund_goods_explain}}</view>
  197. </view>
  198. <view class="item acea-row row-between" v-if="orderInfo.refund_img && orderInfo.refund_img.length">
  199. <view>退款凭证:</view>
  200. <view class="conter">
  201. <view class="pictrue" v-for="(item,index) in orderInfo.refund_img">
  202. <image :src="item" mode="aspectFill" @click='getpreviewImage(index,1)'></image>
  203. </view>
  204. </view>
  205. </view>
  206. <view class="item acea-row row-between" v-if="orderInfo.refund_goods_img && orderInfo.refund_goods_img.length">
  207. <view>退货凭证:</view>
  208. <view class="conter">
  209. <view class="pictrue" v-for="(item,index) in orderInfo.refund_goods_img">
  210. <image :src="item" mode="aspectFill" @click='getpreviewImage(index,0)'></image>
  211. </view>
  212. </view>
  213. </view>
  214. </view>
  215. <view class="wrapper">
  216. <view class="item acea-row row-between">
  217. <view>商品总价:</view>
  218. <view class="conter">¥{{(parseFloat(orderInfo.total_price)+parseFloat(orderInfo.vip_true_price)).toFixed(2)}}</view>
  219. </view>
  220. <view v-if="orderInfo.coupon_price>0" class="item acea-row row-between">
  221. <view>优惠券抵扣:</view>
  222. <view class="conter">-¥{{ orderInfo.coupon_price }}</view>
  223. </view>
  224. <view v-if="orderInfo.pay_postage>0" class="item acea-row row-between">
  225. <view>运费:</view>
  226. <view class="conter">¥{{ orderInfo.pay_postage }}</view>
  227. </view>
  228. <view v-if="orderInfo.deduction_price>0" class="item acea-row row-between">
  229. <view>积分抵扣金额:</view>
  230. <view class="conter">-¥{{ orderInfo.deduction_price }}</view>
  231. </view>
  232. <view v-if="orderInfo.vip_true_price>0" class="item acea-row row-between">
  233. <view>会员商品优惠:</view>
  234. <view class="conter">-¥{{ orderInfo.vip_true_price }}</view>
  235. </view>
  236. <view class='item acea-row row-between' v-for="(item,index) in orderInfo.promotions_detail" :key="index" v-if="parseFloat(item.promotions_price)">
  237. <view>{{item.title}}:</view>
  238. <view class='conter'>-¥{{parseFloat(item.promotions_price).toFixed(2)}}</view>
  239. </view>
  240. <view class="actualPay acea-row row-right">
  241. 实付款:<span class="money">¥{{ orderInfo.pay_price }}</span>
  242. </view>
  243. </view>
  244. <view class="wrapper" v-if="
  245. orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2 && (!orderInfo.split || !orderInfo.split.length)
  246. ">
  247. <view class="item acea-row row-between">
  248. <view>配送方式:</view>
  249. <view class="conter" v-if="orderInfo.delivery_type === 'express'">
  250. 快递
  251. </view>
  252. <view class="conter" v-if="orderInfo.delivery_type === 'send'">送货</view>
  253. </view>
  254. <view class="item acea-row row-between">
  255. <view v-if="orderInfo.delivery_type === 'express'">快递公司:</view>
  256. <view v-if="orderInfo.delivery_type === 'send'">送货人:</view>
  257. <view class="conter">{{ orderInfo.delivery_name }}</view>
  258. </view>
  259. <view class="item acea-row row-between">
  260. <view v-if="orderInfo.delivery_type === 'express'">快递单号:</view>
  261. <view v-if="orderInfo.delivery_type === 'send'">送货人电话:</view>
  262. <view class="conter">
  263. {{ orderInfo.delivery_id}}
  264. <!-- #ifdef H5 -->
  265. <span class="copy copy-data" :data-clipboard-text="orderInfo.delivery_id">复制</span>
  266. <!-- #endif -->
  267. <!-- #ifdef MP -->
  268. <span class="copy copy-data" @click="copyNum(orderInfo.delivery_id)">复制</span>
  269. <!-- #endif -->
  270. </view>
  271. </view>
  272. </view>
  273. <view class="height-add"></view>
  274. <view class="footer acea-row row-right row-middle">
  275. <view v-if="(types == 0 || types == 9) && orderInfo.is_del == 0 && !openErp" class="more btn cancel" @click="more">
  276. 更多
  277. <view class="more-box" v-if="moreBtn">
  278. <view class="more-btn" @click="del">删除订单</view>
  279. <view class="more-btn" @click="cancel">取消订单</view>
  280. </view>
  281. </view>
  282. <view class="bnt cancel" :class="openErp?'on':''" @click="modify('0')" v-if="types == 0 || types == 9">
  283. 一键改价
  284. </view>
  285. <!-- <view class="bnt cancel" @click="modify('0')" v-if="types == -1">
  286. 立即退款
  287. </view> -->
  288. <view class="bnt cancel" :class="openErp?'on':''" @click="modify('2',1)" v-if="(!orderInfo.refund || !orderInfo.refund.length) && (orderInfo.refund_type == 0 || orderInfo.refund_type == 1 || orderInfo.refund_type == 5) && orderInfo.paid && parseFloat(orderInfo.pay_price) >= 0">
  289. 立即退款
  290. </view>
  291. <view class="bnt cancel" :class="openErp?'on':''" @click="modify('2',0)" v-if="orderInfo.refund_type == 2">
  292. 同意退货
  293. </view>
  294. <view class="wait" :class="openErp?'on':''" v-if="orderInfo.refund_type == 4">待用户发货</view>
  295. <view class="bnt cancel" @click="modify('1')">订单备注</view>
  296. <view v-if="orderInfo.paid === 0 && types == 9" class="bnt delivery" :class="openErp?'on':''" @click="offlinePay">
  297. 确认付款
  298. </view>
  299. <view class="bnt delivery" :class="openErp?'on':''" v-if="types == 1 && (orderInfo.shipping_type === 1 || orderInfo.shipping_type === 3) && (orderInfo.pinkStatus === null || orderInfo.pinkStatus === 2)" @click="goDelivery(orderInfo)">去发货</view>
  300. </view>
  301. <PriceChange :change="change" :orderInfo="orderInfo" :isRefund="isRefund" v-on:statusChange="statusChange($event)" v-on:closechange="changeclose($event)"
  302. v-on:savePrice="savePrice" :status="status"></PriceChange>
  303. </view>
  304. </template>
  305. <script>
  306. import PriceChange from "../../components/PriceChange/index.vue";
  307. import customForm from "@/components/customForm";
  308. // #ifdef H5
  309. import ClipboardJS from "@/plugin/clipboard/clipboard.js";
  310. // #endif
  311. import {
  312. OrderDetail,
  313. refundDetail,
  314. getOrderreMarkApi,
  315. getRefundMarkApi,
  316. getOrderPriceApi,
  317. getOrderOfflineApi,
  318. OrderDel,
  319. OrderCancel,
  320. setOrderRefund,
  321. storeRefundAgree
  322. } from "@/api/admin";
  323. import { erpConfig } from "@/api/esp.js";
  324. // import { required, num } from "@utils/validate";
  325. // import { validatorDefaultCatch } from "@utils/dialog";
  326. import {
  327. isMoney
  328. } from '@/utils/validate.js'
  329. export default {
  330. name: "orderDetail",
  331. components: {
  332. PriceChange,
  333. customForm
  334. },
  335. props: {},
  336. data: function() {
  337. return {
  338. openErp:false,
  339. giveData:{
  340. give_integral:0,
  341. give_coupon:[]
  342. },
  343. giveCartInfo:[],
  344. totalNmu:0,
  345. order: false,
  346. change: false,
  347. order_id: "",
  348. orderInfo: {
  349. _status: {}
  350. },
  351. status: "",
  352. title: "",
  353. payType: "",
  354. types: "",
  355. statusType:'',
  356. clickNum: 1,
  357. goname: '',
  358. moreBtn: false,
  359. sum: 0,
  360. isRefund:0, //1是仅退款;0是同意退货退款
  361. };
  362. },
  363. onLoad: function(option) {
  364. let self = this
  365. this.order_id = option.id;
  366. this.goname = option.goname
  367. this.statusType = option.types
  368. this.getErpConfig();
  369. this.getIndex();
  370. // #ifdef H5
  371. this.$nextTick(function() {
  372. var clipboard = new ClipboardJS('.copy-data');
  373. // var copybtn = document.getElementsByClassName("copy-data");
  374. // var clipboard = new Clipboard(copybtn);
  375. clipboard.on('success', function(e) {
  376. self.$util.Tips({
  377. title: '复制成功'
  378. })
  379. });
  380. clipboard.on('error', function(e) {
  381. self.$util.Tips({
  382. title: '复制失败'
  383. })
  384. });
  385. });
  386. // #endif
  387. },
  388. methods: {
  389. statusChange(e){
  390. this.status = e;
  391. },
  392. goDelivery(orderInfo){
  393. if(this.openErp) return
  394. uni.navigateTo({
  395. url: '/pages/admin/store/deliverGoods/index?id='+orderInfo.order_id+'&listId='+orderInfo.id+'&totalNum='+orderInfo.total_num+'&orderStatus='+orderInfo.status+'&comeType=2&productType='+orderInfo.product_type
  396. })
  397. },
  398. getErpConfig(){
  399. erpConfig().then(res=>{
  400. this.openErp = res.data.open_erp;
  401. }).catch(err=>{
  402. this.$util.Tips({
  403. title: err
  404. })
  405. })
  406. },
  407. getpreviewImage: function(index,num) {
  408. uni.previewImage({
  409. urls: num?this.orderInfo.refund_img:this.orderInfo.refund_goods_img,
  410. current: num?this.orderInfo.refund_img[index]:this.orderInfo.refund_goods_img[index]
  411. });
  412. },
  413. more: function() {
  414. // this.order = !this.order;
  415. this.moreBtn = !this.moreBtn
  416. },
  417. del :function() {
  418. OrderDel(this.order_id).then(res=>{
  419. this.$util.Tips({
  420. title: res.msg,
  421. icon: 'success'
  422. })
  423. }).catch(err=>{
  424. this.$util.Tips({
  425. title: err,
  426. icon: 'error'
  427. })
  428. })
  429. },
  430. cancel: function() {
  431. console.log(this.order_id)
  432. OrderCancel(this.order_id).then(res=>{
  433. this.$util.Tips({
  434. title: res.msg,
  435. icon: 'success'
  436. })
  437. }).catch(err=>{
  438. this.$util.Tips({
  439. title: err,
  440. icon: 'error'
  441. })
  442. })
  443. },
  444. modify: function(status,type) {
  445. if(this.openErp && status !=1) return
  446. this.change = true;
  447. this.status = status;
  448. if(status==2){
  449. this.isRefund = type
  450. }
  451. },
  452. changeclose: function(msg) {
  453. this.change = msg;
  454. },
  455. getIndex: function() {
  456. let that = this;
  457. let obj = '';
  458. if(that.statusType == -3){
  459. obj = refundDetail(that.order_id)
  460. }else{
  461. obj = OrderDetail(that.order_id);
  462. }
  463. obj.then(
  464. res => {
  465. let num = 0;
  466. that.sum = res.data.pay_price;
  467. that.types = res.data._status._type;
  468. that.title = res.data._status._title;
  469. that.payType = res.data._status._payType;
  470. that.giveData.give_coupon = res.data.give_coupon;
  471. that.giveData.give_integral = res.data.give_integral;
  472. let cartObj = [],giftObj = [];
  473. res.data.cartInfo.forEach((item, index) => {
  474. num += item.cart_num
  475. if(item.is_gift == 1){
  476. giftObj.push(item)
  477. }else{
  478. cartObj.push(item)
  479. }
  480. });
  481. this.totalNmu = num;
  482. res.data.cartInfo = cartObj;
  483. that.$set(that, 'giveCartInfo', giftObj);
  484. that.orderInfo = res.data;
  485. },
  486. err => {
  487. // that.$util.Tips({
  488. // title: err
  489. // }, {
  490. // tab: 3,
  491. // url: 1
  492. // });
  493. }
  494. );
  495. },
  496. objOrderRefund(data){
  497. let that = this;
  498. setOrderRefund(data).then(
  499. res => {
  500. that.change = false;
  501. that.$util.Tips({
  502. title: res.msg
  503. });
  504. that.getIndex();
  505. },
  506. err => {
  507. that.change = false;
  508. that.$util.Tips({
  509. title: err
  510. });
  511. }
  512. );
  513. },
  514. async savePrice(opt) {
  515. let that = this,
  516. data = {},
  517. price = opt.price,
  518. refund_price = opt.refund_price,
  519. refund_status = that.orderInfo.refund_status,
  520. remark = opt.remark;
  521. data.order_id = that.orderInfo.order_id;
  522. if (that.status == 0) {
  523. if (!isMoney(price)) {
  524. return that.$util.Tips({
  525. title: '请输入正确的金额'
  526. });
  527. }
  528. data.price = price;
  529. getOrderPriceApi(data).then(
  530. function() {
  531. that.change = false;
  532. that.$util.Tips({
  533. title: '改价成功',
  534. icon: 'success'
  535. })
  536. that.getIndex();
  537. },
  538. function() {
  539. that.change = false;
  540. that.$util.Tips({
  541. title: '改价失败',
  542. icon: 'none'
  543. })
  544. }
  545. );
  546. } else if (that.status == 2) {
  547. if(this.isRefund){
  548. if (!isMoney(refund_price)) {
  549. return that.$util.Tips({
  550. title: '请输入正确的金额'
  551. });
  552. }
  553. data.price = refund_price;
  554. data.type = opt.type;
  555. this.objOrderRefund(data);
  556. }else{
  557. if(opt.type==1){
  558. storeRefundAgree(this.orderInfo.id).then(res=>{
  559. that.change = false;
  560. that.$util.Tips({
  561. title: res.msg
  562. });
  563. that.getIndex();
  564. }).catch(err=>{
  565. that.change = false;
  566. that.$util.Tips({
  567. title: err
  568. });
  569. })
  570. }
  571. }
  572. } else if (that.status == 8) {
  573. data.type = opt.type;
  574. data.refuse_reason = opt.refuse_reason;
  575. this.objOrderRefund(data);
  576. } else {
  577. if (!remark) {
  578. return this.$util.Tips({
  579. title: '请输入备注'
  580. })
  581. }
  582. data.remark = remark;
  583. let obj = '';
  584. if(that.statusType == -3){
  585. obj = getRefundMarkApi(data);
  586. }else{
  587. obj = getOrderreMarkApi(data);
  588. }
  589. obj.then(
  590. res => {
  591. that.change = false;
  592. this.$util.Tips({
  593. title: res.msg,
  594. icon: 'success'
  595. })
  596. this.orderInfo.remark = remark;
  597. // that.getIndex();
  598. },
  599. err => {
  600. that.change = false;
  601. that.$util.Tips({
  602. title: err
  603. });
  604. }
  605. );
  606. }
  607. },
  608. offlinePay: function() {
  609. if(this.openErp) return
  610. getOrderOfflineApi({
  611. order_id: this.orderInfo.order_id
  612. }).then(
  613. res => {
  614. this.$util.Tips({
  615. title: res.msg,
  616. icon: 'success'
  617. });
  618. this.getIndex();
  619. },
  620. err => {
  621. this.$util.Tips({
  622. title: err
  623. });
  624. }
  625. );
  626. },
  627. // #ifdef MP
  628. copyNum(id) {
  629. uni.setClipboardData({
  630. data: id,
  631. success: function() {}
  632. });
  633. },
  634. // #endif
  635. // #ifdef H5
  636. webCopy(item, index) {
  637. let items = item
  638. let indexs = index
  639. let self = this
  640. if (self.clickNum == 1) {
  641. self.clickNum += 1
  642. self.webCopy(items, indexs)
  643. }
  644. }
  645. // #endif
  646. }
  647. };
  648. </script>
  649. <style lang="scss" scoped>
  650. .height-add {
  651. height:120upx;
  652. }
  653. .giveGoods{
  654. .item{
  655. padding: 14rpx 30rpx 14rpx 0;
  656. margin-left: 30rpx;
  657. border-top: 1px solid #eee;
  658. .picTxt{
  659. .pictrue{
  660. width: 76rpx;
  661. height: 76rpx;
  662. border-radius: 6rpx;
  663. background-color: #F5F5F5;
  664. color: #2a7efb;
  665. .iconfont{
  666. font-size: 34rpx;
  667. }
  668. image{
  669. width: 100%;
  670. height: 100%;
  671. border-radius: 6rpx;
  672. }
  673. margin-right: 16rpx;
  674. }
  675. .texts{
  676. width: 360rpx;
  677. color: #999999;
  678. font-size: 20rpx;
  679. .name{
  680. color: #333;
  681. }
  682. .limit{
  683. font-size: 20rpx;
  684. margin-top: 4rpx;
  685. }
  686. }
  687. }
  688. .num{
  689. color: #999999;
  690. font-size: 20rpx;
  691. }
  692. }
  693. }
  694. .splitTitle{
  695. width: 100%;
  696. height: 80rpx;
  697. line-height: 80rpx;
  698. background-color: #fff;
  699. margin-top: 17rpx;
  700. border-bottom: 1px solid #e5e5e5;
  701. padding: 0 30rpx;
  702. }
  703. .splitTitle .title{
  704. color: #2291f8;
  705. }
  706. /*商户管理订单详情*/
  707. .pos-order-details .header {
  708. background: linear-gradient(270deg, #1cd1dc 0%, #2291f8 100%);
  709. }
  710. .pos-order-details .header .state {
  711. font-size: 26upx;
  712. color: #fff;
  713. }
  714. .pos-order-details .header .data {
  715. margin-left: 35upx;
  716. font-size: 28upx;
  717. }
  718. .pos-order-details .header .data .order-num {
  719. font-size: 22upx;
  720. margin-bottom: 8upx;
  721. }
  722. .pos-order-details .remarks {
  723. width: 100%;
  724. background-color: #fff;
  725. padding: 20upx 30upx;
  726. }
  727. .pos-order-details .remarks .tip{
  728. font-size: 30upx;
  729. color: #CCCCCC;
  730. margin-left: 20upx;
  731. width: 620upx;
  732. }
  733. .pos-order-details .remarks .tip.on{
  734. color: #333;
  735. }
  736. .pos-order-details .remarks .iconfont {
  737. font-size: 40upx;
  738. color: #2a7efb;
  739. }
  740. .pos-order-details .remarks input {
  741. width: 630upx;
  742. height: 100%;
  743. font-size: 30upx;
  744. }
  745. .pos-order-details .remarks input::placeholder {
  746. color: #666;
  747. }
  748. .pos-order-details .orderingUser {
  749. font-size: 26upx;
  750. color: #282828;
  751. padding: 0 30upx;
  752. height: 67upx;
  753. background-color: #fff;
  754. margin-top: 16upx;
  755. border-bottom: 1px solid #f5f5f5;
  756. }
  757. .pos-order-details .orderingUser .iconfont {
  758. font-size: 40upx;
  759. color: #2a7efb;
  760. margin-right: 15upx;
  761. }
  762. .pos-order-details .address {
  763. margin-top: 0;
  764. }
  765. // .pos-order-details .pos-order-goods {
  766. // margin-top: 17upx;
  767. // }
  768. .pos-order-details .footer .more {
  769. font-size: 27upx;
  770. color: #aaa;
  771. width: 100upx;
  772. height: 64upx;
  773. text-align: center;
  774. line-height: 64upx;
  775. margin-right: 25upx;
  776. position: relative;
  777. }
  778. .pos-order-details .footer .delivery {
  779. background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  780. background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  781. background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  782. }
  783. .pos-order-details .footer .more .order .arrow {
  784. width: 0;
  785. height: 0;
  786. border-left: 11upx solid transparent;
  787. border-right: 11upx solid transparent;
  788. border-top: 20upx solid #e5e5e5;
  789. position: absolute;
  790. left: 15upx;
  791. bottom: -18upx;
  792. }
  793. .pos-order-details .footer .more .order .arrow:before {
  794. content: '';
  795. width: 0;
  796. height: 0;
  797. border-left: 9upx solid transparent;
  798. border-right: 9upx solid transparent;
  799. border-top: 19upx solid #fff;
  800. position: absolute;
  801. left: -10upx;
  802. bottom: 0;
  803. }
  804. .pos-order-details .footer .more .order {
  805. width: 200upx;
  806. background-color: #fff;
  807. border: 1px solid #eee;
  808. border-radius: 10upx;
  809. position: absolute;
  810. top: -200upx;
  811. z-index: 9;
  812. }
  813. .pos-order-details .footer .more .order .item {
  814. height: 77upx;
  815. line-height: 77upx;
  816. }
  817. .pos-order-details .footer .more .order .item~.item {
  818. border-top: 1px solid #f5f5f5;
  819. }
  820. .pos-order-details .footer .more .moreName {
  821. width: 100%;
  822. height: 100%;
  823. }
  824. /*订单详情*/
  825. .order-details .header {
  826. padding: 0 30upx;
  827. height: 150upx;
  828. }
  829. .order-details .header.on {
  830. background-color: #666 !important;
  831. }
  832. .order-details .header .pictrue {
  833. width: 110upx;
  834. height: 110upx;
  835. }
  836. .order-details .header .pictrue image {
  837. width: 100%;
  838. height: 100%;
  839. }
  840. .order-details .header .data {
  841. color: rgba(255, 255, 255, 0.8);
  842. font-size: 24upx;
  843. margin-left: 27upx;
  844. }
  845. .order-details .header.on .data {
  846. margin-left: 0;
  847. }
  848. .order-details .header .data .state {
  849. font-size: 30upx;
  850. font-weight: bold;
  851. color: #fff;
  852. margin-bottom: 7upx;
  853. }
  854. /* .order-details .header .data .time{margin-left:20upx;} */
  855. .order-details .nav {
  856. background-color: #fff;
  857. font-size: 26upx;
  858. color: #282828;
  859. padding: 25upx 0;
  860. }
  861. .order-details .nav .navCon {
  862. padding: 0 40upx;
  863. }
  864. .order-details .nav .navCon .on {
  865. font-weight: bold;
  866. color: #e93323;
  867. }
  868. .order-details .nav .progress {
  869. padding: 0 65upx;
  870. margin-top: 10upx;
  871. }
  872. .order-details .nav .progress .line {
  873. width: 100upx;
  874. height: 2upx;
  875. background-color: #939390;
  876. }
  877. .order-details .nav .progress .iconfont {
  878. font-size: 25upx;
  879. color: #939390;
  880. margin-top: -2upx;
  881. width: 30upx;
  882. height: 30upx;
  883. line-height: 33upx;
  884. text-align: center;
  885. margin-right: 0 !important;
  886. }
  887. .order-details .address {
  888. font-size: 26upx;
  889. color: #868686;
  890. background-color: #fff;
  891. padding: 25upx 30upx 30upx 30upx;
  892. }
  893. .order-details .address .name {
  894. font-size: 30upx;
  895. color: #282828;
  896. margin-bottom: 0.1rem;
  897. }
  898. .order-details .address .name .phone {
  899. margin-left: 40upx;
  900. }
  901. .order-details .line {
  902. width: 100%;
  903. height: 3upx;
  904. }
  905. .order-details .line image {
  906. width: 100%;
  907. height: 100%;
  908. display: block;
  909. }
  910. .order-details .wrapper {
  911. background-color: #fff;
  912. margin-top: 12upx;
  913. padding: 30upx;
  914. }
  915. .order-details .topnone{padding-top: 0upx;}
  916. .order-details .wrapper .title{
  917. height: 100upx;
  918. display: flex;
  919. justify-content: space-between;
  920. align-items: center;
  921. border-bottom: 1upx solid #EEEEEE;
  922. margin-bottom: 34upx;
  923. }
  924. .order-details .wrapper .title .font{
  925. font-size: 32upx;
  926. font-weight: 600;
  927. color: #282828;
  928. }
  929. .order-details .wrapper .title .mapbtn{
  930. width: 176upx;
  931. height: 56upx;
  932. border: 1upx solid #1890FF;
  933. border-radius: 28upx;
  934. text-align: center;
  935. line-height: 50upx;
  936. color: #1890FF;
  937. font-size: 26upx;
  938. }
  939. .order-details .wrapper .item {
  940. font-size: 28upx;
  941. color: #282828;
  942. }
  943. .order-details .wrapper .item~.item {
  944. margin-top: 20upx;
  945. }
  946. .order-details .wrapper .item .conter {
  947. color: #868686;
  948. width: 484rpx;
  949. display: flex;
  950. flex-wrap: nowrap;
  951. justify-content: flex-end;
  952. text-align: right;
  953. .pictrue{
  954. width: 80rpx;
  955. height: 80rpx;
  956. margin-left: 6rpx;
  957. image{
  958. width: 100%;
  959. height: 100%;
  960. border-radius: 6rpx;
  961. }
  962. }
  963. }
  964. .order-details .wrapper .item .conter .copy {
  965. font-size: 20rpx;
  966. color: #333;
  967. border-radius: 3rpx;
  968. border: 1px solid #666;
  969. padding: 0rpx 15rpx;
  970. margin-left: 24rpx;
  971. // height: 40rpx;
  972. }
  973. .order-details .wrapper .actualPay {
  974. border-top: 1upx solid #eee;
  975. margin-top: 30upx;
  976. padding-top: 30upx;
  977. }
  978. .order-details .wrapper .actualPay .money {
  979. font-weight: bold;
  980. font-size: 30upx;
  981. color: #e93323;
  982. }
  983. .order-details .footer {
  984. width: 100%;
  985. height: 100upx;
  986. position: fixed;
  987. bottom: 0;
  988. left: 0;
  989. background-color: #fff;
  990. padding: 0 30upx;
  991. border-top: 1px solid #eee;
  992. }
  993. .order-details .footer .wait{
  994. color: #2a7efb;
  995. margin-right: 30rpx;
  996. }
  997. .order-details .footer .bnt {
  998. width: auto;
  999. height: 60upx;
  1000. line-height: 60upx;
  1001. text-align: center;
  1002. line-height: upx;
  1003. border-radius: 50upx;
  1004. color: #fff;
  1005. font-size: 27upx;
  1006. padding: 0 3%;
  1007. &.on{
  1008. color: #c5c8ce!important;
  1009. background: #f7f7f7!important;
  1010. border: 1px solid #dcdee2!important;
  1011. }
  1012. }
  1013. .order-details .footer .bnt.cancel {
  1014. color: #aaa;
  1015. border: 1px solid #ddd;
  1016. }
  1017. .order-details .footer .bnt.default {
  1018. color: #444;
  1019. border: 1px solid #444;
  1020. }
  1021. .order-details .footer .bnt~.bnt {
  1022. margin-left: 18upx;
  1023. }
  1024. .pos-order-goods {
  1025. padding: 0 30upx;
  1026. background-color: #fff;
  1027. }
  1028. .pos-order-goods.split{
  1029. margin-top: 15upx;
  1030. padding: 0;
  1031. }
  1032. .pos-order-goods .title{
  1033. height: 80upx;
  1034. border-bottom: 1px solid #e5e5e5;
  1035. padding: 0 30upx;
  1036. }
  1037. .pos-order-goods .bnt{
  1038. padding: 7upx 20upx;
  1039. border: 1px solid #2a7efb;
  1040. color: #2a7efb;
  1041. border-radius: 30upx;
  1042. }
  1043. .pos-order-goods .goods {
  1044. height: 185upx;
  1045. }
  1046. .pos-order-goods.split .goods{
  1047. padding: 0 30upx;
  1048. }
  1049. .pos-order-goods .goods~.goods {
  1050. border-top: 1px dashed #e5e5e5;
  1051. }
  1052. .pos-order-goods .goods .picTxt {
  1053. width: 430upx;
  1054. }
  1055. .pos-order-goods .goods .picTxt .pictrue {
  1056. width: 130upx;
  1057. height: 130upx;
  1058. }
  1059. .pos-order-goods .goods .picTxt .pictrue image {
  1060. width: 100%;
  1061. height: 100%;
  1062. border-radius: 6upx;
  1063. }
  1064. .pos-order-goods .goods .picTxt .text {
  1065. width: 280upx;
  1066. display: flex;
  1067. justify-content: space-between;
  1068. flex-direction: column;
  1069. height: 130upx;
  1070. }
  1071. .pos-order-goods .goods .picTxt .text .info {
  1072. font-size: 28upx;
  1073. color: #282828;
  1074. }
  1075. .pos-order-goods .goods .picTxt .text .info .label{
  1076. color: #ff4c3c;
  1077. }
  1078. .pos-order-goods .goods .picTxt .text .attr {
  1079. font-size: 24upx;
  1080. color: #999;
  1081. width: 100%;
  1082. overflow: hidden;
  1083. white-space: nowrap;
  1084. text-overflow: ellipsis;
  1085. }
  1086. .pos-order-goods .goods .money {
  1087. width: 248upx;
  1088. height: 130upx;
  1089. text-align: right;
  1090. font-size: 28upx;
  1091. }
  1092. .pos-order-goods .goods .money .writeOff{
  1093. font-size: 24upx;
  1094. margin-top: 17upx;
  1095. color: #1890FF;
  1096. }
  1097. .pos-order-goods .goods .money .writeOff .on{
  1098. color: #FF7E00;
  1099. }
  1100. .pos-order-goods .goods .money .x-money {
  1101. color: #282828;
  1102. }
  1103. .pos-order-goods .goods .money .num {
  1104. color: #ff9600;
  1105. margin: 5upx 0;
  1106. }
  1107. .pos-order-goods .goods .money .y-money {
  1108. color: #999;
  1109. text-decoration: line-through;
  1110. }
  1111. .public-total {
  1112. font-size: 28upx;
  1113. color: #282828;
  1114. border-top: 1px solid #eee;
  1115. height: 92upx;
  1116. line-height: 92upx;
  1117. text-align: right;
  1118. padding: 0 30upx;
  1119. background-color: #fff;
  1120. }
  1121. .public-total .money {
  1122. color: #ff4c3c;
  1123. }
  1124. .copy-data {
  1125. font-size: 10px;
  1126. color: #333;
  1127. -webkit-border-radius: 1px;
  1128. border-radius: 1px;
  1129. border: 1px solid #666;
  1130. padding: 0px 7px;
  1131. margin-left: 12px;
  1132. // height: 20px;
  1133. }
  1134. .more-box {
  1135. color: #333;
  1136. position: absolute;
  1137. width: 180rpx;
  1138. left: 0rpx;
  1139. bottom: 110rpx;
  1140. background-color: #fff;
  1141. padding: 10rpx;
  1142. border-radius: 4rpx;
  1143. font-size: 24rpx;
  1144. -webkit-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
  1145. -moz-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
  1146. box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
  1147. .more-btn {
  1148. color: #aaa;
  1149. padding: 4rpx;
  1150. z-index: 9999;
  1151. border-bottom: 2rpx solid #f7f1f1 !important;
  1152. }
  1153. }
  1154. .more-box:before {
  1155. content: "";
  1156. width: 0rpx;
  1157. height: 0rpx;
  1158. border-top: 10rpx solid #fff;
  1159. border-bottom: 10rpx solid transparent;
  1160. border-left: 10rpx solid #fff;
  1161. position: absolute;
  1162. bottom: -10rpx;
  1163. left: 0px;
  1164. }
  1165. </style>