batchProductJobBom.vue 46 KB

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