Commit dc9c857a authored by 罗超's avatar 罗超

no message

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