getXcx.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <view class="container">
  3. <view class="step">
  4. <uni-steps active-color="#07c160"
  5. :options="options" :active="0"></uni-steps>
  6. </view>
  7. <view style="height: 130rpx;"></view>
  8. <form @submit="onSubmit">
  9. <view class="content">
  10. <view class="content-tips">
  11. 请商家法人先关注“微信公众平台安全助手”
  12. </view>
  13. <view class="item flex flex-y-center">
  14. <view class="title-block required">
  15. <text>企业名称:</text>
  16. </view>
  17. <view class="desc">
  18. <input type="text" :value="info.name" name="name" class="input-box" placeholder="请输入企业名称"
  19. placeholder-class="desc-placeholder">
  20. </view>
  21. </view>
  22. <view class="item flex flex-y-center">
  23. <view class="title-block required">
  24. <text>企业代码:</text>
  25. </view>
  26. <view class="desc">
  27. <input type="text" :value="info.code" name="code" class="input-box" placeholder="请输入企业代码"
  28. placeholder-class="desc-placeholder">
  29. </view>
  30. </view>
  31. <view class="item flex flex-y-center">
  32. <view class="title-block required">
  33. <text>企业代码类型:</text>
  34. </view>
  35. <view class="desc ft30 flex-grow-1 box-pack-between" @click="onPrinterStatusChange">
  36. <text></text>
  37. <view class="flex-y-center">
  38. {{codeStatus}}
  39. <text class="iconfont icongengduo"></text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="item flex flex-y-center">
  44. <view class="title-block required">
  45. <text>法人微信号:</text>
  46. </view>
  47. <view class="desc">
  48. <input type="text" :value="info.legal_persona_wechat" name="legal_persona_wechat"
  49. class="input-box" placeholder="请输入法人微信号" placeholder-class="desc-placeholder">
  50. </view>
  51. </view>
  52. <view class="item flex flex-y-center">
  53. <view class="title-block required">
  54. <text>法人姓名:</text>
  55. </view>
  56. <view class="desc">
  57. <input type="text" :value="info.legal_persona_name" name="legal_persona_name" class="input-box"
  58. placeholder="请输入法人姓名" placeholder-class="desc-placeholder">
  59. </view>
  60. </view>
  61. <view class="item flex flex-y-center">
  62. <view class="title-block required">
  63. <text>第三方联系电话:</text>
  64. </view>
  65. <view class="desc">
  66. <input type="number" :value="info.component_phone" name="component_phone" class="input-box"
  67. placeholder="请输入第三方联系电话" placeholder-class="desc-placeholder">
  68. </view>
  69. </view>
  70. </view>
  71. <button class="sub-btn" hover-class="none" form-type="submit">
  72. 立即提交
  73. </button>
  74. </form>
  75. </view>
  76. </template>
  77. <script>
  78. import optionsData from './data.js'
  79. export default {
  80. data() {
  81. return {
  82. info: {},
  83. ali_arr: [
  84. '关闭', '开启'
  85. ],
  86. is_coupon: 0,
  87. setColor: "",
  88. code_type: 1,
  89. codeStatus: '统一社会代码',
  90. options:optionsData.options
  91. }
  92. },
  93. onLoad() {
  94. this.getdata();
  95. },
  96. methods: {
  97. onPrinterStatusChange() {
  98. let statusArr = ['统一社会代码', '组织机构代码', '营业执照注册号']
  99. uni.showActionSheet({
  100. itemList: statusArr,
  101. success: (r) => {
  102. console.log(r.tapIndex)
  103. this.code_type = Number(r.tapIndex) + 1
  104. this.codeStatus = statusArr[r.tapIndex]
  105. }
  106. })
  107. },
  108. bindColor(e) {
  109. this.setColor = e.detail.value;
  110. },
  111. choicemenber(index) {
  112. this.is_coupon = index;
  113. },
  114. getdata(e) {
  115. this.request({
  116. url: "Smdcshop/xcx_list",
  117. data: {
  118. admin_id: uni.getStorageSync("admin_id")
  119. },
  120. }).then(res => {
  121. console.log(res, "res")
  122. if (res.code === '200') {
  123. this.info = res.data;
  124. this.code_type = res.data.code_type;
  125. this.codeStatus = res.data.code_type == 1 ? '统一社会代码' : res.data.code_type == 2 ? '组织机构代码' :
  126. '营业执照注册号';
  127. }
  128. });
  129. },
  130. onSubmit(e) {
  131. let data = e.detail.value;
  132. data.admin_id = uni.getStorageSync("admin_id");
  133. data.code_type = this.code_type;
  134. this.request({
  135. url: "Smdcshop/fastregisterbetaweapp",
  136. data: data,
  137. }).then(res => {
  138. if (res.code == 200) {
  139. uni.showToast({
  140. title: res.message,
  141. icon: 'none'
  142. })
  143. setTimeout(() => {
  144. uni.navigateBack()
  145. }, 2000)
  146. }
  147. }).catch((res) => {
  148. uni.showToast({
  149. title: res.message,
  150. icon: 'none'
  151. })
  152. })
  153. },
  154. }
  155. }
  156. </script>
  157. <style>
  158. page {
  159. background-color: #F4F5F7;
  160. }
  161. .content-tips{
  162. text-align: right;
  163. font-size: 26rpx;
  164. color: red;
  165. padding: 20rpx;
  166. }
  167. .item {
  168. background-color: #FFF;
  169. padding: 0 25rpx;
  170. }
  171. .title-block {
  172. margin-right: 20rpx;
  173. }
  174. .desc {
  175. text-align: right;
  176. flex: 1;
  177. padding: 25rpx 0;
  178. border-bottom: 1rpx solid #F1F1F1;
  179. }
  180. .rund {
  181. width: 40rpx;
  182. height: 40rpx;
  183. }
  184. .red {
  185. color: red;
  186. padding: 10rpx 25rpx;
  187. font-size: 26rpx;
  188. }
  189. .sub-btn {
  190. width: 690rpx;
  191. height: 100rpx;
  192. background: linear-gradient(315deg, #07c160 2%, #07c160 99%);
  193. border-radius: 8rpx;
  194. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.20);
  195. text-align: center;
  196. line-height: 100rpx;
  197. color: #fff;
  198. font-size: 36rpx;
  199. font-weight: bold;
  200. margin: 0 auto;
  201. margin-top: 30px;
  202. }
  203. .checklist-box {
  204. display: -webkit-box;
  205. display: -webkit-flex;
  206. display: flex;
  207. -webkit-box-orient: horizontal;
  208. -webkit-box-direction: normal;
  209. -webkit-flex-direction: row;
  210. flex-direction: row;
  211. -webkit-box-align: center;
  212. -webkit-align-items: center;
  213. align-items: center;
  214. margin: 5px 0;
  215. margin-right: 22px;
  216. }
  217. .radio__inner {
  218. -webkit-flex-shrink: 0;
  219. flex-shrink: 0;
  220. display: -webkit-box;
  221. display: -webkit-flex;
  222. display: flex;
  223. -webkit-box-pack: center;
  224. -webkit-justify-content: center;
  225. justify-content: center;
  226. -webkit-box-align: center;
  227. -webkit-align-items: center;
  228. align-items: center;
  229. position: relative;
  230. border: 1px solid #DCDFE6;
  231. border-radius: 2px;
  232. box-sizing: border-box;
  233. width: 16px;
  234. height: 16px;
  235. border-radius: 16px;
  236. background-color: #fff;
  237. z-index: 1;
  238. -webkit-transition: border-color .3s;
  239. transition: border-color .3s;
  240. }
  241. .radio__inner-icon {
  242. width: 8px;
  243. height: 8px;
  244. border-radius: 10px;
  245. opacity: 0;
  246. -webkit-transition: -webkit-transform .3s;
  247. transition: -webkit-transform .3s;
  248. transition: transform .3s;
  249. transition: transform .3s, -webkit-transform .3s;
  250. }
  251. .is-default-checked {
  252. opacity: 1;
  253. background-color: #07c160;
  254. -webkit-transform: rotate(45deg) scaleY(1);
  255. transform: rotate(45deg) scaleY(1);
  256. }
  257. .act_border {
  258. border: 1rpx solid #07c160;
  259. }
  260. .checklist-text {
  261. font-size: 28rpx;
  262. margin-left: 5px;
  263. -webkit-transition: color 0.2s;
  264. transition: color 0.2s;
  265. color: #000;
  266. }
  267. </style>