|
@@ -0,0 +1,643 @@
|
|
|
+<template>
|
|
|
+ <div class="car_add">
|
|
|
+ <div>
|
|
|
+ <div class="communal-title">
|
|
|
+ <div>{{ title }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <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%;">
|
|
|
+ <el-form-item label="团组名称:" label-width="160px">
|
|
|
+ <el-select v-model="DiIdSelect" clearable filterable placeholder="团组选择"
|
|
|
+ @change="DecreasePaymentsChange" :disabled="isShow" style="width: 220px;">
|
|
|
+ <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <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%;">
|
|
|
+ <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%;">
|
|
|
+ <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
|
|
|
+ <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <el-form :model="InvitationOfficialActivities" ref="InvitationOfficialActivities"
|
|
|
+ :rules="InvitationOfficialActivitiesRules" label-width="100px" class="demo-ruleForm">
|
|
|
+ <div style="display:flex ;">
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="邀请方地区:" prop="inviterArea" label-width="160px">
|
|
|
+ <el-input placeholder="邀请方地区" v-model="InvitationOfficialActivities.inviterArea">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="邀请方:" prop="inviter" label-width="160px">
|
|
|
+ <el-input placeholder="邀请方" v-model="InvitationOfficialActivities.inviter">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="邀请时间:" prop="inviteTime" label-width="160px">
|
|
|
+ <el-date-picker v-model="InvitationOfficialActivities.inviteTime" type="date"
|
|
|
+ placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="是否到场:" prop="isGoOfficaiaBussiness" label-width="160px">
|
|
|
+ <el-radio-group v-model="InvitationOfficialActivities.isGoOfficaiaBussiness">
|
|
|
+ <el-radio :label=1>是</el-radio>
|
|
|
+ <el-radio :label=0>否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex ;">
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="联系人:" prop="contact" label-width="160px">
|
|
|
+ <el-input placeholder="联系人" v-model="InvitationOfficialActivities.contact">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="联系电话:" prop="tel" label-width="160px">
|
|
|
+ <el-input placeholder="联系电话" v-model="InvitationOfficialActivities.tel">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="电子邮箱:" prop="email" label-width="160px">
|
|
|
+ <el-input placeholder="电子邮箱" v-model="InvitationOfficialActivities.email">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="传真号码:" prop="fax" label-width="160px">
|
|
|
+ <el-input placeholder="传真号码" v-model="InvitationOfficialActivities.fax">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div style="width: 50%;">
|
|
|
+ <el-form-item label="邀请方地址:" prop="address" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="5" placeholder="邀请方地址"
|
|
|
+ v-model="InvitationOfficialActivities.address"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%;">
|
|
|
+ <el-form-item label="其他信息:" prop="otherInformation" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="5" placeholder="其他信息"
|
|
|
+ v-model="InvitationOfficialActivities.otherInformation"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex ;">
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="邀请费用:" prop="inviteCosts" label-width="160px">
|
|
|
+ <el-input placeholder="邀请费用" v-model="InvitationOfficialActivities.inviteCosts"
|
|
|
+ style="width: 58%;">
|
|
|
+ </el-input>
|
|
|
+ <el-select v-model="InvitationOfficialActivities.currency" style="width: 40%;">
|
|
|
+ <el-option key="48" label="CNY" :value="48"></el-option>
|
|
|
+ <el-option key="49" label="USD" :value="49"></el-option>
|
|
|
+ <el-option key="51" label="EUR" :value="51"></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="InvitationOfficialActivities.payee">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="费用标识:" prop="orbitalPrivateTransfer">
|
|
|
+ <el-select v-model="InvitationOfficialActivities.orbitalPrivateTransfer" placeholder="费用标识"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option key="0" label="公转" :value=0>
|
|
|
+ </el-option>
|
|
|
+ <el-option key="1" label="私转" :value=1>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="支付方式:" prop="payDId">
|
|
|
+ <el-select v-model="InvitationOfficialActivities.payDId" placeholder="支付方式">
|
|
|
+ <el-option v-for="item in payment" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="快递费:" prop="sendCost" label-width="160px">
|
|
|
+ <el-input placeholder="快递费" v-model="InvitationOfficialActivities.sendCost">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 25%;">
|
|
|
+ <el-form-item label="附件:" prop="fileUrl" label-width="160px">
|
|
|
+ <el-upload :file-list="uploadFiles" ref="upload" :on-success="upLoadSuccess"
|
|
|
+ :on-error="upLoadError" :before-remove="beforeRemove" :on-change="onChange" :limit="1"
|
|
|
+ :on-exceed="exceed" :action="uploadURL" :headers="headers" :auto-upload="false">
|
|
|
+ <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
+ <!-- <el-button style="margin-left: 10px;" size="small" type="success"
|
|
|
+ @click="submitUpload">上传到服务器</el-button> -->
|
|
|
+ </el-upload>
|
|
|
+
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div style="width: 90%;">
|
|
|
+ <el-form-item label="备 注:" prop="remark" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="5" placeholder="备注"
|
|
|
+ v-model="InvitationOfficialActivities.remark"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-form-item>
|
|
|
+ <div style="margin-left: 60%;">
|
|
|
+ <el-button type="primary" @click="addBtn">保存</el-button>
|
|
|
+ <router-link to='/home/InvitationOfficialActivities'>
|
|
|
+ <el-button>取消</el-button>
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ uploadURL: "http://132.232.92.186:8888/api/Groups/UploadProject",
|
|
|
+ projectName: "",
|
|
|
+ uploadFiles: [],//上传的文件列表
|
|
|
+ DelfileName: "",
|
|
|
+ title: "新增商邀费用",
|
|
|
+ token: '',
|
|
|
+ userId: 0,
|
|
|
+ id: '',
|
|
|
+ DiId: '',
|
|
|
+ isShow: false,
|
|
|
+ DiIdSelect: '',
|
|
|
+ delegationInfo: {},
|
|
|
+ IsAuditGM: 0,
|
|
|
+ delegationInfoList: [],//团组下拉框
|
|
|
+ payment: [],//支付方式下拉框
|
|
|
+ InvitationOfficialActivities: {
|
|
|
+ status: 0,
|
|
|
+ payDId: 73,
|
|
|
+ orbitalPrivateTransfer: 0,
|
|
|
+ payee: '',
|
|
|
+ id: 0,
|
|
|
+ diId: '',
|
|
|
+ inviterArea: '',
|
|
|
+ inviter: '',
|
|
|
+ inviteTime: this.dateFormat(new Date()),
|
|
|
+ attachment: '',
|
|
|
+ inviteCosts: 0,
|
|
|
+ currency: 48,
|
|
|
+ sendCost: 0,
|
|
|
+ isGoOfficaiaBussiness: 0,
|
|
|
+ createUserId: 0,
|
|
|
+ remark: '',
|
|
|
+ address: '',
|
|
|
+ contact: '',
|
|
|
+ job: '',
|
|
|
+ tel: '',
|
|
|
+ email: '',
|
|
|
+ fax: '',
|
|
|
+ otherInformation: ''
|
|
|
+ },
|
|
|
+ headers: {
|
|
|
+ Authorization: JSON.parse(localStorage.getItem('userinif')).token,
|
|
|
+ TypeName: "B"
|
|
|
+ },
|
|
|
+ InvitationOfficialActivitiesRules: {
|
|
|
+ inviteCosts: [
|
|
|
+ { required: true, message: '请输入费用金额', trigger: 'blur' },
|
|
|
+ { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
|
|
|
+ ],
|
|
|
+ inviterArea: [
|
|
|
+ { required: true, message: '请输入邀请方地区', trigger: 'change' },
|
|
|
+ { required: true, message: '请输入邀请方地区', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ inviter: [
|
|
|
+ { required: true, message: '请输入邀请方', trigger: 'change' },
|
|
|
+ { required: true, message: '请输入邀请方', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ inviteTime: [
|
|
|
+ { required: true, message: '请选择邀请时间', trigger: 'change' },
|
|
|
+ { required: true, message: '请选择邀请时间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ contact: [
|
|
|
+ { required: true, message: '请输入联系人', trigger: 'change' },
|
|
|
+ { required: true, message: '请输入联系人', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ tel: [
|
|
|
+ { required: true, message: '请输入联系方式', trigger: 'change' },
|
|
|
+ { required: true, message: '请输入联系方式', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ address: [
|
|
|
+ { required: true, message: '请输入邀请方地址', trigger: 'change' },
|
|
|
+ { required: true, message: '请输入邀请方地址', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ payee: [
|
|
|
+ { required: true, message: '请输入收款方', trigger: 'change' },
|
|
|
+ { required: true, message: '请输入收款方', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //团组下拉框
|
|
|
+ AirTicketResSelect() {
|
|
|
+ var url = "/api/Groups/DecreasePaymentsSelect"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ userId: that.userId,
|
|
|
+ ctId: 81
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.delegationInfoList = res.data.data.groupName;
|
|
|
+ that.DiIdSelect = parseInt(that.DiId)
|
|
|
+ for (let index = 0; index < that.delegationInfoList.length; index++) {
|
|
|
+ if (that.delegationInfoList[index].id == that.DiIdSelect) {
|
|
|
+ that.delegationInfo = that.delegationInfoList[index];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.payment = res.data.data.payment
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ InvitationOfficialActivitiesById() {
|
|
|
+ var url = "/api/Groups/InvitationOfficialActivitiesById"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ Id: that.id
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ console.log(res.data.data)
|
|
|
+ that.InvitationOfficialActivities.payDId = res.data.data._CreditCard.payDId
|
|
|
+ that.InvitationOfficialActivities.orbitalPrivateTransfer = res.data.data._CreditCard.orbitalPrivateTransfer
|
|
|
+ that.InvitationOfficialActivities.payee = res.data.data._CreditCard.payee
|
|
|
+ that.InvitationOfficialActivities.id = res.data.data._Invitation.id
|
|
|
+ that.InvitationOfficialActivities.diId = res.data.data._Invitation.diId
|
|
|
+ that.InvitationOfficialActivities.inviterArea = res.data.data._Invitation.inviterArea
|
|
|
+ that.InvitationOfficialActivities.inviter = res.data.data._Invitation.inviter
|
|
|
+ that.InvitationOfficialActivities.inviteTime = res.data.data._Invitation.inviteTime
|
|
|
+ that.InvitationOfficialActivities.attachment = res.data.data._Invitation.attachment
|
|
|
+ that.projectName = res.data.data._Invitation.attachment
|
|
|
+ that.InvitationOfficialActivities.inviteCosts = res.data.data._Invitation.inviteCosts
|
|
|
+ that.InvitationOfficialActivities.currency = res.data.data._Invitation.currency
|
|
|
+ that.InvitationOfficialActivities.sendCost = res.data.data._Invitation.sendCost
|
|
|
+ that.InvitationOfficialActivities.isGoOfficaiaBussiness = res.data.data._Invitation.isGoOfficaiaBussiness
|
|
|
+ that.InvitationOfficialActivities.remark = res.data.data._Invitation.remark
|
|
|
+ that.InvitationOfficialActivities.address = res.data.data._InvitationData.address
|
|
|
+ that.InvitationOfficialActivities.contact = res.data.data._InvitationData.contact
|
|
|
+ that.InvitationOfficialActivities.job = res.data.data._InvitationData.job
|
|
|
+ that.InvitationOfficialActivities.tel = res.data.data._InvitationData.tel
|
|
|
+ debugger
|
|
|
+ that.IsAuditGM = res.data.data._CreditCard.isAuditGM;
|
|
|
+ that.InvitationOfficialActivities.email = res.data.data._InvitationData.email
|
|
|
+ that.InvitationOfficialActivities.fax = res.data.data._InvitationData.fax
|
|
|
+ that.InvitationOfficialActivities.otherInformation = res.data.data._InvitationData.remark
|
|
|
+ if (that.InvitationOfficialActivities.attachment != null && that.InvitationOfficialActivities.attachment != undefined && that.InvitationOfficialActivities.attachment != "") {
|
|
|
+ that.uploadFiles.push({
|
|
|
+ name: that.InvitationOfficialActivities.attachment,
|
|
|
+ url: 'http://132.232.92.186:24/Office/GrpFile/商邀相关文件/',
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ //点击保存事件
|
|
|
+ addBtn() {
|
|
|
+ if (this.IsAuditGM == 1) {
|
|
|
+ this.$message.error('已通过审核,不可修改!');
|
|
|
+ } else {
|
|
|
+ if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
|
|
|
+ this.$message.error("请选择团组名称");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const that = this;
|
|
|
+ that.$refs.InvitationOfficialActivities.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (that.InvitationOfficialActivities.attachment == that.projectName) {
|
|
|
+ if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: "/api/Groups/DelFile",
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ fileName: that.DelfileName,
|
|
|
+ id: that.id
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ that.InvitationOfficialActivities.attachment = that.projectName
|
|
|
+ that.InvitationOfficialActivities.diId = that.DiIdSelect;
|
|
|
+ that.InvitationOfficialActivities.createUserId = that.userId;
|
|
|
+ var url = "/api/Groups/OpInvitationOfficialActivities"
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: that.InvitationOfficialActivities
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.loading = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$router.push('/home/InvitationOfficialActivities')
|
|
|
+ }, 3000);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: "/api/Groups/DelFile",
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ fileName: that.DelfileName,
|
|
|
+ id: that.id
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (that.projectName != "" && that.projectName != null && that.projectName != undefined) {
|
|
|
+ that.$refs.upload.submit();//上传文件到服务器
|
|
|
+ } else {
|
|
|
+ that.InvitationOfficialActivities.attachment = that.projectName
|
|
|
+ that.InvitationOfficialActivities.diId = that.DiIdSelect;
|
|
|
+ that.InvitationOfficialActivities.createUserId = that.userId;
|
|
|
+ var url = "/api/Groups/OpInvitationOfficialActivities"
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: that.InvitationOfficialActivities
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.loading = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$router.push('/home/InvitationOfficialActivities')
|
|
|
+ }, 3000);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('请完善信息在保存!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 此时必填完成,做保存后的业务操作
|
|
|
+ },
|
|
|
+ DecreasePaymentsChange() {
|
|
|
+ for (let index = 0; index < this.delegationInfoList.length; index++) {
|
|
|
+ if (this.delegationInfoList[index].id == parseInt(this.DiIdSelect)) {
|
|
|
+ this.delegationInfo = this.delegationInfoList[index];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //上传
|
|
|
+ // 文件超出限制
|
|
|
+ exceed(files, fileList) {
|
|
|
+ this.$message.warning(
|
|
|
+ `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
|
|
|
+ } 个文件,请取消要替换的文件`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //文件上传成功时的钩子
|
|
|
+ upLoadSuccess(response, file, fileList) {
|
|
|
+ if (response.code == 200) {
|
|
|
+ debugger
|
|
|
+ var that = this;
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: "/api/Groups/DelFile",
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ fileName: that.DelfileName,
|
|
|
+ id: that.id
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ debugger
|
|
|
+ that.InvitationOfficialActivities.attachment = response.data
|
|
|
+ that.InvitationOfficialActivities.diId = that.DiIdSelect;
|
|
|
+ that.InvitationOfficialActivities.createUserId = that.userId;
|
|
|
+ var url = "/api/Groups/OpInvitationOfficialActivities"
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: that.InvitationOfficialActivities
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.loading = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$router.push('/home/InvitationOfficialActivities')
|
|
|
+ }, 3000);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log("上传成功");
|
|
|
+ } else {
|
|
|
+ console.log("保存失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //文件上传失败时的钩子
|
|
|
+ upLoadError(response, file, fileList) {
|
|
|
+ console.log("项目添加失败");
|
|
|
+ },
|
|
|
+ beforeRemove(file, fileList) {
|
|
|
+ debugger
|
|
|
+ console.log(file.name)
|
|
|
+ let id1 = this.uploadFiles.findIndex(item => {
|
|
|
+ if (item.name == file.name) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.uploadFiles.splice(id1, 1)
|
|
|
+ this.projectName = ""
|
|
|
+ this.DelfileName = file.name
|
|
|
+ },
|
|
|
+ onChange(file, fileList) {
|
|
|
+ debugger
|
|
|
+ this.projectName = file.name
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ mounted() {
|
|
|
+
|
|
|
+ this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
+ this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
|
|
|
+ this.AirTicketResSelect();
|
|
|
+ this.id = this.$route.query.id
|
|
|
+ if (this.id != null && this.id != undefined && this.id != 0) {
|
|
|
+ this.InvitationOfficialActivitiesById();
|
|
|
+ this.title = "修改商邀费用";
|
|
|
+ this.InvitationOfficialActivities.status = 2
|
|
|
+ this.isShow = true
|
|
|
+ } else {
|
|
|
+ this.InvitationOfficialActivities.status = 1
|
|
|
+ this.title = "新增商邀费用"
|
|
|
+ this.isShow = false
|
|
|
+ }
|
|
|
+ this.DiId = this.$route.query.DiId
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.communal-list {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 10px;
|
|
|
+ box-shadow: 0 0 5px #0005;
|
|
|
+ border-radius: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.car_add .communal-title {
|
|
|
+ display: flex;
|
|
|
+ font-size: 17px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #555;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.appraise-box {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 50px 0;
|
|
|
+}
|
|
|
+
|
|
|
+.appraise-box>div {
|
|
|
+ width: 30%;
|
|
|
+}
|
|
|
+
|
|
|
+.communal-box {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+
|
|
|
+.communal-box>button {
|
|
|
+ margin-left: 10px;
|
|
|
+ padding: 8px 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.car_add {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 20px;
|
|
|
+ box-shadow: 0 0 5px #0005;
|
|
|
+ border-radius: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+@media screen and (max-width: 1700px) {
|
|
|
+ .appraise-box>div {
|
|
|
+ width: 48%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .appraise-box>div el-form-item__content {
|
|
|
+ width: 260px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|