index.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531
  1. <template>
  2. <div>
  3. <div class="top_fixed">
  4. <div
  5. style="display: flex; align-items: center; margin-right: 10px"
  6. v-if="List.length > 1"
  7. >
  8. <div class="rx-bc">
  9. <div class="name">批量报工时间:</div>
  10. </div>
  11. <el-date-picker
  12. v-model="executorTime"
  13. type="datetime"
  14. value-format="yyyy-MM-dd HH:mm:ss"
  15. placeholder="选择日期"
  16. @change="handleCreate"
  17. >
  18. </el-date-picker>
  19. </div>
  20. <el-button
  21. type="primary"
  22. size="mini"
  23. :loading="loadingBtn"
  24. @click="save(2, 'all')"
  25. >一键报工</el-button
  26. >
  27. <el-button type="primary" size="mini" @click="removeCacheFn('all')"
  28. >清空缓存</el-button
  29. >
  30. <el-button
  31. v-if="taskObj.type == 1"
  32. type="primary"
  33. size="mini"
  34. @click="save(1, 'all')"
  35. >缓存</el-button
  36. >
  37. </div>
  38. <div class="job_box">
  39. <div
  40. v-for="(item, index) in List"
  41. :key="index"
  42. class="card_box"
  43. v-if="isLoad"
  44. >
  45. <div class="title_box rx-bc" v-if="!taskObj.isOrderListData">
  46. <div class="name">工单信息 </div>
  47. <div class="rx-bc">
  48. <el-button
  49. type="text"
  50. size="mini"
  51. @click="openPicking(item.workOrderId, item)"
  52. >手动添加</el-button
  53. >
  54. <el-button
  55. type="text"
  56. size="mini"
  57. @click="removeCacheFn(item.workOrderId)"
  58. >清空缓存</el-button
  59. >
  60. <el-button
  61. v-if="taskObj.type == 1"
  62. type="text"
  63. size="mini"
  64. @click="save(1, index)"
  65. >缓存</el-button
  66. >
  67. </div>
  68. </div>
  69. <!-- // 工单信息 -->
  70. <workOrderBom
  71. :item="item"
  72. v-if="!taskObj.isOrderListData"
  73. ></workOrderBom>
  74. <!-- 报工时间 -->
  75. <div>
  76. <div class="title_box rx-bc">
  77. <div class="name">报工时间</div>
  78. </div>
  79. 报工时间:
  80. <el-date-picker
  81. v-model="item.workReportInfo.executorTime"
  82. type="datetime"
  83. value-format="yyyy-MM-dd HH:mm:ss"
  84. placeholder="选择日期"
  85. style="margin-right: 25px; width: 190px"
  86. >
  87. </el-date-picker>
  88. 执行人:
  89. <el-select
  90. v-model="teamId"
  91. placeholder="请选择班组"
  92. filterable
  93. style="width: 120px"
  94. @change="checkTeamList(teamId)"
  95. >
  96. <el-option
  97. v-for="item in teamList"
  98. :label="item.name"
  99. :value="item.id"
  100. :key="item.id"
  101. >
  102. </el-option>
  103. </el-select>
  104. <el-select
  105. v-model="executorIdList"
  106. placeholder="请选择执行人"
  107. filterable
  108. multiple
  109. >
  110. <el-option
  111. v-for="item in teamUserList"
  112. :label="item.name"
  113. :value="item.id"
  114. :key="item.id"
  115. >
  116. </el-option>
  117. </el-select>
  118. </div>
  119. <paramBom
  120. v-if="item.paramDetailList.length != 0"
  121. :list="item.paramDetailList"
  122. ></paramBom>
  123. <!-- //报工信息 -->
  124. <div v-if="item.singleReport == 0">
  125. <jobBom
  126. :item="item"
  127. ref="jobBomRef"
  128. :notFormed="item.notFormedList"
  129. :warehouseList="warehouseList"
  130. ></jobBom>
  131. </div>
  132. <div v-if="item.singleReport == 1">
  133. <jobDdBom
  134. :item="item"
  135. ref="jobRef"
  136. :notFormed="item.notFormedList"
  137. :warehouseList="warehouseList"
  138. ></jobDdBom>
  139. </div>
  140. <!-- :item="item" :notFormed="item.notFormedList" :warehouseList="warehouseList" @modeNum='modeNum'-->
  141. <deviceBom
  142. v-if="item.equipmentList.length != 0"
  143. :list="item.equipmentList"
  144. ></deviceBom>
  145. <modelBom
  146. v-if="item.modelList.length != 0"
  147. :list="item.modelList"
  148. pattern="job"
  149. ref="modelRef"
  150. :item="item"
  151. ></modelBom>
  152. <palletBom
  153. v-if="item.palletList.length != 0"
  154. :list="item.palletList"
  155. ></palletBom>
  156. <revolvingDiskBom
  157. v-if="item.revolvingDiskList.length > 0"
  158. pattern="job"
  159. :list="objData.revolvingDiskList"
  160. >
  161. </revolvingDiskBom>
  162. <!-- 单件 报告信息 -->
  163. <semiProductJobBom
  164. :singleReport="item.singleReport"
  165. v-if="
  166. item.semiProductList &&
  167. item.semiProductList.length != 0 &&
  168. item.singleReport == 1
  169. "
  170. :item="item"
  171. :list="item.semiProductList"
  172. :equipmentList="item.equipmentList"
  173. :isChoose="isChoose"
  174. @chooseData="chooseData"
  175. :isEngrave="isEngrave"
  176. :isDisposal="isDisposal"
  177. ></semiProductJobBom>
  178. <!-- 通用批量报工 -->
  179. <batchSemiProductJobBom
  180. :singleReport="item.singleReport"
  181. v-if="
  182. item.product &&
  183. item.product.length != 0 &&
  184. item.singleReport == 0 &&
  185. clientEnvironmentId != 3
  186. "
  187. :item="item"
  188. :list="item.product"
  189. :equipmentList="item.equipmentList"
  190. :isChoose="isChoose"
  191. :isEngrave="isEngrave"
  192. :isDisposal="isDisposal"
  193. @chooseData="chooseData"
  194. ></batchSemiProductJobBom>
  195. <!-- <checkbox :tableData="item.semiProductList" ></checkbox> -->
  196. <!-- :itemData="item" @tableDataFn="tableDataFn" -->
  197. <!-- 碳谷批量报工 -->
  198. <semiProductJobBomPL
  199. :singleReport="item.singleReport"
  200. v-if="
  201. item.semiProductList &&
  202. item.semiProductList.length != 0 &&
  203. taskObj.type != 4 &&
  204. taskObj.type != 6 &&
  205. item.singleReport == 0 &&
  206. clientEnvironmentId == 3
  207. "
  208. :item="item"
  209. :list="item.semiProductList"
  210. :equipmentList="item.equipmentList"
  211. @countNumPl="countNumPl"
  212. :isChoose="isChoose"
  213. :isEngrave="isEngrave"
  214. :isDisposal="isDisposal"
  215. :index="index"
  216. ></semiProductJobBomPL>
  217. <!-- <semiProductJobBom v-if="
  218. item.pickOutInList &&
  219. item.pickOutInList.length != 0 &&
  220. taskObj.type == 6 &&
  221. item.singleReport == 1
  222. " :item="item" :list="item.pickOutInList">
  223. </semiProductJobBom> -->
  224. <!-- 物料清单 -->
  225. <!-- <semiProductBom
  226. v-if="
  227. item.semiProductList.length != 0 &&
  228. item.singleReport == 0 &&
  229. clientEnvironmentId != 3
  230. "
  231. :list="item.semiProductList"
  232. :equipmentList="item.equipmentList"
  233. :workInfo="item"
  234. ></semiProductBom> -->
  235. <!-- 产品信息 -->
  236. <oneJobQualityBomPL
  237. v-if="
  238. item.semiProductList &&
  239. item.semiProductList.length != 0 &&
  240. taskObj.type == 6 &&
  241. item.singleReport == 0 &&
  242. clientEnvironmentId == 3
  243. "
  244. :item="item"
  245. :list="item.semiProductList"
  246. >
  247. </oneJobQualityBomPL>
  248. <byProductBom
  249. v-if="item.productRecycleList.length != 0"
  250. :list="item.productRecycleList"
  251. >
  252. </byProductBom>
  253. <turnoverBom
  254. v-if="item.turnover.length != 0"
  255. :list="item.turnover"
  256. :wordItem="item"
  257. pattern="job"
  258. >
  259. </turnoverBom>
  260. <aridRegion
  261. v-if="item.aridRegionList.length != 0"
  262. :list="item.aridRegionList"
  263. :isType="true"
  264. ></aridRegion>
  265. <!-- 这里是包装分组 -->
  266. <!-- <div
  267. v-if="
  268. item.currentTaskDiagram.type == 4 &&
  269. item.semiProductList.length != 0
  270. "
  271. >
  272. <semiProductJobBom
  273. :singleReport="item.singleReport"
  274. :item="item"
  275. :list="
  276. item.currentTaskDiagram.type == 4
  277. ? item.pickOutInList
  278. : item.semiProductList
  279. "
  280. :equipmentList="item.equipmentList"
  281. ></semiProductJobBom>
  282. </div>
  283. <div
  284. v-if="
  285. item.currentTaskDiagram.type == 4 && item.pickOutInList.length != 0
  286. "
  287. >
  288. <semiProductJobBom
  289. :singleReport="item.singleReport"
  290. :item="item"
  291. :list="
  292. item.currentTaskDiagram.type == 4
  293. ? item.pickOutInList
  294. : item.semiProductList
  295. "
  296. :equipmentList="item.equipmentList"
  297. ></semiProductJobBom>
  298. </div> -->
  299. <packingTgBom
  300. v-if="
  301. item.semiProductList &&
  302. item.semiProductList.length != 0 &&
  303. taskObj.type == 4 &&
  304. clientEnvironmentId == 3 &&
  305. item.singleReport == 1
  306. "
  307. :list="item.semiProductList"
  308. :item="item"
  309. ></packingTgBom>
  310. <div
  311. v-if="
  312. item &&
  313. item.currentTaskDiagram.type == 4 &&
  314. clientEnvironmentId == 3 &&
  315. item.singleReport == 0
  316. "
  317. >
  318. <batchPackagingGrouping
  319. ref="packagingGroupingRef"
  320. :objData="item"
  321. :workOrderId="item.workOrderId"
  322. :taskId="item.currentTaskDiagram.taskId"
  323. >
  324. </batchPackagingGrouping>
  325. </div>
  326. <div
  327. v-if="
  328. item &&
  329. item.currentTaskDiagram.type == 4 &&
  330. clientEnvironmentId != 3
  331. "
  332. >
  333. <!-- <packagingGrouping
  334. ref="packagingGroupingRef"
  335. :objData="item"
  336. :workOrderId="item.workOrderId"
  337. :taskId="item.currentTaskDiagram.taskId"
  338. >
  339. </packagingGrouping> -->
  340. <batchPackagingGrouping
  341. ref="packagingGroupingRef"
  342. :objData="item"
  343. :workOrderId="item.workOrderId"
  344. :taskId="item.currentTaskDiagram.taskId"
  345. >
  346. </batchPackagingGrouping>
  347. </div>
  348. <!-- <packingBom :taskId='taskObj.id' :workOrderId="item.workOrderId" :objData="item" ref="packRef"
  349. v-if='taskObj.type == 4 && clientEnvironmentId != 3 && item'></packingBom> -->
  350. <!-- <semiProductJobBom
  351. :singleReport="item.singleReport"
  352. v-if="
  353. item.semiProductList &&
  354. item.semiProductList.length != 0 &&
  355. item.singleReport == 1
  356. "
  357. :item="item"
  358. :list="item.semiProductList"
  359. :equipmentList="item.equipmentList"
  360. :isChoose="isChoose"
  361. @chooseData="chooseData"
  362. :isEngrave="isEngrave"
  363. :isDisposal="isDisposal"
  364. ></semiProductJobBom> -->
  365. <!-- <packingTgBom
  366. v-if="
  367. item.semiProductList &&
  368. item.semiProductList.length != 0 &&
  369. taskObj.type == 4 &&
  370. clientEnvironmentId == 3
  371. "
  372. :list="item.semiProductList"
  373. :item="item"
  374. ></packingTgBom> -->
  375. <semiProductJobBom
  376. v-if="
  377. item.pickOutInList &&
  378. item.pickOutInList.length != 0 &&
  379. taskObj.type == 4 &&
  380. clientEnvironmentId == 3
  381. "
  382. :singleReport="item.singleReport"
  383. :list="item.semiProductList"
  384. :equipmentList="item.equipmentList"
  385. :item="item"
  386. @chooseData="chooseData"
  387. :isEngrave="isEngrave"
  388. :isDisposal="isDisposal"
  389. ></semiProductJobBom>
  390. </div>
  391. </div>
  392. <pickingList
  393. isType="job"
  394. ref="pickingListRef"
  395. @allSelection="allSelection"
  396. ></pickingList>
  397. </div>
  398. </template>
  399. <script>
  400. import { listByIdsReport } from '@/api/produce/job';
  401. import { getWarehouseList } from '@/api/produce/index';
  402. import {
  403. jobSave,
  404. saveCache,
  405. getCache,
  406. removeCache
  407. } from '@/api/produce/workOrder';
  408. import pickingList from '../picking/pickingList.vue';
  409. import packagingGrouping from './components/packagingGrouping.vue';
  410. import workOrderBom from '../feeding/components/workOrderBom.vue';
  411. import paramBom from '../feeding/components/paramBom.vue';
  412. import jobBom from './components/jobBom.vue';
  413. import deviceBom from '../feeding/components/deviceBom.vue';
  414. import modelBom from '../feeding/components/modelBom.vue';
  415. import palletBom from './components/palletBom.vue';
  416. import revolvingDiskBom from '../feeding/components/revolvingDiskBom.vue';
  417. import oneJobQualityBom from './components/oneJobQualityBom.vue';
  418. import oneJobQualityBomPL from './components/oneJobQualityBomPL.vue';
  419. import jobDdBom from './components/jobDdBom.vue';
  420. import semiProductJobBom from './components/semiProductJobBom.vue';
  421. // import semiProductJobBom from './components/newSemiProductJobBom.vue';
  422. import semiProductJobBomPL from './components/semiProductJobBomPL.vue';
  423. import semiProductJobBomQT from './components/semiProductJobBomQT.vue';
  424. import batchSemiProductJobBom from './components/batchSemiProductJobBom.vue';
  425. import batchPackagingGrouping from './components/batchPackagingGrouping.vue';
  426. import semiProductBom from '../feeding/components/semiProductBom';
  427. // import byProductBom from './components/byProductBom.vue';
  428. import byProductBom from './components/newByProductBom.vue';
  429. import turnoverBom from './components/turnoverBom.vue';
  430. import aridRegion from '../feeding/components/aridRegion.vue';
  431. import packingBom from './components/packingBom.vue';
  432. import packingTgBom from './components/packingTgBom.vue';
  433. import { timestampToDateTime } from '@/utils/index.js';
  434. import { parameterGetByCode } from '@/api/system/dictionary-data';
  435. import { getTeam } from '@/api/produce/job.js';
  436. export default {
  437. components: {
  438. pickingList,
  439. packagingGrouping,
  440. workOrderBom,
  441. paramBom,
  442. jobBom,
  443. deviceBom,
  444. modelBom,
  445. palletBom,
  446. revolvingDiskBom,
  447. oneJobQualityBom,
  448. oneJobQualityBomPL,
  449. semiProductJobBomQT,
  450. semiProductJobBom,
  451. semiProductJobBomPL,
  452. byProductBom,
  453. turnoverBom,
  454. aridRegion,
  455. packingBom,
  456. jobDdBom,
  457. packingTgBom,
  458. semiProductBom,
  459. batchSemiProductJobBom,
  460. batchPackagingGrouping
  461. },
  462. props: {
  463. workListIds: {
  464. type: Array,
  465. default() {
  466. return [];
  467. }
  468. },
  469. reportNeedFeed: {},
  470. workPlanType: {
  471. type: String,
  472. default: ''
  473. }
  474. },
  475. data() {
  476. return {
  477. List: [],
  478. idsList: [],
  479. isLoad: false,
  480. executorTime: '',
  481. warehouseList: [],
  482. loading: null,
  483. loadingBtn: false,
  484. chooseListData: [],
  485. isChoose: false,
  486. isEngrave: false,
  487. isDisposal: false,
  488. teamList: [],
  489. teamAllList: [],
  490. teamUserList: [],
  491. executorIdList: [],
  492. teamId: ''
  493. };
  494. },
  495. computed: {
  496. taskObj() {
  497. return this.$store.state.user.taskObj;
  498. },
  499. clientEnvironmentId() {
  500. return this.$store.state.user.info.clientEnvironmentId;
  501. }
  502. },
  503. watch: {
  504. workListIds: {
  505. handler(val) {
  506. this.getList(val);
  507. },
  508. deep: true,
  509. immediate: true
  510. },
  511. workPlanType: {
  512. handler(val) {
  513. if (val == 1) {
  514. this.getList(this.idsList);
  515. }
  516. }
  517. }
  518. },
  519. created() {
  520. this.getWarehouseListFn();
  521. this.getChooseEngrave();
  522. },
  523. mounted() {
  524. this.getTeamList(this.$store.state.user.info.teamId);
  525. },
  526. methods: {
  527. checkPack() {
  528. this.$refs.packagingGroupingRef[0].getData();
  529. },
  530. handleCreate(e) {
  531. if (e) {
  532. const list = JSON.parse(JSON.stringify(this.List));
  533. console.log(list);
  534. list.map((item) => {
  535. item.workReportInfo.executorTime = e;
  536. });
  537. this.$set(this, 'List', list);
  538. }
  539. },
  540. async getTeamList(id) {
  541. const ids = id.split(',');
  542. this.teamList = [];
  543. this.teamUserList = [];
  544. await ids.forEach((item) => {
  545. getTeam(item).then((res) => {
  546. this.teamList.push({
  547. name: res.name,
  548. id: res.id
  549. });
  550. this.teamAllList.push(res.userVOList);
  551. });
  552. });
  553. },
  554. async getChooseEngrave() {
  555. await parameterGetByCode({
  556. code: 'choose_engrave'
  557. }).then((res) => {
  558. this.isChoose = res.value == '1' ? true : false;
  559. });
  560. await parameterGetByCode({
  561. code: 'batch_update_engrave'
  562. }).then((res) => {
  563. this.isEngrave = res.value == '1' ? true : false;
  564. });
  565. await parameterGetByCode({
  566. code: 'batch_disposal'
  567. }).then((res) => {
  568. this.isDisposal = res.value == '1' ? true : false;
  569. });
  570. },
  571. getList(ids) {
  572. this.idsList = ids || [];
  573. if (this.taskObj.id != -2) {
  574. let param = {
  575. ids: ids,
  576. taskId: this.taskObj.id,
  577. type: 0
  578. };
  579. this.isLoad = false;
  580. listByIdsReport(param)
  581. .then((res) => {
  582. this.List = res.map((obj) => {
  583. if (!Object.prototype.hasOwnProperty.call(obj, 'turnover')) {
  584. obj['turnover'] = [];
  585. }
  586. if (
  587. !Object.prototype.hasOwnProperty.call(obj, 'aridRegionList')
  588. ) {
  589. obj['aridRegionList'] = [];
  590. }
  591. if (
  592. !Object.prototype.hasOwnProperty.call(obj, 'instanceList')
  593. ) {
  594. obj['instanceList'] = [];
  595. }
  596. if (!Object.prototype.hasOwnProperty.call(obj, 'palletList')) {
  597. obj['palletList'] = [];
  598. }
  599. if (
  600. !Object.prototype.hasOwnProperty.call(
  601. obj,
  602. 'revolvingDiskList'
  603. )
  604. ) {
  605. obj['revolvingDiskList'] = [];
  606. }
  607. if (obj.palletList.length > 0) {
  608. obj.palletList = obj.palletList.map((m) => {
  609. return {
  610. hideKc: true, // 不显示库存
  611. quantity: m.feedQuantity,
  612. ...m
  613. };
  614. });
  615. }
  616. // console.log(this.taskObj.type, 'this.taskObj.type');
  617. if (
  618. (this.taskObj.type == 6 && obj.singleReport == 1) ||
  619. (this.clientEnvironmentId == 3 &&
  620. obj.singleReport == 0 &&
  621. this.taskObj.type == 6)
  622. ) {
  623. obj.semiProductList = obj.pickOutInList;
  624. obj.pickOutInList = [];
  625. console.log('赋值了');
  626. } else if (
  627. this.clientEnvironmentId == 3 &&
  628. obj.singleReport == 0
  629. ) {
  630. if (obj.pickOutInList && obj.pickOutInList.length != 0) {
  631. obj.semiProductList = obj.pickOutInList;
  632. obj.pickOutInList = [];
  633. }
  634. } else if (this.taskObj.type == 6 && obj.singleReport == 0) {
  635. obj.product = obj.pickOutInList;
  636. obj.pickOutInList = [];
  637. } else if (
  638. this.taskObj.type == 4 &&
  639. obj.singleReport == 0 &&
  640. this.clientEnvironmentId != 3
  641. ) {
  642. if (obj.pickOutInList && obj.pickOutInList.length != 0) {
  643. obj.product = obj.pickOutInList;
  644. obj.pickOutInList = [];
  645. }
  646. } else if (
  647. this.taskObj.type == 4 &&
  648. obj.singleReport == 1 &&
  649. this.clientEnvironmentId != 2
  650. ) {
  651. if (obj.pickOutInList && obj.pickOutInList.length != 0) {
  652. obj.semiProductList = obj.pickOutInList;
  653. obj.pickOutInList = [];
  654. }
  655. }
  656. if (
  657. obj.singleReport == 1 &&
  658. obj.currentTaskDiagram.type != 2 &&
  659. obj.currentTaskDiagram.type != 3 &&
  660. obj.currentTaskDiagram.type != 6
  661. ) {
  662. obj.semiProductList.map((item) => {
  663. item.extInfo.taskId = '';
  664. item.extInfo.taskName = '';
  665. });
  666. }
  667. if (
  668. obj.singleReport == 0 &&
  669. obj.currentTaskDiagram.type != 2 &&
  670. obj.currentTaskDiagram.type != 3 &&
  671. obj.currentTaskDiagram.type != 6
  672. ) {
  673. obj.product.map((item) => {
  674. item.extInfo.taskId = '';
  675. item.extInfo.taskName = '';
  676. });
  677. }
  678. if (
  679. this.clientEnvironmentId == 3 &&
  680. obj.singleReport == 0 &&
  681. this.taskObj.type != 6
  682. ) {
  683. obj.semiProductList.map((a) => {
  684. let feedQuantity = 0;
  685. let reportWeight = 0;
  686. let unFeedQuantity = 0;
  687. let unReportWeight = 0;
  688. if (
  689. a.extInfo &&
  690. a.extInfo.batchReportInfo &&
  691. a.extInfo.batchReportInfo.length != 0
  692. ) {
  693. a.extInfo.batchReportInfo.forEach((it) => {
  694. console.log(it, '1111111111');
  695. feedQuantity += Number(it.allFeedQuantity);
  696. reportWeight += Number(it.allReportWeight);
  697. });
  698. }
  699. if (
  700. a.extInfo &&
  701. a.extInfo.notBatchReportInfo &&
  702. a.extInfo.notBatchReportInfo.length != 0
  703. ) {
  704. a.extInfo.notBatchReportInfo.forEach((it) => {
  705. unFeedQuantity += Number(it.allFeedQuantity);
  706. unReportWeight += Number(it.allReportWeight);
  707. });
  708. }
  709. a.extInfo.batchReportInfo = [
  710. {
  711. allFeedQuantity: feedQuantity,
  712. allReportWeight: reportWeight,
  713. taskId: '',
  714. taskName: ''
  715. }
  716. ];
  717. a.extInfo.notBatchReportInfo = [
  718. {
  719. allFeedQuantity: unFeedQuantity,
  720. allReportWeight: unReportWeight,
  721. notType: '',
  722. taskId: '',
  723. taskName: '',
  724. notReason: ''
  725. }
  726. ];
  727. return {
  728. a
  729. };
  730. });
  731. obj.semiProductList = JSON.parse(
  732. JSON.stringify(obj.semiProductList)
  733. );
  734. }
  735. obj.semiProductList = obj.semiProductList.map((item) => {
  736. if (this.taskObj.type != 6) {
  737. if (item['extInfo']?.reportWeight) {
  738. item['extInfo'].reportWeight = '';
  739. }
  740. }
  741. item.confirm = 0;
  742. console.log(item, 'item');
  743. return item;
  744. });
  745. obj.product = obj.product.map((item) => {
  746. if (this.taskObj.type != 6) {
  747. if (item['extInfo']?.reportWeight) {
  748. item['extInfo'].reportWeight = '';
  749. }
  750. }
  751. item.confirm = 0;
  752. console.log(item, 'item');
  753. return item;
  754. });
  755. obj.workReportInfo = {
  756. executorTime: null,
  757. formingNum: null,
  758. formingWeight: null,
  759. formedNum: null,
  760. formedWeight: null,
  761. taskId: this.taskObj.id,
  762. notFormedNum: null,
  763. notFormedWeigh: null
  764. };
  765. obj.notFormedList = [
  766. {
  767. notFormedNum: null,
  768. notFormedWeight: null,
  769. weightUnit: obj.weightUnit,
  770. unit: obj.unit,
  771. warehouseId: null // 处置 仓库id
  772. }
  773. ];
  774. if (obj.semiProductList.length != 0) {
  775. // 预制体报工
  776. obj.workReportInfo.formedNum = obj.semiProductList.length;
  777. let numCot = 0;
  778. let notFormedNum = 0;
  779. if (obj.semiProductList.length > 0) {
  780. obj.semiProductList.map((fitem) => {
  781. if (
  782. !fitem.extInfo.isQualified ||
  783. fitem.extInfo.isQualified == 1
  784. ) {
  785. numCot = numCot + fitem.feedQuantity || 1;
  786. } else {
  787. notFormedNum = notFormedNum + fitem.feedQuantity;
  788. }
  789. });
  790. obj.workReportInfo.formedNum = numCot;
  791. obj.workReportInfo.notFormedNum = notFormedNum;
  792. }
  793. } else if (obj.product.length != 0) {
  794. const formedNum = obj.product.reduce((acc, pro) => {
  795. return pro.feedQuantity &&
  796. (!pro.extInfo.isQualified || pro.extInfo.isQualified == 1)
  797. ? acc + Number(pro.feedQuantity)
  798. : acc;
  799. }, 0);
  800. const notFormedNum = obj.product.reduce((acc, pro) => {
  801. return pro.feedQuantity && pro.extInfo.isQualified == 2
  802. ? acc + Number(pro.feedQuantity)
  803. : acc;
  804. }, 0);
  805. obj.workReportInfo.formedNum = formedNum;
  806. obj.workReportInfo.notFormedNum = notFormedNum;
  807. }
  808. obj.workReportInfo.formingNum = obj.formingNum;
  809. obj.workReportInfo.formingWeight = obj.formingWeight;
  810. obj.workReportInfo.unit = obj.unit;
  811. obj.workReportInfo.weightUnit = obj.weightUnit;
  812. obj.workReportInfo.workOrderId = obj.workOrderId;
  813. obj.workReportInfo.executorTime = obj.executorTime;
  814. obj.paramDetailList.map((m) => {
  815. if (m.extInfo.textType == 5) {
  816. m.remainingTime = m.extInfo.remainingTime;
  817. }
  818. return {
  819. ...m.extInfo
  820. };
  821. });
  822. console.log(obj, 4445555);
  823. if (this.taskObj.type == 4) {
  824. let numVal = 0;
  825. obj.pickOutInList.map((item) => {
  826. numVal = numVal + item.feedQuantity;
  827. });
  828. obj.workReportInfo.formedNum = numVal;
  829. }
  830. return {
  831. ...obj
  832. };
  833. });
  834. if (this.clientEnvironmentId == 3) {
  835. this.List.forEach((item, index) => {
  836. if (
  837. item.semiProductList.length != 0 &&
  838. item.singleReport == 0
  839. ) {
  840. this.countNumPl(item.semiProductList, index);
  841. }
  842. });
  843. }
  844. })
  845. .finally(() => {
  846. this.isLoad = true;
  847. if (this.taskObj.type == 1) {
  848. this.getCacheFn();
  849. }
  850. });
  851. }
  852. },
  853. openPicking(id, item) {
  854. this.$refs.pickingListRef.open(id, item);
  855. },
  856. allSelection(id, selectList) {
  857. console.log(id, selectList, 'allSelection');
  858. this.List.forEach((m) => {
  859. if (m.workOrderId == id) {
  860. let turnover = [];
  861. let equipmentList = []; // 生产设备
  862. selectList.forEach((f) => {
  863. if (f.rootCategoryLevelId == 4) {
  864. equipmentList = equipmentList.concat(f);
  865. }
  866. if (f.rootCategoryLevelId == 7) {
  867. turnover = turnover.concat(f);
  868. }
  869. });
  870. this.$set(m, 'equipmentList', equipmentList);
  871. this.$set(m, 'turnover', turnover);
  872. this.$forceUpdate();
  873. }
  874. });
  875. },
  876. chooseData(dataList) {
  877. this.chooseListData = this.deepCopy(dataList);
  878. // if (this.chooseListData.length > 0) {
  879. // this.chooseListData.forEach((item) => {
  880. // item.confirm = 1;
  881. // });
  882. // } else {
  883. // this.List.forEach((item) => {
  884. // item.semiProductList.forEach((fitem) => {
  885. // fitem.confirm = 0;
  886. // });
  887. // });
  888. // }
  889. },
  890. deepCopy(obj, hash = new WeakMap()) {
  891. if (obj === null) return null;
  892. if (obj instanceof Date) return new Date(obj);
  893. if (obj instanceof RegExp) return new RegExp(obj);
  894. if (typeof obj !== 'object' && typeof obj !== 'function') return obj;
  895. if (hash.has(obj)) return hash.get(obj); // 处理循环引用
  896. const result = Array.isArray(obj) ? [] : {};
  897. hash.set(obj, result); // 存储原始对象和其副本的映射关系
  898. return Object.keys(obj).reduce((acc, key) => {
  899. acc[key] = this.deepCopy(obj[key], hash);
  900. return acc;
  901. }, result);
  902. },
  903. checkTeamList(id) {
  904. this.executorIdList = [];
  905. const index = this.teamList.findIndex((item) => item.id == id);
  906. this.teamUserList = this.teamAllList[index];
  907. },
  908. async save(type) {
  909. const required = await parameterGetByCode({
  910. code: 'mes_report_engrave_required'
  911. }).then((res) => {
  912. return res;
  913. });
  914. console.log(required, 'required');
  915. if (this.executorIdList.length == 0) {
  916. return this.$message.error('执行人不能为空!');
  917. }
  918. const executorList = [];
  919. this.executorIdList.forEach((item) => {
  920. this.teamUserList.forEach((it) => {
  921. if (item == it.id) {
  922. executorList.push({
  923. userId: it.id,
  924. jobNumber: it.jobNumber,
  925. name: it.name
  926. });
  927. }
  928. });
  929. });
  930. this.List = this.List.map((item) => {
  931. item.workReportInfo.executorList = executorList;
  932. return item;
  933. });
  934. console.log(this.List, '------------');
  935. let confirmList = [];
  936. // const confirmList = this.List[0].semiProductList.filter(
  937. // (item) => item.confirm == 1
  938. // );
  939. this.List.forEach((item) => {
  940. item.semiProductList.forEach((it) => {
  941. if (it.confirm == 1) {
  942. confirmList.push(it);
  943. }
  944. });
  945. });
  946. if (required.value == '1' && this.List[0].singleReport == 1) {
  947. // if (this.chooseListData.length > 0) {
  948. // this.checkChooseData(this.chooseListData, type, 'choose');
  949. // return;
  950. // } else {
  951. // this.checkChooseData(this.List, type, 'all');
  952. // return;
  953. // }
  954. console.log(this.List, 'this.List');
  955. if (confirmList.length > 0) {
  956. for (let i = 0; i < confirmList.length; i++) {
  957. // if (
  958. // !confirmList[i].extInfo.engrave &&
  959. // confirmList[i].confirm == 1
  960. // ) {
  961. // this.$message.warning('请输入刻码!');
  962. // return;
  963. // }
  964. if (confirmList[i].confirm == 1) {
  965. if (!confirmList[i].extInfo.engrave) {
  966. this.$message.warning('请输入刻码!');
  967. return;
  968. }
  969. }
  970. }
  971. } else {
  972. if (this.List.length > 0) {
  973. console.log(this.List);
  974. for (let i = 0; i < this.List[0].semiProductList.length; i++) {
  975. // if (!this.List[0].semiProductList[i].extInfo.engrave) {
  976. // this.$message.warning('请输入刻码!');
  977. // return;
  978. // }
  979. if (this.List[0].semiProductList[i].confirm == 1) {
  980. if (!this.List[0].semiProductList[i].extInfo.engrave) {
  981. this.$message.warning('请输入刻码!');
  982. return;
  983. }
  984. }
  985. }
  986. // this.List.forEach((item) => {
  987. // for (let i = 0; i < item.semiProductList.length; i++) {
  988. // if (!item.semiProductList[i].extInfo.engrave) {
  989. // this.$message.warning('请输入刻码!');
  990. // return;
  991. // }
  992. // }
  993. // });
  994. // for (let i = 0; i < this.List.length; i++) {
  995. // for(let j = 0; i < this.List[i].semiProductList.length; j++) {
  996. // }
  997. // // for (let j = 0; this.List[i].semiProductList.length; j++) {
  998. // // console.log(
  999. // // this.List[i].semiProductList[j],
  1000. // // 'this.List[i].semiProductList[j]'
  1001. // // );
  1002. // // if (!this.List[i].semiProductList[j].extInfo.engrave) {
  1003. // // this.$message.warning('请输入刻码!');
  1004. // // return;
  1005. // // }
  1006. // // }
  1007. // }
  1008. }
  1009. }
  1010. }
  1011. console.log('11111', this.List);
  1012. this.loading = this.$loading({
  1013. lock: true,
  1014. text: '加载中',
  1015. background: 'rgba(0, 0, 0, 0.7)'
  1016. });
  1017. let arr = this.List.filter((L) => L.workReportInfo.executorTime);
  1018. if (!arr.length) {
  1019. this.loading.close();
  1020. return this.$message.warning('请选择执行时间');
  1021. }
  1022. // for (let i = 0; i < this.List.length; i++) {
  1023. // if (
  1024. // this.List[i].packInfo &&
  1025. // Object.keys(this.List[i].packInfo).length === 0
  1026. // ) {
  1027. // this.loading.close();
  1028. // return this.$message.warning('请到主数据配置包装规格');
  1029. // }
  1030. // }
  1031. // if(this.taskObj.type !=6){
  1032. // if(this.reportNeedFeed==1&&!(this.List[0].semiProductList.length>0||this.List[0].pickOutInList.length>0)){
  1033. // this.loading.close();
  1034. // return this.$message.warning('请先投料再报工');
  1035. // }
  1036. // }
  1037. let bol2;
  1038. bol2 = this.List.every((e) => {
  1039. return (
  1040. // e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
  1041. e.workReportInfo['formedNum'] != ''
  1042. );
  1043. });
  1044. // if (!bol2) {
  1045. // this.$message.warning('请输入合格品数量');
  1046. // this.loading.close();
  1047. // return false;
  1048. // }
  1049. // 预制体
  1050. let wId;
  1051. let bol = true;
  1052. let _i;
  1053. this.List.forEach((L) => {
  1054. if (
  1055. L.semiProductList.length > 0 &&
  1056. this.taskObj.type != 4 &&
  1057. L.singleReport == 1
  1058. ) {
  1059. bol = L.semiProductList.every((e, i) => {
  1060. _i = i + 1;
  1061. wId = L.code;
  1062. if (this.taskObj.type == 6) {
  1063. return (
  1064. Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
  1065. e.extInfo.taskId
  1066. );
  1067. } else {
  1068. if (e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
  1069. return (
  1070. Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
  1071. e.extInfo.taskId &&
  1072. e.extInfo.reportWeight
  1073. );
  1074. } else {
  1075. return (
  1076. Object.prototype.hasOwnProperty.call(
  1077. e.extInfo,
  1078. 'notType'
  1079. ) && e.extInfo.notType
  1080. );
  1081. }
  1082. }
  1083. });
  1084. }
  1085. if (L.workReportInfo.batchNo) {
  1086. L.workReportInfo.batchNo = L.batchNo + L.workReportInfo.batchNo;
  1087. }
  1088. });
  1089. // if (!bol) {
  1090. // this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
  1091. // this.loading.close();
  1092. // return false;
  1093. // }
  1094. if (this.clientEnvironmentId != 2) {
  1095. for (let i = 0; i < this.List.length; i++) {
  1096. for (let j = 0; j < this.List[i].productRecycleList.length; j++) {
  1097. if (!this.List[i].productRecycleList[j].warehouseId) {
  1098. const isRecycle = await this.checkRecycle();
  1099. if (!isRecycle) {
  1100. return false;
  1101. }
  1102. }
  1103. }
  1104. }
  1105. // let succ = this.List.some((L) => {
  1106. // return L.productRecycleList.length > 0;
  1107. // });
  1108. // if (succ) {
  1109. // const isRecycle = await this.checkRecycle();
  1110. // if (!isRecycle) {
  1111. // return false;
  1112. // }
  1113. // }
  1114. }
  1115. console.log(this.item, '9999999999');
  1116. if (this.taskObj.type == 4) {
  1117. this.checkPack();
  1118. // if (!isPack) {
  1119. // return false
  1120. // }
  1121. }
  1122. console.log('4444444444', this.List);
  1123. if (this.taskObj.type == 1) {
  1124. const isCache = await this.checkCache(type);
  1125. if (!isCache) {
  1126. return false;
  1127. }
  1128. }
  1129. if (
  1130. this.clientEnvironmentId == 3 &&
  1131. type == 2 &&
  1132. this.taskObj.type == 6
  1133. ) {
  1134. this.List.forEach((L) => {
  1135. if (L.singleReport == 0) {
  1136. L.semiProductList = [];
  1137. }
  1138. });
  1139. console.log('ashsaoghaoghoasg');
  1140. }
  1141. let isSemiProduct = false;
  1142. this.List.map((semi) => {
  1143. if (
  1144. semi.semiProductList.length == 0 &&
  1145. semi.singleReport == 1 &&
  1146. semi.currentTaskDiagram.isFirstTask == 1 &&
  1147. this.clientEnvironmentId != 3
  1148. ) {
  1149. isSemiProduct = true;
  1150. this.loading.close();
  1151. setTimeout(() => {
  1152. this.$message.warning({
  1153. message: '请工单编号:' + semi.code + '先创建在制品',
  1154. key: semi.code // 使用当前时间作为key,确保唯一性
  1155. });
  1156. }, 500);
  1157. }
  1158. if (semi.semiProductList.length == 0 && semi.singleReport == 0) {
  1159. semi.semiProductList.map((ditem) => {
  1160. if (ditem.extInfo.batchReportInfo) {
  1161. ditem.extInfo.batchReportInfo.map((baItem) => {
  1162. let idvalue = baItem.deviceId
  1163. ? baItem.deviceId.split('/')
  1164. : '';
  1165. baItem.deviceId = idvalue ? idvalue[0] : '';
  1166. });
  1167. }
  1168. if (ditem.extInfo.notBatchReportInfo) {
  1169. ditem.extInfo.notBatchReportInfo.map((noItem) => {
  1170. let idvalue = noItem.deviceId
  1171. ? noItem.deviceId.split('/')
  1172. : '';
  1173. noItem.deviceId = idvalue ? idvalue[0] : '';
  1174. });
  1175. }
  1176. });
  1177. }
  1178. });
  1179. if (isSemiProduct) {
  1180. this.loading.close();
  1181. return;
  1182. }
  1183. console.log(this.List, 'this.List');
  1184. // this.List[0].product = this.List[0].semiProductList;
  1185. this.loadingBtn = true;
  1186. jobSave(this.List)
  1187. .then((res) => {
  1188. this.loadingBtn = false;
  1189. this.loading.close();
  1190. this.$message.success('报工成功');
  1191. this.executorIdList = [];
  1192. this.teamId = '';
  1193. this.getList(this.idsList);
  1194. this.$emit('jobSuccess', 'Success');
  1195. })
  1196. .catch(() => {
  1197. this.loadingBtn = false;
  1198. this.loading.close();
  1199. });
  1200. // .finally(() => {
  1201. // setTimeout(function () {
  1202. // this.loading.close();
  1203. // }, 3000);
  1204. // });
  1205. },
  1206. checkRecycle() {
  1207. // this.loading.close();
  1208. return new Promise((resolve) => {
  1209. this.$confirm('是否跳过副产品回收处置!', '提示', {
  1210. confirmButtonText: '确定',
  1211. cancelButtonText: '取消',
  1212. type: 'warning'
  1213. })
  1214. .then(() => {
  1215. resolve(true);
  1216. })
  1217. .catch(() => {
  1218. resolve(false);
  1219. });
  1220. });
  1221. },
  1222. checkCache(type) {
  1223. return new Promise((resolve) => {
  1224. if (type == 1) {
  1225. saveCache(this.List).then((rr) => {
  1226. this.$message.success('缓存成功');
  1227. this.loading.close();
  1228. });
  1229. resolve(false);
  1230. } else if (type == 2) {
  1231. resolve(true);
  1232. }
  1233. });
  1234. },
  1235. getCacheFn() {
  1236. let parma = {
  1237. workOrderIds: this.idsList,
  1238. taskId: this.taskObj.id,
  1239. type: 1
  1240. };
  1241. getCache(parma).then((res) => {
  1242. this.List.forEach((f, index) => {
  1243. res.forEach((o) => {
  1244. if (f.workOrderId == o.workOrderId) {
  1245. f['product'] = o.extInfo.product;
  1246. f['workReportInfo'] = o.extInfo.workReportInfo;
  1247. f['notFormedList'] = o.extInfo.notFormedList;
  1248. f['turnover'] = o.extInfo.turnover;
  1249. f['productRecycleList'] = o.extInfo.productRecycleList;
  1250. f['semiProductList'] = o.extInfo.semiProductList;
  1251. f['modelList'] = o.extInfo.modelList;
  1252. // this.$set(this.List[index].workReportInfo,'executorTime',timestampToDateTime(o.extInfo.workReportInfo.executorTime))
  1253. this.$forceUpdate();
  1254. }
  1255. });
  1256. });
  1257. });
  1258. },
  1259. removeCacheFn(type) {
  1260. this.$confirm('是否清空缓存', '缓存')
  1261. .then(() => {
  1262. let parma = {
  1263. workOrderIds: type == 'all' ? this.idsList : [type],
  1264. taskId: this.taskObj.id,
  1265. type: 1
  1266. };
  1267. removeCache(parma).then((res) => {
  1268. this.$message.success('已经清空缓存');
  1269. this.getList(this.idsList);
  1270. });
  1271. })
  1272. .catch(() => {});
  1273. },
  1274. getWarehouseListFn() {
  1275. getWarehouseList().then((res) => {
  1276. this.warehouseList = res.data;
  1277. });
  1278. },
  1279. //批量报工合格不合格重量统计
  1280. countNumPl(list, index) {
  1281. console.log('11111122222333', list);
  1282. //合格总数
  1283. let formedNumCount = 0;
  1284. //合格总重量
  1285. let formedWeightCount = 0;
  1286. //不合格总数
  1287. let notFormedNumCount = 0;
  1288. //不合格总重量
  1289. let notFormedWeightCount = 0;
  1290. list.map((item) => {
  1291. //合格总数
  1292. item.extInfo.batchReportInfo.forEach((m) => {
  1293. formedNumCount = formedNumCount + Number(m.allFeedQuantity || 0);
  1294. });
  1295. //合格总重量
  1296. item.extInfo.batchReportInfo.forEach((w) => {
  1297. formedWeightCount =
  1298. formedWeightCount + Number(w.allReportWeight || 0);
  1299. });
  1300. //不合格总数
  1301. item.extInfo.notBatchReportInfo.forEach((nf) => {
  1302. notFormedNumCount =
  1303. notFormedNumCount + Number(nf.allFeedQuantity || 0);
  1304. });
  1305. //不合格总重量
  1306. item.extInfo.notBatchReportInfo.forEach((nw) => {
  1307. notFormedWeightCount =
  1308. notFormedWeightCount + Number(nw.allReportWeight || 0);
  1309. });
  1310. });
  1311. this.$set(this.List[index].workReportInfo, 'formedNum', formedNumCount); //合格总数
  1312. this.$set(
  1313. this.List[index].workReportInfo,
  1314. 'formedWeight',
  1315. formedWeightCount
  1316. ); //合格总重量
  1317. this.$set(
  1318. this.List[index].workReportInfo,
  1319. 'notFormedNum',
  1320. notFormedNumCount
  1321. ); //不合格总数
  1322. this.$set(
  1323. this.List[index].workReportInfo,
  1324. 'notFormedWeight',
  1325. notFormedWeightCount
  1326. ); //不合格总重量
  1327. }
  1328. }
  1329. };
  1330. </script>
  1331. <style scoped lang="scss">
  1332. .top_fixed {
  1333. width: 100%;
  1334. height: 40px;
  1335. background: #fff;
  1336. display: flex;
  1337. align-items: center;
  1338. justify-content: flex-end;
  1339. }
  1340. .title_box {
  1341. padding: 10px 0;
  1342. .name {
  1343. font-size: 14px;
  1344. font-style: normal;
  1345. font-weight: 400;
  1346. color: #157a2c;
  1347. padding-left: 5px;
  1348. position: relative;
  1349. &:before {
  1350. position: absolute;
  1351. content: '';
  1352. left: 0px;
  1353. top: 0px;
  1354. bottom: 0px;
  1355. width: 2px;
  1356. height: 14px;
  1357. background: #157a2c;
  1358. margin: auto;
  1359. }
  1360. }
  1361. }
  1362. .job_box {
  1363. // margin-top: 6px;
  1364. width: 100%;
  1365. height: calc(100vh - 70px - 50px - 80px - 60px);
  1366. overflow-y: scroll;
  1367. overflow-x: hidden;
  1368. }
  1369. .card_box {
  1370. background: #fff;
  1371. padding: 8px;
  1372. border-radius: 2px;
  1373. }
  1374. ::v-deep .el-select__tags {
  1375. flex-wrap: nowrap;
  1376. overflow: auto;
  1377. }
  1378. /* 输入框最大宽度*/
  1379. ::v-deep .el-select__tags-text {
  1380. max-width: 90px;
  1381. }
  1382. /* 底部滚动条的高度*/
  1383. ::v-deep .el-select__tags::-webkit-scrollbar {
  1384. height: 2px !important;
  1385. }
  1386. </style>