Commit 048e1925 authored by 黄奎's avatar 黄奎

11

parent 2100ba51
......@@ -977,6 +977,7 @@
</tr>
<tr>
<td colspan="2">
<el-form-item :label="$t('Operation.Op_zhu')+`OP`">
{{postConfig.OPName}}
</el-form-item>
......@@ -1002,7 +1003,7 @@
</template>
</el-form-item>
</td>
<td colspan="6">
<td colspan="2">
{{$t('objFill.fj')}}: <template v-if="teamPrice.ContractArray&& teamPrice.ContractArray.length>0">
<template v-for="(subItem,subIndex) in teamPrice.ContractArray">
<a style="margin-left:20px;color:blue;cursor:pointer;" target="_blank" :key="subIndex"
......@@ -1010,6 +1011,23 @@
</template>
</template>
</td>
<td colspan="4">
账单: <el-upload
v-if="teamPrice&&(!teamPrice.OfferBillArray || !teamPrice.OfferBillArray.length) && isUploadAuth"
class="upload-demo" style="display:inline-block;position:relative;top:-1px;left:3px;"
:http-request="UploadAttachment" :show-file-list="false" action="">
<el-button size="small" type="primary">账单附件</el-button>
</el-upload>
<template v-if="teamPrice.OfferBillArray&& teamPrice.OfferBillArray.length>0">
<template v-for="(subItem,subIndex) in teamPrice.OfferBillArray">
<a style="margin-left:20px;color:blue;cursor:pointer;" target="_blank" :key="subIndex"
@click="downloadFile(subItem.Url,subItem.Name)">{{subItem.Name}}</a>
&nbsp;<a v-if="isUploadAuth" @click="DeleteOfferBill(teamPrice.OfferBillArray,subIndex)"
style="cursor:pointer;color:red">删除</a>
</template>
</template>
</td>
</tr>
<tr>
<td>
......@@ -1559,6 +1577,7 @@
},
dialogDiningTitle: "行程变更",
selectDate: "", //当前选择时间
CurrentUserInfo: {}, //当前登录用户信息
}
},
watch: {
......@@ -1584,7 +1603,51 @@
changeOfferExchangeRate: changeOfferExchangeRate,
changeOfferOtherCost: changeOfferOtherCost,
},
computed: {
isUploadAuth: {
get() {
var isAuth = false;
if (this.postConfig) {
if (this.postConfig.OPId && this.CurrentUserInfo && this.postConfig.OPId == this.CurrentUserInfo
.EmployeeId) {
isAuth = true;
}
if (!isAuth && this.postConfig.Assistantlist && this.postConfig.Assistantlist.length > 0) {
this.postConfig.Assistantlist.forEach(aItem => {
if (!isAuth && aItem.Id == this.CurrentUserInfo.EmployeeId) {
isAuth = true;
}
})
}
}
return isAuth;
},
},
},
methods: {
//删除账单附件
DeleteOfferBill(offerBillArray, index) {
if (offerBillArray && offerBillArray.length > 0) {
offerBillArray.splice(index, 1);
}
that.SaveOfferBill(offerBillArray);
},
UploadAttachment(file) { //上传
var that = this;
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
var newUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.teamPrice.OfferBillArray.push({
Name: x.data.SourceFileName,
Url: newUrl
});
that.SaveOfferBill(this.teamPrice.OfferBillArray);
this.Success(this.$t('tips.scchenggong'))
});
},
calcPerPrice(total, Num) {
var perMoney = 0;
if (total && Num && Num != 0) {
......@@ -1683,6 +1746,10 @@
SubSaveType(type) {
this.$parent.SaveData(type);
},
//保存账单
SaveOfferBill(OfferBillArray) {
this.$parent.SaveOfferBill(OfferBillArray);
},
//每天小计
getDayXiaoJi(type, currencyType) {
var xiaoJi = 0;
......@@ -2021,6 +2088,7 @@
},
mounted() {
this.switchOffer();
this.CurrentUserInfo = this.getLocalStorage();
},
created() {
......
......@@ -16,7 +16,7 @@
:IsEdit="IsEdit" @success="refreshPage"></CostNewPriceAudit>
</div>
<div class="btnFixedDiv" v-if="haveData" style="margin:0 auto;">
<el-button @click="SaveTemporaryStorageData(5)" :loading="saveLoading"
<el-button @click="SaveTemporaryStorageData(5)" :loading="saveLoading"
style="background-color:#ffc2c2;color:#cc1212;font-size:12px;margin-left:7px;margin-top:10px;border:none;width:45px;height:45px;padding:0;">
暂存
</el-button>
......@@ -149,7 +149,7 @@
err => {}
);
},
//保存数据
//保存数据
SaveTemporaryStorageData(Type) {
this.saveLoading = true;
var nObj = {
......@@ -163,7 +163,6 @@
this.saveLoading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.goUrl('newQuotation');
} else {
this.Error(res.data.message);
}
......@@ -193,7 +192,7 @@
this.loading = false;
if (res.data.resultCode == 1) {
var tempData = res.data.data;
console.log("travel_get_PriceOfferInfo",tempData);
console.log("travel_get_PriceOfferInfo", tempData);
if (tempData.ID && tempData.ID > 0) {
this.postData.ID = tempData.ID;
}
......
......@@ -69,6 +69,7 @@
ManagerAduitName: "", //欧洲线审核人员
ManagerAduitStatus: 0, //欧洲线审核状态(1-通过,2-驳回)
OPName: "", //主OP
OPId:"",//编号
AssistantList: [], //助理OP
PriceTeamType: 0, //团队类型,
PriceTeamTypeName: "", //团队类型,
......@@ -118,6 +119,26 @@
err => {}
);
},
SaveOfferBill(OfferBillArray) {
var nObj = {
OfferId: this.$route.query.offerid,
BatchNum: this.$route.query.BatchNum,
OfferBillArray: OfferBillArray,
};
var cmdStr = "travel_post_UpdateOfferBillInfo";
this.loading = true;
this.apipost(cmdStr, nObj,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
goUrl(path) {
this.$router.push({
path: path,
......@@ -146,7 +167,7 @@
msg,
res => {
this.loading = false;
console.log("travel_get_PriceOfferInfo",res.data);
console.log("travel_get_PriceOfferInfo", res.data);
if (res.data.resultCode == 1) {
var tempData = res.data.data;
if (tempData.ID && tempData.ID > 0) {
......@@ -231,6 +252,9 @@
if (offerObj.OPName && offerObj.OPName != '') {
this.postData.OPName = offerObj.OPName;
}
if (offerObj.OPId) {
this.postData.OPId = offerObj.OPId;
}
if (offerObj.AssistantList && offerObj.AssistantList.length > 0) {
this.postData.Assistantlist = offerObj.AssistantList;
}
......
......@@ -406,8 +406,10 @@
BackVisaPrice: 0, //退签证费
BackSafeMoney: 0, //退保险费
ContractUrl: "", //合同地址
OfferBill:"",//账单地址
PriceRemark: "", //定价备注
ContractArray: [],
OfferBillArray:[],//账单附件列表
TaxPrice: 0, //税金
UnionPrice: 0, //联运价格
NightPrice: 0, //过夜费
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment