|
@@ -8,7 +8,7 @@
|
|
|
</div>
|
|
|
<van-divider />
|
|
|
<van-form validate-trigger="onSubmit" class="formS" :submit-on-enter="false" ref="formS" :show-error="false">
|
|
|
- <van-field v-model="searchForm.phone" size="tel" name="手机" type="tel" placeholder="联系电话"/>
|
|
|
+ <van-field v-model="searchForm.phone" size="tel" name="手机" type="tel" placeholder="客户姓名/联系电话"/>
|
|
|
<van-button plain block type="info" native-type="submit" @click="getData()">查询</van-button>
|
|
|
</van-form>
|
|
|
<div class="tableBox">
|
|
@@ -19,7 +19,11 @@
|
|
|
<el-table-column prop="post" label="职位"> </el-table-column>
|
|
|
<el-table-column prop="sf" label="省份"> </el-table-column>
|
|
|
<el-table-column prop="dateOfVisit" label="到访日期"> </el-table-column>
|
|
|
- <el-table-column prop="accompany" label="随行人数"> </el-table-column>
|
|
|
+ <el-table-column prop="accompany" label="随行人数">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.accompany === 1 ? '1-3人' : scope.row.accompany === 2 ? '3-7人' : '7人以上' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -81,7 +85,8 @@ export default {
|
|
|
searchForm: {
|
|
|
phone: "",
|
|
|
},
|
|
|
- tableData:[]
|
|
|
+ tableData:[],
|
|
|
+ tableDataList:[],
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -91,16 +96,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async getData() {
|
|
|
- let res = await this.$axios.post(
|
|
|
- "/AF/listAppointment" +
|
|
|
- "?" +
|
|
|
- this.$qs.stringify({
|
|
|
- ...this.searchForm,
|
|
|
- })
|
|
|
- );
|
|
|
- if (res.data.success) {
|
|
|
- this.tableData = res.data.data
|
|
|
- }
|
|
|
+ this.tableData = this.tableDataList.filter(val=>val.phone.indexOf(this.searchForm.phone)!==-1 || val.name.indexOf(this.searchForm.phone)!==-1)
|
|
|
},
|
|
|
async onSubmit() {
|
|
|
let res = await this.$axios.post(
|
|
@@ -111,7 +107,8 @@ export default {
|
|
|
})
|
|
|
);
|
|
|
if (res.data.success) {
|
|
|
- this.getData();
|
|
|
+ this.tableDataList = res.data.data
|
|
|
+ this.tableData = res.data.data
|
|
|
this.isLogin = true;
|
|
|
for (const key in this.form) {
|
|
|
this.form[key] = "";
|