@@ -1,17 +1,18 @@ | |||
<template> | |||
<div> | |||
<el-collapse v-model="active"> | |||
<el-collapse-item name="1"> | |||
<template slot="title"> | |||
<el-row type="flex" justify="space-between" style="padding: 0 30px"> | |||
<el-row type="flex" justify="space-between" style="width:100%;padding: 0 30px"> | |||
<el-button type="text">基本信息</el-button> | |||
<el-button @click="editSingle=true" v-show="type=='view'&&!editSingle">修改</el-button> | |||
<el-button v-show="editSingle" @click="save">保存</el-button> | |||
<el-button v-show="editSingle" @click="cancel">取消</el-button> | |||
<div> | |||
<el-button @click.stop.prevent="editSingle=true" v-show="type=='view'&&!editSingle">修改</el-button> | |||
<el-button v-show="editSingle" @click.stop.prevent="save">保存</el-button> | |||
<el-button v-show="editSingle" @click.stop.prevent="cancel">取消</el-button> | |||
</div> | |||
</el-row> | |||
</template> | |||
<el-form label-width="100px" :disabled="disable"> | |||
<el-form ref="form" :model="orderMain" label-width="100px" :disabled="disable"> | |||
<el-row> | |||
<el-col :span="12"> | |||
<el-form-item label="订单专员"> | |||
@@ -62,7 +63,7 @@ | |||
</el-collapse-item> | |||
</el-collapse> | |||
<el-form ref="form" :model="orderMain"> | |||
<el-form> | |||
<el-form-item> | |||
<el-row type="flex" style="margin-top: 20px"> | |||
<el-button type="primary" @click="addHotel">添加酒店</el-button> | |||
@@ -89,7 +90,7 @@ | |||
<hotelother :dataObj="item" :saleCount="saleCount" :type="type"></hotelother> | |||
</el-card> | |||
</template> | |||
<el-form-item> | |||
<el-form-item v-if="type=='add'"> | |||
<el-button type="primary" @click="onSubmit">提交订单</el-button> | |||
</el-form-item> | |||
</el-form> | |||
@@ -138,6 +139,7 @@ | |||
total_price: '总金额', | |||
total_cost: '成本价', | |||
profit: '利润', | |||
editType: 'add', | |||
purchasePriceList: [{ | |||
run_date: '请选择日期', | |||
price: '', | |||
@@ -162,6 +164,7 @@ | |||
total_price: '总金额', | |||
total_cost: '成本价', | |||
profit: '利润', | |||
editType: 'add', | |||
purchasePriceList: [{ | |||
run_date: '请选择日期', | |||
price: '', | |||
@@ -255,6 +258,9 @@ | |||
delete orderMain.subOrderList | |||
this.orderMain = orderMain | |||
this.orderMainCopy = this.$lo.cloneDeep(orderMain) | |||
res.data.subOrderList.forEach((item) => { | |||
item.editType = 'view' | |||
}) | |||
this.hotelList = res.data.subOrderList.filter((item) => item.hotel_id) | |||
this.hotelotherList = res.data.subOrderList.filter((item) => item.item_id) | |||
} | |||
@@ -1,5 +1,5 @@ | |||
<template> | |||
<el-form ref="form" :model="dataObj" label-width="100px"> | |||
<div> | |||
<el-collapse v-if="type=='view'"> | |||
<el-collapse-item> | |||
<template slot="title"> | |||
@@ -11,13 +11,161 @@ | |||
<!-- <el-col :span="2" :push="3">--> | |||
<!-- <el-button>增补采购单</el-button>--> | |||
<!-- </el-col>--> | |||
<div> | |||
<el-button @click.stop.prevent="edit" v-show="dataObj.editType=='view'">修改</el-button> | |||
<el-button v-show="dataObj.editType=='edit'" @click.stop.prevent="save">保存</el-button> | |||
<el-button v-show="dataObj.editType=='edit'" @click.stop.prevent="cancel">取消</el-button> | |||
</div> | |||
</el-row> | |||
</template> | |||
<el-form ref="form" :model="dataObj" label-width="100px" :disabled="disable"> | |||
<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-button @click="editSingle=true" v-show="type=='view'&&!editSingle">修改</el-button> | |||
<el-button v-show="editSingle" @click="save">保存</el-button> | |||
<el-button v-show="editSingle" @click="cancel">取消</el-button> | |||
<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> | |||
</template> | |||
<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.purchasePriceList" | |||
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="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> | |||
</el-form> | |||
</el-collapse-item> | |||
</el-collapse> | |||
<template v-else> | |||
<el-form ref="form" :model="dataObj" label-width="100px" :disabled="disable"> | |||
<el-row style="margin-top: 25px;padding-right: 20px;"> | |||
<el-col :span="8"> | |||
<el-form-item label="酒店名称"> | |||
@@ -80,6 +228,7 @@ | |||
border | |||
height="500" | |||
:summary-method="getSummaries" | |||
:span-method="arraySpanMethod" | |||
show-summary | |||
style="width: 100%; margin-top: 20px"> | |||
<el-table-column | |||
@@ -105,21 +254,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> | |||
@@ -127,7 +276,7 @@ | |||
<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-input v-model="dataObj.trade_order_number"></el-input> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="12"> | |||
@@ -158,152 +307,9 @@ | |||
</el-form-item> | |||
</el-col> | |||
</el-row> | |||
</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.purchasePriceList" | |||
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="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> | |||
</el-form> | |||
</template> | |||
</el-form> | |||
</div> | |||
</template> | |||
@@ -319,10 +325,14 @@ | |||
confirm_status: '未发单', | |||
roomListOpt: [], | |||
date: [], | |||
editSingle: false, | |||
day: [] | |||
} | |||
}, | |||
computed: { | |||
disable() { | |||
return this.dataObj.editType != 'add' | |||
} | |||
}, | |||
watch: { | |||
dataObj(val) { | |||
console.log('change') | |||
@@ -488,8 +498,11 @@ | |||
console.log(err) | |||
}) | |||
}, | |||
edit() { | |||
this.$set(this.dataObj, 'editType', 'edit'); | |||
}, | |||
save() { | |||
this.editSingle = false; | |||
this.$set(this.dataObj, 'editType', 'view'); | |||
axios.post("/hotel.php/order_main/subOrderSave", this.dataObj).then((res) => { | |||
console.log(res) | |||
if (res.flag) { | |||
@@ -502,7 +515,7 @@ | |||
}) | |||
}, | |||
cancel() { | |||
this.editSingle = false; | |||
this.$set(this.dataObj, 'editType', 'view'); | |||
this.$set(this, 'dataObj', this.orderMainCopy); | |||
} | |||
}, | |||
@@ -1,5 +1,5 @@ | |||
<template> | |||
<el-form ref="form" :model="dataObj" label-width="100px"> | |||
<div> | |||
<el-collapse v-if="type=='view'"> | |||
<el-collapse-item> | |||
<template slot="title"> | |||
@@ -11,13 +11,136 @@ | |||
<!-- <el-col :span="2" :push="3">--> | |||
<!-- <el-button>增补采购单</el-button>--> | |||
<!-- </el-col>--> | |||
<div> | |||
<el-button @click.stop.prevent="edit" v-show="dataObj.editType=='view'">修改</el-button> | |||
<el-button v-show="dataObj.editType=='edit'" @click.stop.prevent="save">保存</el-button> | |||
<el-button v-show="dataObj.editType=='edit'" @click.stop.prevent="cancel">取消</el-button> | |||
</div> | |||
</el-row> | |||
</template> | |||
<el-form ref="form" :model="dataObj" label-width="100px" :disabled="disable"> | |||
<el-row style="margin-top: 25px;padding-right: 20px;"> | |||
<el-col :span="8"> | |||
<el-button @click="editSingle=true" v-show="type=='view'&&!editSingle">修改</el-button> | |||
<el-button v-show="editSingle" @click="save">保存</el-button> | |||
<el-button v-show="editSingle" @click="cancel">取消</el-button> | |||
<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> | |||
</template> | |||
<el-row> | |||
<el-col :span="10"> | |||
<el-form-item label="使用日期"> | |||
<el-col :span="11"> | |||
<el-date-picker type="date" placeholder="选择日期" v-model="check_in_date" | |||
style="width: 100%;"></el-date-picker> | |||
</el-col> | |||
</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.purchasePriceList" | |||
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="6"> | |||
<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="6"> | |||
<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="资源状态"> | |||
<el-radio-group v-model="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="24"> | |||
<el-form-item label-width="100px" label="附加项目说明"> | |||
<span>{{dataObj.item_memo}}</span> | |||
</el-form-item> | |||
</el-col> | |||
</el-row> | |||
</el-form> | |||
</el-collapse-item> | |||
</el-collapse> | |||
<template v-else> | |||
<el-form ref="form" :model="dataObj" label-width="100px" :disabled="disable"> | |||
<el-row style="margin-top: 25px;padding-right: 20px;"> | |||
<el-col :span="8"> | |||
<el-form-item label="附加项目类型"> | |||
@@ -61,6 +184,7 @@ | |||
border | |||
height="500" | |||
:summary-method="getSummaries" | |||
:span-method="arraySpanMethod" | |||
show-summary | |||
style="width: 100%; margin-top: 20px"> | |||
<el-table-column | |||
@@ -86,21 +210,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> | |||
@@ -134,129 +258,9 @@ | |||
</el-form-item> | |||
</el-col> | |||
</el-row> | |||
</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-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"> | |||
<el-date-picker type="date" placeholder="选择日期" v-model="check_in_date" | |||
style="width: 100%;"></el-date-picker> | |||
</el-col> | |||
</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.purchasePriceList" | |||
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="6"> | |||
<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="6"> | |||
<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="资源状态"> | |||
<el-radio-group v-model="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="24"> | |||
<el-form-item label-width="100px" label="附加项目说明"> | |||
<span>{{dataObj.item_memo}}</span> | |||
</el-form-item> | |||
</el-col> | |||
</el-row> | |||
</el-form> | |||
</template> | |||
</el-form> | |||
</div> | |||
</template> | |||
<script> | |||
@@ -270,10 +274,14 @@ | |||
dataObjCopy: this.$lo.cloneDeep(this.dataObj), | |||
confirm_status: '未发单', | |||
check_in_date: '', | |||
editSingle: false, | |||
day: [] | |||
} | |||
}, | |||
computed: { | |||
disable() { | |||
return this.dataObj.editType != 'add' | |||
} | |||
}, | |||
watch: { | |||
dataObj(val) { | |||
console.log('change') | |||
@@ -418,8 +426,11 @@ | |||
return sums; | |||
}, | |||
edit() { | |||
this.$set(this.dataObj, 'editType', 'edit'); | |||
}, | |||
save() { | |||
this.editSingle = false; | |||
this.$set(this.dataObj, 'editType', 'view'); | |||
axios.post("/hotel.php/order_main/subOrderSave", this.dataObj).then((res) => { | |||
console.log(res) | |||
if (res.flag) { | |||
@@ -432,7 +443,7 @@ | |||
}) | |||
}, | |||
cancel() { | |||
this.editSingle = false; | |||
this.$set(this.dataObj, 'editType', 'view'); | |||
this.$set(this, 'dataObj', this.orderMainCopy); | |||
} | |||
}, | |||