jobBom.vue 6.7 KB

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