|
@@ -8,8 +8,8 @@
|
|
|
<hr style='background-color:#5555; height:1px; border:none;' />
|
|
|
<div>
|
|
|
<el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
|
|
|
- <div style="display: flex;">
|
|
|
- <div style="width: 25%;">
|
|
|
+ <div style="display: flex;flex-wrap: wrap;">
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="团组名称:" label-width="160px">
|
|
|
<el-select v-model="DiIdSelect" clearable filterable placeholder="团组选择"
|
|
|
@change="DecreasePaymentsChange" :disabled="isShow" style="width: 100%;">
|
|
@@ -19,19 +19,19 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="团 号:" prop="tourCode" label-width="160px">
|
|
|
<el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="客户:" prop="clientName" label-width="160px">
|
|
|
<el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
|
|
|
<el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
|
|
|
</el-input>
|
|
@@ -42,29 +42,73 @@
|
|
|
<el-form :model="DecreasePaymentsData" ref="DecreasePaymentsData" :rules="DecreasePaymentsRules"
|
|
|
label-width="100px" class="demo-ruleForm">
|
|
|
<div style="display:flex ;flex-wrap: wrap;">
|
|
|
- <div style="width: 25%;">
|
|
|
+ <!-- <div style="width: 394px;">
|
|
|
+ <el-form-item label="团组类型:" prop="clientName" label-width="160px">
|
|
|
+ <el-input placeholder="团组类型" v-model="delegationInfo.clientName" :disabled="true">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div> -->
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="费用名称:" prop="priceName" label-width="160px">
|
|
|
<el-input placeholder="费用名称" v-model="DecreasePaymentsData.priceName">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
- <el-form-item label="费用金额:" prop="currency" label-width="160px">
|
|
|
- <el-input placeholder="费用金额" v-model="DecreasePaymentsData.price" style="width: 56%;">
|
|
|
- </el-input>
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="费用单价:" prop="currency" label-width="160px">
|
|
|
+ <el-input-number @blur="Sumup" style="width:56%" :precision="2" placeholder="费用金额" v-model="DecreasePaymentsData.price" :controls='false'>
|
|
|
+ </el-input-number>
|
|
|
+ <!-- <el-input placeholder="费用单价" v-model="DecreasePaymentsData.price" style="width: 56%;">
|
|
|
+ </el-input> -->
|
|
|
<el-select v-model="DecreasePaymentsData.currency" style="width: 40%;">
|
|
|
<el-option v-for="item in rateList" :key="item.currencyId" :label="item.currencyCode"
|
|
|
:value="item.currencyId"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
- <el-form-item label="收款方:" prop="payee" label-width="160px">
|
|
|
- <el-input placeholder="收款方" v-model="DecreasePaymentsData.payee">
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="数量:" prop="quantity" label-width="160px">
|
|
|
+ <el-input-number @blur="Sumup" style="width:100%" :precision="2" placeholder="数量" v-model="DecreasePaymentsData.quantity" :controls='false'>
|
|
|
+ </el-input-number>
|
|
|
+ <!-- <el-input placeholder="数量" v-model="DecreasePaymentsData.payee">
|
|
|
+ </el-input> -->
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="供应商全称:" prop="supplierName" label-width="160px">
|
|
|
+ <el-input placeholder="供应商全称" v-model="DecreasePaymentsData.supplierName">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
+ <div v-if="eventspd" style="width: 394px;">
|
|
|
+ <el-form-item label="供应商类型:" prop="supplierTypeId" label-width="160px">
|
|
|
+ <el-select v-model="DecreasePaymentsData.supplierTypeId" placeholder="供应商类型"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option v-for="(item,index) in suppliertype" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="供应商地区:" prop="supplierArea" label-width="160px">
|
|
|
+ <el-select v-model="DecreasePaymentsData.supplierArea" placeholder="供应商地区"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option v-for="(item,index) in supplierRegion" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="联系人:" prop="supplierContact" label-width="160px">
|
|
|
+ <el-input placeholder="联系人" v-model="DecreasePaymentsData.supplierContact">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="联系电话:" prop="supplierContactNumber" label-width="160px">
|
|
|
+ <el-input placeholder="联系电话" v-model="DecreasePaymentsData.supplierContactNumber">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="费用标识:" prop="orbitalPrivateTransfer" label-width="160px">
|
|
|
<el-select v-model="DecreasePaymentsData.orbitalPrivateTransfer" placeholder="费用标识"
|
|
|
style="width: 100%;">
|
|
@@ -75,7 +119,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div style="width: 25%;">
|
|
|
+ <div style="width: 394px;">
|
|
|
<el-form-item label="支付方式:" prop="payDId" label-width="160px">
|
|
|
<el-select v-model="DecreasePaymentsData.payDId" placeholder="支付方式" style="width: 100%;">
|
|
|
<el-option v-for="item in payment" :key="item.id" :label="item.name" :value="item.id">
|
|
@@ -83,6 +127,16 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
+ <div style="width: 394px;">
|
|
|
+ <el-form-item label="费用总价:" label-width="160px">
|
|
|
+ <el-input-number disabled style="width:56%" :precision="2" placeholder="费用总价" v-model="DecreasePaymentsData.feeTotal" :controls='false'>
|
|
|
+ </el-input-number>
|
|
|
+ <el-select disabled v-model="DecreasePaymentsData.currency" style="width: 40%;">
|
|
|
+ <el-option v-for="item in rateList" :key="item.currencyId" :label="item.currencyCode"
|
|
|
+ :value="item.currencyId"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div style="display: flex;">
|
|
|
<div>
|
|
@@ -121,6 +175,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { Decimal } from 'decimal.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -139,18 +194,24 @@ export default {
|
|
|
delegationInfoList: [],//团组下拉框
|
|
|
payment: [],//支付方式下拉框
|
|
|
DecreasePaymentsData: {
|
|
|
- status: 0,
|
|
|
- payDId: 72,
|
|
|
- orbitalPrivateTransfer: 0,
|
|
|
- payee: "",
|
|
|
- id: 0,
|
|
|
- diId: 0,
|
|
|
- priceName: "",
|
|
|
- price: 0,
|
|
|
- currency: '',
|
|
|
- filePath: "",
|
|
|
- createUserId: 0,
|
|
|
- remark: ""
|
|
|
+ status: 0,//操作状态 1 添加 2 修改
|
|
|
+ payDId: 72,//支付方式
|
|
|
+ orbitalPrivateTransfer: 0,//费用表示
|
|
|
+ supplierName: "",//收款方
|
|
|
+ id: 0,//编号
|
|
|
+ diId: 0,//团组外键编号
|
|
|
+ priceName: "",//费用名称
|
|
|
+ price: 0,//费用金额
|
|
|
+ supplierContact:"",//联系人
|
|
|
+ supplierContactNumber:"",//联系电话
|
|
|
+ currency: '',//费用币种
|
|
|
+ filePath: "",//附件地址
|
|
|
+ createUserId: 0,//创建者Id
|
|
|
+ remark: "",//备注
|
|
|
+ supplierArea:1,//供应商地区
|
|
|
+ supplierTypeId:'',//供应商类型
|
|
|
+ quantity:0,//数量
|
|
|
+ feeTotal:0,//总计
|
|
|
},
|
|
|
IsAuditGM: 0,
|
|
|
Decrease: {},
|
|
@@ -166,8 +227,8 @@ export default {
|
|
|
priceName: [
|
|
|
{ required: true, message: '请输入费用名称', trigger: 'change' },
|
|
|
],
|
|
|
- payee: [
|
|
|
- { required: true, message: '请输入收款方姓名', trigger: 'change' },
|
|
|
+ supplierName: [
|
|
|
+ { required: true, message: '请输入供应商全称', trigger: 'change' },
|
|
|
],
|
|
|
orbitalPrivateTransfer: [
|
|
|
{ required: true, message: '请选择费用标识', trigger: 'change' },
|
|
@@ -175,9 +236,28 @@ export default {
|
|
|
payDId: [
|
|
|
{ required: true, message: '请选择支付方式', trigger: 'change' }
|
|
|
],
|
|
|
+ quantity: [
|
|
|
+ { required: true, message: '请输入数量', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ supplierContact: [
|
|
|
+ { required: true, message: '请输入联系人', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ supplierContactNumber: [
|
|
|
+ { required: true, message: '请输入联系人电话', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ supplierTypeId: [
|
|
|
+ { required: true, message: '请选择供应商类型', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ supplierArea: [
|
|
|
+ { required: true, message: '请选择供应商地区', trigger: 'change' }
|
|
|
+ ],
|
|
|
+
|
|
|
},
|
|
|
rateList: [],
|
|
|
- }
|
|
|
+ suppliertype:[],
|
|
|
+ supplierRegion:[],
|
|
|
+ eventspd:true,
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -202,10 +282,18 @@ export default {
|
|
|
for (let index = 0; index < that.delegationInfoList.length; index++) {
|
|
|
if (that.delegationInfoList[index].id == that.DiIdSelect) {
|
|
|
that.delegationInfo = that.delegationInfoList[index];
|
|
|
+ if(res.data.data.groupName[index].teamDid==302||res.data.data.groupName[index].teamDid==691||res.data.data.groupName[index].teamDid==762||res.data.data.groupName[index].teamDid==1047){
|
|
|
+ that.eventspd=true
|
|
|
+ }else{
|
|
|
+ that.eventspd=false
|
|
|
+ }
|
|
|
+ console.log(that.eventspd);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- that.payment = res.data.data.payment
|
|
|
+ that.payment = res.data.data.payment;
|
|
|
+ that.suppliertype = res.data.data.supplier;
|
|
|
+ that.supplierRegion = res.data.data.supplierArea;
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -225,13 +313,17 @@ export default {
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
-
|
|
|
- that.Decrease = res.data.data._Decrease
|
|
|
- that.CreditCard = res.data.data._CreditCard
|
|
|
- that.DecreasePaymentsData.payDId = that.CreditCard.payDId
|
|
|
- that.DecreasePaymentsData.orbitalPrivateTransfer = that.CreditCard.orbitalPrivateTransfer
|
|
|
- that.DecreasePaymentsData.payee = that.CreditCard.payee
|
|
|
+ that.Decrease = res.data.data
|
|
|
+ that.DecreasePaymentsData.payDId = that.Decrease.payDId
|
|
|
+ that.DecreasePaymentsData.orbitalPrivateTransfer = that.Decrease.orbitalPrivateTransfer
|
|
|
+ that.DecreasePaymentsData.supplierName = that.Decrease.supplierName
|
|
|
that.DecreasePaymentsData.id = that.Decrease.id
|
|
|
+ that.DecreasePaymentsData.supplierArea = that.Decrease.supplierArea
|
|
|
+ that.DecreasePaymentsData.supplierTypeId = that.Decrease.supplierTypeId
|
|
|
+ that.DecreasePaymentsData.supplierContact = that.Decrease.supplierContact
|
|
|
+ that.DecreasePaymentsData.supplierContactNumber = that.Decrease.supplierContactNumber
|
|
|
+ that.DecreasePaymentsData.quantity = that.Decrease.quantity
|
|
|
+ that.DecreasePaymentsData.feeTotal = that.Decrease.feeTotal
|
|
|
that.DecreasePaymentsData.diId = that.Decrease.diId
|
|
|
that.DecreasePaymentsData.priceName = that.Decrease.priceName
|
|
|
that.DecreasePaymentsData.price = that.Decrease.price
|
|
@@ -239,7 +331,7 @@ export default {
|
|
|
that.DecreasePaymentsData.filePath = that.Decrease.filePath
|
|
|
that.projectName = that.Decrease.filePath
|
|
|
that.DecreasePaymentsData.remark = that.Decrease.remark
|
|
|
- that.IsAuditGM = that.CreditCard.isAuditGM
|
|
|
+ that.IsAuditGM = that.Decrease.isAuditGM
|
|
|
if (that.Decrease.filePath != null && that.Decrease.filePath != undefined && that.Decrease.filePath != "") {
|
|
|
that.uploadFiles.push({
|
|
|
name: that.Decrease.filePath,
|
|
@@ -251,7 +343,6 @@ export default {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
//点击保存事件
|
|
|
addBtn() {
|
|
|
if (this.IsAuditGM == 1) {
|
|
@@ -376,11 +467,23 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //计算总价
|
|
|
+ Sumup(){
|
|
|
+ this.DecreasePaymentsData.feeTotal=new Decimal(this.DecreasePaymentsData.price*this.DecreasePaymentsData.quantity).toFixed(2);
|
|
|
+ },
|
|
|
DecreasePaymentsChange() {
|
|
|
this.QueryRate();
|
|
|
+ console.log(this.delegationInfo);
|
|
|
for (let index = 0; index < this.delegationInfoList.length; index++) {
|
|
|
if (this.delegationInfoList[index].id == parseInt(this.DiIdSelect)) {
|
|
|
this.delegationInfo = this.delegationInfoList[index];
|
|
|
+ console.log(this.delegationInfo);
|
|
|
+ if(this.delegationInfo.teamDid==302||this.delegationInfo.teamDid==691||this.delegationInfo.teamDid==762||this.delegationInfo.teamDid==1047){
|
|
|
+ this.eventspd=true
|
|
|
+ }else{
|
|
|
+ this.eventspd=false
|
|
|
+ }
|
|
|
+ console.log(this.eventspd);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -558,6 +661,7 @@ export default {
|
|
|
padding: 20px;
|
|
|
box-shadow: 0 0 5px #0005;
|
|
|
border-radius: 10px;
|
|
|
+ min-height: 810px;
|
|
|
}
|
|
|
|
|
|
@media screen and (max-width: 1700px) {
|