Ver código fonte

'2025年7月2日18:40:53'

master
wq 3 semanas atrás
pai
commit
8818fa91a9

+ 8
- 5
src/crud/components/Dialog.operation.vue Ver arquivo

@@ -16,10 +16,12 @@
<div style="background-color: #999; height: 1px; flex: 1"></div>
</div>
<!-- 此处的width决定了是否要换行 v-show="!item.form.hide"-->

{{ form[item.form.prop ? item.form.prop : item.prop] }}
<el-form-item style="position: relative" v-if="
!item.form.hideEdit && !item.form.hide && item.form.type != 'title'
" class="as-bold" :label="item.label" :prop="item.prop" :label-width="item.form.formLabelWidth ? item.form.formLabelWidth : formLabelWidth
" :error="item.form.error" :rules="rules[item.prop]">
" :error="item.form.error" :rules="rules[item.prop]">
<!-- 输入框 -->
<div style="width: 100%" v-if="item.form.type === 'input'">
<!-- :readonly="true" 只读 -->
@@ -33,7 +35,8 @@
item,
dialogArray
)
" :maxlength="item.form.maxlength ?? 60" @input="handleBeforeInput($event, item.form.checkContent, item)">
" :maxlength="item.form.maxlength ?? 60"
@input="handleBeforeInput($event, item.form.checkContent, item)">
<!-- 输入框单位 -->
<template v-if="item.unit" #append>
<el-button @click="unitClick($event, item, form[item.prop])">
@@ -150,7 +153,7 @@
<div style="width: 100%" v-else-if="item.form.type === 'upload'">
<el-upload ref="upload" class="upload-demo" :file-list="fileList" drag :limit="item.form.limit || 1"
:on-exceed="(files) => handleExceed(files, item.form.limit)" :before-upload="(el) =>
beforeAvatarUpload(el, item.form.suffixType, item.form.typeHint)
beforeAvatarUpload(el, item.form.suffixType, item.form.typeHint)
" :data="data" :action="uploadUrl" :on-remove="(el) => onRemove(el, item)"
@success="onSuccess($event, item)" :accept="item.form.accept">
<el-icon class="el-icon--upload">
@@ -252,7 +255,7 @@ function customSelectorSelection(value, title, form, item, dialogArray) {
//文件上传成功
const fileList = ref<any>([])
function onSuccess(response: any, item: any) {
const url = response.data.ossFilePath
const url = response.data.ossFilePath
fileList.value.push(url)
props.form[item.prop] = fileList.value.join(';')
console.log(props.form[item.prop], fileList.value)
@@ -260,7 +263,7 @@ function onSuccess(response: any, item: any) {
}
function onRemove(response: any, item: any) {
const index = fileList.value.indexOf(
response.response.data.ossFilePath
response.response.data.ossFilePath
)
if (index !== -1) {
fileList.value.splice(index, 1)

+ 2
- 0
src/crud/components/DialogCollapse.operation.vue Ver arquivo

@@ -35,6 +35,7 @@
<div style="background-color: #999; height: 1px; flex: 1"></div>
</div>
<!-- 此处的width决定了是否要换行 v-show="!item.form.hide"-->
{{ form[item.form.prop ? item.form.prop : item.prop] }}
<el-form-item
style="position: relative"
v-if="
@@ -155,6 +156,7 @@

<!-- 选择框 -->
<div style="width: 100%" v-else-if="item.form.type === 'select'">
<!-- {{ form[item.form.prop ? item.form.prop : item.prop] }} -->
<el-select
filterable
clearable

+ 7
- 2
src/crud/index.vue Ver arquivo

@@ -546,8 +546,8 @@ function echo(item: any, scope: any) {
const value = item.prop
let atLast = scope.row[value] ?? '---'
//字典数据转换
console.log(222)
if (item.listData && item.form.listData) {
console.log(222,item.form)
if (item.listData && item.form && item.form.listData && !item.form.multiple) {
item.listData.forEach((element: any) => {
if (element.value === scope.row[value] + '') {
atLast = element.label
@@ -670,6 +670,7 @@ function affirm() {
for (let key in myData) {
if (
item.unit &&
!item.startUnit &&
myData[key] &&
(item.unit == '元' || item.unit == '%') &&
key == item.prop
@@ -714,6 +715,10 @@ const handleEdit = (idx: any, row: any) => {
recover() //复原
title.value = '编辑'
form.value = JSON.parse(JSON.stringify(toRaw(row)))

console.log(form.value , '==============---------=============');

tableFrom.value.dialogArray.forEach((item) => {
Object.keys(form.value).forEach((key) => {
if (item.prop == key && item.isAmount) {

+ 33
- 55
src/views/onlineBusinessHall/productManagement/releaseProduct/index.vue Ver arquivo

@@ -801,22 +801,13 @@ function submit(data: any) {
if (!valid) return ElMessage.error('售后费存在必填项为空!')
let api = ''
if (typeOption.value === 'edit') {
// api = releaseProducttEdit
// api = '/managew/api/product/releaseProductStandards/update'
api = '/managew/api/product/product/update'
} else {
// api = '/managew/api/product/releaseProductStandards/add'
api = '/managew/api/product/product/add'
// || releaseProductAdd
}
let datas = JSON.parse(JSON.stringify(toRaw(data)))

// if (
// (datas.processingFeeList && datas.processingFeeList.length == 0) ||
// (datas.useFeeList && datas.useFeeList.length == 0)
// ) {
// return ElMessage.error('办理费和使用费不能为空!')
// }

datas.processingFeeList =
JSON.parse(JSON.stringify(toRaw(dataForm.processingFeeList ?? null))) ??
[]
@@ -832,11 +823,9 @@ function submit(data: any) {
datas.useFeeList.forEach((item) => {
item.useAmount = item.useAmount * 100
})

if (datas.afterSaleFees)
datas.afterSaleFees.forEach((item) => {
item.amount = item.amount * 100
// item.releaseId = datas.releaseId
})
if (datas.expenseType == 1) {
if (!datas.processingFeeList || datas.processingFeeList.length == 0) {
@@ -844,25 +833,14 @@ function submit(data: any) {
}
delete datas.useFeeList
}

if (datas.expenseType == 2) {
if (!datas.useFeeList || datas.useFeeList.length == 0) {
return ElMessage.error('使用费不能为空!')
}
delete datas.processingFeeList
}

// datas.cardType = [datas.cardType]
datas.cardType = datas.cardType
// datas.deductionChannelsId = '---'
// datas.deductionChannelsId = [datas.deductionChannelsId]
if (Array.isArray(datas.supAgree)) {
// datas.supAgree = datas.supAgree.join(';')
}
delete datas.undefined
console.log(datas, 'datasdatas')
// datas.dateOfDelist = datas.dateOfDelist.replace('T', ' ')
// datas.dateOfListing = datas.dateOfListing.replace('T', ' ')
datas.vehicleType = datas.vehicleType.map((items) => {
if (Array.isArray(items)) {
return items[1]
@@ -870,9 +848,7 @@ function submit(data: any) {
return items
}
})
// datas.needPay = datas.needPay ? parseInt(datas.isPay) : ''
// datas.qtSign = datas.qtSign ? parseInt(datas.qtSign) : ''
// console.log('请请i参数', datas)
console.log('请请i参数', datas)
BaseService.postN(api, datas).then((res: any) => {
if (res && res.code === 0) {
ElMessage.success('操作成功')
@@ -954,7 +930,7 @@ function getList() {
}
itemData.isTymy = itemData.tymy

itemData.cardType = itemData.cardType[0]
// itemData.cardType = itemData.cardType[0]
// itemData.deductionChannelsId = itemData.deductionChannelsId[0]
// itemData.supAgree = itemData.supAgree.split(';')
})
@@ -982,20 +958,21 @@ function handleEdit(idx: any, row: any) {
typeOption.value = 'edit'
isChangeInfoShow.value = false
getEditFeeListData(row.id, row, () => {
customSelectorSelection(row.productStandardsId, 'productStandardsId', row)
customSelectorSelection(row.promotionMode, 'promotionMode', { ...row })
customSelectorSelection(row.extensionTool, 'extensionTool', row)
assignment(crudRef.value.form, row)
crudRef.value.form.changeReason = ''
isInfo.value = false
afterProcessingFeeList.value = []
afterAfterSaleFees.value = []

afterUseFeeList.value = []
handleChangeReason(false)
row.expenseType = row.processingFeeList?.length > 0 ? 1 : 2
handleChangeExpenseType(row.expenseType, row)
handleReleaseId(false)
// customSelectorSelection(row.productStandardsId, 'productStandardsId', row)
// customSelectorSelection(row.promotionMode, 'promotionMode', { ...row })
// customSelectorSelection(row.extensionTool, 'extensionTool', row)
// assignment(crudRef.value.form, row)
// crudRef.value.form.changeReason = ''
// isInfo.value = false
// afterProcessingFeeList.value = []
// afterAfterSaleFees.value = []

// afterUseFeeList.value = []
// handleChangeReason(false)
// row.expenseType = row.processingFeeList?.length > 0 ? 1 : 2
// handleChangeExpenseType(row.expenseType, row)
// handleReleaseId(false)
})
}
const handleReleaseId = (key) => {
@@ -1022,6 +999,7 @@ const getEditFeeListData = (id, form, success) => {
dataForm.afterSaleFees = data.afterSaleFees
dataForm.useFeeList = data.useFeeList
dataForm.processingFeeList = data.processingFeeList
data.expenseType = data.processingFeeList?.length > 0 ? 1 : 2
crudRef.value.form = data
success()
} else {
@@ -1033,18 +1011,19 @@ const getEditFeeListData = (id, form, success) => {
function handleInfo(idx: any, row: any) {
isChangeInfoShow.value = false
getEditFeeListData(row.id, row, () => {
// customSelectorSelection(row.agencyType, 'agencyType', row)
customSelectorSelection(row.productStandardsId, 'productStandardsId', row)
customSelectorSelection(row.promotionMode, 'promotionMode', { ...row })
customSelectorSelection(row.extensionTool, 'extensionTool', row)
assignment(crudRef.value.form, row)
handleChangeReason(true)
isInfo.value = true
afterProcessingFeeList.value = []
afterAfterSaleFees.value = []
afterUseFeeList.value = []
row.expenseType = row.processingFeeList?.length > 0 ? 1 : 2
handleChangeFeeInfo(row.expenseType, row)
// customSelectorSelection(row.agencyType, 'agencyType', row)
// customSelectorSelection(row.productStandardsId, 'productStandardsId', row)
// customSelectorSelection(row.promotionMode, 'promotionMode', { ...row })
// customSelectorSelection(row.extensionTool, 'extensionTool', row)
// assignment(crudRef.value.form, row)
// handleChangeReason(true)
// isInfo.value = true
// afterProcessingFeeList.value = []
// afterAfterSaleFees.value = []
// afterUseFeeList.value = []
// row.expenseType = row.processingFeeList?.length > 0 ? 1 : 2
// handleChangeFeeInfo(row.expenseType, row)
})
}
// 操作记录详情
@@ -1182,7 +1161,8 @@ function customSelectorSelection(
)
if (title == 'extensionTool') {
if (value.includes('ECP')) {
handleEcpDetailShow(false)
handleEcpDetail +
Show(false)
} else {
handleEcpDetailShow(true)
}
@@ -1504,9 +1484,6 @@ function assignment(datas, row) {
Object.assign(datas, row)
datas.cardObuAmount = row.cardObuAmount ? row.cardObuAmount / 100 : 0
datas.cancelAmount = row.cancelAmount ? row.cancelAmount / 100 : 0

// datas.profitRatio = row.profitRatio ? row.profitRatio / 100 : 0
datas.monthlyRate = row.monthlyRate ? row.monthlyRate / 100 : 0
customSelectorSelection(datas.isTymy, 'isTymy')
for (let key in datas) {
if (typeof datas[key] === 'number') {
@@ -2311,6 +2288,7 @@ let field = ref<any>({
span: 3,
label: '逾期违约金收取比例',
hide: true,
startUnit: true,
unit: '%',
form: {
checkContent: 'percentage',

Carregando…
Cancelar
Salvar