warehouseManagementLook.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <template>
  2. <div class="container">
  3. <el-row>
  4. <el-col :span="20">
  5. <h2 class="bg-left title">查看仓库详情</h2>
  6. </el-col>
  7. <el-col :span="4" class="bg-right">
  8. <el-button
  9. class="bg-bottom"
  10. type="primary"
  11. size="small"
  12. @click="returnWarehouse()"
  13. ><img
  14. width="6"
  15. height="10"
  16. style="vertical-align: bottom; margin-right: 3px"
  17. src="../../../public/img/lujing.png"
  18. alt=""
  19. />返回</el-button
  20. >
  21. </el-col>
  22. </el-row>
  23. <div class="center">
  24. <ws-form ref="deptBudgetList" :model="deptBudgetList">
  25. <div class="small-title">基本信息</div>
  26. <!--基本信息-->
  27. <ws-info-table>
  28. <!--仓库名称-->
  29. <ws-form-item
  30. class="warehouseName"
  31. label="仓库名称"
  32. span="1"
  33. prop="warehouseName"
  34. >
  35. <ws-select
  36. v-model="deptBudgetList.warehouseName"
  37. placeholder="请输入仓库名称"
  38. class="typeselect"
  39. @change="selectpackingMethod"
  40. >
  41. <ws-option
  42. v-for="item in packtypeList"
  43. :key="item.constKey"
  44. :label="item.warehouseName"
  45. :value="item.warehouseName"
  46. />
  47. </ws-select>
  48. </ws-form-item>
  49. <!--负责人-->
  50. <ws-form-item label="负责人" span="1" prop="personCharge">
  51. {{ deptBudgetList.personCharge }}
  52. </ws-form-item>
  53. <!--负责人电话-->
  54. <ws-form-item
  55. label="负责人电话"
  56. span="1"
  57. prop="personPhone"
  58. class="readonly"
  59. >
  60. {{ deptBudgetList.personPhone }}
  61. </ws-form-item>
  62. <!--仓库所在地-->
  63. <ws-form-item label="仓库所在地" span="1" prop="warehouseLocation">
  64. {{ deptBudgetList.warehousePrivate }}{{deptBudgetList.warehouseCity}}{{deptBudgetList.warehouseArea}}
  65. </ws-form-item>
  66. <!--详细地址-->
  67. <ws-form-item
  68. label="详细地址"
  69. span="1"
  70. prop="detailedAddress"
  71. class="readonly"
  72. >
  73. {{ deptBudgetList.detailedAddress }}
  74. </ws-form-item>
  75. <!--总储量(吨)-->
  76. <ws-form-item label="总储量(吨)" span="1" prop="totalStorage">
  77. {{ totalStorage }}
  78. </ws-form-item>
  79. </ws-info-table>
  80. <div v-for="item in deptBudgetList.warehousePositionInfoList">
  81. <ws-info-table>
  82. <!--仓位编号-->
  83. <ws-form-item
  84. label="仓位编号"
  85. span="1"
  86. prop="binNumber"
  87. class="forlist"
  88. >
  89. {{ item.binNumber }}
  90. </ws-form-item>
  91. <!--最大储量(吨)-->
  92. <ws-form-item
  93. label="最大储量(吨)"
  94. span="1"
  95. prop="maxStorage"
  96. class="forlist"
  97. >
  98. {{ item.maxStorage }}
  99. </ws-form-item>
  100. <!--现有储量-->
  101. <ws-form-item label="现有储量" span="1" prop="nowStorage">
  102. {{ item.nowStorage }}
  103. </ws-form-item>
  104. <!--备注(选填)-->
  105. <ws-form-item label="备注(选填)" span="1" prop="remark">
  106. {{ item.remark }}
  107. </ws-form-item>
  108. </ws-info-table>
  109. </div>
  110. <div class="small-title">仓库照片</div>
  111. </ws-form>
  112. </div>
  113. <div style="text-align: right; padding: 10px">
  114. <el-button
  115. class="bg-bottom-up"
  116. type="primary"
  117. size="small"
  118. @click="returnWarehouse()"
  119. >关闭</el-button
  120. >
  121. </div>
  122. </div>
  123. </template>
  124. <script>
  125. import { xiala, billoperatehis, getLook } from '@/model/warehouse/index'
  126. import { downloadFile } from '@/utils/batchDown'
  127. import Pagination from '@/components/Pagination'
  128. import WsUpload from '@/components/WsUpload'
  129. import { dayjs, fmoney, EventBus } from 'base-core-lib'
  130. export default {
  131. name: 'viewSpareMoney',
  132. components: {
  133. WsUpload,
  134. Pagination,
  135. },
  136. watch: {
  137. vesselId(val) {
  138. this.getList()
  139. },
  140. isShow(val) {
  141. this.showType = val
  142. },
  143. },
  144. data() {
  145. return {
  146. //弹出框
  147. dialogViewSpareMoney: false,
  148. dialogApproveFormVisible: false,
  149. // 船舶类型
  150. monetaryKey: null,
  151. // 表格显示数据
  152. tableDate: [],
  153. // 是否显示
  154. showType: true,
  155. // 年
  156. year: '',
  157. deptBudgetTotal: 0,
  158. currentPage: 1,
  159. pageSize: 10,
  160. searchType: 1,
  161. searchKeyWord: '',
  162. contractType: 2,
  163. startDate: null,
  164. endDate: null,
  165. unitList: [],
  166. // 提交类型
  167. submitType: true,
  168. size: 10,
  169. compId: sessionStorage.getItem('ws-pf_compId'),
  170. deptCircularPage: {},
  171. packtypeList: [],
  172. date: {
  173. year: dayjs().format('YYYY'),
  174. month: dayjs().format('MM'),
  175. },
  176. contractList: [],
  177. deptBudgetList: {},
  178. historyList: [],
  179. pickerBeginDateBefore: {
  180. disabledDate: (time) => {
  181. return time.getTime() > Date.now()
  182. },
  183. },
  184. accessoryTFs: false,
  185. }
  186. },
  187. activated() {
  188. this.selectpackingMethod()
  189. this.showType = this.isShow
  190. this.loaddata()
  191. },
  192. computed : {
  193. totalStorage :function() {
  194. var sum = 0
  195. if(this.deptBudgetList.warehousePositionInfoList){
  196. for(var i = 0;i < this.deptBudgetList.warehousePositionInfoList.length; i++ ){
  197. sum += Number(this.deptBudgetList.warehousePositionInfoList[i].maxStorage)
  198. }
  199. }
  200. return sum
  201. },
  202. },
  203. methods: {
  204. //返回按钮
  205. returnWarehouse() {
  206. this.$router.push({ path: 'warehouseManagementList' })
  207. this.deptBudgetList = {}
  208. },
  209. dateFormat(fmt, date) {
  210. let ret
  211. const opt = {
  212. 'Y+': date.getFullYear().toString(), // 年
  213. 'm+': (date.getMonth() + 1).toString(), // 月
  214. 'd+': date.getDate().toString(), // 日
  215. 'H+': date.getHours().toString(), // 时
  216. // "M+": date.getMinutes().toString(), // 分
  217. // "S+": date.getSeconds().toString() // 秒
  218. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  219. }
  220. for (let k in opt) {
  221. ret = new RegExp('(' + k + ')').exec(fmt)
  222. if (ret) {
  223. fmt = fmt.replace(
  224. ret[1],
  225. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  226. )
  227. }
  228. }
  229. return fmt
  230. },
  231. handleClose() {
  232. this.accessoryTFs = false
  233. },
  234. handleSizeChange(val) {
  235. console.log(`每页 ${val} 条`)
  236. this.pageSize = val
  237. this.getList()
  238. },
  239. handleCurrentChange(val) {
  240. this.currentPage = val
  241. console.log(`当前页: ${val}`)
  242. this.getList()
  243. },
  244. selectpackingMethod(e) {
  245. console.log(e)
  246. for (var i = 0; i < this.packtypeList.length; i++) {
  247. if (this.packtypeList[i].warehouseName == e) {
  248. this.getLook(this.packtypeList[i].id)
  249. }
  250. }
  251. },
  252. loaddata() {
  253. // 仓库名称
  254. xiala({ compId: sessionStorage.getItem('ws-pf_compId') })
  255. .toPromise()
  256. .then((response) => {
  257. this.packtypeList = response
  258. })
  259. },
  260. getLook(compId1) {
  261. getLook({
  262. id: compId1,
  263. })
  264. .toPromise()
  265. .then((response) => {
  266. this.deptBudgetList = response
  267. // console.log(this.deptBudgetList)
  268. })
  269. },
  270. // 关闭 dialog时 处理文件url 初始化upload组件
  271. handleCloe() {
  272. this.dialogViewSpareMoney = false
  273. },
  274. history(row) {
  275. console.log(row)
  276. billoperatehis({ id: row.id })
  277. .toPromise()
  278. .then((response) => {
  279. this.historyList = response
  280. })
  281. },
  282. //删除
  283. approve() {},
  284. listQuery() {},
  285. total() {},
  286. clearfiltQuery() {},
  287. selectCrtDuty() {},
  288. },
  289. }
  290. </script>
  291. <style lang="scss" scoped>
  292. .center {
  293. position: relative;
  294. margin-top: 100px;
  295. top: 30px;
  296. width: 90%;
  297. height: 500px;
  298. margin: 0 auto;
  299. }
  300. .container .bg-left {
  301. padding-left: 40px;
  302. }
  303. .bg-right {
  304. padding: 16px;
  305. text-align: right;
  306. }
  307. .vertical-text-left {
  308. width: 62px;
  309. text-align: right;
  310. }
  311. /deep/.el-form-item {
  312. width: 33.33%;
  313. }
  314. .forlist {
  315. width: 16.67%;
  316. }
  317. //文字基本信息
  318. .center h3 {
  319. margin-left: 42px;
  320. }
  321. //去边框
  322. /deep/.el-form-item {
  323. border-right: 0px;
  324. border-bottom: 0px;
  325. }
  326. /deep/.ws-info-table {
  327. border-left: 0px;
  328. border-top: 0px;
  329. }
  330. .ws-info-table .el-form-item .el-form-item__content {
  331. border-right: 0px;
  332. border-bottom: 0px;
  333. border-left: 0px;
  334. border-top: 0px;
  335. }
  336. /deep/.ws-info-table .el-form-item {
  337. border-right: 0px;
  338. border-bottom: 0px;
  339. border-left: 0px;
  340. border-top: 0px;
  341. }
  342. //背景
  343. /deep/.ws-info-table .el-form-item .el-form-item__content {
  344. background: #f5f7fa;
  345. border-radius: 4px;
  346. border: 1px solid #d8dce6;
  347. font-family: PingFangSC-Regular, PingFang SC;
  348. margin-bottom: 5px;
  349. font-size: 14px;
  350. font-weight: 400;
  351. color: #8890b1;
  352. line-height: 16px;
  353. }
  354. /deep/.ws-info-table .el-form-item .el-form-item__label {
  355. background-color: #fff;
  356. font-size: 14px;
  357. font-family: PingFangSC-Regular, PingFang SC;
  358. font-weight: 400;
  359. color: #8890b1;
  360. line-height: 16px;
  361. }
  362. //多选框
  363. /deep/.el-input__inner {
  364. display: inline-block;
  365. background-color: #fff;
  366. }
  367. /deep/.ws-info-table .warehouseName.el-form-item .el-form-item__content {
  368. background: #fff;
  369. border: none;
  370. }
  371. .title {
  372. position: relative;
  373. }
  374. .title::before {
  375. content: '';
  376. display: inline-block;
  377. width: 5px;
  378. height: 30px;
  379. background: #5473e8;
  380. position: absolute;
  381. left: 0;
  382. }
  383. .ws-info-table {
  384. border-left: 1px solid transparent;
  385. border-top: 1px solid transparent;
  386. }
  387. .el-button--primary {
  388. background-color: #5878e8;
  389. border-color: #5878e8;
  390. }
  391. .el-col {
  392. background: #f6f7fc;
  393. }
  394. .small-title {
  395. position: relative;
  396. padding: 10px;
  397. font-weight: 600;
  398. }
  399. .small-title::before {
  400. position: absolute;
  401. content: '';
  402. display: block;
  403. background: #5473e8;
  404. width: 4px;
  405. height: 14px;
  406. left: 0px;
  407. top: 13px;
  408. }
  409. </style>