合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

312 lines
6.2 KiB

2 weeks ago
1 week ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
1 week ago
2 weeks ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
1 week ago
2 weeks ago
2 weeks ago
2 weeks ago
1 week ago
1 week ago
1 week ago
1 week ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
  1. <template>
  2. <view class="container">
  3. <!-- 顶部标题 -->
  4. <view class="header">
  5. <view class="header_info">
  6. <text class="header_texts" :title="title">{{title}}</text>
  7. <text class="header_info_icon">|</text>
  8. <view @click="change_text" class="header_change">
  9. <text >切换</text>
  10. <uni-icons type="right" size="30" color="#c2d4de" ></uni-icons>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="swiper">
  15. <image class="swiper-image" src="/static/image/组 71699.png"></image>
  16. </view>
  17. <view class="order_Entry_container" @click="orderEntry">
  18. <image class="order_Entry_image" src="/static/image/组 71699_1@3x.png"></image>
  19. <text style="color: #115881;font-weight: bold;margin-left: 1rem;">录入订单</text>
  20. <uni-icons class="order_Entry_end" type="right" :size="25" color="#306e91"></uni-icons>
  21. </view>
  22. <view v-if="isshow" class="show_container">
  23. <view class="isshow-header">
  24. <uni-icons class=" isshow-header-content-icon" type="search" :size="20"></uni-icons>
  25. <uni-easyinput :inputBorder="false" @input="handleSearch" class=" isshow-header-content-input" v-model="ServiceName" placeholder="请输入服务名称" />
  26. <text class="isshow-header-content-text" @click="searchName">搜索</text>
  27. </view>
  28. <view class="isshow-content" >
  29. <text class="isshow-content-text" v-for="(item, index) in textcontent" :key="index" @click="change_city(item.storeName)">{{item.storeName}}</text>
  30. </view>
  31. </view>
  32. <view v-if="isshow_1" class="show_container_1">
  33. <image class="show_container_1_image" src="/static/image/图层_6.png"></image>
  34. <view class="show_container_1_footer">
  35. <text>门店已经切换为{{title}}</text>
  36. <button class="show_container_1_footer_button" @click="close_view">好的</button>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import {getStoreName,isToken} from '@/api.uts'
  43. export default {
  44. data() {
  45. return {
  46. ServiceName:'',
  47. title:"北京汽车有限公司",
  48. isshow:false,
  49. isshow_1:false,
  50. newListData:[],
  51. textcontent: [],
  52. };
  53. },
  54. mounted() {
  55. isToken();
  56. getStoreName().then((res)=>{
  57. getApp().allMsg=res.result;
  58. this.textcontent = res.result;
  59. this.title = res.result[0].storeName;
  60. getApp().storeName = res.result[0].storeName;
  61. }
  62. );
  63. },
  64. methods: {
  65. change_text(){
  66. if(this.isshow){
  67. this.isshow=false;
  68. }else{
  69. this.isshow=true;
  70. console.log('111')
  71. }
  72. },
  73. orderEntry(){
  74. console.log('111');
  75. uni.navigateTo(
  76. { url: '/pages/views/dingDanCreate' }
  77. )
  78. },
  79. // 搜索城市名字
  80. searchName(){
  81. if(this.ServiceName){
  82. this.textcontent = [];
  83. getApp().allMsg.map(item => {
  84. if (item.storeName.indexOf(this.ServiceName) !== -1) {
  85. this.textcontent.push(item);
  86. }
  87. });
  88. }else {
  89. this.textcontent=[];
  90. this.textcontent = getApp().allMsg;
  91. }
  92. },
  93. change_city(name){
  94. this.title = name;
  95. this.change_text();
  96. this.isshow_1 = true;
  97. getApp().storeName = this.title;
  98. },
  99. close_view(){
  100. this.isshow_1 = false;
  101. },
  102. // 模糊匹配
  103. // 右上角搜索框--模糊查询
  104. handleSearch(event) {
  105. console.log(event);
  106. if(event){
  107. this.textcontent = [];
  108. getApp().allMsg.map(item => {
  109. if (item.storeName.indexOf(event) !== -1) {
  110. this.textcontent.push(item);
  111. }
  112. });
  113. }else {
  114. this.textcontent=[];
  115. this.textcontent = getApp().allMsg;
  116. }
  117. }
  118. }
  119. };
  120. </script>
  121. <style>
  122. /* 订单录入 */
  123. .order_Entry_container{
  124. width: 90%;
  125. height: 8%;
  126. background-color: #d9e5eb;
  127. border-radius: 0.6rem;
  128. margin-left:5%;
  129. display: flex;
  130. flex-direction: row;
  131. align-items: center;
  132. margin-top: 10%;
  133. }
  134. .order_Entry_image{
  135. width: 10%;
  136. height: 70%;
  137. margin-left: 3%;
  138. }
  139. .order_Entry_end{
  140. margin-left: auto;
  141. margin-right: 7%;
  142. }
  143. /* 轮播图 */
  144. .swiper {
  145. height: 30%;
  146. width: 100%;
  147. display: flex;
  148. flex-direction: row;
  149. align-items: center;
  150. overflow: hidden;
  151. }
  152. .swiper-image {
  153. width: 100%;
  154. height: 100%;
  155. margin: 0 auto;
  156. }
  157. .form {
  158. flex: 1;
  159. padding: 1rem;
  160. }
  161. .submit-button {
  162. width: 100%;
  163. height: 3rem;
  164. background-color: #007aff;
  165. color: #fff;
  166. border: none;
  167. border-radius: 0.3rem;
  168. font-size: 1rem;
  169. }
  170. .footer {
  171. display: flex;
  172. justify-content: space-around;
  173. padding: 0.8rem;
  174. background-color: #fff;
  175. border-top: 1rem solid #ccc;
  176. }
  177. .nav-item {
  178. text-align: center;
  179. }
  180. .nav-item text {
  181. font-size: 0.9rem;
  182. }
  183. .icon-image{
  184. width: 30%;
  185. height: 10rem;
  186. margin: 0 auto;
  187. margin-top: 1rem;
  188. }
  189. /* 遮罩层 */
  190. .show_container{
  191. width: 60%;
  192. height: 36%;
  193. background-color: #ffffff;
  194. position: absolute;
  195. border-radius: 1rem;
  196. /* border: 1rem solid; */
  197. box-shadow: 0rem 0.2rem 0rem #e4e4e4;
  198. left:5%;
  199. top: 13%;
  200. z-index:999;
  201. display: flex;
  202. flex-direction: column;
  203. align-items: center;
  204. }
  205. .isshow-header{
  206. width: 90%;
  207. height: 30%;
  208. display: flex;
  209. justify-content: center;
  210. align-items: center;
  211. flex-direction: row;
  212. color: #3c7697;
  213. }
  214. .isshow-header-content-icon{
  215. width: 10%;
  216. height: 30%;
  217. }
  218. .isshow-header-content-input{
  219. width: 80%;
  220. height: 40%;
  221. margin: 0 1rem 0 1rem;
  222. border:none;
  223. outline:none;
  224. }
  225. .isshow-content{
  226. height: 70%;
  227. display: flex;
  228. flex-direction: column;
  229. align-items: center;
  230. overflow-y:scroll;
  231. }
  232. .isshow-content-text{
  233. color: #414141;
  234. height: 1.5rem;
  235. width: 100%;
  236. line-height: 1.5rem;
  237. margin: 1rem 0 1rem 0;
  238. font-size: 0.8rem;
  239. }
  240. .isshow-content::-webkit-scrollbar {
  241. display: none;
  242. }
  243. /* 提示框*/
  244. .show_container_1{
  245. width: 80%;
  246. height: 50%;
  247. background-color: #ffffff;
  248. position: absolute;
  249. border-radius: 1rem;
  250. /* border: 1rem solid; */
  251. box-shadow: 0rem 0.2rem 0rem #e4e4e4;
  252. left:10%;
  253. top:25%;
  254. z-index:999;
  255. display: flex;
  256. flex-direction: column;
  257. align-items: center;
  258. }
  259. .show_container_1_image{
  260. height: 40%;
  261. width: 60%;
  262. top: 5%;
  263. }
  264. .show_container_1_footer{
  265. height: 50%;
  266. width: 100%;
  267. color:#0b5583;
  268. display: flex;
  269. flex-direction: column;
  270. align-items: center;
  271. font-weight: bold;
  272. font-size: 0.7rem;
  273. }
  274. .show_container_1_footer text{
  275. margin-top: 10%;
  276. }
  277. .show_container_1_footer_button{
  278. background-color: #ffffff;
  279. color:#0b5583;
  280. height: 30%;
  281. border-radius: 1.8rem;
  282. width: 80%;
  283. margin-top: 5%;
  284. border: 0.1rem solid #0c547e;
  285. display: flex;
  286. justify-content: center;
  287. align-items: center;
  288. }
  289. </style>