EntryDetails.vue 128 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878
  1. <template>
  2. <div v-loading.fullscreen.lock="fullscreenLoading">
  3. <div class="Entry-all">
  4. <el-dialog v width="400px" title="设置查看权限" class="permissionsbox" :visible.sync="setpermissions">
  5. <el-checkbox-group v-model="viewUsers" @change="handleCheckAllChange">
  6. <el-checkbox v-for="item in viewUsersarr" :label="item.id" :key="item.id">{{item.name}}</el-checkbox>
  7. </el-checkbox-group>
  8. <div style="text-align: right;margin-top: 15px;">
  9. <el-button size="mini" @click="EnterExitCostSetViewPermissiion" type="primary">分配</el-button>
  10. <el-button size="mini" @click="setpermissions=false">取消</el-button>
  11. </div>
  12. </el-dialog>
  13. <div class="Entry-head">
  14. <div class="Entry-head-li">
  15. <label>团组名称:</label>
  16. <el-select style="width:250px" @change="chengvalue()" v-model="value" filterable placeholder="请选择">
  17. <el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
  18. <span v-if="item.isNull=='false'" style="color:#409EFF">{{ item.groupName }}</span>
  19. <span v-else style="color:gray">{{ item.groupName }}</span>
  20. </el-option>
  21. </el-select>
  22. </div>
  23. <div v-if="isSave" class="Entry-head-li">
  24. <!-- <el-button type="primary">计算费用</el-button> -->
  25. <el-button @click="NationalTravelFeeImportReceivables" type="primary">导出到收款账单</el-button>
  26. <el-button @click="cleanout" type="primary">全部清空</el-button>
  27. <el-button @click="storage()" type="primary">保存</el-button>
  28. <el-select style="width:202px" v-model="listvalue" placeholder="请选择">
  29. <el-option v-for="item in listvalueoptions" :key="item.id" :label="item.name" :value="item.id">
  30. </el-option>
  31. </el-select>
  32. <el-button @click="eptschedule(1)" type="primary">导出所选明细表</el-button>
  33. <el-select style="width:202px" v-model="tablevalue" placeholder="请选择">
  34. <el-option v-for="item in tablevalueoptions" :key="item.id" :label="item.name" :value="item.id">
  35. </el-option>
  36. </el-select>
  37. <el-button @click="eptschedule(2)" type="primary">导出下拉所选表格</el-button>
  38. <el-button @click="setpermissionsbtn" type="primary">设置权限</el-button>
  39. <el-button @click="eptschedule(3)" type="primary">团组成员名单</el-button>
  40. </div>
  41. </div>
  42. <div class="Entry-form">
  43. <div class="Entry-form-li">
  44. <div class="Entry-li-lables">
  45. <el-checkbox v-model="choiceOne"></el-checkbox>
  46. <div class="li-lable">一、境内费用(其他费用)</div>
  47. <div class="li-lable">
  48. <span class="redzhu">(注:填好数值鼠标点击其他区域计算合计)</span>
  49. <label>合计:</label>
  50. <div class="sub-boxs">
  51. {{ DomesticFees.total=(DomesticFees.visafees + DomesticFees.vaccinefees +
  52. DomesticFees.nucleicfees + DomesticFees.serviceCharge + DomesticFees.insurance +
  53. DomesticFees.ticketsExhibitionL) | numFilter }}
  54. </div>
  55. <span>元/人</span>
  56. </div>
  57. </div>
  58. <div class="Entry-li-inif">
  59. <div class="Entry-inif-box">
  60. <label>签证费:</label>
  61. <el-input-number size="mini" :controls="false" :precision="2"
  62. v-model="DomesticFees.visafees"></el-input-number>
  63. <span>元/人</span>
  64. </div>
  65. <div class="Entry-inif-box">
  66. <label>签证费用描述:</label>
  67. <el-input style="width:900px" size="mini"
  68. v-model="DomesticFees.visafeesDescription"></el-input>
  69. <span class="redzhu">{{ visabeizhu }}</span>
  70. </div>
  71. <el-button v-if="getvisafeebtn" @click="Getnewvisafee" type="primary"
  72. size="mini">获取最新签证费用</el-button>
  73. </div>
  74. <div class="Entry-li-inif">
  75. <div class="Entry-inif-box">
  76. <label>疫苗费:</label>
  77. <el-input-number size="mini" :controls="false" :precision="2"
  78. v-model="DomesticFees.vaccinefees"></el-input-number>
  79. <span>元/人</span>
  80. </div>
  81. <div class="Entry-inif-box">
  82. <label>核酸检测费:</label>
  83. <el-input-number size="mini" :controls="false" :precision="2"
  84. v-model="DomesticFees.nucleicfees"></el-input-number>
  85. <span>元/人;</span>
  86. </div>
  87. <div class="Entry-inif-box">
  88. <label> 服务费:</label>
  89. <el-input-number size="mini" :controls="false" :precision="2"
  90. v-model="DomesticFees.serviceCharge"></el-input-number>
  91. <span>元/人;</span>
  92. </div>
  93. </div>
  94. <div class="Entry-li-inif">
  95. <div class="Entry-inif-box">
  96. <label>保险费:</label>
  97. <el-input-number size="mini" :controls="false" :precision="2"
  98. v-model="DomesticFees.insurance"></el-input-number>
  99. <span>元/人</span>
  100. </div>
  101. <div class="Entry-inif-box">
  102. <label>参展门票:</label>
  103. <el-input-number size="mini" :controls="false" :precision="2"
  104. v-model="DomesticFees.ticketsExhibitionL"></el-input-number>
  105. <span>元/人;</span>
  106. </div>
  107. <div class="Entry-inif-box">
  108. <label>备注:</label>
  109. <el-input style="width:900px" size="mini"
  110. v-model="DomesticFees.firstItemRemark"></el-input>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="Entry-form-li">
  115. <div class="Entry-li-lables">
  116. <!-- <el-checkbox v-model="choiceTwo"></el-checkbox> -->
  117. <div class="li-lable">二、国际旅费合计:</div>
  118. <div style="display: flex;">
  119. <div class="li-lable">
  120. <el-checkbox style="margin-right: -10px;" v-model="sumJJC"></el-checkbox>
  121. <label>(经济舱)</label>
  122. <div class="sub-boxs">
  123. {{ TotalExpenses.EconomyClasstotal=(TotalExpenses.EconomyClass +
  124. TotalExpenses.TravellingExpenses) | numFilter }}
  125. </div>
  126. <span>元/人</span>
  127. </div>
  128. &nbsp;&nbsp;&nbsp;&nbsp;
  129. <div class="li-lable">
  130. <el-checkbox style="margin-right: -10px;" v-model="sumGWC"></el-checkbox>
  131. <label>(公务舱)</label>
  132. <div class="sub-boxs">
  133. {{ TotalExpenses.BusinessClasstotal=(TotalExpenses.BusinessClass +
  134. TotalExpenses.TravellingExpenses) | numFilter }}
  135. </div>
  136. <span>元/人</span>
  137. </div>
  138. &nbsp;&nbsp;&nbsp;&nbsp;
  139. <div class="li-lable">
  140. <el-checkbox style="margin-right: -10px;" v-model="sumTDC"></el-checkbox>
  141. <label>(头等舱)</label>
  142. <div class="sub-boxs">
  143. {{ TotalExpenses.Firstclasstotal=(TotalExpenses.Firstclass +
  144. TotalExpenses.TravellingExpenses) | numFilter }}
  145. </div>
  146. <span>元/人</span>
  147. </div>
  148. </div>
  149. </div>
  150. <div class="Entry-li-inif">
  151. <label>国际机票:&nbsp; &nbsp; &nbsp; </label>
  152. <div class="Entry-inif-box">
  153. <label>(经济舱):</label>
  154. <el-input-number size="mini" :controls="false" :precision="2"
  155. v-model="TotalExpenses.EconomyClass"></el-input-number>
  156. <span>元/人</span>
  157. </div>
  158. <div class="Entry-inif-box">
  159. <label>(公务舱):</label>
  160. <el-input-number size="mini" :controls="false" :precision="2"
  161. v-model="TotalExpenses.BusinessClass"></el-input-number>
  162. <span>元/人;</span>
  163. </div>
  164. <div class="Entry-inif-box">
  165. <label>(头等舱):</label>
  166. <el-input-number size="mini" :controls="false" :precision="2"
  167. v-model="TotalExpenses.Firstclass"></el-input-number>
  168. <span>元/人;</span>
  169. </div>
  170. <span v-if="JSON.stringify(TicketJudgment) == '{}'" class="redzhu">(机票数据未录入)</span>
  171. <div v-else>
  172. <span
  173. v-if="TicketJudgment.jjcCurrentRate != TotalExpenses.EconomyClass || TicketJudgment.gwcCurrentRate != TotalExpenses.BusinessClass"
  174. class="redzhu">{{ TicketJudgment.remark }}</span>&nbsp;&nbsp;&nbsp;&nbsp;
  175. <el-button
  176. v-if="TicketJudgment.jjcCurrentRate != TotalExpenses.EconomyClass || TicketJudgment.gwcCurrentRate != TotalExpenses.BusinessClass"
  177. type="primary" @click="Fillin" size="mini">填 入</el-button>
  178. </div>
  179. </div>
  180. <div class="Entry-li-inif">
  181. <div class="Entry-inif-box">
  182. <label>城市区间交通费:</label>
  183. <el-input-number size="mini" :controls="false" :precision="2"
  184. v-model="TotalExpenses.TravellingExpenses"></el-input-number>
  185. <span>元/人;</span>
  186. </div>
  187. </div>
  188. <div class="Entry-li-inif">
  189. <div class="Entry-inif-box">
  190. <label>备注:</label>
  191. <el-input style="width:1000px" size="mini"
  192. v-model="TotalExpenses.twoItemRemark"></el-input>
  193. </div>
  194. </div>
  195. <div class="Entry-li-inif">
  196. <div v-for="(item, index) in currencys" :key="index" class="Entry-inif-box">
  197. <label>{{ item.currencyName }}汇率:</label>
  198. <el-input-number size="mini" :controls="false" :precision="4"
  199. v-model="item.rate"></el-input-number>
  200. </div>
  201. <span style="color:red;">* 若客户有意见,需要与财务商量后进行适当调整 </span>
  202. <!-- <el-popover
  203. placement="top"
  204. width="402"
  205. trigger="hover">
  206. <el-table border :data="currencyss">
  207. <el-table-column width="100" property="currName" label="币种"></el-table-column>
  208. <el-table-column width="100" property="rate" label="汇率"></el-table-column>
  209. <el-table-column width="200" property="lastUpdateDt" label="更新时间"></el-table-column>
  210. </el-table>
  211. <span v-show="cubtn" slot="reference" class="redzhu">{{CurrencysRemark}}</span>
  212. </el-popover>
  213. &nbsp;&nbsp;&nbsp;&nbsp;
  214. <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button> -->
  215. </div>
  216. </div>
  217. <div class="Entry-form-li">
  218. <div class="Entry-li-lable">
  219. <div style="display: flex;align-items: center;">
  220. <el-checkbox v-model="choiceThree"></el-checkbox>
  221. <div class="li-lable">三、住宿费:</div>
  222. <div style="display: flex;">
  223. <div class="li-lable">
  224. <label>合计:</label>
  225. <div class="sub-boxs">{{ TotalAccommodationFee | numFilter }}</div>
  226. <span>元/人</span>
  227. </div>
  228. </div>
  229. </div>
  230. <div class="btn-Entry">
  231. <el-button type="primary" @click="addlist('住宿费')" size="mini">新 增</el-button>
  232. </div>
  233. </div>
  234. <div class="Entry-li-inif">
  235. <el-table :data="quarterageData" border style="width: 100%">
  236. <el-table-column prop="days" label="第几晚" width="180">
  237. <template slot-scope="scope">
  238. <el-input-number size="mini" :controls="false"
  239. v-model="scope.row.days"></el-input-number>
  240. </template>
  241. </el-table-column>
  242. <el-table-column style="position: relative;" prop="city" label="城 市" width="180">
  243. <template slot-scope="scope">
  244. <el-select size="mini" @change="changeSelect(scope.row, $event, scope.$index)"
  245. v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  246. <el-option v-for="item in placeinif" :key="item.id" :label="item.cityname"
  247. :value="item.id">
  248. <span style="float: left">{{ item.cityname }}</span>
  249. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  250. </el-option>
  251. </el-select>
  252. </template>
  253. </el-table-column>
  254. <el-table-column prop="cost" label=" 费用标准" width="180">
  255. <template slot-scope="scope">
  256. <el-input-number @input="zhusuinput(scope.row)" size="mini" :precision="2"
  257. :controls="false" v-model="scope.row.cost"></el-input-number>
  258. </template>
  259. </el-table-column>
  260. <el-table-column prop="currencyName" label=" 币 种" width="180">
  261. <template slot-scope="scope">
  262. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  263. </template>
  264. </el-table-column>
  265. <el-table-column prop="subTotal" label="费用小计" width="180">
  266. <template slot-scope="scope">
  267. <div class="sub-boxs">{{ scope.row.subTotal | numFilter }}</div>&nbsp;CNY
  268. </template>
  269. </el-table-column>
  270. <el-table-column prop="address" label="操 作">
  271. <template slot-scope="scope">
  272. <el-button v-if="isSave" style="color: #fff;" size="mini" type="danger"
  273. @click="deleteRow(scope.$index, scope.row, quarterageData, 1)">删除</el-button>
  274. </template>
  275. </el-table-column>
  276. </el-table>
  277. </div>
  278. </div>
  279. <div class="Entry-form-li">
  280. <div class="Entry-li-lable">
  281. <div style="display: flex;align-items: center;">
  282. <el-checkbox v-model="choiceFour"></el-checkbox>
  283. <div class="li-lable">四、伙食费:</div>
  284. <div style="display: flex;">
  285. <div class="li-lable">
  286. <label>合计:</label>
  287. <div class="sub-boxs">{{ TotalMeals | numFilter }}</div>
  288. <span>元/人</span>
  289. </div>
  290. </div>
  291. </div>
  292. <div class="btn-Entry">
  293. <el-button type="primary" @click="addlist('伙食费')" size="mini">新 增</el-button>
  294. </div>
  295. </div>
  296. <div class="Entry-li-inif">
  297. <el-table :data="boardWagesData" border style="width: 100%">
  298. <el-table-column prop="days" label="第几晚" width="180">
  299. <template slot-scope="scope">
  300. <el-input-number size="mini" :controls="false"
  301. v-model="scope.row.days"></el-input-number>
  302. </template>
  303. </el-table-column>
  304. <el-table-column style="position: relative;" prop="city" label="城 市" width="180">
  305. <!-- <template slot-scope="scope">
  306. <el-input size="mini" v-model="scope.row.city"></el-input>
  307. </template> -->
  308. <template slot-scope="scope">
  309. <el-select size="mini" @change="mealschangeSelect(scope.row, $event, scope.$index)"
  310. v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  311. <el-option v-for="item in placeinif" :key="item.id" :label="item.cityname"
  312. :value="item.id">
  313. <span style="float: left">{{ item.cityname }}</span>
  314. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  315. </el-option>
  316. </el-select>
  317. </template>
  318. </el-table-column>
  319. <el-table-column prop="cost" label=" 费用标准" width="180">
  320. <template slot-scope="scope">
  321. <el-input-number size="mini" @input="mealsinput(scope.row)" :precision="2"
  322. :controls="false" v-model="scope.row.cost"></el-input-number>
  323. </template>
  324. </el-table-column>
  325. <el-table-column prop="currencyName" label=" 币 种" width="180">
  326. <template slot-scope="scope">
  327. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  328. </template>
  329. </el-table-column>
  330. <el-table-column prop="subTotal" label="费用小计" width="180">
  331. <template slot-scope="scope">
  332. <div class="sub-boxs">{{ scope.row.subTotal | numFilter }}</div>&nbsp;CNY
  333. </template>
  334. </el-table-column>
  335. <el-table-column prop="address" label="操 作">
  336. <template slot-scope="scope">
  337. <el-button v-if="isSave" style="color: #fff;" size="mini" type="danger"
  338. @click="deleteRow(scope.$index, scope.row, boardWagesData, 2)">删除</el-button>
  339. </template>
  340. </el-table-column>
  341. </el-table>
  342. </div>
  343. </div>
  344. <div class="Entry-form-li">
  345. <div class="Entry-li-lable">
  346. <div style="display: flex;align-items: center;">
  347. <el-checkbox v-model="choiceFive"></el-checkbox>
  348. <div class="li-lable">五、公杂费:</div>
  349. <div style="display: flex;">
  350. <div class="li-lable">
  351. <label>合计:</label>
  352. <div class="sub-boxs">{{ TotalMiscellaneous | numFilter }}</div>
  353. <span>元/人</span>
  354. </div>
  355. </div>
  356. </div>
  357. <div class="btn-Entry">
  358. <el-button type="primary" @click="addlist('公杂费')" size="mini">新 增</el-button>
  359. </div>
  360. </div>
  361. <div class="Entry-li-inif">
  362. <el-table :data="miscellaneousFeeData" border style="width: 100%">
  363. <el-table-column prop="days" label="第几晚" width="180">
  364. <template slot-scope="scope">
  365. <el-input-number size="mini" :controls="false"
  366. v-model="scope.row.days"></el-input-number>
  367. </template>
  368. </el-table-column>
  369. <el-table-column style="position: relative;" prop="city" label="城 市" width="180">
  370. <!-- <template slot-scope="scope">
  371. <el-input size="mini" v-model="scope.row.city"></el-input>
  372. </template> -->
  373. <template slot-scope="scope">
  374. <el-select @change="MiscellaneouschangeSelect(scope.row, $event)" size="mini"
  375. v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  376. <el-option v-for="item in placeinif" :key="item.id" :label="item.cityname"
  377. :value="item.id">
  378. <span style="float: left">{{ item.cityname }}</span>
  379. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  380. </el-option>
  381. </el-select>
  382. </template>
  383. </el-table-column>
  384. <el-table-column prop="cost" label=" 费用标准" width="180">
  385. <template slot-scope="scope">
  386. <el-input-number @input="Miscellaneousinput(scope.row)" size="mini" :precision="2"
  387. :controls="false" v-model="scope.row.cost"></el-input-number>
  388. </template>
  389. </el-table-column>
  390. <el-table-column prop="currencyName" label=" 币 种" width="180">
  391. <template slot-scope="scope">
  392. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  393. </template>
  394. </el-table-column>
  395. <el-table-column prop="subTotal" label="费用小计" width="180">
  396. <template slot-scope="scope">
  397. <div class="sub-boxs">{{ scope.row.subTotal | numFilter }}</div>&nbsp;CNY
  398. </template>
  399. </el-table-column>
  400. <el-table-column prop="address" label="操 作">
  401. <template slot-scope="scope">
  402. <el-button v-if="isSave" style="color: #fff;" size="mini" type="danger"
  403. @click="deleteRow(scope.$index, scope.row, miscellaneousFeeData, 3)">删除</el-button>
  404. </template>
  405. </el-table-column>
  406. </el-table>
  407. </div>
  408. </div>
  409. <div class="Entry-form-li">
  410. <div class="Entry-li-lable">
  411. <div style="display: flex;align-items: center;">
  412. <el-checkbox v-model="choiceSix"></el-checkbox>
  413. <div class="li-lable">六、培训费:</div>
  414. <div style="display: flex;">
  415. <div class="li-lable">
  416. <label>合计:</label>
  417. <div class="sub-boxs">{{ trainingExpense | numFilter }}</div>
  418. <span>元/人</span>
  419. </div>
  420. </div>
  421. </div>
  422. <div class="btn-Entry">
  423. <el-button type="primary" @click="addlist('培训费')" size="mini">新 增</el-button>
  424. </div>
  425. </div>
  426. <div class="Entry-li-inif">
  427. <el-table :data="trainingExpenseData" border style="width: 100%">
  428. <el-table-column prop="days" label="第几晚" width="180">
  429. <template slot-scope="scope">
  430. <el-input-number size="mini" :controls="false"
  431. v-model="scope.row.days"></el-input-number>
  432. </template>
  433. </el-table-column>
  434. <el-table-column style="position: relative;" prop="city" label="城 市" width="180">
  435. <!-- <template slot-scope="scope">
  436. <el-input size="mini" v-model="scope.row.city"></el-input>
  437. </template> -->
  438. <template slot-scope="scope">
  439. <el-select @change="TrainingExpenseDataSelect(scope.row, $event)" size="mini"
  440. v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  441. <el-option v-for="item in placeinif" :key="item.id" :label="item.cityname"
  442. :value="item.id">
  443. <span style="float: left">{{ item.cityname }}</span>
  444. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  445. </el-option>
  446. </el-select>
  447. </template>
  448. </el-table-column>
  449. <el-table-column prop="cost" label=" 费用标准" width="180">
  450. <template slot-scope="scope">
  451. <el-input-number @input="Traininginput(scope.row)" size="mini" :precision="2"
  452. :controls="false" v-model="scope.row.cost"></el-input-number>
  453. </template>
  454. </el-table-column>
  455. <el-table-column prop="currencyName" label=" 币 种" width="180">
  456. <template slot-scope="scope">
  457. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  458. </template>
  459. </el-table-column>
  460. <el-table-column prop="subTotal" label="费用小计" width="180">
  461. <template slot-scope="scope">
  462. <div class="sub-boxs">{{ scope.row.subTotal | numFilter }}</div>&nbsp;CNY
  463. </template>
  464. </el-table-column>
  465. <el-table-column prop="address" label="操 作">
  466. <template slot-scope="scope">
  467. <el-button v-if="isSave" style="color: #fff;" size="mini" type="danger"
  468. @click="deleteRow(scope.$index, scope.row, trainingExpenseData, 4)">删除</el-button>
  469. </template>
  470. </el-table-column>
  471. </el-table>
  472. </div>
  473. </div>
  474. <div class="Entry-form-li">
  475. <div class="Entry-li-lable">
  476. <div style="display: flex;align-items: center;">
  477. <el-checkbox v-model="choiceSeven"></el-checkbox>
  478. <div class="li-lable">七、其他:</div>
  479. <div style="display: flex;">
  480. <div class="li-lable">
  481. <label>合计:</label>
  482. <div class="sub-boxs">{{ otherExpense | numFilter }}</div>
  483. <span>元/人</span>
  484. </div>
  485. </div>
  486. <div style="color:red">
  487. &nbsp;注:特殊情况才在这里填写,如:要计算车导费、备用金费用等
  488. </div>
  489. </div>
  490. <div class="btn-Entry">
  491. <el-button type="primary" @click="addlist('其他')" size="mini">新 增</el-button>
  492. </div>
  493. </div>
  494. <div class="Entry-li-inif">
  495. <el-table :data="otherData" border style="width: 100%">
  496. <el-table-column prop="index" label="第几项" width="180">
  497. <template slot-scope="scope">
  498. <el-input-number size="mini" :controls="false"
  499. v-model="scope.row.index"></el-input-number>
  500. </template>
  501. </el-table-column>
  502. <el-table-column style="position: relative;" prop="setDataId" label="费用类型" width="180">
  503. <!-- <template slot-scope="scope">
  504. <el-input size="mini" v-model="scope.row.city"></el-input>
  505. </template> -->
  506. <template slot-scope="scope">
  507. <el-select size="mini" v-model="scope.row.setDataId" filterable placeholder="请选择">
  508. <el-option v-for="item in otherfylx" :key="item.id" :label="item.name"
  509. :value="item.id">
  510. <span style="float: left">{{ item.name }}</span>
  511. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  512. </el-option>
  513. </el-select>
  514. </template>
  515. </el-table-column>
  516. <el-table-column prop="cost" label=" 费用标准" width="180">
  517. <template slot-scope="scope">
  518. <el-input-number @input="otherinput(scope.row)" size="mini" :precision="2"
  519. :controls="false" v-model="scope.row.cost"></el-input-number>
  520. </template>
  521. </el-table-column>
  522. <el-table-column prop="currencyName" label=" 币 种" width="180">
  523. <template slot-scope="scope">
  524. <el-select @change="othercurrencychange(scope.row.currency, scope.row)" size="mini"
  525. v-model="scope.row.currency" filterable placeholder="请选择">
  526. <el-option v-for="item in othercurrencys" :key="item.currencyId"
  527. :label="item.currencyCode" :value="item.currencyId">
  528. <span style="float: left">{{ item.currencyCode + ' 汇率:' + item.rate
  529. }}</span>
  530. </el-option>
  531. </el-select>
  532. <!-- <el-input size="mini" v-model="scope.row.currencyName"></el-input> -->
  533. </template>
  534. </el-table-column>
  535. <el-table-column prop="subTotal" label="费用小计" width="180">
  536. <template slot-scope="scope">
  537. <div class="sub-boxs">{{ scope.row.subTotal | numFilter }}</div>&nbsp;CNY
  538. </template>
  539. </el-table-column>
  540. <el-table-column prop="remark" label="备注" width="450">
  541. <template slot-scope="scope">
  542. <el-input size="mini" v-model="scope.row.remark"></el-input>
  543. </template>
  544. </el-table-column>
  545. <el-table-column prop="address" label="操 作">
  546. <template slot-scope="scope">
  547. <el-button v-if="isSave" style="color: #fff;" size="mini" type="danger"
  548. @click="DeleteOtherExpenses(scope.$index, scope.row, otherData)">删除</el-button>
  549. </template>
  550. </el-table-column>
  551. </el-table>
  552. </div>
  553. </div>
  554. <div class="Entry-form-li">
  555. <div class="Entry-li-lables">
  556. <div class="li-lable">费用总计:</div>
  557. <div style="display: flex;">
  558. <div class="li-lable">
  559. <!-- <el-checkbox style="margin-right: -10px;" v-model="airJJC_Checked"></el-checkbox> -->
  560. <label>(经济舱)</label>
  561. <div class="sub-boxs">{{ jjctotal | numFilter }}</div>
  562. <span>元/人</span>
  563. </div>
  564. &nbsp;&nbsp;&nbsp;&nbsp;
  565. <div class="li-lable">
  566. <!-- <el-checkbox style="margin-right: -10px;" v-model="airGWC_Checked"></el-checkbox> -->
  567. <label>(公务舱)</label>
  568. <div class="sub-boxs">{{ gwctotal | numFilter }}</div>
  569. <span>元/人</span>
  570. </div>
  571. &nbsp;&nbsp;&nbsp;&nbsp;
  572. <div class="li-lable">
  573. <!-- <el-checkbox style="margin-right: -10px;" v-model="airGWC_Checked"></el-checkbox> -->
  574. <label>(头等舱)</label>
  575. <div class="sub-boxs">{{ tdctotal | numFilter }}</div>
  576. <span>元/人</span>
  577. </div>
  578. </div>
  579. </div>
  580. </div>
  581. </div>
  582. </div>
  583. </div>
  584. </template>
  585. <script>
  586. import { Decimal } from 'decimal.js'
  587. import { debounce } from '../../store/statice'
  588. export default {
  589. data() {
  590. return {
  591. fullscreenLoading: false,
  592. options: [],
  593. listvalue: 1005,
  594. tablevalue: '',
  595. listvalueoptions: [],
  596. tablevalueoptions: [],
  597. //是否计算Checkbox
  598. choiceOne: false,//境内费用(其他费用)选择框
  599. choiceTwo: false,//国际旅费合计选择框
  600. choiceThree: false,//住宿费合计选择框
  601. choiceFour: false,//伙食费合计选择框
  602. choiceFive: false,//公杂费合计选择框
  603. choiceSix: false,//培训费用选择框
  604. choiceSeven: false,//其他费用选择框
  605. sumJJC: false,//经济舱小计选择框
  606. sumGWC: false,//公务舱小计选择框
  607. sumTDC: false,//头等舱小计选择框
  608. airJJC_Checked: false,//经济舱选择框
  609. airGWC_Checked: false,//公务舱选择框
  610. airTDC_Checked: false,//公务舱选择框
  611. userId: '',
  612. token: '',
  613. value: '',
  614. options: [],
  615. Visafees: '',
  616. Visadepicted: '',
  617. currencys: [],
  618. currencyss: [],
  619. DomesticFees: {
  620. visafees: '',//签证费
  621. visafeesDescription: '',//签证费用描述
  622. vaccinefees: 0,//疫苗费
  623. nucleicfees: 0,//核酸检测费
  624. serviceCharge: 0,//服务费
  625. insurance: 500,//保险费
  626. ticketsExhibitionL: 0,//参展门票
  627. total: 0,
  628. firstItemRemark:''//备注
  629. },
  630. TotalExpenses: {
  631. EconomyClass: 0,//经济舱
  632. BusinessClass: 0,//公务舱
  633. Firstclass: 0,//头等舱
  634. TravellingExpenses: 0,//城市区间交通费
  635. EconomyClasstotal: 0,//经济舱合计
  636. BusinessClasstotal: 0,//公务舱合计
  637. Firstclasstotal: 0,//头等舱合计
  638. twoItemRemark:''//备注
  639. },
  640. TotalAccommodationFee: 0,//住宿费合计
  641. TotalMeals: 0,//伙食费合计
  642. TotalMiscellaneous: 0,//公杂费合计
  643. trainingExpense: 0,//培训费合计
  644. otherExpense: 0,//其他费用合计
  645. quarterageData: [],
  646. boardWagesData: [],
  647. miscellaneousFeeData: [],
  648. trainingExpenseData: [],
  649. otherData: [],
  650. placeinif: [],
  651. //下拉框
  652. treeData: "",
  653. treeDataValue: "",
  654. data: [],
  655. defaultProps: {
  656. children: "cityData",
  657. label: "city",
  658. // label: "country",
  659. },
  660. jjctotal: 0,//经济舱合计
  661. gwctotal: 0,//公务舱合计
  662. tdctotal: 0,//公务舱合计
  663. storageid: 0,
  664. visabeizhu: "",
  665. ID: '',
  666. TicketJudgment: {},
  667. CurrencysRemark: '',
  668. //监听币种数组
  669. watchedPrice: null,
  670. cubtn: false,
  671. getvisafeebtn: false,
  672. visainfo: {},
  673. //其他币种
  674. othercurrencys: [],
  675. otherfylx: [],
  676. //设置权限
  677. setpermissions:false,
  678. isSave:false,
  679. isView:false,
  680. viewUsers:[],
  681. viewUsersby:[],
  682. viewUsersarr:[]
  683. }
  684. },
  685. methods: {
  686. //获取团组
  687. GetEnterExitCostDataSource() {
  688. var url = "/api/Groups/GetEnterExitCostDataSource"
  689. var that = this
  690. this.$axios({
  691. method: 'post',
  692. url: url,
  693. headers: {
  694. Authorization: 'Bearer ' + this.token
  695. },
  696. data: {
  697. portType: 1
  698. }
  699. }).then(function (res) {
  700. if (res.data.code == 200) {
  701. that.options = res.data.data.groupNameData;
  702. that.currencys = res.data.data.currencyInit;
  703. that.viewUsersarr= res.data.data.viewPermissionData;
  704. // console.log(that.value)
  705. if (that.value == null) {
  706. that.value = res.data.data.groupNameData[0].id;
  707. }
  708. that.listvalueoptions = res.data.data.wordTypeData;
  709. that.tablevalueoptions = res.data.data.excelTypeData;
  710. that.GetEnterExitCostInfobyDiId();
  711. that.PostGroupTeamRateByDiIdAndCTableId();
  712. }
  713. })
  714. },
  715. //获取币种
  716. PostGroupTeamRateByDiIdAndCTableId() {
  717. this.othercurrencys = [];
  718. var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
  719. var that = this
  720. this.$axios({
  721. method: 'post',
  722. url: url,
  723. headers: {
  724. Authorization: 'Bearer ' + this.token
  725. },
  726. data: {
  727. portType: 1,
  728. diId: that.value,
  729. cTable: 98
  730. }
  731. }).then(function (res) {
  732. if (res.data.code == 200) {
  733. that.othercurrencys = res.data.data.teamRates;
  734. for (let sr = 0; sr < that.othercurrencys.length; sr++) {
  735. if (that.othercurrencys[sr].currencyCode != 'CNY') {
  736. that.othercurrencys[sr].rate = (that.othercurrencys[sr].rate * 1.03).toFixed(4)
  737. }
  738. for (let y = 0; y < that.currencys.length; y++) {
  739. if (that.currencys[y].currencyCode == that.othercurrencys[sr].currencyCode) {
  740. that.othercurrencys[sr].rate = that.currencys[y].rate;
  741. }
  742. }
  743. }
  744. console.log(that.othercurrencys);
  745. console.log(that.currencys);
  746. } else {
  747. that.$message.error(res.data.msg);
  748. }
  749. })
  750. },
  751. //获取类型
  752. QuerySetData() {
  753. var url = "/api/System/QuerySetData"
  754. var that = this
  755. this.$axios({
  756. method: 'post',
  757. url: url,
  758. headers: {
  759. Authorization: 'Bearer ' + this.token
  760. },
  761. data: {
  762. dataType: 92
  763. }
  764. }).then(function (res) {
  765. if (res.data.code == 200) {
  766. that.otherfylx = res.data.data;
  767. } else {
  768. that.$message.error(res.data.msg);
  769. }
  770. })
  771. },
  772. //获取签证标注
  773. GetEnterExitCostCorrelationTips(val) {
  774. this.getvisafeebtn = false;
  775. if (val == 1) {
  776. this.TotalExpenses.EconomyClass = 0;
  777. this.TotalExpenses.BusinessClass = 0;
  778. this.DomesticFees.visafees = 0;
  779. this.DomesticFees.visafeesDescription = "";
  780. var url = "/api/Groups/GetEnterExitCostCorrelationTips"
  781. var that = this
  782. this.$axios({
  783. method: 'post',
  784. url: url,
  785. headers: {
  786. Authorization: 'Bearer ' + this.token
  787. },
  788. data: {
  789. portType: 1,
  790. diId: that.value
  791. }
  792. }).then(function (res) {
  793. if (res.data.code == 200) {
  794. that.TotalExpenses.EconomyClass = res.data.data.airData.jjcCurrentRate;
  795. that.TotalExpenses.BusinessClass = res.data.data.airData.gwcCurrentRate;
  796. that.DomesticFees.visafees = res.data.data.visaData.feeTotal;
  797. that.DomesticFees.visafeesDescription = res.data.data.visaData.remark;
  798. } else {
  799. that.$message.error(res.data.msg);
  800. }
  801. })
  802. } else {
  803. var url = "/api/Groups/GetEnterExitCostCorrelationTips"
  804. var that = this
  805. this.$axios({
  806. method: 'post',
  807. url: url,
  808. headers: {
  809. Authorization: 'Bearer ' + this.token
  810. },
  811. data: {
  812. portType: 1,
  813. diId: that.value
  814. }
  815. }).then(function (res) {
  816. if (res.data.code == 200) {
  817. that.TicketJudgment = res.data.data.airData;
  818. that.visainfo = res.data.data.visaData;
  819. that.currencyss = res.data.data.reteInfos;
  820. if (that.DomesticFees.visafees != res.data.data.visaData.feeTotal && res.data.data.visaData.feeTotal != 0) {
  821. that.getvisafeebtn = true;
  822. }
  823. for (let s = 0; s < that.currencys.length; s++) {
  824. if (that.currencys[s].rate != that.currencyss[s].rate) {
  825. that.cubtn = true;
  826. that.CurrencysRemark = '当前汇率与实时汇率不同!移上查看'
  827. return
  828. } else {
  829. that.cubtn = false;
  830. }
  831. }
  832. } else {
  833. that.$message.error(res.data.msg);
  834. }
  835. })
  836. }
  837. },
  838. //机票费用填入
  839. Fillin() {
  840. this.TotalExpenses.EconomyClass = this.TicketJudgment.jjcCurrentRate;
  841. this.TotalExpenses.BusinessClass = this.TicketJudgment.gwcCurrentRate;
  842. },
  843. //获取费用标注
  844. GetNationalTravelFeeData() {
  845. this.fullscreenLoading = true;
  846. var url = "/api/Groups/GetNationalTravelFeeData"
  847. var that = this
  848. this.$axios({
  849. method: 'post',
  850. url: url,
  851. headers: {
  852. Authorization: 'Bearer ' + this.token
  853. },
  854. data: {
  855. portType: 1
  856. }
  857. }).then(function (res) {
  858. console.log(res)
  859. let placeinifarr = [];
  860. if (res.data.code == 200) {
  861. for (let i = 0; i < res.data.data.length; i++) {
  862. res.data.data[i]['cityname'] = res.data.data[i].country + '-' + res.data.data[i].city;
  863. placeinifarr.push(res.data.data[i]);
  864. }
  865. that.placeinif = placeinifarr;
  866. }
  867. })
  868. },
  869. GetEnterExitCostInfobyDiId() {
  870. //初始化数据
  871. this.ID = '';
  872. // this.currencys=[]
  873. this.viewUsers=[];
  874. this.viewUsersby=[];
  875. this.TotalAccommodationFee = 0;//住宿费合计
  876. this.TotalMeals = 0;//伙食费合计
  877. this.TotalMiscellaneous = 0;//公杂费合计
  878. this.trainingExpense = 0;//培训费合计
  879. this.otherExpense = 0;//其他费合计
  880. this.DomesticFees = {
  881. visafees: '',//签证费
  882. visafeesDescription: '',//签证费用描述
  883. vaccinefees: 0,//疫苗费
  884. nucleicfees: 0,//核酸检测费
  885. serviceCharge: 0,//服务费
  886. insurance: 500,//保险费
  887. ticketsExhibitionL: 0,//参展门票
  888. total: 0,
  889. firstItemRemark:''//备注
  890. }
  891. this.TotalExpenses = {
  892. EconomyClass: 0,//经济舱
  893. BusinessClass: 0,//公务舱
  894. Firstclass: 0,//TD舱
  895. TravellingExpenses: 0,//城市区间交通费
  896. EconomyClasstotal: 0,//经济舱合计
  897. BusinessClasstotal: 0,//公务舱合计
  898. Firstclasstotal: 0,//TD舱合计
  899. twoItemRemark:''//备注
  900. }
  901. this.choiceOne = false//境内费用(其他费用)选择框
  902. this.choiceTwo = false//国际旅费合计选择框
  903. this.choiceThree = false//住宿费合计选择框
  904. this.choiceFour = false//伙食费合计选择框
  905. this.choiceFive = false//公杂费合计选择框
  906. this.choiceSix = false//培训费用选择框
  907. this.choiceSeven = false//其他费用选择框
  908. this.sumJJC = false//经济舱小计选择框
  909. this.sumGWC = false//公务舱小计选择框
  910. this.sumTDC = false//公务舱小计选择框
  911. this.airJJC_Checked = false//经济舱选择框
  912. this.airGWC_Checked = false//公务舱选择框
  913. this.isSave = false//保存权限
  914. this.isView = false//查看权限
  915. this.storageid = 0
  916. this.quarterageData = [
  917. {
  918. id: 0,
  919. diId: this.value,
  920. type: 1,
  921. days: 1,
  922. nationalTravelFeeId: '',
  923. cost: 0,
  924. currency: 0,
  925. subTotal: 0,
  926. remark: '',
  927. },
  928. {
  929. id: 0,
  930. diId: this.value,
  931. type: 1,
  932. days: 2,
  933. nationalTravelFeeId: '',
  934. cost: 0,
  935. currency: 0,
  936. subTotal: 0,
  937. remark: '',
  938. },
  939. {
  940. id: 0,
  941. diId: this.value,
  942. type: 1,
  943. days: 3,
  944. nationalTravelFeeId: '',
  945. cost: 0,
  946. currency: 0,
  947. subTotal: 0,
  948. remark: '',
  949. },
  950. {
  951. id: 0,
  952. diId: this.value,
  953. type: 1,
  954. days: 4,
  955. nationalTravelFeeId: '',
  956. cost: 0,
  957. currency: 0,
  958. subTotal: 0,
  959. remark: '',
  960. },
  961. {
  962. id: 0,
  963. diId: this.value,
  964. type: 1,
  965. days: 5,
  966. nationalTravelFeeId: '',
  967. cost: 0,
  968. currency: 0,
  969. subTotal: 0,
  970. remark: '',
  971. },
  972. {
  973. id: 0,
  974. diId: this.value,
  975. type: 1,
  976. days: 6,
  977. nationalTravelFeeId: '',
  978. cost: 0,
  979. currency: 0,
  980. subTotal: 0,
  981. remark: '',
  982. },
  983. {
  984. id: 0,
  985. diId: this.value,
  986. type: 1,
  987. days: 7,
  988. nationalTravelFeeId: '',
  989. cost: 0,
  990. currency: 0,
  991. subTotal: 0,
  992. remark: '',
  993. },
  994. {
  995. id: 0,
  996. diId: this.value,
  997. type: 1,
  998. days: 8,
  999. nationalTravelFeeId: '',
  1000. cost: 0,
  1001. currency: 0,
  1002. subTotal: 0,
  1003. remark: '',
  1004. },
  1005. ]
  1006. this.boardWagesData = [
  1007. {
  1008. id: 0,
  1009. diId: this.value,
  1010. type: 2,
  1011. days: 1,
  1012. nationalTravelFeeId: '',
  1013. cost: 0,
  1014. currency: 0,
  1015. subTotal: 0,
  1016. remark: '',
  1017. },
  1018. {
  1019. id: 0,
  1020. diId: this.value,
  1021. type: 2,
  1022. days: 2,
  1023. nationalTravelFeeId: '',
  1024. cost: 0,
  1025. currency: 0,
  1026. subTotal: 0,
  1027. remark: '',
  1028. },
  1029. {
  1030. id: 0,
  1031. diId: this.value,
  1032. type: 2,
  1033. days: 3,
  1034. nationalTravelFeeId: '',
  1035. cost: 0,
  1036. currency: 0,
  1037. subTotal: 0,
  1038. remark: '',
  1039. },
  1040. {
  1041. id: 0,
  1042. diId: this.value,
  1043. type: 2,
  1044. days: 4,
  1045. nationalTravelFeeId: '',
  1046. cost: 0,
  1047. currency: 0,
  1048. subTotal: 0,
  1049. remark: '',
  1050. },
  1051. {
  1052. id: 0,
  1053. diId: this.value,
  1054. type: 2,
  1055. days: 5,
  1056. nationalTravelFeeId: '',
  1057. cost: 0,
  1058. currency: 0,
  1059. subTotal: 0,
  1060. remark: '',
  1061. },
  1062. {
  1063. id: 0,
  1064. diId: this.value,
  1065. type: 2,
  1066. days: 6,
  1067. nationalTravelFeeId: '',
  1068. cost: 0,
  1069. currency: 0,
  1070. subTotal: 0,
  1071. remark: '',
  1072. },
  1073. {
  1074. id: 0,
  1075. diId: this.value,
  1076. type: 2,
  1077. days: 7,
  1078. nationalTravelFeeId: '',
  1079. cost: 0,
  1080. currency: 0,
  1081. subTotal: 0,
  1082. remark: '',
  1083. },
  1084. {
  1085. id: 0,
  1086. diId: this.value,
  1087. type: 2,
  1088. days: 8,
  1089. nationalTravelFeeId: '',
  1090. cost: 0,
  1091. currency: 0,
  1092. subTotal: 0,
  1093. remark: '',
  1094. },
  1095. ]
  1096. this.miscellaneousFeeData = [
  1097. {
  1098. id: 0,
  1099. diId: this.value,
  1100. type: 3,
  1101. days: 1,
  1102. nationalTravelFeeId: '',
  1103. cost: 0,
  1104. currency: 0,
  1105. subTotal: 0,
  1106. remark: '',
  1107. },
  1108. {
  1109. id: 0,
  1110. diId: this.value,
  1111. type: 3,
  1112. days: 2,
  1113. nationalTravelFeeId: '',
  1114. cost: 0,
  1115. currency: 0,
  1116. subTotal: 0,
  1117. remark: '',
  1118. },
  1119. {
  1120. id: 0,
  1121. diId: this.value,
  1122. type: 3,
  1123. days: 3,
  1124. nationalTravelFeeId: '',
  1125. cost: 0,
  1126. currency: 0,
  1127. subTotal: 0,
  1128. remark: '',
  1129. },
  1130. {
  1131. id: 0,
  1132. diId: this.value,
  1133. type: 3,
  1134. days: 4,
  1135. nationalTravelFeeId: '',
  1136. cost: 0,
  1137. currency: 0,
  1138. subTotal: 0,
  1139. remark: '',
  1140. },
  1141. {
  1142. id: 0,
  1143. diId: this.value,
  1144. type: 3,
  1145. days: 5,
  1146. nationalTravelFeeId: '',
  1147. cost: 0,
  1148. currency: 0,
  1149. subTotal: 0,
  1150. remark: '',
  1151. },
  1152. {
  1153. id: 0,
  1154. diId: this.value,
  1155. type: 3,
  1156. days: 6,
  1157. nationalTravelFeeId: '',
  1158. cost: 0,
  1159. currency: 0,
  1160. subTotal: 0,
  1161. remark: '',
  1162. },
  1163. {
  1164. id: 0,
  1165. diId: this.value,
  1166. type: 3,
  1167. days: 7,
  1168. nationalTravelFeeId: '',
  1169. cost: 0,
  1170. currency: 0,
  1171. subTotal: 0,
  1172. remark: '',
  1173. },
  1174. {
  1175. id: 0,
  1176. diId: this.value,
  1177. type: 3,
  1178. days: 8,
  1179. nationalTravelFeeId: '',
  1180. cost: 0,
  1181. currency: 0,
  1182. subTotal: 0,
  1183. remark: '',
  1184. },
  1185. ]
  1186. this.trainingExpenseData = [
  1187. {
  1188. id: 0,
  1189. diId: this.value,
  1190. type: 4,
  1191. days: 1,
  1192. nationalTravelFeeId: '',
  1193. cost: 0,
  1194. currency: 0,
  1195. subTotal: 0,
  1196. remark: '',
  1197. },
  1198. {
  1199. id: 0,
  1200. diId: this.value,
  1201. type: 4,
  1202. days: 2,
  1203. nationalTravelFeeId: '',
  1204. cost: 0,
  1205. currency: 0,
  1206. subTotal: 0,
  1207. remark: '',
  1208. },
  1209. {
  1210. id: 0,
  1211. diId: this.value,
  1212. type: 4,
  1213. days: 3,
  1214. nationalTravelFeeId: '',
  1215. cost: 0,
  1216. currency: 0,
  1217. subTotal: 0,
  1218. remark: '',
  1219. },
  1220. {
  1221. id: 0,
  1222. diId: this.value,
  1223. type: 4,
  1224. days: 4,
  1225. nationalTravelFeeId: '',
  1226. cost: 0,
  1227. currency: 0,
  1228. subTotal: 0,
  1229. remark: '',
  1230. },
  1231. {
  1232. id: 0,
  1233. diId: this.value,
  1234. type: 4,
  1235. days: 5,
  1236. nationalTravelFeeId: '',
  1237. cost: 0,
  1238. currency: 0,
  1239. subTotal: 0,
  1240. remark: '',
  1241. },
  1242. {
  1243. id: 0,
  1244. diId: this.value,
  1245. type: 4,
  1246. days: 6,
  1247. nationalTravelFeeId: '',
  1248. cost: 0,
  1249. currency: 0,
  1250. subTotal: 0,
  1251. remark: '',
  1252. },
  1253. {
  1254. id: 0,
  1255. diId: this.value,
  1256. type: 4,
  1257. days: 7,
  1258. nationalTravelFeeId: '',
  1259. cost: 0,
  1260. currency: 0,
  1261. subTotal: 0,
  1262. remark: '',
  1263. },
  1264. {
  1265. id: 0,
  1266. diId: this.value,
  1267. type: 4,
  1268. days: 8,
  1269. nationalTravelFeeId: '',
  1270. cost: 0,
  1271. currency: 0,
  1272. subTotal: 0,
  1273. remark: '',
  1274. },
  1275. ]
  1276. this.otherData = [
  1277. {
  1278. id: 0,
  1279. diId: this.value,
  1280. setDataId: '',
  1281. index: 1,
  1282. cost: '',
  1283. cost: 0,
  1284. currency: '',
  1285. subTotal: 0,
  1286. remark:'',
  1287. },
  1288. {
  1289. id: 0,
  1290. diId: this.value,
  1291. setDataId: '',
  1292. index: 2,
  1293. cost: '',
  1294. cost: 0,
  1295. currency: '',
  1296. subTotal: 0,
  1297. remark:'',
  1298. },
  1299. {
  1300. id: 0,
  1301. diId: this.value,
  1302. setDataId: '',
  1303. index: 3,
  1304. cost: '',
  1305. cost: 0,
  1306. currency: '',
  1307. subTotal: 0,
  1308. remark:'',
  1309. },
  1310. {
  1311. id: 0,
  1312. diId: this.value,
  1313. setDataId: '',
  1314. index: 4,
  1315. cost: '',
  1316. cost: 0,
  1317. currency: '',
  1318. subTotal: 0,
  1319. remark:'',
  1320. },
  1321. {
  1322. id: 0,
  1323. diId: this.value,
  1324. setDataId: '',
  1325. index: 5,
  1326. cost: '',
  1327. cost: 0,
  1328. currency: '',
  1329. subTotal: 0,
  1330. remark:'',
  1331. },
  1332. {
  1333. id: 0,
  1334. diId: this.value,
  1335. setDataId: '',
  1336. index: 6,
  1337. cost: '',
  1338. cost: 0,
  1339. currency: '',
  1340. subTotal: 0,
  1341. remark:'',
  1342. },
  1343. {
  1344. id: 0,
  1345. diId: this.value,
  1346. setDataId: '',
  1347. index: 7,
  1348. cost: '',
  1349. cost: 0,
  1350. currency: '',
  1351. subTotal: 0,
  1352. remark:'',
  1353. },
  1354. {
  1355. id: 0,
  1356. diId: this.value,
  1357. setDataId: '',
  1358. index: 8,
  1359. cost: '',
  1360. cost: 0,
  1361. currency: '',
  1362. subTotal: 0,
  1363. remark:'',
  1364. },
  1365. ]
  1366. var url = "/api/Groups/GetEnterExitCostInfobyDiId"
  1367. var that = this
  1368. this.$axios({
  1369. method: 'post',
  1370. url: url,
  1371. headers: {
  1372. Authorization: 'Bearer ' + this.token
  1373. },
  1374. data: {
  1375. portType: 1,
  1376. diId: that.value,
  1377. currUserId:that.userId
  1378. }
  1379. }).then(function (res) {
  1380. if (res.data.code == 200) {
  1381. that.ID = res.data.data.id;
  1382. //汇率
  1383. that.currencys = res.data.data.currencys;
  1384. //权限
  1385. that.isSave=res.data.data.isSave;
  1386. that.isView=res.data.data.isView;
  1387. that.viewUsers=res.data.data.viewUsers;
  1388. that.viewUsersby=res.data.data.viewUsers;
  1389. //境内费用
  1390. that.DomesticFees.visafees = res.data.data.visa;
  1391. that.DomesticFees.visafeesDescription = res.data.data.visaRemark;
  1392. that.DomesticFees.vaccinefees = res.data.data.yiMiao;
  1393. that.DomesticFees.nucleicfees = res.data.data.heSuan;
  1394. that.DomesticFees.serviceCharge = res.data.data.service;
  1395. that.DomesticFees.insurance = res.data.data.safe;
  1396. that.DomesticFees.ticketsExhibitionL = res.data.data.ticket;
  1397. that.DomesticFees.firstItemRemark = res.data.data.firstItemRemark;
  1398. //国际旅费
  1399. that.TotalExpenses.EconomyClass = res.data.data.airJJ;
  1400. that.TotalExpenses.BusinessClass = res.data.data.airGW;
  1401. that.TotalExpenses.Firstclass = res.data.data.airTD;
  1402. that.TotalExpenses.TravellingExpenses = res.data.data.cityTranffic;
  1403. that.TotalExpenses.twoItemRemark = res.data.data.twoItemRemark;
  1404. //是否计算Checkbox
  1405. that.choiceOne = res.data.data.choiceOne == 1 ? true : false;
  1406. that.choiceTwo = res.data.data.choiceTwo == 1 ? true : false;
  1407. that.choiceThree = res.data.data.choiceThree == 1 ? true : false;
  1408. that.choiceFour = res.data.data.choiceFour == 1 ? true : false;
  1409. that.choiceFive = res.data.data.choiceFive == 1 ? true : false;
  1410. that.choiceSix = res.data.data.choiceSix == 1 ? true : false;
  1411. that.choiceSeven = res.data.data.otherExpenses_Checked == 1 ? true : false;
  1412. that.sumJJC = res.data.data.sumJJC == 1 ? true : false;
  1413. that.sumGWC = res.data.data.sumGWC == 1 ? true : false;
  1414. that.sumTDC = res.data.data.sumTDC == 1 ? true : false;
  1415. that.airJJC_Checked = res.data.data.airJJC_Checked == 1 ? true : false;
  1416. that.airGWC_Checked = res.data.data.airGWC_Checked == 1 ? true : false;
  1417. //住宿费
  1418. that.quarterageData = res.data.data.quarterageData;
  1419. for (let a = 0; a < res.data.data.quarterageData.length; a++) {
  1420. that.TotalAccommodationFee += res.data.data.quarterageData[a].subTotal
  1421. }
  1422. //伙食费
  1423. that.boardWagesData = res.data.data.boardWagesData;
  1424. for (let b = 0; b < res.data.data.boardWagesData.length; b++) {
  1425. that.TotalMeals += res.data.data.boardWagesData[b].subTotal
  1426. }
  1427. //公杂费
  1428. that.miscellaneousFeeData = res.data.data.miscellaneousFeeData;
  1429. for (let c = 0; c < res.data.data.miscellaneousFeeData.length; c++) {
  1430. that.TotalMiscellaneous += res.data.data.miscellaneousFeeData[c].subTotal
  1431. }
  1432. //培训费
  1433. that.trainingExpenseData = res.data.data.trainingExpenseData;
  1434. for (let d = 0; d < res.data.data.trainingExpenseData.length; d++) {
  1435. that.trainingExpense += res.data.data.trainingExpenseData[d].subTotal
  1436. }
  1437. //其他费
  1438. that.otherData = res.data.data.dayOtherPriceData;
  1439. for (let e = 0; e < res.data.data.dayOtherPriceData.length; e++) {
  1440. that.otherExpense += res.data.data.dayOtherPriceData[e].subTotal
  1441. }
  1442. that.storageid = res.data.data.id;
  1443. // that.GetNationalTravelFeeData();
  1444. that.fullscreenLoading = false;
  1445. that.GetEnterExitCostCorrelationTips(2);
  1446. } else {
  1447. that.fullscreenLoading = false;
  1448. that.GetEnterExitCostCorrelationTips(1);
  1449. that.$message.warning(res.data.msg);
  1450. if (res.data.msg=='未查询出数据!可操作该条数据!') {
  1451. that.isSave=true;
  1452. that.isView=true;
  1453. }
  1454. }
  1455. })
  1456. },
  1457. //全部清空
  1458. cleanout() {
  1459. this.fullscreenLoading = true
  1460. this.$confirm('此操作将全部清空, 是否继续?', '提示', {
  1461. confirmButtonText: '确定',
  1462. cancelButtonText: '取消',
  1463. type: 'warning'
  1464. }).then(() => {
  1465. var url = "/api/Groups/PostEnterExitCostOneClickClear"
  1466. var that = this
  1467. this.$axios({
  1468. method: 'post',
  1469. url: url,
  1470. headers: {
  1471. Authorization: 'Bearer ' + this.token
  1472. },
  1473. data: {
  1474. portType: 1,
  1475. diId: that.value,
  1476. userId: that.userId,
  1477. id: that.ID
  1478. }
  1479. }).then(function (res) {
  1480. if (res.data.code == 200) {
  1481. that.$message({
  1482. type: 'success',
  1483. message: res.data.msg
  1484. });
  1485. that.GetEnterExitCostInfobyDiId()
  1486. } else {
  1487. that.fullscreenLoading = false;
  1488. that.$message.error(res.data.msg);
  1489. }
  1490. })
  1491. }).catch(() => {
  1492. this.fullscreenLoading = false;
  1493. this.$message({
  1494. type: 'info',
  1495. message: '已取消清空'
  1496. });
  1497. });
  1498. },
  1499. //下拉
  1500. handNodeClick(data, node, e) {
  1501. // console.log(data)
  1502. // console.log(node)
  1503. // console.log(e)
  1504. this.treeDataValue = data.name
  1505. this.treeData = data.name
  1506. // console.log(this.treeData)
  1507. },
  1508. //sr需求
  1509. SRrequirement(obj) {
  1510. var currencyinfo = {}
  1511. var rate = 0
  1512. currencyinfo = this.othercurrencys.find(function (i) {
  1513. return i.currencyId === obj.currency
  1514. });
  1515. rate = currencyinfo.rate;
  1516. this.otherExpense = 0;
  1517. for (let l = 0; l < this.otherData.length; l++) {
  1518. this.otherData[l].currency = obj.currency
  1519. this.otherData[l].subTotal = Number(this.otherData[l].cost) * Number(rate);
  1520. this.otherExpense += this.otherData[l].subTotal;
  1521. }
  1522. console.log(this.otherData);
  1523. console.log(rate);
  1524. console.log(obj.currency);
  1525. },
  1526. //住宿地区选择
  1527. changeSelect(val, item, index) {
  1528. var rate = 0
  1529. var obj = {}
  1530. obj = this.placeinif.find(function (i) {
  1531. return i.id === item
  1532. });
  1533. this.SRrequirement(obj)
  1534. //在change中获取到整条对象数据
  1535. val.currencyName = obj.currencyName;
  1536. val.currency = obj.currency;
  1537. val.cost = obj.roomCost;
  1538. for (let j = 0; j < this.currencys.length; j++) {
  1539. if (this.currencys[j].currencyCode == obj.currencyCode) {
  1540. rate = this.currencys[j].rate;
  1541. }
  1542. }
  1543. val.subTotal = Number(val.cost) * Number(rate);
  1544. this.TotalAccommodationFee = 0;
  1545. for (let a = 0; a < this.quarterageData.length; a++) {
  1546. this.TotalAccommodationFee += this.quarterageData[a].subTotal
  1547. }
  1548. // this.mealschangeSelect(this.boardWagesData,item,index)
  1549. },
  1550. //住宿费费用标准值改变
  1551. zhusuinput(val) {
  1552. var rate = 0
  1553. for (let j = 0; j < this.currencys.length; j++) {
  1554. if (this.currencys[j].currencyName == val.currencyName) {
  1555. rate = this.currencys[j].rate;
  1556. }
  1557. }
  1558. val.subTotal = Number(val.cost) * Number(rate);
  1559. this.TotalAccommodationFee = 0;
  1560. for (let a = 0; a < this.quarterageData.length; a++) {
  1561. this.TotalAccommodationFee += this.quarterageData[a].subTotal
  1562. }
  1563. },
  1564. //伙食费费用标准值改变
  1565. mealsinput(val) {
  1566. var rate = 0
  1567. for (let j = 0; j < this.currencys.length; j++) {
  1568. if (this.currencys[j].currencyName == val.currencyName) {
  1569. rate = this.currencys[j].rate;
  1570. }
  1571. }
  1572. val.subTotal = Number(val.cost) * Number(rate);
  1573. this.TotalMeals = 0;
  1574. for (let a = 0; a < this.boardWagesData.length; a++) {
  1575. this.TotalMeals += this.boardWagesData[a].subTotal
  1576. }
  1577. },
  1578. //伙食地区选择
  1579. mealschangeSelect(val, item, index) {
  1580. var rate = 0
  1581. var obj = {}
  1582. obj = this.placeinif.find(function (i) {
  1583. return i.id === item
  1584. });
  1585. //在change中获取到整条对象数据
  1586. // if(index!=undefined){
  1587. // val[index].currencyName=obj.currencyName;
  1588. // val[index].currency=obj.currency;
  1589. // val[index].cost=obj.foodCost;
  1590. // val[index].nationalTravelFeeId=obj.id;
  1591. // for(let j=0;j<this.currencys.length;j++){
  1592. // if(this.currencys[j].currencyCode==obj.currencyCode){
  1593. // rate=this.currencys[j].rate;
  1594. // }
  1595. // }
  1596. // val[index].subTotal=Number(val[index].cost)*Number(rate);
  1597. // this.TotalMeals=0;
  1598. // for(let a=0;a<this.boardWagesData.length;a++){
  1599. // this.TotalMeals+=this.boardWagesData[a].subTotal
  1600. // }
  1601. // }
  1602. val.currencyName = obj.currencyName;
  1603. val.currency = obj.currency;
  1604. val.cost = obj.foodCost;
  1605. for (let j = 0; j < this.currencys.length; j++) {
  1606. if (this.currencys[j].currencyCode == obj.currencyCode) {
  1607. rate = this.currencys[j].rate;
  1608. }
  1609. }
  1610. val.subTotal = Number(val.cost) * Number(rate);
  1611. this.TotalMeals = 0;
  1612. for (let a = 0; a < this.boardWagesData.length; a++) {
  1613. this.TotalMeals += this.boardWagesData[a].subTotal
  1614. }
  1615. this.MiscellaneouschangeSelect(this.miscellaneousFeeData, item, index)
  1616. },
  1617. //公杂费费用标准值改变
  1618. Miscellaneousinput(val) {
  1619. var rate = 0
  1620. for (let j = 0; j < this.currencys.length; j++) {
  1621. if (this.currencys[j].currencyName == val.currencyName) {
  1622. rate = this.currencys[j].rate;
  1623. }
  1624. }
  1625. val.subTotal = Number(val.cost) * Number(rate);
  1626. this.TotalMiscellaneous = 0;
  1627. for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
  1628. this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
  1629. }
  1630. },
  1631. //公杂费地区选择
  1632. MiscellaneouschangeSelect(val, item, index) {
  1633. var rate = 0
  1634. var obj = {}
  1635. obj = this.placeinif.find(function (i) {
  1636. return i.id === item
  1637. });
  1638. //在change中获取到整条对象数据
  1639. if (index != undefined) {
  1640. val[index].currencyName = obj.currencyName;
  1641. val[index].currency = obj.currency;
  1642. val[index].cost = obj.publicCost;
  1643. val[index].nationalTravelFeeId = obj.id;
  1644. for (let j = 0; j < this.currencys.length; j++) {
  1645. if (this.currencys[j].currencyCode == obj.currencyCode) {
  1646. rate = this.currencys[j].rate;
  1647. }
  1648. }
  1649. val[index].subTotal = Number(val[index].cost) * Number(rate);
  1650. this.TotalMiscellaneous = 0;
  1651. for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
  1652. this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
  1653. }
  1654. }
  1655. val.currencyName = obj.currencyName;
  1656. val.currency = obj.currency;
  1657. val.cost = obj.publicCost;
  1658. for (let j = 0; j < this.currencys.length; j++) {
  1659. if (this.currencys[j].currencyCode == obj.currencyCode) {
  1660. rate = this.currencys[j].rate;
  1661. }
  1662. }
  1663. val.subTotal = Number(val.cost) * Number(rate);
  1664. this.TotalMiscellaneous = 0;
  1665. for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
  1666. this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
  1667. }
  1668. },
  1669. //培训费费用标准值改变
  1670. Traininginput(val) {
  1671. console.log(val);
  1672. var rate = 0
  1673. for (let j = 0; j < this.currencys.length; j++) {
  1674. if (this.currencys[j].currencyName == val.currencyName) {
  1675. rate = this.currencys[j].rate;
  1676. }
  1677. }
  1678. val.subTotal = Number(val.cost) * Number(rate);
  1679. this.trainingExpense = 0;
  1680. for (let a = 0; a < this.trainingExpenseData.length; a++) {
  1681. this.trainingExpense += this.trainingExpenseData[a].subTotal
  1682. }
  1683. },
  1684. //培训费地区选择
  1685. TrainingExpenseDataSelect(val, item) {
  1686. console.log(val);
  1687. console.log(this.trainingExpenseData);
  1688. var rate = 0//汇率
  1689. var obj = {}
  1690. obj = this.placeinif.find(function (i) {
  1691. return i.id === item
  1692. });
  1693. //在change中获取到整条对象数据
  1694. console.log(obj);
  1695. val.currencyName = obj.currencyName;
  1696. val.currency = obj.currency;
  1697. for (let j = 0; j < this.currencys.length; j++) {
  1698. if (this.currencys[j].currencyCode == obj.currencyCode) {
  1699. rate = this.currencys[j].rate;
  1700. }
  1701. }
  1702. val.subTotal = Number(val.cost) * Number(rate);
  1703. for (let a = 0; a < this.trainingExpenseData.length; a++) {
  1704. this.trainingExpense += this.trainingExpenseData[a].subTotal
  1705. }
  1706. },
  1707. //其他币种值改变
  1708. othercurrencychange(val, row) {
  1709. var obj = {};
  1710. var rate = 0;
  1711. obj = this.othercurrencys.find(function (i) {
  1712. return i.currencyId === val;
  1713. });
  1714. rate = obj.rate
  1715. row.subTotal = Number(row.cost) * Number(rate);
  1716. this.otherExpense = 0;
  1717. for (let a = 0; a < this.otherData.length; a++) {
  1718. this.otherExpense += this.otherData[a].subTotal;
  1719. }
  1720. },
  1721. //其他费用标准值改变
  1722. otherinput(val) {
  1723. if (val.currency == '' || this.othercurrencys == '') {
  1724. return
  1725. }
  1726. var obj = {}
  1727. var rate = 0
  1728. obj = this.othercurrencys.find(function (i) {
  1729. return i.currencyId === val.currency
  1730. });
  1731. rate = obj.rate
  1732. val.subTotal = Number(val.cost) * Number(rate);
  1733. this.otherExpense = 0;
  1734. for (let a = 0; a < this.otherData.length; a++) {
  1735. this.otherExpense += this.otherData[a].subTotal
  1736. }
  1737. },
  1738. //新增list
  1739. addlist(text) {
  1740. if (text == "住宿费") {
  1741. this.quarterageData.push({
  1742. id: 0,
  1743. diId: this.value,
  1744. type: 1,
  1745. days: this.quarterageData.length != 0 ? (this.quarterageData[this.quarterageData.length - 1].days) + 1 : 1,
  1746. nationalTravelFeeId: '',
  1747. cost: 0,
  1748. currency: 0,
  1749. subTotal: 0,
  1750. remark: '',
  1751. })
  1752. // this.boardWagesData.push({
  1753. // id:0,
  1754. // diId:this.value,
  1755. // type:2,
  1756. // days:this.boardWagesData.length!=0?(this.boardWagesData[this.boardWagesData.length-1].days)+1:1,
  1757. // nationalTravelFeeId:'',
  1758. // cost:0,
  1759. // currency:0,
  1760. // subTotal:0,
  1761. // remark:'',
  1762. // })
  1763. }
  1764. if (text == "伙食费") {
  1765. this.boardWagesData.push({
  1766. id: 0,
  1767. diId: this.value,
  1768. type: 2,
  1769. days: this.boardWagesData.length != 0 ? (this.boardWagesData[this.boardWagesData.length - 1].days) + 1 : 1,
  1770. nationalTravelFeeId: '',
  1771. cost: 0,
  1772. currency: 0,
  1773. subTotal: 0,
  1774. remark: '',
  1775. })
  1776. this.miscellaneousFeeData.push({
  1777. id: 0,
  1778. diId: this.value,
  1779. type: 3,
  1780. days: this.miscellaneousFeeData.length != 0 ? (this.miscellaneousFeeData[this.miscellaneousFeeData.length - 1].days) + 1 : 1,
  1781. nationalTravelFeeId: '',
  1782. cost: 0,
  1783. currency: 0,
  1784. subTotal: 0,
  1785. remark: '',
  1786. })
  1787. }
  1788. if (text == "公杂费") {
  1789. this.miscellaneousFeeData.push({
  1790. id: 0,
  1791. diId: this.value,
  1792. type: 3,
  1793. days: this.miscellaneousFeeData.length != 0 ? (this.miscellaneousFeeData[this.miscellaneousFeeData.length - 1].days) + 1 : 1,
  1794. nationalTravelFeeId: '',
  1795. cost: 0,
  1796. currency: 0,
  1797. subTotal: 0,
  1798. remark: '',
  1799. })
  1800. }
  1801. if (text == "培训费") {
  1802. this.trainingExpenseData.push({
  1803. id: 0,
  1804. diId: this.value,
  1805. type: 4,
  1806. days: this.trainingExpenseData.length != 0 ? (this.trainingExpenseData[this.trainingExpenseData.length - 1].days) + 1 : 1,
  1807. nationalTravelFeeId: '',
  1808. cost: 0,
  1809. currency: 0,
  1810. subTotal: 0,
  1811. remark: '',
  1812. })
  1813. }
  1814. if (text == "其他") {
  1815. this.otherData.push({
  1816. id: 0,
  1817. diId: this.value,
  1818. setDataId: '',
  1819. index: this.otherData.length != 0 ? (this.otherData[this.otherData.length - 1].index) + 1 : 1,
  1820. cost: '',
  1821. cost: 0,
  1822. currency: 0,
  1823. subTotal: 0,
  1824. remark:'',
  1825. })
  1826. }
  1827. },
  1828. //保存
  1829. storage: debounce(function () {
  1830. console.log(this.currencys);
  1831. return new Promise((resolve, reject) => {
  1832. //住宿费
  1833. this.fullscreenLoading = true
  1834. var quarterageDatas = [];
  1835. for (let m = 0; m < this.quarterageData.length; m++) {
  1836. if (this.quarterageData[m].nationalTravelFeeId != '') {
  1837. quarterageDatas.push({
  1838. id: this.quarterageData[m].id,
  1839. diId: this.quarterageData[m].diId,
  1840. type: this.quarterageData[m].type,
  1841. days: this.quarterageData[m].days,
  1842. nationalTravelFeeId: this.quarterageData[m].nationalTravelFeeId,
  1843. cost: this.quarterageData[m].cost,
  1844. currency: this.quarterageData[m].currency,
  1845. subTotal: this.quarterageData[m].subTotal,
  1846. remark: this.quarterageData[m].remark,
  1847. })
  1848. }
  1849. }
  1850. //伙食费
  1851. var boardWagesDatas = [];
  1852. for (let n = 0; n < this.boardWagesData.length; n++) {
  1853. if (this.boardWagesData[n].nationalTravelFeeId != '') {
  1854. boardWagesDatas.push({
  1855. id: this.boardWagesData[n].id,
  1856. diId: this.boardWagesData[n].diId,
  1857. type: this.boardWagesData[n].type,
  1858. days: this.boardWagesData[n].days,
  1859. nationalTravelFeeId: this.boardWagesData[n].nationalTravelFeeId,
  1860. cost: this.boardWagesData[n].cost,
  1861. currency: this.boardWagesData[n].currency,
  1862. subTotal: this.boardWagesData[n].subTotal,
  1863. remark: this.boardWagesData[n].remark,
  1864. })
  1865. }
  1866. }
  1867. //公杂费miscellaneousFeeData
  1868. var miscellaneousFeeDatas = [];
  1869. for (let b = 0; b < this.miscellaneousFeeData.length; b++) {
  1870. if (this.miscellaneousFeeData[b].nationalTravelFeeId != '') {
  1871. miscellaneousFeeDatas.push({
  1872. id: this.miscellaneousFeeData[b].id,
  1873. diId: this.miscellaneousFeeData[b].diId,
  1874. type: this.miscellaneousFeeData[b].type,
  1875. days: this.miscellaneousFeeData[b].days,
  1876. nationalTravelFeeId: this.miscellaneousFeeData[b].nationalTravelFeeId,
  1877. cost: this.miscellaneousFeeData[b].cost,
  1878. currency: this.miscellaneousFeeData[b].currency,
  1879. subTotal: this.miscellaneousFeeData[b].subTotal,
  1880. remark: this.miscellaneousFeeData[b].remark,
  1881. })
  1882. }
  1883. }
  1884. //培训费
  1885. var trainingExpenseDatas = [];
  1886. for (let p = 0; p < this.trainingExpenseData.length; p++) {
  1887. if (this.trainingExpenseData[p].nationalTravelFeeId != '') {
  1888. trainingExpenseDatas.push({
  1889. id: this.trainingExpenseData[p].id,
  1890. diId: this.trainingExpenseData[p].diId,
  1891. type: this.trainingExpenseData[p].type,
  1892. days: this.trainingExpenseData[p].days,
  1893. nationalTravelFeeId: this.trainingExpenseData[p].nationalTravelFeeId,
  1894. cost: this.trainingExpenseData[p].cost,
  1895. currency: this.trainingExpenseData[p].currency,
  1896. subTotal: this.trainingExpenseData[p].subTotal,
  1897. remark: this.trainingExpenseData[p].remark,
  1898. })
  1899. }
  1900. }
  1901. //其他费
  1902. var otherDatas = [];
  1903. console.log();
  1904. for (let c = 0; c < this.otherData.length; c++) {
  1905. if (this.otherData[c].setDataId != '') {
  1906. otherDatas.push({
  1907. id: this.otherData[c].id,
  1908. diId: this.otherData[c].diId,
  1909. index: this.otherData[c].index,
  1910. setDataId: this.otherData[c].setDataId,
  1911. cost: this.otherData[c].cost,
  1912. currency: this.otherData[c].currency,
  1913. subTotal: this.otherData[c].subTotal,
  1914. remark: this.otherData[c].remark,
  1915. })
  1916. }
  1917. }
  1918. this.storageAPI(quarterageDatas, boardWagesDatas, miscellaneousFeeDatas, trainingExpenseDatas, otherDatas)
  1919. })
  1920. }, 1000, true),
  1921. //导出保存
  1922. //保存API
  1923. storageAPI(arrthre, arrfour, arrfive, arrsix, arrSeven) {
  1924. var url = "/api/Groups/PostEnterExitCostOperate"
  1925. var that = this
  1926. this.$axios({
  1927. method: 'post',
  1928. url: url,
  1929. headers: {
  1930. Authorization: 'Bearer ' + this.token,
  1931. contentType: 'application/json'
  1932. },
  1933. data: {
  1934. portType: 1,
  1935. userId: that.userId,
  1936. id: that.storageid,
  1937. diId: that.value,
  1938. choiceOne: that.choiceOne ? 1 : 0,
  1939. insidePay: that.DomesticFees.total,
  1940. visa: that.DomesticFees.visafees,
  1941. visaRemark: that.DomesticFees.visafeesDescription,
  1942. yiMiao: that.DomesticFees.vaccinefees,
  1943. heSuan: that.DomesticFees.nucleicfees,
  1944. service: that.DomesticFees.serviceCharge,
  1945. ticket: that.DomesticFees.ticketsExhibitionL,
  1946. safe: that.DomesticFees.insurance,
  1947. firstItemRemark:that.DomesticFees.firstItemRemark,
  1948. choiceTwo: that.choiceTwo ? 1 : 0,
  1949. otherExpenses_Checked: that.choiceSeven ? 1 : 0,
  1950. sumJJC: that.sumJJC ? 1 : 0,
  1951. sumGWC: that.sumGWC ? 1 : 0,
  1952. sumTDC: that.sumTDC ? 1 : 0,
  1953. outsideJJPay: that.TotalExpenses.EconomyClasstotal,
  1954. outsideGWPay: that.TotalExpenses.BusinessClasstotal,
  1955. outsideTDPay: that.TotalExpenses.Firstclasstotal,
  1956. twoItemRemark:that.TotalExpenses.twoItemRemark,
  1957. airJJ: that.TotalExpenses.EconomyClass,
  1958. airGW: that.TotalExpenses.BusinessClass,
  1959. airTD: that.TotalExpenses.Firstclass,
  1960. cityTranffic: that.TotalExpenses.TravellingExpenses,
  1961. dayOtherPriceData: arrSeven,
  1962. currencys: that.currencys,
  1963. choiceThree: that.choiceThree ? 1 : 0,
  1964. quarterageData: arrthre,
  1965. choiceFour: that.choiceFour ? 1 : 0,
  1966. boardWagesData: arrfour,
  1967. choiceFive: that.choiceFive ? 1 : 0,
  1968. miscellaneousFeeData: arrfive,
  1969. choiceSix: that.choiceSix ? 1 : 0,
  1970. //加参数
  1971. trainingExpenseData: arrsix,
  1972. airJJC_Checked: that.airJJC_Checked ? 1 : 0,
  1973. airGWC_Checked: that.airGWC_Checked ? 1 : 0,
  1974. airTDC_Checked: that.airTDC_Checked ? 1 : 0,
  1975. }
  1976. }).then(function (res) {
  1977. if (res.data.code == 200) {
  1978. that.$message({
  1979. type: 'success',
  1980. message: res.data.msg
  1981. });
  1982. that.GetEnterExitCostInfobyDiId()
  1983. } else {
  1984. that.fullscreenLoading = false;
  1985. that.$message.error(res.data.msg);
  1986. }
  1987. }).catch(function (error) {
  1988. that.$message.error(error.message);
  1989. });
  1990. },
  1991. //选择团组名称调用
  1992. chengvalue() {
  1993. window.localStorage.setItem('sgvalue', this.value);
  1994. this.fullscreenLoading = true;
  1995. this.GetEnterExitCostInfobyDiId();
  1996. this.PostGroupTeamRateByDiIdAndCTableId();
  1997. },
  1998. eptschedule: debounce(function (val) {
  1999. return new Promise((resolve, reject) => {
  2000. //住宿费
  2001. this.fullscreenLoading = true
  2002. var quarterageDatas = [];
  2003. for (let m = 0; m < this.quarterageData.length; m++) {
  2004. if (this.quarterageData[m].nationalTravelFeeId != '') {
  2005. quarterageDatas.push({
  2006. id: this.quarterageData[m].id,
  2007. diId: this.quarterageData[m].diId,
  2008. type: this.quarterageData[m].type,
  2009. days: this.quarterageData[m].days,
  2010. nationalTravelFeeId: this.quarterageData[m].nationalTravelFeeId,
  2011. cost: this.quarterageData[m].cost,
  2012. currency: this.quarterageData[m].currency,
  2013. subTotal: this.quarterageData[m].subTotal,
  2014. remark: this.quarterageData[m].remark,
  2015. })
  2016. }
  2017. }
  2018. //伙食费
  2019. var boardWagesDatas = [];
  2020. for (let n = 0; n < this.boardWagesData.length; n++) {
  2021. if (this.boardWagesData[n].nationalTravelFeeId != '') {
  2022. boardWagesDatas.push({
  2023. id: this.boardWagesData[n].id,
  2024. diId: this.boardWagesData[n].diId,
  2025. type: this.boardWagesData[n].type,
  2026. days: this.boardWagesData[n].days,
  2027. nationalTravelFeeId: this.boardWagesData[n].nationalTravelFeeId,
  2028. cost: this.boardWagesData[n].cost,
  2029. currency: this.boardWagesData[n].currency,
  2030. subTotal: this.boardWagesData[n].subTotal,
  2031. remark: this.boardWagesData[n].remark,
  2032. })
  2033. }
  2034. }
  2035. //公杂费miscellaneousFeeData
  2036. var miscellaneousFeeDatas = [];
  2037. for (let b = 0; b < this.miscellaneousFeeData.length; b++) {
  2038. if (this.miscellaneousFeeData[b].nationalTravelFeeId != '') {
  2039. miscellaneousFeeDatas.push({
  2040. id: this.miscellaneousFeeData[b].id,
  2041. diId: this.miscellaneousFeeData[b].diId,
  2042. type: this.miscellaneousFeeData[b].type,
  2043. days: this.miscellaneousFeeData[b].days,
  2044. nationalTravelFeeId: this.miscellaneousFeeData[b].nationalTravelFeeId,
  2045. cost: this.miscellaneousFeeData[b].cost,
  2046. currency: this.miscellaneousFeeData[b].currency,
  2047. subTotal: this.miscellaneousFeeData[b].subTotal,
  2048. remark: this.miscellaneousFeeData[b].remark,
  2049. })
  2050. }
  2051. }
  2052. //培训费
  2053. var trainingExpenseDatas = [];
  2054. for (let p = 0; p < this.trainingExpenseData.length; p++) {
  2055. if (this.trainingExpenseData[p].nationalTravelFeeId != '') {
  2056. trainingExpenseDatas.push({
  2057. id: this.trainingExpenseData[p].id,
  2058. diId: this.trainingExpenseData[p].diId,
  2059. type: this.trainingExpenseData[p].type,
  2060. days: this.trainingExpenseData[p].days,
  2061. nationalTravelFeeId: this.trainingExpenseData[p].nationalTravelFeeId,
  2062. cost: this.trainingExpenseData[p].cost,
  2063. currency: this.trainingExpenseData[p].currency,
  2064. subTotal: this.trainingExpenseData[p].subTotal,
  2065. remark: this.trainingExpenseData[p].remark,
  2066. })
  2067. }
  2068. }
  2069. //其他费
  2070. var otherDatas = [];
  2071. console.log();
  2072. for (let c = 0; c < this.otherData.length; c++) {
  2073. if (this.otherData[c].setDataId != '') {
  2074. otherDatas.push({
  2075. id: this.otherData[c].id,
  2076. diId: this.otherData[c].diId,
  2077. index: this.otherData[c].index,
  2078. setDataId: this.otherData[c].setDataId,
  2079. cost: this.otherData[c].cost,
  2080. currency: this.otherData[c].currency,
  2081. subTotal: this.otherData[c].subTotal,
  2082. remark: this.otherData[c].remark,
  2083. })
  2084. }
  2085. }
  2086. var url = "/api/Groups/PostEnterExitCostOperate"
  2087. var that = this
  2088. this.$axios({
  2089. method: 'post',
  2090. url: url,
  2091. headers: {
  2092. Authorization: 'Bearer ' + this.token,
  2093. contentType: 'application/json'
  2094. },
  2095. data: {
  2096. portType: 1,
  2097. userId: that.userId,
  2098. id: that.storageid,
  2099. diId: that.value,
  2100. choiceOne: that.choiceOne ? 1 : 0,
  2101. insidePay: that.DomesticFees.total,
  2102. visa: that.DomesticFees.visafees,
  2103. visaRemark: that.DomesticFees.visafeesDescription,
  2104. yiMiao: that.DomesticFees.vaccinefees,
  2105. heSuan: that.DomesticFees.nucleicfees,
  2106. service: that.DomesticFees.serviceCharge,
  2107. ticket: that.DomesticFees.ticketsExhibitionL,
  2108. safe: that.DomesticFees.insurance,
  2109. firstItemRemark: that.DomesticFees.firstItemRemark,
  2110. choiceTwo: that.choiceTwo ? 1 : 0,
  2111. otherExpenses_Checked: that.choiceSeven ? 1 : 0,
  2112. sumJJC: that.sumJJC ? 1 : 0,
  2113. sumGWC: that.sumGWC ? 1 : 0,
  2114. sumTDC: that.sumTDC ? 1 : 0,
  2115. outsideJJPay: that.TotalExpenses.EconomyClasstotal,
  2116. outsideGWPay: that.TotalExpenses.BusinessClasstotal,
  2117. outsideTDPay: that.TotalExpenses.Firstclasstotal,
  2118. twoItemRemark: that.TotalExpenses.twoItemRemark,
  2119. airJJ: that.TotalExpenses.EconomyClass,
  2120. airGW: that.TotalExpenses.BusinessClass,
  2121. airTD: that.TotalExpenses.Firstclass,
  2122. cityTranffic: that.TotalExpenses.TravellingExpenses,
  2123. dayOtherPriceData: otherDatas,
  2124. currencys: that.currencys,
  2125. choiceThree: that.choiceThree ? 1 : 0,
  2126. quarterageData: quarterageDatas,
  2127. choiceFour: that.choiceFour ? 1 : 0,
  2128. boardWagesData: boardWagesDatas,
  2129. choiceFive: that.choiceFive ? 1 : 0,
  2130. miscellaneousFeeData: miscellaneousFeeDatas,
  2131. choiceSix: that.choiceSix ? 1 : 0,
  2132. //加参数
  2133. trainingExpenseData: trainingExpenseDatas,
  2134. airJJC_Checked: that.airJJC_Checked ? 1 : 0,
  2135. airGWC_Checked: that.airGWC_Checked ? 1 : 0,
  2136. airTDC_Checked: that.airTDC_Checked ? 1 : 0,
  2137. }
  2138. }).then(function (res) {
  2139. if (res.data.code == 200) {
  2140. that.$message({
  2141. type: 'success',
  2142. message: res.data.msg
  2143. });
  2144. that.GetEnterExitCostInfobyDiId()
  2145. var subTypeId = 0
  2146. if (val == 1) {
  2147. subTypeId = that.listvalue
  2148. } else if (val == 2) {
  2149. subTypeId = that.tablevalue
  2150. } else {
  2151. subTypeId = 1
  2152. }
  2153. if (subTypeId == "") {
  2154. that.$message.error('请选择需要导出的表格');
  2155. return
  2156. }
  2157. var url = "/api/Groups/PostEnterExitCostDownload"
  2158. that.$axios({
  2159. method: 'post',
  2160. url: url,
  2161. headers: {
  2162. Authorization: 'Bearer ' + that.token
  2163. },
  2164. data: {
  2165. portType: 1,
  2166. diId: that.value,
  2167. exportType: val,
  2168. subTypeId: subTypeId
  2169. }
  2170. }).then(function (res) {
  2171. if (res.data.code == 200) {
  2172. that.$message({
  2173. type: 'success',
  2174. message: res.data.msg
  2175. });
  2176. window.open(res.data.data.url);
  2177. } else {
  2178. that.$message.error(res.data.msg);
  2179. }
  2180. })
  2181. } else {
  2182. that.fullscreenLoading = false;
  2183. that.$message.error(res.data.msg);
  2184. }
  2185. }).catch(function (error) {
  2186. that.$message.error(error.message);
  2187. });
  2188. // this.storageAPI(quarterageDatas, boardWagesDatas, miscellaneousFeeDatas, trainingExpenseDatas, otherDatas)
  2189. })
  2190. // this.storage().then(function () {
  2191. // });
  2192. }, 500, true),
  2193. //
  2194. calculation() {
  2195. var jnfy
  2196. var jjcxj
  2197. var gwcxj
  2198. var tdcxj
  2199. var zsf
  2200. var hsf
  2201. var gzf
  2202. var pxf
  2203. var qtfy
  2204. if (this.choiceOne == true) {
  2205. jnfy = this.DomesticFees.total;
  2206. } else {
  2207. jnfy = 0;
  2208. }
  2209. if (this.choiceThree == true) {
  2210. zsf = this.TotalAccommodationFee;
  2211. } else {
  2212. zsf = 0;
  2213. }
  2214. if (this.choiceFour == true) {
  2215. hsf = this.TotalMeals;
  2216. } else {
  2217. hsf = 0;
  2218. }
  2219. if (this.choiceFive == true) {
  2220. gzf = this.TotalMiscellaneous;
  2221. } else {
  2222. gzf = 0;
  2223. }
  2224. if (this.choiceSix == true) {
  2225. pxf = this.trainingExpense;
  2226. } else {
  2227. pxf = 0;
  2228. }
  2229. if (this.choiceSeven == true) {
  2230. qtfy = this.otherExpense;
  2231. } else {
  2232. qtfy = 0;
  2233. }
  2234. if (this.sumJJC == true) {
  2235. jjcxj = this.TotalExpenses.EconomyClasstotal;
  2236. this.jjctotal = jnfy + jjcxj + zsf + hsf + gzf + pxf + qtfy;
  2237. } else {
  2238. jjcxj = 0;
  2239. this.jjctotal = 0;
  2240. }
  2241. if (this.sumGWC == true) {
  2242. gwcxj = this.TotalExpenses.BusinessClasstotal;
  2243. this.gwctotal = jnfy + gwcxj + zsf + hsf + gzf + pxf + qtfy;
  2244. } else {
  2245. gwcxj = 0;
  2246. this.gwctotal = 0;
  2247. }
  2248. if (this.sumTDC == true) {
  2249. tdcxj = this.TotalExpenses.Firstclasstotal;
  2250. this.tdctotal = jnfy + tdcxj + zsf + hsf + gzf + pxf + qtfy;
  2251. } else {
  2252. tdcxj = 0;
  2253. this.tdctotal = 0;
  2254. }
  2255. },
  2256. //其他删除
  2257. DeleteOtherExpenses(index, row, rows) {
  2258. console.log(index, row, rows);
  2259. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  2260. confirmButtonText: '确定',
  2261. cancelButtonText: '取消',
  2262. type: 'warning'
  2263. }).then(() => {
  2264. {
  2265. if (row.id == 0) {
  2266. this.$message({
  2267. type: 'success',
  2268. message: '删除成功'
  2269. });
  2270. rows.splice(index, 1);
  2271. this.otherExpense = 0;
  2272. for (let a = 0; a < rows.length; a++) {
  2273. this.otherExpense += rows[a].subTotal;
  2274. }
  2275. return;
  2276. }
  2277. var url = "/api/Groups/DeleteOtherExpenses"
  2278. var that = this
  2279. this.$axios({
  2280. method: 'post',
  2281. url: url,
  2282. headers: {
  2283. Authorization: 'Bearer ' + that.token
  2284. },
  2285. data: {
  2286. portType: 1,
  2287. id: row.id,
  2288. deleteUserId: that.userId
  2289. }
  2290. }).then(function (res) {
  2291. if (res.data.code == 200) {
  2292. that.$message({
  2293. type: 'success',
  2294. message: res.data.msg
  2295. });
  2296. rows.splice(index, 1);
  2297. this.otherExpense = 0;
  2298. for (let a = 0; a < rows.length; a++) {
  2299. this.otherExpense += rows[a].subTotal;
  2300. }
  2301. } else {
  2302. that.$message.error(res.data.msg);
  2303. }
  2304. })
  2305. }
  2306. }).catch(() => {
  2307. this.$message({
  2308. type: 'info',
  2309. message: '已取消删除'
  2310. });
  2311. });
  2312. },
  2313. //删除
  2314. deleteRow(index, row, rows, val) {
  2315. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  2316. confirmButtonText: '确定',
  2317. cancelButtonText: '取消',
  2318. type: 'warning'
  2319. }).then(() => {
  2320. if (row.id == 0) {
  2321. this.$message({
  2322. type: 'success',
  2323. message: '删除成功'
  2324. });
  2325. rows.splice(index, 1);
  2326. if (val == 1) {
  2327. this.TotalAccommodationFee = 0;
  2328. for (let a = 0; a < rows.length; a++) {
  2329. this.TotalAccommodationFee += rows[a].subTotal;
  2330. }
  2331. }
  2332. if (val == 2) {
  2333. this.TotalMeals = 0;
  2334. for (let a = 0; a < rows.length; a++) {
  2335. this.TotalMeals += rows[a].subTotal;
  2336. }
  2337. }
  2338. if (val == 3) {
  2339. this.TotalMiscellaneous = 0;
  2340. for (let a = 0; a < rows.length; a++) {
  2341. this.TotalMiscellaneous += rows[a].subTotal;
  2342. }
  2343. }
  2344. if (val == 4) {
  2345. this.trainingExpense = 0;
  2346. for (let a = 0; a < rows.length; a++) {
  2347. this.trainingExpense += rows[a].subTotal;
  2348. }
  2349. }
  2350. return;
  2351. }
  2352. var url = "/api/Groups/PostEnterExitCostSubItemDel"
  2353. var that = this
  2354. this.$axios({
  2355. method: 'post',
  2356. url: url,
  2357. headers: {
  2358. Authorization: 'Bearer ' + that.token
  2359. },
  2360. data: {
  2361. portType: 1,
  2362. id: row.id,
  2363. deleteUserId: that.userId
  2364. }
  2365. }).then(function (res) {
  2366. console.log(res)
  2367. if (res.data.code == 200) {
  2368. that.$message({
  2369. type: 'success',
  2370. message: res.data.msg
  2371. });
  2372. rows.splice(index, 1);
  2373. if (val == 1) {
  2374. that.TotalAccommodationFee = 0;
  2375. for (let a = 0; a < rows.length; a++) {
  2376. that.TotalAccommodationFee += rows[a].subTotal;
  2377. }
  2378. }
  2379. if (val == 2) {
  2380. that.TotalMeals = 0;
  2381. for (let a = 0; a < rows.length; a++) {
  2382. that.TotalMeals += rows[a].subTotal;
  2383. }
  2384. }
  2385. if (val == 3) {
  2386. that.TotalMiscellaneous = 0;
  2387. for (let a = 0; a < rows.length; a++) {
  2388. that.TotalMiscellaneous += rows[a].subTotal;
  2389. }
  2390. }
  2391. if (val == 4) {
  2392. that.trainingExpense = 0;
  2393. for (let a = 0; a < rows.length; a++) {
  2394. that.trainingExpense += rows[a].subTotal;
  2395. }
  2396. }
  2397. } else {
  2398. that.$message.error(res.data.msg);
  2399. }
  2400. })
  2401. }).catch(() => {
  2402. this.$message({
  2403. type: 'info',
  2404. message: '已取消删除'
  2405. });
  2406. });
  2407. },
  2408. //填入实时汇率
  2409. adoptRealtime() {
  2410. for (let at = 0; at < this.currencys.length; at++) {
  2411. for (let rt = 0; rt < this.currencyss.length; rt++) {
  2412. if (this.currencys[at].currencyCode == this.currencyss[rt].currCode) {
  2413. this.currencys[at].rate = this.currencyss[rt].rate
  2414. }
  2415. }
  2416. }
  2417. this.cubtn = false;
  2418. },
  2419. Getnewvisafee() {
  2420. this.DomesticFees.visafees = this.visainfo.feeTotal;
  2421. this.DomesticFees.visafeesDescription = this.visainfo.remark;
  2422. this.getvisafeebtn = false;
  2423. },
  2424. //导出到收款账单
  2425. NationalTravelFeeImportReceivables() {
  2426. var url = "/api/Groups/NationalTravelFeeImportReceivables/" + this.value
  2427. var that = this
  2428. this.$axios({
  2429. method: 'get',
  2430. url: url,
  2431. headers: {
  2432. Authorization: 'Bearer ' + that.token
  2433. },
  2434. }).then(function (res) {
  2435. if (res.data.code == 200) {
  2436. that.$message({
  2437. type: 'success',
  2438. message: res.data.msg
  2439. });
  2440. } else {
  2441. that.$message.error(res.data.msg);
  2442. }
  2443. }).catch(function (error) {
  2444. that.$message.error("操作错误,联系信息部!");
  2445. });
  2446. },
  2447. //设置权限按钮
  2448. setpermissionsbtn(){
  2449. this.viewUsers=this.viewUsersby;
  2450. this.setpermissions=true;
  2451. },
  2452. handleCheckAllChange(val) {
  2453. console.log(val);
  2454. console.log(this.viewUsers);
  2455. },
  2456. //分配查看权限
  2457. EnterExitCostSetViewPermissiion() {
  2458. var url = "/api/Groups/EnterExitCostSetViewPermissiion"
  2459. var that = this
  2460. this.$axios({
  2461. method: 'post',
  2462. url: url,
  2463. headers: {
  2464. Authorization: 'Bearer ' + that.token
  2465. },
  2466. data:{
  2467. portType:1,
  2468. groupId:that.value,
  2469. userIds:that.viewUsers,
  2470. currUserId:that.userId,
  2471. }
  2472. }).then(function (res) {
  2473. if (res.data.code == 200) {
  2474. that.$message({
  2475. type: 'success',
  2476. message: res.data.msg
  2477. });
  2478. that.setpermissions=false;
  2479. that.GetEnterExitCostInfobyDiId();
  2480. } else {
  2481. that.setpermissions=false;
  2482. that.$message.error(res.data.msg);
  2483. }
  2484. }).catch(function (error) {
  2485. that.$message.error("操作错误,联系信息部!");
  2486. });
  2487. },
  2488. },
  2489. filters: {
  2490. numFilter(value) {
  2491. // 截取当前数据到小数点后两位
  2492. let realVal = new Decimal(value).toFixed(2)
  2493. return realVal
  2494. }
  2495. },
  2496. watch: {
  2497. choiceOne(val) {//境内费用(其他费用)选择框
  2498. this.calculation();
  2499. },
  2500. choiceThree(val) {//住宿费合计选择框
  2501. this.calculation();
  2502. },
  2503. choiceFour(val) {//伙食费合计选择框
  2504. this.calculation();
  2505. },
  2506. choiceFive(val) {//公杂费合计选择框
  2507. this.calculation();
  2508. },
  2509. choiceSix(val) {//培训费用选择框
  2510. this.calculation();
  2511. },
  2512. choiceSeven(val) {//其他费用选择框
  2513. this.calculation();
  2514. },
  2515. //加参数
  2516. sumJJC(val) {//经济舱小计选择框
  2517. this.calculation();
  2518. },
  2519. sumGWC(val) {//公务舱小计选择框
  2520. this.calculation();
  2521. },
  2522. sumTDC(val) {//公务舱小计选择框
  2523. this.calculation();
  2524. },
  2525. 'DomesticFees.total': {
  2526. handler(newVal, oldVal) {
  2527. this.calculation();
  2528. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2529. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2530. },
  2531. },
  2532. TotalAccommodationFee: {
  2533. handler(newVal, oldVal) {
  2534. this.calculation();
  2535. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2536. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2537. },
  2538. },
  2539. TotalMeals: {
  2540. handler(newVal, oldVal) {
  2541. this.calculation();
  2542. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2543. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2544. },
  2545. },
  2546. TotalMiscellaneous: {
  2547. handler(newVal, oldVal) {
  2548. this.calculation();
  2549. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2550. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2551. },
  2552. },
  2553. trainingExpense: {
  2554. handler(newVal, oldVal) {
  2555. this.calculation();
  2556. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2557. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2558. },
  2559. },
  2560. otherExpense: {
  2561. handler(newVal, oldVal) {
  2562. this.calculation();
  2563. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2564. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2565. },
  2566. },
  2567. 'TotalExpenses.EconomyClasstotal': {
  2568. handler(newVal, oldVal) {
  2569. this.calculation();
  2570. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2571. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2572. },
  2573. },
  2574. 'TotalExpenses.BusinessClasstotal': {
  2575. handler(newVal, oldVal) {
  2576. this.calculation();
  2577. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2578. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2579. // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
  2580. },
  2581. },
  2582. 'TotalExpenses.Firstclasstotal': {
  2583. handler(newVal, oldVal) {
  2584. this.calculation();
  2585. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  2586. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  2587. // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
  2588. },
  2589. },
  2590. //境内费用非空处理
  2591. DomesticFees: {
  2592. handler(newVal, oldVal) {
  2593. if (newVal.insurance == undefined) {
  2594. newVal.insurance = 0
  2595. }
  2596. if (newVal.nucleicfees == undefined) {
  2597. newVal.nucleicfees = 0
  2598. }
  2599. if (newVal.serviceCharge == undefined) {
  2600. newVal.serviceCharge = 0
  2601. }
  2602. if (newVal.ticketsExhibitionL == undefined) {
  2603. newVal.ticketsExhibitionL = 0
  2604. }
  2605. if (newVal.vaccinefees == undefined) {
  2606. newVal.vaccinefees = 0
  2607. }
  2608. if (newVal.visafees == undefined) {
  2609. newVal.visafees = 0
  2610. }
  2611. },
  2612. immediate: true,
  2613. deep: true // 可以深度检测到 person 对象的属性值的变化
  2614. },
  2615. //国际旅费非空处理
  2616. TotalExpenses: {
  2617. handler(newVal, oldVal) {
  2618. if (newVal.EconomyClass == undefined) {
  2619. newVal.EconomyClass = 0
  2620. }
  2621. if (newVal.BusinessClass == undefined) {
  2622. newVal.BusinessClass = 0
  2623. }
  2624. if (newVal.TravellingExpenses == undefined) {
  2625. newVal.TravellingExpenses = 0
  2626. }
  2627. },
  2628. immediate: true,
  2629. deep: true // 可以深度检测到 person 对象的属性值的变化
  2630. },
  2631. //监听汇率数组是否变化
  2632. currencys: {
  2633. handler(val) {
  2634. this.TotalAccommodationFee = 0
  2635. console.log(val,this.quarterageData);
  2636. console.log(this.currencys);
  2637. for (let q = 0; q < this.quarterageData.length; q++) {
  2638. for (let qc = 0; qc < this.currencys.length; qc++) {
  2639. if (this.currencys[qc].currencyCode == this.quarterageData[q].curremcyCode||this.currencys[qc].currencyName == this.quarterageData[q].currencyName) {
  2640. this.quarterageData[q].subTotal = this.currencys[qc].rate * this.quarterageData[q].cost
  2641. }
  2642. }
  2643. this.TotalAccommodationFee += this.quarterageData[q].subTotal
  2644. }
  2645. //伙食费
  2646. this.TotalMeals = 0
  2647. for (let b = 0; b < this.boardWagesData.length; b++) {
  2648. for (let bc = 0; bc < this.currencys.length; bc++) {
  2649. if (this.currencys[bc].currencyCode == this.boardWagesData[b].curremcyCode||this.currencys[bc].currencyName == this.boardWagesData[b].currencyName) {
  2650. this.boardWagesData[b].subTotal = this.currencys[bc].rate * this.boardWagesData[b].cost
  2651. }
  2652. }
  2653. this.TotalMeals += this.boardWagesData[b].subTotal
  2654. }
  2655. //公杂费
  2656. this.TotalMiscellaneous = 0
  2657. for (let m = 0; m < this.miscellaneousFeeData.length; m++) {
  2658. for (let mc = 0; mc < this.currencys.length; mc++) {
  2659. if (this.currencys[mc].currencyCode == this.miscellaneousFeeData[m].curremcyCode||this.currencys[mc].currencyName == this.miscellaneousFeeData[m].currencyName) {
  2660. this.miscellaneousFeeData[m].subTotal = this.currencys[mc].rate * this.miscellaneousFeeData[m].cost
  2661. }
  2662. }
  2663. this.TotalMiscellaneous += this.miscellaneousFeeData[m].subTotal
  2664. }
  2665. //培训费
  2666. this.trainingExpense = 0
  2667. for (let t = 0; t < this.trainingExpenseData.length; t++) {
  2668. for (let tc = 0; tc < this.currencys.length; tc++) {
  2669. if (this.currencys[tc].currencyCode == this.trainingExpenseData[t].curremcyCode||this.currencys[tc].currencyName == this.trainingExpenseData[t].currencyName) {
  2670. this.trainingExpenseData[t].subTotal = this.currencys[tc].rate * this.trainingExpenseData[t].cost
  2671. }
  2672. }
  2673. this.trainingExpense += this.trainingExpenseData[t].subTotal
  2674. }
  2675. //其他费用
  2676. for (let nc = 0; nc < this.currencys.length; nc++) {
  2677. for (let nt = 0; nt < this.othercurrencys.length; nt++) {
  2678. if (this.currencys[nc].currencyCode == this.othercurrencys[nt].currencyCode||this.currencys[nc].currencyName == this.othercurrencys[nt].currencyName) {
  2679. this.othercurrencys[nt].rate = this.currencys[nc].rate;
  2680. }
  2681. }
  2682. }
  2683. this.otherExpense = 0;
  2684. for (let wm = 0; wm < this.otherData.length; wm++) {
  2685. for (let cj = 0; cj < this.othercurrencys.length; cj++) {
  2686. if (this.otherData[wm].currency == this.othercurrencys[cj].currencyId) {
  2687. this.otherData[wm].rate = this.othercurrencys[cj].rate
  2688. }
  2689. }
  2690. this.otherExpense += this.otherData[wm].subTotal;
  2691. if (this.otherData[wm].rate) {
  2692. this.otherData[wm].subTotal = this.otherData[wm].cost * this.otherData[wm].rate;
  2693. }
  2694. }
  2695. },
  2696. deep: true
  2697. }
  2698. },
  2699. created() {
  2700. this.QuerySetData();
  2701. },
  2702. mounted() {
  2703. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  2704. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  2705. this.value = JSON.parse(localStorage.getItem('sgvalue'))
  2706. this.GetEnterExitCostDataSource();
  2707. this.GetNationalTravelFeeData();
  2708. },
  2709. destroyed() {
  2710. window.localStorage.removeItem('sgvalue');
  2711. },
  2712. }
  2713. </script>
  2714. <style>
  2715. .Entry-all {
  2716. background-color: #fff;
  2717. padding: 10px;
  2718. box-shadow: 0 0 5px #0005;
  2719. border-radius: 10px;
  2720. height: 100%;
  2721. min-height: 840px;
  2722. }
  2723. .Entry-head-li label {
  2724. color: #606266;
  2725. font-size: 15px;
  2726. font-weight: 600;
  2727. }
  2728. .Entry-head {
  2729. display: flex;
  2730. justify-content: space-between;
  2731. }
  2732. .Entry-form {
  2733. margin-top: 10px;
  2734. border-top: 2px solid #409EFF;
  2735. }
  2736. .Entry-li-inif {
  2737. display: flex;
  2738. align-items: center;
  2739. width: 100%;
  2740. border-top: 1px solid #ebeef5;
  2741. padding: 5px 0;
  2742. }
  2743. .Entry-li-inif:last-child {
  2744. border-bottom: 1px solid #ebeef5;
  2745. }
  2746. .Entry-li-lable {
  2747. display: flex;
  2748. justify-content: space-between;
  2749. align-items: center;
  2750. margin: 10px 0;
  2751. margin-top: 20px;
  2752. }
  2753. .Entry-li-lables {
  2754. display: flex;
  2755. align-items: center;
  2756. margin: 10px 0;
  2757. margin-top: 20px;
  2758. }
  2759. .Entry-inif-box .depipt {
  2760. display: inline-block;
  2761. width: 240px;
  2762. }
  2763. .Entry-inif-box {
  2764. margin-right: 20px;
  2765. }
  2766. .Entry-li-inif label {
  2767. font-size: 14px;
  2768. color: #606266;
  2769. }
  2770. .Entry-form .redzhu {
  2771. font-size: 14px;
  2772. color: red;
  2773. }
  2774. .sub-boxs {
  2775. -ms-user-select: none;
  2776. -khtml-user-select: none;
  2777. -webkit-user-select: none;
  2778. -moz-user-select: none;
  2779. font-size: 12px;
  2780. font-family: "微软雅黑";
  2781. user-select: none;
  2782. background-color: #FFF;
  2783. background-image: none;
  2784. border-radius: 4px;
  2785. border: 1px solid #DCDFE6;
  2786. -webkit-box-sizing: border-box;
  2787. box-sizing: border-box;
  2788. color: #606266;
  2789. display: inline-block;
  2790. height: 28px;
  2791. line-height: 28px;
  2792. outline: 0;
  2793. padding: 0 15px;
  2794. -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
  2795. transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
  2796. }
  2797. .btn-Entry {
  2798. text-align: right;
  2799. }
  2800. .Entry-all .el-checkbox__inner {
  2801. width: 18px;
  2802. height: 18px;
  2803. margin-right: 10px;
  2804. }
  2805. .Entry-all .el-checkbox__inner::after {
  2806. height: 10px;
  2807. left: 6px;
  2808. }
  2809. .Entry-all .el-table th.el-table__cell>.cell {
  2810. text-align: center;
  2811. }
  2812. .Entry-all .el-button+.el-button{
  2813. margin-left: 0px;
  2814. }
  2815. .Entry-all .permissionsbox .el-checkbox-group{
  2816. display: flex;
  2817. flex-wrap: wrap;
  2818. justify-content: space-between;
  2819. }
  2820. .Entry-all .permissionsbox .el-checkbox{
  2821. width: 150px;
  2822. margin-right: 0;
  2823. }
  2824. </style>