packingBom.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625
  1. <template>
  2. <view>
  3. <view>
  4. <view class="col userInp" style="display: flex; align-items: center">
  5. <text class="label lable150 rx-cc">是否拆包</text>
  6. <text
  7. v-if="objData.isUnpack == '1' || isNewUnpack == 1"
  8. style="
  9. color: green;
  10. font-size: 14px;
  11. font-weight: 700;
  12. margin-left: 15px;
  13. "
  14. >是</text
  15. >
  16. <text
  17. v-else
  18. style="
  19. color: green;
  20. font-size: 14px;
  21. font-weight: 700;
  22. margin-left: 15px;
  23. "
  24. >否</text
  25. >
  26. <u-button
  27. size="small"
  28. class="u-reset-button"
  29. type="primary"
  30. style="margin-left: 40px; width: 80px"
  31. @click="checkUnpack"
  32. v-if="objData.isUnpack != '1'"
  33. >手动拆包</u-button
  34. >
  35. </view>
  36. </view>
  37. <view v-if="objData.isUnpack == '1' && (isNewUnpack == 0 || !isNewUnpack)">
  38. <view class="col userInp" style="display: flex; align-items: center">
  39. <text class="label lable150 rx-cc">规格选择:</text>
  40. <!-- multiple -->
  41. <zxz-uni-data-select
  42. :localdata="localdataList"
  43. v-model="Usertype"
  44. @change="changeUserType"
  45. ></zxz-uni-data-select>
  46. </view>
  47. <view class="col userInp" style="display: flex; align-items: center">
  48. <text class="label lable150 rx-cc">包装选择:</text>
  49. <!-- multiple -->
  50. <zxz-uni-data-select
  51. :localdata="warehouseSpecTypeList"
  52. v-model="warehouseId"
  53. @change="changeWarehouseType"
  54. disabled
  55. ></zxz-uni-data-select>
  56. </view>
  57. <view v-if="warehouseId != 1">
  58. <view v-for="(item, i) in DispositionList" :key="i">
  59. <view class="title_box rx-bc">
  60. <!-- 最小包装单元 -->
  61. <view class="name">{{ item.titel }}</view>
  62. <!-- <view class="btn_box rx-bc" @click="handCancelPacking">
  63. 重置打包
  64. </view> -->
  65. </view>
  66. <view class="material">
  67. <view class="content_table">
  68. <view class="item">
  69. <view class="lable rx-cc">包装总数 </view>
  70. <view class="content content_num">
  71. <input
  72. class="uni-input"
  73. v-model="formedNumLast"
  74. type="number"
  75. disabled
  76. @input="changeinput"
  77. />
  78. <view class="unit">{{ item.packageUnit }}</view>
  79. </view>
  80. </view>
  81. <view class="item rx-sc">
  82. <view class="rx ww55">
  83. <view class="lable lable150 rx-cc">{{ item.titel }}单元</view>
  84. <view class="content content_num">
  85. <input
  86. class="uni-input"
  87. v-model="item.packageCell"
  88. disabled
  89. />
  90. <view style="max-width: 100rpx; font-size: 24rpx">{{
  91. item.packageUnit
  92. }}</view>
  93. </view>
  94. </view>
  95. <view class="rx ww45">
  96. <view class="rx-cc ww80">
  97. /<view style="max-width: 100rpx; font-size: 24rpx">{{
  98. item.conversionUnit
  99. }}</view>
  100. </view>
  101. <view class="content rx-sc">
  102. <!-- <zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key'
  103. format='{Value}' dataKey="Key" filterable :clear='false'></zxz-uni-data-select> -->
  104. <!-- <view class="penalize" @click="handleSplit">确认</view> -->
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="content_table2" v-if="item.splitList.length">
  110. <view class="head row rx-sc">
  111. <view class="item ww10">序号</view>
  112. <view class="item ww15">数量</view>
  113. <view class="item ww20">类型</view>
  114. <view class="item ww20">包装层级</view>
  115. <!-- <view class="item ww20">计量数</view> -->
  116. <view class="item ww40">包装编码</view>
  117. <!-- <view class="item ww10 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
  118. <view class="item ww10" v-if="clientEnvironmentId == 3"></view> -->
  119. </view>
  120. <view class="table">
  121. <u-list
  122. @scrolltolower="scrolltolower"
  123. class="z_list"
  124. style="height: 100% !important"
  125. >
  126. <view
  127. class="tr row rx-sc"
  128. v-for="(it, idx) in item.splitList"
  129. :key="idx"
  130. >
  131. <view class="item ww10 rx-cc">{{ idx + 1 }}</view>
  132. <view class="item ww15 rx-sc">
  133. <view> {{ it.feedQuantity }}</view>
  134. </view>
  135. <view class="item ww20 rx-sc">
  136. <view v-if="it.rootCategoryLevelId == 2">在制品</view>
  137. <view v-else-if="it.rootCategoryLevelId == 23"
  138. >半成品</view
  139. >
  140. <view v-else-if="it.rootCategoryLevelId == 9">产品</view>
  141. <view v-else-if="it.rootCategoryLevelId == 28">废品</view>
  142. <view v-else>{{ "" }}</view>
  143. </view>
  144. <view class="item ww20 rx-cc">
  145. <view v-if="it.packingType == 4">外包装</view>
  146. <view v-else-if="it.packingType == 2">最小包装</view>
  147. <view v-else-if="it.packingType == 3">内包装</view>
  148. <view v-else>计量</view>
  149. </view>
  150. <view class="item ww40">
  151. {{ it.packingCode }}
  152. </view>
  153. </view>
  154. </u-list>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. <SearchPopup mode="center" v-if="show">
  161. <template v-slot:list>
  162. <view class="search_list">
  163. <u-form
  164. labelPosition="left"
  165. :model="formData"
  166. labelWidth="180"
  167. labelAlign="left"
  168. class="baseForm"
  169. >
  170. <u-form-item
  171. label="外包装数:"
  172. class="required-form"
  173. borderBottom
  174. prop="assetType"
  175. >
  176. <input
  177. class="uni-input"
  178. v-model="formData.wPackNum"
  179. style="width: 280rpx"
  180. placeholder="外包装数"
  181. />
  182. / {{ splitList[0].unit }}
  183. </u-form-item>
  184. </u-form>
  185. </view>
  186. </template>
  187. <template v-slot:operate>
  188. <view class="operate_box rx-bc">
  189. <u-button
  190. size="small"
  191. class="u-reset-button"
  192. @click="calculationClose()"
  193. >
  194. 取消
  195. </u-button>
  196. <u-button
  197. type="success"
  198. size="small"
  199. class="u-reset-button"
  200. @click="calculationReset()"
  201. >
  202. 重置
  203. </u-button>
  204. <u-button
  205. type="success"
  206. size="small"
  207. class="u-reset-button"
  208. @click="calculationSave()"
  209. >
  210. 确定
  211. </u-button>
  212. </view>
  213. </template>
  214. </SearchPopup>
  215. </view>
  216. <view v-if="isNewUnpack == 1">
  217. <view class="col userInp" style="display: flex; align-items: center">
  218. <text class="label lable150 rx-cc">规格选择:</text>
  219. <!-- multiple -->
  220. <zxz-uni-data-select
  221. :localdata="localdataList"
  222. v-model="Usertype"
  223. @change="changeUserTypeOne"
  224. ></zxz-uni-data-select>
  225. </view>
  226. <view class="material">
  227. <view class="content_table">
  228. <view class="item">
  229. <view class="lable rx-cc">总数</view>
  230. <view class="content content_num">
  231. <input
  232. class="uni-el-input"
  233. v-model="formedNumLast"
  234. type="number"
  235. @input="changeinput"
  236. disabled
  237. style="width: 200px"
  238. />
  239. {{ packageUnit }}
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. <view v-if="warehouseId != 1">
  245. <view v-for="(item, i) in DispositionList" :key="i">
  246. <view class="title_box rx-bc">
  247. <!-- 最小包装单元 -->
  248. <view class="name">{{ item.titel }}</view>
  249. </view>
  250. <view class="material">
  251. <view class="content_table">
  252. <view class="item rx-sc">
  253. <view class="lable rx-cc lable150">包装总数 </view>
  254. <view class="content content_num">
  255. <input
  256. class="uni-input"
  257. v-model="item.formedNumLast"
  258. type="number"
  259. disabled
  260. @input="changeinput"
  261. />
  262. <view class="unit">{{ item.conversionUnit }}</view>
  263. </view>
  264. </view>
  265. <view class="item rx-sc">
  266. <view class="rx ww55">
  267. <view class="lable lable150 rx-cc">{{ item.titel }}单元</view>
  268. <view class="content content_num">
  269. <input
  270. class="uni-input"
  271. v-model="item.packageCell"
  272. @input="changeInputPack(item, i)"
  273. :disabled="!item.conversionUnit"
  274. />
  275. <view style="max-width: 100rpx; font-size: 24rpx">{{
  276. item.packageUnit
  277. }}</view>
  278. </view>
  279. </view>
  280. <view class="rx ww45">
  281. <view class="rx-cc ww80">
  282. /<view style="max-width: 100rpx; font-size: 24rpx">{{
  283. item.conversionUnit
  284. }}</view>
  285. </view>
  286. </view>
  287. </view>
  288. </view>
  289. </view>
  290. </view>
  291. <view v-for="item in DispositionList" :key="item.id">
  292. <view class="content_table2" v-if="item.splitList.length != 0">
  293. <view class="head row rx-sc">
  294. <view class="item ww10">序号</view>
  295. <view class="item ww15">数量</view>
  296. <view class="item ww20">类型</view>
  297. <view class="item ww20">包装规格</view>
  298. <!-- <view class="item ww20">计量数</view> -->
  299. <view class="item ww40">包装编码</view>
  300. <!-- <view class="item ww10 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
  301. <view class="item ww10" v-if="clientEnvironmentId == 3"></view> -->
  302. </view>
  303. <view class="table">
  304. <u-list
  305. @scrolltolower="scrolltolower"
  306. class="z_list"
  307. style="height: 100% !important"
  308. >
  309. <view
  310. class="tr row rx-sc"
  311. v-for="(it, idx) in item.splitList"
  312. :key="idx"
  313. >
  314. <view class="item ww10 rx-cc">{{ idx + 1 }}</view>
  315. <view class="item ww15 rx-sc">
  316. <view> {{ it.feedQuantity }}</view>
  317. </view>
  318. <view class="item ww20 rx-sc">
  319. <view v-if="it.rootCategoryLevelId == 2">在制品</view>
  320. <view v-else-if="it.rootCategoryLevelId == 23">半成品</view>
  321. <view v-else-if="it.rootCategoryLevelId == 9">产品</view>
  322. <view v-else-if="it.rootCategoryLevelId == 28">废品</view>
  323. <view v-else>{{ "" }}</view>
  324. </view>
  325. <view class="item ww20 rx-cc">
  326. <view>{{ packageDispositionData }}</view>
  327. </view>
  328. <view class="item ww40">
  329. {{ it.packingCode }}
  330. </view>
  331. </view>
  332. </u-list>
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. </view>
  338. <view>
  339. <uni-popup ref="alertDialog" type="dialog">
  340. <uni-popup-dialog
  341. type="warn"
  342. cancelText="取消"
  343. confirmText="确定"
  344. title="提示"
  345. content="此操作将进行拆包, 是否继续?"
  346. @confirm="dialogConfirm"
  347. @close="dialogClose"
  348. ></uni-popup-dialog>
  349. </uni-popup>
  350. </view>
  351. </view>
  352. </template>
  353. <script>
  354. import { getByCode } from "@/api/pda/common.js";
  355. import {
  356. cancelPacking,
  357. packingReport,
  358. getPackingReport,
  359. packingReportRepeat,
  360. packageDisposition,
  361. getPackingReportRepeat,
  362. getPackingList,
  363. } from "@/api/pda/workOrder.js";
  364. import SearchPopup from "../../components/searchPopup.vue";
  365. export default {
  366. components: {
  367. SearchPopup,
  368. },
  369. props: {
  370. categoryId: {
  371. type: String,
  372. default: "",
  373. },
  374. objData: {
  375. type: Object,
  376. default: () => {},
  377. },
  378. taskId: {
  379. type: String,
  380. default: "",
  381. },
  382. workOrderId: {
  383. type: String,
  384. default: "",
  385. },
  386. },
  387. data() {
  388. return {
  389. formedNumLast: 0,
  390. quantity: "",
  391. unit: "",
  392. Usertype: "", // 规格
  393. unitList: [],
  394. resObj: {},
  395. splitList: [],
  396. localdataList: [],
  397. newDispositionList: [],
  398. DispositionListes: [],
  399. withinQuantity: "", //内包装数量
  400. withinUnit: "", //内包装单位
  401. outsideQuantity: "", //外包装数量
  402. outsideUnit: "", //外包装单位
  403. timeout: null,
  404. packUnit: null,
  405. temporaryNum: 0,
  406. temporaryCount: 0,
  407. temporaryList: [],
  408. packTwoList: [],
  409. DispositionList: [],
  410. selectList: [],
  411. text: "",
  412. value: "",
  413. minimumPackage: [], // 最小包装
  414. withinPackage: [], // 内包装
  415. minimumUnit: "",
  416. outsidePackage: [], //外包装
  417. newCategoryId: "",
  418. warehouseId: 2,
  419. warehouseSpecTypeList: [
  420. {
  421. text: "按计量",
  422. value: 1,
  423. },
  424. {
  425. text: "最小包装",
  426. value: 2,
  427. },
  428. {
  429. text: "内包装",
  430. value: 3,
  431. },
  432. {
  433. text: "外包装",
  434. value: 4,
  435. },
  436. ],
  437. isNewUnpack: 0,
  438. packageCell: "",
  439. packageUnit: "",
  440. packageOneCell: "",
  441. packageOneUnit: "",
  442. packageTwoCell: "",
  443. packageTwoUnit: "",
  444. packageDispositionData: "",
  445. show: false,
  446. formData: {
  447. wPackNum: null,
  448. },
  449. clientEnvironmentId:
  450. uni.getStorageSync("userInfo") &&
  451. uni.getStorageSync("userInfo").clientEnvironmentId,
  452. };
  453. },
  454. watch: {
  455. categoryId: {
  456. handler(newVal) {
  457. this.newCategoryId = newVal;
  458. },
  459. deep: true,
  460. immediate: true,
  461. },
  462. objData: {
  463. handler(newVal) {
  464. console.log(newVal, "newVal");
  465. if (newVal.product && newVal.product.length) {
  466. console.log(44444);
  467. // this.formedNumLast =
  468. // newVal.formedNumLast || newVal.product[0].feedQuantity;
  469. this.newCategoryId = newVal.product[0].categoryId;
  470. // this.formedNumLast = newVal.product.reduce((acc, pro) => {
  471. // return pro.extInfo.sourceQuantity
  472. // ? acc + Number(pro.extInfo.sourceQuantity)
  473. // : acc;
  474. // }, 0);
  475. this.formedNumLast = newVal.product.reduce((acc, pro) => {
  476. return pro.feedQuantity &&
  477. (!pro.extInfo.isQualified ||
  478. pro.extInfo.isQualified == 1 ||
  479. pro.extInfo.isQualified == 3) &&
  480. !pro.extInfo.isLoss
  481. ? this.add(acc, Number(pro.feedQuantity))
  482. : acc;
  483. }, 0);
  484. } else if (newVal.semiProductList && newVal.semiProductList.length) {
  485. this.newCategoryId = newVal.semiProductList[0].categoryId;
  486. // this.formedNumLast = newVal.semiProductList.reduce((acc, pro) => {
  487. // return pro.feedQuantity ? acc + Number(pro.feedQuantity) : acc;
  488. // }, 0);
  489. this.formedNumLast = newVal.semiProductList.reduce((acc, pro) => {
  490. return pro.feedQuantity &&
  491. (!pro.extInfo.isQualified ||
  492. pro.extInfo.isQualified == 1 ||
  493. pro.extInfo.isQualified == 3) &&
  494. !pro.extInfo.isLoss
  495. ? this.add(acc, Number(pro.feedQuantity))
  496. : acc;
  497. }, 0);
  498. } else {
  499. this.formedNumLast = 0;
  500. }
  501. if (newVal.isUnpack == "1") {
  502. this.packageDispositionFn();
  503. }
  504. if (newVal.isNewUnpack == 1) {
  505. this.getPackingData();
  506. }
  507. // this.packageDispositionFn();
  508. //
  509. },
  510. deep: true,
  511. immediate: true,
  512. },
  513. },
  514. created() {
  515. // this.formedNumLast = this.objData.product[0].feedQuantity;
  516. console.log(this.objData, "我是阿打啥啊电话");
  517. this.byCode();
  518. // this.getPackingDetails()
  519. // this.getPackingDetailsTwo()
  520. },
  521. methods: {
  522. // 输入数量变化
  523. changeinput(e) {
  524. clearTimeout(this.timeout);
  525. // 设置新的定时器
  526. this.timeout = setTimeout(() => {
  527. this.formedNumLast = e.detail.value;
  528. this.initFn(this.selectList);
  529. }, 500); // 500毫秒后触发
  530. },
  531. changeUserType(e) {
  532. console.log(e);
  533. this.text = e.text;
  534. this.value = e.value;
  535. this.selectList = e.arr;
  536. this.initFn(e.arr);
  537. },
  538. changeUserTypeOne(e) {
  539. this.text = e.text;
  540. this.value = e.value;
  541. this.selectList = e.arr;
  542. this.initFn1(e.arr);
  543. },
  544. groupBy(arr, key) {
  545. return arr.reduce((acc, obj) => {
  546. const groupKey = obj[key];
  547. if (!acc[groupKey]) {
  548. acc[groupKey] = [];
  549. }
  550. console.log();
  551. acc[groupKey].push(obj);
  552. return acc;
  553. }, {});
  554. },
  555. async packageDispositionFn() {
  556. console.log(this.newCategoryId, "555555555555");
  557. let that = this;
  558. const res = await packageDisposition(this.newCategoryId);
  559. if (res.length) {
  560. res.shift();
  561. let data = JSON.parse(JSON.stringify(res));
  562. let list = this.groupBy(data, "code");
  563. this.localdataList = [];
  564. Object.entries(list).forEach(([key, value]) => {
  565. let obj = {
  566. text: value[0].name,
  567. arr: value,
  568. value: key,
  569. };
  570. this.localdataList.push(obj);
  571. });
  572. this.Usertype = this.localdataList[0].value;
  573. this.text = this.localdataList[0].text;
  574. this.value = this.localdataList[0].value;
  575. res.map((v) => {
  576. v.splitList = [];
  577. });
  578. // this.newDispositionList = res;
  579. if (this.warehouseId == 2) {
  580. this.newDispositionList = [res[0]];
  581. } else if (this.warehouseId == 3) {
  582. this.newDispositionList = [res[1]];
  583. } else if (this.warehouseId == 4) {
  584. this.newDispositionList = [res[2]];
  585. }
  586. this.selectList = res;
  587. this.initFn(this.localdataList[0].arr);
  588. // this.listFn(this.localdataList[0].arr);
  589. }
  590. },
  591. initFn(v) {
  592. if (v.length) {
  593. this.withinQuantity = v[1].packageCell; //内包装数量
  594. this.withinUnit = v[1].conversionUnit; //内包装单位
  595. this.outsideQuantity = v[2].packageCell; //外包装数量
  596. this.outsideUnit = v[2].conversionUnit; //外包装单位
  597. this.minimumUnit = v[0].conversionUnit;
  598. }
  599. this.handleSplit(v[0]);
  600. },
  601. async listFn(res) {
  602. let {
  603. minimumPackage,
  604. withinQuantity,
  605. outsidePackage,
  606. outsideQuantity,
  607. withinPackage,
  608. } = res;
  609. // let textList = ["最小包装", "内包装", "外包装"];
  610. // let arr = [
  611. // { list: minimumPackage },
  612. // { list: withinPackage, num: withinQuantity },
  613. // { list: outsidePackage, num: outsideQuantity },
  614. // ];
  615. let textList = [];
  616. let arr = [];
  617. if (this.warehouseId == 2) {
  618. textList.push("最小包装");
  619. arr.push({ list: minimumPackage });
  620. } else if (this.warehouseId == 3) {
  621. textList.push("内包装");
  622. arr.push({ list: withinPackage, num: withinQuantity });
  623. } else if (this.warehouseId == 4) {
  624. textList.push("外包装");
  625. arr.push({ list: outsidePackage, num: outsideQuantity });
  626. }
  627. this.minimumPackage = minimumPackage; // 最小包装
  628. this.withinPackage = withinPackage; // 内包装
  629. this.outsidePackage = outsidePackage; //外包装
  630. // this.newDispositionList.map((v, i) => {
  631. // v.splitList = arr[i].list;
  632. // v.titel = textList[i];
  633. // if (i == 0) {
  634. // v.formedNumLast = this.formedNumLast;
  635. // } else {
  636. // v.formedNumLast = arr[i].num;
  637. // }
  638. // });
  639. this.newDispositionList.map((v, i) => {
  640. v.splitList = arr[0].list;
  641. v.titel = textList[0];
  642. if (i == 0) {
  643. v.formedNumLast = this.formedNumLast;
  644. } else {
  645. v.formedNumLast = arr.num;
  646. }
  647. });
  648. this.$nextTick(() => {
  649. console.log(this.DispositionList, "我是啥来着");
  650. this.$set(this, "DispositionList", this.newDispositionList);
  651. });
  652. },
  653. sunNum(v, i) {
  654. let _this = this;
  655. this.$nextTick(() => {
  656. switch (i) {
  657. case 0:
  658. console.log(_this.formedNumLast);
  659. return _this.formedNumLast;
  660. case 1:
  661. return v.splitList.length || 0;
  662. case 2:
  663. return v.splitList.length || 0;
  664. }
  665. });
  666. },
  667. byCode() {
  668. getByCode("packing_unit").then((res) => {
  669. this.unitList = [];
  670. res.forEach((obj, index) => {
  671. for (let key in obj) {
  672. if (obj.hasOwnProperty(key)) {
  673. // 确保key是对象自身的属性
  674. this.unitList.push({
  675. Key: `${key}`,
  676. Value: ` ${obj[key]}`,
  677. });
  678. }
  679. }
  680. });
  681. });
  682. },
  683. getPackingDetails() {
  684. let param = {
  685. workOrderId: this.workOrderId,
  686. taskId: this.taskId,
  687. tier: 1,
  688. };
  689. getPackingReport(param).then((res) => {
  690. this.splitList = res.detailList;
  691. this.formedNumLast = res.totalQuantity;
  692. this.quantity = res.quantity;
  693. this.unit = res.unit;
  694. });
  695. },
  696. handCancelPacking() {
  697. uni.showModal({
  698. title: `是否清空包装?`,
  699. content: "",
  700. confirmText: "确认",
  701. success: () => {
  702. let param = {
  703. workOrderId: this.workOrderId,
  704. taskId: this.taskId,
  705. };
  706. cancelPacking(param).then((res) => {
  707. this.getPackingDetails();
  708. this.getPackingDetailsTwo();
  709. });
  710. },
  711. });
  712. },
  713. // 第一次调用
  714. handleSplit(v) {
  715. if (this.splitList.length) {
  716. uni.showToast({
  717. title: "产品已分包",
  718. icon: "none",
  719. });
  720. return false;
  721. }
  722. // if (!this.formedNumLast) {
  723. // uni.showToast({
  724. // title: '包装总数数量不能为空',
  725. // icon: 'none'
  726. // })
  727. // return false
  728. // }
  729. if (!v.packageCell) {
  730. uni.showToast({
  731. title: "内包装单元数量不能为空",
  732. icon: "none",
  733. });
  734. return false;
  735. }
  736. if (!v.packageUnit) {
  737. uni.showToast({
  738. title: "请选择包装单位",
  739. icon: "none",
  740. });
  741. return false;
  742. }
  743. let param = {
  744. workOrderId: this.workOrderId, //工单id
  745. taskId: this.taskId,
  746. tier: this.warehouseId,
  747. totalQuantity: this.formedNumLast, //总数量
  748. quantity: v.packageCell, //数量
  749. unit: v.packageUnit, //单位
  750. minimumUnit: this.minimumUnit, //最小包装单位
  751. withinQuantity: this.withinQuantity, //内包装数量
  752. withinUnit: this.withinUnit, //内包装单位
  753. outsideQuantity: this.outsideQuantity, //外包装数量
  754. outsideUnit: this.outsideUnit, //外包装单位
  755. packageUnit: v.conversionUnit,
  756. };
  757. // packingReport(param).then((res) => {
  758. // this.listFn(res);
  759. // });
  760. if (this.warehouseId != 1) {
  761. getPackingList(param).then((res) => {
  762. this.listFn(res);
  763. });
  764. }
  765. // getPackingList(param).then((res) => {
  766. // this.listFn(res);
  767. // });
  768. },
  769. handleCheck(idx, it) {
  770. if (it.quantity <= 0) {
  771. uni.showToast({
  772. icon: "none",
  773. title: "数量为空不能勾选",
  774. });
  775. return false;
  776. }
  777. this.$set(this.splitList[idx], "check", it.check ? 0 : 1);
  778. this.temporaryList = [];
  779. this.temporaryList = this.splitList.filter((e) => {
  780. return e.check == 1;
  781. });
  782. this.temporaryNum = 0;
  783. this.temporaryCount = 0;
  784. if (this.temporaryList.length > 0) {
  785. this.temporaryList.forEach((e) => {
  786. this.temporaryNum = this.temporaryNum + 1;
  787. this.temporaryCount = this.temporaryCount + Number(e.quantity);
  788. });
  789. }
  790. },
  791. handclose(it) {
  792. this.splitList.forEach((f) => {
  793. if (f.computeSize == it.computeSize) {
  794. f.check = 0;
  795. }
  796. });
  797. this.temporaryList = [];
  798. this.temporaryList = this.splitList.filter((e) => {
  799. return e.check == 1;
  800. });
  801. },
  802. getPackingDetailsTwo(v) {
  803. console.log(v);
  804. let param = {
  805. totalQuantity: v.formedNumLast,
  806. quantity: v.packageCell,
  807. unit: v.conversionUnit,
  808. workOrderId: this.workOrderId,
  809. taskId: this.taskId,
  810. tier: 2,
  811. };
  812. getPackingReportRepeat(param).then((res) => {
  813. resolve(res.detailList);
  814. });
  815. },
  816. handlePack(v, s) {
  817. let _arr = [];
  818. _arr = s.map((m) => {
  819. return {
  820. ...m,
  821. isChecked: 1,
  822. };
  823. });
  824. console.log(_arr, "123");
  825. let param = {
  826. detailList: _arr,
  827. quantity: v.temporaryCount,
  828. totalQuantity: v.formedNumLast,
  829. unit: v.packageUnit,
  830. taskId: this.taskId,
  831. workOrderId: this.workOrderId,
  832. tier: 2,
  833. };
  834. return new Promise((resolve, reject) => {
  835. packingReportRepeat(param).then((res) => {
  836. console.log(res);
  837. // this.temporaryList = []
  838. this.getPackingDetails();
  839. // this.getPackingDetailsTwo()
  840. });
  841. });
  842. },
  843. scrolltolower() {},
  844. getData() {
  845. let _packingReportMarginList = [];
  846. _packingReportMarginList = this.splitList.filter((e) => {
  847. return !e.parentId;
  848. });
  849. let packInfo = {};
  850. if (this.isNewUnpack == 1) {
  851. if (this.DispositionList && this.DispositionList.length != 0) {
  852. packInfo = {
  853. // this.DispositionList[0]
  854. specText: this.text,
  855. specValue: this.value,
  856. minimumPackage: this.minimumPackage, // 最小包装
  857. withinPackage: this.withinPackage,
  858. outsidePackage: this.outsidePackage,
  859. tier: this.warehouseId,
  860. isUnpack: this.objData.isUnpack,
  861. packageUnit: this.packageUnit,
  862. formedNumLast: this.formedNumLast,
  863. minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
  864. minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
  865. minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
  866. minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
  867. withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
  868. withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
  869. withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
  870. withinFormedNumLast: this.DispositionList[1].formedNumLast, // 总包装数量
  871. outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
  872. outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
  873. outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
  874. outsideFormedNumLast: this.DispositionList[2].formedNumLast,
  875. isNewUnpack: this.isNewUnpack,
  876. };
  877. } else {
  878. packInfo = {
  879. isUnpack: this.objData.isUnpack,
  880. };
  881. }
  882. } else {
  883. if (this.warehouseId == 2) {
  884. packInfo = {
  885. // this.DispositionList[0]
  886. specText: this.text,
  887. specValue: this.value,
  888. minimumPackage: this.minimumPackage, // 最小包装
  889. tier: this.warehouseId,
  890. minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
  891. minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
  892. minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
  893. minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
  894. };
  895. } else if (this.warehouseId == 3) {
  896. packInfo = {
  897. specText: this.text,
  898. specValue: this.value,
  899. withinPackage: this.withinPackage, // 内包装
  900. tier: this.warehouseId,
  901. withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
  902. withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
  903. withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
  904. withinFormedNumLast: this.DispositionList[1].formedNumLast,
  905. }; // 总包装数量
  906. } else if (this.warehouseId == 4) {
  907. packInfo = {
  908. specText: this.text,
  909. specValue: this.value,
  910. outsidePackage: this.outsidePackage, //外包装
  911. tier: this.warehouseId,
  912. outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
  913. outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
  914. outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
  915. outsideFormedNumLast: this.DispositionList[2].formedNumLast,
  916. }; // 总包装数量
  917. }
  918. }
  919. return packInfo;
  920. },
  921. calculation() {
  922. this.show = true;
  923. },
  924. calculationSave() {
  925. let count = this.splitList.filter((item) => item.isChecked != 1).length;
  926. if (this.formData.wPackNum <= count && count != 0) {
  927. for (let i = 0; i < this.formData.wPackNum; i++) {
  928. this.splitList[i].check = 1;
  929. }
  930. this.handleCheck(0, 0);
  931. this.calculationClose();
  932. } else {
  933. if (count != 0) {
  934. for (let i = 0; i < count; i++) {
  935. this.splitList[i].check = 1;
  936. }
  937. this.handleCheck(0, 0);
  938. this.calculationClose();
  939. }
  940. uni.showToast({
  941. icon: "none",
  942. title: "外包装数超出内包装条数",
  943. });
  944. }
  945. },
  946. calculationClose() {
  947. this.show = false;
  948. },
  949. calculationReset() {
  950. this.formData.wPackNum = null;
  951. this.splitList.forEach((f) => {
  952. f.check = null;
  953. });
  954. this.temporaryList = [];
  955. this.show = false;
  956. },
  957. changeWarehouseType() {
  958. this.packageDispositionFn();
  959. },
  960. checkUnpack() {
  961. this.$refs.alertDialog.open();
  962. },
  963. dialogConfirm() {
  964. this.isNewUnpack = 1;
  965. this.getPackingData();
  966. },
  967. async getPackingData() {
  968. console.log(this.newCategoryId, "555555555555");
  969. let that = this;
  970. const res = await packageDisposition(this.newCategoryId);
  971. if (res.length) {
  972. res.shift();
  973. let data = JSON.parse(JSON.stringify(res));
  974. let list = this.groupBy(data, "code");
  975. this.localdataList = [];
  976. Object.entries(list).forEach(([key, value]) => {
  977. let obj = {
  978. text: value[0].name,
  979. arr: value,
  980. value: key,
  981. };
  982. this.localdataList.push(obj);
  983. });
  984. this.Usertype = this.localdataList[0].value;
  985. this.text = this.localdataList[0].text;
  986. this.value = this.localdataList[0].value;
  987. res.map((v) => {
  988. v.splitList = [];
  989. });
  990. // this.newDispositionList = res;
  991. this.DispositionListes = res;
  992. this.selectList = res;
  993. this.initFn1(this.localdataList[0].arr);
  994. }
  995. },
  996. initFn1(v) {
  997. if (v.length) {
  998. this.withinQuantity = v[1].packageCell; //内包装数量
  999. this.withinUnit = v[1].conversionUnit; //内包装单位
  1000. this.outsideQuantity = v[2].packageCell; //外包装数量
  1001. this.outsideUnit = v[2].conversionUnit; //外包装单位
  1002. this.minimumUnit = v[0].conversionUnit;
  1003. }
  1004. this.handleSplit1(v[0]);
  1005. },
  1006. handleSplit1(v) {
  1007. if (this.splitList.length) {
  1008. uni.showToast({
  1009. title: "产品已分包",
  1010. icon: "none",
  1011. });
  1012. return false;
  1013. }
  1014. if (!v.packageCell) {
  1015. uni.showToast({
  1016. title: "内包装单元数量不能为空",
  1017. icon: "none",
  1018. });
  1019. return false;
  1020. }
  1021. if (!v.packageUnit) {
  1022. uni.showToast({
  1023. title: "请选择包装单位",
  1024. icon: "none",
  1025. });
  1026. return false;
  1027. }
  1028. this.packageCell = this.formedNumLast;
  1029. this.packageUnit = v.packageUnit;
  1030. let param = {
  1031. workOrderId: this.workOrderId, //工单id
  1032. taskId: this.taskId,
  1033. tier: this.warehouseId,
  1034. totalQuantity: this.formedNumLast, //总数量
  1035. quantity: v.packageCell, //数量
  1036. unit: v.packageUnit, //单位
  1037. minimumUnit: this.minimumUnit, //最小包装单位
  1038. withinQuantity: this.withinQuantity, //内包装数量
  1039. withinUnit: this.withinUnit, //内包装单位
  1040. outsideQuantity: this.outsideQuantity, //外包装数量
  1041. outsideUnit: this.outsideUnit, //外包装单位
  1042. packageUnit: v.conversionUnit,
  1043. isNewUnpack: this.isNewUnpack,
  1044. };
  1045. if (this.warehouseId != 1) {
  1046. getPackingList(param).then((res) => {
  1047. this.listFn1(res);
  1048. });
  1049. }
  1050. },
  1051. toInteger(num) {
  1052. const len = this.getDecimalLength(num);
  1053. return {
  1054. int: Math.round(num * Math.pow(10, len)),
  1055. factor: Math.pow(10, len),
  1056. };
  1057. },
  1058. add(a, b) {
  1059. const { int: aInt, factor: aFactor } = this.toInteger(a);
  1060. const { int: bInt, factor: bFactor } = this.toInteger(b);
  1061. const maxFactor = Math.max(aFactor, bFactor);
  1062. return (
  1063. (aInt * (maxFactor / aFactor) + bInt * (maxFactor / bFactor)) /
  1064. maxFactor
  1065. );
  1066. },
  1067. sub(a, b) {
  1068. const { int: aInt, factor: aFactor } = this.toInteger(a);
  1069. const { int: bInt, factor: bFactor } = this.toInteger(b);
  1070. const maxFactor = Math.max(aFactor, bFactor);
  1071. return (
  1072. (aInt * (maxFactor / aFactor) - bInt * (maxFactor / bFactor)) /
  1073. maxFactor
  1074. );
  1075. },
  1076. getDecimalLength(num) {
  1077. return (num.toString().split(".")[1] || "").length;
  1078. },
  1079. async listFn1(res) {
  1080. let {
  1081. minimumPackage,
  1082. withinQuantity,
  1083. outsidePackage,
  1084. outsideQuantity,
  1085. withinPackage,
  1086. minimumQuantity,
  1087. } = res;
  1088. let textList = ["最小包装", "内包装", "外包装"];
  1089. let arr = [
  1090. { list: minimumPackage, num: minimumQuantity },
  1091. { list: withinPackage, num: withinQuantity },
  1092. { list: outsidePackage, num: outsideQuantity },
  1093. ];
  1094. this.minimumPackage = minimumPackage; // 最小包装
  1095. this.withinPackage = withinPackage; // 内包装
  1096. this.outsidePackage = outsidePackage; //外包装
  1097. this.newDispositionList = this.DispositionListes.filter(
  1098. (it) => it.code == this.Usertype && it.sort != "0"
  1099. );
  1100. this.newDispositionList.map((v, i) => {
  1101. v.splitList = arr[i].list;
  1102. v.titel = textList[i];
  1103. // if (i == 0) {
  1104. // v.formedNumLast = this.formedNumLast;
  1105. // } else {
  1106. v.formedNumLast = arr[i].num;
  1107. // }
  1108. });
  1109. this.$nextTick(() => {
  1110. this.newDispositionList.forEach((item, index) => {
  1111. if (index == 0) {
  1112. this.packageCell = item.formedNumLast ? item.formedNumLast : "";
  1113. this.packageUnit = item.packageUnit ? item.packageUnit : "";
  1114. this.conversionUnit = item.conversionUnit
  1115. ? item.conversionUnit
  1116. : "";
  1117. } else if (index == 1) {
  1118. this.packageOneCell = item.formedNumLast ? item.formedNumLast : "";
  1119. this.packageOneUnit = item.packageUnit ? item.packageUnit : "";
  1120. this.conversionOneUnit = item.conversionUnit
  1121. ? item.conversionUnit
  1122. : "";
  1123. } else if (index == 2) {
  1124. this.packageTwoCell = item.formedNumLast ? item.formedNumLast : "";
  1125. this.packageTwoUnit = item.packageUnit ? item.packageUnit : "";
  1126. this.conversionTwoUnit = item.conversionUnit
  1127. ? item.conversionUnit
  1128. : "";
  1129. }
  1130. });
  1131. this.packageDispositionData = `${this.formedNumLast}${this.packageUnit}/${this.packageCell}${this.conversionUnit}/${this.packageOneCell}${this.conversionOneUnit}/${this.packageTwoCell}${this.conversionTwoUnit}`;
  1132. this.newDispositionList.forEach((item, index) => {
  1133. if (item.splitList.length != 0) {
  1134. item.splitList[0].extInfo.packageDisposition =
  1135. this.packageDispositionData;
  1136. if (index == 0) {
  1137. this.warehouseId = 2;
  1138. } else if (index == 1) {
  1139. this.warehouseId = 3;
  1140. } else if (index == 2) {
  1141. this.warehouseId = 4;
  1142. }
  1143. }
  1144. });
  1145. this.$set(this, "DispositionList", this.newDispositionList);
  1146. this.$forceUpdate();
  1147. });
  1148. },
  1149. changeInputPack(item, index) {
  1150. setTimeout(() => {
  1151. if (this.DispositionList[index]) {
  1152. if (!this.DispositionList[index].packageCell) {
  1153. if (index <= this.DispositionList.length - 1) {
  1154. this.DispositionList[index].formedNumLast = "";
  1155. if (index + 1 <= this.DispositionList.length - 1) {
  1156. this.DispositionList[index + 1].formedNumLast = "";
  1157. }
  1158. if (index + 2 <= this.DispositionList.length - 1) {
  1159. this.DispositionList[index + 2].formedNumLast = "";
  1160. }
  1161. }
  1162. this.newDispositionList.forEach((item, index) => {
  1163. if (index == 0) {
  1164. this.packageCell = item.formedNumLast ? item.formedNumLast : "";
  1165. this.packageUnit = item.packageUnit ? item.packageUnit : "";
  1166. this.conversionUnit = item.conversionUnit
  1167. ? item.conversionUnit
  1168. : "";
  1169. } else if (index == 1) {
  1170. this.packageOneCell = item.formedNumLast
  1171. ? item.formedNumLast
  1172. : "";
  1173. this.packageOneUnit = item.packageUnit ? item.packageUnit : "";
  1174. this.conversionOneUnit = item.conversionUnit
  1175. ? item.conversionUnit
  1176. : "";
  1177. } else if (index == 2) {
  1178. this.packageTwoCell = item.formedNumLast
  1179. ? item.formedNumLast
  1180. : "";
  1181. this.packageTwoUnit = item.packageUnit ? item.packageUnit : "";
  1182. this.conversionTwoUnit = item.conversionUnit
  1183. ? item.conversionUnit
  1184. : "";
  1185. }
  1186. });
  1187. this.packageDispositionData = `${this.formedNumLast}${this.packageUnit}/${this.packageCell}${this.conversionUnit}/${this.packageOneCell}${this.conversionOneUnit}/${this.packageTwoCell}${this.conversionTwoUnit}`;
  1188. this.DispositionList.forEach((item, index) => {
  1189. if (item.splitList.length != 0) {
  1190. this.DispositionList[
  1191. index
  1192. ].splitList[0].extInfo.packageDisposition =
  1193. this.packageDispositionData;
  1194. }
  1195. });
  1196. this.$forceUpdate();
  1197. return;
  1198. }
  1199. }
  1200. if (this.DispositionList[index]) {
  1201. if (this.DispositionList[index].titel == "最小包装") {
  1202. if (
  1203. this.DispositionList[index].formedNumLast &&
  1204. Number(this.DispositionList[index].packageCell) >
  1205. Number(this.formedNumLast)
  1206. ) {
  1207. this.DispositionList[index].packageCell = Number(
  1208. this.formedNumLast
  1209. );
  1210. }
  1211. } else if (this.DispositionList[index].titel == "内包装") {
  1212. if (
  1213. this.DispositionList[index - 1].formedNumLast &&
  1214. Number(this.DispositionList[index].packageCell) >
  1215. Number(this.DispositionList[index - 1].formedNumLast)
  1216. ) {
  1217. this.DispositionList[index].packageCell = Number(
  1218. this.DispositionList[index - 1].formedNumLast
  1219. );
  1220. }
  1221. } else if (this.DispositionList[index].titel == "外包装") {
  1222. if (
  1223. this.DispositionList[index - 1].formedNumLast &&
  1224. Number(this.DispositionList[index].packageCell) >
  1225. Number(this.DispositionList[index - 1].formedNumLast)
  1226. ) {
  1227. this.DispositionList[index].packageCell = Number(
  1228. this.DispositionList[index - 1].formedNumLast
  1229. );
  1230. }
  1231. }
  1232. }
  1233. console.log(this.DispositionList, "返回的数据");
  1234. this.initFn1(this.DispositionList);
  1235. }, 500);
  1236. },
  1237. dialogClose() {
  1238. console.log("窗口关闭了");
  1239. },
  1240. deepCopy(obj, hash = new WeakMap()) {
  1241. if (obj === null) return null;
  1242. if (obj instanceof Date) return new Date(obj);
  1243. if (obj instanceof RegExp) return new RegExp(obj);
  1244. if (typeof obj !== "object" && typeof obj !== "function") return obj;
  1245. if (hash.has(obj)) return hash.get(obj); // 处理循环引用
  1246. const result = Array.isArray(obj) ? [] : {};
  1247. hash.set(obj, result); // 存储原始对象和其副本的映射关系
  1248. return Object.keys(obj).reduce((acc, key) => {
  1249. acc[key] = this.deepCopy(obj[key], hash);
  1250. return acc;
  1251. }, result);
  1252. },
  1253. },
  1254. };
  1255. </script>
  1256. <style lang="scss" scoped>
  1257. .title_box {
  1258. margin-top: 20rpx;
  1259. .ww20 {
  1260. width: 20%;
  1261. }
  1262. .name {
  1263. font-size: 28rpx;
  1264. font-style: normal;
  1265. font-weight: 400;
  1266. color: $theme-color;
  1267. padding-left: 20rpx;
  1268. position: relative;
  1269. &:before {
  1270. position: absolute;
  1271. content: "";
  1272. left: 0rpx;
  1273. top: 0rpx;
  1274. bottom: 0rpx;
  1275. width: 4rpx;
  1276. height: 28rpx;
  1277. background: $theme-color;
  1278. margin: auto;
  1279. }
  1280. }
  1281. .btn_box {
  1282. color: $theme-color;
  1283. }
  1284. }
  1285. .material {
  1286. margin-top: 10rpx;
  1287. .content_table {
  1288. width: 100%;
  1289. border: 2rpx solid $border-color;
  1290. .item {
  1291. display: flex;
  1292. border-bottom: 2rpx solid $border-color;
  1293. .lable {
  1294. width: 132rpx;
  1295. text-align: center;
  1296. background-color: #f7f9fa;
  1297. font-size: 26rpx;
  1298. border-right: 2rpx solid $border-color;
  1299. flex-shrink: 0;
  1300. }
  1301. .lable220 {
  1302. width: 220rpx !important;
  1303. font-size: 24rpx;
  1304. }
  1305. .lable150 {
  1306. width: 156rpx !important;
  1307. font-size: 24rpx;
  1308. }
  1309. .ww80 {
  1310. width: 80rpx;
  1311. }
  1312. .content {
  1313. width: 518rpx;
  1314. min-height: 64rpx;
  1315. font-size: 28rpx;
  1316. line-height: 28rpx;
  1317. font-style: normal;
  1318. font-weight: 400;
  1319. // padding: 18rpx 8rpx;
  1320. box-sizing: border-box;
  1321. word-wrap: break-word;
  1322. flex-grow: 1 !important;
  1323. .unit {
  1324. padding: 0 4rpx;
  1325. font-size: 24rpx;
  1326. color: #404446;
  1327. }
  1328. }
  1329. &:last-child {
  1330. border-bottom: none;
  1331. }
  1332. }
  1333. .ww55 {
  1334. width: 55%;
  1335. }
  1336. .ww45 {
  1337. width: 45%;
  1338. }
  1339. }
  1340. }
  1341. .content_table2 {
  1342. width: 100%;
  1343. margin-top: 16rpx;
  1344. .row {
  1345. width: 100%;
  1346. .item {
  1347. color: #404446;
  1348. font-size: 28rpx;
  1349. padding-left: 12rpx;
  1350. }
  1351. .color157 {
  1352. color: $theme-color;
  1353. }
  1354. .ww30 {
  1355. width: 30%;
  1356. }
  1357. .ww50 {
  1358. width: 50%;
  1359. }
  1360. .ww90 {
  1361. width: 90%;
  1362. }
  1363. .ww15 {
  1364. width: 15%;
  1365. }
  1366. .ww10 {
  1367. width: 10%;
  1368. }
  1369. .ww30 {
  1370. width: 30%;
  1371. }
  1372. .ww20 {
  1373. width: 20%;
  1374. }
  1375. .ww40 {
  1376. width: 40%;
  1377. }
  1378. .jsColor {
  1379. color: $theme-color;
  1380. font-size: 20rpx;
  1381. }
  1382. }
  1383. .head {
  1384. height: 64rpx;
  1385. background: #f7f9fa;
  1386. border-top: 2rpx solid #e3e5e5;
  1387. border-left: 2rpx solid #e3e5e5;
  1388. .item {
  1389. height: 64rpx;
  1390. line-height: 64rpx;
  1391. border-right: 2rpx solid #e3e5e5;
  1392. box-sizing: border-box;
  1393. }
  1394. }
  1395. .tr {
  1396. border-top: 2rpx solid #e3e5e5;
  1397. border-left: 2rpx solid #e3e5e5;
  1398. .item {
  1399. font-size: 24rpx;
  1400. min-height: 64rpx;
  1401. display: flex;
  1402. align-items: center;
  1403. border-right: 2rpx solid #e3e5e5;
  1404. box-sizing: border-box;
  1405. white-space: normal;
  1406. word-break: break-all;
  1407. }
  1408. &:last-child {
  1409. border-bottom: 2rpx solid #e3e5e5;
  1410. }
  1411. }
  1412. }
  1413. .label {
  1414. display: flex;
  1415. height: 70rpx;
  1416. width: 86px !important;
  1417. font-size: 13px;
  1418. align-items: center;
  1419. justify-content: center;
  1420. background-color: #f7f9fa;
  1421. }
  1422. .content_num {
  1423. display: flex;
  1424. align-items: center;
  1425. padding: 0 4rpx;
  1426. /deep/ .uni-input-input {
  1427. border: 2rpx solid #f0f8f2;
  1428. background: #f0f8f2;
  1429. color: $theme-color;
  1430. }
  1431. }
  1432. .penalize {
  1433. width: 86rpx;
  1434. line-height: 60rpx;
  1435. background: $theme-color;
  1436. font-size: 24rpx;
  1437. text-align: center;
  1438. color: #fff;
  1439. }
  1440. .check {
  1441. width: 30rpx;
  1442. height: 30rpx;
  1443. }
  1444. .z_list {
  1445. max-height: 500rpx;
  1446. }
  1447. .search_list {
  1448. min-height: 100rpx;
  1449. width: 80vw;
  1450. /deep/ .baseForm {
  1451. padding: 0 20rpx;
  1452. }
  1453. }
  1454. .operate_box {
  1455. padding: 10rpx 32rpx;
  1456. /deep/ .u-button {
  1457. width: 30%;
  1458. }
  1459. }
  1460. </style>