EntryDetails.vue 124 KB

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