1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300 |
- <template>
- <div class="car_add visit-box">
- <div>
- <div class="communal-title">
- <div>{{ title }}</div>
- </div>
- <div class="ps-title">
- <span>PS:"请规范录入,未规范录入,造成公司损失或影响提成计算,需承担责任"</span>
- <!-- 客户名单 -->
- <el-popover
- placement="bottom"
- width="662"
- trigger="hover">
- <el-table max-height="600" border :data="rollcallarr">
- <el-table-column width="100" property="date" label="姓名">
- <template slot-scope="scope">
- {{ scope.row.lastName}}{{scope.row.firstName}}
- </template>
- </el-table-column>
- <el-table-column width="200" property="lastName" label="拼音">
- <template slot-scope="scope">
- {{ pinyingxing(scope.row.lastName) }}/{{ pinyingxing(scope.row.firstName) }}
- </template>
- </el-table-column>
- <el-table-column width="50" property="sex" label="性别">
- <template slot-scope="scope">
- {{ scope.row.sex==0?'男':'女'}}
- </template>
- </el-table-column>
- <el-table-column width="110" property="birthDay" label="生日">
- <template slot-scope="scope">
- {{ fgarr(scope.row.birthDay) }}
- </template>
- </el-table-column>
- <el-table-column width="200" property="idCardNo" label="身份证号码">
- <template slot-scope="scope">
- {{ scope.row.idCardNo }}
- </template>
- </el-table-column>
- </el-table>
- <span slot="reference" style="cursor: pointer;margin-left: 20px;">"移上查看客户名单"</span>
- </el-popover>
- </div>
- </div>
- <hr style='background-color:#5555; height:1px; border:none;margin: 8px 0;' />
- <div>
- <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
- <div style="display: flex;flex-wrap: wrap;">
- <div style="width: 385px;">
- <el-form-item label="团组名称:" label-width="160px">
- <el-select v-model="DiId" clearable filterable placeholder="团组选择" @change="DiIdChang"
- :disabled="isShow">
- <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: 385px;">
- <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: 385px;">
- <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: 385px;">
- <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="OpOfficialActivitiesDto" ref="OpOfficialActivitiesDto" :rules="OpOfficialActivitiesRules"
- label-width="100px" class="demo-ruleForm">
- <div style="display: flex;flex-wrap: wrap;">
- <div style="width: 385px;">
- <el-form-item label="国家:" prop="country" label-width="160px">
- <el-input clearable placeholder="国家" v-model="OpOfficialActivitiesDto.country">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="地区:" prop="area" label-width="160px">
- <el-input clearable placeholder="地区" v-model="OpOfficialActivitiesDto.area">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="公务单位:" prop="client" label-width="160px">
- <el-input clearable placeholder="公务单位" v-model="OpOfficialActivitiesDto.client">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="公务日期:" prop="date" label-width="160px">
- <el-date-picker
- value-format="yyyy-MM-dd"
- type="date"
- v-model="OpOfficialActivitiesDto.date"
- placeholder="选择日期">
- </el-date-picker>
-
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="公务时刻:" prop="time" label-width="160px">
- <el-time-picker v-model="OpOfficialActivitiesDto.time" format='HH:mm' value-format="HH:mm"
- placeholder="公务时刻">
- </el-time-picker>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="邀请方:" prop="type" label-width="160px">
- <el-select v-model="OpOfficialActivitiesDto.type" clearable filterable placeholder="邀请方选择">
- <el-option v-for="item in yqfarr" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <!-- <el-radio-group v-model="OpOfficialActivitiesDto.type">
- <el-radio :label=1>是</el-radio>
- <el-radio :label=0>否</el-radio>
- </el-radio-group> -->
- </el-form-item>
- </div>
- <!-- </div>
- <div style="display: flex;flex-wrap: wrap;"> -->
- <div style="width: 385px;">
- <el-form-item label="公务方联系人职务:" prop="job" label-width="160px">
- <el-input clearable placeholder="公务方联系人职务" v-model="OpOfficialActivitiesDto.job">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="公务方联系人:" prop="contact" label-width="160px">
- <el-input clearable placeholder="公务方联系人" v-model="OpOfficialActivitiesDto.contact">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="电话:" prop="tel" label-width="160px">
- <el-input clearable placeholder="电话" v-model="OpOfficialActivitiesDto.tel">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="公务形式:" prop="officialForm" label-width="160px">
- <el-select v-model="OpOfficialActivitiesDto.officialForm" clearable filterable placeholder="公务形式">
- <el-option v-for="item in OfficialFormList" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
- <!-- </div>
- <div style="display: flex;flex-wrap: wrap;"> -->
- <div style="width: 385px;">
- <el-form-item label="着装要求:" prop="dresscode" label-width="160px">
- <el-input clearable placeholder="着装要求" v-model="OpOfficialActivitiesDto.dresscode">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="涉及领域:" prop="field" label-width="160px">
- <el-input clearable placeholder="涉及领域" v-model="OpOfficialActivitiesDto.field">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="需要翻译:" prop="isNeedTrans" label-width="160px">
- <el-radio-group v-model="OpOfficialActivitiesDto.isNeedTrans">
- <el-radio :label=1>是</el-radio>
- <el-radio :label=0>否</el-radio>
- </el-radio-group>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="翻译人员:" prop="translatorIdItem" label-width="160px">
- <el-select
- v-model="OpOfficialActivitiesDto.translatorIdItem"
- multiple
- collapse-tags
- placeholder="请选择">
- <el-option
- v-for="item in restaurants"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <!-- <el-autocomplete
- style="width: 100%;"
- class="inline-input"
- v-model="OpOfficialActivitiesDto.translators"
- :fetch-suggestions="querySearch"
- placeholder="请输入内容"
- @select="handleSelect"
- ></el-autocomplete> -->
- <!-- <el-input clearable placeholder="翻译人员" v-model="OpOfficialActivitiesDto.translators">
- </el-input> -->
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="翻译语种:" :prop="OpOfficialActivitiesDto.isNeedTrans==0?'':'language'" label-width="160px">
- <el-input clearable placeholder="翻译语种" v-model="OpOfficialActivitiesDto.language">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="是否付费:" prop="isPay" label-width="160px">
- <el-radio-group v-model="OpOfficialActivitiesDto.isPay">
- <el-radio :label=1>是</el-radio>
- <el-radio :label=0>否</el-radio>
- </el-radio-group>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="是否报批:" prop="type" label-width="160px">
- <el-radio-group v-model="OpOfficialActivitiesDto.isSubmitApproval">
- <el-radio :label=1>是</el-radio>
- <el-radio :label=0>否</el-radio>
- </el-radio-group>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="性质:" prop="nature" label-width="160px">
- <el-input clearable placeholder="性质" v-model="OpOfficialActivitiesDto.nature">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="邮箱号/微信号:" prop="emailOrWeChat" label-width="160px">
- <el-input clearable placeholder="邮箱号/微信号" v-model="OpOfficialActivitiesDto.emailOrWeChat">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 385px;">
- <el-form-item label="网址:" prop="website" label-width="160px">
- <el-input clearable placeholder="网址" v-model="OpOfficialActivitiesDto.website">
- </el-input>
- </el-form-item>
- </div>
- </div>
- <div style="display: flex; flex-wrap: wrap;">
- <div style="width: 770px;">
- <el-form-item label="公务地址:" prop="address" label-width="160px">
- <el-input type="textarea" :rows="3" placeholder="公务地址"
- v-model="OpOfficialActivitiesDto.address"></el-input>
- </el-form-item>
- </div>
- <div style="width: 770px;">
- <el-form-item label="公务方背景:" prop="setting" label-width="160px">
- <el-input
- type="textarea"
- :rows="3"
- placeholder="公务方背景"
- v-model="OpOfficialActivitiesDto.setting">
- </el-input>
- </el-form-item>
- </div>
- <div style="width: 770px;">
- <el-form-item style="position: relative;" label="公务请示范例:" label-width="160px">
- <el-input @blur="reqSampleblur" @focus="PostOfficialActivitiesReqReqSampleTips" type="textarea" :rows="3" placeholder="公务请示范例" v-model="OpOfficialActivitiesDto.reqSample">
- </el-input>
- <div v-show="reqSampleArrpd" class="reqSampleArr-ul">
- <div @click="reqSampleArrli(item)" class="reqSampleArr-li" v-for="(item,index) in reqSampleArr" :key="index">
- {{'['+item.teamName+']('+item.client+') '+item.reqSample}}
- </div>
- </div>
- </el-form-item>
- </div>
- <!-- </div>
- <div style="display: flex;"> -->
- <div style="width: 770px;">
- <el-form-item label="暂定议程:" prop="trip" label-width="160px">
- <el-input type="textarea" :rows="3" placeholder="暂定议程"
- v-model="OpOfficialActivitiesDto.trip"></el-input>
- </el-form-item>
- </div>
- <div style="width:770px;">
- <el-form-item label="参会人员:" prop="attendees" label-width="160px">
- <el-input type="textarea" :rows="3" placeholder="参会人员"
- v-model="OpOfficialActivitiesDto.attendees"></el-input>
- </el-form-item>
- </div>
- <div style="width:770px;">
- <el-form-item label="邮件截图:" label-width="160px">
- <span style="display: inline-block;position: absolute;left: -82px;color: red;">*</span>
- <!-- <el-upload
- ref="Emailscreenshotref"
- :action="Emailscreenshoturl"
- :data="Emailscreenshotdata"
- :show-file-list="true"
- :auto-upload="false"
- :file-list="Emailscreenshot"
- :on-change="Emailscreenshotchange"
- :multiple="true"
- name="files">
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
- <el-button style="margin-left: 10px;" size="small" type="success"
- @click="UploadEmailscreenshot">上传</el-button>
- </el-upload> -->
- <el-upload
- accept="image/jpeg,image/png"
- class="pop-upload"
- ref="upload"
- action=""
- :file-list="fileList"
- :auto-upload="false"
- :multiple="true"
- :on-change="handleChange"
- :on-remove="handleRemove"
- :on-preview="handlePreview"
- :before-remove="beforeRemove"
- name="files"
- >
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
- <span style="color: red;font-size: 11px;">* 需上传,对方初次回复的邮件/微信截图和最后确认会面的信息截图(截图显示对方有效邮箱地址)</span>
- <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
- </el-upload>
- </el-form-item>
- </div>
- </div>
- <!-- <div>
- <div>
- <div class="communal-title">
- <div>公务文件</div>
- </div>
- </div>
- <span style="color: red;">上传、删除文件时请谨慎!!!</span>
- <hr style='background-color:#5555; height:1px; border:none;' />
- <div style="display: flex;">
- <div style="width: 33%;">
- 公务方简介:
- <el-upload :file-list="uploadFiles1" ref="upload1" :on-success="upLoadSuccess1" :on-error="upLoadError1"
- :before-remove="beforeRemove1" :on-change="onChange1" :limit="1" :on-exceed="exceed1"
- :action="uploadURL" :headers="headers1" :auto-upload="false" :on-preview="onPreview1">
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
- <el-button style="margin-left: 10px;" size="small" type="success"
- @click="submitUpload1">上传</el-button>
- </el-upload>
- </div>
- <div style="width: 33%;">
- 公务活动图片:
- <el-upload :file-list="uploadFiles2" ref="upload2" :on-success="upLoadSuccess2" :on-error="upLoadError2"
- :before-remove="beforeRemove2" :on-change="onChange2" :limit="1" :on-exceed="exceed2"
- :action="uploadURL" :headers="headers2" :auto-upload="false" :on-preview="onPreview2">
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
-
- <el-button style="margin-left: 10px;" size="small" type="success"
- @click="submitUpload2">上传</el-button>
- </el-upload>
- </div>
- <div style="width: 33%;">
- 发票:
- <el-upload :file-list="uploadFiles3" ref="upload3" :on-success="upLoadSuccess3" :on-error="upLoadError3"
- :before-remove="beforeRemove3" :on-change="onChange3" :limit="1" :on-exceed="exceed3"
- :action="uploadURL" :headers="headers3" :auto-upload="false" :on-preview="onPreview3">
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
- <el-button style="margin-left: 10px;" size="small" type="success"
- @click="submitUpload3">上传</el-button>
- </el-upload>
- </div>
- </div>
- </div> -->
- <el-form-item>
- <div style="text-align: right;">
- <el-button type="primary" @click="addBtn">保存</el-button>
- <el-button v-if="btnPermissions&&confirmTheInvitation==0" @click="OfficialActivitiesInviteOperation(1)" type="primary">复核确认</el-button>
- <el-button v-if="btnPermissions&&confirmTheInvitation==1" @click="OfficialActivitiesInviteOperation(0)" type="primary">取消确认</el-button>
- <el-button @click="returnbtn">取消</el-button>
- </div>
- </el-form-item>
- </el-form>
-
- </div>
- </div>
- </template>
- <script>
- import { pinyin } from 'pinyin-pro';
- export default {
- data() {
- return {
- confirmTheInvitation:0,
- title: "新增公务出访客户资料",
- token: '',
- userId: 0,
- id: '',
- DiId: '',
- isShow: false,
- delegationInfo: {},
- delegationInfoList: [],//团组下拉框
- OfficialFormList: [],//公务形式下拉框
- deleFile: [],//文件数据
- headers: {
- Authorization: JSON.parse(localStorage.getItem('userinif')).token,
- TypeName: "A"
- },
- OpOfficialActivitiesDto: {
- status: 0,
- id: 0,
- diId: "",
- type: "",
- client: "",
- date: "",
- time: "",
- address: "",
- contact: "",
- job: "",
- tel: "",
- officialForm: "",
- setting: "",
- dresscode: "",
- attendees: "",
- isNeedTrans: 0,
- translatorIdItem: [],
- language: "",
- nature: "",
- emailOrWeChat: "",
- website: "",
- trip: "",
- createUserId: 0,
- isPay:0,
- isSubmitApproval:0,
- remark: "",
- country: "",
- area: "",
- field: "",
- reqSample: "",
- },
- reqSampleArr:[],
- reqSampleArrpd:false,
- rollcallarr:[],
- OpOfficialActivitiesRules: {
- officialForm: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' }
- ],
- country: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- ],
- area: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- ],
- inviteCosts: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- client: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- date: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- time: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- address: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- contact: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- job: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- tel: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- dresscode: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- field: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- language: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- setting: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- nature: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- emailOrWeChat: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- website: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- type: [
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- fileList: [
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- isPay:[
- { required: true, message: '该信息为必填信息', trigger: 'blur' },
- { required: true, message: '该信息为必填信息', trigger: 'change' },
- ],
- },
- uploadURL: "http://localhost:5256/api/Resource/UploadOfficialActivities",
- uploadFiles1: [],
- uploadFiles2: [],
- uploadFiles3: [],
- Emailscreenshot:[],
- Emailscreenshoturl:'http://132.232.92.186:8888/api/Resource/OfficialActivitiesUploadFiles',
- Emailscreenshotdata:{
- id:0,
- diId:0,
- currUserId:0,
- },
- Emailscreenshotheaders:{
- Authorization:"Content-Type:multipart/form-data"
- },
- headers1: {
- Authorization: JSON.parse(localStorage.getItem('userinif')).token,
- Type: "1",
- DiId: 0,
- CreateUserId: 0,
- },
- headers2: {
- Authorization: JSON.parse(localStorage.getItem('userinif')).token,
- Type: "2",
- DiId: 0,
- CreateUserId: 0,
- },
- headers3: {
- Authorization: JSON.parse(localStorage.getItem('userinif')).token,
- Type: "3",
- DiId: 0,
- CreateUserId: 0,
- },
- yqfarr:[],
- gwcfPermissions:[],
- btnPermissions:false,
- fileList:[],
- restaurants: [],
- }
- },
- methods: {
- //拼音
- pinyingxing(val){
- return pinyin(val, { toneType: 'none' }).toUpperCase();
- },
- //fenge
- fgarr(val){
- val=val+""
- return val.split(' ')[0]
- },
- querySearch(queryString, cb) {
- var restaurants = this.restaurants;
- var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
- // 调用 callback 返回建议列表的数据
- cb(results);
- },
- createFilter(queryString) {
- return (restaurant) => {
- return restaurant.value.replace(" ", "").toLowerCase().match(queryString.toLowerCase());
- };
- },
- handleSelect(item) {
- console.log(item);
- },
- //日期处理(日)
- TimeProcessingri(val){
- let datetime=new Date(val)
- let newsyear=datetime.getFullYear();
- let newsMonth=datetime.getMonth() + 1<10?'0'+(datetime.getMonth() + 1):datetime.getMonth() + 1;
- let newsday=datetime.getDate()<10?'0'+datetime.getDate():datetime.getDate();
- return newsyear+ '-' +newsMonth+ '-' + newsday;
- },
- //获取客户名单info
- PostTourClientListByDiId(val) {
- this.rollcallarr=[];
- var that = this
- var url = "/api/Groups/PostTourClientListByDiId"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- portType:1,
- diid: val?val:that.DiId,
- pageId:104,
- userId:233
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.rollcallarr=res.data.data;
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- //团组下拉框
- GetGroupAllList() {
- var url = "/api/Resource/GetGroupAllList"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- diid: that.DiId
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.restaurants = res.data.data.translatorData;
- // that.restaurants= res.data.data.translatorData.map((terminal) => {
- // return {
- // id:terminal.id,
- // value:terminal.name,
- // };
- // });
- that.deleFile = res.data.data.deleFile;
- that.deleFile.forEach(function (item) {
- if (item.kind == 1) {
- that.uploadFiles1.push({
- name: item.fileName,
- url: 'http://localhost:5256/Office/GrpFile/商邀相关文件/',
- id: item.id
- });
- } else if (item.kind == 2) {
- that.uploadFiles2.push({
- name: item.fileName,
- url: 'http://localhost:5256/Office/GrpFile/商邀相关文件/',
- id: item.id
- });
- }
- else if (item.kind == 3) {
- that.uploadFiles3.push({
- name: item.fileName,
- url: 'http://localhost:5256/Office/GrpFile/商邀相关文件/',
- id: item.id
- });
- }
- });
- that.delegationInfoList = res.data.data.delegation;
- that.OfficialFormList = res.data.data.setData;
- if (that.OfficialFormList.length != 0) {
- if(that.id!=that.id){
- that.OpOfficialActivitiesDto.officialForm = that.OfficialFormList[0].id
- }
- }
- for (let index = 0; index < that.delegationInfoList.length; index++) {
- if (that.delegationInfoList[index].id == parseInt(that.DiId)) {
- that.delegationInfo = that.delegationInfoList[index];
- break;
- }
- }
- }
- }).catch(function (error) {
- // that.$message.error("网络错误,请稍后重试");
- });
- },
- //UploadEmailscreenshot
- UploadEmailscreenshot(){
- console.log(file, fileList);
- this.Emailscreenshotdata.diId=this.DiId;
- this.Emailscreenshotdata.currUserId=this.userId;
- this.submitUpload()
- },
-
- //获取邀请方
- QuerySetData(){
- var that = this;
- var url = "/api/System/QuerySetData"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- dataType:85
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.yqfarr=res.data.data;
- console.log(that.yqfarr);
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- Emailscreenshotchange(file, fileList){
- console.log(file, fileList);
- },
- //获取公务请示范例提示
- PostOfficialActivitiesReqReqSampleTips(){
- var that = this;
- var url = "/api/Resource/PostOfficialActivitiesReqReqSampleTips"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- country:that.OpOfficialActivitiesDto.country,
- area: that.OpOfficialActivitiesDto.area,
- client: that.OpOfficialActivitiesDto.client
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- console.log(res)
- that.reqSampleArrpd=true
- that.reqSampleArr=res.data.data;
- // that.$message({
- // message: res.data.msg,
- // type: 'success'
- // });
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- reqSampleblur(){
- // setTimeout(this.reqSampleArrpd=false,2000)
- setTimeout(() => {
- this.reqSampleArrpd=false
- }, 150);
- },
- DiIdChang(val) {
- for (let index = 0; index < this.delegationInfoList.length; index++) {
- if (this.delegationInfoList[index].id == parseInt(this.DiId)) {
- this.delegationInfo = this.delegationInfoList[index];
- break;
- }
- }
- this.PostTourClientListByDiId(val);
- },
- reqSampleArrli(val){
- console.log(val);
- this.OpOfficialActivitiesDto.reqSample=val.reqSample;
- this.reqSampleArrpd=false;
- },
- QueryOfficialActivitiesById() {
- var url = "/api/Resource/QueryOfficialActivitiesById"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- Id: that.id,
- DiId: that.DiId,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- var dataList = res.data.data;
- that.OpOfficialActivitiesDto.id = dataList.id;
- that.OpOfficialActivitiesDto.diId = dataList.diId;
- that.OpOfficialActivitiesDto.type = dataList.type;
- that.OpOfficialActivitiesDto.client = dataList.client;
- that.OpOfficialActivitiesDto.date = dataList.date;
- that.OpOfficialActivitiesDto.time = dataList.time;;
- that.OpOfficialActivitiesDto.address = dataList.address;
- that.OpOfficialActivitiesDto.contact = dataList.contact;
- that.OpOfficialActivitiesDto.job = dataList.job;
- that.OpOfficialActivitiesDto.tel = dataList.tel;
- that.OpOfficialActivitiesDto.officialForm = dataList.officialForm;
- that.OpOfficialActivitiesDto.setting = dataList.setting;
- that.OpOfficialActivitiesDto.dresscode = dataList.dresscode;
- that.OpOfficialActivitiesDto.attendees = dataList.attendees;
- that.OpOfficialActivitiesDto.isNeedTrans = dataList.isNeedTrans;
- that.OpOfficialActivitiesDto.translatorIdItem = dataList.translatorIdItem;
- that.OpOfficialActivitiesDto.language = dataList.language;
- that.OpOfficialActivitiesDto.nature = dataList.nature;
- that.OpOfficialActivitiesDto.emailOrWeChat = dataList.emailOrWeChat;
- that.OpOfficialActivitiesDto.website = dataList.website;
- that.OpOfficialActivitiesDto.trip = dataList.trip;
- that.OpOfficialActivitiesDto.createUserId = dataList.createUserId;
- that.OpOfficialActivitiesDto.remark = dataList.remark;
- that.OpOfficialActivitiesDto.isSubmitApproval = dataList.isSubmitApproval;
- that.OpOfficialActivitiesDto.isPay = dataList.isPay;
- that.OpOfficialActivitiesDto.country = dataList.country;
- that.OpOfficialActivitiesDto.area = dataList.area;
- that.OpOfficialActivitiesDto.field = dataList.field;
- that.OpOfficialActivitiesDto.reqSample = dataList.reqSample;
- that.confirmTheInvitation=dataList.confirmTheInvitation
- // that.fileList
- that.fileList=[]
- for(let i=0;i<dataList.screenshotOfMailUrls.length;i++){
- that.fileList.push({'name':dataList.screenshotOfMailUrls[i].split('/')[7],'url':dataList.screenshotOfMailUrls[i]})
- }
- }
- })
- },
- addBtn() {
- if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
- this.$message.error("请选择团组名称");
- return;
- }
- if(this.fileList.length<=0){
- this.$message.error("请先选取邮件截图");
- return;
- }
-
- const that = this;
- this.OpOfficialActivitiesDto.date=this.TimeProcessingri(this.OpOfficialActivitiesDto.date)
- that.OpOfficialActivitiesDto.createUserId = that.userId
- that.OpOfficialActivitiesDto.diId = that.DiId
- that.$refs.OpOfficialActivitiesDto.validate((valid) => {
- if (valid) {
- var url = "/api/Resource/OpOfficialActivities"
- that.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: that.OpOfficialActivitiesDto
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message: res.data.msg,
- type: 'success'
- });
- that.submitUpload(res.data.data.id);
- that.returnbtn();
- } else {
- that.$message.error(res.data.msg);
- }
- })
- } else {
- this.$message.error('请完善信息在保存!');
- return false;
- }
- })
- },
- // 文件超出限制
- exceed1(files, fileList) {
- this.$message.warning(
- `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
- } 个文件,请取消要替换的文件`
- );
- },
- //文件上传成功时的钩子
- upLoadSuccess1(response, file, fileList) {
- this.$message({
- message: response.msg,
- type: 'success'
- });
- },
- //文件上传失败时的钩子
- upLoadError1(response, file, fileList) {
- console.log("项目添加失败");
- },
- //取消文件时的钩子
- beforeRemove1(file, fileList) {
- const that = this;
- var url = "/api/Resource/DelloadOfficialActivities"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- Id: file.id,
- DeleteUserId: that.userId
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message: res.data.msg,
- type: 'success'
- });
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- //文件状态改变时的钩子
- onChange1(file, fileList) {
- },
- //点击文件的钩子
- onPreview1(file) {
- window.location.href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + file.name
- },
- // 文件超出限制
- exceed2(files, fileList) {
- this.$message.warning(
- `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
- } 个文件,请取消要替换的文件`
- );
- },
- //文件上传成功时的钩子
- upLoadSuccess2(response, file, fileList) {
- this.$message({
- message: response.msg,
- type: 'success'
- });
- },
- //文件上传失败时的钩子
- upLoadError2(response, file, fileList) {
- console.log("项目添加失败");
- },
- //删除文件时出发的事件
- beforeRemove2(file, fileList) {
- const that = this;
- var url = "/api/Resource/DelloadOfficialActivities"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- Id: file.id,
- DeleteUserId: that.userId
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message: res.data.msg,
- type: 'success'
- });
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- //文件状态改变时的钩子
- onChange2(file, fileList) {
- },
- //点击文件的钩子
- onPreview2(file) {
- window.location.href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + file.name
- },
- // 文件超出限制
- exceed3(files, fileList) {
- this.$message.warning(
- `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
- } 个文件,请取消要替换的文件`
- );
- },
- //文件上传成功时的钩子
- upLoadSuccess3(response, file, fileList) {
- this.$message({
- message: response.msg,
- type: 'success'
- });
- },
- //文件上传失败时的钩子
- upLoadError3(response, file, fileList) {
- console.log("项目添加失败");
- },
- //删除文件时出发的事件
- beforeRemove3(file, fileList) {
- const that = this;
- var url = "/api/Resource/DelloadOfficialActivities"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data: {
- Id: file.id,
- DeleteUserId: that.userId
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message: res.data.msg,
- type: 'success'
- });
- setTimeout(() => {
- that.$router.push('/home/OfficialActivities')
- }, 3000);
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- //文件状态改变时的钩子
- onChange3(file, fileList) {
- },
- //点击文件的钩子
- onPreview3(file) {
- let href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + file.name
- var a = document.createElement("a");
- a.href = href;
- a.download = file.name;
- a.style.display = "none";
- document.body.appendChild(a);
- a.click();
- a.remove();
- //window.location.href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + file.name
- },
- //返回
- returnbtn(){
- this.$router.push({
- path: "/home/OfficialActivities",
- query: {
- DiId: this.DiId,
- }
- })
- },
- // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用,function(file, fileList)
- handleChange(file, fileList) {
- console.log(file);
- console.log(fileList);
- this.fileList = fileList
- },
- //删除文件
- beforeRemove(file,fileList){
- if(file && file.status=="success"){
- return this.$confirm('此文件已上传至服务器此操作将永久删除该文件, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // this.$message({
- // type: 'success',
- // message: '删除成功!'
- // });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- reject(false)
- });
- }
- },
- // 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。function(file, fileList)
- handleRemove(file, fileList) {
- this.fileList = fileList
- if (file && file.status=="success") {
- var that = this;
- var url = "/api/Resource/OfficialActivitiesDelFile"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data:{
- id:that.id,
- fileName:file.name
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message.success(res.data.msg);
- } else {
- that.$message.error(res.data.msg);
- }
- })
- }
-
- },
- //点击文件列表中已上传的文件
- handlePreview(file){
- console.log(file);
- window.open(file.url);
- },
- //上传服务器
- submitUpload(val) {
- // console.log(this.id);
- var verdict=false
- if(this.id==undefined){
- this.id==val
- }
- this.Emailscreenshotdata.id=val;
- this.Emailscreenshotdata.diId=this.DiId;
- this.Emailscreenshotdata.currUserId=this.userId;
- //判断是否有文件再上传
- if (this.fileList.length === 0) {
- return this.$message.warning('请选取文件后再上传');
- }
- // 下面的代码将创建一个空的FormData对象:
- const formData = new FormData()
- // 你可以使用FormData.append来添加键/值对到表单里面;
- this.fileList.forEach((file) => {
- if(file.raw!=undefined){
- verdict=true;
- formData.append('files', file.raw);
- }
- })
- formData.append('id', this.Emailscreenshotdata.id);
- formData.append('diId', this.Emailscreenshotdata.diId);
- formData.append('currUserId', this.Emailscreenshotdata.currUserId);
- if(!verdict){
- return
- }
- var that = this;
- var url = "/api/Resource/OfficialActivitiesUploadFiles"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data:formData
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message.success(res.data.msg);
- that.fileList = []
- for(let i=0;i<res.data.data.fileUrls.length;i++){
- that.fileList.push({'name':res.data.data.fileUrls[i].split('/')[7],'url':res.data.data.fileUrls[i]})
- }
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- //确认邀请
- OfficialActivitiesInviteOperation(val){
- var that = this;
- var url = "/api/Resource/OfficialActivitiesInviteOperation"
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + that.token
- },
- data:{
- id:that.id,
- type:val
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.QueryOfficialActivitiesById()
- that.$message.success(res.data.msg);
- } else {
- that.$message.error(res.data.msg);
- }
- })
- }
- },
- mounted() {
- this.token = JSON.parse(localStorage.getItem('userinif')).token;
- this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
- this.gwcfPermissions=JSON.parse(localStorage.getItem('Permissions'));
- this.DiId = parseInt(this.$route.query.DiId)
- this.PostTourClientListByDiId();
- console.log(this.gwcfPermissions);
- for(let k=0;k<this.gwcfPermissions.length;k++){
- if(this.gwcfPermissions[k].funid==12){
- this.btnPermissions=true;
- }
- }
- this.QuerySetData();
- this.id = this.$route.query.id
- this.headers1.DiId = this.DiId
- this.headers1.CreateUserId = this.userId
- this.headers2.DiId = this.DiId
- this.headers2.CreateUserId = this.userId
- this.headers3.DiId = this.DiId
- this.headers3.CreateUserId = this.userId
- this.GetGroupAllList();
- if (this.DiId == null && this.DiId == undefined && this.DiId == 0) {
- this.DiId = '';
- }
- if (this.id != null && this.id != undefined && this.id != 0) {
- this.QueryOfficialActivitiesById();
- this.title = "修改公务出访客户资料";
- this.OpOfficialActivitiesDto.status = 2
- this.isShow = true
- } else {
- this.OpOfficialActivitiesDto.status = 1
- this.title = "新增公务出访客户资料"
- this.isShow = false
- }
- }
- }
- </script>
- <style>
- .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;
- min-height: 810px;
-
- }
- .visit-box .el-date-editor.el-input, .el-date-editor.el-input__inner{
- width: 100%;
- }
- .visit-box .el-select{
- width: 100%;
- }
- .reqSampleArr-ul{
- position:absolute;
- z-index:1;
- background-color: #FFFFFF;
- box-shadow: #5555 0 0 10px;
- border-radius:5px ;
- max-height: 400px;
- overflow: auto;
- }
- .reqSampleArr-li:hover{
- background-color: #5551;
- }
- .reqSampleArr-li{
- line-height: 20px;
- padding: 10px;
- cursor: pointer;
- }
- .ps-title{
- color: red;
- font-size: 12px;
- }
- @media screen and (max-width: 1700px) {
- .appraise-box>div {
- width: 48%;
- }
- .appraise-box>div el-form-item__content {
- width: 260px !important;
- }
- }
- </style>
|