cm-contract-order.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template name="goods">
  2. <view class="goods-template">
  3. <!-- 商品列表 -->
  4. <view class="goods-list">
  5. <view class="goods-main clearfix">
  6. <view class="goods-item">
  7. <view class="goods-item-td">产品名称</view>
  8. <view class="goods-item-td">注册证编号</view>
  9. <view class="goods-item-td">生产厂家</view>
  10. <view class="goods-item-td">规格</view>
  11. <view class="goods-item-td">数量(支)</view>
  12. <view class="goods-item-td">单价(元/支)</view>
  13. <view class="goods-item-td">总价(元)</view>
  14. </view>
  15. <view class="goods-item" v-for="(pros, idx) in orderData.orderProductList" :key="idx">
  16. <view class="goods-item-td">{{ pros.name }}</view>
  17. <view class="goods-item-td">国械注准20213130488 晋药消械生产许20150014号</view>
  18. <view class="goods-item-td">山西锦波生物医药股份有限公司</view>
  19. <view class="goods-item-td">{{ pros.productUnit }}</view>
  20. <view class="goods-item-td"><text class="red">{{ pros.num }}</text></view>
  21. <view class="goods-item-td"><text class="red">¥{{ pros.price | NumFormat }}</text></view>
  22. <view class="goods-item-td"><text class="red">¥{{ orderData.totalAmount | NumFormat }}</text> </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. name: 'goods',
  31. props: {
  32. orderData: {
  33. type: Object
  34. }
  35. },
  36. data() {
  37. return {
  38. }
  39. },
  40. created() {
  41. console.log('orderData',this.orderData)
  42. },
  43. filters: {
  44. NumFormat(value) {
  45. //处理金额
  46. return Number(value).toFixed(2)
  47. }
  48. },
  49. watch: {
  50. orderData: {
  51. handler: function(el) {
  52. //监听对象的变换使用 function,箭头函数容易出现this指向不正确
  53. this.orderData = el
  54. },
  55. deep: true
  56. }
  57. },
  58. computed: {},
  59. methods: {
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .goods-template {
  65. width: 100%;
  66. height: auto;
  67. background: #ffffff;
  68. box-sizing: border-box;
  69. padding: 24rpx 0;
  70. .goods-list {
  71. width: 100%;
  72. height: auto;
  73. overflow-x: scroll;
  74. padding: 24rpx 0;
  75. .goods-main {
  76. width: 1500rpx;
  77. min-height: 240rpx;
  78. border: 1px solid #666666;
  79. border-radius: 10rpx;
  80. display: flex;
  81. flex-direction: column;
  82. align-items: center;
  83. .goods-item {
  84. width: 100%;
  85. border-bottom: 1px solid #666666;
  86. display: flex;
  87. justify-content: center;
  88. &:last-child {
  89. border-bottom: none;
  90. }
  91. .goods-item-td {
  92. width: 14.28%;
  93. display: flex;
  94. justify-content: center;
  95. align-items: center;
  96. flex-wrap: wrap;
  97. padding: 20rpx;
  98. font-size: $font-size-24;
  99. line-height: 40rpx;
  100. color: #666666;
  101. box-sizing: border-box;
  102. border-right: 1px solid #666666;
  103. .red{
  104. color: #ff2a2a;
  105. }
  106. &:last-child {
  107. border-right: none;
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. </style>