|
@@ -71,12 +71,18 @@
|
|
v-if="$hasPermissions('B_productLevel_edit')"
|
|
v-if="$hasPermissions('B_productLevel_edit')"
|
|
class="button-info"
|
|
class="button-info"
|
|
@click="handleEdit(record)"
|
|
@click="handleEdit(record)"
|
|
- id="productLevelList-edit-btn">编辑</a-button>
|
|
|
|
|
|
+ :id="'productLevelList-edit-btn'+record.id">编辑</a-button>
|
|
<span v-else>--</span>
|
|
<span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 编辑价格 -->
|
|
<!-- 编辑价格 -->
|
|
- <product-level-edit-modal v-drag :openModal="openModal" :itemId="itemId" :nowData="nowData" @close="closeModal" @ok="$refs.table.refresh()" />
|
|
|
|
|
|
+ <product-level-edit-modal
|
|
|
|
+ v-drag
|
|
|
|
+ :openModal="openModal"
|
|
|
|
+ :itemId="itemId"
|
|
|
|
+ :nowData="nowData"
|
|
|
|
+ @close="closeModal"
|
|
|
|
+ @ok="$refs.table.refresh()" />
|
|
</a-card>
|
|
</a-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -84,12 +90,12 @@
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
-//组件
|
|
|
|
|
|
+// 组件
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import productLevelEditModal from './editModal.vue'
|
|
import productLevelEditModal from './editModal.vue'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductType from '@/views/common/productType.js'
|
|
-//接口
|
|
|
|
|
|
+// 接口
|
|
import { productLevelList } from '@/api/product'
|
|
import { productLevelList } from '@/api/product'
|
|
export default {
|
|
export default {
|
|
name: 'ProductLevelList',
|
|
name: 'ProductLevelList',
|
|
@@ -98,20 +104,20 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
- tableHeight: 0,//表格高度
|
|
|
|
|
|
+ tableHeight: 0, // 表格高度
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
// 查询条件
|
|
// 查询条件
|
|
- queryParam: {
|
|
|
|
|
|
+ queryParam: {
|
|
name: '', // 产品名称
|
|
name: '', // 产品名称
|
|
queryWord: '', // 产品编码/原厂编码
|
|
queryWord: '', // 产品编码/原厂编码
|
|
productBrandSn: undefined, // 产品品牌
|
|
productBrandSn: undefined, // 产品品牌
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
- level: undefined //产品级别
|
|
|
|
|
|
+ level: undefined // 产品级别
|
|
},
|
|
},
|
|
- productType: [],//产品分类
|
|
|
|
|
|
+ productType: [], // 产品分类
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '产品名称', dataIndex: 'name', align: 'left', width: '25%', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'name', align: 'left', width: '25%', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
@@ -150,7 +156,7 @@ export default {
|
|
itemId: '', // 当前产品id
|
|
itemId: '', // 当前产品id
|
|
productBrandList: [], // 品牌下拉数据
|
|
productBrandList: [], // 品牌下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
- nowData: null //当前行数据
|
|
|
|
|
|
+ nowData: null // 当前行数据
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -184,7 +190,7 @@ export default {
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
- //导出配置
|
|
|
|
|
|
+ // 导出配置
|
|
download (data) {
|
|
download (data) {
|
|
if (!data) { return }
|
|
if (!data) { return }
|
|
const url = window.URL.createObjectURL(new Blob([data]))
|
|
const url = window.URL.createObjectURL(new Blob([data]))
|
|
@@ -197,21 +203,21 @@ export default {
|
|
document.body.appendChild(link)
|
|
document.body.appendChild(link)
|
|
link.click()
|
|
link.click()
|
|
},
|
|
},
|
|
- //初始化
|
|
|
|
|
|
+ // 初始化
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- //计算表格高度
|
|
|
|
|
|
+ // 计算表格高度
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 200
|
|
this.tableHeight = window.innerHeight - tableSearchH - 200
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- //展开关闭 监听表格高度变化
|
|
|
|
|
|
+ // 展开关闭 监听表格高度变化
|
|
advanced (newValue, oldValue) {
|
|
advanced (newValue, oldValue) {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|