Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
e25c40bf
Commit
e25c40bf
authored
Jun 20, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券-金额满减
parent
69ddd604
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1292 additions
and
23 deletions
+1292
-23
coupon.js
src/api/ecw/coupon.js
+54
-0
customer.js
src/api/ecw/customer.js
+9
-0
index.vue
src/components/CustomersSelector/index.vue
+108
-0
index.vue
src/components/DictSelector/index.vue
+42
-15
index.vue
src/components/ProductsSelector/index.vue
+142
-0
index.vue
src/components/RoutersSelector/index.vue
+0
-0
index.vue
src/components/Selector/index.vue
+66
-0
dict.js
src/utils/dict.js
+14
-0
edit.vue
src/views/ecw/coupon/edit.vue
+434
-0
index.vue
src/views/ecw/coupon/index.vue
+386
-0
edit.vue
src/views/ecw/productPrice/edit.vue
+3
-3
index.vue
src/views/ecw/supplier/index.vue
+3
-3
index.vue
src/views/infra/codegen/index.vue
+31
-2
No files found.
src/api/ecw/coupon.js
0 → 100644
View file @
e25c40bf
import
request
from
'
@/utils/request
'
// 创建优惠券信息
export
function
createCoupon
(
data
)
{
return
request
({
url
:
'
/ecw/coupon/createOrUpdate
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新优惠券信息
export
function
updateCoupon
(
data
)
{
return
request
({
url
:
'
/ecw/coupon/createOrUpdate
'
,
method
:
'
post
'
,
data
:
data
})
}
// 删除优惠券信息
export
function
deleteCoupon
(
id
)
{
return
request
({
url
:
'
/ecw/coupon/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得优惠券信息
export
function
getCoupon
(
id
)
{
return
request
({
url
:
'
/ecw/coupon/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得优惠券信息分页
export
function
getCouponPage
(
query
)
{
return
request
({
url
:
'
/ecw/coupon/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出优惠券信息 Excel
export
function
exportCouponExcel
(
query
)
{
return
request
({
url
:
'
/ecw/coupon/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/api/ecw/customer.js
View file @
e25c40bf
...
...
@@ -43,6 +43,15 @@ export function getCustomerPage(query) {
})
}
// 获得客户下来
export
function
getCustomerSelect
(
query
)
{
return
request
({
url
:
'
/ecw/customer/select
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出客户 Excel
export
function
exportCustomerExcel
(
query
)
{
return
request
({
...
...
src/components/CustomersSelector/index.vue
0 → 100644
View file @
e25c40bf
<
template
>
<el-row
class=
""
:gutter=
"10"
>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱"
style=
"width:200px"
/>
<dict-selector
:type=
"DICT_TYPE.USER_TYPE"
v-model=
"queryParams.customerType"
style=
"width:100px"
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜搜1
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
<el-link
class=
"el-icon-plus"
@
click=
"choose(item)"
:disabled=
"customerIds.indexOf(item.id) > -1"
/>
{{
item
.
name
}}
(
{{
item
.
defaultContactName
}}
)
</div>
</div>
</el-card>
</el-col>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选客户
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in choosedList"
:key=
"item.id"
>
<el-link
class=
"el-icon-delete"
@
click=
"remove(item)"
/>
{{
item
.
name
}}
(
{{
item
.
defaultContactName
}}
)
</div>
</div>
</el-card>
</el-col>
</el-row>
</
template
>
<
script
>
import
{
getCustomerSelect
}
from
'
@/api/ecw/customer
'
export
default
{
data
(){
return
{
list
:[],
/* page: 1,
pages: 1, */
queryParams
:{
page
:
1
,
name
:
null
,
level
:
null
},
choosedList
:[]
}
},
computed
:{
customerIds
(){
let
arr
=
[]
this
.
choosedList
.
forEach
(
item
=>
{
arr
.
push
(
item
.
id
)
})
return
arr
}
},
watch
:{
customerIds
(
val
){
this
.
$emit
(
'
input
'
,
val
)
}
},
created
(){
this
.
reLoad
()
},
methods
:{
reLoad
(){
this
.
queryParams
.
page
=
1
this
.
list
=
[]
this
.
getList
()
},
loadNextPage
(){
if
(
this
.
page
>=
this
.
pages
){
return
this
.
$message
.
error
(
'
已加载全部
'
)
}
this
.
queryParams
.
page
++
this
.
getList
()
},
getList
(){
getCustomerSelect
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
res
.
data
})
},
choose
(
customer
){
this
.
choosedList
.
push
(
customer
)
},
remove
(
customer
){
this
.
choosedList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
id
==
customer
.
id
)
this
.
choosedList
.
splice
(
index
,
1
)
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.header
{
>
div
{
margin-right
:
5px
;
}
}
.list
{
height
:
200px
;
border
:
1px
solid
#ccc
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding
:
0
10px
;
}
</
style
>
\ No newline at end of file
src/components/DictSelector/index.vue
View file @
e25c40bf
<
template
>
<el-select
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
>
<el-option
v-for=
"dict in getList(type)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
>
<el-option
v-for=
"dict in dictList"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
>
<el-radio
v-for=
"dict in dictList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
>
<el-checkbox
v-for=
"dict in dictList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-checkbox>
</el-checkbox-group>
</div>
</
template
>
<
script
>
const
selfDefinedDict
=
{
_yesno
:
[
{
label
:
'
是
'
,
value
:
'
1
'
},
{
label
:
'
否
'
,
value
:
'
0
'
}
]
}
export
default
{
props
:{
placeholder
:
{
...
...
@@ -20,14 +22,24 @@ export default {
type
:
String
,
value
:
[
String
,
Number
,
Array
],
multiple
:
Boolean
,
formType
:{
type
:
String
,
default
:
'
select
'
},
forceString
:
{
type
:
Boolean
,
default
:
true
}
},
defaultable
:
Boolean
,
// 是否默认选择第一个
},
data
(){
return
{
valueSync
:
null
valueSync
:
this
.
multiple
?
[]
:
null
}
},
computed
:{
dictList
(){
return
this
.
getList
(
this
.
type
)
}
},
watch
:{
...
...
@@ -36,21 +48,36 @@ export default {
},
value
(
val
){
this
.
setValueSync
()
},
dictList
(){
this
.
setDefault
()
}
},
created
(){
this
.
setValueSync
()
this
.
setDefault
()
},
methods
:{
setValueSync
(){
if
(
!
this
.
value
||
this
.
value
==
''
)
return
if
(
this
.
forceString
&&
this
.
multiple
){
this
.
valueSync
=
val
.
split
(
'
,
'
)
this
.
valueSync
=
this
.
value
.
split
(
'
,
'
)
}
else
this
.
valueSync
=
this
.
forceString
?
String
(
this
.
value
)
:
this
.
value
},
getList
(){
return
selfDefinedDict
[
this
.
type
]
||
this
.
getDictDatas
(
this
.
type
)
return
this
.
getDictDatas
(
this
.
type
)
},
setDefault
(){
if
(
!
this
.
defaultable
)
return
if
(
this
.
dictList
.
length
&&
(
this
.
valueSync
===
null
||
this
.
valueSync
==
''
)){
this
.
valueSync
=
this
.
dictList
[
0
].
value
}
}
}
}
</
script
>
\ No newline at end of file
</
script
>
<
style
scoped
>
.dict-selector
{
display
:
inline-block
;
}
</
style
>
\ No newline at end of file
src/components/ProductsSelector/index.vue
0 → 100644
View file @
e25c40bf
<
template
>
<el-row
class=
""
:gutter=
"10"
>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择类型"
style=
"width:120px"
clearable
>
<el-option
v-for=
"item in typeList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择属性"
style=
"width:120px"
clearable
>
<el-option
v-for=
"item in attrList"
:key=
"item.id"
:label=
"item.attrName"
:value=
"item.id"
/>
</el-select>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"产品关键字"
style=
"width:120px"
clearable
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜搜
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
<el-checkbox
@
change=
"toggleCheck(item, $event)"
:value=
"ids.indexOf(item.id) > -1"
/>
{{
item
.
titleZh
}}
<div>
{{
item
.
titleEn
}}
</div>
</div>
</div>
</el-card>
</el-col>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选产品
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"(choosed) in choosedList"
:key=
"choosed.id"
:data-data=
"JSON.stringify(choosed)"
>
<el-link
class=
"el-icon-delete"
@
click=
"remove(choosed)"
/>
{{
choosed
.
titleZh
}}
<div>
{{
choosed
.
titleEn
}}
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</
template
>
<
script
>
import
{
getProductPage
}
from
'
@/api/ecw/product
'
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
export
default
{
data
(){
return
{
list
:[],
page
:
1
,
pages
:
1
,
queryParams
:{
page
:
1
,
attrId
:
null
,
titleZh
:
null
,
typeId
:
null
},
choosedList
:[],
typeList
:[],
attrList
:[]
}
},
computed
:{
ids
(){
let
arr
=
[]
this
.
choosedList
.
forEach
(
item
=>
{
arr
.
push
(
item
.
id
)
})
return
arr
}
},
watch
:{
ids
(
val
){
this
.
$emit
(
'
input
'
,
val
)
}
},
created
(){
getProductTypeList
().
then
(
res
=>
this
.
typeList
=
res
.
data
)
getProductAttrList
().
then
(
res
=>
this
.
attrList
=
res
.
data
)
this
.
reLoad
()
},
methods
:{
reLoad
(){
this
.
queryParams
.
page
=
1
this
.
list
=
[]
this
.
getList
()
},
loadNextPage
(){
if
(
this
.
page
>=
this
.
pages
){
return
this
.
$message
.
error
(
'
已加载全部
'
)
}
this
.
queryParams
.
page
++
this
.
getList
()
},
getList
(){
getProductPage
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
res
.
data
.
list
//.concat(res.data.list || [])
this
.
page
=
res
.
data
.
page
this
.
pages
=
res
.
data
.
pages
})
},
toggleCheck
(
item
,
checked
){
if
(
checked
){
this
.
choose
(
item
)
}
else
{
this
.
remove
(
item
)
}
},
choose
(
item
){
this
.
choosedList
.
push
(
item
)
},
remove
(
item
){
this
.
choosedList
.
forEach
((
choosed
,
index
)
=>
{
if
(
choosed
.
id
==
item
.
id
)
this
.
choosedList
.
splice
(
index
,
1
)
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.header
{
>
div
{
margin-right
:
5px
;
}
}
.list
{
height
:
200px
;
border
:
1px
solid
#ccc
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding
:
0
10px
;
display
:
flex
;
flex-wrap
:
wrap
;
.item
{
width
:
50%
;
line-height
:
20px
;
height
:
50px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
</
style
>
\ No newline at end of file
src/components/RouterSelector/index.vue
→
src/components/Router
s
Selector/index.vue
View file @
e25c40bf
File moved
src/components/Selector/index.vue
0 → 100644
View file @
e25c40bf
<
template
>
<el-select
v-model=
"valueSync"
:multiple=
"multiple"
>
<el-option
v-for=
"item in optionsFormated"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
<
script
>
export
default
{
data
(){
return
{
valueSync
:
null
}
},
props
:{
options
:
Array
,
value
:
[
String
,
Number
,
Boolean
,
Object
],
labelField
:
{
type
:
String
,
default
:
'
label
'
},
valueField
:
{
type
:
String
,
default
:
'
value
'
},
multiple
:
Boolean
,
clearable
:
Boolean
,
defaultable
:
Boolean
,
// 没有值的时候是否选择第一项
},
computed
:{
optionsFormated
(){
let
arr
=
[]
this
.
options
.
forEach
(
item
=>
{
arr
.
push
({
label
:
item
[
this
.
labelField
],
value
:
item
[
this
.
valueField
]
})
})
return
arr
}
},
watch
:{
valueSync
(
val
){
this
.
$emit
(
'
input
'
,
val
)
},
value
(
value
){
this
.
valueSync
=
value
},
optionsFormated
(){
this
.
setDefault
()
}
},
created
(){
this
.
valueSync
=
this
.
value
this
.
setDefault
()
},
methods
:{
setDefault
(){
if
(
!
this
.
defaultable
){
return
false
}
if
(
this
.
optionsFormated
.
length
&&
(
this
.
valueSync
==
null
||
this
.
valueSync
==
''
)){
this
.
valueSync
=
this
.
optionsFormated
[
0
].
value
}
}
}
}
</
script
>
\ No newline at end of file
src/utils/dict.js
View file @
e25c40bf
...
...
@@ -68,6 +68,20 @@ export const DICT_TYPE = {
ECW_PACKAGING_TYPE
:
'
packaging_type
'
,
//包装要求
ECW_CONTAINER_LOCATION
:
'
container_location
'
,
//默认货柜位置
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
:
'
special_req_for_line_products
'
,
// 特殊需求
ECW_COUPON_TYPE
:
'
coupon_type
'
,
// 优惠券类型
ECW_COUPON_STATUS
:
'
coupon_status
'
,
// 优惠券状态
ECW_COUPON_COST_TYPE
:
'
coupon_cost_type
'
,
// 优惠券费用类型
ECW_COUPON_OVERDUE_STATUS
:
'
coupon_overdue_status
'
,
// 优惠券状态
ECW_COUPON_PUTON_STATUS
:
'
coupon_puton_status
'
,
ECW_SUITABLE_USER_TYPE
:
'
suitable_user_type
'
,
// 适用用户类型
ECW_SUITABLE_LINE_TYPE
:
'
suitable_line_type
'
,
// 适用线路类型
ECW_SUITABLE_PROD_TYPE
:
'
suitable_prod_type
'
,
// 适用产品类型
ECW_ORDER_ATTR
:
'
order_attr
'
,
// 订单属性
ECW_YESNO
:
'
yesno
'
,
// 是否 1,0
ECW_COMPANY_TYPE
:
'
company_type
'
,
// 供应商类别
ECW_COOPERATION_TYPE
:
'
cooperation_type
'
,
// 合作类型
ECW_SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
// 出货报关方式(与订单报关方式相同)
ECW_CUSTOMS_TYPE
:
'
customs_type
'
,
// 订单报关方式(非出货报关),优惠券中的单证报关
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
...
src/views/ecw/coupon/edit.vue
0 → 100644
View file @
e25c40bf
This diff is collapsed.
Click to expand it.
src/views/ecw/coupon/index.vue
0 → 100644
View file @
e25c40bf
This diff is collapsed.
Click to expand it.
src/views/ecw/productPrice/edit.vue
View file @
e25c40bf
...
...
@@ -20,7 +20,7 @@
<el-form-item
label=
"路线"
v-if=
"form.warehouseLineDO"
>
<el-input
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, form.warehouseLineDO.transportType) + '】从【'+form.warehouseLineDO.startTitleZh+'】发往【'+form.warehouseLineDO.destTitleZh+'】'"
disabled
/>
</el-form-item>
<router-selector
v-if=
"!form.id"
v-model=
"selectedRoutes"
/>
<router
s
-selector
v-if=
"!form.id"
v-model=
"selectedRoutes"
/>
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
价格设置
...
...
@@ -155,7 +155,7 @@
</div>
</template>
<
script
>
import
Router
Selector
from
'
@/components/Router
Selector
'
import
Router
sSelector
from
'
@/components/Routers
Selector
'
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
getProduct
}
from
'
@/api/ecw/product
'
import
{
getProductType
,
getProductTypeList
}
from
'
@/api/ecw/productType
'
...
...
@@ -164,7 +164,7 @@ import { getUnitList } from '@/api/ecw/unit';
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
export
default
{
components
:
{
RouterSelector
,
ProductSelector
},
components
:
{
Router
s
Selector
,
ProductSelector
},
data
(){
return
{
selectedRoutes
:
[],
// 勾选的路线渠道
...
...
src/views/ecw/supplier/index.vue
View file @
e25c40bf
...
...
@@ -44,10 +44,10 @@
<el-option
v-for=
"dict in this.getDictDatas('company_type')"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select-->
<dict-selector
type=
"company_type
"
v-model=
"queryParams.companyType"
/>
<dict-selector
:type=
"DICT_TYPE.COMPANY_TYPE
"
v-model=
"queryParams.companyType"
/>
</el-form-item>
<el-form-item
label=
"合作类型"
prop=
"cooperationType"
>
<dict-selector
type=
"cooperation_type
"
v-model=
"queryParams.cooperationType"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_COOPERATION_TYPE
"
v-model=
"queryParams.cooperationType"
/>
<!--el-select v-model="queryParams.cooperationType" placeholder="请选择合作类型" clearable size="small">
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select-->
...
...
@@ -65,7 +65,7 @@
<!--
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择是否展示 默认为展示"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
-->
<dict-selector
type=
"_yesno
"
v-model=
"queryParams.status"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_YES_NO
"
v-model=
"queryParams.status"
/>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
...
...
src/views/infra/codegen/index.vue
View file @
e25c40bf
...
...
@@ -54,6 +54,7 @@
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['infra:codegen:delete']"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-refresh"
@
click=
"handleSynchDb(scope.row)"
v-hasPermi=
"['infra:codegen:update']"
>
同步
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleGenTable(scope.row)"
v-hasPermi=
"['infra:codegen:download']"
>
生成代码
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-download"
@
click=
"generateValidateCode(scope.row)"
>
生成验证配置
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -101,7 +102,7 @@
</template>
<
script
>
import
{
getCodegenTablePage
,
previewCodegen
,
downloadCodegen
,
deleteCodegen
,
import
{
getCodegenDetail
,
getCodegenTablePage
,
previewCodegen
,
downloadCodegen
,
deleteCodegen
,
syncCodegenFromDB
,
syncCodegenFromSQL
,
createCodegenListFromSQL
}
from
"
@/api/infra/codegen
"
;
import
importTable
from
"
./importTable
"
;
...
...
@@ -371,7 +372,35 @@ export default {
this
.
getList
();
});
});
}
},
generateValidateCode
(
row
){
let
l
=
this
.
$loading
()
getCodegenDetail
(
row
.
id
).
then
(
res
=>
{
let
rules
=
{}
res
.
data
.
columns
.
forEach
(
item
=>
{
let
rule
=
{
trigger
:
'
blur
'
}
if
(
!
item
.
nullable
){
rule
.
required
=
true
rule
.
message
=
'
不能为空
'
}
if
([
'
int
'
,
'
tinyint
'
,
'
bigint
'
].
indexOf
(
item
.
columnType
)){
rule
.
type
=
'
integer
'
}
if
(
item
.
columnType
.
indexOf
(
'
decimal
'
)
===
0
){
rule
.
type
=
'
decimal
'
}
if
(
item
.
columnType
==
'
datetime
'
){
rule
.
type
=
'
date
'
}
rules
[
item
.
javaField
]
=
[
rule
]
})
console
.
log
(
row
.
tableComment
+
'
校验规则
'
,
JSON
.
stringify
(
rules
))
this
.
$message
(
'
规则已生成,打开控制台查看
'
)
})
.
finally
(
res
=>
{
l
.
close
()
})
},
}
};
</
script
>
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