|
|
@@ -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) { |
|
|
|