fix bug
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 20:08:17
|
||||
* @LastEditTime: 2021-12-14 20:09:50
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\onecar-publish\address-list\address-list.component.html
|
||||
-->
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[data]="service.$api_getList"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: reqProcess }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
[widthMode]="{ type: 'strict' }"
|
||||
(change)="change($event)"
|
||||
>
|
||||
<ng-template st-row="region" let-item let-index="index"> {{ item.province }}-{{ item.city }}-{{ item.area }} </ng-template>
|
||||
</st>
|
||||
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 20:08:17
|
||||
* @LastEditTime: 2021-12-14 20:08:55
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\onecar-publish\address-list\address-list.component.ts
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { NzDrawerService } from 'ng-zorro-antd/drawer';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from 'src/app/routes/order-management/services/order-management.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-publish-address-list',
|
||||
templateUrl: './address-list.component.html'
|
||||
})
|
||||
export class PublishAddressListComponent implements OnInit {
|
||||
columns!: STColumn[];
|
||||
@ViewChild('st', { static: false })
|
||||
st!: STComponent;
|
||||
|
||||
seleteData: any;
|
||||
|
||||
spuStatus = '1'; // '1'客户地址,'2'收回单地址
|
||||
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
private drawerService: NzDrawerService,
|
||||
public service: SupplyManagementService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return {
|
||||
type: this.spuStatus
|
||||
};
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', index: 'id', type: 'radio', width: 70 },
|
||||
{
|
||||
title: '省市区',
|
||||
render: 'region'
|
||||
},
|
||||
{
|
||||
title: '详细地址',
|
||||
index: 'detailedAddress'
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
index: 'contactName'
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
index: 'contactTelephone'
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
index: 'modifyTime'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// 排序
|
||||
reqProcess(requestOptions: STRequestOptions): STRequestOptions {
|
||||
return processSingleSort(requestOptions);
|
||||
}
|
||||
|
||||
change(ret: STChange): void {
|
||||
console.log('change', ret);
|
||||
this.seleteData = { ...ret.radio };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user