This commit is contained in:
Viet An
2026-07-06 11:25:42 +07:00
parent f72af58d78
commit be0be49454
22 changed files with 301 additions and 391 deletions

View File

@@ -257,7 +257,7 @@ import InputEmail from "~/components/common/InputEmail";
import SearchBox from "~/components/SearchBox";
import Datepicker from "~/components/datepicker/Datepicker";
var props = defineProps({
const props = defineProps({
pagename: String,
row: Object,
});
@@ -277,29 +277,28 @@ const {
$updatepage,
} = useNuxtApp();
const emit = defineEmits(["update"]);
var viewport = store.viewport;
var companyAddon = {
const companyAddon = {
component: "customer/Company",
with: "55%",
height: "400px",
title: findLang("company"),
};
var companyviewAddon = {
const companyviewAddon = {
component: "customer/Company",
width: "50%",
height: "400px",
title: findLang("company"),
};
var errors = ref({});
var record = ref();
var showmodal = ref();
var existedPeople = undefined;
const errors = ref({});
const record = ref();
const showmodal = ref();
let existedPeople = undefined;
async function initData() {
if (props.row) {
let conn = $findapi("people");
const conn = $findapi("people");
conn.params.filter = { id: props.row.customer || props.row.id };
let rs = await $getapi([conn]);
let found = $find(rs, { name: "people" });
const rs = await $getapi([conn]);
const found = $find(rs, { name: "people" });
if (found.data.rows.length > 0) record.value = found.data.rows[0];
} else {
// let code = await $getdata('getcodepeople')
@@ -307,7 +306,7 @@ async function initData() {
}
}
function findLang(code) {
let found = $find(store.common, { code: code });
const found = $find(store.common, { code });
return found ? found[store.lang] : "";
}
function showPeople() {