|
@@ -1,50 +1,50 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-card size="small" :bordered="false" class="productPricingList-wrap searchBoxNormal">
|
|
|
+ <a-card size="small" :bordered="false" class="productNotOnline-wrap searchBoxNormal">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="searchForm">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
|
- <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <a-input id="productNotOnline-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品编码/原厂编码">
|
|
|
- <a-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
|
|
|
+ <a-input id="productNotOnline-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="品牌">
|
|
|
- <ProductBrand id="productPricingList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
+ <ProductBrand id="productNotOnline-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="产品分类">
|
|
|
- <ProductType id="productPricingList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
- </a-form-model-item>
|
|
|
+ <a-form-item label="产品分类">
|
|
|
+ <ProductType id="productNotOnline-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="定价时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
+ <rangeDate ref="rangeDate" id="productNotOnline-rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="定价状态">
|
|
|
- <v-select code="PRICING_STATUS" id="productPricingList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
|
|
|
+ <v-select code="PRICING_STATUS" id="productNotOnline-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品状态">
|
|
|
- <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
|
|
|
+ <v-select code="PRODUCT_STATUS" id="productNotOnline-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="searchForm" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-reset">重置</a-button>
|
|
|
+ <a-button type="primary" @click="searchForm" :disabled="disabled" id="productNotOnline-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productNotOnline-reset">重置</a-button>
|
|
|
<a-button
|
|
|
style="margin-left: 5px"
|
|
|
type="primary"
|
|
@@ -52,8 +52,8 @@
|
|
|
@click="handleExport"
|
|
|
:disabled="disabled"
|
|
|
v-if="$hasPermissions('M_productOnlineExport')"
|
|
|
- id="productInfoList-export">导出</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ id="productNotOnline-export">导出</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px" id="productNotOnline-advanced">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
</a>
|
|
@@ -66,7 +66,7 @@
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<!-- 操作按钮 -->
|
|
|
<div class="table-operator" style="text-align:right;">
|
|
|
- <a-checkbox v-model="zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag" @change="handleChangeQty">仅显示有库存</a-checkbox>
|
|
|
+ <a-checkbox v-model="zeroQtyFlag" id="productNotOnline-zeroQtyFlag" @change="handleChangeQty">仅显示有库存</a-checkbox>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
@@ -94,12 +94,14 @@
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+import { exportExcel } from '@/libs/JGPrint.js'
|
|
|
+// 组件
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { exportExcel } from '@/libs/JGPrint.js'
|
|
|
-import { queryOnlinePage, excelOnlineList } from '@/api/product'
|
|
|
import ProductType from '@/views/common/productType.js'
|
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
|
+// 接口
|
|
|
+import { queryOnlinePage, excelOnlineList } from '@/api/product'
|
|
|
export default {
|
|
|
name: 'ProductNotOnlineList',
|
|
|
mixins: [commonMixin],
|
|
@@ -108,9 +110,11 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
- time: [],
|
|
|
- queryParam: { // 查询条件
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
+ time: [], // 定价时间
|
|
|
+ // 查询条件
|
|
|
+ queryParam: {
|
|
|
name: '', // 产品名称
|
|
|
queryWord: '', // 产品编码/原厂编码
|
|
|
productBrandSn: undefined, // 产品品牌
|
|
@@ -118,22 +122,23 @@ export default {
|
|
|
productTypeSn2: '', // 产品二级分类
|
|
|
productTypeSn3: '', // 产品三级分类
|
|
|
pricingState: undefined, // 定价状态
|
|
|
- pricingTimeBegin: undefined, // 定价时间
|
|
|
- pricingTimeEnd: undefined,
|
|
|
+ pricingTimeBegin: undefined, // 定价开始时间
|
|
|
+ pricingTimeEnd: undefined, // 定价结束时间
|
|
|
state: undefined, // 产品状态
|
|
|
- stockFlag: undefined
|
|
|
+ stockFlag: undefined// 仅显示有库存 1是 0否
|
|
|
},
|
|
|
- zeroQtyFlag: false,
|
|
|
- productType: [],
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ zeroQtyFlag: false, // 仅显示有库存 true是 false否
|
|
|
+ productType: [], // 产品分类
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
+ // 获取表格数据 有分页
|
|
|
return queryOnlinePage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
+ // 计算表格序号
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -192,6 +197,7 @@ export default {
|
|
|
this.queryParam.pricingTimeBegin = date[0]
|
|
|
this.queryParam.pricingTimeEnd = date[1]
|
|
|
},
|
|
|
+ // 仅显示有库存
|
|
|
handleChangeQty (e) {
|
|
|
this.zeroQtyFlag = e.target.checked
|
|
|
this.queryParam.stockFlag = e.target.checked ? '1' : undefined
|
|
@@ -218,6 +224,7 @@ export default {
|
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
+ // 查询
|
|
|
searchForm () {
|
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
this.$refs.table.refresh(true)
|
|
@@ -239,18 +246,21 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
},
|
|
|
+ // 初始化
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 226
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 展开/关闭 监听表格高度变化
|
|
|
advanced (newValue, oldValue) {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|