|
@@ -83,7 +83,10 @@
|
|
<template slot="content">双击列表配件可快速选中添加</template>
|
|
<template slot="content">双击列表配件可快速选中添加</template>
|
|
<a-icon type="question-circle" theme="twoTone" />
|
|
<a-icon type="question-circle" theme="twoTone" />
|
|
</a-popover>
|
|
</a-popover>
|
|
- <a-icon style="margin:0 15px" type="setting" theme="twoTone" />
|
|
|
|
|
|
+ <a-popover>
|
|
|
|
+ <template slot="content">点击设置列的显示</template>
|
|
|
|
+ <a-icon style="margin:0 15px;cursor: pointer;" @click="showSetting = true" type="setting" theme="twoTone" />
|
|
|
|
+ </a-popover>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -97,7 +100,7 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:customRow="handleClickRow"
|
|
:customRow="handleClickRow"
|
|
- :scroll="{ x: 1530, y: 150 }"
|
|
|
|
|
|
+ :scroll="{ x: 1530, y: 300 }"
|
|
:pageSize="30"
|
|
:pageSize="30"
|
|
bordered>
|
|
bordered>
|
|
<!-- 售价 -->
|
|
<!-- 售价 -->
|
|
@@ -137,12 +140,29 @@
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 销售记录 -->
|
|
<!-- 销售记录 -->
|
|
<product-salesRecord-modal ref="salseRecord" :openModal="openModal" @close="closeModal" />
|
|
<product-salesRecord-modal ref="salseRecord" :openModal="openModal" @close="closeModal" />
|
|
|
|
+ <!-- 设置列 -->
|
|
|
|
+ <a-modal
|
|
|
|
+ v-model="showSetting"
|
|
|
|
+ title="设置要显示的列"
|
|
|
|
+ centered
|
|
|
|
+ @ok="() => (showSetting = false)"
|
|
|
|
+ >
|
|
|
|
+ <a-checkbox-group v-model="settingColVal" @change="onSettingChange">
|
|
|
|
+ <a-row>
|
|
|
|
+ <a-col :span="8" v-for="item in settingColList" :key="item.value">
|
|
|
|
+ <a-checkbox :value="item.value">
|
|
|
|
+ {{ item.label }}
|
|
|
|
+ </a-checkbox>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-checkbox-group>
|
|
|
|
+ </a-modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { productBrandQuery } from '@/api/productBrand'
|
|
|
|
-import { productTypeQuery } from '@/api/productType'
|
|
|
|
|
|
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
|
|
+import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import { querySumByProductLocation } from '@/api/stock'
|
|
import { querySumByProductLocation } from '@/api/stock'
|
|
import { warehouseAllList } from '@/api/warehouse'
|
|
import { warehouseAllList } from '@/api/warehouse'
|
|
import productSalesRecordModal from './productSalesRecordModal.vue'
|
|
import productSalesRecordModal from './productSalesRecordModal.vue'
|
|
@@ -159,6 +179,18 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
|
+ showSetting: false, // 设置弹框
|
|
|
|
+ settingColVal: ['productOrigCode', 'brandName', 'warehouseName', 'warehouseLocationName', 'currentQty', 'unit'],
|
|
|
|
+ settingColList: [
|
|
|
|
+ { label: '原厂编码', value: 'productOrigCode' },
|
|
|
|
+ { label: '品牌', value: 'brandName' },
|
|
|
|
+ { label: '仓库', value: 'warehouseName' },
|
|
|
|
+ { label: '仓位', value: 'warehouseLocationName' },
|
|
|
|
+ { label: '库存数量', value: 'currentQty' },
|
|
|
|
+ { label: '单位', value: 'unit' },
|
|
|
|
+ { label: '成本价', value: 'putCost' },
|
|
|
|
+ { label: '市级价', value: 'cityPrice' }
|
|
|
|
+ ],
|
|
productType: [],
|
|
productType: [],
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
productCode: '', // 产品编码
|
|
productCode: '', // 产品编码
|
|
@@ -175,7 +207,7 @@ export default {
|
|
productBrandList: [], // 下拉数据
|
|
productBrandList: [], // 下拉数据
|
|
productTypeList: [], // 产品类别 下拉数据
|
|
productTypeList: [], // 产品类别 下拉数据
|
|
warehouseList: [], // 仓库列表
|
|
warehouseList: [], // 仓库列表
|
|
- columns: [
|
|
|
|
|
|
+ columnsBak: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', sorter: true },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', sorter: true },
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center' },
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center' },
|
|
@@ -183,11 +215,13 @@ export default {
|
|
{ title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true },
|
|
{ title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', sorter: true },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', sorter: true },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
|
|
- { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
|
|
|
|
- { title: '销售数量', scopedSlots: { customRender: 'nums' }, width: 150, align: 'center' },
|
|
|
|
|
|
+ { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center' },
|
|
{ title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
|
|
|
|
+ { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, 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' }
|
|
],
|
|
],
|
|
|
|
+ columns: [],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -217,7 +251,26 @@ export default {
|
|
openModal: false // 查看客户详情 弹框
|
|
openModal: false // 查看客户详情 弹框
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ created () {
|
|
|
|
+ this.columns = this.columnsBak
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 设置列
|
|
|
|
+ onSettingChange (v) {
|
|
|
|
+ const a = ['no', 'productCode', 'productName']
|
|
|
|
+ const b = ['price', 'salesNums', 'action']
|
|
|
|
+ const c = this.settingColVal
|
|
|
|
+ const r = a.concat(c).concat(b)
|
|
|
|
+ const d = []
|
|
|
|
+ for (let i = 0; i < r.length; i++) {
|
|
|
|
+ const row = this.columnsBak.find(item => item.dataIndex == r[i])
|
|
|
|
+ if (row) {
|
|
|
|
+ d.push(row)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.columns = d
|
|
|
|
+ console.log(d)
|
|
|
|
+ },
|
|
// 双击列表
|
|
// 双击列表
|
|
handleClickRow (record) {
|
|
handleClickRow (record) {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -272,7 +325,7 @@ export default {
|
|
},
|
|
},
|
|
// 产品品牌 列表
|
|
// 产品品牌 列表
|
|
getProductBrand () {
|
|
getProductBrand () {
|
|
- productBrandQuery({}).then(res => {
|
|
|
|
|
|
+ dealerProductBrandQuery({ sysFlag: 0 }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.productBrandList = res.data
|
|
this.productBrandList = res.data
|
|
} else {
|
|
} else {
|
|
@@ -282,7 +335,7 @@ export default {
|
|
},
|
|
},
|
|
// 产品分类 列表
|
|
// 产品分类 列表
|
|
getProductType () {
|
|
getProductType () {
|
|
- productTypeQuery({}).then(res => {
|
|
|
|
|
|
+ dealerProductTypeList({}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.productTypeList = res.data
|
|
this.productTypeList = res.data
|
|
} else {
|
|
} else {
|