index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <template>
  2. <div>
  3. <div class="top_fixed">
  4. <div style="display: flex;align-items: center;margin-right: 10px;" v-if="List.length>1">
  5. <div class="rx-bc">
  6. <div class="name">批量报工时间:</div>
  7. </div>
  8. <el-date-picker v-model="executorTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
  9. placeholder="选择日期" @change="handleCreate">
  10. </el-date-picker>
  11. </div>
  12. <el-button type="primary" size="mini" @click="save(2, 'all')">一键报工</el-button>
  13. <el-button type="primary" size="mini" @click="removeCacheFn('all')">清空缓存</el-button>
  14. <el-button v-if="taskObj.type == 1" type="primary" size="mini" @click="save(1, 'all')">缓存</el-button>
  15. </div>
  16. <div class="job_box">
  17. <div v-for="(item, index) in List" :key="index" class="card_box" v-if="isLoad">
  18. <div class="title_box rx-bc">
  19. <div class="name">工单信息 </div>
  20. <div class="rx-bc">
  21. <el-button type="text" size="mini" @click="openPicking(item.workOrderId, item)">手动添加</el-button>
  22. <el-button type="text" size="mini" @click="removeCacheFn(item.workOrderId)">清空缓存</el-button>
  23. <el-button v-if="taskObj.type == 1" type="text" size="mini" @click="save(1, index)">缓存</el-button>
  24. </div>
  25. </div>
  26. <!-- // 工单信息 -->
  27. <workOrderBom :item="item"></workOrderBom>
  28. <!-- 报工时间 -->
  29. <div>
  30. <div class="title_box rx-bc">
  31. <div class="name">报工时间</div>
  32. </div>
  33. <el-date-picker v-model="item.workReportInfo.executorTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
  34. placeholder="选择日期">
  35. </el-date-picker>
  36. </div>
  37. <paramBom v-if="item.paramDetailList.length != 0" :list="item.paramDetailList"></paramBom>
  38. <!-- //报工信息 -->
  39. <div v-if="item.singleReport !== 1">
  40. <jobBom :item="item" :notFormed="item.notFormedList" :warehouseList="warehouseList"></jobBom>
  41. </div>
  42. <div v-else>
  43. <jobDdBom :item='item' ref='jobRef' :notFormed='item.notFormedList' :warehouseList="warehouseList"></jobDdBom>
  44. </div>
  45. <!-- :item="item" :notFormed="item.notFormedList" :warehouseList="warehouseList" @modeNum='modeNum'-->
  46. <deviceBom v-if="item.equipmentList.length != 0" :list="item.equipmentList"></deviceBom>
  47. <modelBom v-if="item.modelList.length != 0" :list="item.modelList" pattern="job" ref="modelRef"></modelBom>
  48. <palletBom v-if="item.palletList.length != 0" :list="item.palletList"></palletBom>
  49. <revolvingDiskBom v-if="item.revolvingDiskList.length > 0" pattern="job" :list="objData.revolvingDiskList">
  50. </revolvingDiskBom>
  51. <!-- 单件 报告信息 -->
  52. <semiProductJobBom :singleReport="item.singleReport" v-if="
  53. item.semiProductList &&
  54. item.semiProductList.length != 0 &&
  55. taskObj.type != 4 &&
  56. item.singleReport == 1
  57. " :item="item" :list="item.semiProductList" :equipmentList="item.equipmentList"></semiProductJobBom>
  58. <!-- <checkbox :tableData="item.semiProductList" ></checkbox> -->
  59. <!-- :itemData="item" @tableDataFn="tableDataFn" -->
  60. <!-- 批量 -->
  61. <semiProductJobBomPL :singleReport="item.singleReport" v-if="
  62. item.semiProductList &&
  63. item.semiProductList.length != 0 &&
  64. taskObj.type != 4 &&
  65. taskObj.type != 6 &&
  66. item.singleReport == 0
  67. " :item="item" :list="item.semiProductList" :equipmentList="item.equipmentList" @countNumPl="countNumPl" :index="index"></semiProductJobBomPL>
  68. <!-- <semiProductJobBom v-if="
  69. item.pickOutInList &&
  70. item.pickOutInList.length != 0 &&
  71. taskObj.type == 6 &&
  72. item.singleReport == 1
  73. " :item="item" :list="item.pickOutInList">
  74. </semiProductJobBom> -->
  75. <oneJobQualityBomPL v-if="
  76. item.semiProductList &&
  77. item.semiProductList.length != 0 &&
  78. taskObj.type == 6 &&
  79. item.singleReport == 0
  80. " :item="item" :list="item.semiProductList">
  81. </oneJobQualityBomPL>
  82. <byProductBom v-if="item.productRecycleList.length != 0" :list="item.productRecycleList">
  83. </byProductBom>
  84. <turnoverBom v-if="item.turnover.length != 0" :list="item.turnover" :wordItem="item" pattern="job">
  85. </turnoverBom>
  86. <aridRegion v-if="item.aridRegionList.length != 0" :list="item.aridRegionList" :isType="true"></aridRegion>
  87. <!-- 这里是包装分组 -->
  88. <div
  89. v-if="clientEnvironmentId != 2 && item && item.currentTaskDiagram.type == 4 && clientEnvironmentId != 3 && item.singleReport !== 1">
  90. <packagingGrouping ref="packagingGroupingRef" :objData="item" :workOrderId="item.workOrderId"
  91. :taskId="item.currentTaskDiagram.taskId">
  92. </packagingGrouping>
  93. </div>
  94. <div v-if="item.currentTaskDiagram.type == 4">
  95. <semiProductJobBom :singleReport="item.singleReport" :item="item"
  96. :list="item.currentTaskDiagram.type == 4 ? item.pickOutInList : item.semiProductList"
  97. :equipmentList="item.equipmentList"></semiProductJobBom>
  98. </div>
  99. <!-- <packingBom :taskId='taskObj.id' :workOrderId="item.workOrderId" :objData="item" ref="packRef"
  100. v-if='taskObj.type == 4 && clientEnvironmentId != 3 && item'></packingBom> -->
  101. <!-- <packingTgBom v-if="
  102. item.pickOutInList &&
  103. item.pickOutInList.length != 0 &&
  104. taskObj.type == 4 &&
  105. clientEnvironmentId == 3
  106. " :list="item.pickOutInList" :item="item"></packingTgBom> -->
  107. </div>
  108. </div>
  109. <pickingList isType="job" ref="pickingListRef" @allSelection="allSelection"></pickingList>
  110. </div>
  111. </template>
  112. <script>
  113. import { listByIdsReport } from '@/api/produce/job';
  114. import { getWarehouseList } from '@/api/produce/index';
  115. import {
  116. jobSave,
  117. saveCache,
  118. getCache,
  119. removeCache
  120. } from '@/api/produce/workOrder';
  121. import pickingList from '../picking/pickingList.vue';
  122. import packagingGrouping from "./components/packagingGrouping.vue";
  123. import workOrderBom from '../feeding/components/workOrderBom.vue';
  124. import paramBom from '../feeding/components/paramBom.vue';
  125. import jobBom from './components/jobBom.vue';
  126. import deviceBom from '../feeding/components/deviceBom.vue';
  127. import modelBom from '../feeding/components/modelBom.vue';
  128. import palletBom from './components/palletBom.vue';
  129. import revolvingDiskBom from '../feeding/components/revolvingDiskBom.vue';
  130. import oneJobQualityBom from './components/oneJobQualityBom.vue';
  131. import oneJobQualityBomPL from './components/oneJobQualityBomPL.vue';
  132. import jobDdBom from './components/jobDdBom.vue';
  133. import semiProductJobBom from './components/semiProductJobBom.vue';
  134. import semiProductJobBomPL from './components/semiProductJobBomPL.vue';
  135. import semiProductJobBomQT from './components/semiProductJobBomQT.vue';
  136. import byProductBom from './components/byProductBom.vue';
  137. import turnoverBom from './components/turnoverBom.vue';
  138. import aridRegion from '../feeding/components/aridRegion.vue';
  139. import packingBom from './components/packingBom.vue';
  140. import packingTgBom from './components/packingTgBom';
  141. import { timestampToDateTime } from '@/utils/index.js';
  142. export default {
  143. components: {
  144. pickingList,
  145. packagingGrouping,
  146. workOrderBom,
  147. paramBom,
  148. jobBom,
  149. deviceBom,
  150. modelBom,
  151. palletBom,
  152. revolvingDiskBom,
  153. oneJobQualityBom,
  154. oneJobQualityBomPL,
  155. semiProductJobBomQT,
  156. semiProductJobBom,
  157. semiProductJobBomPL,
  158. byProductBom,
  159. turnoverBom,
  160. aridRegion,
  161. packingBom,
  162. jobDdBom,
  163. packingTgBom
  164. },
  165. props: {
  166. workListIds: {
  167. type: Array,
  168. default() {
  169. return [];
  170. }
  171. },
  172. reportNeedFeed:{
  173. }
  174. },
  175. computed: {
  176. taskObj() {
  177. return this.$store.state.user.taskObj;
  178. }
  179. },
  180. data() {
  181. return {
  182. List: [],
  183. idsList: [],
  184. isLoad: false,
  185. executorTime:'',
  186. warehouseList: [],
  187. loading: null,
  188. };
  189. },
  190. computed: {
  191. taskObj() {
  192. return this.$store.state.user.taskObj;
  193. },
  194. clientEnvironmentId() {
  195. return this.$store.state.user.info.clientEnvironmentId;
  196. }
  197. },
  198. watch: {
  199. workListIds: {
  200. handler(val) {
  201. this.getList(val);
  202. },
  203. deep: true,
  204. immediate: true
  205. }
  206. },
  207. created() {
  208. this.getWarehouseListFn();
  209. },
  210. methods: {
  211. checkPack() {
  212. this.$refs.packagingGroupingRef[0].getData();
  213. },
  214. handleCreate(e){
  215. if(e){
  216. const list = JSON.parse(JSON.stringify(this.List));
  217. console.log(list);
  218. list.map(item=>{
  219. item.executorTime =e;
  220. })
  221. this.$set(this, 'List', list);
  222. }
  223. },
  224. getList(ids) {
  225. this.idsList = ids || [];
  226. let param = {
  227. ids: ids,
  228. taskId: this.taskObj.id,
  229. type: 0
  230. };
  231. this.isLoad = false;
  232. listByIdsReport(param)
  233. .then((res) => {
  234. this.List = res.map((obj) => {
  235. if (!Object.prototype.hasOwnProperty.call(obj, 'turnover')) {
  236. obj['turnover'] = [];
  237. }
  238. if (
  239. !Object.prototype.hasOwnProperty.call(obj, 'aridRegionList')
  240. ) {
  241. obj['aridRegionList'] = [];
  242. }
  243. if (!Object.prototype.hasOwnProperty.call(obj, 'instanceList')) {
  244. obj['instanceList'] = [];
  245. }
  246. if (!Object.prototype.hasOwnProperty.call(obj, 'palletList')) {
  247. obj['palletList'] = [];
  248. }
  249. if (
  250. !Object.prototype.hasOwnProperty.call(obj, 'revolvingDiskList')
  251. ) {
  252. obj['revolvingDiskList'] = [];
  253. }
  254. if (obj.palletList.length > 0) {
  255. obj.palletList = obj.palletList.map((m) => {
  256. return {
  257. hideKc: true, // 不显示库存
  258. quantity: m.feedQuantity,
  259. ...m
  260. };
  261. });
  262. }
  263. if (this.taskObj.type == 6) {
  264. obj.semiProductList = obj.pickOutInList;
  265. obj.pickOutInList=[]
  266. }
  267. if (
  268. this.clientEnvironmentId == 3 &&
  269. obj.singleReport == 0 &&
  270. this.taskObj.type != 6
  271. ) {
  272. obj.semiProductList.map((a) => {
  273. a.extInfo.batchReportInfo = [
  274. {
  275. allFeedQuantity: '',
  276. allReportWeight: '',
  277. taskId: '',
  278. taskName: ''
  279. }
  280. ];
  281. a.extInfo.notBatchReportInfo = [
  282. {
  283. allFeedQuantity: '',
  284. notType: '',
  285. taskId: '',
  286. taskName: '',
  287. notReason: ''
  288. }
  289. ];
  290. return {
  291. a
  292. };
  293. });
  294. obj.semiProductList = JSON.parse(
  295. JSON.stringify(obj.semiProductList)
  296. );
  297. }
  298. obj.semiProductList = obj.semiProductList.map(item => {
  299. if (item['extInfo']?.reportWeight) {
  300. item['extInfo'].reportWeight = ''
  301. }
  302. console.log(item, 'item')
  303. return item
  304. })
  305. obj.workReportInfo = {
  306. executorTime: null,
  307. formingNum: null,
  308. formingWeight: null,
  309. formedNum: null,
  310. formedWeight: null,
  311. taskId: this.taskObj.id
  312. };
  313. obj.notFormedList = [
  314. {
  315. notFormedNum: null,
  316. notFormedWeight: null,
  317. weightUnit: obj.weightUnit,
  318. unit: obj.unit,
  319. warehouseId: null // 处置 仓库id
  320. }
  321. ];
  322. if (obj.semiProductList.length > 0) {
  323. // 预制体报工
  324. obj.workReportInfo.formedNum = obj.semiProductList.length;
  325. let numCot=0
  326. if(obj.semiProductList.length>0){
  327. obj.semiProductList.map((fitem)=>{
  328. numCot= numCot + fitem.feedQuantity || 1
  329. })
  330. obj.workReportInfo.formedNum = numCot
  331. }
  332. }
  333. obj.workReportInfo.formingNum = obj.formingNum;
  334. obj.workReportInfo.formingWeight = obj.formingWeight;
  335. obj.workReportInfo.unit = obj.unit;
  336. obj.workReportInfo.weightUnit = obj.weightUnit;
  337. obj.workReportInfo.workOrderId = obj.workOrderId;
  338. obj.workReportInfo.executorTime = obj.executorTime
  339. obj.paramDetailList.map((m) => {
  340. if (m.extInfo.textType == 5) {
  341. m.remainingTime = m.extInfo.remainingTime;
  342. }
  343. return {
  344. ...m.extInfo
  345. };
  346. });
  347. console.log(obj, 444);
  348. return {
  349. ...obj
  350. };
  351. });
  352. })
  353. .finally(() => {
  354. this.isLoad = true;
  355. if (this.taskObj.type == 1) {
  356. this.getCacheFn();
  357. }
  358. });
  359. },
  360. openPicking(id, item) {
  361. this.$refs.pickingListRef.open(id, item);
  362. },
  363. allSelection(id, selectList) {
  364. this.List.forEach((m) => {
  365. if (m.workOrderId == id) {
  366. let turnover = [];
  367. let equipmentList = []; // 生产设备
  368. selectList.forEach((f) => {
  369. if (f.rootCategoryLevelId == 4) {
  370. equipmentList = equipmentList.concat(f);
  371. }
  372. if (f.rootCategoryLevelId == 7) {
  373. turnover = turnover.concat(f);
  374. }
  375. });
  376. this.$set(m, 'equipmentList', equipmentList);
  377. this.$set(m, 'turnover', turnover);
  378. this.$forceUpdate();
  379. }
  380. });
  381. },
  382. async save(type) {
  383. console.log('11111',this.List)
  384. this.loading = this.$loading({
  385. lock: true,
  386. text: '加载中',
  387. background: 'rgba(0, 0, 0, 0.7)'
  388. });
  389. let arr = this.List.filter((L) => L.workReportInfo.executorTime)
  390. if (!arr.length) {
  391. this.loading.close();
  392. return this.$message.warning('请选择执行时间');
  393. }
  394. if(this.reportNeedFeed==1){
  395. this.loading.close();
  396. return this.$message.warning('请先投料再报工');
  397. }
  398. let bol2;
  399. bol2 = this.List.every((e) => {
  400. return (
  401. e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
  402. );
  403. });
  404. if (!bol2) {
  405. this.$message.warning('请输入合格品数量');
  406. this.loading.close();
  407. return false;
  408. }
  409. // 预制体
  410. let wId;
  411. let bol = true;
  412. let _i;
  413. this.List.forEach((L) => {
  414. if (
  415. L.semiProductList.length > 0 &&
  416. this.taskObj.type != 4 &&
  417. L.singleReport == 1
  418. ) {
  419. bol = L.semiProductList.every((e, i) => {
  420. _i = i + 1;
  421. wId = L.code;
  422. if (this.taskObj.type == 6) {
  423. return (
  424. Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
  425. e.extInfo.taskId
  426. );
  427. } else {
  428. if (e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
  429. return (
  430. Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
  431. e.extInfo.taskId &&
  432. e.extInfo.reportWeight
  433. );
  434. } else {
  435. return (
  436. Object.prototype.hasOwnProperty.call(e.extInfo, 'notType') &&
  437. e.extInfo.notType
  438. );
  439. }
  440. }
  441. });
  442. }
  443. });
  444. // if (!bol) {
  445. // this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
  446. // this.loading.close();
  447. // return false;
  448. // }
  449. if (this.clientEnvironmentId != 2) {
  450. let succ = this.List.some((L) => {
  451. return L.productRecycleList.length > 0;
  452. });
  453. if (succ) {
  454. const isRecycle = await this.checkRecycle();
  455. if (!isRecycle) {
  456. return false;
  457. }
  458. }
  459. }
  460. console.log(this.item, '9999999999');
  461. if (this.taskObj.type == 4 && this.clientEnvironmentId != 3 && this.clientEnvironmentId != 2 && this.List[0].singleReport !== 1) {
  462. this.checkPack();
  463. // if (!isPack) {
  464. // return false
  465. // }
  466. }
  467. console.log('4444444444',this.List)
  468. if (this.taskObj.type == 1) {
  469. const isCache = await this.checkCache(type);
  470. if (!isCache) {
  471. return false;
  472. }
  473. }
  474. if (
  475. this.clientEnvironmentId == 3 &&
  476. type == 2 &&
  477. this.taskObj.type == 6
  478. ) {
  479. this.List.forEach((L) => {
  480. if (L.singleReport == 0) {
  481. L.semiProductList = [];
  482. }
  483. });
  484. console.log('ashsaoghaoghoasg')
  485. }
  486. let isSemiProduct=false
  487. this.List.map((semi)=>{
  488. if(semi.semiProductList.length==0 && semi.singleReport==1){
  489. isSemiProduct=true
  490. this.loading.close();
  491. setTimeout(() => {
  492. this.$message.warning({
  493. message: '请工单编号:' +semi.code+ '先创建在制品',
  494. key: semi.code // 使用当前时间作为key,确保唯一性
  495. });
  496. },500)
  497. }else{
  498. semi.semiProductList.map((ditem)=>{
  499. if(ditem.extInfo.batchReportInfo){
  500. ditem.extInfo.batchReportInfo.map((baItem)=>{
  501. let idvalue=baItem.deviceId?baItem.deviceId.split('/'):''
  502. baItem.deviceId=idvalue?idvalue[0]:''
  503. })
  504. }
  505. if(ditem.extInfo.notBatchReportInfo){
  506. ditem.extInfo.notBatchReportInfo.map((noItem)=>{
  507. let idvalue=noItem.deviceId?noItem.deviceId.split('/'):''
  508. noItem.deviceId=idvalue?idvalue[0]:''
  509. })
  510. }
  511. })
  512. }
  513. })
  514. if(isSemiProduct){
  515. this.loading.close();
  516. return
  517. }
  518. console.log(this.List, 'this.List');
  519. jobSave(this.List)
  520. .then((res) => {
  521. this.loading.close();
  522. this.$message.success('报工成功');
  523. this.getList(this.idsList);
  524. })
  525. .catch(() => {
  526. this.loading.close();
  527. })
  528. .finally(() => {
  529. setTimeout(function () {
  530. // this.loading.close();
  531. }, 3000);
  532. });
  533. },
  534. checkRecycle() {
  535. this.loading.close();
  536. return new Promise((resolve) => {
  537. this.$confirm('是否跳过副产品回收处置!', '提示', {
  538. confirmButtonText: '确定',
  539. cancelButtonText: '取消',
  540. type: 'warning'
  541. })
  542. .then(() => {
  543. resolve(true);
  544. })
  545. .catch(() => {
  546. resolve(false);
  547. });
  548. });
  549. },
  550. checkCache(type) {
  551. return new Promise((resolve) => {
  552. if (type == 1) {
  553. saveCache(this.List).then((rr) => {
  554. this.$message.success('缓存成功');
  555. this.loading.close();
  556. });
  557. resolve(false);
  558. } else if (type == 2) {
  559. resolve(true);
  560. }
  561. });
  562. },
  563. getCacheFn() {
  564. let parma = {
  565. workOrderIds: this.idsList,
  566. taskId: this.taskObj.id,
  567. type: 1
  568. };
  569. getCache(parma).then((res) => {
  570. this.List.forEach((f,index)=>{
  571. res.forEach((o)=>{
  572. if(f.workOrderId==o.workOrderId){
  573. f['product'] = o.extInfo.product
  574. f['workReportInfo'] = o.extInfo.workReportInfo
  575. f['notFormedList'] = o.extInfo.notFormedList
  576. f['turnover'] = o.extInfo.turnover
  577. f['productRecycleList'] = o.extInfo.productRecycleList
  578. f['semiProductList'] = o.extInfo.semiProductList
  579. f['modelList'] = o.extInfo.modelList
  580. // this.$set(this.List[index].workReportInfo,'executorTime',timestampToDateTime(o.extInfo.workReportInfo.executorTime))
  581. this.$forceUpdate();
  582. }
  583. })
  584. })
  585. });
  586. },
  587. removeCacheFn(type) {
  588. this.$confirm('是否清空缓存', '缓存')
  589. .then(() => {
  590. let parma = {
  591. workOrderIds: type == 'all' ? this.idsList : [type],
  592. taskId: this.taskObj.id,
  593. type: 1
  594. };
  595. removeCache(parma).then((res) => {
  596. this.$message.success('已经清空缓存');
  597. this.getList(this.idsList);
  598. });
  599. })
  600. .catch(() => { });
  601. },
  602. getWarehouseListFn() {
  603. getWarehouseList().then((res) => {
  604. this.warehouseList = res.data;
  605. });
  606. },
  607. //批量报工合格不合格重量统计
  608. countNumPl(list,index){
  609. console.log('11111122222333',list)
  610. //合格总数
  611. let formedNumCount=0
  612. //合格总重量
  613. let formedWeightCount=0
  614. //不合格总数
  615. let notFormedNumCount=0
  616. //不合格总重量
  617. let notFormedWeightCount=0
  618. list.map((item=>{
  619. //合格总数
  620. item.extInfo.batchReportInfo.forEach((m) => {
  621. formedNumCount = formedNumCount + Number(m.allFeedQuantity || 0);
  622. });
  623. //合格总重量
  624. item.extInfo.batchReportInfo.forEach((w) => {
  625. formedWeightCount = formedWeightCount + Number(w.allReportWeight || 0);
  626. });
  627. //不合格总数
  628. item.extInfo.notBatchReportInfo.forEach((nf) => {
  629. notFormedNumCount = notFormedNumCount + Number(nf.allFeedQuantity || 0);
  630. });
  631. //不合格总重量
  632. item.extInfo.notBatchReportInfo.forEach((nw) => {
  633. notFormedWeightCount = notFormedWeightCount + Number(nw.allReportWeight || 0);
  634. });
  635. }))
  636. this.$set(this.List[index].workReportInfo,'formedNum',formedNumCount);//合格总数
  637. this.$set(this.List[index].workReportInfo,'formedWeight',formedWeightCount);//合格总重量
  638. this.$set(this.List[index].workReportInfo,'notFormedNum',notFormedNumCount);//不合格总数
  639. this.$set(this.List[index].workReportInfo,'notFormedWeight',notFormedWeightCount);//不合格总重量
  640. }
  641. }
  642. };
  643. </script>
  644. <style scoped lang="scss">
  645. .top_fixed {
  646. width: 100%;
  647. height: 40px;
  648. background: #fff;
  649. display: flex;
  650. align-items: center;
  651. justify-content: flex-end;
  652. }
  653. .title_box {
  654. padding: 10px 0;
  655. .name {
  656. font-size: 14px;
  657. font-style: normal;
  658. font-weight: 400;
  659. color: #157a2c;
  660. padding-left: 5px;
  661. position: relative;
  662. &:before {
  663. position: absolute;
  664. content: '';
  665. left: 0px;
  666. top: 0px;
  667. bottom: 0px;
  668. width: 2px;
  669. height: 14px;
  670. background: #157a2c;
  671. margin: auto;
  672. }
  673. }
  674. }
  675. .job_box {
  676. margin-top: 6px;
  677. width: 100%;
  678. height: calc(100vh - 70px - 50px - 80px - 60px);
  679. overflow-y: scroll;
  680. overflow-x: hidden;
  681. }
  682. .card_box {
  683. background: #fff;
  684. padding: 8px;
  685. border-radius: 2px;
  686. }
  687. </style>