info.vue 7.1 KB

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