|
@@ -1,9 +1,9 @@
|
|
<template>
|
|
<template>
|
|
- <a-card size="small" :bordered="false" class="chainStockReportList-wrap">
|
|
|
|
|
|
+ <a-card size="small" :bordered="false" class="sendStorageReportList-wrap">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form-model
|
|
<a-form-model
|
|
- id="chainStockReportList-form"
|
|
|
|
|
|
+ id="sendStorageReportList-form"
|
|
ref="ruleForm"
|
|
ref="ruleForm"
|
|
:model="queryParam"
|
|
:model="queryParam"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@@ -15,7 +15,7 @@
|
|
<a-form-model-item label="连锁店" prop="targetName">
|
|
<a-form-model-item label="连锁店" prop="targetName">
|
|
<a-select
|
|
<a-select
|
|
placeholder="请选择连锁店"
|
|
placeholder="请选择连锁店"
|
|
- id="chainStockReportList-targetName"
|
|
|
|
|
|
+ id="sendStorageReportList-targetName"
|
|
allowClear
|
|
allowClear
|
|
v-model="queryParam.targetName"
|
|
v-model="queryParam.targetName"
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
@@ -26,26 +26,26 @@
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="日期">
|
|
|
|
- <rangeDate ref="rangeDate" />
|
|
|
|
- </a-form-item>
|
|
|
|
|
|
+ <a-form-model-item label="日期">
|
|
|
|
+ <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
|
+ </a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品编码">
|
|
|
|
- <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
|
|
- </a-form-item>
|
|
|
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
|
+ <a-input id="sendStorageReportList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
|
|
+ </a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品名称">
|
|
|
|
- <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
|
- </a-form-item>
|
|
|
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
|
+ <a-input id="sendStorageReportList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
|
+ </a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品品牌">
|
|
|
|
|
|
+ <a-form-model-item label="产品品牌">
|
|
<a-select
|
|
<a-select
|
|
placeholder="请选择产品品牌"
|
|
placeholder="请选择产品品牌"
|
|
- id="productInfoList-productBrandSn"
|
|
|
|
|
|
+ id="sendStorageReportList-productBrandSn"
|
|
allowClear
|
|
allowClear
|
|
v-model="queryParam.productBrandSn"
|
|
v-model="queryParam.productBrandSn"
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
@@ -53,10 +53,10 @@
|
|
:filter-option="filterOption">
|
|
:filter-option="filterOption">
|
|
<a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
<a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
- </a-form-item>
|
|
|
|
|
|
+ </a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品分类">
|
|
|
|
|
|
+ <a-form-model-item label="产品分类">
|
|
<a-cascader
|
|
<a-cascader
|
|
@change="changeProductType"
|
|
@change="changeProductType"
|
|
change-on-select
|
|
change-on-select
|
|
@@ -64,15 +64,15 @@
|
|
expand-trigger="hover"
|
|
expand-trigger="hover"
|
|
:options="productTypeList"
|
|
:options="productTypeList"
|
|
:fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
:fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
- id="productInfoList-productType"
|
|
|
|
|
|
+ id="sendStorageReportList-productType"
|
|
placeholder="请选择产品分类"
|
|
placeholder="请选择产品分类"
|
|
allowClear />
|
|
allowClear />
|
|
- </a-form-item>
|
|
|
|
|
|
+ </a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-reset">重置</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'"/>
|
|
@@ -89,7 +89,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1170 }"
|
|
|
|
|
|
+ :scroll="{ x: 2390 }"
|
|
bordered>
|
|
bordered>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -109,6 +109,8 @@ export default {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
targetName: undefined,
|
|
targetName: undefined,
|
|
code: '', // 产品编码
|
|
code: '', // 产品编码
|
|
name: '', // 产品名称
|
|
name: '', // 产品名称
|
|
@@ -126,109 +128,98 @@ export default {
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
columns: [
|
|
columns: [
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
|
|
|
|
+ { title: '序号',
|
|
|
|
+ dataIndex: 'no',
|
|
|
|
+ width: 80,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') {
|
|
|
|
+ console.log(111)
|
|
|
|
+ obj.attrs.colSpan = 7
|
|
|
|
+ }
|
|
|
|
+ return obj
|
|
|
|
+ }
|
|
|
|
+ // fixed: 'left'
|
|
|
|
+ },
|
|
{ title: '产品编码',
|
|
{ title: '产品编码',
|
|
dataIndex: 'code',
|
|
dataIndex: 'code',
|
|
- width: 250,
|
|
|
|
|
|
+ width: 220,
|
|
align: 'center',
|
|
align: 'center',
|
|
- customRender: function (text, row, index) {
|
|
|
|
- if (text == '合计') {
|
|
|
|
- return {
|
|
|
|
- children: <span>{text}</span>,
|
|
|
|
- attrs: {
|
|
|
|
- colSpan: 6
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return text || '--'
|
|
|
|
- } },
|
|
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ value = value || '--'
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') { obj.attrs.colSpan = 0 }
|
|
|
|
+ return obj
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{ title: '产品名称',
|
|
{ title: '产品名称',
|
|
dataIndex: 'name',
|
|
dataIndex: 'name',
|
|
align: 'center',
|
|
align: 'center',
|
|
- customRender: function (text, row, index) {
|
|
|
|
- if (text == '合计') {
|
|
|
|
- return {
|
|
|
|
- children: <span>{text}</span>,
|
|
|
|
- attrs: {
|
|
|
|
- colSpan: 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return text || '--'
|
|
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ value = value || '--'
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') { obj.attrs.colSpan = 0 }
|
|
|
|
+ return obj
|
|
},
|
|
},
|
|
- ellipsis: true },
|
|
|
|
|
|
+ ellipsis: true
|
|
|
|
+ },
|
|
{ title: '品牌',
|
|
{ title: '品牌',
|
|
dataIndex: 'brand',
|
|
dataIndex: 'brand',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 200,
|
|
width: 200,
|
|
- customRender: function (text, row, index) {
|
|
|
|
- if (text == '合计') {
|
|
|
|
- return {
|
|
|
|
- children: <span>{text}</span>,
|
|
|
|
- attrs: {
|
|
|
|
- colSpan: 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return text || '--'
|
|
|
|
- } },
|
|
|
|
- { title: '三级类别',
|
|
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ value = value || '--'
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') { obj.attrs.colSpan = 0 }
|
|
|
|
+ return obj
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ { title: '三级分类',
|
|
dataIndex: 'productLeve',
|
|
dataIndex: 'productLeve',
|
|
width: 150,
|
|
width: 150,
|
|
align: 'center',
|
|
align: 'center',
|
|
- customRender: function (text, row, index) {
|
|
|
|
- if (text == '合计') {
|
|
|
|
- return {
|
|
|
|
- children: <span>{text}</span>,
|
|
|
|
- attrs: {
|
|
|
|
- colSpan: 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return text || '--'
|
|
|
|
- } },
|
|
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ value = value || '--'
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') { obj.attrs.colSpan = 0 }
|
|
|
|
+ return obj
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{ title: '原厂编码',
|
|
{ title: '原厂编码',
|
|
dataIndex: 'origCode',
|
|
dataIndex: 'origCode',
|
|
- width: 150,
|
|
|
|
|
|
+ width: 220,
|
|
align: 'center',
|
|
align: 'center',
|
|
- customRender: function (text, row, index) {
|
|
|
|
- if (text == '合计') {
|
|
|
|
- return {
|
|
|
|
- children: <span>{text}</span>,
|
|
|
|
- attrs: {
|
|
|
|
- colSpan: 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return text || '--'
|
|
|
|
- } },
|
|
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ value = value || '--'
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') { obj.attrs.colSpan = 0 }
|
|
|
|
+ return obj
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{ title: '单位',
|
|
{ title: '单位',
|
|
dataIndex: 'unit',
|
|
dataIndex: 'unit',
|
|
- width: 150,
|
|
|
|
|
|
+ width: 100,
|
|
align: 'center',
|
|
align: 'center',
|
|
- customRender: function (text, row, index) {
|
|
|
|
- if (text == '合计') {
|
|
|
|
- return {
|
|
|
|
- children: <span>{text}</span>,
|
|
|
|
- attrs: {
|
|
|
|
- colSpan: 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return text || '--'
|
|
|
|
- } },
|
|
|
|
- { title: '期初数量', dataIndex: 'sqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '期初单价(¥)', dataIndex: 'sprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '期初金额(¥)', dataIndex: 'samount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '收入数量', dataIndex: 'srqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '收入单价(¥)', dataIndex: 'srprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '收入金额(¥)', dataIndex: 'sramount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '发出数量', dataIndex: 'fcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '发出单价(¥)', dataIndex: 'fcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '发出金额(¥)', dataIndex: 'fcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '结存数量', dataIndex: 'dcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '结存单价(¥)', dataIndex: 'dcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
|
|
|
|
- { title: '结存金额(¥)', dataIndex: 'dcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } }
|
|
|
|
|
|
+ customRender: function (value, row, index) {
|
|
|
|
+ value = value || '--'
|
|
|
|
+ const obj = { children: value, attrs: {} }
|
|
|
|
+ if (value == '合计') { obj.attrs.colSpan = 0 }
|
|
|
|
+ return obj
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ { title: '期初数量', dataIndex: 'sqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '期初单价(¥)', dataIndex: 'sprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '期初金额(¥)', dataIndex: 'samount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '收入数量', dataIndex: 'srqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '收入单价(¥)', dataIndex: 'srprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '收入金额(¥)', dataIndex: 'sramount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '发出数量', dataIndex: 'fcqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '发出单价(¥)', dataIndex: 'fcprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '发出金额(¥)', dataIndex: 'fcamount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '结存数量', dataIndex: 'dcqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '结存单价(¥)', dataIndex: 'dcprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '结存金额(¥)', dataIndex: 'dcamount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -372,7 +363,11 @@ export default {
|
|
count: 10
|
|
count: 10
|
|
}
|
|
}
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
- data.list[i].no = i + 1
|
|
|
|
|
|
+ if (i < data.list.length - 1) {
|
|
|
|
+ data.list[i].no = i + 1
|
|
|
|
+ } else {
|
|
|
|
+ data.list[i].no = '合计'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
_this.disabled = false
|
|
_this.disabled = false
|
|
resolve(data)
|
|
resolve(data)
|
|
@@ -385,6 +380,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 时间 change
|
|
|
|
+ dateChange (date) {
|
|
|
|
+ this.queryParam.beginDate = date[0]
|
|
|
|
+ this.queryParam.endDate = date[1]
|
|
|
|
+ },
|
|
// 查询
|
|
// 查询
|
|
handleSearch () {
|
|
handleSearch () {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|