main^2
fanfan 6 months ago
parent 145a72236d
commit 37c1ef5552
  1. 7
      src/components/Modal/GoodsModal/GoodsModal.vue
  2. 4
      src/components/SelectGoods/SelectGoods.vue
  3. 5
      src/views/dataCenter/goods/modules/MultiSpec.vue
  4. 4
      src/views/dataCenter/goods/modules/Update.vue

@ -112,6 +112,7 @@ export default {
maxNum: PropTypes.integer.def(100),
//
defaultList: PropTypes.array.def([]),
channel:PropTypes.any
},
components: {
STable,
@ -128,11 +129,15 @@ export default {
//
searchForm: this.$form.createForm(this),
//
queryParam: {},
queryParam: {
is_sale: 1,
is_pool: 1,
},
// table
columns,
// Promise
loadData: (param) => {
this.queryParam.channel = this.channel
return GoodsApi.list({ ...param, ...this.queryParam }).then((response) => {
return response.data.list
})

@ -6,6 +6,7 @@
:multiple="multiple"
:maxNum="maxNum"
:defaultList="selectedItems"
:channel="channel"
@handleSubmit="handleSelectGoodsSubmit"
/>
</div>
@ -53,7 +54,8 @@ export default {
// , multiple
maxNum: PropTypes.integer.def(100),
//
defaultList: PropTypes.array.def([])
defaultList: PropTypes.array.def([]),
channel:PropTypes.any
},
data () {
return {

@ -95,7 +95,7 @@
bordered
>
<template slot="select_goods" slot-scope="text, item">
<SelectGoods :multiple="false" @change="handleSelectGoods($event, item)" />
<SelectGoods :multiple="false" :channel="channel" @change="handleSelectGoods($event, item)" />
</template>
<!-- 商品名称 -->
<!-- <template slot="goods_name" slot-scope="text, item">
@ -155,7 +155,8 @@ export default {
defaultSkuList: PropTypes.array.def([]),
// ()
isSpecLocked: PropTypes.bool.def(false),
checkList: PropTypes.array.def([])
checkList: PropTypes.array.def([]),
channel:PropTypes.any
},
data () {
return {

@ -152,6 +152,7 @@
:isSpecLocked="formData.goods.isSpecLocked"
:defaultSpecList="formData.goods.specList"
:defaultSkuList="formData.goods.skuList"
:channel="formData.goods.channel"
:checkList="checkList"
/>
</div>
@ -502,7 +503,6 @@ export default {
methods: {
showEdit(goodsId) {
// ID
GoodsModel.formData.goods = {}
this.visible = true
this.goodsId = goodsId
this.initData()
@ -520,8 +520,10 @@ export default {
//
initData(goodsId) {
// form
GoodsModel.formData.goods = {}
this.isLoading = true
GoodsModel.getFromData(this.goodsId).then(() => {
this.formData.goods.goods_images=[]
//
if (!isEmptyObject(this.form.getFieldsValue())) {
//

Loading…
Cancel
Save