diff --git a/src/api/chart/index.js b/src/api/chart/index.js index de6cd69..a76a471 100644 --- a/src/api/chart/index.js +++ b/src/api/chart/index.js @@ -23,3 +23,11 @@ export function effct(params){ params }) } + +export function checkAge(params){ + return request({ + method:'get', + url:'/api/admin/chart/check-age', + params + }) +} diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index dc42128..7d143a5 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -6,7 +6,7 @@ export default { default:'medium' }, height: { - type: Number + type: [Number,String] }, list: { type: Array, diff --git a/src/views/customer/component/addCustomer.vue b/src/views/customer/component/addCustomer.vue index e322bbd..fccc719 100644 --- a/src/views/customer/component/addCustomer.vue +++ b/src/views/customer/component/addCustomer.vue @@ -694,6 +694,7 @@ export default { this.$successMessage(this.type, '客户') this.$emit('refresh') this.isShow = false + this.$router.push(`/schedule/schedule?product_type_id=${this.form1.product_type_id}`) }) }else{ this.$emit('refresh') diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue index 7039245..cd354f6 100644 --- a/src/views/customer/customer.vue +++ b/src/views/customer/customer.vue @@ -15,9 +15,10 @@ { let getColor = () => { - if (getAgeByIdcard(row.idcard) >= row.max_age) { - return "orange"; + if (row.near_age == 2) { + return "rgb(232,102,33)"; } - if (row.near_age) { + if (row.near_age == 1) { return "yellow"; } }; diff --git a/src/views/dashboard/components/draw.vue b/src/views/dashboard/components/draw.vue new file mode 100644 index 0000000..3408d08 --- /dev/null +++ b/src/views/dashboard/components/draw.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 78499c1..41af1d9 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -3,6 +3,7 @@
+ 超龄查看
@@ -20,6 +21,8 @@
+ + @@ -29,18 +32,41 @@ import { getChartsHome } from "../../api/dashboard.js" - + import draw from './components/draw.vue' export default { components: { - PanelGroup + PanelGroup, + draw }, data() { return { + isShowDraw:false, col: '', line: '', business_data: [], collect_data: [], - list: {}, + list: { + "business": { + "server_money_total": 0, + "nurse_money_total": 0, + "remain_money_total": 0 + }, + "person_efficiency": { + "server_time_total": "0", + "expect": 0, + "act": 0 + }, + "customer": { + "active": 0, + "add": 0, + "wash": 0 + }, + "order": { + "server_total": 0, + "cycle_total": 0, + "unit_total": 0 + }, + }, customerArr: [], orderArr: [], chartData: {}, @@ -186,13 +212,13 @@ }) } }, - created() { + created() { this.month=this.$moment().format("YYYY-MM") this.loadData(); }, mounted() { - + //setInterval(()=>{ this.isShowDraw = !this.isShowDraw},3000) //this.init() @@ -313,4 +339,4 @@ } - + diff --git a/src/views/finance/component/addScheduleListLog.vue b/src/views/finance/component/addScheduleListLog.vue index 8fc99ab..957b27b 100644 --- a/src/views/finance/component/addScheduleListLog.vue +++ b/src/views/finance/component/addScheduleListLog.vue @@ -48,9 +48,9 @@ *打卡类型 :
- - - +
@@ -60,7 +60,7 @@ 服务记录 :
- +
@@ -128,7 +128,7 @@ default:()=>[{id:1,value:'签到'},{id:2,value:'过程打卡'},{id:3,value:'签退'}] } }, - inject:['scheduleInfo'], + inject:['selectedRow'], data() { return { isShow: false, @@ -237,7 +237,7 @@ }) } if(this.form.type === 3){ - let promiseAll = this.scheduleInfo().sku.map(item => { + let promiseAll = this.selectedRow().sku.map(item => { return saveSku({ id:item.id, schedule_list_id:item.schedule_list_id, @@ -256,7 +256,7 @@ watch: { isShow(val) { if (val) { - console.log(1111,this.scheduleInfo().sku) + console.log(1111,this.selectedRow().sku) this.form.schedule_list_id = this.scheduleListId if (this.type === 'editor') { this.getDetail() diff --git a/src/views/finance/component/serveDraw.vue b/src/views/finance/component/serveDraw.vue index 1009753..5e9be9f 100644 --- a/src/views/finance/component/serveDraw.vue +++ b/src/views/finance/component/serveDraw.vue @@ -48,7 +48,7 @@ type="primary" size="small" style="margin-left: 4px" - @click="editor(scope)" + @click="editor(scope.row)" >编辑 @@ -73,6 +73,17 @@ @@ -215,8 +233,8 @@ export default { }; }, methods: { - editor(scope) { - this.$refs["addScheduleListLog"].fileList = scope.row.upload_list.map( + editor(row) { + this.$refs["addScheduleListLog"].fileList = row.upload_list.map( (item) => { return { url: item.upload?.url, @@ -225,7 +243,7 @@ export default { }; } ); - this.$refs["addScheduleListLog"].id = scope.row.id; + this.$refs["addScheduleListLog"].id = row.id; this.$refs["addScheduleListLog"].type = "editor"; this.$refs["addScheduleListLog"].isShow = true; }, @@ -350,4 +368,7 @@ export default { .pop-confirm { z-index: 3000 !important; } +.avue-dialog{ + z-index:9999 !important; +} diff --git a/src/views/finance/scheduleList.vue b/src/views/finance/scheduleList.vue index 5c8c3a7..28a90f9 100644 --- a/src/views/finance/scheduleList.vue +++ b/src/views/finance/scheduleList.vue @@ -139,6 +139,7 @@ - + @@ -281,8 +282,18 @@ export default { width: 140, label:'实际服务时间', customFn:row => { + const getTime = () => { + if(row.sign_out && row.sign_in){ + let seconds = this.$moment(row.sign_out).diff(row.sign_in,'seconds') + let point = seconds % 60 + let min = parseInt(seconds / 60) + return `${min}分钟${point}秒` + }else{ + return 0 + } + } return ( - { (row.sign_out && row.sign_in) ? this.$moment(row.sign_out).diff(row.sign_in,'minutes') : 0 } + { getTime() } ) } }, @@ -396,9 +407,34 @@ export default { }; }, methods: { + tableRowStyle({row, rowIndex}){ + let selectTime = row.sku.reduce((pre,cur) => { + return pre + Number(cur.time ?? 0) + },0) + let actTime = Math.round( this.$moment(row.sign_out).diff(row.sign_in,'seconds') / 60) + + if(Math.abs(selectTime - actTime) <= 5){ + return + } + if(Math.abs(selectTime - actTime) <= 10 && Math.abs(selectTime - actTime) > 5){ + return { + 'background':'rgb(255,227,150)' + } + } + if(Math.abs(selectTime - actTime) > 10){ + return { + 'background':'rgb(253,165,122)' + } + } + }, pickMonth(e){ - this.select.start_start_time = this.$moment(e).startOf('month').format('YYYY-MM-DD HH:mm:ss') - this.select.end_start_time = this.$moment(e).endOf('month').format('YYYY-MM-DD HH:mm:ss') + if(e){ + this.select.start_start_time = this.$moment(e).startOf('month').format('YYYY-MM-DD HH:mm:ss') + this.select.end_start_time = this.$moment(e).endOf('month').format('YYYY-MM-DD HH:mm:ss') + }else{ + this.select.start_start_time = '' + this.select.end_start_time = '' + } }, destroy(row){ @@ -426,8 +462,8 @@ export default { }, async getList() { const res = await scheduleList(this.select) - this.list = res.data - this.total = res.total + this.list = res.list.data + this.total = res.list.total }, exports(){ @@ -501,4 +537,10 @@ export default { } } } + + + diff --git a/src/views/product/productComponent/addProduct.vue b/src/views/product/productComponent/addProduct.vue index 89e6b2d..f62777f 100644 --- a/src/views/product/productComponent/addProduct.vue +++ b/src/views/product/productComponent/addProduct.vue @@ -1,16 +1,58 @@