Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
83b011d2
Commit
83b011d2
authored
Apr 08, 2020
by
佟礼
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of 39.98.128.195:zhouyx/mes-ui into product
parents
115ceb40
d5ba0e3c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
194 additions
and
122 deletions
+194
-122
filed.vue
components/page/filed.vue
+35
-13
index.vue
pages/aps/aps/index.vue
+66
-39
index.vue
pages/aps/results/index.vue
+2
-0
detail.vue
pages/crm/customer/detail.vue
+17
-16
cart.vue
pages/resource/resource/cart.vue
+1
-1
index.js
store/index.js
+73
-53
No files found.
components/page/filed.vue
View file @
83b011d2
<
template
>
<Col
:span=
"span"
class=
"filed-col"
>
<
label
v-text=
"name"
class=
"label"
></label
>
<
span
>
<
div
v-text=
"name"
class=
"label"
></div
>
<
p
>
<slot></slot>
</
span
>
</
p
>
</Col>
</
template
>
<
script
>
export
default
{
name
:
'filed'
,
name
:
"filed"
,
props
:
{
name
:
{
type
:
String
...
...
@@ -18,29 +18,51 @@ export default {
default
:
12
}
}
}
}
;
</
script
>
<
style
lang=
"less"
>
.detail {
display: table;
height: 100%;
border-collapse: collapse;
.ivu-row {
display: table-row
;
border-top:
1px solid #ddd
;
border-left: 1px solid #ddd
;
border: 1px solid #ddd
;
border-top:
none
;
height: 100%
;
.filed-col {
display: table-cell;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
// margin: 0 0 -1px -1px;
line-height: 30px;
max-width: 970px;
border: 1px solid #ddd;
border-right: none;
margin: 0 -1px -1px -1px;
box-sizing: border-box;
line-height: 70px;
.label {
background: #e8eaf1;
display: inline-block;
width: 100px;
text-align: right;
padding: 0 5px;
line-height: 40px;
float: left;
height: 100%;
}
p {
max-width: 870px;
height: 100%;
word-break: break-all;
word-wrap: break-word;
margin: 0 10px 0 110px;
line-height: 20px;
padding-top: 10px;
}
}
.ivu-col-span-24 {
.label {
height: 100%;
padding: 0.5% 5px;
}
p {
padding-top: 1%;
}
}
}
...
...
pages/aps/aps/index.vue
View file @
83b011d2
...
...
@@ -400,49 +400,76 @@ export default {
});
parmsOrderpriority
.
alls
=
arryIds
;
// alert(JSON.stringify(parmsOrderpriority));
Api
.
orderpriority
(
parmsOrderpriority
).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
)
{
//this.$Message.success("排序成功");
//apsp排产前检查
Api
.
apsdatachecked
().
then
(
res1
=>
{
if
(
res1
.
success
)
{
if
(
res1
.
result
.
res
)
{
// this.$Message.success("数据校验成功");
//排产计算
let
paramsTime
=
{
setTime
:
this
.
entity
.
setTime
};
Api
.
apsprepareandcalc
(
paramsTime
).
then
(
res2
=>
{
if
(
res2
.
success
)
{
if
(
res2
.
result
.
res
)
{
this
.
$Message
.
success
(
"排产计算成功"
);
this
.
circleModal
=
false
;
this
.
$router
.
push
({
name
:
"aps-results"
// params: { customerId: id }
});
}
else
{
this
.
$Message
.
error
(
res2
.
result
.
msg
);
}
Api
.
orderpriority
(
parmsOrderpriority
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
)
{
//this.$Message.success("排序成功");
//apsp排产前检查
Api
.
apsdatachecked
()
.
then
(
res1
=>
{
if
(
res1
.
success
)
{
if
(
res1
.
result
.
res
)
{
// this.$Message.success("数据校验成功");
//排产计算
let
paramsTime
=
{
setTime
:
this
.
entity
.
setTime
};
Api
.
apsprepareandcalc
(
paramsTime
)
.
then
(
res2
=>
{
if
(
res2
.
success
)
{
if
(
res2
.
result
.
res
)
{
this
.
$Message
.
success
(
"排产计算成功"
);
this
.
circleModal
=
false
;
this
.
$router
.
push
({
name
:
"aps-results"
// params: { customerId: id }
});
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
res2
.
result
.
msg
);
}
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败:排产计算"
);
}
})
.
catch
(
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
);
}
else
{
this
.
$Message
.
error
(
"操作失败:排产计算"
);
this
.
circleModal
=
false
;
this
.
$Message
.
success
(
"数据校验失败"
);
}
});
}
else
{
this
.
$Message
.
success
(
"数据校验失败"
);
}
}
else
{
this
.
$Message
.
error
(
"操作失败:数据校验"
);
}
});
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败:数据校验"
);
}
})
.
catch
(
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
);
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"排序失败,请重新APS排产操作"
);
}
}
else
{
this
.
$Message
.
error
(
"排序失败,请重新APS排产操作"
);
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败:排序"
);
}
}
else
{
this
.
$Message
.
error
(
"操作失败:排序"
);
}
});
})
.
catch
(
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
);
},
//打开设置参数
openAddModel
(
type
,
row
)
{
...
...
pages/aps/results/index.vue
View file @
83b011d2
...
...
@@ -175,6 +175,7 @@ export default {
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"清空列表成功"
);
this
.
orderlist
();
this
.
data
=
[];
}
});
},
...
...
@@ -192,6 +193,7 @@ export default {
if
(
r
.
result
)
{
this
.
$Message
.
success
(
r
.
result
.
retmsg
);
this
.
orderlist
();
this
.
data
=
[];
}
else
{
this
.
$Message
.
success
(
"下发失败"
);
}
...
...
pages/crm/customer/detail.vue
View file @
83b011d2
...
...
@@ -15,49 +15,50 @@
<Filed
:span=
"12"
:name=
"l('status')"
>
<state
code=
"crm.customer.status"
:value=
"entity.status"
type=
"text"
></state>
</Filed>
<Filed
:span=
"24"
:name=
"l('notes')"
>
{{
entity
.
notes
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('code')"
>
{{
entity
.
code
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('trade')"
>
{{
entity
.
trade
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('notes')"
>
{{
entity
.
notes
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('trade')"
>
{{
entity
.
trade
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
code
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
}
}
;
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
this
.
$emit
(
'on-load'
)
})
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
})
;
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
'Customer'
+
'.'
+
key
return
this
.
$t
(
key
)
key
=
"Customer"
+
"."
+
key
;
return
this
.
$t
(
key
)
;
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
}
}
}
;
</
script
>
pages/resource/resource/cart.vue
View file @
83b011d2
...
...
@@ -20,7 +20,7 @@
</Col>
<Col
span=
"7"
>
<FormItem
label=
"领料人"
style=
"width:100%"
prop=
"customerId"
>
<UserSelect
ref=
"userSelected"
v-model=
"resource.customerId"
:type=
"
1
"
/>
<UserSelect
ref=
"userSelected"
v-model=
"resource.customerId"
:type=
"
0
"
/>
</FormItem>
</Col>
</Row>
...
...
store/index.js
View file @
83b011d2
import
createVuexAlong
from
'vuex-along'
import
Api
from
'@/plugins/request'
export
const
state
=
()
=>
({
counter
:
0
,
dictionary
:
new
Map
(),
//所有字典项
userMap
:[],
//所有用户缓存;
userInfo
:{
userId
:
0
,
userName
:
""
}
export
const
state
=
()
=>
({
counter
:
0
,
dictionary
:
new
Map
(),
//所有字典项
userMap
:
[],
//所有用户缓存;
userInfo
:
{
userId
:
0
,
userName
:
""
},
cart
:[],
count
:
0
,
})
export
const
getters
=
{
export
const
getters
=
{
dictionaryByKey
:
(
state
)
=>
(
key
)
=>
{
let
result
=
[];
let
items
=
state
.
dictionary
.
get
(
key
);
...
...
@@ -19,7 +21,7 @@ export const getters={
}
return
result
;
},
getUser
:
state
=>
key
=>
{
getUser
:
state
=>
key
=>
{
// try{
// if(state.userMap.has(key)){
// return state.userMap.get(key);
...
...
@@ -27,41 +29,59 @@ export const getters={
// }catch(e){
// console.log(e);
// }
let
user
=
state
.
userMap
.
filter
(
u
=>
{
return
u
.
id
==
key
});
if
(
user
.
length
>
0
){
let
user
=
state
.
userMap
.
filter
(
u
=>
{
return
u
.
id
==
key
});
if
(
user
.
length
>
0
)
{
return
user
[
0
]
}
else
{
}
else
{
return
null
;
}
}
}
export
const
mutations
=
{
increment
(
state
){
state
.
counter
++
},
setUserInfo
(
state
,
userInfo
)
{
state
.
userInfo
=
userInfo
;
// sessionStorage.setItem("userInfo", JSON.stringify(userInfo));
// sessionStorage.setItem("token", userInfo.token);
},
addUser
(
state
,
user
){
state
.
userMap
.
push
(
user
);
},
setDictionary
(
state
,
dictionary
)
{
state
.
dictionary
=
dictionary
;
},
export
const
mutations
=
{
increment
(
state
)
{
state
.
counter
++
},
setUserInfo
(
state
,
userInfo
)
{
state
.
userInfo
=
userInfo
;
// sessionStorage.setItem("userInfo", JSON.stringify(userInfo));
// sessionStorage.setItem("token", userInfo.token);
},
addUser
(
state
,
user
)
{
state
.
userMap
.
push
(
user
);
},
setDictionary
(
state
,
dictionary
)
{
state
.
dictionary
=
dictionary
;
},
setCart
(
state
,
cart
)
{
state
.
cart
=
cart
;
},
setCartCount
(
state
,
count
)
{
state
.
count
=
count
;
}
}
export
const
actions
=
{
async
loadUser
({
commit
},
key
){
let
{
result
}
=
await
this
.
$api
.
get
(
`
${
systemUrl
}
/user/getuser`
,{
id
:
key
});
console
.
warn
(
"result"
,
result
)
commit
(
"addUser"
,
result
);
export
const
actions
=
{
async
loadUser
({
commit
},
key
)
{
let
{
result
}
=
await
this
.
$api
.
get
(
`
${
systemUrl
}
/user/getuser`
,
{
id
:
key
});
console
.
warn
(
"result"
,
result
)
commit
(
"addUser"
,
result
);
},
async
loadDictionary
({
commit
})
{
async
loadDictionary
({
commit
})
{
let
url
=
`
${
systemUrl
}
/Dictionary/GetAll`
let
{
result
}
=
await
Api
.
get
(
url
);
let
{
result
}
=
await
Api
.
get
(
url
);
var
map
=
new
Map
();
...
...
@@ -74,20 +94,20 @@ export const actions={
}
}
export
const
plugins
=
[
createVuexAlong
({
// 设置保存的集合名字,避免同站点下的多项目数据冲突
name
:
"hyhmes"
,
local
:
{
list
:
[
"hyhmes"
],
// 过滤模块 ma 数据, 将其他的存入 localStorage
isFilter
:
true
,
},
session
:
{
// 保存模块 ma 中的 a1 到 sessionStorage
list
:
[
"hyhmes.session"
],
},
}),
]
//设置 strict 为不严格模式,即可在actions中修改state
export
const
strict
=
false
;
\ No newline at end of file
export
const
plugins
=
[
createVuexAlong
({
// 设置保存的集合名字,避免同站点下的多项目数据冲突
name
:
"hyhmes"
,
local
:
{
list
:
[
"hyhmes"
],
// 过滤模块 ma 数据, 将其他的存入 localStorage
isFilter
:
true
,
},
session
:
{
// 保存模块 ma 中的 a1 到 sessionStorage
list
:
[
"hyhmes.session"
],
},
}),
]
//设置 strict 为不严格模式,即可在actions中修改state
export
const
strict
=
false
;
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