info.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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>累计退款:</view>
  51. <view style="color:red;font-weight:bold;font-size:30upx;">{{parseFloat(detailInfo.tkPrice)}}</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;">欠款</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="printAllLabel(detailInfo)" style="float:right;font-weight:normal;color:#3385FF;">打全部标签</text>
  77. <text @click="goRefund(detailInfo)" style="float:right;font-weight:normal;color:#3385FF;margin-right:60upx;">申请退款</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. 共{{ detailInfo.kind || 0 }}种,<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" style="font-size: 28upx">-¥{{ 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 red" style="font-size: 30upx;">¥{{ 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.totalWeight?parseFloat(detailInfo.totalWeight):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.avgKgWeight?parseFloat(detailInfo.avgKgWeight):0 }}</div>
  186. </tui-list-cell>
  187. </div>
  188. </view>
  189. </view>
  190. </view>
  191. </template>
  192. <script>
  193. import { getPurchaseDetailApi,updateRemark,printAll,printItem } from "@/api/purchase";
  194. import productMins from "@/mixins/product";
  195. import TuiListCell from "@/components/plugin/list-cell";
  196. export default {
  197. name: "info",
  198. components: {
  199. TuiListCell
  200. },
  201. mixins: [productMins],
  202. data() {
  203. return {
  204. selectJobType: "order_change",
  205. autoLoad: false,
  206. stepActive: 0,
  207. form: {
  208. name: ""
  209. },
  210. detailInfo: {},
  211. loading: false
  212. };
  213. },
  214. methods: {
  215. goRefund(info){
  216. this.$util.pageTo({url:'/pagesPurchase/refund?orderSn='+info.orderSn})
  217. },
  218. printLabel(item){
  219. let that = this
  220. that.$util.confirmModal({content:'确认打印'},() => {
  221. printItem({id:item.id}).then(res=>{
  222. if(res.code == 1){
  223. that.$msg(res.msg)
  224. }
  225. })
  226. })
  227. },
  228. printAllLabel(item){
  229. let that = this
  230. that.$util.confirmModal({content:'确认打印'},() => {
  231. printAll({orderSn:item.orderSn}).then(res=>{
  232. if(res.code == 1){
  233. that.$msg(res.msg)
  234. }
  235. })
  236. })
  237. },
  238. goToClear (item) {
  239. this.pageTo({
  240. url: '/pagesGys/details?id='+item.ghsId
  241. })
  242. },
  243. modifyRemark(){
  244. const self = this;
  245. let remark = this.detailInfo.remark
  246. updateRemark({id:this.detailInfo.id,remark:remark}).then((res) => {
  247. self.$msg(res.msg);
  248. })
  249. },
  250. copy(val) {
  251. const self = this;
  252. uni.setClipboardData({
  253. data: val,
  254. success: function() {
  255. self.$msg("复制成功");
  256. }
  257. });
  258. },
  259. callUp(mobile) {
  260. uni.makePhoneCall({
  261. phoneNumber: mobile
  262. });
  263. },
  264. async init() {
  265. const { orderSn } = this.option;
  266. if (!orderSn) {
  267. return;
  268. }
  269. const { data } = await getPurchaseDetailApi(orderSn);
  270. this.detailInfo = data;
  271. }
  272. }
  273. };
  274. </script>
  275. <style lang="scss" scoped>
  276. .info-content_box {
  277. padding: 0 20upx 100upx;
  278. & > .title {
  279. color: #666666;
  280. font-size: 28upx;
  281. font-weight: 600;
  282. padding: 30upx 3upx;
  283. }
  284. & .address-des_bx {
  285. display: flex;
  286. padding: 20upx 10upx 30upx 20upx;
  287. & > view:nth-child(1) {
  288. flex: 1;
  289. margin-top: 10upx;
  290. & > view:nth-child(1) {
  291. color: #333333;
  292. font-size: 32upx;
  293. font-weight: bold;
  294. }
  295. & > view:nth-child(2) {
  296. color: #666666;
  297. font-size: 28upx;
  298. font-weight: 400;
  299. margin-top: 20upx;
  300. }
  301. }
  302. & > view:nth-child(2) {
  303. display: flex;
  304. & .icondianhua1 {
  305. font-size: 50upx;
  306. color: #3385ff;
  307. margin-left: 0upx;
  308. }
  309. }
  310. }
  311. .bills-info_box {
  312. padding: 30upx 20upx 30upx;
  313. // border-bottom: 1upx solid #EEEEEE;
  314. & > .order-info_box {
  315. display: flex;
  316. align-items: center;
  317. font-size: 26upx;
  318. font-weight: 400;
  319. margin-bottom: 5upx;
  320. & > view:nth-child(1) {
  321. color: #999999;
  322. width: 135upx;
  323. text-align: right;
  324. }
  325. & > view:nth-child(2) {
  326. color: #333333;
  327. }
  328. & > .price {
  329. flex: 1;
  330. font-size: 30upx;
  331. color: #333333;
  332. display: flex;
  333. align-items: center;
  334. justify-content: flex-end;
  335. & .iconxiangyou {
  336. color: #999999;
  337. font-size: 25upx;
  338. margin-left: 12upx;
  339. }
  340. }
  341. }
  342. }
  343. .content-box {
  344. background-color: #ffffff;
  345. border-radius: 10upx;
  346. }
  347. .commodity-view {
  348. display: flex;
  349. flex-direction: column;
  350. .commodity-list {
  351. padding: 20upx;
  352. .commodity-item {
  353. display: flex;
  354. margin-bottom: 20upx;
  355. .item-icon {
  356. flex-shrink: 0;
  357. width: 140upx;
  358. height: 140upx;
  359. }
  360. .item-info {
  361. display: flex;
  362. flex-direction: column;
  363. justify-content: center;
  364. flex: 1;
  365. margin-left: 20upx;
  366. .info-line {
  367. margin-bottom: 20upx;
  368. display: flex;
  369. justify-content: space-between;
  370. align-items: flex-end;
  371. .item-name {
  372. color: #666;
  373. font-size: 28upx;
  374. }
  375. .item-price {
  376. color: #333;
  377. font-size: 22upx;
  378. .price {
  379. font-size: 32upx;
  380. font-weight: bold;
  381. }
  382. }
  383. .item-type {
  384. color: #999;
  385. font-size: 24upx;
  386. }
  387. .item-count {
  388. color: #666;
  389. font-size: 24upx;
  390. }
  391. }
  392. }
  393. }
  394. }
  395. .summary-bar {
  396. padding: 0 20upx;
  397. height: 90upx;
  398. display: flex;
  399. align-items: center;
  400. justify-content: space-between;
  401. border-top: 1upx solid #eeeeee;
  402. .operate-view {
  403. display: flex;
  404. align-items: center;
  405. color: #3385ff;
  406. font-size: 26upx;
  407. .iconfont {
  408. margin-right: 20upx;
  409. font-size: 40upx;
  410. }
  411. }
  412. .describe-view {
  413. display: flex;
  414. align-items: center;
  415. color: #333;
  416. font-size: 24upx;
  417. .price {
  418. font-weight: bold;
  419. font-size: 36upx;
  420. }
  421. }
  422. }
  423. }
  424. .shipping-address {
  425. display: flex;
  426. align-items: center;
  427. margin-top: 20upx;
  428. & > view:nth-child(1) {
  429. color: #999999;
  430. font-size: 28upx;
  431. font-weight: 400;
  432. display: inline-block;
  433. padding: 30upx 0 30upx 20upx;
  434. flex: 1;
  435. & > text {
  436. color: #333333;
  437. font-weight: 600;
  438. }
  439. }
  440. & > view:nth-child(2) {
  441. font-size: 60upx;
  442. color: #d6e7ff;
  443. margin-right: 10upx;
  444. }
  445. }
  446. .price-detail {
  447. margin-top: 20upx;
  448. margin-bottom: 20upx;
  449. }
  450. .detail-price_box {
  451. color: #333333;
  452. font-size: 22upx;
  453. text-align: right;
  454. flex: 1;
  455. font-weight: 600;
  456. &.red {
  457. color: #ff2842;
  458. }
  459. }
  460. }
  461. .app-footer {
  462. display: flex;
  463. align-items: center;
  464. justify-content: flex-end;
  465. & .admin-button-com {
  466. padding: 0;
  467. margin-right: 15upx;
  468. width: 140upx;
  469. height: 70upx;
  470. line-height: 70upx;
  471. text-align: center;
  472. color: #3385ff;
  473. border: 1upx solid #3385ff;
  474. &.active{
  475. color: #666666;
  476. border: 1upx solid #ccc;
  477. }
  478. }
  479. }
  480. </style>