|
@@ -230,7 +230,7 @@ const currentScrollLeft = ref(0);
|
|
|
|
|
|
const gridOptions = reactive({
|
|
|
border: 'inner',
|
|
|
- height: 900,
|
|
|
+ height: 750,
|
|
|
align: null,
|
|
|
round: true,
|
|
|
loading: false,
|
|
@@ -428,9 +428,12 @@ function createDayDataRules() {
|
|
|
if (dateType === 'day') {
|
|
|
rules.ad_sales_original[0].required = false;
|
|
|
rules.ad_cost_original[0].required = false;
|
|
|
- } else {
|
|
|
- rules.ad_sales_original[0].required = true;
|
|
|
- rules.ad_cost_original[0].required = true;
|
|
|
+ } if (dateType === 'month') {
|
|
|
+ rules.ad_sales_original[0].required = false;
|
|
|
+ rules.ad_cost_original[0].required = false;
|
|
|
+ rules.impression[0].required = false;
|
|
|
+ rules.ad_click[0].required = false;
|
|
|
+ rules.ad_order[0].required = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -550,7 +553,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
|
|
await createWeekData();
|
|
|
}
|
|
|
if (dateType === 'month') {
|
|
|
- const fieldsToValidate = ['sales_original', 'ad_sales_original', 'ad_cost_original', 'impression', 'ad_click', 'ad_order',];
|
|
|
+ const fieldsToValidate = ['sales_original'];
|
|
|
if (!validateNumericFields(taskDataForm, fieldsToValidate)) return; // 验证字段
|
|
|
await createMonthData();
|
|
|
}
|
|
@@ -676,7 +679,7 @@ const editRowEvent = async (row: any) => {
|
|
|
if (!validateNumericFields(row, fieldsToValidate)) return; // 验证字段
|
|
|
await updateWeekData(row);
|
|
|
} else if (dateType === 'month') {
|
|
|
- const fieldsToValidate = ['sales_original', 'ad_sales_original', 'ad_cost_original', 'impression', 'ad_click', 'ad_order',];
|
|
|
+ const fieldsToValidate = ['sales_original'];
|
|
|
if (!validateNumericFields(row, fieldsToValidate)) return; // 验证字段
|
|
|
await updateMonthData(row);
|
|
|
}
|
|
@@ -739,7 +742,7 @@ const headerCellStyle = () => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
setDefaultDate();
|
|
|
- fetchCurrentTaskData();
|
|
|
+ //fetchCurrentTaskData();
|
|
|
createDayDataRules();
|
|
|
});
|
|
|
</script>
|