details copy.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  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. ></uni-nav-bar>
  10. <CellInfo label="单号" :value="infoData.bizNum"></CellInfo>
  11. <CellInfo
  12. label="状态"
  13. :value="getDictName(auditStatus, infoData.verifyStatus)"
  14. :valueClass="getAuditStatus(infoData.verifyStatus).class"
  15. >
  16. </CellInfo>
  17. <CellInfo label="创建时间" :value="infoData.createTime"></CellInfo>
  18. <uni-section title="基本信息" type="line">
  19. <CellInfo
  20. label="来源单据"
  21. :value="infoData.documentSource"
  22. :isLink="true"
  23. ></CellInfo>
  24. <CellInfo
  25. label="出库类型"
  26. :value="getDictValue('物品类型', infoData.assetType)"
  27. ></CellInfo>
  28. <CellInfo label="权属部门" :value="infoData.deptName"></CellInfo>
  29. <CellInfo label="出库登记人" :value="infoData.createUserName"></CellInfo>
  30. <CellInfo label="出库时间" :value="infoData.verifyTime"></CellInfo>
  31. <CellInfo label="审核人" :value="infoData.verifyName"></CellInfo>
  32. <CellInfo label="领料人" :value="infoData.deliveryName"></CellInfo>
  33. <CellInfo
  34. label="领料人联系方式"
  35. :value="infoData.deliveryPhone"
  36. ></CellInfo>
  37. <CellInfo
  38. label="紧急状态"
  39. :value="getDictName(emergencyState, infoData.urgent)"
  40. ></CellInfo>
  41. <CellInfo label="备注" :value="infoData.remark"></CellInfo>
  42. </uni-section>
  43. <uni-section title="出库明细" type="line" class="listContent">
  44. <u-collapse>
  45. <u-collapse-item
  46. :open="false"
  47. :typeOpen="false"
  48. v-for="(item, index) in warehousingMaterialList"
  49. :key="index"
  50. >
  51. <template slot="title">
  52. <view class="listBox">
  53. <view class="listCont">
  54. <view style="width: 100%">{{ item.assetCode }}</view>
  55. <view class="item"
  56. ><text class="label">名称:</text>{{ item.assetName }}</view
  57. >
  58. <view
  59. class="item"
  60. v-for="(itm, index) in tableHeader"
  61. :key="index"
  62. ><text class="label">{{ itm.label }}:</text
  63. >{{ item[itm.prop] }}</view
  64. >
  65. <view class="item"
  66. ><text class="label">出库数量:</text>
  67. <text style="margin-right: 20rpx"
  68. >{{ item.selfSum }} {{ item.unit }}</text
  69. >
  70. <template v-if="!item.isUnpack"
  71. >{{ item.outInNum }}{{ item.minPackUnit }}</template
  72. ></view
  73. >
  74. </view>
  75. </view>
  76. </template>
  77. <view
  78. v-for="(itm, index) in item.warehouseLedgerDetails"
  79. class="codeList"
  80. :key="index"
  81. >
  82. <view class="listBox codeMsg">
  83. <view class="listCont">
  84. <view style="width: 100%" class="item">
  85. <text class="label">货位:</text
  86. ><text class="content">
  87. {{ itm.warehouseName }}-{{ itm.areaName }}-{{
  88. itm.shelfCode
  89. }}-{{ itm.cargoSpaceCode }}</text
  90. >
  91. </view>
  92. <view class="item" style="width: 100%">
  93. <text class="label"
  94. >{{
  95. getDictValue('物品类型', infoData.assetType)
  96. }}编码:</text
  97. ><text class="content">{{ itm.onlyCode }}</text>
  98. </view>
  99. <view class="item">
  100. <text class="label">批次号:</text
  101. ><text class="content">{{ itm.batchNum }}</text>
  102. </view>
  103. <view class="item" v-if="!item.isUnpack">
  104. <text class="label">最小包装单元:</text
  105. ><text class="content"
  106. >{{ itm.measurementUnit }}{{ itm.unit }} /{{
  107. itm.minPackUnit
  108. }}</text
  109. >
  110. </view>
  111. <view class="item">
  112. <text class="label">包装编码:</text
  113. ><text class="content">{{ itm.num }}</text>
  114. </view>
  115. <view class="item" style="width: 100%">
  116. <text class="label">转消耗:</text
  117. ><text class="content">
  118. <u-checkbox-group disabled>
  119. <u-checkbox
  120. :size="30"
  121. :checked="!!itm.isTransferAsset"
  122. :name="true"
  123. ></u-checkbox> </u-checkbox-group
  124. ></text>
  125. </view>
  126. <view
  127. class="item w100"
  128. v-if="itm.manufactureTime || !itm.procurementTime"
  129. >
  130. <text class="label">生产日期:</text
  131. ><text class="content">{{ itm.manufactureTime }}</text>
  132. </view>
  133. <view class="item w100" v-if="itm.procurementTime">
  134. <text class="label">采购日期:</text
  135. ><text class="content">{{ itm.procurementTime }}</text>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </u-collapse-item>
  141. </u-collapse>
  142. </uni-section>
  143. </view>
  144. </template>
  145. <script>
  146. import {
  147. warehousingType,
  148. sceneState,
  149. inputStatus,
  150. emergencyState,
  151. auditStatus,
  152. getDictName,
  153. getDict,
  154. materialType
  155. } from '../enum.js'
  156. import CellInfo from '@/components/CellInfo.vue'
  157. import { post, get } from '@/utils/api.js'
  158. import { tableHeader } from '../common'
  159. import getinput from '@/components/Getinput'
  160. import dictMixins from '@/mixins/dictMixins'
  161. export default {
  162. mixins: [dictMixins],
  163. components: {
  164. getinput,
  165. CellInfo
  166. // addDetails,
  167. },
  168. data () {
  169. return {
  170. materialType,
  171. emergencyState,
  172. warehousingType,
  173. auditStatus,
  174. getAuditStatus: getDict(auditStatus),
  175. getDictName,
  176. id: '',
  177. code: '',
  178. infoData: {},
  179. warehousingMaterialList: []
  180. }
  181. },
  182. onLoad (params) {
  183. this.id = params.id
  184. this.requestDict('物品类型')
  185. },
  186. onShow () {
  187. this.getDetails()
  188. },
  189. computed: {
  190. tableHeader () {
  191. return tableHeader(this.infoData.assetType)
  192. },
  193. // 条码信息
  194. materialCodeReqList () {
  195. return this.warehousingMaterialList
  196. .map(i => i.warehouseLedgerDetails || [])
  197. .flat()
  198. },
  199. warehousingName () {
  200. return getDictName(warehousingType, this.infoData.assetType)
  201. }
  202. },
  203. methods: {
  204. //获取信息
  205. getDetails () {
  206. get(this.apiUrl + `/outInWarehouse/select/detail/${this.id}`, {})
  207. .then(res => {
  208. if (res?.success) {
  209. this.warehousingMaterialList = res.data.warehouseLedgerInfos.map(
  210. item => {
  211. item.selfSum = (item.warehouseLedgerDetails || []).reduce(
  212. (sum, pre) => {
  213. if (item.isUnpack) {
  214. return ++sum
  215. }
  216. return sum + pre.measurementUnit
  217. },
  218. 0
  219. )
  220. return item
  221. }
  222. )
  223. this.infoData = res.data.outInWarehouse
  224. }
  225. })
  226. .catch(res => {})
  227. }
  228. }
  229. }
  230. </script>
  231. <style lang="scss" scoped>
  232. .mainBox {
  233. padding-bottom: 120rpx;
  234. /deep/.content-class {
  235. background-color: rgba(240, 243, 243, 1);
  236. }
  237. }
  238. .codeList {
  239. display: flex;
  240. justify-content: space-between;
  241. align-items: center;
  242. }
  243. .picList {
  244. display: flex;
  245. align-items: center;
  246. justify-items: flex-start;
  247. flex-wrap: wrap;
  248. }
  249. /deep/.picList .u-image {
  250. margin-right: 10rpx;
  251. margin-bottom: 10rpx;
  252. }
  253. /deep/.cLine .u-line:nth-child(1) {
  254. border-bottom: none !important;
  255. }
  256. .listContent {
  257. position: relative;
  258. // bottom: 50px;
  259. .selectEnterType {
  260. position: absolute;
  261. right: 10px;
  262. top: 10px;
  263. }
  264. .more {
  265. position: absolute;
  266. bottom: 26rpx;
  267. right: 30rpx;
  268. font-size: 28rpx;
  269. color: #fff !important;
  270. background-color: #36a82c;
  271. }
  272. }
  273. .footBox {
  274. position: fixed;
  275. left: 0px;
  276. bottom: 0px;
  277. height: 100rpx;
  278. width: 100%;
  279. display: flex;
  280. align-items: center;
  281. justify-content: space-between;
  282. view {
  283. width: 50%;
  284. height: 100%;
  285. text-align: center;
  286. color: #fff;
  287. display: flex;
  288. align-items: center;
  289. justify-content: center;
  290. }
  291. .reg {
  292. background: $u-success-dark;
  293. }
  294. .uni-icons {
  295. margin-right: 8rpx !important;
  296. }
  297. }
  298. .listBox {
  299. border-bottom: 1px #f2f2f2 solid;
  300. position: relative;
  301. .listTit {
  302. display: flex;
  303. align-items: center;
  304. .name {
  305. width: 50%;
  306. margin-left: 10px;
  307. overflow: hidden;
  308. white-space: nowrap;
  309. -o-text-overflow: ellipsis;
  310. text-overflow: ellipsis;
  311. font-size: 30rpx;
  312. }
  313. .weight {
  314. font-size: 30rpx;
  315. margin-left: auto;
  316. margin-right: 60rpx;
  317. position: relative;
  318. }
  319. .weight::after {
  320. position: absolute;
  321. right: -30rpx;
  322. top: 50%;
  323. content: '';
  324. background: #eee;
  325. width: 1px;
  326. height: 28rpx;
  327. margin-top: -14rpx;
  328. }
  329. }
  330. .listCont {
  331. display: flex;
  332. align-items: center;
  333. flex-wrap: wrap;
  334. margin-top: 20rpx;
  335. margin-left: 10rpx;
  336. .item {
  337. width: 50%;
  338. font-size: $uni-font-size-sm;
  339. line-height: 45rpx;
  340. overflow: hidden;
  341. color: #000;
  342. display: flex;
  343. .label {
  344. margin-right: 10rpx;
  345. white-space: nowrap;
  346. }
  347. .content {
  348. flex: 1;
  349. word-break: break-all;
  350. }
  351. }
  352. .item text {
  353. color: #666;
  354. }
  355. }
  356. .more {
  357. position: absolute;
  358. bottom: 26rpx;
  359. right: 30rpx;
  360. font-size: 28rpx;
  361. color: #666;
  362. }
  363. }
  364. .listBox:last-child {
  365. border: none !important;
  366. }
  367. .xuanze-css {
  368. color: #eee;
  369. background-color: #36a82c;
  370. font-size: 15px;
  371. position: absolute;
  372. right: 0px;
  373. top: 7px;
  374. cursor: pointer;
  375. }
  376. .btn-top {
  377. width: 100%;
  378. height: 70px;
  379. background-color: #fff;
  380. border-top: 1px solid rgb(211, 208, 208);
  381. position: fixed;
  382. top: 90%;
  383. z-index: 1px;
  384. display: flex;
  385. justify-content: right;
  386. line-height: 70px;
  387. view {
  388. width: 55px;
  389. text-align: center;
  390. color: #fff;
  391. margin-left: 6px;
  392. background-color: #36a82c;
  393. }
  394. }
  395. .jian-css {
  396. background-color: #36a82c;
  397. color: #fff;
  398. border-radius: 2px;
  399. }
  400. .laing-css {
  401. background-color: #409eff;
  402. color: #fff;
  403. border-radius: 2px;
  404. }
  405. </style>