|
@@ -34,17 +34,25 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="18" style="height: 33px;">
|
|
|
+ <el-col :span="6" style="height: 33px;">
|
|
|
<el-button style="margin-left: 10px !important" @click="inOutChange('')"
|
|
|
:type="inOutFlag == '' ? 'primary' : ''">全部</el-button>
|
|
|
<el-button @click="inOutChange(2)" :type="inOutFlag == 2 ? 'primary' : ''">入库</el-button>
|
|
|
<el-button @click="inOutChange(1)" :type="inOutFlag == 1 ? 'primary' : ''">出库</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="18" style="display:flex;margin-left: 45%;">
|
|
|
- <div style="text-align:right;margin-right:80px;">合计入库重量(吨):{{ inWeight }}</div>
|
|
|
- <div style="text-align:right;margin-right:60px;">合计出库重量(吨):{{ outWeight }}</div>
|
|
|
- <div style="text-align:right;margin-right:40px;">合计入库数量(个):{{ inCount }}</div>
|
|
|
- <div style="text-align:right;margin-right:20px;">合计出库数量(个):{{ outCount }}</div>
|
|
|
+ <el-col :span="18" style="text-align:right;">
|
|
|
+ <div style="display:flex;align-items:center;flex-direction: row-reverse;">
|
|
|
+ <el-button @click="excelOpen" >导出</el-button>
|
|
|
+ <div style="text-align:right;margin-right:20px;">合计出库数量(个):{{ outCount }}</div>
|
|
|
+ <div style="text-align:right;margin-right:40px;">合计入库数量(个):{{ inCount }}</div>
|
|
|
+ <div style="text-align:right;margin-right:60px;">合计出库重量(吨):{{ outWeight }}</div>
|
|
|
+ <div style="text-align:right;margin-right:80px;">合计入库重量(吨):{{ inWeight }}</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="500"
|
|
@@ -75,6 +83,18 @@
|
|
|
<el-table-column prop="netWeight" label="净重(公斤)" width="150"></el-table-column>
|
|
|
<el-table-column prop="carNo" label="车牌号" width="150"></el-table-column>
|
|
|
<el-table-column prop="materialQuantity" label="数量(个)" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="deliveryMethod" label="备注" width="100">
|
|
|
+ <template scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ title="备注"
|
|
|
+ width="200"
|
|
|
+ trigger="click"
|
|
|
+ :content="scope.row.remark">
|
|
|
+ <el-button slot="reference">查看</el-button>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="经办人" width="200">
|
|
|
<template scope="scope">
|
|
|
<span v-if="scope.row.grossAgent == scope.row.tareAgent"> {{ scope.row.grossAgent }}</span>
|
|
@@ -84,7 +104,7 @@
|
|
|
<el-table-column prop="status" label="状态"></el-table-column>
|
|
|
<el-table-column prop="inOutWarehouseDate" label="出入库日期">
|
|
|
<template scope="scope">
|
|
|
- <span>{{ scope.row.inOutWarehouseDate.split(" ")[0] }}</span>
|
|
|
+ <span>{{ scope.row.inOutWarehouseDate }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="操作" width="200">
|
|
@@ -146,16 +166,70 @@
|
|
|
<el-button @click="typePrintCannelClick1">取消</el-button>
|
|
|
</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">导出记录</div>
|
|
|
+ <div class="print-type-checkbox">
|
|
|
+ <el-form ref="form" label-width="110px">
|
|
|
+ <el-form-item label="类型">
|
|
|
+ <el-radio-group v-model="parameter.inOutFlag">
|
|
|
+ <el-radio :label="3">入库记录</el-radio>
|
|
|
+ <el-radio :label="2">出库记录</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="起始日期">
|
|
|
+ <el-date-picker type="datetime" @change="startDataChange" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择起始日期" v-model="parameter.startDate" default-time="00:00:00"></el-date-picker>
|
|
|
+ <!-- <el-date-picker v-model="value3" type="datetime" placeholder="选择日期时间" default-time="12:00:00"></el-date-picker> -->
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="截止日期">
|
|
|
+ <el-date-picker type="datetime" @change="endDataChange" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择截止日期" v-model="parameter.endDate" default-time="00:00:00">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="截止日期1">
|
|
|
+ <el-date-picker value-format="timestamp" type="date" placeholder="请选择截止日期" v-model="parameter.endDate1">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item> -->
|
|
|
+ <!--仓库名称-->
|
|
|
+ <el-form-item label="仓库名称" span="1" prop="warehouseName">
|
|
|
+
|
|
|
+ <el-select @change="warehousechange" v-model="parameter.baseId" placeholder="请选择仓库名称" filterable clearable>
|
|
|
+ <el-option key="" label="全部仓库" value="全部仓库" />
|
|
|
+ <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
|
|
|
+ :value="item.id" />
|
|
|
+ </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="exportexcel()">确定</el-button>
|
|
|
+ <el-button @click="removePrint">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
// delMaterial,
|
|
|
- getMaterialRecord
|
|
|
+ getMaterialRecord,
|
|
|
+ postExportMaterial
|
|
|
} from '@/model/warehouse/index'
|
|
|
+import {
|
|
|
+ downloadFile
|
|
|
+} from '@/utils/batchDown'
|
|
|
import {
|
|
|
selectWarehouseSelf,
|
|
|
} from '@/model/outboundManagement/index'
|
|
|
+import {
|
|
|
+ dayjs,
|
|
|
+ EventBus
|
|
|
+ } from 'base-core-lib'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -163,13 +237,16 @@ export default {
|
|
|
warehouseId: '',
|
|
|
warehouseName: '',
|
|
|
warehouseName1: '',
|
|
|
-
|
|
|
+ isShowPrintType:false,
|
|
|
compId: '',
|
|
|
inOutFlag: '',
|
|
|
//分页
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
value2: '',
|
|
|
+ parameter:{
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ },
|
|
|
deptCircularPage: {},
|
|
|
deptBudgetTotal: 0,
|
|
|
warehouseList: [], //仓库
|
|
@@ -303,6 +380,10 @@ export default {
|
|
|
printSeparately: false,
|
|
|
onePrint: false,
|
|
|
dialogDataList: [],
|
|
|
+ date: {
|
|
|
+ year: dayjs().format('YYYY'),
|
|
|
+ month: dayjs().format('MM'),
|
|
|
+ },
|
|
|
printData: {
|
|
|
}
|
|
|
}
|
|
@@ -453,6 +534,47 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ removePrint() {
|
|
|
+ this.parameter = {
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ }
|
|
|
+ this.isShowPrintType = false
|
|
|
+ },
|
|
|
+ excelOpen(){
|
|
|
+ this.isShowPrintType=true
|
|
|
+
|
|
|
+ },
|
|
|
+ downloadFile(url, fileName){
|
|
|
+ //fileurl文件地址(一般是接口返回) filename文件下载后的名字
|
|
|
+ const x = new XMLHttpRequest()
|
|
|
+ x.open('GET', url, true)
|
|
|
+ x.responseType = 'blob'
|
|
|
+ x.onload = function() {
|
|
|
+ const url = window.URL.createObjectURL(x.response)
|
|
|
+ const a = document.createElement('a')
|
|
|
+ a.href = url
|
|
|
+ a.download = fileName
|
|
|
+ a.click()
|
|
|
+ document.body.removeChild(a);
|
|
|
+ // 然后移除
|
|
|
+ }
|
|
|
+ x.send()
|
|
|
+ },
|
|
|
+ async exportexcel() {
|
|
|
+ const
|
|
|
+ data
|
|
|
+ = await postExportMaterial({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ baseId: this.warehouseId,
|
|
|
+ inOutFlag: this.inOutFlag,
|
|
|
+ startDate: this.startDate,
|
|
|
+ endDate: this.endDate,
|
|
|
+ }).toPromise()
|
|
|
+ console.log(data)
|
|
|
+ this.downloadFile(data.data.data, `${
|
|
|
+ this.date.year + (this.date.month ? `-${this.date.month}` : '')
|
|
|
+ }物料导出记录`)
|
|
|
+ },
|
|
|
inOutChange(num) {
|
|
|
this.inOutFlag = num
|
|
|
this.getList()
|
|
@@ -943,4 +1065,69 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.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: 346px;
|
|
|
+ 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%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/.print-type{
|
|
|
+
|
|
|
+ }
|
|
|
+ /deep/.print-type .el-radio__label{
|
|
|
+ font-size:12px;
|
|
|
+ }
|
|
|
+ /deep/.print-type .el-form-item{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .el-form-item__content{
|
|
|
+ margin:0 !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|