BUG 优化

dev
xiepeng 2024-04-25 09:52:34 +08:00
parent 202edf8c8e
commit d291a9b98e
8 changed files with 28 additions and 7 deletions

View File

@ -348,6 +348,9 @@ const getDueDate = () => {
} }
} }
form.value.DUE_DATE = timeTransformation(form.value.PROCESSING_DATE, num); form.value.DUE_DATE = timeTransformation(form.value.PROCESSING_DATE, num);
var dueDate = new Date(form.value.DUE_DATE);
dueDate.setDate(dueDate.getDate() - 1)
form.value.DUE_DATE = subtractDaysFromDate(dueDate,0)
if (form.value.REMINDER_DAYS) { if (form.value.REMINDER_DAYS) {
form.value.REMINDER_DATE = subtractDaysFromDate( form.value.REMINDER_DATE = subtractDaysFromDate(
form.value.DUE_DATE, form.value.DUE_DATE,

View File

@ -420,6 +420,9 @@ const getBusInfo = (val) => {
const getDueDate = (val) => { const getDueDate = (val) => {
if (val) { if (val) {
form.value.DUE_DATE = timeTransformation(val, 12); form.value.DUE_DATE = timeTransformation(val, 12);
var date = new Date(form.value.DUE_DATE);
date.setDate(date.getDate() - 1)
form.value.DUE_DATE = subtractDaysFromDate(date,0)
if (form.value.REMINDER_DAYS) { if (form.value.REMINDER_DAYS) {
form.value.REMINDER_DATE = subtractDaysFromDate( form.value.REMINDER_DATE = subtractDaysFromDate(
form.value.DUE_DATE, form.value.DUE_DATE,

View File

@ -341,6 +341,9 @@ const getDueDate = () => {
form.value.MAINTENANCE_CYCLE, form.value.MAINTENANCE_CYCLE,
true true
); );
var date = new Date(form.value.DUE_DATE);
date.setDate(date.getDate() - 1)
form.value.DUE_DATE = subtractDaysFromDate(date, 0);
if (form.value.REMINDER_DAYS) { if (form.value.REMINDER_DAYS) {
form.value.REMINDER_DATE = subtractDaysFromDate( form.value.REMINDER_DATE = subtractDaysFromDate(
form.value.DUE_DATE, form.value.DUE_DATE,

View File

@ -199,13 +199,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="运营证资料" prop="OPERATIONSINFO"> <el-form-item label="运营证资料" prop="OPERATION_CERTIFICATE_IMG">
<layout-upload <layout-upload
v-model:file-list="form.OPERATIONSINFO" v-model:file-list="data.busInfo.OPERATION_CERTIFICATE_IMG"
list-type="picture-card" list-type="picture-card"
accept=".jpg,.jpeg,.png" accept=".jpg,.jpeg,.png"
:limit="99"
delete-to-server delete-to-server
disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -277,6 +277,7 @@ const data = reactive({
vehicleList: [], vehicleList: [],
busInfo: { busInfo: {
DRIVING_LICENSE_IMG: [], DRIVING_LICENSE_IMG: [],
OPERATION_CERTIFICATE_IMG: [],
PLATE_NUMBER: "", PLATE_NUMBER: "",
VIN: "", VIN: "",
TRAILER_TYPE: "", TRAILER_TYPE: "",
@ -317,6 +318,9 @@ const getDueDate = () => {
} }
} }
form.value.DUE_DATE = timeTransformation(form.value.PROCESSING_DATE, num); form.value.DUE_DATE = timeTransformation(form.value.PROCESSING_DATE, num);
var date = new Date(form.value.DUE_DATE);
date.setDate(date.getDate() - 1);
form.value.DUE_DATE = subtractDaysFromDate(date,0);
if (form.value.REMINDER_DAYS) { if (form.value.REMINDER_DAYS) {
form.value.REMINDER_DATE = subtractDaysFromDate( form.value.REMINDER_DATE = subtractDaysFromDate(
form.value.DUE_DATE, form.value.DUE_DATE,
@ -358,6 +362,7 @@ const getVehicle = async (event) => {
data.busInfo.CAR_OWNERS_TEL = ""; data.busInfo.CAR_OWNERS_TEL = "";
data.busInfo.INITIAL_REGISTRATION_DATE = ""; data.busInfo.INITIAL_REGISTRATION_DATE = "";
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]); data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
data.busInfo.OPERATION_CERTIFICATE_IMG = addingPrefixToFile([]);
}; };
const fnBusChange = async (event) => { const fnBusChange = async (event) => {
if (!OPERATIONS_ID) { if (!OPERATIONS_ID) {
@ -375,6 +380,9 @@ const fnBusChange = async (event) => {
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile( data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile(
resData.drivingLicenseImgs resData.drivingLicenseImgs
); );
data.busInfo.OPERATION_CERTIFICATE_IMG = addingPrefixToFile(
resData.operatingcertificateImgs
);
}; };
const getBusInfo = (val) => { const getBusInfo = (val) => {
if (val) { if (val) {

View File

@ -113,6 +113,7 @@ const data = reactive({
CAR_OWNERS: "", CAR_OWNERS: "",
CAR_OWNERS_TEL: "", CAR_OWNERS_TEL: "",
INITIAL_REGISTRATION_DATE: "", INITIAL_REGISTRATION_DATE: "",
OPERATION_CERTIFICATE_IMG: []
}, },
}); });
const fnBusChange = async (event) => { const fnBusChange = async (event) => {
@ -128,7 +129,9 @@ const fnGetData = async () => {
info.value = resData.pd; info.value = resData.pd;
info.value.OPERATIONSINFO = []; info.value.OPERATIONSINFO = [];
fnBusChange(resData.pd.VEHICLE); fnBusChange(resData.pd.VEHICLE);
info.value.OPERATIONSINFO = addingPrefixToFile(resData.operationsinfoImgs); info.value.OPERATIONSINFO = addingPrefixToFile(
resData.operationsinfoImgs
);
}; };
fnGetData(); fnGetData();
</script> </script>

View File

@ -144,7 +144,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="税周期" prop="TAXESDUES_PERIOD"> <el-form-item label="税周期" prop="TAXESDUES_PERIOD">
<el-select <el-select
v-model="form.TAXESDUES_PERIOD" v-model="form.TAXESDUES_PERIOD"
@change="fnGetExpireDate" @change="fnGetExpireDate"
@ -350,7 +350,7 @@ const fnGetExpireDate = async () => {
const year = date.getFullYear(); const year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
month = month < 10 ? "0" + month : month; month = month < 10 ? "0" + month : month;
let day = date.getDate(); let day = date.getDate() - 1;
day = day < 10 ? "0" + day : day; day = day < 10 ? "0" + day : day;
form.value.EXPIRE_DATE = year + "-" + month + "-" + day; form.value.EXPIRE_DATE = year + "-" + month + "-" + day;
if (form.value.TRANSACTION_DATA === null) { if (form.value.TRANSACTION_DATA === null) {

View File

@ -324,7 +324,7 @@ const fnGetExpireDate = async () => {
const year = date.getFullYear(); const year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
month = month < 10 ? "0" + month : month; month = month < 10 ? "0" + month : month;
let day = date.getDate(); let day = date.getDate() - 1;
day = day < 10 ? "0" + day : day; day = day < 10 ? "0" + day : day;
form.value.EXPIRE_DATE = year + "-" + month + "-" + day; form.value.EXPIRE_DATE = year + "-" + month + "-" + day;
} }

View File

@ -212,6 +212,7 @@ const fnDelete = debounce(
await setExtractionAndUseBatchDelete({ DATA_IDS }); await setExtractionAndUseBatchDelete({ DATA_IDS });
ElMessage.success("删除成功"); ElMessage.success("删除成功");
fnGetData(); fnGetData();
}, },
{ atBegin: true } { atBegin: true }
); );