|
|
@@ -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', |