Commit 09c0e5e5 authored by 黄奎's avatar 黄奎

11

parent be2612ce
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<div class="list-content-box" v-for="(y,i) in x.Hotels"> <div class="list-content-box" v-for="(y,i) in x.Hotels">
<div class="list-operation"> <div class="list-operation">
<div> <div>
<button v-if="x.Date>=OptionalTime" class="hollowFixedBtn" type="primary"
<button v-if="x.Date>=OptionalTime" class="hollowFixedBtn" type="primary" @click="setEditorHandler(y)"> @click="setEditorHandler(y)">
<i class="el-icon-edit"></i> <i class="el-icon-edit"></i>
</button> </button>
<button class="normalBtn" type="primary" @click="removeHotelHandler(xi,i)"> <button class="normalBtn" type="primary" @click="removeHotelHandler(xi,i)">
...@@ -65,10 +65,11 @@ ...@@ -65,10 +65,11 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="cars.length==0" style="text-align: center;padding: 20px 0;">{{$t('system.content_noData')}}</div> <div v-if="cars&&cars.length==0" style="text-align: center;padding: 20px 0;">{{$t('system.content_noData')}}
</div>
</div> </div>
<div class="ListCar-bottom" v-if="cars.length>0"> <div class="ListCar-bottom" v-if="cars&&cars.length>0">
<div v-if="crmOrderObj" style="margin-bottom: 10px;"> <div v-if="crmOrderObj" style="margin-bottom: 10px;">
<span style="color: red;">{{$t('objFill.yinliuren')}}{{crmOrderObj.LureEmpNmae}} </span> <span style="color: red;">{{$t('objFill.yinliuren')}}{{crmOrderObj.LureEmpNmae}} </span>
<span style="color: #2AAEF2;">/{{$t('objFill.keren')}}{{crmOrderObj.CRMGuestName}}</span> <span style="color: #2AAEF2;">/{{$t('objFill.keren')}}{{crmOrderObj.CRMGuestName}}</span>
...@@ -78,7 +79,8 @@ ...@@ -78,7 +79,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('system.query_type')" prop="OrderType"> <el-form-item :label="$t('system.query_type')" prop="OrderType">
<el-select v-model="parameters.OrderType"> <el-select v-model="parameters.OrderType">
<el-option v-for="item in cacheHotels" :key="item.ID" :label="item.Name" :value="item.ID"></el-option> <el-option v-for="item in cacheHotels" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -101,8 +103,8 @@ ...@@ -101,8 +103,8 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('pub.pubRemark')" prop=""> <el-form-item :label="$t('pub.pubRemark')" prop="">
<el-input type="textarea" :rows="1" <el-input type="textarea" :rows="1" :placeholder="$t('rule.EnterMark')" v-model="parameters.Remark">
:placeholder="$t('rule.EnterMark')" v-model="parameters.Remark"></el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -112,7 +114,8 @@ ...@@ -112,7 +114,8 @@
<span class="coloref1416c fz12">{{$t('objFill.dindianfukuan')}}:</span> <span class="coloref1416c fz12">{{$t('objFill.dindianfukuan')}}:</span>
<span class="coloref1416c fbold"> <span class="coloref1416c fbold">
<span class="fz18">{{parameters.Money}}</span> <span class="fz18">{{parameters.Money}}</span>
<span class="fz13"><!-- ¥ -->{{cars[0].CurrencyName}}</span> <span class="fz13">
<!-- ¥ -->{{cars[0].CurrencyName}}</span>
</span> </span>
</div> </div>
<div> <div>
...@@ -125,14 +128,10 @@ ...@@ -125,14 +128,10 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
// crmOrderObj: {
// type: Object,
// require: false
// },
HotelRow: { HotelRow: {
type: Object, type: Object,
require: false require: false
...@@ -144,8 +143,8 @@ ...@@ -144,8 +143,8 @@
}, },
data() { data() {
return { return {
crmOrderObj:null, crmOrderObj: null,
OptionalTime: this.getBeforeDate(0,new Date().Format('yyyy-MM-dd')),//可编辑时间 OptionalTime: this.getBeforeDate(0, new Date().Format('yyyy-MM-dd')), //可编辑时间
cars: [], cars: [],
HotelLength: 0, HotelLength: 0,
addNum: 1, addNum: 1,
...@@ -166,11 +165,16 @@ ...@@ -166,11 +165,16 @@
currentS: 0, currentS: 0,
RemainingInventory: 0, RemainingInventory: 0,
loading: false, loading: false,
cacheHotels: [ cacheHotels: [{
{ Name: this.$t('objFill.shanke'), ID: 1 }, Name: this.$t('objFill.shanke'),
{ Name: this.$t('active.cl_team'), ID: 2 } ID: 1
},
{
Name: this.$t('active.cl_team'),
ID: 2
}
], ],
rules:{ rules: {
OrderType: [{ OrderType: [{
required: true, required: true,
message: this.$t('system.ph_type'), message: this.$t('system.ph_type'),
...@@ -181,8 +185,11 @@ ...@@ -181,8 +185,11 @@
message: this.$t('objFill.qingshuruskxm'), message: this.$t('objFill.qingshuruskxm'),
trigger: 'blur' trigger: 'blur'
}], }],
ContactNumber: [ ContactNumber: [{
{ required: true, message: this.$t('rule.EnterPnum'), trigger: "blur" }, required: true,
message: this.$t('rule.EnterPnum'),
trigger: "blur"
},
// { // {
// pattern: this.$commonUtils.Regex.el_ISphone, // pattern: this.$commonUtils.Regex.el_ISphone,
// message: this.$t('rule.EnterRightNum') // message: this.$t('rule.EnterRightNum')
...@@ -197,21 +204,14 @@ ...@@ -197,21 +204,14 @@
}; };
}, },
watch: { watch: {
// crmOrderObj: {
// handler: function (val, oldVal) {
// this.crmOrderObj = val
// if(this.crmOrderObj){
// this.parameters.LureEmpId = val.LureEmpId//引流id
// this.parameters.CRMGuestId = val.CRMGuestId //客人ID
// }
// },
// deep: true,
// immediate: true
// },
cars: { cars: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
if (this.cars && this.cars.length > 0) {
this.HotelLength = this.cars.length this.HotelLength = this.cars.length
localStorage.setItem("HotelLength",this.HotelLength) } else {
this.HotelLength = 0;
}
localStorage.setItem("HotelLength", this.HotelLength)
this.getMoney() this.getMoney()
}, },
deep: true deep: true
...@@ -225,33 +225,33 @@ ...@@ -225,33 +225,33 @@
}, },
created() { created() {
// crm自动登陆传过来的参数 // crm自动登陆传过来的参数
if(this.$route.query.crmOrderObj){ if (this.$route.query.crmOrderObj) {
let crmOrderObj = JSON.parse(this.$route.query.crmOrderObj) let crmOrderObj = JSON.parse(this.$route.query.crmOrderObj)
this.crmOrderObj = crmOrderObj this.crmOrderObj = crmOrderObj
this.parameters.LureEmpId = crmOrderObj.LureEmpId//引流id this.parameters.LureEmpId = crmOrderObj.LureEmpId //引流id
this.parameters.CRMGuestId = crmOrderObj.CRMGuestId //客人ID this.parameters.CRMGuestId = crmOrderObj.CRMGuestId //客人ID
} }
this.cars = JSON.parse(localStorage.getItem("cars")) this.cars = JSON.parse(localStorage.getItem("cars"))
this.HotelLength = localStorage.getItem("HotelLength") this.HotelLength = localStorage.getItem("HotelLength")
}, },
mounted() { mounted() {
}, },
methods: { methods: {
// 关闭购物车 // 关闭购物车
close(){ close() {
localStorage.removeItem('editor') localStorage.removeItem('editor')
this.$emit('close') this.$emit('close')
}, },
// 合计 // 合计
getMoney() { getMoney() {
this.parameters.Money = 0 this.parameters.Money = 0;
if (this.cars && this.cars.length > 0) {
this.cars.forEach((item) => { this.cars.forEach((item) => {
item.Hotels.forEach((t) => { item.Hotels.forEach((t) => {
this.parameters.Money += t.Money this.parameters.Money += t.Money
}) })
}) })
}
}, },
// 确定下单 // 确定下单
submit() { submit() {
...@@ -263,13 +263,13 @@ ...@@ -263,13 +263,13 @@
} }
}); });
}, },
setFormMsg(){ setFormMsg() {
let temp = JSON.parse(JSON.stringify(this.cars)) let temp = JSON.parse(JSON.stringify(this.cars))
if(this.loading||this.cars.length==0) return if (this.loading || this.cars.length == 0) return
this.loading = true this.loading = true
this.parameters.DetailList = [] this.parameters.DetailList = []
temp.forEach((x)=>{ temp.forEach((x) => {
x.Hotels.forEach((y)=>{ x.Hotels.forEach((y) => {
y.RoomList = JSON.parse(JSON.stringify(y.DetailList)) y.RoomList = JSON.parse(JSON.stringify(y.DetailList))
delete y.DetailList delete y.DetailList
this.parameters.DetailList.push(y) this.parameters.DetailList.push(y)
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
localStorage.removeItem('cars') localStorage.removeItem('cars')
localStorage.removeItem('editor') localStorage.removeItem('editor')
localStorage.removeItem('HotelLength') localStorage.removeItem('HotelLength')
this.cars=[] this.cars = []
this.HotelLength = 0 this.HotelLength = 0
this.$emit('success') this.$emit('success')
} else { } else {
...@@ -297,96 +297,113 @@ ...@@ -297,96 +297,113 @@
} }
); );
}, },
removeHotelHandler(x,y){ removeHotelHandler(x, y) {
let that = this let that = this
that.$confirm(this.$t('objFill.shifouquedinsc'), this.$t('tips.tips'), { that.$confirm(this.$t('objFill.shifouquedinsc'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'), confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'), cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
if(this.cars[x].Hotels.length==1){ if (this.cars[x].Hotels.length == 1) {
this.cars.splice(x,1) this.cars.splice(x, 1)
}else{ } else {
this.cars[x].Hotels.splice(y,1) this.cars[x].Hotels.splice(y, 1)
}
if (this.cars && this.cars.length) {
this.HotelLength = this.cars.length;
} }
this.HotelLength = this.cars.length
localStorage.removeItem('cars') localStorage.removeItem('cars')
localStorage.setItem('cars',JSON.stringify(this.cars)) localStorage.setItem('cars', JSON.stringify(this.cars))
localStorage.removeItem('HotelLength') localStorage.removeItem('HotelLength')
localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength)) localStorage.setItem('HotelLength', JSON.stringify(this.HotelLength))
}).catch(() => { }).catch(() => {
}); });
}, },
// 编辑 // 编辑
setEditorHandler(x){ setEditorHandler(x) {
localStorage.setItem('editor',JSON.stringify(x)) localStorage.setItem('editor', JSON.stringify(x))
this.$emit('editor',x) this.$emit('editor', x)
} }
} }
}; };
</script> </script>
<style scoped> <style scoped>
.fz12{ .fz12 {
font-size: 12px; font-size: 12px;
} }
.fz13{
.fz13 {
font-size: 13px; font-size: 13px;
} }
.fz14{
.fz14 {
font-size: 14px; font-size: 14px;
} }
.fz15{
.fz15 {
font-size: 15px; font-size: 15px;
} }
.fz16{
.fz16 {
font-size: 16px; font-size: 16px;
} }
.fz18{
.fz18 {
font-size: 18px; font-size: 18px;
} }
.fbold{
.fbold {
font-weight: bold; font-weight: bold;
} }
.paddinglr15{
.paddinglr15 {
padding: 0 15px; padding: 0 15px;
} }
.row-JCSB{
.row-JCSB {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.row-JCE{
.row-JCE {
display: flex; display: flex;
justify-content: end; justify-content: end;
} }
.colorffffff{
.colorffffff {
color: #ffffff; color: #ffffff;
} }
.color009ef7{
.color009ef7 {
color: #009ef7; color: #009ef7;
} }
.colore65100{
.colore65100 {
color: #e65100; color: #e65100;
} }
.coloref44336{
.coloref44336 {
color: #f44336; color: #f44336;
} }
.coloref1416c{
.coloref1416c {
color: #f1416c; color: #f1416c;
} }
.ListCar-form{
.ListCar-form {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background: rgba(23,23,23,.5); background: rgba(23, 23, 23, .5);
z-index: 3; z-index: 3;
} }
.ListCar-form-box{
.ListCar-form-box {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
...@@ -395,112 +412,135 @@ ...@@ -395,112 +412,135 @@
background: #ffffff; background: #ffffff;
z-index: 100; z-index: 100;
} }
.ListCar-box{
.ListCar-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.ListCar-close{
.ListCar-close {
position: absolute; position: absolute;
left: -47px; left: -47px;
top: 20%; top: 20%;
line-height: 26px; line-height: 26px;
} }
.ListCar-close i{
.ListCar-close i {
margin-left: 3px; margin-left: 3px;
} }
.normalBtn.ListCar-close{
.normalBtn.ListCar-close {
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
padding: 0 8px !important; padding: 0 8px !important;
} }
.ListCar-box{
.ListCar-box {
padding: 15px 0; padding: 15px 0;
} }
.ListCar-header{
.ListCar-header {
border-bottom: -; border-bottom: -;
} }
.ListCar-header-right{
.ListCar-header-right {
border-radius: 3px; border-radius: 3px;
padding: 5px 8px; padding: 5px 8px;
background: #fff3e0; background: #fff3e0;
} }
.ListCar-content{
.ListCar-content {
padding: 20px 15px; padding: 20px 15px;
height: calc(100% - 230px); height: calc(100% - 230px);
overflow: auto; overflow: auto;
} }
.ListCar-list{
.ListCar-list {
border-radius: 3px; border-radius: 3px;
background: black; background: black;
padding: 0 10px 10px 10px; padding: 0 10px 10px 10px;
margin: 0 0 10px 0; margin: 0 0 10px 0;
} }
.list-time{
.list-time {
padding: 10px 0 5px 0; padding: 10px 0 5px 0;
} }
.list-content-box{
.list-content-box {
background: #e1f5fe; background: #e1f5fe;
position: relative; position: relative;
border-radius: 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
margin-bottom: 5px; margin-bottom: 5px;
} }
.list-content-box:last-child{
.list-content-box:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.list-content{
.list-content {
padding: 8px 10px; padding: 8px 10px;
} }
.list-content-title{
.list-content-title {
border-bottom: 1px dashed #009ef7; border-bottom: 1px dashed #009ef7;
padding: 0 0 8px 0; padding: 0 0 8px 0;
} }
.content-title{
.content-title {
width: 300px; width: 300px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.list-content-rooms{
.list-content-rooms {
border-bottom: 1px dashed #009ef7; border-bottom: 1px dashed #009ef7;
padding: 6px 0; padding: 6px 0;
} }
.list-content-rooms>div{
.list-content-rooms>div {
margin-bottom: 5px; margin-bottom: 5px;
} }
.list-content-rooms>div:last-child{
.list-content-rooms>div:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.list-content-num{
.list-content-num {
padding: 6px 0 0 0; padding: 6px 0 0 0;
} }
.list-operation{
.list-operation {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
background: rgba(23,23,23,.5); background: rgba(23, 23, 23, .5);
border-radius: 3px; border-radius: 3px;
display: none; display: none;
z-index: 1; z-index: 1;
} }
.list-operation div{
.list-operation div {
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.list-content-box:hover .list-operation{
.list-content-box:hover .list-operation {
display: block; display: block;
} }
.ListCar-bottom{
.ListCar-bottom {
padding: 15px 15px 0 15px; padding: 15px 15px 0 15px;
} }
.bottom-num{
.bottom-num {
align-items: center; align-items: center;
} }
</style>
</style>
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