packingBom.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617
  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="changeUserType"
  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. groupBy(arr, key) {
  539. return arr.reduce((acc, obj) => {
  540. const groupKey = obj[key];
  541. if (!acc[groupKey]) {
  542. acc[groupKey] = [];
  543. }
  544. console.log();
  545. acc[groupKey].push(obj);
  546. return acc;
  547. }, {});
  548. },
  549. async packageDispositionFn() {
  550. console.log(this.newCategoryId, "555555555555");
  551. let that = this;
  552. const res = await packageDisposition(this.newCategoryId);
  553. if (res.length) {
  554. res.shift();
  555. let data = JSON.parse(JSON.stringify(res));
  556. let list = this.groupBy(data, "code");
  557. this.localdataList = [];
  558. Object.entries(list).forEach(([key, value]) => {
  559. let obj = {
  560. text: value[0].name,
  561. arr: value,
  562. value: key,
  563. };
  564. this.localdataList.push(obj);
  565. });
  566. this.Usertype = this.localdataList[0].value;
  567. this.text = this.localdataList[0].text;
  568. this.value = this.localdataList[0].value;
  569. res.map((v) => {
  570. v.splitList = [];
  571. });
  572. // this.newDispositionList = res;
  573. if (this.warehouseId == 2) {
  574. this.newDispositionList = [res[0]];
  575. } else if (this.warehouseId == 3) {
  576. this.newDispositionList = [res[1]];
  577. } else if (this.warehouseId == 4) {
  578. this.newDispositionList = [res[2]];
  579. }
  580. this.selectList = res;
  581. this.initFn(this.localdataList[0].arr);
  582. // this.listFn(this.localdataList[0].arr);
  583. }
  584. },
  585. initFn(v) {
  586. if (v.length) {
  587. this.withinQuantity = v[1].packageCell; //内包装数量
  588. this.withinUnit = v[1].conversionUnit; //内包装单位
  589. this.outsideQuantity = v[2].packageCell; //外包装数量
  590. this.outsideUnit = v[2].conversionUnit; //外包装单位
  591. this.minimumUnit = v[0].conversionUnit;
  592. }
  593. this.handleSplit(v[0]);
  594. },
  595. async listFn(res) {
  596. let {
  597. minimumPackage,
  598. withinQuantity,
  599. outsidePackage,
  600. outsideQuantity,
  601. withinPackage,
  602. } = res;
  603. // let textList = ["最小包装", "内包装", "外包装"];
  604. // let arr = [
  605. // { list: minimumPackage },
  606. // { list: withinPackage, num: withinQuantity },
  607. // { list: outsidePackage, num: outsideQuantity },
  608. // ];
  609. let textList = [];
  610. let arr = [];
  611. if (this.warehouseId == 2) {
  612. textList.push("最小包装");
  613. arr.push({ list: minimumPackage });
  614. } else if (this.warehouseId == 3) {
  615. textList.push("内包装");
  616. arr.push({ list: withinPackage, num: withinQuantity });
  617. } else if (this.warehouseId == 4) {
  618. textList.push("外包装");
  619. arr.push({ list: outsidePackage, num: outsideQuantity });
  620. }
  621. this.minimumPackage = minimumPackage; // 最小包装
  622. this.withinPackage = withinPackage; // 内包装
  623. this.outsidePackage = outsidePackage; //外包装
  624. // this.newDispositionList.map((v, i) => {
  625. // v.splitList = arr[i].list;
  626. // v.titel = textList[i];
  627. // if (i == 0) {
  628. // v.formedNumLast = this.formedNumLast;
  629. // } else {
  630. // v.formedNumLast = arr[i].num;
  631. // }
  632. // });
  633. this.newDispositionList.map((v, i) => {
  634. v.splitList = arr[0].list;
  635. v.titel = textList[0];
  636. if (i == 0) {
  637. v.formedNumLast = this.formedNumLast;
  638. } else {
  639. v.formedNumLast = arr.num;
  640. }
  641. });
  642. this.$nextTick(() => {
  643. console.log(this.DispositionList, "我是啥来着");
  644. this.$set(this, "DispositionList", this.newDispositionList);
  645. });
  646. },
  647. sunNum(v, i) {
  648. let _this = this;
  649. this.$nextTick(() => {
  650. switch (i) {
  651. case 0:
  652. console.log(_this.formedNumLast);
  653. return _this.formedNumLast;
  654. case 1:
  655. return v.splitList.length || 0;
  656. case 2:
  657. return v.splitList.length || 0;
  658. }
  659. });
  660. },
  661. byCode() {
  662. getByCode("packing_unit").then((res) => {
  663. this.unitList = [];
  664. res.forEach((obj, index) => {
  665. for (let key in obj) {
  666. if (obj.hasOwnProperty(key)) {
  667. // 确保key是对象自身的属性
  668. this.unitList.push({
  669. Key: `${key}`,
  670. Value: ` ${obj[key]}`,
  671. });
  672. }
  673. }
  674. });
  675. });
  676. },
  677. getPackingDetails() {
  678. let param = {
  679. workOrderId: this.workOrderId,
  680. taskId: this.taskId,
  681. tier: 1,
  682. };
  683. getPackingReport(param).then((res) => {
  684. this.splitList = res.detailList;
  685. this.formedNumLast = res.totalQuantity;
  686. this.quantity = res.quantity;
  687. this.unit = res.unit;
  688. });
  689. },
  690. handCancelPacking() {
  691. uni.showModal({
  692. title: `是否清空包装?`,
  693. content: "",
  694. confirmText: "确认",
  695. success: () => {
  696. let param = {
  697. workOrderId: this.workOrderId,
  698. taskId: this.taskId,
  699. };
  700. cancelPacking(param).then((res) => {
  701. this.getPackingDetails();
  702. this.getPackingDetailsTwo();
  703. });
  704. },
  705. });
  706. },
  707. // 第一次调用
  708. handleSplit(v) {
  709. if (this.splitList.length) {
  710. uni.showToast({
  711. title: "产品已分包",
  712. icon: "none",
  713. });
  714. return false;
  715. }
  716. // if (!this.formedNumLast) {
  717. // uni.showToast({
  718. // title: '包装总数数量不能为空',
  719. // icon: 'none'
  720. // })
  721. // return false
  722. // }
  723. if (!v.packageCell) {
  724. uni.showToast({
  725. title: "内包装单元数量不能为空",
  726. icon: "none",
  727. });
  728. return false;
  729. }
  730. if (!v.packageUnit) {
  731. uni.showToast({
  732. title: "请选择包装单位",
  733. icon: "none",
  734. });
  735. return false;
  736. }
  737. let param = {
  738. workOrderId: this.workOrderId, //工单id
  739. taskId: this.taskId,
  740. tier: this.warehouseId,
  741. totalQuantity: this.formedNumLast, //总数量
  742. quantity: v.packageCell, //数量
  743. unit: v.packageUnit, //单位
  744. minimumUnit: this.minimumUnit, //最小包装单位
  745. withinQuantity: this.withinQuantity, //内包装数量
  746. withinUnit: this.withinUnit, //内包装单位
  747. outsideQuantity: this.outsideQuantity, //外包装数量
  748. outsideUnit: this.outsideUnit, //外包装单位
  749. packageUnit: v.conversionUnit,
  750. };
  751. // packingReport(param).then((res) => {
  752. // this.listFn(res);
  753. // });
  754. if (this.warehouseId != 1) {
  755. getPackingList(param).then((res) => {
  756. this.listFn(res);
  757. });
  758. }
  759. // getPackingList(param).then((res) => {
  760. // this.listFn(res);
  761. // });
  762. },
  763. handleCheck(idx, it) {
  764. if (it.quantity <= 0) {
  765. uni.showToast({
  766. icon: "none",
  767. title: "数量为空不能勾选",
  768. });
  769. return false;
  770. }
  771. this.$set(this.splitList[idx], "check", it.check ? 0 : 1);
  772. this.temporaryList = [];
  773. this.temporaryList = this.splitList.filter((e) => {
  774. return e.check == 1;
  775. });
  776. this.temporaryNum = 0;
  777. this.temporaryCount = 0;
  778. if (this.temporaryList.length > 0) {
  779. this.temporaryList.forEach((e) => {
  780. this.temporaryNum = this.temporaryNum + 1;
  781. this.temporaryCount = this.temporaryCount + Number(e.quantity);
  782. });
  783. }
  784. },
  785. handclose(it) {
  786. this.splitList.forEach((f) => {
  787. if (f.computeSize == it.computeSize) {
  788. f.check = 0;
  789. }
  790. });
  791. this.temporaryList = [];
  792. this.temporaryList = this.splitList.filter((e) => {
  793. return e.check == 1;
  794. });
  795. },
  796. getPackingDetailsTwo(v) {
  797. console.log(v);
  798. let param = {
  799. totalQuantity: v.formedNumLast,
  800. quantity: v.packageCell,
  801. unit: v.conversionUnit,
  802. workOrderId: this.workOrderId,
  803. taskId: this.taskId,
  804. tier: 2,
  805. };
  806. getPackingReportRepeat(param).then((res) => {
  807. resolve(res.detailList);
  808. });
  809. },
  810. handlePack(v, s) {
  811. let _arr = [];
  812. _arr = s.map((m) => {
  813. return {
  814. ...m,
  815. isChecked: 1,
  816. };
  817. });
  818. console.log(_arr, "123");
  819. let param = {
  820. detailList: _arr,
  821. quantity: v.temporaryCount,
  822. totalQuantity: v.formedNumLast,
  823. unit: v.packageUnit,
  824. taskId: this.taskId,
  825. workOrderId: this.workOrderId,
  826. tier: 2,
  827. };
  828. return new Promise((resolve, reject) => {
  829. packingReportRepeat(param).then((res) => {
  830. console.log(res);
  831. // this.temporaryList = []
  832. this.getPackingDetails();
  833. // this.getPackingDetailsTwo()
  834. });
  835. });
  836. },
  837. scrolltolower() {},
  838. getData() {
  839. let _packingReportMarginList = [];
  840. _packingReportMarginList = this.splitList.filter((e) => {
  841. return !e.parentId;
  842. });
  843. let packInfo = {};
  844. if (this.isNewUnpack == 1) {
  845. if (this.DispositionList && this.DispositionList.length != 0) {
  846. packInfo = {
  847. // this.DispositionList[0]
  848. specText: this.text,
  849. specValue: this.value,
  850. minimumPackage: this.minimumPackage, // 最小包装
  851. withinPackage: this.withinPackage,
  852. outsidePackage: this.outsidePackage,
  853. tier: this.warehouseId,
  854. isUnpack: this.objData.isUnpack,
  855. packageUnit: this.packageUnit,
  856. formedNumLast: this.formedNumLast,
  857. minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
  858. minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
  859. minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
  860. minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
  861. withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
  862. withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
  863. withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
  864. withinFormedNumLast: this.DispositionList[1].formedNumLast, // 总包装数量
  865. outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
  866. outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
  867. outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
  868. outsideFormedNumLast: this.DispositionList[2].formedNumLast,
  869. isNewUnpack: this.isNewUnpack,
  870. };
  871. } else {
  872. packInfo = {
  873. isUnpack: this.objData.isUnpack,
  874. };
  875. }
  876. } else {
  877. if (this.warehouseId == 2) {
  878. packInfo = {
  879. // this.DispositionList[0]
  880. specText: this.text,
  881. specValue: this.value,
  882. minimumPackage: this.minimumPackage, // 最小包装
  883. tier: this.warehouseId,
  884. minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
  885. minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
  886. minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
  887. minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
  888. };
  889. } else if (this.warehouseId == 3) {
  890. packInfo = {
  891. specText: this.text,
  892. specValue: this.value,
  893. withinPackage: this.withinPackage, // 内包装
  894. tier: this.warehouseId,
  895. withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
  896. withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
  897. withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
  898. withinFormedNumLast: this.DispositionList[1].formedNumLast,
  899. }; // 总包装数量
  900. } else if (this.warehouseId == 4) {
  901. packInfo = {
  902. specText: this.text,
  903. specValue: this.value,
  904. outsidePackage: this.outsidePackage, //外包装
  905. tier: this.warehouseId,
  906. outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
  907. outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
  908. outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
  909. outsideFormedNumLast: this.DispositionList[2].formedNumLast,
  910. }; // 总包装数量
  911. }
  912. }
  913. return packInfo;
  914. },
  915. calculation() {
  916. this.show = true;
  917. },
  918. calculationSave() {
  919. let count = this.splitList.filter((item) => item.isChecked != 1).length;
  920. if (this.formData.wPackNum <= count && count != 0) {
  921. for (let i = 0; i < this.formData.wPackNum; i++) {
  922. this.splitList[i].check = 1;
  923. }
  924. this.handleCheck(0, 0);
  925. this.calculationClose();
  926. } else {
  927. if (count != 0) {
  928. for (let i = 0; i < count; i++) {
  929. this.splitList[i].check = 1;
  930. }
  931. this.handleCheck(0, 0);
  932. this.calculationClose();
  933. }
  934. uni.showToast({
  935. icon: "none",
  936. title: "外包装数超出内包装条数",
  937. });
  938. }
  939. },
  940. calculationClose() {
  941. this.show = false;
  942. },
  943. calculationReset() {
  944. this.formData.wPackNum = null;
  945. this.splitList.forEach((f) => {
  946. f.check = null;
  947. });
  948. this.temporaryList = [];
  949. this.show = false;
  950. },
  951. changeWarehouseType() {
  952. this.packageDispositionFn();
  953. },
  954. checkUnpack() {
  955. this.$refs.alertDialog.open();
  956. },
  957. dialogConfirm() {
  958. this.isNewUnpack = 1;
  959. this.getPackingData();
  960. },
  961. async getPackingData() {
  962. console.log(this.newCategoryId, "555555555555");
  963. let that = this;
  964. const res = await packageDisposition(this.newCategoryId);
  965. if (res.length) {
  966. res.shift();
  967. let data = JSON.parse(JSON.stringify(res));
  968. let list = this.groupBy(data, "code");
  969. this.localdataList = [];
  970. Object.entries(list).forEach(([key, value]) => {
  971. let obj = {
  972. text: value[0].name,
  973. arr: value,
  974. value: key,
  975. };
  976. this.localdataList.push(obj);
  977. });
  978. this.Usertype = this.localdataList[0].value;
  979. this.text = this.localdataList[0].text;
  980. this.value = this.localdataList[0].value;
  981. res.map((v) => {
  982. v.splitList = [];
  983. });
  984. // this.newDispositionList = res;
  985. this.selectList = res;
  986. this.initFn1(this.localdataList[0].arr);
  987. }
  988. },
  989. initFn1(v) {
  990. if (v.length) {
  991. this.withinQuantity = v[1].packageCell; //内包装数量
  992. this.withinUnit = v[1].conversionUnit; //内包装单位
  993. this.outsideQuantity = v[2].packageCell; //外包装数量
  994. this.outsideUnit = v[2].conversionUnit; //外包装单位
  995. this.minimumUnit = v[0].conversionUnit;
  996. }
  997. this.handleSplit1(v[0]);
  998. },
  999. handleSplit1(v) {
  1000. if (this.splitList.length) {
  1001. uni.showToast({
  1002. title: "产品已分包",
  1003. icon: "none",
  1004. });
  1005. return false;
  1006. }
  1007. if (!v.packageCell) {
  1008. uni.showToast({
  1009. title: "内包装单元数量不能为空",
  1010. icon: "none",
  1011. });
  1012. return false;
  1013. }
  1014. if (!v.packageUnit) {
  1015. uni.showToast({
  1016. title: "请选择包装单位",
  1017. icon: "none",
  1018. });
  1019. return false;
  1020. }
  1021. this.packageCell = this.formedNumLast;
  1022. this.packageUnit = v.packageUnit;
  1023. let param = {
  1024. workOrderId: this.workOrderId, //工单id
  1025. taskId: this.taskId,
  1026. tier: this.warehouseId,
  1027. totalQuantity: this.formedNumLast, //总数量
  1028. quantity: v.packageCell, //数量
  1029. unit: v.packageUnit, //单位
  1030. minimumUnit: this.minimumUnit, //最小包装单位
  1031. withinQuantity: this.withinQuantity, //内包装数量
  1032. withinUnit: this.withinUnit, //内包装单位
  1033. outsideQuantity: this.outsideQuantity, //外包装数量
  1034. outsideUnit: this.outsideUnit, //外包装单位
  1035. packageUnit: v.conversionUnit,
  1036. isNewUnpack: this.isNewUnpack,
  1037. };
  1038. if (this.warehouseId != 1) {
  1039. getPackingList(param).then((res) => {
  1040. this.listFn1(res);
  1041. });
  1042. }
  1043. },
  1044. toInteger(num) {
  1045. const len = this.getDecimalLength(num);
  1046. return {
  1047. int: Math.round(num * Math.pow(10, len)),
  1048. factor: Math.pow(10, len),
  1049. };
  1050. },
  1051. add(a, b) {
  1052. const { int: aInt, factor: aFactor } = this.toInteger(a);
  1053. const { int: bInt, factor: bFactor } = this.toInteger(b);
  1054. const maxFactor = Math.max(aFactor, bFactor);
  1055. return (
  1056. (aInt * (maxFactor / aFactor) + bInt * (maxFactor / bFactor)) /
  1057. maxFactor
  1058. );
  1059. },
  1060. sub(a, b) {
  1061. const { int: aInt, factor: aFactor } = this.toInteger(a);
  1062. const { int: bInt, factor: bFactor } = this.toInteger(b);
  1063. const maxFactor = Math.max(aFactor, bFactor);
  1064. return (
  1065. (aInt * (maxFactor / aFactor) - bInt * (maxFactor / bFactor)) /
  1066. maxFactor
  1067. );
  1068. },
  1069. getDecimalLength(num) {
  1070. return (num.toString().split(".")[1] || "").length;
  1071. },
  1072. async listFn1(res) {
  1073. let {
  1074. minimumPackage,
  1075. withinQuantity,
  1076. outsidePackage,
  1077. outsideQuantity,
  1078. withinPackage,
  1079. minimumQuantity,
  1080. } = res;
  1081. let textList = ["最小包装", "内包装", "外包装"];
  1082. let arr = [
  1083. { list: minimumPackage, num: minimumQuantity },
  1084. { list: withinPackage, num: withinQuantity },
  1085. { list: outsidePackage, num: outsideQuantity },
  1086. ];
  1087. this.minimumPackage = minimumPackage; // 最小包装
  1088. this.withinPackage = withinPackage; // 内包装
  1089. this.outsidePackage = outsidePackage; //外包装
  1090. this.newDispositionList = this.DispositionListes.filter(
  1091. (it) => it.code == this.Usertype && it.sort != "0"
  1092. );
  1093. this.newDispositionList.map((v, i) => {
  1094. v.splitList = arr[i].list;
  1095. v.titel = textList[i];
  1096. // if (i == 0) {
  1097. // v.formedNumLast = this.formedNumLast;
  1098. // } else {
  1099. v.formedNumLast = arr[i].num;
  1100. // }
  1101. });
  1102. this.$nextTick(() => {
  1103. this.newDispositionList.forEach((item, index) => {
  1104. if (index == 0) {
  1105. this.packageCell = item.formedNumLast ? item.formedNumLast : "";
  1106. this.packageUnit = item.packageUnit ? item.packageUnit : "";
  1107. this.conversionUnit = item.conversionUnit
  1108. ? item.conversionUnit
  1109. : "";
  1110. } else if (index == 1) {
  1111. this.packageOneCell = item.formedNumLast ? item.formedNumLast : "";
  1112. this.packageOneUnit = item.packageUnit ? item.packageUnit : "";
  1113. this.conversionOneUnit = item.conversionUnit
  1114. ? item.conversionUnit
  1115. : "";
  1116. } else if (index == 2) {
  1117. this.packageTwoCell = item.formedNumLast ? item.formedNumLast : "";
  1118. this.packageTwoUnit = item.packageUnit ? item.packageUnit : "";
  1119. this.conversionTwoUnit = item.conversionUnit
  1120. ? item.conversionUnit
  1121. : "";
  1122. }
  1123. });
  1124. this.packageDispositionData = `${this.formedNumLast}${this.packageUnit}/${this.packageCell}${this.conversionUnit}/${this.packageOneCell}${this.conversionOneUnit}/${this.packageTwoCell}${this.conversionTwoUnit}`;
  1125. this.newDispositionList.forEach((item, index) => {
  1126. if (item.splitList.length != 0) {
  1127. item.splitList[0].extInfo.packageDisposition =
  1128. this.packageDispositionData;
  1129. if (index == 0) {
  1130. this.warehouseId = 2;
  1131. } else if (index == 1) {
  1132. this.warehouseId = 3;
  1133. } else if (index == 2) {
  1134. this.warehouseId = 4;
  1135. }
  1136. }
  1137. });
  1138. this.$set(this, "DispositionList", this.newDispositionList);
  1139. this.$forceUpdate();
  1140. });
  1141. },
  1142. changeInputPack(item, index) {
  1143. setTimeout(() => {
  1144. if (this.DispositionList[index]) {
  1145. if (!this.DispositionList[index].packageCell) {
  1146. if (index <= this.DispositionList.length - 1) {
  1147. this.DispositionList[index].formedNumLast = "";
  1148. if (index + 1 <= this.DispositionList.length - 1) {
  1149. this.DispositionList[index + 1].formedNumLast = "";
  1150. }
  1151. if (index + 2 <= this.DispositionList.length - 1) {
  1152. this.DispositionList[index + 2].formedNumLast = "";
  1153. }
  1154. }
  1155. this.newDispositionList.forEach((item, index) => {
  1156. if (index == 0) {
  1157. this.packageCell = item.formedNumLast ? item.formedNumLast : "";
  1158. this.packageUnit = item.packageUnit ? item.packageUnit : "";
  1159. this.conversionUnit = item.conversionUnit
  1160. ? item.conversionUnit
  1161. : "";
  1162. } else if (index == 1) {
  1163. this.packageOneCell = item.formedNumLast
  1164. ? item.formedNumLast
  1165. : "";
  1166. this.packageOneUnit = item.packageUnit ? item.packageUnit : "";
  1167. this.conversionOneUnit = item.conversionUnit
  1168. ? item.conversionUnit
  1169. : "";
  1170. } else if (index == 2) {
  1171. this.packageTwoCell = item.formedNumLast
  1172. ? item.formedNumLast
  1173. : "";
  1174. this.packageTwoUnit = item.packageUnit ? item.packageUnit : "";
  1175. this.conversionTwoUnit = item.conversionUnit
  1176. ? item.conversionUnit
  1177. : "";
  1178. }
  1179. });
  1180. this.packageDispositionData = `${this.formedNumLast}${this.packageUnit}/${this.packageCell}${this.conversionUnit}/${this.packageOneCell}${this.conversionOneUnit}/${this.packageTwoCell}${this.conversionTwoUnit}`;
  1181. this.DispositionList.forEach((item, index) => {
  1182. if (item.splitList.length != 0) {
  1183. this.DispositionList[
  1184. index
  1185. ].splitList[0].extInfo.packageDisposition =
  1186. this.packageDispositionData;
  1187. }
  1188. });
  1189. this.$forceUpdate();
  1190. return;
  1191. }
  1192. }
  1193. if (this.DispositionList[index]) {
  1194. if (this.DispositionList[index].titel == "最小包装") {
  1195. if (
  1196. this.DispositionList[index].formedNumLast &&
  1197. Number(this.DispositionList[index].packageCell) >
  1198. Number(this.formedNumLast)
  1199. ) {
  1200. this.DispositionList[index].packageCell = Number(
  1201. this.formedNumLast
  1202. );
  1203. }
  1204. } else if (this.DispositionList[index].titel == "内包装") {
  1205. if (
  1206. this.DispositionList[index - 1].formedNumLast &&
  1207. Number(this.DispositionList[index].packageCell) >
  1208. Number(this.DispositionList[index - 1].formedNumLast)
  1209. ) {
  1210. this.DispositionList[index].packageCell = Number(
  1211. this.DispositionList[index - 1].formedNumLast
  1212. );
  1213. }
  1214. } else if (this.DispositionList[index].titel == "外包装") {
  1215. if (
  1216. this.DispositionList[index - 1].formedNumLast &&
  1217. Number(this.DispositionList[index].packageCell) >
  1218. Number(this.DispositionList[index - 1].formedNumLast)
  1219. ) {
  1220. this.DispositionList[index].packageCell = Number(
  1221. this.DispositionList[index - 1].formedNumLast
  1222. );
  1223. }
  1224. }
  1225. }
  1226. console.log(this.DispositionList, "返回的数据");
  1227. this.initFn1(this.DispositionList);
  1228. }, 500);
  1229. },
  1230. dialogClose() {
  1231. console.log("窗口关闭了");
  1232. },
  1233. deepCopy(obj, hash = new WeakMap()) {
  1234. if (obj === null) return null;
  1235. if (obj instanceof Date) return new Date(obj);
  1236. if (obj instanceof RegExp) return new RegExp(obj);
  1237. if (typeof obj !== "object" && typeof obj !== "function") return obj;
  1238. if (hash.has(obj)) return hash.get(obj); // 处理循环引用
  1239. const result = Array.isArray(obj) ? [] : {};
  1240. hash.set(obj, result); // 存储原始对象和其副本的映射关系
  1241. return Object.keys(obj).reduce((acc, key) => {
  1242. acc[key] = this.deepCopy(obj[key], hash);
  1243. return acc;
  1244. }, result);
  1245. },
  1246. },
  1247. };
  1248. </script>
  1249. <style lang="scss" scoped>
  1250. .title_box {
  1251. margin-top: 20rpx;
  1252. .ww20 {
  1253. width: 20%;
  1254. }
  1255. .name {
  1256. font-size: 28rpx;
  1257. font-style: normal;
  1258. font-weight: 400;
  1259. color: $theme-color;
  1260. padding-left: 20rpx;
  1261. position: relative;
  1262. &:before {
  1263. position: absolute;
  1264. content: "";
  1265. left: 0rpx;
  1266. top: 0rpx;
  1267. bottom: 0rpx;
  1268. width: 4rpx;
  1269. height: 28rpx;
  1270. background: $theme-color;
  1271. margin: auto;
  1272. }
  1273. }
  1274. .btn_box {
  1275. color: $theme-color;
  1276. }
  1277. }
  1278. .material {
  1279. margin-top: 10rpx;
  1280. .content_table {
  1281. width: 100%;
  1282. border: 2rpx solid $border-color;
  1283. .item {
  1284. display: flex;
  1285. border-bottom: 2rpx solid $border-color;
  1286. .lable {
  1287. width: 132rpx;
  1288. text-align: center;
  1289. background-color: #f7f9fa;
  1290. font-size: 26rpx;
  1291. border-right: 2rpx solid $border-color;
  1292. flex-shrink: 0;
  1293. }
  1294. .lable220 {
  1295. width: 220rpx !important;
  1296. font-size: 24rpx;
  1297. }
  1298. .lable150 {
  1299. width: 156rpx !important;
  1300. font-size: 24rpx;
  1301. }
  1302. .ww80 {
  1303. width: 80rpx;
  1304. }
  1305. .content {
  1306. width: 518rpx;
  1307. min-height: 64rpx;
  1308. font-size: 28rpx;
  1309. line-height: 28rpx;
  1310. font-style: normal;
  1311. font-weight: 400;
  1312. // padding: 18rpx 8rpx;
  1313. box-sizing: border-box;
  1314. word-wrap: break-word;
  1315. flex-grow: 1 !important;
  1316. .unit {
  1317. padding: 0 4rpx;
  1318. font-size: 24rpx;
  1319. color: #404446;
  1320. }
  1321. }
  1322. &:last-child {
  1323. border-bottom: none;
  1324. }
  1325. }
  1326. .ww55 {
  1327. width: 55%;
  1328. }
  1329. .ww45 {
  1330. width: 45%;
  1331. }
  1332. }
  1333. }
  1334. .content_table2 {
  1335. width: 100%;
  1336. margin-top: 16rpx;
  1337. .row {
  1338. width: 100%;
  1339. .item {
  1340. color: #404446;
  1341. font-size: 28rpx;
  1342. padding-left: 12rpx;
  1343. }
  1344. .color157 {
  1345. color: $theme-color;
  1346. }
  1347. .ww30 {
  1348. width: 30%;
  1349. }
  1350. .ww50 {
  1351. width: 50%;
  1352. }
  1353. .ww90 {
  1354. width: 90%;
  1355. }
  1356. .ww15 {
  1357. width: 15%;
  1358. }
  1359. .ww10 {
  1360. width: 10%;
  1361. }
  1362. .ww30 {
  1363. width: 30%;
  1364. }
  1365. .ww20 {
  1366. width: 20%;
  1367. }
  1368. .ww40 {
  1369. width: 40%;
  1370. }
  1371. .jsColor {
  1372. color: $theme-color;
  1373. font-size: 20rpx;
  1374. }
  1375. }
  1376. .head {
  1377. height: 64rpx;
  1378. background: #f7f9fa;
  1379. border-top: 2rpx solid #e3e5e5;
  1380. border-left: 2rpx solid #e3e5e5;
  1381. .item {
  1382. height: 64rpx;
  1383. line-height: 64rpx;
  1384. border-right: 2rpx solid #e3e5e5;
  1385. box-sizing: border-box;
  1386. }
  1387. }
  1388. .tr {
  1389. border-top: 2rpx solid #e3e5e5;
  1390. border-left: 2rpx solid #e3e5e5;
  1391. .item {
  1392. font-size: 24rpx;
  1393. min-height: 64rpx;
  1394. display: flex;
  1395. align-items: center;
  1396. border-right: 2rpx solid #e3e5e5;
  1397. box-sizing: border-box;
  1398. white-space: normal;
  1399. word-break: break-all;
  1400. }
  1401. &:last-child {
  1402. border-bottom: 2rpx solid #e3e5e5;
  1403. }
  1404. }
  1405. }
  1406. .label {
  1407. display: flex;
  1408. height: 70rpx;
  1409. width: 86px !important;
  1410. font-size: 13px;
  1411. align-items: center;
  1412. justify-content: center;
  1413. background-color: #f7f9fa;
  1414. }
  1415. .content_num {
  1416. display: flex;
  1417. align-items: center;
  1418. padding: 0 4rpx;
  1419. /deep/ .uni-input-input {
  1420. border: 2rpx solid #f0f8f2;
  1421. background: #f0f8f2;
  1422. color: $theme-color;
  1423. }
  1424. }
  1425. .penalize {
  1426. width: 86rpx;
  1427. line-height: 60rpx;
  1428. background: $theme-color;
  1429. font-size: 24rpx;
  1430. text-align: center;
  1431. color: #fff;
  1432. }
  1433. .check {
  1434. width: 30rpx;
  1435. height: 30rpx;
  1436. }
  1437. .z_list {
  1438. max-height: 500rpx;
  1439. }
  1440. .search_list {
  1441. min-height: 100rpx;
  1442. width: 80vw;
  1443. /deep/ .baseForm {
  1444. padding: 0 20rpx;
  1445. }
  1446. }
  1447. .operate_box {
  1448. padding: 10rpx 32rpx;
  1449. /deep/ .u-button {
  1450. width: 30%;
  1451. }
  1452. }
  1453. </style>