车辆对接

This commit is contained in:
wangshiming
2022-01-06 11:13:20 +08:00
parent 78329f292c
commit c5a15ed78d
6 changed files with 236 additions and 49 deletions

View File

@ -31,6 +31,9 @@
placeholder="请输入装货地"
/>
</nz-input-group>
<span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span>
</div>
</nz-form-control>
</nz-form-item>
@ -71,6 +74,9 @@
placeholder="请输入卸货地"
/>
</nz-input-group>
<span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span>
</div>
</nz-form-control>
</nz-form-item>

View File

@ -18,6 +18,7 @@ import { SupplyManagementService} from '../../services/supply-management.service
import { map } from 'rxjs/operators';
import { of } from 'rxjs';
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
@Component({
selector: 'app-publish-goods-bulk-publish',
templateUrl: './bulk-publish.component.html',
@ -804,4 +805,48 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
choose(){
window.history.go(-1);
}
chooseAddress(index: number, type: string) {
const modalRef = this.modalService.create({
nzTitle: '选择地址',
nzContent: PublishAddressListComponent,
nzWidth: 900,
nzComponentParams: { spuStatus: '1' },
nzOnOk: item => {
console.log(item)
console.log(type)
const data = item.seleteData;
if (JSON.stringify(data) === '{}') return;
switch (type) {
case 'start':
this.startInfo[index] = {
detailedAddress: data.detailedAddress,
appUserName: data.contactName,
contractTelephone: data.contactTelephone,
latitude: data.contactTelephone,
longitude: data.latitude,
province: data.province,
city: data.city,
area: data.area,
type: '1'
};
break;
case 'end':
this.endInfo[index] = {
detailedAddress: data.detailedAddress,
appUserName: data.contactName,
contractTelephone: data.contactTelephone,
latitude: data.contactTelephone,
longitude: data.latitude,
province: data.province,
city: data.city,
area: data.area,
type: '2'
};
break;
default:
break;
}
}
});
}
}