This commit is contained in:
Taric Xin
2022-04-18 10:04:31 +08:00
4 changed files with 69 additions and 38 deletions

View File

@ -5,7 +5,7 @@ import { SFComponent } from '@delon/form';
* @Author : Shiming
* @Date : 2022-03-30 13:55:41
* @LastEditors : Shiming
* @LastEditTime : 2022-04-15 17:13:03
* @LastEditTime : 2022-04-15 17:40:53
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\compliance\\customer\\customer.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -15,6 +15,7 @@ import { SFSchema } from '@delon/form';
import { ModalHelper, _HttpClient, DatePipe } from '@delon/theme';
import { DataService } from '../../../services/data.service';
import { differenceInCalendarDays } from 'date-fns';
import { Placeholder } from '@angular/compiler/src/i18n/i18n_ast';
@Component({
selector: 'app-datatable-compliance-customer',
@ -36,47 +37,69 @@ export class DatatableComplianceCustomerComponent implements OnInit {
today = new Date();
searchSchema: SFSchema = {
properties: {
no: {
customerName: {
type: 'string',
title: '客户名称'
title: '',
ui: {
placeholder: '请输入客户名称',
change: (value: any) => {
console.log(value);
this.st.reload({ ...this.reqParams });
}
},
},
no2: {
salesmanName: {
type: 'string',
title: '业务员'
title: '',
ui: {
placeholder: '请输入业务员',
change: (value: any) => {
this.st.reload({ ...this.reqParams });
}
}
},
no3: {
partnerName: {
type: 'string',
title: '合伙人名称'
title: '',
ui: {
placeholder: '请输入客户名称',
change: (value: any) => {
console.log(value);
this.st.reload({ ...this.reqParams });
}
}
},
no4: {
type: 'string',
title: '',
ui: {
class: 'text-right',
class: 'custom',
widget: 'custom',
grid: { xxl: 9, xl: 24, lg: 24, md: 24, sm: 24, xs: 24 }
grid: { xxl: 9, xl: 12, lg: 24, md: 24, sm: 24, xs: 24 }
}
}
}
};
@ViewChild('st') private readonly st!: STComponent;
columns: STColumn[] = [
{ title: '公司名称', index: 'enterpriseName' },
{ title: '注册时间', index: 'registerTime' },
{ title: '客户类型', width: '100px', index: 'customerType' },
{ title: '业务员', index: 'salesmanName' },
{ title: '合伙人', index: 'partnerName' },
{ title: '订单数', index: 'billCounts' },
{ title: '订单不合格数', index: 'billQuaCounts' },
{ title: '订单不合格率', index: 'billQuaCountsPer' },
{ title: '货源单订单数', index: 'gsourceCounts' },
{ title: '合同单数', index: 'billConCounts' },
{ title: '货源单个', index: 'gsourceCounts' },
{ title: '运费直付单数', index: 'freightDirPayCounts' },
{ title: '运费代收单数', index: 'freightRepPayCounts' },
{ title: '手机直付', index: 'updatedAt' },
{ title: '汇款单数', index: 'updatedAt' },
{ title: '及时付款', index: 'timelyPayPer' }
{ title: '公司名称',width: '200px', index: 'enterpriseName' ,},
{ title: '注册时间', width: '200px', index: 'registerTime',},
{ title: '客户类型', width: '200px', index: 'customerType' },
{ title: '业务员',width: '200px', index: 'salesmanName' },
{ title: '合伙人',width: '200px', index: 'partnerName' },
{ title: '订单数',width: '200px', index: 'billCounts' },
{ title: '订单不合格数',width: '200px', index: 'billQuaCounts' },
{ title: '订单不合格率',width: '200px', index: 'billQuaCountsPer' },
{ title: '货源单订单数',width: '200px', index: 'gsourceCounts' },
{ title: '合同单数', width: '200px',index: 'billConCounts' },
{ title: '货源单个',width: '200px', index: 'gsourceCounts' },
{ title: '运费直付单数',width: '200px', index: 'freightDirPayCounts' },
{ title: '运费代收单数',width: '200px', index: 'freightRepPayCounts' },
{ title: '手机直付', width: '200px',index: 'updatedAt' },
{ title: '汇款单数',width: '200px', index: 'updatedAt' },
{ title: '及时付款',width: '200px', index: 'timelyPayPer' },
];
constructor(private http: _HttpClient, private modal: ModalHelper, public service: DataService, private datePipe: DatePipe) {}