|
@@ -5,45 +5,41 @@
|
|
centered
|
|
centered
|
|
class="view-total-product-modal"
|
|
class="view-total-product-modal"
|
|
:maskClosable="false"
|
|
:maskClosable="false"
|
|
- :confirmLoading="confirmLoading"
|
|
|
|
- width="50%"
|
|
|
|
|
|
+ width="860px"
|
|
:footer="null"
|
|
:footer="null"
|
|
@cancel="cancel"
|
|
@cancel="cancel"
|
|
>
|
|
>
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<!-- 筛选条件 -->
|
|
<!-- 筛选条件 -->
|
|
- <a-form
|
|
|
|
- layout="inline"
|
|
|
|
- id="view-total-product-search"
|
|
|
|
- @keyup.enter.native="$refs.table.refresh(true)"
|
|
|
|
- :label-col="formItemLayout.labelCol"
|
|
|
|
- :wrapper-col="formItemLayout.wrapperCol">
|
|
|
|
- <a-row :gutter="15">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="产品编码">
|
|
|
|
- <a-input id="totalProduct-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="销售单号">
|
|
|
|
- <a-input id="totalProduct-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="客户名称">
|
|
|
|
- <a-input
|
|
|
|
- id="totalProduct-targetName"
|
|
|
|
- v-model.trim="queryParam.targetName"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请输入客户名称" />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="viewTotalProduct-search">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="viewTotalProduct-reset">重置</a-button>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-form>
|
|
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" id="view-total-product-form" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品编码">
|
|
|
|
+ <a-input id="totalProduct-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="销售单号">
|
|
|
|
+ <a-input id="totalProduct-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="客户名称">
|
|
|
|
+ <a-input
|
|
|
|
+ id="totalProduct-targetName"
|
|
|
|
+ v-model.trim="queryParam.targetName"
|
|
|
|
+ allowClear
|
|
|
|
+ placeholder="请输入客户名称" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="viewTotalProduct-search">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="viewTotalProduct-reset">重置</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
<div class="totalProduct-delMore-btn">
|
|
<div class="totalProduct-delMore-btn">
|
|
<a-button
|
|
<a-button
|
|
type="primary"
|
|
type="primary"
|
|
@@ -57,7 +53,7 @@
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
size="small"
|
|
size="small"
|
|
- :scroll="{ y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{ y: 200 }"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
@@ -87,28 +83,25 @@ import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { accumulatedProductsList } from '@/api/salesDetailNew'
|
|
import { accumulatedProductsList } from '@/api/salesDetailNew'
|
|
export default {
|
|
export default {
|
|
- name: 'ViewTotalProductModal',
|
|
|
|
|
|
+ name: 'TotalProductDetailModal',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
props: {
|
|
props: {
|
|
show: [Boolean]
|
|
show: [Boolean]
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
|
|
+ const _this = this
|
|
return {
|
|
return {
|
|
- opened: this.show, // 是否打开累计产品弹窗
|
|
|
|
|
|
+ opened: _this.show, // 是否打开累计产品弹窗
|
|
spinning: false, // 页面加载动画
|
|
spinning: false, // 页面加载动画
|
|
disabled: false, // 阻止查询重置按钮多次点击事件
|
|
disabled: false, // 阻止查询重置按钮多次点击事件
|
|
- // label 布局设置
|
|
|
|
- formItemLayout: {
|
|
|
|
- labelCol: { span: 8 },
|
|
|
|
- wrapperCol: { span: 16 }
|
|
|
|
- },
|
|
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
productCode: '',
|
|
productCode: '',
|
|
salesBillNo: '',
|
|
salesBillNo: '',
|
|
targetName: undefined
|
|
targetName: undefined
|
|
},
|
|
},
|
|
|
|
+ rowSelectionInfo: null,
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
@@ -125,7 +118,19 @@ export default {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ columns: [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
|
|
|
|
+ { title: '销售单号', dataIndex: 'salesBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', ccustomRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '售价', dataIndex: 'qty', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '10%', align: 'center', ccustomRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售数量', dataIndex: 'buyerName1', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '销售小计', dataIndex: 'warehouseName', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -134,7 +139,7 @@ export default {
|
|
const selectNum = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
|
|
const selectNum = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
|
|
let selProductNum = 0
|
|
let selProductNum = 0
|
|
let selTotalPrice = 0
|
|
let selTotalPrice = 0
|
|
- if (!selectNum) {
|
|
|
|
|
|
+ if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) {
|
|
this.rowSelectionInfo.selectedRowKeys.forEach(item => {
|
|
this.rowSelectionInfo.selectedRowKeys.forEach(item => {
|
|
selProductNum += item.num
|
|
selProductNum += item.num
|
|
selTotalPrice += item.price
|
|
selTotalPrice += item.price
|
|
@@ -144,14 +149,17 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ cancel () {
|
|
|
|
+ this.opened = false
|
|
|
|
+ },
|
|
// 表格选中项
|
|
// 表格选中项
|
|
rowSelectionFun (obj) {
|
|
rowSelectionFun (obj) {
|
|
this.rowSelectionInfo = obj || null
|
|
this.rowSelectionInfo = obj || null
|
|
},
|
|
},
|
|
// 页面数据初始化
|
|
// 页面数据初始化
|
|
pageInit (objInfo) {
|
|
pageInit (objInfo) {
|
|
- // objInfo = { salesBillSn, salesPromoSn }
|
|
|
|
this.parameter = { ...objInfo, ...this.parameter }
|
|
this.parameter = { ...objInfo, ...this.parameter }
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|