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
f880d1ae
Commit
f880d1ae
authored
Mar 26, 2025
by
tanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变量菜单新增,过滤菜单
parent
bd0482e6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
211 additions
and
11 deletions
+211
-11
var.ts
src/api/var.ts
+8
-0
index.ts
src/router/index.ts
+11
-1
OrderList.vue
src/views/order/orderList/OrderList.vue
+4
-3
OrderTempList.vue
src/views/order/orderList/OrderTempList.vue
+3
-3
FileList.vue
src/views/var/file/FileList.vue
+2
-2
VarChange.vue
src/views/var/varChange/VarChange.vue
+2
-2
FileList.vue
src/views/var/varOrderFile/FileList.vue
+179
-0
Variables.vue
src/views/var/variables/Variables.vue
+2
-0
No files found.
src/api/var.ts
View file @
f880d1ae
...
...
@@ -5,6 +5,14 @@ const formHeader = {
}
/**获取订单变量文件 */
export
const
getVarOrderFilePage
=
(
params
:
any
)
=>
{
return
axios
.
get
(
'/api/orderVar/pageVarOrderFile'
,
{
params
,
headers
:
formHeader
})
}
/**获取变量文件 */
export
const
getVarFilePage
=
(
params
:
any
)
=>
{
return
axios
.
get
(
'/api/varFile/page'
,
{
...
...
src/router/index.ts
View file @
f880d1ae
...
...
@@ -102,9 +102,19 @@ export const routes = [
name
:
'VariablesFile'
,
component
:
()
=>
import
(
'@/views/var/file/FileList.vue'
),
meta
:
{
title
:
'变量
文件
'
title
:
'变量
模板
'
}
},
{
path
:
'/variables/varOrderFile'
,
name
:
'VariablesVarOrderFile'
,
component
:
()
=>
import
(
'@/views/var/varOrderFile/FileList.vue'
),
meta
:
{
title
:
'订单变量文件'
}
},
{
path
:
'/variables/list'
,
name
:
'VariablesList'
,
...
...
src/views/order/orderList/OrderList.vue
View file @
f880d1ae
...
...
@@ -93,6 +93,8 @@
</vxe-column>
<vxe-column
field=
"createBy_dictText"
title=
"创建人"
width=
"180"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
width=
"180"
></vxe-column>
<vxe-column
field=
"updateTime"
title=
"修改时间"
width=
"180"
></vxe-column>
<vxe-column
field=
"action"
title=
"操作"
width=
"80"
fixed=
"right"
>
<
template
#
default=
"{ row }"
>
<el-link
...
...
@@ -146,9 +148,8 @@ const formState = reactive({
createTime
:
null
,
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
column
:
'createTime'
,
order
:
'desc'
total
:
0
})
const
visibleModal
=
ref
(
false
)
const
visibleUserModal
=
ref
(
false
)
...
...
src/views/order/orderList/OrderTempList.vue
View file @
f880d1ae
...
...
@@ -89,6 +89,8 @@
</vxe-column>
<vxe-column
field=
"createBy_dictText"
title=
"创建人"
width=
"180"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
width=
"180"
></vxe-column>
<vxe-column
field=
"updateTime"
title=
"修改时间"
width=
"180"
></vxe-column>
<vxe-column
field=
"action"
title=
"操作"
width=
"80"
fixed=
"right"
>
<
template
#
default=
"{ row }"
>
<el-link
...
...
@@ -142,9 +144,7 @@ const formState = reactive({
createTime
:
null
,
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
column
:
'createTime'
,
order
:
'desc'
total
:
0
})
const
visibleModal
=
ref
(
false
)
...
...
src/views/var/file/FileList.vue
View file @
f880d1ae
...
...
@@ -2,7 +2,7 @@
<div
class=
"w-full h-full bg-white p-4"
>
<p
class=
"font-bold text-lg leading-10 border-b-2"
>
变量文件管理
</p>
<el-form
class=
"pt-4"
:inline=
"true"
:model=
"formState"
>
<el-form-item
label=
"
变量
文件ID"
>
<el-form-item
label=
"
模板
文件ID"
>
<el-input
v-model=
"formState.varFileId"
placeholder=
""
clearable
/>
</el-form-item>
...
...
@@ -52,7 +52,7 @@
<vxe-column
type=
"checkbox"
width=
"50"
></vxe-column>
<vxe-column
field=
"customerId_dictText"
title=
"客户名称"
width=
"120"
></vxe-column>
<vxe-column
field=
"productCode"
title=
"产品编码"
width=
"120"
></vxe-column>
<vxe-column
field=
"varFileId"
title=
"
变量
文件ID"
width=
"180"
>
<vxe-column
field=
"varFileId"
title=
"
模板
文件ID"
width=
"180"
>
<
template
#
default=
"{ row }"
>
<el-link
target=
"_blank"
...
...
src/views/var/varChange/VarChange.vue
View file @
f880d1ae
...
...
@@ -23,7 +23,7 @@
</template>
</el-input>
</el-form-item> -->
<el-form-item
label=
"
订单
状态"
>
<el-form-item
label=
"
文件
状态"
>
<el-select
v-model=
"queryParams.status"
placeholder=
""
clearable
>
<
template
v-for=
"item in statusOptions"
>
<el-option
:value=
"item.value"
:label=
"item.label"
></el-option>
...
...
@@ -57,7 +57,7 @@
</vxe-column>
<vxe-column
field=
"customerId_dictText"
title=
"客户"
width=
"300"
></vxe-column>
<vxe-column
field=
"productCode"
title=
"产品编码"
width=
"300"
></vxe-column>
<vxe-column
field=
"status_dictText"
title=
"
订单
状态"
width=
"120"
></vxe-column>
<vxe-column
field=
"status_dictText"
title=
"
文件
状态"
width=
"120"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
width=
"160"
></vxe-column>
<vxe-column
field=
"action"
title=
"操作"
width=
"200"
>
<
template
#
default=
"{ row }"
>
...
...
src/views/var/varOrderFile/FileList.vue
0 → 100644
View file @
f880d1ae
<
template
>
<div
class=
"w-full h-full bg-white p-4"
>
<p
class=
"font-bold text-lg leading-10 border-b-2"
>
订单变量文件
</p>
<el-form
class=
"pt-4"
:inline=
"true"
:model=
"formState"
>
<el-form-item
label=
"产品编码"
>
<el-input
v-model=
"formState.productCode"
placeholder=
"产品编码"
></el-input>
</el-form-item>
<el-form-item
label=
"客户名称"
>
<el-input
v-model=
"formState.customerName"
placeholder=
"客户名称"
></el-input>
</el-form-item>
<el-form-item
label=
"订单编码"
>
<el-input
v-model=
"formState.orderCode"
placeholder=
"订单编码"
></el-input>
</el-form-item>
<el-form-item
label=
"订单项次"
>
<el-input
v-model=
"formState.orderItemNo"
placeholder=
"订单项次"
></el-input>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-select
v-model=
"formState.orderFileStatus"
placeholder=
""
clearable
>
<template
v-for=
"item in statusOptions"
>
<el-option
:value=
"item.value"
:label=
"item.label"
></el-option>
</
template
>
</el-select>
</el-form-item>
<!--
<el-form-item label="创建人">
<el-input v-model="formState.createby_dict" placeholder="">
<template #append>
<el-button :icon="MoreFilled" @click="visibleUserModal = true"></el-button>
</template>
</el-input>
</el-form-item> -->
<el-form-item>
<el-button
type=
"default"
@
click=
"onReset"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"onQuery"
>
查询
</el-button>
</el-form-item>
</el-form>
<div
class=
""
>
<vxe-table
ref=
"xTable"
size=
"small"
min-height=
"460"
border
:loading=
"loading"
:data=
"tableData"
>
<vxe-column
type=
"checkbox"
width=
"50"
></vxe-column>
<vxe-column
field=
"customerName"
title=
"客户名称"
width=
"180"
></vxe-column>
<vxe-column
field=
"productCode"
title=
"产品编码"
width=
"120"
></vxe-column>
<vxe-column
field=
"orderNo"
title=
"订单编码"
width=
"120"
></vxe-column>
<vxe-column
field=
"rowNo"
title=
"订单项次"
width=
"100"
></vxe-column>
<vxe-column
field=
"orderVarFileId"
title=
"订单变量文件ID"
width=
"180"
>
<
template
#
default=
"{ row }"
>
<el-link
target=
"_blank"
:href=
"'/preview-excel?filePath=' + row.mergeFilePath + '&type=var'"
>
{{
row
.
orderVarFileId
}}
</el-link>
</
template
>
</vxe-column>
<vxe-column
title=
"模板文件ID"
min-width=
"180"
>
<
template
#
default=
"{ row }"
>
<el-link
target=
"_blank"
:href=
"'/preview-excel?fileId=' + row.varFileId + '&type=var'"
>
{{
row
.
templateFileId
}}
</el-link
>
</
template
>
</vxe-column>
<vxe-column
field=
"orderFileStatus_dictText"
title=
"订单状态"
width=
"120"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
width=
"180"
></vxe-column>
<vxe-column
field=
"action"
title=
"操作"
width=
"80"
fixed=
"right"
>
<
template
#
default=
"{ row }"
>
<el-link
type=
"primary"
style=
"font-size: 12px"
:href=
"'/var-excel?fileId=' + row.varFileId"
target=
"_blank"
>
查看
</el-link
>
</
template
>
</vxe-column>
</vxe-table>
<vxe-pager
size=
"small"
background
v-model:current-page=
"formState.currentPage"
v-model:page-size=
"formState.pageSize"
:total=
"formState.total"
@
page-change=
"onQuery"
:layouts=
"['PrevPage', 'JumpNumber', 'NextPage', 'Sizes', 'FullJump', 'Total']"
>
</vxe-pager>
</div>
<UserModal
v-model:visible=
"visibleUserModal"
@
confirm=
"confirmUser"
/>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
reactive
,
ref
}
from
'vue'
import
{
getVarOrderFilePage
}
from
'@/api/var'
import
{
ElMessage
}
from
'element-plus'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
apiDictList
}
from
'@/api/common'
import
{
useRouter
}
from
'vue-router'
import
{
queryParamsFilter
}
from
'@/utils/query'
import
{
MoreFilled
}
from
'@element-plus/icons-vue'
import
UserModal
from
'@/components/UserModal/UserModal.vue'
const
router
=
useRouter
()
const
loading
=
ref
(
false
)
const
formState
=
reactive
({
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
productCode
:
''
,
customerName
:
''
,
orderCode
:
''
,
createBy
:
''
,
createby_dict
:
''
,
orderItemNo
:
''
,
orderFileStatus
:
''
// column: 'createTime',
// order: 'desc'
})
const
visibleUserModal
=
ref
(
false
)
const
visibleModal
=
ref
(
false
)
const
xTable
=
ref
<
VxeTableInstance
>
()
const
statusOptions
=
ref
([])
const
queryDict
=
async
(
code
:
string
)
=>
{
const
{
data
}
=
await
apiDictList
({
dictCodes
:
code
})
statusOptions
.
value
=
data
.
result
[
code
]
}
const
tableData
=
ref
([])
const
onReset
=
()
=>
{
Object
.
assign
(
formState
,
{
productCode
:
''
,
customerName
:
''
,
orderCode
:
''
,
createBy
:
''
,
createby_dict
:
''
,
orderItemNo
:
''
,
orderFileStatus
:
''
})
}
const
confirmUser
=
(
list
:
any
)
=>
{
const
[
user
]
=
list
if
(
user
)
{
formState
.
createBy
=
user
.
userId
formState
.
createby_dict
=
user
.
nickName
}
}
const
onQuery
=
async
()
=>
{
loading
.
value
=
true
try
{
const
{
data
}
=
await
getVarOrderFilePage
(
queryParamsFilter
(
formState
))
tableData
.
value
=
data
.
result
.
records
formState
.
total
=
+
data
.
result
.
total
}
catch
{}
loading
.
value
=
false
}
onMounted
(()
=>
{
onQuery
()
queryDict
(
'order_file_status'
)
})
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/var/variables/Variables.vue
View file @
f880d1ae
...
...
@@ -47,6 +47,8 @@
<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-column
field=
"varOrderFileId"
title=
"订单变量文件ID"
width=
"180"
></vxe-column>
<vxe-column
title=
"解析"
width=
"100"
>
<
template
#
default=
"{ row }"
>
<el-button
v-if=
"!!row.varOrderFileId"
type=
"text"
size=
"small"
@
click=
"toRun(row)"
...
...
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