Commit 7f5135b3 authored by 沈良进's avatar 沈良进

save'

parent f2b30ee3
...@@ -1601,14 +1601,15 @@ ...@@ -1601,14 +1601,15 @@
<el-form-item label="合作伙伴"> <el-form-item label="合作伙伴">
<el-select <el-select
@change="onChange"
remote remote
remote-method="onSearchFriend" :remote-method="onSearchFriend"
loading="loading" :loading="loading"
multiple multiple
v-model="friendValue" v-model="friendValue"
filterable filterable
:placeholder="$t('system.ph_choice')" :placeholder="$t('system.ph_choice')"
class="w150" style="100%"
> >
<el-option <el-option
v-for="item in friendList" v-for="item in friendList"
...@@ -1617,6 +1618,9 @@ ...@@ -1617,6 +1618,9 @@
:value="item.ID" :value="item.ID"
></el-option> ></el-option>
</el-select> </el-select>
<div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="editForm.Remark"></el-input> <el-input v-model="editForm.Remark"></el-input>
...@@ -1674,8 +1678,10 @@ const baseInfo = { ...@@ -1674,8 +1678,10 @@ const baseInfo = {
max: "", max: "",
}; };
export default { export default {
name: 'addInfo',
data() { data() {
return { return {
loading: false,
ContractArray: [], ContractArray: [],
rules: { rules: {
GTeamName: [ GTeamName: [
...@@ -1912,6 +1918,7 @@ export default { ...@@ -1912,6 +1918,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.customers = []
this.initAirlines(); this.initAirlines();
this.getList(); this.getList();
const { id } = this.$route.query; const { id } = this.$route.query;
...@@ -1920,6 +1927,14 @@ export default { ...@@ -1920,6 +1927,14 @@ export default {
} }
}, },
methods: { methods: {
onChange(value) {
this.friendList.forEach(item => {
if(value.includes(item.ID) && this.customers.findIndex((el) => item.ID === el.ID) === -1) {
this.customers.push(item)
}
})
console.log('onChange',value,this.customers)
},
// 获取包机详情 // 获取包机详情
getDetail(id) { getDetail(id) {
this.apipost( this.apipost(
...@@ -1937,7 +1952,6 @@ export default { ...@@ -1937,7 +1952,6 @@ export default {
}); });
this.addMsg.flightList = TravelTeamFlightList; this.addMsg.flightList = TravelTeamFlightList;
this.friendValue = TravelTeamPartnerList; this.friendValue = TravelTeamPartnerList;
// this.
console.log("this.addMsg.flightList", this.addMsg.flightList); console.log("this.addMsg.flightList", this.addMsg.flightList);
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
...@@ -1946,7 +1960,8 @@ export default { ...@@ -1946,7 +1960,8 @@ export default {
(err) => {} (err) => {}
); );
}, },
onSearchFriend() { onSearchFriend(value) {
console.log('onSearchFriend', value)
this.getList() this.getList()
}, },
// 获取合作伙伴列表 // 获取合作伙伴列表
...@@ -2101,8 +2116,8 @@ export default { ...@@ -2101,8 +2116,8 @@ export default {
this.editForm.TravelTeamFlightList, this.editForm.TravelTeamFlightList,
this.ContractArray this.ContractArray
); );
this.editForm.TravelTeamPartnerList = this.friendValue.map((item) => { this.editForm.TravelTeamPartnerList = this.customers.map((item) => {
return { CustomerId: item }; return {...item, CustomerId: item.ID };
}); });
if (!this.editForm.TravelTeamPartnerList.length) { if (!this.editForm.TravelTeamPartnerList.length) {
this.Warning("请选择合作伙伴"); this.Warning("请选择合作伙伴");
...@@ -2132,7 +2147,8 @@ export default { ...@@ -2132,7 +2147,8 @@ export default {
this.editForm, this.editForm,
this.addMsg, this.addMsg,
this.friendValue, this.friendValue,
this.ContractArray this.ContractArray,
this.customers
); );
this.apipost( this.apipost(
"post_SetTeavelTeam", "post_SetTeavelTeam",
......
<template></templat>
<style><style>
<script></script>
\ No newline at end of file
...@@ -139,10 +139,19 @@ ...@@ -139,10 +139,19 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<el-dialog class="app-attachment-dialog" style="width:1000px;height:800px;margin:0 auto;z-index:99999"
:title="ID ? '修改包机' : '新增包机'" :visible.sync="dialogVisible"
:close-on-click-modal="false">
<addInfo :id="ID"></addInfo>
<apply-info></apply-info>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import addInfo from "./addInfo";
import applyInfo from "./apply";
export default { export default {
components: {addInfo, applyInfo},
provide() { provide() {
return { return {
reload: this.reload reload: this.reload
...@@ -150,6 +159,8 @@ ...@@ -150,6 +159,8 @@
}, },
data() { data() {
return { return {
dialogVisible: false,
ID: '',
//查询参数 //查询参数
queryMsg: { queryMsg: {
pageIndex: 1, pageIndex: 1,
...@@ -201,6 +212,11 @@ ...@@ -201,6 +212,11 @@
}, },
methods: { methods: {
goUrl(path,id, name) { goUrl(path,id, name) {
if(path === 'airplaneInfo') {
this.ID = id
this.dialogVisible = true
return
}
this.$router.push({ this.$router.push({
name: path, name: path,
query: { query: {
...@@ -211,9 +227,11 @@ ...@@ -211,9 +227,11 @@
}); });
}, },
addAirplane() { addAirplane() {
this.$router.push({ this.ID = 0
name: 'airplaneInfo', this.dialogVisible = true
}); // this.$router.push({
// name: 'airplaneInfo',
// });
}, },
//翻页 //翻页
handleCurrentChange(val) { handleCurrentChange(val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment