Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
43047461
Commit
43047461
authored
May 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
abcab161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
73 deletions
+29
-73
editOrder-form.vue
src/components/sale/editOrder-form.vue
+29
-73
No files found.
src/components/sale/editOrder-form.vue
View file @
43047461
...
...
@@ -9,9 +9,10 @@
</div>
<div
style=
"padding:20px 15px;"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"OrderMsg.GuestNum"
type=
"number"
@
input=
"peopleNumber"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"UPrice==true?false:true"
@
blur=
"priceNumber"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
@
input=
"countPrice"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"countPrice"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
/>
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource"
...
...
@@ -132,15 +133,15 @@
computed
:
mapState
({
//是否有查看合同权限
isHaveModify
(
state
)
{
if
(
state
.
user
.
userInfo
&&
state
.
user
.
userInfo
.
ActionMenuList
&&
state
.
user
.
userInfo
.
ActionMenuList
.
length
>
0
)
{
let
action
=
state
.
user
.
userInfo
.
ActionMenuList
.
find
(
x
=>
{
if
(
x
.
FunctionCode
==
"E_ModifyStudyOrderPrice"
)
{
return
x
;
}
});
return
action
&&
action
.
FunctionCode
;
}
//
if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length >
//
0) {
//
let action = state.user.userInfo.ActionMenuList.find(x => {
//
if (x.FunctionCode == "E_ModifyStudyOrderPrice") {
//
return x;
//
}
//
});
//
return action && action.FunctionCode;
//
}
return
false
;
}
}),
...
...
@@ -149,6 +150,8 @@
this
.
getEmployee
();
},
mounted
()
{
console
.
log
(
"saveObj"
,
this
.
saveObj
);
console
.
log
(
"orderType"
,
this
.
orderType
);
this
.
initData
()
},
methods
:
{
...
...
@@ -199,7 +202,8 @@
this
.
OrderMsg
.
SourceId
=
this
.
saveObj
.
SourceId
;
}
}
this
.
IsShowEditOrder
=
true
;
this
.
countPrice
();
this
.
IsShowEditOrder
=
true
;
}
},
//筛选员工
...
...
@@ -246,69 +250,21 @@
}
})
},
//人数改变
peopleNumber
(
val
)
{
if
(
val
==
''
)
{
this
.
OrderMsg
.
GuestNum
=
1
//计算价格
countPrice
()
{
var
guestNum
=
0
;
var
unit_price
=
0
;
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
}
this
.
OrderMsg
.
Unit_Price
=
this
.
countPrice
(
this
.
OrderMsg
.
GuestNum
)
this
.
$forceUpdate
()
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
},
priceNumber
(
val
)
{
//大于的时候赋值
if
(
this
.
OrderMsg
.
Unit_Price
<
this
.
UnitPrice
)
{
this
.
OrderMsg
.
Unit_Price
=
this
.
UnitPrice
if
(
this
.
OrderMsg
.
Unit_Price
&&
this
.
OrderMsg
.
Unit_Price
>
0
)
{
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
}
},
//计算价格
countPrice
(
num
)
{
let
array
=
[];
if
(
this
.
StepPriceList
&&
this
.
StepPriceList
.
length
)
{
this
.
StepPriceList
.
forEach
(
x
=>
{
let
obj
=
{
PersionNum
:
x
.
PersionNum
,
PersionPrice
:
x
.
PersionPrice
,
}
array
.
push
(
obj
)
})
let
fz
=
false
let
a
=
0
;
array
.
forEach
(
x
=>
{
if
(
x
.
PersionNum
==
num
)
{
fz
=
true
;
a
=
x
.
PersionPrice
}
})
if
(
fz
==
false
)
{
array
.
push
({
PersionNum
:
num
})
array
.
sort
(
this
.
getSortFun
(
'asc'
,
'PersionNum'
));
//升序排序
var
idx
;
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
array
[
i
].
PersionNum
==
num
)
{
idx
=
i
;
}
}
idx
=
Math
.
max
(
0
,
idx
-
1
);
if
(
array
[
idx
].
PersionPrice
)
{
return
array
[
idx
].
PersionPrice
;
}
else
{
return
this
.
OrderMsg
.
Class_Price
;
}
}
else
{
return
a
;
}
}
else
{
return
this
.
OrderMsg
.
Class_Price
;
this
.
OrderMsg
.
PreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
this
.
OrderMsg
.
OldPreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
}
},
getSortFun
(
order
,
sortBy
)
{
var
ordAlpah
=
(
order
==
'asc'
)
?
'>'
:
'<'
;
var
sortFun
=
new
Function
(
'a'
,
'b'
,
'return a.'
+
sortBy
+
ordAlpah
+
'b.'
+
sortBy
+
'?1:-1'
);
return
sortFun
;
},
//修改订单
saveOrderInfo
()
{
this
.
OrderMsg
.
PreferPrice
=
(
this
.
OrderMsg
.
GuestNum
*
this
.
OrderMsg
.
Unit_Price
)
-
this
.
OrderMsg
.
LessPrice
;
...
...
@@ -318,7 +274,7 @@
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'
修改成功!
'
,
message
:
'
操作成功!
'
,
position
:
'top'
})
//调用父页面成功方法
...
...
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