|
@@ -0,0 +1,450 @@
|
|
|
|
+<!--仓库管理-->
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <BaseHeaderLayout :leftSpan="15">
|
|
|
|
+
|
|
|
|
+ <template slot="left">
|
|
|
|
+ <div >
|
|
|
|
+ <el-radio-group
|
|
|
|
+ v-model="warehouseType"
|
|
|
|
+ @change="changeradio"
|
|
|
|
+ size="small"
|
|
|
|
+ >
|
|
|
|
+ <el-radio-button label="1">常用仓库</el-radio-button>
|
|
|
|
+ <el-radio-button label="2">临时仓库</el-radio-button>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot="right">
|
|
|
|
+ <ws-input
|
|
|
|
+ v-model="warehouseName"
|
|
|
|
+ placeholder="请输入仓库名"
|
|
|
|
+ clearable
|
|
|
|
+ maxlength="500"
|
|
|
|
+ type="input"
|
|
|
|
+ class="findValue"
|
|
|
|
+ ></ws-input>
|
|
|
|
+ <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
|
|
|
|
+ <ws-button class="find" type="primary" @click="find()"
|
|
|
|
+ ><img
|
|
|
|
+ width="16"
|
|
|
|
+ height="16"
|
|
|
|
+ style="
|
|
|
|
+ vertical-align: text-top;
|
|
|
|
+ position: relative;
|
|
|
|
+ top: 0px;
|
|
|
|
+ left: -8px;
|
|
|
|
+ "
|
|
|
|
+ src="../../../public/img/sousuo.png"
|
|
|
|
+ alt=""
|
|
|
|
+ /></ws-button>
|
|
|
|
+ </template>
|
|
|
|
+ </BaseHeaderLayout>
|
|
|
|
+ <div v-show="this.warehouseType == '1'">
|
|
|
|
+ <el-table
|
|
|
|
+ class="wenzi"
|
|
|
|
+ :data="warehouseList"
|
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
|
+ height="780"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="序号" type="index" show-overflow-tooltip width="50">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="warehouseName" label="仓库" >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="binNumber" label="货名" >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="capacity" label="储量(吨)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="加权成本(元/吨)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div
|
|
|
|
+ style="height: 24px"
|
|
|
|
+ v-for="(item, i) in scope.row.warehouseNumViewList"
|
|
|
|
+ >
|
|
|
|
+ {{ item.goodsName }}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="价值(元)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div
|
|
|
|
+ style="height: 24px"
|
|
|
|
+ v-for="(item, i) in scope.row.warehouseNumViewList"
|
|
|
|
+ >
|
|
|
|
+ {{item.inNetWeight}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column prop="address" label="操作" width="200">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div class="record" v-hasPermission="
|
|
|
|
+ `warehouseManagement.warehouse.warehouseInfo.view`
|
|
|
|
+ " @click="record(scope.row)">修改</div>
|
|
|
|
+ <div class="adjustment" v-hasPermission="
|
|
|
|
+ `warehouseManagement.warehouse.warehouseInfo.view`
|
|
|
|
+ " @click="loss(scope.row)">加权明细</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-show="this.warehouseType == '2'">
|
|
|
|
+ <el-table
|
|
|
|
+ class="wenzi"
|
|
|
|
+ :data="warehouseList"
|
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
|
+ height="780"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="序号" type="index" show-overflow-tooltip width="50">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="warehouseName" label="仓库" >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="binNumber" label="货名" >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="capacity" label="储量(吨)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="加权成本(元/吨)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div
|
|
|
|
+ style="height: 24px"
|
|
|
|
+ v-for="(item, i) in scope.row.warehouseNumViewList"
|
|
|
|
+ >
|
|
|
|
+ {{ item.goodsName }}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="价值(元)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div
|
|
|
|
+ style="height: 24px"
|
|
|
|
+ v-for="(item, i) in scope.row.warehouseNumViewList"
|
|
|
|
+ >
|
|
|
|
+ {{item.inNetWeight}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column prop="address" label="操作" width="200">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div class="record" v-hasPermission="
|
|
|
|
+ `warehouseManagement.warehouse.warehouseInfo.view`
|
|
|
|
+ " @click="record(scope.row)">修改</div>
|
|
|
|
+ <div class="adjustment" v-hasPermission="
|
|
|
|
+ `warehouseManagement.warehouse.warehouseInfo.view`
|
|
|
|
+ " @click="loss(scope.row)">加权明细</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import {
|
|
|
|
+ getcost,
|
|
|
|
+ export1,
|
|
|
|
+ editstatus,
|
|
|
|
+ billoperatehis,
|
|
|
|
+ clearancee,
|
|
|
|
+} from '@/model/warehouse/index'
|
|
|
|
+import { downloadFile } from '@/utils/batchDown'
|
|
|
|
+import Pagination from '@/components/Pagination'
|
|
|
|
+import WsUpload from '@/components/WsUpload'
|
|
|
|
+import { EventBus } from 'base-core-lib'
|
|
|
|
+export default {
|
|
|
|
+ name: 'viewSpareMoney',
|
|
|
|
+ components: {
|
|
|
|
+ WsUpload,
|
|
|
|
+ Pagination,
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ vesselId(val) {
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ isShow(val) {
|
|
|
|
+ this.showType = val
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ currectPage:1,
|
|
|
|
+ pageSize:10,
|
|
|
|
+ //弹出框
|
|
|
|
+ dialogViewSpareMoney: false,
|
|
|
|
+ dialogApproveFormVisible: false,
|
|
|
|
+ // 船舶类型
|
|
|
|
+ monetaryKey: null,
|
|
|
|
+ // 表格显示数据
|
|
|
|
+ tableDate: [],
|
|
|
|
+
|
|
|
|
+ // 是否显示
|
|
|
|
+ showType: true,
|
|
|
|
+ // 年
|
|
|
|
+ year: '',
|
|
|
|
+
|
|
|
|
+ searchType: 1,
|
|
|
|
+ searchTypeText: '未完成',
|
|
|
|
+ searchKeyWord: '',
|
|
|
|
+ contractType: 2,
|
|
|
|
+ warehouseType: '1',
|
|
|
|
+ // 提交类型
|
|
|
|
+ submitType: true,
|
|
|
|
+ size: 10,
|
|
|
|
+ spanArr: [],
|
|
|
|
+ warehouseName: '',
|
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
|
+ deptCircularPage: {},
|
|
|
|
+ warehouseList: [],
|
|
|
|
+ deptBudgetList: {},
|
|
|
|
+ historyList: [],
|
|
|
|
+ deptBudgetTotal: 0,
|
|
|
|
+ pickerBeginDateBefore: {
|
|
|
|
+ disabledDate: (time) => {
|
|
|
|
+ return time.getTime() > Date.now()
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ accessoryTFs: false,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ activated() {
|
|
|
|
+ this.getList()
|
|
|
|
+ this.showType = this.isShow
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ methods: {
|
|
|
|
+ //查看
|
|
|
|
+ handleLook() {
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementLook' })
|
|
|
|
+ },
|
|
|
|
+ //添加
|
|
|
|
+ handleAdd() {
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementAdd' })
|
|
|
|
+ },
|
|
|
|
+ //编辑
|
|
|
|
+ handleEdit() {
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementEdit' })
|
|
|
|
+ },
|
|
|
|
+ handleDelete() {
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementDelete' })
|
|
|
|
+ },
|
|
|
|
+ //任务
|
|
|
|
+ handlTask(){
|
|
|
|
+ this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
|
|
|
|
+ },
|
|
|
|
+ handleClose() {
|
|
|
|
+ this.accessoryTFs = false
|
|
|
|
+ },
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
|
+ this.pageSize = val
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val
|
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ getList() {
|
|
|
|
+ getcost({
|
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
|
+ warehouseName: this.warehouseName,
|
|
|
|
+ warehouseType: this.warehouseType,
|
|
|
|
+ currectPage:this.currectPage,
|
|
|
|
+ pageSize:this.pageSize
|
|
|
|
+ })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.warehouseList = response
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ editClick(row) {
|
|
|
|
+ var status = ''
|
|
|
|
+ if (row.status == '待执行' || row.status == '已完成') {
|
|
|
|
+ status = '执行中'
|
|
|
|
+ } else if (row.status == '执行中') {
|
|
|
|
+ status = '已完成'
|
|
|
|
+ }
|
|
|
|
+ //cancelButtonClass: "btn-custom-cancel"
|
|
|
|
+ this.$confirm(`是否将状态改为${status}`, {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ editstatus({ id: row.id })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$notify.success({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '状态修改成功',
|
|
|
|
+ })
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
|
|
+ .catch((response) => {
|
|
|
|
+ // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ selecttaskType(e) {
|
|
|
|
+ for (var i = 0; i < this.taskTypeList.length; i++) {
|
|
|
|
+ if (this.taskTypeList[i].value == e) {
|
|
|
|
+ this.searchType = this.taskTypeList[i].type
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ fujian(row) {
|
|
|
|
+ if (
|
|
|
|
+ row.receiveAttachmentPath === null ||
|
|
|
|
+ row.receiveAttachmentPath === ''
|
|
|
|
+ ) {
|
|
|
|
+ EventBus.$emit(
|
|
|
|
+ 'warning',
|
|
|
|
+ this.$t('system.noticeCircular.NoInformation')
|
|
|
|
+ )
|
|
|
|
+ } else {
|
|
|
|
+ this.accessoryTFs = true
|
|
|
|
+ }
|
|
|
|
+ this.appendixIdss = row.receiveAttachmentPath
|
|
|
|
+ },
|
|
|
|
+ handleExamine(row) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'salesContractExamine',
|
|
|
|
+ query: { id: row.id },
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 关闭 dialog时 处理文件url 初始化upload组件
|
|
|
|
+ handleCloe() {
|
|
|
|
+ this.dialogViewSpareMoney = false
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ history(row) {
|
|
|
|
+ billoperatehis({ id: row.id })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.historyList = response
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ find() {
|
|
|
|
+ this.currentPage = 1
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ async exportlist() {
|
|
|
|
+ const { data } = await export1(
|
|
|
|
+ {
|
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
|
+ contractType: this.contractType,
|
|
|
|
+ currentPage: this.currentPage,
|
|
|
|
+ pageSize: this.pageSize,
|
|
|
|
+ searchType: this.searchType,
|
|
|
|
+ searchKeyWord: this.searchKeyWord,
|
|
|
|
+ startDate: this.startDate,
|
|
|
|
+ endDate: this.endDate,
|
|
|
|
+ },
|
|
|
|
+ {},
|
|
|
|
+ { responseType: 'blob' }
|
|
|
|
+ ).toPromise()
|
|
|
|
+ downloadFile({
|
|
|
|
+ res: data,
|
|
|
|
+ fileName: `${
|
|
|
|
+ this.date.year + (this.date.month ? `-${this.date.month}` : '')
|
|
|
|
+ }_采购合同`,
|
|
|
|
+ type: 'xls',
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.connert {
|
|
|
|
+ width: 90%;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+}
|
|
|
|
+.vertical-text-left {
|
|
|
|
+ width: 62px;
|
|
|
|
+ text-align: right;
|
|
|
|
+}
|
|
|
|
+.el-button--primary {
|
|
|
|
+ background-color: #5878e8;
|
|
|
|
+ border-color: #5878e8;
|
|
|
|
+}
|
|
|
|
+.el-button--default {
|
|
|
|
+ color: #8890b1;
|
|
|
|
+ border-color: #e8eaf1;
|
|
|
|
+}
|
|
|
|
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
|
|
|
|
+ width: 30px;
|
|
|
|
+ margin-left: 0;
|
|
|
|
+ border-top-left-radius: 0px;
|
|
|
|
+ border-bottom-left-radius: 0px;
|
|
|
|
+}
|
|
|
|
+/deep/.findValue .el-input__inner {
|
|
|
|
+ border-top-right-radius: 0px;
|
|
|
|
+ border-bottom-right-radius: 0px;
|
|
|
|
+}
|
|
|
|
+.completed.el-button--default {
|
|
|
|
+ border-color: #5878e8;
|
|
|
|
+ background-color: #f6f7fc;
|
|
|
|
+ color: #5878e8;
|
|
|
|
+}
|
|
|
|
+.putstorage.el-button--default,
|
|
|
|
+.deliverystorage.el-button--default {
|
|
|
|
+ border-color: #8890b1;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ color: #8890b1;
|
|
|
|
+}
|
|
|
|
+/deep/.el-table td,
|
|
|
|
+/deep/.el-table th.is-leaf {
|
|
|
|
+ border-right: 1px solid #e9ecf7;
|
|
|
|
+ text-align: center;
|
|
|
|
+}
|
|
|
|
+/deep/.el-table tr td:first-child,
|
|
|
|
+/deep/.el-table tr th.is-leaf:first-child {
|
|
|
|
+ border-left: 1px solid #e9ecf7;
|
|
|
|
+}
|
|
|
|
+/deep/.el-table .el-table__header .cell,
|
|
|
|
+/deep/.el-table .el-table__body .cell {
|
|
|
|
+ -webkit-line-clamp: 10;
|
|
|
|
+ max-height: 400px;
|
|
|
|
+}
|
|
|
|
+.record,
|
|
|
|
+.adjustment {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ color: #5878e8;
|
|
|
|
+ padding: 0 4px !important;
|
|
|
|
+ position: relative;
|
|
|
|
+}
|
|
|
|
+.record:after {
|
|
|
|
+ position: absolute;
|
|
|
|
+ content: '';
|
|
|
|
+ display: block;
|
|
|
|
+ top: 5px;
|
|
|
|
+ right: -2px;
|
|
|
|
+ width: 1px;
|
|
|
|
+ height: 12px;
|
|
|
|
+ background: #e9ecf7;
|
|
|
|
+}
|
|
|
|
+/deep/.el-radio-button:first-child .el-radio-button__inner {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+}
|
|
|
|
+//分页
|
|
|
|
+.el-pagination {
|
|
|
|
+ text-align: center;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ padding: 2px 5px;
|
|
|
|
+ color: #303133;
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</style>
|