changes
This commit is contained in:
@@ -124,7 +124,6 @@
|
||||
@changepage="changePage"
|
||||
/>
|
||||
</div>
|
||||
<!-- <pre class="fs-12">debug: pagename: {{ pagename }}</pre> -->
|
||||
<Modal
|
||||
v-if="showmodal"
|
||||
v-bind="showmodal"
|
||||
|
||||
@@ -66,8 +66,8 @@ const lastDataHash = ref(null);
|
||||
const pollingInterval = ref(null);
|
||||
|
||||
let vpagename = props.pagename;
|
||||
let vfilter = props.filter ? $copy(props.filter) : undefined;
|
||||
let vparams = props.params ? $copy(props.params) : undefined;
|
||||
let vfilter = $copy(props.filter);
|
||||
let vparams = $copy(props.params);
|
||||
let connection = undefined;
|
||||
let optfilter = props.filter || (props.params ? props.params.filter : undefined);
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ function checkValid() {
|
||||
errors.value.push({ name: "formula", message: "Công thức không hợp lệ" });
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
errors.value.push({ name: "formula", message: "Công thức không hợp lệ" });
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -13,8 +13,8 @@ const props = defineProps({
|
||||
const emit = defineEmits(["date"]);
|
||||
const { $copy, $dayjs, $empty } = useNuxtApp();
|
||||
|
||||
const date = ref();
|
||||
const show = ref();
|
||||
const date = ref(null);
|
||||
const show = ref("");
|
||||
const error = ref(false);
|
||||
const focused = ref(false);
|
||||
const count1 = ref(0);
|
||||
@@ -76,7 +76,7 @@ function doClick() {
|
||||
|
||||
function selectDate(v) {
|
||||
date.value = v;
|
||||
show.value = $dayjs(v).format("L");
|
||||
show.value = !v ? "" : $dayjs(v).format("L");
|
||||
emit("date", date.value);
|
||||
if (focused.value) focused.value = false;
|
||||
count1.value = 0;
|
||||
@@ -124,18 +124,32 @@ watch(
|
||||
>
|
||||
<div :class="['dropdown w-full', pos, focused && 'is-active']">
|
||||
<div class="dropdown-trigger w-full">
|
||||
<input
|
||||
:disabled="disabled"
|
||||
:class="['input', error && 'is-danger', disabled && 'has-text-dark']"
|
||||
type="text"
|
||||
placeholder="DD/MM/YYYY"
|
||||
maxlength="10"
|
||||
@focus="setFocus"
|
||||
@blur="lostFocus"
|
||||
@keyup.enter="pressEnter"
|
||||
@keyup="checkDate"
|
||||
v-model="show"
|
||||
/>
|
||||
<div class="control has-icons-right">
|
||||
<input
|
||||
:disabled="disabled"
|
||||
:class="['input', error && 'is-danger', disabled && 'has-text-dark']"
|
||||
type="text"
|
||||
placeholder="DD/MM/YYYY"
|
||||
maxlength="10"
|
||||
@focus="setFocus"
|
||||
@blur="lostFocus"
|
||||
@keyup.enter="pressEnter"
|
||||
@keyup="checkDate"
|
||||
v-model="show"
|
||||
/>
|
||||
<span
|
||||
v-if="date"
|
||||
@click="selectDate(null)"
|
||||
class="icon is-small is-right is-clickable"
|
||||
>
|
||||
<div class="closeBtn rounded-full p-1">
|
||||
<Icon
|
||||
name="material-symbols:close-rounded"
|
||||
class="is-block"
|
||||
/>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="dropdown-menu"
|
||||
@@ -159,3 +173,9 @@ watch(
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.closeBtn:hover {
|
||||
background-color: var(--bulma-grey-100);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,7 +14,6 @@ const props = defineProps({
|
||||
component: 'imports/IMEIs',
|
||||
title: 'IMEIs',
|
||||
width: '80%',
|
||||
height: '400px',
|
||||
vbind: { variant: props.variant },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6,6 +6,6 @@ const props = defineProps({
|
||||
|
||||
<template>
|
||||
<figure class="image is-32x32">
|
||||
<img :src="variant.image__path" />
|
||||
<NuxtImg :src="variant.image__path" />
|
||||
</figure>
|
||||
</template>
|
||||
|
||||
@@ -73,7 +73,7 @@ async function submit() {
|
||||
<label class="label">Sản phẩm</label>
|
||||
<SearchBox
|
||||
v-bind="{
|
||||
api: 'product',
|
||||
api: 'Product',
|
||||
field: 'name',
|
||||
column: ['name'],
|
||||
first: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ const props = defineProps({
|
||||
viewMode: String,
|
||||
});
|
||||
|
||||
const { $getdata, $dayjs } = useNuxtApp();
|
||||
const { $findapi, $getapi, $dayjs } = useNuxtApp();
|
||||
const { invoices } = inject("orders");
|
||||
|
||||
const statuses = [
|
||||
@@ -33,28 +33,15 @@ const statuses = [
|
||||
},
|
||||
];
|
||||
|
||||
const paymentStatuses = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Chưa thanh toán",
|
||||
color: "red",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Một phần",
|
||||
color: "yellow",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Đã thanh toán",
|
||||
color: "green",
|
||||
},
|
||||
];
|
||||
|
||||
const paymentStatuses = ref([]);
|
||||
const employees = ref([]);
|
||||
|
||||
onMounted(async () => {
|
||||
employees.value = await $getdata("Staff");
|
||||
const apis = $findapi(["Payment_Status", "Staff"]);
|
||||
const [paymentStatusRes, staffRes] = await $getapi(apis);
|
||||
|
||||
paymentStatuses.value = paymentStatusRes.data.rows || [];
|
||||
employees.value = staffRes.data.rows || [];
|
||||
});
|
||||
|
||||
const input = ref();
|
||||
|
||||
@@ -36,8 +36,8 @@ function openProductSelectionModal() {
|
||||
component: "pos/ProductSelection",
|
||||
title: "Chọn sản phẩm",
|
||||
width: "85%",
|
||||
height: "100%",
|
||||
};
|
||||
console.log("hey");
|
||||
}
|
||||
|
||||
function openConfirmModal() {
|
||||
|
||||
Reference in New Issue
Block a user