|
@@ -84,10 +84,11 @@
|
|
<template slot="productCode" slot-scope="text, record">
|
|
<template slot="productCode" slot-scope="text, record">
|
|
<div v-if="modes=='pages'">
|
|
<div v-if="modes=='pages'">
|
|
<span style="padding-right: 15px;">{{ text }}</span>
|
|
<span style="padding-right: 15px;">{{ text }}</span>
|
|
- <a-tag v-if="record.onlineFalg == 0">下架</a-tag>
|
|
|
|
|
|
+ <a-tag v-if="record.productEntity.onlineFalg == 0">下架</a-tag>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
-
|
|
|
|
|
|
+ <span style="padding-right: 15px;">{{ text }}</span>
|
|
|
|
+ <a-tag v-if="record.productEntity.onlineFalg == 0">下架</a-tag>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
@@ -96,6 +97,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import { mapActions } from 'vuex'
|
|
import { purchaseCartList, purchaseDeleteBatch, purchaseUpdateQty } from '@/api/purchaseCart'
|
|
import { purchaseCartList, purchaseDeleteBatch, purchaseUpdateQty } from '@/api/purchaseCart'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
@@ -124,6 +126,7 @@ export default {
|
|
productTypeSn3: '' ,// 产品三级分类
|
|
productTypeSn3: '' ,// 产品三级分类
|
|
onlineFalg: undefined
|
|
onlineFalg: undefined
|
|
},
|
|
},
|
|
|
|
+ paramsData: null,
|
|
openEditPriceModal: false, // 自定义报价弹窗
|
|
openEditPriceModal: false, // 自定义报价弹窗
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
columns: [],
|
|
columns: [],
|
|
@@ -131,11 +134,10 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return purchaseCartList(Object.assign(parameter, {productEntity:this.queryParam})).then(res => {
|
|
|
|
|
|
+ return purchaseCartList(Object.assign(parameter, {productEntity:this.queryParam}, this.paramsData)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
- this.$store.commit('setCartCount', data.count)
|
|
|
|
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
|
|
@@ -151,6 +153,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...mapActions(['getCartList']),
|
|
// 查询
|
|
// 查询
|
|
searchForm () {
|
|
searchForm () {
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
@@ -164,6 +167,7 @@ export default {
|
|
this.queryParam.productTypeSn1 = ''
|
|
this.queryParam.productTypeSn1 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
|
|
+ this.queryParam.onlineFalg = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
this.rowSelectionInfo = null
|
|
this.rowSelectionInfo = null
|
|
@@ -221,6 +225,7 @@ export default {
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if(res.status == 200){
|
|
if(res.status == 200){
|
|
this.$message.info(res.message)
|
|
this.$message.info(res.message)
|
|
|
|
+ this.getCartList()
|
|
this.searchForm()
|
|
this.searchForm()
|
|
}
|
|
}
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -243,8 +248,9 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- pageInit () {
|
|
|
|
|
|
+ pageInit (paramsData) {
|
|
const _this = this
|
|
const _this = this
|
|
|
|
+ this.paramsData = paramsData || {}
|
|
this.setTableH()
|
|
this.setTableH()
|
|
this.getColumns()
|
|
this.getColumns()
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|