Compare commits

...

10 Commits

Author SHA1 Message Date
faiz 045d47a308 全折扣秒杀锁定库存免审编辑 2024-12-26 14:03:04 +08:00
faiz 93bced83c2 退铸源星 2024-12-24 17:38:30 +08:00
faiz 685f5a21a4 feat:能量模块 2024-12-23 17:39:23 +08:00
faiz 4c2ad3f958 feat:按件隐藏 2024-12-23 17:37:09 +08:00
faiz 740e99c2e2 编辑取消重量,体积限制 2024-12-20 09:30:55 +08:00
faiz 2e5d8b27ab 删除免审编辑的重量,体积 2024-12-19 14:46:23 +08:00
faiz fce586d01d 导出超过26列处理 2024-12-05 15:43:13 +08:00
faiz 08eaeca7a3 注释推广 2024-12-05 15:29:53 +08:00
faiz ca29f961a3 时间戳路由,红色审核拒绝 2024-11-26 16:58:56 +08:00
faiz bcacd0dd97 版本号跳转 2024-11-24 11:04:12 +08:00
15 changed files with 3192 additions and 20 deletions
.env.development
src
components/templatesFrom
permission.js
router/modules
utils
views
marketing
energy
seckill/seckillGoods
order
product
addProduct
productList

View File

@ -2,7 +2,7 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://zkx.tropjoin.com'
VUE_APP_BASE_API = 'http://test.tropjoin.com'
# VUE_APP_BASE_API = 'https://api.tropjoin.com'
# socket 连接地址

View File

@ -12,7 +12,7 @@
</el-form-item>
<el-form-item label="计费方式:" prop="type">
<el-radio-group v-model="ruleForm.type" @change="changeRadio(ruleForm.type)">
<el-radio :label="0">按件数</el-radio>
<!-- <el-radio :label="0">按件数</el-radio> -->
<el-radio :label="1">按重量</el-radio>
<el-radio :label="2">按体积</el-radio>
</el-radio-group>
@ -163,7 +163,7 @@ import { cityListV2, templateCreateApi, templateDetailApi, templateUpdateApi } f
import LazyCascader from '../lazyCascader'
const defaultRole = {
name: '',
type: 0,
type: 1,
appoint: 0,
sort: 0,
info: '',

View File

@ -80,7 +80,12 @@ router.beforeEach(async (to, from, next) => {
next()
})
} else {
next()
// next()
if (!to.query.t) {
next({ ...to, query: { ...to.query, t: Date.now() } })
} else {
next()
}
}
}
} else {

View File

@ -163,6 +163,37 @@ const marketingRouter =
}
]
},
{
path: 'energy',
name: 'energy',
meta: {
title: '能量管理',
noCache: true
},
redirect: 'noRedirect',
component: () => import('@/views/marketing/energy/index'),
children: [
{
path: 'list',
name: 'energyGoods',
meta: {
title: '能量商品',
noCache: true
},
component: () => import('@/views/marketing/energy/energyGoods/index')
},
{
path: 'createGoods/:id?/:edit?',
name: 'CreateEnergyGoods',
meta: {
title: '添加能量商品',
noCache: true,
activeMenu: `${roterPre}/marketing/energy/list`
},
component: () => import('@/views/marketing/energy/energyGoods/createGoods')
}
]
},
{
path: 'allDiscount',
name: 'allDiscount',

View File

@ -173,7 +173,7 @@ export default function createWorkBook(header, title, data, foot, filename, shee
return letter[number]
} else {
const n = number % 26
const l = Math.floor(number % 26)
const l = Math.floor(number / 26) - 1
return letter[l] + letter[n]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,199 @@
<template>
<el-dialog
v-if="dialogVisible"
title="商品信息"
:visible.sync="dialogVisible"
width="900px"
>
<div class="divBox">
<div class="container">
<el-form size="small" inline label-width="85px">
<el-form-item label="商品分类:">
<el-select
v-model="tableFrom.mer_cate_id"
placeholder="请选择"
class="dialogWidth"
clearable
@change="getList()"
>
<el-option
v-for="item in merCateList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="商品搜索:">
<el-input
v-model="tableFrom.keyword"
placeholder="请输入商品名称,关键字,产品编号"
class="dialogWidth"
clearable
@keyup.enter.native="getList"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList"
>查询</el-button
>
</el-form-item>
</el-form>
</div>
<div v-if="resellShow" class="mb10">
<el-alert
title="注:添加为预售商品后,原普通商品会下架;如该商品已开启其它营销活动,请勿选择!"
type="warning"
v-if="resellShow"
show-icon
>
</el-alert>
</div>
<el-table v-loading="listLoading" :data="tableData.data" size="small">
<el-table-column width="55">
<template slot-scope="scope">
<el-radio
v-model="templateRadio"
:label="scope.row.product_id"
@change.native="getTemplateRow(scope.row)"
>&nbsp</el-radio
>
</template>
</el-table-column>
<el-table-column prop="product_id" label="ID" min-width="50" />
<el-table-column label="商品图" min-width="70">
<template slot-scope="scope">
<div class="demo-image__preview">
<el-image
style="width: 36px; height: 36px"
:src="scope.row.image"
:preview-src-list="[scope.row.image]"
/>
</div>
</template>
</el-table-column>
<el-table-column prop="store_name" label="商品名称" min-width="230" />
<el-table-column prop="stock" label="库存" min-width="70" />
</el-table>
<div class="block">
<el-pagination
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</div>
</el-dialog>
</template>
<script>
import { goodLstApi, categorySelectApi } from "@/api/product";
import { roterPre } from "@/settings";
export default {
name: "EnergyList",
props: {
resellShow: {
type: Boolean,
default: false
},
isSeckill: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
templateRadio: 0,
merCateList: [],
roterPre: roterPre,
listLoading: true,
tableData: {
data: [],
total: 0
},
tableFrom: {
page: 1,
limit: 6,
cate_id: "",
store_name: "",
keyword: "",
is_gift_bag: 0,
status: 1,
is_ficti: this.isSeckill ? "" : 0,
is_action: this.isSeckill ? "" : 1
},
multipleSelection: {},
checked: []
};
},
mounted() {
this.getList();
this.getCategorySelect();
window.addEventListener("unload", e => this.unloadHandler(e));
},
methods: {
getTemplateRow(row) {
this.multipleSelection = { src: row.image, id: row.product_id };
this.dialogVisible = false;
this.$emit("getProduct", this.multipleSelection);
},
//
getCategorySelect() {
categorySelectApi()
.then(res => {
this.merCateList = res.data;
})
.catch(res => {
this.$message.error(res.message);
});
},
//
getList() {
this.listLoading = true;
goodLstApi(this.tableFrom)
.then(res => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
// this.checked =
// window.form_create_helper.get(this.$route.query.field) || [];
// this.tableData.data.forEach((item) => {
// this.checked.forEach((element) => {
// if (Number(item.product_id) === Number(element.id)) {
// this.$nextTick(() => {
// this.$refs.multipleTable.toggleRowSelection(item, true);
// });
// }
// });
// });
this.listLoading = false;
})
.catch(res => {
this.listLoading = false;
this.$message.error(res.message);
});
},
pageChange(page) {
this.tableFrom.page = page;
this.getList();
},
handleSizeChange(val) {
this.tableFrom.limit = val;
this.getList();
}
}
};
</script>
<style scoped lang="scss">
.seachTiele {
line-height: 35px;
}
.fr {
float: right;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
<template>
<router-view />
</template>

View File

@ -88,7 +88,7 @@
</el-tabs>
<div class="mt5">
<router-link
:to="{ path: `${roterPre}` + '/marketing/seckill/createGoods' }"
:to="{ path: `${roterPre}` + '/marketing/seckill/createGoods?v=2' }"
>
<el-button size="small" type="primary">
<i class="add">+</i> 添加秒杀商品
@ -477,8 +477,8 @@
<label class="name">创建时间</label
>{{ formValidate.create_time }}
</div>
<div class="list sp" v-if="formValidate.refusal">
<label class="name">审核拒绝原因</label
<div style="color: red" class="list sp" v-if="formValidate.refusal">
<label style="color: red" class="name">审核拒绝原因</label
>{{ formValidate.refusal }}
</div>
</div>

View File

@ -289,7 +289,7 @@
<div>支付运费</div>
<div class="value">{{ orderDetailList.pay_postage }}</div>
</li>
<li v-if="orderDetailList.spread" class="item">
<!-- <li v-if="orderDetailList.spread" class="item">
<div>推广人</div>
<div class="value">{{ orderDetailList.spread.nickname }}</div>
</li>
@ -298,7 +298,7 @@
<div class="value">
{{ orderDetailList.TopSpread.nickname }}
</div>
</li>
</li> -->
<!-- <li v-if="!orderDetailList.activity_type" class="item">
<div>一级佣金</div>
<div class="value">

View File

@ -74,6 +74,9 @@
退货金额{{ orderDatalist.refund_good_price }}
</div>
<div class="description-term">退折扣{{ orderDatalist.amount }}</div>
<div class="description-term">
退铸源星{{ orderDatalist.integral }}
</div>
<div class="description-term">
退运费金额{{ orderDatalist.refund_postage }}
</div>

View File

@ -3255,7 +3255,8 @@ export default {
},
isForbidden(iii) {
let arr = ["成本价", "折扣", "成长值"];
let forbidden = ["库存", "重量KG", "体积(m³)"];
// let forbidden = ["", "KG", "(m³)"];
let forbidden = ["库存"];
return (
arr.includes(this.formThead[iii].title) ||
(this.virStatus && forbidden.includes(this.formThead[iii].title))

View File

@ -113,7 +113,7 @@
</el-table-column> -->
<el-table-column label="库存" min-width="100" align="center">
<template slot-scope="scope">
<el-input-number v-model="oneFormBatch[0].stock" :min="0" class="priceBox" controls-position="right"/>
<el-input-number disabled v-model="oneFormBatch[0].stock" :min="0" class="priceBox" controls-position="right"/>
</template>
</el-table-column>
<!-- <el-table-column label="商品编号" min-width="100" align="center">
@ -121,7 +121,7 @@
<el-input v-model="oneFormBatch[0].bar_code" />
</template>
</el-table-column> -->
<el-table-column label="重量(KG)" min-width="100" align="center">
<!-- <el-table-column label="重量(KG)" min-width="100" align="center">
<template slot-scope="scope">
<el-input-number v-model="oneFormBatch[0].weight" :min="0" class="priceBox" controls-position="right"/>
</template>
@ -130,7 +130,7 @@
<template slot-scope="scope">
<el-input-number v-model="oneFormBatch[0].volume" :min="0" class="priceBox" controls-position="right"/>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" min-width="150">
<template slot-scope="scope">
<a href="javascript: void(0);" class="ela-btn" @click="batchAdd">添加</a>
@ -154,7 +154,7 @@
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-if="formThead[iii].title==='商品编号'" v-model="scope.row[iii]" type="text" class="priceBox" />
<el-input-number v-else v-model="scope.row[iii]" :min="0" class="priceBox" controls-position="right"/>
<el-input-number :disabled="!can_edit_stock&&iii=='stock'" v-else v-model="scope.row[iii]" :min="0" class="priceBox" controls-position="right"/>
</template>
</el-table-column>
<!-- <template v-if="formValidate.extension_type === 1">
@ -193,7 +193,7 @@
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-if="formThead[iii].title==='商品编号'" v-model="scope.row[iii]" type="text" class="priceBox" />
<el-input-number v-else v-model="scope.row[iii]" :min="0" class="priceBox" controls-position="right"/>
<el-input-number :disabled="!can_edit_stock&&iii=='stock'" v-else v-model="scope.row[iii]" :min="0" class="priceBox" controls-position="right"/>
</template>
</el-table-column>
<!-- <template v-if="formValidate.extension_type === 1">
@ -266,8 +266,8 @@ const defaultObj = {
// ot_price: 0,
stock: 0,
// bar_code: '',
weight: 0,
volume: 0
// weight: 0,
// volume: 0
}]
}
const objTitle = {
@ -310,6 +310,7 @@ export default {
modal_loading: false,
images: '',
modalPic: false,
can_edit_stock:true,
isChoice: '',
columns: [],
merCateList: [], //
@ -561,10 +562,11 @@ export default {
}
},
//
getAttrDetail(id) {
getAttrDetail(id,can_edit_stock) {
this.product_id = id
this.loading = true
this.modals = true
this.can_edit_stock = can_edit_stock
productDetailApi(id)
.then((res) => {
const info = res.data

View File

@ -359,6 +359,7 @@
</el-table-column>
<el-table-column prop="remark" label="商品备注" min-width="70" />
<el-table-column prop="price" label="商品售价" min-width="80" />
<el-table-column prop="product_recommend_type" label="活动专区" min-width="80" />
<el-table-column prop="sales" label="销量" min-width="70" />
<el-table-column prop="stock" label="库存" min-width="70" />
<el-table-column
@ -1335,7 +1336,7 @@ export default {
},
//
onAuditFree(row) {
this.$refs.editAttr.getAttrDetail(row.product_id);
this.$refs.editAttr.getAttrDetail(row.product_id,row.can_edit_stock);
},
//
batchCommision() {