edit
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { EAEnterpriseService } from '@shared';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
||||
@ -17,12 +16,7 @@ export class SettingFinancialComponent implements OnInit {
|
||||
schema!: SFSchema;
|
||||
roleList = [];
|
||||
roleNames: any = [];
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
public msgSrv: NzMessageService,
|
||||
public service: SystemService,
|
||||
private enterpriseSrv: EAEnterpriseService
|
||||
) {}
|
||||
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public service: SystemService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.i?.id !== 0) {
|
||||
@ -113,16 +107,10 @@ export class SettingFinancialComponent implements OnInit {
|
||||
};
|
||||
// this.service.request(this.service.$api_editorStaff, params).subscribe((res) => {
|
||||
// this.service.msgSrv.success('编辑成功!');
|
||||
// // this.loadMyIdentity();
|
||||
// this.modal.close(true);
|
||||
// });
|
||||
}
|
||||
}
|
||||
loadMyIdentity() {
|
||||
this.enterpriseSrv.loadEnterpises().subscribe((data: any[]) => {
|
||||
this.enterpriseSrv.setCache(data);
|
||||
});
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modal.destroy();
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { copy } from '@delon/util';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { EAEnterpriseService } from 'src/app/shared/services/business/enterprise.service';
|
||||
import { SystemService } from '../../../services/system.service';
|
||||
|
||||
@Component({
|
||||
@ -21,12 +18,7 @@ export class SystemStaffStaffModalComponent implements OnInit {
|
||||
ui!: SFUISchema;
|
||||
roleList = [];
|
||||
roleNames: any = [];
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
public msgSrv: NzMessageService,
|
||||
public service: SystemService,
|
||||
private enterpriseSrv: EAEnterpriseService
|
||||
) {}
|
||||
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public service: SystemService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.i?.userId !== 0) {
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||
import { dateTimePickerUtil } from '@delon/util';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SFItemDateWidget } from 'src/app/shared/widget/sl-form-item-date/sl-form-item-date.widget';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { EAEnterpriseService } from '@shared';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
||||
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -56,7 +56,6 @@ export class EAAccountService extends BaseService {
|
||||
*/
|
||||
loginByAccount(username: string, password: string): void {
|
||||
this.asyncRequest(this.$api_login_by_account, { username, password, type: 0 }, 'POST', true, 'FORM').then((res) => {
|
||||
console.log(res);
|
||||
this.doAfterLogin(res);
|
||||
});
|
||||
}
|
||||
|
||||
@ -5,9 +5,7 @@ import { tap } from 'rxjs/operators';
|
||||
import { BaseService } from '../core/base.service';
|
||||
import { EACacheService } from '../core/cache.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
@Injectable()
|
||||
export class EAEnterpriseService extends BaseService {
|
||||
// 获取当前用户绑定的分销商/代理商/供应商
|
||||
public $api_get_my_enterprises = `/chia/enterpriseInfo/list/queryMyAppInfo`;
|
||||
|
||||
@ -11,7 +11,6 @@ export class ShipperBaseService extends BaseService {
|
||||
$api_get_staff_list = `/api/mdc/cuc/userApp/getStaffList`; //查询企业项目员工列表(录单员)
|
||||
$api_get_network_freight_forwarder = `/api/mdc/networkTransporter/findAll`; // 获取网络货运人
|
||||
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
@ -21,21 +20,19 @@ export class ShipperBaseService extends BaseService {
|
||||
* @returns
|
||||
*/
|
||||
getCarlessCarrier() {
|
||||
return
|
||||
const params = {
|
||||
};
|
||||
return;
|
||||
const params = {};
|
||||
return this.request(this.$api_get_carless_carrier, params, 'POST').pipe(
|
||||
map((res) => {
|
||||
map(res => {
|
||||
if (res) {
|
||||
res.map((m: any) => {
|
||||
return { label: m.platformName, value: m.operationId };
|
||||
});
|
||||
}
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取所属项目
|
||||
* @returns
|
||||
@ -46,16 +43,13 @@ export class ShipperBaseService extends BaseService {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.enterpriseId
|
||||
}
|
||||
}))
|
||||
const obj = [{ value: '', label: '全部' }];
|
||||
return [...obj, ...list];
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -68,16 +62,13 @@ export class ShipperBaseService extends BaseService {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.name,
|
||||
value: item.userId
|
||||
}
|
||||
}))
|
||||
const obj = [{ value: '', label: '全部' }];
|
||||
return [...obj, ...list];
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -90,16 +81,12 @@ export class ShipperBaseService extends BaseService {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.enterpriseName,
|
||||
value: item.id
|
||||
}
|
||||
}))
|
||||
const obj = [{ value: '', label: '全部' }];
|
||||
return [...obj, ...list];
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
|
||||
<div style="justify-content: space-between;display: flex;align-items: center;">
|
||||
<nz-date-picker style="min-width: 45%;" [nzFormat]="format" [nzPlaceHolder]="placeholder" [nzShowTime]="nzShowTime"
|
||||
(ngModelChange)="change($event,'start')" [ngModel]="data?.start">
|
||||
</nz-date-picker>
|
||||
-
|
||||
<nz-date-picker style="min-width: 45%; " [nzFormat]="format" [nzPlaceHolder]="placeholder" [nzShowTime]="nzShowTime"
|
||||
(ngModelChange)="change($event,'end')" [ngModel]="data?.end">
|
||||
</nz-date-picker>
|
||||
</div>
|
||||
</sf-item-wrap>
|
||||
@ -1,46 +0,0 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup, Validators } from '@angular/forms';
|
||||
import { ControlWidget } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||
import setHours from 'date-fns/setHours';
|
||||
import { DisabledTimeFn, DisabledTimePartial } from 'ng-zorro-antd/date-picker';
|
||||
@Component({
|
||||
selector: 'sf-item-date',
|
||||
templateUrl: './sl-form-item-date.widget.html',
|
||||
styleUrls: ['./sl-form-item-date.widget.less']
|
||||
})
|
||||
export class SFItemDateWidget extends ControlWidget implements OnInit {
|
||||
/* 用于注册小部件 KEY 值 */
|
||||
static readonly KEY = 'item-date';
|
||||
|
||||
// 组件所需要的参数,建议使用 `ngOnInit` 获取
|
||||
format: any;
|
||||
placeholder: string = '';
|
||||
nzShowTime = false;
|
||||
|
||||
data: any = {
|
||||
start: null,
|
||||
end: null
|
||||
};
|
||||
|
||||
ngOnInit(): void {
|
||||
this.format = this.ui.format || 'yyyy-mm-dd';
|
||||
this.placeholder = this.ui.placeholder || '';
|
||||
this.nzShowTime = this.ui.nzShowTime || false;
|
||||
this.data = this.value;
|
||||
}
|
||||
|
||||
// reset 可以更好的解决表单重置过程中所需要的新数据问题
|
||||
reset(value: string) {}
|
||||
|
||||
change(value: Date, key: string) {
|
||||
if (this.data) {
|
||||
this.data[key] = value;
|
||||
} else {
|
||||
this.data = { [key]: value };
|
||||
}
|
||||
if (this.ui.change) this.ui.change(this.data);
|
||||
this.setValue(this.data);
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,6 @@ import { EAFromToWidget } from './from-to/from-to.widget';
|
||||
import { ImgWidget } from './img/img.widget';
|
||||
import { NounWidget } from './noun/noun.widget';
|
||||
import { PropertyValuesWidget } from './property-values/property-values.widget';
|
||||
import { SFItemDateWidget } from './sl-form-item-date/sl-form-item-date.widget';
|
||||
import { SpecValuesWidget } from './spec-values/spec-values.widget';
|
||||
import { TinymceWidget } from './tinymce/tinymce.widget';
|
||||
|
||||
@ -45,7 +44,6 @@ export const STWIDGET_COMPONENTS = [
|
||||
PropertyValuesWidget,
|
||||
SLFromToSearchWidget,
|
||||
DictSelectWidget,
|
||||
SFItemDateWidget
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
@ -81,6 +79,5 @@ export class STWidgetModule {
|
||||
widgetRegistry.register(PropertyValuesWidget.KEY, PropertyValuesWidget);
|
||||
widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget);
|
||||
widgetRegistry.register(DictSelectWidget.KEY, DictSelectWidget);
|
||||
widgetRegistry.register(SFItemDateWidget.KEY, SFItemDateWidget);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user