自主产品,供应链食堂系统。将两个端拆开了。
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.

207 lines
5.1 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" v-if="type != '备货中'">
  30. <view v-if="type == '待发单'" class="lf-row-flex-end">
  31. <button class="btn btn1" @click="$url('/pages/purchase/launch?o_sn='+ order.o_sn+'&enter_type=1')">编辑</button>
  32. <button class="btn btn2">立即发单</button>
  33. </view>
  34. <view v-else-if="type == '待接单'" class="lf-row-flex-end">
  35. <button class="btn btn2" style="background-color: #FF0000;" @click="orderStateChange('已撤销')">撤销订单</button>
  36. </view>
  37. <view v-else-if="type == '已发货'" class="lf-row-flex-end">
  38. <button class="btn btn1">退单</button>
  39. <button class="btn btn1 lf-m-l-20" @click="is_show_voucher = true">上传凭证</button>
  40. <button class="btn btn2" @click="$url('/pages/purchase/receipt?o_sn='+ order.o_sn)">确认收货</button>
  41. </view>
  42. <view v-else-if="type == '已收货' || type == '已入库'" class="lf-row-between">
  43. <button class="btn btn1" @click="$url('/pages/purchase/launch?o_sn='+ order.o_sn+'&enter_type=2')">复用采购单</button>
  44. <view class="lf-font-32" style="color: #11D189;">已完成</view>
  45. </view>
  46. </view> -->
  47. </view>
  48. </template>
  49. <script>
  50. import lfYsteps from '@/components/lf-ysteps/lf-ysteps';
  51. import wybTable from '@/components/wyb-table/wyb-table';
  52. export default {
  53. components: { lfYsteps, wybTable },
  54. data(){
  55. return {
  56. stepList: [],
  57. headers: [{
  58. label: '物资名称',
  59. key: 'material_name'
  60. },{
  61. label: '规格',
  62. key: 'spec_name'
  63. },{
  64. key: 'brand',
  65. label: '品牌'
  66. },{
  67. key: 'quality_level',
  68. label: '品级'
  69. },{
  70. label: '编号',
  71. key: 'm_sn'
  72. },{
  73. label: '供应商',
  74. key: 'supplier_name'
  75. },{
  76. label: '批次',
  77. key: 'purchase_id'
  78. },{
  79. key: 'delivery_number',
  80. label: '出库数量'
  81. }],
  82. contents: [],
  83. o_sn: '',
  84. order: {},
  85. type: 4,
  86. }
  87. },
  88. onLoad(options){
  89. this.o_sn = options.id || '';
  90. this.getData();
  91. },
  92. methods: {
  93. getData(){
  94. this.$http(this.API.API_CANTEEN_OUTDETAIL, {
  95. o_sn: this.o_sn
  96. // o_sn: '802316269455228606'
  97. }).then(res => {
  98. console.log("xxx",res)
  99. this.order = res.data
  100. let list = res.data || [];
  101. let contents = list.map(item => {
  102. return {
  103. material_name: item.material.m_name,
  104. spec: item.spec.name,
  105. pre_tax_price: item.total_tax_amount,
  106. after_tax_price: item.total_non_tax_amount,
  107. spec_id: item.spec.id,
  108. material_id: item.material.id
  109. }
  110. })
  111. this.contents = contents;
  112. console.log(this.contents)
  113. this.type = res.data.material.state
  114. })
  115. },
  116. onButtonClick(event){
  117. uni.showModal({
  118. title: '温馨提示',
  119. content: '您确定移除该项吗?',
  120. success: result => {
  121. if(result.confirm){
  122. console.log("移除某一项", event);
  123. let { contentIndex } = event;
  124. this.contents.splice(contentIndex, 1);
  125. }
  126. }
  127. })
  128. }
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped="scoped">
  133. .head{
  134. padding: 0 32rpx;
  135. width: 750rpx;
  136. box-sizing: border-box;
  137. height: auto;
  138. .list{
  139. padding: 30rpx 0;
  140. border-bottom: 1rpx solid #e5e5e5;
  141. font-size: 28rpx;
  142. color: #555555;
  143. &:last-child{
  144. border-bottom: none;
  145. }
  146. .image{
  147. width: 140rpx;
  148. height: 140rpx;
  149. border-radius: 10rpx;
  150. }
  151. .info{
  152. display: flex;
  153. flex-direction: column;
  154. justify-content: space-around;
  155. width: 530rpx;
  156. height: 140rpx;
  157. }
  158. }
  159. }
  160. .fixed-bottom{
  161. position: fixed;
  162. bottom: 0rpx;
  163. left: 0rpx;
  164. z-index: 99;
  165. width: 750rpx;
  166. height: 98rpx;
  167. display: flex;
  168. justify-content: flex-end;
  169. align-items: center;
  170. border-top: 1rpx solid #E5E5E5;
  171. background-color: #FFFFFF;
  172. box-sizing: border-box;
  173. padding: 0 32rpx;
  174. .btn{
  175. width: 212rpx;
  176. height: 82rpx;
  177. border-radius: 41rpx;
  178. margin: 0;
  179. padding: 0;
  180. font-size: 32rpx;
  181. display: flex;
  182. justify-content: center;
  183. align-items: center;
  184. }
  185. .btn1{
  186. border: 2rpx solid #555555;
  187. opacity: .5;
  188. }
  189. .btn2{
  190. background: #11D189;
  191. color: #FFFFFF;
  192. margin-left: 20rpx;
  193. }
  194. }
  195. .ms-img{
  196. width: 160rpx;
  197. height: 160rpx;
  198. margin-right: 15rpx;
  199. margin-top: 15rpx;
  200. &:nth-of-type(4n){
  201. margin-right: 0rpx;
  202. }
  203. }
  204. </style>