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

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

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

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

Loading…
Cancel
Save