|
|
@ -1,122 +1,118 @@
|
|
|
|
import { makeAutoObservable,runInAction } from "mobx";
|
|
|
|
import { makeAutoObservable, runInAction } from "mobx";
|
|
|
|
import { fetchJSON,postForm} from "@/utils/request";
|
|
|
|
import { fetchJSON, postForm } from "@/utils/request";
|
|
|
|
import { prepareUrl,isNotEmpty } from '@/utils/commons';
|
|
|
|
import { prepareUrl, isNotEmpty } from "@/utils/commons";
|
|
|
|
import { HT_HOST } from "@/config";
|
|
|
|
import { HT_HOST } from "@/config";
|
|
|
|
import { json } from "react-router-dom";
|
|
|
|
import { json } from "react-router-dom";
|
|
|
|
import * as config from "@/config";
|
|
|
|
import * as config from "@/config";
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
|
|
|
|
|
|
|
class Invoice {
|
|
|
|
class Invoice {
|
|
|
|
constructor(root) {
|
|
|
|
constructor(root) {
|
|
|
|
makeAutoObservable(this, { rootStore: false });
|
|
|
|
makeAutoObservable(this, { rootStore: false });
|
|
|
|
this.root = root;
|
|
|
|
this.root = root;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
invoiceList = []; //账单列表
|
|
|
|
|
|
|
|
invoicekImages = []; //图片列表
|
|
|
|
|
|
|
|
invoiceGroupInfo= {}; //账单详细
|
|
|
|
|
|
|
|
invoiceProductList=[];//账单细项
|
|
|
|
|
|
|
|
invoiceZDDetail = []; //报账信息
|
|
|
|
|
|
|
|
invoiceCurrencyList=[];//币种
|
|
|
|
|
|
|
|
invoicePicList = [] //多账单图片列表数组
|
|
|
|
|
|
|
|
invoiceFormData = {'info_money':0,'info_Currency':'','info_date':''}; //存储form数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetchInvoiceList(current,OrderType,GroupNo,DateStart,DateEnd,Orderbytype){
|
|
|
|
|
|
|
|
this.invoicePage.current=current;
|
|
|
|
|
|
|
|
const totalNum = current == 1 ? 0 : this.invoicePage.total;
|
|
|
|
|
|
|
|
//组合param
|
|
|
|
|
|
|
|
const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/PTSearchGMBPageList')
|
|
|
|
|
|
|
|
.append('VEI_SN', this.root.authStore.login.travelAgencyId) //
|
|
|
|
|
|
|
|
.append('OrderType',OrderType)
|
|
|
|
|
|
|
|
.append('GroupNo',GroupNo)
|
|
|
|
|
|
|
|
.append('DateStart',DateStart)
|
|
|
|
|
|
|
|
.append('DateEnd',DateEnd)
|
|
|
|
|
|
|
|
.append('Orderbytype',Orderbytype)
|
|
|
|
|
|
|
|
.append('TimeType',0)
|
|
|
|
|
|
|
|
.append('limitmarket',"")
|
|
|
|
|
|
|
|
.append('mddgroup',"")
|
|
|
|
|
|
|
|
.append('SecuryGroup',"")
|
|
|
|
|
|
|
|
.append('TotalNum', totalNum)
|
|
|
|
|
|
|
|
.append('PageSize', this.invoicePage.size)
|
|
|
|
|
|
|
|
.append('PageIndex', this.invoicePage.current)
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return fetchJSON(fetchUrl)
|
|
|
|
|
|
|
|
.then(json => {
|
|
|
|
|
|
|
|
runInAction(()=>{
|
|
|
|
|
|
|
|
if (json.errcode==0){
|
|
|
|
|
|
|
|
if (isNotEmpty(json.Result)){
|
|
|
|
|
|
|
|
this.invoiceList = json.Result.map((data,index)=>{
|
|
|
|
|
|
|
|
return{
|
|
|
|
|
|
|
|
key:data.GMDSN,
|
|
|
|
|
|
|
|
gmd_gri_sn : data.gmd_gri_sn,
|
|
|
|
|
|
|
|
gmd_vei_sn : data.gmd_vei_sn,
|
|
|
|
|
|
|
|
GetGDate : data.GetGDate,
|
|
|
|
|
|
|
|
GMD_FillWorkers_SN : data.GMD_FillWorkers_SN,
|
|
|
|
|
|
|
|
GMD_FWks_LastEditTime : data.GMD_FWks_LastEditTime,
|
|
|
|
|
|
|
|
GMD_VerifyUser_SN : data.GMD_VerifyUser_SN,
|
|
|
|
|
|
|
|
GMD_Dealed : data.GMD_Dealed,
|
|
|
|
|
|
|
|
GMD_VRequestVerify : data.GMD_VRequestVerify,
|
|
|
|
|
|
|
|
LeftGDate : data.LeftGDate,
|
|
|
|
|
|
|
|
GMD_FillWorkers_Name : data.GMD_FillWorkers_Name,
|
|
|
|
|
|
|
|
GroupName : data.GroupName,
|
|
|
|
|
|
|
|
AllMoney : data.AllMoney,
|
|
|
|
|
|
|
|
PersonNum : data.PersonNum,
|
|
|
|
|
|
|
|
VName : data.VName,
|
|
|
|
|
|
|
|
FKState:data.FKState
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.invoicePage.total = json.Result[0].TotalCount;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// else{
|
|
|
|
|
|
|
|
// this.invoiceList=[];
|
|
|
|
|
|
|
|
// this.invoicePage.total=0;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
throw new Error(json.errmsg + ': ' + json.errcode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetchInvoiceDetail(GMDSN,GSN){
|
|
|
|
|
|
|
|
const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/PTGetZDDetail')
|
|
|
|
|
|
|
|
.append('VEI_SN', this.root.authStore.login.travelAgencyId) //
|
|
|
|
|
|
|
|
.append('GRI_SN',GSN)
|
|
|
|
|
|
|
|
.append('GMD_SN',GMDSN)
|
|
|
|
|
|
|
|
.append('LGC',1)
|
|
|
|
|
|
|
|
.append('Bill',1)
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return fetchJSON(fetchUrl)
|
|
|
|
|
|
|
|
.then(json=>{
|
|
|
|
|
|
|
|
runInAction(()=>{
|
|
|
|
|
|
|
|
if(json.errcode==0){
|
|
|
|
|
|
|
|
this.invoiceGroupInfo = json.GroupInfo[0];
|
|
|
|
|
|
|
|
this.invoiceProductList = json.ProductList;
|
|
|
|
|
|
|
|
this.invoiceCurrencyList = json.CurrencyList;
|
|
|
|
|
|
|
|
this.invoiceZDDetail = json.ZDDetail;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
throw new Error(json.errmsg + ': ' + json.errcode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return json;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
invoiceList = []; //账单列表
|
|
|
|
|
|
|
|
invoicekImages = []; //图片列表
|
|
|
|
|
|
|
|
invoiceGroupInfo = {}; //账单详细
|
|
|
|
|
|
|
|
invoiceProductList = []; //账单细项
|
|
|
|
|
|
|
|
invoiceZDDetail = []; //报账信息
|
|
|
|
|
|
|
|
invoiceCurrencyList = []; //币种
|
|
|
|
|
|
|
|
invoicePicList = []; //多账单图片列表数组
|
|
|
|
|
|
|
|
invoiceFormData = { info_money: 0, info_Currency: "", info_date: "" }; //存储form数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loading = false;
|
|
|
|
|
|
|
|
search_date_start = dayjs().subtract(2, "M").startOf("M");
|
|
|
|
|
|
|
|
search_date_end = dayjs().endOf("M");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDateRangeChange = dates => {
|
|
|
|
|
|
|
|
console.log(dates);
|
|
|
|
|
|
|
|
this.search_date_start = dates[0];
|
|
|
|
|
|
|
|
this.search_date_end = dates[1];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetchInvoiceList(VEI_SN, GroupNo, DateStart, DateEnd) {
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
const fetchUrl = prepareUrl(HT_HOST + "/service-cusservice/PTSearchGMBPageList")
|
|
|
|
|
|
|
|
.append("VEI_SN", VEI_SN)
|
|
|
|
|
|
|
|
.append("OrderType", 0)
|
|
|
|
|
|
|
|
.append("GroupNo", GroupNo)
|
|
|
|
|
|
|
|
.append("DateStart", DateStart)
|
|
|
|
|
|
|
|
.append("DateEnd", DateEnd)
|
|
|
|
|
|
|
|
.append("Orderbytype", 1)
|
|
|
|
|
|
|
|
.append("TimeType", 0)
|
|
|
|
|
|
|
|
.append("limitmarket", "")
|
|
|
|
|
|
|
|
.append("mddgroup", "")
|
|
|
|
|
|
|
|
.append("SecuryGroup", "")
|
|
|
|
|
|
|
|
.append("TotalNum", 0)
|
|
|
|
|
|
|
|
.append("PageSize", 2000)
|
|
|
|
|
|
|
|
.append("PageIndex", 1)
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return fetchJSON(fetchUrl).then(json => {
|
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
if (json.errcode == 0) {
|
|
|
|
|
|
|
|
if (isNotEmpty(json.Result)) {
|
|
|
|
|
|
|
|
this.invoiceList = json.Result.map((data, index) => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
key: data.GMDSN,
|
|
|
|
|
|
|
|
gmd_gri_sn: data.gmd_gri_sn,
|
|
|
|
|
|
|
|
gmd_vei_sn: data.gmd_vei_sn,
|
|
|
|
|
|
|
|
GetGDate: data.GetGDate,
|
|
|
|
|
|
|
|
GMD_FillWorkers_SN: data.GMD_FillWorkers_SN,
|
|
|
|
|
|
|
|
GMD_FWks_LastEditTime: data.GMD_FWks_LastEditTime,
|
|
|
|
|
|
|
|
GMD_VerifyUser_SN: data.GMD_VerifyUser_SN,
|
|
|
|
|
|
|
|
GMD_Dealed: data.GMD_Dealed,
|
|
|
|
|
|
|
|
GMD_VRequestVerify: data.GMD_VRequestVerify,
|
|
|
|
|
|
|
|
LeftGDate: data.LeftGDate,
|
|
|
|
|
|
|
|
GMD_FillWorkers_Name: data.GMD_FillWorkers_Name,
|
|
|
|
|
|
|
|
GroupName: data.GroupName,
|
|
|
|
|
|
|
|
AllMoney: data.AllMoney,
|
|
|
|
|
|
|
|
PersonNum: data.PersonNum,
|
|
|
|
|
|
|
|
VName: data.VName,
|
|
|
|
|
|
|
|
FKState: data.FKState,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.invoicePage.total = json.Result[0].TotalCount;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// else{
|
|
|
|
|
|
|
|
// this.invoiceList=[];
|
|
|
|
|
|
|
|
// this.invoicePage.total=0;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
throw new Error(json.errmsg + ": " + json.errcode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetchInvoiceDetail(GMDSN, GSN) {
|
|
|
|
|
|
|
|
const fetchUrl = prepareUrl(HT_HOST + "/service-cusservice/PTGetZDDetail")
|
|
|
|
|
|
|
|
.append("VEI_SN", this.root.authStore.login.travelAgencyId)
|
|
|
|
|
|
|
|
.append("GRI_SN", GSN)
|
|
|
|
|
|
|
|
.append("GMD_SN", GMDSN)
|
|
|
|
|
|
|
|
.append("LGC", 1)
|
|
|
|
|
|
|
|
.append("Bill", 1)
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return fetchJSON(fetchUrl).then(json => {
|
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
|
|
|
|
if (json.errcode == 0) {
|
|
|
|
|
|
|
|
this.invoiceGroupInfo = json.GroupInfo[0];
|
|
|
|
|
|
|
|
this.invoiceProductList = json.ProductList;
|
|
|
|
|
|
|
|
this.invoiceCurrencyList = json.CurrencyList;
|
|
|
|
|
|
|
|
this.invoiceZDDetail = json.ZDDetail;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
throw new Error(json.errmsg + ": " + json.errcode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return json;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//获取供应商提交的图片
|
|
|
|
//获取供应商提交的图片
|
|
|
|
getInvoicekImages(VEI_SN, GRI_SN) {
|
|
|
|
getInvoicekImages(VEI_SN, GRI_SN) {
|
|
|
|
let url = `/service-fileServer/ListFile`;
|
|
|
|
let url = `/service-fileServer/ListFile`;
|
|
|
|
url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}&FilePathName=invoice`;
|
|
|
|
url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}&FilePathName=invoice`;
|
|
|
@ -140,51 +136,48 @@ class Invoice {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//从数据库获取图片列表
|
|
|
|
//从数据库获取图片列表
|
|
|
|
getInvoicekImages_fromData(jsonData){
|
|
|
|
getInvoicekImages_fromData(jsonData) {
|
|
|
|
let arrLen = jsonData.length;
|
|
|
|
let arrLen = jsonData.length;
|
|
|
|
let arrPicList = jsonData.map((data,index)=>{
|
|
|
|
let arrPicList = jsonData.map((data, index) => {
|
|
|
|
const GMD_Pic = data.GMD_Pic;
|
|
|
|
const GMD_Pic = data.GMD_Pic;
|
|
|
|
let picList = [];
|
|
|
|
let picList = [];
|
|
|
|
if (isNotEmpty(GMD_Pic)){
|
|
|
|
if (isNotEmpty(GMD_Pic)) {
|
|
|
|
let js_Pic = JSON.parse(GMD_Pic)
|
|
|
|
let js_Pic = JSON.parse(GMD_Pic);
|
|
|
|
picList = js_Pic.map((picData,pic_Index)=>{
|
|
|
|
picList = js_Pic.map((picData, pic_Index) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
uid: -pic_Index, //用负数,防止添加删除的时候错误
|
|
|
|
uid: -pic_Index, //用负数,防止添加删除的时候错误
|
|
|
|
name: '',
|
|
|
|
name: "",
|
|
|
|
status: "done",
|
|
|
|
status: "done",
|
|
|
|
url: picData.url,
|
|
|
|
url: picData.url,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (data.GMD_Dealed == false && arrLen == (index+1)){
|
|
|
|
if (data.GMD_Dealed == false && arrLen == index + 1) {
|
|
|
|
|
|
|
|
this.invoicekImages = picList;
|
|
|
|
this.invoicekImages = picList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return picList;
|
|
|
|
return picList;
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
runInAction(() => {
|
|
|
|
|
|
|
|
this.invoicePicList = arrPicList;
|
|
|
|
runInAction(()=>{
|
|
|
|
});
|
|
|
|
this.invoicePicList = arrPicList;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取数据库的表单默认数据回填。
|
|
|
|
|
|
|
|
getFormData(jsonData){
|
|
|
|
|
|
|
|
let arrLen = jsonData.length;
|
|
|
|
|
|
|
|
return jsonData.map((data,index)=>{
|
|
|
|
|
|
|
|
if (data.GMD_Dealed == false && arrLen == (index+1)){ //只有最后一条账单未审核通过才显示
|
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
|
|
|
|
this.invoiceFormData = {'info_money':data.GMD_Cost,'info_Currency':data.GMD_Currency,'info_date':isNotEmpty(data.GMD_PayDate)?dayjs(data.GMD_PayDate):''};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取数据库的表单默认数据回填。
|
|
|
|
|
|
|
|
getFormData(jsonData) {
|
|
|
|
|
|
|
|
let arrLen = jsonData.length;
|
|
|
|
|
|
|
|
return jsonData.map((data, index) => {
|
|
|
|
|
|
|
|
if (data.GMD_Dealed == false && arrLen == index + 1) {
|
|
|
|
|
|
|
|
//只有最后一条账单未审核通过才显示
|
|
|
|
|
|
|
|
runInAction(() => {
|
|
|
|
|
|
|
|
this.invoiceFormData = { info_money: data.GMD_Cost, info_Currency: data.GMD_Currency, info_date: isNotEmpty(data.GMD_PayDate) ? dayjs(data.GMD_PayDate) : "" };
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
removeFeedbackImages(fileurl) {
|
|
|
|
removeFeedbackImages(fileurl) {
|
|
|
|
let url = `/service-fileServer/FileDelete`;
|
|
|
|
let url = `/service-fileServer/FileDelete`;
|
|
|
|
url += `?fileurl=${fileurl}`;
|
|
|
|
url += `?fileurl=${fileurl}`;
|
|
|
|
return fetch(config.HT_HOST + url)
|
|
|
|
return fetch(config.HT_HOST + url)
|
|
|
@ -198,78 +191,68 @@ class Invoice {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postEditInvoiceDetail(GMD_SN, Currency, Cost, PayDate, Pic, Memo) {
|
|
|
|
|
|
|
|
let postUrl = HT_HOST + "/service-cusservice/EditSupplierFK";
|
|
|
|
|
|
|
|
let formData = new FormData();
|
|
|
|
|
|
|
|
formData.append("LMI_SN", this.root.authStore.login.userId);
|
|
|
|
|
|
|
|
formData.append("GMD_SN", GMD_SN);
|
|
|
|
|
|
|
|
formData.append("Currency", Currency);
|
|
|
|
|
|
|
|
formData.append("Cost", Cost);
|
|
|
|
|
|
|
|
formData.append("PayDate", isNotEmpty(PayDate) ? PayDate : "");
|
|
|
|
|
|
|
|
formData.append("Pic", Pic);
|
|
|
|
|
|
|
|
formData.append("Memo", Memo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return postForm(postUrl, formData).then(json => {
|
|
|
|
|
|
|
|
console.info(json);
|
|
|
|
|
|
|
|
return json;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
postEditInvoiceDetail(GMD_SN,Currency,Cost,PayDate,Pic,Memo){
|
|
|
|
postAddInvoice(GRI_SN, Currency, Cost, PayDate, Pic, Memo) {
|
|
|
|
let postUrl = HT_HOST + '/service-cusservice/EditSupplierFK';
|
|
|
|
let postUrl = HT_HOST + "/service-cusservice/AddSupplierFK";
|
|
|
|
let formData = new FormData();
|
|
|
|
let formData = new FormData();
|
|
|
|
formData.append('LMI_SN', this.root.authStore.login.userId);
|
|
|
|
formData.append("LMI_SN", this.root.authStore.login.userId);
|
|
|
|
formData.append('GMD_SN', GMD_SN);
|
|
|
|
formData.append("VEI_SN", this.root.authStore.login.travelAgencyId);
|
|
|
|
formData.append('Currency', Currency);
|
|
|
|
formData.append("GRI_SN", GRI_SN);
|
|
|
|
formData.append('Cost', Cost);
|
|
|
|
formData.append("Currency", Currency);
|
|
|
|
formData.append('PayDate', isNotEmpty(PayDate)?PayDate:'' );
|
|
|
|
formData.append("Cost", Cost);
|
|
|
|
formData.append('Pic', Pic);
|
|
|
|
formData.append("PayDate", isNotEmpty(PayDate) ? PayDate : "");
|
|
|
|
formData.append('Memo', Memo);
|
|
|
|
formData.append("Pic", Pic);
|
|
|
|
|
|
|
|
formData.append("Memo", Memo);
|
|
|
|
return postForm(postUrl,formData)
|
|
|
|
return postForm(postUrl, formData).then(json => {
|
|
|
|
.then(json=>{
|
|
|
|
console.info(json);
|
|
|
|
console.info(json);
|
|
|
|
return json;
|
|
|
|
return json;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postAddInvoice(GRI_SN,Currency,Cost,PayDate,Pic,Memo){
|
|
|
|
|
|
|
|
let postUrl = HT_HOST + '/service-cusservice/AddSupplierFK';
|
|
|
|
|
|
|
|
let formData = new FormData();
|
|
|
|
|
|
|
|
formData.append('LMI_SN', this.root.authStore.login.userId);
|
|
|
|
|
|
|
|
formData.append('VEI_SN', this.root.authStore.login.travelAgencyId);
|
|
|
|
|
|
|
|
formData.append('GRI_SN', GRI_SN);
|
|
|
|
|
|
|
|
formData.append('Currency', Currency);
|
|
|
|
|
|
|
|
formData.append('Cost', Cost);
|
|
|
|
|
|
|
|
formData.append('PayDate', isNotEmpty(PayDate)?PayDate:'' );
|
|
|
|
|
|
|
|
formData.append('Pic', Pic);
|
|
|
|
|
|
|
|
formData.append('Memo', Memo);
|
|
|
|
|
|
|
|
return postForm(postUrl,formData)
|
|
|
|
|
|
|
|
.then(json=>{
|
|
|
|
|
|
|
|
console.info(json);
|
|
|
|
|
|
|
|
return json;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
invoicePage = {
|
|
|
|
|
|
|
|
current:1,
|
|
|
|
|
|
|
|
size:10,
|
|
|
|
|
|
|
|
total:0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 测试数据 */
|
|
|
|
|
|
|
|
//账单列表范例数据
|
|
|
|
|
|
|
|
testData=
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"GSMSN":449865,
|
|
|
|
|
|
|
|
"gmd_gri_sn":334233,
|
|
|
|
|
|
|
|
"gmd_vei_sn":628,
|
|
|
|
|
|
|
|
"GetDate":"2023-04-2 00:33:33",
|
|
|
|
|
|
|
|
"GMD_FillWorkers_SN":8617,
|
|
|
|
|
|
|
|
"GMD_FWks_LastEditTime":"2023-04-26 12:33:33",
|
|
|
|
|
|
|
|
"GMD_VerifyUser_SN":8928,
|
|
|
|
|
|
|
|
"GMD_Dealed":1,
|
|
|
|
|
|
|
|
"GMD_VRequestVerify":1,
|
|
|
|
|
|
|
|
"TotalCount":22,
|
|
|
|
|
|
|
|
"LeftGDate":"2023-03-30 00:00:00",
|
|
|
|
|
|
|
|
"GMD_FillWorkers_Name":"",
|
|
|
|
|
|
|
|
"GroupName":" 中华游230501-CA230402033",
|
|
|
|
|
|
|
|
"AllMoney":3539,
|
|
|
|
|
|
|
|
"PersonNum":"1大1小",
|
|
|
|
|
|
|
|
"VName":""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
invoicePage = {
|
|
|
|
|
|
|
|
current: 1,
|
|
|
|
|
|
|
|
size: 10,
|
|
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 测试数据 */
|
|
|
|
|
|
|
|
//账单列表范例数据
|
|
|
|
|
|
|
|
testData = [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
GSMSN: 449865,
|
|
|
|
|
|
|
|
gmd_gri_sn: 334233,
|
|
|
|
|
|
|
|
gmd_vei_sn: 628,
|
|
|
|
|
|
|
|
GetDate: "2023-04-2 00:33:33",
|
|
|
|
|
|
|
|
GMD_FillWorkers_SN: 8617,
|
|
|
|
|
|
|
|
GMD_FWks_LastEditTime: "2023-04-26 12:33:33",
|
|
|
|
|
|
|
|
GMD_VerifyUser_SN: 8928,
|
|
|
|
|
|
|
|
GMD_Dealed: 1,
|
|
|
|
|
|
|
|
GMD_VRequestVerify: 1,
|
|
|
|
|
|
|
|
TotalCount: 22,
|
|
|
|
|
|
|
|
LeftGDate: "2023-03-30 00:00:00",
|
|
|
|
|
|
|
|
GMD_FillWorkers_Name: "",
|
|
|
|
|
|
|
|
GroupName: " 中华游230501-CA230402033",
|
|
|
|
|
|
|
|
AllMoney: 3539,
|
|
|
|
|
|
|
|
PersonNum: "1大1小",
|
|
|
|
|
|
|
|
VName: "",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default Invoice;
|
|
|
|
export default Invoice;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|