Merge pull request 'main' (#13) from main into prod

Reviewed-on: #13
This commit is contained in:
charles 2025-08-19 20:09:06 +08:00
commit b80910376b
11 changed files with 99 additions and 58 deletions

View File

@ -1113,7 +1113,7 @@ detailDataLJS = {
{
"title": "NVIDIA-4090-48G",
"description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.",
"price": "8800",
"price": "8000",
"pre_price": None,
"price_unit": "台/月",
"discount": None,
@ -1207,7 +1207,7 @@ detailDataLJS = {
{
"title": "NVIDIA-4090",
"description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.",
"price": "7200",
"price": "6500",
"pre_price": None,
"price_unit": "台/月",
"discount": None,
@ -1254,7 +1254,7 @@ detailDataLJS = {
{
"title": "NVIDIA-4090",
"description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.",
"price": "7000",
"price": "6200",
"pre_price": None,
"price_unit": "台/月",
"discount": None,
@ -1263,31 +1263,31 @@ detailDataLJS = {
{
"id": 1,
"name": "CPU",
"content": "AMD EPYC 7502/32核心/2.5GHz *1",
"content": "AMD EPYC 7542 32Core * 2",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
},
{
"id": 2,
"name": "内存",
"content": "64GB DDR4-3200ECCREG RDIMM *16",
"content": "512G / 64G 3200 MT/s DDR4*8",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
},
{
"id": 3,
"name": "GPU",
"content": "Geforce RTX4090 24GPCI-e 涡轮GPU卡 *8",
"content": "Geforce RTX4090 24GPCI-e *8",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
},
{
"id": 4,
"name": "系统盘",
"content": "2.5\"480G SATA 读取密集 SSD *1",
"content": " 2.5"960G SATA SSD *2",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
},
{
"id": 5,
"name": "数据盘",
"content": "NVMe-SSD 3.84T *2",
"content": "NVMe-SSD 3.84T *1",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
},
{

View File

@ -13,6 +13,15 @@ async def enterprise_audit_info_add(ns={}):
'msg': 'user not found'
}
orgid = user_list[0]['orgid']
# 检查orgid在数据库是否存在
orgid_exist = await sor.R('enterprise_audit_info', {'orgid': orgid, 'del_flg': '0'})
if orgid_exist:
return {
'status': False,
'msg': 'orgid info already exists'
}
ns_dic = {
'id': uuid(),
'orgid': orgid,

View File

@ -57,7 +57,7 @@ async def enterprise_audit_info_search(ns={}):
orgid = user_list[0]['orgid']
user_role = await get_user_role({'userid': userid, 'sor': sor})
try:
if user_role == '客户': # 客户查询
if user_role == '客户' or user_role == '管理员': # 客户查询
count_sql = """SELECT COUNT(*) AS total_count FROM enterprise_audit_info WHERE orgid = '%s' AND del_flg = '0';""" % orgid
find_sql = """SELECT * FROM enterprise_audit_info WHERE orgid = '%s' AND del_flg = '0';""" % orgid
else: # 运营查询 enterprise_audit_info和organization表关联查询 enterprise_audit_info中的orgid和organization表中的id关联查询

View File

@ -96,7 +96,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="邮箱地址" prop="email">
<el-form-item label="邮箱地址" >
<el-input v-model="approveForm.email" placeholder="请输入邮箱地址" type="email" maxlength="50">
</el-input>
</el-form-item>
@ -114,9 +114,11 @@
<el-form-item label="营业执照正本" prop="license_original_img">
<el-upload class="license-uploader" action="#" :http-request="handleLicenseUpload"
:show-file-list="false" :before-upload="beforeLicenseUpload" accept="image/*">
<div slot="trigger" class="uploader-trigger">
<img v-if="approveForm.license_original_img" :src="approveForm.license_original_img"
class="license-image">
<i v-else class="el-icon-plus license-uploader-icon"></i>
</div>
</el-upload>
<div class="upload-tip">
<i class="el-icon-info"></i>
@ -151,10 +153,10 @@
<i class="el-icon-check"></i>
提交审批
</el-button>
<el-button type="success" @click="handlePreview" size="medium">
<!-- <el-button type="success" @click="handlePreview" size="medium">
<i class="el-icon-view"></i>
预览
</el-button>
</el-button> -->
</el-form-item>
</el-form>
</el-card>
@ -281,10 +283,6 @@ export default {
{ required: true, message: '请输入移动电话', trigger: 'blur' },
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
],
email: [
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
],
license_original_img: [
{
required: true,
@ -310,7 +308,6 @@ export default {
this.approveForm.license_number &&
this.approveForm.contact_name &&
this.approveForm.mobile_phone &&
this.approveForm.email &&
this.approveForm.license_original_file;
}
},
@ -705,6 +702,15 @@ width: 100%;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.uploader-trigger{
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
}
.upload-tip {

View File

@ -36,7 +36,7 @@
<i class="el-icon-upload2"></i> 全部导出
</el-button>
</div>
<el-table size="mini" border height="calc(100vh - 210px)" v-loading="loading" :data="tableData"
<el-table size="large" border height="calc(100vh - 210px)" v-loading="loading" :data="tableData"
style="width: 100%;border:1px solid #ccc;" element-loading-text="加载中..."
element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.8)">
<el-table-column prop="date" label="图片" width="180">
@ -51,7 +51,7 @@
</el-table-column>
<el-table-column prop="product_name" show-overflow-tooltip label="名称" min-width="180">
</el-table-column>
<el-table-column prop="product_category" show-overflow-tooltip label="所属类别" min-width="180">
<el-table-column prop="category_name" show-overflow-tooltip label="所属类别" min-width="180">
</el-table-column>
<el-table-column show-overflow-tooltip label="审核状态" min-width="180">
<template slot-scope="scope">
@ -80,23 +80,23 @@
</el-table-column>
<el-table-column fixed="right" min-width="260" label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="openDetail(scope.row, 1)">查看</el-button>
<el-button type="text" size="large" @click="openDetail(scope.row, 1)">查看</el-button>
<el-button @click="editProduct(scope.row)" type="text" style="color: #409EFF;"
size="small">修改</el-button>
<el-button v-if="role.role_type == 'customer'" type="text" size="small"
size="large">修改</el-button>
<el-button v-if="role.role_type == 'customer'" type="text" size="large"
@click="openDetail(scope.row, 2)">审核</el-button>
<el-button
:disabled="scope.row.audit_status=='rejected'||scope.row.audit_status === 'approved' && scope.row.listing_status === 'listing'"
@click="grounding(scope.row, 'listing')" type="text" style="color: #67C23A;"
size="small">上架</el-button>
size="large">上架</el-button>
<el-button
:disabled="scope.row.audit_status=='rejected'||scope.row.audit_status === 'approved' && scope.row.listing_status === 'delisting'"
@click="grounding(scope.row, 'delisting')" type="text" size="small">下架</el-button>
<el-button type="text" size="small" @click="exportData(scope.row)">导出</el-button>
@click="grounding(scope.row, 'delisting')" type="text" size="large">下架</el-button>
<el-button type="text" size="large" @click="exportData(scope.row)">导出</el-button>
<el-popconfirm v-if="role.role_type == 'customer'" title="确定删除该条目吗?"
@confirm="deleteProduct(scope.row)">
<el-button slot="reference" type="text" style="color: #F56C6C;margin-left: 10px;"
size="small">删除</el-button>
<el-button slot="reference" type="text" style="color: #F56C6C;margin-left: 10px;" size="large"
>删除</el-button>
</el-popconfirm>
</template>
</el-table-column>

View File

@ -174,6 +174,8 @@ export default Vue.extend({
.search-box {
width: 100%;
margin-top: 15px;
margin: 45px 0;
margin-bottom: 25px;
display: flex;
flex-direction: column;
align-items: center;

View File

@ -142,9 +142,6 @@ export default Vue.extend({
const userId = sessionStorage.getItem('userId');
return this.loginStateVuex || (userId !== null && userId !== 'null' && userId !== '');
},
},
methods: {
getHomepageProductCategory() {
@ -180,9 +177,13 @@ export default Vue.extend({
const hasAuditInfo = Array.isArray(dataList) && dataList.length !== 0
const roles = sessionStorage.getItem('jueseNew')
const isCustomer = roles ? roles.includes('客户') : true
if (hasAuditInfo || !isCustomer) {
if(res.data.data[0].audit_status==='pending') {
this.$message.warning('您的审核状态为待审核,请等待审核通过后发布~')
} else if (hasAuditInfo || !isCustomer) {
this.publish_type = type
this.sendProductVisible = true
} else if(res.data.data[0].audit_status==='rejected') {
this.$message.warning('您的审核状态为驳回,请重新提交~')
} else {
this.showTip = true
}
@ -580,10 +581,11 @@ export default Vue.extend({
max-width: 1600px;
margin: 20px auto;
margin-top: 10px;
margin-bottom: 0;
border-radius: 10px;
overflow: visible;
background-color: white;
height: 360px;
height: 320px;
.content-wrapper {
box-sizing: border-box;
@ -683,6 +685,9 @@ export default Vue.extend({
.user-sidebar {
height: 100%;
*{
font-size: 20px!important;
}
}
//

View File

@ -193,7 +193,7 @@ export default {
<style scoped lang="scss">
.menu-item {
flex: 1;
font-size: 13px;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -244,7 +244,8 @@ export default {
}
.category-name {
font-size: 14px;
// font-size: 14px;
font-size: 16px;
}
}
}
@ -314,7 +315,7 @@ export default {
cursor: pointer;
display: flex;
transition: all 0.3s ease;
font-size: 12px;
font-size: 16px;
color: #333;
font-weight: 500;
@ -349,7 +350,7 @@ export default {
.section-title {
font-size: 12px;
font-size: 16px;
font-weight: 600;
color: #333;
margin-right: 8px;
@ -372,7 +373,7 @@ export default {
.product-tag {
height: fit-content !important;
font-size: 12px;
font-size: 14px;
color: #666;
cursor: pointer;
transition: all 0.3s ease;

View File

@ -5,7 +5,8 @@
{{ productDetailInfo.product_name }}
</h1>
<span style="color: red;font-weight: bold;font-size: 20px;">{{ productDetailInfo.discount_price }}{{ productDetailInfo.unit }}</span>
<span style="color: red;font-weight: bold;font-size: 20px;">{{ productDetailInfo.discount_price }}{{
productDetailInfo.unit }}</span>
<button v-if="!isApprove" class="consult-btn" @click="openTalk">立即咨询</button>
</div>
<!-- 标题区域 -->
@ -54,7 +55,7 @@
</li>
</ul>
<div v-if="productDetailInfo.cart_flag === '1'" style="position: relative;width: 100%;padding-left: 16px;"
class="mysection">
class="mysection my">
<div class="section-title">配置数据</div>
<div class="section-content">
@ -176,6 +177,12 @@ export default {
</script>
<style scoped lang="scss">
.my {
.section-title::before {
top: 6px !important;
}
}
.consult-btn {
width: fit-content;
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
@ -201,6 +208,10 @@ export default {
}
.infoUl {
* {
font-size: 16px !important;
}
border-top: 1px solid #e5e5e5;
padding: 30px 0;
display: flex;
@ -235,11 +246,11 @@ export default {
align-items: center;
.leftBox {
width: 50px;
height: 50px;
width: 65px;
height: 65px;
padding: 10px;
min-width: 50px;
min-height: 50px;
min-width: 65px;
min-height: 65px;
img {
width: 100%;
@ -254,13 +265,13 @@ export default {
flex-direction: column !important;
.subTitle {
font-size: 16px;
font-size: 18px;
color: #333;
}
.subDescription {
margin-top: 10px;
font-size: 14px;
font-size: 16px;
color: #999;
}
}
@ -340,6 +351,10 @@ export default {
.title-section {
margin-bottom: 30px;
* {
font-size: 16px !important;
}
.demand-title {
font-size: 24px;
font-weight: bold;
@ -447,7 +462,7 @@ export default {
.section-title {
margin-bottom: 10px;
font-size: 14px;
font-size: 18px;
color: #333;
font-weight: bold !important;
position: relative;
@ -455,11 +470,11 @@ export default {
&::before {
content: '';
position: absolute;
top: 6px;
left: -5px;
top: 9px;
left: -4px;
display: block;
width: 2px;
height: 12px;
height: 16px;
background: #666;
}
}
@ -507,6 +522,7 @@ export default {
line-height: 1.8;
color: #333;
text-align: justify;
font-size: 16px;
}
}

View File

@ -2,7 +2,7 @@
<div
style="display: flex;align-items: center;justify-content: center;width: 100%;max-width: 1400px;">
<img @click="goHome" class="logo-clickable" style="width: 180px;height: 60px;padding-right: 20px;"
<img @click="goHome" class="logo-clickable" style="width: 200px;height: 60px;padding-right: 20px;"
src="https://www.kaiyuancloud.cn/idfile?path=logo_ncmatch.png" alt="">
<div
style="min-width:800px;display: flex;align-items: center;justify-content: space-between;">

View File

@ -327,6 +327,7 @@ export default {
background: #fff;
border: 1px solid #e8e8e8;
margin-right: 4px;
font-size: 16px!important;
&:last-child {
margin-right: 0;
@ -340,7 +341,7 @@ export default {
}
.radio-text {
font-size: 14px;
font-size: 16px;
color: #275AFF;
font-weight: 500;
transition: all 0.3s ease;
@ -446,7 +447,7 @@ export default {
}
.category-title {
font-size: 14px;
font-size: 16px;
color: #333;
// margin-bottom: 12px;
font-weight: 500;
@ -462,16 +463,17 @@ export default {
flex-wrap: wrap;
gap: 8px;
.category-tag {
padding: 3px 6px;
background-color: #fff;
border: 1px solid #e8e8e8;
border-radius: 2px;
font-size: 12px;
color: #666;
cursor: pointer;
transition: all 0.3s ease;
font-size: 14px;
&:hover {
border-color: #1890ff;
color: #1890ff;