Compare commits

..

No commits in common. 'main' and 'feature/0423' have entirely different histories.

  1. 24466
      package-lock.json
  2. 2
      public/config.js
  3. 6
      src/api/shop/index.js
  4. 46
      src/views/goods/Index.vue
  5. 4
      src/views/setting/payment/template/Create.vue
  6. 4
      src/views/setting/payment/template/Update.vue
  7. 42
      src/views/shop/Index.vue
  8. 4
      src/views/shop/modules/Edit.vue

24466
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
public/config.js vendored

@ -5,7 +5,7 @@ window.publicConfig = {
// 例如: https://www.你的域名.com/index.php?s=/store
// BASE_API: '../index.php?s=/store',
// BASE_API: 'http://www.yzshop.cn/index.php?s=/store',
BASE_API: 'https://www.royaum.com.cn/index.php?s=/store',
BASE_API: 'https://test-www.royaum.com.cn/index.php?s=/store',
// 图片文件上传大小 (单位mb)
uploadImageSize: 2,

@ -12,13 +12,13 @@ const api = {
/**
* 商户列表
* @param {*} params
* @param {*} data
*/
export function shopList(params) {
export function shopList(data) {
return axios({
url: api.shopList,
method: 'get',
params
data
})
}

@ -34,13 +34,6 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="商户">
<a-select @change="changeMerchant" placeholder="请选择">
<a-select-option :value="item.merchant_id" v-for="item in merchantList" :key="item.merchant_id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="商品价格">
<div style="display: flex" class="goodsType">
<a-input v-decorator="['goods_price_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px">-</span>
@ -66,8 +59,6 @@
<a-radio-button value="on_sale">出售中</a-radio-button>
<a-radio-button value="off_sale">已下架</a-radio-button>
<a-radio-button value="sold_out">已售罄</a-radio-button>
<a-radio-button value="in_pool">已入池</a-radio-button>
<a-radio-button value="out_pool">未入池</a-radio-button>
</a-radio-group>
</div>
<a-button v-if="$auth('/goods/create') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" class="fl-l" type="primary" icon="plus" @click="handleCreate()">创建商品</a-button>
@ -151,7 +142,6 @@
<script>
import * as GoodsApi from '@/api/goods'
import * as ShopApi from '@/api/shop'
import { ContentHeader, STable } from '@/components'
import CategoryModel from '@/common/model/Category'
import store from '../../store'
@ -213,13 +203,13 @@ const columns = [
sorter: true,
scopedSlots: { customRender: 'profit_rate' },
},
// {
// title: '',
// width: '90px',
// dataIndex: 'markup_rate',
// sorter: true,
// scopedSlots: { customRender: 'markup_rate' },
// },
{
title: '加价率',
width: '90px',
dataIndex: 'markup_rate',
sorter: true,
scopedSlots: { customRender: 'markup_rate' },
},
{
title: '总销量',
width: '80px',
@ -281,7 +271,6 @@ export default {
listType: 'all',
spec_type: '',
channel: '',
merchant_id: ''
},
//
isLoading: false,
@ -316,7 +305,6 @@ export default {
{ name: '多规格', val: 20 },
],
checkList: [],
merchantList: []
}
},
created() {
@ -327,7 +315,6 @@ export default {
//
this.getCategoryList()
this.getDataList() //
this.getShopList() //
},
computed: {
rowSelection() {
@ -370,8 +357,6 @@ export default {
(this.queryParam.categoryId || '') +
'&channel=' +
this.queryParam.channel +
'&merchant_id=' +
this.queryParam.merchant_id +
'&goodsIds=' +
goodsIds +
'&Access-Token=' +
@ -382,23 +367,6 @@ export default {
getChannel(val) {
this.queryParam.channel = val
},
changeMerchant(val) {
this.queryParam.merchant_id = val
},
//
getShopList() {
this.isLoading = true
ShopApi.shopList({ page: 1, pageSize: 10000 })
.then((result) => {
const data = result.data.data
for (const shop of data) {
shop.name = shop.shop_name
}
this.merchantList = data
this.isLoading = false
})
.finally(() => (this.isLoading = false))
},
getDataList() {
return GoodsApi.getDataList().then((result) => {
const obj = result.data

@ -16,7 +16,7 @@
>
<a-input v-model="record.name" autocomplete="off" />
<div class="form-item-help">
<small>必须填写商户平台-营业执照名称否则会影响分账功能</small>
<small>仅用于后台管理使用对前台用户不可见例如H5端-支付宝支付微信小程序端-微信支付</small>
</div>
</a-form-model-item>
<a-form-model-item label="管理员备注" prop="remarks">
@ -540,4 +540,4 @@ export default {
padding-left: 0;
}
}
</style>
</style>

@ -16,7 +16,7 @@
>
<a-input v-model="record.name" autocomplete="off" />
<div class="form-item-help">
<small>必须填写商户平台-营业执照名称否则会影响分账功能</small>
<small>仅用于后台管理使用对前台用户不可见例如H5端-支付宝支付微信小程序端-微信支付</small>
</div>
</a-form-model-item>
<a-form-model-item label="管理员备注" prop="remarks">
@ -565,4 +565,4 @@ export default {
padding-left: 0;
}
}
</style>
</style>

@ -4,12 +4,14 @@
<div class="table-operator">
<a-button v-action:add type="primary" icon="plus" @click="handleAdd">新增</a-button>
</div>
<s-table
ref="table"
<a-table
rowKey="merchant_id"
:columns="columns"
:data="loadData"
:dataSource="shopList"
:defaultExpandAllRows="true"
:expandIconColumnIndex="1"
:pagination="pagination"
:loading="isLoading"
>
<span slot="logoImage" slot-scope="text, item">
<a v-if="item.logoImage" title="点击查看原图" :href="item.logoImage.external_url" target="_blank">
@ -25,9 +27,9 @@
<a v-action:delete @click="handleDelete(item)">删除</a>
</template>
</span>
</s-table>
<AddForm ref="AddForm" @handleSubmit="handleRefresh(true)" />
<EditForm ref="EditForm" @handleSubmit="handleRefresh()" />
</a-table>
<AddForm ref="AddForm" @handleSubmit="handleRefresh" />
<EditForm ref="EditForm" @handleSubmit="handleRefresh" />
</a-card>
</template>
@ -45,11 +47,7 @@ export default {
},
data() {
return {
loadData: (param) => {
return Api.shopList({ ...param }).then((response) => {
return response.data
})
},
shopList: [],
//
columns: [
{
@ -95,7 +93,10 @@ export default {
]
}
},
created() {},
created() {
//
this.getShopList()
},
methods: {
//
async handleAdd () {
@ -108,9 +109,20 @@ export default {
this.$refs.EditForm.add(record)
},
//
handleRefresh (bool = false) {
handleRefresh () {
//
this.$refs.table.refresh(bool)
this.getShopList()
},
//
getShopList() {
this.isLoading = true
Api.shopList()
.then((result) => {
console.log(result)
this.shopList = result.data.data
this.isLoading = false
})
.finally(() => (this.isLoading = false))
},
//
handleDelete(record) {
@ -122,7 +134,7 @@ export default {
return Api.deleteShop({ merchantId: record['merchant_id'] })
.then((result) => {
self.$message.success(result.message, 1.5)
self.handleRefresh(true)
self.handleRefresh()
})
.finally(() => modal.destroy())
}

@ -82,8 +82,8 @@
</a-form-item>
<a-form-item class="mt-30" label="精选商户" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_select_mechant', { rules: [{ required: true }] }]">
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
<a-radio :value="true"></a-radio>
<a-radio :value="false"></a-radio>
</a-radio-group>
</a-form-item>
</a-form>

Loading…
Cancel
Save