@@ -74,7 +74,8 @@ | |||
<el-row type="flex" justify="end" v-if="type=='add'"> | |||
<i class="el-icon-close" @click="delSinHotel(index)"></i> | |||
</el-row> | |||
<hotel :dataObj="item" :hotelListOpt="hotelListOpt" :saleCount="saleCount" :type="type"></hotel> | |||
<hotel :userOpt="userOpt" :dataObj="item" :hotelListOpt="hotelListOpt" :saleCount="saleCount" | |||
:type="type"></hotel> | |||
</el-card> | |||
</template> | |||
<el-form-item> | |||
@@ -87,7 +88,7 @@ | |||
<el-row type="flex" justify="end" v-if="type=='add'"> | |||
<i class="el-icon-close" @click="delSinHotelOther(index)"></i> | |||
</el-row> | |||
<hotelother :dataObj="item" :saleCount="saleCount" :type="type"></hotelother> | |||
<hotelother :userOpt="userOpt" :dataObj="item" :saleCount="saleCount" :type="type"></hotelother> | |||
</el-card> | |||
</template> | |||
<el-form-item> | |||
@@ -134,7 +135,7 @@ | |||
trade_order_number: '123456', | |||
confirm_status: '1', | |||
room_memo: '床型说明', | |||
res_person: '资源负责人', | |||
purchase_user_id: '资源负责人', | |||
plan_memo: '价格方案说明', | |||
total_price: '总金额', | |||
total_cost: '成本价', | |||
@@ -151,14 +152,14 @@ | |||
}, | |||
hotelList: [], | |||
hotelotherListObj: { | |||
item_type: '附加项目类型', | |||
item_id: '附加项目类型', | |||
item_name: '附加项目名称', | |||
item_unit: '计价单位', | |||
check_in_date: '', | |||
customer_name: '出游人姓名', | |||
confirm_no: '123456', | |||
trade_order_number: '123456', | |||
res_person: '资源负责人', | |||
purchase_user_id: '资源负责人', | |||
confirm_status: '1', | |||
item_memo: '附加项目说明', | |||
total_price: '总金额', | |||
@@ -177,6 +178,7 @@ | |||
hotelotherList: [], | |||
hotelListOpt: [], | |||
channelListOpt: [], | |||
userOpt: [], | |||
} | |||
}, | |||
computed: { | |||
@@ -237,6 +239,12 @@ | |||
if (process.env.NODE_ENV !== 'production') { | |||
axios.defaults.baseURL = '/api' //关键代码 | |||
} | |||
axios.get("/hotel.php/auth/admin/getList").then((res) => { | |||
console.log(res) | |||
this.userOpt = res.data.list | |||
}).catch((err) => { | |||
console.log(err) | |||
}) | |||
axios.get("/hotel.php/cf_hotel_info/getHotelList").then((res) => { | |||
console.log(res) | |||
this.hotelListOpt = res.data.list | |||
@@ -151,7 +151,14 @@ | |||
</el-col> | |||
<el-col :span="12"> | |||
<el-form-item label-width="100px" label="资源负责人"> | |||
<span>{{dataObj.res_person}}</span> | |||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in userOpt" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id"> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="12"> | |||
@@ -298,7 +305,14 @@ | |||
</el-col> | |||
<el-col :span="12"> | |||
<el-form-item label-width="100px" label="资源负责人"> | |||
<span>{{dataObj.res_person}}</span> | |||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in userOpt" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id"> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="12"> | |||
@@ -318,7 +332,7 @@ | |||
export default { | |||
name: "hotel", | |||
props: {type: String, saleCount: Number, dataObj: Object, hotelListOpt: Array}, | |||
props: {userOpt: Array,type: String, saleCount: Number, dataObj: Object, hotelListOpt: Array}, | |||
data() { | |||
return { | |||
dataObjCopy: this.$lo.cloneDeep(this.dataObj), | |||
@@ -23,7 +23,14 @@ | |||
<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-select style="width: 100%" v-model="dataObj.item_id" filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in cf_itemOpt" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id"> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="8"> | |||
@@ -115,7 +122,14 @@ | |||
</el-col> | |||
<el-col :span="6"> | |||
<el-form-item label-width="100px" label="资源负责人"> | |||
<span>{{dataObj.res_person}}</span> | |||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in userOpt" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id"> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="12"> | |||
@@ -144,7 +158,14 @@ | |||
<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-select style="width: 100%" v-model="dataObj.item_id" filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in cf_itemOpt" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id"> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="8"> | |||
@@ -237,7 +258,14 @@ | |||
</el-col> | |||
<el-col :span="6"> | |||
<el-form-item label-width="100px" label="资源负责人"> | |||
<span>{{dataObj.res_person}}</span> | |||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filterable placeholder="请选择"> | |||
<el-option | |||
v-for="item in userOpt" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id"> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="12"> | |||
@@ -268,12 +296,13 @@ | |||
export default { | |||
name: "hotelother", | |||
props: {type: String, saleCount: Number, dataObj: Object}, | |||
props: {userOpt: Array, type: String, saleCount: Number, dataObj: Object}, | |||
data() { | |||
return { | |||
dataObjCopy: this.$lo.cloneDeep(this.dataObj), | |||
confirm_status: '未发单', | |||
check_in_date: '', | |||
cf_itemOpt: [], | |||
day: [] | |||
} | |||
}, | |||
@@ -451,6 +480,12 @@ | |||
if (process.env.NODE_ENV !== 'production') { | |||
axios.defaults.baseURL = '/api' //关键代码 | |||
} | |||
axios.get("/hotel.php/cf_item/getList").then((res) => { | |||
console.log(res) | |||
this.cf_itemOpt = res.data.list | |||
}).catch((err) => { | |||
console.log(err) | |||
}) | |||
} | |||
} | |||
</script> | |||