Ver código fonte

客户页面

wangxy 1 mês atrás
pai
commit
4a5287b5a8

+ 43 - 0
pages/admin/Hetong/components/addKh.vue

@@ -0,0 +1,43 @@
+<template>
+  <uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+    <view class="ht-qm-popup">
+      <view class="phone-navBar-box">
+        <view @click="goback2" class="nav-bar-icon"></view>
+        <text>添加客户</text>
+      </view>
+
+    </view>
+  </uni-popup>
+</template>
+
+<script setup>
+import {
+  ref,
+  reactive,
+  nextTick
+} from "vue";
+import {
+  onLoad
+} from "@dcloudio/uni-app";
+import * as httpApi from "@/api/sanfang.js"
+import searchDialog from "./search.vue";
+
+function goback2() {
+  popupRef.value.close();
+}
+
+const popupRef = ref(null)
+const data = reactive({
+})
+
+function handleShow() {
+  popupRef.value.open();
+}
+
+defineExpose({
+  handleShow
+})
+</script>
+
+<style>
+</style>

+ 13 - 6
pages/admin/Hetong/components/selectKh.vue

@@ -1,7 +1,7 @@
 <template>
 	<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
 		<view class="ht-qm-popup">
-				<view class="phone-navBar-box">
+			<view class="phone-navBar-box">
 				<view @click="goback2" class="nav-bar-icon"></view>
 				<text>选择客户</text>
 				<uni-icons class="nav-bar-right-icon bar-ml10" type="search" size="20"
@@ -11,11 +11,11 @@
 				<search-dialog ref="searchDialogRef" shenfen="kh" @search-btn="dialogSearchBtn"
 					@reset-search="dialogSearchReset"></search-dialog>
 			</view>
-			
+
 			<view class="jz-new-btn-box">
 				<button type="default" class="phone-green-btn" @click="handleAddKehu">新增客户</button>
 			</view>
-			
+
 			<!-- 无限滚动容器 -->
 			<view>
 				<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.loading"
@@ -47,6 +47,9 @@
 			</view>
 		</view>
 	</uni-popup>
+
+	<addKh ref="addKhRef"></addKh>
+
 </template>
 
 <script setup>
@@ -60,6 +63,7 @@
 	} from "@dcloudio/uni-app";
 	import * as httpApi from "@/api/sanfang.js"
 	import searchDialog from "./search.vue";
+	import addKh from "./addKh"
 
 	const emits = defineEmits(['select'])
 
@@ -67,6 +71,7 @@
 		popupRef.value.close();
 	}
 
+	const addKhRef = ref(null)
 	const searchDialogRef = ref(null);
 	const popupRef = ref(null)
 	const data = reactive({
@@ -164,8 +169,10 @@
 	function radioChange(opt) {
 		data.activeData = opt.id
 	}
-	
-	function handleAddKehu() {}
+
+	function handleAddKehu() {
+		addKhRef.value.handleShow()
+	}
 
 
 	function handleSelect() {
@@ -177,7 +184,7 @@
 		popupRef.value.open();
 		onRefresh();
 	}
-	
+
 	defineExpose({
 		handleShow
 	})