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

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