up
This commit is contained in:
Generated
+1
-9
@@ -91,7 +91,6 @@
|
||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
"@babel/generator": "^7.28.5",
|
||||
@@ -1090,7 +1089,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.19.tgz",
|
||||
"integrity": "sha512-z0aVlO5e4Wah6p6mouM0UEqtRf1MZZPt4mwzEyU6kusaNL+dlWQgAasF2cK23hwT4cmxkEmr4inULXgpyeExdQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"preact": "~10.12.1"
|
||||
}
|
||||
@@ -1574,7 +1572,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
@@ -2308,7 +2305,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.8.19",
|
||||
"caniuse-lite": "^1.0.30001751",
|
||||
@@ -2716,8 +2712,7 @@
|
||||
"version": "4.32.11",
|
||||
"resolved": "https://registry.npmjs.org/filepond/-/filepond-4.32.11.tgz",
|
||||
"integrity": "sha512-+uHkc/XNksMMy2S+x5MGxTuA97NqzBBwmoixn3tqGELa4BgqJ+PBiWL3YeRamqAoYguT7t/au3s7ams2jjMshA==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/filepond-plugin-file-validate-type": {
|
||||
"version": "1.2.9",
|
||||
@@ -3542,7 +3537,6 @@
|
||||
"integrity": "sha512-+VUy01yfDqNmIVMd/LLKl2TTtY0ovZN0rTonh+FhKr65mFwIYgU9WzgIZKS7U9/SPCQvWTsTGx9jyt+qRm/XFw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^2.5.0",
|
||||
"buffer-builder": "^0.2.0",
|
||||
@@ -4106,7 +4100,6 @@
|
||||
"integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.5.0",
|
||||
@@ -4285,7 +4278,6 @@
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.24.tgz",
|
||||
"integrity": "sha512-uTHDOpVQTMjcGgrqFPSb8iO2m1DUvo+WbGqoXQz8Y1CeBYQ0FXf2z1gLRaBtHjlRz7zZUBHxjVB5VTLzYkvftg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.5.24",
|
||||
"@vue/compiler-sfc": "3.5.24",
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
"input_tracking_number": "Enter tracking number",
|
||||
"order_status": "Order Status",
|
||||
"modify_order_status": "Modify Order Status",
|
||||
"submit": "Submit"
|
||||
"submit": "Submit",
|
||||
"part_name":"Parts Name"
|
||||
},
|
||||
"schedule": {
|
||||
"my_schedule": "My Schedule",
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
"input_tracking_number": "输入快递单号",
|
||||
"order_status": "订单状态",
|
||||
"modify_order_status": "修改订单状态",
|
||||
"submit": "提交"
|
||||
"submit": "提交",
|
||||
"part_name":"物件名称"
|
||||
},
|
||||
"schedule": {
|
||||
"my_schedule": "我的日程",
|
||||
|
||||
@@ -16,35 +16,12 @@ const router = useRouter();
|
||||
import TomSelect from "tom-select";
|
||||
import "tom-select/dist/css/tom-select.css";
|
||||
|
||||
|
||||
const textarea_maxlen=256
|
||||
const textarea_len=ref(0)
|
||||
const textarea_val=ref()
|
||||
const textarea_maxlen = 256;
|
||||
const textarea_len = ref(0);
|
||||
const textarea_val = ref();
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
|
||||
function submit_order(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
function textarea_change(a){
|
||||
//console.log(textarea_val.value.length)
|
||||
|
||||
textarea_len.value=textarea_val.value.length
|
||||
|
||||
// if(a.inputType=="insertText"){
|
||||
// textarea_len.value+=1;
|
||||
// }
|
||||
// if(a.inputType=="deleteContentBackward"){
|
||||
// textarea_len.value-=1;
|
||||
// }
|
||||
}
|
||||
|
||||
function functionupdataTitle() {
|
||||
document.title = "Operations." + t("purchase.add_part");
|
||||
}
|
||||
|
||||
//货币类型
|
||||
const currency_type = reactive({
|
||||
1: "RMB",
|
||||
@@ -109,13 +86,33 @@ function add_cost() {
|
||||
//console.log(t);
|
||||
}
|
||||
|
||||
function submit_order() {
|
||||
console.log("up");
|
||||
}
|
||||
|
||||
function textarea_change(a) {
|
||||
//console.log(textarea_val.value.length)
|
||||
|
||||
textarea_len.value = textarea_val.value.length;
|
||||
|
||||
// if(a.inputType=="insertText"){
|
||||
// textarea_len.value+=1;
|
||||
// }
|
||||
// if(a.inputType=="deleteContentBackward"){
|
||||
// textarea_len.value-=1;
|
||||
// }
|
||||
}
|
||||
|
||||
function functionupdataTitle() {
|
||||
document.title = "Operations." + t("purchase.add_part");
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
functionupdataTitle();
|
||||
//sele_init();
|
||||
if (!userStore.isLoggedIn) {
|
||||
router.push("/login");
|
||||
}
|
||||
|
||||
});
|
||||
// 监听语言变化,更新标题
|
||||
watch(locale, () => {
|
||||
@@ -123,6 +120,20 @@ watch(locale, () => {
|
||||
update_cost_type();
|
||||
update_order_status();
|
||||
});
|
||||
|
||||
// 监听 cost 变化,自动限制小数位
|
||||
watch(
|
||||
() => cost_sheet.cost,
|
||||
(newVal) => {
|
||||
if (newVal !== null && newVal !== undefined) {
|
||||
// 四舍五入到2位小数
|
||||
const fixed = parseFloat(newVal).toFixed(2);
|
||||
if (parseFloat(fixed) !== newVal) {
|
||||
cost_sheet.cost = parseFloat(fixed);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -160,7 +171,9 @@ watch(locale, () => {
|
||||
<div class="mb-3">
|
||||
<label class="form-label"
|
||||
>{{ t("purchase_addorder.remarks") }}
|
||||
<span class="form-label-description">{{textarea_len}}/{{textarea_maxlen}}</span></label
|
||||
<span class="form-label-description"
|
||||
>{{ textarea_len }}/{{ textarea_maxlen }}</span
|
||||
></label
|
||||
>
|
||||
<textarea
|
||||
class="form-control mt-2 mb-2"
|
||||
@@ -171,8 +184,11 @@ watch(locale, () => {
|
||||
@input="textarea_change"
|
||||
v-model="textarea_val"
|
||||
></textarea>
|
||||
<useDropzone acceptedFiles="image/*" uploadURL="/api/files/upload/image" maxFiles="10"></useDropzone>
|
||||
|
||||
<useDropzone
|
||||
acceptedFiles="image/*"
|
||||
uploadURL="/api/files/upload/image"
|
||||
maxFiles="10"
|
||||
></useDropzone>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -193,6 +209,17 @@ watch(locale, () => {
|
||||
placeholder="http"
|
||||
value=""
|
||||
/>
|
||||
<div class="mb-3 mt-3">
|
||||
<label class="form-label">{{
|
||||
t("purchase_addorder.part_name")
|
||||
}}</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="example-text-input"
|
||||
:placeholder="t('purchase_addorder.part_name')"
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<label class="form-label">{{
|
||||
t("purchase_addorder.style_remarks")
|
||||
@@ -368,7 +395,11 @@ watch(locale, () => {
|
||||
</div>
|
||||
<div class="card-footer text-end">
|
||||
<div class="d-flex">
|
||||
<button type="submit" class="btn btn-primary ms-auto" @click="submit_order">
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary ms-auto"
|
||||
@click="submit_order"
|
||||
>
|
||||
{{ t("purchase_addorder.submit") }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user