|
|
@@ -388,11 +388,11 @@ function calculateCount(row: any) {
|
|
|
if (acCount > maxCount) {
|
|
|
if (row.conditioningProgramDetail.cpDynamicPricingRule?.[1]?.priceType === 0) {
|
|
|
// 单价
|
|
|
- if(acCount > 0){
|
|
|
+ if (acCount > 0) {
|
|
|
let unitPrice: number = row.conditioningProgramDetail.cpDynamicPricingRule[1].price * acCount;
|
|
|
row.unitPrice = unitPrice;
|
|
|
row.totalPrice = Math.ceil((period / frequencyType) * frequency * unitPrice);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
row.unitPrice = '-';
|
|
|
row.totalPrice = 0;
|
|
|
}
|
|
|
@@ -405,11 +405,11 @@ function calculateCount(row: any) {
|
|
|
if (row.conditioningProgramDetail.cpDynamicPricingRule?.length > 0) {
|
|
|
if (row.conditioningProgramDetail.cpDynamicPricingRule?.[0]?.priceType === 0) {
|
|
|
// 单价
|
|
|
- if(acCount > 0){
|
|
|
+ if (acCount > 0) {
|
|
|
let unitPrice: number = row.conditioningProgramDetail.cpDynamicPricingRule[0].price * acCount;
|
|
|
row.unitPrice = unitPrice;
|
|
|
row.totalPrice = Math.ceil((period / frequencyType) * frequency * unitPrice);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
row.unitPrice = '-';
|
|
|
row.totalPrice = 0;
|
|
|
}
|
|
|
@@ -474,8 +474,10 @@ function confirm() {
|
|
|
VxeUI.modal.close(`edit-system-service-modal`);
|
|
|
});
|
|
|
} else if (props.data.types === 'institution') {
|
|
|
+ console.log(fileList.value, '机构服务包的形象照');
|
|
|
if (fileList.value.length > 0) {
|
|
|
- const upImg = fileList.value[0].response?.url;
|
|
|
+ console.log(fileList.value, 'fileList.value');
|
|
|
+ const upImg = fileList.value[0]?.response?.url || fileList.value[0]?.thumbUrl;
|
|
|
formData.photo = upImg;
|
|
|
fileList.value = upImg
|
|
|
? [
|
|
|
@@ -551,6 +553,7 @@ onMounted(async () => {
|
|
|
props.data.types = 'institution'; // Modify the local copy instead
|
|
|
// 调编辑接口获取数据
|
|
|
const res: any = await getConditioningRecordDetailMethod(props.data);
|
|
|
+ console.log(res, '获取详情');
|
|
|
Object.assign(formData, res); // Use the response to update formData
|
|
|
await nextTick(); // 确保视图更新
|
|
|
|
|
|
@@ -563,6 +566,7 @@ onMounted(async () => {
|
|
|
willillStateNames: [],
|
|
|
};
|
|
|
formData.items = res?.items ?? [];
|
|
|
+ console.log(res?.photo, 'res?.photo');
|
|
|
fileList.value = res?.photo
|
|
|
? [
|
|
|
{
|
|
|
@@ -632,6 +636,7 @@ const setVisible = (value: boolean): void => {
|
|
|
const previewImg = ref<string>('');
|
|
|
// 预览图片
|
|
|
const handlePreview = async (file: UploadFile) => {
|
|
|
+ console.log(file, '预览图片');
|
|
|
previewImg.value = file.response?.url ?? file.thumbUrl;
|
|
|
visible.value = true;
|
|
|
};
|