瀏覽代碼

init

master
xubinxcode 3 年之前
父節點
當前提交
e7b0ceecd0
共有 3 個文件被更改,包括 254 次插入170 次删除
  1. +0
    -1
      src/components/HelloWorld.vue
  2. +196
    -162
      src/components/hotel.vue
  3. +58
    -7
      src/components/hotelother.vue

+ 0
- 1
src/components/HelloWorld.vue 查看文件

@@ -90,7 +90,6 @@
hotelother
},
data() {
window.type = 'edit'
return {
type: window.type,
orderMain: {


+ 196
- 162
src/components/hotel.vue 查看文件

@@ -1,166 +1,23 @@
<template>
<el-form ref="form" :model="dataObj" label-width="100px">
<el-collapse v-if="type=='edit'">
<el-collapse-item>
<template slot="title">
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;" type="flex"
justify="space-between" align="middle">
<el-col :span="2">
{{'酒店'}}
</el-col>
<el-col :span="2" :push="3">
<el-button>增补采购单</el-button>
</el-col>
<el-col :span="8">
<el-button>修改</el-button>
<el-button>保存</el-button>
<el-button>取消</el-button>
</el-col>
</el-row>
</template>
<el-row style="margin-top: 25px;padding-right: 20px;">
<el-col :span="8">
<el-form-item label="酒店名称">

<el-select v-model="dataObj.hotel_id" filterable placeholder="请选择" @change="selectChange">
<el-option
v-for="item in hotelListOpt"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="房型名称">
<el-select v-model="dataObj.room_id" filterable placeholder="请选择" @change="selectChange">
<el-option
v-for="item in roomListOpt"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="价格方案">
<el-input v-model="dataObj.plan_id"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="入离日期">
<el-date-picker
v-model="date"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="入住日期"
end-placeholder="离店日期">
</el-date-picker>
</el-form-item>
<el-form ref="form" :model="dataObj" label-width="100px">
<el-collapse v-if="type=='edit'">
<el-collapse-item>
<template slot="title">
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;" type="flex"
justify="space-between" align="middle">
<el-col :span="2">
{{'酒店'}}
</el-col>
<!-- <el-col :span="2" :push="3">-->
<!-- <el-button>增补采购单</el-button>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label-width="100px" label="出游人姓名">
<el-input v-model="dataObj.customer_name"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="确认号">
<el-input v-model="dataObj.confirm_no"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-table
:data="dataObj.tableData"
border
height="500"
:summary-method="getSummaries"
show-summary
style="width: 100%; margin-top: 20px">
<el-table-column
prop="run_date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="price"
label="售卖价">
<template slot-scope="scope">
<el-input-number v-model="scope.row.price"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="cost"
label="成本价">
<template slot-scope="scope">
<el-input-number v-model="scope.row.cost"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="count"
label="数量">
<template slot-scope="scope">
<el-input-number v-model="scope.row.count"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="provider"
label="供应商">
<template slot-scope="scope">
<el-input v-model="scope.row.provider"></el-input>
</template>
</el-table-column>
<el-table-column
prop="note"
label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.note"></el-input>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label-width="100px" label="对方订单号">
<el-input-number size="small" v-model="dataObj.trade_order_number"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资源状态">
<el-radio-group v-model="dataObj.confirm_status" size="small" style="min-width: 270px;">
<el-radio-button label="未发单" name="未发单"></el-radio-button>
<el-radio-button label="已发单" name="已发单"></el-radio-button>
<el-radio-button label="已确认" name="已确认"></el-radio-button>
<el-radio-button label="已取消" name="已取消"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label-width="100px" label="床型说明">
<span>{{dataObj.room_memo}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="100px" label="资源负责人">
<span>{{dataObj.res_person}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="100px" label="价格方案说明">
<span>{{dataObj.priceIntro}}</span>
</el-form-item>
<el-button>修改</el-button>
<el-button>保存</el-button>
<el-button>取消</el-button>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
<template v-else>
</template>
<el-row style="margin-top: 25px;padding-right: 20px;">
<el-col :span="8">
<el-form-item label="酒店名称">
@@ -197,7 +54,7 @@
<el-col :span="10">
<el-form-item label="入离日期">
<el-date-picker
v-model="run_date"
v-model="date"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
@@ -301,8 +158,152 @@
</el-form-item>
</el-col>
</el-row>
</template>
</el-form>
</el-collapse-item>
</el-collapse>
<template v-else>
<el-row style="margin-top: 25px;padding-right: 20px;">
<el-col :span="8">
<el-form-item label="酒店名称">

<el-select v-model="dataObj.hotel_id" filterable placeholder="请选择" @change="selectChange">
<el-option
v-for="item in hotelListOpt"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="房型名称">
<el-select v-model="dataObj.room_id" filterable placeholder="请选择" @change="selectChange">
<el-option
v-for="item in roomListOpt"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="价格方案">
<el-input v-model="dataObj.plan_id"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="入离日期">
<el-date-picker
v-model="date"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="入住日期"
end-placeholder="离店日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="100px" label="出游人姓名">
<el-input v-model="dataObj.customer_name"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="确认号">
<el-input v-model="dataObj.confirm_no"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-table
:data="dataObj.tableData"
border
height="500"
:summary-method="getSummaries"
:span-method="arraySpanMethod"
show-summary
style="width: 100%; margin-top: 20px">
<el-table-column
prop="run_date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="price"
label="售卖价">
<template slot-scope="scope">
<el-input-number v-model="scope.row.price"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="cost"
label="成本价">
<template slot-scope="scope">
<el-input-number v-model="scope.row.cost"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="count"
label="数量">
<template slot-scope="scope">
<el-input-number v-model="scope.row.count" @change="changeNum"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="provider"
label="供应商">
<template slot-scope="scope">
<el-input v-model="scope.row.provider" @change="changeProvider"></el-input>
</template>
</el-table-column>
<el-table-column
prop="note"
label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.note" @change="changeNote"></el-input>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label-width="100px" label="对方订单号">
<el-input v-model="dataObj.trade_order_number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资源状态">
<el-radio-group v-model="dataObj.confirm_status" size="small" style="min-width: 270px;">
<el-radio-button label="未发单" name="未发单"></el-radio-button>
<el-radio-button label="已发单" name="已发单"></el-radio-button>
<el-radio-button label="已确认" name="已确认"></el-radio-button>
<el-radio-button label="已取消" name="已取消"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label-width="100px" label="床型说明">
<span>{{dataObj.room_memo}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="100px" label="资源负责人">
<span>{{dataObj.res_person}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="100px" label="价格方案说明">
<span>{{dataObj.priceIntro}}</span>
</el-form-item>
</el-col>
</el-row>
</template>
</el-form>


</template>
@@ -340,6 +341,39 @@
}
},
methods: {
changeNum(value) {
if (this.type == 'add') {
this.dataObj.tableData.forEach((item) => {
this.$set(item, 'count', value)
})
}
},
changeProvider(value) {
if (this.type == 'add') {
this.dataObj.tableData.forEach((item) => {
this.$set(item, 'provider', value)
})
}
},
changeNote(value) {
if (this.type == 'add') {
this.dataObj.tableData.forEach((item) => {
this.$set(item, 'note', value)
})
}
},
arraySpanMethod({row, column, rowIndex, columnIndex}) {
// console.log({row, column, rowIndex, columnIndex})
if (columnIndex === 3) {
return [this.dataObj.tableData.length, 1];
} else if (columnIndex === 4) {
return [this.dataObj.tableData.length, 1];
} else if (columnIndex === 5) {
return [this.dataObj.tableData.length, 1];
} else {
return [1, 1];
}
},
getAllDateCN(startTime, endTime) {
var date_all = []
var i = 0
@@ -355,7 +389,7 @@
},
getSummaries(param) {
const {columns, data} = param;
console.log(param)
// console.log(param)
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {


+ 58
- 7
src/components/hotelother.vue 查看文件

@@ -8,9 +8,9 @@
<el-col :span="2">
{{'附加项目'}}
</el-col>
<el-col :span="2" :push="3">
<el-button>增补采购单</el-button>
</el-col>
<!-- <el-col :span="2" :push="3">-->
<!-- <el-button>增补采购单</el-button>-->
<!-- </el-col>-->
<el-col :span="8">
<el-button>修改</el-button>
<el-button>保存</el-button>
@@ -137,7 +137,24 @@
</el-collapse-item>
</el-collapse>
<template v-else>
<el-row style="margin-top: 25px;padding-right: 20px;">
<el-row style="margin-top: 25px;padding-right: 20px;">
<el-col :span="8">
<el-form-item label="附加项目类型">
<el-input v-model="dataObj.item_type"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附加项目名称">
<el-input v-model="dataObj.item_name"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计价单位">
<el-input v-model="dataObj.item_unit"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="使用日期">
<el-col :span="11">
@@ -163,6 +180,7 @@
border
height="500"
:summary-method="getSummaries"
:span-method="arraySpanMethod"
show-summary
style="width: 100%; margin-top: 20px">
<el-table-column
@@ -188,21 +206,21 @@
prop="count"
label="数量">
<template slot-scope="scope">
<el-input-number v-model="scope.row.count"></el-input-number>
<el-input-number v-model="scope.row.count" @change="changeNum"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="provider"
label="供应商">
<template slot-scope="scope">
<el-input v-model="scope.row.provider"></el-input>
<el-input v-model="scope.row.provider" @change="changeProvider"></el-input>
</template>
</el-table-column>
<el-table-column
prop="note"
label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.note"></el-input>
<el-input v-model="scope.row.note" @change="changeNote"></el-input>
</template>
</el-table-column>
</el-table>
@@ -274,6 +292,39 @@
}
},
methods: {
changeNum(value) {
if (this.type == 'add') {
this.dataObj.tableData.forEach((item) => {
this.$set(item, 'count', value)
})
}
},
changeProvider(value) {
if (this.type == 'add') {
this.dataObj.tableData.forEach((item) => {
this.$set(item, 'provider', value)
})
}
},
changeNote(value) {
if (this.type == 'add') {
this.dataObj.tableData.forEach((item) => {
this.$set(item, 'note', value)
})
}
},
arraySpanMethod({row, column, rowIndex, columnIndex}) {
// console.log({row, column, rowIndex, columnIndex})
if (columnIndex === 3) {
return [this.dataObj.tableData.length, 1];
} else if (columnIndex === 4) {
return [this.dataObj.tableData.length, 1];
} else if (columnIndex === 5) {
return [this.dataObj.tableData.length, 1];
} else {
return [1, 1];
}
},
getAllDateCN(startTime, endTime) {
var date_all = []
var i = 0


Loading…
取消
儲存