OrderItem.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. <template>
  2. <view>
  3. <view @click="pageTo({ url: '/pagesOrder/detail?id=' + item.id })">
  4. <view class="order-top_box">
  5. <image class="code-pay-img" v-if="currentStatus == 1 && item.book == 0" @click.stop="pageTo({ url:'/admin/billing/toPay',query:{orderId:item.id,orderSn:item.orderSn,actPrice:item.actPrice}})" mode="widthFix" :src="`${constant.imgUrl}/icon/codePay8.png`"></image>
  6. <image class="avatar" mode="aspectFit" :src="item.customAvatarUrl"></image>
  7. <view class="tit"> {{ item.customName || '' }}</view>
  8. <view class="other-refund" v-if="item.refund == 2">有售后</view>
  9. <view class="other-status" v-if="item.debt == 1">挂账</view>
  10. <text class="other-book" v-if="item.book == 1">预订单</text>
  11. <text class="other-presell" v-if="item.presell == 1">预售单</text>
  12. <view :class="['status', currentStatus == 4 ? 'buleColor' : currentStatus == 3 ? 'buleColor' : currentStatus == 1 ? 'defColor' : '']">
  13. {{currentStatus == 1 ? '待付款' : currentStatus == 2 ? '待发货' : currentStatus == 3 ? '配送中' : currentStatus == 4 ? '已完成' : currentStatus == 5?'已取消':''}}
  14. </view>
  15. </view>
  16. <view class="order-list_info">
  17. <view class="order-info_box">
  18. <view>货号:</view>
  19. <view>{{ item.sendNum }}</view>
  20. </view>
  21. <view class="order-info_box">
  22. <view>创建:</view>
  23. <view>
  24. {{ item.addTime ? item.addTime.substr(5, 11) : '' }}
  25. </view>
  26. <view
  27. v-if="item.addTime && item.payTime && item.payTime != '0000-00-00 00:00:00' && item.addTime.substr(5, 5) != item.payTime.substr(5, 5)"
  28. class="bill-date"
  29. >
  30. 账单日期 {{ item.payTime ? item.payTime.substr(5, 11) : '' }}
  31. </view>
  32. </view>
  33. <view class="order-info_box">
  34. <view>单号:</view>
  35. <view>{{ item.orderSn }}</view>
  36. </view>
  37. <view class="order-info_box">
  38. <view>方式:</view>
  39. <view>
  40. <text v-if="item.localOrder == 0">{{
  41. item.sendType == 0
  42. ? '送货上门'
  43. : item.sendType == 1
  44. ? '到店自取'
  45. : item.sendType == 2
  46. ? '跑腿送货'
  47. : item.sendType == 3
  48. ? item.wlName
  49. : item.sendType == 4
  50. ? '发快递'
  51. : ''
  52. }}</text>
  53. <text v-else>{{
  54. item.transType == 0
  55. ? '德邦物流'
  56. : item.transType == 1
  57. ? '顺丰物流'
  58. : item.transType == 2
  59. ? '冷链物流'
  60. : item.transType == 3
  61. ? '航空物流'
  62. : item.transType == 4
  63. ? '同城配送'
  64. : item.transType == 5
  65. ? '到店自取'
  66. : ''
  67. }}</text>
  68. </view>
  69. </view>
  70. <view class="order-info_box">
  71. <view>开单:</view>
  72. <view v-if="item.shopAdminId > 0">{{ item.shopAdminName }}</view>
  73. <view v-else>{{ item.customShopAdminName }}</view>
  74. </view>
  75. <view class="order-info_box">
  76. <view>数量:</view>
  77. <view v-if="item.smallNum > 0">{{ `${item.bigNum}/${item.smallNum}` }}</view>
  78. <view v-else>{{ item.bigNum }}</view>
  79. <view class="price">
  80. <text v-if="item.customDistName" class="price-dist-name">{{ item.customDistName }}</text>
  81. <view v-if="item.orderPrice == item.actPrice">¥{{ item.orderPrice ? parseFloat(item.orderPrice) : 0 }}</view>
  82. <view v-else>
  83. <text class="price-original">¥{{ item.orderPrice ? parseFloat(item.orderPrice) : 0 }}</text>
  84. <text class="price-discount">¥{{ item.actPrice ? parseFloat(item.actPrice) : 0 }}</text>
  85. </view>
  86. <i class="iconfont iconxiangyou"></i>
  87. </view>
  88. </view>
  89. <!-- 点击备注区域编辑,阻止冒泡避免进入订单详情 -->
  90. <view
  91. class="order-info_box remark-box remark-box--editable"
  92. v-if="!$util.isEmpty(item.remark)"
  93. @click.stop="openRemarkEdit(item)"
  94. >
  95. <view class="remark-text">{{ item.remark }}</view>
  96. </view>
  97. <view v-if="item.sameTimeIdsNum && item.sameTimeIdsNum > 1 && moreOrderRemind == true" class="merge-tips" @click.stop="pageTo({ url: '/admin/order/mergeOrder?ids=' + item.sameTimeIds+'&mergeId='+item.mergeId })" >
  98. 客户共有{{ item.sameTimeIdsNum }}个订单,点击查看
  99. </view>
  100. </view>
  101. <view class="list-bottom">
  102. <view class="list-button">
  103. <!-- #ifdef MP-WEIXIN -->
  104. <view class="list-button-item">
  105. <button
  106. open-type="share"
  107. :data-order-id="item.id"
  108. :data-share-type="shareBtnType"
  109. @click.stop="shareOrder(item)"
  110. class="admin-button-com bule list-btn--compact"
  111. >分享</button>
  112. </view>
  113. <!-- #endif -->
  114. <!-- #ifdef APP-PLUS -->
  115. <view class="list-button-item">
  116. <button @click.stop="shareOrder(item)" class="admin-button-com bule list-btn--compact">分享</button>
  117. </view>
  118. <!-- #endif -->
  119. <!-- #ifndef MP-WEIXIN -->
  120. <!-- #ifndef APP-PLUS -->
  121. <view class="list-button-item">
  122. <button @click.stop="shareOrder(item)" class="admin-button-com bule list-btn--compact">分享</button>
  123. </view>
  124. <!-- #endif -->
  125. <!-- #endif -->
  126. <block v-if="currentStatus == 2">
  127. <block v-if="item.book == 0">
  128. <view class="list-button-item"><button @click.stop="directFh(item)" class="admin-button-com bule list-btn--compact">发货</button> </view>
  129. </block>
  130. <block v-else>
  131. <view class="list-button-item"><button @click.stop="confirmFh(item)" class="admin-button-com bule list-btn--compact">发货</button> </view>
  132. </block>
  133. </block>
  134. <block v-else>
  135. <view class="list-button-item"><button disabled="true" class="admin-button-com bule active list-btn--compact">发货</button> </view>
  136. </block>
  137. <view class="list-button-item">
  138. <button @click.stop="printWlFlag(item)" class="admin-button-com bule list-btn--wide">
  139. 物流标<text>({{ item.printWlNum || 0 }})</text>
  140. </button>
  141. </view>
  142. <view class="list-button-item" v-if="currentStatus == 1">
  143. <button
  144. disabled="true"
  145. class="admin-button-com bule active list-btn--wide"
  146. :class="{ 'print-btn--unprinted': !isPrinted(item) }"
  147. >打印({{ item.printNum || 0 }})</button>
  148. </view>
  149. <view class="list-button-item" v-else>
  150. <button
  151. @click.stop="printOrder(item)"
  152. class="admin-button-com bule list-btn--wide"
  153. :class="{ 'print-btn--unprinted': !isPrinted(item) }"
  154. >
  155. 打印<text>({{ item.printNum || 0 }})</text>
  156. </button>
  157. </view>
  158. <view class="list-button-item">
  159. <button @click.stop="openMore(item)" class="admin-button-com bule list-btn--compact">更多</button>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. <uni-popup ref="morePopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
  165. <view class="more-popup-body">
  166. <view class="text-center"><button class="admin-button-com" @click="openPrintLog(item)">打印时间</button></view>
  167. <view class="text-center"><button class="admin-button-com" @click="openRemarkEdit(item)">备注</button></view>
  168. <block v-if="item.sendStatus == -4 && item.status == 2">
  169. <view class="text-center"><button class="admin-button-com" @click="callIntraCity(item)">呼叫跑腿</button></view>
  170. </block>
  171. <block v-else-if="[0, 1, 2, 3, 4, 10, 20, 30].includes(Number(item.sendStatus))">
  172. <view class="text-center"><button class="admin-button-com" @click="cancelExpressOrder(item)">取消跑腿</button></view>
  173. </block>
  174. <block v-else-if="[-1, -2].includes(Number(item.sendStatus)) && [2, 3].includes(Number(item.status))">
  175. <view class="text-center"><button class="admin-button-com" @click="callIntraCity(item)">重叫跑腿</button></view>
  176. </block>
  177. <!--
  178. <view class="text-center"><button class="admin-button-com" @click="addExpress(item)">顺丰下单</button></view>
  179. <view class="text-center"><button class="admin-button-com" @click="cancelExpress(item)">取消顺丰订单</button></view>
  180. <view class="text-center"><button class="admin-button-com" @click="fillNoFh(item)">填单发货</button></view>
  181. -->
  182. <view class="text-center"><button class="admin-button-com default" @click="closeMore">取消</button></view>
  183. </view>
  184. </uni-popup>
  185. <uni-popup ref="printLogPopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
  186. <view class="print-log-popup-body">
  187. <view class="print-log-sn-box">
  188. <text class="print-log-sn-label">打印机编号</text>
  189. <text class="print-log-sn-value">{{ printLogData.printSn || '-' }}</text>
  190. </view>
  191. <view class="print-log-head">打印时间 / 打印订单ID</view>
  192. <view class="print-log-list" v-if="printLogData.list && printLogData.list.length">
  193. <view class="print-log-item" v-for="(log, idx) in printLogData.list" :key="log.feieOrderId + '_' + idx">
  194. <view class="print-log-time">{{ log.printTimeText || '等待回调' }}</view>
  195. <view class="print-log-order-id">{{ log.feieOrderId }}</view>
  196. </view>
  197. </view>
  198. <view class="print-log-empty" v-else>暂无打印记录</view>
  199. <view class="text-center print-log-close">
  200. <button class="admin-button-com default" @click="closePrintLog">关闭</button>
  201. </view>
  202. </view>
  203. </uni-popup>
  204. <!-- 修改订单备注 -->
  205. <uni-popup ref="remarkPopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
  206. <view class="remark-popup-body">
  207. <view class="remark-popup-title">备注</view>
  208. <textarea
  209. class="remark-popup-input"
  210. v-model="modifyRemarkText"
  211. maxlength="200"
  212. placeholder="请填写备注"
  213. :show-confirm-bar="false"
  214. />
  215. <view class="remark-popup-actions">
  216. <button class="admin-button-com default remark-popup-btn" @click="closeRemarkPopup">取消</button>
  217. <button class="admin-button-com blue remark-popup-btn" @click="confirmRemarkModify">确定</button>
  218. </view>
  219. </view>
  220. </uni-popup>
  221. <!-- 新增物流下单弹窗 -->
  222. <uni-popup ref="expressAddressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
  223. <view class="express-popup-body">
  224. <view class="popup-title">发货信息</view>
  225. <view class="form-vertical">
  226. <view class="form-row">
  227. <view class="form-label">包裹数量:</view>
  228. <input class="input-control" type="number" v-model="wlPackageNum" placeholder="请输入包裹数量" />
  229. </view>
  230. <view class="form-row">
  231. <view class="form-label">重量(kg):</view>
  232. <input class="input-control" type="digit" v-model="wlWeight" placeholder="请输入重量" />
  233. </view>
  234. <view class="form-row">
  235. <view class="form-label">长度(cm):</view>
  236. <input class="input-control" type="number" v-model="wlLength" placeholder="请输入长度" />
  237. </view>
  238. <view class="form-row">
  239. <view class="form-label">宽度(cm):</view>
  240. <input class="input-control" type="number" v-model="wlWidth" placeholder="请输入宽度" />
  241. </view>
  242. <view class="form-row">
  243. <view class="form-label">高度(cm):</view>
  244. <input class="input-control" type="number" v-model="wlHeight" placeholder="请输入高度" />
  245. </view>
  246. <view class="form-row">
  247. <view class="form-label">城市:</view>
  248. <view class="form-value">{{ receiverCity }}</view>
  249. </view>
  250. <view class="form-row">
  251. <view class="form-label">地址:</view>
  252. <view class="form-value">{{ receiverAddress }}{{ receiverFloor }}</view>
  253. </view>
  254. <view class="form-row">
  255. <view class="form-label">姓名:</view>
  256. <view class="form-value">{{ receiverName }}</view>
  257. </view>
  258. <view class="form-row">
  259. <view class="form-label">电话:</view>
  260. <view class="form-value">{{ receiverMobile }}</view>
  261. </view>
  262. </view>
  263. <view class="popup-actions">
  264. <button class="admin-button-com default" @click="closeExpressPop">取消</button>
  265. <button class="admin-button-com bule" @click="modifyAddress(item)">修改地址</button>
  266. <button class="admin-button-com bule" @click="confirmAddExpress(item)">提交</button>
  267. </view>
  268. </view>
  269. </uni-popup>
  270. <!-- 跑腿弹窗 TODO: 要删除掉 -->
  271. <!--
  272. <uni-popup ref="callExpressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
  273. <view class="call-express-popup-body">
  274. <view class="popup-title">呼叫跑腿</view>
  275. <view class="form-vertical">
  276. <view class="form-row">
  277. <view class="form-label">姓名:</view>
  278. <view class="form-value">{{ callExpressData.user_name }}</view>
  279. </view>
  280. <view class="form-row">
  281. <view class="form-label">电话:</view>
  282. <view class="form-value">{{ callExpressData.user_phone }}</view>
  283. </view>
  284. <view class="form-row">
  285. <view class="form-label">订单号:</view>
  286. <view class="form-value">{{ callExpressData.orderSn }}</view>
  287. </view>
  288. <view class="form-row">
  289. <view class="form-label">地址:</view>
  290. <view class="form-value">{{ callExpressData.address }}</view>
  291. </view>
  292. <view class="form-row">
  293. <view class="form-label">包裹数:</view>
  294. <input class="input-control" type="number" v-model="callExpressData.packageNum" @focus="callExpressData.packageNum=''" placeholder="包裹数量" />
  295. </view>
  296. <view class="form-row">
  297. <view class="form-label">重量:</view>
  298. <input class="input-control" type="digit" v-model="callExpressData.weight" @focus="callExpressData.weight=''" placeholder="公斤" />
  299. </view>
  300. <view class="form-row">
  301. <view class="form-label">运费:</view>
  302. <view class="form-value" style="color:#3385FF;font-weight:bold;">{{ callExpressData.sendCost?parseFloat(callExpressData.sendCost):0 }}</view>
  303. </view>
  304. </view>
  305. <view class="popup-actions">
  306. <button class="admin-button-com default" @click="closeCallExpressPop">取消</button>
  307. <button class="admin-button-com bule" @click="selectFee(item)">查运费</button>
  308. <button class="admin-button-com bule" @click="confirmMyExpress(item)">提交</button>
  309. </view>
  310. </view>
  311. </uni-popup>
  312. -->
  313. </view>
  314. </template>
  315. <script>
  316. import { getUserDet } from '@/api/member';
  317. import { createExpressOrder, cancelExpressOrder as cancelSFExpressOrder } from '@/api/express';
  318. import { cancelDeliveryOrder } from '@/api/express/delivery';
  319. import { createCallExpressOrder, cancelCallExpressOrder,getOrderFee } from '@/api/shop/shop-express';
  320. import { printWlLabel, cloudPrintOrder, getOrderPrintLog, modifyRemarkFn } from '@/api/order';
  321. export default {
  322. name: 'OrderItem',
  323. options: {
  324. virtualHost: true
  325. },
  326. components: {},
  327. props: {
  328. item: {
  329. required: true
  330. },
  331. moreOrderRemind:{
  332. type: Boolean,
  333. default: true
  334. },
  335. /** 小程序分享按钮标记:merge 合并页单条分享传 single */
  336. shareBtnType: {
  337. type: String,
  338. default: ''
  339. }
  340. },
  341. data() {
  342. return {
  343. currentStatus: 0,
  344. wlPackageNum: 1,
  345. wlWeight: '',
  346. wlLength: 100,
  347. wlWidth: 70,
  348. wlHeight: 50,
  349. receiverCity: '',
  350. receiverAddress: '',
  351. receiverFloor: '',
  352. receiverName: '',
  353. receiverMobile: '',
  354. callExpressData: {sendCost:0,packageNum:1,weight:0},
  355. printLogData: { printSn: '', list: [] },
  356. /** 当前正在编辑备注的订单 */
  357. remarkEditItem: null,
  358. modifyRemarkText: ''
  359. };
  360. },
  361. mounted() {
  362. if (this.item.status) {
  363. this.currentStatus = this.item.status;
  364. }
  365. },
  366. methods: {
  367. modifyAddress(item) {
  368. this.closeExpressPop()
  369. this.$util.pageTo({url: '/pagesClient/member/modify?id=' + item.customId + '&name=' + item.customName,type:2})
  370. },
  371. shareOrder(info) {
  372. this.$emit('shareOrder', info);
  373. },
  374. updateFiled(info) {
  375. this.$emit('listendUpdateFiled', info);
  376. },
  377. bumpItemCount(item, key) {
  378. const value = (Number(item[key]) || 0) + 1
  379. this.$set(item, key, value)
  380. this.updateFiled({ id: item.id, key, value })
  381. },
  382. isPrinted(item) {
  383. return Number(item && item.printNum) > 0
  384. },
  385. directFh(info) {
  386. this.$emit('directFh', info);
  387. },
  388. confirmFh(info) {
  389. this.$util.pageTo({ url: '/pagesOrder/arrival?id=' + info.id });
  390. },
  391. fillNoFh(info) {
  392. this.closeMore();
  393. this.$emit('fillNoFh', info);
  394. },
  395. printOrder(item) {
  396. const that = this
  397. const doPrint = () => {
  398. uni.showLoading({ title: '打印中...' })
  399. cloudPrintOrder({ id: item.id }).then(res => {
  400. uni.hideLoading()
  401. if (res.code == 1) {
  402. if (res.data.hasNoPrint == 1) {
  403. that.$util.confirmModal({ content: '请先设置打印机' }, () => {
  404. that.$util.pageTo({ url: '/admin/shop/print' })
  405. })
  406. } else {
  407. that.bumpItemCount(item, 'printNum')
  408. }
  409. }
  410. })
  411. }
  412. if (item.printNum && Number(item.printNum) > 0) {
  413. this.$util.confirmModal({ content: '确认补打小票?' }, doPrint)
  414. } else {
  415. doPrint()
  416. }
  417. },
  418. printWlFlag(item) {
  419. const that = this
  420. const doPrint = () => {
  421. printWlLabel({ id: item.id }).then(res => {
  422. if (res.code == 1) {
  423. that.$msg(res.msg)
  424. that.bumpItemCount(item, 'printWlNum')
  425. }
  426. })
  427. }
  428. if (item.printWlNum && Number(item.printWlNum) > 0) {
  429. this.$util.confirmModal({ content: '确认补打物流标?' }, doPrint)
  430. } else {
  431. doPrint()
  432. }
  433. },
  434. openMore(item) {
  435. this.$refs.morePopup.open('center');
  436. },
  437. closeMore() {
  438. this.$refs.morePopup.close();
  439. },
  440. openPrintLog(item) {
  441. this.closeMore();
  442. uni.showLoading({ title: '加载中...' });
  443. getOrderPrintLog({ id: item.id }).then(res => {
  444. uni.hideLoading();
  445. if (res.code == 1) {
  446. this.printLogData = {
  447. printSn: res.data.printSn || '',
  448. list: res.data.list || []
  449. };
  450. this.$refs.printLogPopup.open('center');
  451. }
  452. }).catch(() => {
  453. uni.hideLoading();
  454. });
  455. },
  456. closePrintLog() {
  457. this.$refs.printLogPopup.close();
  458. },
  459. /** 打开备注编辑弹窗 */
  460. openRemarkEdit(item) {
  461. this.closeMore();
  462. this.remarkEditItem = item;
  463. this.modifyRemarkText = item.remark || '';
  464. this.$refs.remarkPopup.open('center');
  465. },
  466. closeRemarkPopup() {
  467. this.$refs.remarkPopup.close();
  468. this.remarkEditItem = null;
  469. this.modifyRemarkText = '';
  470. },
  471. /** 保存订单备注并同步列表展示 */
  472. confirmRemarkModify() {
  473. const item = this.remarkEditItem;
  474. if (!item || !item.id) {
  475. return;
  476. }
  477. const remark = (this.modifyRemarkText || '').trim();
  478. uni.showLoading({ title: '保存中...', mask: true });
  479. modifyRemarkFn({ id: item.id, remark }).then((res) => {
  480. uni.hideLoading();
  481. if (res.code == 1) {
  482. this.$set(item, 'remark', remark);
  483. this.updateFiled({ id: item.id, key: 'remark', value: remark });
  484. this.closeRemarkPopup();
  485. this.$msg('操作成功');
  486. }
  487. }).catch(() => {
  488. uni.hideLoading();
  489. });
  490. },
  491. callIntraCity(item) {
  492. this.closeMore();
  493. // this.callExpressData = {
  494. // orderId: item.id,
  495. // orderSn: item.orderSn,
  496. // weight: Number(item.weight),
  497. // packageNum: 1,
  498. // user_name: item.customName,
  499. // user_phone: item.customMobile,
  500. // user_lng: item.long,
  501. // user_lat: item.lat,
  502. // note: item.remark,
  503. // address: item.address
  504. // };
  505. // this.$refs.callExpressRef.open('center');
  506. this.$util.pageTo({ url: '/admin/delivery/allDelivery?orderId=' + item.id });
  507. },
  508. addExpress(item) {
  509. this.closeMore();
  510. getUserDet({ id: item.customId }).then((res) => {
  511. if (res.code == 1) {
  512. this.receiverCity = res.data.city;
  513. this.receiverAddress = res.data.address;
  514. this.receiverFloor = res.data.floor;
  515. this.receiverName = res.data.name;
  516. this.receiverMobile = res.data.mobile;
  517. }
  518. });
  519. this.$refs.expressAddressRef.open('center');
  520. },
  521. cancelExpress(item) {
  522. this.$util.confirmModal({ content: '确认取消?' }, () => {
  523. cancelSFExpressOrder({ id: item.id }).then((res) => {
  524. if (res.code == 1) {
  525. this.$msg(res.msg);
  526. this.closeMore();
  527. }
  528. });
  529. });
  530. },
  531. // 跑腿取消
  532. cancelExpressOrder(item) {
  533. this.$util.confirmModal({ content: '确认取消跑腿?' }, () => {
  534. cancelDeliveryOrder({ orderId: item.id }).then((res) => {
  535. if (res.code == 1) {
  536. // item.sendStatus = 3;
  537. // this.$emit('listendUpdateField', { id: item.id, key: 'sendStatus', value: 3 });
  538. this.updateFiled({ id: item.id, key: 'sendStatus', value: 3 });
  539. this.$msg(res.msg);
  540. this.closeMore();
  541. }
  542. });
  543. });
  544. },
  545. closeCallExpressPop() {
  546. this.$refs.callExpressRef.close();
  547. },
  548. selectFee(item){
  549. getOrderFee({id:item.id,packageNum:this.callExpressData.packageNum,weight:this.callExpressData.weight}).then(res=>{
  550. if(res.code == 1){
  551. if(res.data.est_fee){
  552. let fee = res.data.est_fee
  553. fee = Number(res.data.est_fee)/100
  554. fee = Number(fee).toFixed(2)
  555. fee = parseFloat(fee)
  556. this.callExpressData.sendCost = fee
  557. this.$forceUpdate()
  558. }
  559. this.$msg('查询成功')
  560. }
  561. })
  562. },
  563. confirmMyExpress(item) {
  564. this.$util.confirmModal({ content: '确认提交?' }, () => {
  565. const data = {
  566. orderId: item.id,
  567. weight: this.callExpressData.weight,
  568. packageNum: this.callExpressData.packageNum
  569. }
  570. createCallExpressOrder(data).then((res) => {
  571. if (res.code == 1) {
  572. this.updateFiled({ id: item.id, key: 'sendStatus', value: 0 })
  573. this.$msg(res.msg)
  574. this.closeCallExpressPop()
  575. }
  576. });
  577. });
  578. },
  579. closeExpressPop() {
  580. this.$refs.expressAddressRef.close();
  581. },
  582. confirmAddExpress(item) {
  583. if (Number(this.wlWeight) <= 0) {
  584. this.$msg('请填写重量');
  585. return false;
  586. }
  587. this.$util.confirmModal({ content: '确认提交?' }, () => {
  588. createExpressOrder({
  589. id: item.id,
  590. weight: Number(this.wlWeight),
  591. length: this.wlLength,
  592. width: this.wlWidth,
  593. height: this.wlHeight,
  594. packageNum: this.wlPackageNum
  595. }).then((res) => {
  596. if (res.code == 1) {
  597. this.$msg(res.msg);
  598. this.closeExpressPop();
  599. }
  600. });
  601. });
  602. }
  603. }
  604. };
  605. </script>
  606. <style lang="scss" scoped>
  607. .class-popup-style {
  608. z-index: 999999;
  609. }
  610. .print-btn--unprinted {
  611. color: #fff;
  612. background-color: $mainColor;
  613. border-color: $mainColor;
  614. }
  615. .list-top,
  616. .list-bottom {
  617. padding: 15upx 30upx;
  618. border-bottom: 1upx solid $borderColor;
  619. color: $fontColor3;
  620. .freight-text {
  621. margin-right: 60upx;
  622. }
  623. }
  624. .list-bottom {
  625. & > div {
  626. display: flex;
  627. justify-content: space-between;
  628. align-items: center;
  629. }
  630. .list-button {
  631. width: 100%;
  632. display: flex;
  633. flex-wrap: wrap;
  634. justify-content: space-between;
  635. align-items: center;
  636. .list-button-item {
  637. display: flex;
  638. align-items: center;
  639. justify-content: center;
  640. margin: 0 6upx 12upx 6upx;
  641. flex: none;
  642. min-height: 48upx;
  643. }
  644. /* 底部操作栏按钮基础样式 */
  645. .admin-button-com {
  646. height: 60upx;
  647. padding: 0 12upx;
  648. line-height: 60upx;
  649. text-align: center;
  650. font-size: 26upx;
  651. margin: 0;
  652. min-width: 100upx;
  653. max-width: 140upx;
  654. width: auto;
  655. flex: none;
  656. box-sizing: border-box;
  657. &.active {
  658. border: 1upx solid #ccc;
  659. }
  660. /* 两字按钮:分享、更多、发货 */
  661. &.list-btn--compact {
  662. width: 105upx;
  663. padding: 0;
  664. }
  665. /* 带计数文案:物流标、打印 */
  666. &.list-btn--wide {
  667. min-width: 140upx;
  668. max-width: 200upx;
  669. width: auto;
  670. padding: 0 16upx;
  671. }
  672. }
  673. }
  674. }
  675. .order-top_box {
  676. display: flex;
  677. align-items: center;
  678. padding: 20upx 30upx 20upx;
  679. position: relative;
  680. & > .tit {
  681. flex: 8;
  682. color: #333333;
  683. font-size: 30upx;
  684. font-weight: 650;
  685. margin-left: 15upx;
  686. }
  687. & > .other-presell {
  688. text-align: center;
  689. color: white;
  690. border: 2upx solid #059240;
  691. border-radius: 30upx;
  692. padding: 5upx 10upx;
  693. font-size: 20upx;
  694. background: #059240;
  695. margin-right: 20upx;
  696. width: auto;
  697. }
  698. & > .other-book {
  699. text-align: center;
  700. color: white;
  701. border: 2upx solid #657cac;
  702. border-radius: 30upx;
  703. padding: 5upx 10upx;
  704. font-size: 20upx;
  705. background: #657cac;
  706. margin-right: 20upx;
  707. width: auto;
  708. }
  709. & > .other-refund {
  710. text-align: center;
  711. color: white;
  712. background-color: rgb(202, 164, 94);
  713. border: 2upx solid rgb(202, 164, 94);
  714. border-radius: 30upx;
  715. padding: 5upx 12upx;
  716. font-size: 20upx;
  717. margin-right: 20upx;
  718. width: auto;
  719. }
  720. & > .other-status {
  721. text-align: center;
  722. color: white;
  723. background-color: #ff2842;
  724. border: 2upx solid red;
  725. border-radius: 30upx;
  726. padding: 5upx 12upx;
  727. font-size: 20upx;
  728. margin-right: 20upx;
  729. width: auto;
  730. }
  731. & > .status {
  732. flex: 2;
  733. text-align: right;
  734. color: #ff2842;
  735. &.buleColor {
  736. color: #3385ff;
  737. }
  738. &.defColor {
  739. color: #333333;
  740. }
  741. }
  742. }
  743. .code-pay-img {
  744. width: 105upx;
  745. position: absolute;
  746. top: 80upx;
  747. right: 12upx;
  748. }
  749. .avatar {
  750. width: 50upx;
  751. height: 50upx;
  752. border-radius: 50upx;
  753. }
  754. .bill-date {
  755. flex: 1;
  756. color: #a29696;
  757. display: flex;
  758. align-items: center;
  759. justify-content: flex-end;
  760. font-size: 28upx;
  761. }
  762. .price-original {
  763. text-decoration: line-through;
  764. color: #847676;
  765. }
  766. .price-discount {
  767. margin-left: 10upx;
  768. }
  769. .remark-box {
  770. background-color: #ffebee;
  771. border-left: 4upx solid #d32f2f;
  772. padding: 15upx 20upx;
  773. margin: 10upx 0;
  774. border-radius: 8upx;
  775. display: block !important; /* 覆盖父级的 flex 布局 */
  776. }
  777. .remark-box--editable:active {
  778. opacity: 0.85;
  779. }
  780. .remark-box .remark-text {
  781. color: #d32f2f !important; /* 强制覆盖父级颜色 */
  782. font-weight: bold !important;
  783. font-size: 28upx !important;
  784. line-height: 1.5;
  785. word-break: break-all;
  786. }
  787. /* 更强的选择器确保样式生效 */
  788. .order-list_info .order-info_box.remark-box .remark-text {
  789. color: #d32f2f !important;
  790. font-weight: bold !important;
  791. font-size: 28upx !important;
  792. }
  793. .merge-tips {
  794. text-align: center;
  795. color: white;
  796. margin-top: 20upx;
  797. font-size: 38upx;
  798. background-color: #3780a5ad;
  799. padding-top:16upx;
  800. padding-bottom:16upx;
  801. }
  802. .text-center {
  803. text-align: center;
  804. }
  805. .more-popup-body {
  806. padding: 50upx 1upx;
  807. width: 75vw;
  808. .admin-button-com {
  809. margin: 0 auto 30upx 4upx;
  810. width: 210upx;
  811. height: 80upx;
  812. line-height: 80upx;
  813. padding: 0;
  814. box-sizing: border-box;
  815. text-align: center;
  816. font-size: 29upx;
  817. }
  818. .text-center:last-child .admin-button-com {
  819. margin: 10upx auto 0 auto;
  820. }
  821. }
  822. .print-log-popup-body {
  823. padding: 40upx 30upx 30upx;
  824. width: 88vw;
  825. max-height: 70vh;
  826. box-sizing: border-box;
  827. }
  828. .print-log-sn-box {
  829. display: flex;
  830. flex-direction: row;
  831. align-items: center;
  832. justify-content: center;
  833. border: 2upx solid #333;
  834. border-radius: 12upx;
  835. padding: 24upx 20upx;
  836. margin-bottom: 30upx;
  837. }
  838. .print-log-sn-label {
  839. font-size: 30upx;
  840. color: #333;
  841. flex-shrink: 0;
  842. }
  843. .print-log-sn-value {
  844. font-size: 34upx;
  845. color: #333;
  846. font-weight: bold;
  847. margin-left: 16upx;
  848. }
  849. .print-log-head {
  850. color: #3385ff;
  851. font-size: 33upx;
  852. margin-bottom: 20upx;
  853. }
  854. .print-log-list {
  855. max-height: 45vh;
  856. overflow-y: auto;
  857. }
  858. .print-log-item {
  859. padding: 18upx 0;
  860. border-bottom: 1upx solid #eee;
  861. }
  862. .print-log-time {
  863. color: #b8860b;
  864. font-size: 34upx;
  865. margin-bottom: 8upx;
  866. }
  867. .print-log-order-id {
  868. color: #2e7d32;
  869. font-size: 28upx;
  870. word-break: break-all;
  871. }
  872. .print-log-empty {
  873. text-align: center;
  874. color: #999;
  875. font-size: 28upx;
  876. padding: 40upx 0;
  877. }
  878. .print-log-close {
  879. margin-top: 24upx;
  880. .admin-button-com {
  881. width: 210upx;
  882. height: 80upx;
  883. line-height: 80upx;
  884. font-size: 29upx;
  885. }
  886. }
  887. .remark-popup-body {
  888. width: 88vw;
  889. padding: 40upx 30upx 30upx;
  890. box-sizing: border-box;
  891. }
  892. .remark-popup-title {
  893. text-align: center;
  894. font-size: 34upx;
  895. color: #333333;
  896. font-weight: bold;
  897. margin-bottom: 30upx;
  898. }
  899. .remark-popup-input {
  900. width: 100%;
  901. height: 280upx;
  902. padding: 20upx;
  903. font-size: 28upx;
  904. color: #333333;
  905. border: 2upx solid #e0e0e0;
  906. border-radius: 8upx;
  907. box-sizing: border-box;
  908. }
  909. .remark-popup-actions {
  910. display: flex;
  911. flex-direction: row;
  912. align-items: center;
  913. justify-content: space-between;
  914. margin-top: 30upx;
  915. }
  916. /* 覆盖 admin-button-com 的 padding/line-height:1,保证文字垂直居中 */
  917. .remark-popup-btn {
  918. width: 45%;
  919. height: 80upx;
  920. line-height: 80upx;
  921. margin: 0;
  922. padding: 0;
  923. box-sizing: border-box;
  924. text-align: center;
  925. }
  926. .express-popup-body,
  927. .call-express-popup-body {
  928. padding: 40upx 50upx;
  929. width: 96vw;
  930. }
  931. .popup-title {
  932. font-size: 32upx;
  933. font-weight: bold;
  934. text-align: center;
  935. margin-bottom: 30upx;
  936. }
  937. .form-vertical {
  938. display: flex;
  939. flex-direction: column;
  940. gap: 18upx;
  941. }
  942. .form-row {
  943. display: flex;
  944. align-items: center;
  945. }
  946. .form-label {
  947. width: 135upx;
  948. color: #888;
  949. font-size: 28upx;
  950. white-space: nowrap;
  951. }
  952. .input-control {
  953. flex: 1;
  954. font-size: 28upx;
  955. border: 1px solid #eee;
  956. padding: 0 12upx;
  957. border-radius: 8upx;
  958. height: 60upx;
  959. line-height: 60upx;
  960. }
  961. .form-value {
  962. flex: 1;
  963. font-size: 28upx;
  964. }
  965. .popup-actions {
  966. display: flex;
  967. justify-content: space-around;
  968. margin-top: 40upx;
  969. .admin-button-com {
  970. width: 160upx;
  971. }
  972. }
  973. .order-list_info {
  974. padding: 10upx 30upx 30upx;
  975. border-bottom: 1upx solid #eeeeee;
  976. & > .order-info_box {
  977. display: flex;
  978. align-items: center;
  979. font-size: 26upx;
  980. font-weight: 400;
  981. margin-bottom: 5upx;
  982. & > view:nth-child(1) {
  983. color: #999999;
  984. }
  985. & > view:nth-child(2) {
  986. color: #333333;
  987. }
  988. & > .price {
  989. flex: 1;
  990. font-size: 30upx;
  991. color: #333333;
  992. display: flex;
  993. align-items: center;
  994. justify-content: flex-end;
  995. .price-dist-name {
  996. margin-right: 60upx;
  997. font-size: 28upx;
  998. color: #999999;
  999. flex-shrink: 0;
  1000. }
  1001. & .iconxiangyou {
  1002. color: #999999;
  1003. font-size: 25upx;
  1004. margin-left: 12upx;
  1005. }
  1006. }
  1007. }
  1008. }
  1009. input {
  1010. height: 60upx;
  1011. line-height: 60upx;
  1012. padding: 0 12upx;
  1013. font-size: 28upx;
  1014. box-sizing: border-box;
  1015. }
  1016. input::placeholder {
  1017. line-height: 60upx;
  1018. /* 可选:color、font-size 等 */
  1019. }
  1020. input::-webkit-input-placeholder {
  1021. line-height: 60upx;
  1022. }
  1023. input:-ms-input-placeholder {
  1024. line-height: 60upx;
  1025. }
  1026. input::-ms-input-placeholder {
  1027. line-height: 60upx;
  1028. }
  1029. </style>