自主项目,食堂系统,前端uniapp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
3.5 KiB

  1. <template>
  2. <view>
  3. <view class="lf-p-32 lf-p-t-30 lf-p-b-30 lf-w-100 lf-h-maxcontent lf-border-box">
  4. <view class="lf-font-28 lf-font-bold lf-color-black">报价清单</view>
  5. <view class="lf-font-24 lf-color-gray lf-m-t-5">请在以下物资信息表内填写报价</view>
  6. </view>
  7. <!-- 修饰条 -->
  8. <self-line></self-line>
  9. <!-- 物料table -->
  10. <view class="lf-p-32 lf-p-t-30 lf-p-b-30 lf-w-100 lf-h-maxcontent lf-border-box">
  11. <wyb-table :first-line-fixed="true" contentBgColor="#eef6fe" :headers="headers" :contents="contents" @onInputChange="onInputChange" width="100%" height="800rpx"></wyb-table>
  12. </view>
  13. <!-- 操作按钮 -->
  14. <view class="fixed-bottom">
  15. <button class="btn btn1">临时保存</button>
  16. <button class="btn btn2">直接报价</button>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import wybTable from '@/components/wyb-table/wyb-table';
  22. export default {
  23. components: {
  24. wybTable
  25. },
  26. data(){
  27. return {
  28. headers: [{
  29. label: '菜品名称',
  30. key: 'name'
  31. },{
  32. label: '规格',
  33. key: 'spec'
  34. },{
  35. label: '税前价',
  36. key: 'preTax'
  37. },{
  38. label: '税后价',
  39. key: 'afterTax'
  40. }],
  41. contents: [{
  42. name: '黄瓜',
  43. spec: '一打/500g',
  44. preTax: {edit: true, value: ''},
  45. afterTax: {edit: true, value: ''}
  46. },{
  47. name: '黄豆',
  48. spec: '5kg',
  49. preTax: {edit: true, value: ''},
  50. afterTax: {edit: true, value: ''}
  51. },{
  52. name: '黄豆',
  53. spec: '5kg',
  54. preTax: {edit: true, value: ''},
  55. afterTax: {edit: true, value: ''}
  56. },{
  57. name: '黄豆',
  58. spec: '5kg',
  59. preTax: {edit: true, value: ''},
  60. afterTax: {edit: true, value: ''}
  61. },{
  62. name: '黄豆',
  63. spec: '5kg',
  64. preTax: {edit: true, value: ''},
  65. afterTax: {edit: true, value: ''}
  66. },{
  67. name: '黄豆',
  68. spec: '5kg',
  69. preTax: {edit: true, value: ''},
  70. afterTax: {edit: true, value: ''}
  71. },{
  72. name: '黄豆',
  73. spec: '5kg',
  74. preTax: {edit: true, value: ''},
  75. afterTax: {edit: true, value: ''}
  76. },{
  77. name: '黄豆',
  78. spec: '5kg',
  79. preTax: {edit: true, value: ''},
  80. afterTax: {edit: true, value: ''}
  81. },{
  82. name: '黄豆',
  83. spec: '5kg',
  84. preTax: {edit: true, value: ''},
  85. afterTax: {edit: true, value: ''}
  86. },{
  87. name: '黄豆',
  88. spec: '5kg',
  89. preTax: {edit: true, value: ''},
  90. afterTax: {edit: true, value: ''}
  91. },{
  92. name: '黄豆',
  93. spec: '5kg',
  94. preTax: {edit: true, value: ''},
  95. afterTax: {edit: true, value: ''}
  96. },{
  97. name: '黄豆',
  98. spec: '5kg',
  99. preTax: {edit: true, value: ''},
  100. afterTax: {edit: true, value: ''}
  101. }]
  102. }
  103. },
  104. onLoad(){
  105. },
  106. methods: {
  107. onInputChange(event){
  108. console.log("检测到table input被更改", event);
  109. this.contents[event.contentIndex][event.key].value = event.detailValue;
  110. }
  111. }
  112. }
  113. </script>
  114. <style lang="scss" scoped="scoped">
  115. .lf-m-t-5{
  116. margin-top: 5rpx;
  117. }
  118. .fixed-bottom{
  119. position: fixed;
  120. bottom: 0rpx;
  121. left: 0rpx;
  122. z-index: 99;
  123. width: 750rpx;
  124. height: 98rpx;
  125. display: flex;
  126. justify-content: center;
  127. align-items: center;
  128. border-top: 1rpx solid #E5E5E5;
  129. .btn{
  130. width: 260rpx;
  131. height: 82rpx;
  132. border-radius: 41rpx;
  133. margin: 0;
  134. padding: 0;
  135. font-size: 32rpx;
  136. display: flex;
  137. justify-content: center;
  138. align-items: center;
  139. }
  140. .btn1{
  141. border: 2rpx solid #555555;
  142. opacity: .5;
  143. }
  144. .btn2{
  145. background: #1833F2;
  146. color: #FFFFFF;
  147. margin-left: 50rpx;
  148. }
  149. }
  150. </style>