batchProductJobBom.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name"> 报工信息: ({{ list.length || 0 }})个</view>
  5. </view>
  6. <view
  7. :class="[
  8. 'material',
  9. it.extInfo.reportWeight && it.extInfo.reportWeight && 'materialBor',
  10. ]"
  11. v-for="(it, idx) in list"
  12. :key="idx"
  13. >
  14. <view class="content_table">
  15. <view class="item rx-sc">
  16. <view class="rx">
  17. <view class="lable lable190 rx-cc" v-if="isDetails">
  18. <view class="round">{{ idx + 1 }}</view>
  19. <uni-icons
  20. custom-prefix="iconfont"
  21. type="icon-shanchu"
  22. size="16"
  23. color="#fa3534"
  24. ></uni-icons>
  25. 物料编码
  26. </view>
  27. <view class="lable lable190 rx-cc" @click="getDelete2(idx)" v-else>
  28. <view class="round">{{ idx + 1 }}</view>
  29. <uni-icons
  30. custom-prefix="iconfont"
  31. type="icon-shanchu"
  32. size="16"
  33. color="#fa3534"
  34. ></uni-icons>
  35. 物料编码
  36. </view>
  37. <view class="content rx-bc">
  38. <view>{{ it.code }} </view>
  39. <view
  40. class="tag_box"
  41. v-if="
  42. Object.prototype.hasOwnProperty.call(it, 'extInfo') &&
  43. Object.prototype.hasOwnProperty.call(
  44. it.extInfo,
  45. 'productionTimes'
  46. ) &&
  47. Object.prototype.hasOwnProperty.call(
  48. it.extInfo.productionTimes,
  49. item.currentTaskDiagram.taskId
  50. )
  51. "
  52. >
  53. {{ it.extInfo.productionTimes[item.currentTaskDiagram.taskId] }}
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="item rx-sc">
  59. <view class="rx">
  60. <view class="lable lable150 rx-cc">名称</view>
  61. <view class="content rx-bc">
  62. <view
  63. >{{ it.name }}
  64. <text
  65. v-if="[2, 23, 9, 28].includes(Number(it.rootCategoryLevelId))"
  66. >
  67. ({{
  68. it.rootCategoryLevelId == 2
  69. ? "在制品"
  70. : it.rootCategoryLevelId == 23
  71. ? "半成品"
  72. : it.rootCategoryLevelId == 9
  73. ? "产品"
  74. : it.rootCategoryLevelId == 28
  75. ? "废品"
  76. : ""
  77. }})
  78. </text>
  79. </view>
  80. <view class="rx-ec">
  81. <view
  82. class="tag_box"
  83. v-if="it.isCache"
  84. style="margin-right: -36rpx; margin-right: 4rpx"
  85. >缓</view
  86. >
  87. <view
  88. class="tag_box"
  89. v-if="
  90. Object.prototype.hasOwnProperty.call(
  91. it.extInfo,
  92. 'isOutsource'
  93. ) && it.extInfo.isOutsource == 1
  94. "
  95. style="margin-right: -36rpx"
  96. >委外</view
  97. >
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="item rx-sc">
  103. <view class="rx">
  104. <view class="lable lable150 rx-cc">型号</view>
  105. <view class="content rx-sc">
  106. <view>{{ it.modelType }}</view>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="item rx-sc">
  111. <view class="rx ww50">
  112. <view class="lable lable150 rx-cc">批次号</view>
  113. <view class="content content_num">
  114. <view v-if="isDetails">{{ it.batchNo }}</view>
  115. <input class="uni-input" v-else v-model="it.batchNo" />
  116. </view>
  117. </view>
  118. <view class="rx ww50">
  119. <view class="lable lable150 rx-cc">牌号</view>
  120. <view class="content content_num">
  121. <view>{{ it.brandNum }}</view>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="item rx-sc">
  126. <view class="rx ww50">
  127. <view class="lable lable150 rx-cc">物料代号</view>
  128. <view class="content content_num">
  129. <view v-if="isDetails">{{ it.extInfo.materielCode }}</view>
  130. <input
  131. class="uni-input"
  132. v-else
  133. v-model="it.extInfo.materielCode"
  134. />
  135. </view>
  136. </view>
  137. <view class="rx ww50">
  138. <view class="lable lable150 rx-cc">客户代号</view>
  139. <view class="content content_num">
  140. <view v-if="isDetails">{{ it.extInfo.clientCode }}</view>
  141. <input class="uni-input" v-else v-model="it.extInfo.clientCode" />
  142. </view>
  143. </view>
  144. </view>
  145. <view class="item rx-sc">
  146. <view class="rx ww50">
  147. <view class="lable lable150 rx-cc" v-if="clientEnvironmentId != 5"
  148. >刻码</view
  149. >
  150. <view class="lable lable150 rx-cc" v-if="clientEnvironmentId == 5"
  151. >识别码</view
  152. >
  153. <view class="content content_num">
  154. <view v-if="isDetails">{{ it.extInfo.engrave }}</view>
  155. <input class="uni-input" v-else v-model="it.extInfo.engrave" />
  156. </view>
  157. </view>
  158. <view class="rx ww50">
  159. <view class="lable lable150 rx-cc">序列号</view>
  160. <view class="content content_num">
  161. <view v-if="isDetails">{{ it.extInfo.productSequence }}</view>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="item rx-sc">
  166. <view class="rx ww50">
  167. <view class="lable lable150 rx-cc">设备</view>
  168. <view class="content content_num">
  169. <view v-if="isDetails">{{ it.deviceName }}</view>
  170. <zxz-uni-data-select
  171. :localdata="deviceList"
  172. v-model="it.deviceId"
  173. dataValue="instanceId"
  174. format="{name}"
  175. dataKey="instanceId"
  176. filterable
  177. :clear="false"
  178. v-else
  179. ></zxz-uni-data-select>
  180. </view>
  181. <!-- <view class="content ">
  182. <view>{{ it.deviceName || it.extInfo.deviceName }}</view>
  183. </view> -->
  184. </view>
  185. <view class="rx ww50">
  186. <view class="lable lable150 rx-cc">炉次号</view>
  187. <view class="content content_num">
  188. <view v-if="isDetails">{{ it.extInfo.heatNumber }}</view>
  189. <input class="uni-input" v-else v-model="it.extInfo.heatNumber" />
  190. </view>
  191. </view>
  192. </view>
  193. <view class="item rx-sc">
  194. <view class="rx ww50">
  195. <view class="lable lable150 rx-cc">位置</view>
  196. <view class="content content_num">
  197. <view v-if="isDetails">{{ it.extInfo.position }}</view>
  198. <input class="uni-input" v-else v-model="it.extInfo.position" />
  199. </view>
  200. </view>
  201. <view class="rx ww50">
  202. <view class="lable lable150 rx-cc">数量</view>
  203. <view class="content content_num">
  204. <view v-if="isDetails">{{ it.feedQuantity }}</view>
  205. <input class="uni-input" v-else v-model="it.feedQuantity" />
  206. </view>
  207. </view>
  208. </view>
  209. <view class="item rx-sc">
  210. <view class="rx ww50">
  211. <view class="lable lable150 rx-cc">是否合格</view>
  212. <view class="content content_num">
  213. <zxz-uni-data-select
  214. :localdata="isQualifiedList"
  215. v-model="it.extInfo.isQualified"
  216. dataValue="code"
  217. format="{name}"
  218. dataKey="code"
  219. filterable
  220. :disabled="isDetails"
  221. :clear="false"
  222. ></zxz-uni-data-select>
  223. </view>
  224. </view>
  225. <view
  226. class="rx ww50"
  227. v-if="it.extInfo.isQualified && it.extInfo.isQualified == 2"
  228. >
  229. <view class="lable lable150 rx-cc">处置类型</view>
  230. <view class="content">
  231. <zxz-uni-data-select
  232. :localdata="notTypeList"
  233. v-model="it.extInfo.notType"
  234. dataValue="code"
  235. format="{name}"
  236. dataKey="code"
  237. filterable
  238. :disabled="isDetails"
  239. :clear="false"
  240. ></zxz-uni-data-select>
  241. </view>
  242. </view>
  243. </view>
  244. <view class="item rx-sc">
  245. <view class="rx ww50">
  246. <view class="lable lable150 rx-cc">原因/处置</view>
  247. <view
  248. class="content"
  249. v-if="
  250. it.extInfo.isQualified != 1 &&
  251. it.extInfo.notType != 5 &&
  252. it.extInfo.notType != 8 &&
  253. it.extInfo.notType
  254. "
  255. >
  256. <view v-if="isDetails">{{ it.extInfo.notReason }}</view>
  257. <input
  258. class="uni-input content_num"
  259. v-else
  260. v-model="it.extInfo.notReason"
  261. />
  262. </view>
  263. <view
  264. v-if="![1, 2, 3, 4, 6, 9, 7].includes(Number(it.extInfo.notType))"
  265. class="content"
  266. >
  267. <span v-if="isDetails">{{ it.extInfo.taskName }}</span>
  268. <zxz-uni-data-select
  269. :localdata="stepsList"
  270. v-model="it.extInfo.taskId"
  271. dataValue="taskId"
  272. format="{taskTypeName}"
  273. dataKey="taskId"
  274. filterable
  275. :disabled="isDetails"
  276. :clear="false"
  277. >
  278. </zxz-uni-data-select>
  279. </view>
  280. </view>
  281. <view class="rx ww50">
  282. <view class="lable lable150 rx-cc">报工重量</view>
  283. <view class="content content_num">
  284. <view v-if="isDetails">{{ it.extInfo.reportWeight }}</view>
  285. <input
  286. class="uni-input"
  287. v-else
  288. v-model="it.extInfo.reportWeight"
  289. @input="handleInput"
  290. />
  291. </view>
  292. </view>
  293. </view>
  294. <view class="item rx-sc">
  295. <view class="rx ww50">
  296. <view class="lable lable150 rx-cc">损耗</view>
  297. <view class="content content_num">
  298. <view v-if="it.extInfo.isLoss && it.extInfo.isLoss == 1">是</view>
  299. <view v-else>否</view>
  300. </view>
  301. </view>
  302. </view>
  303. <view class="item rx-sc" v-if="!isDetails">
  304. <view class="rx">
  305. <view class="lable lable150 rx-cc">操作</view>
  306. <view class="content rx-bc">
  307. <view style="display: flex">
  308. <u-button
  309. size="small"
  310. class="u-reset-button"
  311. type="primary"
  312. @click="batchClick(it, idx)"
  313. v-if="it.extInfo.sourceQuantity > 1"
  314. >拆批</u-button
  315. >
  316. <u-button
  317. size="small"
  318. class="u-reset-button"
  319. type="error"
  320. @click="deleteBatch(idx)"
  321. style="margin-left: 20px"
  322. >删除</u-button
  323. >
  324. <u-button
  325. size="small"
  326. class="u-reset-button"
  327. type="warning"
  328. style="margin-left: 20px"
  329. @click="openLoss(it, idx)"
  330. v-if="
  331. ![2, 3, 6].includes(Number(item.currentTaskDiagram.type)) &&
  332. !it.extInfo.isLoss &&
  333. item.currentTaskDiagram.isFirstTask != 1
  334. "
  335. >损耗</u-button
  336. >
  337. </view>
  338. </view>
  339. </view>
  340. </view>
  341. </view>
  342. <view
  343. class="content_table2"
  344. v-if="
  345. ![1, 2, 3, 4].includes(Number(it.extInfo.notType)) &&
  346. clientEnvironmentId == 3
  347. "
  348. >
  349. <view class="head row rx-sc">
  350. <view class="item ww25" style="font-size: 20rpx"
  351. >{{ it.extInfo.newWeight ? "上道工序重量" : "物料重量" }}
  352. {{ it.extInfo.weightUnit }}
  353. </view>
  354. <view class="item ww25">报工重量{{ it.extInfo.weightUnit }}</view>
  355. <view class="item ww25" v-if="isFirstTask == 1">质检结果 </view>
  356. <view class="item ww25" :class="[isFirstTask == 1 ? 'ww25' : 'ww50']"
  357. >处置
  358. </view>
  359. </view>
  360. <view class="table">
  361. <view class="tr row rx-sc">
  362. <view
  363. class="item ww25"
  364. v-if="
  365. Object.prototype.hasOwnProperty.call(it.extInfo, 'newWeight') &&
  366. it.extInfo.newWeight
  367. "
  368. >
  369. {{ it.extInfo.newWeight }}
  370. </view>
  371. <view
  372. class="item ww25 content_num"
  373. v-if="
  374. !Object.prototype.hasOwnProperty.call(
  375. it.extInfo,
  376. 'newWeight'
  377. ) ||
  378. it.extInfo.newWeight == null ||
  379. it.extInfo.newWeight == 0
  380. "
  381. >
  382. <input
  383. class="uni-input"
  384. v-model="it.extInfo.weight"
  385. type="digit"
  386. />
  387. </view>
  388. <view class="item ww25 content_num">
  389. <view v-if="isDetails">{{ it.extInfo.reportWeight }}</view>
  390. <input
  391. class="uni-input"
  392. v-else
  393. v-model="it.extInfo.reportWeight"
  394. type="digit"
  395. @input="handleInput"
  396. />
  397. </view>
  398. <view
  399. class="item ww25"
  400. @click="openNumerate(it, idx)"
  401. v-if="isFirstTask == 1"
  402. >
  403. <view class="numerate">点击计算</view>
  404. </view>
  405. <view
  406. class="item"
  407. v-if="isDetails"
  408. :class="[isFirstTask == 1 ? 'ww25' : 'ww50']"
  409. >
  410. {{ it.extInfo.taskName }}
  411. </view>
  412. <view
  413. class="item"
  414. v-else
  415. :class="[isFirstTask == 1 ? 'ww25' : 'ww50']"
  416. >
  417. <zxz-uni-data-select
  418. :localdata="stepsList"
  419. v-model="it.extInfo.taskId"
  420. dataValue="taskId"
  421. format="{taskTypeName}"
  422. dataKey="taskId"
  423. filterable
  424. @change="(e) => (it.extInfo.taskName = e.taskTypeName)"
  425. :clear="false"
  426. ></zxz-uni-data-select>
  427. </view>
  428. </view>
  429. </view>
  430. </view>
  431. </view>
  432. <u-popup
  433. :show="show"
  434. mode="center"
  435. v-if="show"
  436. :closeOnClickOverlay="false"
  437. >
  438. <view class="popup_box">
  439. <view class="title_box rx-bc">
  440. <view class="name">工序计算列表</view>
  441. <view class="btn_box rx-ec">
  442. <view class="btn" @click="handAddParam">新增</view>
  443. </view>
  444. </view>
  445. <view class="content_table2">
  446. <view class="head row rx-sc">
  447. <view class="item ww30">工序名称</view>
  448. <view class="item ww20">坯体密度</view>
  449. <view class="item ww20">密度系数</view>
  450. <view class="item ww20">重量</view>
  451. <view class="item ww10">操作</view>
  452. </view>
  453. <view class="table">
  454. <view
  455. class="tr row rx-sc"
  456. v-for="(it, idx) in paramList"
  457. :key="idx"
  458. >
  459. <view class="item rx-bc ww30">
  460. <zxz-uni-data-select
  461. :localdata="stepsList"
  462. v-model="it.taskId"
  463. dataValue="taskId"
  464. format="{taskTypeName}"
  465. dataKey="taskId"
  466. filterable
  467. @change="(e) => (it.taskName = e.taskTypeName)"
  468. :clear="false"
  469. ></zxz-uni-data-select>
  470. </view>
  471. <view class="item ww20 content_num">
  472. <input
  473. class="uni-input"
  474. v-model="it.billet"
  475. type="digit"
  476. @input="changeInp(it, idx)"
  477. />
  478. </view>
  479. <view class="item ww20 content_num">
  480. <input
  481. class="uni-input"
  482. v-model="it.density"
  483. type="digit"
  484. @input="changeInp(it, idx)"
  485. />
  486. </view>
  487. <view
  488. class="item ww20"
  489. v-if="idx == 0 || idx != paramList.length - 1"
  490. >
  491. < {{ it.CVIWeight }}
  492. </view>
  493. <view
  494. class="item ww20"
  495. v-if="paramList.length > 1 && idx == paramList.length - 1"
  496. >
  497. ≥ {{ it.CVIWeight }}
  498. </view>
  499. <view class="item ww10 rx-cc" @click="getDelete(idx)">
  500. <uni-icons
  501. custom-prefix="iconfont"
  502. type="icon-shanchu"
  503. size="20"
  504. color="#fa3534"
  505. ></uni-icons>
  506. </view>
  507. </view>
  508. </view>
  509. <view class="formula_box"
  510. >计算公式: 物料重量/坯体密度*密度系数
  511. </view>
  512. <view class="rx-cc">
  513. <u-button
  514. size="small"
  515. class="u-reset-button"
  516. style="width: 300rpx; margin: 20rpx"
  517. type="success"
  518. @click="paramSave"
  519. >工序列表保存</u-button
  520. >
  521. </view>
  522. <view class="reportWeight rx-sc">
  523. 物料重量: {{ weight }} ; 报工重量: {{ reportWeight }}
  524. </view>
  525. </view>
  526. <view class="operate_box rx-sc">
  527. <u-button size="small" class="u-reset-button" @click="cancel"
  528. >取消</u-button
  529. >
  530. <u-button
  531. size="small"
  532. class="u-reset-button"
  533. type="success"
  534. @click="save"
  535. >确定</u-button
  536. >
  537. </view>
  538. </view>
  539. </u-popup>
  540. <uni-popup ref="inputDialog" type="center" :animation="false">
  541. <view class="popup-content">
  542. <view style="font-size: 18px; margin-bottom: 10px">拆批</view>
  543. <uni-forms
  544. ref="baseForm"
  545. :modelValue="batchForm"
  546. label-position="left"
  547. label-align="center"
  548. >
  549. <uni-forms-item label="批次号:" label-width="100" prop="batchNo">
  550. <uni-easyinput
  551. v-model="batchForm.batchNo"
  552. placeholder="请输入批次号"
  553. />
  554. </uni-forms-item>
  555. <uni-forms-item label="拆批数:" label-width="100" prop="quantity">
  556. <uni-easyinput
  557. v-model="batchForm.quantity"
  558. placeholder="请输入拆批数"
  559. />
  560. </uni-forms-item>
  561. <uni-forms-item
  562. label="是否合格:"
  563. label-width="100"
  564. prop="isQualified"
  565. >
  566. <zxz-uni-data-select
  567. :localdata="isQualifiedList"
  568. v-model="batchForm.isQualified"
  569. dataValue="code"
  570. format="{name}"
  571. dataKey="code"
  572. filterable
  573. :clear="false"
  574. @change="isChange"
  575. ></zxz-uni-data-select>
  576. </uni-forms-item>
  577. <uni-forms-item
  578. label="不合格类型:"
  579. label-width="100"
  580. prop="notType"
  581. v-if="batchForm.isQualified == 2"
  582. >
  583. <zxz-uni-data-select
  584. :localdata="notTypeList"
  585. v-model="batchForm.notType"
  586. dataValue="code"
  587. format="{name}"
  588. dataKey="code"
  589. filterable
  590. :clear="false"
  591. ></zxz-uni-data-select>
  592. </uni-forms-item>
  593. <uni-forms-item
  594. label="不良原因:"
  595. v-if="
  596. batchForm.isQualified != 1 &&
  597. batchForm.notType &&
  598. batchForm.notType != 5 &&
  599. batchForm.notType != 8
  600. "
  601. prop="notReason"
  602. >
  603. <uni-easyinput
  604. v-model="batchForm.notReason"
  605. placeholder="请输入不良原因"
  606. />
  607. </uni-forms-item>
  608. </uni-forms>
  609. <view class="button-group">
  610. <button type="primary" size="mini" @click="handleClose">取消</button>
  611. <button type="primary" size="mini" @click="timeoutCauseConfirm">
  612. 确定
  613. </button>
  614. </view>
  615. </view>
  616. </uni-popup>
  617. <uni-popup ref="lossDialog" type="center" :animation="false">
  618. <view class="popup-content">
  619. <view style="font-size: 18px; margin-bottom: 10px">损耗数</view>
  620. <uni-forms
  621. ref="lossForm"
  622. :modelValue="lossForm"
  623. label-position="left"
  624. label-align="center"
  625. >
  626. <uni-forms-item label="批次号:" label-width="100" prop="batchNo">
  627. <uni-easyinput
  628. v-model="lossForm.batchNo"
  629. placeholder="请输入批次号"
  630. />
  631. </uni-forms-item>
  632. <uni-forms-item label="损耗数:" label-width="100" prop="quantity">
  633. <uni-easyinput
  634. v-model="lossForm.quantity"
  635. placeholder="请输入损耗数"
  636. />
  637. </uni-forms-item>
  638. </uni-forms>
  639. <view class="button-group">
  640. <button type="primary" size="mini" @click="handleClose">取消</button>
  641. <button type="primary" size="mini" @click="getLossParam">确定</button>
  642. </view>
  643. </view>
  644. </uni-popup>
  645. </view>
  646. </template>
  647. <script>
  648. import { getTaskInstanceList } from "@/api/pda/workOrder.js";
  649. import { saveParam, getComputeParam } from "@/api/pda/tangu.js";
  650. import { splitBatch } from "@/api/pda/feeding";
  651. import SearchPopup from "./searchPopup.vue";
  652. export default {
  653. props: {
  654. item: {
  655. type: Object,
  656. default: () => {},
  657. },
  658. list: {
  659. type: Array,
  660. default: () => [],
  661. },
  662. isDetails: {
  663. type: Boolean,
  664. default: false,
  665. },
  666. equipmentList: {
  667. type: Array,
  668. default: () => [],
  669. },
  670. },
  671. components: {
  672. SearchPopup,
  673. },
  674. watch: {
  675. equipmentList: {
  676. immediate: true,
  677. deep: true,
  678. handler(newVal) {
  679. this.deviceList = newVal;
  680. this.changeHeatNumber();
  681. },
  682. },
  683. list: {
  684. immediate: true,
  685. deep: true,
  686. handler(newVal) {
  687. if (newVal.length) {
  688. console.log(newVal);
  689. this.newList = newVal;
  690. this.sumweight(newVal);
  691. this.sunTj();
  692. }
  693. },
  694. },
  695. },
  696. mounted() {
  697. if (this.deviceList.length > 0) {
  698. this.list.forEach((item) => {
  699. item.deviceId = this.deviceList[0].id
  700. ? this.deviceList[0].id
  701. : this.deviceList[0].instanceId;
  702. });
  703. }
  704. },
  705. data() {
  706. return {
  707. taskTypeName: null,
  708. isFirstTask: null,
  709. stepsList: [],
  710. clientEnvironmentId:
  711. uni.getStorageSync("userInfo") &&
  712. uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
  713. show: false,
  714. rowIt: [],
  715. paramList: [],
  716. paramObj: {},
  717. weight: 0,
  718. reportWeight: 0,
  719. resultObj: {},
  720. resultIdx: 0,
  721. deviceList: [],
  722. isQualifiedList: [
  723. {
  724. code: 1,
  725. name: "合格",
  726. },
  727. {
  728. code: 2,
  729. name: "不合格",
  730. },
  731. ],
  732. notTypeList: [
  733. {
  734. code: 1,
  735. name: "返工",
  736. },
  737. {
  738. code: 2,
  739. name: "返修",
  740. },
  741. {
  742. code: 3,
  743. name: "报废",
  744. },
  745. {
  746. code: 4,
  747. name: "降级使用",
  748. },
  749. {
  750. code: 5,
  751. name: "让步接收",
  752. },
  753. {
  754. code: 6,
  755. name: "留样",
  756. },
  757. {
  758. code: 7,
  759. name: "消耗",
  760. },
  761. {
  762. code: 8,
  763. name: "回用",
  764. },
  765. {
  766. code: 9,
  767. name: "转试销",
  768. },
  769. ],
  770. batchShow: false,
  771. batchForm: {
  772. quantity: "",
  773. batchNo: "",
  774. notReason: "",
  775. isQualified: 1,
  776. notType: "",
  777. },
  778. bacthData: {},
  779. bacthIndex: "",
  780. lossForm: {
  781. batchNo: "",
  782. quantity: "",
  783. unit: "",
  784. isLoss: 1,
  785. },
  786. lossVisible: false,
  787. lossData: {},
  788. lossIndex: "",
  789. };
  790. },
  791. created() {
  792. this.taskTypeName = this.item.currentTaskDiagram.taskTypeName;
  793. this.isFirstTask = this.item.currentTaskDiagram.isFirstTask;
  794. console.log(this.list, "this.list");
  795. this.getSteps();
  796. this.getCompute();
  797. setTimeout(() => {
  798. this.handleInput();
  799. }, 800);
  800. },
  801. methods: {
  802. getSteps() {
  803. getTaskInstanceList(this.item.workOrderId).then((res) => {
  804. res.pop();
  805. this.stepsList = res;
  806. });
  807. },
  808. getCompute() {
  809. getComputeParam(
  810. this.item.workOrderId,
  811. this.item.currentTaskDiagram.taskId
  812. ).then((res) => {
  813. this.paramList = [];
  814. this.paramList = (res && res.paramList) || [];
  815. this.paramObj = res || {};
  816. });
  817. },
  818. handAddParam() {
  819. // billet: null,
  820. // density: null,
  821. // result: null,
  822. // PIPDensity: null,
  823. // volume: null,
  824. // coefficient: null
  825. if (this.isFirstTask == 1) {
  826. this.paramList.push({
  827. taskId: null,
  828. taskName: null,
  829. });
  830. }
  831. },
  832. getDelete(idx) {
  833. this.paramList.splice(idx, 1);
  834. },
  835. changeInp(item, index) {
  836. if (Number(item.billet) && Number(item.density)) {
  837. this.paramList[index].CVIWeight = (
  838. (Number(this.weight) / item.billet) *
  839. item.density
  840. ).toFixed(2);
  841. }
  842. },
  843. paramSave() {
  844. if (this.isFirstTask == 1 && this.paramList.length > 0) {
  845. let bol;
  846. let _i;
  847. bol = this.paramList.every((e, i) => {
  848. _i = i + 1;
  849. return e.taskId && e.billet && e.density;
  850. });
  851. if (!bol) {
  852. uni.showToast({
  853. title: `请完善第${_i}计算数据`,
  854. icon: "none",
  855. });
  856. return false;
  857. }
  858. if (this.paramList.length < 1) {
  859. uni.showToast({
  860. title: `请输入二个以上计算数据`,
  861. icon: "none",
  862. });
  863. return false;
  864. }
  865. }
  866. let param = {};
  867. if (!Object.prototype.hasOwnProperty.call(this.paramObj, "id")) {
  868. param = {
  869. paramList: this.paramList,
  870. workOrderId: this.item.workOrderId,
  871. taskId: this.item.currentTaskDiagram.taskId,
  872. };
  873. } else {
  874. this.paramObj.paramList = this.paramList;
  875. param = this.paramObj;
  876. }
  877. saveParam(param).then((res) => {
  878. uni.showToast({
  879. icon: "none",
  880. title: "操作成功",
  881. });
  882. this.getCompute();
  883. });
  884. },
  885. openNumerate(row, idx) {
  886. if (!row.extInfo.reportWeight) {
  887. uni.showToast({
  888. icon: "none",
  889. title: "请先输入报工重量",
  890. });
  891. return false;
  892. }
  893. this.weight = row.extInfo.weight;
  894. this.reportWeight = row.extInfo.reportWeight;
  895. this.resultIdx = idx;
  896. this.show = true;
  897. },
  898. handleInput() {
  899. let arr = JSON.parse(JSON.stringify(this.list));
  900. this.sumweight(arr);
  901. this.sunTj();
  902. console.log("arr11111112222", this.item);
  903. // console.log('this.list33333',this.list)
  904. },
  905. sumweight(arr) {
  906. // let formedWeight = 0;
  907. // let noFormedWeight = 0;
  908. // arr.map((s, i) => {
  909. // if (s.extInfo.reportWeight) {
  910. // if (s.extInfo.isQualified == 1) {
  911. // formedWeight += s.extInfo.reportWeight * 1;
  912. // } else {
  913. // noFormedWeight += s.extInfo.reportWeight * 1;
  914. // }
  915. // } else {
  916. // s.extInfo.reportWeight = null;
  917. // }
  918. // this.$set(this.list[i].extInfo, "reportWeight", s.extInfo.reportWeight);
  919. // });
  920. // if (this.item.workReportInfo) {
  921. // this.item.workReportInfo.formedWeight = parseFloat(
  922. // formedWeight.toFixed(4)
  923. // );
  924. // this.item.workReportInfo.notFormedWeight = parseFloat(
  925. // noFormedWeight.toFixed(4)
  926. // );
  927. // }
  928. let formedWeight = 0;
  929. let noFormedWeight = 0;
  930. let lossWeight = 0;
  931. arr.map((s, i) => {
  932. if (s.extInfo.reportWeight) {
  933. if (s.extInfo.isQualified == 1 && !s.extInfo.isLoss) {
  934. formedWeight += s.extInfo.reportWeight * 1;
  935. } else if (!s.extInfo.isLoss) {
  936. noFormedWeight += s.extInfo.reportWeight * 1;
  937. } else if (s.extInfo.isLoss == 1) {
  938. lossWeight += s.extInfo.reportWeight * 1;
  939. }
  940. } else {
  941. s.extInfo.reportWeight = null;
  942. }
  943. this.$set(this.list[i].extInfo, "reportWeight", s.extInfo.reportWeight);
  944. });
  945. if (this.item.workReportInfo) {
  946. this.item.workReportInfo.formedWeight = parseFloat(
  947. formedWeight.toFixed(4)
  948. );
  949. this.item.workReportInfo.notFormedWeight = parseFloat(
  950. noFormedWeight.toFixed(4)
  951. );
  952. this.item.workReportInfo.lossWeight = parseFloat(lossWeight.toFixed(4));
  953. }
  954. console.log(this.item.workReportInfo, "this.item.workReportInfo");
  955. },
  956. sunTj() {
  957. if (this.item.workReportInfo && this.item.singleReport == 1) {
  958. this.item.workReportInfo.formedNum = this.newList.filter(
  959. (v) => v.extInfo.isQualified == 1
  960. ).length;
  961. this.item.workReportInfo.notFormedNum = this.newList.filter(
  962. (v) => v.extInfo.isQualified !== 1
  963. ).length;
  964. }
  965. },
  966. openLoss(item, index) {},
  967. cancel() {
  968. this.show = false;
  969. this.reportWeight = 0;
  970. this.weight = 0;
  971. },
  972. taskChange(e) {
  973. console.log(e);
  974. },
  975. getDelete2(idx) {
  976. uni.showModal({
  977. title: "删除",
  978. content: "是否确实删除此物料!",
  979. confirmText: "确认", //这块是确定按钮的文字
  980. success: (rr) => {
  981. if (rr.confirm) {
  982. this.list.splice(idx, 1);
  983. }
  984. if (this.list.length == 0) {
  985. this.$set(this.item.workReportInfo, "formedNum", 0);
  986. this.$set(this.item.workReportInfo, "notFormedNum", 0);
  987. }
  988. this.$forceUpdate();
  989. },
  990. });
  991. },
  992. batchClick(item, index) {
  993. this.batchForm.quantity = "";
  994. this.batchForm.notType = "";
  995. this.batchForm.notReason = "";
  996. this.batchForm.isQualified = 1;
  997. this.bacthData = item;
  998. this.bacthIndex = index;
  999. this.batchForm.batchNo = item.batchNo;
  1000. this.$refs.inputDialog.open();
  1001. },
  1002. deleteBatch(index) {
  1003. uni.showModal({
  1004. title: "删除",
  1005. content: "是否确实删除此物料!",
  1006. confirmText: "确认", //这块是确定按钮的文字
  1007. success: (rr) => {
  1008. this.list.splice(index, 1);
  1009. this.$set(this.item, "product", this.list);
  1010. if (this.list.length == 0) {
  1011. this.$set(this.item.workReportInfo, "formedNum", 0);
  1012. this.$set(this.item.workReportInfo, "notFormedNum", 0);
  1013. }
  1014. this.$forceUpdate();
  1015. },
  1016. });
  1017. },
  1018. handleClose() {
  1019. this.$refs.inputDialog.close();
  1020. this.$refs.lossDialog.close();
  1021. },
  1022. async timeoutCauseConfirm() {
  1023. if (!this.batchForm.quantity) {
  1024. uni.showToast({
  1025. title: "请输入拆批的数量",
  1026. icon: "none",
  1027. });
  1028. return;
  1029. }
  1030. if (this.batchForm.quantity == 0) {
  1031. uni.showToast({
  1032. title: "拆批数不能等于0",
  1033. icon: "none",
  1034. });
  1035. return;
  1036. }
  1037. if (!this.batchForm.quantity) {
  1038. uni.showToast({
  1039. title: "拆批数不能为空",
  1040. icon: "none",
  1041. });
  1042. return;
  1043. }
  1044. if (this.bacthData.extInfo.sourceQuantity < this.batchForm.quantity) {
  1045. uni.showToast({
  1046. title: "拆批数不能大于数量",
  1047. icon: "none",
  1048. });
  1049. return;
  1050. }
  1051. if (this.batchForm.isQualified == 2 && !this.batchForm.notType) {
  1052. uni.showToast({
  1053. title: "请选择不合格类型",
  1054. icon: "none",
  1055. });
  1056. return;
  1057. }
  1058. let dataList = [];
  1059. await splitBatch({
  1060. product: this.bacthData,
  1061. splitQt: Number(this.batchForm.quantity),
  1062. batchNo: this.batchForm.batchNo,
  1063. isQualified: this.batchForm.isQualified,
  1064. notType: this.batchForm.notType,
  1065. notReason: this.batchForm.notReason,
  1066. }).then((res) => {
  1067. res.forEach((item) => {
  1068. dataList.push(this.deepCopy(item));
  1069. });
  1070. this.refreshData(dataList, this.batchForm.quantity);
  1071. });
  1072. // this.$refs.inputDialog.close()
  1073. },
  1074. refreshData(list, feedQuantity) {
  1075. const number =
  1076. Number(this.list[this.bacthIndex].extInfo.sourceQuantity) -
  1077. Number(feedQuantity);
  1078. this.list[this.bacthIndex].extInfo.sourceQuantity = number;
  1079. this.list[this.bacthIndex].feedQuantity = number;
  1080. this.list[this.bacthIndex].extInfo.newWeight =
  1081. (Number(this.list[this.bacthIndex].extInfo.newWeight) * 100000) /
  1082. 100000 -
  1083. (Number(list[0].extInfo.newWeight) * 100000) / 100000;
  1084. list.forEach((item) => {
  1085. item.childBatch = 1;
  1086. });
  1087. let _arr = [...this.list, ...list];
  1088. this.$set(this.list, this.list.length, ...list);
  1089. this.$set(this.item, "product", _arr);
  1090. this.$forceUpdate();
  1091. this.$refs.inputDialog.close();
  1092. },
  1093. openLoss(item, index) {
  1094. this.lossForm.quantity = "";
  1095. this.lossForm.unit = "";
  1096. this.lossForm.batchNo = "";
  1097. this.lossData = item;
  1098. this.lossIndex = index;
  1099. this.lossForm.batchNo = item.batchNo;
  1100. this.lossForm.unit = item.unit;
  1101. this.$refs.lossDialog.open();
  1102. },
  1103. async getLossParam() {
  1104. if (this.lossForm.quantity) {
  1105. if (
  1106. Number(this.lossData.feedQuantity) < Number(this.lossForm.quantity)
  1107. ) {
  1108. this.$message.warning("损耗数不能大于数量");
  1109. return;
  1110. }
  1111. let dataList = [];
  1112. await splitBatch({
  1113. product: this.lossData,
  1114. splitQt: Number(this.lossForm.quantity),
  1115. batchNo: this.lossForm.batchNo,
  1116. isLoss: 1,
  1117. }).then((res) => {
  1118. res.forEach((item) => {
  1119. dataList.push(this.deepCopy(item));
  1120. });
  1121. if (dataList.length != 0) {
  1122. this.refreshLossData(dataList);
  1123. }
  1124. });
  1125. }
  1126. this.$refs.lossDialog.close();
  1127. },
  1128. toInteger(num) {
  1129. const len = this.getDecimalLength(num);
  1130. return {
  1131. int: Math.round(num * Math.pow(10, len)),
  1132. factor: Math.pow(10, len),
  1133. };
  1134. },
  1135. add(a, b) {
  1136. const { int: aInt, factor: aFactor } = this.toInteger(a);
  1137. const { int: bInt, factor: bFactor } = this.toInteger(b);
  1138. const maxFactor = Math.max(aFactor, bFactor);
  1139. return (
  1140. (aInt * (maxFactor / aFactor) + bInt * (maxFactor / bFactor)) /
  1141. maxFactor
  1142. );
  1143. },
  1144. sub(a, b) {
  1145. const { int: aInt, factor: aFactor } = this.toInteger(a);
  1146. const { int: bInt, factor: bFactor } = this.toInteger(b);
  1147. const maxFactor = Math.max(aFactor, bFactor);
  1148. return (
  1149. (aInt * (maxFactor / aFactor) - bInt * (maxFactor / bFactor)) /
  1150. maxFactor
  1151. );
  1152. },
  1153. getDecimalLength(num) {
  1154. return (num.toString().split(".")[1] || "").length;
  1155. },
  1156. refreshLossData(list) {
  1157. const number =
  1158. Number(this.list[this.lossIndex].feedQuantity) -
  1159. Number(this.lossForm.quantity);
  1160. this.list[this.lossIndex].extInfo.sourceQuantity = number;
  1161. this.list[this.lossIndex].feedQuantity = number;
  1162. this.list[this.lossIndex].extInfo.newWeight =
  1163. (Number(this.list[this.lossIndex].extInfo.newWeight) * 100000) /
  1164. 100000 -
  1165. (Number(list[0].extInfo.newWeight) * 100000) / 100000;
  1166. list.forEach((item) => {
  1167. item.childBatch = 1;
  1168. });
  1169. const newList = this.list.filter((item) => item.feedQuantity != 0);
  1170. let _arr = [...newList, ...list];
  1171. this.$set(newList, newList.length, ...list);
  1172. this.$set(this.item, "product", _arr);
  1173. this.$forceUpdate();
  1174. this.$refs.inputDialog.close();
  1175. },
  1176. isChange(val) {
  1177. if (val == "合格") {
  1178. this.batchForm.notType = "";
  1179. this.batchForm.notReason = "";
  1180. }
  1181. },
  1182. deepCopy(obj, hash = new WeakMap()) {
  1183. if (obj === null) return null;
  1184. if (obj instanceof Date) return new Date(obj);
  1185. if (obj instanceof RegExp) return new RegExp(obj);
  1186. if (typeof obj !== "object" && typeof obj !== "function") return obj;
  1187. if (hash.has(obj)) return hash.get(obj);
  1188. const result = Array.isArray(obj) ? [] : {};
  1189. hash.set(obj, result);
  1190. return Object.keys(obj).reduce((acc, key) => {
  1191. acc[key] = this.deepCopy(obj[key], hash);
  1192. return acc;
  1193. }, result);
  1194. },
  1195. save() {
  1196. if (this.isFirstTask == 1) {
  1197. this.resultObj = {};
  1198. if (Number(this.reportWeight) < Number(this.paramList[0].CVIWeight)) {
  1199. this.resultObj = this.paramList[0];
  1200. this.setDataSave();
  1201. return false;
  1202. }
  1203. if (
  1204. Number(this.reportWeight) >=
  1205. this.paramList[this.paramList.length - 1].CVIWeight
  1206. ) {
  1207. this.resultObj = this.paramList[this.paramList.length - 1];
  1208. this.setDataSave();
  1209. return false;
  1210. }
  1211. for (let i = 1; i < this.paramList.length; i++) {
  1212. console.log(i);
  1213. console.log(
  1214. 11,
  1215. Number(this.paramList[i - 1].CVIWeight),
  1216. Number(this.reportWeight)
  1217. );
  1218. if (
  1219. Number(this.paramList[i - 1].CVIWeight) <
  1220. Number(this.reportWeight) &&
  1221. Number(this.reportWeight) < Number(this.paramList[i].CVIWeight)
  1222. ) {
  1223. this.resultObj = this.paramList[i];
  1224. break;
  1225. }
  1226. }
  1227. this.setDataSave();
  1228. }
  1229. },
  1230. setDataSave() {
  1231. this.$set(
  1232. this.list[this.resultIdx].extInfo,
  1233. "taskId",
  1234. this.resultObj.taskId
  1235. );
  1236. this.$set(
  1237. this.list[this.resultIdx].extInfo,
  1238. "density",
  1239. this.resultObj.density
  1240. );
  1241. this.$set(
  1242. this.list[this.resultIdx].extInfo,
  1243. "billet",
  1244. this.resultObj.billet
  1245. );
  1246. this.$set(
  1247. this.list[this.resultIdx].extInfo,
  1248. "taskName",
  1249. this.resultObj.taskName
  1250. );
  1251. this.cancel();
  1252. },
  1253. changeHeatNumber() {
  1254. if (this.deviceList.length != 0) {
  1255. this.deviceList.forEach((f) => {
  1256. this.list.forEach((o) => {
  1257. if (
  1258. o.deviceId &&
  1259. f.instanceId == o.deviceId &&
  1260. this.deviceList.length > 1
  1261. ) {
  1262. o.extInfo.heatNumber = f.extInfo.heatNumber;
  1263. o.deviceId = f.instanceId;
  1264. this.$forceUpdate();
  1265. } else if (this.deviceList.length == 1) {
  1266. o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
  1267. o.deviceId = this.deviceList[0].instanceId;
  1268. this.$forceUpdate();
  1269. } else if (this.deviceList.length > 1) {
  1270. o.extInfo.heatNumber = f.extInfo.heatNumber;
  1271. o.deviceId = f.instanceId;
  1272. this.$forceUpdate();
  1273. }
  1274. });
  1275. });
  1276. }
  1277. },
  1278. },
  1279. };
  1280. </script>
  1281. <style lang="scss" scoped>
  1282. .title_box {
  1283. margin-top: 20rpx;
  1284. .name {
  1285. font-size: 28rpx;
  1286. font-style: normal;
  1287. font-weight: 400;
  1288. color: $theme-color;
  1289. padding-left: 20rpx;
  1290. position: relative;
  1291. &:before {
  1292. position: absolute;
  1293. content: "";
  1294. left: 0rpx;
  1295. top: 0rpx;
  1296. bottom: 0rpx;
  1297. width: 4rpx;
  1298. height: 28rpx;
  1299. background: $theme-color;
  1300. margin: auto;
  1301. }
  1302. }
  1303. .btn_box {
  1304. .btn {
  1305. padding: 0 18rpx;
  1306. height: 50rpx;
  1307. line-height: 50rpx;
  1308. background: $theme-color;
  1309. font-size: 26rpx;
  1310. font-style: normal;
  1311. font-weight: 400;
  1312. font-size: 24rpx;
  1313. color: #fff;
  1314. border-radius: 4rpx;
  1315. margin-left: 24rpx;
  1316. }
  1317. }
  1318. }
  1319. .material {
  1320. margin-top: 16rpx;
  1321. border: 1rpx solid transparent;
  1322. .content_table {
  1323. width: 100%;
  1324. border: 2rpx solid $border-color;
  1325. box-sizing: border-box;
  1326. .item {
  1327. display: flex;
  1328. border-bottom: 2rpx solid $border-color;
  1329. .lable {
  1330. width: 132rpx;
  1331. text-align: center;
  1332. background-color: #f7f9fa;
  1333. font-size: 26rpx;
  1334. border-right: 2rpx solid $border-color;
  1335. flex-shrink: 0;
  1336. }
  1337. .lable150 {
  1338. width: 156rpx !important;
  1339. font-size: 24rpx;
  1340. }
  1341. .lable190 {
  1342. width: 200rpx !important;
  1343. font-size: 24rpx;
  1344. }
  1345. .ww80 {
  1346. width: 80rpx;
  1347. }
  1348. .content {
  1349. width: 518rpx;
  1350. min-height: 64rpx;
  1351. font-size: 28rpx;
  1352. line-height: 28rpx;
  1353. font-style: normal;
  1354. font-weight: 400;
  1355. padding: 18rpx 8rpx;
  1356. box-sizing: border-box;
  1357. word-wrap: break-word;
  1358. flex-grow: 1 !important;
  1359. .unit {
  1360. padding: 0 4rpx;
  1361. font-size: 24rpx;
  1362. color: #404446;
  1363. }
  1364. .penalize {
  1365. width: 160rpx;
  1366. line-height: 60rpx;
  1367. background: $theme-color;
  1368. font-size: 24rpx;
  1369. text-align: center;
  1370. color: #fff;
  1371. }
  1372. }
  1373. .content_H {
  1374. min-height: 92rpx;
  1375. }
  1376. .pd4 {
  1377. padding: 4rpx 8rpx;
  1378. }
  1379. &:last-child {
  1380. border-bottom: none;
  1381. }
  1382. }
  1383. .ww55 {
  1384. width: 55%;
  1385. }
  1386. .ww50 {
  1387. width: 50%;
  1388. }
  1389. .ww45 {
  1390. width: 45%;
  1391. }
  1392. .tag_box {
  1393. padding: 2rpx 10rpx;
  1394. margin-right: 12rpx;
  1395. background: #e6a23c;
  1396. font-size: 22rpx;
  1397. color: #fff;
  1398. border-radius: 4rpx;
  1399. }
  1400. }
  1401. }
  1402. .button-group {
  1403. margin-top: 15px;
  1404. display: flex;
  1405. width: 100%;
  1406. justify-content: space-around;
  1407. }
  1408. .materialBor {
  1409. border: 1rpx solid #157a2c;
  1410. }
  1411. .content_table2 {
  1412. width: 100%;
  1413. .row {
  1414. width: 100%;
  1415. .item {
  1416. color: #404446;
  1417. font-size: 28rpx;
  1418. padding-left: 12rpx;
  1419. }
  1420. .color157 {
  1421. color: $theme-color;
  1422. }
  1423. .ww30 {
  1424. width: 30%;
  1425. }
  1426. .ww20 {
  1427. width: 20%;
  1428. }
  1429. .ww15 {
  1430. width: 15%;
  1431. }
  1432. .ww25 {
  1433. width: 25%;
  1434. }
  1435. .ww50 {
  1436. width: 50%;
  1437. }
  1438. .ww10 {
  1439. width: 10%;
  1440. }
  1441. }
  1442. .head {
  1443. height: 64rpx;
  1444. background: #f7f9fa;
  1445. // border-top: 2rpx solid #E3E5E5;
  1446. border-left: 2rpx solid #e3e5e5;
  1447. box-sizing: border-box;
  1448. .item {
  1449. height: 64rpx;
  1450. line-height: 64rpx;
  1451. border-right: 2rpx solid #e3e5e5;
  1452. box-sizing: border-box;
  1453. font-size: 22rpx;
  1454. }
  1455. }
  1456. .tr {
  1457. border-top: 2rpx solid #e3e5e5;
  1458. border-left: 2rpx solid #e3e5e5;
  1459. .item {
  1460. font-size: 24rpx;
  1461. min-height: 74rpx;
  1462. display: flex;
  1463. align-items: center;
  1464. border-right: 2rpx solid #e3e5e5;
  1465. box-sizing: border-box;
  1466. white-space: normal;
  1467. word-break: break-all;
  1468. }
  1469. &:last-child {
  1470. border-bottom: 2rpx solid #e3e5e5;
  1471. }
  1472. .numerate {
  1473. font-size: 22rpx;
  1474. color: $theme-color;
  1475. }
  1476. }
  1477. }
  1478. .content_num {
  1479. display: flex;
  1480. align-items: center;
  1481. padding: 0 4rpx;
  1482. /deep/ .uni-input-input {
  1483. border: 2rpx solid #f0f8f2;
  1484. background: #f0f8f2;
  1485. color: $theme-color;
  1486. }
  1487. }
  1488. .popup-content {
  1489. @include flex;
  1490. align-items: center;
  1491. justify-content: center;
  1492. flex-direction: column;
  1493. padding: 15px;
  1494. background-color: #fff;
  1495. box-sizing: border-box;
  1496. border-radius: 10px 10px 10px 10px;
  1497. }
  1498. .round {
  1499. width: 32rpx;
  1500. height: 32rpx;
  1501. line-height: 30rpx;
  1502. text-align: center;
  1503. border-radius: 50%;
  1504. background: $theme-color;
  1505. font-size: 24rpx;
  1506. font-style: normal;
  1507. font-weight: 400;
  1508. color: #fff;
  1509. margin-right: 10rpx;
  1510. }
  1511. .popup_box {
  1512. width: 94vw;
  1513. padding: 16rpx 12rpx;
  1514. box-sizing: border-box;
  1515. }
  1516. .operate_box {
  1517. margin-top: 32rpx;
  1518. padding: 10rpx 100rpx;
  1519. /deep/ .u-button {
  1520. width: 160rpx;
  1521. }
  1522. }
  1523. .formula_box {
  1524. font-size: 24rpx;
  1525. font-style: normal;
  1526. font-weight: 400;
  1527. margin-top: 12rpx;
  1528. }
  1529. .reportWeight {
  1530. font-size: 24rpx;
  1531. font-style: normal;
  1532. font-weight: 400;
  1533. margin-top: 30rpx;
  1534. text {
  1535. color: $theme-color;
  1536. }
  1537. }
  1538. ::v-deep .uni-forms-item__label {
  1539. font-size: 12px;
  1540. }
  1541. </style>