123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <!DOCTYPE html>
- <html class="">
- <!--STATUS OK-->
- <head>
- <meta name="referrer" content="always" />
- <meta charset='utf-8' />
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="x-dns-prefetch-control" content="on">
- <meta name="description" content="">
- <meta name="format-detection" content="telephone=no" />
- <link rel="stylesheet" type="text/css" href="../../../../../css/css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="../../../../../css/css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="../../../../../css/css/main.css" />
- <link rel="stylesheet" type="text/css" href="../../../../../css/css/style.css" />
- <script src="../../../../../script/js/vue.js"></script>
- <script src="../../../../../script/js/vant-ui.js"></script>
- <script src="../../../../../script/js/main.js"></script>
- <title></title>
- </head>
- <style>
- #app {
- background: linear-gradient(180deg,rgba(0,160,234,1),rgba(0,95,163,1)) !important;
- }
- .login {
- padding-bottom: 0rem;
- height: auto;
- padding-top: .01rem;
- background: none;
- }
- .login .loginFix {
- position: absolute;
- }
- .login .loginBox {
- width: 90%;
- height: auto;
- padding: 10px;
- padding-bottom: 1rem;
- }
- .pull-right {
- width: .15rem !important;
- height: .3rem !important;
- }
- .brandList {
- display: flex;
- width: 100%;
- flex-wrap: wrap;
- margin-top: .8rem;
- }
- .brandList .brandItem, .brandList .choose {
- width: 40%;
- margin: .1rem .3rem;
- }
- .brandItem {
- height: .6rem;
- }
- .anniu > input {
- width: 90%;
- height: .86rem;
- background: rgba(0,160,234,1);
- border-radius: 5rem;
- color: #fff;
- font-size: .31rem;
- margin-top: .5rem;
- }
- .getCodeBtn {
- width: 100px;
- background-color: #00a0ea;
- padding: 5px;
- color: #fff;
- border-radius: 8px 5px;
- text-align: center;
- }
- .anniu {
- display: flex;
- }
- .rowbetween{
- justify-content: space-between;
- }
- .delete-btn{
- padding: 4px 8px;
- border-radius: 4px;
- background: #f34747;
- color: #ffffff;
- line-height: 1.5;
- display: inline-block;
- margin-top: .26rem;
- }
- </style>
- <body>
- <div id="app" style="overflow-y: scroll">
- <div class="login" id="aui-header">
- <div class="loginBox">
- <div class="labelTitle flex a-center" style="margin-top: 0;">
- <b class="i1"></b>
- 审核状态
- </div>
- <div class="labelValue flex a-center">
- {{agentInfo.status | statusFilter}}
- </div>
- <div class="labelTitle flex a-center" style="margin-top: 0;">
- <b class="i1"></b>
- 门店名称
- </div>
- <div class="labelValue flex a-center">
- <input type="text" placeholder="无" v-model="agentInfo.storeName" readonly="readonly"/>
- </div>
- <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
- <b class="i2"></b>
- 联系人
- </div>
- <div class="labelValue flex a-center">
- <input type="text" placeholder="无" v-model="agentInfo.contactName||''" readonly="readonly"/>
- </div>
- <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
- <b class="i2"></b>
- 联系电话
- </div>
- <div class="labelValue flex a-center">
- <input placeholder="无" v-model="agentInfo.storePhone ||''" readonly="readonly"/>
- </div>
- <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
- <b class="i2"></b>
- 地址
- </div>
- <div class="labelValue flex a-center">
- <input placeholder="无" v-model="agentInfo.province + agentInfo.city + agentInfo.district" readonly="readonly"/>
- </div>
- <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
- <b class="i2"></b>
- 详细地址
- </div>
- <div class="labelValue flex a-center">
- <input placeholder="无" v-model="agentInfo.addressInfo" readonly="readonly"/>
- </div>
- </div>
- <!-- 合作经销商 -->
- <div class="login" v-for="(item,index) in brandinfo" :key="item.mainId">
- <div class="loginBox">
- <div class="labelValue flex rowbetween">
- <div>合作品牌:</div>
- <div v-if="item.brand == null">暂无合作品牌</div>
- <div v-else>
- <img class="brandItem" :src="item.brandlogo" alt="">
- </div>
- </div>
- <div class="labelValue flex rowbetween">
- <div>签约任务:</div>
- <div>{{item.signLv}}</div>
- </div>
- <div class="flex rowbetween" v-if="item.agentStatus == 0"><span></span><span class="delete-btn" @click="handleDelete(index)">删除</span></div>
- </div>
- </div>
- <!-- 附件上传 -->
- <div class="login">
- <div class="loginBox">
- <div class="biaoti" style="margin-top: 0.4rem;"><img src="../../../../../image/image/xiantiao.png" alt=""><span style="margin-top: -.1rem">证件</span><img src="../../../../../image/image/xiantiao1.png" alt="">
- </div>
- <div class="brandList" style="text-align: center">
- <div class="choose">
- <p>
- 营业执照
- </p>
- <img :src="agentInfo.licenseUrl == '' ? '../../../../../image/image/biankuang.png' : agentInfo.licenseUrl" style="margin: .3rem auto;" />
- </div>
- <div class="choose">
- <p>
- 门头照片
- </p>
- <img :src="agentInfo.storeImageUrl == '' ? '../../../../../image/image/biankuang.png' : agentInfo.storeImageUrl" style="margin: .3rem auto;" />
- </div>
- </div>
- <div class="anniu" v-show="brandinfo[0].agentStatus == 0">
- <van-button style="flex-grow:1" round :disabled="refuseDisabled" :loading="refuseLoading" type="danger" loading-type="spinner" loading-text="加载中..." v-on:click="checkStore(0)" >否决</van-button>
- <van-button style="flex-grow:1" round :disabled="passDisabled" :loading="passLoading" type="info" loading-type="spinner" loading-text="加载中..." v-on:click="checkStore(1)">通过</van-button>
- <!-- <input type="submit" value="否决" style="background-color:red" v-on:click="checkStore(2)">
- <input type="submit" value="通过" v-on:click="checkStore(1)"> -->
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript" src="../../../../../script/api.js"></script>
- <script type="text/javascript" src="../../../js/httpRequest_tbr.js"></script>
- <script type="text/javascript" src="../../../../../script/vue_plugins.js"></script>
- <script type="text/javascript">
- apiready = function() {
- var storeId = api.pageParam.storeId;
- var kunnr = $api.getStorage('kunnr');
- new Vue({
- el : '#app',
- data : {
- // 选择省市区
- UIActionSelector : '',
- map : '', // 百度地图SDK
- // 选择省市区的文件
- file : 'widget://res/city.json',
- userName : '', // 门店名称
- userPerson : '', // 用户联系人
- userPhone : '', // 用户手机号
- userCode : '', // 手机号验证码
- userDistrct : '', // 点击选择地址
- userAddress : '', // 用户地址
- distrctArr : [], // 保存的地址
- userLicense : '', // 营业执照
- userDoorway : '', // 门头照片
- userLat : '', // 纬度
- userLon : '', // 经度
- posterList : [], // 经销商列表
- storeId : storeId,
- kunnr: kunnr,
- agentInfo : '', // 这是门店详情
- brandinfo: '',//这是合作品牌信息
- onClick:true,
- refuseLoading: false,
- refuseDisabled: false,
- passLoading: false,
- passDisabled: false
- },
- methods : {
- // 获取门店详情
- getAgentInfo : function() {
- var _this = this, url = "getAgentInfoU", data = {
- "agentid": this.kunnr,//this.kunnr,//10,
- "storeid" : this.storeId,//,//"2000",
- "type" : 'body',
- "url" : 'json'
- }
- this.$post(url, data, function(ret) {
- if (ret.code == 0) {
- _this.agentInfo = ret.result.storeBasicInfo;
- _this.brandinfo = ret.result.brandinfo;
- }
- });
- },
- // 审核门店
- checkStore : function(type) {
- //type=2是否决、1是同意
- var data,_this = this,url;
- var mainids;
- this.brandinfo.forEach(function(val,index){
- if(index==0){
- mainids = val.mainId;
- }else {
- mainids += ","+val.mainId;
- }
- });
- if(type==0){
- data = {
- "mainids" : mainids,
- "type" : 'body',
- "url" : 'json'
- };
- this.refuseLoading = true;
- this.passDisabled = true;
- url = "refuseSignForBatch";
- }else{
- data = {
- "mainids" : mainids,
- "storeid": this.agentInfo.mainId,
- "type" : 'body',
- "url" : 'json'
- };
- this.passLoading = true;
- this.refuseDisabled = true;
- url = "passSignForBatch";
- };
- this.$post(url, data, function(ret) {
- _this.refuseLoading = false;
- _this.passLoading = false;
- _this.passDisabled = false;
- _this.refuseDisabled = false;
- if (ret.code == 0 || ret.code == '0') {
- api.toast({
- msg : '已'+ ['否决','通过'][type]
- });
- api.sendEvent({
- name: 'refushAgentList',
- extra: {}
- });
- setTimeout(function() {
- _this.getAgentInfo();
- }, 200);
- }
- });
- setTimeout(function(){
- // 要是3000还没响应的话,就可以取消loading;
- _this.refuseLoading = false;
- _this.passLoading = false;
- _this.passDisabled = false;
- _this.refuseDisabled = false;
- },3000)
- },
- handleDelete: function(params){
- var _this = this;
- //只有一条数据的不允许删
- if(this.brandinfo.length==1){
- api.toast({
- msg : '至少得有一个合作经销商品牌'
- });
- }else{
- this.showModal("确认提醒","你是要删除"+this.brandinfo[params].brand+"品牌吗",["确认","取消"],function(index){
- if(index==2){
- //以后删除暂时不执行,后续有需要再调用
- var data = {
- "storeid" : _this.brandinfo[params].storeId,
- "agentid" : _this.brandinfo[params].kunnr,
- "brandcode" : _this.brandinfo[params].brandCode,
- "type" : 'body',
- "url" : 'json'
- }, url = "deleteSignInfo";
- _this.$post(url, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.getAgentInfo();
- api.toast({
- msg : ret.msg
- });
- }else{
- api.toast({
- msg : ret.msg
- });
- }
- });
- };
- });
- };
- }
- },
- mounted : function() {
- // 初始化数据
- this.getAgentInfo();
- },
- filters: {
- statusFilter: function(v){
- //当状态是0时,可能时经销商审核或者是b2b审核中
- var statusArr = [{
- name: "审核中",
- status: 0
- },{
- name: "审核通过",
- status: 1
- },{
- name: "审核拒绝",
- status: 2
- }];
- var idx;
- for(var index=0; index<statusArr.length; index++){
- if(v==statusArr[index].status){
- idx = index;
- }
- };
- return statusArr[idx].name;
- }
- }
- })
- }
- </script>
- </html>
|