@@ -71,9 +117,13 @@
form: {
name: '',
introduce: '',
- dateRange: ['08:30','17:30'],
+ dateRange: ['09:00','17:30'],
+ is_book:0,
+ floor:'',
+ total:'',
+ sort:0,
image_id: [],
- start_time:'08:30',
+ start_time:'09:00',
end_time:'17:30'
},
action: `${process.env.VUE_APP_UPLOAD_API}`,
@@ -138,7 +188,9 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.fileList = res.image
- this.form.dateRange = res.start_time?[res.start_time,res.end_time]:['','']
+ this.form.dateRange = res.start_time?[res.start_time,res.end_time]:['',''],
+ this.form.sort = res.sort?res.sort:0
+ this.form.is_book = res.is_book?res.is_book:0
})
},
diff --git a/src/views/book/components/checkBook.vue b/src/views/book/components/checkBook.vue
index 45e0689..3a98548 100644
--- a/src/views/book/components/checkBook.vue
+++ b/src/views/book/components/checkBook.vue
@@ -1,6 +1,6 @@
-
@@ -72,6 +72,33 @@
审核不通过
取消预约
+
+ 第三方记录
+
+
+
+
+
+
+ 成功
+
+
+ 失败
+
+
+
+
+
+
+
+
+ 重新预约
+
+
+
+
@@ -91,7 +118,8 @@
import myMixins from "@/mixin/selectMixin.js";
import {
show,
- save
+ save,
+ retry
} from "@/api/book/index.js"
export default {
mixins: [myMixins],
@@ -103,10 +131,21 @@
isShow: false,
type: 'show',
id: '',
- submitObj: {},
+ submitObj: {},
+ thirdArr:[],
form: {
name: '',
- },
+ },
+ table_item:[{
+ prop:'remark',
+ label:'预约内容'
+ },{
+ prop:'finally',
+ label:'预约结果'
+ },{
+ prop:'created_at',
+ label:'发送时间'
+ }]
}
},
created() {},
@@ -121,6 +160,17 @@
this.isShow = false
this.$emit('refresh')
})
+ },
+ sendBook(id){
+ retry({
+ id:id
+ }).then(res=>{
+ this.$message({
+ type: 'success',
+ message: '重新发送预约成功'
+ })
+ this.getDetail()
+ })
},
formatHH(val){
if(val){
@@ -132,10 +182,10 @@
async getDetail() {
await show({
id: this.id,
- show_relation: ['user', 'appointmentAccompany', 'appointmentConfig']
+ show_relation: ['user', 'appointmentAccompany', 'appointmentConfig','third_appointment_logs']
}).then(res => {
this.submitObj = this.base.deepCopy(res, this.submitObj)
-
+ this.thirdArr = res.third_appointment_logs?res.third_appointment_logs:[]
})
}
},
diff --git a/src/views/book/index.vue b/src/views/book/index.vue
index ea75d96..0405b3a 100644
--- a/src/views/book/index.vue
+++ b/src/views/book/index.vue
@@ -145,7 +145,7 @@
align: 'center',
width: 120,
}, {
- prop: 'user.username',
+ prop: 'name',
label: '预约人',
align: 'center',
width: 120,
diff --git a/src/views/book/type.vue b/src/views/book/type.vue
index b710088..5d4868d 100644
--- a/src/views/book/type.vue
+++ b/src/views/book/type.vue
@@ -108,7 +108,9 @@
async getList() {
const res = await index({
page: this.select.page,
- page_size: this.select.page_size,
+ page_size: this.select.page_size,
+ sort_name:'sort',
+ sort_type:'ASC'
})
this.list = res.data
this.total = res.total
diff --git a/src/views/component/imports.vue b/src/views/component/imports.vue
index 6a71887..258099a 100644
--- a/src/views/component/imports.vue
+++ b/src/views/component/imports.vue
@@ -75,18 +75,25 @@
this.dialogVisible = false;
},
// 获取表头
- async getHeaders() {
-
- //
+ async getHeaders() {
+ let _except = []
+ // 学员去除一些信息
+ if (this.tableName === 'users') {
+ _except = ['plate', 'is_import', 'is_vip', 'is_schoolmate', 'appointment_total', 'letter', 'score', 'code',
+ 'pid'
+ ]
+ }
const res = await realTableShow({
- table_name: this.tableName
+ table_name: this.tableName,
+ except: _except
})
let b = [];
for (let key in res) {
if (!this.base.isNull(res[key])) {
b.push({
key: key,
- title: res[key]
+ title: res[key],
+ width:120
});
}
}
@@ -94,7 +101,8 @@
if (this.tableName === 'course_contents') {
b.push({
key: '',
- title: '老师简介'
+ title: '老师简介',
+ width:120
});
b.map(item => {
if (item.key === 'teacher_id') {
@@ -112,13 +120,14 @@
item.key = 'status_name'
}
})
- }
- // 学员 + 课程
- if (this.tableName === 'users') {
- b.unshift({
- key: 'course_name',
- title: '课程名字'
- });
+ }
+ // 学员 + 课程
+ if (this.tableName === 'users') {
+ b.unshift({
+ key: 'course_name',
+ title: '课程名字',
+ width:120
+ });
}
this.table = this.headers = b
@@ -132,30 +141,30 @@
});
},
uploadSuccess(response, file, fileList) {
- console.log(response, file, fileList)
- console.log("window.screen.height",window.screen.height)
+ console.log(response, file, fileList)
+ console.log("window.screen.height", window.screen.height)
if (response && response.hasOwnProperty("errcode")) {
this.$message({
message: response.errmsg || "上传失败",
- type: "error",
- duration:2000,
+ type: "error",
+ duration: 2000,
offset: window.screen.height / 4
});
this.fileList = []
this.tableList = []
return
- }
+ }
// 考勤导入
if (this.tableName === 'course_keeps') {
response.map(item => {
item.status_name = item.status === 1 ? '正常' : '缺勤'
})
- }
- // 学员导入
- if (this.tableName === 'users') {
- response.map(item => {
- item.is_schoolmate = 1
- })
+ }
+ // 学员导入
+ if (this.tableName === 'users') {
+ response.map(item => {
+ item.is_schoolmate = 1
+ })
}
this.tableList = response;
this.fileList = fileList
@@ -167,7 +176,7 @@
},
exportExcel(sheetName) {
- const data = [this.headers.map((header) =>header.title)];
+ const data = [this.headers.map((header) => header.title)];
const wb = XLSX.utils.book_new();
const ws = XLSX.utils.aoa_to_sheet(data);
XLSX.utils.book_append_sheet(wb, ws, sheetName);
@@ -184,7 +193,12 @@
);
},
- imports() {
+ imports() {
+ if(this.tableName=='users'){
+ this.tableList.map(item=>{
+ item.username = item.name
+ })
+ }
request({
method: "post",
url: this.import_action,
@@ -207,7 +221,7 @@
},
computed: {},
watch: {
- formInfo(newVal) {
+ formInfo(newVal) {
console.log("formInfo", newVal)
if (newVal && newVal instanceof Array) {
this.table = this.headers = newVal.map((i) => {
@@ -219,32 +233,32 @@
}
},
dialogVisible(newval) {
- console.log("newval", newval, this.tableName,this.formInfo)
+ console.log("newval", newval, this.tableName, this.formInfo)
if (newval) {
- let changeTableName = this.tableName.replace('_', '-')
- this.action = `${process.env.VUE_APP_BASE_API}/api/admin/${changeTableName}/excel-show`
- this.import_action = `/api/admin/${changeTableName}/import`
- // 学员导入
- if(this.tableName==='users'){
- this.import_action = `/api/admin/${changeTableName}/import-study`
- }
-
- // if(this.tableName==='users'){
- // this.import_action = `/api/admin/${changeTableName}/import-study`
- // this.table = this.headers = this.formInfo.map((i) => {
-
- // if(i.prop){
- // console.log("i.prop",i.prop)
- // return {
- // key: i.prop,
- // title: i.label,
- // };
- // }
-
- // });
- // console.log("this.table",this.headers)
- // }else{
- this.getHeaders()
+ let changeTableName = this.tableName.replace('_', '-')
+ this.action = `${process.env.VUE_APP_BASE_API}/api/admin/${changeTableName}/excel-show`
+ this.import_action = `/api/admin/${changeTableName}/import`
+ // 学员导入
+ if (this.tableName === 'users') {
+ this.import_action = `/api/admin/${changeTableName}/import-study`
+ }
+
+ // if(this.tableName==='users'){
+ // this.import_action = `/api/admin/${changeTableName}/import-study`
+ // this.table = this.headers = this.formInfo.map((i) => {
+
+ // if(i.prop){
+ // console.log("i.prop",i.prop)
+ // return {
+ // key: i.prop,
+ // title: i.label,
+ // };
+ // }
+
+ // });
+ // console.log("this.table",this.headers)
+ // }else{
+ this.getHeaders()
// }
console.log("action", this.action, this.import_action)
diff --git a/src/views/student/index.vue b/src/views/student/index.vue
index b934de6..4a7ff20 100644
--- a/src/views/student/index.vue
+++ b/src/views/student/index.vue
@@ -103,7 +103,15 @@