|
@@ -71,11 +71,12 @@
|
|
allowClear
|
|
allowClear
|
|
placeholder="请选择产品来源"
|
|
placeholder="请选择产品来源"
|
|
v-model="queryParam.productSysFlag"
|
|
v-model="queryParam.productSysFlag"
|
|
|
|
+ id="shelfMonitoringList-productSysFlag"
|
|
>
|
|
>
|
|
- <a-select-option value="1">
|
|
|
|
|
|
+ <a-select-option value="1" id="shelfMonitoringList-productSysFlag-1">
|
|
箭冠
|
|
箭冠
|
|
</a-select-option>
|
|
</a-select-option>
|
|
- <a-select-option value="0">
|
|
|
|
|
|
+ <a-select-option value="0" id="shelfMonitoringList-productSysFlag-0">
|
|
自建
|
|
自建
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
@@ -96,7 +97,7 @@
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
id="inventoryQueryList-export">导出</a-button>
|
|
id="inventoryQueryList-export">导出</a-button>
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px" id="shelfMonitoringList-advanced">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
</a>
|
|
</a>
|
|
@@ -145,15 +146,19 @@
|
|
v-if="$hasPermissions('B_inventoryInventoryQueryDetail')"
|
|
v-if="$hasPermissions('B_inventoryInventoryQueryDetail')"
|
|
class="button-success"
|
|
class="button-success"
|
|
@click="goDetail(record)"
|
|
@click="goDetail(record)"
|
|
- id="inventoryQueryList-detail-btn">库存详情</a-button>
|
|
|
|
|
|
+ :id="'inventoryQueryList-detail-'+record.id">库存详情</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
v-if="$hasPermissions('B_inventoryInventoryQueryStock')"
|
|
v-if="$hasPermissions('B_inventoryInventoryQueryStock')"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
@click="goWarehouseDetail(record)"
|
|
@click="goWarehouseDetail(record)"
|
|
- id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
|
|
|
|
- <a-button v-if="record.dealerProduct.sysFlag==1&&record.dealerProduct.onlineFalg==1&&$hasPermissions('M_shoppingCart')" type="link" @click="addShopCar(record)">加入购物车</a-button>
|
|
|
|
|
|
+ :id="'inventoryQueryList-outdetail-'+record.id">出入库明细</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="record.dealerProduct.sysFlag==1&&record.dealerProduct.onlineFalg==1&&$hasPermissions('M_shoppingCart')"
|
|
|
|
+ type="link"
|
|
|
|
+ :id="'inventoryQueryList-shopCar-'+record.id"
|
|
|
|
+ @click="addShopCar(record)">加入购物车</a-button>
|
|
<span v-if="!$hasPermissions('B_inventoryInventoryQueryDetail') && !$hasPermissions('B_inventoryInventoryQueryStock')">--</span>
|
|
<span v-if="!$hasPermissions('B_inventoryInventoryQueryDetail') && !$hasPermissions('B_inventoryInventoryQueryStock')">--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
@@ -167,15 +172,15 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
-import { stockList, stockCount, stockExport } from '@/api/stock'
|
|
|
|
-import { purchaseCartExistProduct } from '@/api/purchaseCart'
|
|
|
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import Warehouse from '@/views/common/warehouse.js'
|
|
import Warehouse from '@/views/common/warehouse.js'
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
import inventoryQueryDetailModal from './detailModal.vue'
|
|
import inventoryQueryDetailModal from './detailModal.vue'
|
|
import setPurchaseQty from './setPurchaseQty.vue'
|
|
import setPurchaseQty from './setPurchaseQty.vue'
|
|
-import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
|
|
|
+import { stockList, stockCount, stockExport } from '@/api/stock'
|
|
|
|
+import { purchaseCartExistProduct } from '@/api/purchaseCart'
|
|
export default {
|
|
export default {
|
|
name: 'InventoryQueryList',
|
|
name: 'InventoryQueryList',
|
|
components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand, Warehouse, setPurchaseQty },
|
|
components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand, Warehouse, setPurchaseQty },
|
|
@@ -193,26 +198,25 @@ export default {
|
|
productTypeSn1: '', // 产品分类1
|
|
productTypeSn1: '', // 产品分类1
|
|
productTypeSn2: '', // 产品分类2
|
|
productTypeSn2: '', // 产品分类2
|
|
productTypeSn3: '', // 产品分类3
|
|
productTypeSn3: '', // 产品分类3
|
|
- warehouse: [],
|
|
|
|
- warehouseSn: '',
|
|
|
|
- warehouseLocationSn: '',
|
|
|
|
|
|
+ warehouse: [], // 仓库默认值
|
|
|
|
+ warehouseSn: '', // 仓库sn
|
|
|
|
+ warehouseLocationSn: '', // 仓位sn
|
|
zeroQtyFlag: false, // 库存情况
|
|
zeroQtyFlag: false, // 库存情况
|
|
enableFlag: true, // 显示禁用产品
|
|
enableFlag: true, // 显示禁用产品
|
|
minUnsalableDays: undefined, // 滞销天数最小值
|
|
minUnsalableDays: undefined, // 滞销天数最小值
|
|
maxUnsalableDays: undefined, // 滞销天数最大值
|
|
maxUnsalableDays: undefined, // 滞销天数最大值
|
|
- productSysFlag: undefined
|
|
|
|
|
|
+ productSysFlag: undefined // 产品来源,箭冠or自建
|
|
},
|
|
},
|
|
- productTypeSn: [],
|
|
|
|
|
|
+ productTypeSn: [], // 产品类型sn
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
zeroQtyData: [ // 库存情况
|
|
zeroQtyData: [ // 库存情况
|
|
{ name: '库存数量为0', id: '1' },
|
|
{ name: '库存数量为0', id: '1' },
|
|
{ name: '库存数量不为0', id: '0' }
|
|
{ name: '库存数量不为0', id: '0' }
|
|
],
|
|
],
|
|
- openPurchaseModal: false,
|
|
|
|
|
|
+ openPurchaseModal: false, // 设置采购数量弹框
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- console.log(parameter)
|
|
|
|
// 查询条件有直销天数先校验滞销天数
|
|
// 查询条件有直销天数先校验滞销天数
|
|
if (this.checkValueRange()) {
|
|
if (this.checkValueRange()) {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -231,16 +235,15 @@ export default {
|
|
parameter.sortAlias = ''
|
|
parameter.sortAlias = ''
|
|
}
|
|
}
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ // 格式化数据
|
|
params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''
|
|
params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''
|
|
params.enableFlag = params.enableFlag ? '' : '1'
|
|
params.enableFlag = params.enableFlag ? '' : '1'
|
|
params.product = {
|
|
params.product = {
|
|
sysFlag: params.productSysFlag || undefined
|
|
sysFlag: params.productSysFlag || undefined
|
|
}
|
|
}
|
|
-
|
|
|
|
// 仓库仓位
|
|
// 仓库仓位
|
|
params.warehouseSn = params.warehouse[0]
|
|
params.warehouseSn = params.warehouse[0]
|
|
params.warehouseLocationSn = params.warehouse[1]
|
|
params.warehouseLocationSn = params.warehouse[1]
|
|
-
|
|
|
|
return stockList(params).then(res => {
|
|
return stockList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -269,8 +272,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
openModal: false, // 查看库存详情 弹框
|
|
openModal: false, // 查看库存详情 弹框
|
|
- nowData: null,
|
|
|
|
- currentStock: null
|
|
|
|
|
|
+ nowData: null, // 当前操作数据
|
|
|
|
+ currentStock: null // 可用库存合计
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -288,6 +291,7 @@ export default {
|
|
{ title: <div><a-tooltip placement='top' title='1:产品距离最近一次销售的时间,30天算一个月 2:采购退货,调拨等不算销售,不用来计算滞销天数'><a-icon type="question-circle" /></a-tooltip> 滞销天数</div>, width: '10%', align: 'center', dataIndex: 'unsalableDays', scopedSlots: { customRender: 'unsalableDays' }, sorter: true },
|
|
{ title: <div><a-tooltip placement='top' title='1:产品距离最近一次销售的时间,30天算一个月 2:采购退货,调拨等不算销售,不用来计算滞销天数'><a-icon type="question-circle" /></a-tooltip> 滞销天数</div>, width: '10%', align: 'center', dataIndex: 'unsalableDays', scopedSlots: { customRender: 'unsalableDays' }, sorter: true },
|
|
{ title: <div><a-tooltip placement='top' title='注意:购物车仅限添加箭冠已上线产品。'><a-icon type="question-circle" /></a-tooltip> 操作</div>, scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
|
|
{ title: <div><a-tooltip placement='top' title='注意:购物车仅限添加箭冠已上线产品。'><a-icon type="question-circle" /></a-tooltip> 操作</div>, scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
|
|
]
|
|
]
|
|
|
|
+ // 成本权限
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
arr.splice(7, 0, { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '8%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(7, 0, { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '8%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
}
|
|
}
|
|
@@ -403,7 +407,7 @@ export default {
|
|
},
|
|
},
|
|
// 出入库明细
|
|
// 出入库明细
|
|
goWarehouseDetail (row) {
|
|
goWarehouseDetail (row) {
|
|
- this.$router.push({ path: `/inventoryManagement/inventoryQuery/warehouseDetail/${row.productSn}` })
|
|
|
|
|
|
+ this.$router.push({ name: 'inventoryQueryWarehouseDetail', params: { sn: row.productSn } })
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
@@ -436,19 +440,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 递归函数
|
|
|
|
- recursionFun (data) {
|
|
|
|
- if (data) {
|
|
|
|
- data.map((item, index) => {
|
|
|
|
- if (item.children && item.children.length == 0) {
|
|
|
|
- delete item.children
|
|
|
|
- } else {
|
|
|
|
- this.recursionFun(item.children)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 分类 changeType
|
|
|
|
|
|
+ // 产品分类 changeType
|
|
changeType (val, selectedOptions) {
|
|
changeType (val, selectedOptions) {
|
|
for (let i = 0; i < val.length; i++) {
|
|
for (let i = 0; i < val.length; i++) {
|
|
this.queryParam['productTypeSn' + (i + 1)] = val[i]
|
|
this.queryParam['productTypeSn' + (i + 1)] = val[i]
|
|
@@ -459,11 +451,7 @@ export default {
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- filterOption (input, option) {
|
|
|
|
- return (
|
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
|
|
+ // 页面初始化
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -472,6 +460,7 @@ export default {
|
|
// 是否默认包括禁用产品
|
|
// 是否默认包括禁用产品
|
|
this.queryParam.enableFlag = localStorage.getItem('productEnabledFlag-' + this.$store.state.user.info.orgId) != 'false'
|
|
this.queryParam.enableFlag = localStorage.getItem('productEnabledFlag-' + this.$store.state.user.info.orgId) != 'false'
|
|
},
|
|
},
|
|
|
|
+ // 表格高度
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 216
|
|
this.tableHeight = window.innerHeight - tableSearchH - 216
|