Browse Source

客户资料页面微调

wangh 2 years ago
parent
commit
23c222756d
3 changed files with 211 additions and 2 deletions
  1. 196 0
      src/components/OP/GroupsTaskAssignment.vue
  2. 9 2
      src/components/OP/visaEdit.vue
  3. 6 0
      src/router/index.js

+ 196 - 0
src/components/OP/GroupsTaskAssignment.vue

@@ -0,0 +1,196 @@
+<template>
+    <div class="communal-list">
+        <div class="communal-title">
+            <div>团组任务分配</div>
+        </div>
+        <div>
+            <div style="display: flex;">
+                <div style="width: 30%;">
+                    <el-select v-model="diId" filterable clearable placeholder="请选择" style="width: 90%;"
+                        @change="diidChange()">
+                        <el-option v-for="item1 in delegationInfos" :key=item1.id :label=item1.name
+                            :value=item1.id></el-option>
+                    </el-select>
+                </div>
+                <div style="width: 30%;">
+                    <el-select v-model="ctId" filterable clearable placeholder="请选择" style="width: 90%;"
+                        @change="sdIdChange()">
+                        <el-option v-for=" item1 in setData" :key=item1.id :label=item1.name :value=item1.id></el-option>
+                    </el-select>
+                </div>
+                <div style="width: 30%;">
+                    <el-button type="primary" style="margin-left: 10px;" @click="btn">保存</el-button>
+                </div>
+            </div>
+        </div>
+        <div>
+            <span style="font-weight: bold;">团 号:</span>{{ DelegationInfo.tourCode }}
+            <span style="font-weight: bold;">客 户:</span>{{ DelegationInfo.clientName }}
+            <span style="font-weight: bold;">出访国家:</span>{{ DelegationInfo.visitCountry }}
+            <span style="font-weight: bold;">起止日期:</span>{{ DelegationInfo.visitStartDate }} ~ {{
+                DelegationInfo.visitEndDate }}
+            <span style="font-weight: bold;">天数/人数:</span>{{ DelegationInfo.visitDays }}天/{{ DelegationInfo.visitPNumber }}人
+        </div>
+        <div style="background-color:#215CA6;color: aliceblue;">
+            <div>人员安排</div>
+        </div>
+        <div style="margin-top: 10px;">
+            <div style="display: flex;flex-wrap: wrap;">
+                <div v-for="(  item, index  ) in   user  " :key="index"
+                    style="margin-left: 5px;width: 200px;margin-top: 10px;">
+                    <el-checkbox :label="item.id" :value="userStr.indexOf(item.id) != -1" border @change="check(item.id)">{{
+                        item.id
+                    }}</el-checkbox>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            rules: {},
+            token: '',
+            userId: 0,
+            delegationInfos: [],
+            setData: [],
+            user: [],
+            diId: '',
+            ctId: '',
+
+            userStr: [],
+            TaskAssignment: {},
+            DelegationInfo: {}
+        }
+    },
+    methods: {
+        GetTaskAssignmen() {
+            var that = this
+            var url = "/api/Groups/GetTaskAssignmen";
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.delegationInfos = res.data.data.delegationInfos;
+                    that.setData = res.data.data.setData;
+                    that.user = res.data.data.user;
+                }
+            })
+        },
+        TaskAssignmenQuery() {
+            var that = this
+            var diidI = 0;
+            if (that.diId != '') {
+                diidI = that.diId
+            }
+            var ctIdI = 0;
+            if (that.ctId != '') {
+                ctIdI = that.ctId
+            }
+            var url = "/api/Groups/TaskAssignmenQuery";
+            this.$axios({
+                method: 'post',
+                url: url,
+                data: {
+                    diId: diidI,
+                    ctId: ctIdI,
+                },
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.userStr = res.data.data.userStr
+                    that.TaskAssignment = res.data.data.taskAssignment
+                    that.DelegationInfo = res.data.data.delegationInfo
+                }
+            })
+        },
+        btn() {
+            var id = 0
+            if (this.TaskAssignment.id != undefined) {
+                id = this.TaskAssignment.id;
+            }
+            var url = "/api/Groups/GetTaskAssignmenOp";
+            this.$axios({
+                method: 'post',
+                url: url,
+                data: {
+                    diId: id,
+                    ctId: this.ctId,
+                    uIdStr: this.userStr,
+                    isEnable: 1,
+                    createUserId: this.userId,
+                    remark: ""
+                },
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: '保存成功!',
+                        type: 'success'
+                    });
+                }
+            })
+        },
+        diidChange() {
+            this.TaskAssignmenQuery()
+            console.log(this.userStr)
+        },
+        sdIdChange() {
+            this.TaskAssignmenQuery()
+            console.log(this.userStr)
+        },
+        check(id) {
+            var index = this.userStr.indexOf(id)
+            if (index == -1) {
+                this.userStrAdd.push(id)
+            } else {
+
+                this.userStr = this.userStr.filter((x) => x !== id)
+            }
+        }
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.GetTaskAssignmen();
+        this.TaskAssignmenQuery();
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 10px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+</style>

+ 9 - 2
src/components/OP/visaEdit.vue

@@ -57,9 +57,16 @@
                         <el-form-item label="省份:" prop="birthProvince">
                             <el-input v-model="deleClient.birthProvince"></el-input>
                         </el-form-item>
-
                         <el-form-item label="最高学历:" prop="highestEducation">
-                            <el-input v-model="deleClient.highestEducation"></el-input>
+                            <el-select v-model="deleClient.highestEducation" filterable placeholder="请选择">
+                                <el-option key="高中" label="高中" value="高中"></el-option>
+                                <el-option key="大专" label="大专" value="大专"></el-option>
+                                <el-option key="本科" label="本科" value="本科"></el-option>
+                                <el-option key="研究生" label="研究生" value="研究生"></el-option>
+                                <el-option key="博士" label="博士" value="博士"></el-option>
+                                <el-option key="硕士" label="硕士" value="硕士"></el-option>
+                            </el-select>
+
                         </el-form-item>
                         <el-form-item label="家庭电话:" prop="tel">
                             <el-input v-model="deleClient.tel" placeholder="(座机)"></el-input>

+ 6 - 0
src/router/index.js

@@ -43,6 +43,7 @@ import CustomerCompany from '@/components/Crm/CustomerCompany';
 import DeleClient from '@/components/Crm/DeleClient';
 import Cost from '@/components/Finance/Cost';
 import OCRIdentify from '@/components/OP/OCRIdentify';
+import GroupsTaskAssignment from '@/components/OP/GroupsTaskAssignment';
 Vue.use(Router)
 
 export default new Router({
@@ -245,6 +246,11 @@ export default new Router({
           name: 'Cost',
           component: OCRIdentify
         },
+        {
+          path: '/home/GroupsTaskAssignment',
+          name: 'GroupsTaskAssignment',
+          component: GroupsTaskAssignment
+        },
       ]
     },
     {