Commit 9eb7ee7d authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

# Conflicts:
#	src/pages/activity/materialMan.vue
parents 624eb48f df0651b1
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<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 q-pb-lg" label="起始课时" /> class="col-12 q-pb-lg" label="起始课时" />
<q-input filled v-model="OrderMsg.EffectTime" ref="EffectTime" :rules="[val => !!val || '请填生效时间']" class="col-6 q-pb-lg" <q-input filled v-model="OrderMsg.EffectTime" ref="EffectTime" :rules="[val => !!val || '请填生效时间']"
:disable="modityOrderType==2" mask="date" label="生效时间"> class="col-6 q-pb-lg" :disable="modityOrderType==2" mask="date" label="生效时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
...@@ -41,12 +41,14 @@ ...@@ -41,12 +41,14 @@
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>
<q-select filled option-value="OrderId" option-label="CourseName" class="q-pb-lg" :disable="modityOrderType==2" <q-select filled option-value="OrderId" option-label="CourseName" class="q-pb-lg"
v-model="OrderMsg.UpOrderId" :options="beforeOrderList" emit-value map-options label="前置订单"> :disable="modityOrderType==2" v-model="OrderMsg.UpOrderId" :options="beforeOrderList" emit-value map-options
label="前置订单">
<template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }"> <template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }">
<q-item v-bind="itemProps" v-on="itemEvents"> <q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section> <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-label><span style="color:blue">{{opt.OrderId}}</span> {{opt.CourseName}} {{opt.ClassName}}
{{getStudent(opt.GuestList)}}</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg" v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg"
label="客人来源" /> label="客人来源" />
<q-select :disable="(modityOrderType==2)" v-model="OrderMsg.HelpEnterId" :options="EmployeeList" filled <q-select :disable="(modityOrderType==2)" v-model="OrderMsg.HelpEnterId" :options="EmployeeList" filled
use-input label="协助人员" option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6 q-pb-lg" use-input label="协助老师" option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6 q-pb-lg"
emit-value map-options @filter="filterFn"> emit-value map-options @filter="filterFn">
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
...@@ -158,7 +160,7 @@ ...@@ -158,7 +160,7 @@
OrderId: 0, OrderId: 0,
OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单) OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号 SourceId: 0, //来源编号
HelpEnterId: 0, //协助人员编号 HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行 GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行 EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少 IsLessPrice: 0, //是否少价 0 不少 1 少
...@@ -260,8 +262,16 @@ ...@@ -260,8 +262,16 @@
} }
} }
} else { } else {
this.OrderMsg.Unit_Price = 0; if (this.saveObj.ClassId) {
this.UnitPrice = 0; this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
this.courseObj = {}; this.courseObj = {};
} }
this.countPrice(); this.countPrice();
...@@ -459,13 +469,13 @@ ...@@ -459,13 +469,13 @@
} }
}) })
}, },
getStudent(item){ getStudent(item) {
let str = '' let str = ''
if(item&&item.length>1){ if (item && item.length > 1) {
str=item[0].GuestName+'等'+item.length+'人'; str = item[0].GuestName + '等' + item.length + '人';
} }
if(item.length==1){ if (item.length == 1) {
str=item[0].GuestName; str = item[0].GuestName;
} }
return str return str
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
OrderId: 0, OrderId: 0,
OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单) OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号 SourceId: 0, //来源编号
HelpEnterId: 0, //协助人员编号 HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行 GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行 EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少 IsLessPrice: 0, //是否少价 0 不少 1 少
......
...@@ -21,20 +21,24 @@ ...@@ -21,20 +21,24 @@
</div> </div>
</div> </div>
<div style="padding:20px 15px;"> <div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" readonly :dense="false" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.VisitorName"
v-model="saveObj.VisitorName" class="col-12 q-pb-lg" label="客户名称" /> class="col-12 q-pb-lg" label="客户名称" />
<q-input filled stack-label maxlength="100" readonly :dense="false" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.ClassDateStr"
v-model="saveObj.ClassDateStr" class="col-12 q-pb-lg" label="日期" /> class="col-12 q-pb-lg" label="日期" />
<q-input filled stack-label maxlength="100" readonly :dense="false" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.ClassTime"
v-model="saveObj.TeacherName" class="col-12 q-pb-lg" label="老师" /> class="col-12 q-pb-lg" label="开始时间" />
<q-input filled stack-label maxlength="100" readonly :dense="false" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.EndTime"
v-model="saveObj.RoomName" class="col-12 q-pb-lg" label="教室" /> class="col-12 q-pb-lg" label="结束时间" />
<q-input filled stack-label maxlength="100" readonly :dense="false" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.TeacherName"
v-model="saveObj.OrderId" class="col-12 q-pb-lg" label="订单编号" /> class="col-12 q-pb-lg" label="老师" />
<q-input filled stack-label maxlength="100" readonly :dense="false" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.RoomName"
v-model="saveObj.ReserveStatusStr" class="col-12 q-pb-lg" label="状态" /> class="col-12 q-pb-lg" label="教室" />
<q-input filled stack-label :dense="false" readonly v-model="saveObj.ClassContent" <q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.OrderId"
type="textarea" class="col-12 q-pb-lg" label="主讲内容" /> class="col-12 q-pb-lg" label="订单编号" />
<q-input filled stack-label maxlength="100" readonly :dense="false" v-model="saveObj.ReserveStatusStr"
class="col-12 q-pb-lg" label="状态" />
<q-input filled stack-label :dense="false" readonly v-model="saveObj.ClassContent" type="textarea"
class="col-12 q-pb-lg" label="主讲内容" />
<div style="margin:30px 10px 70px 0;"> <div style="margin:30px 10px 70px 0;">
<q-btn class="q-mr-md" label="取消" @click="closeEditOrder" /> <q-btn class="q-mr-md" label="取消" @click="closeEditOrder" />
</div> </div>
...@@ -60,10 +64,9 @@ ...@@ -60,10 +64,9 @@
} }
}, },
created() { created() {
},
mounted() {
}, },
mounted() {},
watch: { watch: {
}, },
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<div style="margin-bottom:20px;"> <div style="margin-bottom:20px;">
<div class="Appoint_Line"></div>预约申请 <div class="Appoint_Line"></div>预约申请
</div> </div>
<q-btn color="primary" label="选择试听课" @click="isShowTeacher=true" style="margin-bottom:20px;" />
<q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" :rules="[val => !!val || '请选择预约日期']" <q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" :rules="[val => !!val || '请选择预约日期']"
ref="ClassDate" mask="date" label="预约日期"> ref="ClassDate" mask="date" label="预约日期">
<template v-slot:append> <template v-slot:append>
...@@ -57,12 +58,9 @@ ...@@ -57,12 +58,9 @@
<q-select filled stack-label option-value="Name" option-label="Name" v-model="addMsg.ClassContent" <q-select filled stack-label option-value="Name" option-label="Name" v-model="addMsg.ClassContent"
ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false" ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false"
class="col-6 q-pb-lg" emit-value map-options /> class="col-6 q-pb-lg" emit-value map-options />
<div style="display:flex;align-items:center;"> <q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId"
<q-select filled stack-label option-value="TId" style="width:90%" option-label="TeacherName" ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false" class="col-6 q-pb-lg" emit-value
v-model="addMsg.TeacherId" ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false" map-options />
class="col-6 q-pb-lg" emit-value map-options />
<div style="margin:-20px 0 0 9px;cursor:pointer;" @click="isShowTeacher=true">选择</div>
</div>
<q-select filled stack-label option-value="RoomId" option-label="RoomName" v-model="addMsg.ClassRoomId" <q-select filled stack-label option-value="RoomId" option-label="RoomName" v-model="addMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" :dense="false" class="col-6 q-pb-lg" emit-value ref="ClassRoomId" :options="ClassRoomList" label="关联教室" :dense="false" class="col-6 q-pb-lg" emit-value
map-options /> map-options />
...@@ -180,7 +178,6 @@ ...@@ -180,7 +178,6 @@
if (this.saveObj) { if (this.saveObj) {
this.addMsg.Visitor_Id = this.saveObj.Id; this.addMsg.Visitor_Id = this.saveObj.Id;
} }
this.$refs.ClassDate.validate(); this.$refs.ClassDate.validate();
this.$refs.ClassContent.validate(); this.$refs.ClassContent.validate();
if (this.addMsg.ClassTime == '') { if (this.addMsg.ClassTime == '') {
...@@ -192,7 +189,7 @@ ...@@ -192,7 +189,7 @@
}) })
return; return;
} }
if(this.addMsg.EndTime == ''){ if (this.addMsg.EndTime == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -212,8 +209,8 @@ ...@@ -212,8 +209,8 @@
position: 'top' position: 'top'
}) })
this.$emit('success'); this.$emit('success');
}else{ } else {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
timeout: 2000, timeout: 2000,
...@@ -226,9 +223,15 @@ ...@@ -226,9 +223,15 @@
}, },
//子组件选中传值 //子组件选中传值
getchildInfo(obj) { getchildInfo(obj) {
this.addMsg.TeacherId = obj.TeacherId; if (obj) {
this.addMsg.ClassRoomId = obj.ClassRoomId; this.addMsg.TeacherId = obj.TeacherId;
this.addMsg.ReserveClassId = obj.ReserveClassId; this.addMsg.ClassRoomId = obj.ClassRoomId;
this.addMsg.ReserveClassId = obj.ReserveClassId;
this.addMsg.ClassDate = obj.ClassDateStr;
this.addMsg.ClassTime = obj.ClassTime;
this.addMsg.EndTime = obj.EndTime;
this.addMsg.ClassContent = obj.ClassContent;
}
} }
} }
} }
......
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;"> <q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">试听课信息</div>
</q-card-section>
<q-card-section>
<div class="row wrap">
<div class="col-6 q-pb-lg q-pr-lg">
<q-field borderless>
 <template v-slot:prepend>
<q-input filled v-model="msg.StartClassDate" mask="date" label="开始日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="StartClassDate" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.StartClassDate" @input="getStarttime()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</template>
<template v-slot:append>
<q-input filled v-model="msg.EndClassDate" mask="date" label="结束日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="EndClassDate" transition-show="scale" transition-hide="scale">
<q-date v-model="msg.EndClassDate" @input="getEndTime()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</template>
</q-field>
</div>
<div class="col-6 q-pr-lg q-pb-lg">
<q-select @input="resetSearch" filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId"
:options="TeacherList" emit-value map-options label="老师" clearable />
</div>
</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" style="margin-top:20px;" flat class="sticky-column-table sticky-right-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" style="margin-top:20px;" flat
separator="none" :data="dataList" :columns="columns" row-key="name"> class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">人员信息</div> <div class="col-2 q-table__title"></div>
<q-space /> <q-space />
</template> </template>
<template v-slot:body-cell-ClassTime="props">
<q-td :props="props">
{{props.row.ClassTime}}-{{props.row.EndTime}}
</q-td>
</template>
<template v-slot:body-cell-Id="props"> <template v-slot:body-cell-Id="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" @click="getStuInfo(props.row)" style="font-weight:400" label="报入" /> <q-btn flat size="xs" icon="edit" color="accent" @click="getStuInfo(props.row)" style="font-weight:400"
label="报入" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -21,7 +65,7 @@ ...@@ -21,7 +65,7 @@
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" /> <q-btn label="关闭" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -31,7 +75,9 @@ ...@@ -31,7 +75,9 @@
import { import {
GetReserveClassPage GetReserveClassPage
} from '../../api/scheduling/schedu' } from '../../api/scheduling/schedu'
import {
getTeacherDropDownList
} from "../../api/school/index";
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -39,12 +85,15 @@ ...@@ -39,12 +85,15 @@
persistent: true, persistent: true,
loading: false, loading: false,
msg: { msg: {
pageIndex:1, pageIndex: 1,
pageSize:10, pageSize: 10,
rowsPerPage: 10, rowsPerPage: 10,
StartClassDate:'' StartClassDate: "", //开始时间
EndClassDate: "", //结束时间
TeacherId: "", //教师编号
ClassRoomId: "", //教室编号
}, },
PageCount:0, PageCount: 0,
columns: [{ columns: [{
name: 'TeacherName', name: 'TeacherName',
label: '老师', label: '老师',
...@@ -86,17 +135,32 @@ ...@@ -86,17 +135,32 @@
label: '操作', label: '操作',
} }
], ],
dataList:[], TeacherList: [], //教师列表
StuObj:{} dataList: [],
StuObj: {}
} }
}, },
created() {}, created() {
this.GetTeacherList();
},
mounted() { mounted() {
var day = new Date(); let nowDay = new Date();
this.msg.StartClassDate = day.getFullYear()+"-" + (day.getMonth()+1) + "-" + day.getDate(); var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
var currentDay= year + '-' + (month<10?('0'+month):month) + '-' + day;
this.msg.StartClassDate = currentDay;
this.getList(); this.getList();
}, },
methods: { methods: {
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
}
});
},
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit('close')
this.persistent = false this.persistent = false
...@@ -113,26 +177,39 @@ ...@@ -113,26 +177,39 @@
//获取课程系列分页列表 //获取课程系列分页列表
getList() { getList() {
GetReserveClassPage(this.msg).then(res => { GetReserveClassPage(this.msg).then(res => {
if(res.Code==1){ if (res.Code == 1) {
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.PageCount = res.Data.PageCount; this.PageCount = res.Data.PageCount;
} }
}) })
}, },
//点击报入 //点击报入
getStuInfo(item){ getStuInfo(item) {
if(item){ if (item) {
this.StuObj.ClassRoomId = item.ClassRoomId; this.StuObj.ClassRoomId = item.ClassRoomId;
this.StuObj.TeacherId = item.TeacherId; this.StuObj.TeacherId = item.TeacherId;
this.StuObj.ReserveClassId = item.ReserveClassId; this.StuObj.ReserveClassId = item.ReserveClassId;
this.StuObj.ClassDateStr = item.ClassDateStr;
this.StuObj.ClassTime = item.ClassTime;
this.StuObj.EndTime = item.EndTime;
this.StuObj.ClassContent = item.ClassContent;
} }
this.$emit('getchildInfo',this.StuObj); this.$emit('getchildInfo', this.StuObj);
this.closeSaveForm(); this.closeSaveForm();
},
getStarttime() {
this.$refs.StartClassDate.hide();
this.resetSearch();
},
getEndTime()
{
this.$refs.EndClassDate.hide();
this.resetSearch();
} }
}, },
} }
</script> </script>
<style> <style>
</style> </style>
...@@ -21,30 +21,28 @@ ...@@ -21,30 +21,28 @@
</div> </div>
</div> </div>
<div style="padding:20px 15px;"> <div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" @keyup.native="checkInteger(OrderMsg,'GuestNum')" <q-input filled stack-label maxlength="100" :disable="true" :dense="false"
v-model="OrderMsg.GuestNum" @input="changePrice(),countPrice()" class="col-12" label="人数" @keyup.native="checkInteger(OrderMsg,'GuestNum')" v-model="OrderMsg.GuestNum"
:rules="[val => !!val || '请填写人数']" /> @input="changePrice(),countPrice()" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" />
<q-select filled v-model="OrderMsg.ClassId" class="q-pb-lg" ref="ClassId" <q-select filled v-model="OrderMsg.ClassId" class="q-pb-lg" ref="ClassId" :options="classList"
:options="classList" option-label="ClassName" option-value="ClassId" emit-value map-options option-label="ClassName" option-value="ClassId" emit-value map-options :rules="[val => !!val || '请选择班级']"
:rules="[val => !!val || '请选择班级']" label="选择班级" @input="getClassList(OrderMsg.ClassId)"/> label="选择班级" @input="getClassList(OrderMsg.ClassId)" />
<q-select filled option-value="CourseId" option-label="CourseName" <q-select filled option-value="CourseId" option-label="CourseName" ref="CourseId" v-model="OrderMsg.CourseId"
ref="CourseId" v-model="OrderMsg.CourseId" :options="CourseList" emit-value map-options class="q-pb-lg" :options="CourseList" emit-value map-options class="q-pb-lg" :rules="[val => !!val || '请选择课程']" label="选择课程"
:rules="[val => !!val || '请选择课程']" label="选择课程" @input="changePrice" /> @input="changePrice" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price"
:disable="IsShowUpPrice==true?false:true" @blur="countPrice" class="col-12" label="成交单价" :disable="IsShowUpPrice==true?false:true" @blur="countPrice" class="col-12" label="成交单价"
:rules="[val => !!val || '请填成交单价']" /> :rules="[val => !!val || '请填成交单价']" />
<q-toggle v-model="IsShowUpPrice" label="高于定价收生" class="q-mb-md" /> <q-toggle v-model="IsShowUpPrice" label="高于定价收生" class="q-mb-md" />
<q-input filled stack-label :dense="false" maxlength="10" <q-input filled stack-label :dense="false" maxlength="10" @keyup.native="checkPrice(OrderMsg,'PreferPrice')"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg" label="应收" />
label="应收" /> <q-select standout="bg-primary text-white" option-value="Id" option-label="Name" v-model="OrderMsg.OrderSource"
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name" :options="SourceEnumList" emit-value map-options class="q-pb-lg" label="客人来源" />
v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg" <q-select v-model="OrderMsg.HelpEnterId" :options="EmployeeList" filled use-input label="协助老师"
label="客人来源" /> option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6 q-pb-lg" emit-value map-options
<q-select v-model="OrderMsg.HelpEnterId" :options="EmployeeList" filled @filter="filterFn">
use-input label="协助人员" option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6 q-pb-lg"
emit-value map-options @filter="filterFn">
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -53,16 +51,14 @@ ...@@ -53,16 +51,14 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-input v-if="OrderMsg.OrderSource==3" filled stack-label :dense="false" <q-input v-if="OrderMsg.OrderSource==3" filled stack-label :dense="false" maxlength="50"
maxlength="50" v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" /> v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" />
<q-input v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false" <q-input v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false" maxlength="50"
maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" /> v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" />
<q-toggle v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1" <q-toggle v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1" label="是否少价" class="q-mb-md" />
label="是否少价" class="q-mb-md" /> <q-input v-if="OrderMsg.IsLessPrice==1" @keyup.native="checkPrice(OrderMsg,'LessPrice')" maxlength="10" filled
<q-input v-if="OrderMsg.IsLessPrice==1" stack-label :dense="false" v-model="OrderMsg.LessPrice" class="col-12" label="少价金额" />
@keyup.native="checkPrice(OrderMsg,'LessPrice')" maxlength="10" filled stack-label :dense="false"
v-model="OrderMsg.LessPrice" class="col-12" label="少价金额" />
<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 70px 0;"> <div style="margin:30px 10px 70px 0;">
...@@ -88,8 +84,8 @@ ...@@ -88,8 +84,8 @@
queryEmployee queryEmployee
} from '../../api/users/user'; //获取员工 } from '../../api/users/user'; //获取员工
import { import {
getClassPage_ck getClassDropDownList
} from '../../api/school/index';//获取校区列表 } from '../../api/school/index'; //获取校区列表
import { import {
mapState mapState
...@@ -106,9 +102,9 @@ ...@@ -106,9 +102,9 @@
data() { data() {
return { return {
IsShowEditOrder: true, IsShowEditOrder: true,
classList:[], classList: [],
OrderMsg: { OrderMsg: {
VisitorReserveId:0, VisitorReserveId: 0,
ClassId: 0, //班级编号 ClassId: 0, //班级编号
GuestNum: 1, //人数 GuestNum: 1, //人数
Unit_Price: 0, Unit_Price: 0,
...@@ -119,7 +115,7 @@ ...@@ -119,7 +115,7 @@
OrderId: 0, OrderId: 0,
OrderType: 1, //订单类型(1-班级课程订单,2-留学就业订单) OrderType: 1, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号 SourceId: 0, //来源编号
HelpEnterId: 0, //协助人员编号 HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行 GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行 EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少 IsLessPrice: 0, //是否少价 0 不少 1 少
...@@ -144,26 +140,24 @@ ...@@ -144,26 +140,24 @@
created() { created() {
this.getOrderSEList(); this.getOrderSEList();
this.getEmployee(); this.getEmployee();
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach(x => {
if (x.FunctionCode == 'E_ModifyStudyOrderPrice') {
}
})
}
}, },
mounted() { mounted() {
this.initData()
this.getClass(); this.getClass();
}, },
watch: { watch: {
}, },
methods: { methods: {
//获取课程信息 initData() {
if (this.saveObj.AccountId && this.saveObj.AccountId > 0) {
this.OrderMsg.HelpEnterId = this.saveObj.AccountId;
}
},
//获取课程信息
getClassList(ClassId) { getClassList(ClassId) {
this.OrderMsg.CourseId=''; this.OrderMsg.CourseId = '';
this.CourseList = []; this.CourseList = [];
var qMsg = { var qMsg = {
ClassId: ClassId ClassId: ClassId
...@@ -174,13 +168,15 @@ ...@@ -174,13 +168,15 @@
} }
}); });
}, },
//获取班级列表 //获取班级列表
getClass() { getClass() {
getClassPage_ck({}).then(res => { getClassDropDownList({
IsAddDefault: 0,
IsQuerySurplus: 1
}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
let tempArray = res.Data; let tempArray = res.Data;
if (!tempArray) { if (!tempArray) {
tempArray = []; tempArray = [];
} }
tempArray.unshift({ tempArray.unshift({
...@@ -191,7 +187,6 @@ ...@@ -191,7 +187,6 @@
} }
}) })
}, },
//选择课程切换价格 //选择课程切换价格
changePrice() { changePrice() {
let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId); let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
......
...@@ -541,7 +541,6 @@ ...@@ -541,7 +541,6 @@
this.loading = false this.loading = false
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
console.log(500, this.dataList)
} }
}) })
}, },
......
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
v-model="msg.Q_ReserveStatus" ref="Q_ReserveStatus" :options="statusList" label="状态" clearable v-model="msg.Q_ReserveStatus" ref="Q_ReserveStatus" :options="statusList" label="状态" clearable
:dense="false" class="col-6 q-pb-lg" emit-value map-options /> :dense="false" class="col-6 q-pb-lg" emit-value map-options />
</div> </div>
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.Id" label="预约编号"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-4"> <div class="col-4">
<div class="col-4 Sysuser_Date"> <div class="col-4 Sysuser_Date">
<q-field filled> <q-field filled>
...@@ -44,17 +48,18 @@ ...@@ -44,17 +48,18 @@
</div> </div>
</div> </div>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
separator="none" :data="dataList" :columns="columns" row-key="name"> class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">约课管理</div> <div class="col-2 q-table__title">约课管理</div>
<q-space /> <q-space />
</template> </template>
<template v-slot:body-cell-OrderId="props"> <template v-slot:body-cell-OrderId="props">
<q-td :props="props"> <q-td :props="props">
<template v-if="props.row.OrderId && props.row.OrderId>0"> <template v-if="props.row.OrderId && props.row.OrderId>0">
<span style="color:blue;cursor:pointer" @click="goOrderStatistics(props.row.OrderId)">{{props.row.OrderId}}</span> <span style="color:blue;cursor:pointer"
@click="goOrderStatistics(props.row.OrderId)">{{props.row.OrderId}}</span>
</template> </template>
</q-td> </q-td>
</template> </template>
...@@ -74,7 +79,7 @@ ...@@ -74,7 +79,7 @@
<span style="color:green;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span> <span style="color:green;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span>
</template> </template>
<template v-if="props.row.ReserveStatus==2"> <template v-if="props.row.ReserveStatus==2">
<span style="color:#ff00ff;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span> <span style="color:#ff00ff;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span>
  <q-tooltip :offset="[10, 10]">   <q-tooltip :offset="[10, 10]">
   {{props.row.Remark}}    {{props.row.Remark}}
 </q-tooltip>  </q-tooltip>
...@@ -91,8 +96,8 @@ ...@@ -91,8 +96,8 @@
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent" <q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent"
style="font-weight:400" label="详情" /> style="font-weight:400" label="详情" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400;" label="删除" <q-btn flat size="xs" v-if="props.row.ReserveStatus!=1" icon="delete" color="negative"
@click="deleteAppoint(props.row)" /> style="font-weight:400;" label="删除" @click="deleteAppoint(props.row)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;" <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"
v-if="props.row.ReserveStatus==0"> v-if="props.row.ReserveStatus==0">
<q-list> <q-list>
...@@ -120,12 +125,11 @@ ...@@ -120,12 +125,11 @@
:input="true" @input="changePage" /> :input="true" @input="changePage" />
</template> </template>
</q-table> </q-table>
<yuekeForm v-if="isShowYue" :ChoiceType="ChoiceType" :save-obj="visitorItem" @close="closeYuekeForm" <yuekeForm v-if="isShowYue" :ChoiceType="ChoiceType" :save-obj="visitorItem" @close="closeVisitorForm"
@success="refreshPage"></yuekeForm> @success="refreshPage"></yuekeForm>
<exorderForm v-if="isShowExOrder" :save-obj="orderObj" @close="closeOrderForm" @success="refreshPage"></exorderForm> <exorderForm v-if="isShowExOrder" :save-obj="visitorItem" @close="closeVisitorForm" @success="refreshPage">
<appodetailForm v-if="isShowDetail" :save-obj="orderObj" @close="closeAppForm"></appodetailForm>
<exorderForm v-if="isShowExOrder" :save-obj="visitorItem" @close="closeOrderForm" @success="refreshPage">
</exorderForm> </exorderForm>
<appodetailForm v-if="isShowDetail" :save-obj="visitorItem" @close="closeVisitorForm"></appodetailForm>
</div> </div>
</template> </template>
...@@ -162,6 +166,7 @@ ...@@ -162,6 +166,7 @@
ClassRoomId: "", ClassRoomId: "",
Q_ReserveStatus: "", //状态 Q_ReserveStatus: "", //状态
VisitorName: "", //客户名称 VisitorName: "", //客户名称
Id: "",
}, },
dataList: [], dataList: [],
loading: false, loading: false,
...@@ -208,7 +213,6 @@ ...@@ -208,7 +213,6 @@
field: 'ClassContent', field: 'ClassContent',
align: 'left' align: 'left'
}, },
{ {
name: 'ReserveStatusStr', name: 'ReserveStatusStr',
label: '状态', label: '状态',
...@@ -250,11 +254,14 @@ ...@@ -250,11 +254,14 @@
ChoiceType: 0, ChoiceType: 0,
visitorItem: {}, //选中的对象 visitorItem: {}, //选中的对象
isShowExOrder: false, isShowExOrder: false,
orderObj: {},
isShowDetail: false //显示详情 isShowDetail: false //显示详情
} }
}, },
created() { created() {
if (this.$route.query.Id) {
this.msg.Id = this.$route.query.Id;
}
this.GetTeacherList(); this.GetTeacherList();
this.getClassRoomList(); this.getClassRoomList();
}, },
...@@ -264,6 +271,7 @@ ...@@ -264,6 +271,7 @@
var month = nowDay.getMonth() + 1; //月 var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日 var day = nowDay.getDate(); //日
this.msg.StartClassDate = year + '-' + month + '-' + day; this.msg.StartClassDate = year + '-' + month + '-' + day;
this.getList() this.getList()
}, },
methods: { methods: {
...@@ -308,17 +316,17 @@ ...@@ -308,17 +316,17 @@
this.visitorItem = item; this.visitorItem = item;
}, },
//关闭弹窗 //关闭弹窗
closeYuekeForm() { closeVisitorForm() {
this.isShowYue = false; this.isShowYue = false;
},
closeOrderForm() {
this.isShowExOrder = false; this.isShowExOrder = false;
},
closeAppForm() {
this.isShowDetail = false; this.isShowDetail = false;
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
this.isShowYue = false;
this.isShowExOrder = false;
this.isShowDetail = false;
this.getList(); this.getList();
}, },
ExchangeOrder(item) { ExchangeOrder(item) {
...@@ -327,17 +335,17 @@ ...@@ -327,17 +335,17 @@
}, },
//查看详情 //查看详情
getDetail(item) { getDetail(item) {
this.orderObj = item; this.visitorItem = item;
this.isShowDetail = true; this.isShowDetail = true;
}, },
//跳转到报名统计 //跳转到报名统计
goOrderStatistics(id){ goOrderStatistics(id) {
this.OpenNewUrl("/sale/orderStatistics", { this.OpenNewUrl("/sale/orderStatistics", {
OrderId: id OrderId: id
}); });
}, },
//删除约课管理 //删除约课管理
deleteAppoint(item){ deleteAppoint(item) {
let delMsg = { let delMsg = {
Id: item.Id Id: item.Id
}; };
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -12,31 +13,32 @@ ...@@ -12,31 +13,32 @@
<div class="col-4 Sysuser_Date"> <div class="col-4 Sysuser_Date">
<q-field filled> <q-field filled>
 <template v-slot:control>  <template v-slot:control>
<el-date-picker v-model="msg.StartClassDate" value-format="yyyy-MM-dd" type="date" placeholder="开始时间" size="small" <el-date-picker v-model="msg.StartClassDate" value-format="yyyy-MM-dd" type="date" placeholder="开始时间"
style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi"> size="small" style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker> </el-date-picker>
<el-date-picker v-model="msg.EndClassDate" value-format="yyyy-MM-dd" type="date" placeholder="结束时间" size="small" <el-date-picker v-model="msg.EndClassDate" value-format="yyyy-MM-dd" type="date" placeholder="结束时间"
style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi"> size="small" style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" filled option-value="TId" option-label="TeacherName" <q-select @input="resetSearch" filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId"
v-model="msg.TeacherId" :options="TeacherList" emit-value map-options label="老师" clearable /> :options="TeacherList" emit-value map-options label="老师" clearable />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" filled stack-label option-value="RoomId" option-label="RoomName" v-model="msg.ClassRoomId" <q-select @input="resetSearch" filled stack-label option-value="RoomId" option-label="RoomName"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" clearable :dense="false" class="col-6 q-pb-lg" emit-value v-model="msg.ClassRoomId" ref="ClassRoomId" :options="ClassRoomList" label="关联教室" clearable :dense="false"
map-options /> class="col-6 q-pb-lg" emit-value map-options />
</div> </div>
</div> </div>
</div> </div>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
separator="none" :data="dataList" :columns="columns" row-key="name"> class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">试听管理</div> <div class="col-2 q-table__title">试听班级管理</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="添加试听" @click="editVisitor(null)" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="添加试听" @click="editVisitor(null)" />
...@@ -49,10 +51,27 @@ ...@@ -49,10 +51,27 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-JoinNum="props">
<q-td auto-width :props="props" style="width:25%">
<span style="color:red;" :class="{'underLine':(props.row.VisitorList&&props.row.VisitorList.length>0)}">
{{props.row.JoinNum}}
<q-popup-proxy v-if="props.row.VisitorList&&props.row.VisitorList.length>0">
<div style="min-width:360px;max-width:360px;">
<q-banner>
<q-chip dense v-for="(subItem,subindex) in props.row.VisitorList" :key="subindex">
{{subItem.VisitorName}}</q-chip>
</q-banner>
</div>
</q-popup-proxy>
</span>
</q-td>
</template>
<template v-slot:body-cell-TeacherId="props"> <template v-slot:body-cell-TeacherId="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" @click="editVisitor(props.row)" style="font-weight:400" label="修改" /> <q-btn flat size="xs" icon="edit" color="accent" @click="editVisitor(props.row)" style="font-weight:400"
<q-btn flat size="xs" icon="delete" @click="deleteReserve(props.row)" color="negative" style="font-weight:400" label="删除" /> label="修改" />
<q-btn flat size="xs" icon="delete" @click="deleteReserve(props.row)" color="negative" style="font-weight:400"
label="删除" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -60,7 +79,8 @@ ...@@ -60,7 +79,8 @@
:input="true" @input="changePage" /> :input="true" @input="changePage" />
</template> </template>
</q-table> </q-table>
<reserveForm v-if="isShowReserve" :save-obj="reserveObj" @close="closeReserveForm" @success="refreshPage"></reserveForm> <reserveForm v-if="isShowReserve" :save-obj="reserveObj" @close="closeReserveForm" @success="refreshPage">
</reserveForm>
</div> </div>
</template> </template>
...@@ -153,7 +173,7 @@ ...@@ -153,7 +173,7 @@
], ],
TeacherList: [], TeacherList: [],
ClassRoomList: [], ClassRoomList: [],
isShowReserve:false, isShowReserve: false,
reserveObj: {} reserveObj: {}
} }
}, },
...@@ -204,7 +224,7 @@ ...@@ -204,7 +224,7 @@
}) })
}, },
//编辑试听 //编辑试听
editVisitor(obj){ editVisitor(obj) {
if (obj) { if (obj) {
this.reserveObj = obj this.reserveObj = obj
} else { } else {
...@@ -213,7 +233,7 @@ ...@@ -213,7 +233,7 @@
this.isShowReserve = true; this.isShowReserve = true;
}, },
//删除试听课 //删除试听课
deleteReserve(item){ deleteReserve(item) {
let delMsg = { let delMsg = {
ReserveClassId: item.ReserveClassId, ReserveClassId: item.ReserveClassId,
}; };
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent" <q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent"
style="font-weight:400" label="详情" /> style="font-weight:400" label="详情" />
<q-btn flat size="xs" @click="getAppointment(props.row)" icon="iconfont icon-ziyuan1" color="accent" <q-btn flat size="xs" @click="getAppointment(props.row)" icon="iconfont icon-ziyuan1" color="accent"
style="font-weight:400;display:none;" label="申请约课" /> style="font-weight:400; " label="申请约课" />
</q-td> </q-td>
</template> </template>
......
...@@ -11,12 +11,12 @@ export default { ...@@ -11,12 +11,12 @@ export default {
Vue.prototype.MsgBus = MsgBus; Vue.prototype.MsgBus = MsgBus;
//消息成功提示 //消息成功提示
Vue.prototype.Success = function (msg) { Vue.prototype.Success = function (msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
type: "success" type: "success"
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function (msg) {
this.$message({ this.$message({
...@@ -45,10 +45,10 @@ export default { ...@@ -45,10 +45,10 @@ export default {
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
if (typeof callback === 'function') { if (typeof callback === 'function') {
callback(); callback();
...@@ -71,13 +71,13 @@ export default { ...@@ -71,13 +71,13 @@ export default {
Vue.prototype.md5 = md5; Vue.prototype.md5 = md5;
//ERP本地缓存 //ERP本地缓存
Vue.prototype.getLocalStorage = function () { Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["loginUserInfo"]; var localStorageData = window.localStorage["loginUserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') { if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData).data; return JSON.parse(localStorageData).data;
} else { } else {
return null; return null;
} }
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = 'http://192.168.20.24'; let domainUrl = 'http://192.168.20.24';
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) { }); }).catch(function (res) {});
}, },
//HTTP提交数据 //HTTP提交数据
...@@ -197,11 +197,11 @@ export default { ...@@ -197,11 +197,11 @@ export default {
"uName": uName //用户名称 "uName": uName //用户名称
} }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path 'Referer-Viitto': this.$route.path
} }
}) })
.then(res => { .then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({ this.$router.push({
...@@ -261,16 +261,15 @@ export default { ...@@ -261,16 +261,15 @@ export default {
//HTTP提交数据-电商 //HTTP提交数据-电商
Vue.prototype.apipostDS = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipostDS = function (cmd, msg, successCall, faildCall) {
var apiurl = this.domainManager().mallUrl + cmd; var apiurl = this.domainManager().mallUrl + cmd;
console.log(337, apiurl)
var postData = this.GetPostDataDS(cmd, msg, ""); var postData = this.GetPostDataDS(cmd, msg, "");
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path 'Referer-Viitto': this.$route.path
} }
}) })
.then(res => { .then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { } else if (res.resultCode == 10005) { if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {} else if (res.resultCode == 10005) {
this.$router.go(-1); this.$router.go(-1);
} else { } else {
successCall(res); successCall(res);
...@@ -280,17 +279,17 @@ export default { ...@@ -280,17 +279,17 @@ export default {
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun //价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) { Vue.prototype.moneyFormat = function (value) {
let nStr = Number(value).toFixed(2) let nStr = Number(value).toFixed(2)
nStr += ''; nStr += '';
let x = nStr.split('.'); let x = nStr.split('.');
let x1 = x[0]; let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : ''; let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/; var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) { while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2'); x1 = x1.replace(rgx, '$1' + ',' + '$2');
} }
return x1 + x2; return x1 + x2;
}, },
//验证只能输入整数【负数:isMinus传true】 //验证只能输入整数【负数:isMinus传true】
Vue.prototype.checkInteger = function (item, filed, isMinus) { Vue.prototype.checkInteger = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串 var value = "" + item[filed]; //转字符串
...@@ -419,9 +418,9 @@ export default { ...@@ -419,9 +418,9 @@ export default {
if ((fileObj.type == "image/png" || fileObj.type == "image/jpeg") && fileObj.size > maxSize) { if ((fileObj.type == "image/png" || fileObj.type == "image/jpeg") && fileObj.size > maxSize) {
let that = this let that = this
lrz(fileObj, { lrz(fileObj, {
width: 750, width: 750,
quality: 0.8 quality: 0.8
}) })
.then(function (rst) { .then(function (rst) {
//成功时执行 //成功时执行
var arr = rst.base64.split(','); var arr = rst.base64.split(',');
...@@ -503,7 +502,7 @@ export default { ...@@ -503,7 +502,7 @@ export default {
Key: newFileName, //文件名 Key: newFileName, //文件名
StorageClass: 'STANDARD', StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象 Body: fileObj, // 上传文件对象
onProgress: function (progressData) { } onProgress: function (progressData) {}
}, function (err, data) { }, function (err, data) {
if (data && data.statusCode == 200) { if (data && data.statusCode == 200) {
var uploadResult = { var uploadResult = {
...@@ -542,7 +541,7 @@ export default { ...@@ -542,7 +541,7 @@ export default {
var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix; var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
this.Info('上传中...') this.Info('上传中...')
var result = oss.multipartUpload(newFileName, fileObj, { var result = oss.multipartUpload(newFileName, fileObj, {
progress: function* (p) { } progress: function* (p) {}
}).then(res => { }).then(res => {
var uploadResult = { var uploadResult = {
resultCode: 1, resultCode: 1,
......
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