Commit 75390670 authored by zhengke's avatar zhengke

修改

parent 8450d4db
...@@ -101,17 +101,51 @@ ...@@ -101,17 +101,51 @@
</template> </template>
</td> </td>
<td style="border:none">{{item.GuestNum}}人</td> <td style="border:none">{{item.GuestNum}}人</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td> <td style="border:none">
<template v-if="item.Class_Price">
{{item.Class_Price.toFixed(2)}}
</template>
</td>
<td :style="{color:item.Class_Price!=item.Unit_Price?'var(--q-color-negative)':'','border':'none'}"> <td :style="{color:item.Class_Price!=item.Unit_Price?'var(--q-color-negative)':'','border':'none'}">
<template v-if="item.Unit_Price">
{{item.Unit_Price.toFixed(2)}} {{item.Unit_Price.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.PreferPrice">
{{item.PreferPrice.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.Income">
{{item.Income.toFixed(2)}}
</template>
</td>
<td style="color:var(--q-color-negative);border:none">
<template v-if="item.DiscountMoney">
{{item.DiscountMoney.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.LessPrice">
{{item.LessPrice.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.Refund">
{{item.Refund.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.PlatformTax">
{{item.PlatformTax.toFixed(2)}}
</template>
</td>
<td style="color:#2961FE;border:none">
<template v-if="item.DueInMoney">
{{item.DueInMoney.toFixed(2)}}
</template>
</td> </td>
<td style="border:none">{{item.PreferPrice.toFixed(2)}}</td>
<td style="border:none">{{item.Income.toFixed(2)}}</td>
<td style="color:var(--q-color-negative);border:none">{{item.DiscountMoney.toFixed(2)}}</td>
<td style="border:none">{{item.LessPrice.toFixed(2)}}</td>
<td style="border:none">{{item.Refund.toFixed(2)}}</td>
<td style="border:none">{{item.PlatformTax.toFixed(2)}}</td>
<td style="color:#2961FE;border:none">{{item.DueInMoney.toFixed(2)}}</td>
<td style="border:none"> <td style="border:none">
<div style="background: rgba(2, 196, 153, 0.2);width: 80px;border-radius: 2px;text-align: center"> <div style="background: rgba(2, 196, 153, 0.2);width: 80px;border-radius: 2px;text-align: center">
<span style="color: #02C499">{{item.OrderStateName}}</span> <span style="color: #02C499">{{item.OrderStateName}}</span>
...@@ -457,17 +491,51 @@ ...@@ -457,17 +491,51 @@
<div style="font-weight: bold;color:#2961FE;" @click="getClassInfo(item)">{{item.ClassName}}</div> <div style="font-weight: bold;color:#2961FE;" @click="getClassInfo(item)">{{item.ClassName}}</div>
</td> </td>
<td style="border:none">{{item.GuestNum}}人</td> <td style="border:none">{{item.GuestNum}}人</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td> <td style="border:none">
<template v-if="item.Class_Price">
{{item.Class_Price.toFixed(2)}}
</template>
</td>
<td :style="{color:item.Class_Price!=item.Unit_Price?'var(--q-color-negative)':'','border':'none'}"> <td :style="{color:item.Class_Price!=item.Unit_Price?'var(--q-color-negative)':'','border':'none'}">
<template v-if="item.Unit_Price">
{{item.Unit_Price.toFixed(2)}} {{item.Unit_Price.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.PreferPrice">
{{item.PreferPrice.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.Income">
{{item.Income.toFixed(2)}}
</template>
</td>
<td style="color:var(--q-color-negative);border:none">
<template v-if="item.DiscountMoney">
{{item.DiscountMoney.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.LessPrice">
{{item.LessPrice.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.Refund">
{{item.Refund.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.PlatformTax">
{{item.PlatformTax.toFixed(2)}}
</template>
</td>
<td style="color:#2961FE;border:none">
<template v-if="item.DueInMoney">
{{item.DueInMoney.toFixed(2)}}
</template>
</td> </td>
<td style="border:none">{{item.PreferPrice.toFixed(2)}}</td>
<td style="border:none">{{item.Income.toFixed(2)}}</td>
<td style="color:var(--q-color-negative);border:none">{{item.DiscountMoney.toFixed(2)}}</td>
<td style="border:none">{{item.LessPrice.toFixed(2)}}</td>
<td style="border:none">{{item.Refund.toFixed(2)}}</td>
<td style="border:none">{{item.PlatformTax.toFixed(2)}}</td>
<td style="color:#2961FE;border:none">{{item.DueInMoney.toFixed(2)}}</td>
<td style="border:none"> <td style="border:none">
<div style="background: rgba(2, 196, 153, 0.2);width: 80px;border-radius: 2px;text-align: center"> <div style="background: rgba(2, 196, 153, 0.2);width: 80px;border-radius: 2px;text-align: center">
<span style="color: #02C499">{{item.OrderStateName}}</span> <span style="color: #02C499">{{item.OrderStateName}}</span>
......
...@@ -40,12 +40,12 @@ ...@@ -40,12 +40,12 @@
<div class="row wrap"> <div class="row wrap">
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestName" ref="GuestName" label="姓名" <q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestName" ref="GuestName" label="姓名"
:rules="[val => !!val || '姓名']" /> :rules="[val => !!val || '姓名']" />
<q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.Profession" label="职业"
:rules="[val => !!val || '职业']" />
<div class="col-6 q-pb-lg q-pr-lg"> <div class="col-6 q-pb-lg q-pr-lg">
<q-radio v-model="addMsg.Sex" val="1" label="男" /> <q-radio v-model="addMsg.Sex" val="1" label="男" />
<q-radio v-model="addMsg.Sex" val="2" label="女" /> <q-radio v-model="addMsg.Sex" val="2" label="女" />
</div> </div>
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.Profession" label="职业"
:rules="[val => !!val || '职业']" />
<q-input filled v-model="addMsg.BirthDate" :rules="[val => !!val || '请选择出生日期']" class="col-6 q-pb-lg" ref="BirthDate" mask="date" label="出生日期"> <q-input filled v-model="addMsg.BirthDate" :rules="[val => !!val || '请选择出生日期']" class="col-6 q-pb-lg" ref="BirthDate" mask="date" label="出生日期">
<template v-slot:append> <template v-slot:append>
...@@ -73,6 +73,13 @@ ...@@ -73,6 +73,13 @@
<q-select class="col-6 q-pb-lg" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select class="col-6 q-pb-lg" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="addMsg.GuestSource" :options="OFList" emit-value map-options label="客人来源" /> v-model="addMsg.GuestSource" :options="OFList" emit-value map-options label="客人来源" />
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.ContactAddress" label="现居住地址" /> <q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.ContactAddress" label="现居住地址" />
<div class="col-6 q-pr-lg q-pb-lg">
<q-uploader style="display: inline-block;height: 150px;max-width: 100%; background-repeat:no-repeat"
:style="{'background-image':'url(' + addMsg.StuIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="教师头像" :max-file-size="5*1024*1024" accept=".jpg, image/*" auto-upload
:factory="uploadFile" no-thumbnails>
</q-uploader>
</div>
</div> </div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none" v-if="msg.SourceId>0"> <q-card-section class="q-pt-none" v-if="msg.SourceId>0">
...@@ -104,6 +111,13 @@ ...@@ -104,6 +111,13 @@
<q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.VolunteerMajor" label="志愿专业" /> <q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.VolunteerMajor" label="志愿专业" />
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.Price" label="价格" <q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.Price" label="价格"
@keyup.native="checkPrice(addMsg,'Price')" /> @keyup.native="checkPrice(addMsg,'Price')" />
<div class="col-6 q-pr-lg q-pb-lg">
<q-uploader style="display: inline-block;height: 150px;max-width: 100%; background-repeat:no-repeat"
:style="{'background-image':'url(' + addMsg.StuIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="教师头像" :max-file-size="5*1024*1024" accept=".jpg, image/*" auto-upload
:factory="uploadFile" no-thumbnails>
</q-uploader>
</div>
</div> </div>
</q-card-section> </q-card-section>
<div class="text-caption q-mb-lg q-px-md text-grey-6" v-if="msg.ClassId>0">附加信息</div> <div class="text-caption q-mb-lg q-px-md text-grey-6" v-if="msg.ClassId>0">附加信息</div>
...@@ -141,6 +155,10 @@ ...@@ -141,6 +155,10 @@
setOrderGuestInfo, //保存 setOrderGuestInfo, //保存
delOrderGuestInfo, //删除 delOrderGuestInfo, //删除
} from '../../api/sale/sale' } from '../../api/sale/sale'
import {
UploadSelfFile,
} from '../../api/common/common'
export default { export default {
data() { data() {
return { return {
...@@ -280,6 +298,7 @@ ...@@ -280,6 +298,7 @@
StudyRemark: "", //留学就业备注 StudyRemark: "", //留学就业备注
BirthDate: "", //出生日期 BirthDate: "", //出生日期
TotalHours: 0, //总课时 TotalHours: 0, //总课时
StuIcon:'' //头像
}, },
GBList: [], //日语基础列表 GBList: [], //日语基础列表
GEList: [], //学历列表 GEList: [], //学历列表
...@@ -429,23 +448,6 @@ ...@@ -429,23 +448,6 @@
this.saveLoading = false this.saveLoading = false
}) })
} }
// if (this.addMsg.GuestName == '') {
// this.$q.notify({
// type: 'negative',
// position: "top",
// message: `请输入客人姓名`
// })
// return;
// }
// if (this.addMsg.Basics == '') {
// this.$q.notify({
// type: 'negative',
// position: "top",
// message: `请选择语言基础`
// })
// return;
// }
}, },
//初始化数据 //初始化数据
initialize() { initialize() {
...@@ -506,6 +508,7 @@ ...@@ -506,6 +508,7 @@
this.addMsg.BirthDate = item.BirthDate; this.addMsg.BirthDate = item.BirthDate;
this.addMsg.TotalHours = item.TotalHours; this.addMsg.TotalHours = item.TotalHours;
this.addMsg.StuIcon = item.StuIcon;
this.persistent = true; this.persistent = true;
}, },
//删除学员 //删除学员
...@@ -534,7 +537,21 @@ ...@@ -534,7 +537,21 @@
} }
}) })
}).onCancel(() => {}); }).onCancel(() => {});
},
onRejected(rejectedEntries) {
this.$q.notify({
type: 'negative',
position: "top",
message: `文件验证失败,请重新上传`
})
},
uploadFile(files) {
UploadSelfFile('studentIcon', files[0], res => {
if (res.Code == 1) {
this.addMsg.StuIcon = res.FileUrl;
} }
})
},
} }
} }
......
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