changes
This commit is contained in:
@@ -124,7 +124,6 @@
|
|||||||
@changepage="changePage"
|
@changepage="changePage"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <pre class="fs-12">debug: pagename: {{ pagename }}</pre> -->
|
|
||||||
<Modal
|
<Modal
|
||||||
v-if="showmodal"
|
v-if="showmodal"
|
||||||
v-bind="showmodal"
|
v-bind="showmodal"
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ const lastDataHash = ref(null);
|
|||||||
const pollingInterval = ref(null);
|
const pollingInterval = ref(null);
|
||||||
|
|
||||||
let vpagename = props.pagename;
|
let vpagename = props.pagename;
|
||||||
let vfilter = props.filter ? $copy(props.filter) : undefined;
|
let vfilter = $copy(props.filter);
|
||||||
let vparams = props.params ? $copy(props.params) : undefined;
|
let vparams = $copy(props.params);
|
||||||
let connection = undefined;
|
let connection = undefined;
|
||||||
let optfilter = props.filter || (props.params ? props.params.filter : 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ệ" });
|
errors.value.push({ name: "formula", message: "Công thức không hợp lệ" });
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
errors.value.push({ name: "formula", message: "Công thức không hợp lệ" });
|
errors.value.push({ name: "formula", message: "Công thức không hợp lệ" });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ const props = defineProps({
|
|||||||
const emit = defineEmits(["date"]);
|
const emit = defineEmits(["date"]);
|
||||||
const { $copy, $dayjs, $empty } = useNuxtApp();
|
const { $copy, $dayjs, $empty } = useNuxtApp();
|
||||||
|
|
||||||
const date = ref();
|
const date = ref(null);
|
||||||
const show = ref();
|
const show = ref("");
|
||||||
const error = ref(false);
|
const error = ref(false);
|
||||||
const focused = ref(false);
|
const focused = ref(false);
|
||||||
const count1 = ref(0);
|
const count1 = ref(0);
|
||||||
@@ -76,7 +76,7 @@ function doClick() {
|
|||||||
|
|
||||||
function selectDate(v) {
|
function selectDate(v) {
|
||||||
date.value = v;
|
date.value = v;
|
||||||
show.value = $dayjs(v).format("L");
|
show.value = !v ? "" : $dayjs(v).format("L");
|
||||||
emit("date", date.value);
|
emit("date", date.value);
|
||||||
if (focused.value) focused.value = false;
|
if (focused.value) focused.value = false;
|
||||||
count1.value = 0;
|
count1.value = 0;
|
||||||
@@ -124,18 +124,32 @@ watch(
|
|||||||
>
|
>
|
||||||
<div :class="['dropdown w-full', pos, focused && 'is-active']">
|
<div :class="['dropdown w-full', pos, focused && 'is-active']">
|
||||||
<div class="dropdown-trigger w-full">
|
<div class="dropdown-trigger w-full">
|
||||||
<input
|
<div class="control has-icons-right">
|
||||||
:disabled="disabled"
|
<input
|
||||||
:class="['input', error && 'is-danger', disabled && 'has-text-dark']"
|
:disabled="disabled"
|
||||||
type="text"
|
:class="['input', error && 'is-danger', disabled && 'has-text-dark']"
|
||||||
placeholder="DD/MM/YYYY"
|
type="text"
|
||||||
maxlength="10"
|
placeholder="DD/MM/YYYY"
|
||||||
@focus="setFocus"
|
maxlength="10"
|
||||||
@blur="lostFocus"
|
@focus="setFocus"
|
||||||
@keyup.enter="pressEnter"
|
@blur="lostFocus"
|
||||||
@keyup="checkDate"
|
@keyup.enter="pressEnter"
|
||||||
v-model="show"
|
@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>
|
||||||
<div
|
<div
|
||||||
class="dropdown-menu"
|
class="dropdown-menu"
|
||||||
@@ -159,3 +173,9 @@ watch(
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.closeBtn:hover {
|
||||||
|
background-color: var(--bulma-grey-100);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ const props = defineProps({
|
|||||||
component: 'imports/IMEIs',
|
component: 'imports/IMEIs',
|
||||||
title: 'IMEIs',
|
title: 'IMEIs',
|
||||||
width: '80%',
|
width: '80%',
|
||||||
height: '400px',
|
|
||||||
vbind: { variant: props.variant },
|
vbind: { variant: props.variant },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ const props = defineProps({
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<figure class="image is-32x32">
|
<figure class="image is-32x32">
|
||||||
<img :src="variant.image__path" />
|
<NuxtImg :src="variant.image__path" />
|
||||||
</figure>
|
</figure>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ async function submit() {
|
|||||||
<label class="label">Sản phẩm</label>
|
<label class="label">Sản phẩm</label>
|
||||||
<SearchBox
|
<SearchBox
|
||||||
v-bind="{
|
v-bind="{
|
||||||
api: 'product',
|
api: 'Product',
|
||||||
field: 'name',
|
field: 'name',
|
||||||
column: ['name'],
|
column: ['name'],
|
||||||
first: true,
|
first: true,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const props = defineProps({
|
|||||||
viewMode: String,
|
viewMode: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { $getdata, $dayjs } = useNuxtApp();
|
const { $findapi, $getapi, $dayjs } = useNuxtApp();
|
||||||
const { invoices } = inject("orders");
|
const { invoices } = inject("orders");
|
||||||
|
|
||||||
const statuses = [
|
const statuses = [
|
||||||
@@ -33,28 +33,15 @@ const statuses = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const paymentStatuses = [
|
const paymentStatuses = ref([]);
|
||||||
{
|
|
||||||
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 employees = ref([]);
|
const employees = ref([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
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();
|
const input = ref();
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ function openProductSelectionModal() {
|
|||||||
component: "pos/ProductSelection",
|
component: "pos/ProductSelection",
|
||||||
title: "Chọn sản phẩm",
|
title: "Chọn sản phẩm",
|
||||||
width: "85%",
|
width: "85%",
|
||||||
|
height: "100%",
|
||||||
};
|
};
|
||||||
console.log("hey");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function openConfirmModal() {
|
function openConfirmModal() {
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ function changeTab(_tab, _subtab) {
|
|||||||
const meta = {
|
const meta = {
|
||||||
title: currentTab.value[$store.lang],
|
title: currentTab.value[$store.lang],
|
||||||
image: undefined,
|
image: undefined,
|
||||||
description: "Utopia",
|
description: "ERP",
|
||||||
type: "article",
|
type: "article",
|
||||||
keywords: "utopia",
|
keywords: "erp",
|
||||||
};
|
};
|
||||||
useHead($createMeta(meta));
|
useHead($createMeta(meta));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const copyToClipboard = function (text) {
|
const copyToClipboard = function (text) {
|
||||||
snackbar("Copied to clipboard", "Success");
|
snackbar("Copied", "Success");
|
||||||
if (window.clipboardData && window.clipboardData.setData) {
|
if (window.clipboardData && window.clipboardData.setData) {
|
||||||
// IE specific code path to prevent textarea being shown while dialog is visible.
|
// IE specific code path to prevent textarea being shown while dialog is visible.
|
||||||
return clipboardData.setData("Text", text);
|
return clipboardData.setData("Text", text);
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import Datepicker from "~/components/datepicker/Datepicker.vue";
|
|
||||||
|
|
||||||
import DataTable from "~/components/datatable/DataTable.vue";
|
import DataTable from "~/components/datatable/DataTable.vue";
|
||||||
import DataView from "~/components/datatable/DataView.vue";
|
import DataView from "~/components/datatable/DataView.vue";
|
||||||
import ViewList from "~/components/datatable/ViewList.vue";
|
import ViewList from "~/components/datatable/ViewList.vue";
|
||||||
@@ -10,7 +8,6 @@ import FileGallery from "~/components/media/FileGallery.vue";
|
|||||||
import FileUpload from "~/components/media/FileUpload.vue";
|
import FileUpload from "~/components/media/FileUpload.vue";
|
||||||
import FileShow from "~/components/media/FileShow.vue";
|
import FileShow from "~/components/media/FileShow.vue";
|
||||||
import ChipImage from "~/components/media/ChipImage.vue";
|
import ChipImage from "~/components/media/ChipImage.vue";
|
||||||
import ImageLayout from "~/components/media/ImageLayout.vue";
|
|
||||||
import Email from "~/components/marketing/email/Email.vue";
|
import Email from "~/components/marketing/email/Email.vue";
|
||||||
|
|
||||||
import Avatarbox from "~/components/common/Avatarbox.vue";
|
import Avatarbox from "~/components/common/Avatarbox.vue";
|
||||||
@@ -28,7 +25,6 @@ import MenuNote from "~/components/menu/MenuNote.vue";
|
|||||||
import MenuFile from "~/components/menu/MenuFile.vue";
|
import MenuFile from "~/components/menu/MenuFile.vue";
|
||||||
|
|
||||||
import CustomerForm from "~/components/customer/CustomerForm.vue";
|
import CustomerForm from "~/components/customer/CustomerForm.vue";
|
||||||
import CustomerQuickAdd from "~/components/customer/CustomerQuickAdd.vue";
|
|
||||||
|
|
||||||
import Dashboard from "~/components/dashboard/Dashboard.vue";
|
import Dashboard from "~/components/dashboard/Dashboard.vue";
|
||||||
import Orders from "~/components/orders/Orders.vue";
|
import Orders from "~/components/orders/Orders.vue";
|
||||||
@@ -36,34 +32,14 @@ import Inventory from "~/components/inventory/Inventory.vue";
|
|||||||
import Rights from "~/components/rights/Rights.vue";
|
import Rights from "~/components/rights/Rights.vue";
|
||||||
import POS from "~/components/pos/POS.vue";
|
import POS from "~/components/pos/POS.vue";
|
||||||
import ChooseIMEIButton from "~/components/pos/ChooseIMEIButton.vue";
|
import ChooseIMEIButton from "~/components/pos/ChooseIMEIButton.vue";
|
||||||
import AddressForm from "~/components/pos/AddressForm.vue";
|
|
||||||
import CreateReceipts from "~/components/receipts/CreateReceipts.vue";
|
import CreateReceipts from "~/components/receipts/CreateReceipts.vue";
|
||||||
import Return from "~/components/receipts/Return.vue";
|
import Return from "~/components/receipts/Return.vue";
|
||||||
import Imports from "~/components/imports/Imports.vue";
|
import Imports from "~/components/imports/Imports.vue";
|
||||||
import AddProduct from "~/components/imports/AddProduct.vue";
|
import AddProduct from "~/components/imports/AddProduct.vue";
|
||||||
import ProductForm from "~/components/imports/ProductForm.vue";
|
|
||||||
import ProductVariantForm from "~/components/imports/ProductVariantForm.vue";
|
|
||||||
import EditProductButton from "~/components/imports/EditProductButton.vue";
|
import EditProductButton from "~/components/imports/EditProductButton.vue";
|
||||||
import DeleteProduct from "~/components/imports/DeleteProduct.vue";
|
import DeleteProduct from "~/components/imports/DeleteProduct.vue";
|
||||||
import AddOS from "~/components/imports/addons/AddOS.vue";
|
|
||||||
import AddManufacturer from "~/components/imports/addons/AddManufacturer.vue";
|
|
||||||
import AddBattery from "~/components/imports/addons/AddBattery.vue";
|
|
||||||
import AddScreen from "~/components/imports/addons/AddScreen.vue";
|
|
||||||
import AddCPU from "~/components/imports/addons/AddCPU.vue";
|
|
||||||
import AddGPU from "~/components/imports/addons/AddGPU.vue";
|
|
||||||
import AddCamera from "~/components/imports/addons/AddCamera.vue";
|
|
||||||
import AddSIM from "~/components/imports/addons/AddSIM.vue";
|
|
||||||
import AddNetworkTechnology from "~/components/imports/addons/AddNetworkTechnology.vue";
|
|
||||||
import AddChargingTechnology from "~/components/imports/addons/AddChargingTechnology.vue";
|
|
||||||
import AddExternalStorage from "~/components/imports/addons/AddExternalStorage.vue";
|
|
||||||
import AddIPRating from "~/components/imports/addons/AddIPRating.vue";
|
|
||||||
import AddDesign from "~/components/imports/addons/AddDesign.vue";
|
|
||||||
import AddColor from "~/components/imports/addons/AddColor.vue";
|
|
||||||
import AddRAM from "~/components/imports/addons/AddRAM.vue";
|
|
||||||
import AddInternalStorage from "~/components/imports/addons/AddInternalStorage.vue";
|
|
||||||
import Color from "~/components/imports/Color.vue";
|
import Color from "~/components/imports/Color.vue";
|
||||||
import IMEIButton from "~/components/imports/IMEIButton.vue";
|
import IMEIButton from "~/components/imports/IMEIButton.vue";
|
||||||
import IMEIs from "~/components/imports/IMEIs.vue";
|
|
||||||
import DeleteProductVariant from "~/components/imports/DeleteProductVariant.vue";
|
import DeleteProductVariant from "~/components/imports/DeleteProductVariant.vue";
|
||||||
import ProductImage from "~/components/imports/ProductImage.vue";
|
import ProductImage from "~/components/imports/ProductImage.vue";
|
||||||
import Returns from "~/components/imports/Returns.vue";
|
import Returns from "~/components/imports/Returns.vue";
|
||||||
@@ -81,14 +57,12 @@ import Finance from "~/components/report/Finance.vue";
|
|||||||
|
|
||||||
const components = {
|
const components = {
|
||||||
PivotDataView,
|
PivotDataView,
|
||||||
CustomerQuickAdd,
|
|
||||||
CustomerForm,
|
CustomerForm,
|
||||||
CountdownTimer,
|
CountdownTimer,
|
||||||
ViewList,
|
ViewList,
|
||||||
CountWithAdd,
|
CountWithAdd,
|
||||||
MenuAction,
|
MenuAction,
|
||||||
Email,
|
Email,
|
||||||
Datepicker,
|
|
||||||
ImageGallery,
|
ImageGallery,
|
||||||
FileGallery,
|
FileGallery,
|
||||||
FileUpload,
|
FileUpload,
|
||||||
@@ -103,7 +77,6 @@ const components = {
|
|||||||
FormatDate,
|
FormatDate,
|
||||||
MenuAdd,
|
MenuAdd,
|
||||||
MenuNote,
|
MenuNote,
|
||||||
ImageLayout,
|
|
||||||
MenuFile,
|
MenuFile,
|
||||||
Dashboard,
|
Dashboard,
|
||||||
Orders,
|
Orders,
|
||||||
@@ -111,34 +84,14 @@ const components = {
|
|||||||
Rights,
|
Rights,
|
||||||
POS,
|
POS,
|
||||||
ChooseIMEIButton,
|
ChooseIMEIButton,
|
||||||
AddressForm,
|
|
||||||
CreateReceipts,
|
CreateReceipts,
|
||||||
Return,
|
Return,
|
||||||
Imports,
|
Imports,
|
||||||
AddProduct,
|
AddProduct,
|
||||||
ProductForm,
|
|
||||||
ProductVariantForm,
|
|
||||||
EditProductButton,
|
EditProductButton,
|
||||||
DeleteProduct,
|
DeleteProduct,
|
||||||
AddOS,
|
|
||||||
AddManufacturer,
|
|
||||||
AddBattery,
|
|
||||||
AddScreen,
|
|
||||||
AddCPU,
|
|
||||||
AddGPU,
|
|
||||||
AddCamera,
|
|
||||||
AddSIM,
|
|
||||||
AddNetworkTechnology,
|
|
||||||
AddChargingTechnology,
|
|
||||||
AddExternalStorage,
|
|
||||||
AddIPRating,
|
|
||||||
AddDesign,
|
|
||||||
AddColor,
|
|
||||||
AddRAM,
|
|
||||||
AddInternalStorage,
|
|
||||||
Color,
|
Color,
|
||||||
IMEIButton,
|
IMEIButton,
|
||||||
IMEIs,
|
|
||||||
DeleteProductVariant,
|
DeleteProductVariant,
|
||||||
ProductImage,
|
ProductImage,
|
||||||
Returns,
|
Returns,
|
||||||
|
|||||||
@@ -487,7 +487,7 @@ export default /** @type {const} */ ([
|
|||||||
url_detail: "data-detail/Invoice/",
|
url_detail: "data-detail/Invoice/",
|
||||||
params: {
|
params: {
|
||||||
values:
|
values:
|
||||||
"delivery,delivery__receiver_name,delivery__receiver_phone,delivery__tracking_code,delivery__expected_date,delivery__delivered_date,delivery__status,payments,history,id,code,customer,staff,staff__fullname,staff__phone,staff__email,voucher,customer_name,customer_phone,customer_email,shipping_address,product_amount,shipping_fee,total_amount,discount_amount,final_amount,order_type,status,note,ordered_at,paid_at,creator,updater,deleted,delivery_method,create_time,update_time",
|
"delivery,delivery__receiver_name,delivery__receiver_phone,delivery__tracking_code,delivery__expected_date,delivery__delivered_date,delivery__status,payments,history,id,code,customer,staff,staff__fullname,staff__phone,staff__email,voucher,customer_name,customer_phone,customer_email,shipping_address,product_amount,shipping_fee,total_amount,discount_amount,final_amount,order_type,status,payment_status,payment_status__code,payment_status__name,note,ordered_at,paid_at,creator,updater,deleted,delivery_method,create_time,update_time",
|
||||||
sort: "-id",
|
sort: "-id",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -654,6 +654,12 @@ export default /** @type {const} */ ([
|
|||||||
url_detail: "data-detail/Payment_Record/",
|
url_detail: "data-detail/Payment_Record/",
|
||||||
params: {},
|
params: {},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Payment_Status",
|
||||||
|
url: "data/Payment_Status/",
|
||||||
|
url_detail: "data-detail/Payment_Status/",
|
||||||
|
params: {},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Customer_Address",
|
name: "Customer_Address",
|
||||||
url: "data/Customer_Address/",
|
url: "data/Customer_Address/",
|
||||||
|
|||||||
Reference in New Issue
Block a user