addStock copy.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar
  4. fixed="true"
  5. statusBar="true"
  6. left-icon="back"
  7. title="新增出库单"
  8. @clickLeft="back"
  9. right-icon="scan"
  10. @clickRight="handleScan"
  11. >
  12. <!--右菜单-->
  13. <template slot="float">
  14. <!-- <view class="nav-icon-caozuo rightNav" @click="getsure">
  15. <u-button type="success" size="small" class="u-reset-button" text="确定"></u-button>
  16. </view> -->
  17. </template>
  18. </uni-nav-bar>
  19. <u-form
  20. labelPosition="left"
  21. :model="formData"
  22. :rules="rules"
  23. ref="formRef"
  24. labelWidth="260"
  25. labelAlign="right"
  26. class="baseForm"
  27. >
  28. <!-- <u-form-item label="出库单号" borderBottom prop="bizNum">
  29. <u-input
  30. :value="formData.bizNum"
  31. disableColor="#ffffff"
  32. placeholder="请选择"
  33. disabled
  34. type="select"
  35. />
  36. </u-form-item> -->
  37. <u-form-item
  38. label="出库产品类型"
  39. class="required-form"
  40. borderBottom
  41. prop="assetType"
  42. >
  43. <picker
  44. @change="
  45. (e) => handleDictPicker(e, dict[dictEnum.物品类型], 'assetType')
  46. "
  47. :value="pickerIndex"
  48. :range="dict[dictEnum.物品类型]"
  49. range-key="dictValue"
  50. :disabled="
  51. !!(warehousingMaterialList && warehousingMaterialList.length)
  52. "
  53. >
  54. <u-input
  55. :value="warehousingName"
  56. :disableColor="
  57. !!(warehousingMaterialList && warehousingMaterialList.length)
  58. ? '#F5F7FA'
  59. : '#fff'
  60. "
  61. placeholder="请选择"
  62. disabled
  63. type="select"
  64. />
  65. </picker>
  66. <u-icon slot="right" name="arrow-right"></u-icon>
  67. </u-form-item>
  68. <u-form-item
  69. label="出库场景"
  70. class="required-form"
  71. prop="bizScene"
  72. borderBottom
  73. >
  74. <picker
  75. @change="(e) => handlePicker(e, outputSceneState, 'bizScene')"
  76. :value="pickerIndex"
  77. :range="outputSceneState"
  78. :disabled="
  79. !!(warehousingMaterialList && warehousingMaterialList.length)
  80. "
  81. range-key="name"
  82. >
  83. <u-input
  84. :value="getDictName(outputSceneState, formData.bizScene)"
  85. :disableColor="
  86. !!(warehousingMaterialList && warehousingMaterialList.length)
  87. ? '#F5F7FA'
  88. : '#fff'
  89. "
  90. placeholder="请选择"
  91. disabled
  92. type="select"
  93. />
  94. </picker>
  95. <u-icon slot="right" name="arrow-right"></u-icon>
  96. </u-form-item>
  97. <u-form-item
  98. label="来源单据"
  99. :rules="[{ required: true, errorMessage: '请选择来源单据' }]"
  100. v-if="formData.assetType == 7 && formData.bizScene == 4"
  101. prop="documentSource"
  102. class="required-form"
  103. borderBottom
  104. >
  105. <luyj-select-lay
  106. :value.sync="formData.documentSource"
  107. clearable
  108. :disabled="
  109. !!(formData.documentSource && warehousingMaterialList.length)
  110. "
  111. name="name"
  112. placeholder="请选择"
  113. :options="datalist"
  114. @selectitem="handleDocumentSourceChange"
  115. />
  116. </u-form-item>
  117. <u-form-item label="来源单据" prop="documentSource" v-else borderBottom>
  118. <u-input
  119. type="text"
  120. placeholder="请输入"
  121. v-model="formData.documentSource"
  122. />
  123. </u-form-item>
  124. <u-form-item label="权属部门" prop="workOrder" borderBottom>
  125. <u-input
  126. :value="formData.deptName"
  127. disableColor="#ffffff"
  128. placeholder="请选择"
  129. disabled
  130. type="select"
  131. />
  132. <!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
  133. </u-form-item>
  134. <u-form-item label="出库登记人" prop="createUserName" borderBottom>
  135. <u-input
  136. disableColor="#ffffff"
  137. disabled
  138. :value="formData.createUserName"
  139. placeholder="请选择"
  140. type="text"
  141. />
  142. </u-form-item>
  143. <u-form-item label="审核人部门" prop="verifyDeptName" borderBottom>
  144. <u-input
  145. :value="formData.verifyDeptName"
  146. disableColor="#ffffff"
  147. placeholder="请选择"
  148. disabled
  149. type="select"
  150. @click.native="$refs.verifyTreePicker._show()"
  151. />
  152. <view slot="right" style="display: flex; align-item: center">
  153. <u-icon
  154. v-show="formData.verifyDeptName"
  155. name="close-circle-fill"
  156. @click="verifyDeptConfirm([], '')"
  157. ></u-icon>
  158. <u-icon name="arrow-right"></u-icon>
  159. </view>
  160. </u-form-item>
  161. <u-form-item label="审核人" prop="verifyId" borderBottom>
  162. <picker
  163. @change="(e) => handlePicker(e, userList, 'verifyId', 'verifyName')"
  164. :value="pickerIndex"
  165. :range="userList"
  166. range-key="name"
  167. >
  168. <u-input
  169. :value="formData.verifyName"
  170. disableColor="#ffffff"
  171. placeholder="请选择"
  172. disabled
  173. type="select"
  174. />
  175. </picker>
  176. <view slot="right" style="display: flex; align-item: center">
  177. <u-icon
  178. v-show="formData.verifyName"
  179. name="close-circle-fill"
  180. @click="handlePicker(null, [], 'verifyId', 'verifyName')"
  181. ></u-icon>
  182. <u-icon name="arrow-right"></u-icon>
  183. </view>
  184. </u-form-item>
  185. <u-form-item label="领料人" prop="deliveryName" borderBottom>
  186. <u-input
  187. type="text"
  188. placeholder="请输入"
  189. v-model="formData.deliveryName"
  190. />
  191. </u-form-item>
  192. <u-form-item label="领料人联系方式" prop="deliveryPhone" borderBottom>
  193. <u-input
  194. type="text"
  195. placeholder="请输入"
  196. v-model="formData.deliveryPhone"
  197. />
  198. </u-form-item>
  199. <u-form-item label="紧急状态" prop="urgent" borderBottom>
  200. <picker
  201. @change="(e) => handlePicker(e, emergencyState, 'urgent')"
  202. :value="pickerIndex"
  203. :range="emergencyState"
  204. range-key="name"
  205. >
  206. <u-input
  207. :value="getDictName(emergencyState, formData.urgent)"
  208. disableColor="#ffffff"
  209. placeholder="请选择"
  210. disabled
  211. type="select"
  212. />
  213. </picker>
  214. <u-icon slot="right" name="arrow-right"></u-icon>
  215. </u-form-item>
  216. <!-- <u-form-item label="附件" prop="contentImage" borderBottom>
  217. <UploadFileNew v-model="formData.contentImage" />
  218. </u-form-item> -->
  219. <u-form-item label="备注" prop="remark" borderBottom>
  220. <u-textarea
  221. confirmType="done"
  222. :maxlength="-1"
  223. height="80"
  224. v-model="formData.remark"
  225. placeholder="请输入"
  226. ></u-textarea>
  227. </u-form-item>
  228. </u-form>
  229. <uni-collapse ref="collapse" :show-animation="true">
  230. <uni-collapse-item
  231. :typeOpen="1"
  232. title=""
  233. :open="true"
  234. :key="detialOpen"
  235. :show-animation="true"
  236. >
  237. <template v-slot:title>
  238. <view class="detail-box">
  239. <view data-v-41027c34="" class="uni-collapse-item__title-wrap"
  240. ><view
  241. data-v-41027c34=""
  242. class="uni-collapse-item__title-box uni-collapse-item__title-box-base"
  243. ><!----><text data-v-41027c34="" class="tag tag-base"
  244. ><text></text></text
  245. ><text data-v-41027c34="" class="uni-collapse-item__title-text"
  246. ><text>出库明细</text></text
  247. ></view
  248. ></view
  249. >
  250. <u-button
  251. type="success"
  252. size="small"
  253. class="selectEnterType"
  254. text="添加"
  255. @click.native.stop="selectType"
  256. ></u-button>
  257. </view>
  258. </template>
  259. <u-form
  260. labelPosition="left"
  261. :model="{ warehousingMaterialList: warehousingMaterialList }"
  262. ref="lisrFormRef"
  263. labelWidth="110"
  264. :rules="listRules"
  265. errorType="none"
  266. labelAlign="right"
  267. :labelStyle="{
  268. fontSize: '24rpx',
  269. }"
  270. >
  271. <view class="listContent">
  272. <view
  273. class="listBox codeMsg"
  274. v-for="(item, index) in warehousingMaterialList"
  275. :key="index"
  276. >
  277. <view class="listTit">
  278. <view class="name">{{ item.assetCode }}</view>
  279. <view class="delete" @click="getDelete(index)">
  280. <uni-icons
  281. custom-prefix="iconfont"
  282. type="icon-shanchu"
  283. size="24"
  284. color="#fa3534"
  285. ></uni-icons>
  286. </view>
  287. </view>
  288. <view class="listCont">
  289. <view class="item" style="width: 100%">
  290. <text class="label">名称</text>
  291. <text class="content">{{ item.assetName }}</text>
  292. </view>
  293. <view
  294. class="item"
  295. v-for="(itm, index) in tableHeader"
  296. :key="index"
  297. >
  298. <text class="label">{{ itm.label }}</text>
  299. <text class="content">{{ item[itm.prop] }}</text>
  300. </view>
  301. <view class="item">
  302. <text class="label">出库数量</text>
  303. <text class="content" style="white-space: nowrap"
  304. ><text style="margin-right: 20rpx"
  305. >{{ item.selfSum }} {{ item.unit }}</text
  306. >
  307. <template v-if="!item.isUnpack"
  308. >{{ item.outInNum }}{{ item.minPackUnit }}</template
  309. >
  310. <text
  311. class="text-primary"
  312. @click="handleNumSet(item, index)"
  313. >设置</text
  314. ></text
  315. >
  316. </view>
  317. </view>
  318. </view>
  319. </view>
  320. </u-form>
  321. </uni-collapse-item>
  322. <uni-collapse-item
  323. :typeOpen="1"
  324. :title="`${warehousingName}明细`"
  325. :open="true"
  326. :key="codeOpen + '1'"
  327. :show-animation="true"
  328. >
  329. <view
  330. class="listBox codeMsg"
  331. v-for="(item, index) in this.warehousingMaterialList
  332. .map((i) => i.warehouseLedgerDetails || [])
  333. .flat()"
  334. :key="item.onlyCode + index + forceUpdate"
  335. >
  336. <view class="listCont">
  337. <view class="delete-code" @click="deleteCode(item)">
  338. <uni-icons
  339. custom-prefix="iconfont"
  340. type="icon-shanchu"
  341. size="24"
  342. color="#fa3534"
  343. ></uni-icons>
  344. </view>
  345. <view class="item" style="width: 100%">
  346. <text class="label long">{{ warehousingName }}编码</text>
  347. <text class="content">{{ item.onlyCode }}</text>
  348. </view>
  349. <view class="item">
  350. <text class="label">批次号</text
  351. ><text class="content">{{ item.batchNum }}</text>
  352. </view>
  353. <view class="item" v-if="!item.isUnpack">
  354. <text class="label">最小包装单元</text
  355. ><text class="content"
  356. >{{ item.measurementUnit }}{{ item.unit }} /{{
  357. item.minPackUnit
  358. }}</text
  359. >
  360. </view>
  361. <view class="item">
  362. <text class="label">包装编码</text
  363. ><text class="content">{{ item.num }}</text>
  364. </view>
  365. <view class="item">
  366. <text class="label">转消耗</text
  367. ><text class="content">
  368. <u-checkbox-group @change="handleChange($event, item)">
  369. <u-checkbox
  370. :size="30"
  371. :name="true"
  372. :checked="item.isTransferAsset"
  373. ></u-checkbox>
  374. </u-checkbox-group>
  375. </text>
  376. </view>
  377. <view
  378. class="item"
  379. style="width: 100%"
  380. v-if="item.manufactureTime || !item.procurementTime"
  381. >
  382. <text class="label">生产日期</text
  383. ><text class="content">{{ item.manufactureTime }}</text>
  384. </view>
  385. <view class="item" v-if="item.procurementTime" style="width: 100%">
  386. <text class="label">采购日期</text
  387. ><text class="content">{{ item.procurementTime }}</text>
  388. </view>
  389. <view class="item" style="width: 100%">
  390. <text class="label">货位</text
  391. ><text class="content">
  392. {{ item.warehouseName }}-{{ item.areaName }}-{{
  393. item.shelfCode
  394. }}-{{ item.cargoSpaceCode }}</text
  395. >
  396. </view>
  397. </view>
  398. </view>
  399. </uni-collapse-item>
  400. <uni-collapse-item
  401. :typeOpen="1"
  402. title="已失效"
  403. v-if="
  404. formData.assetType == 7 &&
  405. formData.bizScene == 4 &&
  406. uselessList.length
  407. "
  408. :open="true"
  409. :show-animation="true"
  410. >
  411. <view class="listBox codeMsg" v-for="(item, index) in uselessList">
  412. <view class="listCont">
  413. <view class="item" style="width: 100%">
  414. <text class="label long">{{ warehousingName }}编码</text>
  415. <text class="content">{{ item.onlyCode }}</text>
  416. </view>
  417. <view class="item">
  418. <text class="label">批次号</text
  419. ><text class="content">{{ item.batchNum }}</text>
  420. </view>
  421. <view class="item" v-if="!item.isUnpack">
  422. <text class="label">最小包装单元</text
  423. ><text class="content"
  424. >{{ item.measurementUnit }}{{ item.unit }} /{{
  425. item.minPackUnit
  426. }}</text
  427. >
  428. </view>
  429. <view class="item">
  430. <text class="label">包装编码</text
  431. ><text class="content">{{ item.barrelNum }}</text>
  432. </view>
  433. <view
  434. class="item"
  435. style="width: 100%"
  436. v-if="item.manufactureTime || !item.procurementTime"
  437. >
  438. <text class="label">生产日期</text
  439. ><text class="content">{{ item.manufactureTime }}</text>
  440. </view>
  441. <view class="item" v-if="item.procurementTime" style="width: 100%">
  442. <text class="label">采购日期</text
  443. ><text class="content">{{ item.procurementTime }}</text>
  444. </view>
  445. <view class="item" style="width: 100%">
  446. <text class="label">货位</text
  447. ><text class="content">
  448. {{ item.warehouseName }}-{{ item.areaName }}-{{
  449. item.shelfCode
  450. }}-{{ item.cargoSpaceCode }}</text
  451. >
  452. </view>
  453. </view>
  454. </view>
  455. </uni-collapse-item>
  456. </uni-collapse>
  457. <view class="footBox">
  458. <view class="reg" @click="getsure">
  459. <uni-icons custom-prefix="iconfont" size="20" color="#fff"></uni-icons>
  460. 提交
  461. </view>
  462. </view>
  463. <ba-tree-picker
  464. ref="treePicker"
  465. :multiple="false"
  466. @select-change="deptConfirm"
  467. key="dept"
  468. title="选择部门"
  469. :localdata="deptList"
  470. valueKey="code"
  471. textKey="name"
  472. childrenKey="children"
  473. />
  474. <ba-tree-picker
  475. ref="verifyTreePicker"
  476. key="verify"
  477. :multiple="false"
  478. @select-change="verifyDeptConfirm"
  479. title="选择部门"
  480. :localdata="deptList"
  481. valueKey="code"
  482. textKey="name"
  483. childrenKey="children"
  484. />
  485. <!-- <ba-tree-picker
  486. ref="assetsTreePicker"
  487. key="assetsTree"
  488. :selectParent="false"
  489. :multiple="false"
  490. @select-change="assetsConfirm"
  491. title="选择资产类型"
  492. :localdata="assetsList"
  493. valueKey="id"
  494. textKey="name"
  495. childrenKey="children"
  496. /> -->
  497. <!-- <ScanCode @scancodedate="scancodedate"></ScanCode> -->
  498. </view>
  499. </template>
  500. <script>
  501. import ScanCode from "@/components/ScanCode.vue";
  502. import { post, postJ, get, getJ } from "@/utils/api.js";
  503. import {
  504. warehousingType,
  505. outputSceneState,
  506. inputStatus,
  507. emergencyState,
  508. getDictName,
  509. materialType,
  510. } from "../enum.js";
  511. import baTreePicker from "@/components/ba-tree-picker/ba-tree-picker.vue";
  512. import luyjSelectLay from "@/components/luyj-select-lay/luyj-select-lay.vue";
  513. // import addDetails from '@/components/addDetails'
  514. import UploadFileNew from "@/components/UploadFileNew";
  515. import { mapGetters, mapActions } from "vuex";
  516. import { tableHeader } from "../common";
  517. import dictEnum from "@/enum/dict";
  518. // import { getRuleNo } from '@/utils/utils.js'
  519. export default {
  520. components: {
  521. baTreePicker,
  522. UploadFileNew,
  523. luyjSelectLay,
  524. ScanCode,
  525. },
  526. data() {
  527. return {
  528. dictEnum,
  529. datalist: [],
  530. loading: false,
  531. forceUpdate: false,
  532. detialOpen: false,
  533. codeOpen: false,
  534. emergencyState,
  535. warehousingType,
  536. materialType,
  537. outputSceneState,
  538. inputStatus,
  539. getDictName,
  540. deptList: [], //部门
  541. supplierList: [], //供应商
  542. formData: {
  543. // bizNum: getRuleNo('OUT'),
  544. assetType: "",
  545. bizScene: "",
  546. deptCode: "",
  547. deptName: "",
  548. createUserName: "",
  549. registerId: "",
  550. verifyId: "",
  551. verifyName: "",
  552. verifyDeptCode: "",
  553. verifyDeptName: "",
  554. // outInTime: '',
  555. deliveryName: "",
  556. deliveryPhone: "",
  557. urgent: "",
  558. contentImage: [],
  559. remark: "",
  560. supplierId: "",
  561. supplierName: "",
  562. },
  563. statusList: [
  564. {
  565. id: 1,
  566. name: "紧急",
  567. },
  568. {
  569. id: 2,
  570. name: "中等",
  571. },
  572. {
  573. id: 1,
  574. name: "普通",
  575. },
  576. ], //紧急状态
  577. pickerIndex: 0,
  578. warehousingMaterialList: [],
  579. userList: [],
  580. rules: {
  581. assetType: {
  582. type: "number",
  583. required: true,
  584. message: "请选择出库产品类型",
  585. trigger: ["blur", "change"],
  586. },
  587. bizScene: {
  588. type: "number",
  589. required: true,
  590. message: "请选择出库场景",
  591. trigger: ["blur", "change"],
  592. },
  593. // contentImage: {
  594. // type: 'array',
  595. // required: true,
  596. // message: '请上传附件',
  597. // trigger: ['blur', 'change']
  598. // }
  599. },
  600. assetsList: [], //转资产
  601. curIndex: 0,
  602. assetsindex: 0,
  603. uselessList: [],
  604. };
  605. },
  606. watch: {
  607. "formData.documentSource": {
  608. handler() {
  609. if (!this.formData.documentSource && this.formData.bizScene == 4) {
  610. this.warehousingMaterialList = [];
  611. }
  612. },
  613. },
  614. },
  615. onShow() {
  616. uni.$off("bucketSelect");
  617. uni.$on("bucketSelect", (res) => {
  618. this.$set(
  619. this.warehousingMaterialList[this.curIndex],
  620. "warehouseLedgerDetails",
  621. (res || []).map((item) => {
  622. delete item.updateTime;
  623. delete item.createTime;
  624. item.isTransferAsset = false;
  625. item.isUnpack = this.warehousingMaterialList[this.curIndex].isUnpack;
  626. return item;
  627. })
  628. );
  629. this.$set(
  630. this.warehousingMaterialList[this.curIndex],
  631. "outInNum",
  632. res.length
  633. );
  634. this.$set(
  635. this.warehousingMaterialList[this.curIndex],
  636. "minPackUnit",
  637. res[0].minPackUnit
  638. );
  639. this.warehousingMaterialList[this.curIndex].selfSum =
  640. this.warehousingMaterialList[
  641. this.curIndex
  642. ].warehouseLedgerDetails.reduce((sum, pre) => {
  643. if (this.warehousingMaterialList[this.curIndex].isUnpack) {
  644. return ++sum;
  645. }
  646. return sum + pre.measurementUnit;
  647. }, 0);
  648. this.forceUpdate = !this.forceUpdate;
  649. });
  650. uni.$off("setSelectList");
  651. uni.$on("setSelectList", (selectList) => {
  652. if (selectList?.length) {
  653. this.warehousingMaterialList = selectList;
  654. this.$nextTick(() => {
  655. this.detialOpen = !this.detialOpen;
  656. });
  657. }
  658. });
  659. const _this = this;
  660. uni.$off("outHouseScanView"); // 每次进来先 移除全局自定义事件监听器
  661. uni.$on("outHouseScanView", function (data) {
  662. _this.setScanMaterial(data);
  663. });
  664. uni.$off("scancodedate"); // 每次进来先 移除全局自定义事件监听器
  665. uni.$on("scancodedate", function (data) {
  666. _this.scancodedate(data);
  667. });
  668. },
  669. onUnload() {
  670. uni.$off("scancodedate");
  671. },
  672. onHide() {
  673. uni.$off("scancodedate");
  674. },
  675. onLoad(options) {
  676. this.getDept();
  677. this.getAssetList();
  678. this.remoteMethod();
  679. this.getSupplier();
  680. this.requestDict("物品类型");
  681. const userInfo = uni.getStorageSync("userInfo");
  682. this.formData.createUserName = userInfo.name;
  683. this.formData.deptName = userInfo.dept.name;
  684. this.formData.deptCode = userInfo.dept.code;
  685. this.formData.registerId = userInfo.id;
  686. },
  687. mounted() {},
  688. computed: {
  689. ...mapGetters(["getDictValue", "dict"]),
  690. tableHeader() {
  691. return tableHeader(this.formData.assetType);
  692. },
  693. curDateType() {
  694. return this.materialCodeReqList[0]?.manufactureTime
  695. ? "manufactureTime"
  696. : "procurementTime";
  697. },
  698. // 条码信息
  699. // materialCodeReqList () {
  700. // return this.warehousingMaterialList
  701. // .map(i => i.warehouseLedgerDetails || [])
  702. // .flat()
  703. // },
  704. warehousingName() {
  705. return this.getDictValue("物品类型", this.formData.assetType) || "";
  706. },
  707. listRules() {
  708. return this.warehousingMaterialList.reduce((cur, pre, index) => {
  709. return {
  710. ...cur,
  711. [`warehousingMaterialList.${index}.cargoSpaceCode`]: {
  712. type: "string",
  713. required: true,
  714. trigger: ["blur", "change"],
  715. },
  716. [`warehousingMaterialList.${index}.measurementUnit`]: {
  717. type: "string",
  718. required: true,
  719. trigger: ["blur", "change"],
  720. },
  721. [`warehousingMaterialList.${index}.minPackUnit`]: {
  722. type: "string",
  723. required: true,
  724. trigger: ["blur", "change"],
  725. },
  726. [`warehousingMaterialList.${index}.outInNum`]: {
  727. type: "string",
  728. required: true,
  729. trigger: ["blur", "change"],
  730. },
  731. };
  732. }, {});
  733. },
  734. },
  735. methods: {
  736. ...mapActions("dict", ["requestDict"]),
  737. scancodedate(data) {
  738. if (!this.formData.bizScene && this.formData.bizScene !== 0) {
  739. uni.showToast({
  740. title: "请选择出库场景",
  741. icon: "none",
  742. });
  743. return;
  744. }
  745. if (this.formData.bizScene == 4 && !this.formData.documentSource) {
  746. uni.showToast({
  747. title: "请选择来源单据",
  748. icon: "none",
  749. });
  750. return;
  751. }
  752. this.qrContent = data.code.trim();
  753. this.getData();
  754. },
  755. async handleDocumentSourceChange(index, item) {
  756. if (!item?.value) return;
  757. uni.showLoading({
  758. title: "加载中...",
  759. });
  760. this.formData.documentSource = item.value;
  761. const res = await get(
  762. this.apiUrl + `/outInWarehouse/select/getSparePartsInfo`,
  763. {
  764. code: this.formData.documentSource,
  765. }
  766. );
  767. if (res?.success && res.data.length) {
  768. const curMap = {
  769. assetId: "classificationId",
  770. assetCode: "informationCode", //编码
  771. assetName: "informationName", //名称
  772. materialId: "classificationId",
  773. materialName: "informationName",
  774. batchNo: "", //批次号
  775. unit: "measuringUnit", //单位
  776. minPackUnit: "packingUnit", //最小包装单位
  777. };
  778. res.data.forEach((item) => {
  779. let obj = {};
  780. for (const key in curMap) {
  781. obj[key] = curMap[key] ? item[curMap[key]] : "";
  782. }
  783. obj.curId = obj.assetCode;
  784. const index = this.warehousingMaterialList.findIndex(
  785. (i) => i.curId === obj.curId
  786. );
  787. if (index === -1) {
  788. obj.warehouseLedgerDetails = [];
  789. this.warehousingMaterialList.push({ ...item, ...obj });
  790. }
  791. });
  792. const res1 = await get(
  793. this.apiUrl + `/outInWarehouse/getWarehouseActualDetail`,
  794. {
  795. onlyCodeList: res.data.map((i) => i.assetCode).join(","),
  796. }
  797. );
  798. if (res1?.success) {
  799. this.uselessList = res.data
  800. .filter(
  801. (i) => !res1.data.find((itm) => itm.onlyCode === i.assetCode)
  802. )
  803. .map((item) => ({
  804. ...item,
  805. onlyCode: item.assetCode,
  806. }));
  807. res1.data.forEach((item) => {
  808. item.curId = item.assetCode;
  809. const index = this.warehousingMaterialList.findIndex(
  810. (i) => i.curId === item.curId
  811. );
  812. if (index === -1) {
  813. // obj.sparePartsNum = item.num
  814. this.warehouseLedgerDetailsSet(item, [uni.$u.deepClone(item)]);
  815. this.warehousingMaterialList.push(item);
  816. } else {
  817. // this.warehousingMaterialList[index].sparePartsNum = item.num
  818. const idx = this.warehousingMaterialList[
  819. index
  820. ].warehouseLedgerDetails.findIndex(
  821. (itm) => itm.onlyCode === item.onlyCode
  822. );
  823. if (idx === -1) {
  824. this.warehouseLedgerDetailsSet(
  825. this.warehousingMaterialList[index],
  826. [
  827. item,
  828. ...this.warehousingMaterialList[index]
  829. .warehouseLedgerDetails,
  830. ]
  831. );
  832. }
  833. }
  834. });
  835. }
  836. }
  837. uni.hideLoading();
  838. },
  839. warehouseLedgerDetailsSet(row, res = []) {
  840. this.$set(
  841. row,
  842. "warehouseLedgerDetails",
  843. (res || []).map((item) => {
  844. delete item.updateTime;
  845. delete item.createTime;
  846. this.$set(item, "isTransferAsset", false);
  847. item.isUnpack = row.isUnpack;
  848. return item;
  849. })
  850. );
  851. this.$set(row, "outInNum", res.length);
  852. this.$set(row, "minPackUnit", res[0].minPackUnit);
  853. this.$set(
  854. row,
  855. "selfSum",
  856. row.warehouseLedgerDetails.reduce((sum, pre) => {
  857. if (row.isUnpack) {
  858. return ++sum;
  859. }
  860. return sum + pre.measurementUnit;
  861. }, 0)
  862. );
  863. },
  864. // 备品备件来源单号
  865. async remoteMethod(code) {
  866. const res = await get(this.apiUrl + `/outInWarehouse/getDocumentSource`, {
  867. code,
  868. });
  869. if (res?.success) {
  870. this.datalist = res.data.map((item) => ({
  871. label: item,
  872. value: item,
  873. }));
  874. }
  875. },
  876. handleScan() {
  877. if (!this.formData.bizScene && this.formData.bizScene !== 0) {
  878. uni.showToast({
  879. title: "请选择出库场景",
  880. icon: "none",
  881. });
  882. return;
  883. }
  884. if (this.formData.bizScene == 4 && !this.formData.documentSource) {
  885. uni.showToast({
  886. title: "请选择来源单据",
  887. icon: "none",
  888. });
  889. return;
  890. }
  891. const _this = this;
  892. uni.scanCode({
  893. onlyFromCamera: true,
  894. success: function (res) {
  895. console.log("条码类型:" + res.scanType);
  896. console.log("条码内容:" + res.result);
  897. _this.isCamera = true;
  898. _this.qrContent = res.result.trim();
  899. _this.getData();
  900. },
  901. });
  902. },
  903. // 根据条码请求设备数据 @_@
  904. getData() {
  905. console.log("根据条码请求设备数据");
  906. let par = {
  907. barType: this.qrContent.split("@_@")[1] || 0,
  908. qrContent: this.qrContent,
  909. };
  910. uni.showLoading({
  911. title: "加载中",
  912. mask: true,
  913. });
  914. postJ(this.apiUrl + "/scan/getAssetInfo", par)
  915. .then((res) => {
  916. let data = res.data;
  917. console.log(data, "qrContent");
  918. if (data.assetType === undefined) {
  919. uni.showToast({
  920. title: "请扫码物品码",
  921. icon: "none",
  922. });
  923. return;
  924. } else if (data?.warehouseDetail?.bizStatus != 1) {
  925. uni.showModal({
  926. title: "提示",
  927. content: "当前物品不在仓库内",
  928. success: async (res) => {},
  929. });
  930. return;
  931. } else if (data.underApproval) {
  932. uni.showModal({
  933. title: "提示",
  934. content: `【${data.assetCode}】正在待审批单据中`,
  935. success: async (res) => {},
  936. });
  937. return;
  938. } else if (
  939. this.warehousingName &&
  940. this.formData.assetType != data.assetType
  941. ) {
  942. uni.showToast({
  943. title: `当前物品不属于${this.warehousingName}分类`,
  944. icon: "none",
  945. });
  946. return;
  947. }
  948. uni.setStorageSync("outHouseScan", data);
  949. uni.navigateTo({
  950. url: "/pages/warehouse/inventoryAllocation/scanView?emitName=outHouseScanView&key=outHouseScan",
  951. });
  952. })
  953. .finally(() => {
  954. uni.hideLoading();
  955. });
  956. },
  957. setScanMaterial(data) {
  958. this.formData.assetType = data.assetType;
  959. this.$nextTick(() => {
  960. this.$refs.formRef.validateField("assetType");
  961. });
  962. const onlyCode = data.assetCode;
  963. const curMap = {
  964. assetId: "id",
  965. assetCode: "informationCode", //编码
  966. assetName: "informationName", //名称
  967. materialId: "id",
  968. materialName: "informationName",
  969. batchNo: "", //批次号
  970. unit: "measuringUnit", //单位
  971. minPackUnit: "packingUnit", //最小包装单位
  972. };
  973. const detailMap = [
  974. "areaId",
  975. "areaName",
  976. "assetCode",
  977. "assetName",
  978. "assetType",
  979. "batchNum",
  980. "cargoSpaceCode",
  981. "cargoSpaceId",
  982. "expirationDate",
  983. "expirationDateUnit",
  984. "expirationTime",
  985. "isTransferAsset",
  986. "manufactureTime",
  987. "measurementUnit",
  988. "unit",
  989. "minPackUnit",
  990. "num",
  991. "onlyCode",
  992. "procurementTime",
  993. "shelfCode",
  994. "shelfId",
  995. "warehouseId",
  996. "warehouseName",
  997. ];
  998. let obj = data.information;
  999. for (const key in curMap) {
  1000. obj[key] = (curMap[key] && data.information[curMap[key]]) || "";
  1001. }
  1002. Object.assign(obj, data.information, {
  1003. outInNum: 1,
  1004. assetType: data.assetType,
  1005. realInventoryNum: data.realInventoryNum,
  1006. warehouseId: data.warehouseDetail?.warehouseId,
  1007. curId: obj.assetCode,
  1008. });
  1009. let details = {};
  1010. detailMap.forEach((key) => {
  1011. details[key] = data.warehouseDetail[key] || data.information[key];
  1012. });
  1013. details.realInventoryNum = data.realInventoryNum;
  1014. obj.warehouseLedgerDetails = [
  1015. {
  1016. ...details,
  1017. onlyCode,
  1018. isTransferAsset: false,
  1019. },
  1020. ];
  1021. delete obj.createTime;
  1022. delete obj.updateTime;
  1023. let index = this.warehousingMaterialList.findIndex(
  1024. (item) => item.curId === obj.curId
  1025. );
  1026. console.log(this.warehousingMaterialList, obj.curId, index);
  1027. if (index > -1) {
  1028. const idx = (
  1029. this.warehousingMaterialList[index].warehouseLedgerDetails || []
  1030. ).findIndex((item) => item.onlyCode === onlyCode);
  1031. if (idx > -1) {
  1032. setTimeout(() => {
  1033. uni.showToast({
  1034. title: `【${onlyCode}】已存在,请勿重复添加`,
  1035. icon: "none",
  1036. });
  1037. }, 10);
  1038. return;
  1039. } else {
  1040. if (this.warehousingMaterialList[index].warehouseLedgerDetails) {
  1041. this.warehousingMaterialList[index].warehouseLedgerDetails.push(
  1042. obj.warehouseLedgerDetails[0]
  1043. );
  1044. } else {
  1045. this.$set(
  1046. this.warehousingMaterialList[index],
  1047. "warehouseLedgerDetails",
  1048. obj.warehouseLedgerDetails
  1049. );
  1050. }
  1051. }
  1052. } else {
  1053. this.warehousingMaterialList.push(obj);
  1054. index = this.warehousingMaterialList.length - 1;
  1055. }
  1056. console.log(this.warehousingMaterialList, "this.warehousingMaterialList");
  1057. this.$set(
  1058. this.warehousingMaterialList[index],
  1059. "outInNum",
  1060. this.warehousingMaterialList[index].warehouseLedgerDetails.length
  1061. );
  1062. this.$set(
  1063. this.warehousingMaterialList[index],
  1064. "minPackUnit",
  1065. obj.warehouseLedgerDetails[0].minPackUnit
  1066. );
  1067. this.warehousingMaterialList[index].selfSum =
  1068. this.warehousingMaterialList[index].warehouseLedgerDetails.reduce(
  1069. (sum, pre) => {
  1070. if (this.warehousingMaterialList[index].isUnpack) {
  1071. return ++sum;
  1072. }
  1073. return sum + pre.measurementUnit;
  1074. },
  1075. 0
  1076. );
  1077. this.forceUpdate = !this.forceUpdate;
  1078. },
  1079. handleChange(e, item) {
  1080. console.log(e);
  1081. this.$set(item, "isTransferAsset", !!(e && e[0]));
  1082. this.forceUpdate = !this.forceUpdate;
  1083. },
  1084. // 转资产
  1085. // turnToAssets (index) {
  1086. // this.assetsindex = index
  1087. // this.$refs.assetsTreePicker._show()
  1088. // },
  1089. // 转资产确认
  1090. // assetsConfirm (data, name) {
  1091. // this.materialCodeReqList[this.assetsindex].materialId = data[0]
  1092. // this.materialCodeReqList[this.assetsindex].transferType =
  1093. // this.getAssetsName(data[0])
  1094. // this.materialCodeReqList[this.assetsindex].materialName = name
  1095. // },
  1096. // 转资产分类
  1097. async getAssetList() {
  1098. const res = await get(this.apiUrl + "/classify/getClassify", { id: 0 });
  1099. if (res.success) {
  1100. this.assetsList = res.data;
  1101. }
  1102. },
  1103. // 转资产获取父级
  1104. getAssetsName(value) {
  1105. let res = "";
  1106. const fn = (list, parent = []) => {
  1107. if (res) return;
  1108. for (const p of list) {
  1109. const str = p.name;
  1110. if (res) break;
  1111. if (p.id === value) {
  1112. res = [...parent, str].join("/");
  1113. return;
  1114. }
  1115. if (p.children?.length) {
  1116. fn(p.children, [...parent, str]);
  1117. }
  1118. }
  1119. };
  1120. fn(this.assetsList);
  1121. return res;
  1122. },
  1123. handleNumSet({ assetCode }, index) {
  1124. this.curIndex = index;
  1125. uni.setStorageSync(
  1126. "outputInfoData",
  1127. this.warehousingMaterialList[this.curIndex]
  1128. );
  1129. uni.navigateTo({
  1130. url: `/pages/warehouse/outHouse/bucketSelect?assetCode=${assetCode}&assetType=${this.formData.assetType}`,
  1131. });
  1132. },
  1133. // 抬头下拉信息保存
  1134. handlePicker(e, list, idKey, nameKey) {
  1135. if (idKey) {
  1136. this.formData[idKey] = list[e.detail.value].id;
  1137. }
  1138. if (nameKey) {
  1139. this.formData[nameKey] = list[e.detail.value].name;
  1140. }
  1141. this.$nextTick(() => {
  1142. if (idKey === "bizScene") {
  1143. this.$refs.formRef.validateField(idKey);
  1144. }
  1145. });
  1146. if (idKey === "bizScene" && this.formData.assetType == 7) {
  1147. this.formData.documentSource = "";
  1148. }
  1149. },
  1150. // 抬头下拉信息保存
  1151. handleDictPicker(e, list, idKey, nameKey) {
  1152. if (idKey) {
  1153. this.formData[idKey] = list[e?.detail.value]?.dictCode;
  1154. }
  1155. if (nameKey) {
  1156. this.formData[nameKey] = list[e?.detail.value]?.dictValue;
  1157. }
  1158. this.$nextTick(() => {
  1159. if (idKey === "assetType" || idKey === "bizScene") {
  1160. this.$refs.formRef.validateField(idKey);
  1161. }
  1162. });
  1163. if (idKey === "assetType" && this.formData.bizScene == 4) {
  1164. this.formData.documentSource = "";
  1165. }
  1166. this.$nextTick(() => {
  1167. if (idKey === "assetType") {
  1168. this.$refs.formRef.validateField(idKey);
  1169. }
  1170. });
  1171. },
  1172. // 明细下拉信息保存
  1173. handleListPicker(e, list, item, idKey, nameKey) {
  1174. if (idKey) {
  1175. item[idKey] = list[e.detail.value].id;
  1176. }
  1177. if (nameKey) {
  1178. item[nameKey] = list[e.detail.value].name;
  1179. }
  1180. },
  1181. //上传附件
  1182. getUpFlie(res) {
  1183. let arr = [];
  1184. res.forEach((item) => {
  1185. let obj = {
  1186. accessUrl: item.accessUrl,
  1187. docId: item.docId,
  1188. name: item.name,
  1189. size: item.size,
  1190. url: item.url,
  1191. type: 1,
  1192. };
  1193. // obj.type.id = item.type.id;
  1194. // obj.type.value = item.type.name;
  1195. arr.push(obj);
  1196. });
  1197. this.formData.attaments = arr;
  1198. },
  1199. //选择出库类别跳转
  1200. selectType() {
  1201. if (!this.formData.assetType) {
  1202. uni.showToast({
  1203. title: "请选择出库类型",
  1204. icon: "none",
  1205. });
  1206. return;
  1207. }
  1208. if (!this.formData.bizScene && this.formData.bizScene !== 0) {
  1209. uni.showToast({
  1210. title: "请选择出库场景",
  1211. icon: "none",
  1212. });
  1213. return;
  1214. }
  1215. if (this.formData.bizScene == 4 && !this.formData.documentSource) {
  1216. uni.showToast({
  1217. title: "请选择来源单据",
  1218. icon: "none",
  1219. });
  1220. return;
  1221. }
  1222. const storageKey = Date.now() + "";
  1223. uni.setStorageSync(storageKey, this.warehousingMaterialList);
  1224. uni.navigateTo({
  1225. url:
  1226. "/pages/warehouse/outHouse/selectOutType?warehousingType=" +
  1227. this.formData.assetType +
  1228. "&warehousingName=" +
  1229. this.warehousingName +
  1230. "&storageKey=" +
  1231. storageKey,
  1232. });
  1233. },
  1234. // //接收添加出库明细
  1235. // getChooseInfo(res) {
  1236. // this.formData.numDetails = res;
  1237. // //console.log(this.form);
  1238. // },
  1239. //删除
  1240. getDelete(index) {
  1241. uni.showModal({
  1242. title: "提示",
  1243. content: "是否删除当前明细",
  1244. success: (res) => {
  1245. if (res.confirm) {
  1246. this.warehousingMaterialList.splice(index, 1);
  1247. }
  1248. },
  1249. });
  1250. },
  1251. // 条码删除
  1252. deleteCode(item) {
  1253. uni.showModal({
  1254. title: "提示",
  1255. content: `是否删除当前${this.warehousingName}明细`,
  1256. success: (res) => {
  1257. if (res.confirm) {
  1258. const parent = this.warehousingMaterialList.find(
  1259. (i) => i.assetCode === item.assetCode
  1260. );
  1261. if (parent) {
  1262. const index = parent.warehouseLedgerDetails.findIndex(
  1263. (i) => i.onlyCode === item.onlyCode
  1264. );
  1265. if (index > -1) {
  1266. parent.warehouseLedgerDetails.splice(index, 1);
  1267. parent.outInNum -= 1;
  1268. parent.selfSum = parent.warehouseLedgerDetails.reduce(
  1269. (sum, pre) => {
  1270. if (parent.isUnpack) {
  1271. return ++sum;
  1272. }
  1273. return sum + pre.measurementUnit;
  1274. },
  1275. 0
  1276. );
  1277. this.forceUpdate = !this.forceUpdate;
  1278. }
  1279. }
  1280. }
  1281. },
  1282. });
  1283. },
  1284. //确定提交
  1285. getsure() {
  1286. this.$refs.formRef.validate().then((res) => {
  1287. if (!this.warehousingMaterialList?.length) {
  1288. uni.showToast({
  1289. icon: "none",
  1290. title: "请添加出库明细!",
  1291. });
  1292. return;
  1293. } else if (
  1294. this.warehousingMaterialList.some((item) => !item.outInNum)
  1295. ) {
  1296. uni.showToast({
  1297. icon: "none",
  1298. title: `请添加${this.warehousingName}明细!`,
  1299. });
  1300. return;
  1301. }
  1302. const params = {
  1303. outInWarehouse: { ...this.formData, bizStatus: 2 },
  1304. warehouseLedgerInfos: this.warehousingMaterialList,
  1305. };
  1306. console.log("getsure-----", params);
  1307. postJ(this.apiUrl + "/outInWarehouse/add", params).then((res) => {
  1308. console.log("outInWarehouse/add", res);
  1309. if (res?.success) {
  1310. uni.showToast({
  1311. icon: "success",
  1312. title: "保存成功",
  1313. });
  1314. setTimeout(() => {
  1315. uni.navigateBack({
  1316. delta: 1,
  1317. });
  1318. }, 1500);
  1319. }
  1320. });
  1321. });
  1322. },
  1323. // 部门确认
  1324. deptConfirm(data, name) {
  1325. this.formData.deptName = name;
  1326. this.formData.deptCode = data[0];
  1327. },
  1328. // 部门确认
  1329. verifyDeptConfirm(data, name) {
  1330. this.formData.verifyDeptCode = data[0];
  1331. this.formData.verifyDeptName = name;
  1332. this.formData.verifyId = "";
  1333. this.formData.verifyName = "";
  1334. this.getUser(data[0]);
  1335. },
  1336. // 获取部门
  1337. getDept() {
  1338. get(this.apiUrl + "/main/org/dept/effectiveTree").then((res) => {
  1339. if (res?.success) {
  1340. this.deptList = res.data;
  1341. }
  1342. });
  1343. },
  1344. // 获取供应商
  1345. getSupplier() {
  1346. post(this.apiUrl + `/main/supplier/list?page=1&size=999`, {
  1347. page: 1,
  1348. size: 999,
  1349. }).then((res) => {
  1350. if (res?.success) {
  1351. this.supplierList = res.data.items;
  1352. }
  1353. });
  1354. },
  1355. // 获取人员
  1356. getUser(deptCode) {
  1357. post(this.apiUrl + "/main/user/list", {
  1358. deptCode,
  1359. page: 1,
  1360. size: 9999,
  1361. }).then((res) => {
  1362. if (res?.success) {
  1363. this.userList = res.data.items.map((item) => {
  1364. item.name = item.trueName;
  1365. item.id = item.userId;
  1366. return item;
  1367. });
  1368. }
  1369. });
  1370. },
  1371. },
  1372. };
  1373. </script>
  1374. <style lang="scss" scoped>
  1375. .mainBox {
  1376. padding-bottom: 120rpx;
  1377. /deep/.required-form .u-form-item__body__left__content__label::before {
  1378. content: "*";
  1379. color: red;
  1380. }
  1381. }
  1382. .picList {
  1383. display: flex;
  1384. align-items: center;
  1385. justify-items: flex-start;
  1386. flex-wrap: wrap;
  1387. }
  1388. /deep/.baseForm {
  1389. .u-form-item__body {
  1390. padding: 10rpx !important;
  1391. }
  1392. }
  1393. /deep/.picList .u-image {
  1394. margin-right: 10rpx;
  1395. margin-bottom: 10rpx;
  1396. }
  1397. /deep/.cLine .u-line:nth-child(1) {
  1398. border-bottom: none !important;
  1399. }
  1400. .detail-box {
  1401. position: relative;
  1402. height: 80rpx;
  1403. display: flex;
  1404. justify-content: space-between;
  1405. align-items: center;
  1406. /deep/uni-button {
  1407. margin: 0 !important;
  1408. width: 180rpx;
  1409. }
  1410. }
  1411. .footBox {
  1412. position: fixed;
  1413. left: 0px;
  1414. bottom: 0px;
  1415. height: 100rpx;
  1416. width: 100%;
  1417. display: flex;
  1418. align-items: center;
  1419. justify-content: space-between;
  1420. view {
  1421. width: 100%;
  1422. height: 100%;
  1423. text-align: center;
  1424. color: #fff;
  1425. display: flex;
  1426. align-items: center;
  1427. justify-content: center;
  1428. }
  1429. .reg {
  1430. background: $u-success-dark;
  1431. }
  1432. .add {
  1433. background: $uni-color-primary;
  1434. }
  1435. .uni-icons {
  1436. margin-right: 8rpx !important;
  1437. }
  1438. }
  1439. .listBox {
  1440. padding: 20rpx 10rpx;
  1441. border-bottom: 1px #f2f2f2 solid;
  1442. position: relative;
  1443. .listTit {
  1444. width: 100%;
  1445. display: flex;
  1446. justify-content: space-between;
  1447. align-items: center;
  1448. /deep/uni-button {
  1449. margin-right: 20rpx;
  1450. }
  1451. .name {
  1452. width: 50%;
  1453. margin-left: 10px;
  1454. overflow: hidden;
  1455. white-space: nowrap;
  1456. -o-text-overflow: ellipsis;
  1457. text-overflow: ellipsis;
  1458. font-size: 30rpx;
  1459. }
  1460. .weight {
  1461. width: 30%;
  1462. font-size: 30rpx;
  1463. margin-left: auto;
  1464. margin-right: 60rpx;
  1465. position: relative;
  1466. display: flex;
  1467. input {
  1468. margin-right: 10rpx;
  1469. border: 1px solid black;
  1470. width: 40%;
  1471. height: 20rpx;
  1472. }
  1473. }
  1474. .weight::after {
  1475. position: absolute;
  1476. right: -30rpx;
  1477. top: 50%;
  1478. content: "";
  1479. background: #eee;
  1480. width: 1px;
  1481. height: 28rpx;
  1482. margin-top: -14rpx;
  1483. }
  1484. }
  1485. .more {
  1486. position: absolute;
  1487. bottom: 26rpx;
  1488. right: 30rpx;
  1489. font-size: 28rpx;
  1490. color: #666;
  1491. }
  1492. .operation {
  1493. padding-right: 20rpx;
  1494. font-size: 28rpx;
  1495. /deep/.u-text {
  1496. justify-content: flex-end !important;
  1497. }
  1498. }
  1499. }
  1500. .codeMsg {
  1501. .item {
  1502. display: flex;
  1503. align-items: center;
  1504. .content {
  1505. flex: 1;
  1506. }
  1507. }
  1508. .label {
  1509. width: 180rpx !important;
  1510. &.long {
  1511. // width: 300rpx !important;
  1512. }
  1513. }
  1514. }
  1515. .listCont {
  1516. display: flex;
  1517. align-items: center;
  1518. flex-wrap: wrap;
  1519. margin-top: 20rpx;
  1520. margin-left: 10rpx;
  1521. position: relative;
  1522. .delete-code {
  1523. position: absolute;
  1524. top: 10rpx;
  1525. right: 10rpx;
  1526. }
  1527. // .u-input,
  1528. // input {
  1529. // margin-right: 10rpx;
  1530. // border: 1px solid rgb(229, 229, 229);
  1531. // width: 40%;
  1532. // height: 10rpx !important;
  1533. // }
  1534. .item {
  1535. width: 50%;
  1536. font-size: 28rpx;
  1537. margin-bottom: 20rpx;
  1538. // line-height: 45rpx;
  1539. // overflow: hidden;
  1540. // white-space: nowrap;
  1541. // text-overflow: ellipsis;
  1542. // -o-text-overflow: ellipsis;
  1543. // color: #000;
  1544. // display: flex;
  1545. /deep/.u-form-item__body {
  1546. padding: 0 !important;
  1547. }
  1548. /deep/.u-input__content__field-wrapper__field,
  1549. /deep/.u-form-item {
  1550. font-size: 24rpx !important;
  1551. }
  1552. &:nth-of-type(2n) {
  1553. width: 50%;
  1554. }
  1555. text.label {
  1556. width: 100rpx;
  1557. display: inline-block;
  1558. text-align: right;
  1559. margin-right: 20rpx;
  1560. }
  1561. /deep/.uni-date__x-input {
  1562. height: 40rpx;
  1563. flex: 1;
  1564. }
  1565. /deep/.uni-date {
  1566. width: 100%;
  1567. display: inline-block;
  1568. .uni-icons {
  1569. display: none !important;
  1570. }
  1571. .uni-date-x {
  1572. padding: 0 !important;
  1573. }
  1574. }
  1575. }
  1576. .item text {
  1577. color: #666;
  1578. }
  1579. }
  1580. .listBox:last-child {
  1581. border: none !important;
  1582. }
  1583. .textBox {
  1584. border: 1px #f2f2f2 solid;
  1585. height: 160px;
  1586. display: block;
  1587. width: auto !important;
  1588. }
  1589. .saveBtn {
  1590. width: 50%;
  1591. margin: 40rpx auto;
  1592. }
  1593. .top-css {
  1594. border-bottom: 1px solid rgb(207, 204, 204);
  1595. }
  1596. </style>