Преглед изворни кода

成本添加客户名单悬浮显示

yuanrf пре 9 месеци
родитељ
комит
d118bcf8ca
1 измењених фајлова са 83 додато и 3 уклоњено
  1. 83 3
      src/components/Finance/Cost.vue

+ 83 - 3
src/components/Finance/Cost.vue

@@ -355,6 +355,50 @@
                         <label>天数/人数:</label>
                         <span>{{ grouptitleinfo.visitDays }}天/{{ grouptitleinfo.visitPNumber }}人</span>
                     </div>
+                    <div class="cost-info-li">
+                        <!-- 客户名单 -->
+                        <el-popover placement="bottom" width="1062" trigger="hover">
+                            <el-table max-height="600" border :data="rollcallarr">
+                                <el-table-column width="100" property="date" label="姓名">
+                                    <template slot-scope="scope">
+                                        {{ scope.row.lastName }}{{ scope.row.firstName }}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column width="200" property="lastName" label="拼音">
+                                    <template slot-scope="scope">
+                                        {{ pinyingxing(scope.row.lastName) }}/{{ pinyingxing(scope.row.firstName) }}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column width="50" property="sex" label="性别">
+                                    <template slot-scope="scope">
+                                        {{ scope.row.sex == 0 ? '男' : '女' }}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column width="200" property="companyFullName" label="单位">
+                                    <template slot-scope="scope">
+                                        {{ scope.row.companyFullName }}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column width="200" property="job" label="职位">
+                                    <template slot-scope="scope">
+                                        {{ scope.row.job }}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column width="200" property="idCardNo" label="身份证号码">
+                                    <template slot-scope="scope">
+                                        {{ scope.row.idCardNo }}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column width="110" property="birthDay" label="生日">
+                                    <template slot-scope="scope">
+                                        {{ fgarr(scope.row.birthDay) }}
+                                    </template>
+                                </el-table-column>
+                            </el-table>
+                            <span slot="reference"
+                                style="cursor: pointer;margin-left: 20px;color:red;font-size:14px">"移上查看客户名单"</span>
+                        </el-popover>
+                    </div>
                 </div>
             </div>
             <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
@@ -882,8 +926,7 @@
     </div>
 </template>
 <script>
-import { elementMatches } from '@fullcalendar/core/internal';
-
+import { pinyin } from 'pinyin-pro';
 export default {
     data() {
         return {
@@ -2824,6 +2867,7 @@ export default {
             historyCarSelectObject: {},
             historyCarIndex: -1,
             hotelIsTrue: false,
+            rollcallarr: []
         };
     },
     watch: {
@@ -3227,6 +3271,9 @@ export default {
                     'Authorization': that.token,
                 }
             }).then(resp => {
+                setTimeout(() => {
+                    that.PostTourClientListByDiId(id);
+                }, 100)
                 //////console.log(resp.data.data, '------------------------------------');
                 if (resp.data.code == 200) {
 
@@ -5881,7 +5928,40 @@ export default {
                 this.tableData[this.historyCarIndex].carCost = this.historyCarSelectObject.dayPrice;
             }
             this.historyCarDialog = false;
-        }
+        },
+        //获取客户名单info
+        PostTourClientListByDiId(id) {
+            var that = this
+            var url = "/api/Groups/PostTourClientListByDiId"
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data: {
+                    portType: 1,
+                    diid: id,
+                    pageId: 104,
+                    userId: that.userId
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.rollcallarr = res.data.data;
+                } else {
+                    that.$message.error(res.data.smg);
+                }
+            })
+        },
+        //fenge
+        fgarr(val) {
+            val = val + ""
+            return val.split(' ')[0]
+        },
+        //拼音
+        pinyingxing(val) {
+            return pinyin(val, { toneType: 'none' }).toUpperCase();
+        },
     },
     updated() {
         this.$emit('transfer', true)