info.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <view class="app-content">
  3. <view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
  4. <view class="title">
  5. 单据信息
  6. </view>
  7. <view class="bills-info_box content-box">
  8. <view class="order-info_box">
  9. <view>订单日期:</view>
  10. <view>{{ detailInfo.addTime ?detailInfo.addTime.substr(5,11) : '' }}</view>
  11. </view>
  12. <view class="order-info_box">
  13. <view>订单编号:</view>
  14. <view>{{ detailInfo.orderSn }}</view>
  15. <view class="price">
  16. <button @click="copy(detailInfo.orderSn)" class="admin-button-com default" > 复制 </button>
  17. </view>
  18. </view>
  19. <view class="order-info_box" v-if="detailInfo.status == 2">
  20. <view>支付方式:</view>
  21. <view>
  22. {{ detailInfo.payWay == 0 ?'员工微信':detailInfo.payWay == 1?'员工支付宝':detailInfo.payWay==2?'余额支付':
  23. detailInfo.payWay==3?'欠款':detailInfo.payWay==4?'现金':detailInfo.payWay==5?'银行卡':'-' }}
  24. </view>
  25. </view>
  26. <view class="order-info_box">
  27. <view>操作人员:</view>
  28. <view>{{ detailInfo.operator }}</view>
  29. </view>
  30. <view class="order-info_box">
  31. <view>状态:</view>
  32. <view>{{ detailInfo.status == 1?'待结清':detailInfo.status == 2?'已结清':'已取消'}}</view>
  33. </view>
  34. </view>
  35. <view class="title">
  36. 订单信息
  37. </view>
  38. <view class="module-com content-box">
  39. <view class="commodity-view">
  40. <view class="commodity-list">
  41. <view v-for="(s, idx) in detailInfo.orderList" :key="idx" class="commodity-item" >
  42. <view class="item-info" @click="pageTo({url: '/pagesPurchase/info',query: {orderSn: s.orderSn,},})" >
  43. <view class="info-line">
  44. <text class="item-name">{{ s.orderSn }} 时间 {{s.addTime ? s.addTime.substr(5,11):''}}</text>
  45. <text class="item-price">
  46. <text class="unit">¥</text>
  47. <text class="price">{{ s.realPrice?parseFloat(s.realPrice):0 }}</text>
  48. </text>
  49. </view>
  50. <view class="info-line">
  51. <text class="item-type">
  52. <text v-if="Number(s.bigNum)>0">{{s.bigNum}}扎</text>
  53. <text v-if="Number(s.smallNum)>0">{{s.smallNum}}支</text>
  54. </text>
  55. <text class="item-count" style="font-weight:normal;color:#3385FF;font-size:26upx;">查看明细</text>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="summary-bar">
  61. <view class="operate-view" ></view>
  62. <view class="describe-view">
  63. 共{{ detailInfo.orderNum || 0 }}个订单
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="content-box price-detail">
  69. <div class="module-com input-line-wrap">
  70. <tui-list-cell class="line-cell" :hover="false">
  71. <div class="tui-title">总金额</div>
  72. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.prePrice?parseFloat(detailInfo.prePrice):0 }}</div>
  73. </tui-list-cell>
  74. <tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.discountAmount > 0">
  75. <div class="tui-title">扣除</div>
  76. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.discountAmount?parseFloat(detailInfo.discountAmount):0 }}</div>
  77. </tui-list-cell>
  78. <tui-list-cell class="line-cell" :hover="false">
  79. <div class="tui-title">实付</div>
  80. <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.realPrice?parseFloat(detailInfo.realPrice):0 }}</div>
  81. </tui-list-cell>
  82. </div>
  83. </view>
  84. <view class="content-box price-detail" v-if="!$util.isEmpty(detailInfo.remark)">
  85. <div class="module-com input-line-wrap">
  86. <tui-list-cell class="line-cell" :hover="false">
  87. <div class="tui-title">备注</div>
  88. <input
  89. :disabled="true"
  90. v-model="detailInfo.remark"
  91. placeholder-class="phcolor"
  92. class="tui-input"
  93. name="name"
  94. maxlength="50"
  95. type="text"
  96. />
  97. </tui-list-cell>
  98. </div>
  99. </view>
  100. <view class="title">
  101. 供货商
  102. </view>
  103. <view class="address-des_bx content-box">
  104. <view>
  105. <view> {{ detailInfo.ghsName }} {{ detailInfo.ghsMobile }} </view>
  106. </view>
  107. <view>
  108. <i @click="callUp(detailInfo.ghsMobile)" class="iconfont icondianhua1" ></i>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </template>
  114. <script>
  115. import { getDetail } from "@/api/clear/index";
  116. import productMins from "@/mixins/product";
  117. import TuiListCell from "@/components/plugin/list-cell";
  118. export default {
  119. name: "info",
  120. components: {
  121. TuiListCell
  122. },
  123. mixins: [productMins],
  124. data() {
  125. return {
  126. selectJobType: "order_change",
  127. autoLoad: false,
  128. stepActive: 0,
  129. form: {
  130. name: ""
  131. },
  132. detailInfo: {},
  133. loading: false
  134. };
  135. },
  136. onShow() {
  137. console.log('aabbcc')
  138. },
  139. methods: {
  140. copy(val) {
  141. const self = this;
  142. uni.setClipboardData({
  143. data: val,
  144. success: function() {
  145. self.$msg("复制成功");
  146. }
  147. });
  148. },
  149. callUp(mobile) {
  150. uni.makePhoneCall({
  151. phoneNumber: mobile
  152. });
  153. },
  154. async init() {
  155. const { id } = this.option;
  156. if (!id) {
  157. return;
  158. }
  159. const { data } = await getDetail(id);
  160. this.detailInfo = data;
  161. }
  162. }
  163. };
  164. </script>
  165. <style lang="scss" scoped>
  166. .info-content_box {
  167. padding: 0 20upx 100upx;
  168. & > .title {
  169. color: #666666;
  170. font-size: 28upx;
  171. font-weight: 600;
  172. padding: 30upx 3upx;
  173. }
  174. & .address-des_bx {
  175. display: flex;
  176. padding: 20upx 10upx 30upx 20upx;
  177. & > view:nth-child(1) {
  178. flex: 1;
  179. margin-top: 10upx;
  180. & > view:nth-child(1) {
  181. color: #333333;
  182. font-size: 32upx;
  183. font-weight: bold;
  184. }
  185. & > view:nth-child(2) {
  186. color: #666666;
  187. font-size: 28upx;
  188. font-weight: 400;
  189. margin-top: 20upx;
  190. }
  191. }
  192. & > view:nth-child(2) {
  193. display: flex;
  194. & .icondianhua1 {
  195. font-size: 50upx;
  196. color: #3385ff;
  197. margin-left: 0upx;
  198. margin-right:20upx;
  199. }
  200. }
  201. }
  202. .bills-info_box {
  203. padding: 30upx 20upx 30upx;
  204. // border-bottom: 1upx solid #EEEEEE;
  205. & > .order-info_box {
  206. display: flex;
  207. align-items: center;
  208. font-size: 26upx;
  209. font-weight: 400;
  210. margin-bottom: 5upx;
  211. & > view:nth-child(1) {
  212. color: #999999;
  213. width: 135upx;
  214. text-align: right;
  215. }
  216. & > view:nth-child(2) {
  217. color: #333333;
  218. }
  219. & > .price {
  220. flex: 1;
  221. font-size: 30upx;
  222. color: #333333;
  223. display: flex;
  224. align-items: center;
  225. justify-content: flex-end;
  226. & .iconxiangyou {
  227. color: #999999;
  228. font-size: 25upx;
  229. margin-left: 12upx;
  230. }
  231. }
  232. }
  233. }
  234. .content-box {
  235. background-color: #ffffff;
  236. border-radius: 10upx;
  237. }
  238. .commodity-view {
  239. display: flex;
  240. flex-direction: column;
  241. .commodity-list {
  242. padding: 20upx;
  243. .commodity-item {
  244. display: flex;
  245. margin-bottom: 20upx;
  246. .item-icon {
  247. flex-shrink: 0;
  248. width: 140upx;
  249. height: 140upx;
  250. }
  251. .item-info {
  252. display: flex;
  253. flex-direction: column;
  254. justify-content: center;
  255. flex: 1;
  256. margin-left: 20upx;
  257. .info-line {
  258. margin-bottom: 20upx;
  259. display: flex;
  260. justify-content: space-between;
  261. align-items: flex-end;
  262. .item-name {
  263. color: #666;
  264. font-size: 28upx;
  265. }
  266. .item-price {
  267. color: #333;
  268. font-size: 22upx;
  269. .price {
  270. font-size: 32upx;
  271. font-weight: bold;
  272. }
  273. }
  274. .item-type {
  275. color: #999;
  276. font-size: 24upx;
  277. }
  278. .item-count {
  279. color: #666;
  280. font-size: 24upx;
  281. }
  282. }
  283. }
  284. }
  285. }
  286. .summary-bar {
  287. padding: 0 20upx;
  288. height: 90upx;
  289. display: flex;
  290. align-items: center;
  291. justify-content: space-between;
  292. border-top: 1upx solid #eeeeee;
  293. .operate-view {
  294. display: flex;
  295. align-items: center;
  296. color: #3385ff;
  297. font-size: 26upx;
  298. .iconfont {
  299. margin-right: 20upx;
  300. font-size: 40upx;
  301. }
  302. }
  303. .describe-view {
  304. display: flex;
  305. align-items: center;
  306. color: #333;
  307. font-size: 24upx;
  308. .price {
  309. font-weight: bold;
  310. font-size: 36upx;
  311. }
  312. }
  313. }
  314. }
  315. .shipping-address {
  316. display: flex;
  317. align-items: center;
  318. margin-top: 20upx;
  319. & > view:nth-child(1) {
  320. color: #999999;
  321. font-size: 28upx;
  322. font-weight: 400;
  323. display: inline-block;
  324. padding: 30upx 0 30upx 20upx;
  325. flex: 1;
  326. & > text {
  327. color: #333333;
  328. font-weight: 600;
  329. }
  330. }
  331. & > view:nth-child(2) {
  332. font-size: 60upx;
  333. color: #d6e7ff;
  334. margin-right: 10upx;
  335. }
  336. }
  337. .price-detail {
  338. margin-top: 20upx;
  339. margin-bottom: 20upx;
  340. }
  341. .detail-price_box {
  342. color: #333333;
  343. font-size: 22upx;
  344. text-align: right;
  345. flex: 1;
  346. font-weight: 600;
  347. &.red {
  348. color: #ff2842;
  349. }
  350. }
  351. }
  352. .app-footer {
  353. display: flex;
  354. align-items: center;
  355. justify-content: flex-end;
  356. & .admin-button-com {
  357. padding: 0;
  358. margin-right: 15upx;
  359. width: 140upx;
  360. height: 70upx;
  361. line-height: 70upx;
  362. text-align: center;
  363. color: #3385ff;
  364. border: 1upx solid #3385ff;
  365. &.active{
  366. color: #666666;
  367. border: 1upx solid #ccc;
  368. }
  369. }
  370. }
  371. </style>