文件
mashangyoujiu/Application/Retail/View/Goods/sync_goods1.html

160 行
6.3 KiB
HTML
可执行文件

<!doctype html>
<html>
<!--[1.1.59]-->
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>同步商品</title>
<link rel="stylesheet" href="__PUBLIC__/vue/element-ui.css">
<style>
[v-cloak] {
display: none;
}
.seek{
margin-right: 10px;
margin-top: 10px;
white-space: nowrap;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="app" v-cloak style="width: 100%;padding-left: 15px;">
<div style="display: flex;padding-bottom: 15px;flex-wrap: wrap;">
<div class="seek">
<el-input v-model="seek_data.goods_name" placeholder="商品名称" clearable size="small" style="width: 220px;"></el-input>
</div>
<div class="seek">
<el-input v-model="seek_data.keyword" placeholder="货号/条码" clearable size="small" style="width: 220px;"></el-input>
</div>
<div class="seek" style="display: flex;text-align: center;">
<el-button type="primary" @click="getSyncGoods" size="small">查询</el-button>
<el-button type="primary" @click="reset" size="small">重置</el-button>
</div>
</div>
<template>
<el-table :data="sync_goods" :highlight-current-row="true" border size="small" style="width: 100%">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column prop="vip_name" label="商品名称" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="vip_name" label="商品分类" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="vip_name" label="商品货号" width="150" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="mobile_phone" label="商品条码" width="150"></el-table-column>
<el-table-column prop="mobile_phone" label="库存" width="120"></el-table-column>
<el-table-column prop="mobile_phone" label="同步数量" width="100"></el-table-column>
<el-table-column prop="mobile_phone" label="进价" width="100"></el-table-column>
<el-table-column label="售价" align="center">
<el-table-column prop="mobile_phone" label="店内" width="100"></el-table-column>
<el-table-column prop="mobile_phone" label="商城" width="100"></el-table-column>
</el-table-column>
<el-table-column label="会员价" align="center">
<el-table-column prop="mobile_phone" label="店内" width="100"></el-table-column>
<el-table-column prop="mobile_phone" label="商城" width="100"></el-table-column>
</el-table-column>
<el-table-column prop="card_key" label="类型" width="120">
<template scope="scope">
</template>
</el-table-column>
<el-table-column prop="card_key" label="类型" width="120">
<template scope="scope">
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChange"
@current-change="pageChange"
layout="total, sizes, prev, pager, next, jumper"
:pager-count="5"
:page-sizes="[10,20,30,40,50,60,70,80,90]"
:page-size="10"
:total="total">
</el-pagination>
</template>
</div>
</body>
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
<script src="__PUBLIC__/vue/element-ui.js"></script>
<script>
var app = new Vue({
el: '#app',
data: function () {
return {
seek_data: { // 搜索数据
goods_name:'', // 商品名称
keyword:'', // 商品货号、条码
},
sync_goods:[], // 同步商品列表
page:1, // 分页
limit:10, // 每页显示条数
total:0, // 总数 [int]
};
},
methods:{
// 获取同步列表
getSyncGoods(){
var that = this;
// that.$loading({
// lock: true,
// text: '数据获取中,请等待...',
// spinner: 'el-icon-loading',
// background: 'rgba(255, 255, 255, 0.7)'
// });
$.ajax({
url:"{:U('getSyncGoods')}",
type:"post",
data:{seek_data:that.seek_data,page:that.page,limit:that.limit},
success:function (res) {
that.$loading.close();
if(res.status == 1){
that.sync_goods = res.sync_goods;
}else{
that.sync_goods = [];
}
}
})
},
// 重置表单
reset(){
var seek_data = {
goods_name: '',
keyword:'',
};
this.seek_data = seek_data;
this.getSyncGoods();
},
// 分页
pageChange(val){
this.page = val;
this.getSyncGoods();
},
// 显示数量
sizeChange(val){
this.limit = val;
this.page = 1;
this.getSyncGoods();
},
},
created: function () {
this.getSyncGoods();
},
})
</script>
</html>