Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jisu_gongdan_phone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglongbao
jisu_gongdan_phone
Commits
3d531691
Commit
3d531691
authored
Sep 02, 2024
by
zhanglongbao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
ae26d968
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
91 additions
and
48 deletions
+91
-48
components.d.ts
components.d.ts
+1
-8
package.json
package.json
+1
-0
pnpm-lock.yaml
pnpm-lock.yaml
+7
-0
index.vue
src/components/select_client/index.vue
+2
-0
index.vue
src/components/select_client_tag/index.vue
+1
-3
index.vue
src/components/select_order_tag/index.vue
+1
-2
index.vue
src/components/select_product/index.vue
+1
-0
index.vue
src/components/widget/field/client_tag/index.vue
+8
-3
index.vue
src/components/widget/field/input/index.vue
+1
-1
index.vue
src/components/widget/field/multiline/index.vue
+1
-1
index.vue
src/components/widget/field/order_client/index.vue
+15
-9
index.vue
src/components/widget/field/order_product/index.vue
+17
-8
index.vue
src/components/widget/field/order_tag/index.vue
+7
-2
main.ts
src/main.ts
+3
-0
index.vue
src/view/code_product_detail/index.vue
+18
-8
vite-env.d.ts
src/vite-env.d.ts
+7
-3
No files found.
components.d.ts
View file @
3d531691
...
...
@@ -9,17 +9,12 @@ declare module 'vue' {
export
interface
GlobalComponents
{
Address
:
typeof
import
(
'./src/components/widget/field/address/index.vue'
)[
'default'
]
Avatar
:
typeof
import
(
'./src/components/avatar/index.vue'
)[
'default'
]
<<<<<<<
HEAD
Client_tag
:
typeof
import
(
'./src/components/widget/field/client_tag/index.vue'
)[
'default'
]
copy
:
typeof
import
(
'./src/components/select_order_tag copy/index.vue'
)[
'default'
]
=======
>>>>>>>
b8bdf7f
(
fix
)
Create_form_data
:
typeof
import
(
'./src/components/create_form_data/index.vue'
)[
'default'
]
Date_time
:
typeof
import
(
'./src/components/widget/field/date_time/index.vue'
)[
'default'
]
Date_time_range
:
typeof
import
(
'./src/components/widget/field/date_time_range/index.vue'
)[
'default'
]
Dd
:
typeof
import
(
'./src/components/name/dd.vue'
)[
'default'
]
Dept
:
typeof
import
(
'./src/components/widget/field/dept/index.vue'
)[
'default'
]
Field
:
typeof
import
(
'./src/components/widget/field/index.vue'
)[
'default'
]
File
:
typeof
import
(
'./src/components/widget/field/file/index.vue'
)[
'default'
]
Image
:
typeof
import
(
'./src/components/widget/field/image/index.vue'
)[
'default'
]
Input
:
typeof
import
(
'./src/components/widget/field/input/index.vue'
)[
'default'
]
...
...
@@ -37,12 +32,9 @@ declare module 'vue' {
Select
:
typeof
import
(
'./src/components/select/index.vue'
)[
'default'
]
Select_address
:
typeof
import
(
'./src/components/select_address/index.vue'
)[
'default'
]
Select_client
:
typeof
import
(
'./src/components/select_client/index.vue'
)[
'default'
]
<<<<<<<
HEAD
Select_client_tag
:
typeof
import
(
'./src/components/select_client_tag/index.vue'
)[
'default'
]
Select_order_tag
:
typeof
import
(
'./src/components/select_order_tag/index.vue'
)[
'default'
]
Select_product
:
typeof
import
(
'./src/components/select_product/index.vue'
)[
'default'
]
=======
>>>>>>>
b8bdf7f
(
fix
)
Select_time
:
typeof
import
(
'./src/components/select_time/index.vue'
)[
'default'
]
Select_user_dept
:
typeof
import
(
'./src/components/select_user_dept/index.vue'
)[
'default'
]
Signature
:
typeof
import
(
'./src/components/widget/field/signature/index.vue'
)[
'default'
]
...
...
@@ -51,6 +43,7 @@ declare module 'vue' {
User
:
typeof
import
(
'./src/components/widget/field/user/index.vue'
)[
'default'
]
User_dept_list
:
typeof
import
(
'./src/components/user_dept_list/index.vue'
)[
'default'
]
VanCascader
:
typeof
import
(
'vant/es'
)[
'Cascader'
]
VanCheckbox
:
typeof
import
(
'vant/es'
)[
'Checkbox'
]
VanDatePicker
:
typeof
import
(
'vant/es'
)[
'DatePicker'
]
VanPicker
:
typeof
import
(
'vant/es'
)[
'Picker'
]
VanPopup
:
typeof
import
(
'vant/es'
)[
'Popup'
]
...
...
package.json
View file @
3d531691
...
...
@@ -11,6 +11,7 @@
"dependencies"
:
{
"
axios
"
:
"
^1.7.5
"
,
"
dingtalk-jsapi
"
:
"
^3.0.38
"
,
"
mitt
"
:
"
^3.0.1
"
,
"
pinia
"
:
"
^2.2.2
"
,
"
smooth-signature
"
:
"
^1.0.15
"
,
"
vant
"
:
"
^4.9.4
"
,
...
...
pnpm-lock.yaml
View file @
3d531691
...
...
@@ -11,6 +11,9 @@ dependencies:
dingtalk-jsapi
:
specifier
:
^3.0.38
version
:
3.0.38
mitt
:
specifier
:
^3.0.1
version
:
3.0.1
pinia
:
specifier
:
^2.2.2
version
:
2.2.2(typescript@5.5.4)(vue@3.4.38)
...
...
@@ -997,6 +1000,10 @@ packages:
brace-expansion
:
2.0.1
dev
:
true
/mitt@3.0.1
:
resolution
:
{
integrity
:
sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==
}
dev
:
false
/mlly@1.7.1
:
resolution
:
{
integrity
:
sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==
}
dependencies
:
...
...
src/components/select_client/index.vue
View file @
3d531691
...
...
@@ -33,6 +33,7 @@ import popupComp from "@/components/popup/index.vue";
export
interface
Props
{
value
?:
any
;
params
?:
any
;
onHide
?():
void
;
onConfirm
?(
value
:
any
):
void
;
}
...
...
@@ -64,6 +65,7 @@ const params = computed(() => ({
params
:
{
form_id
:
client_form_list
.
value
[
0
].
form_id
,
size
:
1000
,
...
props
.
params
,
},
}));
const
{
list
,
getList
}
=
useDataList
(
params
);
...
...
src/components/select_client_tag/index.vue
View file @
3d531691
...
...
@@ -23,8 +23,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
computed
,
ref
}
from
"vue"
;
import
api
from
"@/api"
;
import
{
ref
}
from
"vue"
;
import
{
useUserTag
,
UserTag
}
from
"@/utils/useTag"
;
import
{
hexToRgba
}
from
"@/utils/public"
;
import
popupComp
from
"@/components/popup/index.vue"
;
...
...
@@ -57,7 +56,6 @@ const select = (tag: UserTag) => {
}
else
{
selected_tags
.
value
.
push
(
tag
);
}
change
(
selected_tags
.
value
.
map
((
it
)
=>
it
.
id
));
};
const
isSelected
=
(
tag
:
UserTag
)
=>
{
return
selected_tags
.
value
.
some
((
it
:
UserTag
)
=>
it
.
id
==
tag
.
id
);
...
...
src/components/select_order_tag/index.vue
View file @
3d531691
...
...
@@ -23,8 +23,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
computed
,
ref
}
from
"vue"
;
import
api
from
"@/api"
;
import
{
ref
}
from
"vue"
;
import
{
useOrderTag
,
OrderTag
}
from
"@/utils/useTag"
;
import
{
hexToRgba
}
from
"@/utils/public"
;
import
popupComp
from
"@/components/popup/index.vue"
;
...
...
src/components/select_product/index.vue
View file @
3d531691
...
...
@@ -33,6 +33,7 @@ import popupComp from "@/components/popup/index.vue";
export
interface
Props
{
value
?:
any
;
params
?:
any
;
onHide
?():
void
;
onConfirm
?(
value
:
any
):
void
;
}
...
...
src/components/widget/field/client_tag/index.vue
View file @
3d531691
...
...
@@ -15,7 +15,7 @@
}">
<i
v-if=
"tag.label_icon"
:class=
"tag.label_icon"
></i>
<span>
{{
tag
.
label_name
}}
</span>
<i
class=
"icon-69 remove"
@
click=
"
select
(tag)"
></i>
<i
class=
"icon-69 remove"
@
click=
"
removeTag
(tag)"
></i>
</div>
<div
class=
"tag add"
@
click=
"selectClientTag"
>
...
...
@@ -30,7 +30,8 @@
import
{
ref
}
from
"vue"
;
import
{
FieldProps
}
from
"../config"
;
import
{
hexToRgba
}
from
"@/utils/public.ts"
;
import
{
$selectClientTag
}
from
'@/components/select_client_tag/index'
import
{
$selectClientTag
}
from
"@/components/select_client_tag/index"
;
import
{
UserTag
}
from
"@/utils/useTag"
;
const
props
=
defineProps
<
FieldProps
>
();
const
emit
=
defineEmits
([
"edit"
]);
...
...
@@ -41,7 +42,7 @@ const change = () => {
});
};
const
selected_tag
=
ref
([]);
const
selected_tag
=
ref
<
UserTag
[]
>
([]);
const
selectClientTag
=
()
=>
{
$selectClientTag
({
...
...
@@ -51,6 +52,10 @@ const selectClientTag = () => {
},
});
};
const
removeTag
=
(
tag
:
UserTag
)
=>
{
selected_tag
.
value
=
selected_tag
.
value
.
filter
((
it
)
=>
it
.
id
!==
tag
.
id
);
change
();
};
const
init
=
()
=>
{
selected_tag
.
value
=
props
.
data
[
props
.
config
.
key_id
]
||
[];
...
...
src/components/widget/field/input/index.vue
View file @
3d531691
...
...
@@ -21,7 +21,7 @@ const props = defineProps<FieldProps>();
const
emit
=
defineEmits
([
"edit"
]);
const
change
=
(
e
:
any
)
=>
{
emit
(
"edit"
,
{
[
props
.
config
.
key_id
]:
e
.
target
.
modelV
alue
});
emit
(
"edit"
,
{
[
props
.
config
.
key_id
]:
e
.
target
.
v
alue
});
};
</
script
>
...
...
src/components/widget/field/multiline/index.vue
View file @
3d531691
...
...
@@ -21,7 +21,7 @@ const props = defineProps<FieldProps>();
const
emit
=
defineEmits
([
"edit"
]);
const
change
=
(
e
:
any
)
=>
{
emit
(
"edit"
,
{
[
props
.
config
.
key_id
]:
e
.
target
.
modelV
alue
});
emit
(
"edit"
,
{
[
props
.
config
.
key_id
]:
e
.
target
.
v
alue
});
};
</
script
>
...
...
src/components/widget/field/order_client/index.vue
View file @
3d531691
...
...
@@ -42,7 +42,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
"vue"
;
import
{
ref
,
onBeforeUnmount
}
from
"vue"
;
import
{
FieldProps
}
from
"../config"
;
import
{
$selectClient
}
from
"@/components/select_client/index"
;
...
...
@@ -58,23 +58,29 @@ const change = () => {
};
const
client
=
ref
<
any
>
({});
const
init
=
()
=>
{
client
.
value
=
props
.
data
[
props
.
config
.
key_id
]
||
{};
};
init
();
const
selectClient
=
()
=>
{
$selectClient
({
value
:
client
.
value
,
onConfirm
:
(
data
)
=>
{
client
.
value
=
data
;
console
.
log
(
"client"
,
client
.
value
);
change
();
window
.
mitt
.
emit
(
"order_client_change"
);
},
});
};
window
.
mitt
.
on
(
"order_product_change"
,
(
select_client
:
any
)
=>
{
client
.
value
=
select_client
;
change
();
});
onBeforeUnmount
(()
=>
{
window
.
mitt
.
off
(
"order_product_change"
);
});
const
init
=
()
=>
{
client
.
value
=
props
.
data
[
props
.
config
.
key_id
]
||
{};
};
init
();
</
script
>
<
style
lang=
"less"
scoped
>
...
...
src/components/widget/field/order_product/index.vue
View file @
3d531691
...
...
@@ -34,9 +34,9 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
"vue"
;
import
{
onBeforeUnmount
,
ref
}
from
"vue"
;
import
{
FieldProps
}
from
"../config"
;
import
{
$selectProduct
}
from
'@/components/select_product/index'
import
{
$selectProduct
}
from
"@/components/select_product/index"
;
const
props
=
defineProps
<
FieldProps
>
();
const
emit
=
defineEmits
([
"edit"
]);
...
...
@@ -47,20 +47,29 @@ const change = () => {
const
product
=
ref
<
any
>
({});
const
init
=
()
=>
{
product
.
value
=
props
.
data
[
props
.
config
.
key_id
]
||
{};
};
init
();
const
selectProduct
=
()
=>
{
$selectProduct
({
value
:
product
.
value
,
onConfirm
:
(
data
)
=>
{
onConfirm
:
async
(
data
)
=>
{
product
.
value
=
data
;
change
();
window
.
mitt
.
emit
(
"order_product_change"
,
data
.
customer_id
);
},
});
};
window
.
mitt
.
on
(
"order_client_change"
,
()
=>
{
product
.
value
=
{};
change
();
});
onBeforeUnmount
(()
=>
{
window
.
mitt
.
off
(
"order_client_change"
);
});
const
init
=
()
=>
{
product
.
value
=
props
.
data
[
props
.
config
.
key_id
]
||
{};
};
init
();
</
script
>
<
style
lang=
"less"
scoped
>
...
...
src/components/widget/field/order_tag/index.vue
View file @
3d531691
...
...
@@ -15,7 +15,7 @@
}">
<i
v-if=
"tag.label_icon"
:class=
"tag.label_icon"
></i>
<span>
{{
tag
.
label_name
}}
</span>
<i
class=
"icon-69 remove"
@
click=
"
select
(tag)"
></i>
<i
class=
"icon-69 remove"
@
click=
"
removeTag
(tag)"
></i>
</div>
<div
class=
"tag add"
@
click=
"selectOrderTag"
>
...
...
@@ -31,6 +31,7 @@ import { ref } from "vue";
import
{
FieldProps
}
from
"../config"
;
import
{
hexToRgba
}
from
"@/utils/public.ts"
;
import
{
$selectOrderTag
}
from
"@/components/select_order_tag/index"
;
import
{
OrderTag
}
from
"@/utils/useTag"
;
const
props
=
defineProps
<
FieldProps
>
();
const
emit
=
defineEmits
([
"edit"
]);
...
...
@@ -41,7 +42,7 @@ const change = () => {
});
};
const
selected_tag
=
ref
([]);
const
selected_tag
=
ref
<
OrderTag
[]
>
([]);
const
selectOrderTag
=
()
=>
{
$selectOrderTag
({
...
...
@@ -51,6 +52,10 @@ const selectOrderTag = () => {
},
});
};
const
removeTag
=
(
tag
:
OrderTag
)
=>
{
selected_tag
.
value
=
selected_tag
.
value
.
filter
((
it
)
=>
it
.
id
!==
tag
.
id
);
change
();
};
const
init
=
()
=>
{
selected_tag
.
value
=
props
.
data
[
props
.
config
.
key_id
]
||
[];
...
...
src/main.ts
View file @
3d531691
...
...
@@ -3,6 +3,7 @@ import App from "./App.vue";
import
{
initApp
}
from
"@/utils/init"
;
import
router
from
"@/router"
;
import
{
createPinia
}
from
"pinia"
;
import
mitt
from
"mitt"
;
// css
import
"./assets/css/reset.css"
;
...
...
@@ -10,6 +11,8 @@ import "./assets/css/global.less";
import
"./assets/icon/style.css"
;
import
"vant/lib/toast/index.css"
;
window
.
mitt
=
mitt
();
const
app
=
createApp
(
App
);
app
.
use
(
createPinia
());
app
.
use
(
router
);
...
...
src/view/code_product_detail/index.vue
View file @
3d531691
...
...
@@ -114,6 +114,7 @@ import { ref } from "vue";
import
api
from
"@/api"
;
import
{
File
,
hexToRgba
}
from
"@/utils/public"
;
import
{
$createFormData
}
from
"@/components/create_form_data/index"
;
import
{
$toast
}
from
"@/components/toast/index"
;
// 产品详情
const
product_detail
=
ref
<
{
...
...
@@ -125,21 +126,21 @@ const getProductDetail = async () => {
const
msg
=
await
api
.
external
.
getInfoByQrCode
();
if
(
msg
.
code
==
0
)
{
product_detail
.
value
=
msg
.
data
;
console
.
log
(
"product_detail"
,
product_detail
.
value
);
}
};
// 显示配置
interface
ButtonType
{
button_name
:
string
;
order_form_id
:
string
;
button_order_type
:
number
;
}
interface
QrCodeConfig
{
form_id
:
string
;
back_ground
:
File
|
null
;
show_customer_fields
:
string
[];
show_product_fields
:
string
[];
buttons
:
{
button_name
:
string
;
order_form_id
:
string
;
button_order_type
:
string
;
}[];
buttons
:
ButtonType
[];
[
k
:
string
]:
any
;
}
const
detail_config
=
ref
<
QrCodeConfig
>
({}
as
QrCodeConfig
);
...
...
@@ -147,7 +148,6 @@ const getDetailConfig = async () => {
const
msg
=
await
api
.
external
.
getQrCodeWindow
();
if
(
msg
.
code
==
0
)
{
detail_config
.
value
=
msg
.
data
;
console
.
log
(
"detail_config"
,
detail_config
.
value
);
}
};
const
getShowCusmtomerFields
=
(
id
:
string
)
=>
{
...
...
@@ -158,9 +158,19 @@ const getShowProductFields = (id: string) => {
};
// 创建
const
createFormData
=
(
button
:
any
)
=>
{
const
createFormData
=
(
button
:
ButtonType
)
=>
{
$createFormData
({
form_id
:
button
.
order_form_id
,
onConfirm
:
async
(
data
)
=>
{
const
msg
=
await
api
.
order
.
saveOrder
({
...
data
,
form_id
:
button
.
order_form_id
,
order_type
:
button
.
button_order_type
,
});
if
(
msg
.
code
==
0
)
{
$toast
({
type
:
"success"
,
message
:
"创建成功"
});
}
},
});
};
...
...
src/vite-env.d.ts
View file @
3d531691
...
...
@@ -5,3 +5,7 @@ declare module "*.vue" {
const
componentOptions
:
ComponentOptions
;
export
default
componentOptions
;
}
interface
Window
{
mitt
:
Emitter
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment