wangdong 7 months ago
commit 9482e11342
  1. BIN
      public/static/template/batch-goods.xlsx
  2. 24
      src/api/goods/index.js
  3. BIN
      src/assets/img/shenhe.png
  4. 2
      src/common/model/goods/Index.js
  5. 17
      src/components/Table/GoodsItem/GoodsItem.vue
  6. 13
      src/components/Table/UserItem/UserItem.vue
  7. 11
      src/views/goods/Create.vue
  8. 33
      src/views/goods/Index.vue
  9. 7
      src/views/goods/modules/Update.vue
  10. 4
      src/views/index/Index.vue
  11. 7
      src/views/order/Index.vue

@ -17,6 +17,30 @@ const api = {
pool: '/goods/pool', pool: '/goods/pool',
collector:'/goods/collector', collector:'/goods/collector',
category: '/goods/category', category: '/goods/category',
oneShelf:'/goods/oneClickShelf',
oneOffTheShelf:'/goods/oneClickOffTheShelf'
}
/**
* 一键上架
* @param {*} data
*/
export function oneShelf (data) {
return axios({
url: api.oneShelf,
method: 'post',
data: data
})
}
/**
* 一键下架
* @param {*} data
*/
export function oneOffTheShelf (data) {
return axios({
url: api.oneOffTheShelf,
method: 'post',
data: data
})
} }
/** /**
* 归类 * 归类

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -95,7 +95,7 @@ export default {
'status', 'spec_type', 'deduct_stock_type', 'is_restrict', 'content', 'status', 'spec_type', 'deduct_stock_type', 'is_restrict', 'content',
'selling_point', 'serviceIds', 'sales_initial', 'is_points_gift', 'selling_point', 'serviceIds', 'sales_initial', 'is_points_gift',
'is_points_discount', 'is_enable_grade', 'is_alone_grade', 'is_ind_dealer', 'is_points_discount', 'is_enable_grade', 'is_alone_grade', 'is_ind_dealer',
'dealer_money_type', 'first_money', 'second_money', 'third_money', 'cmmdty_model','is_check','goods_source','delivery_time','is_in_store','remark' 'dealer_money_type', 'first_money', 'second_money', 'third_money', 'cmmdty_model','is_check','goods_source','delivery_time','is_in_store','remark','is_use_jd_stock'
]) ])
console.log(goodsFormData, 100) console.log(goodsFormData, 100)
return { return {

@ -9,6 +9,7 @@
<a-tooltip placement="topLeft" :title="dataObj.title"> <a-tooltip placement="topLeft" :title="dataObj.title">
<p class="title twoline-hide" :style="{ width: `${dataObj.titleWidth}px` }">{{ dataObj.title }}</p></a-tooltip <p class="title twoline-hide" :style="{ width: `${dataObj.titleWidth}px` }">{{ dataObj.title }}</p></a-tooltip
> >
<span class="shen" v-if="dataObj.isCheck==1"> <img src="~@/assets/img/shenhe.png" /></span>
<!-- 副标题 --> <!-- 副标题 -->
<p v-if="isEmpty(dataObj.goodsProps)" class="subtitle" :class="{ 'c-p': subTitleColor }"> <p v-if="isEmpty(dataObj.goodsProps)" class="subtitle" :class="{ 'c-p': subTitleColor }">
<a-tooltip placement="topLeft" :title="dataObj.subtitle"> {{ dataObj.subtitle }}</a-tooltip> <a-tooltip placement="topLeft" :title="dataObj.subtitle"> {{ dataObj.subtitle }}</a-tooltip>
@ -37,6 +38,7 @@ export default {
data: PropTypes.object.def({}), data: PropTypes.object.def({}),
// //
subTitleColor: PropTypes.bool.def(false), subTitleColor: PropTypes.bool.def(false),
source: PropTypes.any.def(0),
}, },
computed: { computed: {
dataObj() { dataObj() {
@ -48,6 +50,7 @@ export default {
subtitle: '', subtitle: '',
goodsProps: [], goodsProps: [],
titleWidth: 200, titleWidth: 200,
isCheck:''
}, },
this.$props.data this.$props.data
) )
@ -64,6 +67,20 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@size: 60px; @size: 60px;
.shen {
width: 22px;
height: 22px;
border-radius: 50%;
background: red;
text-align: center;
line-height: 22px;
img {
width: 15px;
height: 15px;
line-height: 25px;
margin-top: -3px;
}
}
.goods-info { .goods-info {
width: 270px; width: 270px;
line-height: 1.3; line-height: 1.3;

@ -12,8 +12,11 @@
</a-tooltip> </a-tooltip>
</div> </div>
<div class="in-right flex flex-dir-column flex-x-center"> <div class="in-right flex flex-dir-column flex-x-center">
<p class="user-name oneline-hide">{{ user.nick_name }}</p> <p class="user-name oneline-hide"> {{ user.nick_name }}</p>
<p class="user-platform"> <p class="user-name oneline-hide">手机号{{ user.mobile }}</p>
<p class="user-name oneline-hide">归属地{{ JSON.parse(user.homelocation).prov }} {{ JSON.parse(user.homelocation).city }}</p>
<p class="user-platform">
<platform-icon :name="user.platform" :showTips="true" /> <platform-icon :name="user.platform" :showTips="true" />
</p> </p>
</div> </div>
@ -48,7 +51,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
// //
.user-info { .user-info {
width: 160px; width: 180px;
height: 40px; height: 40px;
line-height: 1.3; line-height: 1.3;
@ -65,8 +68,8 @@ export default {
.in-right { .in-right {
float: left; float: left;
width: 100px; // width: 100px;
height: 100%; // height: 100%;
.user-name { .user-name {
margin-bottom: 2px; margin-bottom: 2px;

@ -85,11 +85,12 @@
<a-radio :value="1"></a-radio> <a-radio :value="1"></a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="是否使用京东库存" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-radio-group v-decorator="['is_use_jd_stock', { initialValue: 0, rules: [{ required: true }] }]">
<a-input placeholder="请输入商品编码" v-decorator="['goods_no']" /> <a-radio :value="0"></a-radio>
</a-form-item> --> <a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="所属分类排行(0表示不参加排行)" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="所属分类排行(0表示不参加排行)" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="所属分类排行" v-decorator="['paihang']" /> <a-input placeholder="所属分类排行" v-decorator="['paihang']" />
</a-form-item> </a-form-item>

@ -114,9 +114,11 @@
<a-button v-if="$module('goods-import') && $auth('/goods/import/batch') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" class="fl-l" icon="arrow-up" @click="handleImport()">批量导入</a-button> <a-button v-if="$module('goods-import') && $auth('/goods/import/batch') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" class="fl-l" icon="arrow-up" @click="handleImport()">批量导入</a-button>
<a-button style="background-color: #501212; color: #fff; border: none" @click="handleExport(selectedRowKeys)">导出</a-button> <a-button style="background-color: #501212; color: #fff; border: none" @click="handleExport(selectedRowKeys)">导出</a-button>
<a-button v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" class="fl-l" style="background-color: #f0baae; border: none" type="primary" @click="handleModify()">批量修改</a-button> <a-button v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" class="fl-l" style="background-color: #f0baae; border: none" type="primary" @click="handleModify()">批量修改</a-button>
<a-button v-if="selectedRowKeys.length" style="background-color: green; color: #fff; border: none; border-radius: 2px" @click="categoryVisible = true">归类</a-button> <a-button v-if="selectedRowKeys.length==0" style="background-color: green; color: #fff; border: none; border-radius: 2px" @click="handleSetupGoods(selectedRowKeys,1)">全部上架</a-button>
<a-button v-if="selectedRowKeys.length==0" style="background-color: #FB322A; color: #fff; border: none; border-radius: 2px" @click="handleSetupGoods(selectedRowKeys,2)">全部下架</a-button>
<a-button v-if="selectedRowKeys.length" style="background-color: #872658; color: #fff; border: none; border-radius: 2px" @click="categoryVisible = true">归类</a-button>
<a-button style="background-color: #9E7AFF; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(1)">设置大牌</a-button> <a-button style="background-color: #9E7AFF; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(1)">设置大牌</a-button>
<a-button style="background-color: #FB322A; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(2)">设置新品</a-button> <a-button style="background-color: #0b1746; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(2)">设置新品</a-button>
<a-button style="background-color: #1184D2; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(3)">设置店内</a-button> <a-button style="background-color: #1184D2; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(3)">设置店内</a-button>
<a-button style="background-color: #EEA507; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(4)">设置排行榜</a-button> <a-button style="background-color: #EEA507; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(4)">设置排行榜</a-button>
<div v-if="selectedRowKeys.length" class="button-group" style="margin-top:15px"> <div v-if="selectedRowKeys.length" class="button-group" style="margin-top:15px">
@ -459,6 +461,26 @@ export default {
this.isLoading = false this.isLoading = false
}) })
}, },
handleSetupGoods(goodsIds, type) {
// type==1 1 2
this.isLoading = true
let url = ''
if (type == 1) {
url = GoodsApi.oneShelf()
}
if (type == 2) {
url = GoodsApi.oneOffTheShelf()
}
url.then((result) => {
this.isLoading = false
this.$message.success(result.message, 1.5)
this.handleRefresh()
})
.finally((result) => {
this.$message.warning(result.message, 1.5)
this.isLoading = false
})
},
handleSetup(type) { handleSetup(type) {
this.setupValue = 1; this.setupValue = 1;
this.paihang = ''; this.paihang = '';
@ -483,6 +505,7 @@ export default {
} }
url.then((result) => { url.then((result) => {
this.batchVisible = false this.batchVisible = false
this.isLoading = false
this.$message.success(result.message, 1.5) this.$message.success(result.message, 1.5)
this.handleRefresh() this.handleRefresh()
}) })
@ -678,9 +701,9 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.overlayName .ant-tooltip-inner { .overlayName .ant-tooltip-inner {
background-color: rgba(0, 0, 0, 0.7) !important; background-color: rgba(0, 0, 0, 0.7) !important;
width: 350px; width: 350px;
padding: 0; padding: 0;
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>

@ -85,7 +85,12 @@
<a-radio :value="1"></a-radio> <a-radio :value="1"></a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="是否使用京东库存" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_use_jd_stock', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入商品编码" v-decorator="['goods_no']" /> <a-input placeholder="请输入商品编码" v-decorator="['goods_no']" />
</a-form-item> </a-form-item>

@ -70,6 +70,10 @@
<p class="info">商品总数量</p> <p class="info">商品总数量</p>
<p class="keynote">{{ data.statistics.goodsTotal }}</p> <p class="keynote">{{ data.statistics.goodsTotal }}</p>
</div> </div>
<div class="col-right" style="margin-left:60px">
<p class="info">在售数量</p>
<p class="keynote">{{ data.statistics.getGoodsGroundingTotal }}</p>
</div>
</div> </div>
</a-card> </a-card>
</a-col> </a-col>

@ -98,6 +98,8 @@
imageAlt: '商品图片', imageAlt: '商品图片',
title: goodsItm.goods_name, title: goodsItm.goods_name,
goodsProps: goodsItm.goods_props, goodsProps: goodsItm.goods_props,
isCheck: goodsItm.is_check,
source:1
}" }"
/> />
</td> </td>
@ -278,6 +280,11 @@ const columns = [
title: '买家', title: '买家',
dataIndex: 'user', dataIndex: 'user',
scopedSlots: { customRender: 'user' } scopedSlots: { customRender: 'user' }
},
{
title: '归属地',
dataIndex: 'user',
scopedSlots: { customRender: 'user' }
}, },
{ {
title: '支付方式', title: '支付方式',

Loading…
Cancel
Save