|
@@ -19,12 +19,12 @@
|
|
<a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
|
|
<a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品品牌">
|
|
|
|
+ <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="产品品牌">
|
|
|
|
- <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品状态">
|
|
<a-form-item label="产品状态">
|
|
<v-select code="ONLINE_FLAG" id="productInfoList-onlineFalg" v-model="queryParam.onlineFalg " allowClear placeholder="请选择产品状态"></v-select>
|
|
<v-select code="ONLINE_FLAG" id="productInfoList-onlineFalg" v-model="queryParam.onlineFalg " allowClear placeholder="请选择产品状态"></v-select>
|
|
@@ -47,8 +47,13 @@
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="仓库仓位">
|
|
|
|
+ <Warehouse id="productInfoList-warehouseCascade" :showDefault="false" :changeOnSelect="true" ref="warehouse" v-model="queryParam.warehouseCascade"></Warehouse>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
</template>
|
|
</template>
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
|
|
<a-button type="primary" @click="searchForm(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="searchForm(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
|
|
<a @click="advanced=!advanced" style="margin-left: 5px" id="productInfoList-advanced">
|
|
<a @click="advanced=!advanced" style="margin-left: 5px" id="productInfoList-advanced">
|
|
@@ -67,6 +72,7 @@
|
|
<a-menu slot="overlay" @click="handleMenuClick" id="productInfoList-menus">
|
|
<a-menu slot="overlay" @click="handleMenuClick" id="productInfoList-menus">
|
|
<a-menu-item key="1" id="productInfoList-menus0"> 批量启用</a-menu-item>
|
|
<a-menu-item key="1" id="productInfoList-menus0"> 批量启用</a-menu-item>
|
|
<a-menu-item key="2" id="productInfoList-menus1"> 批量禁用</a-menu-item>
|
|
<a-menu-item key="2" id="productInfoList-menus1"> 批量禁用</a-menu-item>
|
|
|
|
+ <a-menu-item key="3" id="productInfoList-menus1"> 批量修改仓库仓位</a-menu-item>
|
|
</a-menu>
|
|
</a-menu>
|
|
<a-button id="productInfoList-menus-action" ghost type="danger"> 批量操作 <a-icon type="down" /> </a-button>
|
|
<a-button id="productInfoList-menus-action" ghost type="danger"> 批量操作 <a-icon type="down" /> </a-button>
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
@@ -189,6 +195,8 @@
|
|
<importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="resetSearchForm" />
|
|
<importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="resetSearchForm" />
|
|
<!-- 自定义报价弹窗 -->
|
|
<!-- 自定义报价弹窗 -->
|
|
<editPriceModal :openModal="openEditPriceModal" :itemId="itemId" @ok="searchForm(false)" @close="openEditPriceModal=false"></editPriceModal>
|
|
<editPriceModal :openModal="openEditPriceModal" :itemId="itemId" @ok="searchForm(false)" @close="openEditPriceModal=false"></editPriceModal>
|
|
|
|
+ <!-- 修改仓库仓位 -->
|
|
|
|
+ <setWarehouseVue :openModal="openEditWarhouseModal" :itemId="productSnList" @ok="searchForm(false)" @close="openEditWarhouseModal=false"></setwarehousevue>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -200,10 +208,12 @@ import ProductBrand from '../../common/productBrand.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import editPriceModal from './editPriceModal.vue'
|
|
import editPriceModal from './editPriceModal.vue'
|
|
|
|
+import setWarehouseVue from './setWarehouse.vue'
|
|
|
|
+import Warehouse from '@/views/common/warehouse.js'
|
|
import importGuideModal from './importGuideModal.vue'
|
|
import importGuideModal from './importGuideModal.vue'
|
|
export default {
|
|
export default {
|
|
name: 'ProductJgList',
|
|
name: 'ProductJgList',
|
|
- components: { STable, VSelect, ProductType, ProductBrand, editPriceModal, importGuideModal },
|
|
|
|
|
|
+ components: { STable, VSelect, ProductType, ProductBrand, editPriceModal, importGuideModal, Warehouse, setWarehouseVue },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -222,7 +232,10 @@ export default {
|
|
productTypeSn3: '', // 产品三级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
onlineFalg: '', // 是否上线
|
|
onlineFalg: '', // 是否上线
|
|
enabledFlag: '1', // 启用禁用
|
|
enabledFlag: '1', // 启用禁用
|
|
- stockEmptyFlag: undefined // 是否缺货
|
|
|
|
|
|
+ stockEmptyFlag: undefined, // 是否缺货
|
|
|
|
+ warehouseCascade: [], // 仓库仓位列表
|
|
|
|
+ warehouseSn: undefined, // 仓库
|
|
|
|
+ warehouseLocationSn: undefined // 仓位
|
|
},
|
|
},
|
|
openGuideModal: false, // 导入弹框
|
|
openGuideModal: false, // 导入弹框
|
|
// 显示列选项
|
|
// 显示列选项
|
|
@@ -234,6 +247,7 @@ export default {
|
|
isZdPrice: true, // 终端指导价
|
|
isZdPrice: true, // 终端指导价
|
|
isCzPrice: true, // 车主指导价
|
|
isCzPrice: true, // 车主指导价
|
|
openEditPriceModal: false, // 自定义报价弹窗
|
|
openEditPriceModal: false, // 自定义报价弹窗
|
|
|
|
+ openEditWarhouseModal: false, // 修改仓库弹窗
|
|
iconShowFlag: false, // 列表配置图标显示
|
|
iconShowFlag: false, // 列表配置图标显示
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
@@ -242,7 +256,15 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return productList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ if (params.warehouseCascade && params.warehouseCascade.length > 0) {
|
|
|
|
+ // 仓库仓位
|
|
|
|
+ params.warehouseSn = params.warehouseCascade[0] || undefined
|
|
|
|
+ params.warehouseLocationSn = params.warehouseCascade[1] || undefined
|
|
|
|
+ }
|
|
|
|
+ const newParams = JSON.parse(JSON.stringify(params))
|
|
|
|
+ delete newParams.warehouseCascade
|
|
|
|
+ return productList(newParams).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -258,6 +280,7 @@ export default {
|
|
},
|
|
},
|
|
openModal: false, // 查看客户详情 弹框
|
|
openModal: false, // 查看客户详情 弹框
|
|
itemId: '', // 当前产品id
|
|
itemId: '', // 当前产品id
|
|
|
|
+ productSnList: [],
|
|
productTypeList: [], // 分类下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
rowSelectionInfo: null, // 已选产品
|
|
rowSelectionInfo: null, // 已选产品
|
|
currentDealerInfo: {} // 经销商信息
|
|
currentDealerInfo: {} // 经销商信息
|
|
@@ -277,6 +300,8 @@ export default {
|
|
// { title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
// { title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
// { title: '自定义终端价', dataIndex: 'price1', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
// { title: '自定义终端价', dataIndex: 'price1', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
// { title: '自定义车主价', dataIndex: 'price2', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
// { title: '自定义车主价', dataIndex: 'price2', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '默认仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '默认仓位', dataIndex: 'warehouseLocationName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '可用库存', dataIndex: 'currentStockQty', width: '7%', align: 'center', customRender: function (text) { return text || text == 0 ? text : '--' } },
|
|
{ title: '可用库存', dataIndex: 'currentStockQty', width: '7%', align: 'center', customRender: function (text) { return text || text == 0 ? text : '--' } },
|
|
{ title: '产品状态', dataIndex: 'onlineFalgDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品状态', dataIndex: 'onlineFalgDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '启用状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
|
|
{ title: '启用状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
|
|
@@ -340,6 +365,7 @@ export default {
|
|
},
|
|
},
|
|
// 查询
|
|
// 查询
|
|
searchForm (flag) {
|
|
searchForm (flag) {
|
|
|
|
+ this.rowSelectionInfo = null
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
this.$refs.table.refresh(flag)
|
|
this.$refs.table.refresh(flag)
|
|
},
|
|
},
|
|
@@ -356,6 +382,9 @@ export default {
|
|
this.queryParam.enabledFlag = '1'
|
|
this.queryParam.enabledFlag = '1'
|
|
this.queryParam.stockEmptyFlag = undefined
|
|
this.queryParam.stockEmptyFlag = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
|
|
+ this.queryParam.warehouseSn = undefined
|
|
|
|
+ this.queryParam.warehouseLocationSn = undefined
|
|
|
|
+ this.queryParam.warehouseCascade = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
this.rowSelectionInfo = null
|
|
this.rowSelectionInfo = null
|
|
this.$refs.table.clearSelected()
|
|
this.$refs.table.clearSelected()
|
|
@@ -409,13 +438,8 @@ export default {
|
|
rowSelectionFun (obj) {
|
|
rowSelectionFun (obj) {
|
|
this.rowSelectionInfo = obj || null
|
|
this.rowSelectionInfo = obj || null
|
|
},
|
|
},
|
|
- // 批量操作
|
|
|
|
|
|
+ // 批量启用禁用
|
|
handleOutbounds (type) {
|
|
handleOutbounds (type) {
|
|
- console.log(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length)
|
|
|
|
- if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length <= 0)) {
|
|
|
|
- this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: type == '2' ? '产品被禁用后,不能再销售,确定批量禁用吗?' : '确定批量启用吗?',
|
|
content: type == '2' ? '产品被禁用后,不能再销售,确定批量禁用吗?' : '确定批量启用吗?',
|
|
@@ -427,7 +451,17 @@ export default {
|
|
},
|
|
},
|
|
// 更多操作
|
|
// 更多操作
|
|
handleMenuClick (e) {
|
|
handleMenuClick (e) {
|
|
- this.handleOutbounds(e.key)
|
|
|
|
|
|
+ if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length <= 0)) {
|
|
|
|
+ this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 批量修改仓库仓位
|
|
|
|
+ if (e.key == 3) {
|
|
|
|
+ this.productSnList = this.rowSelectionInfo.selectedRowKeys
|
|
|
|
+ this.openEditWarhouseModal = true
|
|
|
|
+ } else {
|
|
|
|
+ this.handleOutbounds(e.key)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 初始化页面
|
|
// 初始化页面
|
|
pageInit () {
|
|
pageInit () {
|