detailDialog.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <template>
  2. <div>
  3. <headerTitle title="基本信息"></headerTitle>
  4. <el-form
  5. :model="formData"
  6. ref="formRef"
  7. label-width="120px"
  8. class="ele-body"
  9. >
  10. <el-row :gutter="10" class="basic">
  11. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  12. <el-form-item label="计划编号:">
  13. <el-input v-model="formData.planCode" disabled></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  17. <el-form-item label="批次号:">
  18. <el-input v-model="formData.batchNo" disabled></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  22. <el-form-item label="编码:">
  23. <el-input v-model="formData.categoryCode" disabled></el-input>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  27. <el-form-item label="名称:">
  28. <el-input v-model="formData.categoryName" disabled></el-input>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  32. <el-form-item label="零部件图号:">
  33. <el-input v-model="formData.imgCode" disabled></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  37. <el-form-item label="领料单号:">
  38. <el-input v-model="formData.code" disabled></el-input>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  42. <el-form-item label="需求订单号:">
  43. <el-input
  44. v-model="formData.materialRequirements"
  45. disabled
  46. ></el-input>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  50. <el-form-item label="顶级产品编号:">
  51. <el-input v-model="formData.topCategoryName" disabled></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
  55. <el-form-item label="顶级产品名称:">
  56. <el-input v-model="formData.topCategoryName" disabled></el-input>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
  60. <el-form-item label="备注">
  61. <el-input
  62. v-model="formData.remark"
  63. type="textarea"
  64. disabled
  65. ></el-input>
  66. </el-form-item>
  67. </el-col>
  68. </el-row>
  69. </el-form>
  70. <headerTitle title="领料单信息"></headerTitle>
  71. <ele-pro-table
  72. ref="table"
  73. :columns="columns"
  74. :datasource="formData.detailList"
  75. row-key="id"
  76. cache-key="entrust_list_data"
  77. :height="tableHeight"
  78. :pageSize="20"
  79. @fullscreen-change="fullscreenChange"
  80. >
  81. <template #quantity="{ row }">
  82. <span
  83. >{{ row.feedingControlQty ? row.feedingControlQty : 0 }}/{{
  84. row.quantity ? row.quantity : 0
  85. }}</span
  86. >
  87. </template>
  88. <template #componentAttribute="{ row }">
  89. <el-tag size="small" v-if="row.componentAttribute">{{
  90. componentAttributeMap[row.componentAttribute] || ''
  91. }}</el-tag>
  92. <span v-else></span>
  93. </template>
  94. <template #attributeType="{ row }">
  95. <el-tag type="success" size="small" v-if="row.attributeType">{{
  96. attributeTypeMap[row.attributeType] || ''
  97. }}</el-tag>
  98. <span v-else></span>
  99. </template>
  100. <template #produceType="{ row }">
  101. <el-tag type="warning" size="small" v-if="row.produceType">{{
  102. produceTypeMap[row.produceType] || ''
  103. }}</el-tag>
  104. <span v-else></span>
  105. </template>
  106. </ele-pro-table>
  107. </div>
  108. </template>
  109. <script>
  110. import { pickingOrderPlanInfo } from '@/api/bpm/components/requirementPick/index';
  111. const COMPONENT_ATTRIBUTE_MAP = {
  112. 1: '自制件',
  113. 2: '采购件',
  114. 3: '外协件',
  115. 4: '受托件'
  116. };
  117. const ATTRIBUTE_TYPE_MAP = {
  118. 1: '总装',
  119. 2: '部装',
  120. 3: '零件',
  121. 4: '原材料'
  122. };
  123. const PRODUCE_TYPE_MAP = {
  124. 1: '加工',
  125. 2: '装配',
  126. 3: '下料'
  127. };
  128. export default {
  129. props: {
  130. businessId: {
  131. default: ''
  132. }
  133. },
  134. mixins: [],
  135. data() {
  136. return {
  137. title: 'aps领料单',
  138. componentAttributeMap: COMPONENT_ATTRIBUTE_MAP,
  139. attributeTypeMap: ATTRIBUTE_TYPE_MAP,
  140. produceTypeMap: PRODUCE_TYPE_MAP,
  141. tableHeight: 'calc(100vh - 595px)',
  142. formData: {},
  143. // 表格列配置
  144. columns: [
  145. {
  146. columnKey: 'index',
  147. label: '序号',
  148. type: 'index',
  149. width: 55,
  150. align: 'center',
  151. showOverflowTooltip: true,
  152. fixed: 'left'
  153. },
  154. {
  155. prop: 'categoryLevelName',
  156. label: '物料分类',
  157. width: 100,
  158. align: 'center',
  159. showOverflowTooltip: true
  160. },
  161. {
  162. prop: 'componentAttribute',
  163. label: '属性类型',
  164. width: 100,
  165. align: 'center',
  166. showOverflowTooltip: true,
  167. slot: 'componentAttribute'
  168. },
  169. {
  170. prop: 'attributeType',
  171. label: '存货类型',
  172. width: 100,
  173. align: 'center',
  174. showOverflowTooltip: true,
  175. slot: 'attributeType'
  176. },
  177. {
  178. prop: 'produceType',
  179. label: '生产类型',
  180. width: 100,
  181. align: 'center',
  182. showOverflowTooltip: true,
  183. slot: 'produceType'
  184. },
  185. {
  186. prop: 'categoryCode',
  187. label: '物料编码',
  188. width: 100,
  189. align: 'center',
  190. showOverflowTooltip: true
  191. },
  192. {
  193. prop: 'categoryName',
  194. label: '物料名称',
  195. width: 100,
  196. align: 'center',
  197. showOverflowTooltip: true
  198. },
  199. {
  200. prop: 'modelType',
  201. label: '型号',
  202. width: 100,
  203. align: 'center',
  204. showOverflowTooltip: true
  205. },
  206. {
  207. prop: 'specification',
  208. label: '规格',
  209. width: 100,
  210. align: 'center',
  211. showOverflowTooltip: true
  212. },
  213. {
  214. prop: 'categorySize',
  215. label: '尺寸',
  216. width: 100,
  217. align: 'center',
  218. showOverflowTooltip: true
  219. },
  220. {
  221. prop: 'measuringUnit',
  222. label: '计量单位',
  223. width: 100,
  224. align: 'center',
  225. showOverflowTooltip: true
  226. },
  227. {
  228. prop: 'brandNum',
  229. label: '牌号',
  230. width: 100,
  231. align: 'center',
  232. showOverflowTooltip: true
  233. },
  234. {
  235. prop: 'weight',
  236. label: '重量',
  237. width: 100,
  238. align: 'center',
  239. showOverflowTooltip: true
  240. },
  241. {
  242. prop: 'weightUnit',
  243. label: '重量单位',
  244. width: 100,
  245. align: 'center',
  246. showOverflowTooltip: true
  247. },
  248. {
  249. prop: 'quantity',
  250. label: '领料数量',
  251. width: 100,
  252. align: 'center',
  253. showOverflowTooltip: true
  254. },
  255. {
  256. prop: 'createTime',
  257. label: '创建时间',
  258. width: 100,
  259. align: 'center',
  260. showOverflowTooltip: true
  261. }
  262. ]
  263. };
  264. },
  265. created() {
  266. this.getDetailData(this.businessId);
  267. },
  268. methods: {
  269. async getDetailData(id) {
  270. this.loading = true;
  271. this.formData = (await pickingOrderPlanInfo(id)) || {};
  272. },
  273. fullscreenChange(fullscreen) {
  274. this.tableHeight = fullscreen
  275. ? 'calc(100vh - 120px)'
  276. : 'calc(100vh - 595px)';
  277. }
  278. }
  279. };
  280. </script>
  281. <style lang="scss" scoped>
  282. :deep(.el-table__expanded-cell) {
  283. padding-bottom: 30px !important;
  284. border-bottom: 12px solid #ccffcc !important;
  285. }
  286. </style>