Commit dc9c857a authored by 罗超's avatar 罗超

no message

parent 412d6e51
......@@ -15,9 +15,11 @@
<el-input size="mini" placeholder="输入订单ID" v-model="msg.OrderId" label="订单ID" @blur="getList"></el-input>
</el-col>
<el-col :span="8">
<el-select size="mini" width="200" v-model="msg.TicketStatus" placeholder="请选择" @change="getList">
<el-option v-for="(item,index) in ticketingStatusList"
:key="index" :label="item.Name" :value="item.id"></el-option>
<el-select size="mini" width="200" v-model="msg.TicketStatus" placeholder="请选择"
@change="getList">
<el-option
v-for="item in ticketingStatusList"
:key="item.id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</el-col>
</el-row>
......@@ -42,7 +44,8 @@
label="订单号"
show-overflow-tooltip>
<template slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.OrderId}}</p>
{{scope.row.OrderId}}
<!-- <p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.OrderId}}</p> -->
</template>
</el-table-column>
<el-table-column
......@@ -53,10 +56,10 @@
</template>
</el-table-column>
<el-table-column
label="地址"
label="起始地址"
show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.StartCityName}}=>{{scope.row.EndCityName}}
{{scope.row.StartCityName}} —— {{scope.row.EndCityName}}
</template>
</el-table-column>
<el-table-column
......@@ -65,9 +68,12 @@
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Money"
label="订单金额"
show-overflow-tooltip>
<template slot-scope="scope">
<!-- Edit order amount -->
<p @click="editOrderAmount(scope)" class="font-color-link cp">{{scope.row.Money}}</p>
</template>
</el-table-column>
<el-table-column
prop="IncomeMoney"
......@@ -140,7 +146,7 @@
</el-table-column>
</el-table>
</div>
<div v-if="dataList.length">
<div v-if="total>0">
<el-pagination class="Mypagination" background @current-change="handleCurrentChange"
:page-sizes="[30, 60, 90, 100]" :page-size="msg.pageSize" layout="sizes, prev, pager, next"
@size-change="handleSizeChange" :total="total">
......@@ -161,7 +167,7 @@ export default {
pageSize: 10,
OrderId:"",
GuestId:"",
TicketStatus: 0,
TicketStatus: '0',
OrderStatus:"",
StartCityName: "",
EndCityName: "",
......@@ -184,6 +190,12 @@ export default {
this.GetTicketStatusEnumList()
},
methods: {
// 编辑订单金额
editOrderAmount(scope){
console.log(scope.row, '111111')
let $this = this;
this.MsgBus.$emit("editTicketOrderBoxOpen", $this.ID, scope.row, true);
},
openDetails(scope) {
console.log(scope.row.ID);
this.MsgBus.$emit("busnessDrawerShow", scope.row.ID, 1);
......@@ -192,7 +204,6 @@ export default {
GetTicketStatusEnumList(){
let $this = this
this.msg.GuestId = $this.ID
console.log(this.msg.GuestId, 'this.msg.GuestId')
this.apipost(
"/api/Order/GetTicketStatusEnumList",
{},
......@@ -201,7 +212,7 @@ export default {
this.ticketingStatusList = res.data.data;
let data = {
Name:'全部',
id:0
Id:'0'
}
this.ticketingStatusList.unshift(data)
} else {
......@@ -210,6 +221,7 @@ export default {
}
);
},
// 获取订单列表
getList() {
this.loading = true;
this.apipost(
......@@ -217,8 +229,7 @@ export default {
this.msg,
(res) => {
if (res.data.resultCode == 1) {
console.log(res.data.data);
this.dataList = res.data.data;
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
this.loading = false
} else {
......@@ -227,6 +238,7 @@ export default {
}
);
},
// 添加订单
addBusiness() {
let $this = this;
this.MsgBus.$emit("addTicketOrderBoxOpen", $this.ID, 0, true);
......@@ -237,6 +249,10 @@ export default {
this.msg.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
},
};
</script>
......@@ -120,9 +120,9 @@
<el-tab-pane label="商机" name="5">
<Business v-if="activeName === '5'" :ID="CustomerId" />
</el-tab-pane>
<!-- <el-tab-pane label="订单" name="6">
<Agreement :ID="CustomerId" />
</el-tab-pane> -->
<el-tab-pane label="订单" name="6">
<Agreement v-if="activeName === '6'" :ID="CustomerId" />
</el-tab-pane>
<el-tab-pane label="回款" name="7" v-if="false">
<!-- <MoneyBack /> -->
</el-tab-pane>
......
......@@ -230,6 +230,7 @@ export default {
"isGuest",
"TicketOrderId",
"GuestId",
"OrderId"
],
data() {
return {
......@@ -268,110 +269,35 @@ export default {
watch: {
ID: {
handler(val, oldVal) {
console.log(val,'-1-11-');
this.form.GuestId = val
// console.log(val,'-1-11-');
// this.form.GuestId = val
},
deep: true,
},
CustomerId: {
GuestId: {
handler(val, oldVal) {
console.log(val);
this.form.GuestId = val
},
deep: true,
},
isGuest: {
CustomerId: {
handler(val, oldVal) {
if (val) {
this.form.CustomerType = 1;
this.getGuestList();
} else {
this.getCustomerList();
}
console.log(val);
},
deep: true,
},
},
mounted() {
// console.log(this.isGuest);
// if (this.isGuest) {
// this.form.CustomerType = 1;
// this.getGuestList();
// } else {
// this.getCustomerList();
// }
this.getLineList();
this.GetBusinessStatusEnum();
this.form.GuestId = this.GuestId
this.form.OrderId = this.OrderId
// console.log(this.GuestId, '----------')
let $this = this;
if (this.CustomerId !== 0) {
this.form.CustomerId = this.CustomerId;
}
setTimeout(() => {
$this.dialogTableVisible = true;
}, 50);
if (this.ID !== 0) {
let msg = {
BusinessId: this.ID,
};
if (this.isGuest) {
msg.CustomerType = 1;
}
this.apipost("/api/Customer/GetAllBusinessModel", msg, (res) => {
if (res.data.resultCode == 1) {
let data = res.data.data;
if (data.LineId) {
this.getLineTeamList(data.LineId, 1);
}
this.form = data;
}
});
}
},
methods: {
//获取系列列表
getLineTeamList(lineId, type) {
if (!type) {
this.form.LineteamId = "";
}
this.apipost2(
"b2b_get_GetLineTeam",
{
lineId: lineId,
},
(res) => {
if (res.data.resultCode == 1) {
this.LineTeamList = res.data.data;
}
}
);
},
getLineList() {
this.apipost2("line_post_GetAllList", {}, (res) => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
GetBusinessStatusEnum() {
this.apipost("/api/Customer/GetBusinessStatusEnum", {}, (res) => {
if (res.data.resultCode == 1) {
this.BusinessStatusEnum = res.data.data;
}
});
},
getGuestList() {
this.apipost("/api/Customer/GetGuesstCustomerByCreateList", {}, (res) => {
if (res.data.resultCode == 1) {
this.CustomerList = res.data.data;
}
});
},
getCustomerList() {
this.apipost("/api/Customer/GetCustomerListByCreateInfo", {}, (res) => {
if (res.data.resultCode == 1) {
this.CustomerList = res.data.data;
}
});
},
closedDialog() {
this.MsgBus.$emit("closeTicketOrderDialogBox");
},
......@@ -379,15 +305,8 @@ export default {
this.apipost("/api/Order/SetGuestOrderInfo", this.form, (res) => {
if (res.data.resultCode == 1) {
this.dialogTableVisible = false;
// 有id 发送更新抽屉消息
if (this.CustomerId !== 0) {
this.$message.success("操作成功");
this.MsgBus.$emit("RefreshInfoBox");
} else {
this.$message.success("操作成功");
}
this.$emit("getList");
this.MsgBus.$emit("RefreshbusSelect");
this.MsgBus.$emit("closeTicketOrderDialogBox");
this.resetForm("form");
} else {
this.$message.error(res.data.message);
......@@ -395,8 +314,8 @@ export default {
});
},
submitForm(addMsg) {
console.log(this.form, '-----')
return
// console.log(this.form, '-----')
// return
//提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
......
......@@ -92,8 +92,8 @@
<!-- 添加机票订单 -->
<div v-if="dialogTicketOrderVisible">
<ticketOrder :name="dialogTicketOrderVisibleName"
:ID="TicketOrderID" :GuestId="GuestId"
:msg="msg" type="1"/>
:ID="TicketOrderID" :GuestId="GuestId" :obj="obj"
type="1"/>
</div>
<!-- 客户信息抽屉 -->
<el-drawer
......@@ -285,15 +285,16 @@ export default {
SceneID: 0,
TicketOrderID: 0,
GuestId: 0,
obj: {}
};
},
watch:{
// ID: {
// handler(val, oldVal){
// this.TicketOrderID = val
// },
// deep:true
// }
ID: {
handler(val, oldVal){
this.TicketOrderID = val
},
deep:true
}
},
mounted() {
this.userInfo = this.getLocalStorage();
......@@ -318,13 +319,20 @@ export default {
this.MsgBus.$on("closeBusinessDialogBox", function() {
$this.dialogBusinessVisible = false;
});
this.MsgBus.$on("addTicketOrderBoxOpen", function(GuestId,a,b) {
this.MsgBus.$on("addTicketOrderBoxOpen", function(GuestId) {
$this.dialogTicketOrderVisibleName = "新建机票订单";
$this.GuestId = GuestId;
$this.dialogTicketOrderVisible = true;
});
this.MsgBus.$on("editTicketOrderBoxOpen", function(GuestId,obj) {
$this.dialogTicketOrderVisibleName = "编辑订单金额";
$this.GuestId = GuestId;
$this.obj = obj;
$this.dialogTicketOrderVisible = true;
this.dialogTicketOrderVisibleName = "新建机票订单";
});
this.MsgBus.$on("closeTicketOrderDialogBox", function() {
$this.dialogTicketOrderVisible = false;
this.$emit("getList");
});
this.MsgBus.$on("closeCustomerDialogBox", function() {
$this.dialogCustomerVisible = false;
......
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