|
@@ -0,0 +1,471 @@
|
|
|
+<!--仓库详情-->
|
|
|
+<template>
|
|
|
+ <div class="container">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="20">
|
|
|
+ <h2 class="bg-left title">查看仓库详情</h2>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" class="bg-right">
|
|
|
+ <el-button
|
|
|
+ class="bg-bottom"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="returnWarehouse()"
|
|
|
+ ><img
|
|
|
+ width="6"
|
|
|
+ height="10"
|
|
|
+ style="vertical-align: bottom; margin-right: 3px"
|
|
|
+ src="../../../public/img/lujing.png"
|
|
|
+ alt=""
|
|
|
+ />返回</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="center">
|
|
|
+ <el-radio-group v-model="warehouseType" @change="warehouseTypechange">
|
|
|
+ <el-radio label="1">常用仓库</el-radio>
|
|
|
+ <el-radio label="2">临时仓库</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <ws-form ref="deptBudgetList" :model="deptBudgetList">
|
|
|
+ <div class="small-title">基本信息</div>
|
|
|
+ <!--基本信息-->
|
|
|
+ <ws-info-table>
|
|
|
+ <!--仓库名称-->
|
|
|
+ <ws-form-item
|
|
|
+ class="warehouseName"
|
|
|
+ label="仓库名称"
|
|
|
+ span="1"
|
|
|
+ prop="warehouseName"
|
|
|
+ >
|
|
|
+ <ws-select
|
|
|
+ v-model="deptBudgetList.warehouseName"
|
|
|
+ placeholder="请输入仓库名称"
|
|
|
+ class="typeselect"
|
|
|
+ @change="selectpackingMethod"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in packtypeList"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.warehouseName"
|
|
|
+ :value="item.warehouseName"
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <!--负责人-->
|
|
|
+ <ws-form-item label="负责人" span="1" prop="personCharge">
|
|
|
+ {{ deptBudgetList.personCharge }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--负责人电话-->
|
|
|
+ <ws-form-item
|
|
|
+ label="负责人电话"
|
|
|
+ span="1"
|
|
|
+ prop="personPhone"
|
|
|
+ class="readonly"
|
|
|
+ >
|
|
|
+ {{ deptBudgetList.personPhone }}
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="其他负责人" span="1" prop="otherPersonCharge">
|
|
|
+ {{ deptBudgetList.otherPersonCharge }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--仓库所在地-->
|
|
|
+ <ws-form-item label="仓库所在地" span="1" prop="warehouseLocation">
|
|
|
+ {{ deptBudgetList.warehousePrivate
|
|
|
+ }}{{ deptBudgetList.warehouseCity
|
|
|
+ }}{{ deptBudgetList.warehouseArea }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--详细地址-->
|
|
|
+ <ws-form-item
|
|
|
+ label="详细地址"
|
|
|
+ span="1"
|
|
|
+ prop="detailedAddress"
|
|
|
+ class="readonly"
|
|
|
+ >
|
|
|
+ {{ deptBudgetList.detailedAddress }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--总储量(吨)-->
|
|
|
+ <ws-form-item
|
|
|
+ v-show="warehouseType == '1'"
|
|
|
+ label="总储量(吨)"
|
|
|
+ span="1"
|
|
|
+ prop="totalStorage"
|
|
|
+
|
|
|
+ >
|
|
|
+ {{ totalStorage }}
|
|
|
+ </ws-form-item>
|
|
|
+ </ws-info-table>
|
|
|
+
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in deptBudgetList.warehousePositionInfoList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <ws-info-table>
|
|
|
+ <!--仓位编号-->
|
|
|
+ <ws-form-item
|
|
|
+ label="仓位编号"
|
|
|
+ span="1"
|
|
|
+ prop="binNumber"
|
|
|
+ class="forlist"
|
|
|
+ >
|
|
|
+ {{ item.binNumber }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--最大储量(吨)-->
|
|
|
+ <ws-form-item
|
|
|
+ label="最大储量(吨)"
|
|
|
+ span="1"
|
|
|
+ prop="maxStorage"
|
|
|
+ class="forlist"
|
|
|
+ >
|
|
|
+ {{ item.maxStorage }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--现有储量-->
|
|
|
+ <ws-form-item
|
|
|
+ :label="'现有储量(' + item.nowStorage + '吨)'"
|
|
|
+ span="1"
|
|
|
+ prop="detailStorage"
|
|
|
+ >
|
|
|
+ {{ item.detailStorage }}
|
|
|
+ </ws-form-item>
|
|
|
+ <!--备注(选填)-->
|
|
|
+ <ws-form-item label="备注(选填)" span="1" prop="remark">
|
|
|
+ {{ item.remark }}
|
|
|
+ </ws-form-item>
|
|
|
+ </ws-info-table>
|
|
|
+ </div>
|
|
|
+ <div class="small-title" v-show="warehouseType == '1'">仓库照片</div>
|
|
|
+ <div class="addressUrls">
|
|
|
+ <div v-for="(items, index) in addressUrls" class="addressUrl">
|
|
|
+ <img
|
|
|
+ v-show="addressUrls.length > 0"
|
|
|
+ width="100"
|
|
|
+ height="100"
|
|
|
+ :src="items"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </ws-form>
|
|
|
+ </div>
|
|
|
+ <div style="text-align: right; padding: 10px">
|
|
|
+ <el-button
|
|
|
+ class="bg-bottom-up"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="returnWarehouse()"
|
|
|
+ >关闭</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { xiala, billoperatehis, getLook } from '@/model/warehouse/index'
|
|
|
+import Pagination from '@/components/Pagination'
|
|
|
+import WsUpload from '@/components/WsUpload'
|
|
|
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
|
+export default {
|
|
|
+ name: 'viewSpareMoney',
|
|
|
+ components: {
|
|
|
+ WsUpload,
|
|
|
+ Pagination,
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ vesselId(val) {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ isShow(val) {
|
|
|
+ this.showType = val
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ //弹出框
|
|
|
+ dialogViewSpareMoney: false,
|
|
|
+ dialogApproveFormVisible: false,
|
|
|
+ // 船舶类型
|
|
|
+ monetaryKey: null,
|
|
|
+ // 表格显示数据
|
|
|
+ tableDate: [],
|
|
|
+ // 是否显示
|
|
|
+ showType: true,
|
|
|
+ // 年
|
|
|
+ year: '',
|
|
|
+ radio: 1,
|
|
|
+ deptBudgetTotal: 0,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ searchType: 1,
|
|
|
+ searchKeyWord: '',
|
|
|
+ contractType: 2,
|
|
|
+ startDate: null,
|
|
|
+ endDate: null,
|
|
|
+ unitList: [],
|
|
|
+ warehouseType: '1',
|
|
|
+ // 提交类型
|
|
|
+ submitType: true,
|
|
|
+ size: 10,
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ deptCircularPage: {},
|
|
|
+ packtypeList: [],
|
|
|
+ date: {
|
|
|
+ year: dayjs().format('YYYY'),
|
|
|
+ month: dayjs().format('MM'),
|
|
|
+ },
|
|
|
+ contractList: [],
|
|
|
+ deptBudgetList: {},
|
|
|
+ historyList: [],
|
|
|
+
|
|
|
+ pickerBeginDateBefore: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ return time.getTime() > Date.now()
|
|
|
+ },
|
|
|
+ },
|
|
|
+ accessoryTFs: false,
|
|
|
+ addressUrls: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ // this.selectpackingMethod()
|
|
|
+ this.showType = this.isShow
|
|
|
+ this.loaddata()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ totalStorage: function () {
|
|
|
+ var sum = 0
|
|
|
+ if (this.deptBudgetList.warehousePositionInfoList) {
|
|
|
+ for (
|
|
|
+ var i = 0;
|
|
|
+ i < this.deptBudgetList.warehousePositionInfoList.length;
|
|
|
+ i++
|
|
|
+ ) {
|
|
|
+ sum += Number(
|
|
|
+ this.deptBudgetList.warehousePositionInfoList[i].maxStorage
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return sum
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //返回按钮
|
|
|
+ returnWarehouse() {
|
|
|
+ this.deptBudgetList = {}
|
|
|
+ this.addressUrls = []
|
|
|
+ this.$router.push({ path: 'warehouseManagementList' })
|
|
|
+ },
|
|
|
+ warehouseTypechange() {
|
|
|
+ this.addressUrls = []
|
|
|
+ this.deptBudgetList = {}
|
|
|
+ this.loaddata()
|
|
|
+ },
|
|
|
+ dateFormat(fmt, date) {
|
|
|
+ let ret
|
|
|
+ const opt = {
|
|
|
+ 'Y+': date.getFullYear().toString(), // 年
|
|
|
+ 'm+': (date.getMonth() + 1).toString(), // 月
|
|
|
+ 'd+': date.getDate().toString(), // 日
|
|
|
+ 'H+': date.getHours().toString(), // 时
|
|
|
+ // "M+": date.getMinutes().toString(), // 分
|
|
|
+ // "S+": date.getSeconds().toString() // 秒
|
|
|
+ // 有其他格式化字符需求可以继续添加,必须转化成字符串
|
|
|
+ }
|
|
|
+ for (let k in opt) {
|
|
|
+ ret = new RegExp('(' + k + ')').exec(fmt)
|
|
|
+ if (ret) {
|
|
|
+ fmt = fmt.replace(
|
|
|
+ ret[1],
|
|
|
+ ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return fmt
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.accessoryTFs = false
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.pageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ selectpackingMethod(e) {
|
|
|
+ console.log(e)
|
|
|
+ for (var i = 0; i < this.packtypeList.length; i++) {
|
|
|
+ if (this.packtypeList[i].warehouseName == e) {
|
|
|
+ this.getLook(this.packtypeList[i].id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ loaddata() {
|
|
|
+ // 仓库名称
|
|
|
+ xiala({
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ warehouseType: this.warehouseType,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.packtypeList = response
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getLook(compId1) {
|
|
|
+ getLook({
|
|
|
+ id: compId1,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.deptBudgetList = response
|
|
|
+ this.addressUrls = this.deptBudgetList.addressUrl.split(',')
|
|
|
+ this.addressUrls.pop()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 关闭 dialog时 处理文件url 初始化upload组件
|
|
|
+ handleCloe() {
|
|
|
+ this.dialogViewSpareMoney = false
|
|
|
+ },
|
|
|
+ history(row) {
|
|
|
+ console.log(row)
|
|
|
+ billoperatehis({ id: row.id })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.historyList = response
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.center {
|
|
|
+ position: relative;
|
|
|
+ margin-top: 100px;
|
|
|
+ top: 30px;
|
|
|
+ width: 90%;
|
|
|
+ height: 500px;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+.container .bg-left {
|
|
|
+ padding-left: 40px;
|
|
|
+}
|
|
|
+.bg-right {
|
|
|
+ padding: 16px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+.vertical-text-left {
|
|
|
+ width: 62px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+/deep/.el-form-item {
|
|
|
+ width: 33.33%;
|
|
|
+}
|
|
|
+.forlist {
|
|
|
+ width: 16.67%;
|
|
|
+}
|
|
|
+/deep/.forlist .el-form-item__label {
|
|
|
+ width: 60% !important;
|
|
|
+}
|
|
|
+
|
|
|
+//文字基本信息
|
|
|
+.center h3 {
|
|
|
+ margin-left: 42px;
|
|
|
+}
|
|
|
+//去边框
|
|
|
+/deep/.el-form-item {
|
|
|
+ border-right: 0px;
|
|
|
+ border-bottom: 0px;
|
|
|
+}
|
|
|
+/deep/.ws-info-table {
|
|
|
+ border-left: 0px;
|
|
|
+ border-top: 0px;
|
|
|
+}
|
|
|
+.ws-info-table .el-form-item .el-form-item__content {
|
|
|
+ border-right: 0px;
|
|
|
+ border-bottom: 0px;
|
|
|
+ border-left: 0px;
|
|
|
+ border-top: 0px;
|
|
|
+}
|
|
|
+/deep/.ws-info-table .el-form-item {
|
|
|
+ border-right: 0px;
|
|
|
+ border-bottom: 0px;
|
|
|
+ border-left: 0px;
|
|
|
+ border-top: 0px;
|
|
|
+}
|
|
|
+//背景
|
|
|
+/deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
|
+ background: #f5f7fa;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #d8dce6;
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #8890b1;
|
|
|
+ line-height: 16px;
|
|
|
+}
|
|
|
+/deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
|
+ background-color: #fff;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #8890b1;
|
|
|
+ line-height: 16px;
|
|
|
+ width: 30%;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+//多选框
|
|
|
+/deep/.el-input__inner {
|
|
|
+ display: inline-block;
|
|
|
+ background-color: #fff;
|
|
|
+}
|
|
|
+/deep/.ws-info-table .warehouseName.el-form-item .el-form-item__content {
|
|
|
+ background: #fff;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+.title {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.title::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+}
|
|
|
+.ws-info-table {
|
|
|
+ border-left: 1px solid transparent;
|
|
|
+ border-top: 1px solid transparent;
|
|
|
+}
|
|
|
+.el-button--primary {
|
|
|
+ background-color: #5878e8;
|
|
|
+ border-color: #5878e8;
|
|
|
+}
|
|
|
+.el-col {
|
|
|
+ background: #f6f7fc;
|
|
|
+}
|
|
|
+.small-title {
|
|
|
+ position: relative;
|
|
|
+ padding: 10px;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
+.small-title::before {
|
|
|
+ position: absolute;
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ background: #5473e8;
|
|
|
+ width: 4px;
|
|
|
+ height: 14px;
|
|
|
+ left: 0px;
|
|
|
+ top: 13px;
|
|
|
+}
|
|
|
+.addressUrls {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+.addressUrl {
|
|
|
+ margin: 0 10px;
|
|
|
+ border-radius: 3px;
|
|
|
+}
|
|
|
+</style>
|