|
@@ -7,9 +7,14 @@
|
|
|
:close-on-click-modal="false"
|
|
|
@close="() => innerVisible = false"
|
|
|
>
|
|
|
- <div v-if="tableData && tableData.length > 0" class="tr" style="padding: 10px 0 0 0">
|
|
|
+ <div v-if="tableData && tableData.length > 0" class="tr" style="padding: 10px 0 0 0;display:flex">
|
|
|
<!-- <el-button :size="'mini'" @click="() => tableData = []">取消</el-button>
|
|
|
<el-button type="primary" :size="'mini'" @click="onSubmit">提交</el-button> -->
|
|
|
+
|
|
|
+ <project-manager size="mini" :is-detail="true" :names="manager" :value="managerid" @searchChange="manageridChange" />
|
|
|
+
|
|
|
+ <el-button type="warning" size="mini" style="margin-left:10px" @click="batchSetting">批量设置</el-button>
|
|
|
+ <el-button type="primary" size="mini">保存设置</el-button>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<upload-excel :on-success="onSuccess" :before-upload="beforeUpload" />
|
|
@@ -20,6 +25,7 @@
|
|
|
:table="table"
|
|
|
:data="tableData"
|
|
|
style="margin: 15px 0 0 0"
|
|
|
+ @selection="handleSelection"
|
|
|
/>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
@@ -49,6 +55,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
columns,
|
|
|
+ manager: "",
|
|
|
+ managerid: "",
|
|
|
+ selected: [],
|
|
|
loading: false,
|
|
|
tableData: [],
|
|
|
table: {
|
|
@@ -69,6 +78,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ batchSetting(){
|
|
|
+ if(!this.manager || !this.managerid){
|
|
|
+ this.$message.warning("请选择业务经理!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.selected.length === 0){
|
|
|
+ this.$message.warning("请选择至少一条记录!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ handleSelection(data){
|
|
|
+ this.selected = data.list
|
|
|
+ },
|
|
|
+ manageridChange(data){
|
|
|
+ console.log(data)
|
|
|
+ },
|
|
|
validateTableHeader(header, importHeader) {
|
|
|
let isHeaderOk = true
|
|
|
|
|
@@ -175,6 +202,9 @@ export default {
|
|
|
})
|
|
|
this.validateFields(this.tableData).message()
|
|
|
},
|
|
|
+ async manageridChange(data){
|
|
|
+ console.log(data);
|
|
|
+ },
|
|
|
async onSubmit() {
|
|
|
const { message, isFinalValid } = this.validateFields(this.tableData)
|
|
|
if (!isFinalValid) return message()
|