Sinter.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. firstInfo:{
  102. type: Object,
  103. default: () => ({})
  104. },
  105. currentInfo:{
  106. type: Object,
  107. default: () => ({})
  108. }
  109. },
  110. data () {
  111. return {
  112. workReport: {
  113. executorId: '',
  114. executorJobNum: '',
  115. executeTime: '',
  116. packInfo: {
  117. packNum: '',
  118. netWeight: ''
  119. },
  120. productInfo: {
  121. standardNum: '',
  122. standardWeight: '',
  123. noStandardNum: '',
  124. noStandardWeight: ''
  125. }
  126. },
  127. workReportDeviceList: {
  128. code: '',
  129. name: '',
  130. path: '',
  131. specification: ''
  132. },
  133. countMsg: {}
  134. };
  135. },
  136. watch: {
  137. taskInfo: {
  138. immediate: true,
  139. handler () {
  140. if (this.taskInfo.code) {
  141. this.getReportCount();
  142. }
  143. }
  144. },
  145. infoData: {
  146. immediate: true,
  147. handler () {
  148. if (this.infoData.id && this.currentInfo.code == this.firstInfo.code) {
  149. // 设备
  150. this.workReportDeviceList = Object.assign(
  151. {},
  152. this.workReportDeviceList,
  153. {
  154. code: this.infoData.deviceCode,
  155. name: this.infoData.deviceName,
  156. rootCategoryLevelId: this.infoData.rootCategoryLevelId,
  157. path: this.infoData.path[0]?.pathName,
  158. model: this.infoData.model,
  159. sourceInstanceId: this.infoData.sourceInstanceId,
  160. specification: this.infoData.specification
  161. }
  162. );
  163. }
  164. }
  165. }
  166. },
  167. methods: {
  168. async getReportCount () {
  169. const res = await reportCount({
  170. taskCode: this.taskInfo.code,
  171. workOrderId: this.infoData.id
  172. });
  173. this.countMsg = res;
  174. },
  175. getEquip () {
  176. this.$refs.equipmentRef.openSingle(
  177. [this.workReportDeviceList],
  178. (res) => {
  179. this.workReportDeviceList.code = res.code;
  180. this.workReportDeviceList.name = res.name;
  181. this.workReportDeviceList.path = res.id;
  182. }
  183. );
  184. },
  185. getMsg () {},
  186. report (fun) {
  187. this.$refs.formRef.validate((value) => {
  188. if (value) {
  189. if (!this.workReportDeviceList.code) {
  190. return this.$message.error('请选择设备');
  191. }
  192. this.$confirm('是否确定要报工?', '提示').then(() => {
  193. fun({
  194. checkState: 1,
  195. workReport: this.workReport,
  196. workReportDeviceList: [this.workReportDeviceList]
  197. }).then((res) => {
  198. // this.$message.success('报工成功!');
  199. // this.getMsg();
  200. });
  201. });
  202. }
  203. });
  204. }
  205. }
  206. };
  207. </script>
  208. <style lang="scss" scoped>
  209. .message-box {
  210. display: flex;
  211. justify-content: space-between;
  212. align-items: center;
  213. ul {
  214. list-style: none;
  215. display: flex;
  216. align-items: center;
  217. justify-content: flex-start;
  218. li {
  219. margin-right: 20px;
  220. }
  221. }
  222. .right {
  223. padding-top: 22px;
  224. display: flex;
  225. align-items: center;
  226. }
  227. }
  228. </style>