|
@@ -6,7 +6,7 @@ import { httpImageUpload, baseUrl } from "/@/api/other";
|
|
|
import { useUserStore } from "/@/store/modules/user";
|
|
|
import { ticketFormItems } from "../config/_details";
|
|
|
import { INPUT_MAX_LENGTH } from "/@/utils/global";
|
|
|
-import { cg_inv_type_list, inv_type_list } from "/@/utils/status";
|
|
|
+import { cg_inv_type_list } from "/@/utils/status";
|
|
|
import { invoceRules } from "../config/_rules";
|
|
|
|
|
|
const emit = defineEmits(["change"]);
|
|
@@ -101,9 +101,6 @@ function handleScanKeydown(evt: KeyboardEvent) {
|
|
|
let [_, invoiceType, ...chunks] = result;
|
|
|
const [invCode, invNumber, subtotal_amount, open_time, checkNumber] = chunks;
|
|
|
|
|
|
- // rules.value = is_Electronics ? invoceRules_Electronics : invoceRules;
|
|
|
- // invoiceType = is_Electronics ? "electronics" : invoiceType;
|
|
|
-
|
|
|
let _open_time = "";
|
|
|
if (open_time) {
|
|
|
const year = open_time.slice(0, 4);
|
|
@@ -170,6 +167,17 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
+watch(
|
|
|
+ () => formData.value.invoiceType,
|
|
|
+ () => {
|
|
|
+ if (rules.value.checkNumber) {
|
|
|
+ rules.value.checkNumber[0].required = ["04", "10"].includes(
|
|
|
+ formData.value.invoiceType
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+);
|
|
|
+
|
|
|
const disabledDate = time => {
|
|
|
return time.getTime() > Date.now();
|
|
|
};
|