index.vue 30 KB

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