|
@@ -17,12 +17,12 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品名称">
|
|
<a-form-item label="产品名称">
|
|
- <a-input id="productStatisticsList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
+ <a-input id="productStatisticsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品编码">
|
|
<a-form-item label="产品编码">
|
|
- <a-input id="productStatisticsList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
+ <a-input id="productStatisticsList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
@@ -58,13 +58,6 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productStatisticsList-refresh">查询</a-button>
|
|
<a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productStatisticsList-refresh">查询</a-button>
|
|
<a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productStatisticsList-reset">重置</a-button>
|
|
<a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productStatisticsList-reset">重置</a-button>
|
|
- <!-- <a-button
|
|
|
|
- style="margin: 0 0 18px 8px"
|
|
|
|
- type="danger"
|
|
|
|
- @click="handleExport"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- :loading="exportLoading"
|
|
|
|
- id="inventoryQueryList-export">导出</a-button> -->
|
|
|
|
<a @click="advanced=!advanced" style="margin-left: 8px">
|
|
<a @click="advanced=!advanced" style="margin-left: 8px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
@@ -75,17 +68,20 @@
|
|
</div>
|
|
</div>
|
|
<!-- alert -->
|
|
<!-- alert -->
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
- <div slot="message">节省总金额: <strong>{{ dataTotalCount }}</strong> ;总数量:<strong>{{ productTotal.productTotalCost }}</strong>。 </div>
|
|
+ <div slot="message">
|
|
|
|
+ 节省总金额:<strong>{{ productTotal ? ((productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--') : '--' }}</strong>,
|
|
|
|
+ 总数量:<strong>{{ productTotal ? ((productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--') : '--' }}</strong>
|
|
|
|
+ </div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
size="default"
|
|
size="default"
|
|
- :rowKey="(record) => record.id"
|
|
+ :rowKey="(record, index) => index"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1610, y: tableHeight }"
|
|
+ :scroll="{ x: 1140, y: tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -98,7 +94,7 @@
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 详情 -->
|
|
<!-- 详情 -->
|
|
- <productStatisticsDetailModal :openModal="openModal" :itemId="itemId" @close="closeModal" />
|
|
+ <productStatisticsDetailModal :openModal="openModal" :itemSn="itemSn" :nowData="nowData" @close="closeModal" />
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -119,24 +115,23 @@ export default {
|
|
createDate: [], // 统计时间
|
|
createDate: [], // 统计时间
|
|
dateFormat: 'YYYY-MM-DD',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- code: '', // 产品编码
|
|
+ productCode: '', // 产品编码
|
|
- name: '', // 产品名称
|
|
+ productName: '', // 产品名称
|
|
productBrandSn: undefined, // 产品品牌
|
|
productBrandSn: undefined, // 产品品牌
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn3: '' // 产品三级分类
|
|
productTypeSn3: '' // 产品三级分类
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
- exportLoading: false, // 导出loading
|
|
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
+ { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '产品编码', dataIndex: 'code', width: 220, align: 'center' },
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center' },
|
|
- { title: '数量', dataIndex: 'terminasslPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
+ { title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '单位', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '节省金额', dataIndex: 'terminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
|
|
+ { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -159,15 +154,16 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.getTotal(Object.assign(parameter, this.queryParam))
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
openModal: false, // 查看客户详情 弹框
|
|
openModal: false, // 查看客户详情 弹框
|
|
- itemId: '', // 当前产品id
|
|
+ itemSn: '', // 当前sn
|
|
|
|
+ nowData: null,
|
|
productBrandList: [], // 品牌下拉数据
|
|
productBrandList: [], // 品牌下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
- productTotal: null,
|
|
+ productTotal: null
|
|
- dataTotalCount: '' // 列表数据总条数
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -177,8 +173,8 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.code = ''
|
|
+ this.queryParam.productCode = ''
|
|
- this.queryParam.name = ''
|
|
+ this.queryParam.productName = ''
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productTypeSn1 = ''
|
|
this.queryParam.productTypeSn1 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
@@ -199,12 +195,14 @@ export default {
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
- this.itemId = row.id
|
|
+ this.itemSn = row.productSn
|
|
|
|
+ this.nowData = row
|
|
this.openModal = true
|
|
this.openModal = true
|
|
},
|
|
},
|
|
// 关闭弹框
|
|
// 关闭弹框
|
|
closeModal () {
|
|
closeModal () {
|
|
- this.itemId = ''
|
|
+ this.itemSn = ''
|
|
|
|
+ this.nowData = null
|
|
this.openModal = false
|
|
this.openModal = false
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|