|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-card size="small" :bordered="false" class="allocateReturnDetailReport-wrap searchBoxNormal">
|
|
|
+ <a-card size="small" :bordered="false" class="transferReturnDetailReport-wrap searchBoxNormal">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper" ref="tableSearch">
|
|
|
<a-form-model
|
|
|
- id="salesSlipReportList-form"
|
|
|
+ id="transferReturnDetailReport-form"
|
|
|
ref="ruleForm"
|
|
|
class="form-model-con"
|
|
|
layout="inline"
|
|
@@ -14,74 +14,74 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="退货完成日期" prop="time">
|
|
|
- <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
+ <rangeDate ref="rangeDate" id="transferReturnDetailReport-time" :value="queryParam.time" @change="dateChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="调拨退货单号">
|
|
|
- <a-input id="allocateReturnDetailReport-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo" allowClear placeholder="请输入调拨退货单号"/>
|
|
|
+ <a-input id="transferReturnDetailReport-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo" allowClear placeholder="请输入调拨退货单号"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调拨退货对象名称">
|
|
|
- <a-input id="allocateReturnDetailReport-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调拨退货对象名称"/>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="调拨退货对象名称">
|
|
|
+ <a-input id="transferReturnDetailReport-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调拨退货对象名称"/>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调拨退货类型">
|
|
|
- <AllocateType id="allocateReturnDetailReport-allocateReturnTypeSn" :changeOnSelect="true" v-model="allocateTypeVal" @change="changeAllocatype"></AllocateType>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="调拨退货类型">
|
|
|
+ <AllocateType id="transferReturnDetailReport-allocateReturnTypeSn" :changeOnSelect="true" v-model="allocateTypeVal" @change="changeAllocatype"></AllocateType>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调拨退货对象类型">
|
|
|
+ <a-form-model-item label="调拨退货对象类型">
|
|
|
<v-select
|
|
|
code="TARGET_TYPE"
|
|
|
- id="allocateReturnDetailReport-argetType"
|
|
|
+ id="transferReturnDetailReport-targetType"
|
|
|
v-model="queryParam.targetType"
|
|
|
allowClear
|
|
|
placeholder="请选择调拨退货对象类型"></v-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="所在区域">
|
|
|
- <subarea id="allocateReturnDetailReport-subareaSn" ref="subarea" @change="subareaChange"></subarea>
|
|
|
+ <subarea id="transferReturnDetailReport-subareaSn" ref="subarea" @change="subareaChange"></subarea>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="所在省份">
|
|
|
- <Area id="allocateReturnDetailReport-provinceSn" defValKey="id" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
|
|
|
+ <Area id="transferReturnDetailReport-provinceSn" defValKey="id" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品品牌">
|
|
|
- <ProductBrand id="allocateReturnDetailReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
+ <ProductBrand id="transferReturnDetailReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="品牌分类">
|
|
|
- <v-select code="BRAND_TYPE" id="allocateReturnDetailReport-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
|
|
|
+ <v-select code="BRAND_TYPE" id="transferReturnDetailReport-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品分类">
|
|
|
- <ProductType id="allocateReturnDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
+ <ProductType id="transferReturnDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品名称">
|
|
|
- <a-input id="allocateReturnDetailReport-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <a-input id="transferReturnDetailReport-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品编码">
|
|
|
- <a-input id="allocateReturnDetailReport-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
+ <a-input id="transferReturnDetailReport-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
|
|
|
- <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="allocateReturnDetailReport-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="allocateReturnDetailReport-reset">重置</a-button>
|
|
|
+ <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="transferReturnDetailReport-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="transferReturnDetailReport-reset">重置</a-button>
|
|
|
<a-button
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
@@ -90,7 +90,7 @@
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('M_transferReturnDetailReportExport')"
|
|
|
- id="allocateReturnDetailReport-export">导出</a-button>
|
|
|
+ id="transferReturnDetailReport-export">导出</a-button>
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
@@ -144,6 +144,8 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
+import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+// 组件
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -152,7 +154,7 @@ import AllocateType from '@/views/common/allocateType.js'
|
|
|
import Area from '@/views/common/area.js'
|
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
|
import ProductType from '@/views/common/productType.js'
|
|
|
-import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+// 接口
|
|
|
import { allocateReturnReportDetailQueryPage, allocateReturnReportDetailQueryCount, allocateReturnReportDetailExport } from '@/api/reportData'
|
|
|
export default {
|
|
|
name: 'TransferReturnDetailReportList',
|
|
@@ -162,40 +164,41 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
- showExport: false,
|
|
|
- queryParam: { // 查询条件
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
+ showExport: false, // 导出弹窗
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ exportLoading: false, // 导出按钮加载状态
|
|
|
+ // 查询条件
|
|
|
+ queryParam: {
|
|
|
+ // 退货完成日期 默认日期
|
|
|
time: [
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
],
|
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- allocateReturnNo: '',
|
|
|
- productCode: '',
|
|
|
- productName: '',
|
|
|
- targetName: '',
|
|
|
- costTypeSn: undefined,
|
|
|
- allocateSortSn: undefined,
|
|
|
- allocateReturnTypeSn: undefined,
|
|
|
- targetType: undefined,
|
|
|
- productBrandTypeSn: undefined,
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束日期
|
|
|
+ allocateReturnNo: '', // 调拨退货单号
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: '', // 产品名称
|
|
|
+ targetName: '', // 调拨退货对象名称
|
|
|
+ costTypeSn: undefined, // 调拨退货 成本类型
|
|
|
+ allocateSortSn: undefined, // 调拨退货类型
|
|
|
+ allocateReturnTypeSn: undefined, // 调拨退货类型 sn
|
|
|
+ targetType: undefined, // 调拨退货对象类型
|
|
|
+ productBrandTypeSn: undefined, // 品牌分类
|
|
|
productBrandSn: undefined, // 产品品牌
|
|
|
productTypeSn1: '', // 产品一级分类
|
|
|
productTypeSn2: '', // 产品二级分类
|
|
|
productTypeSn3: '', // 产品三级分类
|
|
|
subareaArea: {
|
|
|
- subareaSn: undefined,
|
|
|
- subareaAreaSn: undefined
|
|
|
+ subareaSn: undefined, // 区域
|
|
|
+ subareaAreaSn: undefined// 分区
|
|
|
},
|
|
|
- provinceSn: undefined
|
|
|
+ provinceSn: undefined// 省份编码
|
|
|
},
|
|
|
- productType: [],
|
|
|
rules: {
|
|
|
'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
|
|
|
},
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -216,11 +219,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
delete params.time
|
|
|
+ // 获取列表数据 有分页
|
|
|
return allocateReturnReportDetailQueryPage(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
+ // 统计
|
|
|
this.getCount(params)
|
|
|
+ // 计算列表序号
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -231,8 +237,9 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- totalData: null,
|
|
|
- allocateTypeVal: []
|
|
|
+ totalData: null, // 统计数据
|
|
|
+ productType: [], // 产品分类
|
|
|
+ allocateTypeVal: []// 调拨退货类型数据
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -269,6 +276,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 展开关闭
|
|
|
advanced (newValue, oldValue) {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -280,16 +288,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 调拨退货类型 change
|
|
|
changeAllocatype (val, opts) {
|
|
|
this.allocateTypeVal = val || []
|
|
|
this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
|
|
|
this.queryParam.allocateSortSn = val && val[1] ? val[1] : ''
|
|
|
this.queryParam.allocateReturnTypeSn = val && val[2] ? val[2] : ''
|
|
|
},
|
|
|
- // 盘点库存日期
|
|
|
- handleStock () {
|
|
|
- this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
|
|
|
- },
|
|
|
// 总计
|
|
|
getCount (params) {
|
|
|
allocateReturnReportDetailQueryCount(params).then(res => {
|
|
@@ -300,6 +305,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查询
|
|
|
handleSearch () {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
@@ -311,7 +317,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 创建时间 change
|
|
|
+ // 退货完成日期 change
|
|
|
dateChange (date) {
|
|
|
if (date[0] && date[1]) {
|
|
|
this.queryParam.time = date
|
|
@@ -321,9 +327,7 @@ export default {
|
|
|
this.queryParam.beginDate = date[0] || ''
|
|
|
this.queryParam.endDate = date[1] || ''
|
|
|
},
|
|
|
- custChange (val) {
|
|
|
- this.queryParam.dealerSn = val.key
|
|
|
- },
|
|
|
+ // 区域 change
|
|
|
subareaChange (val) {
|
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
@@ -391,6 +395,7 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
},
|
|
|
+ // 初始化
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => {
|
|
@@ -398,6 +403,7 @@ export default {
|
|
|
})
|
|
|
_this.resetSearchForm()
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 200
|