|
|
@@ -44,11 +44,23 @@
|
|
44
|
44
|
</el-col>
|
|
45
|
45
|
<el-col :span="12">
|
|
46
|
46
|
<el-form-item label="手机号码" prop="F_CustomerPhone">
|
|
47
|
|
- <el-input
|
|
|
47
|
+ <el-select
|
|
|
48
|
+ v-model="ruleForm.F_CustomerPhone"
|
|
|
49
|
+ placeholder="请选择电话号码"
|
|
|
50
|
+ class="form_select"
|
|
|
51
|
+ >
|
|
|
52
|
+ <el-option
|
|
|
53
|
+ v-for="item in customerPhoneList"
|
|
|
54
|
+ :key="item.number"
|
|
|
55
|
+ :label="item.number"
|
|
|
56
|
+ :value="item.number"
|
|
|
57
|
+ />
|
|
|
58
|
+ </el-select>
|
|
|
59
|
+ <!-- <el-input
|
|
48
|
60
|
v-model="ruleForm.F_CustomerPhone"
|
|
49
|
61
|
placeholder="请输入手机号码"
|
|
50
|
62
|
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
|
51
|
|
- />
|
|
|
63
|
+ /> -->
|
|
52
|
64
|
</el-form-item>
|
|
53
|
65
|
</el-col>
|
|
54
|
66
|
</el-row>
|
|
|
@@ -234,7 +246,7 @@
|
|
234
|
246
|
</el-select>
|
|
235
|
247
|
</el-form-item>
|
|
236
|
248
|
</el-col>
|
|
237
|
|
- <el-col :span="12">
|
|
|
249
|
+ <!-- <el-col :span="12">
|
|
238
|
250
|
<el-form-item label="出库货仓" prop="F_Stock">
|
|
239
|
251
|
<el-select
|
|
240
|
252
|
v-model="ruleForm.F_Stock"
|
|
|
@@ -250,33 +262,7 @@
|
|
250
|
262
|
/>
|
|
251
|
263
|
</el-select>
|
|
252
|
264
|
</el-form-item>
|
|
253
|
|
- </el-col>
|
|
254
|
|
- </el-row>
|
|
255
|
|
- <el-row>
|
|
256
|
|
- <!-- <el-col :span='12'>
|
|
257
|
|
- <el-form-item label="快递单号" prop="F_TrackingNo" >
|
|
258
|
|
- <el-input v-model="ruleForm.F_TrackingNo" placeholder="请输入快递单号"/>
|
|
259
|
|
- </el-form-item>
|
|
260
|
|
- </el-col> -->
|
|
261
|
|
- <el-col :span="12">
|
|
262
|
|
- <el-form-item label="收件人" prop="F_Addressee">
|
|
263
|
|
- <el-input
|
|
264
|
|
- v-model="ruleForm.F_Addressee"
|
|
265
|
|
- placeholder="请输入收件人"
|
|
266
|
|
- />
|
|
267
|
|
- </el-form-item>
|
|
268
|
|
- </el-col>
|
|
269
|
|
- <el-col :span="12">
|
|
270
|
|
- <el-form-item label="收件人手机号" prop="F_AddPhone">
|
|
271
|
|
- <el-input
|
|
272
|
|
- v-model="ruleForm.F_AddPhone"
|
|
273
|
|
- placeholder="请输入收件人手机号"
|
|
274
|
|
- onkeyup="value=value.replace(/[^\d.]/g,'')"
|
|
275
|
|
- />
|
|
276
|
|
- </el-form-item>
|
|
277
|
|
- </el-col>
|
|
278
|
|
- </el-row>
|
|
279
|
|
- <el-row>
|
|
|
265
|
+ </el-col> -->
|
|
280
|
266
|
<el-col :span="12">
|
|
281
|
267
|
<el-form-item label="送货说明" prop="F_AddDes">
|
|
282
|
268
|
<el-select
|
|
|
@@ -293,39 +279,28 @@
|
|
293
|
279
|
/>
|
|
294
|
280
|
</el-select>
|
|
295
|
281
|
</el-form-item>
|
|
296
|
|
- <!-- <el-form-item label="送货说明" prop="F_AddDes" >
|
|
297
|
|
- <el-input v-model="ruleForm.F_AddDes" placeholder="请输入送货说明"/>
|
|
298
|
|
- </el-form-item> -->
|
|
299
|
282
|
</el-col>
|
|
|
283
|
+ </el-row>
|
|
|
284
|
+ <el-row>
|
|
300
|
285
|
<el-col :span="12">
|
|
301
|
|
- <el-form-item label="支付方式" prop="F_PayType">
|
|
302
|
|
- <el-select
|
|
303
|
|
- v-model="ruleForm.F_PayType"
|
|
304
|
|
- placeholder="请选择支付方式"
|
|
305
|
|
- class="form_select"
|
|
306
|
|
- clearable
|
|
307
|
|
- >
|
|
308
|
|
- <el-option
|
|
309
|
|
- v-for="item in payTypeList"
|
|
310
|
|
- :key="item.F_Value"
|
|
311
|
|
- :label="item.F_Value"
|
|
312
|
|
- :value="item.F_Value"
|
|
313
|
|
- />
|
|
314
|
|
- </el-select>
|
|
|
286
|
+ <el-form-item label="收件人" prop="F_Addressee">
|
|
|
287
|
+ <el-input
|
|
|
288
|
+ v-model="ruleForm.F_Addressee"
|
|
|
289
|
+ placeholder="请输入收件人"
|
|
|
290
|
+ />
|
|
|
291
|
+ </el-form-item>
|
|
|
292
|
+ </el-col>
|
|
|
293
|
+ <el-col :span="12">
|
|
|
294
|
+ <el-form-item label="收件人手机号" prop="F_AddPhone">
|
|
|
295
|
+ <el-input
|
|
|
296
|
+ v-model="ruleForm.F_AddPhone"
|
|
|
297
|
+ placeholder="请输入收件人手机号"
|
|
|
298
|
+ onkeyup="value=value.replace(/[^\d.]/g,'')"
|
|
|
299
|
+ />
|
|
315
|
300
|
</el-form-item>
|
|
316
|
301
|
</el-col>
|
|
317
|
302
|
</el-row>
|
|
318
|
303
|
<el-row>
|
|
319
|
|
- <!-- <el-col :span='12'>
|
|
320
|
|
- <el-form-item label="快递" prop="F_Express" >
|
|
321
|
|
- <el-select v-model="ruleForm.F_Express" placeholder="请选择快递" class="form_select" clearable>
|
|
322
|
|
- <el-option v-for="item in expressList" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"></el-option>
|
|
323
|
|
- </el-select>
|
|
324
|
|
- </el-form-item>
|
|
325
|
|
- </el-col> -->
|
|
326
|
|
- </el-row>
|
|
327
|
|
- <el-row/>
|
|
328
|
|
- <el-row>
|
|
329
|
304
|
<el-col :span="6">
|
|
330
|
305
|
<el-form-item label="使用积分" prop="F_UseScore">
|
|
331
|
306
|
<el-input
|
|
|
@@ -365,16 +340,6 @@
|
|
365
|
340
|
</el-col>
|
|
366
|
341
|
</el-row>
|
|
367
|
342
|
<el-row>
|
|
368
|
|
- <el-col :span="12">
|
|
369
|
|
- <el-form-item label="推荐人手机号" prop="F_RecommenderTel">
|
|
370
|
|
- <el-input
|
|
371
|
|
- v-model="ruleForm.F_RecommenderTel"
|
|
372
|
|
- placeholder="请输入推荐人手机号"
|
|
373
|
|
- />
|
|
374
|
|
- </el-form-item>
|
|
375
|
|
- </el-col>
|
|
376
|
|
- </el-row>
|
|
377
|
|
- <el-row>
|
|
378
|
343
|
<el-col :span="24">
|
|
379
|
344
|
<el-form-item label="选择地址">
|
|
380
|
345
|
<el-radio-group v-model="selectAddress" @change="changeAddress">
|
|
|
@@ -486,14 +451,21 @@
|
|
486
|
451
|
</el-row>
|
|
487
|
452
|
<el-row>
|
|
488
|
453
|
<el-col :span="12">
|
|
489
|
|
- <el-form-item label="是否提前付款" prop="F_IsPayment">
|
|
490
|
|
- <el-radio-group
|
|
491
|
|
- v-model="ruleForm.F_IsPayment"
|
|
492
|
|
- @change="changeIsPayment"
|
|
|
454
|
+ <el-form-item label="支付方式" prop="F_PayType">
|
|
|
455
|
+ <el-select
|
|
|
456
|
+ v-model="ruleForm.F_PayType"
|
|
|
457
|
+ placeholder="请选择支付方式"
|
|
|
458
|
+ class="form_select"
|
|
|
459
|
+ clearable
|
|
|
460
|
+ @change="changePayType"
|
|
493
|
461
|
>
|
|
494
|
|
- <el-radio :label="0">否</el-radio>
|
|
495
|
|
- <el-radio :label="1">是</el-radio>
|
|
496
|
|
- </el-radio-group>
|
|
|
462
|
+ <el-option
|
|
|
463
|
+ v-for="item in payTypeList"
|
|
|
464
|
+ :key="item.F_Value"
|
|
|
465
|
+ :label="item.F_Value"
|
|
|
466
|
+ :value="item.F_Value"
|
|
|
467
|
+ />
|
|
|
468
|
+ </el-select>
|
|
497
|
469
|
</el-form-item>
|
|
498
|
470
|
</el-col>
|
|
499
|
471
|
</el-row>
|
|
|
@@ -552,19 +524,6 @@
|
|
552
|
524
|
</el-form-item>
|
|
553
|
525
|
</el-col>
|
|
554
|
526
|
</el-row>
|
|
555
|
|
- <!-- <el-row>
|
|
556
|
|
- <el-col :span='12'>
|
|
557
|
|
- <el-form-item label="付款金额" prop="F_UseScore" >
|
|
558
|
|
- <el-date-picker
|
|
559
|
|
- v-model="ruleForm.F_PayTime"
|
|
560
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
561
|
|
- type="datetime"
|
|
562
|
|
- class="form_date"
|
|
563
|
|
- placeholder="请选择支付时间">
|
|
564
|
|
- </el-date-picker>
|
|
565
|
|
- </el-form-item>
|
|
566
|
|
- </el-col>
|
|
567
|
|
- </el-row> -->
|
|
568
|
527
|
<el-form-item label="会员备注" prop="F_MemberNotes">
|
|
569
|
528
|
<el-input
|
|
570
|
529
|
:autosize="{ minRows: 4 }"
|
|
|
@@ -584,7 +543,6 @@
|
|
584
|
543
|
<el-form-item>
|
|
585
|
544
|
<el-button type="primary" @click="submitForm(0)">保存</el-button>
|
|
586
|
545
|
<el-button type="primary" @click="submitForm(1)">提交</el-button>
|
|
587
|
|
- <el-button @click="resetForm">重置</el-button>
|
|
588
|
546
|
</el-form-item>
|
|
589
|
547
|
</el-form>
|
|
590
|
548
|
</div>
|
|
|
@@ -651,6 +609,7 @@ export default {
|
|
651
|
609
|
townDatas: [], // 乡镇/下拉数据
|
|
652
|
610
|
stockList: [], // 出库货仓下拉数据
|
|
653
|
611
|
ADFromList: [], // 消息来源list
|
|
|
612
|
+ customerPhoneList: [], // 电话号码
|
|
654
|
613
|
addDesList: [], // 送货说明
|
|
655
|
614
|
expressList: [], // 快递
|
|
656
|
615
|
payTypeList: [], // 支付方式
|
|
|
@@ -759,7 +718,7 @@ export default {
|
|
759
|
718
|
F_CustomerPhone: [
|
|
760
|
719
|
{
|
|
761
|
720
|
required: true,
|
|
762
|
|
- trigger: 'blur',
|
|
|
721
|
+ trigger: 'change',
|
|
763
|
722
|
validator: validateTelRule
|
|
764
|
723
|
}
|
|
765
|
724
|
],
|
|
|
@@ -819,19 +778,21 @@ export default {
|
|
819
|
778
|
submitForm(state) {
|
|
820
|
779
|
this.$refs.ruleForm.validate((valid) => {
|
|
821
|
780
|
if (valid) {
|
|
|
781
|
+ console.log('this.ruleForm.OrderMoney', this.ruleForm.OrderMoney)
|
|
822
|
782
|
this.ruleForm.F_State = state
|
|
823
|
783
|
this.ruleForm.OrderDetailList = this.commodityTableData
|
|
824
|
784
|
this.ruleForm.F_ExpressFee =
|
|
825
|
785
|
this.ruleForm.F_ExpressFee == '' ? 0 : this.ruleForm.F_ExpressFee
|
|
826
|
786
|
this.ruleForm.F_UseScore =
|
|
827
|
787
|
this.ruleForm.F_UseScore == '' ? 0 : this.ruleForm.F_UseScore
|
|
|
788
|
+ this.ruleForm.OrderMoney.F_PayTime = this.ruleForm.OrderMoney.F_PayTime == '' ? '1970-01-01 00:00:00' : this.ruleForm.OrderMoney.F_PayTime
|
|
|
789
|
+ this.ruleForm.OrderMoney.F_Money = this.ruleForm.OrderMoney.F_Money == '' ? 0 : this.ruleForm.OrderMoney.F_Money
|
|
828
|
790
|
this.loading = true
|
|
829
|
791
|
addOrder(this.ruleForm)
|
|
830
|
792
|
.then((response) => {
|
|
831
|
793
|
this.loading = false
|
|
832
|
794
|
if (response.state.toLowerCase() === 'success') {
|
|
833
|
795
|
this.$message.success('恭喜你,订单信息添加成功!')
|
|
834
|
|
- this.resetForm()
|
|
835
|
796
|
}
|
|
836
|
797
|
})
|
|
837
|
798
|
.catch(() => {
|
|
|
@@ -1076,6 +1037,7 @@ export default {
|
|
1076
|
1037
|
recommendChangeSelect(item) {
|
|
1077
|
1038
|
this.ruleForm.F_RecommendId = item.F_ID
|
|
1078
|
1039
|
this.ruleForm.F_RecommendName = item.F_Name
|
|
|
1040
|
+ this.ruleForm.F_RecommenderTel = item.F_Phone
|
|
1079
|
1041
|
},
|
|
1080
|
1042
|
// 获取商品
|
|
1081
|
1043
|
getCommodityListSelect() {
|
|
|
@@ -1224,10 +1186,10 @@ export default {
|
|
1224
|
1186
|
this.getTotalAmountFun()
|
|
1225
|
1187
|
},
|
|
1226
|
1188
|
// 是否提前付款change
|
|
1227
|
|
- changeIsPayment(val) {
|
|
1228
|
|
- if (val === 0) {
|
|
|
1189
|
+ changePayType(val) {
|
|
|
1190
|
+ if (val === '货到付款') {
|
|
1229
|
1191
|
this.judgmentIsPayment = false
|
|
1230
|
|
- } else if (val === 1) {
|
|
|
1192
|
+ } else {
|
|
1231
|
1193
|
this.judgmentIsPayment = true
|
|
1232
|
1194
|
}
|
|
1233
|
1195
|
},
|
|
|
@@ -1277,6 +1239,24 @@ export default {
|
|
1277
|
1239
|
this.alternateAddress2.area = data.F_Area2 // 区/县
|
|
1278
|
1240
|
this.alternateAddress2.town = data.F_Town2 // 乡/镇
|
|
1279
|
1241
|
this.alternateAddress2.address = data.F_Address2 // 详细地址
|
|
|
1242
|
+
|
|
|
1243
|
+ if (data.F_Phone) {
|
|
|
1244
|
+ let phoneData = {
|
|
|
1245
|
+ number: data.F_Phone
|
|
|
1246
|
+ }
|
|
|
1247
|
+ this.customerPhoneList.push(phoneData)
|
|
|
1248
|
+ if (data.F_Mobile) {
|
|
|
1249
|
+ let mobileArray = data.F_Mobile.split(',')
|
|
|
1250
|
+ mobileArray.forEach((e, i) => {
|
|
|
1251
|
+ let mobileData = {}
|
|
|
1252
|
+ mobileData = {
|
|
|
1253
|
+ number: e
|
|
|
1254
|
+ }
|
|
|
1255
|
+ this.customerPhoneList.push(mobileData)
|
|
|
1256
|
+ });
|
|
|
1257
|
+ }
|
|
|
1258
|
+ this.ruleForm.F_CustomerPhone = data.F_Phone
|
|
|
1259
|
+ }
|
|
1280
|
1260
|
// if (response.data.F_Province) {
|
|
1281
|
1261
|
// if (response.data.F_City) {
|
|
1282
|
1262
|
// this.placeholderArea = response.data.F_Province+'/'
|