122 lines
5.8 KiB
PHP
122 lines
5.8 KiB
PHP
@extends('layouts.base')
|
||
@section('title', "未导入成功商品")
|
||
@section('content')
|
||
<link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
|
||
<style>
|
||
.vue-main-title-button{flex:1;}
|
||
</style>
|
||
<div class="all">
|
||
|
||
<div id="app" v-cloak>
|
||
<div class="vue-main">
|
||
<div v-loading="loading" element-loading-text="商品导入中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
||
<div class="vue-main-title" style="margin-bottom:20px">
|
||
<div class="vue-main-title-left"></div>
|
||
<div class="vue-main-title-content" style="flex:0 0 120px">未导入成功商品</div>
|
||
<div class="vue-main-title-button" >
|
||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="addGoods">重新导入</el-button>
|
||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="addGoodsOne">重新单条导入(每次导入一条)</el-button>
|
||
<p style="font-size: 1rem;color: red;">注意:请勿重复点击,在导入商品60分钟后还没有导入成才能重新导入(建议先导入一条)</p>
|
||
</div>
|
||
</div>
|
||
<el-table :data="list" style="width: 100%">
|
||
<el-table-column label="商品ID" align="center" prop="old_id" width="100"></el-table-column>
|
||
<el-table-column label="公众号ID" align="center" prop="old_uniacids" width="100"></el-table-column>
|
||
<el-table-column label="商品名称" align="center" prop="title"></el-table-column>
|
||
<el-table-column prop="refund_time" label="操作" align="center" width="320">
|
||
<template slot-scope="scope">
|
||
<!-- <el-link title="剔除导入" :underline="false" @click="del(scope.row.old_id,scope.row.basename)" style="width:50px;">
|
||
<i class="iconfont icon-ht_operation_delete"></i>
|
||
</el-link> -->
|
||
<!-- <el-link title="单条手动导入" :underline="false" @click="del(scope.row.old_id,scope.row.basename)" style="width:50px;">
|
||
<i class="iconfont icon-ht_operation_delete"></i>
|
||
</el-link> -->
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 分页 -->
|
||
<!-- <div class="vue-page" v-if="total>0">
|
||
<el-row>
|
||
<el-col align="right">
|
||
<el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
|
||
:page-size="per_page" :current-page="current_page" background
|
||
></el-pagination>
|
||
</el-col>
|
||
</el-row>
|
||
</div> -->
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
var app = new Vue({
|
||
el: "#app",
|
||
delimiters: ['[[', ']]'],
|
||
name: 'test',
|
||
data() {
|
||
return {
|
||
list:{!!json_encode($list) !!},
|
||
loading:false,
|
||
}
|
||
},
|
||
created() {
|
||
|
||
},
|
||
methods: {
|
||
|
||
addGoods() {
|
||
this.loading = true;
|
||
this.$http.post('{!! yzWebFullUrl("plugin.goods-assistant.admin.import-uniacid.again-import") !!}').then(function (response) {
|
||
|
||
if (response.data.result) {
|
||
this.loading = false;
|
||
this.$message({type: 'success',message: response.data.msg});
|
||
location.reload();
|
||
} else {
|
||
this.loading = false;
|
||
this.$message({type: 'error',message: response.data.msg});
|
||
}
|
||
})
|
||
},
|
||
addGoodsOne() {
|
||
this.loading = true;
|
||
this.$http.post('{!! yzWebFullUrl("plugin.goods-assistant.admin.import-uniacid.again-import-one") !!}').then(function (response) {
|
||
|
||
if (response.data.result) {
|
||
this.loading = false;
|
||
this.$message({type: 'success',message: response.data.msg});
|
||
location.reload();
|
||
} else {
|
||
this.loading = false;
|
||
this.$message({type: 'error',message: response.data.msg});
|
||
}
|
||
})
|
||
},
|
||
del(id,basename) {
|
||
this.$confirm('确定删除吗', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
||
let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
|
||
this.$http.post('{!! yzWebFullUrl("plugin.goods-assistant.admin.import-uniacid.del-undone-goods") !!}',{id:id}).then(function (response) {
|
||
if (response.data.result) {
|
||
this.$message({type: 'success',message: '删除成功!'});
|
||
}
|
||
else{
|
||
this.$message({type: 'error',message: response.data.msg});
|
||
}
|
||
loading.close();
|
||
this.search(this.current_page)
|
||
},function (response) {
|
||
this.$message({type: 'error',message: response.data.msg});
|
||
loading.close();
|
||
}
|
||
);
|
||
}).catch(() => {
|
||
this.$message({type: 'info',message: '已取消删除'});
|
||
});
|
||
},
|
||
|
||
},
|
||
})
|
||
</script>
|
||
@endsection |