Sinter.vue 6.4 KB

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