|
@@ -15,22 +15,27 @@
|
|
|
<a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品名称">
|
|
|
+ <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="产品品牌">
|
|
|
+ <ProductBrand id="inventoryQueryList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="产品分类">
|
|
|
+ <ProductType id="inventoryQueryList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeType" v-model="productTypeSn"></ProductType>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="仓库仓位">
|
|
|
+ <Warehouse id="inventoryQueryList-warehouse" ref="warehouse" v-model="queryParam.warehouse"></Warehouse>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
<template v-if="advanced">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品名称">
|
|
|
- <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="产品品牌">
|
|
|
- <ProductBrand id="inventoryQueryList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-model-item label="产品分类">
|
|
|
- <ProductType id="inventoryQueryList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeType" v-model="productTypeSn"></ProductType>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="滞销天数">
|
|
|
<a-input-group>
|
|
@@ -60,7 +65,7 @@
|
|
|
</a-input-group>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品来源">
|
|
|
<a-select
|
|
|
allowClear
|
|
@@ -77,23 +82,25 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
- <a-col :md="10" :sm="24">
|
|
|
- <a-checkbox v-model="queryParam.zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag">只查看有库存</a-checkbox>
|
|
|
- <a-checkbox v-model="queryParam.enableFlag" :checked="queryParam.enableFlag" id="inventoryQueryList-enableFlag">包括禁用产品</a-checkbox>
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- v-if="$hasPermissions('B_inventoryInventoryQueryExport')"
|
|
|
- class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
- :disabled="disabled"
|
|
|
- :loading="exportLoading"
|
|
|
- id="inventoryQueryList-export">导出</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <div style="margin-bottom: 10px;">
|
|
|
+ <a-checkbox v-model="queryParam.zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag">只查看有库存</a-checkbox>
|
|
|
+ <a-checkbox v-model="queryParam.enableFlag" :checked="queryParam.enableFlag" id="inventoryQueryList-enableFlag">包括禁用产品</a-checkbox>
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ v-if="$hasPermissions('B_inventoryInventoryQueryExport')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ id="inventoryQueryList-export">导出</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -101,9 +108,9 @@
|
|
|
<!-- 合计 -->
|
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
|
<div class="ftext" slot="message">
|
|
|
- 可用库存总数量(个):<strong>{{ currentStock&&(currentStock.totalCurrentStockQty || currentStock.totalCurrentStockQty==0) ? currentStock.totalCurrentStockQty : '--' }}</strong>;
|
|
|
+ 可用库存总数量:<strong>{{ currentStock&&(currentStock.totalCurrentStockQty || currentStock.totalCurrentStockQty==0) ? currentStock.totalCurrentStockQty : '--' }}个</strong>;
|
|
|
<div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
|
|
|
- 可用库存总成本(¥):<strong>{{ currentStock&&(currentStock.totalCurrentStockCost || currentStock.totalCurrentStockCost==0) ? currentStock.totalCurrentStockCost : '--' }}</strong>。
|
|
|
+ 可用库存总成本:<strong>{{ currentStock&&(currentStock.totalCurrentStockCost || currentStock.totalCurrentStockCost==0) ? toThousands(currentStock.totalCurrentStockCost) : '--' }}</strong>。
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-alert>
|
|
@@ -160,12 +167,13 @@ import { commonMixin } from '@/utils/mixin'
|
|
|
import { stockList, stockCount, stockExport } from '@/api/stock'
|
|
|
import ProductType from '../../common/productType.js'
|
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
|
+import Warehouse from '@/views/common/warehouse.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import inventoryQueryDetailModal from './detailModal.vue'
|
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
export default {
|
|
|
name: 'InventoryQueryList',
|
|
|
- components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand },
|
|
|
+ components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand, Warehouse },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
@@ -180,6 +188,7 @@ export default {
|
|
|
productTypeSn1: '', // 产品分类1
|
|
|
productTypeSn2: '', // 产品分类2
|
|
|
productTypeSn3: '', // 产品分类3
|
|
|
+ warehouse: undefined,
|
|
|
zeroQtyFlag: false, // 库存情况
|
|
|
enableFlag: true, // 显示禁用产品
|
|
|
minUnsalableDays: undefined, // 滞销天数最小值
|
|
@@ -253,6 +262,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
columns () {
|
|
|
+ const _this = this
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -266,7 +276,7 @@ export default {
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(7, 0, { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '8%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(7, 0, { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '8%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -331,6 +341,8 @@ export default {
|
|
|
this.queryParam.brandName = undefined
|
|
|
this.queryParam.productTypeName = undefined
|
|
|
this.queryParam.zeroQtyFlag = false
|
|
|
+ this.queryParam.warehouse = undefined
|
|
|
+ this.$refs.warehouse.setDefaultVal()
|
|
|
this.productTypeSn = []
|
|
|
this.queryParam.minUnsalableDays = undefined // 滞销天数最小值
|
|
|
this.queryParam.maxUnsalableDays = undefined // 滞销天数最大值
|