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() {
|
||||
|
||||
@@ -97,9 +97,9 @@ function changeTab(_tab, _subtab) {
|
||||
const meta = {
|
||||
title: currentTab.value[$store.lang],
|
||||
image: undefined,
|
||||
description: "Utopia",
|
||||
description: "ERP",
|
||||
type: "article",
|
||||
keywords: "utopia",
|
||||
keywords: "erp",
|
||||
};
|
||||
useHead($createMeta(meta));
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
};
|
||||
|
||||
const copyToClipboard = function (text) {
|
||||
snackbar("Copied to clipboard", "Success");
|
||||
snackbar("Copied", "Success");
|
||||
if (window.clipboardData && window.clipboardData.setData) {
|
||||
// IE specific code path to prevent textarea being shown while dialog is visible.
|
||||
return clipboardData.setData("Text", text);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import Datepicker from "~/components/datepicker/Datepicker.vue";
|
||||
|
||||
import DataTable from "~/components/datatable/DataTable.vue";
|
||||
import DataView from "~/components/datatable/DataView.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 FileShow from "~/components/media/FileShow.vue";
|
||||
import ChipImage from "~/components/media/ChipImage.vue";
|
||||
import ImageLayout from "~/components/media/ImageLayout.vue";
|
||||
import Email from "~/components/marketing/email/Email.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 CustomerForm from "~/components/customer/CustomerForm.vue";
|
||||
import CustomerQuickAdd from "~/components/customer/CustomerQuickAdd.vue";
|
||||
|
||||
import Dashboard from "~/components/dashboard/Dashboard.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 POS from "~/components/pos/POS.vue";
|
||||
import ChooseIMEIButton from "~/components/pos/ChooseIMEIButton.vue";
|
||||
import AddressForm from "~/components/pos/AddressForm.vue";
|
||||
import CreateReceipts from "~/components/receipts/CreateReceipts.vue";
|
||||
import Return from "~/components/receipts/Return.vue";
|
||||
import Imports from "~/components/imports/Imports.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 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 IMEIButton from "~/components/imports/IMEIButton.vue";
|
||||
import IMEIs from "~/components/imports/IMEIs.vue";
|
||||
import DeleteProductVariant from "~/components/imports/DeleteProductVariant.vue";
|
||||
import ProductImage from "~/components/imports/ProductImage.vue";
|
||||
import Returns from "~/components/imports/Returns.vue";
|
||||
@@ -81,14 +57,12 @@ import Finance from "~/components/report/Finance.vue";
|
||||
|
||||
const components = {
|
||||
PivotDataView,
|
||||
CustomerQuickAdd,
|
||||
CustomerForm,
|
||||
CountdownTimer,
|
||||
ViewList,
|
||||
CountWithAdd,
|
||||
MenuAction,
|
||||
Email,
|
||||
Datepicker,
|
||||
ImageGallery,
|
||||
FileGallery,
|
||||
FileUpload,
|
||||
@@ -103,7 +77,6 @@ const components = {
|
||||
FormatDate,
|
||||
MenuAdd,
|
||||
MenuNote,
|
||||
ImageLayout,
|
||||
MenuFile,
|
||||
Dashboard,
|
||||
Orders,
|
||||
@@ -111,34 +84,14 @@ const components = {
|
||||
Rights,
|
||||
POS,
|
||||
ChooseIMEIButton,
|
||||
AddressForm,
|
||||
CreateReceipts,
|
||||
Return,
|
||||
Imports,
|
||||
AddProduct,
|
||||
ProductForm,
|
||||
ProductVariantForm,
|
||||
EditProductButton,
|
||||
DeleteProduct,
|
||||
AddOS,
|
||||
AddManufacturer,
|
||||
AddBattery,
|
||||
AddScreen,
|
||||
AddCPU,
|
||||
AddGPU,
|
||||
AddCamera,
|
||||
AddSIM,
|
||||
AddNetworkTechnology,
|
||||
AddChargingTechnology,
|
||||
AddExternalStorage,
|
||||
AddIPRating,
|
||||
AddDesign,
|
||||
AddColor,
|
||||
AddRAM,
|
||||
AddInternalStorage,
|
||||
Color,
|
||||
IMEIButton,
|
||||
IMEIs,
|
||||
DeleteProductVariant,
|
||||
ProductImage,
|
||||
Returns,
|
||||
|
||||
@@ -487,7 +487,7 @@ export default /** @type {const} */ ([
|
||||
url_detail: "data-detail/Invoice/",
|
||||
params: {
|
||||
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",
|
||||
},
|
||||
},
|
||||
@@ -654,6 +654,12 @@ export default /** @type {const} */ ([
|
||||
url_detail: "data-detail/Payment_Record/",
|
||||
params: {},
|
||||
},
|
||||
{
|
||||
name: "Payment_Status",
|
||||
url: "data/Payment_Status/",
|
||||
url_detail: "data-detail/Payment_Status/",
|
||||
params: {},
|
||||
},
|
||||
{
|
||||
name: "Customer_Address",
|
||||
url: "data/Customer_Address/",
|
||||
|
||||
Reference in New Issue
Block a user