|
@@ -316,6 +316,24 @@ |
|
@@ -316,6 +316,24 @@ |
316
|
<el-form-item label="目的地" prop="dest">
|
316
|
<el-form-item label="目的地" prop="dest">
|
317
|
<el-input v-model="PDForm.dest"></el-input>
|
317
|
<el-input v-model="PDForm.dest"></el-input>
|
318
|
</el-form-item>
|
318
|
</el-form-item>
|
|
|
319
|
+ <el-form-item label="客户名称" prop="opter">
|
|
|
320
|
+ <el-select v-model="PDForm.opter"
|
|
|
321
|
+ @click.native="getUsers2"
|
|
|
322
|
+ default-first-option
|
|
|
323
|
+ :loading="loading" clearable placeholder="请选择"
|
|
|
324
|
+ style="width: 100%">
|
|
|
325
|
+ <el-option
|
|
|
326
|
+ v-for="item in usernames2"
|
|
|
327
|
+ :key="item.roleName"
|
|
|
328
|
+ :label="item.roleName"
|
|
|
329
|
+ :value="item.departmentid"
|
|
|
330
|
+ :disabled="item.disabled">
|
|
|
331
|
+ </el-option>
|
|
|
332
|
+ </el-select>
|
|
|
333
|
+ </el-form-item>
|
|
|
334
|
+ <el-form-item label="任务描述" prop="description">
|
|
|
335
|
+ <el-input type="textarea" v-model="PDForm.description"></el-input>
|
|
|
336
|
+ </el-form-item>
|
319
|
<el-form-item>
|
337
|
<el-form-item>
|
320
|
<el-button type="primary" @click="submitPDForm('PDForm')">派单</el-button>
|
338
|
<el-button type="primary" @click="submitPDForm('PDForm')">派单</el-button>
|
321
|
<el-button @click="resetForm('PDForm')">取消</el-button>
|
339
|
<el-button @click="resetForm('PDForm')">取消</el-button>
|
|
@@ -393,6 +411,7 @@ |
|
@@ -393,6 +411,7 @@ |
393
|
import {list} from "../../api/road_verecord/verecord";
|
411
|
import {list} from "../../api/road_verecord/verecord";
|
394
|
import XLSX from 'xlsx';
|
412
|
import XLSX from 'xlsx';
|
395
|
import { saveAs } from 'file-saver';
|
413
|
import { saveAs } from 'file-saver';
|
|
|
414
|
+ import { getList as getCRMList } from '@/api/crm_api';
|
396
|
|
415
|
|
397
|
export default {
|
416
|
export default {
|
398
|
data() {
|
417
|
data() {
|
|
@@ -402,7 +421,9 @@ |
|
@@ -402,7 +421,9 @@ |
402
|
licenseno: '',
|
421
|
licenseno: '',
|
403
|
orig: '',
|
422
|
orig: '',
|
404
|
dest: '',
|
423
|
dest: '',
|
405
|
- dispatch: ''
|
424
|
+ dispatch: '',
|
|
|
425
|
+ description:'',
|
|
|
426
|
+ opter:''
|
406
|
},
|
427
|
},
|
407
|
rules: {
|
428
|
rules: {
|
408
|
licenseno: [
|
429
|
licenseno: [
|
|
@@ -417,6 +438,10 @@ |
|
@@ -417,6 +438,10 @@ |
417
|
{required: true, message: '请输入始发地', trigger: 'blur'},
|
438
|
{required: true, message: '请输入始发地', trigger: 'blur'},
|
418
|
{min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur'}
|
439
|
{min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur'}
|
419
|
],
|
440
|
],
|
|
|
441
|
+ opter: [
|
|
|
442
|
+ {required: true, message: '请选择派单客户', trigger: 'blur'},
|
|
|
443
|
+ {min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur'}
|
|
|
444
|
+ ],
|
420
|
dest: [
|
445
|
dest: [
|
421
|
{required: true, message: '请输入目的地', trigger: 'blur'},
|
446
|
{required: true, message: '请输入目的地', trigger: 'blur'},
|
422
|
{min: 2, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur'}
|
447
|
{min: 2, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur'}
|
|
@@ -529,6 +554,7 @@ |
|
@@ -529,6 +554,7 @@ |
529
|
trailerLicenseNo: '',
|
554
|
trailerLicenseNo: '',
|
530
|
trailerFrameNo: ''
|
555
|
trailerFrameNo: ''
|
531
|
},
|
556
|
},
|
|
|
557
|
+ usernames2: [],
|
532
|
}
|
558
|
}
|
533
|
},
|
559
|
},
|
534
|
|
560
|
|
|
@@ -633,7 +659,11 @@ |
|
@@ -633,7 +659,11 @@ |
633
|
item.dest = this.PDForm.dest;
|
659
|
item.dest = this.PDForm.dest;
|
634
|
item.dispatch = this.PDForm.dispatch;
|
660
|
item.dispatch = this.PDForm.dispatch;
|
635
|
});
|
661
|
});
|
636
|
- paidan(this.multipleSelection).then((response) => {
|
662
|
+ const params = {
|
|
|
663
|
+ records: this.multipleSelection,
|
|
|
664
|
+ pdform: this.PDForm
|
|
|
665
|
+ };
|
|
|
666
|
+ paidan(params).then((response) => {
|
637
|
const res = response.data
|
667
|
const res = response.data
|
638
|
if (res.code !== '200') {
|
668
|
if (res.code !== '200') {
|
639
|
return this.$message.error('车辆派单,失败!')
|
669
|
return this.$message.error('车辆派单,失败!')
|
|
@@ -749,6 +779,7 @@ |
|
@@ -749,6 +779,7 @@ |
749
|
} else {
|
779
|
} else {
|
750
|
this.$message.error('请选勾取要派车的运单信息!');
|
780
|
this.$message.error('请选勾取要派车的运单信息!');
|
751
|
}
|
781
|
}
|
|
|
782
|
+ this.getUsers2();
|
752
|
},
|
783
|
},
|
753
|
//新增
|
784
|
//新增
|
754
|
addVehicle() {
|
785
|
addVehicle() {
|
|
@@ -798,6 +829,20 @@ |
|
@@ -798,6 +829,20 @@ |
798
|
this.listLoading = false;
|
829
|
this.listLoading = false;
|
799
|
});
|
830
|
});
|
800
|
},
|
831
|
},
|
|
|
832
|
+ //获取用户名列表
|
|
|
833
|
+ getUsers2() {
|
|
|
834
|
+ let data = {orgtype: "",roleName:"",departmentid:""};
|
|
|
835
|
+ let para={pageSize: 1000, pageNum: 1}
|
|
|
836
|
+ this.listLoading = true;
|
|
|
837
|
+ getUserList(data,para).then((res) => {
|
|
|
838
|
+ this.usernames2 = res.data.data.list;
|
|
|
839
|
+ console.log(this.usernames2)
|
|
|
840
|
+ }).catch((error) => {
|
|
|
841
|
+ this.$message.error(error.toString());
|
|
|
842
|
+ }).finally(() => {
|
|
|
843
|
+ this.listLoading = false;
|
|
|
844
|
+ });
|
|
|
845
|
+ },
|
801
|
},
|
846
|
},
|
802
|
mounted() {
|
847
|
mounted() {
|
803
|
this.getLists();
|
848
|
this.getLists();
|