agentInfo_body.html 12 KB

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