Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
mes
mes-ui
Commits
167a38ef
Commit
167a38ef
authored
Jan 17, 2024
by
hiyonx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap特性设置
parent
f855c301
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1262 additions
and
0 deletions
+1262
-0
propertydict.js
src/api/mes/md/propertydict.js
+44
-0
propertytype.js
src/api/mes/md/propertytype.js
+44
-0
sapproperty.js
src/api/mes/md/sapproperty.js
+44
-0
index.vue
src/components/ElInputMoney/index.vue
+85
-0
main.js
src/main.js
+3
-0
index.vue
src/views/mes/md/propertydict/index.vue
+310
-0
index.vue
src/views/mes/md/propertytype/index.vue
+386
-0
index.vue
src/views/mes/md/sapproperty/index.vue
+346
-0
No files found.
src/api/mes/md/propertydict.js
0 → 100644
View file @
167a38ef
import
request
from
'@/utils/request'
// 查询客户列表
export
function
listPropertyDict
(
query
)
{
return
request
({
url
:
'/md/propertydict/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询客户详细
export
function
getPropertyDict
(
id
)
{
return
request
({
url
:
'/md/propertydict/'
+
id
,
method
:
'get'
})
}
// 新增客户
export
function
addPropertyDict
(
data
)
{
return
request
({
url
:
'/md/propertydict'
,
method
:
'post'
,
data
:
data
})
}
// 修改客户
export
function
updatePropertyDict
(
data
)
{
return
request
({
url
:
'/md/propertydict'
,
method
:
'put'
,
data
:
data
})
}
// 删除客户
export
function
delPropertyDict
(
id
)
{
return
request
({
url
:
'/md/propertydict/'
+
id
,
method
:
'delete'
})
}
src/api/mes/md/propertytype.js
0 → 100644
View file @
167a38ef
import
request
from
'@/utils/request'
// 查询客户列表
export
function
listPropertytype
(
query
)
{
return
request
({
url
:
'/md/propertytype/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询客户详细
export
function
getPropertytype
(
clientId
)
{
return
request
({
url
:
'/md/propertytype/'
+
clientId
,
method
:
'get'
})
}
// 新增客户
export
function
addPropertytype
(
data
)
{
return
request
({
url
:
'/md/propertytype'
,
method
:
'post'
,
data
:
data
})
}
// 修改客户
export
function
updatePropertytype
(
data
)
{
return
request
({
url
:
'/md/propertytype'
,
method
:
'put'
,
data
:
data
})
}
// 删除客户
export
function
delPropertytype
(
clientId
)
{
return
request
({
url
:
'/md/propertytype/'
+
clientId
,
method
:
'delete'
})
}
src/api/mes/md/sapproperty.js
0 → 100644
View file @
167a38ef
import
request
from
'@/utils/request'
// 查询客户列表
export
function
listSapproperty
(
query
)
{
return
request
({
url
:
'/md/sapproperty/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询客户详细
export
function
getSapproperty
(
clientId
)
{
return
request
({
url
:
'/md/sapproperty/'
+
clientId
,
method
:
'get'
})
}
// 新增客户
export
function
addSapproperty
(
data
)
{
return
request
({
url
:
'/md/sapproperty'
,
method
:
'post'
,
data
:
data
})
}
// 修改客户
export
function
updateSapproperty
(
data
)
{
return
request
({
url
:
'/md/sapproperty'
,
method
:
'put'
,
data
:
data
})
}
// 删除客户
export
function
delSapproperty
(
clientId
)
{
return
request
({
url
:
'/md/sapproperty/'
+
clientId
,
method
:
'delete'
})
}
src/components/ElInputMoney/index.vue
0 → 100644
View file @
167a38ef
<
template
>
<el-input
v-model
.
trim=
"money"
class=
"el-input-money"
:placeholder=
"placeholder"
:disabled=
"disabled"
:readonly=
"readonly"
:clearable=
"!readonly && !disabled && clearable"
@
blur=
"onBlue"
@
focus=
"onFocus"
@
change=
"onChange"
>
<template
slot=
"append"
>
<slot
name=
"append"
></slot>
</
template
>
</el-input>
</template>
<
script
>
export
default
{
name
:
"ElInputMoney"
,
model
:
{
prop
:
'value'
,
event
:
"update"
},
props
:
{
// 金额
value
:
{
type
:
String
|
Number
,
required
:
true
},
// 单位: 1元, 0.1角, 0.01分
unit
:
{
type
:
String
|
Number
,
default
:
1
},
placeholder
:
{
type
:
String
},
clearable
:
{
type
:
Boolean
,
default
:
false
},
readonly
:
{
type
:
Boolean
,
default
:
false
},
disabled
:
{
type
:
Boolean
,
default
:
false
},
},
watch
:
{
value
:
{
handler
(
val
)
{
if
(
val
!=
null
&&
val
!==
''
)
{
this
.
calcMoney
(
val
*
this
.
unit
)
}
},
immediate
:
true
}
},
data
()
{
return
{
money
:
null
,
}
},
methods
:
{
onBlue
()
{
if
(
this
.
disabled
||
this
.
readonly
)
return
;
if
(
/^
[
+-
]?\d
+
(\.\d
+
)?
$/
.
test
(
this
.
money
))
{
this
.
$emit
(
"update"
,
this
.
money
/
this
.
unit
);
this
.
money
=
this
.
formatMoney
(
this
.
money
);
}
else
{
this
.
money
=
null
;
this
.
$emit
(
"update"
,
null
);
}
this
.
$emit
(
"blur"
);
},
onChange
()
{
if
(
this
.
disabled
||
this
.
readonly
)
return
;
setTimeout
(()
=>
this
.
$emit
(
"change"
,
this
.
value
),
100
);
},
onFocus
()
{
if
(
this
.
disabled
||
this
.
readonly
)
return
;
this
.
$emit
(
"focus"
);
if
(
this
.
value
!=
null
&&
this
.
value
!==
''
)
this
.
money
=
this
.
value
*
this
.
unit
;
},
calcMoney
()
{
if
(
this
.
value
!==
''
&&
this
.
value
!=
null
)
{
this
.
money
=
this
.
formatMoney
(
this
.
value
*
this
.
unit
);
}
},
/**
* 格式化金钱
*/
formatMoney
(
val
)
{
if
(
val
===
''
||
val
==
null
)
return
null
let
str
=
(
+
val
).
toFixed
(
2
);
let
intSum
=
str
.
substring
(
0
,
str
.
indexOf
(
"."
)).
replace
(
/
\B(?=(?:\d{3})
+$
)
/g
,
','
);
//取到整数部分
let
dot
=
str
.
substring
(
str
.
length
,
str
.
indexOf
(
"."
))
//取到小数部分搜索
return
'¥ '
+
intSum
+
dot
;
},
}
}
</
script
>
<
style
scoped
>
</
style
>
src/main.js
View file @
167a38ef
...
@@ -25,6 +25,8 @@ import Pagination from "@/components/Pagination";
...
@@ -25,6 +25,8 @@ import Pagination from "@/components/Pagination";
import
RightToolbar
from
"@/components/RightToolbar"
import
RightToolbar
from
"@/components/RightToolbar"
// 富文本组件
// 富文本组件
import
Editor
from
"@/components/Editor"
import
Editor
from
"@/components/Editor"
// 金钱输入框
import
ElInputMoney
from
"@/components/ElInputMoney"
// 文件上传组件
// 文件上传组件
import
FileUpload
from
"@/components/FileUpload"
import
FileUpload
from
"@/components/FileUpload"
// 图片上传组件
// 图片上传组件
...
@@ -56,6 +58,7 @@ Vue.component('DictTag', DictTag)
...
@@ -56,6 +58,7 @@ Vue.component('DictTag', DictTag)
Vue
.
component
(
'Pagination'
,
Pagination
)
Vue
.
component
(
'Pagination'
,
Pagination
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
Vue
.
component
(
'Editor'
,
Editor
)
Vue
.
component
(
'Editor'
,
Editor
)
Vue
.
component
(
'ElInputMoney'
,
ElInputMoney
)
Vue
.
component
(
'FileUpload'
,
FileUpload
)
Vue
.
component
(
'FileUpload'
,
FileUpload
)
Vue
.
component
(
'ImageUpload'
,
ImageUpload
)
Vue
.
component
(
'ImageUpload'
,
ImageUpload
)
Vue
.
component
(
'ImagePreview'
,
ImagePreview
)
Vue
.
component
(
'ImagePreview'
,
ImagePreview
)
...
...
src/views/mes/md/propertydict/index.vue
0 → 100644
View file @
167a38ef
This diff is collapsed.
Click to expand it.
src/views/mes/md/propertytype/index.vue
0 → 100644
View file @
167a38ef
This diff is collapsed.
Click to expand it.
src/views/mes/md/sapproperty/index.vue
0 → 100644
View file @
167a38ef
This diff is collapsed.
Click to expand it.
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