master
xy 3 years ago
parent c2ec7b25c4
commit 2855fc1c8e

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

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

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

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

@ -55,12 +55,6 @@
@select-all="skuSelect">
<template v-slot:btns><div></div></template>
</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>
</template>
@ -257,7 +251,6 @@ export default {
this.form.schedule_list_skus = temp
this.$refs['elForm'].validate().then(valid => {
if (valid) {
console.log(1111,this.form)
scheduleSave(this.form).then(res => {
this.$successMessage('add', '排班')
this.$emit('update:isShow', false)

Loading…
Cancel
Save