123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413 |
- <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">
- <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="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 label="总储量(吨)" span="1" prop="totalStorage">
- {{ totalStorage }}
- </ws-form-item>
- </ws-info-table>
- <div v-for="item in deptBudgetList.warehousePositionInfoList">
- <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="现有储量" span="1" prop="nowStorage">
-
- {{ item.nowStorage }}
- </ws-form-item>
- <!--备注(选填)-->
- <ws-form-item label="备注(选填)" span="1" prop="remark">
- {{ item.remark }}
- </ws-form-item>
- </ws-info-table>
- </div>
- <div class="small-title">仓库照片</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 { downloadFile } from '@/utils/batchDown'
- 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: '',
- deptBudgetTotal: 0,
- currentPage: 1,
- pageSize: 10,
- searchType: 1,
- searchKeyWord: '',
- contractType: 2,
- startDate: null,
- endDate: null,
- unitList: [],
- // 提交类型
- 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,
- }
- },
- 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.$router.push({ path: 'warehouseManagementList' })
- this.deptBudgetList = {}
- },
- 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') })
- .toPromise()
- .then((response) => {
- this.packtypeList = response
- })
- },
- getLook(compId1) {
- getLook({
- id: compId1,
- })
- .toPromise()
- .then((response) => {
- this.deptBudgetList = response
- // console.log(this.deptBudgetList)
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- history(row) {
- console.log(row)
- billoperatehis({ id: row.id })
- .toPromise()
- .then((response) => {
- this.historyList = response
- })
- },
- //删除
- approve() {},
- listQuery() {},
- total() {},
- clearfiltQuery() {},
- selectCrtDuty() {},
- },
- }
- </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%;
- }
- //文字基本信息
- .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-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- line-height: 16px;
- }
- //多选框
- /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;
- }
- </style>
|