Commit 83f7df92 authored by zhengke's avatar zhengke

修改

parent 58a79dac
...@@ -332,3 +332,16 @@ export function queryChaClassInfo(data) { ...@@ -332,3 +332,16 @@ export function queryChaClassInfo(data) {
}) })
} }
/**
* 获取前置订单下拉数据
*
*/
export function GetSelectClassOrderList(data) {
return request({
url: '/Order/GetSelectClassOrderList',
method: 'post',
data
})
}
...@@ -31,11 +31,26 @@ ...@@ -31,11 +31,26 @@
<q-input filled stack-label :dense="false" v-model="OrderMsg.StartClassHours" :disable="modityOrderType==2" <q-input filled stack-label :dense="false" v-model="OrderMsg.StartClassHours" :disable="modityOrderType==2"
@keyup.native="checkInteger(OrderMsg,'StartClassHours')" ref="StartClassHours" @input="countPrice" @keyup.native="checkInteger(OrderMsg,'StartClassHours')" ref="StartClassHours" @input="countPrice"
class="col-12" label="起始课时" :rules="[val => !!val || '请填起始课时']" /> class="col-12" label="起始课时" :rules="[val => !!val || '请填起始课时']" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.EffectTime" :disable="modityOrderType==2" <q-input filled v-model="OrderMsg.EffectTime" :rules="[val => !!val || '请填生效时间']" class="col-6 q-pb-lg"
ref="EffectTime" @input="countPrice" class="col-12" label="生效时间" :rules="[val => !!val || '请填生效时间']" /> :disable="modityOrderType==2" mask="date" label="生效时间">
<q-select filled option-value="UpOrderId" :disable="modityOrderType==2" option-label="CourseName" <template v-slot:append>
ref="UpOrderId" v-model="OrderMsg.UpOrderId" :options="CourseList" emit-value map-options class="q-pb-lg" <q-icon name="event" class="cursor-pointer">
label="前置订单" @input="changePrice" /> <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="OrderMsg.EffectTime" @input="() => $refs.qDateProxy1.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-select filled option-value="OrderId" option-label="CourseName" class="q-pb-lg" :disable="modityOrderType==2"
v-model="OrderMsg.UpOrderId" :options="beforeOrderList" emit-value map-options label="前置订单">
<template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }">
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label><span style="color:blue">{{opt.OrderId}}</span> {{opt.CourseName}} {{opt.ClassName}} {{getStudent(opt.GuestList)}}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</template> </template>
<template v-if="modityOrderType==1"> <template v-if="modityOrderType==1">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price"
...@@ -98,6 +113,7 @@ ...@@ -98,6 +113,7 @@
getOrderSourceEnumList, //获取订单来源 枚举 getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder, //修改订单 setClassOrder, //修改订单
queryChaClassInfo, queryChaClassInfo,
GetSelectClassOrderList //获取前置下拉
} from '../../api/sale/sale' } from '../../api/sale/sale'
import { import {
queryEmployee queryEmployee
...@@ -161,7 +177,8 @@ ...@@ -161,7 +177,8 @@
EmployeeList: [], //员工列表 EmployeeList: [], //员工列表
AllemployeeList: [], //所有员工列表 AllemployeeList: [], //所有员工列表
CourseList: [], //课程列表 CourseList: [], //课程列表
courseObj: {} //选择的课程 courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据
} }
}, },
created() { created() {
...@@ -169,6 +186,7 @@ ...@@ -169,6 +186,7 @@
this.initConfig(); this.initConfig();
this.getOrderSEList(); this.getOrderSEList();
this.getEmployee(); this.getEmployee();
this.getSelectClass();
var localStorageData = window.localStorage["loginUserInfo"]; var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList
if (ActionMenuList && ActionMenuList.length > 0) { if (ActionMenuList && ActionMenuList.length > 0) {
...@@ -275,8 +293,8 @@ ...@@ -275,8 +293,8 @@
this.OrderMsg.CourseId = tempData.CourseId; this.OrderMsg.CourseId = tempData.CourseId;
this.OrderMsg.StartClassHours = tempData.StartClassHours; this.OrderMsg.StartClassHours = tempData.StartClassHours;
this.OrderMsg.IsChaBan = tempData.IsChaBan; this.OrderMsg.IsChaBan = tempData.IsChaBan;
this.OrderMsg.EffectTime=tempData.EffectTime; this.OrderMsg.EffectTime = tempData.EffectTime;
this.OrderMsg.UpOrderId=tempData.UpOrderId; this.OrderMsg.UpOrderId = tempData.UpOrderId;
this.UnitPrice = this.OrderMsg.Unit_Price; this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
} }
...@@ -294,8 +312,8 @@ ...@@ -294,8 +312,8 @@
this.OrderMsg.CourseId = ''; this.OrderMsg.CourseId = '';
this.OrderMsg.StartClassHours = 0; this.OrderMsg.StartClassHours = 0;
this.OrderMsg.IsChaBan = this.isChaBan; this.OrderMsg.IsChaBan = this.isChaBan;
this.OrderMsg.EffectTime=""; this.OrderMsg.EffectTime = "";
this.OrderMsg.UpOrderId=0; this.OrderMsg.UpOrderId = 0;
this.OrderMsg.OrderType = this.orderType; this.OrderMsg.OrderType = this.orderType;
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1; this.OrderMsg.OrderNature = 1;
...@@ -427,6 +445,31 @@ ...@@ -427,6 +445,31 @@
} }
}).catch(() => {}) }).catch(() => {})
}, },
//获取前置下拉数据
getSelectClass() {
var qMsg = {
ClassId: 0
};
if (this.saveObj.ClassId) {
qMsg.ClassId = this.saveObj.ClassId;
}
GetSelectClassOrderList(qMsg).then(res => {
if (res.Code == 1) {
this.beforeOrderList = res.Data;
console.log(res, '前置数据');
}
})
},
getStudent(item){
let str = ''
if(item&&item.length>1){
str=item[0].GuestName+'等'+item.length+'人';
}
if(item.length==1){
str=item[0].GuestName;
}
return str
}
} }
} }
......
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