182 行
6.9 KiB
HTML
可执行文件
182 行
6.9 KiB
HTML
可执行文件
<!DOCTYPE html>
|
||
<html>
|
||
<!--jsy添加-->
|
||
<!--[1.4.13]-->
|
||
<head>
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/layui/css/layui.css"/>
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css">
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.css">
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/myscroll.css"/>
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common-upload.css">
|
||
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
|
||
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/vue/element-ui.js"></script>
|
||
<title>配送区域查看</title>
|
||
</head>
|
||
<body>
|
||
<div id="app">
|
||
<el-container>
|
||
<el-main>
|
||
<!--表格-->
|
||
<!--免运费-->
|
||
<template v-if="type==1">
|
||
<el-table
|
||
:data="tableData"
|
||
border
|
||
style="width: 100%"
|
||
:cell-style="rowClass"
|
||
:header-cell-style="headClass">
|
||
<el-table-column
|
||
prop="areaData"
|
||
label="配送区域">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.areaData" >{{scope.row.areaData}}</p>
|
||
<p v-else >暂未选择</p>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</template>
|
||
<!--按件数-->
|
||
<template v-if="type==2">
|
||
<el-table
|
||
:data="tableData"
|
||
border
|
||
style="width: 100%"
|
||
:cell-style="rowClass"
|
||
:header-cell-style="headClass">
|
||
<el-table-column
|
||
prop="areaData"
|
||
label="配送区域">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.areaData" >{{scope.row.areaData}}</p>
|
||
<p v-else >暂未选择</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="first_num"
|
||
label="首件(件)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="first_fee"
|
||
label="运费(元)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="append_num"
|
||
label="续件(件)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="append_fee"
|
||
label="续费(元)">
|
||
</el-table-column>
|
||
</el-table>
|
||
</template>
|
||
<!--按重量-->
|
||
<template v-if="type==3">
|
||
<el-table
|
||
:data="tableData"
|
||
border
|
||
style="width: 100%"
|
||
:cell-style="rowClass"
|
||
:header-cell-style="headClass">
|
||
<el-table-column
|
||
prop="areaData"
|
||
label="配送区域">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.areaData" >{{scope.row.areaData}}</p>
|
||
<p v-else >暂未选择</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="first_num"
|
||
label="首重(kg)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="first_fee"
|
||
label="运费(元)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="append_num"
|
||
label="续重(kg)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="append_fee"
|
||
label="续费(元)">
|
||
</el-table-column>
|
||
</el-table>
|
||
</template>
|
||
<!--统一运费-->
|
||
<template v-if="type==4">
|
||
<el-table
|
||
:data="tableData"
|
||
border
|
||
style="width: 100%"
|
||
:cell-style="rowClass"
|
||
:header-cell-style="headClass">
|
||
<el-table-column
|
||
prop="areaData"
|
||
label="配送区域">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.areaData" >{{scope.row.areaData}}</p>
|
||
<p v-else >暂未选择</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="unified_fee"
|
||
label="统一运费">
|
||
</el-table-column>
|
||
</el-table>
|
||
</template>
|
||
</el-main>
|
||
</el-container>
|
||
</div>
|
||
</body>
|
||
<style>
|
||
|
||
</style>
|
||
<script type="text/javascript" src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||
<script type="text/javascript">
|
||
var app = new Vue({
|
||
el: '#app',
|
||
data: function () {
|
||
return {
|
||
temId:'',//模板ID
|
||
tableData: null,
|
||
type:'',
|
||
}
|
||
},
|
||
mounted:function(){
|
||
// console.log({$id});
|
||
this.temId={$id};
|
||
this.getTestApi();
|
||
},
|
||
methods: {
|
||
// 表头样式设置
|
||
headClass () {
|
||
return 'text-align: center;background:#eef1f6;'
|
||
},
|
||
// 表格样式设置
|
||
rowClass () {
|
||
return 'text-align: center;'
|
||
},
|
||
// 数据刷新
|
||
getTestApi: function () {
|
||
var that= this;
|
||
$.ajax({
|
||
url:"{:U('SystemDelivery/viewDistributionArea')}",
|
||
type: 'post',
|
||
dataType: 'json',
|
||
data: {
|
||
temId:that.temId,
|
||
},
|
||
success: res => {
|
||
// console.log(res);
|
||
that.tableData = res.data;
|
||
that.type = res.data[0].type;
|
||
// console.log(that.type);
|
||
}
|
||
});
|
||
},
|
||
}
|
||
})
|
||
</script>
|
||
</html> |