info.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <template>
  2. <view class="app-content">
  3. <view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
  4. <view class="title"> 供货商 </view>
  5. <view class="address-des_bx content-box">
  6. <view>
  7. <view> {{ detailInfo.supplierName }} {{ detailInfo.supplierMobile }} </view>
  8. <view class="">
  9. {{ detailInfo.supplierAddress}}
  10. </view>
  11. </view>
  12. <view>
  13. <i @click="callUp(detailInfo.supplierMobile)" class="iconfont icondianhua1" ></i>
  14. </view>
  15. </view>
  16. <view class="title"> 单据信息 </view>
  17. <view class="bills-info_box content-box">
  18. <view class="order-info_box">
  19. <view>订单日期:</view>
  20. <view>{{ detailInfo.addTime }}</view>
  21. </view>
  22. <view class="order-info_box">
  23. <view>订单编码:</view>
  24. <view>{{ detailInfo.orderSn }}</view>
  25. <view class="price">
  26. <button @click="copy(detailInfo.orderSn)" class="admin-button-com default" > 复制 </button>
  27. </view>
  28. </view>
  29. <view class="order-info_box">
  30. <view>入库人员:</view>
  31. <view>{{ detailInfo.adminName }}</view>
  32. </view>
  33. <view class="order-info_box">
  34. <view>入库日期:</view>
  35. <view>{{ detailInfo.entryTime }}</view>
  36. </view>
  37. <view class="order-info_box">
  38. <view>状态:</view>
  39. <view>{{
  40. detailInfo.status==1?'待付款'
  41. :detailInfo.status==2?'待配送'
  42. :detailInfo.status==3?'配送中'
  43. :detailInfo.status==4?'已签收'
  44. :detailInfo.status==5?'已入库'
  45. :detailInfo.status==6?'已取消'
  46. :'已退款'
  47. }}</view>
  48. </view>
  49. <view v-if="detailInfo.refund == 2" class="order-info_box">
  50. <view style="color:red;font-weight:bold;">累计退款:</view>
  51. <view style="color:red;font-weight:bold;font-size:30upx;">¥{{detailInfo.tkPrice?parseFloat(detailInfo.tkPrice):0}}</view>
  52. <view class="price" v-if="detailInfo.refund==2">
  53. <text @click="pageTo({url: '/pagesPurchase/refundList',query: {orderSn: detailInfo.orderSn}})" style="font-weight:normal;color:#3385FF;">退款记录</text>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="bills-info_box content-box" style="margin-top:18upx;">
  58. <view class="order-info_box" v-if="detailInfo.debt == 1">
  59. <view>订单状态:</view>
  60. <view style="color:red;font-weight:bold;">欠款</view>
  61. <view class="price">
  62. <text @click="goToClear(detailInfo)" style="font-weight:normal;color:#3385FF;">全部欠款</text>
  63. </view>
  64. </view>
  65. <view class="order-info_box" v-else>
  66. <view>订单状态:</view>
  67. <view v-if="detailInfo.clearId > 0">已结清</view>
  68. <view class="price" v-if="detailInfo.clearId > 0">
  69. <button @click="pageTo({url: '/admin/clear/info',query: {id: detailInfo.clearId}})" class="admin-button-com">查看结账单</button>
  70. </view>
  71. <view v-if="detailInfo.clearId == 0">--</view>
  72. </view>
  73. </view>
  74. <view class="title">
  75. 商品信息
  76. <text @click="goRefund(detailInfo)" style="float:right;font-weight:normal;color:#3385FF;margin-right:20upx;">申请退款</text>
  77. <text @click="printAllLabel(detailInfo)" style="float:right;font-weight:normal;color:#3385FF;margin-right:100upx;">打全部标签</text>
  78. </view>
  79. <view class="module-com content-box">
  80. <view class="commodity-view">
  81. <view class="commodity-list">
  82. <view v-for="(s, idx) in detailInfo.itemInfo" :key="idx" class="commodity-item" @click="pageTo({ url: '/admin/item/detail?id='+s.productId })" >
  83. <image class="item-icon" :src="s.cover" alt="" />
  84. <view class="item-info">
  85. <view class="info-line">
  86. <text class="item-name">{{ s.name }}</text>
  87. <text class="item-price">
  88. <text class="unit">¥</text>
  89. <text class="price">{{ s.bigPrice ? parseFloat(s.bigPrice) : 0 }}</text>
  90. </text>
  91. </view>
  92. <view class="info-line">
  93. <text class="item-type" style="color:#3385FF;" @click.stop="printLabel(s)">打标签</text>
  94. <text class="item-count">{{ parseFloat(s.itemNum) }}扎</text>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="summary-bar">
  100. <view class="operate-view" ></view>
  101. <view class="describe-view">
  102. 共<text v-if="Number(detailInfo.bigNum)>0">{{ detailInfo.bigNum }}扎</text><text v-if="Number(detailInfo.smallNum)>0">{{detailInfo.smallNum}}支</text>,
  103. 合计 ¥<text class="price">{{ detailInfo.price ? parseFloat(detailInfo.price) : 0 }}</text>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="content-box price-detail">
  109. <div class="module-com input-line-wrap">
  110. <tui-list-cell class="line-cell" :hover="false">
  111. <div class="tui-title">运费支付</div>
  112. <div class="detail-price_box" style="font-size: 28upx;">{{detailInfo.yfPayWay==1?'寄付':'到付'}}</div>
  113. </tui-list-cell>
  114. <tui-list-cell class="line-cell" :hover="false">
  115. <div class="tui-title">打包费</div>
  116. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.packingCharge?parseFloat(detailInfo.packingCharge):0 }}</div>
  117. </tui-list-cell>
  118. <tui-list-cell v-if="detailInfo.yfPayWay==1" class="line-cell" :hover="false">
  119. <div class="tui-title">短途运费</div>
  120. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.shortCharge?parseFloat(detailInfo.shortCharge):0 }}</div>
  121. </tui-list-cell>
  122. <tui-list-cell v-if="detailInfo.yfPayWay==1" class="line-cell" :hover="false">
  123. <div class="tui-title">长途运费</div>
  124. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.longCharge?parseFloat(detailInfo.longCharge):0 }}</div>
  125. </tui-list-cell>
  126. </div>
  127. </view>
  128. <view class="content-box price-detail">
  129. <div class="module-com input-line-wrap">
  130. <tui-list-cell class="line-cell" :hover="false">
  131. <div class="tui-title">总金额</div>
  132. <div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.prePrice ? parseFloat(detailInfo.prePrice) : 0 }}</div>
  133. </tui-list-cell>
  134. <tui-list-cell v-if="detailInfo.refundPrice > 0" class="line-cell" :hover="false">
  135. <div class="tui-title">退款金额</div>
  136. <div class="detail-price_box red" style="font-size:30upx">-¥{{ detailInfo.tkPrice ? parseFloat(detailInfo.tkPrice) : 0 }}</div>
  137. </tui-list-cell>
  138. <tui-list-cell v-if="detailInfo.discountAmount > 0" class="line-cell" :hover="false">
  139. <div class="tui-title">减免</div>
  140. <div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.discountAmount ? parseFloat(detailInfo.discountAmount) : 0 }}</div>
  141. </tui-list-cell>
  142. <tui-list-cell class="line-cell" :hover="false">
  143. <div class="tui-title">实际金额</div>
  144. <div class="detail-price_box" style="font-size:32upx;color:#3385FF;">¥{{ detailInfo.realPrice ? parseFloat(detailInfo.realPrice) : 0 }}</div>
  145. </tui-list-cell>
  146. </div>
  147. </view>
  148. <view class="content-box price-detail">
  149. <div class="module-com input-line-wrap">
  150. <tui-list-cell class="line-cell" :hover="false">
  151. <div class="tui-title">备注</div>
  152. <textarea style="height: 130upx;width:350upx;" @focus="detailInfo.remark=''" v-model="detailInfo.remark" placeholder="这里写备注"/>
  153. <button class="admin-button-com blue mini-btn" @click="modifyRemark(item)" >修改</button>
  154. </tui-list-cell>
  155. </div>
  156. </view>
  157. <view class="content-box price-detail">
  158. <div class="module-com input-line-wrap">
  159. <tui-list-cell v-if="detailInfo.yfPayWay==2" class="line-cell" :hover="false">
  160. <div class="tui-title">短途运费</div>
  161. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.shortCharge?parseFloat(detailInfo.shortCharge):0 }}</div>
  162. </tui-list-cell>
  163. <tui-list-cell v-if="detailInfo.yfPayWay==2" class="line-cell" :hover="false">
  164. <div class="tui-title">长途运费</div>
  165. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.longCharge?parseFloat(detailInfo.longCharge):0 }}</div>
  166. </tui-list-cell>
  167. <tui-list-cell class="line-cell" :hover="false">
  168. <div class="tui-title">提货费</div>
  169. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.pickCharge?parseFloat(detailInfo.pickCharge):0 }}</div>
  170. </tui-list-cell>
  171. <tui-list-cell class="line-cell" :hover="false">
  172. <div class="tui-title">本地运费</div>
  173. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.localCharge?parseFloat(detailInfo.localCharge):0 }}</div>
  174. </tui-list-cell>
  175. <tui-list-cell class="line-cell" :hover="false">
  176. <div class="tui-title">合计费用</div>
  177. <div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.totalFreight?parseFloat(detailInfo.totalFreight):0 }}</div>
  178. </tui-list-cell>
  179. <tui-list-cell class="line-cell" :hover="false">
  180. <div class="tui-title">合计成本</div>
  181. <div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.totalCgCost?parseFloat(detailInfo.totalCgCost):0 }}</div>
  182. </tui-list-cell>
  183. <tui-list-cell class="line-cell" :hover="false">
  184. <div class="tui-title">总重量</div>
  185. <div class="detail-price_box" style="font-size: 30upx;">{{ detailInfo.totalWeight?parseFloat(detailInfo.totalWeight):0 }}</div>
  186. </tui-list-cell>
  187. <tui-list-cell class="line-cell" :hover="false">
  188. <div class="tui-title">每公斤运费</div>
  189. <div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.avgKgWeight?parseFloat(detailInfo.avgKgWeight):0 }}</div>
  190. </tui-list-cell>
  191. </div>
  192. </view>
  193. </view>
  194. </view>
  195. </template>
  196. <script>
  197. import { getPurchaseDetailApi,updateRemark,printAll,printItem } from "@/api/purchase";
  198. import productMins from "@/mixins/product";
  199. import TuiListCell from "@/components/plugin/list-cell";
  200. export default {
  201. name: "info",
  202. components: {
  203. TuiListCell
  204. },
  205. mixins: [productMins],
  206. data() {
  207. return {
  208. selectJobType: "order_change",
  209. autoLoad: false,
  210. stepActive: 0,
  211. form: {
  212. name: ""
  213. },
  214. detailInfo: {},
  215. loading: false
  216. };
  217. },
  218. methods: {
  219. goRefund(info){
  220. this.$util.pageTo({url:'/pagesPurchase/refund?orderSn='+info.orderSn})
  221. },
  222. printLabel(item){
  223. let that = this
  224. that.$util.confirmModal({content:'确认打印'},() => {
  225. printItem({id:item.id}).then(res=>{
  226. if(res.code == 1){
  227. that.$msg(res.msg)
  228. }
  229. })
  230. })
  231. },
  232. printAllLabel(item){
  233. let that = this
  234. that.$util.confirmModal({content:'确认打印'},() => {
  235. printAll({orderSn:item.orderSn}).then(res=>{
  236. if(res.code == 1){
  237. that.$msg(res.msg)
  238. }
  239. })
  240. })
  241. },
  242. goToClear (item) {
  243. this.pageTo({
  244. url: '/pagesGys/details?id='+item.ghsId
  245. })
  246. },
  247. modifyRemark(){
  248. const self = this;
  249. let remark = this.detailInfo.remark
  250. updateRemark({id:this.detailInfo.id,remark:remark}).then((res) => {
  251. self.$msg(res.msg);
  252. })
  253. },
  254. copy(val) {
  255. const self = this;
  256. uni.setClipboardData({
  257. data: val,
  258. success: function() {
  259. self.$msg("复制成功");
  260. }
  261. });
  262. },
  263. callUp(mobile) {
  264. uni.makePhoneCall({
  265. phoneNumber: mobile
  266. });
  267. },
  268. async init() {
  269. const { orderSn } = this.option;
  270. if (!orderSn) {
  271. return;
  272. }
  273. const { data } = await getPurchaseDetailApi(orderSn);
  274. this.detailInfo = data;
  275. }
  276. }
  277. };
  278. </script>
  279. <style lang="scss" scoped>
  280. .info-content_box {
  281. padding: 0 20upx 100upx;
  282. & > .title {
  283. color: #666666;
  284. font-size: 28upx;
  285. font-weight: 600;
  286. padding: 30upx 3upx;
  287. }
  288. & .address-des_bx {
  289. display: flex;
  290. padding: 20upx 10upx 20upx 20upx;
  291. & > view:nth-child(1) {
  292. flex: 1;
  293. margin-top: 10upx;
  294. & > view:nth-child(1) {
  295. color: #333333;
  296. font-size: 32upx;
  297. font-weight: bold;
  298. }
  299. & > view:nth-child(2) {
  300. color: #666666;
  301. font-size: 28upx;
  302. font-weight: 400;
  303. margin-top: 20upx;
  304. }
  305. }
  306. & > view:nth-child(2) {
  307. display: flex;
  308. & .icondianhua1 {
  309. font-size: 50upx;
  310. color: #3385ff;
  311. margin-left: 0upx;
  312. margin-right:30upx;
  313. }
  314. }
  315. }
  316. .bills-info_box {
  317. padding: 30upx 20upx 30upx;
  318. // border-bottom: 1upx solid #EEEEEE;
  319. & > .order-info_box {
  320. display: flex;
  321. align-items: center;
  322. font-size: 26upx;
  323. font-weight: 400;
  324. margin-bottom: 5upx;
  325. & > view:nth-child(1) {
  326. color: #999999;
  327. width: 135upx;
  328. text-align: right;
  329. }
  330. & > view:nth-child(2) {
  331. color: #333333;
  332. }
  333. & > .price {
  334. flex: 1;
  335. font-size: 30upx;
  336. color: #333333;
  337. display: flex;
  338. align-items: center;
  339. justify-content: flex-end;
  340. & .iconxiangyou {
  341. color: #999999;
  342. font-size: 25upx;
  343. margin-left: 12upx;
  344. }
  345. }
  346. }
  347. }
  348. .content-box {
  349. background-color: #ffffff;
  350. border-radius: 10upx;
  351. }
  352. .commodity-view {
  353. display: flex;
  354. flex-direction: column;
  355. .commodity-list {
  356. padding: 20upx;
  357. .commodity-item {
  358. display: flex;
  359. margin-bottom: 20upx;
  360. .item-icon {
  361. flex-shrink: 0;
  362. width: 140upx;
  363. height: 140upx;
  364. }
  365. .item-info {
  366. display: flex;
  367. flex-direction: column;
  368. justify-content: center;
  369. flex: 1;
  370. margin-left: 20upx;
  371. .info-line {
  372. margin-bottom: 20upx;
  373. display: flex;
  374. justify-content: space-between;
  375. align-items: flex-end;
  376. .item-name {
  377. color: #666;
  378. font-size: 28upx;
  379. }
  380. .item-price {
  381. color: #333;
  382. font-size: 22upx;
  383. .price {
  384. font-size: 32upx;
  385. font-weight: bold;
  386. }
  387. }
  388. .item-type {
  389. color: #999;
  390. font-size: 24upx;
  391. }
  392. .item-count {
  393. color: #666;
  394. font-size: 24upx;
  395. }
  396. }
  397. }
  398. }
  399. }
  400. .summary-bar {
  401. padding: 0 20upx;
  402. height: 90upx;
  403. display: flex;
  404. align-items: center;
  405. justify-content: space-between;
  406. border-top: 1upx solid #eeeeee;
  407. .operate-view {
  408. display: flex;
  409. align-items: center;
  410. color: #3385ff;
  411. font-size: 26upx;
  412. .iconfont {
  413. margin-right: 20upx;
  414. font-size: 40upx;
  415. }
  416. }
  417. .describe-view {
  418. display: flex;
  419. align-items: center;
  420. color: #333;
  421. font-size: 24upx;
  422. .price {
  423. font-weight: bold;
  424. font-size: 36upx;
  425. }
  426. }
  427. }
  428. }
  429. .shipping-address {
  430. display: flex;
  431. align-items: center;
  432. margin-top: 20upx;
  433. & > view:nth-child(1) {
  434. color: #999999;
  435. font-size: 28upx;
  436. font-weight: 400;
  437. display: inline-block;
  438. padding: 30upx 0 30upx 20upx;
  439. flex: 1;
  440. & > text {
  441. color: #333333;
  442. font-weight: 600;
  443. }
  444. }
  445. & > view:nth-child(2) {
  446. font-size: 60upx;
  447. color: #d6e7ff;
  448. margin-right: 10upx;
  449. }
  450. }
  451. .price-detail {
  452. margin-top: 20upx;
  453. margin-bottom: 20upx;
  454. }
  455. .detail-price_box {
  456. color: #333333;
  457. font-size: 22upx;
  458. text-align: right;
  459. flex: 1;
  460. font-weight: 600;
  461. &.red {
  462. color: #ff2842;
  463. }
  464. }
  465. }
  466. .app-footer {
  467. display: flex;
  468. align-items: center;
  469. justify-content: flex-end;
  470. & .admin-button-com {
  471. padding: 0;
  472. margin-right: 15upx;
  473. width: 140upx;
  474. height: 70upx;
  475. line-height: 70upx;
  476. text-align: center;
  477. color: #3385ff;
  478. border: 1upx solid #3385ff;
  479. &.active{
  480. color: #666666;
  481. border: 1upx solid #ccc;
  482. }
  483. }
  484. }
  485. </style>