货源修改

This commit is contained in:
wangshiming
2021-12-03 15:22:55 +08:00
parent a9ef21e333
commit db95de90fb
42 changed files with 2466 additions and 7 deletions

View File

@ -0,0 +1,7 @@
<div>
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<div>
<st #st [data]="service.$api_get_catalogue_member" [columns]="columns">
</st>
</div>
</div>

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { SupplyManagementAssignedCarComponent } from './assigned-car.component';
describe('SupplyManagementAssignedCarComponent', () => {
let component: SupplyManagementAssignedCarComponent;
let fixture: ComponentFixture<SupplyManagementAssignedCarComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SupplyManagementAssignedCarComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SupplyManagementAssignedCarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,81 @@
import { Component, OnInit } from '@angular/core';
import { STColumn } from '@delon/abc/st';
import { SFSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { SupplyManagementService } from '../../services/supply-management.service';
@Component({
selector: 'app-supply-management-assigned-car',
templateUrl: './assigned-car.component.html',
})
export class SupplyManagementAssignedCarComponent implements OnInit {
record: any = {};
i: any;
schema: SFSchema = {};
ui: SFUISchema = {};
columns: STColumn[] = [];
constructor(
private modal: NzModalRef,
private msgSrv: NzMessageService,
public service: SupplyManagementService
) {
this.initSF();
this.initSt();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
no: {
type: 'string',
title: '',
ui: {
placholder: '请输入司机姓名/手机号'
}
},
no2: {
type: 'string',
title: '',
ui: {
placholder: '请输入车牌号'
}
},
},
type: 'object',
};
this.ui = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } };
}
/**
* 初始化数据列表
*/
initSt() {
this.columns = [
{ width: 50, type: 'checkbox', className: 'text-center' },
{ title: '司机姓名', width: 80, index: 'owner', className: 'text-center' },
{ title: '手机号', index: 'goodsQuantity', width: 100, className: 'text-center' },
{ title: '车牌号', width: 100, index: 'carNo', className: 'text-center' },
{ title: '状态', index: 'status', width: 100, className: 'text-center' },
];
}
ngOnInit(): void {
}
save(value: any): void {
this.service.request(`/user/${this.record.id}`, value).subscribe(res => {
this.msgSrv.success('保存成功');
this.modal.close(true);
});
}
close(): void {
this.modal.destroy();
}
}