Commit 4a16ff90 authored by zhengke's avatar zhengke

修改

parent e9f5a652
...@@ -30,6 +30,13 @@ ...@@ -30,6 +30,13 @@
<q-input v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false" maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" /> <q-input 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 v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1" label="是否少价" class="q-mb-md" /> <q-toggle v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1" label="是否少价" class="q-mb-md" />
<q-input v-if="OrderMsg.IsLessPrice==1" @keyup.native="checkPrice(OrderMsg,'LessPrice')" maxlength="10" filled stack-label :dense="false" v-model="OrderMsg.LessPrice" class="col-12" label="少价金额" /> <q-input v-if="OrderMsg.IsLessPrice==1" @keyup.native="checkPrice(OrderMsg,'LessPrice')" maxlength="10" filled stack-label :dense="false" v-model="OrderMsg.LessPrice" class="col-12" label="少价金额" />
<template v-if="saveObj.Type==2">
<q-select standout="bg-primary text-white" option-value="Id" class="q-pb-lg" option-label="Name" v-model="OrderMsg.OrderNature"
:options="OrderStatus" emit-value map-options label="订单性质" />
<q-input filled stack-label :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" :disable="OrderMsg.OrderNature==1&&isHaveModify" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg" label="应收" />
</template>
<q-input filled stack-label :dense="false" v-model="OrderMsg.SaleRemark" style="margin-top: 20px" <q-input filled stack-label :dense="false" v-model="OrderMsg.SaleRemark" style="margin-top: 20px"
type="textarea" class="col-12" label="备注" /> type="textarea" class="col-12" label="备注" />
<div style="margin:30px 10px 0 0;"> <div style="margin:30px 10px 0 0;">
...@@ -53,6 +60,9 @@ ...@@ -53,6 +60,9 @@
import { import {
queryEmployee queryEmployee
} from '../../api/users/user'; //获取员工 } from '../../api/users/user'; //获取员工
import {
mapState
} from "vuex";
export default { export default {
name: "editOrder-form", name: "editOrder-form",
...@@ -88,13 +98,45 @@ ...@@ -88,13 +98,45 @@
SourceEnumList: [], //订单来源 SourceEnumList: [], //订单来源
EmployeeList: [], //员工列表 EmployeeList: [], //员工列表
AllemployeeList: [], //所有员工列表 AllemployeeList: [], //所有员工列表
OrderStatus:[
{
Id:1,
Name:'直通车'
},
{
Id:2,
Name:'代收代付'
},
{
Id:3,
Name:'返佣'
}
]
} }
}, },
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;
}
return false;
}
}),
created() { created() {
this.getOrderSEList(); this.getOrderSEList();
}, },
mounted() { mounted() {
this.getOrderInfo(); if(this.saveObj.OrderId>0){
this.getOrderInfo();
}
this.getEmployee(); this.getEmployee();
}, },
methods: { methods: {
......
...@@ -825,8 +825,6 @@ ...@@ -825,8 +825,6 @@
created() { created() {
this.initAuth(); this.initAuth();
this.Employee(); this.Employee();
console.log(this.dataList,'asd');
}, },
mounted() { mounted() {
}, },
...@@ -1015,7 +1013,9 @@ ...@@ -1015,7 +1013,9 @@
}, },
//显示修改订单 //显示修改订单
editOrder(item) { editOrder(item) {
this.orderObj = item; // this.orderObj = item;
this.orderObj.OrderId = item.OrderId;
this.orderObj.Type = 1;
this.isShowEditOrderForm = true; this.isShowEditOrderForm = true;
}, },
//刷新页面 //刷新页面
......
<style>
.StudyOrder_drawerTop {
width: 100%;
height: 50px;
display: flex;
justify-content: space-between;
background-color: #F0F5FB;
padding: 5px 10px;
align-items: center;
}
</style>
<template> <template>
<q-dialog v-model="persistent" maximized full-height seamless position="right"> <q-dialog v-model="persistent" maximized full-height seamless position="right">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog"> <q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="drawerTop"> <div class="StudyOrder_drawerTop">
<div style="display:flex;align-items:center;margin-left:10px;"> <div style="display:flex;align-items:center;margin-left:10px;">
<span class="drawer_Span">学员报名</span> <span class="drawer_Span">学员报名</span>
</div> </div>
...@@ -17,7 +28,7 @@ ...@@ -17,7 +28,7 @@
<q-select standout="bg-primary text-white" option-value="Id" class="q-pb-lg" option-label="Name" v-model="enrollMsg.OrderNature" <q-select standout="bg-primary text-white" option-value="Id" class="q-pb-lg" option-label="Name" v-model="enrollMsg.OrderNature"
:options="OrderStatus" emit-value map-options label="订单性质" /> :options="OrderStatus" emit-value map-options label="订单性质" />
<q-input filled stack-label :dense="false" maxlength="10" <q-input filled stack-label :dense="false" maxlength="10"
@keyup.native="checkPrice(enrollMsg,'PreferPrice')" :disable="enrollMsg.OrderNature==1" v-model="enrollMsg.PreferPrice" class="col-12 q-pb-lg" label="应收" /> @keyup.native="checkPrice(enrollMsg,'PreferPrice')" :disable="enrollMsg.OrderNature==1&&isHaveModify" v-model="enrollMsg.PreferPrice" class="col-12 q-pb-lg" label="应收" />
<q-input filled stack-label type="textarea" maxlength="500" :dense="false" v-model="enrollMsg.SaleRemark" <q-input filled stack-label type="textarea" maxlength="500" :dense="false" v-model="enrollMsg.SaleRemark"
class="col-12" label="备注" /> class="col-12" label="备注" />
<div style="margin:30px 10px 0 0;"> <div style="margin:30px 10px 0 0;">
...@@ -37,6 +48,9 @@ ...@@ -37,6 +48,9 @@
getOrderSourceEnumList, //获取订单来源 枚举 getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder, //新增 修改订单 setClassOrder, //新增 修改订单
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
mapState
} from "vuex";
export default { export default {
name: "studyOrder-form", name: "studyOrder-form",
props: { props: {
...@@ -79,6 +93,21 @@ ...@@ -79,6 +93,21 @@
] ]
} }
}, },
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;
}
return false;
}
}),
created() { created() {
this.getOrderSEList(); this.getOrderSEList();
}, },
...@@ -86,6 +115,7 @@ ...@@ -86,6 +115,7 @@
this.enrollMsg.Unit_Price = this.saveObj.SellPrice; this.enrollMsg.Unit_Price = this.saveObj.SellPrice;
this.enrollMsg.SourceId = this.saveObj.Id; this.enrollMsg.SourceId = this.saveObj.Id;
this.countPrice(); this.countPrice();
console.log(this.saveObj,'saveObj');
}, },
methods: { methods: {
closeStudyForm() { closeStudyForm() {
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
</ul> </ul>
<div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div> <div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div>
</div> </div>
<q-dialog v-model="dialog" maximized full-height seamless position="right"> <!-- <q-dialog v-model="dialog" maximized full-height seamless position="right">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog"> <q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="drawerTop"> <div class="drawerTop">
<div style="display:flex;align-items:center;margin-left:10px;"> <div style="display:flex;align-items:center;margin-left:10px;">
...@@ -265,7 +265,9 @@ ...@@ -265,7 +265,9 @@
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"> style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
<q-icon name="iconfont icon-jujue1" size="26px" /> <q-icon name="iconfont icon-jujue1" size="26px" />
</div> </div>
</q-dialog> </q-dialog> -->
<editorder-form v-if="isShowEditOrderForm" :save-obj="orderObj" @close="closeOrderSaveForm" @success="refreshOrder">
</editorder-form>
</div> </div>
</div> </div>
</template> </template>
...@@ -287,11 +289,15 @@ ...@@ -287,11 +289,15 @@
queryEmployee queryEmployee
} from '../../api/users/user'; //获取员工 } from '../../api/users/user'; //获取员工
import editorderForm from '../../components/sale/editOrder-form' //修改订单
export default { export default {
meta: { meta: {
title: "日语培训" title: "日语培训"
}, },
components: {}, components: {
editorderForm
},
data() { data() {
return { return {
dialog: false, dialog: false,
...@@ -339,6 +345,11 @@ ...@@ -339,6 +345,11 @@
elvalue: new Date(), elvalue: new Date(),
EmployeeList: [], //员工列表 EmployeeList: [], //员工列表
AllemployeeList: [], //所有员工列表 AllemployeeList: [], //所有员工列表
isShowEditOrderForm:false,
orderObj:{
OrderId:0,
Type:1
}
} }
}, },
created() { created() {
...@@ -359,6 +370,13 @@ ...@@ -359,6 +370,13 @@
this.getEmployee(); this.getEmployee();
}, },
methods: { methods: {
//关闭订单修改
closeOrderSaveForm() {
this.isShowEditOrderForm = false;
},
refreshOrder(){
},
//筛选员工 //筛选员工
filterFn(val, update) { filterFn(val, update) {
update(() => { update(() => {
...@@ -580,7 +598,7 @@ ...@@ -580,7 +598,7 @@
}, },
placeAnorder(item) { placeAnorder(item) {
this.selectitem = item; this.selectitem = item;
this.dialog = true; // this.dialog = true;
this.enrollMsg.ClassId = item.ClassId; this.enrollMsg.ClassId = item.ClassId;
this.enrollMsg.SaleRemark = ''; //清空备注 this.enrollMsg.SaleRemark = ''; //清空备注
this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum); this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum);
...@@ -590,6 +608,11 @@ ...@@ -590,6 +608,11 @@
this.enrollMsg.EduOccupation=''; this.enrollMsg.EduOccupation='';
this.enrollMsg.IsLessPrice=0; this.enrollMsg.IsLessPrice=0;
this.enrollMsg.LessPrice=0; this.enrollMsg.LessPrice=0;
this.isShowEditOrderForm = true;
console.log(item);
// this.orderObj.Id = item.
}, },
peopleNumber(val) { peopleNumber(val) {
if (val > this.selectitem.SurplusNum) { if (val > this.selectitem.SurplusNum) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment