Commit 83f7df92 authored by zhengke's avatar zhengke

修改

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