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
3d1c07d5
Commit
3d1c07d5
authored
Dec 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3be85e91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
11 deletions
+74
-11
sale.js
src/api/sale/sale.js
+8
-0
editOrder-form.vue
src/components/sale/editOrder-form.vue
+66
-11
No files found.
src/api/sale/sale.js
View file @
3d1c07d5
...
...
@@ -377,3 +377,11 @@ export function setStudyAboradOrderConfirm(data) {
});
}
// 同行下拉
export
function
getMyCustomerList
(
data
)
{
return
request
({
url
:
'/b2bcustomer/GetMyCustomerList'
,
method
:
'post'
,
data
});
}
\ No newline at end of file
src/components/sale/editOrder-form.vue
View file @
3d1c07d5
...
...
@@ -68,16 +68,24 @@
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.PerDiscountMoney"
:disable=
"true"
class=
"col-12 q-pb-lg"
label=
"优惠金额(每人)"
:hint=
"'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)"
/>
<!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-12 q-pb-lg" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<q-input
filled
stack-label
:dense=
"false"
:value=
"OrderMsg.Class_Price*OrderMsg.GuestNum*OrderMsg.B2CRatio"
:disable=
"true"
class=
"col-12 q-pb-lg"
label=
"优惠金额"
/>
<
template
v-if=
"modityOrderType==3"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
input=
"calcPrice()"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
<q-input
filled
stack-label
:disable=
"modityOrderType!=3"
:dense=
"false"
maxlength=
"10"
<
!-- <
q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg"
label="应收" /> -->
<q-input
filled
stack-label
:disable=
"modityOrderType!=3"
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
:value=
"OrderMsg.Class_Price*OrderMsg.GuestNum*(1-OrderMsg.B2CRatio)"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
<q-select
:disable=
"modityOrderType==2"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource"
:options=
"SourceEnumList"
emit-value
map-options
class=
"q-pb-lg"
label=
"客人来源"
/>
...
...
@@ -92,12 +100,23 @@
</q-item>
</
template
>
</q-select>
<q-select
:disable=
"(modityOrderType==2)||(OrderMsg.JoinType==3)"
v-model=
"OrderMsg.CustomerId"
:options=
"myCustomerList"
filled
use-input
label=
"同行"
option-label=
"CustomerName"
option-value=
"CustomerId"
ref=
"CustomerName"
class=
"col-6 q-pb-lg"
emit-value
map-options
@
filter=
"cusfilterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<q-input
:disable=
"(modityOrderType==2)"
v-if=
"OrderMsg.OrderSource==3"
filled
stack-label
:dense=
"false"
maxlength=
"50"
v-model=
"OrderMsg.GeneralOccupation"
class=
"col-12 q-pb-lg"
label=
"一般同行"
/>
<q-input
:disable=
"(modityOrderType==2)"
v-if=
"OrderMsg.OrderSource==7"
filled
stack-label
:dense=
"false"
maxlength=
"50"
v-model=
"OrderMsg.EduOccupation"
class=
"col-12 q-pb-lg"
label=
"教育同行"
/>
<q-toggle
:disable=
"(modityOrderType==2)"
v-model=
"OrderMsg.IsLessPrice"
:false-value=
"0"
:true-value=
"1"
label=
"是否少价"
class=
"q-mb-md"
/>
<
!-- <
q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" />
-->
<q-input
:disable=
"(modityOrderType==2)"
v-if=
"OrderMsg.IsLessPrice==1"
@
input=
"calcPrice()"
@
keyup
.
native=
"checkPrice(OrderMsg,'PerLessMoney')"
maxlength=
"10"
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.PerLessMoney"
class=
"col-12"
label=
"少价金额(每人)"
...
...
@@ -122,7 +141,8 @@
getOrderSourceEnumList
,
//获取订单来源 枚举
setClassOrder
,
//修改订单
queryChaClassInfo
,
GetSelectClassOrderList
//获取前置下拉
GetSelectClassOrderList
,
//获取前置下拉
getMyCustomerList
//同行下拉
}
from
'../../api/sale/sale'
import
{
queryEmployee
...
...
@@ -159,6 +179,9 @@
OrderMsg
:
{
ClassId
:
0
,
//班级编号
GuestNum
:
0
,
//人数
B2CRatio
:
0
,
B2CReNewRatio
:
0
,
CustomerId
:
0
,
//市场专员
Unit_Price
:
0
,
PreferPrice
:
0
,
OrderSource
:
0
,
...
...
@@ -193,6 +216,8 @@
CourseList
:
[],
//课程列表
courseObj
:
{},
//选择的课程
beforeOrderList
:
[],
//前置订单数据
myCustomerList
:[],
//同行列表
allCustomerList
:[],
//所有同行列表
}
},
created
()
{
...
...
@@ -205,6 +230,7 @@
this
.
getEmployee
();
this
.
initConfig
();
this
.
getSelectClass
();
this
.
getCustomerList
();
},
mounted
()
{
this
.
initData
()
...
...
@@ -244,7 +270,7 @@
if
(
temp
)
{
this
.
courseObj
=
temp
;
var
tempDiscountMoney
=
0
;
//优惠金额
var
tempSaleRemark
=
""
;
//备注
var
tempSaleRemark
=
`直客首次报名优惠比例
${
temp
.
B2CRatio
??
0
}
%
`
; //备注
//插班课时单价
var classHourPrice = temp.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(classHourPrice * (this.courseObj.ClassHours - this.OrderMsg.StartClassHours))
...
...
@@ -257,17 +283,17 @@
} else {
tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100;
}
tempSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
+
"%"
;
//
tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%";
} else {
tempDiscountMoney = item.CoursePriceList[0].PriceMoney;
tempSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
;
//
tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney;
}
}
}
if (guestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) {
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
+
"%"
;
//
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%";
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney = (chaBanPrice * temp.CoursePriceList[1].PriceMoney) / 100;
} else {
...
...
@@ -275,7 +301,7 @@
}
} else {
tempDiscountMoney = item.CoursePriceList[1].PriceMoney;
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
//
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
}
}
}
...
...
@@ -365,6 +391,9 @@
this.OrderMsg.UpOrderId = tempData.UpOrderId;
this.OrderMsg.DiscountMoney = tempData.DiscountMoney;
this.OrderMsg.PerDiscountMoney = tempData.PerDiscountMoney;
this.OrderMsg.B2CRatio = tempData.B2CRatio>1?(tempData.B2CRatio/100):tempData.B2CRatio;
this.OrderMsg.B2CReNewRatio = tempData.B2CReNewRatio>1?(tempData.B2CReNewRatio/100):tempData.B2CReNewRatio;
this.OrderMsg.CustomerId=tempData.CustomerId
this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true;
}
...
...
@@ -388,6 +417,9 @@
this.OrderMsg.DiscountMoney = 0;
this.OrderMsg.PerDiscountMoney = 0;
this.OrderMsg.OrderType = this.orderType;
this.OrderMsg.B2CRatio = 0;
this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.CustomerId=0;
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1;
}
...
...
@@ -409,6 +441,12 @@
} else {
this.OrderMsg.CourseId = '';
}
if(this.saveObj.B2CRatio){
this.OrderMsg.B2CRatio = this.saveObj.B2CRatio;
}
if(this.saveObj.B2CReNewRatio){
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio;
}
}
this.IsShowEditOrder = true;
this.calcPrice();
...
...
@@ -424,6 +462,17 @@
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
},
//筛选市场专员
cusfilterFn(val, update) {
update(() => {
if (val === '') {
this.myCustomerList = JSON.parse(JSON.stringify(this.allCustomerList))
} else {
const needle = val.toLowerCase();
this.myCustomerList = this.allCustomerList.filter(v => v.CustomerName.toLowerCase().indexOf(needle) > -1);
}
})
},
//获取业务员
getEmployee() {
...
...
@@ -547,6 +596,12 @@
str = item[0].GuestName;
}
return str
},
getCustomerList(){
getMyCustomerList({}).then(res=>{
this.myCustomerList=res.Data
this.allCustomerList=res.Data
})
}
}
}
...
...
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