Sinter.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <el-form :inline="true">
  3. <div class="message-box">
  4. <ul>
  5. <li> <span class="label">报工次数</span>2 </li>
  6. <li> <span class="label">累计合格品数量</span>2 </li>
  7. <li> <span class="label">累计合格品重量</span>2 </li>
  8. <li> <span class="label">累计投料产品数量</span>2 </li>
  9. </ul>
  10. <div class="right">
  11. <el-form-item label="执行人工号"><el-input></el-input></el-form-item>
  12. <el-form-item label="执行日期"><el-input></el-input></el-form-item>
  13. </div>
  14. </div>
  15. <el-card>
  16. <el-descriptions title="报工信息" direction="vertical" :column="7" border>
  17. <el-descriptions-item label="投料数量(PCS)" :span="2"
  18. >kooriookami</el-descriptions-item
  19. >
  20. <el-descriptions-item label="投料重量(KG)"
  21. >kooriookami</el-descriptions-item
  22. >
  23. <el-descriptions-item label="质检项">kooriookami</el-descriptions-item>
  24. <el-descriptions-item label="质检标准"
  25. >kooriookami</el-descriptions-item
  26. >
  27. <el-descriptions-item label="合格品数量(PCS)"
  28. >kooriookami</el-descriptions-item
  29. >
  30. <el-descriptions-item label="合格品重量(KG)"
  31. >kooriookami</el-descriptions-item
  32. >
  33. <el-descriptions-item label="不合格品数量(PCS)">
  34. <el-input>
  35. <template slot="append">
  36. <el-button type="primary">处置</el-button>
  37. </template>
  38. </el-input></el-descriptions-item
  39. >
  40. <el-descriptions-item label="不合格品重量(KG)"
  41. ><el-input>
  42. <template slot="append">
  43. <el-button type="primary">处置</el-button>
  44. </template>
  45. </el-input></el-descriptions-item
  46. >
  47. <el-descriptions-item label="副产品重量(KG)"
  48. >kooriookami</el-descriptions-item
  49. >
  50. <el-descriptions-item label="备注" :span="2"
  51. >kooriookami</el-descriptions-item
  52. >
  53. </el-descriptions>
  54. <el-descriptions
  55. title="设备信息"
  56. direction="vertical"
  57. :column="7"
  58. border
  59. class="mt-16"
  60. >
  61. <el-descriptions-item label="设备编码"
  62. >kooriookami</el-descriptions-item
  63. >
  64. <el-descriptions-item label="设备名称"
  65. >kooriookami</el-descriptions-item
  66. >
  67. <el-descriptions-item label="规格">kooriookami</el-descriptions-item>
  68. <el-descriptions-item label="型号">kooriookami</el-descriptions-item>
  69. <el-descriptions-item label="烧结曲线"
  70. >kooriookami</el-descriptions-item
  71. >
  72. <el-descriptions-item label="设备位置"
  73. >kooriookami</el-descriptions-item
  74. >
  75. <el-descriptions-item label="操作"
  76. ><el-link>更改设备</el-link></el-descriptions-item
  77. >
  78. </el-descriptions>
  79. </el-card>
  80. </el-form>
  81. </template>
  82. <script>
  83. import personSelectRemote from '@/components/CommomSelect/person-select-remote';
  84. import equipmentDailog from '@/components/EquipmentDailog/report-equipment';
  85. import { reportCount } from '@/api/produceOrder';
  86. export default {
  87. components: { personSelectRemote, equipmentDailog },
  88. props: {
  89. infoData: {
  90. type: Object,
  91. default: () => ({})
  92. },
  93. taskInfo: {
  94. type: Object,
  95. default: () => ({})
  96. },
  97. formData: {
  98. type: Object,
  99. default: () => ({})
  100. }
  101. },
  102. data () {
  103. return {
  104. workReport: {
  105. executorId: '',
  106. executorJobNum: '',
  107. executeTime: '',
  108. packInfo: {
  109. packNum: '',
  110. netWeight: ''
  111. },
  112. productInfo: {
  113. standardNum: '',
  114. standardWeight: '',
  115. noStandardNum: '',
  116. noStandardWeight: ''
  117. }
  118. },
  119. workReportDeviceList: {
  120. code: '',
  121. name: '',
  122. path: '',
  123. specification: ''
  124. },
  125. countMsg: {}
  126. };
  127. },
  128. watch: {
  129. taskInfo: {
  130. immediate: true,
  131. handler () {
  132. if (this.taskInfo.code) {
  133. this.getReportCount();
  134. }
  135. }
  136. },
  137. infoData: {
  138. immediate: true,
  139. handler () {
  140. if (this.infoData.id) {
  141. // 设备
  142. this.workReportDeviceList = Object.assign(
  143. {},
  144. this.workReportDeviceList,
  145. {
  146. code: this.infoData.deviceCode,
  147. name: this.infoData.deviceName,
  148. rootCategoryLevelId: this.infoData.rootCategoryLevelId,
  149. path: this.infoData.path[0]?.pathName,
  150. model: this.infoData.model,
  151. sourceInstanceId: this.infoData.sourceInstanceId,
  152. specification: this.infoData.specification
  153. }
  154. );
  155. }
  156. }
  157. }
  158. },
  159. methods: {
  160. async getReportCount () {
  161. const res = await reportCount({
  162. taskCode: this.taskInfo.code,
  163. workOrderId: this.infoData.id
  164. });
  165. this.countMsg = res;
  166. },
  167. getEquip () {
  168. this.$refs.equipmentRef.openSingle(
  169. [this.workReportDeviceList],
  170. (res) => {
  171. this.workReportDeviceList.code = res.code;
  172. this.workReportDeviceList.name = res.name;
  173. this.workReportDeviceList.path = res.id;
  174. }
  175. );
  176. },
  177. getMsg () {},
  178. report (fun) {
  179. this.$refs.formRef.validate((value) => {
  180. if (value) {
  181. if (!this.workReportDeviceList.code) {
  182. return this.$message.error('请选择设备');
  183. }
  184. this.$confirm('是否确定要报工?', '提示').then(() => {
  185. fun({
  186. checkState: 1,
  187. workReport: this.workReport,
  188. workReportDeviceList: [this.workReportDeviceList]
  189. }).then((res) => {
  190. // this.$message.success('报工成功!');
  191. // this.getMsg();
  192. });
  193. });
  194. }
  195. });
  196. }
  197. }
  198. };
  199. </script>
  200. <style lang="scss" scoped>
  201. .message-box {
  202. display: flex;
  203. justify-content: space-between;
  204. align-items: center;
  205. ul {
  206. list-style: none;
  207. display: flex;
  208. align-items: center;
  209. justify-content: flex-start;
  210. li {
  211. margin-right: 20px;
  212. }
  213. }
  214. .right {
  215. padding-top: 22px;
  216. display: flex;
  217. align-items: center;
  218. }
  219. }
  220. </style>