|
@@ -28,6 +28,8 @@
|
|
" @click="handleDelete()">删除</ws-button>
|
|
" @click="handleDelete()">删除</ws-button>
|
|
<ws-button v-if='list.length>0'
|
|
<ws-button v-if='list.length>0'
|
|
@click="handlTask()">任务</ws-button>
|
|
@click="handlTask()">任务</ws-button>
|
|
|
|
+ <ws-button @click="outData(1)">导出</ws-button>
|
|
|
|
+ <ws-button @click="outData(2)">打印</ws-button>
|
|
</template>
|
|
</template>
|
|
<template slot="left">
|
|
<template slot="left">
|
|
<div >
|
|
<div >
|
|
@@ -272,6 +274,53 @@
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="mask" v-show="isShowPrintType"></div>
|
|
|
|
+ <div class="print-type" v-show="isShowPrintType">
|
|
|
|
+ <div class="print-type-content">
|
|
|
|
+ <div class="print-type-title">{{headerText}}</div>
|
|
|
|
+ <div class="print-type-checkbox">
|
|
|
|
+ <el-form ref="form" label-width="110px">
|
|
|
|
+ <el-form-item label="类型" v-if="headerText == '打印记录'">
|
|
|
|
+ <el-radio-group v-model="parameter.radio" >
|
|
|
|
+ <el-radio :label="1">入库记录</el-radio>
|
|
|
|
+ <el-radio :label="2">出库记录</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="起始日期">
|
|
|
|
+ <el-date-picker type="date" placeholder="请选择起始日期" v-model="parameter.startDate"></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="截止日期">
|
|
|
|
+ <el-date-picker type="date" placeholder="请选择截止日期" v-model="parameter.endDate" ></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!--仓库名称-->
|
|
|
|
+ <el-form-item label="仓库名称" span="1" prop="warehouseName" >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="parameter.warehouseName"
|
|
|
|
+ placeholder="请选择仓库名称"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in packtypeList"
|
|
|
|
+ :key="item.constKey"
|
|
|
|
+ :label="item.warehouseName"
|
|
|
|
+ :value="item.warehouseName"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
|
|
|
|
+ <el-input placeholder="请输入增量比例" v-model="parameter.proportion" clearable class="proportion_css"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="bottom-btn">
|
|
|
|
+ <el-button @click="submitClick()" >确定</el-button>
|
|
|
|
+ <!-- <el-button @click="submitClick()" v-if="headerText == '打印记录'">确定</el-button> -->
|
|
|
|
+ <el-button @click="isShowPrintType = false">取消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -283,11 +332,14 @@ import {
|
|
billoperatehis,
|
|
billoperatehis,
|
|
getsponsible,
|
|
getsponsible,
|
|
clearancee,
|
|
clearancee,
|
|
|
|
+ xiala,
|
|
|
|
+ postExport
|
|
} from '@/model/warehouse/index'
|
|
} from '@/model/warehouse/index'
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
import WsUpload from '@/components/WsUpload'
|
|
import WsUpload from '@/components/WsUpload'
|
|
-import { EventBus } from 'base-core-lib'
|
|
|
|
|
|
+// import { EventBus } from 'base-core-lib'
|
|
|
|
+import {dayjs,EventBus} from 'base-core-lib'
|
|
export default {
|
|
export default {
|
|
name: 'viewSpareMoney',
|
|
name: 'viewSpareMoney',
|
|
components: {
|
|
components: {
|
|
@@ -339,6 +391,14 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
accessoryTFs: false,
|
|
accessoryTFs: false,
|
|
|
|
+ isShowPrintType:false,//打印
|
|
|
|
+ headerText:"",
|
|
|
|
+ packtypeList:[],//仓库列表
|
|
|
|
+ parameter:{},
|
|
|
|
+ date: {
|
|
|
|
+ year: dayjs().format('YYYY'),
|
|
|
|
+ month: dayjs().format('MM'),
|
|
|
|
+ },
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
@@ -347,7 +407,43 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ //导出、打印
|
|
|
|
+ outData(index){
|
|
|
|
+ if(index == 1){
|
|
|
|
+ this.headerText = "导出入库记录"
|
|
|
|
+ }else if(index == 2){
|
|
|
|
+ this.headerText = "打印记录"
|
|
|
|
+ }
|
|
|
|
+ // 获取仓库
|
|
|
|
+ xiala({
|
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
|
+ warehouseType: this.warehouseType,
|
|
|
|
+ })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.packtypeList = response
|
|
|
|
+ })
|
|
|
|
+ this.isShowPrintType = true
|
|
|
|
+ },
|
|
|
|
+ async submitClick(){
|
|
|
|
+ // if(this.headerText = "导出入库记录"){
|
|
|
|
+ const {
|
|
|
|
+ data
|
|
|
|
+ } = await postExport(this.parameter, {}, {
|
|
|
|
+ responseType: 'blob'
|
|
|
|
+ }).toPromise()
|
|
|
|
+ downloadFile({
|
|
|
|
+ res: data,
|
|
|
|
+ fileName: `${
|
|
|
|
+ this.date.year + (this.date.month ? `-${this.date.month}` : '')
|
|
|
|
+ }导出记录`,
|
|
|
|
+ type: 'xls',
|
|
|
|
+ })
|
|
|
|
+ // }else if(this.headerText = "打印记录"){
|
|
|
|
+ // window.open('../../../../../static/warehousePrint.html')
|
|
|
|
+ // console.log(this.parameter)
|
|
|
|
+ // }
|
|
|
|
+ },
|
|
//清仓
|
|
//清仓
|
|
clearance(row) {
|
|
clearance(row) {
|
|
console.log(row.outNumber)
|
|
console.log(row.outNumber)
|
|
@@ -732,29 +828,29 @@ export default {
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
- async exportlist() {
|
|
|
|
- const { data } = await export1(
|
|
|
|
- {
|
|
|
|
- compId: localStorage.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',
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // async exportlist() {
|
|
|
|
+ // const { data } = await export1(
|
|
|
|
+ // {
|
|
|
|
+ // compId: localStorage.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>
|
|
</script>
|
|
@@ -843,4 +939,59 @@ export default {
|
|
height: calc(100vh - 124px);
|
|
height: calc(100vh - 124px);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//打印弹窗
|
|
|
|
+.mask {
|
|
|
|
+ background: black;
|
|
|
|
+ width: 100vw;
|
|
|
|
+ height: 100vh;
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 0;
|
|
|
|
+ z-index: 99;
|
|
|
|
+ opacity: 0.3;
|
|
|
|
+}
|
|
|
|
+.count{
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.print-type {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ margin: auto;
|
|
|
|
+ width: 340px;
|
|
|
|
+ height: 400px;
|
|
|
|
+ background: white;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ z-index: 999;
|
|
|
|
+ .bottom-btn{
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.print-type-title {
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ // margin: 20px;
|
|
|
|
+ margin: 20px 20px 10px;
|
|
|
|
+}
|
|
|
|
+.print-type-checkbox {
|
|
|
|
+ padding-left: 20px;
|
|
|
|
+ .el-date-editor.el-input{
|
|
|
|
+ width: 85% !important;
|
|
|
|
+ }
|
|
|
|
+ .proportion_css{
|
|
|
|
+ width: 85%;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.page2-content {
|
|
|
|
+ border: 1px solid #d8dce6;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ text-align: center;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ padding-bottom: 20px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|