Commit 6c16d9fb by 肖康

x

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