info.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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="bills-info_box content-box">
  6. <view class="order-info_box">
  7. <view>订单日期:</view>
  8. <view>{{ detailInfo.addTime }}</view>
  9. </view>
  10. <view class="order-info_box">
  11. <view>订单编码:</view>
  12. <view>{{ detailInfo.orderSn }}</view>
  13. <view class="price">
  14. <button @click="copy(detailInfo.orderSn)" class="admin-button-com default">复制</button>
  15. </view>
  16. </view>
  17. <view class="order-info_box">
  18. <view>报损人员:</view>
  19. <view>{{ detailInfo.shopAdminName }}</view>
  20. </view>
  21. </view>
  22. <view class="title">
  23. 花材信息
  24. </view>
  25. <view class="module-com content-box">
  26. <view class="commodity-view">
  27. <view class="commodity-list">
  28. <view v-for="(s, idx) in detailInfo.itemInfo" :key="idx" class="commodity-item" >
  29. <image class="item-icon" :src="s.cover" />
  30. <view class="item-info">
  31. <view class="info-line">
  32. <text class="item-name">{{ s.name }}</text>
  33. <text class="item-price">
  34. <text class="unit">¥</text>
  35. <text class="price">{{ s.itemCost?parseFloat(s.itemCost):0 }}</text>
  36. </text>
  37. </view>
  38. <view class="info-line">
  39. <text class="item-type"></text>
  40. <text class="item-count">
  41. <text>{{s.itemNum?parseFloat(s.itemNum):0}}扎</text>
  42. </text>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="summary-bar">
  48. <view class="operate-view" ></view>
  49. <view class="describe-view">
  50. {{ detailInfo.itemInfo.length || 0 }}种,
  51. <text v-if="Number(detailInfo.bigNum)>0">{{ detailInfo.bigNum }}扎</text>
  52. <text v-if="Number(detailInfo.smallNum)>0">{{ detailInfo.smallNum}}支</text>,
  53. <text>¥{{ detailInfo.cost?parseFloat(detailInfo.cost):0}}</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="content-box price-detail">
  59. <div class="module-com input-line-wrap">
  60. <tui-list-cell class="line-cell" :hover="false">
  61. <div class="tui-title">备注</div>
  62. <input :disabled="true" v-model="detailInfo.remark" placeholder-class="phcolor" class="tui-input" name="name" type="text" />
  63. </tui-list-cell>
  64. </div>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import { wastageDetail } from "@/api/wastage/index";
  71. import productMins from "@/mixins/product";
  72. import TuiListCell from "@/components/plugin/list-cell";
  73. export default {
  74. name: "info",
  75. components: {
  76. TuiListCell
  77. },
  78. mixins: [productMins],
  79. data() {
  80. return {
  81. selectJobType: "order_change",
  82. autoLoad: false,
  83. stepActive: 0,
  84. form: {
  85. name: ""
  86. },
  87. detailInfo: {},
  88. loading: false
  89. };
  90. },
  91. onShow() {
  92. },
  93. methods: {
  94. copy(val) {
  95. const self = this;
  96. uni.setClipboardData({
  97. data: val,
  98. success: function() {
  99. self.$msg("复制成功");
  100. }
  101. });
  102. },
  103. callUp(mobile) {
  104. uni.makePhoneCall({
  105. phoneNumber: mobile
  106. });
  107. },
  108. async init() {
  109. const { orderSn } = this.option;
  110. if (!orderSn) {
  111. return;
  112. }
  113. const { data } = await wastageDetail({orderSn:orderSn});
  114. this.detailInfo = data;
  115. }
  116. }
  117. };
  118. </script>
  119. <style lang="scss" scoped>
  120. .info-content_box {
  121. padding: 0 20upx 100upx;
  122. & > .title {
  123. color: #666666;
  124. font-size: 28upx;
  125. font-weight: 600;
  126. padding: 30upx 3upx;
  127. }
  128. & .address-des_bx {
  129. display: flex;
  130. padding: 20upx 10upx 30upx 20upx;
  131. & > view:nth-child(1) {
  132. flex: 1;
  133. margin-top: 10upx;
  134. & > view:nth-child(1) {
  135. color: #333333;
  136. font-size: 32upx;
  137. font-weight: bold;
  138. }
  139. & > view:nth-child(2) {
  140. color: #666666;
  141. font-size: 28upx;
  142. font-weight: 400;
  143. margin-top: 20upx;
  144. }
  145. }
  146. & > view:nth-child(2) {
  147. display: flex;
  148. & .icondianhua1 {
  149. font-size: 50upx;
  150. color: #3385ff;
  151. margin-left: 0upx;
  152. }
  153. }
  154. }
  155. .bills-info_box {
  156. padding: 30upx 20upx 30upx;
  157. // border-bottom: 1upx solid #EEEEEE;
  158. & > .order-info_box {
  159. display: flex;
  160. align-items: center;
  161. font-size: 26upx;
  162. font-weight: 400;
  163. margin-bottom: 5upx;
  164. & > view:nth-child(1) {
  165. color: #999999;
  166. width: 135upx;
  167. text-align: right;
  168. }
  169. & > view:nth-child(2) {
  170. color: #333333;
  171. }
  172. & > .price {
  173. flex: 1;
  174. font-size: 30upx;
  175. color: #333333;
  176. display: flex;
  177. align-items: center;
  178. justify-content: flex-end;
  179. & .iconxiangyou {
  180. color: #999999;
  181. font-size: 25upx;
  182. margin-left: 12upx;
  183. }
  184. }
  185. }
  186. }
  187. .content-box {
  188. background-color: #ffffff;
  189. border-radius: 10upx;
  190. }
  191. .commodity-view {
  192. display: flex;
  193. flex-direction: column;
  194. .commodity-list {
  195. padding: 20upx;
  196. .commodity-item {
  197. display: flex;
  198. margin-bottom: 20upx;
  199. .item-icon {
  200. flex-shrink: 0;
  201. width: 140upx;
  202. height: 140upx;
  203. }
  204. .item-info {
  205. display: flex;
  206. flex-direction: column;
  207. justify-content: center;
  208. flex: 1;
  209. margin-left: 20upx;
  210. .info-line {
  211. margin-bottom: 20upx;
  212. display: flex;
  213. justify-content: space-between;
  214. align-items: flex-end;
  215. .item-name {
  216. color: #666;
  217. font-size: 28upx;
  218. }
  219. .item-price {
  220. color: #333;
  221. font-size: 22upx;
  222. .price {
  223. font-size: 32upx;
  224. font-weight: bold;
  225. }
  226. }
  227. .item-type {
  228. color: #999;
  229. font-size: 24upx;
  230. }
  231. .item-count {
  232. color: #666;
  233. font-size: 24upx;
  234. }
  235. }
  236. }
  237. }
  238. }
  239. .summary-bar {
  240. padding: 0 20upx;
  241. height: 90upx;
  242. display: flex;
  243. align-items: center;
  244. justify-content: space-between;
  245. border-top: 1upx solid #eeeeee;
  246. .operate-view {
  247. display: flex;
  248. align-items: center;
  249. color: #3385ff;
  250. font-size: 26upx;
  251. .iconfont {
  252. margin-right: 20upx;
  253. font-size: 40upx;
  254. }
  255. }
  256. .describe-view {
  257. display: flex;
  258. align-items: center;
  259. color: #333;
  260. font-size: 24upx;
  261. .price {
  262. font-weight: bold;
  263. font-size: 36upx;
  264. }
  265. }
  266. }
  267. }
  268. .shipping-address {
  269. display: flex;
  270. align-items: center;
  271. margin-top: 20upx;
  272. & > view:nth-child(1) {
  273. color: #999999;
  274. font-size: 28upx;
  275. font-weight: 400;
  276. display: inline-block;
  277. padding: 30upx 0 30upx 20upx;
  278. flex: 1;
  279. & > text {
  280. color: #333333;
  281. font-weight: 600;
  282. }
  283. }
  284. & > view:nth-child(2) {
  285. font-size: 60upx;
  286. color: #d6e7ff;
  287. margin-right: 10upx;
  288. }
  289. }
  290. .price-detail {
  291. margin-top: 20upx;
  292. margin-bottom: 20upx;
  293. }
  294. .detail-price_box {
  295. color: #333333;
  296. font-size: 22upx;
  297. text-align: right;
  298. flex: 1;
  299. font-weight: 600;
  300. &.red {
  301. color: #ff2842;
  302. }
  303. }
  304. }
  305. .app-footer {
  306. display: flex;
  307. align-items: center;
  308. justify-content: flex-end;
  309. & .admin-button-com {
  310. padding: 0;
  311. margin-right: 15upx;
  312. width: 140upx;
  313. height: 70upx;
  314. line-height: 70upx;
  315. text-align: center;
  316. color: #3385ff;
  317. border: 1upx solid #3385ff;
  318. &.active{
  319. color: #666666;
  320. border: 1upx solid #ccc;
  321. }
  322. }
  323. }
  324. </style>