修改订单表格样式

This commit is contained in:
@fawn-nine
2023-05-29 18:03:50 +08:00
parent 64f6bf09ab
commit 8e7a0ac397
7 changed files with 42 additions and 34 deletions

View File

@@ -2,7 +2,7 @@
<div> <div>
<el-dialog class="anyDialog" :title="`${title}`" :close-on-click-modal="false" :visible.sync="visible" width='500px' <el-dialog class="anyDialog" :title="`${title}`" :close-on-click-modal="false" :visible.sync="visible" width='500px'
:before-close="beforeCloseDialog"> :before-close="beforeCloseDialog">
<div class="textBody" v-html="content"></div> <div class="textBody" v-html="content" ></div>
<div slot="footer" class="dialog-footer" style="text-align: center;"> <div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="beforeCloseDialog"> </el-button> <el-button type="primary" @click="beforeCloseDialog"> </el-button>
</div> </div>
@@ -43,6 +43,7 @@ export default {
</script> </script>
<style> <style>
.textBody{display: block; height: 600px; overflow-y: scroll; position: relative;}
.content { .content {
text-align: center; text-align: center;
margin-top: 15px; margin-top: 15px;

View File

@@ -13,14 +13,14 @@
<div class="liName">面单信息</div> <div class="liName">面单信息</div>
<!-- <el-alert title="`该订单下共有 2 条物流信息`" type="info"> <!-- <el-alert title="`该订单下共有 2 条物流信息`" type="info">
</el-alert> --> </el-alert> -->
<li class="flexbox deliverBox" style="width: 100%; padding-bottom: 50px;"> <li class="flexbox deliverBox" style="width: 100%; padding-bottom: 50px; ">
<el-row :gutter="20" > <el-row :gutter="20" style="width: 100%;">
<el-col :md="8" :lg="8" class="item" v-for="(item, index) in orderDetails.products"> <el-col :md="8" :lg="8" class="item" v-for="(item, index) in orderDetails.products" :key="index" style="position: static; height: 500px; overflow-y: scroll;">
<div class="deliver_heade"> <div class="deliver_heade" style="position: relative;">
<div><span class="infoTitle">物流公司</span><span>{{item.shipperName}}</span></div> <div><span class="infoTitle">物流公司</span><span>{{item.shipperName}}</span></div>
<div><span class="infoTitle">运单号</span><span>{{item.shippingSn}}</span></div> <div><span class="infoTitle">运单号</span><span>{{item.shippingSn}}</span></div>
<div class="deliver_info"> <div class="deliver_info">
<div v-html="item.fmsHtml" style="zoom: 70%;"></div> <div style="position: relative; height: 500px; display: block; width: inherit;" v-html="item.fmsHtml" ></div>
<div class="buttonceng flexbox" style="height:40px ;"> <div class="buttonceng flexbox" style="height:40px ;">
<el-button size="mini" plain type="primary" @click="printHandle(item)">打印面单</el-button> <el-button size="mini" plain type="primary" @click="printHandle(item)">打印面单</el-button>
</div> </div>
@@ -73,8 +73,9 @@
// 获取订单详情 // 获取订单详情
getData() { getData() {
this.dataListLoading = true this.dataListLoading = true
if (this.query.orderId != 0) {
this.$http({ this.$http({
url: this.$http.adornUrl('/book/buyorder/appGetOrderInfo'), url: this.$http.adornUrl('/book/buyorder/appGetOrderInfo/1'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
'orderId': this.query.orderId, 'orderId': this.query.orderId,
@@ -88,7 +89,8 @@
} }
this.dataListLoading = false this.dataListLoading = false
}) })
}, }
},
// 打印面单 // 打印面单
printHandle(item) { printHandle(item) {
//console.log(item) //console.log(item)

View File

@@ -485,6 +485,7 @@ export default {
// 混合发货 // 混合发货
showAnyDialog(item) { showAnyDialog(item) {
this.anyDialogContent = item.fmsHtml this.anyDialogContent = item.fmsHtml
console.log('面单',item)
if (item.fmsHtml == null) return this.$message.error('暂无面单数据') if (item.fmsHtml == null) return this.$message.error('暂无面单数据')
this.anyDialogVisible = true this.anyDialogVisible = true
this.anyDialogTitle = '查看面单' this.anyDialogTitle = '查看面单'
@@ -544,9 +545,9 @@ export default {
deliverDetail(para) { deliverDetail(para) {
// if (para == '') return this.$message.error('请选择要查询的订单') // if (para == '') return this.$message.error('请选择要查询的订单')
this.oprateOrder = para this.oprateOrder = para
this.$refs.deliverDetail.getDeliverList() this.$refs.deliverDetail.getDeliverList(para)
this.deliverDetailVisible = true this.deliverDetailVisible = true
console.log(this.oprateOrder) // console.log(this.oprateOrder,'oprateOrder')
}, },
// 获取数据列表 // 获取数据列表
getDataList() { getDataList() {

View File

@@ -10,14 +10,13 @@
style=" margin-left:10px;">收货地址</span>天津市河东区天津站</div> --> style=" margin-left:10px;">收货地址</span>天津市河东区天津站</div> -->
<div style=""><icon-svg name="ren"></icon-svg><span <div style=""><icon-svg name="ren"></icon-svg><span
style=" margin-left:10px;">收货人</span>{{ deliverOrder.userName }}</div> style=" margin-left:10px;">收货人</span>{{ deliverOrder.userName }}</div>
<div style="margin-bottom: 5px;"><icon-svg name="dianhua"></icon-svg><span style=" margin-left:10px;"> <div style="margin-bottom: 5px;"><icon-svg name="dianhua"></icon-svg><span style=" margin-left:10px;"> </span>{{ deliverOrder.userPhone }}</div>
</span>{{ deliverOrder.userPhone }}</div>
</div> </div>
<el-row :gutter="10" class="flexbox"> <el-row :gutter="10" class="flexbox">
<div v-if="activities.length === 0" class="noinfo">-暂无物流信息-</div> <div v-if="activities.length == 0" class="noinfo">-暂无物流信息-</div>
<el-col v-else :lg="8" :md="12" :xs="24" v-for="(item, index) in activities" <el-col v-else :lg="8" :md="12" :xs="24" v-for="(item, index) in activities"
:class="item.length == 1 ? 'onlyOne' : 'notOone'"> :class="item.length == 1 ? 'onlyOne' : 'notOone'" >
<div class="scroll"> <div class="scroll">
<div style="margin-bottom: 5px;"><icon-svg name="truck"></icon-svg><span <div style="margin-bottom: 5px;"><icon-svg name="truck"></icon-svg><span
style=" margin-left: 10px;">快递</span>: style=" margin-left: 10px;">快递</span>:
@@ -65,7 +64,7 @@ export default {
}, },
methods: { methods: {
// 根据订单ID查询物流信息 // 根据订单ID查询物流信息
getDeliverList() { getDeliverList(deliverOrder) {
// this.DeliverList = data.list // this.DeliverList = data.list
// console.log('根据订单ID查询物流信息') // console.log('根据订单ID查询物流信息')
// console.log(this.deliverOrder) // console.log(this.deliverOrder)
@@ -75,28 +74,27 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}); });
console.log(this.deliverOrder) console.log(deliverOrder.orderId, '收到的deliverOrder')
this.$http({ this.$http({
url: this.$http.adornUrl('/book/buyorder/queryFMS'), url: this.$http.adornUrl('/book/buyorder/queryFMS'),
method: 'post', method: 'post',
params: this.$http.adornParams({ params: this.$http.adornParams({
'orderId': this.deliverOrder.orderId 'orderId': deliverOrder.orderId
}) })
}).then(({ data }) => { }).then(({ data }) => {
loading.close()
if (data && data.code === 0) { if (data && data.code === 0) {
console.log(data) console.log(data,'data')
if (data.rntStr != []) { if (data.msg.indexOf('暂未查到物流信息') != -1) {
this.activities = data.rntStr this.activities = []
} else { } else {
this.activities = [] this.activities = data.rntStr
} }
loading.close()
this.visible = true this.visible = true
console.log(this.activities,4545) console.log(this.activities,4545)
} else { } else {
loading.close() loading.close()
return this.$message.error('获取失败,请重新尝试') return this.$message.error('获取失败,请重新尝试')
} }
}).catch(() => { }).catch(() => {

View File

@@ -1,7 +1,8 @@
<template> <template>
<el-dialog v-if="orderinfo ? mountSheetNum : false" lock-scroll title="电子面单预览" :visible.sync="visible" width="500px" <el-dialog v-if="orderinfo ? mountSheetNum : false" lock-scroll title="电子面单预览" :visible.sync="visible" width="500px"
:before-close="beforeCloseDialog" center> :before-close="beforeCloseDialog" center>
<div> <div v-if="sheetLength == 0">暂无电子面单数据</div>
<div v-else>
<el-alert :title="`当前订单下共有 ${sheetLength} 个电子面单`" type="success"> </el-alert> <el-alert :title="`当前订单下共有 ${sheetLength} 个电子面单`" type="success"> </el-alert>
<ul class="sheet_list_ui"> <ul class="sheet_list_ui">
<li v-for="(item, index) in orderinfo.products" style="border:1px solid #f1f1f1 ; overflow: hidden; padding: 10px 0;"> <li v-for="(item, index) in orderinfo.products" style="border:1px solid #f1f1f1 ; overflow: hidden; padding: 10px 0;">
@@ -50,6 +51,7 @@ export default {
// 关闭前 // 关闭前
beforeCloseDialog() { beforeCloseDialog() {
this.$emit('closeDialog', false) this.$emit('closeDialog', false)
this.sheetLength = 0
}, },
submit() { submit() {
this.beforeCloseDialog() this.beforeCloseDialog()
@@ -74,7 +76,7 @@ export default {
// 计算面单数量 // 计算面单数量
mountSheetNum() { mountSheetNum() {
this.orderinfo.products.forEach(element => { this.orderinfo.products.forEach(element => {
if (element.fmsHtml != '') { if (element.fmsHtml != '' && element.fmsHtml != null) {
this.sheetLength += 1 this.sheetLength += 1
} }
}); });
@@ -108,8 +110,12 @@ export default {
li { li {
margin-bottom: 10px; margin-bottom: 10px;
display: block;
overflow: hidden;
list-style: none; list-style: none;
padding: 5px; padding: 5px;
position: relative;
height: 600px;
} }
} }

View File

@@ -82,9 +82,9 @@
</div> </div>
<div class="item_body no_right_border no_bottom_border"> <div class="item_body no_right_border no_bottom_border">
<div class="flexbox" style="justify-content: space-between;"> <div class="flexbox" style="justify-content: space-between;">
<div class="td1 flexbox" style="width:100%; "> <div class="td1" style="width:100%; ">
<div class="flexbox orderProducts" style="width:100%;" v-for="(item3, index) in item2.products"> <div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item3, index) in item2.products">
<div class="flexbox productItem" style="width:100%;"> <div class="flexbox productItem" style="width:100%;">
<el-checkbox :label="item3.allOrderId" :disabled="item3.orderStatus == '1'"><br></el-checkbox> <el-checkbox :label="item3.allOrderId" :disabled="item3.orderStatus == '1'"><br></el-checkbox>
<img :src="item3.image" width="30px" style="margin-left: -15px;" <img :src="item3.image" width="30px" style="margin-left: -15px;"
@@ -111,7 +111,7 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-if="radio3 === 'mix' && mixOrderList.length != 0" type="primary" @click="submit"> </el-button> <el-button v-if="radio3 === 'mix' && mixOrderList.length != 0" type="primary" @click="submit"> </el-button>
<el-button v-if="radio3 == 'general'" type="primary" @click="submit1"> </el-button> <el-button v-if="radio3 == 'general'" type="primary" @click="submit1"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@@ -165,7 +165,7 @@ export default {
}) })
}, },
selectChanged(val){ selectChanged(val){
console.log(val.dictValue) console.log(this.ruleForm)
if(this.expressList && this.expressList.length > 0){ if(this.expressList && this.expressList.length > 0){
this.expressList.forEach(element => { this.expressList.forEach(element => {
if(element.dictType == val){ if(element.dictType == val){
@@ -502,7 +502,7 @@ export default {
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; // 控制多行的行数 -webkit-line-clamp: 2; // 控制多行的行数
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-transform: scale(0.8); // -webkit-transform: scale(0.8);
} }
.author { .author {

View File

@@ -14,7 +14,7 @@
<el-form-item label="选择物流" prop="deliverLcd"> <el-form-item label="选择物流" prop="deliverLcd">
<el-select size="mini" v-model="ruleForm.deliverLcd" placeholder="请选择物流" @change="selectChanged"> <el-select size="mini" v-model="ruleForm.deliverLcd" placeholder="请选择物流" @change="selectChanged">
<el-option v-for="(item, index) in expressList" :label="item.dictValue" <el-option v-for="(item, index) in expressList" :label="item.dictValue"
:value="item.dictType" :key="item.dictType"></el-option> :value="item.dictType" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>