master
xy 3 years ago
parent c2ec7b25c4
commit 2855fc1c8e

@ -46,7 +46,7 @@
<script> <script>
import { destroy } from '@/api/scheduleListLog' import { destroy } from '@/api/scheduleListLog'
import {scheduleLog} from '@/api/schedule' import { scheduleLog } from '@/api/schedule'
import addScheduleListLog from "@/views/finance/component/addScheduleListLog"; import addScheduleListLog from "@/views/finance/component/addScheduleListLog";
export default { export default {

@ -40,7 +40,8 @@
</template> </template>
<script> <script>
import {getList} from '@/api/serveDetail' import { scheduleLog } from '@/api/schedule'
import { getList } from '@/api/serveDetail'
import moment from "moment"; import moment from "moment";
import detail from './detailServe' import detail from './detailServe'
@ -64,7 +65,8 @@ export default {
page_size:9999, page_size:9999,
customer_id:'', customer_id:'',
year:'', year:'',
month:'' month:'',
id:''
}, },
list:[], list:[],
table:[ table:[
@ -140,9 +142,11 @@ export default {
}, },
methods: { methods: {
async getList(){ async getList(){
const res = await getList(this.select) const res = await scheduleLog(this.select)
this.list = res.data console.log(111,res)
console.log(this.list) // const res = await getList(this.select)
// this.list = res.data
// console.log(this.list)
} }
}, },
watch:{ watch:{

@ -263,7 +263,7 @@ export default {
align:'left' align:'left'
}, },
{ {
label:'勾选服务', label:'已服务明细',
minWidth: 400, minWidth: 400,
customFn:row => { customFn:row => {
return ( return (
@ -274,18 +274,26 @@ export default {
} }
}> }>
{ {
row?.sku?.map(item => { (
return ( () => {
<div class="sku-item"> let arr = [];
<div class="sku-item__name"> row?.sku?.forEach(item => {
{ item.sku_info.name } if(item.time){
</div> arr.push((
<div class="sku-item__time"> <div class="sku-item">
{ item.time || 0 } <div class="sku-item__name">
</div> { item.sku_info.name }
</div> </div>
) <div class="sku-item__time">
}) { item.time || 0 }
</div>
</div>
))
}
})
return arr;
}
)()
} }
</div> </div>
) )
@ -309,12 +317,12 @@ export default {
align:'left' align:'left'
}, },
{ {
prop:'', prop:'customer.area_detail.value',
label:'区', label:'区',
width: 160 width: 160
}, },
{ {
prop:'', prop:'customer.street_detail.value',
label:'街道(镇)', label:'街道(镇)',
width: 160 width: 160
}, },

@ -41,6 +41,9 @@
> >
</el-date-picker> </el-date-picker>
</template> </template>
<el-select size="small" style="width: 200px;margin-right: 10px" v-model="select.product_id">
<el-option v-for="item in products" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
<Input <Input
v-model="select.keyword" v-model="select.keyword"
placeholder="关键字搜索" placeholder="关键字搜索"
@ -68,7 +71,6 @@
:total="total" :total="total"
:list="list" :list="list"
:table-item="table" :table-item="table"
:expand-row-keys="expandRowKeys"
@pageSizeChange="(e) => (select.page_size = e)" @pageSizeChange="(e) => (select.page_size = e)"
@pageIndexChange=" @pageIndexChange="
(e) => { (e) => {
@ -76,7 +78,6 @@
getList(); getList();
} }
" "
@expand-change="expandChange"
> >
<template v-slot:btns> <template v-slot:btns>
<el-table-column <el-table-column
@ -100,6 +101,7 @@
</template> </template>
<script> <script>
import { getList as getProducts } from "@/api/product"
import { serveList, getList } from "@/api/serveDetail"; import { serveList, getList } from "@/api/serveDetail";
import { parseTime, getAgeByIdcard } from "@/utils"; import { parseTime, getAgeByIdcard } from "@/utils";
import { download } from "@/utils/downloadRequest"; import { download } from "@/utils/downloadRequest";
@ -111,56 +113,30 @@ export default {
}, },
data() { data() {
return { return {
expandRowKeys:[],
isShowDraw: false, isShowDraw: false,
isShowDetail: false, isShowDetail: false,
datePickMode: 1, //01 datePickMode: 1, //01
products:[],
select: { select: {
page: 1, page: 1,
page_size: 10, page_size: 10,
keyword: "", keyword: "",
year: `${new Date().getFullYear()}`, year: `${new Date().getFullYear()}`,
month: this.$moment(new Date()).format("YYYY-MM"), month: this.$moment(new Date()).format("YYYY-MM"),
product_id:''
}, },
types: [], types: [],
total: 0, total: 0,
list: [], list: [],
innerList: [],
table: [ table: [
{ {
type: "expand", prop: "customer.name",
width: 44,
expandFn: (row) => {
return (
<Table
style={{
margin: "0 166px 0 40px",
}}
data={this.innerList}
width={1370}
stripe={true}
border={true}
size="small"
columns={
[
{
title:'序号',
key:'id'
}
]
}
></Table>
);
},
},
{
prop: "name",
label: "客户姓名", label: "客户姓名",
width: 140, width: 140,
}, },
{ {
prop: "idcard", prop: "customer.idcard",
label: "年龄", label: "年龄",
width: 80, width: 80,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
@ -168,17 +144,17 @@ export default {
}, },
}, },
{ {
prop: "sex", prop: "customer.sex",
label: "性别", label: "性别",
width: 80, width: 80,
}, },
{ {
prop: "idcard", prop: "customer.idcard",
label: "身份证号", label: "身份证号",
width: 180, width: 180,
}, },
{ {
prop: "phone", prop: "customer.phone",
label: "手机号", label: "手机号",
width: 150, width: 150,
}, },
@ -202,26 +178,13 @@ export default {
}; };
}, },
methods: { methods: {
async expandChange({ row, expanded }) { async getProducts(){
console.log(row, expanded); const res = await getProducts({
if (row.expandContent) return; page:1,
this.expandRowKeys = [row.id] page_size:999
const res = await getList({ })
page: 1, this.products = res.data
page_size: 9999, this.select.product_id = this.products[0]?.id
customer_id: row.id,
year: this.select.year,
month: this.select.month,
});
//row.expandContent = res.data || [];
let currentIndex = 0;
this.list.some((item, index) => {
if (item.id === row.id) {
currentIndex = index;
return true;
}
});
this.$set(this, "innerList", res.data);
}, },
exportServe() { exportServe() {
@ -253,7 +216,8 @@ export default {
detail(scope) { detail(scope) {
this.$refs["serveDraw"].row = scope.row; this.$refs["serveDraw"].row = scope.row;
this.$refs["serveDraw"].select.customer_id = scope.row.id; this.$refs["serveDraw"].select.id = scope.row.id;
this.$refs["serveDraw"].select.customer_id = scope.row.customer.id;
this.$refs["serveDraw"].select.year = this.select.year; this.$refs["serveDraw"].select.year = this.select.year;
this.$refs["serveDraw"].select.month = this.select.month; this.$refs["serveDraw"].select.month = this.select.month;
this.$refs["serveDraw"].isShow = true; this.$refs["serveDraw"].isShow = true;
@ -264,8 +228,9 @@ export default {
this.list = res.data; this.list = res.data;
}, },
}, },
mounted() { async created() {
this.getList(); await this.getProducts();
await this.getList();
}, },
}; };
</script> </script>

@ -55,12 +55,6 @@
@select-all="skuSelect"> @select-all="skuSelect">
<template v-slot:btns><div></div></template> <template v-slot:btns><div></div></template>
</xy-table> </xy-table>
<!-- <el-checkbox-group v-model="form.schedule_list_skus">-->
<!-- <template v-for="(item) in skus">-->
<!-- <el-checkbox :label="item.sku.id">{{ item.sku.name }}</el-checkbox>-->
<!-- </template>-->
<!-- <el-checkbox v-model="checkAll" :indeterminate="indeterminate" @change="handleCheckAllChange"></el-checkbox>-->
<!-- </el-checkbox-group>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
@ -257,7 +251,6 @@ export default {
this.form.schedule_list_skus = temp this.form.schedule_list_skus = temp
this.$refs['elForm'].validate().then(valid => { this.$refs['elForm'].validate().then(valid => {
if (valid) { if (valid) {
console.log(1111,this.form)
scheduleSave(this.form).then(res => { scheduleSave(this.form).then(res => {
this.$successMessage('add', '排班') this.$successMessage('add', '排班')
this.$emit('update:isShow', false) this.$emit('update:isShow', false)

Loading…
Cancel
Save