|
@@ -1,15 +1,10 @@
|
|
|
<template>
|
|
|
<div class="orderImport pagePadding" v-loading="loading">
|
|
|
- <div style="margin-bottom:20px;display:flex;align-items:center">
|
|
|
+ <!-- <div style="margin-bottom:20px;display:flex;align-items:center">
|
|
|
<span style="color:red">*</span>
|
|
|
<p style="width:90px">项目经理:</p>
|
|
|
- <project-manager
|
|
|
- size="mini"
|
|
|
- :isDetail="true"
|
|
|
- :value="ruleForm.manager"
|
|
|
- @searchChange="managerChange"
|
|
|
- />
|
|
|
- </div>
|
|
|
+
|
|
|
+ </div> -->
|
|
|
|
|
|
<div class="tr" style="padding: 10px 0 0 0" v-if="tableData && tableData.length > 0">
|
|
|
<el-form
|
|
@@ -36,7 +31,18 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="16" class="tr">
|
|
|
+ <!-- <el-col :span="8">
|
|
|
+ <el-form-item label="项目经理" prop="managerid">
|
|
|
+ <project-manager
|
|
|
+ size="mini"
|
|
|
+ :isDetail="true"
|
|
|
+ :value="ruleForm.managerid"
|
|
|
+ @searchChange="managerChange"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <el-col :span="8" class="tr">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="submit"
|
|
@@ -68,6 +74,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
ruleForm: {
|
|
|
+ managerid:[],
|
|
|
manager: "",
|
|
|
platform_id: ""
|
|
|
},
|
|
@@ -92,7 +99,15 @@ export default {
|
|
|
required: true,
|
|
|
message: "请选择导入目标平台",
|
|
|
trigger: "change"
|
|
|
- }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ managerid:[
|
|
|
+ {
|
|
|
+ type: 'array',
|
|
|
+ required: true,
|
|
|
+ message: "请选择导入项目经理",
|
|
|
+ trigger: "change"
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
loading: false,
|
|
@@ -112,7 +127,9 @@ export default {
|
|
|
methods: {
|
|
|
managerChange(e) {
|
|
|
const { id, label } = e;
|
|
|
- this.ruleForm.manager = id ? [id] : [];
|
|
|
+ this.ruleForm.managerid = id ? [id] : [];
|
|
|
+ this.ruleForm.manager = label
|
|
|
+ this.$refs.ruleForm.validateField("managerid")
|
|
|
},
|
|
|
async resetForm() {
|
|
|
this.loading = false;
|
|
@@ -221,6 +238,11 @@ export default {
|
|
|
|
|
|
//提交
|
|
|
async submit() {
|
|
|
+ if(!this.ruleForm.managerid){
|
|
|
+ this.$message.warning('请选择项目经理');
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
await this.$refs.ruleForm.validate(async valid => {
|
|
|
if (valid) {
|
|
|
if (!this.loading) {
|
|
@@ -238,9 +260,13 @@ export default {
|
|
|
let model = {
|
|
|
list: list
|
|
|
};
|
|
|
- const { code, data, message } = await asyncRequest.orderimport(
|
|
|
- model
|
|
|
- );
|
|
|
+
|
|
|
+ const { code, data, message } = await asyncRequest.orderimport({
|
|
|
+ ...model,
|
|
|
+ // manager:this.ruleForm.manager || "",
|
|
|
+ // managerid:Array.isArray(this.ruleForm.managerid) ? this.ruleForm.managerid[0] : this.ruleForm.managerid
|
|
|
+ });
|
|
|
+
|
|
|
this.loading = false;
|
|
|
if (code === 0) {
|
|
|
this.$notify.success({
|