diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue
index 48e3cc1..d8ebf56 100644
--- a/src/components/XyDialog/index.vue
+++ b/src/components/XyDialog/index.vue
@@ -62,6 +62,7 @@ export default {
this.$emit('update:isShow',e)
},
reset(){
+ this.$emit('reset')
if(this.type === 'normal'){
return
}
diff --git a/src/views/schedule/component/addSchedule.vue b/src/views/schedule/component/addSchedule.vue
index a4ffa1d..5092225 100644
--- a/src/views/schedule/component/addSchedule.vue
+++ b/src/views/schedule/component/addSchedule.vue
@@ -1,12 +1,15 @@
+ @submit="submit"
+ @reset="pickType = 1,dateStartPick = '',dateEndPick = ''">
-
+
+
+
+
+
+ width="280">
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+ placeholder="结束时间">
+
+
+
+
+
+
+
+
+
+
@@ -185,6 +208,10 @@ export default {
levels: {
type: Array,
default: () => []
+ },
+ orders:{
+ type: Array,
+ default: () => []
}
},
data() {
@@ -204,6 +231,14 @@ export default {
start_time: '',
end_time: '',
nurse_id: '',
+ },
+ rules:{
+ product_id:[
+ {required:true,message:'请选择产品'}
+ ],
+ order_id:[
+ {required:true,message:'请选择订单'}
+ ]
}
}
},
@@ -217,13 +252,14 @@ export default {
this.detail = res.detail
},
- dateConfirm(){
- this.pickType = 2
- this.$refs['popover'].doClose()
- console.log(this.$refs['popover'].showPopper)
+ dateConfirm(data){
+ if(this.pickType === 1){
+ this.pickType = 2
+ return
+ }
+ this.$refs[`popover-${data.day}`].doClose()
},
datePicked(data,date){
- console.log(data,date)
if(this.pickType === 1){
this.dateStartPick = data.day
}
@@ -233,7 +269,7 @@ export default {
},
submit() {
this.form.start_time = `${this.dateStartPick} ${this.form.start_time}`
- this.form.end_time = `${this.dateEndPick} ${this.form.end_time}`
+ this.form.end_time = `${this.dateEndPick || this.dateStartPick} ${this.form.end_time}`
scheduleSave(this.form).then(res => {
this.$successMessage('排班','')
@@ -257,9 +293,12 @@ export default {
watch: {
isShow(val) {
if (val) {
- this.getCustomer()
+ //this.getCustomer()
} else {
-
+ this.pickType = 1
+ this.dateEndPick = ''
+ this.dateStartPick = ''
+ this.$refs['dialog'].reset()
}
}
}
diff --git a/src/views/schedule/schedule.vue b/src/views/schedule/schedule.vue
index a650dc3..bb0f0d1 100644
--- a/src/views/schedule/schedule.vue
+++ b/src/views/schedule/schedule.vue
@@ -23,7 +23,11 @@
:table-item="table"
:total="total">
-
+
+
+
+
+
@@ -32,7 +36,8 @@
:products="products"
:customers="customers"
:nurses="nurses"
- :levels="levels">
+ :levels="levels"
+ :orders="orders">
@@ -59,75 +64,76 @@ export default {
products:[],
nurses:[],
levels:[],
+ orders:[],
total: 0,
list: [],
table: [
- {
- type: 'expand',
- expandFn: (props) => {
- let {$refs} = this
- return (
- {
- $refs['addSchedule'].form.product_id = scope.row.product_id
- $refs['addSchedule'].form.customer_id = scope.row.customer_id
- $refs['addSchedule'].form.order_id = scope.row.id
- $refs['addSchedule'].isShow = true
- }
- }}>排班
- )
- }
- }}>
-
- )
- }
- }}>
-
-
- )
- }
- },
+ // {
+ // type: 'expand',
+ // expandFn: (props) => {
+ // let {$refs} = this
+ // return (
+ // {
+ // $refs['addSchedule'].form.product_id = scope.row.product_id
+ // $refs['addSchedule'].form.customer_id = scope.row.customer_id
+ // $refs['addSchedule'].form.order_id = scope.row.id
+ // $refs['addSchedule'].isShow = true
+ // }
+ // }}>排班
+ // )
+ // }
+ // }}>
+ //
+ // )
+ // }
+ // }}>
+ //
+ //
+ // )
+ // }
+ // },
{
prop: 'name',
label: '客户',
@@ -186,6 +192,13 @@ export default {
const res = await customerList(this.select)
this.total = res.total
this.list = res.data
+ },
+
+ schedule(row){
+ this.$refs['addSchedule'].detail = row
+ this.$refs['addSchedule'].form.customer_id = row.id
+ this.orders = row.orders
+ this.$refs['addSchedule'].isShow = true
}
},
mounted() {
diff --git a/src/views/worker/component/addWorker.vue b/src/views/worker/component/addWorker.vue
index 08a42ee..4fea3c8 100644
--- a/src/views/worker/component/addWorker.vue
+++ b/src/views/worker/component/addWorker.vue
@@ -177,7 +177,7 @@
*加入时间:
-
@@ -189,7 +189,7 @@
离职时间:
-