|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBox">
|
|
|
+ <a-card size="small" :bordered="false" class="productSourceList-wrap searchBox">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper" ref="tableSearch">
|
|
|
- <a-form-model
|
|
|
- id="tireSalesReportList-form"
|
|
|
+ <a-form
|
|
|
+ id="productSourceList-form"
|
|
|
ref="ruleForm"
|
|
|
class="form-model-con"
|
|
|
layout="inline"
|
|
@@ -12,9 +12,9 @@
|
|
|
@keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="审核时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
- </a-form-model-item>
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <rangeDate ref="rangeDate" id="productSourceList-time" :value="time" @change="dateChange" />
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="业务单号">
|
|
@@ -45,8 +45,8 @@
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="单据类型">
|
|
|
- <a-select @change="handleBizStatus" v-model="queryParam.bizStatus" placeholder="请选择单据类型" allowClear>
|
|
|
+ <a-form-item label="单据类型">
|
|
|
+ <a-select @change="handleBizStatus" id="productSourceList-bizStatus" v-model="queryParam.bizStatus" placeholder="请选择单据类型" allowClear>
|
|
|
<a-select-option value="XS">
|
|
|
销售单
|
|
|
</a-select-option>
|
|
@@ -54,7 +54,7 @@
|
|
|
调拨单
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-model-item>
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
@@ -66,24 +66,17 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="客户名称">
|
|
|
+ <a-form-item label="客户名称">
|
|
|
<a-input
|
|
|
id="productSourceList-buyerName"
|
|
|
v-model.trim="queryParam.buyerName"
|
|
|
allowClear
|
|
|
placeholder="请输入客户名称" />
|
|
|
- </a-form-model-item>
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="质保状态">
|
|
|
- <!-- <v-select
|
|
|
- v-model="queryParam.dealerLevel"
|
|
|
- ref="dealerLevel"
|
|
|
- id="productSourceList-dealerLevel"
|
|
|
- code="DEALER_LEVEL"
|
|
|
- placeholder="请选择质保状态"
|
|
|
- allowClear></v-select> -->
|
|
|
- <a-select v-model="queryParam.warrantyState" placeholder="请选择质保状态" allowClear>
|
|
|
+ <a-form-item label="质保状态">
|
|
|
+ <a-select v-model="queryParam.warrantyState" id="productSourceList-warrantyState" placeholder="请选择质保状态" allowClear>
|
|
|
<a-select-option value="NOTSTART">
|
|
|
未开始
|
|
|
</a-select-option>
|
|
@@ -94,7 +87,7 @@
|
|
|
已过期
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-model-item>
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="24" :sm="24" style="text-align: center;">
|
|
@@ -118,14 +111,14 @@
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('B_productSourceExport')"
|
|
|
id="productSourceList-export">导出</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px" id="productSourceList-advanced">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
</a>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- </a-form-model>
|
|
|
- </div>
|
|
|
+ </a-form-model>
|
|
|
+ </a-form></div>
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
@@ -133,7 +126,7 @@
|
|
|
<div style="display:flex;align-items:center;margin-bottom:10px;">
|
|
|
<a-button
|
|
|
type="primary"
|
|
|
- id="outboundOrder-export"
|
|
|
+ id="productSourceList-import-btn"
|
|
|
:loading="loading"
|
|
|
v-if="$hasPermissions('B_productSourceImport')"
|
|
|
@click="openGuideModal = true">导入</a-button>
|
|
@@ -163,7 +156,13 @@
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='NOTSTART'" size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
|
|
|
+ <a-button
|
|
|
+ id="productSourceList-info"
|
|
|
+ v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='NOTSTART'"
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleInfoModal(record)">质保信息</a-button>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -178,12 +177,14 @@
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+// 组件
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import warrantyInfoModal from './warrantyInfoModal.vue'
|
|
|
import importGuideModal from './importGuideModal.vue'
|
|
|
-import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+// 接口
|
|
|
import { traceCodeInsertBatch, traceCodeQueryCount, traceCodeList, excelOnlineList } from '@/api/reportData'
|
|
|
export default {
|
|
|
name: 'ProductSourceList',
|
|
@@ -191,24 +192,27 @@ export default {
|
|
|
components: { STable, VSelect, rangeDate, warrantyInfoModal, importGuideModal },
|
|
|
data () {
|
|
|
return {
|
|
|
- loading: false,
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
+ loading: false, // 表格加载状态
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ exportLoading: false, // 导出按钮加载状态
|
|
|
+ // 审核时间
|
|
|
time: [
|
|
|
getDate.getThreeMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
],
|
|
|
queryParam: { // 查询条件
|
|
|
- beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- productCode: '',
|
|
|
- productName: '',
|
|
|
- bizCode: undefined,
|
|
|
- traceCode: undefined,
|
|
|
- buyerName: undefined,
|
|
|
- bizStatus: undefined,
|
|
|
- warrantyState: undefined
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime, // 审核开始时间
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 审核结束时间
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: '', // 产品名称
|
|
|
+ bizCode: undefined, // 业务单号
|
|
|
+ traceCode: undefined, // 唯一码
|
|
|
+ buyerName: undefined, // 客户名称
|
|
|
+ bizStatus: undefined, // 单据类型
|
|
|
+ warrantyState: undefined// 质保状态
|
|
|
},
|
|
|
openInfoModal: false, // 质保信息弹窗
|
|
|
columns: [{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
@@ -223,18 +227,19 @@ export default {
|
|
|
{ title: '质保时间', scopedSlots: { customRender: 'warrantyTime' }, width: '10%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
|
],
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
+ // 获取表格数据 有分页
|
|
|
return traceCodeList(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
|
|
@@ -245,13 +250,14 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- totalData: null,
|
|
|
+ totalData: null, // 统计数据
|
|
|
openGuideModal: false, // 导入弹窗
|
|
|
- warrantyInfoId: null,
|
|
|
- productCodeInfo: null
|
|
|
+ warrantyInfoId: null, // 质保信息id
|
|
|
+ productCodeInfo: null// 当前行产品编码
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 展开/关闭 监听表格高度变化
|
|
|
advanced (newValue, oldValue) {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -338,12 +344,14 @@ export default {
|
|
|
_this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
+ // 初始化
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 247
|