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
0310130a
Commit
0310130a
authored
Sep 02, 2024
by
zhanglongbao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
3d531691
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
10 deletions
+144
-10
index.vue
src/components/create_form_data/index.vue
+9
-7
index.vue
src/components/widget/index.vue
+0
-2
index.ts
src/router/index.ts
+7
-0
index.vue
src/view/code_product_detail/index.vue
+15
-1
index.vue
src/view/product_history_work_order/index.vue
+113
-0
No files found.
src/components/create_form_data/index.vue
View file @
0310130a
...
...
@@ -8,7 +8,7 @@
<div
class=
"formContent"
>
<formContentComp
:form_detail=
"form_detail"
v-model
=
"data"
:modelValue
=
"data"
@
editData=
"editData"
/>
<div
class=
"bottom bottom_button"
>
...
...
@@ -48,11 +48,13 @@ const close = () => {
};
// 表单数据
const
data
=
ref
<
object
>
({});
const
edit
=
ref
<
object
>
({});
const
editData
=
(
data
:
object
)
=>
{
edit
.
value
=
{
...
edit
.
value
,
...
data
};
console
.
log
(
"edit"
,
edit
.
value
);
const
data
=
ref
<
any
>
({});
const
edit
=
ref
<
any
>
({});
const
editData
=
(
edit_data
:
any
)
=>
{
edit
.
value
=
{
...
edit
.
value
,
...
edit_data
};
for
(
const
key
in
edit_data
)
{
data
.
value
[
key
]
=
edit_data
[
key
];
}
};
// 表单信息
...
...
@@ -71,7 +73,7 @@ const init = () => {
getFormDetail
();
if
(
props
.
data
)
{
data
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
data
));
data
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
data
||
{}
));
}
};
init
();
...
...
src/components/widget/index.vue
View file @
0310130a
...
...
@@ -30,12 +30,10 @@ const emit = defineEmits([
"sortFormItem"
,
"selectFormField"
,
"removeFormField"
,
"update:modelValue"
,
"editData"
,
]);
const
edit
=
(
editData
:
object
)
=>
{
emit
(
"update:modelValue"
,
{
...
props
.
modelValue
,
...
editData
});
emit
(
"editData"
,
editData
);
};
...
...
src/router/index.ts
View file @
0310130a
...
...
@@ -11,10 +11,17 @@ const routers: RouteRecordRaw[] = [
component
:
()
=>
import
(
"@/view/home/index.vue"
),
},
{
// 产品扫码详情
path
:
"/code_product_detail"
,
name
:
"code_product_detail"
,
component
:
()
=>
import
(
"@/view/code_product_detail/index.vue"
),
},
{
// 产品历史工单
path
:
"/product_history_work_order"
,
name
:
"product_history_work_order"
,
component
:
()
=>
import
(
"@/view/product_history_work_order/index.vue"
),
},
];
const
router
=
createRouter
({
...
...
src/view/code_product_detail/index.vue
View file @
0310130a
...
...
@@ -8,7 +8,8 @@
<div
class=
"order"
v-if=
"product_detail.have_dealing_order"
:style=
"
{ background: hexToRgba('#f5a034', 0.15) }">
:style=
"
{ background: hexToRgba('#f5a034', 0.15) }"
@click="toOrderList">
<i
class=
"icon-131"
></i>
<span>
当前产品已有
{{
...
...
@@ -115,6 +116,9 @@ import api from "@/api";
import
{
File
,
hexToRgba
}
from
"@/utils/public"
;
import
{
$createFormData
}
from
"@/components/create_form_data/index"
;
import
{
$toast
}
from
"@/components/toast/index"
;
import
{
useRouter
}
from
"vue-router"
;
const
router
=
useRouter
();
// 产品详情
const
product_detail
=
ref
<
{
...
...
@@ -157,6 +161,16 @@ const getShowProductFields = (id: string) => {
return
(
detail_config
.
value
.
show_product_fields
||
[]).
includes
(
id
);
};
// 工单列表
const
toOrderList
=
()
=>
{
router
.
push
({
path
:
"/product_history_work_order"
,
query
:
{
product_id
:
product_detail
.
value
.
product_info
.
id
,
},
});
};
// 创建
const
createFormData
=
(
button
:
ButtonType
)
=>
{
$createFormData
({
...
...
src/view/product_history_work_order/index.vue
0 → 100644
View file @
0310130a
<
template
>
<div
class=
"product_history_work_order"
>
<div
class=
"header"
>
<div>
历史工单记录
<span>
{{
count
}}
</span>
</div>
</div>
<div
class=
"list"
>
<div
class=
"order"
v-for=
"it in list"
>
<span
class=
"title"
>
{{
it
.
order_title
}}
</span>
<div>
<span
class=
"label"
>
工单标签
</span>
<span
style=
"color: var(--blue)"
>
{{
it
.
order_number
}}
</span>
</div>
<div>
<span
class=
"label"
>
负责人
</span>
<span>
<nameComp
:name=
"it.fuze_user.nickname"
/>
</span>
</div>
<div>
<span
class=
"label"
>
派单时间
</span>
<span>
{{
it
.
create_time
}}
</span>
</div>
</div>
</div>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
computed
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
api
from
"@/api"
;
import
{
useDataList
}
from
"@/utils/hook"
;
const
route
=
useRoute
();
// 数据列表
const
params
=
computed
(()
=>
({
api
:
api
.
order
.
listOrder
,
params
:
{
product_id
:
[
route
.
query
.
product_id
],
},
}));
const
{
list
,
count
,
getList
}
=
useDataList
(
params
);
getList
();
</
script
>
<
style
lang=
"less"
scoped
>
.product_history_work_order {
width: 100vw;
height: 100vh;
overflow: hidden;
background-color: var(--bg_gray);
display: flex;
flex-direction: column;
.header {
display: flex;
align-items: center;
height: 50px;
flex-shrink: 0;
background-color: white;
padding: 0 12px;
box-sizing: border-box;
div {
font-weight: bold;
}
}
.list {
display: flex;
flex-direction: column;
flex: 1;
overflow: auto;
padding: 12px;
box-sizing: border-box;
.order {
display: flex;
flex-direction: column;
background-color: white;
margin-bottom: 10px;
box-sizing: border-box;
padding: 14px;
border-radius: 6px;
.title {
font-size: 16px;
font-weight: 500;
}
> div {
display: flex;
align-items: center;
margin-top: 10px;
font-size: 14px;
.label {
width: 80px;
flex-shrink: 0;
color: var(--gray);
}
}
}
}
}
</
style
>
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