Commit b3deca5b by yuzhenWang

Merge branch 'feature-20251125wyz-做产品上架' into 'dev'

Feature 20251125wyz 做产品上架

See merge request !10
parents 9d61862a 3270a8b4
{ {
"name": "ruoyi", "name": "yd",
"version": "3.9.0", "version": "3.9.0",
"description": "若依管理系统", "description": "银盾中台系统",
"author": "若依", "author": "银盾",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"scripts": { "scripts": {
......
...@@ -34,3 +34,20 @@ export function getAllCompanys(data) { ...@@ -34,3 +34,20 @@ export function getAllCompanys(data) {
data: data data: data
}) })
} }
// 获取保险对账公司
export function getReconciliationCompany(data) {
return request({
url: '/insurance/base/api/insuranceReconciliationCompany/page',
method: 'post',
data: data
})
}
// 获取保险公司列表
export function getInsuranceCompany(data) {
return request({
url: '/insurance/base/api/insuranceCompany/page',
method: 'post',
data: data
})
}
...@@ -110,7 +110,7 @@ export function deleteCommission(announcementCommissionRatioBizId) { ...@@ -110,7 +110,7 @@ export function deleteCommission(announcementCommissionRatioBizId) {
method: 'delete' method: 'delete'
}) })
} }
// 获得来佣列表的数据 // 获得来佣规格数据
export function comeCommissionList(data) { export function comeCommissionList(data) {
return request({ return request({
url: '/product/api/expectedSpecies/page', url: '/product/api/expectedSpecies/page',
...@@ -118,7 +118,7 @@ export function comeCommissionList(data) { ...@@ -118,7 +118,7 @@ export function comeCommissionList(data) {
data: data data: data
}) })
} }
// 获得来佣列表的数据 // 更新产品规格数据
export function comeExpectedSpecies(data) { export function comeExpectedSpecies(data) {
return request({ return request({
url: '/product/api/expectedSpecies/import/species', url: '/product/api/expectedSpecies/import/species',
......
...@@ -82,3 +82,11 @@ export function getAllCompanys(data) { ...@@ -82,3 +82,11 @@ export function getAllCompanys(data) {
data: data data: data
}) })
} }
// 通过部门ID查询部门下的所有用户
export function getDeptUsers(data) {
return request({
url: '/user/api/relTenantDept/import/query/dept/tree',
method: 'post',
data: data
})
}
\ No newline at end of file
...@@ -33,7 +33,7 @@ const props = defineProps({ ...@@ -33,7 +33,7 @@ const props = defineProps({
pageSizes: { pageSizes: {
type: Array, type: Array,
default() { default() {
return [10, 20, 30, 50] return [10, 50, 100, 300]
} }
}, },
// 移动端页码按钮的数量端默认值5 // 移动端页码按钮的数量端默认值5
......
...@@ -7,25 +7,11 @@ ...@@ -7,25 +7,11 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<div class="commonHeader">产品标题</div> <div class="commonHeader">产品标题</div>
<el-select <el-select v-model="queryParams.productName" filterable remote allow-create default-first-option
v-model="queryParams.productName" :reserve-keyword="false" placeholder="请选择产品名称" @blur="handleSelectChange" :remote-method="searchProduct"
filterable clearable remote-show-suffix>
remote <el-option v-for="item in productList" :key="item.productBizId" :label="item.productName"
allow-create :value="item.productBizId" />
default-first-option
:reserve-keyword="false"
placeholder="请选择产品名称"
@blur="handleSelectChange"
:remote-method="searchProduct"
clearable
remote-show-suffix
>
<el-option
v-for="item in productList"
:key="item.productBizId"
:label="item.productName"
:value="item.productBizId"
/>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
...@@ -47,29 +33,21 @@ ...@@ -47,29 +33,21 @@
</el-col> </el-col>
<el-col :span="24" v-if="showNameTip"> <el-col :span="24" v-if="showNameTip">
<div class="tipCon"> <div class="tipCon">
<el-icon color="red" :size="20" style="margin-right: 5px"><Warning /></el-icon> <el-icon color="red" :size="20" style="margin-right: 5px">
<Warning />
</el-icon>
<span>标题信息过少,请至少输入5个有效字数(含中文、英文、数字)</span> <span>标题信息过少,请至少输入5个有效字数(含中文、英文、数字)</span>
</div> </div>
</el-col> </el-col>
<el-col :span="24" style="margin: 20px 0"> <el-col :span="24" style="margin: 20px 0">
<div class="commonHeader"> <div class="commonHeader">
图片和视频 图片和视频
<span style="color: rgb(111, 111, 111); font-size: 15px" <span style="color: rgb(111, 111, 111); font-size: 15px">({{ imageInfo.count }}/9)</span>
>({{ imageInfo.count }}/9)</span
>
</div> </div>
<image-upload <image-upload v-model="queryParams.picture" :action="'/oss/api/oss/upload'" :limit="9" :image-size="10"
v-model="queryParams.picture" :video-size="500" :file-type="['png', 'jpg', 'jpeg', 'mp4']" :is-show-tip="false"
:action="'/oss/api/oss/upload'" @change="handleImageChange" @file-change="handleFileChange" />
:limit="9"
:image-size="10"
:video-size="500"
:file-type="['png', 'jpg', 'jpeg', 'mp4']"
:is-show-tip="false"
@change="handleImageChange"
@file-change="handleFileChange"
/>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<div v-for="(item, index) in imageRequireList" :key="item.key" class="imgTip"> <div v-for="(item, index) in imageRequireList" :key="item.key" class="imgTip">
...@@ -90,7 +68,9 @@ ...@@ -90,7 +68,9 @@
</el-col> </el-col>
<el-col :span="24" v-if="imageInfo.count > 0 && imageInfo.count < 3"> <el-col :span="24" v-if="imageInfo.count > 0 && imageInfo.count < 3">
<div class="tipCon"> <div class="tipCon">
<el-icon color="red" :size="20" style="margin-right: 5px"><Warning /></el-icon> <el-icon color="red" :size="20" style="margin-right: 5px">
<Warning />
</el-icon>
<span>请上传至少3张产品主图</span> <span>请上传至少3张产品主图</span>
</div> </div>
</el-col> </el-col>
...@@ -338,6 +318,10 @@ function submitProduct() { ...@@ -338,6 +318,10 @@ function submitProduct() {
}) })
} }
if (imageInfo.value.fileList && imageInfo.value.fileList.length > 0) { if (imageInfo.value.fileList && imageInfo.value.fileList.length > 0) {
if (imageInfo.value.fileList.length < 3) {
proxy.$modal.msgError('请上传3张产品图片')
return
}
imageInfo.value.fileList.forEach(item => { imageInfo.value.fileList.forEach(item => {
mainUrlsList.push(item.url) mainUrlsList.push(item.url)
}) })
...@@ -395,6 +379,7 @@ searchProduct() ...@@ -395,6 +379,7 @@ searchProduct()
overflow: hidden; overflow: hidden;
overflow-y: scroll; */ overflow-y: scroll; */
} }
.form-content { .form-content {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
...@@ -404,15 +389,18 @@ searchProduct() ...@@ -404,15 +389,18 @@ searchProduct()
/* padding: 20px; */ /* padding: 20px; */
/* background-color: #fff; */ /* background-color: #fff; */
} }
.formHeader { .formHeader {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 22px; font-size: 22px;
font-weight: 600; font-weight: 600;
} }
.nameTip { .nameTip {
font-size: 13px; font-size: 13px;
margin-top: 10px; margin-top: 10px;
} }
.tipCon { .tipCon {
/* width: 450px; */ /* width: 450px; */
width: fit-content; width: fit-content;
...@@ -426,23 +414,28 @@ searchProduct() ...@@ -426,23 +414,28 @@ searchProduct()
font-size: 14px; font-size: 14px;
display: flex; display: flex;
align-items: center; align-items: center;
span { span {
color: rgb(111 111 111); color: rgb(111 111 111);
} }
} }
.commonHeader { .commonHeader {
font-size: 16px; font-size: 16px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.imgTip { .imgTip {
color: #ccc; color: #ccc;
font-size: 14px; font-size: 14px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.classTip { .classTip {
color: #ccc; color: #ccc;
font-size: 14px; font-size: 14px;
} }
.bottomBtn { .bottomBtn {
border-top: 1px solid rgb(247 247 247); border-top: 1px solid rgb(247 247 247);
width: 100%; width: 100%;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row style="margin-bottom: 20px"> <el-row style="margin-bottom: 20px">
<el-col style="display: flex; justify-content: space-between" <el-col style="display: flex; justify-content: space-between">
><div> <div>
<el-button type="primary" plain icon="Refresh" @click="updateSpecies">更新规格</el-button> <el-button type="primary" plain icon="Refresh" @click="updateSpecies('update')"
>更新规格</el-button
>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -209,6 +211,27 @@ ...@@ -209,6 +211,27 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否直签" prop="isDirectSign" width="150">
<template #header>
<span class="required-label">是否直签</span>
</template>
<template #default="scope">
<el-select
v-model="scope.row.isDirectSign"
style="width: 100%"
placeholder="请选择"
clearable
@change="scope.row.reconciliationCompanyName = ''"
>
<el-option
v-for="item in sys_no_yes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column <el-table-column
label="对账公司" label="对账公司"
prop="reconciliationCompanyName" prop="reconciliationCompanyName"
...@@ -225,7 +248,10 @@ ...@@ -225,7 +248,10 @@
remote remote
reserve-keyword reserve-keyword
placeholder="请输入关键词搜索" placeholder="请输入关键词搜索"
:remote-method="query => searchSelectList(query, 'reconciliationCompanyName')" :remote-method="
query =>
searchSelectList(query, 'reconciliationCompanyName', scope.row.isDirectSign)
"
:loading="searchLoadingStates['reconciliationCompanyName']" :loading="searchLoadingStates['reconciliationCompanyName']"
> >
<el-option <el-option
...@@ -334,7 +360,9 @@ ...@@ -334,7 +360,9 @@
</template> </template>
</el-dialog> </el-dialog>
<el-dialog title="佣金设置错误提示" v-model="errorTip" width="500px" append-to-body> <el-dialog title="佣金设置错误提示" v-model="errorTip" width="500px" append-to-body>
<div style="margin-bottom: 10px" v-for="item in settingErrorTip">{{ item }}</div> <div style="margin-bottom: 10px" v-for="(item, index) in settingErrorTip" :key="index">
{{ item }}
</div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="errorTip = false">去修改</el-button> <el-button type="primary" @click="errorTip = false">去修改</el-button>
...@@ -353,7 +381,7 @@ import { ...@@ -353,7 +381,7 @@ import {
deleteComeCommission, deleteComeCommission,
changeComeStatus changeComeStatus
} from '@/api/product/index' } from '@/api/product/index'
import { getAllCompanys } from '@/api/common' import { getAllCompanys, getReconciliationCompany, getInsuranceCompany } from '@/api/common'
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
const props = defineProps({ const props = defineProps({
...@@ -413,13 +441,49 @@ const switchChange = row => { ...@@ -413,13 +441,49 @@ const switchChange = row => {
} }
} }
// 搜索方法 // 搜索方法
const searchSelectList = async (query, fieldKey) => { const searchSelectList = async (query, fieldKey, isDirectSign = 0) => {
// 设置该字段的加载状态 // 设置该字段的加载状态
searchLoadingStates.value[fieldKey] = true searchLoadingStates.value[fieldKey] = true
try { try {
if (fieldKey === 'reconciliationCompanyName') {
if (isDirectSign == 1) {
getInsuranceCompany({
queryContent: query.trim(),
pageNo: 1,
pageSize: 10
}).then(response => {
response.data.records = response.data.records.map(item => {
return {
...item,
label: item.fullName,
value: item.insuranceCompanyBizId
}
})
searchOptions.value[fieldKey] = response.data.records
})
return
} else {
getReconciliationCompany({
name: query.trim(),
pageNo: 1,
pageSize: 10
}).then(response => {
response.data.records = response.data.records.map(item => {
return {
...item,
label: item.name,
value: item.reconciliationCompanyBizId
}
})
searchOptions.value[fieldKey] = response.data.records
})
}
return
}
// 根据不同的字段key调用不同的API // 根据不同的字段key调用不同的API
if (fieldKey === 'reconciliationCompanyName' || fieldKey === 'salesOrgName') { if (fieldKey === 'salesOrgName') {
const params = { const params = {
deptName: query.trim(), deptName: query.trim(),
pageNo: 1, pageNo: 1,
...@@ -682,11 +746,11 @@ function getSettingList() { ...@@ -682,11 +746,11 @@ function getSettingList() {
startPeriod: '', startPeriod: '',
endPeriod: '', endPeriod: '',
commissionRate: '', commissionRate: '',
discountRatio: '', discountRatio: '100',
effectiveStart: '', effectiveStart: '',
effectiveEnd: '', effectiveEnd: '',
isExchangeRate: '', isExchangeRate: '1',
currency: '', currency: 'HKD',
status: '1', status: '1',
remark: '', remark: '',
salesOrgName: '', salesOrgName: '',
...@@ -882,7 +946,7 @@ const handleCommissionSetting = row => { ...@@ -882,7 +946,7 @@ const handleCommissionSetting = row => {
getSettingList() getSettingList()
} }
/** 获得规格数据 */ /** 获得来佣规格数据 */
function getSpeciesList() { function getSpeciesList() {
loading.value = true loading.value = true
comeCommissionList(queryParams.value).then(response => { comeCommissionList(queryParams.value).then(response => {
...@@ -891,7 +955,9 @@ function getSpeciesList() { ...@@ -891,7 +955,9 @@ function getSpeciesList() {
total.value = response.data.total total.value = response.data.total
loading.value = false loading.value = false
if (originalData.value.length == 0) { if (originalData.value.length == 0) {
proxy.$modal.msgError('该商品暂无规格数据,请先更新规格数据') // 如果来佣表没有规格数据,那么同步产品规格数据
updateSpecies()
// proxy.$modal.msgError('该商品暂无规格数据,请先更新规格数据')
} else { } else {
let codeArr = [] let codeArr = []
// 自定义没有typeCode影响表格得展示 // 自定义没有typeCode影响表格得展示
...@@ -922,17 +988,37 @@ function getSpeciesList() { ...@@ -922,17 +988,37 @@ function getSpeciesList() {
} }
}) })
} }
/** 更新规格数据 */ /** 更新产品规格数据 */
function updateSpecies() { function updateSpecies(type) {
loading.value = true loading.value = true
if (type == 'update') {
proxy.$modal
.confirm('确认更新来佣管理-规格数据吗,此操作会重置佣金数据', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
// 用户点击了确定按钮,执行更新操作
updateSpecies()
})
.catch(() => {
// 用户点击了取消按钮,不执行任何操作
})
} else {
comeExpectedSpecies({ productLaunchBizId: route.query.productLaunchBizId }).then(response => { comeExpectedSpecies({ productLaunchBizId: route.query.productLaunchBizId }).then(response => {
if (response.code === 200) { if (response.code === 200) {
if (type == 'update') {
proxy.$modal.msgSuccess('来佣管理-规格更新成功') proxy.$modal.msgSuccess('来佣管理-规格更新成功')
} else {
console.log('初始化规格数据')
}
getSpeciesList() getSpeciesList()
} else { } else {
proxy.$modal.msgError(response.msg) proxy.$modal.msgError(response.msg)
} }
}) })
}
} }
//========多选下拉框悬停效果结束========= //========多选下拉框悬停效果结束=========
...@@ -952,11 +1038,13 @@ watch( ...@@ -952,11 +1038,13 @@ watch(
color: #f56c6c; color: #f56c6c;
margin-right: 4px; margin-right: 4px;
} }
.btnCon { .btnCon {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
/* 错误行样式 */ /* 错误行样式 */
.error-row { .error-row {
background-color: #fff2f0 !important; background-color: #fff2f0 !important;
...@@ -984,10 +1072,12 @@ watch( ...@@ -984,10 +1072,12 @@ watch(
50% { 50% {
background-color: #fff2f0; background-color: #fff2f0;
} }
25%, 25%,
75% { 75% {
background-color: #ffeaea; background-color: #ffeaea;
} }
100% { 100% {
background-color: #fff2f0; background-color: #fff2f0;
} }
......
...@@ -234,9 +234,9 @@ ...@@ -234,9 +234,9 @@
</div> </div>
</el-col> </el-col>
</template> </template>
<el-col :span="24" class="addTxt"> <el-col :span="24" class="addTxt" @click="addParams">
<el-icon :size="24"><CirclePlus /></el-icon> <el-icon :size="24"><CirclePlus /></el-icon>
<span style="margin-left: 5px" @click="addParams">添加新参数</span> <span style="margin-left: 5px">添加新参数</span>
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
......
...@@ -50,6 +50,11 @@ ...@@ -50,6 +50,11 @@
<dict-tag :options="product_launch_status" :value="scope.row.status" /> <dict-tag :options="product_launch_status" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime" align="left">
<template #default="scope">
{{ formatIsoToDateTime(scope.row.createTime) }}
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
...@@ -134,6 +139,7 @@ ...@@ -134,6 +139,7 @@
</div> </div>
</template> </template>
<script setup name="InsuranceProduct"> <script setup name="InsuranceProduct">
import { formatIsoToDateTime } from '@/utils/date'
import { goodsList, changeProductStatus, productApproval } from '@/api/product/index' import { goodsList, changeProductStatus, productApproval } from '@/api/product/index'
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
const router = useRouter() const router = useRouter()
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<el-form-item label="手机号" prop="mobile"> <el-form-item label="手机号" prop="mobile">
<el-input v-model="form.mobile" placeholder="请输入手机号" /> <el-input v-model="form.mobile" placeholder="请输入手机号" />
</el-form-item> </el-form-item>
<el-form-item label="用户属性"> <!-- <el-form-item label="用户属性">
<el-select v-model="form.attribute" placeholder="请输入"> <el-select v-model="form.attribute" placeholder="请输入">
<el-option <el-option
v-for="item in sys_user_attribute" v-for="item in sys_user_attribute"
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
:value="Number(item.value)" :value="Number(item.value)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="性别"> <el-form-item label="性别">
<el-radio-group v-model="form.gender"> <el-radio-group v-model="form.gender">
<el-radio <el-radio
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment