index.vue 45 KB

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