index.vue 29 KB

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