Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
Details
Activity
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
何远江
topsun-baoshen-excel
Commits
91dea31e
Commit
91dea31e
authored
Apr 30, 2025
by
tanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
58a5b124
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
4 deletions
+136
-4
Variables.vue
src/views/var/variables/Variables.vue
+17
-4
ChooseOrderItem.vue
src/views/var/variables/components/ChooseOrderItem.vue
+119
-0
No files found.
src/views/var/variables/Variables.vue
View file @
91dea31e
...
...
@@ -36,7 +36,6 @@
:loading=
"loading"
:data=
"tableData"
>
<vxe-column
type=
"expand"
title=
"尺码"
width=
"120"
>
<template
#
default=
"
{row}">
{{
row
.
sizeListDto
!==
null
?
'尺码信息'
:
'无尺码'
}}
...
...
@@ -70,7 +69,7 @@
<vxe-colgroup
title=
"全码对照"
v-if=
"row.sizeListDto.referTitles.length>0"
>
<vxe-column
v-for=
"(title) in row.sizeListDto.referTitles"
:title=
"title"
>
<
template
#
default=
"{ row }"
>
{{
row
.
sizeRefer
[
title
]
}}
{{
row
.
sizeRefer
==
null
?
null
:
row
.
sizeRefer
[
title
]
}}
</
template
>
</vxe-column>
</vxe-colgroup>
...
...
@@ -144,7 +143,7 @@
<vxe-modal
v-model=
"importVisible"
title=
"导入"
width=
"
5
00px"
width=
"
9
00px"
show-footer
@
hide=
"imporModalHide"
:z-index=
"1000"
...
...
@@ -156,7 +155,7 @@
<el-form-item
label=
"产品名称"
prop=
"productName"
>
<el-input
v-model=
"importForm.productName"
type=
"textarea"
disabled
/>
</el-form-item>
<el-form-item
label=
"文件"
prop=
"filePath"
>
<el-form-item
label=
"
选择
文件"
prop=
"filePath"
>
<el-upload
action=
""
ref=
"upload"
...
...
@@ -173,7 +172,14 @@
</
template
>
</el-upload>
</el-form-item>
<!-- <el-form-item label="订单项次" prop="orderItems">
<el-button @click="chooseOrderItemVisible =true">选择项次</el-button>
<el-input v-model="importForm.orderItems" type="textarea" disabled />
</el-form-item> -->
</el-form>
<
template
#
footer
>
<el-button
@
click=
"importVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitImport"
>
执行解析
</el-button>
...
...
@@ -181,6 +187,8 @@
</vxe-modal>
<TemplateVariable
v-model:visible=
"tempVisible"
v-bind=
"detailVariable"
@
download=
"download"
/>
<!-- <ChooseOrderItem v-model:visible="chooseOrderItemVisible" /> -->
<CheckOrder
ref=
"checkOrderRef"
/>
</div>
</template>
...
...
@@ -197,6 +205,8 @@ import {
}
from
'@/api/var'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
TemplateVariable
from
'./components/TemplateVariable.vue'
import
ChooseOrderItem
from
'./components/ChooseOrderItem.vue'
import
{
filterVarData
}
from
'@/utils/excel'
import
{
uploadFile
}
from
'@/api/excel'
import
{
ElLoading
,
ElMessage
}
from
'element-plus'
...
...
@@ -226,6 +236,7 @@ const xTable = ref<VxeTableInstance>()
const
tableData
=
ref
([])
const
tempVisible
=
ref
(
false
)
const
chooseOrderItemVisible
=
ref
(
false
)
const
detailVariable
=
ref
({
title
:
'变量文件解析'
,
titles
:
[],
...
...
@@ -256,6 +267,7 @@ const importForm = ref({
productCode
:
''
,
customerId
:
''
,
orderItemId
:
''
,
orderItems
:[],
filePaths
:
[]
})
const
handleImportVar
=
async
(
row
)
=>
{
...
...
@@ -273,6 +285,7 @@ const imporModalHide = () => {
importForm
.
value
.
customerId
=
''
importForm
.
value
.
productCode
=
''
importForm
.
value
.
orderItemId
=
''
importForm
.
value
.
orderItems
=
[]
importForm
.
value
.
filePaths
=
[]
}
const
handleRemove
=
(
file
)
=>
{
...
...
src/views/var/variables/components/ChooseOrderItem.vue
0 → 100644
View file @
91dea31e
<
template
>
<vxe-modal
v-model=
"showEdit"
:z-index=
"1006"
@
hide=
"onHide"
title=
"选择订单项次"
width=
"800"
esc-closable
mask-closable
show-footer
>
<vxe-table
ref=
"xTable"
size=
"small"
min-height=
"460"
border
:loading=
"loading"
:data=
"tableData"
>
<vxe-column
type=
"expand"
title=
"尺码"
width=
"120"
>
<template
#
default=
"
{row}">
{{
row
.
sizeListDto
!==
null
?
'尺码信息'
:
'无尺码'
}}
</
template
>
<
template
#
content=
"{ row }"
>
<div
style=
"width: 1024px"
v-if=
"row.sizeListDto!=null"
>
<el-row>
<el-col
:span=
"24"
>
<el-table
:data=
"[
{}]" size="small"
border
style="width: 100%">
<el-table-column
v-for=
"(value,key) in row.sizeListDto.referNameJson"
:prop=
"key"
:label=
"key"
>
<template
#
default=
"
{ row }">
{{
value
}}
</
template
>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<vxe-table
:data=
"row.sizeListDto.sizeList"
size=
"mini"
max-height=
"300px"
align=
"center"
>
<vxe-column
field=
"size"
title=
"尺码"
width=
"100"
></vxe-column>
<vxe-column
field=
"num"
title=
"尺码数量"
width=
"100"
></vxe-column>
<vxe-colgroup
title=
"全码对照"
v-if=
"row.sizeListDto.referTitles.length>0"
>
<vxe-column
v-for=
"(title) in row.sizeListDto.referTitles"
:title=
"title"
>
<
template
#
default=
"{ row }"
>
{{
row
.
sizeRefer
[
title
]
}}
</
template
>
</vxe-column>
</vxe-colgroup>
</vxe-table>
</el-col>
</el-row>
</div>
</template>
</vxe-column>
<vxe-column
field=
"orderNo"
title=
"订单编码"
width=
"120"
></vxe-column>
<vxe-column
field=
"rowNo"
title=
"项次行"
width=
"120"
></vxe-column>
<vxe-column
field=
"brandName"
title=
"品牌名称"
width=
"180"
></vxe-column>
<vxe-column
field=
"customerName"
title=
"客户名称"
width=
"240"
></vxe-column>
<vxe-column
field=
"clientCmd"
title=
"客户指令号"
width=
"240"
></vxe-column>
<vxe-column
field=
"productType"
title=
"产品类型"
width=
"120"
></vxe-column>
<vxe-column
field=
"productCode"
title=
"产品编码"
width=
"120"
></vxe-column>
<vxe-column
field=
"productName"
title=
"产品名称"
width=
"240"
></vxe-column>
</vxe-table>
<
template
#
footer
>
<el-button
type=
"primary"
@
click=
"showEdit = false"
>
关闭
</el-button>
</
template
>
</vxe-modal>
</template>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
reactive
,
ref
}
from
'vue'
import
{
apiOrderVarPage
,
}
from
'@/api/var'
const
showEdit
=
ref
(
false
)
const
errors
=
ref
([])
const
loading
=
ref
(
false
)
const
tableData
=
ref
([])
const
onHide
=
()
=>
{
errors
.
value
=
[]
}
const
openModal
=
(
errs
)
=>
{
showEdit
.
value
=
true
errors
.
value
=
errs
||
[]
}
const
onQuery
=
async
()
=>
{
loading
.
value
=
true
try
{
const
query
=
{}
const
{
data
}
=
await
apiOrderVarPage
(
query
)
tableData
.
value
=
data
.
result
.
records
}
catch
{}
loading
.
value
=
false
}
defineExpose
({
openModal
})
onMounted
(()
=>
{
onQuery
()
})
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
\ No newline at end of file
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