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

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-30 13:55:41
* @LastEditors : Shiming
* @LastEditTime : 2022-04-15 17:13:53
* @LastEditTime : 2022-04-15 17:28:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\compliance\\customer\\customer.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -14,7 +14,8 @@
<div nz-row nzGutter="8">
<div nz-col [nzXl]="24" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema" button="none"
[ui]="{ '*': { spanLabelFixed: 110, grid: { xxl:5,xl:8, lg: 8, md: 12, sm: 12, xs: 24 } } }" [compact]="true">
[ui]="{ '*': { spanLabelFixed: 0, grid: { xxl:5,xl:4, lg: 8, md: 12, sm: 12, xs: 24,gutter:20 } } }"
[compact]="true">
<ng-template sf-template="no4" let-me let-ui="ui" let-schema="schema">
<div class="chooseBox">
<div class="timeBox">
@ -36,9 +37,7 @@
</sf>
</div>
</div>
<st #st [bordered]="true" [scroll]="{ x: '2000px' }" [data]="service.$api_listCusComplianceReportPage"
[columns]="columns"
<st #st multiSort [scroll]="{ x: '2000px' }" [data]="service.$api_listCusComplianceReportPage" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[scroll]="{ x: '1200px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">

View File

@ -12,3 +12,9 @@
display: inline-block;
margin : 0 0 0 10px;
}
:host::ng-deep {
.ant-form-item-control {
max-width: 100%;
}
}

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: {
type: 'string',
title: '业务员'
},
no3: {
salesmanName: {
type: 'string',
title: '合伙人名称'
title: '',
ui: {
placeholder: '请输入业务员',
change: (value: any) => {
this.st.reload({ ...this.reqParams });
}
}
},
partnerName: {
type: 'string',
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) {}

View File

@ -60,7 +60,7 @@ export class OrderManagementBulkComponent implements OnInit {
public shipperservice: ShipperBaseService,
private router: Router,
private ar: ActivatedRoute,
) {}
) { }
/**
* 查询参数
@ -212,7 +212,7 @@ export class OrderManagementBulkComponent implements OnInit {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
let str = q.replace(/^\s+|\s+$/g, "");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -559,7 +559,10 @@ export class OrderManagementBulkComponent implements OnInit {
{
text: '变更运费',
click: _record => this.updateFreight(_record),
iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2',
iif: _record => {
const flag = _record.mybidDetailInfo.find((item: any) => item?.expenseCode === 'TRA' && item?.paymentStatus === '4');
return _record.billStatus !== '1' && _record.billStatus !== '6' && !flag;
},
acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] },
},
{
@ -857,6 +860,6 @@ export class OrderManagementBulkComponent implements OnInit {
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 },this.service.$api_get_asyncExportBulkList);
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportBulkList);
}
}