jobBom.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">报工信息</view>
  5. </view>
  6. <view class="material ">
  7. <view class="content_table">
  8. <view class="item rx-sc">
  9. <view class="rx ww55 ">
  10. <view class="lable lable150 rx-cc ">要求生产数量</view>
  11. <view class="content rx-sc">
  12. <view>{{item.formingNum}}</view>
  13. <view class="unit">{{item.unit}}</view>
  14. </view>
  15. </view>
  16. <view class="rx ww45">
  17. <view class="lable rx-cc ww80">重量</view>
  18. <view class="content content_num">
  19. <view>{{item.formingWeight}}</view>
  20. <view class="unit">{{item.weightUnit}}</view>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="item rx-sc">
  25. <view class="rx ww55 ">
  26. <view class="lable lable150 rx-cc ">合格品数量</view>
  27. <view class="content content_num">
  28. <input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
  29. <view class="unit">{{item.unit}}</view>
  30. </view>
  31. </view>
  32. <view class="rx ww45">
  33. <view class="lable rx-cc ww80">重量</view>
  34. <view class="content content_num">
  35. <input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
  36. <view class="unit">{{item.weightUnit}}</view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="item rx-sc">
  41. <view class="rx ww55 ">
  42. <view class="lable lable150 rx-cc ">不合格数量</view>
  43. <view class="content content_num">
  44. <input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
  45. <view class="unit">{{item.unit}}</view>
  46. </view>
  47. </view>
  48. <view class="rx ww45">
  49. <view class="lable rx-cc ww80">重量</view>
  50. <view class="content content_num">
  51. <input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
  52. <view class="unit">{{item.weightUnit}}</view>
  53. <view class="penalize">处置</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="item" @click="handleType">
  58. <view class="lable rx-cc">舟皿类型</view>
  59. <view class="content content_num">
  60. <input class="uni-input" v-model="obj.typeName"></input>
  61. </view>
  62. </view>
  63. <view class="item">
  64. <view class="lable rx-cc">舟皿名称</view>
  65. <view class="content ">
  66. <zxz-uni-data-select :localdata="boatList" v-model="obj.name" dataValue='id' format='{name}-{code}'
  67. :clear='false' @change='inputChange'></zxz-uni-data-select>
  68. </view>
  69. </view>
  70. <view class="item">
  71. <view class="lable rx-cc">舟皿型号</view>
  72. <view class="content">
  73. {{obj.modelType}}
  74. </view>
  75. </view>
  76. <view class="item">
  77. <view class="lable rx-cc">舟皿数量</view>
  78. <view class="content content_num">
  79. <input class="uni-input" v-model="obj.num" type='digit'></input>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
  85. :localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
  86. </view>
  87. </template>
  88. <script>
  89. import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
  90. import {
  91. treeByPid,
  92. pageeLedgerMain,
  93. assetPage
  94. } from '@/api/pda/workOrder.js'
  95. export default {
  96. props: {
  97. item: {
  98. type: Object,
  99. default: () => {}
  100. },
  101. isDetails: {
  102. type: Boolean,
  103. default: false
  104. }
  105. },
  106. data() {
  107. return {
  108. classificationList: [],
  109. boatList: [],
  110. obj: {
  111. typeName: '',
  112. modelType: ''
  113. }
  114. }
  115. },
  116. created() {
  117. this.getTreeList()
  118. },
  119. methods: {
  120. getTreeList() {
  121. let params = {
  122. ids: [8]
  123. }
  124. treeByPid(params).then(res => {
  125. this.classificationList = res
  126. this.confirm([res[0].id], res[0].name, res[0].rootCategoryLevelId)
  127. })
  128. },
  129. confirm(id, name, rootCategoryLevelId) {
  130. this.obj.typeName = name
  131. // this.obj.modelType = ''
  132. let param = {
  133. categoryLevelId: id,
  134. pageNum: 1,
  135. size: -1,
  136. }
  137. assetPage(param).then(res => {
  138. this.boatList = res.list
  139. })
  140. },
  141. inputChange(e) {
  142. this.obj.modelType = 55
  143. },
  144. handleType() {
  145. this.$refs.treePicker._show()
  146. }
  147. }
  148. }
  149. </script>
  150. <style lang="scss" scoped>
  151. .title_box {
  152. margin-top: 20rpx;
  153. .name {
  154. font-size: 28rpx;
  155. font-style: normal;
  156. font-weight: 400;
  157. color: $theme-color;
  158. padding-left: 20rpx;
  159. position: relative;
  160. &:before {
  161. position: absolute;
  162. content: '';
  163. left: 0rpx;
  164. top: 0rpx;
  165. bottom: 0rpx;
  166. width: 4rpx;
  167. height: 28rpx;
  168. background: $theme-color;
  169. margin: auto;
  170. }
  171. }
  172. }
  173. .material {
  174. margin-top: 10rpx;
  175. .content_table {
  176. width: 100%;
  177. border: 2rpx solid $border-color;
  178. .item {
  179. display: flex;
  180. border-bottom: 2rpx solid $border-color;
  181. .lable {
  182. width: 132rpx;
  183. text-align: center;
  184. background-color: #F7F9FA;
  185. font-size: 26rpx;
  186. border-right: 2rpx solid $border-color;
  187. flex-shrink: 0;
  188. }
  189. .lable150 {
  190. width: 156rpx !important;
  191. font-size: 24rpx;
  192. }
  193. .ww80 {
  194. width: 80rpx;
  195. }
  196. .content {
  197. width: 518rpx;
  198. min-height: 64rpx;
  199. font-size: 28rpx;
  200. line-height: 28rpx;
  201. font-style: normal;
  202. font-weight: 400;
  203. padding: 18rpx 8rpx;
  204. box-sizing: border-box;
  205. word-wrap: break-word;
  206. flex-grow: 1 !important;
  207. .unit {
  208. padding: 0 4rpx;
  209. font-size: 24rpx;
  210. color: #404446;
  211. }
  212. .penalize {
  213. width: 160rpx;
  214. line-height: 60rpx;
  215. background: $theme-color;
  216. font-size: 24rpx;
  217. text-align: center;
  218. color: #fff;
  219. }
  220. }
  221. .content_num {
  222. display: flex;
  223. align-items: center;
  224. padding: 0 4rpx;
  225. /deep/ .uni-input-input {
  226. border: 2rpx solid #F0F8F2;
  227. background: #F0F8F2;
  228. color: $theme-color;
  229. }
  230. }
  231. .pd4 {
  232. padding: 4rpx 8rpx;
  233. }
  234. &:last-child {
  235. border-bottom: none;
  236. }
  237. }
  238. .ww55 {
  239. width: 55%;
  240. }
  241. .ww45 {
  242. width: 45%;
  243. }
  244. }
  245. }
  246. </style>