|
@@ -48,17 +48,17 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
- <s-table
|
|
|
+ <v-table
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :customRow="handleClickRow"
|
|
|
+ @dblRowClick="handleClickRow"
|
|
|
:scroll="{ y: tableHeight, x: 1050 }"
|
|
|
- :pageSize="50"
|
|
|
+ :pagination="{pageSize:50}"
|
|
|
:defaultLoadData="false"
|
|
|
+ pageAlign="right"
|
|
|
bordered>
|
|
|
<!-- 销售数量 -->
|
|
|
<template slot="nums" slot-scope="text, record">
|
|
@@ -94,9 +94,10 @@
|
|
|
:loading="newLoading"
|
|
|
@click="handleAdd(record)"
|
|
|
:disabled="!record.productPrice || record.productPrice<=0"
|
|
|
+ :title="!record.productPrice || record.productPrice<=0?'产品价格没有或为0,不可添加!':''"
|
|
|
id="productInfoList-edit-btn">添加</a-button>
|
|
|
</template>
|
|
|
- </s-table>
|
|
|
+ </v-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -106,11 +107,11 @@ import { queryStockProductPage } from '@/api/stock'
|
|
|
import ProductType from '@/views/common/productType.js'
|
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
|
-import { STable, VSelect } from '@/components'
|
|
|
+import { VTable, VSelect } from '@/components'
|
|
|
export default {
|
|
|
- name: 'QueryPart',
|
|
|
+ name: 'NormalQueryPart',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, ProductBrand, ProductType, chooseWarehouse },
|
|
|
+ components: { VTable, VSelect, ProductBrand, ProductType, chooseWarehouse },
|
|
|
props: {
|
|
|
newLoading: Boolean
|
|
|
},
|
|
@@ -164,18 +165,18 @@ export default {
|
|
|
const arr = [
|
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '150px', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, align: 'left' },
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: '100px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '品牌', dataIndex: 'productBrandName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: '120px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '品牌', dataIndex: 'productBrandName', width: '120px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '出库仓库', dataIndex: 'warehouseName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '单位', dataIndex: 'productUnit', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
// { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '包装数', dataIndex: 'packQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '70px', align: 'center', fixed: 'right' },
|
|
|
+ { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '80px', align: 'center', fixed: 'right' },
|
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '60px', align: 'center', fixed: 'right' }
|
|
|
]
|
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
|
|
|
- arr.splice(6, 0, { title: '售价', dataIndex: 'productPrice', width: '70px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
+ arr.splice(6, 0, { title: '售价', dataIndex: 'productPrice', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
arr.splice(7, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
}
|
|
|
return arr
|
|
@@ -183,7 +184,7 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
advanced (a, b) {
|
|
|
- this.tableHeight = window.innerHeight - (a ? 325 : 280)
|
|
|
+ this.tableHeight = window.innerHeight - (a ? 295 : 250)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -195,16 +196,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 双击列表
|
|
|
- handleClickRow (record) {
|
|
|
- const _this = this
|
|
|
- return {
|
|
|
- on: {
|
|
|
- dblclick: (event) => {
|
|
|
- event.stopPropagation()
|
|
|
- this.$emit('add', record, 0)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ handleClickRow (event, row, rowIndx) {
|
|
|
+ event.stopPropagation()
|
|
|
+ this.handleAdd(row)
|
|
|
},
|
|
|
// 查询
|
|
|
searchForm () {
|