EntryDetails.vue 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201
  1. <template>
  2. <div v-loading.fullscreen.lock="fullscreenLoading">
  3. <div class="Entry-all">
  4. <div class="Entry-head">
  5. <div class="Entry-head-li">
  6. <label>团组名称:</label>
  7. <el-select style="width:250px" @change="chengvalue()" v-model="value" filterable placeholder="请选择">
  8. <el-option
  9. v-for="item in options"
  10. :key="item.id"
  11. :label="item.groupName"
  12. :value="item.id">
  13. </el-option>
  14. </el-select>
  15. </div>
  16. <div class="Entry-head-li">
  17. <!-- <el-button type="primary">计算费用</el-button> -->
  18. <el-button @click="NationalTravelFeeImportReceivables" type="primary">导出到收款账单</el-button>
  19. <el-button @click="cleanout" type="primary">全部清空</el-button>
  20. <el-button @click="storage()" type="primary">保存</el-button>
  21. <el-select style="width:202px" v-model="listvalue" placeholder="请选择">
  22. <el-option
  23. v-for="item in listvalueoptions"
  24. :key="item.id"
  25. :label="item.name"
  26. :value="item.id">
  27. </el-option>
  28. </el-select>
  29. <el-button @click="eptschedule(1)" type="primary">导出所选明细表</el-button>
  30. <el-select style="width:202px" v-model="tablevalue" placeholder="请选择">
  31. <el-option
  32. v-for="item in tablevalueoptions"
  33. :key="item.id"
  34. :label="item.name"
  35. :value="item.id">
  36. </el-option>
  37. </el-select>
  38. <el-button @click="eptschedule(2)" 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">{{DomesticFees.total=(DomesticFees.visafees+DomesticFees.vaccinefees+DomesticFees.nucleicfees+DomesticFees.serviceCharge+DomesticFees.insurance+DomesticFees.ticketsExhibitionL)|numFilter}}</div>
  51. <span>元/人</span>
  52. </div>
  53. </div>
  54. <div class="Entry-li-inif">
  55. <div class="Entry-inif-box">
  56. <label>签证费:</label>
  57. <el-input-number size="mini" :controls="false" :precision="2" v-model="DomesticFees.visafees"></el-input-number>
  58. <span>元/人</span>
  59. </div>
  60. <div class="Entry-inif-box">
  61. <label>签证费用描述:</label>
  62. <el-input style="width:900px" size="mini" v-model="DomesticFees.visafeesDescription"></el-input>
  63. <span class="redzhu">{{visabeizhu}}</span>
  64. </div>
  65. <el-button v-if="getvisafeebtn" @click="Getnewvisafee" type="primary" size="mini">获取最新签证费用</el-button>
  66. </div>
  67. <div class="Entry-li-inif">
  68. <div class="Entry-inif-box">
  69. <label>疫苗费:</label>
  70. <el-input-number size="mini" :controls="false" :precision="2" v-model="DomesticFees.vaccinefees"></el-input-number>
  71. <span>元/人</span>
  72. </div>
  73. <div class="Entry-inif-box">
  74. <label>核酸检测费:</label>
  75. <el-input-number size="mini" :controls="false" :precision="2" v-model="DomesticFees.nucleicfees"></el-input-number>
  76. <span>元/人;</span>
  77. </div>
  78. <div class="Entry-inif-box">
  79. <label> 服务费:</label>
  80. <el-input-number size="mini" :controls="false" :precision="2" v-model="DomesticFees.serviceCharge"></el-input-number>
  81. <span>元/人;</span>
  82. </div>
  83. </div>
  84. <div class="Entry-li-inif">
  85. <div class="Entry-inif-box">
  86. <label>保险费:</label>
  87. <el-input-number size="mini" :controls="false" :precision="2" v-model="DomesticFees.insurance"></el-input-number>
  88. <span>元/人</span>
  89. </div>
  90. <div class="Entry-inif-box">
  91. <label>参展门票:</label>
  92. <el-input-number size="mini" :controls="false" :precision="2" v-model="DomesticFees.ticketsExhibitionL"></el-input-number>
  93. <span>元/人;</span>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="Entry-form-li">
  98. <div class="Entry-li-lables">
  99. <!-- <el-checkbox v-model="choiceTwo"></el-checkbox> -->
  100. <div class="li-lable">二、国际旅费合计:</div>
  101. <div style="display: flex;">
  102. <div class="li-lable">
  103. <el-checkbox style="margin-right: -10px;" v-model="sumJJC"></el-checkbox>
  104. <label>(经济舱)</label>
  105. <div class="sub-boxs">{{TotalExpenses.EconomyClasstotal=(TotalExpenses.EconomyClass+TotalExpenses.TravellingExpenses)|numFilter}}</div>
  106. <span>元/人</span>
  107. </div>
  108. &nbsp;&nbsp;&nbsp;&nbsp;
  109. <div class="li-lable">
  110. <el-checkbox style="margin-right: -10px;" v-model="sumGWC"></el-checkbox>
  111. <label>(公务舱)</label>
  112. <div class="sub-boxs">{{TotalExpenses.BusinessClasstotal=(TotalExpenses.BusinessClass+TotalExpenses.TravellingExpenses)|numFilter}}</div>
  113. <span>元/人</span>
  114. </div>
  115. &nbsp;&nbsp;&nbsp;&nbsp;
  116. <div class="li-lable">
  117. <el-checkbox style="margin-right: -10px;" v-model="sumTDC"></el-checkbox>
  118. <label>(头等舱)</label>
  119. <div class="sub-boxs">{{TotalExpenses.Firstclasstotal=(TotalExpenses.Firstclass+TotalExpenses.TravellingExpenses)|numFilter}}</div>
  120. <span>元/人</span>
  121. </div>
  122. </div>
  123. </div>
  124. <div class="Entry-li-inif">
  125. <label>国际机票:&nbsp; &nbsp; &nbsp; </label>
  126. <div class="Entry-inif-box">
  127. <label>(经济舱):</label>
  128. <el-input-number size="mini" :controls="false" :precision="2" v-model="TotalExpenses.EconomyClass"></el-input-number>
  129. <span>元/人</span>
  130. </div>
  131. <div class="Entry-inif-box">
  132. <label>(公务舱):</label>
  133. <el-input-number size="mini" :controls="false" :precision="2" v-model="TotalExpenses.BusinessClass"></el-input-number>
  134. <span>元/人;</span>
  135. </div>
  136. <div class="Entry-inif-box">
  137. <label>(头等舱):</label>
  138. <el-input-number size="mini" :controls="false" :precision="2" v-model="TotalExpenses.Firstclass"></el-input-number>
  139. <span>元/人;</span>
  140. </div>
  141. <span v-if="JSON.stringify(TicketJudgment) == '{}'" class="redzhu">(机票数据未录入)</span>
  142. <div v-else>
  143. <span v-if="TicketJudgment.jjcCurrentRate!=TotalExpenses.EconomyClass||TicketJudgment.gwcCurrentRate!=TotalExpenses.BusinessClass" class="redzhu">{{ TicketJudgment.remark }}</span>&nbsp;&nbsp;&nbsp;&nbsp;
  144. <el-button v-if="TicketJudgment.jjcCurrentRate!=TotalExpenses.EconomyClass||TicketJudgment.gwcCurrentRate!=TotalExpenses.BusinessClass" type="primary" @click="Fillin" size="mini">填 入</el-button>
  145. </div>
  146. </div>
  147. <div class="Entry-li-inif">
  148. <div class="Entry-inif-box">
  149. <label>城市区间交通费:</label>
  150. <el-input-number size="mini" :controls="false" :precision="2" v-model="TotalExpenses.TravellingExpenses"></el-input-number>
  151. <span>元/人;</span>
  152. </div>
  153. </div>
  154. <div class="Entry-li-inif">
  155. <div v-for="(item,index) in currencys" :key="index" class="Entry-inif-box">
  156. <label>{{item.currencyName}}汇率:</label>
  157. <el-input-number size="mini" :controls="false" :precision="4" v-model="item.rate"></el-input-number>
  158. </div>
  159. <span style="color:red;">* 若客户有意见,需要与财务商量后进行适当调整 </span>
  160. <!-- <el-popover
  161. placement="top"
  162. width="402"
  163. trigger="hover">
  164. <el-table border :data="currencyss">
  165. <el-table-column width="100" property="currName" label="币种"></el-table-column>
  166. <el-table-column width="100" property="rate" label="汇率"></el-table-column>
  167. <el-table-column width="200" property="lastUpdateDt" label="更新时间"></el-table-column>
  168. </el-table>
  169. <span v-show="cubtn" slot="reference" class="redzhu">{{CurrencysRemark}}</span>
  170. </el-popover>
  171. &nbsp;&nbsp;&nbsp;&nbsp;
  172. <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button> -->
  173. </div>
  174. </div>
  175. <div class="Entry-form-li">
  176. <div class="Entry-li-lable">
  177. <div style="display: flex;align-items: center;">
  178. <el-checkbox v-model="choiceThree"></el-checkbox>
  179. <div class="li-lable">三、住宿费:</div>
  180. <div style="display: flex;">
  181. <div class="li-lable">
  182. <label>合计:</label>
  183. <div class="sub-boxs">{{TotalAccommodationFee|numFilter}}</div>
  184. <span>元/人</span>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="btn-Entry">
  189. <el-button type="primary" @click="addlist('住宿费')" size="mini">新 增</el-button>
  190. </div>
  191. </div>
  192. <div class="Entry-li-inif">
  193. <el-table
  194. :data="quarterageData"
  195. border
  196. style="width: 100%">
  197. <el-table-column
  198. prop="days"
  199. label="第几晚"
  200. width="180">
  201. <template slot-scope="scope">
  202. <el-input-number size="mini" :controls="false" v-model="scope.row.days"></el-input-number>
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. style="position: relative;"
  207. prop="city"
  208. label="城 市"
  209. width="180">
  210. <template slot-scope="scope">
  211. <el-select size="mini" @change="changeSelect(scope.row,$event,scope.$index)" v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  212. <el-option
  213. v-for="item in placeinif"
  214. :key="item.id"
  215. :label="item.cityname"
  216. :value="item.id"
  217. >
  218. <span style="float: left">{{item.cityname}}</span>
  219. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  220. </el-option>
  221. </el-select>
  222. </template>
  223. </el-table-column>
  224. <el-table-column
  225. prop="cost"
  226. label=" 费用标准"
  227. width="180">
  228. <template slot-scope="scope">
  229. <el-input-number disabled size="mini" :precision="2" :controls="false" v-model="scope.row.cost"></el-input-number>
  230. </template>
  231. </el-table-column>
  232. <el-table-column
  233. prop="currencyName"
  234. label=" 币 种"
  235. width="180">
  236. <template slot-scope="scope">
  237. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  238. </template>
  239. </el-table-column>
  240. <el-table-column
  241. prop="subTotal"
  242. label="费用小计"
  243. width="180">
  244. <template slot-scope="scope">
  245. <div class="sub-boxs">{{scope.row.subTotal|numFilter}}</div>&nbsp;CNY
  246. </template>
  247. </el-table-column>
  248. <el-table-column
  249. prop="address"
  250. label="操 作">
  251. <template slot-scope="scope">
  252. <el-button
  253. style="color: #fff;"
  254. size="mini"
  255. type="danger"
  256. @click="deleteRow(scope.$index,scope.row,quarterageData,1 )">删除</el-button>
  257. </template>
  258. </el-table-column>
  259. </el-table>
  260. </div>
  261. </div>
  262. <div class="Entry-form-li">
  263. <div class="Entry-li-lable">
  264. <div style="display: flex;align-items: center;">
  265. <el-checkbox v-model="choiceFour"></el-checkbox>
  266. <div class="li-lable">四、伙食费:</div>
  267. <div style="display: flex;">
  268. <div class="li-lable">
  269. <label>合计:</label>
  270. <div class="sub-boxs">{{TotalMeals|numFilter}}</div>
  271. <span>元/人</span>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="btn-Entry">
  276. <el-button type="primary" @click="addlist('伙食费')" size="mini">新 增</el-button>
  277. </div>
  278. </div>
  279. <div class="Entry-li-inif">
  280. <el-table
  281. :data="boardWagesData"
  282. border
  283. style="width: 100%">
  284. <el-table-column
  285. prop="days"
  286. label="第几晚"
  287. width="180">
  288. <template slot-scope="scope">
  289. <el-input-number size="mini" :controls="false" v-model="scope.row.days"></el-input-number>
  290. </template>
  291. </el-table-column>
  292. <el-table-column
  293. style="position: relative;"
  294. prop="city"
  295. label="城 市"
  296. width="180">
  297. <!-- <template slot-scope="scope">
  298. <el-input size="mini" v-model="scope.row.city"></el-input>
  299. </template> -->
  300. <template slot-scope="scope">
  301. <el-select size="mini" @change="mealschangeSelect(scope.row,$event,scope.$index)" v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  302. <el-option
  303. v-for="item in placeinif"
  304. :key="item.id"
  305. :label="item.cityname"
  306. :value="item.id"
  307. >
  308. <span style="float: left">{{item.cityname}}</span>
  309. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  310. </el-option>
  311. </el-select>
  312. </template>
  313. </el-table-column>
  314. <el-table-column
  315. prop="cost"
  316. label=" 费用标准"
  317. width="180">
  318. <template slot-scope="scope">
  319. <el-input-number disabled size="mini" :precision="2" :controls="false" v-model="scope.row.cost"></el-input-number>
  320. </template>
  321. </el-table-column>
  322. <el-table-column
  323. prop="currencyName"
  324. label=" 币 种"
  325. 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
  331. prop="subTotal"
  332. label="费用小计"
  333. width="180">
  334. <template slot-scope="scope">
  335. <div class="sub-boxs">{{scope.row.subTotal|numFilter}}</div>&nbsp;CNY
  336. </template>
  337. </el-table-column>
  338. <el-table-column
  339. prop="address"
  340. label="操 作">
  341. <template slot-scope="scope">
  342. <el-button
  343. style="color: #fff;"
  344. size="mini"
  345. type="danger"
  346. @click="deleteRow(scope.$index,scope.row,boardWagesData,2 )">删除</el-button>
  347. </template>
  348. </el-table-column>
  349. </el-table>
  350. </div>
  351. </div>
  352. <div class="Entry-form-li">
  353. <div class="Entry-li-lable">
  354. <div style="display: flex;align-items: center;">
  355. <el-checkbox v-model="choiceFive"></el-checkbox>
  356. <div class="li-lable">五、公杂费:</div>
  357. <div style="display: flex;">
  358. <div class="li-lable">
  359. <label>合计:</label>
  360. <div class="sub-boxs">{{TotalMiscellaneous|numFilter}}</div>
  361. <span>元/人</span>
  362. </div>
  363. </div>
  364. </div>
  365. <div class="btn-Entry">
  366. <el-button type="primary" @click="addlist('公杂费')" size="mini">新 增</el-button>
  367. </div>
  368. </div>
  369. <div class="Entry-li-inif">
  370. <el-table
  371. :data="miscellaneousFeeData"
  372. border
  373. style="width: 100%">
  374. <el-table-column
  375. prop="days"
  376. label="第几晚"
  377. width="180">
  378. <template slot-scope="scope">
  379. <el-input-number size="mini" :controls="false" v-model="scope.row.days"></el-input-number>
  380. </template>
  381. </el-table-column>
  382. <el-table-column
  383. style="position: relative;"
  384. prop="city"
  385. label="城 市"
  386. width="180">
  387. <!-- <template slot-scope="scope">
  388. <el-input size="mini" v-model="scope.row.city"></el-input>
  389. </template> -->
  390. <template slot-scope="scope">
  391. <el-select @change="MiscellaneouschangeSelect(scope.row,$event)" size="mini" v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  392. <el-option
  393. v-for="item in placeinif"
  394. :key="item.id"
  395. :label="item.cityname"
  396. :value="item.id"
  397. >
  398. <span style="float: left">{{item.cityname}}</span>
  399. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  400. </el-option>
  401. </el-select>
  402. </template>
  403. </el-table-column>
  404. <el-table-column
  405. prop="cost"
  406. label=" 费用标准"
  407. width="180">
  408. <template slot-scope="scope">
  409. <el-input-number disabled size="mini" :precision="2" :controls="false" v-model="scope.row.cost"></el-input-number>
  410. </template>
  411. </el-table-column>
  412. <el-table-column
  413. prop="currencyName"
  414. label=" 币 种"
  415. width="180">
  416. <template slot-scope="scope">
  417. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  418. </template>
  419. </el-table-column>
  420. <el-table-column
  421. prop="subTotal"
  422. label="费用小计"
  423. width="180">
  424. <template slot-scope="scope">
  425. <div class="sub-boxs">{{scope.row.subTotal|numFilter}}</div>&nbsp;CNY
  426. </template>
  427. </el-table-column>
  428. <el-table-column
  429. prop="address"
  430. label="操 作">
  431. <template slot-scope="scope">
  432. <el-button
  433. style="color: #fff;"
  434. size="mini"
  435. type="danger"
  436. @click="deleteRow(scope.$index,scope.row,miscellaneousFeeData,3 )">删除</el-button>
  437. </template>
  438. </el-table-column>
  439. </el-table>
  440. </div>
  441. </div>
  442. <div class="Entry-form-li">
  443. <div class="Entry-li-lable">
  444. <div style="display: flex;align-items: center;">
  445. <el-checkbox v-model="choiceSix"></el-checkbox>
  446. <div class="li-lable">六、培训费:</div>
  447. <div style="display: flex;">
  448. <div class="li-lable">
  449. <label>合计:</label>
  450. <div class="sub-boxs">{{trainingExpense|numFilter}}</div>
  451. <span>元/人</span>
  452. </div>
  453. </div>
  454. </div>
  455. <div class="btn-Entry">
  456. <el-button type="primary" @click="addlist('培训费')" size="mini">新 增</el-button>
  457. </div>
  458. </div>
  459. <div class="Entry-li-inif">
  460. <el-table
  461. :data="trainingExpenseData"
  462. border
  463. style="width: 100%">
  464. <el-table-column
  465. prop="days"
  466. label="第几晚"
  467. width="180">
  468. <template slot-scope="scope">
  469. <el-input-number size="mini" :controls="false" v-model="scope.row.days"></el-input-number>
  470. </template>
  471. </el-table-column>
  472. <el-table-column
  473. style="position: relative;"
  474. prop="city"
  475. label="城 市"
  476. width="180">
  477. <!-- <template slot-scope="scope">
  478. <el-input size="mini" v-model="scope.row.city"></el-input>
  479. </template> -->
  480. <template slot-scope="scope">
  481. <el-select @change="TrainingExpenseDataSelect(scope.row,$event)" size="mini" v-model="scope.row.nationalTravelFeeId" filterable placeholder="请选择">
  482. <el-option
  483. v-for="item in placeinif"
  484. :key="item.id"
  485. :label="item.cityname"
  486. :value="item.id"
  487. >
  488. <span style="float: left">{{item.cityname}}</span>
  489. <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{item.city}}</span> -->
  490. </el-option>
  491. </el-select>
  492. </template>
  493. </el-table-column>
  494. <el-table-column
  495. prop="cost"
  496. label=" 费用标准"
  497. width="180">
  498. <template slot-scope="scope">
  499. <el-input-number @input="Traininginput(scope.row)" size="mini" :precision="2" :controls="false" v-model="scope.row.cost"></el-input-number>
  500. </template>
  501. </el-table-column>
  502. <el-table-column
  503. prop="currencyName"
  504. label=" 币 种"
  505. width="180">
  506. <template slot-scope="scope">
  507. <el-input disabled size="mini" v-model="scope.row.currencyName"></el-input>
  508. </template>
  509. </el-table-column>
  510. <el-table-column
  511. prop="subTotal"
  512. label="费用小计"
  513. width="180">
  514. <template slot-scope="scope">
  515. <div class="sub-boxs">{{scope.row.subTotal|numFilter}}</div>&nbsp;CNY
  516. </template>
  517. </el-table-column>
  518. <el-table-column
  519. prop="address"
  520. label="操 作">
  521. <template slot-scope="scope">
  522. <el-button
  523. style="color: #fff;"
  524. size="mini"
  525. type="danger"
  526. @click="deleteRow(scope.$index,scope.row,trainingExpenseData,4 )">删除</el-button>
  527. </template>
  528. </el-table-column>
  529. </el-table>
  530. </div>
  531. </div>
  532. <div class="Entry-form-li">
  533. <div class="Entry-li-lables">
  534. <div class="li-lable">费用总计:</div>
  535. <div style="display: flex;">
  536. <div class="li-lable">
  537. <!-- <el-checkbox style="margin-right: -10px;" v-model="airJJC_Checked"></el-checkbox> -->
  538. <label>(经济舱)</label>
  539. <div class="sub-boxs">{{jjctotal|numFilter}}</div>
  540. <span>元/人</span>
  541. </div>
  542. &nbsp;&nbsp;&nbsp;&nbsp;
  543. <div class="li-lable">
  544. <!-- <el-checkbox style="margin-right: -10px;" v-model="airGWC_Checked"></el-checkbox> -->
  545. <label>(公务舱)</label>
  546. <div class="sub-boxs">{{gwctotal|numFilter}}</div>
  547. <span>元/人</span>
  548. </div>
  549. &nbsp;&nbsp;&nbsp;&nbsp;
  550. <div class="li-lable">
  551. <!-- <el-checkbox style="margin-right: -10px;" v-model="airGWC_Checked"></el-checkbox> -->
  552. <label>(头等舱)</label>
  553. <div class="sub-boxs">{{tdctotal|numFilter}}</div>
  554. <span>元/人</span>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. </div>
  561. </div>
  562. </template>
  563. <script>
  564. import { Decimal } from 'decimal.js'
  565. import {debounce} from '../../store/statice'
  566. export default {
  567. data() {
  568. return {
  569. fullscreenLoading:false,
  570. options: [],
  571. listvalue:1005,
  572. tablevalue:'',
  573. listvalueoptions:[],
  574. tablevalueoptions:[],
  575. //是否计算Checkbox
  576. choiceOne:false,//境内费用(其他费用)选择框
  577. choiceTwo:false,//国际旅费合计选择框
  578. choiceThree:false,//住宿费合计选择框
  579. choiceFour:false,//伙食费合计选择框
  580. choiceFive:false,//公杂费合计选择框
  581. choiceSix:false,//培训费用选择框
  582. sumJJC:false,//经济舱小计选择框
  583. sumGWC:false,//公务舱小计选择框
  584. sumTDC:false,//头等舱小计选择框
  585. airJJC_Checked:false,//经济舱选择框
  586. airGWC_Checked:false,//公务舱选择框
  587. userId:'',
  588. token:'',
  589. value:'',
  590. options:[],
  591. Visafees:'',
  592. Visadepicted:'',
  593. currencys: [],
  594. currencyss: [],
  595. DomesticFees:{
  596. visafees:'',//签证费
  597. visafeesDescription:'',//签证费用描述
  598. vaccinefees:0,//疫苗费
  599. nucleicfees:0,//核酸检测费
  600. serviceCharge:0,//服务费
  601. insurance:500,//保险费
  602. ticketsExhibitionL:0,//参展门票
  603. total:0
  604. },
  605. TotalExpenses:{
  606. EconomyClass:0,//经济舱
  607. BusinessClass:0,//公务舱
  608. Firstclass:0,//头等舱
  609. TravellingExpenses:0,//城市区间交通费
  610. EconomyClasstotal:0,//经济舱合计
  611. BusinessClasstotal:0,//公务舱合计
  612. Firstclasstotal:0,//头等舱合计
  613. },
  614. TotalAccommodationFee:0,//住宿费合计
  615. TotalMeals:0,//伙食费合计
  616. TotalMiscellaneous:0,//公杂费合计
  617. trainingExpense:0,//培训费合计
  618. quarterageData: [],
  619. boardWagesData:[],
  620. miscellaneousFeeData:[],
  621. trainingExpenseData:[],
  622. placeinif:[],
  623. //下拉框
  624. treeData: "",
  625. treeDataValue: "",
  626. data: [],
  627. defaultProps: {
  628. children: "cityData",
  629. label:"city",
  630. // label: "country",
  631. },
  632. jjctotal:0,//经济舱合计
  633. gwctotal:0,//公务舱合计
  634. tdctotal:0,//公务舱合计
  635. storageid:0,
  636. visabeizhu:"",
  637. ID:'',
  638. TicketJudgment:{},
  639. CurrencysRemark:'',
  640. //监听币种数组
  641. watchedPrice: null,
  642. cubtn:false,
  643. getvisafeebtn:false,
  644. visainfo:{},
  645. }
  646. },
  647. methods:{
  648. //获取团组
  649. GetEnterExitCostDataSource(){
  650. var url = "/api/Groups/GetEnterExitCostDataSource"
  651. var that = this
  652. this.$axios({
  653. method: 'post',
  654. url: url,
  655. headers: {
  656. Authorization: 'Bearer ' + this.token
  657. },
  658. data:{
  659. portType: 1
  660. }
  661. }).then(function (res) {
  662. if(res.data.code==200){
  663. that.options=res.data.data.groupNameData;
  664. that.currencys=res.data.data.currencyInit;
  665. // console.log(that.value)
  666. if(that.value==null){
  667. that.value=res.data.data.groupNameData[0].id;
  668. }
  669. that.listvalueoptions=res.data.data.wordTypeData;
  670. that.tablevalueoptions=res.data.data.excelTypeData;
  671. that.GetEnterExitCostInfobyDiId()
  672. }
  673. })
  674. },
  675. //获取签证标注
  676. GetEnterExitCostCorrelationTips(val){
  677. this.getvisafeebtn=false;
  678. if(val==1){
  679. this.TotalExpenses.EconomyClass=0;
  680. this.TotalExpenses.BusinessClass=0;
  681. this.DomesticFees.visafees=0;
  682. this.DomesticFees.visafeesDescription="";
  683. var url = "/api/Groups/GetEnterExitCostCorrelationTips"
  684. var that = this
  685. this.$axios({
  686. method: 'post',
  687. url: url,
  688. headers: {
  689. Authorization: 'Bearer ' + this.token
  690. },
  691. data:{
  692. portType: 1,
  693. diId:that.value
  694. }
  695. }).then(function (res) {
  696. if(res.data.code==200){
  697. that.TotalExpenses.EconomyClass=res.data.data.airData.jjcCurrentRate;
  698. that.TotalExpenses.BusinessClass=res.data.data.airData.gwcCurrentRate;
  699. that.DomesticFees.visafees=res.data.data.visaData.feeTotal;
  700. that.DomesticFees.visafeesDescription=res.data.data.visaData.remark;
  701. }else{
  702. that.$message.error(res.data.msg);
  703. }
  704. })
  705. }else{
  706. var url = "/api/Groups/GetEnterExitCostCorrelationTips"
  707. var that = this
  708. this.$axios({
  709. method: 'post',
  710. url: url,
  711. headers: {
  712. Authorization: 'Bearer ' + this.token
  713. },
  714. data:{
  715. portType: 1,
  716. diId:that.value
  717. }
  718. }).then(function (res) {
  719. if(res.data.code==200){
  720. that.TicketJudgment=res.data.data.airData;
  721. that.visainfo=res.data.data.visaData;
  722. that.currencyss=res.data.data.reteInfos;
  723. if(that.DomesticFees.visafees!=res.data.data.visaData.feeTotal&&res.data.data.visaData.feeTotal!=0){
  724. that.getvisafeebtn=true;
  725. }
  726. for(let s=0;s<that.currencys.length;s++){
  727. if(that.currencys[s].rate!=that.currencyss[s].rate){
  728. that.cubtn=true;
  729. that.CurrencysRemark='当前汇率与实时汇率不同!移上查看'
  730. return
  731. }else{
  732. that.cubtn=false;
  733. }
  734. }
  735. }else{
  736. that.$message.error(res.data.msg);
  737. }
  738. })
  739. }
  740. },
  741. //机票费用填入
  742. Fillin(){
  743. this.TotalExpenses.EconomyClass=this.TicketJudgment.jjcCurrentRate;
  744. this.TotalExpenses.BusinessClass=this.TicketJudgment.gwcCurrentRate;
  745. },
  746. //获取费用标注
  747. GetNationalTravelFeeData(){
  748. this.fullscreenLoading=true;
  749. var url = "/api/Groups/GetNationalTravelFeeData"
  750. var that = this
  751. this.$axios({
  752. method: 'post',
  753. url: url,
  754. headers: {
  755. Authorization: 'Bearer ' + this.token
  756. },
  757. data:{
  758. portType: 1
  759. }
  760. }).then(function (res) {
  761. console.log(res)
  762. let placeinifarr=[];
  763. if(res.data.code==200){
  764. for(let i=0;i<res.data.data.length;i++){
  765. res.data.data[i]['cityname']=res.data.data[i].country+'-'+res.data.data[i].city;
  766. placeinifarr.push(res.data.data[i]);
  767. }
  768. that.placeinif=placeinifarr;
  769. console.log(that.placeinif)
  770. console.log(placeinifarr)
  771. }
  772. })
  773. },
  774. GetEnterExitCostInfobyDiId(){
  775. //初始化数据
  776. this.ID='';
  777. // this.currencys=[]
  778. this.TotalAccommodationFee=0;//住宿费合计
  779. this.TotalMeals=0;//伙食费合计
  780. this.TotalMiscellaneous=0;//公杂费合计
  781. this.trainingExpense=0;//培训费合计
  782. this.DomesticFees={
  783. visafees:'',//签证费
  784. visafeesDescription:'',//签证费用描述
  785. vaccinefees:0,//疫苗费
  786. nucleicfees:0,//核酸检测费
  787. serviceCharge:0,//服务费
  788. insurance:500,//保险费
  789. ticketsExhibitionL:0,//参展门票
  790. total:0
  791. }
  792. this.TotalExpenses={
  793. EconomyClass:0,//经济舱
  794. BusinessClass:0,//公务舱
  795. Firstclass:0,//TD舱
  796. TravellingExpenses:0,//城市区间交通费
  797. EconomyClasstotal:0,//经济舱合计
  798. BusinessClasstotal:0,//公务舱合计
  799. Firstclasstotal:0,//TD舱合计
  800. }
  801. this.choiceOne=false//境内费用(其他费用)选择框
  802. this.choiceTwo=false//国际旅费合计选择框
  803. this.choiceThree=false//住宿费合计选择框
  804. this.choiceFour=false//伙食费合计选择框
  805. this.choiceFive=false//公杂费合计选择框
  806. this.choiceSix=false//培训费用选择框
  807. this.sumJJC=false//经济舱小计选择框
  808. this.sumGWC=false//公务舱小计选择框
  809. this.sumTDC=false//公务舱小计选择框
  810. this.airJJC_Checked=false//经济舱选择框
  811. this.airGWC_Checked=false//公务舱选择框
  812. this.storageid=0
  813. this.quarterageData= [
  814. {
  815. id:0,
  816. diId:this.value,
  817. type:1,
  818. days:1,
  819. nationalTravelFeeId:'',
  820. cost:0,
  821. currency:0,
  822. subTotal:0,
  823. remark:'',
  824. },
  825. {
  826. id:0,
  827. diId:this.value,
  828. type:1,
  829. days:2,
  830. nationalTravelFeeId:'',
  831. cost:0,
  832. currency:0,
  833. subTotal:0,
  834. remark:'',
  835. },
  836. {
  837. id:0,
  838. diId:this.value,
  839. type:1,
  840. days:3,
  841. nationalTravelFeeId:'',
  842. cost:0,
  843. currency:0,
  844. subTotal:0,
  845. remark:'',
  846. },
  847. {
  848. id:0,
  849. diId:this.value,
  850. type:1,
  851. days:4,
  852. nationalTravelFeeId:'',
  853. cost:0,
  854. currency:0,
  855. subTotal:0,
  856. remark:'',
  857. },
  858. {
  859. id:0,
  860. diId:this.value,
  861. type:1,
  862. days:5,
  863. nationalTravelFeeId:'',
  864. cost:0,
  865. currency:0,
  866. subTotal:0,
  867. remark:'',
  868. },
  869. {
  870. id:0,
  871. diId:this.value,
  872. type:1,
  873. days:6,
  874. nationalTravelFeeId:'',
  875. cost:0,
  876. currency:0,
  877. subTotal:0,
  878. remark:'',
  879. },
  880. {
  881. id:0,
  882. diId:this.value,
  883. type:1,
  884. days:7,
  885. nationalTravelFeeId:'',
  886. cost:0,
  887. currency:0,
  888. subTotal:0,
  889. remark:'',
  890. },
  891. {
  892. id:0,
  893. diId:this.value,
  894. type:1,
  895. days:8,
  896. nationalTravelFeeId:'',
  897. cost:0,
  898. currency:0,
  899. subTotal:0,
  900. remark:'',
  901. },
  902. ]
  903. this.boardWagesData=[
  904. {
  905. id:0,
  906. diId:this.value,
  907. type:2,
  908. days:1,
  909. nationalTravelFeeId:'',
  910. cost:0,
  911. currency:0,
  912. subTotal:0,
  913. remark:'',
  914. },
  915. {
  916. id:0,
  917. diId:this.value,
  918. type:2,
  919. days:2,
  920. nationalTravelFeeId:'',
  921. cost:0,
  922. currency:0,
  923. subTotal:0,
  924. remark:'',
  925. },
  926. {
  927. id:0,
  928. diId:this.value,
  929. type:2,
  930. days:3,
  931. nationalTravelFeeId:'',
  932. cost:0,
  933. currency:0,
  934. subTotal:0,
  935. remark:'',
  936. },
  937. {
  938. id:0,
  939. diId:this.value,
  940. type:2,
  941. days:4,
  942. nationalTravelFeeId:'',
  943. cost:0,
  944. currency:0,
  945. subTotal:0,
  946. remark:'',
  947. },
  948. {
  949. id:0,
  950. diId:this.value,
  951. type:2,
  952. days:5,
  953. nationalTravelFeeId:'',
  954. cost:0,
  955. currency:0,
  956. subTotal:0,
  957. remark:'',
  958. },
  959. {
  960. id:0,
  961. diId:this.value,
  962. type:2,
  963. days:6,
  964. nationalTravelFeeId:'',
  965. cost:0,
  966. currency:0,
  967. subTotal:0,
  968. remark:'',
  969. },
  970. {
  971. id:0,
  972. diId:this.value,
  973. type:2,
  974. days:7,
  975. nationalTravelFeeId:'',
  976. cost:0,
  977. currency:0,
  978. subTotal:0,
  979. remark:'',
  980. },
  981. {
  982. id:0,
  983. diId:this.value,
  984. type:2,
  985. days:8,
  986. nationalTravelFeeId:'',
  987. cost:0,
  988. currency:0,
  989. subTotal:0,
  990. remark:'',
  991. },
  992. ]
  993. this.miscellaneousFeeData=[
  994. {
  995. id:0,
  996. diId:this.value,
  997. type:3,
  998. days:1,
  999. nationalTravelFeeId:'',
  1000. cost:0,
  1001. currency:0,
  1002. subTotal:0,
  1003. remark:'',
  1004. },
  1005. {
  1006. id:0,
  1007. diId:this.value,
  1008. type:3,
  1009. days:2,
  1010. nationalTravelFeeId:'',
  1011. cost:0,
  1012. currency:0,
  1013. subTotal:0,
  1014. remark:'',
  1015. },
  1016. {
  1017. id:0,
  1018. diId:this.value,
  1019. type:3,
  1020. days:3,
  1021. nationalTravelFeeId:'',
  1022. cost:0,
  1023. currency:0,
  1024. subTotal:0,
  1025. remark:'',
  1026. },
  1027. {
  1028. id:0,
  1029. diId:this.value,
  1030. type:3,
  1031. days:4,
  1032. nationalTravelFeeId:'',
  1033. cost:0,
  1034. currency:0,
  1035. subTotal:0,
  1036. remark:'',
  1037. },
  1038. {
  1039. id:0,
  1040. diId:this.value,
  1041. type:3,
  1042. days:5,
  1043. nationalTravelFeeId:'',
  1044. cost:0,
  1045. currency:0,
  1046. subTotal:0,
  1047. remark:'',
  1048. },
  1049. {
  1050. id:0,
  1051. diId:this.value,
  1052. type:3,
  1053. days:6,
  1054. nationalTravelFeeId:'',
  1055. cost:0,
  1056. currency:0,
  1057. subTotal:0,
  1058. remark:'',
  1059. },
  1060. {
  1061. id:0,
  1062. diId:this.value,
  1063. type:3,
  1064. days:7,
  1065. nationalTravelFeeId:'',
  1066. cost:0,
  1067. currency:0,
  1068. subTotal:0,
  1069. remark:'',
  1070. },
  1071. {
  1072. id:0,
  1073. diId:this.value,
  1074. type:3,
  1075. days:8,
  1076. nationalTravelFeeId:'',
  1077. cost:0,
  1078. currency:0,
  1079. subTotal:0,
  1080. remark:'',
  1081. },
  1082. ]
  1083. this.trainingExpenseData=[
  1084. {
  1085. id:0,
  1086. diId:this.value,
  1087. type:4,
  1088. days:1,
  1089. nationalTravelFeeId:'',
  1090. cost:0,
  1091. currency:0,
  1092. subTotal:0,
  1093. remark:'',
  1094. },
  1095. {
  1096. id:0,
  1097. diId:this.value,
  1098. type:4,
  1099. days:2,
  1100. nationalTravelFeeId:'',
  1101. cost:0,
  1102. currency:0,
  1103. subTotal:0,
  1104. remark:'',
  1105. },
  1106. {
  1107. id:0,
  1108. diId:this.value,
  1109. type:4,
  1110. days:3,
  1111. nationalTravelFeeId:'',
  1112. cost:0,
  1113. currency:0,
  1114. subTotal:0,
  1115. remark:'',
  1116. },
  1117. {
  1118. id:0,
  1119. diId:this.value,
  1120. type:4,
  1121. days:4,
  1122. nationalTravelFeeId:'',
  1123. cost:0,
  1124. currency:0,
  1125. subTotal:0,
  1126. remark:'',
  1127. },
  1128. {
  1129. id:0,
  1130. diId:this.value,
  1131. type:4,
  1132. days:5,
  1133. nationalTravelFeeId:'',
  1134. cost:0,
  1135. currency:0,
  1136. subTotal:0,
  1137. remark:'',
  1138. },
  1139. {
  1140. id:0,
  1141. diId:this.value,
  1142. type:4,
  1143. days:6,
  1144. nationalTravelFeeId:'',
  1145. cost:0,
  1146. currency:0,
  1147. subTotal:0,
  1148. remark:'',
  1149. },
  1150. {
  1151. id:0,
  1152. diId:this.value,
  1153. type:4,
  1154. days:7,
  1155. nationalTravelFeeId:'',
  1156. cost:0,
  1157. currency:0,
  1158. subTotal:0,
  1159. remark:'',
  1160. },
  1161. {
  1162. id:0,
  1163. diId:this.value,
  1164. type:4,
  1165. days:8,
  1166. nationalTravelFeeId:'',
  1167. cost:0,
  1168. currency:0,
  1169. subTotal:0,
  1170. remark:'',
  1171. },
  1172. ]
  1173. var url = "/api/Groups/GetEnterExitCostInfobyDiId"
  1174. var that = this
  1175. this.$axios({
  1176. method: 'post',
  1177. url: url,
  1178. headers: {
  1179. Authorization: 'Bearer ' + this.token
  1180. },
  1181. data:{
  1182. portType: 1,
  1183. diId: that.value
  1184. }
  1185. }).then(function (res) {
  1186. if(res.data.code==200){
  1187. console.log(res)
  1188. that.ID=res.data.data.id;
  1189. //汇率
  1190. that.currencys=res.data.data.currencys;
  1191. //境内费用
  1192. that.DomesticFees.visafees=res.data.data.visa;
  1193. that.DomesticFees.visafeesDescription=res.data.data.visaRemark;
  1194. that.DomesticFees.vaccinefees=res.data.data.yiMiao;
  1195. that.DomesticFees.nucleicfees=res.data.data.heSuan;
  1196. that.DomesticFees.serviceCharge=res.data.data.service;
  1197. that.DomesticFees.insurance=res.data.data.safe;
  1198. that.DomesticFees.ticketsExhibitionL=res.data.data.ticket;
  1199. //国际旅费
  1200. that.TotalExpenses.EconomyClass=res.data.data.airJJ;
  1201. that.TotalExpenses.BusinessClass=res.data.data.airGW;
  1202. that.TotalExpenses.Firstclass=res.data.data.airTD;
  1203. that.TotalExpenses.TravellingExpenses=res.data.data.cityTranffic;
  1204. //是否计算Checkbox
  1205. that.choiceOne=res.data.data.choiceOne==1?true:false;
  1206. that.choiceTwo=res.data.data.choiceTwo==1?true:false;
  1207. that.choiceThree=res.data.data.choiceThree==1?true:false;
  1208. that.choiceFour=res.data.data.choiceFour==1?true:false;
  1209. that.choiceFive=res.data.data.choiceFive==1?true:false;
  1210. that.choiceSix=res.data.data.choiceSix==1?true:false;
  1211. that.sumJJC=res.data.data.sumJJC==1?true:false;
  1212. that.sumGWC=res.data.data.sumGWC==1?true:false;
  1213. that.sumTDC=res.data.data.sumTDC==1?true:false;
  1214. that.airJJC_Checked=res.data.data.airJJC_Checked==1?true:false;
  1215. that.airGWC_Checked=res.data.data.airGWC_Checked==1?true:false;
  1216. //住宿费
  1217. that.quarterageData=res.data.data.quarterageData;
  1218. for(let a=0;a<res.data.data.quarterageData.length;a++){
  1219. that.TotalAccommodationFee+=res.data.data.quarterageData[a].subTotal
  1220. }
  1221. //伙食费
  1222. that.boardWagesData=res.data.data.boardWagesData;
  1223. for(let b=0;b<res.data.data.boardWagesData.length;b++){
  1224. that.TotalMeals+=res.data.data.boardWagesData[b].subTotal
  1225. }
  1226. //公杂费
  1227. that.miscellaneousFeeData=res.data.data.miscellaneousFeeData;
  1228. for(let c=0;c<res.data.data.miscellaneousFeeData.length;c++){
  1229. that.TotalMiscellaneous+=res.data.data.miscellaneousFeeData[c].subTotal
  1230. }
  1231. //培训费
  1232. that.trainingExpenseData=res.data.data.trainingExpenseData;
  1233. for(let d=0;d<res.data.data.trainingExpenseData.length;d++){
  1234. that.trainingExpense+=res.data.data.trainingExpenseData[d].subTotal
  1235. }
  1236. that.storageid=res.data.data.id;
  1237. // that.GetNationalTravelFeeData();
  1238. that.fullscreenLoading=false;
  1239. that.GetEnterExitCostCorrelationTips(2);
  1240. }else{
  1241. that.fullscreenLoading=false;
  1242. that.GetEnterExitCostCorrelationTips(1);
  1243. that.$message.warning(res.data.msg);
  1244. }
  1245. })
  1246. },
  1247. //全部清空
  1248. cleanout(){
  1249. this.fullscreenLoading=true
  1250. this.$confirm('此操作将全部清空, 是否继续?', '提示', {
  1251. confirmButtonText: '确定',
  1252. cancelButtonText: '取消',
  1253. type: 'warning'
  1254. }).then(() => {
  1255. var url = "/api/Groups/PostEnterExitCostOneClickClear"
  1256. var that = this
  1257. this.$axios({
  1258. method: 'post',
  1259. url: url,
  1260. headers: {
  1261. Authorization: 'Bearer ' + this.token
  1262. },
  1263. data:{
  1264. portType: 1,
  1265. diId: that.value,
  1266. userId: that.userId,
  1267. id:that.ID
  1268. }
  1269. }).then(function (res) {
  1270. if(res.data.code==200){
  1271. that.$message({
  1272. type: 'success',
  1273. message: res.data.msg
  1274. });
  1275. that.GetEnterExitCostInfobyDiId()
  1276. }else{
  1277. that.fullscreenLoading=false;
  1278. that.$message.error(res.data.msg);
  1279. }
  1280. })
  1281. }).catch(() => {
  1282. this.$message({
  1283. type: 'info',
  1284. message: '已取消清空'
  1285. });
  1286. });
  1287. },
  1288. //下拉
  1289. handNodeClick(data,node,e){
  1290. // console.log(data)
  1291. // console.log(node)
  1292. // console.log(e)
  1293. this.treeDataValue= data.name
  1294. this.treeData= data.name
  1295. // console.log(this.treeData)
  1296. },
  1297. //住宿地区选择
  1298. changeSelect(val,item,index){
  1299. var rate=0
  1300. var obj={}
  1301. obj= this.placeinif.find(function(i){
  1302. return i.id ===item
  1303. });
  1304. //在change中获取到整条对象数据
  1305. val.currencyName=obj.currencyName;
  1306. val.currency=obj.currency;
  1307. val.cost=obj.roomCost;
  1308. for(let j=0;j<this.currencys.length;j++){
  1309. if(this.currencys[j].currencyCode==obj.currencyCode){
  1310. rate=this.currencys[j].rate;
  1311. }
  1312. }
  1313. val.subTotal=Number(val.cost)*Number(rate);
  1314. this.TotalAccommodationFee=0;
  1315. for(let a=0;a<this.quarterageData.length;a++){
  1316. this.TotalAccommodationFee+=this.quarterageData[a].subTotal
  1317. }
  1318. // this.mealschangeSelect(this.boardWagesData,item,index)
  1319. },
  1320. //伙食地区选择
  1321. mealschangeSelect(val,item,index){
  1322. var rate=0
  1323. var obj={}
  1324. obj= this.placeinif.find(function(i){
  1325. return i.id ===item
  1326. });
  1327. //在change中获取到整条对象数据
  1328. // if(index!=undefined){
  1329. // val[index].currencyName=obj.currencyName;
  1330. // val[index].currency=obj.currency;
  1331. // val[index].cost=obj.foodCost;
  1332. // val[index].nationalTravelFeeId=obj.id;
  1333. // for(let j=0;j<this.currencys.length;j++){
  1334. // if(this.currencys[j].currencyCode==obj.currencyCode){
  1335. // rate=this.currencys[j].rate;
  1336. // }
  1337. // }
  1338. // val[index].subTotal=Number(val[index].cost)*Number(rate);
  1339. // this.TotalMeals=0;
  1340. // for(let a=0;a<this.boardWagesData.length;a++){
  1341. // this.TotalMeals+=this.boardWagesData[a].subTotal
  1342. // }
  1343. // }
  1344. val.currencyName=obj.currencyName;
  1345. val.currency=obj.currency;
  1346. val.cost=obj.foodCost;
  1347. for(let j=0;j<this.currencys.length;j++){
  1348. if(this.currencys[j].currencyCode==obj.currencyCode){
  1349. rate=this.currencys[j].rate;
  1350. }
  1351. }
  1352. val.subTotal=Number(val.cost)*Number(rate);
  1353. this.TotalMeals=0;
  1354. for(let a=0;a<this.boardWagesData.length;a++){
  1355. this.TotalMeals+=this.boardWagesData[a].subTotal
  1356. }
  1357. this.MiscellaneouschangeSelect(this.miscellaneousFeeData,item,index)
  1358. },
  1359. //公杂费地区选择
  1360. MiscellaneouschangeSelect(val,item,index){
  1361. var rate=0
  1362. var obj={}
  1363. obj= this.placeinif.find(function(i){
  1364. return i.id ===item
  1365. });
  1366. //在change中获取到整条对象数据
  1367. if(index!=undefined){
  1368. val[index].currencyName=obj.currencyName;
  1369. val[index].currency=obj.currency;
  1370. val[index].cost=obj.publicCost;
  1371. val[index].nationalTravelFeeId=obj.id;
  1372. for(let j=0;j<this.currencys.length;j++){
  1373. if(this.currencys[j].currencyCode==obj.currencyCode){
  1374. rate=this.currencys[j].rate;
  1375. }
  1376. }
  1377. val[index].subTotal=Number(val[index].cost)*Number(rate);
  1378. this.TotalMiscellaneous=0;
  1379. for(let a=0;a<this.miscellaneousFeeData.length;a++){
  1380. this.TotalMiscellaneous+=this.miscellaneousFeeData[a].subTotal
  1381. }
  1382. }
  1383. val.currencyName=obj.currencyName;
  1384. val.currency=obj.currency;
  1385. val.cost=obj.publicCost;
  1386. for(let j=0;j<this.currencys.length;j++){
  1387. if(this.currencys[j].currencyCode==obj.currencyCode){
  1388. rate=this.currencys[j].rate;
  1389. }
  1390. }
  1391. val.subTotal=Number(val.cost)*Number(rate);
  1392. this.TotalMiscellaneous=0;
  1393. for(let a=0;a<this.miscellaneousFeeData.length;a++){
  1394. this.TotalMiscellaneous+=this.miscellaneousFeeData[a].subTotal
  1395. }
  1396. },
  1397. //培训费费用标准值改变
  1398. Traininginput(val){
  1399. var rate=0
  1400. for(let j=0;j<this.currencys.length;j++){
  1401. if(this.currencys[j].currencyName==val.currencyName){
  1402. rate=this.currencys[j].rate;
  1403. }
  1404. }
  1405. val.subTotal=Number(val.cost)*Number(rate);
  1406. this.trainingExpense=0;
  1407. for(let a=0;a<this.trainingExpenseData.length;a++){
  1408. this.trainingExpense+=this.trainingExpenseData[a].subTotal
  1409. }
  1410. },
  1411. //培训费地区选择
  1412. TrainingExpenseDataSelect(val,item){
  1413. console.log(val);
  1414. console.log(this.trainingExpenseData);
  1415. var rate=0//汇率
  1416. var obj={}
  1417. obj= this.placeinif.find(function(i){
  1418. return i.id ===item
  1419. });
  1420. //在change中获取到整条对象数据
  1421. console.log(obj);
  1422. val.currencyName=obj.currencyName;
  1423. val.currency=obj.currency;
  1424. for(let j=0;j<this.currencys.length;j++){
  1425. if(this.currencys[j].currencyCode==obj.currencyCode){
  1426. rate=this.currencys[j].rate;
  1427. }
  1428. }
  1429. val.subTotal=Number(val.cost)*Number(rate);
  1430. this.trainingExpense=0;
  1431. for(let a=0;a<this.trainingExpenseData.length;a++){
  1432. this.trainingExpense+=this.trainingExpenseData[a].subTotal
  1433. }
  1434. },
  1435. //新增list
  1436. addlist(text){
  1437. if(text=="住宿费"){
  1438. this.quarterageData.push({
  1439. id:0,
  1440. diId:this.value,
  1441. type:1,
  1442. days:this.quarterageData.length!=0?(this.quarterageData[this.quarterageData.length-1].days)+1:1,
  1443. nationalTravelFeeId:'',
  1444. cost:0,
  1445. currency:0,
  1446. subTotal:0,
  1447. remark:'',
  1448. })
  1449. // this.boardWagesData.push({
  1450. // id:0,
  1451. // diId:this.value,
  1452. // type:2,
  1453. // days:this.boardWagesData.length!=0?(this.boardWagesData[this.boardWagesData.length-1].days)+1:1,
  1454. // nationalTravelFeeId:'',
  1455. // cost:0,
  1456. // currency:0,
  1457. // subTotal:0,
  1458. // remark:'',
  1459. // })
  1460. }
  1461. if(text=="伙食费"){
  1462. this.boardWagesData.push({
  1463. id:0,
  1464. diId:this.value,
  1465. type:2,
  1466. days:this.boardWagesData.length!=0?(this.boardWagesData[this.boardWagesData.length-1].days)+1:1,
  1467. nationalTravelFeeId:'',
  1468. cost:0,
  1469. currency:0,
  1470. subTotal:0,
  1471. remark:'',
  1472. })
  1473. this.miscellaneousFeeData.push({
  1474. id:0,
  1475. diId:this.value,
  1476. type:3,
  1477. days:this.miscellaneousFeeData.length!=0?(this.miscellaneousFeeData[this.miscellaneousFeeData.length-1].days)+1:1,
  1478. nationalTravelFeeId:'',
  1479. cost:0,
  1480. currency:0,
  1481. subTotal:0,
  1482. remark:'',
  1483. })
  1484. }
  1485. if(text=="公杂费"){
  1486. this.miscellaneousFeeData.push({
  1487. id:0,
  1488. diId:this.value,
  1489. type:3,
  1490. days:this.miscellaneousFeeData.length!=0?(this.miscellaneousFeeData[this.miscellaneousFeeData.length-1].days)+1:1,
  1491. nationalTravelFeeId:'',
  1492. cost:0,
  1493. currency:0,
  1494. subTotal:0,
  1495. remark:'',
  1496. })
  1497. }
  1498. if(text=="培训费"){
  1499. this.trainingExpenseData.push({
  1500. id:0,
  1501. diId:this.value,
  1502. type:4,
  1503. days:this.trainingExpenseData.length!=0?(this.trainingExpenseData[this.trainingExpenseData.length-1].days)+1:1,
  1504. nationalTravelFeeId:'',
  1505. cost:0,
  1506. currency:0,
  1507. subTotal:0,
  1508. remark:'',
  1509. })
  1510. }
  1511. },
  1512. //保存
  1513. storage:debounce(function(){
  1514. console.log(this.currencys);
  1515. return new Promise((resolve, reject) => {
  1516. //住宿费
  1517. this.fullscreenLoading=true
  1518. var quarterageDatas=[];
  1519. for(let m=0;m<this.quarterageData.length;m++){
  1520. if(this.quarterageData[m].nationalTravelFeeId!=''){
  1521. quarterageDatas.push({
  1522. id:this.quarterageData[m].id,
  1523. diId:this.quarterageData[m].diId,
  1524. type:this.quarterageData[m].type,
  1525. days:this.quarterageData[m].days,
  1526. nationalTravelFeeId:this.quarterageData[m].nationalTravelFeeId,
  1527. cost:this.quarterageData[m].cost,
  1528. currency:this.quarterageData[m].currency,
  1529. subTotal:this.quarterageData[m].subTotal,
  1530. remark:this.quarterageData[m].remark,
  1531. })
  1532. }
  1533. }
  1534. //伙食费
  1535. var boardWagesDatas=[];
  1536. for(let n=0;n<this.boardWagesData.length;n++){
  1537. if(this.boardWagesData[n].nationalTravelFeeId!=''){
  1538. boardWagesDatas.push({
  1539. id:this.boardWagesData[n].id,
  1540. diId:this.boardWagesData[n].diId,
  1541. type:this.boardWagesData[n].type,
  1542. days:this.boardWagesData[n].days,
  1543. nationalTravelFeeId:this.boardWagesData[n].nationalTravelFeeId,
  1544. cost:this.boardWagesData[n].cost,
  1545. currency:this.boardWagesData[n].currency,
  1546. subTotal:this.boardWagesData[n].subTotal,
  1547. remark:this.boardWagesData[n].remark,
  1548. })
  1549. }
  1550. }
  1551. //公杂费miscellaneousFeeData
  1552. var miscellaneousFeeDatas=[];
  1553. for(let b=0;b<this.miscellaneousFeeData.length;b++){
  1554. if(this.miscellaneousFeeData[b].nationalTravelFeeId!=''){
  1555. miscellaneousFeeDatas.push({
  1556. id:this.miscellaneousFeeData[b].id,
  1557. diId:this.miscellaneousFeeData[b].diId,
  1558. type:this.miscellaneousFeeData[b].type,
  1559. days:this.miscellaneousFeeData[b].days,
  1560. nationalTravelFeeId:this.miscellaneousFeeData[b].nationalTravelFeeId,
  1561. cost:this.miscellaneousFeeData[b].cost,
  1562. currency:this.miscellaneousFeeData[b].currency,
  1563. subTotal:this.miscellaneousFeeData[b].subTotal,
  1564. remark:this.miscellaneousFeeData[b].remark,
  1565. })
  1566. }
  1567. }
  1568. //培训费
  1569. var trainingExpenseDatas=[];
  1570. for(let p=0;p<this.trainingExpenseData.length;p++){
  1571. if(this.trainingExpenseData[p].nationalTravelFeeId!=''){
  1572. trainingExpenseDatas.push({
  1573. id:this.trainingExpenseData[p].id,
  1574. diId:this.trainingExpenseData[p].diId,
  1575. type:this.trainingExpenseData[p].type,
  1576. days:this.trainingExpenseData[p].days,
  1577. nationalTravelFeeId:this.trainingExpenseData[p].nationalTravelFeeId,
  1578. cost:this.trainingExpenseData[p].cost,
  1579. currency:this.trainingExpenseData[p].currency,
  1580. subTotal:this.trainingExpenseData[p].subTotal,
  1581. remark:this.trainingExpenseData[p].remark,
  1582. })
  1583. }
  1584. }
  1585. this.storageAPI(quarterageDatas,boardWagesDatas,miscellaneousFeeDatas,trainingExpenseDatas)
  1586. })
  1587. },1000,true),
  1588. //保存API
  1589. storageAPI(arrthre,arrfour,arrfive,arrsix){
  1590. var url = "/api/Groups/PostEnterExitCostOperate"
  1591. var that = this
  1592. this.$axios({
  1593. method: 'post',
  1594. url: url,
  1595. headers: {
  1596. Authorization: 'Bearer ' + this.token,
  1597. contentType:'application/json'
  1598. },
  1599. data:{
  1600. portType: 1,
  1601. userId: that.userId,
  1602. id: that.storageid,
  1603. diId: that.value,
  1604. choiceOne: that.choiceOne?1:0,
  1605. insidePay:that.DomesticFees.total,
  1606. visa: that.DomesticFees.visafees,
  1607. visaRemark: that.DomesticFees.visafeesDescription,
  1608. yiMiao: that.DomesticFees.vaccinefees,
  1609. heSuan: that.DomesticFees.nucleicfees,
  1610. service: that.DomesticFees.serviceCharge,
  1611. ticket: that.DomesticFees.ticketsExhibitionL,
  1612. safe: that.DomesticFees.insurance,
  1613. choiceTwo: that.choiceTwo?1:0,
  1614. sumJJC:that.sumJJC?1:0,
  1615. sumGWC:that.sumGWC?1:0,
  1616. sumTDC:that.sumTDC?1:0,
  1617. outsideJJPay:that.TotalExpenses.EconomyClasstotal,
  1618. outsideGWPay:that.TotalExpenses.BusinessClasstotal,
  1619. outsideTDPay:that.TotalExpenses.Firstclasstotal,
  1620. airJJ:that.TotalExpenses.EconomyClass,
  1621. airGW:that.TotalExpenses.BusinessClass,
  1622. airTD:that.TotalExpenses.Firstclass,
  1623. cityTranffic: that.TotalExpenses.TravellingExpenses,
  1624. currencys: that.currencys,
  1625. choiceThree:that.choiceThree?1:0,
  1626. quarterageData: arrthre,
  1627. choiceFour:that.choiceFour?1:0,
  1628. boardWagesData: arrfour,
  1629. choiceFive:that.choiceFive?1:0,
  1630. miscellaneousFeeData:arrfive,
  1631. choiceSix:that.choiceSix?1:0,
  1632. trainingExpenseData:arrsix,
  1633. airJJC_Checked:that.airJJC_Checked?1:0,
  1634. airGWC_Checked:that.airGWC_Checked?1:0,
  1635. }
  1636. }).then(function (res) {
  1637. if(res.data.code==200){
  1638. that.$message({
  1639. type: 'success',
  1640. message: res.data.msg
  1641. });
  1642. that.GetEnterExitCostInfobyDiId()
  1643. }else{
  1644. that.fullscreenLoading=false;
  1645. that.$message.error(res.data.msg);
  1646. }
  1647. }).catch(function (error) {
  1648. that.$message.error(error.message);
  1649. });
  1650. },
  1651. //选择团组名称调用
  1652. chengvalue(){
  1653. window.localStorage.setItem('sgvalue', this.value);
  1654. this.fullscreenLoading=true;
  1655. this.GetEnterExitCostInfobyDiId()
  1656. },
  1657. eptschedule:debounce(function(val){
  1658. var subTypeId=0
  1659. if(val==1){
  1660. subTypeId=this.listvalue
  1661. }else if(val==2){
  1662. subTypeId=this.tablevalue
  1663. }else{
  1664. subTypeId=1
  1665. }
  1666. if(subTypeId==""){
  1667. this.$message.error('请选择需要导出的表格');
  1668. return
  1669. }
  1670. var url = "/api/Groups/PostEnterExitCostDownload"
  1671. var that = this
  1672. this.$axios({
  1673. method: 'post',
  1674. url: url,
  1675. headers: {
  1676. Authorization: 'Bearer ' + this.token
  1677. },
  1678. data:{
  1679. portType: 1,
  1680. diId: that.value,
  1681. exportType: val,
  1682. subTypeId:subTypeId
  1683. }
  1684. }).then(function (res) {
  1685. if(res.data.code==200){
  1686. that.$message({
  1687. type: 'success',
  1688. message: res.data.msg
  1689. });
  1690. window.open(res.data.data.url);
  1691. }else{
  1692. that.$message.error(res.data.msg);
  1693. }
  1694. })
  1695. // this.storage().then(function () {
  1696. // });
  1697. },500,true),
  1698. //
  1699. calculation(){
  1700. var jnfy
  1701. var jjcxj
  1702. var gwcxj
  1703. var tdcxj
  1704. var zsf
  1705. var hsf
  1706. var gzf
  1707. var pxf
  1708. if (this.choiceOne == true) {
  1709. jnfy=this.DomesticFees.total;
  1710. } else {
  1711. jnfy= 0;
  1712. }
  1713. if (this.choiceThree == true) {
  1714. zsf=this.TotalAccommodationFee;
  1715. } else {
  1716. zsf= 0;
  1717. }
  1718. if (this.choiceFour == true) {
  1719. hsf=this.TotalMeals;
  1720. } else {
  1721. hsf= 0;
  1722. }
  1723. if (this.choiceFive == true) {
  1724. gzf=this.TotalMiscellaneous;
  1725. } else {
  1726. gzf= 0;
  1727. }
  1728. if (this.choiceSix == true) {
  1729. pxf=this.trainingExpense;
  1730. } else {
  1731. pxf= 0;
  1732. }
  1733. if (this.sumJJC == true) {
  1734. jjcxj=this.TotalExpenses.EconomyClasstotal;
  1735. this.jjctotal=jnfy+jjcxj+zsf+hsf+gzf+pxf;
  1736. } else {
  1737. jjcxj= 0;
  1738. this.jjctotal=0;
  1739. }
  1740. if (this.sumGWC == true) {
  1741. gwcxj=this.TotalExpenses.BusinessClasstotal;
  1742. this.gwctotal=jnfy+gwcxj+zsf+hsf+gzf+pxf;
  1743. } else {
  1744. gwcxj= 0;
  1745. this.gwctotal=0;
  1746. }
  1747. if (this.sumTDC == true) {
  1748. tdcxj=this.TotalExpenses.Firstclasstotal;
  1749. this.tdctotal=jnfy+tdcxj+zsf+hsf+gzf+pxf;
  1750. } else {
  1751. tdcxj= 0;
  1752. this.tdctotal=0;
  1753. }
  1754. },
  1755. //删除
  1756. deleteRow(index,row,rows,val){
  1757. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  1758. confirmButtonText: '确定',
  1759. cancelButtonText: '取消',
  1760. type: 'warning'
  1761. }).then(() => {
  1762. if(row.id==0){
  1763. this.$message({
  1764. type: 'success',
  1765. message: '删除成功'
  1766. });
  1767. rows.splice(index, 1);
  1768. if(val==1){
  1769. this.TotalAccommodationFee=0;
  1770. for(let a=0;a<rows.length;a++){
  1771. this.TotalAccommodationFee+=rows[a].subTotal;
  1772. }
  1773. }
  1774. if(val==2){
  1775. this.TotalMeals=0;
  1776. for(let a=0;a<rows.length;a++){
  1777. this.TotalMeals+=rows[a].subTotal;
  1778. }
  1779. }
  1780. if(val==3){
  1781. this.TotalMiscellaneous=0;
  1782. for(let a=0;a<rows.length;a++){
  1783. this.TotalMiscellaneous+=rows[a].subTotal;
  1784. }
  1785. }
  1786. if(val==4){
  1787. this.trainingExpense=0;
  1788. for(let a=0;a<rows.length;a++){
  1789. this.trainingExpense+=rows[a].subTotal;
  1790. }
  1791. }
  1792. return;
  1793. }
  1794. var url = "/api/Groups/PostEnterExitCostSubItemDel"
  1795. var that = this
  1796. this.$axios({
  1797. method: 'post',
  1798. url: url,
  1799. headers: {
  1800. Authorization: 'Bearer ' + that.token
  1801. },
  1802. data:{
  1803. portType: 1,
  1804. id: row.id,
  1805. deleteUserId: that.userId
  1806. }
  1807. }).then(function (res) {
  1808. console.log(res)
  1809. if(res.data.code==200){
  1810. that.$message({
  1811. type: 'success',
  1812. message: res.data.msg
  1813. });
  1814. rows.splice(index, 1);
  1815. if(val==1){
  1816. that.TotalAccommodationFee=0;
  1817. for(let a=0;a<rows.length;a++){
  1818. that.TotalAccommodationFee+=rows[a].subTotal;
  1819. }
  1820. }
  1821. if(val==2){
  1822. that.TotalMeals=0;
  1823. for(let a=0;a<rows.length;a++){
  1824. that.TotalMeals+=rows[a].subTotal;
  1825. }
  1826. }
  1827. if(val==3){
  1828. that.TotalMiscellaneous=0;
  1829. for(let a=0;a<rows.length;a++){
  1830. that.TotalMiscellaneous+=rows[a].subTotal;
  1831. }
  1832. }
  1833. if(val==4){
  1834. that.trainingExpense=0;
  1835. for(let a=0;a<rows.length;a++){
  1836. that.trainingExpense+=rows[a].subTotal;
  1837. }
  1838. }
  1839. }else{
  1840. that.$message.error(res.data.msg);
  1841. }
  1842. })
  1843. }).catch(() => {
  1844. this.$message({
  1845. type: 'info',
  1846. message: '已取消删除'
  1847. });
  1848. });
  1849. },
  1850. //填入实时汇率
  1851. adoptRealtime(){
  1852. for(let at=0;at<this.currencys.length;at++){
  1853. for(let rt=0;rt<this.currencyss.length;rt++){
  1854. if(this.currencys[at].currencyCode==this.currencyss[rt].currCode){
  1855. this.currencys[at].rate=this.currencyss[rt].rate
  1856. }
  1857. }
  1858. }
  1859. this.cubtn=false;
  1860. },
  1861. Getnewvisafee(){
  1862. this.DomesticFees.visafees=this.visainfo.feeTotal;
  1863. this.DomesticFees.visafeesDescription=this.visainfo.remark;
  1864. this.getvisafeebtn=false;
  1865. },
  1866. //导出到收款账单
  1867. NationalTravelFeeImportReceivables(){
  1868. var url = "/api/Groups/NationalTravelFeeImportReceivables/"+this.value
  1869. var that = this
  1870. this.$axios({
  1871. method: 'get',
  1872. url: url,
  1873. headers: {
  1874. Authorization: 'Bearer ' +that.token
  1875. },
  1876. }).then(function (res) {
  1877. if (res.data.code == 200) {
  1878. that.$message({
  1879. type: 'success',
  1880. message: res.data.msg
  1881. });
  1882. }else{
  1883. that.$message.error(res.data.msg);
  1884. }
  1885. }).catch(function (error) {
  1886. that.$message.error("操作错误,联系信息部!");
  1887. });
  1888. },
  1889. },
  1890. filters: {
  1891. numFilter (value) {
  1892. // 截取当前数据到小数点后两位
  1893. let realVal = new Decimal(value).toFixed(2)
  1894. return realVal
  1895. }
  1896. },
  1897. watch: {
  1898. choiceOne(val){//境内费用(其他费用)选择框
  1899. this.calculation();
  1900. },
  1901. choiceThree(val){//住宿费合计选择框
  1902. this.calculation();
  1903. },
  1904. choiceFour(val){//伙食费合计选择框
  1905. this.calculation();
  1906. },
  1907. choiceFive(val){//公杂费合计选择框
  1908. this.calculation();
  1909. },
  1910. choiceSix(val){//培训费用选择框
  1911. this.calculation();
  1912. },
  1913. sumJJC(val){//经济舱小计选择框
  1914. this.calculation();
  1915. },
  1916. sumGWC(val){//公务舱小计选择框
  1917. this.calculation();
  1918. },
  1919. sumTDC(val){//公务舱小计选择框
  1920. this.calculation();
  1921. },
  1922. 'DomesticFees.total':{
  1923. handler(newVal,oldVal) {
  1924. this.calculation();
  1925. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1926. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1927. },
  1928. },
  1929. TotalAccommodationFee:{
  1930. handler(newVal,oldVal) {
  1931. this.calculation();
  1932. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1933. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1934. },
  1935. },
  1936. TotalMeals:{
  1937. handler(newVal,oldVal) {
  1938. this.calculation();
  1939. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1940. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1941. },
  1942. },
  1943. TotalMiscellaneous:{
  1944. handler(newVal,oldVal) {
  1945. this.calculation();
  1946. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1947. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1948. },
  1949. },
  1950. trainingExpense:{
  1951. handler(newVal,oldVal) {
  1952. this.calculation();
  1953. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1954. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1955. },
  1956. },
  1957. 'TotalExpenses.EconomyClasstotal':{
  1958. handler(newVal,oldVal) {
  1959. this.calculation();
  1960. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1961. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1962. },
  1963. },
  1964. 'TotalExpenses.BusinessClasstotal':{
  1965. handler(newVal,oldVal) {
  1966. this.calculation();
  1967. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1968. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1969. // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
  1970. },
  1971. },
  1972. 'TotalExpenses.Firstclasstotal':{
  1973. handler(newVal,oldVal) {
  1974. this.calculation();
  1975. // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
  1976. // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
  1977. // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
  1978. },
  1979. },
  1980. //境内费用非空处理
  1981. DomesticFees: {
  1982. handler(newVal, oldVal) {
  1983. if(newVal.insurance==undefined){
  1984. newVal.insurance=0
  1985. }
  1986. if(newVal.nucleicfees==undefined){
  1987. newVal.nucleicfees=0
  1988. }
  1989. if(newVal.serviceCharge==undefined){
  1990. newVal.serviceCharge=0
  1991. }
  1992. if(newVal.ticketsExhibitionL==undefined){
  1993. newVal.ticketsExhibitionL=0
  1994. }
  1995. if(newVal.vaccinefees==undefined){
  1996. newVal.vaccinefees=0
  1997. }
  1998. if(newVal.visafees==undefined){
  1999. newVal.visafees=0
  2000. }
  2001. },
  2002. immediate: true,
  2003. deep: true // 可以深度检测到 person 对象的属性值的变化
  2004. },
  2005. //国际旅费非空处理
  2006. TotalExpenses: {
  2007. handler(newVal, oldVal) {
  2008. if(newVal.EconomyClass==undefined){
  2009. newVal.EconomyClass=0
  2010. }
  2011. if(newVal.BusinessClass==undefined){
  2012. newVal.BusinessClass=0
  2013. }
  2014. if(newVal.TravellingExpenses==undefined){
  2015. newVal.TravellingExpenses=0
  2016. }
  2017. },
  2018. immediate: true,
  2019. deep: true // 可以深度检测到 person 对象的属性值的变化
  2020. },
  2021. //监听汇率数组是否变化
  2022. currencys:{
  2023. handler(val){
  2024. console.log(val);
  2025. // console.log(this.quarterageData);
  2026. //住宿费
  2027. this.TotalAccommodationFee=0
  2028. for(let q=0;q<this.quarterageData.length;q++){
  2029. for(let qc=0;qc<this.currencys.length;qc++){
  2030. if(this.currencys[qc].currencyCode==this.quarterageData[q].curremcyCode){
  2031. this.quarterageData[q].subTotal=this.currencys[qc].rate*this.quarterageData[q].cost
  2032. }
  2033. }
  2034. this.TotalAccommodationFee+=this.quarterageData[q].subTotal
  2035. }
  2036. //伙食费
  2037. this.TotalMeals=0
  2038. for(let b=0;b<this.boardWagesData.length;b++){
  2039. for(let bc=0;bc<this.currencys.length;bc++){
  2040. if(this.currencys[bc].currencyCode==this.boardWagesData[b].curremcyCode){
  2041. this.boardWagesData[b].subTotal=this.currencys[bc].rate*this.boardWagesData[b].cost
  2042. }
  2043. }
  2044. this.TotalMeals+=this.boardWagesData[b].subTotal
  2045. }
  2046. //公杂费
  2047. this.TotalMiscellaneous=0
  2048. for(let m=0;m<this.miscellaneousFeeData.length;m++){
  2049. for(let mc=0;mc<this.currencys.length;mc++){
  2050. if(this.currencys[mc].currencyCode==this.miscellaneousFeeData[m].curremcyCode){
  2051. this.miscellaneousFeeData[m].subTotal=this.currencys[mc].rate*this.miscellaneousFeeData[m].cost
  2052. }
  2053. }
  2054. this.TotalMiscellaneous+=this.miscellaneousFeeData[m].subTotal
  2055. }
  2056. //培训费
  2057. this.trainingExpense=0
  2058. for(let t=0;t<this.trainingExpenseData.length;t++){
  2059. for(let tc=0;tc<this.currencys.length;tc++){
  2060. if(this.currencys[tc].currencyCode==this.trainingExpenseData[t].curremcyCode){
  2061. this.trainingExpenseData[t].subTotal=this.currencys[tc].rate*this.trainingExpenseData[t].cost
  2062. }
  2063. }
  2064. this.trainingExpense+=this.trainingExpenseData[t].subTotal
  2065. }
  2066. },
  2067. deep:true
  2068. }
  2069. },
  2070. mounted(){
  2071. this.token=JSON.parse(localStorage.getItem('userinif')).token;
  2072. this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  2073. this.value=JSON.parse(localStorage.getItem('sgvalue'))
  2074. this.GetEnterExitCostDataSource();
  2075. this.GetNationalTravelFeeData();
  2076. },
  2077. destroyed(){
  2078. window.localStorage.removeItem('sgvalue');
  2079. }
  2080. }
  2081. </script>
  2082. <style>
  2083. .Entry-all{
  2084. background-color: #fff;
  2085. padding: 10px;
  2086. box-shadow: 0 0 5px #0005;
  2087. border-radius: 10px;
  2088. height: 100%;
  2089. min-height: 840px;
  2090. }
  2091. .Entry-head-li label{
  2092. color: #606266;
  2093. font-size: 15px;
  2094. font-weight: 600;
  2095. }
  2096. .Entry-head{
  2097. display: flex;
  2098. justify-content: space-between;
  2099. }
  2100. .Entry-form{
  2101. margin-top: 10px;
  2102. border-top:2px solid #409EFF;
  2103. }
  2104. .Entry-li-inif{
  2105. display: flex;
  2106. align-items: center;
  2107. width: 100%;
  2108. border-top:1px solid #ebeef5;
  2109. padding: 5px 0;
  2110. }
  2111. .Entry-li-inif:last-child{
  2112. border-bottom:1px solid #ebeef5;
  2113. }
  2114. .Entry-li-lable{
  2115. display: flex;
  2116. justify-content: space-between;
  2117. align-items: center;
  2118. margin: 10px 0;
  2119. margin-top: 20px;
  2120. }
  2121. .Entry-li-lables{
  2122. display: flex;
  2123. align-items: center;
  2124. margin: 10px 0;
  2125. margin-top: 20px;
  2126. }
  2127. .Entry-inif-box .depipt{
  2128. display: inline-block;
  2129. width: 240px;
  2130. }
  2131. .Entry-inif-box{
  2132. margin-right: 20px;
  2133. }
  2134. .Entry-li-inif label{
  2135. font-size: 14px;
  2136. color: #606266;
  2137. }
  2138. .Entry-form .redzhu{
  2139. font-size: 14px;
  2140. color: red;
  2141. }
  2142. .sub-boxs{
  2143. -ms-user-select: none;
  2144. -khtml-user-select: none;
  2145. -webkit-user-select: none;
  2146. -moz-user-select: none;
  2147. font-size: 12px;
  2148. font-family:"微软雅黑";
  2149. user-select: none;
  2150. background-color: #FFF;
  2151. background-image: none;
  2152. border-radius: 4px;
  2153. border: 1px solid #DCDFE6;
  2154. -webkit-box-sizing: border-box;
  2155. box-sizing: border-box;
  2156. color: #606266;
  2157. display: inline-block;
  2158. height: 28px;
  2159. line-height: 28px;
  2160. outline: 0;
  2161. padding: 0 15px;
  2162. -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
  2163. transition: border-color .2s cubic-bezier(.645,.045,.355,1);
  2164. }
  2165. .btn-Entry{
  2166. text-align: right;
  2167. }
  2168. .Entry-all .el-checkbox__inner{
  2169. width: 18px;
  2170. height: 18px;
  2171. margin-right: 10px;
  2172. }
  2173. .Entry-all .el-checkbox__inner::after{
  2174. height: 10px;
  2175. left: 6px;
  2176. }
  2177. .Entry-all .el-table th.el-table__cell>.cell{
  2178. text-align:center;
  2179. }
  2180. </style>