Bläddra i källkod

APP新增线索增加字段:业务类别、物品类别、线索类别和其他补充调整

chenyidong 3 månader sedan
förälder
incheckning
049369b396

+ 71 - 23
pages/addClue/index.vue

@@ -64,6 +64,24 @@
64 64
 					<u-icon slot="right" name="arrow-right"></u-icon>
65 65
 				</u-form-item>
66 66
 				
67
+				<u-form-item label="业务类别" prop="clueBizType" borderBottom>
68
+					<ld-select :list="clueBizTypeDict" label-key="dictLabel" value-key="dictValue" placeholder="请选择业务类别"
69
+						v-model="form.clueBizType" :border="false"></ld-select>
70
+					<u-icon slot="right" name="arrow-right"></u-icon>
71
+				</u-form-item>
72
+				
73
+				<u-form-item label="物品类别" prop="clueObjType" borderBottom>
74
+					<ld-select :list="clueObjTypeDict" label-key="dictLabel" value-key="dictValue" placeholder="请选择物品类别"
75
+						v-model="form.clueObjType" :border="false"></ld-select>
76
+					<u-icon slot="right" name="arrow-right"></u-icon>
77
+				</u-form-item>
78
+				
79
+				<u-form-item label="线索类别" prop="clueAdType" borderBottom>
80
+					<ld-select :list="clueAdTypeDict" label-key="dictLabel" value-key="dictValue" placeholder="请选择线索类别"
81
+						v-model="form.clueAdType" :border="false"></ld-select>
82
+					<u-icon slot="right" name="arrow-right"></u-icon>
83
+				</u-form-item>
84
+				
67 85
 				<u-form-item label="年龄" prop="age" borderBottom>
68 86
 					<u--input v-model.number="form.age" disabledColor="#ffffff" border="none" placeholder="请输入年龄"></u--input>
69 87
 				</u-form-item>
@@ -131,27 +149,39 @@
131 149
 
132 150
 <script>
133 151
 	const columnProps = [
134
-	  {
135
-	    prop : "name",
136
-	    label : "姓名",
137
-	  },
138
-	  {
139
-	    prop : "telephone",
140
-	    label : "电话",
141
-	  },
142
-	  {
143
-	    prop : "clueOperationName",
144
-	    label : "运营",
145
-	  },
146
-	  {
147
-	    prop : "appName",
148
-	    label : "来源",
149
-	  },
150
-	  {
151
-	    prop : "deptName",
152
-	    label : "归属",
153
-	  }
154
-	];
152
+  {
153
+    prop : "name",
154
+    label : "姓名",
155
+  },
156
+  {
157
+    prop : "telephone",
158
+    label : "电话",
159
+  },
160
+  {
161
+    prop : "clueOperationName",
162
+    label : "运营",
163
+  },
164
+  {
165
+    prop : "appName",
166
+    label : "来源",
167
+  },
168
+  {
169
+    prop : "deptName",
170
+    label : "归属",
171
+  },
172
+  {
173
+    prop : "clueBizType",
174
+    label : "业务类别",
175
+  },
176
+  {
177
+    prop : "clueObjType",
178
+    label : "物品类别",
179
+  },
180
+  {
181
+    prop : "clueAdType",
182
+    label : "线索类别",
183
+  }
184
+];
155 185
 	import ldSelect from '@/components/ld-select/ld-select.vue'
156 186
 	import {
157 187
 		filterCustomerManager,
@@ -171,6 +201,9 @@
171 201
 				deptList: [],
172 202
 				dictCascadeData: [],
173 203
 				genderTypeCodeDict: [],
204
+				clueBizTypeDict: [],
205
+				clueObjTypeDict: [],
206
+				clueAdTypeDict: [],
174 207
 				originalDictCascadeData : [],
175 208
 				originaDeptList : [],
176 209
 	
@@ -234,6 +267,9 @@
234 267
 					clueOwnerName: undefined,
235 268
 					deptName: undefined,
236 269
 					deptId: undefined,
270
+					clueBizType: '回收',
271
+					clueObjType: '腕表',
272
+					clueAdType: '常规',
237 273
 				}
238 274
 			}
239 275
 		},
@@ -385,8 +421,20 @@
385 421
 				});
386 422
 	
387 423
 				this.$getDicts('sys_user_sex').then(res => {
388
-					this.genderTypeCodeDict = res;
389
-				});
424
+				this.genderTypeCodeDict = res;
425
+			});
426
+			
427
+			this.$getDicts('crm_clue_biz').then(res => {
428
+				this.clueBizTypeDict = res;
429
+			});
430
+			
431
+			this.$getDicts('crm_clue_obj').then(res => {
432
+				this.clueObjTypeDict = res;
433
+			});
434
+			
435
+			this.$getDicts('crm_clue_type').then(res => {
436
+				this.clueAdTypeDict = res;
437
+			});
390 438
 			},
391 439
 	
392 440
 		},

+ 31 - 1
pages/clue/components/filterQuery.vue

@@ -59,7 +59,7 @@
59 59
 							</view>
60 60
 							<view class="dept_wrap form_input_pointer_events">
61 61
 								<ld-select :list="repetitionDict" label-key="dictLabel" value-key="dictValue"
62
-									placeholder="请选择" v-model="value.isVideoIdIsNull" :border="false"></ld-select>
62
+									placeholder="请选择" v-model="value.isVideoIdIsNull" :border="false" ></ld-select>
63 63
 								<u-icon slot="right" name="arrow-right"></u-icon>
64 64
 							</view>
65 65
 				
@@ -255,6 +255,33 @@
255 255
 									v-for="(item,index) in clueEntranceTypeDicts" :key="index"
256 256
 									@click="handleClickTag(item,'clueEntranceType')"></u-tag>
257 257
 							</view>
258
+							
259
+							<view class="title">
260
+								业务类别
261
+							</view>
262
+							<view class="dept_wrap form_input_pointer_events">
263
+								<ld-select :list="dicts.crmClueBiz" label-key="dictLabel" value-key="dictValue" placeholder="请选择业务类别"
264
+									v-model="value.clueBizType" :border="false" clearable></ld-select>
265
+								<u-icon slot="right" name="arrow-right"></u-icon>
266
+							</view>
267
+							
268
+							<view class="title">
269
+								物品类别
270
+							</view>
271
+							<view class="dept_wrap form_input_pointer_events">
272
+								<ld-select :list="dicts.crmClueObj" label-key="dictLabel" value-key="dictValue" placeholder="请选择物品类别"
273
+									v-model="value.clueObjType" :border="false" clearable></ld-select>
274
+								<u-icon slot="right" name="arrow-right"></u-icon>
275
+							</view>
276
+							
277
+							<view class="title">
278
+								线索类别
279
+							</view>
280
+							<view class="dept_wrap form_input_pointer_events">
281
+								<ld-select :list="dicts.crmClueType" label-key="dictLabel" value-key="dictValue" placeholder="请选择线索类别"
282
+									v-model="value.clueAdType" :border="false" clearable></ld-select>
283
+								<u-icon slot="right" name="arrow-right"></u-icon>
284
+							</view>
258 285
 				
259 286
 						</view>
260 287
 						<u-tabbar :fixed="true" inactiveColor="#ffffff" class="case_tabbar" :placeholder="true"
@@ -614,6 +641,9 @@
614 641
 				this.value.followStatusList = [];
615 642
 				this.value.handleStateList = [];
616 643
 				this.value.clueEntranceType = [];
644
+				this.value.clueBizType = undefined;
645
+				this.value.clueObjType = undefined;
646
+				this.value.clueAdType = undefined;
617 647
 				this.value.manualProvince = undefined;
618 648
 				this.value.manualCity = undefined;
619 649
 				this.value.manualArea = undefined;

+ 32 - 17
pages/clue/mixins/clue.js

@@ -25,11 +25,14 @@ export default {
25 25
 			clueTagGroupVoList: [],
26 26
 
27 27
 			dicts: {
28
-				caseStatusDicts: [],
29
-				crmFollowStatus: [],
30
-				crmCallStatus: [],
31
-				clueEntranceType: []
32
-			},
28
+					caseStatusDicts: [],
29
+					crmFollowStatus: [],
30
+					crmCallStatus: [],
31
+					clueEntranceType: [],
32
+					crmClueBiz: [],
33
+					crmClueObj: [],
34
+					crmClueType: []
35
+				},
33 36
 
34 37
 			options: [{
35 38
 					value: "3",
@@ -106,6 +109,9 @@ export default {
106 109
 				manualCity: undefined,
107 110
 				manualArea: undefined,
108 111
 				clueEntranceType: [],
112
+				clueBizType: undefined,
113
+				clueObjType: undefined,
114
+				clueAdType: undefined,
109 115
 				clueOperationId: undefined,
110 116
 				clueOwnerId: undefined,
111 117
 				sort: undefined,
@@ -172,18 +178,27 @@ export default {
172 178
 			this.resetData();
173 179
 		},
174 180
 		async getDicts() {
175
-			this.$getDicts('crm_clue_phase').then(res => {
176
-				this.dicts.caseStatusDicts = res;
177
-			});
178
-			this.$getDicts('crm_follow_status').then(res => {
179
-				this.dicts.crmFollowStatus = res;
180
-			})
181
-			this.$getDicts('crm_call_status').then(res => {
182
-				this.dicts.crmCallStatus = res;
183
-			})
184
-			this.$getDicts('clue_entrance_type').then(res => {
185
-				this.dicts.clueEntranceType = res;
186
-			});
181
+				this.$getDicts('crm_clue_phase').then(res => {
182
+					this.dicts.caseStatusDicts = res;
183
+				});
184
+				this.$getDicts('crm_follow_status').then(res => {
185
+					this.dicts.crmFollowStatus = res;
186
+				})
187
+				this.$getDicts('crm_call_status').then(res => {
188
+					this.dicts.crmCallStatus = res;
189
+				})
190
+				this.$getDicts('clue_entrance_type').then(res => {
191
+					this.dicts.clueEntranceType = res;
192
+				});
193
+				this.$getDicts('crm_clue_biz').then(res => {
194
+					this.dicts.crmClueBiz = res;
195
+				});
196
+				this.$getDicts('crm_clue_obj').then(res => {
197
+					this.dicts.crmClueObj = res;
198
+				});
199
+				this.$getDicts('crm_clue_type').then(res => {
200
+					this.dicts.crmClueType = res;
201
+				});
187 202
 			uni.$u.api.getClueTagGroupVoList({ tagGroupApplication : '1' }).then(({
188 203
 				data
189 204
 			}) => {

+ 1 - 1
pages/orderDetail/index.vue

@@ -22,7 +22,7 @@
22 22
 			uni.stopPullDownRefresh();
23 23
 			// 刷新
24 24
 			uni.redirectTo({
25
-				url : `/pages/clueDetail/index?` + qs.stringify(this.params),
25
+				url : `/pages/orderDetail/index?` + qs.stringify(this.params),
26 26
 			})
27 27
 		},
28 28
 		onLoad(option) {

+ 16 - 2
pages/orderDetail/page/detail.vue

@@ -218,6 +218,14 @@
218 218
           ref="commissionFormList"
219 219
         ></commission-form-list>
220 220
       </template>
221
+	  <template #sendInfo>
222
+	    <sendInfo
223
+	      :sendFormId="orderId"
224
+	      :clueId="clueId"
225
+		  :receiptDetail="receiptDetail"
226
+	      ref="sendInfo"
227
+	    ></sendInfo>
228
+	  </template>
221 229
     </yui-tabs>
222 230
 
223 231
     <u-tabbar
@@ -234,12 +242,12 @@
234 242
       ></u-tabbar-item>
235 243
       <u-tabbar-item
236 244
         text="添加收单"
237
-        icon="../../static/orderDetail/sd.png"
245
+        icon="../../static/orderDetail/tjsd.png"
238 246
         @click="handleAddReceiptForm"
239 247
       ></u-tabbar-item>
240 248
       <u-tabbar-item
241 249
         text="新增分成"
242
-        icon="../../static/orderDetail/add_commission.png"
250
+        icon="../../static/orderDetail/xzfc.png"
243 251
         @click="handleAddCommission"
244 252
       ></u-tabbar-item>
245 253
       <u-tabbar-item
@@ -274,12 +282,14 @@ import uploadFile from "../tabs/uploadFile/index.vue";
274 282
 import clueFollow from "../tabs/followRecord/index.vue";
275 283
 import receiptFormList from "../tabs/receiptFormList/receiptFormList.vue";
276 284
 import commissionFormList from "../tabs/commissionFormList/commissionFormList.vue";
285
+import sendInfo from "../tabs/sendInfo/index.vue";
277 286
 export default {
278 287
   components: {
279 288
     uploadFile,
280 289
     clueFollow,
281 290
     receiptFormList,
282 291
     commissionFormList,
292
+	sendInfo
283 293
   },
284 294
   props: {
285 295
     orderId: {
@@ -307,6 +317,10 @@ export default {
307 317
       crmFormStateDict: [],
308 318
       crmHandelStatusDict: [],
309 319
       tabs: [
320
+		{
321
+		  label: "发单信息",
322
+		  slot: "sendInfo",
323
+		},
310 324
         {
311 325
           label: "聊天附件",
312 326
           slot: "chatFile",

+ 176 - 0
pages/orderDetail/tabs/sendInfo/index.vue

@@ -0,0 +1,176 @@
1
+<template>
2
+  <view class="caseInfo_wrap">
3
+    <view class="caseInfo_content_wrap">
4
+      <view class="caseInfo_title">
5
+        <view>
6
+          <image src="/static/clueDetail/icon-caseInfo.png" mode=""></image>
7
+          <text class="info_text">发单信息</text>
8
+        </view>
9
+        <u-icon name="edit-pen-fill" color="#2979ff" size="18" @click="handleEdit"></u-icon>
10
+      </view>
11
+      <view class="caseInfo_main_wrap">
12
+        <view class="Info_item" v-for="item in caseInfoColumn" :key="item.prop">
13
+          <text class="label">{{ item.label }}</text>
14
+          <text class="value">{{
15
+            item.dictType
16
+              ? $selectDictLabel(item.dictType, receiptDetail[item.prop])
17
+              : receiptDetail[item.prop]
18
+              ? receiptDetail[item.prop]
19
+              : "-"
20
+          }}</text>
21
+        </view>
22
+      </view>
23
+    </view>
24
+  </view>
25
+</template>
26
+
27
+<script>
28
+const caseInfoColumn = [
29
+  {
30
+    prop: "receiptDate",
31
+    label: "收单日期",
32
+  },
33
+  {
34
+    prop: "item",
35
+    label: "物品",
36
+  },
37
+  {
38
+    prop: "phone",
39
+    label: "电话",
40
+  },
41
+  {
42
+    prop: "authenticateNickName",
43
+    label: "鉴定",
44
+  },
45
+  {
46
+    prop: "category",
47
+    label: "类别",
48
+    dictType: "crm_form_category",
49
+  },
50
+  {
51
+    prop: "brand",
52
+    label: "品牌",
53
+    dictType: "crm_form_brand",
54
+  },
55
+  {
56
+    prop: "idCard",
57
+    label: "身份证号码",
58
+  },
59
+  {
60
+    prop: "customName",
61
+    label: "开户人姓名",
62
+  },
63
+  {
64
+    prop: "bankCardNumber",
65
+    label: "银行卡号",
66
+  },
67
+  {
68
+    prop: "bankName",
69
+    label: "银行名称",
70
+  },
71
+  {
72
+    prop: "paymentMethod",
73
+    label: "付款方式",
74
+  },
75
+  {
76
+    prop: "visitTime",
77
+    label: "计划上门时间",
78
+  },
79
+  {
80
+    prop: "remarks",
81
+    label: "补充说明",
82
+  },
83
+  {
84
+    prop: "priceRange",
85
+    label: "预估价格范围",
86
+  },
87
+  {
88
+    prop: "tactic",
89
+    label: "采用战术",
90
+    dictType: "crm_form_tactic",
91
+  },
92
+];
93
+export default {
94
+  props: {
95
+    receiptDetail: {
96
+      type: Object,
97
+      default: () => {},
98
+    },
99
+    sendFormId: {
100
+      type: [Number, String],
101
+      required: true,
102
+    },
103
+    clueId: {
104
+      type: [Number, String],
105
+      required: true,
106
+    },
107
+  },
108
+  data() {
109
+    return {
110
+      caseInfoColumn,
111
+    };
112
+  },
113
+  methods: {
114
+    handleEdit() {
115
+      uni.navigateTo({
116
+        url: `/pages/orderForm/index?clueId=${this.clueId}&sendFormId=${this.sendFormId}`,
117
+      });
118
+    },
119
+  },
120
+};
121
+</script>
122
+
123
+<style lang="scss" scoped>
124
+.caseInfo_wrap {
125
+  min-height: 400px;
126
+  .caseInfo_title {
127
+    display: flex;
128
+    align-items: center;
129
+    justify-content: space-between;
130
+    height: 80rpx;
131
+    background: #f4f4f6;
132
+    padding: 0 40rpx;
133
+
134
+    image {
135
+      width: 24rpx;
136
+      height: 24rpx;
137
+      margin-right: 10rpx;
138
+    }
139
+
140
+    .info_text {
141
+      font-size: 24rpx;
142
+      color: #202020;
143
+    }
144
+
145
+    .edit-btn {
146
+      font-size: 24rpx;
147
+      color: #3498db;
148
+      padding: 8rpx 16rpx;
149
+      border-radius: 8rpx;
150
+      background-color: #fff;
151
+      border: 1rpx solid #3498db;
152
+    }
153
+  }
154
+
155
+  .caseInfo_main_wrap {
156
+    .Info_item {
157
+      padding: 18rpx 40rpx;
158
+      display: flex;
159
+      justify-content: space-between;
160
+
161
+      .label {
162
+        color: #999999;
163
+        font-size: 26rpx;
164
+        width: 160rpx;
165
+      }
166
+
167
+      .value {
168
+        font-size: 26rpx;
169
+        color: #202020;
170
+        text-align: right;
171
+        width: 500rpx;
172
+      }
173
+    }
174
+  }
175
+}
176
+</style>

+ 82 - 52
pages/orderForm/index.vue

@@ -40,16 +40,10 @@
40 40
 				</u-form-item>
41 41
 
42 42
 				<u-form-item label="物品品牌" prop="brand" borderBottom>
43
-				<ld-select
44
-					:list="brandDict"
45
-					label-key="dictLabel"
46
-					value-key="dictValue"
47
-					placeholder="请选择物品品牌"
48
-					v-model="form.brand"
49
-					:border="false"
50
-				></ld-select>
51
-				<u-icon slot="right" name="arrow-right"></u-icon>
52
-			</u-form-item>
43
+					<ld-select :list="brandDict" label-key="dictLabel" value-key="dictValue" placeholder="请选择物品品牌"
44
+						v-model="form.brand" :border="false"></ld-select>
45
+					<u-icon slot="right" name="arrow-right"></u-icon>
46
+				</u-form-item>
53 47
 
54 48
 				<u-form-item label="价格范围" prop="priceRange" borderBottom>
55 49
 					<u--input v-model="form.priceRange" placeholder="请输入价格范围" border="none"></u--input>
@@ -69,26 +63,22 @@
69 63
 		</view>
70 64
 
71 65
 		<!-- 文件上传区域 -->
72
-		<view class="upload_area">
66
+		<view class="upload_area" v-if="!sendFormId">
73 67
 			<!-- 聊天记录附件 -->
74 68
 			<order-file-upload title="聊天记录附件" orderFileType="1" :file-list="form.chatAttachmentList"
75
-				@update:fileList="updateChatFiles" 
76
-				tip-text="上传聊天截图、录音等文件"></order-file-upload>
69
+				@update:fileList="updateChatFiles" tip-text="上传聊天截图、录音等文件"></order-file-upload>
77 70
 
78 71
 			<!-- 报价附件 -->
79 72
 			<order-file-upload title="报价附件" orderFileType="2" :file-list="form.quoteAttachmentList"
80
-				@update:fileList="updateQuoteFiles" 
81
-				tip-text="上传报价附件"></order-file-upload>
73
+				@update:fileList="updateQuoteFiles" tip-text="上传报价附件"></order-file-upload>
82 74
 
83 75
 			<!-- 高清图附件 -->
84 76
 			<order-file-upload title="高清图附件" orderFileType="3" :file-list="form.hdImageAttachmentList"
85
-				@update:fileList="updateHdImageFiles" 
86
-				tip-text="上传物品高清图片"></order-file-upload>
77
+				@update:fileList="updateHdImageFiles" tip-text="上传物品高清图片"></order-file-upload>
87 78
 
88 79
 			<!-- 其他附件 -->
89 80
 			<order-file-upload title="其他附件" orderFileType="4" :file-list="form.otherAttachmentList"
90
-				@update:fileList="updateOtherFiles" 
91
-				tip-text="上传其他相关文件"></order-file-upload>
81
+				@update:fileList="updateOtherFiles" tip-text="上传其他相关文件"></order-file-upload>
92 82
 		</view>
93 83
 
94 84
 	</view>
@@ -110,6 +100,8 @@
110 100
 				categoryDict: [],
111 101
 				tacticDict: [],
112 102
 				brandDict: [],
103
+				
104
+				sendFormId : undefined,
113 105
 
114 106
 				form: {
115 107
 					clueId: '',
@@ -194,6 +186,21 @@
194 186
 		},
195 187
 
196 188
 		methods: {
189
+			// 加载表单数据
190
+			async loadFormData(sendFormId) {
191
+				try {
192
+					const res = await uni.$u.api.getClueSendFormVoByOrderId({
193
+						id: sendFormId
194
+					});
195
+					if (res.code === 200) {
196
+						this.form = res.data;
197
+					}
198
+				} catch (error) {
199
+					console.error('加载表单数据失败:', error);
200
+					uni.$u.toast('加载表单数据失败');
201
+				}
202
+			},
203
+
197 204
 			// 获取地区选择
198 205
 			handleGetRegion(region) {
199 206
 				const [provinceData, cityData, areaData] = region;
@@ -228,21 +235,21 @@
228 235
 				console.log('文件上传变化:', data);
229 236
 			},
230 237
 			// 获取字典数据
231
-				async getDicts() {
232
-					try {
233
-						const [categoryRes, tacticRes, brandRes] = await Promise.all([
234
-							this.$getDicts('crm_form_category'),
235
-							this.$getDicts('crm_form_tactic'),
236
-							this.$getDicts('crm_form_brand')
237
-						]);
238
-
239
-						this.categoryDict = categoryRes;
240
-						this.tacticDict = tacticRes;
241
-						this.brandDict = brandRes;
242
-					} catch (error) {
243
-						console.error('获取字典数据失败:', error);
244
-					}
245
-				},
238
+			async getDicts() {
239
+				try {
240
+					const [categoryRes, tacticRes, brandRes] = await Promise.all([
241
+						this.$getDicts('crm_form_category'),
242
+						this.$getDicts('crm_form_tactic'),
243
+						this.$getDicts('crm_form_brand')
244
+					]);
245
+
246
+					this.categoryDict = categoryRes;
247
+					this.tacticDict = tacticRes;
248
+					this.brandDict = brandRes;
249
+				} catch (error) {
250
+					console.error('获取字典数据失败:', error);
251
+				}
252
+			},
246 253
 
247 254
 			// 处理保存
248 255
 			async handleNavSaveClick() {
@@ -250,24 +257,43 @@
250 257
 					// 表单验证
251 258
 					await this.$refs.form.validate();
252 259
 
253
-					// 合并所有附件
254
-					const allAttachments = [
255
-						...this.form.chatAttachmentList,
256
-						...this.form.quoteAttachmentList,
257
-						...this.form.hdImageAttachmentList,
258
-						...this.form.otherAttachmentList
259
-					];
260
-
261
-					// 准备提交数据
262
-					const submitData = {
263
-						...this.form,
264
-						uploadList: allAttachments
265
-					};
266
-
267
-					// 调用保存接口
268
-					await uni.$u.api.saveClueOrderForm(submitData);
269
-
270
-					uni.$u.toast('发单记录添加成功');
260
+					if (this.form.id) {
261
+						const updatedForm = {
262
+							id: this.form.id,
263
+							item: this.form.item,
264
+							phone: this.form.phone,
265
+							authenticateUserId: this.form.authenticateUserId,
266
+							category: this.form.category,
267
+							brand: this.form.brand,
268
+							idCard: this.form.idCard,
269
+							customName: this.form.customName,
270
+							bankCardNumber: this.form.bankCardNumber,
271
+							bankName: this.form.bankName,
272
+							paymentMethod: this.form.paymentMethod,
273
+							visitTime: this.form.visitTime,
274
+							remarks: this.form.remarks,
275
+							priceRange: this.form.priceRange,
276
+							tactic: this.form.tactic
277
+						}
278
+						await uni.$u.api.updateClueOrderForm(updatedForm);
279
+						uni.$u.toast('发单记录更新成功');
280
+					} else {
281
+						// 合并所有附件
282
+						const allAttachments = [
283
+							...this.form.chatAttachmentList,
284
+							...this.form.quoteAttachmentList,
285
+							...this.form.hdImageAttachmentList,
286
+							...this.form.otherAttachmentList
287
+						];
288
+						
289
+						// 准备提交数据
290
+						const submitData = {
291
+							...this.form,
292
+							uploadList: allAttachments
293
+						};
294
+						await uni.$u.api.saveClueOrderForm(submitData);
295
+						uni.$u.toast('发单记录添加成功');
296
+					}
271 297
 
272 298
 					// 延迟返回
273 299
 					setTimeout(() => {
@@ -285,8 +311,12 @@
285 311
 
286 312
 		onLoad(option) {
287 313
 			const clueId = option.clueId;
314
+			this.sendFormId = option.sendFormId;
288 315
 			this.form.clueId = clueId;
289 316
 			this.getDicts();
317
+			if (option.sendFormId) {
318
+				this.loadFormData(option.sendFormId);
319
+			}
290 320
 		}
291 321
 	}
292 322
 </script>

+ 1 - 2
pages/receiptForm/index.vue

@@ -635,7 +635,7 @@ export default {
635 635
       try {
636 636
         const params = {
637 637
           clueId: this.receiptDetail.clueId,
638
-          sourceId: this.receiptDetail.sendFormId,
638
+          sourceId: this.receiptDetail.id,
639 639
           notBound: "1",
640 640
           orderFileType: "3",
641 641
           type: "2",
@@ -694,7 +694,6 @@ export default {
694 694
     // 提交表单
695 695
     submitForm() {
696 696
       this.$refs.receiptFormRef.validate().then(async (valid) => {
697
-        console.log(valid);
698 697
         if (valid) {
699 698
           await this.handleUpdate();
700 699
         } else {

BIN
static/orderDetail/tjgj.png


BIN
static/orderDetail/tjsd.png


BIN
static/orderDetail/xzfc.png


+ 3 - 2
utils/api.js

@@ -26,7 +26,7 @@ const install = (Vue, vm) => {
26 26
 		addCaseOutEquipment : (data = {})=>http.post("system/caseOutEquipment",data), // 申请mac地址授权
27 27
 		checkOutEquipment : (params = {},config)=>http.get("/system/caseOutEquipment/checkOutEquipment",{params,...config}), // 检测外访设备是否有申请通过记录
28 28
 		concatRecord : (files,params = {})=>http.upload('/fileVisit/concatRecord',{files, params , name: 'files', timeout: 1000 * 60 * 10, custom : { loadingText : "上传中" }}), // 合并录音并上传
29
-		uploadFile : (url,params = {})=> http.upload('/file/upload',{filePath: url,params ,name : "file",timeout: 1000 * 60 * 10,custom : { loadingText : "上传中" }}), // 上传文件
29
+		uploadFile : (url,params = {})=> http.upload('/file/aliossUpload',{filePath: url,params ,name : "file",timeout: 1000 * 60 * 10,custom : { loadingText : "上传中" }}), // 上传文件
30 30
 		watermarkUpload : (url,params = {})=> http.upload('/fileVisit/watermarkUpload',{filePath: url, params, name : "file",timeout: 1000 * 60 * 10,custom : { loadingText : "上传中" }}), // 上传文件
31 31
 		getOutPolyline : (params = {})=>http.get("/system/caseOutPolyline/getOutPolyline",{ params , custom : { loading: false } }), // 请求外访轨迹列表
32 32
 		addOutPolyline : (data = {})=>http.post("/system/caseOutPolyline/addOutPolyline",data,{ custom : { loading: false } }), // 添加外访轨迹
@@ -108,7 +108,8 @@ const install = (Vue, vm) => {
108 108
 		clueCommissionUpdate: (data={})=>http.put(store.state.user.path + '/clueCommissionForm',data),
109 109
 		clueCommissionById: (id,config={})=>http.get(store.state.user.path + '/clueCommissionForm/' + id),
110 110
 		clueCommissionRemove: (ids,config={})=>http.post(store.state.user.path + '/clueCommissionForm/remove',ids),
111
-		getCustomerManagerAllList: ()=>http.post('/system/user/getCustomerManagerAllList')
111
+		getCustomerManagerAllList: ()=>http.post('/system/user/getCustomerManagerAllList'),
112
+		getClueSendFormVoByOrderId: (params)=>http.get(store.state.user.path + '/clueSendForm/getClueSendFormVoByOrderId?' + qs.stringify(params)),
112 113
 	}
113 114
 }
114 115