自主项目,食堂系统,前端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.

192 lines
4.2 KiB

  1. <template>
  2. <view>
  3. <view class="head">
  4. <view class="lf-row-between lf-color-gray list">
  5. <view>采购单 492461046128742764</view>
  6. </view>
  7. <view class="list">
  8. <lf-ysteps :stepList="stepList" color="#11D189"></lf-ysteps>
  9. </view>
  10. </view>
  11. <self-line></self-line>
  12. <view class="head">
  13. <view class="lf-row-between list">
  14. <view>申请人</view>
  15. <view class="lf-font-bold">李清玉</view>
  16. </view>
  17. <view class="lf-row-between list">
  18. <view>联系电话</view>
  19. <view class="lf-font-bold">13200000000</view>
  20. </view>
  21. </view>
  22. <self-line></self-line>
  23. <view class="lf-m-t-30 lf-m-l-32">
  24. <view class="lf-font-32 lf-color-black lf-font-bold lf-m-b-20">物资明细</view>
  25. <wyb-table :first-line-fixed="true" contentBgColor="#ecfaf5" :headers="headers" :contents="contents" @onButtonClick="onButtonClick" width="100%" height="350rpx"></wyb-table>
  26. </view>
  27. <view style="height: 100rpx;"></view>
  28. <!-- 操作按钮 -->
  29. <view class="fixed-bottom">
  30. <button class="btn btn2">立即申请</button>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import lfYsteps from '@/components/lf-ysteps/lf-ysteps';
  36. import wybTable from '@/components/wyb-table/wyb-table';
  37. export default {
  38. components: { lfYsteps, wybTable },
  39. data(){
  40. return {
  41. stepList: [
  42. {
  43. time: '2021-07-23 13:23:52', // 左侧时间 -- 必选
  44. info: '订单创建', // 右侧内容 -- 可选
  45. isFinished: false, // 是否已完成(完成 index 为 √)-- 可选
  46. isActive: true, // 是否为当前节点 Active(当前节点 即使完成 index 也不会显示 √)-- 可选
  47. isShowSlot: false // 右侧是否有 Slot(显示在 右侧内容下方)-- 可选
  48. }
  49. ],
  50. headers: [{
  51. key: 'name',
  52. label: '姓名'
  53. },{
  54. key: 'age',
  55. label: '年龄'
  56. },{
  57. key: 'sex',
  58. label: '性别'
  59. },{
  60. key: 'height',
  61. label: '身高'
  62. },{
  63. key: 'info',
  64. label: '描述'
  65. },{
  66. key: 'operation',
  67. label: '操作'
  68. }],
  69. contents: [{
  70. name: '张三',
  71. age: '18',
  72. sex: '男',
  73. height: '192cm',
  74. info: '无敌叫是',
  75. operation: {button: true, key: 'delete', value: '删除'}
  76. }, {
  77. name: '李四',
  78. age: '18',
  79. sex: '男',
  80. height: '192cm',
  81. info: '无敌叫是'
  82. }, {
  83. name: '赵五',
  84. age: '18',
  85. sex: '男',
  86. height: '192cm',
  87. info: '无敌叫是'
  88. },{
  89. name: '王六',
  90. age: '18',
  91. sex: '男',
  92. height: '192cm',
  93. info: '无敌叫是'
  94. }]
  95. }
  96. },
  97. onLoad(){
  98. },
  99. methods: {
  100. onButtonClick(event){
  101. uni.showModal({
  102. title: '温馨提示',
  103. content: '您确定移除该项吗?',
  104. success: result => {
  105. if(result.confirm){
  106. console.log("移除某一项", event);
  107. let { contentIndex } = event;
  108. this.contents.splice(contentIndex, 1);
  109. }
  110. }
  111. })
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped="scoped">
  117. .head{
  118. padding: 0 32rpx;
  119. width: 750rpx;
  120. box-sizing: border-box;
  121. height: auto;
  122. .list{
  123. padding: 30rpx 0;
  124. border-bottom: 1rpx solid #e5e5e5;
  125. font-size: 28rpx;
  126. color: #555555;
  127. &:last-child{
  128. border-bottom: none;
  129. }
  130. .image{
  131. width: 140rpx;
  132. height: 140rpx;
  133. border-radius: 10rpx;
  134. }
  135. .info{
  136. display: flex;
  137. flex-direction: column;
  138. justify-content: space-around;
  139. width: 530rpx;
  140. height: 140rpx;
  141. }
  142. }
  143. }
  144. .fixed-bottom{
  145. position: fixed;
  146. bottom: 0rpx;
  147. left: 0rpx;
  148. z-index: 99;
  149. width: 750rpx;
  150. height: 98rpx;
  151. display: flex;
  152. justify-content: flex-end;
  153. align-items: center;
  154. border-top: 1rpx solid #E5E5E5;
  155. background-color: #FFFFFF;
  156. box-sizing: border-box;
  157. padding: 0 32rpx;
  158. .btn{
  159. width: 212rpx;
  160. height: 82rpx;
  161. border-radius: 41rpx;
  162. margin: 0;
  163. padding: 0;
  164. font-size: 32rpx;
  165. display: flex;
  166. justify-content: center;
  167. align-items: center;
  168. }
  169. .btn1{
  170. border: 2rpx solid #555555;
  171. opacity: .5;
  172. }
  173. .btn2{
  174. background: #11D189;
  175. color: #FFFFFF;
  176. margin-left: 20rpx;
  177. }
  178. }
  179. .ms-img{
  180. width: 160rpx;
  181. height: 160rpx;
  182. margin-right: 15rpx;
  183. margin-top: 15rpx;
  184. &:nth-of-type(4n){
  185. margin-right: 0rpx;
  186. }
  187. }
  188. </style>