Quellcode durchsuchen

添加一个新增发单

chenyidong vor 3 Monaten
Ursprung
Commit
4b631ee1e5
5 geänderte Dateien mit 97 neuen und 2 gelöschten Zeilen
  1. 7 0
      pages.json
  2. 28 2
      pages/clueDetail/page/clueDetail.vue
  3. 61 0
      pages/orderForm/index.vue
  4. BIN
      static/clueDetail/icon-order.png
  5. 1 0
      utils/api.js

+ 7 - 0
pages.json

@@ -191,6 +191,13 @@
191 191
 				"navigationBarTitleText": "上传录音",
192 192
 				"navigationStyle": "custom"
193 193
 			}
194
+		},
195
+		{
196
+			"path": "pages/orderForm/index",
197
+			"style": {
198
+				"navigationBarTitleText": "线索发单",
199
+				"navigationStyle": "custom"
200
+			}
194 201
 		}
195 202
 	],
196 203
 	"globalStyle": {

+ 28 - 2
pages/clueDetail/page/clueDetail.vue

@@ -113,8 +113,10 @@
113 113
 			:safeAreaInsetBottom="true">
114 114
 			<u-tabbar-item text="拨打电话" icon="../../static/clueDetail/icon-phone.png"
115 115
 				@click="handleCallPhone"></u-tabbar-item>
116
-			<u-tabbar-item text="转移线索" icon="../../static/clueDetail/icon-clue.png"
117
-				@click="handleDistribution"></u-tabbar-item>
116
+			<!-- 			<u-tabbar-item text="转移线索" icon="../../static/clueDetail/icon-clue.png"
117
+				@click="handleDistribution"></u-tabbar-item> -->
118
+			<u-tabbar-item text="发单" icon="../../static/clueDetail/icon-order.png"
119
+				@click="handleClueSend"></u-tabbar-item>
118 120
 			<u-tabbar-item text="写新跟进" icon="../../static/caseDetail/icon-follow.png"
119 121
 				@click="handleAddFollow"></u-tabbar-item>
120 122
 			<u-tabbar-item text="上传录音" icon="../../static/caseDetail/icon-record.png"
@@ -299,6 +301,30 @@
299 301
 					}
300 302
 				});
301 303
 			},
304
+			// 发单
305
+			async handleClueSend() {
306
+				const {
307
+					data: count
308
+				} = await uni.$u.api.getClueSendFormCountByClueId({
309
+					clueId: this.clueId
310
+				});
311
+				if (count > 0) {
312
+					uni.showModal({
313
+						title: '该线索已发单是否再次发单?',
314
+						success: function (res) {
315
+							if (res.confirm) {
316
+								uni.navigateTo({
317
+									url: `/pages/orderForm/index?clueId=${this.clueId}`
318
+								})
319
+							}
320
+						}
321
+					});
322
+				}else{
323
+					uni.navigateTo({
324
+						url: `/pages/orderForm/index?clueId=${this.clueId}`
325
+					})
326
+				}
327
+			},
302 328
 			// 添加催记
303 329
 			handleAddFollow() {
304 330
 				uni.navigateTo({

+ 61 - 0
pages/orderForm/index.vue

@@ -0,0 +1,61 @@
1
+<template>
2
+	<view class="follow_wrap">
3
+		<u-navbar placeholder :autoBack="true" title="上传录音" @rightClick="handleNavSaveClick">
4
+			<view class="u-nav-slot" slot="right">
5
+				保存
6
+			</view>
7
+		</u-navbar>
8
+		<view class="form_wrap">
9
+			<u--form labelPosition="left" labelWidth="80" :model="form" :rules="rules" ref="form" class="form_wrap">
10
+				<u-form-item label="线索名称">
11
+					{{clueDetail && clueDetail.name ? clueDetail.name : "-"}}
12
+				</u-form-item>
13
+			</u--form>
14
+		</view>
15
+	</view>
16
+</template>
17
+
18
+<script>
19
+	export default {
20
+		data() {
21
+			return {
22
+				rules: {
23
+				},
24
+				form: {
25
+				},
26
+				clueDetail : {},
27
+			}
28
+		},
29
+		methods: {
30
+			handleNavSaveClick() {
31
+				if(!this.form.clueId){
32
+					uni.$u.toast("相关线索id为空");
33
+				}
34
+				this.$refs.form.validate().then(async () => {
35
+					await uni.$u.api.saveClueFile(this.form);
36
+					uni.$u.toast("保存成功");
37
+					this.timer = setTimeout(() => {
38
+						uni.navigateBack();
39
+						clearTimeout(this.timer);
40
+					}, 1000)
41
+				})
42
+			},
43
+		},
44
+		onLoad(option) {
45
+			this.form.clueId = option.clueId;
46
+		},
47
+	}
48
+</script>
49
+
50
+<style lang="scss" scoped>
51
+	.form_wrap {
52
+		background-color: #fff;
53
+		margin: 20rpx 0;
54
+
55
+		.form_wrap {
56
+			::v-deep .u-form-item__body {
57
+				padding: 20rpx 40rpx;
58
+			}
59
+		}
60
+	}
61
+</style>

BIN
static/clueDetail/icon-order.png


+ 1 - 0
utils/api.js

@@ -74,6 +74,7 @@ const install = (Vue, vm) => {
74 74
 		shiYuWxLoginGetInfo : (params)=> http.get('/auth/shiYuWxLoginGetInfo',{params, custom : { noAuth: true }}),
75 75
 		deleteClueFile : (data)=> http.delete(store.state.user.path + '/clueFile/deleteClueFile',data),
76 76
 		getCallClueFileByClueId : (params)=> http.get(store.state.user.path + '/clueFile/getCallClueFileByClueId',{params, custom : { noAuth: true }}),
77
+		getClueSendFormCountByClueId : (params = {},config = {})=>http.get(store.state.user.path + '/clueSendForm/getClueSendFormCountByClueId',{ params }),
77 78
 	}
78 79
 }
79 80