Commit 6c16d9fb by 肖康

x

parent 4a62687b
...@@ -226,6 +226,10 @@ body { ...@@ -226,6 +226,10 @@ body {
.f-yellow1{color:#CC8200;} .f-yellow1{color:#CC8200;}
.f-red1{color:#FC1F00;} .f-red1{color:#FC1F00;}
/**element-ui 样式重写**/ /**element-ui 样式重写**/
.el-pagination{
text-align: right;
margin-top: 20px;
}
.el-message--info { .el-message--info {
min-width: auto !important; min-width: auto !important;
border: 0px !important; border: 0px !important;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div @click="getData" class="search-btn">搜索</div> <div @click="submit" class="search-btn">搜索</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
<el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange"> <el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="37"> <el-table-column fixed type="selection" width="37">
</el-table-column> </el-table-column>
<el-table-column label="单号" min-width="20%"> <el-table-column label="单号" min-width="20%">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="'/#/listDetail?sn='+scope.row.up_sn" class="f-blue">{{scope.row.up_sn}}</a> <a :href="'/#/listDetail?sn='+scope.row.up_sn" class="f-blue">{{scope.row.up_sn}}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="file_name" label="文件名字" min-width="20%"> <el-table-column prop="file_name" label="文件名字" min-width="20%">
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
<el-table-column prop="create_time" label="上传时间" min-width="20%"> <el-table-column prop="create_time" label="上传时间" min-width="20%">
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination layout="prev, pager, next" :page-size="limit" :total="total" @current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div> </div>
</div> </div>
...@@ -79,17 +81,19 @@ ...@@ -79,17 +81,19 @@
TableColumn, TableColumn,
Message, Message,
MessageBox, MessageBox,
Dialog Dialog,
Pagination
} from 'element-ui' } from 'element-ui'
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog) Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination)
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table) Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table)
export default { export default {
name: "enter", name: "enter",
data() { data() {
return { return {
total: 0,
page: 10, limit: 10,
page: 1,
formInline: { formInline: {
status: '', status: '',
date: '' date: ''
...@@ -106,19 +110,25 @@ ...@@ -106,19 +110,25 @@
methods: { methods: {
getData() { getData() {
this.$http('get', "/api/uploadSku/list", { this.$http('get', "/api/uploadSku/list", {
page: 1, page: this.page,
limit: this.limit,
status: this.formInline.status, status: this.formInline.status,
action_time: this.formInline.date[0], action_time: this.formInline.date[0],
end_time: this.formInline.date[1] end_time: this.formInline.date[1]
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
console.log(res) console.log(res)
this.tableData = res.data.list || [] this.tableData = res.data.list || [];
this.total =res.data.total||0;
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
}) })
}, },
submit() {
this.page = 1;
this.getData();
},
checkdr() { checkdr() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
Message("只能选择一条数据导入") Message("只能选择一条数据导入")
...@@ -144,28 +154,32 @@ ...@@ -144,28 +154,32 @@
Message("请至少选择一条数据") Message("请至少选择一条数据")
return return
} }
var arr=[]; var arr = [];
for(var i=0;i<this.multipleSelection.length;i++){ for (var i = 0; i < this.multipleSelection.length; i++) {
arr.push(this.multipleSelection[i]['id']) arr.push(this.multipleSelection[i]['id'])
} }
MessageBox.confirm('确认到删除当前勾选数据吗?', { MessageBox.confirm('确认到删除当前勾选数据吗?', {
type: 'error' type: 'error'
}) })
.then(()=> { .then(() => {
this.$http('get', "/api/uploadSku/del", { this.$http('get', "/api/uploadSku/del", {
log_ids: arr.join(",") log_ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); Message("删除成功");
this.getData() this.getData()
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
}) })
}) })
}, },
handleCurrentChange(val) {
this.page=val;
this.getData();
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val || []; this.multipleSelection = val || [];
console.log(this.multipleSelection) console.log(this.multipleSelection)
......
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 sign in to comment