init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,325 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!--[1.4.8]-->
|
||||
<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" type="text/css" href="__PUBLIC__/vue/element-ui.css">
|
||||
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
</head>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
th > .cell, td > .cell {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="app" id="audit" v-cloak>
|
||||
<div>
|
||||
<el-form>
|
||||
<template v-if="quota.errmsg">
|
||||
<el-form-item label-width="150px" label="quota剩余值">
|
||||
<span>{{quota.rest}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="150px" label="当月分配quota">
|
||||
<span>{{quota.limit}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="150px" label="剩余加急次数">
|
||||
<span>{{quota.speedup_rest}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="150px" label="当月分配加急次数">
|
||||
<span>{{quota.speedup_limit}}</span>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item v-else>
|
||||
<el-button size="small" @click="getUrgentAuditCount">查询提审与加急次数</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="选择商户">
|
||||
<el-select v-model="merchant_id"
|
||||
placeholder="输入商户名称搜索"
|
||||
v-load-more="getMerchant"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
:remote-method="searchMerchant"
|
||||
@change="changeMerchant"
|
||||
size="small">
|
||||
<el-option v-for="(item,index) in merchantList"
|
||||
:label="item.name"
|
||||
:key="item.id"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-button size="small" type="primary" plain @click="currentPage=1;getData()">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
:data="list"
|
||||
border
|
||||
v-loading="loading"
|
||||
style="width: 100%; margin-top: 20px">
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column prop="name" label="商户名称"></el-table-column>
|
||||
<el-table-column prop="mobile" label="商户账号"></el-table-column>
|
||||
<el-table-column prop="program_name" label="小程序名称"></el-table-column>
|
||||
<el-table-column prop="version" label="提交审核版本"></el-table-column>
|
||||
<el-table-column prop="version_info" label="版本描述"></el-table-column>
|
||||
<el-table-column prop="add_time" label="提交时间"></el-table-column>
|
||||
<el-table-column prop="urgent_msg" label="是否已加急"></el-table-column>
|
||||
<el-table-column prop="status_msg" label="状态"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.urgent_audit!=1" type="text" size="mini"
|
||||
@click="sendUrgentAudit(scope.row.id,scope.$index)">加急审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]"
|
||||
:page-size="100"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="currentLen">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</body>
|
||||
<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.js"></script>
|
||||
<script>
|
||||
Vue.directive('load-more', {
|
||||
bind(el, binding) {
|
||||
// 获取element-ui定义好的scroll盒子
|
||||
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
|
||||
SELECTWRAP_DOM.addEventListener('scroll', function () {
|
||||
const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight;
|
||||
if (CONDITION) {
|
||||
binding.value();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
new Vue({
|
||||
el: "#audit",
|
||||
data: {
|
||||
searchText: "",
|
||||
list: [],
|
||||
merchantList: [],
|
||||
loading: false,
|
||||
currentLen: 0,
|
||||
currentPage: 1,
|
||||
currentLimit: 10,
|
||||
merchant_page: 0,
|
||||
merchant_keyword: '',
|
||||
merchantCanLoad: true,
|
||||
merchant_id: '',
|
||||
quota: {},//提审与加急次数
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.currentLimit = val;//切换每页数量
|
||||
this.currentPage = 1;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val;
|
||||
this.getData();//切换页数
|
||||
},
|
||||
//获取待审核列表数据
|
||||
getData: function () {
|
||||
var that = this;
|
||||
that.loading = true;
|
||||
$.ajax({
|
||||
url: "{:U(getAuditing)}",
|
||||
type: 'POST',
|
||||
data: {
|
||||
page: this.currentPage,
|
||||
limit: this.currentLimit,
|
||||
merchant_id: this.merchant_id,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.loading = false;
|
||||
that.list = [];
|
||||
that.list = res.data;
|
||||
that.$nextTick(function () {
|
||||
that.currentLen = res.count;
|
||||
})
|
||||
} else {
|
||||
that.$confirm(res.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
that.$message({
|
||||
message: '请求发生错误',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
});
|
||||
that.$loading().close();
|
||||
}
|
||||
});
|
||||
},
|
||||
//搜索商户
|
||||
searchMerchant: function (value) {
|
||||
this.merchant_page = 0;
|
||||
this.merchant_keyword = value;
|
||||
this.merchantCanLoad = true;
|
||||
this.getMerchant();
|
||||
},
|
||||
changeMerchant: function (id) {
|
||||
console.log(id);
|
||||
},
|
||||
//获取商户列表
|
||||
getMerchant: function () {
|
||||
if (!this.merchantCanLoad) {
|
||||
return;
|
||||
}
|
||||
this.merchantCanLoad = false;
|
||||
var that = this;
|
||||
var page = this.merchant_page + 1;
|
||||
$.ajax({
|
||||
url: "{:U('getMerchant')}",
|
||||
type: 'post',
|
||||
data: {
|
||||
page: page,
|
||||
keyword: that.merchant_keyword,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
if (page != 1) {
|
||||
that.merchantList.push.apply(that.merchantList, res.data);
|
||||
} else {
|
||||
that.merchantList = [];
|
||||
that.merchantList = res.data;
|
||||
}
|
||||
that.merchant_page = page;
|
||||
that.$nextTick(function () {
|
||||
if (res.data.length) {
|
||||
that.merchantCanLoad = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
that.$message({
|
||||
message: '请求发生错误',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
});
|
||||
that.$loading().close();
|
||||
}
|
||||
})
|
||||
},
|
||||
//提交加急请求
|
||||
sendUrgentAudit: function (id, index) {
|
||||
var that = this;
|
||||
that.$confirm("您确定为改小程序提交加急审核?", "提交加急审核提示", {
|
||||
confirmButtonText: "确认提交",
|
||||
cancelButtonText: '取消',
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
that.$loading({
|
||||
lock: true,
|
||||
text: '操作中,请等待',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.7)'
|
||||
});
|
||||
$.ajax({
|
||||
url: "{:U('sendUrgentAudit')}",
|
||||
type: 'post',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function (res) {
|
||||
that.$loading().close();
|
||||
if (res.status == 1) {
|
||||
that.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
that.list[index].urgent_audit = 1;
|
||||
if (that.quota.speedup_rest) {
|
||||
that.quota.speedup_rest--;
|
||||
}
|
||||
} else {
|
||||
console.log(res);
|
||||
that.$message({
|
||||
message: res.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
that.$message({
|
||||
message: '请求发生错误',
|
||||
type: 'error',
|
||||
});
|
||||
that.$loading().close();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
//查询当月剩余审核次数
|
||||
getUrgentAuditCount: function () {
|
||||
var that = this;
|
||||
that.$loading({
|
||||
lock: true,
|
||||
text: '查询中,请等待',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.7)'
|
||||
});
|
||||
$.ajax({
|
||||
url: "{:U('getUrgentAuditCount')}",
|
||||
type: 'post',
|
||||
data: {},
|
||||
success: function (res) {
|
||||
that.$loading().close();
|
||||
if (res.status == 1) {
|
||||
that.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
that.quota = res.quota;
|
||||
} else {
|
||||
console.log(res);
|
||||
that.$message({
|
||||
message: res.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
that.$message({
|
||||
message: '请求发生错误',
|
||||
type: 'error',
|
||||
});
|
||||
that.$loading().close();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.getData();
|
||||
this.getMerchant();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
在新工单中引用
屏蔽一个用户