|
|
|
@ -12,6 +12,7 @@ const airTicketStore = create((set, get) => ({
|
|
|
|
|
setGuestList: guestList => set({ guestList }),
|
|
|
|
|
setVEIFlightBill: vEIFlightBill => set({ vEIFlightBill }),
|
|
|
|
|
setVeiPlanChangeTxt: veiPlanChangeTxt => set({ veiPlanChangeTxt }),
|
|
|
|
|
setAirPortList: airPortList => set({ airPortList }),
|
|
|
|
|
|
|
|
|
|
async getPlanList(vei_sn, GRI_Name, TimeStart, TimeEnd) {
|
|
|
|
|
const { setLoading, setPlanList } = get();
|
|
|
|
@ -39,7 +40,7 @@ const airTicketStore = create((set, get) => ({
|
|
|
|
|
const _result = errcode !== 0 ? [] : result;
|
|
|
|
|
setPlanDetail(_result);
|
|
|
|
|
//return _result.filter(item => isNotEmpty(item.GRI_No));
|
|
|
|
|
return 'dsadsd';
|
|
|
|
|
return "dsadsd";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async postFlightDetail(CLF_SN, GRI_SN, VEI_SN, original_values, info_object) {
|
|
|
|
@ -53,7 +54,7 @@ const airTicketStore = create((set, get) => ({
|
|
|
|
|
for (const [key, value] of Object.entries(info_object)) {
|
|
|
|
|
formData.set(key, value); //再用新值覆盖
|
|
|
|
|
}
|
|
|
|
|
formData.set('StartDate', dayjs(info_object.StartDate).format(DATE_FORMAT)); //再用新值覆盖
|
|
|
|
|
formData.set("StartDate", dayjs(info_object.StartDate).format(DATE_FORMAT)); //再用新值覆盖
|
|
|
|
|
//是否出票的值,true、false变为1或0
|
|
|
|
|
formData.set("TicketIssued", info_object.TicketIssued ? 1 : 0);
|
|
|
|
|
const postUrl = HT_HOST + "/Service_BaseInfoWeb/edit_or_new_flight_info";
|
|
|
|
@ -86,7 +87,7 @@ const airTicketStore = create((set, get) => ({
|
|
|
|
|
},
|
|
|
|
|
//获取账单列表
|
|
|
|
|
async getVEIFlightBill(VEI_SN, GRI_Name, CheckStatus, FlightDate1, FlightDate2) {
|
|
|
|
|
const { setLoading,setVEIFlightBill } = get();
|
|
|
|
|
const { setLoading, setVEIFlightBill } = get();
|
|
|
|
|
setLoading(true);
|
|
|
|
|
const searchParams = {
|
|
|
|
|
VEI_SN: VEI_SN,
|
|
|
|
@ -152,7 +153,7 @@ const airTicketStore = create((set, get) => ({
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//提交账单
|
|
|
|
|
async postVEIFlightBillSubmit(VEI_SN,values) {
|
|
|
|
|
async postVEIFlightBillSubmit(VEI_SN, values) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
formData.append("vei_sn", VEI_SN);
|
|
|
|
|
formData.append("billdata", JSON.stringify(values));
|
|
|
|
@ -175,6 +176,47 @@ const airTicketStore = create((set, get) => ({
|
|
|
|
|
const _result = errcode !== 0 ? [] : result;
|
|
|
|
|
return _result;
|
|
|
|
|
},
|
|
|
|
|
//获取机场列表
|
|
|
|
|
async getAirPortList() {
|
|
|
|
|
const { setAirPortList } = get();
|
|
|
|
|
const { errcode, result } = await fetchJSON(`${HT_HOST}/Service_BaseInfoWeb/GetAirPortInfo`);
|
|
|
|
|
const _result = errcode !== 0 ? [] : result;
|
|
|
|
|
setAirPortList(_result);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
airLineList: [
|
|
|
|
|
{ label: "CA-国航", value: "国航" },
|
|
|
|
|
{ label: "MU-东方航空", value: "东方航空" },
|
|
|
|
|
{ label: "FM-上海航空", value: "上海航空" },
|
|
|
|
|
{ label: "CZ-南方航空", value: "南方航空" },
|
|
|
|
|
{ label: "HO-吉祥航空", value: "吉祥航空" },
|
|
|
|
|
{ label: "HU-海南航空", value: "海南航空" },
|
|
|
|
|
{ label: "ZH-深圳航空", value: "深圳航空" },
|
|
|
|
|
{ label: "MF-厦门航空", value: "厦门航空" },
|
|
|
|
|
{ label: "3U-四川航空", value: "四川航空" },
|
|
|
|
|
{ label: "SC-山东航空", value: "山东航空" },
|
|
|
|
|
{ label: "JD-首都航空", value: "首都航空" },
|
|
|
|
|
{ label: "BK-奥凯航空", value: "奥凯航空" },
|
|
|
|
|
{ label: "GS-天津航空", value: "天津航空" },
|
|
|
|
|
{ label: "CN-大新华", value: "大新华" },
|
|
|
|
|
{ label: "KN-中联航", value: "中联航" },
|
|
|
|
|
{ label: "TV-西藏航空", value: "西藏航空" },
|
|
|
|
|
{ label: "8L-祥鹏航空", value: "祥鹏航空" },
|
|
|
|
|
{ label: "KY-昆明航空", value: "昆明航空" },
|
|
|
|
|
{ label: "EU-成都航空", value: "成都航空" },
|
|
|
|
|
{ label: "G5-华夏航空", value: "华夏航空" },
|
|
|
|
|
{ label: "NS-河北航空", value: "河北航空" },
|
|
|
|
|
{ label: "QW-青岛航空", value: "青岛航空" },
|
|
|
|
|
{ label: "Y8-扬子江", value: "扬子江" },
|
|
|
|
|
{ label: "PN-西部航空", value: "西部航空" },
|
|
|
|
|
{ label: "DZ-东海航空", value: "东海航空" },
|
|
|
|
|
{ label: "GT-桂林航空", value: "桂林航空" },
|
|
|
|
|
{ label: "9H-长安航空", value: "长安航空" },
|
|
|
|
|
{ label: "GY-多彩航空", value: "多彩航空" },
|
|
|
|
|
{ label: "DR-瑞丽航空", value: "瑞丽航空" },
|
|
|
|
|
{ label: "GJ-长龙航空", value: "长龙航空" },
|
|
|
|
|
{ label: "GX-广西北部", value: "广西北部" },
|
|
|
|
|
],
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
export default airTicketStore;
|
|
|
|
|