|
|
@@ -110,299 +110,304 @@ |
|
|
|
|
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import hotel from "./hotel" |
|
|
|
import hotelother from "./hotelother" |
|
|
|
import axios from "axios" |
|
|
|
import hotel from "./hotel" |
|
|
|
import hotelother from "./hotelother" |
|
|
|
import axios from "axios" |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
hotel, |
|
|
|
hotelother |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
active: '1', |
|
|
|
type: window.id ? 'view' : 'add', |
|
|
|
saleCount: 1, |
|
|
|
editSingle: false, |
|
|
|
orderMain: { |
|
|
|
commissioner_id: '', |
|
|
|
channel_id: '', |
|
|
|
channel_order_no: '', |
|
|
|
user_name: '', |
|
|
|
user_phone: "", |
|
|
|
order_memo: "", |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
commissioner_id: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
channel_id: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
channel_order_no: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
user_name: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
user_phone: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
order_memo: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
] |
|
|
|
}, |
|
|
|
orderMainCopy: {}, |
|
|
|
hotelListObj: { |
|
|
|
prod_type: 'hotel', |
|
|
|
hotel_id: '', |
|
|
|
room_id: '', |
|
|
|
plan_id: '', |
|
|
|
check_in_date: '', |
|
|
|
check_out_date: '', |
|
|
|
customer_name: '', |
|
|
|
confirm_no: '', |
|
|
|
trade_order_number: '', |
|
|
|
confirm_status: '1', |
|
|
|
room_memo: '', |
|
|
|
purchase_user_id: '', |
|
|
|
plan_memo: '', |
|
|
|
total_price: '', |
|
|
|
total_cost: '', |
|
|
|
profit: '', |
|
|
|
editType: 'add', |
|
|
|
purchasePriceList: [{ |
|
|
|
run_date: '请选择日期', |
|
|
|
price: '', |
|
|
|
cost: '', |
|
|
|
count: '', |
|
|
|
note: '', |
|
|
|
supplier_id: 0 |
|
|
|
}] |
|
|
|
}, |
|
|
|
hotelList: [], |
|
|
|
hotelotherListObj: { |
|
|
|
prod_type: 'item', |
|
|
|
item_id: '', |
|
|
|
item_name: '', |
|
|
|
item_unit: '', |
|
|
|
check_in_date: '', |
|
|
|
customer_name: '', |
|
|
|
confirm_no: '', |
|
|
|
trade_order_number: '', |
|
|
|
purchase_user_id: '', |
|
|
|
confirm_status: '1', |
|
|
|
item_memo: '', |
|
|
|
total_price: '', |
|
|
|
total_cost: '', |
|
|
|
profit: '', |
|
|
|
editType: 'add', |
|
|
|
purchasePriceList: [{ |
|
|
|
run_date: '请选择日期', |
|
|
|
price: '', |
|
|
|
cost: '', |
|
|
|
count: '', |
|
|
|
note: '', |
|
|
|
supplier_id: 0 |
|
|
|
}] |
|
|
|
}, |
|
|
|
hotelotherList: [], |
|
|
|
hotelListOpt: [], |
|
|
|
channelListOpt: [], |
|
|
|
userOpt: [], |
|
|
|
// roomPlan: [], |
|
|
|
cf_itemOpt: [], |
|
|
|
supplier_idList: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
disable() { |
|
|
|
return !(this.type == 'add' || this.editSingle) |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
selectChange(val) { |
|
|
|
this.saleCount = this.channelListOpt.filter((item) => item.id == val)//佣金比例 |
|
|
|
this.saleCount = Number(this.saleCount.commission_rate) || 1//佣金比例 |
|
|
|
console.log(this.saleCount) |
|
|
|
}, |
|
|
|
addHotel() { |
|
|
|
this.hotelList.push(JSON.parse(JSON.stringify(this.hotelListObj))) |
|
|
|
}, |
|
|
|
addHotelOther() { |
|
|
|
this.hotelotherList.push(JSON.parse(JSON.stringify(this.hotelotherListObj))) |
|
|
|
}, |
|
|
|
delSinHotel(index) { |
|
|
|
this.hotelList.splice(index, 1) |
|
|
|
}, |
|
|
|
delSinHotelOther(index) { |
|
|
|
this.hotelotherList.splice(index, 1) |
|
|
|
}, |
|
|
|
onSubmit() { |
|
|
|
console.log('submit!'); |
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
let data = {} |
|
|
|
let subOrderList = [...this.hotelList, ...this.hotelotherList] |
|
|
|
data = Object.assign({}, this.orderMain, {'subOrderList': subOrderList}) |
|
|
|
axios.post("/hotel.php/order_main/save", data).then((res) => { |
|
|
|
console.log(res) |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log('error submit!!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
// axios.post("/hotel.php/order_main/newAdd?id=1", {}).then((res) => { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
hotel, |
|
|
|
hotelother |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
active: '1', |
|
|
|
type: window.id ? 'view' : 'add', |
|
|
|
saleCount: 1, |
|
|
|
editSingle: false, |
|
|
|
orderMain: { |
|
|
|
commissioner_id: '', |
|
|
|
channel_id: '', |
|
|
|
channel_order_no: '', |
|
|
|
user_name: '', |
|
|
|
user_phone: "", |
|
|
|
order_memo: "", |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
commissioner_id: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
channel_id: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
channel_order_no: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
user_name: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
user_phone: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
], |
|
|
|
order_memo: [ |
|
|
|
{required: true, message: '请输入', trigger: 'blur'}, |
|
|
|
] |
|
|
|
}, |
|
|
|
orderMainCopy: {}, |
|
|
|
hotelListObj: { |
|
|
|
prod_type: 'hotel', |
|
|
|
hotel_id: '', |
|
|
|
room_id: '', |
|
|
|
plan_id: '', |
|
|
|
check_in_date: '', |
|
|
|
check_out_date: '', |
|
|
|
customer_name: '', |
|
|
|
confirm_no: '', |
|
|
|
trade_order_number: '', |
|
|
|
confirm_status: '1', |
|
|
|
room_memo: '', |
|
|
|
purchase_user_id: '', |
|
|
|
plan_memo: '', |
|
|
|
total_price: '', |
|
|
|
total_cost: '', |
|
|
|
profit: '', |
|
|
|
editType: 'add', |
|
|
|
purchasePriceList: [{ |
|
|
|
run_date: '请选择日期', |
|
|
|
price: '', |
|
|
|
cost: '', |
|
|
|
count: '', |
|
|
|
customer_comments: '', |
|
|
|
supplier_id: 0 |
|
|
|
}] |
|
|
|
}, |
|
|
|
hotelList: [], |
|
|
|
hotelotherListObj: { |
|
|
|
prod_type: 'item', |
|
|
|
item_id: '', |
|
|
|
item_name: '', |
|
|
|
item_unit: '', |
|
|
|
check_in_date: '', |
|
|
|
customer_name: '', |
|
|
|
confirm_no: '', |
|
|
|
trade_order_number: '', |
|
|
|
purchase_user_id: '', |
|
|
|
confirm_status: '1', |
|
|
|
item_memo: '', |
|
|
|
total_price: '', |
|
|
|
total_cost: '', |
|
|
|
profit: '', |
|
|
|
editType: 'add', |
|
|
|
purchasePriceList: [{ |
|
|
|
run_date: '请选择日期', |
|
|
|
price: '', |
|
|
|
cost: '', |
|
|
|
count: '', |
|
|
|
customer_comments: '', |
|
|
|
supplier_id: 0 |
|
|
|
}] |
|
|
|
}, |
|
|
|
hotelotherList: [], |
|
|
|
hotelListOpt: [], |
|
|
|
channelListOpt: [], |
|
|
|
userOpt: [], |
|
|
|
// roomPlan: [], |
|
|
|
cf_itemOpt: [], |
|
|
|
supplier_idList: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
disable() { |
|
|
|
return !(this.type == 'add' || this.editSingle) |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
selectChange(val) { |
|
|
|
this.saleCount = this.channelListOpt.filter((item) => item.id == val)//佣金比例 |
|
|
|
this.saleCount = Number(this.saleCount.commission_rate) || 1//佣金比例 |
|
|
|
console.log(this.saleCount) |
|
|
|
}, |
|
|
|
addHotel() { |
|
|
|
this.hotelList.push(JSON.parse(JSON.stringify(this.hotelListObj))) |
|
|
|
}, |
|
|
|
addHotelOther() { |
|
|
|
this.hotelotherList.push(JSON.parse(JSON.stringify(this.hotelotherListObj))) |
|
|
|
}, |
|
|
|
delSinHotel(index) { |
|
|
|
this.hotelList.splice(index, 1) |
|
|
|
}, |
|
|
|
delSinHotelOther(index) { |
|
|
|
this.hotelotherList.splice(index, 1) |
|
|
|
}, |
|
|
|
onSubmit() { |
|
|
|
console.log('submit!'); |
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
let data = {} |
|
|
|
let subOrderList = [...this.hotelList, ...this.hotelotherList] |
|
|
|
data = Object.assign({}, this.orderMain, {'subOrderList': subOrderList}) |
|
|
|
axios.post("/hotel.php/order_main/save", data).then((res) => { |
|
|
|
this.$alert('新增成功', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
Fast.api.close() |
|
|
|
} |
|
|
|
}); |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log('error submit!!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
// axios.post("/hotel.php/order_main/newAdd?id=1", {}).then((res) => { |
|
|
|
|
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.editSingle = false; |
|
|
|
let data = this.orderMain |
|
|
|
axios.post("/hotel.php/order_main/save", data).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.flag) { |
|
|
|
this.$alert('提示', res.msg, { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}); |
|
|
|
} |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
cancel() { |
|
|
|
this.editSingle = false; |
|
|
|
this.orderMain = this.orderMainCopy |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
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 |
|
|
|
// this.cf_itemOpt = [{ |
|
|
|
// "id": 1, |
|
|
|
// "name": "附加项目1", |
|
|
|
// "item_unit": "件", |
|
|
|
// "item_type": 1, |
|
|
|
// "item_memo": "说说说", |
|
|
|
// "item_type_name": "一日游" |
|
|
|
// }, { |
|
|
|
// "id": 2, |
|
|
|
// "name": "附加项2222", |
|
|
|
// "item_unit": "张", |
|
|
|
// "item_type": 2, |
|
|
|
// "item_memo": "说说说", |
|
|
|
// "item_type_name": "交通接驳" |
|
|
|
// }] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
axios.get("/hotel.php/auth/admin/getList").then((res) => { |
|
|
|
console.log(res) |
|
|
|
this.userOpt = res.data.list |
|
|
|
// this.userOpt = [{"id": 1, "name": "Admin"}, {"id": 2, "name": "瞿殿斌"}, { |
|
|
|
// "id": 3, |
|
|
|
// "name": "宋晓明" |
|
|
|
// }, {"id": 4, "name": "庄亮"}, {"id": 5, "name": "testlkx"}] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
axios.get("/hotel.php/cf_hotel_info/getHotelList").then((res) => { |
|
|
|
console.log(res) |
|
|
|
this.hotelListOpt = res.data.list //取酒店下拉 |
|
|
|
// this.hotelListOpt = [{"id": 0, "name": "暂无"}, {"id": 1, "name": "111"}, {"id": 2, "name": "222"}] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
axios.get("/hotel.php/cf_suplier_info/getList").then((res) => { |
|
|
|
console.log(res) |
|
|
|
this.supplier_idList = res.data.list //取供应商下拉 |
|
|
|
// this.hotelListOpt = [{"id": 0, "name": "暂无"}, {"id": 1, "name": "111"}, {"id": 2, "name": "222"}] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.editSingle = false; |
|
|
|
let data = this.orderMain |
|
|
|
axios.post("/hotel.php/order_main/save", data).then((res) => { |
|
|
|
if (res.data.flag) { |
|
|
|
|
|
|
|
// axios.get("/hotel.php/cf_room_plan/getList").then((res) => { |
|
|
|
// console.log(res) |
|
|
|
// this.roomPlan = res.data.list //取酒店价格方案 |
|
|
|
// // this.roomPlan = [{"id": 1, "name": "111"}] |
|
|
|
// }).catch((err) => { |
|
|
|
// console.log(err) |
|
|
|
// }) |
|
|
|
axios.get("/hotel.php/cf_channel_info/getList").then((res) => { |
|
|
|
console.log(res) |
|
|
|
this.channelListOpt = res.data.list |
|
|
|
// this.channelListOpt = [{"id": 1, "name": "测试飞猪", "commission_rate": "10.00"}, { |
|
|
|
// "id": 2, |
|
|
|
// "name": "【昊瀚】飞猪日历房", |
|
|
|
// "commission_rate": "8.00" |
|
|
|
// }, {"id": 3, "name": "【昊瀚】飞猪套餐", "commission_rate": "3.50"}, { |
|
|
|
// "id": 4, |
|
|
|
// "name": "【水汪清】携程", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 5, "name": "【昊瀚】美团大众", "commission_rate": "0.00"}, { |
|
|
|
// "id": 6, |
|
|
|
// "name": "【守则固】携程", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 7, "name": "【守则固】同程艺龙", "commission_rate": "0.00"}, { |
|
|
|
// "id": 8, |
|
|
|
// "name": "【守则固】途牛", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 9, "name": "【水汪清】去哪儿", "commission_rate": "0.00"}, { |
|
|
|
// "id": 10, |
|
|
|
// "name": "【昊瀚】小红书", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 11, "name": "【冲抵】唯途", "commission_rate": "0.00"}, { |
|
|
|
// "id": 12, |
|
|
|
// "name": "【昊瀚】淘1站", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 13, "name": "【昊瀚】线下", "commission_rate": "0.00"}, { |
|
|
|
// "id": 14, |
|
|
|
// "name": "【水汪清】浪客行", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 15, "name": "【毛木宁】日历房", "commission_rate": "8.00"}, { |
|
|
|
// "id": 16, |
|
|
|
// "name": "【毛木宁】套餐", |
|
|
|
// "commission_rate": "3.50" |
|
|
|
// }] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
console.log(this.type) |
|
|
|
if (this.type != 'add') { |
|
|
|
axios.post("/hotel.php/order_main/getShowInfo", {id: window.id}).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.flag) { |
|
|
|
let orderMain = this.$lo.cloneDeep(res.data) |
|
|
|
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) |
|
|
|
} |
|
|
|
// this.channelListOpt = res.data.list |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$alert(res.data.msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}); |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
cancel() { |
|
|
|
this.editSingle = false; |
|
|
|
this.orderMain = this.orderMainCopy |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
axios.defaults.baseURL = '/api' //关键代码 |
|
|
|
} |
|
|
|
axios.get("/hotel.php/cf_item/getList").then((res) => { |
|
|
|
this.cf_itemOpt = res.data.list |
|
|
|
// this.cf_itemOpt = [{ |
|
|
|
// "id": 1, |
|
|
|
// "name": "附加项目1", |
|
|
|
// "item_unit": "件", |
|
|
|
// "item_type": 1, |
|
|
|
// "item_memo": "说说说", |
|
|
|
// "item_type_name": "一日游" |
|
|
|
// }, { |
|
|
|
// "id": 2, |
|
|
|
// "name": "附加项2222", |
|
|
|
// "item_unit": "张", |
|
|
|
// "item_type": 2, |
|
|
|
// "item_memo": "说说说", |
|
|
|
// "item_type_name": "交通接驳" |
|
|
|
// }] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
axios.get("/hotel.php/auth/admin/getList").then((res) => { |
|
|
|
this.userOpt = res.data.list |
|
|
|
// this.userOpt = [{"id": 1, "name": "Admin"}, {"id": 2, "name": "瞿殿斌"}, { |
|
|
|
// "id": 3, |
|
|
|
// "name": "宋晓明" |
|
|
|
// }, {"id": 4, "name": "庄亮"}, {"id": 5, "name": "testlkx"}] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
axios.get("/hotel.php/cf_hotel_info/getHotelList").then((res) => { |
|
|
|
this.hotelListOpt = res.data.list //取酒店下拉 |
|
|
|
// this.hotelListOpt = [{"id": 0, "name": "暂无"}, {"id": 1, "name": "111"}, {"id": 2, "name": "222"}] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
axios.get("/hotel.php/cf_suplier_info/getList").then((res) => { |
|
|
|
this.supplier_idList = res.data.list //取供应商下拉 |
|
|
|
// this.hotelListOpt = [{"id": 0, "name": "暂无"}, {"id": 1, "name": "111"}, {"id": 2, "name": "222"}] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
|
|
|
|
// axios.get("/hotel.php/cf_room_plan/getList").then((res) => { |
|
|
|
// console.log(res) |
|
|
|
// this.roomPlan = res.data.list //取酒店价格方案 |
|
|
|
// // this.roomPlan = [{"id": 1, "name": "111"}] |
|
|
|
// }).catch((err) => { |
|
|
|
// console.log(err) |
|
|
|
// }) |
|
|
|
axios.get("/hotel.php/cf_channel_info/getList").then((res) => { |
|
|
|
this.channelListOpt = res.data.list |
|
|
|
// this.channelListOpt = [{"id": 1, "name": "测试飞猪", "commission_rate": "10.00"}, { |
|
|
|
// "id": 2, |
|
|
|
// "name": "【昊瀚】飞猪日历房", |
|
|
|
// "commission_rate": "8.00" |
|
|
|
// }, {"id": 3, "name": "【昊瀚】飞猪套餐", "commission_rate": "3.50"}, { |
|
|
|
// "id": 4, |
|
|
|
// "name": "【水汪清】携程", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 5, "name": "【昊瀚】美团大众", "commission_rate": "0.00"}, { |
|
|
|
// "id": 6, |
|
|
|
// "name": "【守则固】携程", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 7, "name": "【守则固】同程艺龙", "commission_rate": "0.00"}, { |
|
|
|
// "id": 8, |
|
|
|
// "name": "【守则固】途牛", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 9, "name": "【水汪清】去哪儿", "commission_rate": "0.00"}, { |
|
|
|
// "id": 10, |
|
|
|
// "name": "【昊瀚】小红书", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 11, "name": "【冲抵】唯途", "commission_rate": "0.00"}, { |
|
|
|
// "id": 12, |
|
|
|
// "name": "【昊瀚】淘1站", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 13, "name": "【昊瀚】线下", "commission_rate": "0.00"}, { |
|
|
|
// "id": 14, |
|
|
|
// "name": "【水汪清】浪客行", |
|
|
|
// "commission_rate": "0.00" |
|
|
|
// }, {"id": 15, "name": "【毛木宁】日历房", "commission_rate": "8.00"}, { |
|
|
|
// "id": 16, |
|
|
|
// "name": "【毛木宁】套餐", |
|
|
|
// "commission_rate": "3.50" |
|
|
|
// }] |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
console.log(this.type) |
|
|
|
if (this.type != 'add') { |
|
|
|
axios.post("/hotel.php/order_main/getShowInfo", {id: window.id}).then((res) => { |
|
|
|
console.log('detailDatas', res.data) |
|
|
|
if (res.data.flag) { |
|
|
|
let orderMain = this.$lo.cloneDeep(res.data.data) |
|
|
|
delete orderMain.subOrderList |
|
|
|
this.orderMain = orderMain |
|
|
|
this.orderMainCopy = this.$lo.cloneDeep(orderMain) |
|
|
|
res.data.data.subOrderList.forEach((item) => { //回显值的处理 |
|
|
|
item.purchasePriceList.forEach((value) => { |
|
|
|
value.supplier_id = item.supplier_id |
|
|
|
value.customer_comments = item.customer_comments |
|
|
|
}) |
|
|
|
item.editType = 'view' |
|
|
|
}) |
|
|
|
|
|
|
|
this.hotelList = res.data.data.subOrderList.filter((item) => item.hotel_id) |
|
|
|
this.hotelotherList = res.data.data.subOrderList.filter((item) => item.item_id) |
|
|
|
} |
|
|
|
// this.channelListOpt = res.data.list |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="css"> |
|
|
|
.left { |
|
|
|
text-align: left; |
|
|
|
} |
|
|
|
.left { |
|
|
|
text-align: left; |
|
|
|
} |
|
|
|
|
|
|
|
.card { |
|
|
|
overflow-x: scroll; |
|
|
|
} |
|
|
|
.card { |
|
|
|
overflow-x: scroll; |
|
|
|
} |
|
|
|
</style> |