agentInfo_body.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="../../../../../css/css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="../../../../../css/css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="../../../../../css/css/main.css" />
  14. <link rel="stylesheet" type="text/css" href="../../../../../css/css/style.css" />
  15. <script src="../../../../../script/js/vue.js"></script>
  16. <script src="../../../../../script/js/vant-ui.js"></script>
  17. <script src="../../../../../script/js/main.js"></script>
  18. <title></title>
  19. </head>
  20. <style>
  21. #app {
  22. background: linear-gradient(180deg,rgba(0,160,234,1),rgba(0,95,163,1)) !important;
  23. }
  24. .login {
  25. padding-bottom: 0rem;
  26. height: auto;
  27. padding-top: .01rem;
  28. background: none;
  29. }
  30. .login .loginFix {
  31. position: absolute;
  32. }
  33. .login .loginBox {
  34. width: 90%;
  35. height: auto;
  36. padding: 10px;
  37. padding-bottom: 1rem;
  38. }
  39. .pull-right {
  40. width: .15rem !important;
  41. height: .3rem !important;
  42. }
  43. .brandList {
  44. display: flex;
  45. width: 100%;
  46. flex-wrap: wrap;
  47. margin-top: .8rem;
  48. }
  49. .brandList .brandItem, .brandList .choose {
  50. width: 40%;
  51. margin: .1rem .3rem;
  52. }
  53. .brandItem {
  54. height: .6rem;
  55. }
  56. .anniu > input {
  57. width: 90%;
  58. height: .86rem;
  59. background: rgba(0,160,234,1);
  60. border-radius: 5rem;
  61. color: #fff;
  62. font-size: .31rem;
  63. margin-top: .5rem;
  64. }
  65. .getCodeBtn {
  66. width: 100px;
  67. background-color: #00a0ea;
  68. padding: 5px;
  69. color: #fff;
  70. border-radius: 8px 5px;
  71. text-align: center;
  72. }
  73. .anniu {
  74. display: flex;
  75. }
  76. .rowbetween{
  77. justify-content: space-between;
  78. }
  79. .delete-btn{
  80. padding: 4px 8px;
  81. border-radius: 4px;
  82. background: #f34747;
  83. color: #ffffff;
  84. line-height: 1.5;
  85. display: inline-block;
  86. margin-top: .26rem;
  87. }
  88. </style>
  89. <body>
  90. <div id="app" style="overflow-y: scroll">
  91. <div class="login" id="aui-header">
  92. <div class="loginBox">
  93. <div class="labelTitle flex a-center" style="margin-top: 0;">
  94. <b class="i1"></b>
  95. 审核状态
  96. </div>
  97. <div class="labelValue flex a-center">
  98. {{agentInfo.status | statusFilter}}
  99. </div>
  100. <div class="labelTitle flex a-center" style="margin-top: 0;">
  101. <b class="i1"></b>
  102. 门店名称
  103. </div>
  104. <div class="labelValue flex a-center">
  105. <input type="text" placeholder="无" v-model="agentInfo.storeName" readonly="readonly"/>
  106. </div>
  107. <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
  108. <b class="i2"></b>
  109. 联系人
  110. </div>
  111. <div class="labelValue flex a-center">
  112. <input type="text" placeholder="无" v-model="agentInfo.contactName||''" readonly="readonly"/>
  113. </div>
  114. <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
  115. <b class="i2"></b>
  116. 联系电话
  117. </div>
  118. <div class="labelValue flex a-center">
  119. <input placeholder="无" v-model="agentInfo.storePhone ||''" readonly="readonly"/>
  120. </div>
  121. <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
  122. <b class="i2"></b>
  123. 地址
  124. </div>
  125. <div class="labelValue flex a-center">
  126. <input placeholder="无" v-model="agentInfo.province + agentInfo.city + agentInfo.district" readonly="readonly"/>
  127. </div>
  128. <div class="labelTitle flex a-center" style="margin-top: 0.3rem;">
  129. <b class="i2"></b>
  130. 详细地址
  131. </div>
  132. <div class="labelValue flex a-center">
  133. <input placeholder="无" v-model="agentInfo.addressInfo" readonly="readonly"/>
  134. </div>
  135. </div>
  136. <!-- 合作经销商 -->
  137. <div class="login" v-for="(item,index) in brandinfo" :key="item.mainId">
  138. <div class="loginBox">
  139. <div class="labelValue flex rowbetween">
  140. <div>合作品牌:</div>
  141. <div v-if="item.brand == null">暂无合作品牌</div>
  142. <div v-else>
  143. <img class="brandItem" :src="item.brandlogo" alt="">
  144. </div>
  145. </div>
  146. <div class="labelValue flex rowbetween">
  147. <div>签约任务:</div>
  148. <div>{{item.signLv}}</div>
  149. </div>
  150. <div class="flex rowbetween" v-if="item.agentStatus == 0"><span></span><span class="delete-btn" @click="handleDelete(index)">删除</span></div>
  151. </div>
  152. </div>
  153. <!-- 附件上传 -->
  154. <div class="login">
  155. <div class="loginBox">
  156. <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="">
  157. </div>
  158. <div class="brandList" style="text-align: center">
  159. <div class="choose">
  160. <p>
  161. 营业执照
  162. </p>
  163. <img :src="agentInfo.licenseUrl == '' ? '../../../../../image/image/biankuang.png' : agentInfo.licenseUrl" style="margin: .3rem auto;" />
  164. </div>
  165. <div class="choose">
  166. <p>
  167. 门头照片
  168. </p>
  169. <img :src="agentInfo.storeImageUrl == '' ? '../../../../../image/image/biankuang.png' : agentInfo.storeImageUrl" style="margin: .3rem auto;" />
  170. </div>
  171. </div>
  172. <div class="anniu" v-show="brandinfo[0].agentStatus == 0">
  173. <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>
  174. <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>
  175. <!-- <input type="submit" value="否决" style="background-color:red" v-on:click="checkStore(2)">
  176. <input type="submit" value="通过" v-on:click="checkStore(1)"> -->
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </body>
  183. <script type="text/javascript" src="../../../../../script/api.js"></script>
  184. <script type="text/javascript" src="../../../js/httpRequest_tbr.js"></script>
  185. <script type="text/javascript" src="../../../../../script/vue_plugins.js"></script>
  186. <script type="text/javascript">
  187. apiready = function() {
  188. var storeId = api.pageParam.storeId;
  189. var kunnr = $api.getStorage('kunnr');
  190. new Vue({
  191. el : '#app',
  192. data : {
  193. // 选择省市区
  194. UIActionSelector : '',
  195. map : '', // 百度地图SDK
  196. // 选择省市区的文件
  197. file : 'widget://res/city.json',
  198. userName : '', // 门店名称
  199. userPerson : '', // 用户联系人
  200. userPhone : '', // 用户手机号
  201. userCode : '', // 手机号验证码
  202. userDistrct : '', // 点击选择地址
  203. userAddress : '', // 用户地址
  204. distrctArr : [], // 保存的地址
  205. userLicense : '', // 营业执照
  206. userDoorway : '', // 门头照片
  207. userLat : '', // 纬度
  208. userLon : '', // 经度
  209. posterList : [], // 经销商列表
  210. storeId : storeId,
  211. kunnr: kunnr,
  212. agentInfo : '', // 这是门店详情
  213. brandinfo: '',//这是合作品牌信息
  214. onClick:true,
  215. refuseLoading: false,
  216. refuseDisabled: false,
  217. passLoading: false,
  218. passDisabled: false
  219. },
  220. methods : {
  221. // 获取门店详情
  222. getAgentInfo : function() {
  223. var _this = this, url = "getAgentInfoU", data = {
  224. "agentid": this.kunnr,//this.kunnr,//10,
  225. "storeid" : this.storeId,//,//"2000",
  226. "type" : 'body',
  227. "url" : 'json'
  228. }
  229. this.$post(url, data, function(ret) {
  230. if (ret.code == 0) {
  231. _this.agentInfo = ret.result.storeBasicInfo;
  232. _this.brandinfo = ret.result.brandinfo;
  233. }
  234. });
  235. },
  236. // 审核门店
  237. checkStore : function(type) {
  238. //type=2是否决、1是同意
  239. var data,_this = this,url;
  240. var mainids;
  241. this.brandinfo.forEach(function(val,index){
  242. if(index==0){
  243. mainids = val.mainId;
  244. }else {
  245. mainids += ","+val.mainId;
  246. }
  247. });
  248. if(type==0){
  249. data = {
  250. "mainids" : mainids,
  251. "type" : 'body',
  252. "url" : 'json'
  253. };
  254. this.refuseLoading = true;
  255. this.passDisabled = true;
  256. url = "refuseSignForBatch";
  257. }else{
  258. data = {
  259. "mainids" : mainids,
  260. "storeid": this.agentInfo.mainId,
  261. "type" : 'body',
  262. "url" : 'json'
  263. };
  264. this.passLoading = true;
  265. this.refuseDisabled = true;
  266. url = "passSignForBatch";
  267. };
  268. this.$post(url, data, function(ret) {
  269. _this.refuseLoading = false;
  270. _this.passLoading = false;
  271. _this.passDisabled = false;
  272. _this.refuseDisabled = false;
  273. if (ret.code == 0 || ret.code == '0') {
  274. api.toast({
  275. msg : '已'+ ['否决','通过'][type]
  276. });
  277. api.sendEvent({
  278. name: 'refushAgentList',
  279. extra: {}
  280. });
  281. setTimeout(function() {
  282. _this.getAgentInfo();
  283. }, 200);
  284. }
  285. });
  286. setTimeout(function(){
  287. // 要是3000还没响应的话,就可以取消loading;
  288. _this.refuseLoading = false;
  289. _this.passLoading = false;
  290. _this.passDisabled = false;
  291. _this.refuseDisabled = false;
  292. },3000)
  293. },
  294. handleDelete: function(params){
  295. var _this = this;
  296. //只有一条数据的不允许删
  297. if(this.brandinfo.length==1){
  298. api.toast({
  299. msg : '至少得有一个合作经销商品牌'
  300. });
  301. }else{
  302. this.showModal("确认提醒","你是要删除"+this.brandinfo[params].brand+"品牌吗",["确认","取消"],function(index){
  303. if(index==2){
  304. //以后删除暂时不执行,后续有需要再调用
  305. var data = {
  306. "storeid" : _this.brandinfo[params].storeId,
  307. "agentid" : _this.brandinfo[params].kunnr,
  308. "brandcode" : _this.brandinfo[params].brandCode,
  309. "type" : 'body',
  310. "url" : 'json'
  311. }, url = "deleteSignInfo";
  312. _this.$post(url, data, function(ret) {
  313. if (ret.code == 0 || ret.code == '0') {
  314. _this.getAgentInfo();
  315. api.toast({
  316. msg : ret.msg
  317. });
  318. }else{
  319. api.toast({
  320. msg : ret.msg
  321. });
  322. }
  323. });
  324. };
  325. });
  326. };
  327. }
  328. },
  329. mounted : function() {
  330. // 初始化数据
  331. this.getAgentInfo();
  332. },
  333. filters: {
  334. statusFilter: function(v){
  335. //当状态是0时,可能时经销商审核或者是b2b审核中
  336. var statusArr = [{
  337. name: "审核中",
  338. status: 0
  339. },{
  340. name: "审核通过",
  341. status: 1
  342. },{
  343. name: "审核拒绝",
  344. status: 2
  345. }];
  346. var idx;
  347. for(var index=0; index<statusArr.length; index++){
  348. if(v==statusArr[index].status){
  349. idx = index;
  350. }
  351. };
  352. return statusArr[idx].name;
  353. }
  354. }
  355. })
  356. }
  357. </script>
  358. </html>