jobBom.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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" v-for="(not,notIndex) in notFormedList" :key='notIndex'>
  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="not.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="not.notFormedWeight" type="digit"></input>
  52. <view class="unit">{{item.weightUnit}}</view>
  53. <view class="penalize" :style="{ color: not.warehouseId ? 'rgb(255 170 42)' : ''}" @click="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. notFormed: {
  104. type: Array,
  105. default: () => []
  106. },
  107. isDetails: {
  108. type: Boolean,
  109. default: false
  110. },
  111. palletList: {
  112. type: Array,
  113. default: () => []
  114. }
  115. },
  116. watch: {
  117. notFormed: {
  118. immediate: true,
  119. deep: true,
  120. handler(newVal) {
  121. console.log(newVal)
  122. this.notFormedList = newVal
  123. }
  124. }
  125. },
  126. data() {
  127. return {
  128. classificationList: [],
  129. boatList: [],
  130. notFormedList: []
  131. }
  132. },
  133. created() {
  134. this.getTreeList()
  135. },
  136. methods: {
  137. getTreeList() {
  138. let params = {
  139. ids: [8]
  140. }
  141. treeByPid(params).then(res => {
  142. this.classificationList = res
  143. })
  144. },
  145. confirm(id, name, rootCategoryLevelId) {
  146. this.$set(this.palletList[0], 'categoryLevelId', id[0])
  147. this.$set(this.palletList[0], 'categoryLevelName', name)
  148. this.$set(this.palletList[0], 'rootCategoryLevelId', rootCategoryLevelId)
  149. let param = {
  150. categoryLevelId: id,
  151. pageNum: 1,
  152. size: -1,
  153. }
  154. assetPage(param).then(res => {
  155. this.boatList = res.list
  156. })
  157. },
  158. inputChange(e) {
  159. this.$set(this.palletList[0], 'categoryId', e.id)
  160. this.$set(this.palletList[0], 'code', e.code)
  161. this.$set(this.palletList[0], 'name', e.name)
  162. this.$set(this.palletList[0], 'specification', e.specification)
  163. this.$set(this.palletList[0], 'categoryId', e.id)
  164. this.$set(this.palletList[0], 'brandNum', e.brandNum)
  165. this.$set(this.palletList[0], 'modelType', e.modelType)
  166. this.$set(this.palletList[0], 'quantity', e.quantity)
  167. this.$set(this.palletList[0], 'unit', e.unit)
  168. this.$forceUpdate()
  169. },
  170. handleType() {
  171. this.$refs.treePicker._show()
  172. },
  173. penalize() {
  174. this.$emit('penalize', null)
  175. }
  176. }
  177. }
  178. </script>
  179. <style lang="scss" scoped>
  180. .title_box {
  181. margin-top: 20rpx;
  182. .name {
  183. font-size: 28rpx;
  184. font-style: normal;
  185. font-weight: 400;
  186. color: $theme-color;
  187. padding-left: 20rpx;
  188. position: relative;
  189. &:before {
  190. position: absolute;
  191. content: '';
  192. left: 0rpx;
  193. top: 0rpx;
  194. bottom: 0rpx;
  195. width: 4rpx;
  196. height: 28rpx;
  197. background: $theme-color;
  198. margin: auto;
  199. }
  200. }
  201. }
  202. .material {
  203. margin-top: 10rpx;
  204. .content_table {
  205. width: 100%;
  206. border: 2rpx solid $border-color;
  207. .item {
  208. display: flex;
  209. border-bottom: 2rpx solid $border-color;
  210. .lable {
  211. width: 132rpx;
  212. text-align: center;
  213. background-color: #F7F9FA;
  214. font-size: 26rpx;
  215. border-right: 2rpx solid $border-color;
  216. flex-shrink: 0;
  217. }
  218. .lable150 {
  219. width: 156rpx !important;
  220. font-size: 24rpx;
  221. }
  222. .ww80 {
  223. width: 80rpx;
  224. }
  225. .content {
  226. width: 518rpx;
  227. min-height: 64rpx;
  228. font-size: 28rpx;
  229. line-height: 28rpx;
  230. font-style: normal;
  231. font-weight: 400;
  232. padding: 18rpx 8rpx;
  233. box-sizing: border-box;
  234. word-wrap: break-word;
  235. flex-grow: 1 !important;
  236. .unit {
  237. padding: 0 4rpx;
  238. font-size: 24rpx;
  239. color: #404446;
  240. }
  241. .penalize {
  242. width: 160rpx;
  243. line-height: 60rpx;
  244. background: $theme-color;
  245. font-size: 24rpx;
  246. text-align: center;
  247. color: #fff;
  248. }
  249. }
  250. .content_num {
  251. display: flex;
  252. align-items: center;
  253. padding: 0 4rpx;
  254. /deep/ .uni-input-input {
  255. border: 2rpx solid #F0F8F2;
  256. background: #F0F8F2;
  257. color: $theme-color;
  258. }
  259. }
  260. .pd4 {
  261. padding: 4rpx 8rpx;
  262. }
  263. &:last-child {
  264. border-bottom: none;
  265. }
  266. }
  267. .ww55 {
  268. width: 55%;
  269. }
  270. .ww45 {
  271. width: 45%;
  272. }
  273. }
  274. }
  275. </style>