EntryDetails.vue 90 KB

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