|
@@ -55,7 +55,7 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:customRow="handleClickRow"
|
|
:customRow="handleClickRow"
|
|
- :scroll="{ x: tableWidth, y: 300 }"
|
|
|
|
|
|
+ :scroll="{ x: 1400, y: 300 }"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
<!-- 销售数量 -->
|
|
<!-- 销售数量 -->
|
|
@@ -70,6 +70,13 @@
|
|
placeholder="请输入" />
|
|
placeholder="请输入" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
+ <!-- 产品名称 -->
|
|
|
|
+ <template slot="productName" slot-scope="text, record">
|
|
|
|
+ <a-badge count="活动" v-if="record.oosFlag == 1">
|
|
|
|
+ <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
+ </a-badge>
|
|
|
|
+ <span v-else>{{ text }}</span>
|
|
|
|
+ </template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
@@ -85,8 +92,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { querySumByProductLocation } from '@/api/stock'
|
|
|
|
-import { warehouseAllList } from '@/api/warehouse'
|
|
|
|
|
|
+import { queryStockProductPage } from '@/api/stock'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
@@ -98,20 +104,14 @@ export default {
|
|
type: [Number, String],
|
|
type: [Number, String],
|
|
default: ''
|
|
default: ''
|
|
},
|
|
},
|
|
- priceType: {
|
|
|
|
- type: [Number, String],
|
|
|
|
- default: ''
|
|
|
|
- },
|
|
|
|
newLoading: Boolean
|
|
newLoading: Boolean
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
showSetting: false, // 设置弹框
|
|
showSetting: false, // 设置弹框
|
|
- tableWidth: 0,
|
|
|
|
productType: [],
|
|
productType: [],
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- salePriceType: '',
|
|
|
|
productCode: '', // 产品编码
|
|
productCode: '', // 产品编码
|
|
productName: '', // 产品名称
|
|
productName: '', // 产品名称
|
|
productOrigCode: '', // 原厂编码
|
|
productOrigCode: '', // 原厂编码
|
|
@@ -124,29 +124,28 @@ export default {
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, width: 200, align: 'center' },
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
|
|
|
|
- { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: 150, align: 'center' },
|
|
|
|
- { title: '包装数', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '售价', dataIndex: 'productPrice', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
|
|
+ { title: '包装数', dataIndex: 'productPackQty', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: 150, align: 'center' },
|
|
{ title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: 150, align: 'center' },
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- this.queryParam.salePriceType = this.priceType
|
|
|
|
- return querySumByProductLocation(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ this.queryParam.dealerSn = this.buyerSn
|
|
|
|
+ return queryStockProductPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
const data = res.data
|
|
const data = res.data
|
|
data.list = data.list.filter(item => item != null)
|
|
data.list = data.list.filter(item => item != null)
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].salesNums = 1
|
|
data.list[i].salesNums = 1
|
|
- data.list[i].currentQty = data.list[i].currentQty || 0
|
|
|
|
|
|
+ data.list[i].currentStockQty = data.list[i].currentStockQty || 0
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
return data
|
|
return data
|
|
@@ -162,7 +161,7 @@ export default {
|
|
on: {
|
|
on: {
|
|
dblclick: (event) => {
|
|
dblclick: (event) => {
|
|
event.stopPropagation()
|
|
event.stopPropagation()
|
|
- _this.$emit('add', record)
|
|
|
|
|
|
+ _this.$emit('add', record, 0)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -185,7 +184,7 @@ export default {
|
|
},
|
|
},
|
|
// 选择配件
|
|
// 选择配件
|
|
handleAdd (row) {
|
|
handleAdd (row) {
|
|
- this.$emit('add', row)
|
|
|
|
|
|
+ this.$emit('add', row, 0)
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|