Przeglądaj źródła

子订单展示优化

dev
nizongfeng 3 lat temu
rodzic
commit
c44864c67c
2 zmienionych plików z 59 dodań i 18 usunięć
  1. +39
    -16
      application/admin/view/order_main/index.html
  2. +20
    -2
      application/admin/view/payment_order/index.html

+ 39
- 16
application/admin/view/order_main/index.html Wyświetl plik

@@ -154,21 +154,13 @@
<div v-if="prop.row.type=='附加项目'" v-html="prop.row.item_name"></div>
</template>
</el-table-column>
<el-table-column prop="trade_order_number" label="第三方订单号" min-width="50" ></el-table-column>
<el-table-column prop="total_price" label="金额" min-width="30" ></el-table-column>
<el-table-column prop="total_cost" label="成本" min-width="30" ></el-table-column>
<el-table-column prop="prod_num" label="数量" min-width="20" ></el-table-column>
<el-table-column prop="customer_name" label="出游人姓名" min-width="40" ></el-table-column>
<el-table-column label="发单状态" min-width="30" :formatter="confirmStatusName"></el-table-column>
<el-table-column prop="create_time" label="子订单生成时间" min-width="60" ></el-table-column>
<el-table-column prop="payment_order_name" label="付款单" min-width="40" >
<template slot-scope="scope">
<div v-if="scope.row.payment_order_id" v-html="scope.row.payment_order_id"></div>
<div v-if="scope.row.payment_order_id" v-html="scope.row.payment_order_name"></div>
<el-table-column label="房型/项目类型" min-width="80" >
<template slot-scope="prop">
<div v-if="prop.row.type=='酒店'" v-html="prop.row.room_name"></div>
<div v-if="prop.row.type=='附加项目'" v-html="getTypeName(prop.row)"></div>
</template>
</el-table-column>
<el-table-column label="付款单状态" min-width="40" :formatter="paymentOrderStatus" ></el-table-column>
<el-table-column prop="id" label="时间" min-width="30" >
<el-table-column prop="id" label="时间" min-width="40" >
<template slot-scope="prop">
<div v-if="prop.row.type=='酒店'" >
<div v-html="prop.row.check_in_date"></div>
@@ -177,6 +169,19 @@
<div v-if="prop.row.type=='附加项目'" v-html="prop.row.check_in_date"></div>
</template>
</el-table-column>
<el-table-column prop="prod_num" label="数量" min-width="20" ></el-table-column>
<el-table-column prop="customer_name" label="出游人姓名" min-width="40" ></el-table-column>
<el-table-column prop="total_price" label="金额" min-width="30" ></el-table-column>
<el-table-column prop="total_cost" label="成本" min-width="30" ></el-table-column>
<el-table-column prop="profit" label="利润" min-width="30" ></el-table-column>
<el-table-column label="发单状态" min-width="30" :formatter="confirmStatusName"></el-table-column>
<el-table-column prop="payment_order_name" label="付款单" min-width="40" >
<template slot-scope="scope">
<div v-if="scope.row.payment_order_id" v-html="scope.row.payment_order_id"></div>
<div v-if="scope.row.payment_order_id" v-html="scope.row.payment_order_name"></div>
</template>
</el-table-column>
<el-table-column label="付款单状态" min-width="40" :formatter="paymentOrderStatus" ></el-table-column>
</el-table>
</template>
</el-table-column>
@@ -314,7 +319,8 @@
{"id": 0, 'value': "未付款"},
{"id": 1, 'value': "付款中"},
{"id": 2, 'value': "已付款"}
]
],
type_list:[],
}
},
created() {
@@ -325,8 +331,9 @@
});
this.getAdminUser();
this.getChannelList();
this.getProvince();
this.getData(1)
this.getProvince();
this.getConfig()
this.getData(1)
},
watch: {
"search.province" : function (newVal,oldVal){
@@ -376,6 +383,22 @@
},
},
methods: {
getTypeName(info) {
for (let i = 0; i < this.type_list.length; i++) {
if (this.type_list[i].id == info.item_type) {
return this.type_list[i].name
}
}
return ""
},
getConfig(){
axios.post("/hotel.php/general/config/getList?key=site.item_category", {}).then((response) => {
let data = response.data;
this.type_list = data.list;
}).catch(function (error) {
console.log(error);
});
},
paymentOrderStatus(info){
if (info.payment_order_id ==0) {
return "-"


+ 20
- 2
application/admin/view/payment_order/index.html Wyświetl plik

@@ -221,7 +221,7 @@
<el-table-column label="订单类型" min-width="30" :formatter="getProdTypeName" ></el-table-column>
<el-table-column prop="supplier_name" label="供应商" min-width="40" ></el-table-column>
<el-table-column prop="trade_order_number" label="第三方订单号" min-width="40" ></el-table-column>
<el-table-column prop="hotel_name" label="酒店/附加项目" min-width="80" ></el-table-column>
<el-table-column prop="hotel_name" label="酒店/项目类型" min-width="80" :formatter="getTypeName"></el-table-column>
<el-table-column prop="room_name" label="房型/附加项目" min-width="80" ></el-table-column>
<el-table-column prop="plan_name" label="价格方案/计价单位" min-width="40" ></el-table-column>
<el-table-column prop="check_in_date" label="时间" min-width="40" >
@@ -349,7 +349,8 @@
supplierList:[],
multipleSelection: [],
hotelList:[],
itemList:[]
itemList:[],
type_list:[],
}
},
created() {
@@ -357,6 +358,7 @@
this.getSupplierList();
this.getData(1)
this.getHotelList()
this.getConfig()
this.getItemList()

},
@@ -366,6 +368,22 @@
}
},
methods: {
getTypeName(info) {
for (let i = 0; i < this.type_list.length; i++) {
if (this.type_list[i].id == info.hotel_name) {
return this.type_list[i].name
}
}
return info.hotel_name
},
getConfig(){
axios.post("/hotel.php/general/config/getList?key=site.item_category", {}).then((response) => {
let data = response.data;
this.type_list = data.list;
}).catch(function (error) {
console.log(error);
});
},
getProdTypeName(info){
for (let i = 0; i < this.prodTypeList.length; i++) {
if (this.prodTypeList[i].id == info.prod_type) {


Ładowanie…
Anuluj
Zapisz