expense.vue 130 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272
  1. <template>
  2. <section>
  3. <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff;">
  4. <div ref="abbisd" style="width: 100%;overflow: hidden;">
  5. <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>{{ $t('expensereimbursementmodule')
  6. }}</h3>
  7. <el-divider></el-divider>
  8. <el-col :span="12">
  9. <el-menu default-active="1-1" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff"
  10. text-color="#666666" :active-text-color="themeColor" style="width:100%">
  11. <el-submenu index="1">
  12. <template slot="title">
  13. <i class="iconfont firerock-icontianbao"></i>
  14. <span>{{ $t('fillinthestaffexpenses') }}</span>
  15. </template>
  16. <el-menu-item index="1-1">
  17. <p> {{ $t('expenses') }}</p>
  18. </el-menu-item>
  19. <!-- <el-menu-item index="1-2"><p @click="ssl(1)">{{ $t('travelexpensess') }}</p></el-menu-item>
  20. <el-menu-item index="1-3"><p @click="ssl(2)">{{ $t('outsourcingcostshouldbereported') }}</p></el-menu-item> -->
  21. </el-submenu>
  22. <el-submenu index="2">
  23. <template slot="title">
  24. <i class="iconfont firerock-iconbaoxiaodan"></i>
  25. <span>{{ permissions.costAll ? $t('listofreimbursementvouchers') : $t('myexpensevoucher') }}</span>
  26. </template>
  27. <el-menu-item index="2-1">
  28. <p @click="bills(false)">{{ $t('documentlist') }}</p>
  29. </el-menu-item>
  30. <el-menu-item index="2-2">
  31. <p @click="bills(true)">{{ $t('documentreview') }}</p>
  32. </el-menu-item>
  33. </el-submenu>
  34. <!-- <el-menu-item index="3" @select="bills" @click="bills(false)" v-if="user.role == 0">
  35. <i class="iconfont firerock-iconbaoxiaodan"></i>
  36. <span slot="title">{{user.role == 0?"我的报销凭证":"报销凭证列表"}}</span>
  37. </el-menu-item> -->
  38. </el-menu>
  39. </el-col>
  40. </div>
  41. <div class="side" @click="side" ref="sid" style="left: 200px">
  42. <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
  43. </div>
  44. </div>
  45. <!-- 侧边栏点击事件 -->
  46. <!-- <div class="side" @click="side" ref="sid" style="left: 430px">
  47. <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
  48. </div> -->
  49. <!-- 内容主体区域 -->
  50. <div class="contents">
  51. <div v-if="!displayTable" class="headine" ref="headine">
  52. <!-- <h3 ref="headHe" style="padding-left: 220px">{{shuz[ins]}}</h3> -->
  53. <h3 ref="headHe" style="padding-left: 220px">{{ $t('expenses') }}</h3>
  54. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits" size="mini">{{
  55. $t('btn.submit') }}</el-button></p>
  56. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submitUpload" size="mini">{{
  57. $t('batchupload') }}</el-button></p>
  58. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="customTypeOp" size="mini"
  59. v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
  60. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="expenseTypeOp" size="mini"
  61. v-if="permissions.costAll">{{ $t('feiYongZhuLeiXingGuanLi') }}</el-button></p>
  62. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="equipmentOwner" size="mini"
  63. v-if="user.isMachineCost == 2">设备归属人管理</el-button></p>
  64. </div>
  65. <!-- 上面部分 -->
  66. <div ref="staff" style="margin: 20px 20px 0 220px; width: 81.5%">
  67. <div class="staff" v-if="!displayTable">
  68. <!-- 公共 -->
  69. <div class="public">
  70. <el-form :model="addForm" ref="mainAddForm" label-width="100px" :rules="addFormRules">
  71. <!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
  72. <!-- 报销人 -->
  73. <el-form-item :label="$t('peopleconcerned')" prop="ownerId">
  74. <!--普通员工只能自己填报自己的 -->
  75. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.ownerId"
  76. :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="!permissions.costAudit && expenseMainTypeValue != 14454"
  77. filterable="true">
  78. <span v-for="(item, index) in users" :key="index">
  79. <el-option :label="item.name" :value="item.id"></el-option>
  80. </span>
  81. </el-select>
  82. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'1'"
  83. :subject="users" :disabled="!permissions.costAudit && expenseMainTypeValue != 14454" :subjectId="addForm.ownerId" ref="selectCat"
  84. @selectCal="selectCal"></selectCat>
  85. </el-form-item>
  86. <!-- 填报日期 -->
  87. <el-form-item :label="$t('fillinthedate')" style="position: relative;top: 38px;">
  88. <el-col :span="11">
  89. <el-date-picker type="date" :placeholder="$t('optiondate')" v-model="addForm.createDate"
  90. value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  91. </el-col>
  92. </el-form-item>
  93. <!-- 发票张数 -->
  94. <el-form-item :label="$t('invoicenumber')" v-if="this.user.timeType.easyExpense == 0 && (expenseMainTypeValue != 14454)">
  95. <el-input v-model="addForm.ticketNum" style="width: 150px"></el-input>
  96. </el-form-item>
  97. <!-- 费用主类型 -->
  98. <el-form-item :label="$t('feiYongZhuLeiXing')">
  99. <el-select v-model="expenseMainTypeValue" style="width: 150px" @change="costMainTypeSwitching">
  100. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name"
  101. :value="item.id"></el-option>
  102. </el-select>
  103. </el-form-item>
  104. <!-- 第一审核人 -->
  105. <el-form-item :label="$t('di-yi-shen-he-ren')" v-if="auditTypeItem.auditType == 2">
  106. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.firstCheckerId"
  107. :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
  108. filterable="true" :disabled="expenseMainTypeValue == 14454">
  109. <span v-for="(item, index) in usersNoInfo" :key="index">
  110. <el-option :label="item.name" :value="item.id"></el-option>
  111. </span>
  112. </el-select>
  113. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'4'" :disabled="expenseMainTypeValue == 14454"
  114. :subject="usersNoInfo" :subjectId="addForm.firstCheckerId" ref="selectCat"
  115. @selectCal="selectCal"></selectCat>
  116. </el-form-item>
  117. <!-- 第二审核人 -->
  118. <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2">
  119. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.secondCheckerId"
  120. :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
  121. filterable="true" :disabled="expenseMainTypeValue == 14454">
  122. <span v-for="(item, index) in usersNoInfo" :key="index">
  123. <el-option :label="item.name" :value="item.id"></el-option>
  124. </span>
  125. </el-select>
  126. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'5'" :disabled="expenseMainTypeValue == 14454"
  127. :subject="usersNoInfo" :subjectId="addForm.secondCheckerId" ref="selectCat"
  128. @selectCal="selectCal"></selectCat>
  129. </el-form-item>
  130. <!-- 设备归属人 -->
  131. <el-form-item label="设备归属人" v-if="expenseMainTypeValue == 14454">
  132. <el-select v-model="addForm.equipmentOwnerId"
  133. placeholder="请选择设备归属人" style="width: 150px"
  134. filterable="true">
  135. <span v-for="(item, index) in equipmentOwnerList" :key="index">
  136. <el-option :label="item.equipmentOwner" :value="item.id"></el-option>
  137. </span>
  138. </el-select>
  139. </el-form-item>
  140. <!-- 备注 -->
  141. <el-form-item :label="$t('bei-zhu')" style="display: block; width: 70%">
  142. <el-input type="textarea" v-model="addForm.remark" :autosize="{ minRows: 2, maxRows: 2 }"
  143. maxlength="100" :disabled="expenseMainTypeValue == 14454"></el-input>
  144. </el-form-item>
  145. <!-- 总费用 -->
  146. <!-- <div style="float: left; line-height: 55px;margin-left:20px">总费用 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
  147. </el-form>
  148. </div>
  149. <!-- 按钮 -->
  150. <div class="pu_button">
  151. <span v-if="totalCost <= 0" style="color:#606266;">{{ $t('totalcostos') }} {{ totalCost }} {{ $t('yuan')
  152. }}</span>
  153. <span v-else style="color:#606266;">{{ $t('totalcostos') }} ¥{{ totalCost | numberToCurrency }} {{ $t('yuan')
  154. }}</span>
  155. <span class="pu_bu_x" style="margin-left:10px;" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> {{
  156. $t('newinvoice') }}</span>
  157. </div>
  158. <!-- 表格 -->
  159. <div class="pu_table">
  160. <el-table :data="invoiceList" border style="width: 100%;height:100%" height="386px" @row-dblclick="dbclick">
  161. <el-table-column prop="projectName" :label="$t('subordinatetotheproject')" width="180">
  162. <template slot-scope="scope">
  163. <el-select size="small" v-model="scope.row.projectId" :placeholder="$t('other.project')"
  164. style="width: 150px" filterable popper-class="projectSelectPopperClass">
  165. <el-option v-for="(item, index) in projectList" :key="index"
  166. :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
  167. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  168. <span style="float: right;">{{ item.projectName }}</span>
  169. </el-option>
  170. </el-select>
  171. </template>
  172. </el-table-column>
  173. <el-table-column prop="happenDate" :label="$t('forthedate')" width="170px">
  174. <template slot-scope="scope">
  175. <el-date-picker size="small" v-model="scope.row.happenDate" type="date" style=" width: 145px"
  176. value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
  177. </el-date-picker>
  178. </template>
  179. </el-table-column>
  180. <el-table-column :label="$t('invoices')" width="175px" v-if="this.user.timeType.easyExpense == 0">
  181. <template slot-scope="scope">
  182. <el-select size="small" v-model="scope.row.invoiceType" :placeholder="$t('pleaseselectthetypeoffee')"
  183. style="width: 150px;" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454">
  184. <el-option :label="$t('vATspecialinvoice')" value="0"></el-option>
  185. <el-option :label="$t('vATgeneralinvoice')" value="1"></el-option>
  186. </el-select>
  187. </template>
  188. </el-table-column>
  189. <el-table-column :label="$t('costtype')" width="175px">
  190. <template slot-scope="scope">
  191. <el-select size="small" v-model="scope.row.expenseType" :placeholder="$t('costtype')"
  192. style="width: 150px">
  193. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
  194. :value="item.typeName"></el-option>
  195. </el-select>
  196. </template>
  197. </el-table-column>
  198. <el-table-column :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'" width="135px">
  199. <template slot-scope="scope">
  200. <el-input size="small" :id="'upam' + scope.$index" v-model="scope.row.amount" @input="zhi(scope.$index)"
  201. @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam' + scope.$index)" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
  202. </template>
  203. </el-table-column>
  204. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px"
  205. v-if="this.user.timeType.easyExpense == 0">
  206. <template slot-scope="scope">
  207. <el-input size="small" v-model.number="scope.row.invoiceNo" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
  208. </template>
  209. </el-table-column>
  210. <el-table-column :label="$t('shui-shuai')" width="135px" v-if="this.user.timeType.easyExpense == 0">
  211. <template slot-scope="scope">
  212. <el-input size="small" type="number" v-model="scope.row.taxPercent"
  213. @input="zhi(scope.$index)" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
  214. </template>
  215. </el-table-column>
  216. <el-table-column :label="$t('taxs')" width="135px" v-if="this.user.timeType.easyExpense == 0">
  217. <template slot-scope="scope">
  218. <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
  219. </template>
  220. </el-table-column>
  221. <el-table-column :label="$t('bei-zhu')" width="135px">
  222. <template slot-scope="scope">
  223. <el-input size="small" v-model="scope.row.remark" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
  224. </template>
  225. </el-table-column>
  226. <el-table-column :label="$t('expensereimbursementvoucher')" width="135px">
  227. <template slot-scope="scope">
  228. <!--
  229. <div @click="abl(scope.$index)">
  230. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :before-remove="beforeRemove"
  231. :http-request="fileonLoad" limit="1" name="multipartFile">
  232. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  233. </el-upload>
  234. </div>
  235. -->
  236. <div>
  237. <div v-if="scope.row.pic && scope.row.pic.length > 0">
  238. <el-button size="small" @click="viewDetailsImage(scope.$index)">{{ $t('Checkthedetails') }}</el-button>
  239. </div>
  240. <div v-else>
  241. <el-button type="primary" size="small" @click="performCustomization(scope.$index)" :loading="listLoading">{{ $t('clickupload') }}</el-button>
  242. </div>
  243. </div>
  244. </template>
  245. </el-table-column>
  246. <el-table-column fixed="right" :label="$t('operation')">
  247. <template slot-scope="scope">
  248. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px"
  249. @click="chanc(scope.$index)">{{ $t('btn.delete') }}</el-button>
  250. </template>
  251. </el-table-column>
  252. </el-table>
  253. </div>
  254. <!-- <el-button class="submits" type="warning" @click="submits">提交</el-button> -->
  255. </div>
  256. </div>
  257. </div>
  258. <!-- 多张图片查看详情 -->
  259. <el-dialog :title="$t('Checkthedetails')" :visible.sync="dialogVisibleImage" width="745px" :before-close="handleClose">
  260. <div class="dayImge">
  261. <div class="dayImgeItem" v-if="dialogVisibleImageList">
  262. <viewer :images="dialogVisibleImageList" v-viewer="viewerOptions" class="dayImgeItem">
  263. <template v-for="src,i in dialogVisibleImageList" :id="src.url">
  264. <!-- 图片 -->
  265. <div class="xiaoImg" v-if="isFileType(src.url) == 'image'">
  266. <img ref="imgsa" :src="src.url">
  267. <div class="imgIcon" @click.stop="deteleIpc(apl)" v-if="imgLoadType==1"><i class="el-icon-circle-close"></i></div>
  268. <div class="imgIcon" @click.stop="deteleIpc(apl, 'ParticularsList', 'invoiceList')" v-if="imgLoadType==2"><i class="el-icon-circle-close"></i></div>
  269. </div>
  270. <!-- 文件 -->
  271. <div class="xiaoImg" v-if="isFileType(src.url) == 'pdf'" @click.stop="openViewPdf(src.url)">
  272. <img :src="pdfIcons">
  273. <div class="imgIcon" @click.stop="deteleIpc(apl)" v-if="imgLoadType==1"><i class="el-icon-circle-close"></i></div>
  274. <div class="imgIcon" @click.stop="deteleIpc(apl, 'ParticularsList', 'invoiceList')" v-if="imgLoadType==2"><i class="el-icon-circle-close"></i></div>
  275. </div>
  276. </template>
  277. <img @click.stop="performCustomization(apl, imgLoadType)" v-if="dialogVisibleImageList.length < 10" :src="require('../../assets/image/aacbc.png')" class="xiaoImg" style="margin-right: 0" />
  278. </viewer>
  279. </div>
  280. </div>
  281. </el-dialog>
  282. <!-- 下面部分 -->
  283. <div class="xiamian" ref="xiaomian"
  284. :style="'width: ' + (xiamianWidth - 400) + 'px;float:right;background: #fff;position: relative;'">
  285. <div v-if="displayTable">
  286. <div style="padding-left:10px;padding-right:10px;">
  287. <div>
  288. <el-form label-width="100px" inline>
  289. <!-- 报销人 -->
  290. <el-form-item :label="$t('peopleconcerned')">
  291. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ownerId" size="small" clearable
  292. :placeholder="$t('selecttheapplicant')" style="width: 120px" :disabled="!permissions.costAudit"
  293. filterable="true">
  294. <span v-for="(item, index) in users" :key="index">
  295. <el-option :label="item.name" :value="item.id"></el-option>
  296. </span>
  297. </el-select>
  298. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'small'" :widthStr="'120'" :distinction="'2'"
  299. :clearable="true" :subject="users" :disabled="!permissions.costAudit" :subjectId="ownerId"
  300. ref="selectCat" @selectCal="selectCal" :filterable="true"></selectCat>
  301. </el-form-item>
  302. <!-- 单据编号 -->
  303. <el-form-item :label="$t('receiptnumber')">
  304. <el-input v-model="code" size="small" :placeholder="$t('receiptnumber')" clearable="true"
  305. style="width: 120px"></el-input>
  306. </el-form-item>
  307. <!-- 费用主类型 -->
  308. <el-form-item :label="$t('feiYongZhuLeiXing')">
  309. <el-select size="small" v-model="queryExpenseMainType" style="width: 150px" clearable :placeholder="$t('typesof')">
  310. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name"
  311. :value="item.id"></el-option>
  312. <!-- <el-option :label="$t('yi-ban')" :value="0"></el-option>
  313. <el-option :label="$t('cha-lv')" :value="1"></el-option>
  314. <el-option :label="$t('wai-bao')" :value="2"></el-option> -->
  315. </el-select>
  316. </el-form-item>
  317. <el-form-item :label="$t('faFangZhuangTai')" v-if="permissions.costExpenseRelease">
  318. <el-select v-model="sendState" size="small" style="width: 150px"
  319. clearable>
  320. <el-option :label="$t('weiFaFang')" :value="0"></el-option>
  321. <el-option :label="$t('yiFaFang')" :value="1"></el-option>
  322. </el-select>
  323. </el-form-item>
  324. <!-- 填报日期 -->
  325. <div style="display: inline-block;">
  326. <el-form-item :label="$t('other.project')">
  327. <el-select v-model="selectProject" size="small" style="width: 162px" clearable filterable>
  328. <el-option v-for="item in projectList" :label="item.projectName" :value="item.id" :key="item.id">
  329. <span style="float: left">{{ item.projectName }}</span>
  330. <span style="float: right; color: #8492a6;">{{ item.projectCode }}</span>
  331. </el-option>
  332. </el-select>
  333. </el-form-item>
  334. <el-form-item :label="$t('fillinthedate')">
  335. <el-date-picker v-model="date" type="daterange" value-format="yyyy-MM-dd" size="small"
  336. :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')"
  337. :end-placeholder="$t('time.endDate')" style="width: 280px">
  338. </el-date-picker>
  339. </el-form-item>
  340. <el-form-item>
  341. <el-button @click="getList" size="small">{{ $t('find') }}</el-button>
  342. </el-form-item>
  343. <el-form-item v-if="currentClick == '2-1'">
  344. <el-button :loading="exportingData" @click="exportDocument()" size="small">{{ $t('danJuDaoChu') }}</el-button>
  345. </el-form-item>
  346. <el-form-item v-if="currentClick == '2-1'">
  347. <el-button :loading="exportingData" @click="exportDocumentFile()" size="small">{{ $t('baoXiaoPingZhengDaoChu') }}</el-button>
  348. </el-form-item>
  349. <el-form-item v-if="currentClick == '2-1' && permissions.costExpenseRelease">
  350. <el-button @click="documentIssuance(1)" size="small">{{ $t('faFang') }}</el-button>
  351. </el-form-item>
  352. <el-form-item v-if="currentClick == '2-1' && permissions.costExpenseRelease">
  353. <el-button @click="documentIssuance(0)" size="small">{{ $t('quXiaoFaFang') }}</el-button>
  354. </el-form-item>
  355. <!-- <span>审核模式:{{ auditTypeItem.auditType }}</span> -->
  356. </div>
  357. </el-form>
  358. </div>
  359. <el-divider></el-divider>
  360. <!--列表-->
  361. <el-table ref="tab" :data="list" @selection-change="handleSelectionChange" highlight-current-row
  362. v-loading="listLoading" :height="tableHeight - currentClickNum" style="width: 100%;"
  363. :summary-method="getSummaries" show-summary>
  364. <el-table-column type="selection" width="55"></el-table-column>
  365. <el-table-column prop="code" :label="$t('ticketnumber')" width="120">
  366. <template slot-scope="scope">
  367. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  368. <span style="color: red">{{ scope.row.code }}</span>
  369. </template>
  370. <template v-else>{{ scope.row.code }}</template>
  371. </template>
  372. </el-table-column>
  373. <el-table-column prop="engineeringName" label="工程名称" width="200" v-if="user.companyId == 4811">
  374. <template slot-scope="scope">
  375. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  376. <span style="color: red">{{ scope.row.engineeringName }}</span>
  377. </template>
  378. <template v-else>{{ scope.row.engineeringName }}</template>
  379. </template>
  380. </el-table-column>
  381. <el-table-column prop="totalAmount" :label="$t('amountof') + '(' + $t('yuan') + ')'" align="center" width="120">
  382. <template slot-scope="scope">
  383. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  384. <span style="color: red">
  385. <span style="float:right;margin-right:20px">{{ scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) : '0' }}</span>
  386. </span>
  387. </template>
  388. <template v-else>
  389. <span style="float:right;margin-right:20px">{{ scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) : '0' }}</span>
  390. </template>
  391. </template>
  392. </el-table-column>
  393. <el-table-column prop="ownerName" :label="$t('peopleconcerned')">
  394. <template slot-scope="scope">
  395. <div>
  396. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  397. <span style="color: red">
  398. <span v-if="user.userNameNeedTranslate != 1">
  399. {{ scope.row.ownerName }}
  400. </span>
  401. <span v-if="user.userNameNeedTranslate == 1">
  402. <TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText>
  403. </span>
  404. </span>
  405. </template>
  406. <template v-else>
  407. <span v-if="user.userNameNeedTranslate != 1">
  408. {{ scope.row.ownerName }}
  409. </span>
  410. <span v-if="user.userNameNeedTranslate == 1">
  411. <TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText>
  412. </span>
  413. </template>
  414. </div>
  415. </template>
  416. </el-table-column>
  417. <el-table-column prop="createDate" :label="$t('fillinthedate')" width="100">
  418. <template slot-scope="scope">
  419. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  420. <span style="color: red">{{ scope.row.createDate }}</span>
  421. </template>
  422. <template v-else>{{ scope.row.createDate }}</template>
  423. </template>
  424. </el-table-column>
  425. <el-table-column prop="ticketNum" :label="$t('invoicenumber')"
  426. v-if="this.user.timeType.easyExpense == 0 && user.companyId != 4811"></el-table-column>
  427. <el-table-column prop="type" :label="$t('ppertype')" v-if="this.user.timeType.easyExpense == 0">
  428. <template slot-scope="scope">
  429. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  430. <span style="color: red">{{ scope.row.expenseMainTypeName }}</span>
  431. </template>
  432. <template v-else>{{ scope.row.expenseMainTypeName }}</template>
  433. </template>
  434. </el-table-column>
  435. <el-table-column prop="equipmentOwnerName" label="设备归属人" v-if="user.companyId == 4811" width="150">
  436. <template slot-scope="scope">
  437. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  438. <span style="color: red">{{ scope.row.equipmentOwnerName }}</span>
  439. </template>
  440. <template v-else>{{ scope.row.equipmentOwnerName }}</template>
  441. </template>
  442. </el-table-column>
  443. <el-table-column prop="remark" :label="$t('bei-zhu')" width="180">
  444. <template slot-scope="scope">
  445. <template v-if="user.companyId == 4811 && scope.row.status == 4">
  446. <span style="color: red">
  447. <span style="font-size:12px;">{{ scope.row.remark }}</span>
  448. </span>
  449. </template>
  450. <template v-else>
  451. <span style="font-size:12px;">{{ scope.row.remark }}</span>
  452. </template>
  453. </template>
  454. </el-table-column>
  455. <el-table-column prop="status" :label="$t('state.states')" width="80">
  456. <template slot-scope="scope">
  457. <span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
  458. <span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
  459. <span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
  460. <span v-if="scope.row.status == 4" style="color: red">{{ statusTxt[scope.row.status] }}</span>
  461. </template>
  462. </el-table-column>
  463. <el-table-column prop="reviewProcess" :label="$t('title.reviewProcess')" width="180" v-if="auditTypeItem.auditType == 2">
  464. <template slot-scope="scope">
  465. <span v-if="scope.row.reviewProcess == 0">{{ $t('daiDiYiShenHeRenShenHe') }}</span>
  466. <span v-if="scope.row.reviewProcess == 1">{{ $t('daiDiErShenHeRenShenHe') }}</span>
  467. <span v-if="scope.row.reviewProcess == 2">{{ $t('shenHeWanCheng') }}</span>
  468. <span v-if="scope.row.reviewProcess == 3">未提交</span>
  469. <span v-if="scope.row.reviewProcess == 4">已驳回</span>
  470. </template>
  471. </el-table-column>
  472. <!-- <el-table-column prop="denyReason" :label="$t('dismissreason')" width="180">
  473. <template slot-scope="scope">
  474. <span style="font-size:12px;">{{scope.row.denyReason}}</span>
  475. </template>
  476. </el-table-column> -->
  477. <el-table-column prop="sendState" :label="$t('faFangZhuangTai')" width="80" v-if="permissions.costExpenseRelease">
  478. <template slot-scope="scope">
  479. <span :style="`color: ${scope.row.sendState == 0 ? '#FFA500' : ''}`">{{ scope.row.sendState == 1 ? $t('yiFaFang') :
  480. '未发放' }}</span>
  481. </template>
  482. </el-table-column>
  483. <el-table-column prop="payWayName" :label="$t('zhiFuFangShi')" width="80" v-if="permissions.costExpenseRelease">
  484. </el-table-column>
  485. <el-table-column fixed="right" :label="$t('operation')" :width="isAuditList ? 220 : 160">
  486. <template slot-scope="scope">
  487. <div v-if="!isAuditList">
  488. <el-button icon="el-icon-view" circle size="mini"
  489. @click.stop.native="downloadByA(scope.row)"></el-button>
  490. <el-button icon="el-icon-edit" circle size="mini" style="margin-left:10px;"
  491. @click.stop.native="showEditName(scope.row)"
  492. v-show="(scope.row.status == 1 || scope.row.status == 2 || scope.row.status == 4) && ((user.id == scope.row.ownerId && user.companyId == (4811)) || permissions.costAudit)"></el-button>
  493. <el-button icon="el-icon-delete" circle size="mini" style="margin-left:10px;"
  494. @click.stop.native="deleteItem(scope.row)"
  495. v-show="permissions.costAudit || scope.row.status == 1 || scope.row.status == 2"></el-button>
  496. </div>
  497. <div v-if="isAuditList">
  498. <div v-if="auditTypeItem.auditType == 0 || auditTypeItem.auditType == 2">
  499. <el-button size="mini" @click.stop.native="downloadByA(scope.row)">{{ $t('cha-kan') }}</el-button>
  500. <el-button size="mini" style="margin-left:5px;" @click.stop.native="approve(scope.row)">{{
  501. $t('btn.through') }}</el-button>
  502. <el-button size="mini" style="margin-left:5px;" @click.stop.native="denyReason(scope.row)">{{
  503. $t('btn.rejected') }}</el-button>
  504. </div>
  505. <div v-if="auditTypeItem.auditType == 1">
  506. <el-button size="mini" @click.stop.native="approve(scope.row)">{{ $t('other.audit') }}</el-button>
  507. </div>
  508. </div>
  509. </template>
  510. </el-table-column>
  511. </el-table>
  512. <!--工具条-->
  513. <el-col :span="24" class="toolbar">
  514. <el-pagination key="expenseListTblPager" @size-change="handleSizeChange" @current-change="handleCurrentChange"
  515. :page-sizes="[20, 50, 80, 100]" :page-size="20" :current-page.sync="page"
  516. layout="total, sizes, prev, pager, next" :total="total" style="float:right;"></el-pagination>
  517. </el-col>
  518. </div>
  519. </div>
  520. </div>
  521. <!-- 我的单据报销展示 -->
  522. <el-dialog :title="$t('detailsofReimbursementvoucher')" :visible.sync="dialog" width="1000px">
  523. <!-- 内容主体 -->
  524. <div class="informant"><!-- 报销人 -->
  525. <el-form :model="ParticularsList" label-width="100px">
  526. <el-form-item :label="$t('peopleconcerned')" style="width: 270px"
  527. :rules="{ required: true, message: $t('pleaseselecttheapplicant'), trigger: 'blur' }">
  528. <!-- <el-input v-model="ParticularsList.ownerName"
  529. :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId"
  530. v-if="user.userNameNeedTranslate != '1'"></el-input> -->
  531. <el-input v-model="ParticularsList.ownerName"
  532. :disabled="true"
  533. v-if="user.userNameNeedTranslate != '1'"></el-input>
  534. <!-- <el-select v-model="ParticularsList.ownerId" :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId">
  535. <span v-for="(item, index) in users" :key="index">
  536. <el-option :label="item.name" :value="item.id"></el-option>
  537. </span>
  538. </el-select> -->
  539. <!-- <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'3'"
  540. :subject="users" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId"
  541. :subjectId="ParticularsList.ownerId" ref="selectCat" @selectCal="selectCal"></selectCat> -->
  542. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'3'"
  543. :subject="users" :disabled="true"
  544. :subjectId="ParticularsList.ownerId" ref="selectCat" @selectCal="selectCal"></selectCat>
  545. </el-form-item>
  546. <!-- 第一审核人 -->
  547. <el-form-item :label="$t('di-yi-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId != 4811">
  548. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.firstCheckerId"
  549. :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="ParticularsList.reviewProcess > 0 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
  550. filterable="true">
  551. <span v-for="(item, index) in users" :key="index">
  552. <el-option :label="item.name" :value="item.id"></el-option>
  553. </span>
  554. </el-select>
  555. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'6'"
  556. :subject="users" :subjectId="ParticularsList.firstCheckerId" ref="selectCat" :disabled="ParticularsList.reviewProcess > 0 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
  557. @selectCal="selectCal"></selectCat>
  558. </el-form-item>
  559. <el-form-item :label="$t('di-yi-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId == 4811">
  560. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.firstCheckerId"
  561. :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="user.id != ParticularsList.ownerId"
  562. filterable="true">
  563. <span v-for="(item, index) in users" :key="index">
  564. <el-option :label="item.name" :value="item.id"></el-option>
  565. </span>
  566. </el-select>
  567. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'6'"
  568. :subject="users" :subjectId="ParticularsList.firstCheckerId" ref="selectCat" :disabled="user.id != ParticularsList.ownerId"
  569. @selectCal="selectCal"></selectCat>
  570. </el-form-item>
  571. <!-- 第二审核人 -->
  572. <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId != 4811">
  573. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.secondCheckerId"
  574. :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="ParticularsList.reviewProcess > 1 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
  575. filterable="true">
  576. <span v-for="(item, index) in users" :key="index">
  577. <el-option :label="item.name" :value="item.id"></el-option>
  578. </span>
  579. </el-select>
  580. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'7'"
  581. :subject="users" :subjectId="ParticularsList.secondCheckerId" ref="selectCat" :disabled="ParticularsList.reviewProcess > 1 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
  582. @selectCal="selectCal"></selectCat>
  583. </el-form-item>
  584. <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId == 4811">
  585. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.secondCheckerId"
  586. :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="user.id != ParticularsList.ownerId"
  587. filterable="true">
  588. <span v-for="(item, index) in users" :key="index">
  589. <el-option :label="item.name" :value="item.id"></el-option>
  590. </span>
  591. </el-select>
  592. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'7'"
  593. :subject="users" :subjectId="ParticularsList.secondCheckerId" ref="selectCat" :disabled="user.id != ParticularsList.ownerId"
  594. @selectCal="selectCal"></selectCat>
  595. </el-form-item>
  596. <el-form-item label="设备归属人" v-if="ParticularsList.type == 14454">
  597. <el-select v-model="ParticularsList.equipmentOwnerId"
  598. placeholder="请选择设备归属人" style="width: 150px"
  599. filterable="true" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
  600. <span v-for="(item, index) in equipmentOwnerList" :key="index">
  601. <el-option :label="item.equipmentOwner" :value="item.id"></el-option>
  602. </span>
  603. </el-select>
  604. </el-form-item>
  605. <el-form-item :label="$t('fillinthedate')">
  606. <!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
  607. <el-date-picker type="date" :disabled="flg || (ParticularsList.type == 14454 && user.companyId == 4811)" :placeholder="$t('optiondate')"
  608. v-model="ParticularsList.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  609. </el-form-item>
  610. <el-form-item :label="$t('invoicenumber')" v-if="user.companyId == 4811 && ParticularsList.type != 14454">
  611. <el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
  612. </el-form-item>
  613. <el-form-item :label="$t('costtype')" style="width: 270px">
  614. <template v-if="user.companyId == 4811 && ParticularsList.type == 14454">
  615. 机械费用
  616. </template>
  617. <template v-else>
  618. <el-select size="small" v-model="ParticularsList.type" style="width: 150px" :disabled="flg || (ParticularsList.type == 14454 && user.companyId == 4811)">
  619. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name" :value="item.id"></el-option>
  620. </el-select>
  621. </template>
  622. </el-form-item>
  623. <el-form-item :label="$t('bei-zhu')" style="width: 280px">
  624. <el-input v-model="ParticularsList.remark" :disabled="flg" maxlength="100"></el-input>
  625. </el-form-item>
  626. <el-form-item :label="$t('totalcostos')">
  627. ¥{{ ParticularsList.totalAmount | numberToCurrency }}&nbsp;&nbsp;{{ $t('yuan') }}
  628. </el-form-item>
  629. </el-form>
  630. <div style="height:0;position:relative;" v-if="!flg">
  631. <span class="newInvoice" @click="addNewInvoice"> <i class="el-icon-circle-plus-outline"></i> {{ $t('newinvoice')
  632. }}</span>
  633. </div>
  634. <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
  635. <el-table-column prop="status" :label="$t('other.approvalStatus')" width="172" v-if="auditTypeItem.auditType == 1">
  636. <template slot-scope="scope">
  637. <span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
  638. <span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
  639. <span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
  640. </template>
  641. </el-table-column>
  642. <el-table-column v-if="auditTypeItem.auditType == 1" width="172" :label="$t('other.reviewer')">
  643. <template slot-scope="scope">
  644. <span v-if="user.userNameNeedTranslate == 1">
  645. <TranslationOpenDataText type='userName' :openid='scope.row.projectManagerName'></TranslationOpenDataText>
  646. </span>
  647. <span v-else>{{ scope.row.projectManagerName }}</span>
  648. </template>
  649. </el-table-column>
  650. <el-table-column prop="projectId" :label="$t('other.project')" width="155">
  651. <template slot-scope="scope">
  652. <el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')"
  653. style="width: 130px" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
  654. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode"
  655. :value="item.id" @click="ok(item)">
  656. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  657. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  658. </el-option>
  659. </el-select>
  660. <div v-else>
  661. <span>{{ scope.row.projectName }}</span>
  662. </div>
  663. </template>
  664. </el-table-column>
  665. <el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
  666. <template slot-scope="scope">
  667. <el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px"
  668. value-format="yyyy-MM-dd" :placeholder="$t('optiondate')" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
  669. </el-date-picker>
  670. <span v-else>{{ scope.row.happenDate }}</span>
  671. </template>
  672. </el-table-column>
  673. <el-table-column prop="invoiceType" :label="$t('invoices')" width="172"
  674. v-if="this.user.timeType.easyExpense == 0">
  675. <template slot-scope="scope">
  676. <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType"
  677. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px;">
  678. <el-option :label="$t('vATspecialinvoice')" :value="0"></el-option>
  679. <el-option :label="$t('vATgeneralinvoice')" :value="1"></el-option>
  680. </el-select>
  681. <span v-else>{{ typeInvoic[scope.row.invoiceType] }}</span>
  682. </template>
  683. </el-table-column>
  684. <el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
  685. <template slot-scope="scope">
  686. <el-select v-if="!flg" size="small" v-model="scope.row.expenseType"
  687. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
  688. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
  689. :value="item.typeName"></el-option>
  690. </el-select>
  691. <span v-else>{{ scope.row.expenseType }}</span>
  692. </template>
  693. </el-table-column>
  694. <el-table-column prop="amount" :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'"
  695. width="172">
  696. <template slot-scope="scope">
  697. <el-input size="small" v-if="!flg" :id="'am' + scope.$index" v-model="scope.row.amount"
  698. @input="zhiNum(scope.$index, scope)" @change="kan"
  699. @keyup.native="restrictNumber('am' + scope.$index)" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
  700. <span v-else>¥{{ scope.row.amount }}</span>
  701. </template>
  702. </el-table-column>
  703. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="172"
  704. v-if="this.user.timeType.easyExpense == 0">
  705. <template slot-scope="scope">
  706. <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
  707. <span v-else>{{ scope.row.invoiceNo }}</span>
  708. </template>
  709. </el-table-column>
  710. <el-table-column prop="taxPercent" :label="$t('shui-shuai')" width="172"
  711. v-if="this.user.timeType.easyExpense == 0">
  712. <template slot-scope="scope">
  713. <el-input size="small" v-if="!flg" v-model="scope.row.taxPercent"
  714. @input="zhiNum(scope.$index, scope)"></el-input>
  715. <span v-else>{{ scope.row.taxPercent }}</span>
  716. </template>
  717. </el-table-column>
  718. <el-table-column prop="taxValue" :label="$t('taxs') + '(' + $t('yuan') + ')'" width="172"
  719. v-if="this.user.timeType.easyExpense == 0">
  720. <template slot-scope="scope">
  721. <el-input size="small" v-if="!flg" v-model="scope.row.taxValue" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
  722. <span v-else>¥{{ scope.row.taxValue }}</span>
  723. </template>
  724. </el-table-column>
  725. <el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
  726. <template slot-scope="scope">
  727. <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
  728. <span v-else>{{ scope.row.remark }}</span>
  729. </template>
  730. </el-table-column>
  731. <el-table-column prop="pic" :label="$t('expensereimbursementvoucher')" width="300">
  732. <template slot-scope="scope">
  733. <!-- <div v-if="!flg">
  734. <div @click="abl(scope.$index)" style="height: 35px;overflow: hidden;">
  735. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :file-list="scope.row.pic"
  736. :before-remove="beforeRemoves" :http-request="fileonLoads" limit="1" name="multipartFile">
  737. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  738. </el-upload>
  739. </div>
  740. </div>
  741. <div v-else>
  742. <span v-if="scope.row.pic">
  743. <div class="tups">
  744. <viewer :images="scope.row.pic">
  745. <img ref="imgsa" v-for="src in scope.row.pic" :src="src.url" :key="src.title">
  746. </viewer>
  747. </div>
  748. </span>
  749. <span v-else>{{ $t('nodocuments') }}</span>
  750. </div> -->
  751. <div>
  752. <div v-if="scope.row.pic && scope.row.pic.length > 0">
  753. <el-button size="small" @click="viewDetailsImage(scope.$index, 'ParticularsList', 'invoiceList')">{{ $t('Checkthedetails') }}</el-button>
  754. </div>
  755. <div v-else>
  756. <el-button type="primary" size="small" @click="performCustomization(scope.$index, 2)" :loading="listLoading">{{ $t('clickupload') }}</el-button>
  757. </div>
  758. </div>
  759. </template>
  760. </el-table-column>
  761. <!-- 删除 -->
  762. <el-table-column fixed="right" :label="$t('operation')" v-if="!flg">
  763. <template slot-scope="scope">
  764. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px"
  765. @click="delec(scope.$index)">{{ $t('btn.delete') }}</el-button>
  766. </template>
  767. </el-table-column>
  768. <el-table-column prop="status" :label="$t('other.audit')" width="172" v-if="auditTypeItem.auditType == 1 && showSingleAudit"
  769. fixed="right">
  770. <template slot-scope="scope">
  771. <el-button v-if="scope.row.isIncharger && scope.row.status == 1"
  772. @click="approveSingle(scope.row)">{{ $t('btn.through') }}</el-button><el-button
  773. v-if="scope.row.isIncharger && scope.row.status == 1" @click="denySingle(scope.row)">{{ $t('btn.rejected') }}</el-button>
  774. </template>
  775. </el-table-column>
  776. </el-table>
  777. </div>
  778. <!-- <viewer :images="imgs">
  779. <img ref="imgsa" v-for="src in imgs" :src="src.url" :key="src.title">
  780. </viewer> -->
  781. <!-- 取消和确定 -->
  782. <span slot="footer" class="dialog-footer">
  783. <!-- <el-button @click="print()">打印</el-button> -->
  784. <el-button @click="dialog = false">{{ $t('btn.cancel') }}</el-button>
  785. <el-button v-if="!flg" type="primary" @click="present()">{{ $t('btn.determine') }}</el-button>
  786. <el-button v-else type="primary" @click="dialog = false">{{ $t('btn.determine') }}</el-button>
  787. </span>
  788. </el-dialog>
  789. <!-- 批量上传 -->
  790. <el-dialog :title="$t('batchupload')" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth"
  791. width="500px">
  792. <p>1. {{ $t('other.download') }}
  793. <span>{{ $t('expensereimbursementimporttemplate') }}</span>
  794. <el-link type="primary" style="margin-left:5px;" :underline="false"
  795. :href="'./upload/' + $t('expensereimbursementimporttemplate') + '.xlsx'"
  796. :download="$t('expensereimbursementimporttemplate') + '.xlsx'">{{ $t('expensereimbursementimporttemplate')
  797. }}.xlsx</el-link>
  798. </p>
  799. <p>2. {{ $t('exceltemplateanduploadit') }}。</p>
  800. <div style="padding-bottom:1em;">
  801. <div style="width:300px;margin:0 auto">
  802. <el-upload ref="upload" action="#" :auto-upload="false" multiple :on-change="fileListAdd"
  803. :on-remove="fileListDel">
  804. <el-button slot="trigger" size="small" type="primary" style="">{{ $t('selecthefile') }}</el-button>
  805. <el-button type="primary" size="small" style="margin-left:30px" :underline="false" :loading="importingData"
  806. @click="submitUploadSure" :disabled="fileList.length == 0">{{ $t('toupload') }}</el-button>
  807. <el-button size="small" style="margin-left:30px" @click="fileListClear">{{ $t('clears') }}</el-button>
  808. </el-upload>
  809. </div>
  810. </div>
  811. </el-dialog>
  812. <!-- 主费用类型自定义 -->
  813. <el-dialog :title="$t('feiYongLeiXingDaLeiGuanLi')" v-if="expenseTypeDialog" :visible.sync="expenseTypeDialog" customClass="customWidth"
  814. width="600px">
  815. <el-table :data="expenseMainTypes" style="width:100%" height="400" :loading="expenseTypeListLoading">
  816. <el-table-column :label="$t('typename ')" min-width="150">
  817. <template slot-scope="scope">
  818. <span>{{ scope.row.name }}</span>
  819. </template>
  820. </el-table-column>
  821. <el-table-column :label="$t('duiYingChengBenXiang')" min-width="150">
  822. <template slot-scope="scope">
  823. <span>{{ scope.row.basecostSettingName }}</span>
  824. </template>
  825. </el-table-column>
  826. <el-table-column :label="$t('operation')" width="150">
  827. <template slot-scope="scope">
  828. <el-button @click="expenseTypeEditOp(scope.row)" size="small" type="primary">{{ $t('bian-ji') }}</el-button>
  829. <el-button @click="expenseTypeEditDelete(scope.row)" size="small" type="danger">{{ $t('btn.delete')
  830. }}</el-button>
  831. </template>
  832. </el-table-column>
  833. </el-table>
  834. <span slot="footer" class="dialog-footer">
  835. <el-button @click="expenseTypeDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  836. <el-button type="primary" @click="expenseTypeEditOp()" size="medium">{{ $t('newtype') }}</el-button>
  837. </span>
  838. <!-- 新增/编辑费用类型 -->
  839. <el-dialog :title="$t('addeditfeetypes')" v-if="expenseTypeEditDialog" :visible.sync="expenseTypeEditDialog"
  840. customClass="customWidth" width="400px" append-to-body>
  841. <el-form label-width="100px" :rules="editExpenseTypeDataRules" ref="editExpenseTypeDataForm"
  842. :model="editExpenseTypeData">
  843. <el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
  844. <el-input id="editExpenseTypeDataInput" size="medium" v-model="editExpenseTypeData.name"
  845. :placeholder="$t('customizethfeetypename')" style="width:90%"
  846. @keyup.native="editExpenseTypeDataInput('editExpenseTypeDataInput')"></el-input>
  847. </el-form-item>
  848. <el-form-item :label="$t('duiYingChengBenXiang')" style="margin:30px 0" prop="basecostSettingId">
  849. <el-select v-model="editExpenseTypeData.basecostSettingId" size="medium" style="width:90%" clearable>
  850. <el-option v-for="item in basecostSettingList" :key="item.id" :label="item.name" :value="item.id"
  851. :disabled="item.alarmType == 1"></el-option>
  852. </el-select>
  853. </el-form-item>
  854. </el-form>
  855. <span slot="footer" class="dialog-footer">
  856. <el-button @click="expenseTypeEditDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  857. <el-button type="primary" @click="expenseTypeEditSure" size="medium">{{ $t('btn.determine') }}</el-button>
  858. </span>
  859. </el-dialog>
  860. </el-dialog>
  861. <!-- 费用类型自定义 -->
  862. <el-dialog :title="$t('expensetypemanagement')" v-if="customTypeDialog" :visible.sync="customTypeDialog"
  863. customClass="customWidth" width="600px">
  864. <el-table :data="customTypeList" style="width:100%" height="400" :loading="customTypeListLoading">
  865. <el-table-column prop="typeName" :label="$t('costofname')" min-width="150"></el-table-column>
  866. <el-table-column :label="$t('costtype')" min-width="150">
  867. <template slot-scope="scope">
  868. <span>{{ scope.row.expenseMainTypeName }}</span>
  869. </template>
  870. </el-table-column>
  871. <el-table-column :label="$t('operation')" width="150">
  872. <template slot-scope="scope">
  873. <el-button @click="customTypeEditOp(scope.row)" size="small" type="primary">{{ $t('bian-ji') }}</el-button>
  874. <el-button @click="customTypeEditDelete(scope.row)" size="small" type="danger">{{ $t('btn.delete')
  875. }}</el-button>
  876. </template>
  877. </el-table-column>
  878. </el-table>
  879. <span slot="footer" class="dialog-footer">
  880. <el-button @click="customTypeDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  881. <el-button type="primary" @click="customTypeEditOp()" size="medium">{{ $t('newtype') }}</el-button>
  882. </span>
  883. <!-- 新增/编辑费用类型 -->
  884. <el-dialog :title="$t('addeditfeetypes')" v-if="customTypeEditDialog" :visible.sync="customTypeEditDialog"
  885. customClass="customWidth" width="400px" append-to-body>
  886. <el-form label-width="80px" :rules="editTypeDataRules" ref="editTypeDataForm" :model="editTypeData">
  887. <el-form-item :label="$t('belongstype')" style="margin:30px 0">
  888. <el-select v-model="editTypeData.mainType" size="medium" style="width:90%">
  889. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name" :value="item.id"></el-option>
  890. </el-select>
  891. </el-form-item>
  892. <el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
  893. <el-input id="editTypeDataInput" size="medium" v-model="editTypeData.typeName"
  894. :placeholder="$t('customizethfeetypename')" style="width:90%"
  895. @keyup.native="editTypeDataInput('editTypeDataInput')"></el-input>
  896. </el-form-item>
  897. </el-form>
  898. <span slot="footer" class="dialog-footer">
  899. <el-button @click="customTypeEditDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  900. <el-button type="primary" @click="customTypeEditSure" size="medium">{{ $t('btn.determine') }}</el-button>
  901. </span>
  902. </el-dialog>
  903. </el-dialog>
  904. <!-- 驳回弹出框 -->
  905. <el-dialog :title="$t('defaultText.pleaseEnterTheReason')" v-if="denyReasonDialog" :visible.sync="denyReasonDialog"
  906. :close-on-click-modal="false" customClass="customWidth" width="500px">
  907. <div>
  908. <el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('reasonforyourdecisiontoreject')" />
  909. </div>
  910. <div slot="footer" class="dialog-footer">
  911. <el-button @click="denyReasonDialog = false">{{ $t('btn.cancel') }}</el-button>
  912. <el-button type="primary" @click="deny()">{{ $t('btn.determine') }}</el-button>
  913. </div>
  914. </el-dialog>
  915. <!-- 详情查看弹出框 -->
  916. <el-dialog :title="$t('detailsofReimbursementvoucher')" :visible.sync="detailDialog" width="1100px" :before-close="handleClose">
  917. <div ref="printContent" class="printContent">
  918. <div class="printContent-detail">
  919. <div class="detail-item">
  920. <span class="detail-item-title"> <span class="printBox">{{ $t('peopleconcerned') }}</span> </span>
  921. <span class="detail-item-content">
  922. <span v-if="user.userNameNeedTranslate == 1">
  923. <TranslationOpenDataText type='userName' :openid='ParticularsList.ownerName'></TranslationOpenDataText>
  924. </span>
  925. <span v-else>{{ ParticularsList.ownerName }}</span>
  926. </span>
  927. </div>
  928. <div class="detail-item">
  929. <span class="detail-item-title"><span class="printBox">{{ $t('tianBaoShiJian') }}</span></span>
  930. <span class="detail-item-content">{{ ParticularsList.createDate }}</span>
  931. </div>
  932. <div class="detail-item" v-if="ParticularsList.type != 14454">
  933. <span class="detail-item-title"><span class="printBox">{{ $t('invoicenumber') }}</span></span>
  934. <span class="detail-item-content">{{ ParticularsList.ticketNum }} {{ $t('zhang') }}</span>
  935. </div>
  936. <div class="detail-item">
  937. <span class="detail-item-title"><span class="printBox">{{ $t('feiYongLeiXing') }}</span></span>
  938. <span class="detail-item-content">{{ detaExpenseMainTypeName }}</span>
  939. </div>
  940. <div class="detail-item" v-if="ParticularsList.type == 14454">
  941. <span class="detail-item-title"><span class="printBox">设备归属人</span></span>
  942. <span class="detail-item-content">{{ ParticularsList.equipmentOwnerName }}</span>
  943. </div>
  944. <div class="detail-item">
  945. <span class="detail-item-title"><span class="printBox">{{ $t('totalcostos') }}</span></span>
  946. <span class="detail-item-content">¥ {{ ParticularsList.totalAmount | numberToCurrency }}</span>
  947. </div>
  948. <div class="detail-item" style="width: 100%">
  949. <span class="detail-item-title"><span class="printBox">{{ $t('bei-zhu') }}</span></span>
  950. <span class="detail-item-content">{{ ParticularsList.remark }}</span>
  951. </div>
  952. </div>
  953. <!-- <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
  954. <el-table-column prop="projectId" :label="$t('other.project')" width="155">
  955. <el-table-column prop="status" label="审核状态" width="172" v-if="auditTypeItem.auditType == 1">
  956. <template slot-scope="scope">
  957. <span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
  958. <span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
  959. <span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
  960. </template>
  961. </el-table-column>
  962. <template slot-scope="scope">
  963. <el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')"
  964. style="width: 130px">
  965. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode"
  966. :value="item.id" @click="ok(item)">
  967. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  968. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  969. </el-option>
  970. </el-select>
  971. <div v-else>
  972. <div v-for="(item, index) in projectIdName" :key="index">
  973. <span v-if="item.id == scope.row.projectId">{{ item.projectName }}</span>
  974. </div>
  975. </div>
  976. </template>
  977. </el-table-column>
  978. <el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
  979. <template slot-scope="scope">
  980. <el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px"
  981. value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
  982. </el-date-picker>
  983. <span v-else>{{ scope.row.happenDate }}</span>
  984. </template>
  985. </el-table-column>
  986. <el-table-column prop="invoiceType" :label="$t('invoices')" width="172"
  987. v-if="this.user.timeType.easyExpense == 0">
  988. <template slot-scope="scope">
  989. <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType"
  990. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px;">
  991. <el-option :label="$t('vATspecialinvoice')" :value="0"></el-option>
  992. <el-option :label="$t('vATgeneralinvoice')" :value="1"></el-option>
  993. </el-select>
  994. <span v-else>{{ typeInvoic[scope.row.invoiceType] }}</span>
  995. </template>
  996. </el-table-column>
  997. <el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
  998. <template slot-scope="scope">
  999. <el-select v-if="!flg" size="small" v-model="scope.row.expenseType"
  1000. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px">
  1001. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
  1002. :value="item.typeName"></el-option>
  1003. </el-select>
  1004. <span v-else>{{ scope.row.expenseType }}</span>
  1005. </template>
  1006. </el-table-column>
  1007. <el-table-column prop="amount" :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'"
  1008. width="172">
  1009. <template slot-scope="scope">
  1010. <el-input size="small" v-if="!flg" :id="'am' + scope.$index" v-model="scope.row.amount"
  1011. @input="zhiNum(scope.$index, scope)" @change="kan"
  1012. @keyup.native="restrictNumber('am' + scope.$index)"></el-input>
  1013. <span v-else>¥{{ scope.row.amount }}</span>
  1014. </template>
  1015. </el-table-column>
  1016. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="172"
  1017. v-if="this.user.timeType.easyExpense == 0">
  1018. <template slot-scope="scope">
  1019. <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
  1020. <span v-else>{{ scope.row.invoiceNo }}</span>
  1021. </template>
  1022. </el-table-column>
  1023. <el-table-column prop="taxPercent" :label="$t('shui-shuai')" width="172"
  1024. v-if="this.user.timeType.easyExpense == 0">
  1025. <template slot-scope="scope">
  1026. <el-input size="small" v-if="!flg" v-model="scope.row.taxPercent"
  1027. @input="zhiNum(scope.$index, scope)"></el-input>
  1028. <span v-else>{{ scope.row.taxPercent }}</span>
  1029. </template>
  1030. </el-table-column>
  1031. <el-table-column prop="taxValue" :label="$t('taxs') + '(' + $t('yuan') + ')'" width="172"
  1032. v-if="this.user.timeType.easyExpense == 0">
  1033. <template slot-scope="scope">
  1034. <el-input size="small" v-if="!flg" v-model="scope.row.taxValue"></el-input>
  1035. <span v-else>¥{{ scope.row.taxValue }}</span>
  1036. </template>
  1037. </el-table-column>
  1038. <el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
  1039. <template slot-scope="scope">
  1040. <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100"></el-input>
  1041. <span v-else>{{ scope.row.remark }}</span>
  1042. </template>
  1043. </el-table-column>
  1044. <el-table-column prop="pic" :label="$t('expensereimbursementvoucher')" width="300">
  1045. <template slot-scope="scope">
  1046. <div v-if="!flg">
  1047. <div @click="abl(scope.$index)" style="height: 35px;overflow: hidden;">
  1048. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :file-list="scope.row.pic"
  1049. :before-remove="beforeRemoves" :http-request="fileonLoads" limit="1" name="multipartFile">
  1050. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  1051. </el-upload>
  1052. </div>
  1053. </div>
  1054. <div v-else>
  1055. <span v-if="scope.row.pic">
  1056. <div class="tups">
  1057. <viewer :images="scope.row.pic">
  1058. <img ref="imgsa" v-for="src in scope.row.pic" :src="src.url" :key="src.title">
  1059. </viewer>
  1060. </div>
  1061. </span>
  1062. <span v-else>{{ $t('nodocuments') }}</span>
  1063. </div>
  1064. </template>
  1065. </el-table-column>
  1066. <el-table-column fixed="right" :label="$t('operation')" v-if="!flg">
  1067. <template slot-scope="scope">
  1068. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px"
  1069. @click="delec(scope.$index)">{{ $t('btn.delete') }}</el-button>
  1070. </template>
  1071. </el-table-column>
  1072. </el-table> -->
  1073. <!-- 卡片列表 -->
  1074. <div class="conter-box">
  1075. <div class="conter-border" v-for="item, index in ParticularsList.invoiceList" :key="index">
  1076. <div class="detail-item" v-if="auditTypeItem.auditType != 1">
  1077. <span class="detail-item-title"> <span class="printBox">{{ $t('other.project') }}</span> </span>
  1078. <span class="detail-item-content">
  1079. {{ item.projectName }}
  1080. <!-- <el-select size="small" v-if="!flg" v-model="item.projectId" :placeholder="$t('other.project')"
  1081. style="width: 130px">
  1082. <el-option v-for="(item, index) in projectList" :key="index"
  1083. :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
  1084. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  1085. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  1086. </el-option>
  1087. </el-select>
  1088. <div v-else>
  1089. <div v-for="(item, index) in projectIdName" :key="index">
  1090. <span v-if="item.id == item.projectId">{{ item.projectName }}</span>
  1091. </div>
  1092. </div> -->
  1093. </span>
  1094. </div>
  1095. <div class="detail-item" v-if="auditTypeItem.auditType == 1">
  1096. <span class="detail-item-title"> <span class="printBox">{{ $t('xiangMuShenHeZhuangTai') }}</span> </span>
  1097. <span class="detail-item-content">
  1098. <span v-if="item.status == 1" class="waiting">{{ statusTxt[item.status] }}</span>
  1099. <span v-if="item.status == 2" class="rejected">{{ statusTxt[item.status] }}</span>
  1100. <span v-if="item.status == 0 || item.status == 3">{{ statusTxt[item.status] }}</span>
  1101. </span>
  1102. </div>
  1103. <div class="detail-item">
  1104. <span class="detail-item-title"> <span class="printBox">{{ $t('forthedate') }}</span> </span>
  1105. <span class="detail-item-content">{{ item.happenDate }}</span>
  1106. </div>
  1107. <div class="detail-item">
  1108. <span class="detail-item-title"> <span class="printBox">{{ $t('invoices') }}</span> </span>
  1109. <span class="detail-item-content">{{ typeInvoic[item.invoiceType] }}</span>
  1110. </div>
  1111. <div class="detail-item">
  1112. <span class="detail-item-title"> <span class="printBox">{{ $t('costtype') }}</span> </span>
  1113. <span class="detail-item-content">{{ item.expenseType }}</span>
  1114. </div>
  1115. <div class="detail-item">
  1116. <span class="detail-item-title single"> <span class="printBox">{{ $t('feiYongJineHanShui') }}</span> </span>
  1117. <span class="detail-item-content">{{ item.amount }}</span>
  1118. </div>
  1119. <div class="detail-item">
  1120. <span class="detail-item-title"> <span class="printBox">{{ $t('invoiceno') }}</span> </span>
  1121. <span class="detail-item-content">{{ item.invoiceNo }}</span>
  1122. </div>
  1123. <div class="detail-item">
  1124. <span class="detail-item-title"> <span class="printBox">{{ $t('shui-shuai') }}</span> </span>
  1125. <span class="detail-item-content">{{ item.taxValue }}</span>
  1126. </div>
  1127. <div class="detail-item">
  1128. <span class="detail-item-title"> <span class="printBox">{{ $t('taxs') }}</span> </span>
  1129. <span class="detail-item-content">{{ item.taxValue ? `¥${item.taxValue}` : '' }}</span>
  1130. </div>
  1131. <div class="detail-item">
  1132. <span class="detail-item-title"> <span class="printBox">{{ $t('bei-zhu') }}</span> </span>
  1133. <span class="detail-item-content">{{ item.remark }}</span>
  1134. </div>
  1135. <div class="detail-item" style="display: flex">
  1136. <span class="detail-item-title"> <span class="printBox">{{ $t('expensereimbursementvoucher') }}</span> </span>
  1137. <div class="detail-item-content">
  1138. <div v-if="item.pic" style="display: inline-block;">
  1139. <div class="tups">
  1140. <!-- <viewer :images="item.pic">
  1141. <img ref="imgsa" v-for="src in item.pic" :src="src.url" :key="src.title">
  1142. </viewer> -->
  1143. <viewer :images="item.pic">
  1144. <template v-for="src,i in item.pic" :id="src.url">
  1145. <img ref="imgsa" :src="src.url" v-if="isFileType(src.url) == 'image'">
  1146. <img :src="pdfIcons" v-if="isFileType(src.url) == 'pdf'" @click.stop="openViewPdf(src.url)">
  1147. </template>
  1148. </viewer>
  1149. </div>
  1150. </div>
  1151. </div>
  1152. </div>
  1153. </div>
  1154. </div>
  1155. </div>
  1156. <span slot="footer" class="dialog-footer">
  1157. <el-button @click="print()">{{ $t('daYin') }}</el-button>
  1158. <el-button @click="detailDialog = false">{{ $t('guanBi') }}</el-button>
  1159. </span>
  1160. </el-dialog>
  1161. <!-- 自定义图片上传 -->
  1162. <div class="customIamgeLoad">
  1163. <input id="uploadInput" ref="uploadInput" type="file" class="file" @change="fileMultLoad" multiple accept="image/jpg,image/png,application/pdf" />
  1164. </div>
  1165. <!-- 发放支付方式 -->
  1166. <el-dialog :title="$t('faFangFangShi')" :visible.sync="dialogVisibleRelease" width="400px" :before-close="handleClose">
  1167. <div>
  1168. <el-select v-model="releaseData.id" :placeholder="$t('qingXuanZeZhiFuFangShi')" style="width: 100%" clearable>
  1169. <el-option v-for="item in sendStateList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1170. </el-select>
  1171. </div>
  1172. <span slot="footer" class="dialog-footer">
  1173. <el-button @click="dialogVisibleRelease = false">{{ $t('quXiao') }}</el-button>
  1174. <el-button type="primary" @click="callingInterface(1, releaseData.data)">{{ $t('queDing') }}</el-button>
  1175. </span>
  1176. </el-dialog>
  1177. <!-- 设备归属人管理 -->
  1178. <el-dialog title="设备归属人管理" :visible.sync="equipmentOwnerVisable" width="600" :before-close="handleClose">
  1179. <el-table :data="equipmentOwnerList" style="width: 100%" height="40vh">
  1180. <el-table-column label="序号" width="180">
  1181. <template slot-scope="scope">
  1182. {{ scope.$index + 1 }}
  1183. </template>
  1184. </el-table-column>
  1185. <el-table-column prop="equipmentOwner" label="姓名"></el-table-column>
  1186. <el-table-column label="操作" width="240">
  1187. <template slot-scope="scope">
  1188. <el-button type="primary" size="small" @click="updateOwner(scope.row)">编辑</el-button>
  1189. <el-button type="danger" size="small" @click="deleteOwner(scope.row)">删除</el-button>
  1190. </template>
  1191. </el-table-column>
  1192. </el-table>
  1193. <span slot="footer" class="dialog-footer">
  1194. <el-button @click="equipmentOwnerVisable = false">取 消</el-button>
  1195. <el-button type="primary" @click="updateOwner()">新增归属人</el-button>
  1196. </span>
  1197. </el-dialog>
  1198. <el-dialog :title="`${equipmentOwnerValue.id ? '编辑' : '新增'}归属人`" :visible.sync="equipmentOwnertextVisable" width="600" :before-close="handleClose">
  1199. <el-input v-model.trim="equipmentOwnerValue.equipmentOwner" placeholder="请输入归属人名称" clearable></el-input>
  1200. <span slot="footer" class="dialog-footer">
  1201. <el-button @click="equipmentOwnertextVisable = false">取 消</el-button>
  1202. <el-button type="primary" @click="addEditorOwner()" :disabled="!equipmentOwnerValue.equipmentOwner">确 定</el-button>
  1203. </span>
  1204. </el-dialog>
  1205. </section>
  1206. </template>
  1207. <script>
  1208. // 自定义select组件
  1209. import selectCat from "@/components/select.vue"
  1210. // 引入自定义级联组件
  1211. import vueCascader from "@/components/cascader.vue"
  1212. import { getThemeColor } from '@/utils/commonMethod.js'
  1213. export default {
  1214. name: "expense",
  1215. components: {
  1216. selectCat,
  1217. vueCascader
  1218. },
  1219. props: {},
  1220. data() {
  1221. return {
  1222. themeColor: getThemeColor(),
  1223. pdfIcons: require('@/assets/image/pdfIcon.png'),
  1224. showSingleAudit: false,
  1225. auditTypeItem: { auditType: 0 },
  1226. queryExpenseMainType: null,
  1227. denyReasonDialog: false,
  1228. denyForm: {
  1229. reason: '',
  1230. id: null
  1231. },
  1232. copyUsers: [],
  1233. basecostSettingList: [],
  1234. exportingData:false,
  1235. fileList: [],
  1236. muHeight: document.documentElement.clientHeight || document.body.clientHeight,
  1237. xiamianWidth: document.documentElement.clientWidth || document.body.clientWidth,
  1238. imgs: [],
  1239. addFormRules: {
  1240. ownerId: [{ required: true, message: this.$t('pleaseselecttheapplicant'), trigger: "blur" }],
  1241. createDate: [{ required: true, message: this.$t('pleaseselectadate'), trigger: "blur" }],
  1242. },
  1243. isAuditList: false,
  1244. statusTxt: [this.$t('state.approved'), this.$t('state.WaitingAudit'), this.$t('state.rejected'), this.$t('state.undone'), '未填写'],
  1245. user: JSON.parse(sessionStorage.getItem("user")),
  1246. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  1247. allExpList: [],
  1248. expenseTypeList: [],
  1249. tian: { a: null, b: null, c: null, d: null, e: null, f: null, g: null, h: null, },
  1250. typeInvoic: [this.$t('vATspecialinvoice'), this.$t('vATgeneralinvoice')],
  1251. listLoading: false,
  1252. tableHeight: 0,
  1253. list: [],
  1254. total: 0,
  1255. code: null,
  1256. date: null,
  1257. type: null,
  1258. ownerId: null,
  1259. users: [], // 人员信息
  1260. usersNoInfo: [], // 人员信息,去掉自己
  1261. displayTable: false,
  1262. getLists: [],
  1263. ProjectList: [], // 项目列表
  1264. companyId: [], // 人员的id
  1265. dialogVisible: false,
  1266. code: null,
  1267. addForm: { code: null, ownerId: null, createDate: null, ticketNum: 1, type: 0, remark: null, totalAmount: 0, },
  1268. page: 1,
  1269. size: 20,
  1270. form: { happenDate: null, invoiceType: null, amount: null, invoiceNo: null, taxPercent: null, taxValue: null, remark: null },
  1271. invoiceList: [],
  1272. kkk: null, //
  1273. ddId: null,
  1274. dldl: [],
  1275. isOK: false,
  1276. z: null,
  1277. value: null,
  1278. dialog: false, // 单据查看展示
  1279. ParticularsList: [],
  1280. projectIdName: [], // 点击查看的项目名
  1281. flg: false, // 是否禁用
  1282. shuz: [this.$t('generalexpenses'), this.$t('travelexpensess'), this.$t('outsourcingcostshouldbereported')],
  1283. ins: 0,
  1284. apl: '',
  1285. diz: 'http://worktime.ttkuaiban.com',
  1286. importDialog: false,
  1287. importingData: false,
  1288. currentClick: '',
  1289. currentClickNum: 0,
  1290. // 费用类型自定义
  1291. customTypeDialog: false,
  1292. customTypeList: [],
  1293. customTypeListLoading: false,
  1294. customTypeEditDialog: false,
  1295. editTypeData: {},
  1296. editTypeDataRules: {
  1297. typeName: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
  1298. },
  1299. expenseMainTypes: [],
  1300. expenseMainTypeValue: '',
  1301. expenseTypeDialog: false,
  1302. expenseTypeListLoading: false,
  1303. expenseTypeEditDialog: false,
  1304. editExpenseTypeData: {},
  1305. editExpenseTypeDataRules: {
  1306. name: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
  1307. },
  1308. // 详情弹出框
  1309. detailDialog: false,
  1310. detaExpenseMainTypeName: '',
  1311. multipleSelection: [],
  1312. sendState: '',
  1313. dialogVisibleImage: false,
  1314. dialogVisibleImageList: [],
  1315. imgLoadType: 1, // 1 为 费用填报的图片上传 2 单据修改的图片上传
  1316. releaseData: {
  1317. id: '',
  1318. data: '',
  1319. }, // 发放数据
  1320. sendStateList: [], // 发放状态列表
  1321. dialogVisibleRelease: false, // 发放弹出框
  1322. selectProject: null, // 项目选择
  1323. equipmentOwnerVisable: false,
  1324. equipmentOwnerList: [],
  1325. equipmentOwnertextVisable: false,
  1326. equipmentOwnerValue: { equipmentOwner: '' }
  1327. };
  1328. },
  1329. computed: {
  1330. totalCost: function () {
  1331. let num = 0
  1332. for (let i in this.invoiceList) {
  1333. if (this.invoiceList[i].amount) {
  1334. num += this.invoiceList[i].amount * 1
  1335. }
  1336. }
  1337. return num
  1338. }
  1339. },
  1340. watch: {},
  1341. created() {
  1342. let height = window.innerHeight;
  1343. this.tableHeight = height - 195;
  1344. const that = this;
  1345. window.onresize = function temp() {
  1346. that.tableHeight = window.innerHeight - 195;
  1347. };
  1348. },
  1349. mounted() {
  1350. this.getNextCode();
  1351. this.getUsers() // 获取人员信息
  1352. this.getList() // 获取单据列表
  1353. this.getProjectList();
  1354. this.getExpensMainTypes();
  1355. this.getExpList();
  1356. this.getBasecostItemList();
  1357. this.getAuditType();
  1358. this.getSendStateList();
  1359. if(this.user.companyId == 4811) {
  1360. this.getEquipmentOwnerList()
  1361. }
  1362. },
  1363. filters: {
  1364. numberToCurrency(value) {
  1365. if (!value) return '0.00'
  1366. // console.log('v=='+value);
  1367. value = value.toFixed(2)
  1368. const intPart = Math.trunc(value)
  1369. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  1370. let floatPart = '.00'
  1371. const valueArray = value.toString().split('.')
  1372. if (valueArray.length === 2) { // 有小数部分
  1373. floatPart = valueArray[1].toString() // 取得小数部分
  1374. return intPartFormat + '.' + floatPart
  1375. }
  1376. return intPartFormat + floatPart
  1377. }
  1378. },
  1379. methods: {
  1380. updateOwner(row) {
  1381. if(!row) {
  1382. this.equipmentOwnerValue = { equipmentOwner: '' }
  1383. } else {
  1384. this.equipmentOwnerValue = { equipmentOwner: row.equipmentOwner, id: row.id }
  1385. }
  1386. this.equipmentOwnertextVisable = true
  1387. },
  1388. equipmentOwner() {
  1389. this.equipmentOwnerVisable = true
  1390. },
  1391. deleteOwner(row) {
  1392. this.$confirm(`此操作将删除【${row.equipmentOwner}】设备归属人, 是否继续?`, '提示', {
  1393. confirmButtonText: '确定',
  1394. cancelButtonText: '取消',
  1395. type: 'warning'
  1396. }).then(() => {
  1397. this.http.post('/equipment-owner/removeEquipmentOwner', {
  1398. id: row.id
  1399. },
  1400. res => {
  1401. if (res.code == 'ok') {
  1402. this.$message({ message: '删除成功', type: 'success' })
  1403. this.getEquipmentOwnerList()
  1404. } else {
  1405. this.$message({ message: res.msg, type: 'error'})
  1406. }
  1407. }, err => {
  1408. this.$message({ message: err, type: 'error' })
  1409. })
  1410. })
  1411. },
  1412. addEditorOwner() {
  1413. this.http.post('/equipment-owner/addOrUpdate', {
  1414. ...this.equipmentOwnerValue
  1415. },
  1416. res => {
  1417. if (res.code == 'ok') {
  1418. this.$message({ message: '添加成功', type: 'success' })
  1419. this.equipmentOwnertextVisable = false
  1420. this.getEquipmentOwnerList()
  1421. } else {
  1422. this.$message({ message: res.msg, type: 'error'})
  1423. }
  1424. }, err => {
  1425. this.$message({ message: err, type: 'error' })
  1426. })
  1427. },
  1428. getEquipmentOwnerList() {
  1429. this.http.post('/equipment-owner/getList', {},
  1430. res => {
  1431. if (res.code == 'ok') {
  1432. this.equipmentOwnerList = res.data || [];
  1433. } else {
  1434. this.$message({ message: res.msg, type: 'error'})
  1435. }
  1436. }, err => {
  1437. this.$message({ message: err, type: 'error' })
  1438. })
  1439. },
  1440. getBasecostItemList() {
  1441. this.http.post('/project-basecost-setting/list', {},
  1442. res => {
  1443. if (res.code == 'ok') {
  1444. this.basecostSettingList = res.data;
  1445. } else {
  1446. this.$message({
  1447. message: res.msg,
  1448. type: 'error'
  1449. })
  1450. }
  1451. }, err => {
  1452. this.$message({
  1453. message: err,
  1454. type: 'error'
  1455. })
  1456. })
  1457. },
  1458. // 费用类型自定义
  1459. customTypeOp() {
  1460. this.customTypeDialog = true
  1461. this.customTypeListLoading = true
  1462. },
  1463. customTypeEditOp(row) {
  1464. this.customTypeEditDialog = true
  1465. if (row) {
  1466. this.editTypeData = row
  1467. } else {
  1468. this.editTypeData = {
  1469. mainType: '',
  1470. typeName: '',
  1471. companyId: this.user.companyId
  1472. }
  1473. }
  1474. },
  1475. customTypeEditSure() {
  1476. this.$refs.editTypeDataForm.validate(valid => {
  1477. if (valid) {
  1478. this.http.post('/expense-type/addOrMod', this.editTypeData,
  1479. res => {
  1480. if (res.code == 'ok') {
  1481. this.customTypeEditDialog = false
  1482. this.customTypeOp()
  1483. this.getExpList()
  1484. } else {
  1485. this.$message({
  1486. message: res.msg,
  1487. type: 'error'
  1488. })
  1489. }
  1490. }, err => {
  1491. this.$message({
  1492. message: err,
  1493. type: 'error'
  1494. })
  1495. })
  1496. }
  1497. })
  1498. },
  1499. customTypeEditDelete(row) {
  1500. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'), this.$t('other.prompts'), {
  1501. confirmButtonText: this.$t('btn.determine'),
  1502. cancelButtonText: this.$t('btn.cancel'),
  1503. type: 'warning'
  1504. }).then(() => {
  1505. this.http.post('/expense-type/delete', {
  1506. id: row.id
  1507. },
  1508. res => {
  1509. if (res.code == 'ok') {
  1510. this.customTypeEditDialog = false
  1511. this.customTypeOp()
  1512. this.getExpList()
  1513. } else {
  1514. this.$message({
  1515. message: res.msg,
  1516. type: 'error'
  1517. })
  1518. }
  1519. }, err => {
  1520. this.$message({
  1521. message: err,
  1522. type: 'error'
  1523. })
  1524. })
  1525. }).catch(() => {
  1526. this.$message({
  1527. type: 'info',
  1528. message: this.$t('thedeletionhasbeencancelled')
  1529. })
  1530. })
  1531. },
  1532. editTypeDataInput(typeName) {
  1533. let inpu = document.getElementById(typeName);
  1534. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  1535. },
  1536. // 费用主类型自定义
  1537. expenseTypeOp() {
  1538. this.expenseTypeDialog = true
  1539. this.customTypeListLoading = true
  1540. },
  1541. expenseTypeEditOp(row) {
  1542. this.expenseTypeEditDialog = true
  1543. if (row) {
  1544. this.editExpenseTypeData = row
  1545. } else {
  1546. this.editExpenseTypeData = {
  1547. isSystem: 0,
  1548. name: '',
  1549. companyId: this.user.companyId
  1550. }
  1551. }
  1552. },
  1553. expenseTypeEditSure() {
  1554. this.$refs.editExpenseTypeDataForm.validate(valid => {
  1555. if (valid) {
  1556. this.http.post('/expense-main-type/addOrMod', this.editExpenseTypeData,
  1557. res => {
  1558. if (res.code == 'ok') {
  1559. this.expenseTypeEditDialog = false
  1560. this.expenseTypeOp()
  1561. this.getExpensMainTypes()
  1562. this.getExpList()
  1563. } else {
  1564. this.$message({
  1565. message: res.msg,
  1566. type: 'error'
  1567. })
  1568. }
  1569. }, err => {
  1570. this.$message({
  1571. message: err,
  1572. type: 'error'
  1573. })
  1574. })
  1575. }
  1576. })
  1577. },
  1578. expenseTypeEditDelete(row) {
  1579. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'), this.$t('other.prompts'), {
  1580. confirmButtonText: this.$t('btn.determine'),
  1581. cancelButtonText: this.$t('btn.cancel'),
  1582. type: 'warning'
  1583. }).then(() => {
  1584. this.http.post('/expense-main-type/delete', {
  1585. id: row.id
  1586. },
  1587. res => {
  1588. if (res.code == 'ok') {
  1589. this.expenseTypeEditDialog = false
  1590. this.expenseTypeOp()
  1591. this.getExpensMainTypes()
  1592. } else {
  1593. this.$message({
  1594. message: res.msg,
  1595. type: 'error'
  1596. })
  1597. }
  1598. }, err => {
  1599. this.$message({
  1600. message: err,
  1601. type: 'error'
  1602. })
  1603. })
  1604. }).catch(() => {
  1605. this.$message({
  1606. type: 'info',
  1607. message: this.$t('thedeletionhasbeencancelled')
  1608. })
  1609. })
  1610. },
  1611. expenseTypeDataInput(typeName) {
  1612. let inpu = document.getElementById(typeName);
  1613. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  1614. },
  1615. editExpenseTypeDataInput(name) {
  1616. let inpu = document.getElementById(name);
  1617. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  1618. },
  1619. submitUpload() {
  1620. this.importDialog = true
  1621. },
  1622. fileListAdd(file, fileList) {
  1623. let str = file.name.split(".");
  1624. let format = str[str.length - 1];
  1625. if (format != "xls" && format != "xlsx") {
  1626. this.$message({
  1627. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  1628. type: "error"
  1629. });
  1630. fileList.splice(fileList.length - 1)
  1631. }
  1632. this.fileList = fileList
  1633. },
  1634. fileListDel(file, fileList) {
  1635. this.fileList = fileList
  1636. },
  1637. fileListClear() {
  1638. this.$refs.upload.clearFiles();
  1639. this.fileList = []
  1640. },
  1641. submitUploadSure() {
  1642. this.$confirm(this.$t('confirmtoupload'), this.$t('other.prompts'), {
  1643. confirmButtonText: this.$t('btn.determine'),
  1644. cancelButtonText: this.$t('btn.cancel'),
  1645. type: 'success'
  1646. }).then(() => {
  1647. let formData = new FormData();
  1648. for (let i in this.fileList) {
  1649. formData.append("files", this.fileList[i].raw);
  1650. }
  1651. this.importingData = true
  1652. // console.log(formData,this.fileList);
  1653. // return
  1654. this.http.uploadFile('/expense-sheet/importData', formData,
  1655. res => {
  1656. if (res.code == "ok") {
  1657. this.importingData = false
  1658. this.$refs.upload.clearFiles();
  1659. this.fileList = []
  1660. this.$message({
  1661. message: this.$t('uploadedsuccessfully'),
  1662. type: "success"
  1663. });
  1664. } else {
  1665. this.importingData = false
  1666. this.$message({
  1667. message: res.msg,
  1668. type: "error"
  1669. });
  1670. }
  1671. }, error => {
  1672. this.importingData = false
  1673. this.$message({
  1674. message: error,
  1675. type: "error"
  1676. });
  1677. });
  1678. }).catch(() => { })
  1679. },
  1680. restrictNumber(targetId) {
  1681. let inpu = document.getElementById(targetId);
  1682. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  1683. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  1684. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g, '').replace('$#*', '.');//去除其他"."
  1685. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  1686. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  1687. inpu.value = parseFloat(inpu.value);
  1688. }
  1689. },
  1690. approveSingle(item) {
  1691. this.http.post('/expense-sheet/approveSingleProject', {
  1692. id: item.id
  1693. },
  1694. res => {
  1695. if (res.code == "ok") {
  1696. this.getList();
  1697. // this.dialog = false;
  1698. this.getParticulars(item.expenseId);
  1699. } else {
  1700. this.$message({
  1701. message: res.msg,
  1702. type: "error"
  1703. });
  1704. }
  1705. },
  1706. error => {
  1707. this.$message({
  1708. message: error,
  1709. type: "error"
  1710. });
  1711. });
  1712. },
  1713. approve(item) {
  1714. if (this.auditTypeItem.auditType == 0 || this.auditTypeItem.auditType == 2) {
  1715. //默认模式,按有审核权限的人直接审核
  1716. this.showSingleAudit = false;
  1717. //审核通过
  1718. this.http.post('/expense-sheet/approve', {
  1719. id: item.id
  1720. },
  1721. res => {
  1722. if (res.code == "ok") {
  1723. this.getList();
  1724. } else {
  1725. this.$message({
  1726. message: res.msg,
  1727. type: "error"
  1728. });
  1729. }
  1730. },
  1731. error => {
  1732. this.$message({
  1733. message: error,
  1734. type: "error"
  1735. });
  1736. });
  1737. } else if (this.auditTypeItem.auditType == 1){
  1738. //项目经理按项目逐条审核
  1739. this.showSingleAudit = true;
  1740. this.downloadByA(item);
  1741. }
  1742. },
  1743. denySingle(item) {
  1744. //项目经理审核模式
  1745. this.http.post('/expense-sheet/denySingleProject', {
  1746. id: item.id
  1747. },
  1748. res => {
  1749. if (res.code == "ok") {
  1750. this.dialog = false;
  1751. this.showSingleAudit = false;
  1752. this.getList();
  1753. } else {
  1754. this.$message({
  1755. message: res.msg,
  1756. type: "error"
  1757. });
  1758. }
  1759. },
  1760. error => {
  1761. this.$message({
  1762. message: error,
  1763. type: "error"
  1764. });
  1765. });
  1766. },
  1767. denyReason(item) {
  1768. if (this.auditTypeItem.auditType == 0 || this.auditTypeItem.auditType == 2) {
  1769. this.denyForm.id = item.id
  1770. this.denyForm.reason = ''
  1771. this.denyReasonDialog = true
  1772. // this.deny()
  1773. } else {
  1774. this.downloadByA(item);
  1775. this.showSingleAudit = true;
  1776. }
  1777. },
  1778. deny() {
  1779. //审核驳回
  1780. this.http.post('/expense-sheet/deny', {
  1781. id: this.denyForm.id,
  1782. denyReason: this.denyForm.reason
  1783. },
  1784. res => {
  1785. if (res.code == "ok") {
  1786. this.denyReasonDialog = false
  1787. this.getList();
  1788. } else {
  1789. this.$message({
  1790. message: res.msg,
  1791. type: "error"
  1792. });
  1793. }
  1794. },
  1795. error => {
  1796. this.$message({
  1797. message: error,
  1798. type: "error"
  1799. });
  1800. });
  1801. },
  1802. costMainTypeSwitching() {
  1803. if(this.user.companyId == 4811) {
  1804. if(this.expenseMainTypeValue == 14454) {
  1805. this.users = JSON.parse(JSON.stringify(this.copyUsers)).filter(item => item.id != this.user.id)
  1806. this.addForm.firstCheckerId = ''
  1807. this.addForm.secondCheckerId = ''
  1808. if(this.addForm.ownerId == this.user.id) {
  1809. this.addForm.ownerId = ''
  1810. }
  1811. } else {
  1812. this.addForm.ownerId = this.user.id
  1813. this.users = JSON.parse(JSON.stringify(this.copyUsers))
  1814. }
  1815. }
  1816. this.getExpList()
  1817. },
  1818. getExpList() {
  1819. this.http.post('/expense-type/getList', {
  1820. },
  1821. res => {
  1822. this.customTypeListLoading = false
  1823. if (res.code == "ok") {
  1824. this.allExpList = res.data;
  1825. this.customTypeList = res.data
  1826. this.addForm.type = this.expenseMainTypeValue
  1827. this.expenseTypeList = this.allExpList.filter(a => a.mainType == this.expenseMainTypeValue);
  1828. this.invoiceList = []
  1829. if (!res.data != res.data.length == 0) {
  1830. this.http.post('/company/settingExpenseType', {}, res => {
  1831. if (res.code == 'ok') { } else { this.$message({ message: res.msg, type: 'error' }) }
  1832. }, err => { this.$message({ message: err, type: 'error' }) })
  1833. }
  1834. for (let i in this.invoiceList) {
  1835. this.invoiceList[i].expenseType = ''
  1836. }
  1837. } else {
  1838. this.$message({
  1839. message: res.msg,
  1840. type: "error"
  1841. });
  1842. }
  1843. },
  1844. error => {
  1845. this.customTypeListLoading = false
  1846. this.$message({
  1847. message: error,
  1848. type: "error"
  1849. });
  1850. });
  1851. },
  1852. getExpensMainTypes() {
  1853. this.http.post('/expense-main-type/list', {
  1854. },
  1855. res => {
  1856. if (res.code == "ok") {
  1857. if(this.user.isMachineCost != 2) {
  1858. this.expenseMainTypes = res.data.filter(item => item.id != 14454)
  1859. // this.addForm.firstCheckerId = this.user.id
  1860. } else {
  1861. this.expenseMainTypes = res.data
  1862. }
  1863. this.expenseMainTypeValue = this.expenseMainTypes[0].id
  1864. } else {
  1865. this.$message({
  1866. message: res.msg,
  1867. type: "error"
  1868. });
  1869. }
  1870. },
  1871. error => {
  1872. this.$message({
  1873. message: error,
  1874. type: "error"
  1875. });
  1876. });
  1877. },
  1878. // 单据查看
  1879. downloadByA(val) {
  1880. if (val.status == 0) {
  1881. this.detailDialog = true
  1882. } else {
  1883. this.dialog = true
  1884. }
  1885. console.log(val, '看看数据来源')
  1886. this.detaExpenseMainTypeName = val.expenseMainTypeName
  1887. this.flg = true;
  1888. this.getParticulars(val.id);
  1889. this.expenseTypeList = this.allExpList.filter(a => a.mainType == val.type);
  1890. },
  1891. // 单据编辑
  1892. showEditName(val) {
  1893. this.dialog = true,
  1894. this.flg = false,
  1895. delete val.invoiceList
  1896. this.getParticulars(val.id)
  1897. this.expenseTypeList = this.allExpList.filter(a => a.mainType == val.type);
  1898. },
  1899. staffs(key, keyPath) { // 控制员工费用报表
  1900. if (keyPath[0] == '1') {
  1901. this.displayTable = false;
  1902. } else {
  1903. this.displayTable = true;
  1904. this.getList();
  1905. }
  1906. // currentClick
  1907. // console.log(key, keyPath)
  1908. this.currentClick = key
  1909. key == '2-1' ? this.currentClickNum = 70 : this.currentClickNum = 0
  1910. },
  1911. bills(audit) { // 控制
  1912. this.isAuditList = audit;
  1913. this.displayTable = true;
  1914. },
  1915. present() {
  1916. if(this.user.companyId == 4811) {
  1917. if(!this.ParticularsList.firstCheckerId || !this.ParticularsList.secondCheckerId) {
  1918. this.$message({
  1919. message: !this.ParticularsList.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
  1920. type: "error"
  1921. });
  1922. return;
  1923. }
  1924. }
  1925. this.adds();
  1926. },
  1927. // 删除操作
  1928. delec(ids) {
  1929. // console.log('删除操作', ids);
  1930. this.ParticularsList.invoiceList.splice(ids, 1)
  1931. this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
  1932. this.kan()
  1933. },
  1934. adds() {
  1935. var paramData = JSON.parse(JSON.stringify(this.ParticularsList));
  1936. var spl = paramData.invoiceList
  1937. for (var i in spl) {
  1938. if (spl[i].pic) {
  1939. spl[i].pic = spl[i].pic.map(a => a.name).join(',')
  1940. }
  1941. }
  1942. console.log(paramData, '<== paramData')
  1943. let noAmount = paramData.invoiceList.filter(item => !item.amount)
  1944. if(noAmount.length > 0) {
  1945. if(this.user.companyId != 4811 && this.ParticularsList.type != 14454 && this.user.id != this.ParticularsList.ownerId) {
  1946. this.$message({
  1947. message: this.$t('qingTianXieWanZhengFeiYongJinE'),
  1948. type: "error"
  1949. });
  1950. return;
  1951. }
  1952. }
  1953. paramData.items = JSON.stringify(paramData.invoiceList)//这里要传发票列表的json转string
  1954. // console.log(paramData, '<== paramData')
  1955. // return
  1956. delete paramData.invoiceList
  1957. this.http.post('/expense-sheet/add', paramData,
  1958. res => {
  1959. if (res.code == "ok") {
  1960. this.dialog = false;
  1961. this.bills(this.isAuditList);
  1962. this.getList()
  1963. this.$message({
  1964. message: this.$t('editsuccess'),
  1965. type: "success"
  1966. });
  1967. } else {
  1968. this.$message({
  1969. message: res.msg,
  1970. type: "error"
  1971. });
  1972. }
  1973. },
  1974. error => {
  1975. this.$message({
  1976. message: error,
  1977. type: "error"
  1978. });
  1979. });
  1980. },
  1981. // 获取人员信息
  1982. getUsers() {
  1983. // this.http.post(this.port.manage.list, {
  1984. // departmentId: -1,
  1985. // pageIndex: 1,
  1986. // // pageSize: 99999
  1987. // pageSize: -1
  1988. // },
  1989. this.http.post('/user/getSimpleActiveUserList', {},
  1990. res => {
  1991. if (res.code == "ok") {
  1992. // this.users = res.data.records;
  1993. const { id } = JSON.parse(sessionStorage.getItem('user'))
  1994. this.users = res.data;
  1995. this.usersNoInfo = res.data.filter(item => item.id != id)
  1996. this.copyUsers = JSON.parse(JSON.stringify(res.data))
  1997. // this.usersNoInfo = res.data
  1998. if (!this.permissions.costAudit) {
  1999. this.addForm.ownerId = this.user.id;
  2000. this.addForm.status = 1;
  2001. this.$forceUpdate()
  2002. }
  2003. } else {
  2004. this.$message({
  2005. message: res.msg,
  2006. type: "error"
  2007. });
  2008. }
  2009. },
  2010. error => {
  2011. this.$message({
  2012. message: error,
  2013. type: "error"
  2014. });
  2015. });
  2016. },
  2017. // 提交事件
  2018. submits() {
  2019. this.$refs.mainAddForm.validate(valid => {
  2020. if (valid) {
  2021. if(this.auditTypeItem.auditType == 2 && (!this.addForm.firstCheckerId || !this.addForm.secondCheckerId)) {
  2022. if(this.user.companyId != 4811 && this.expenseMainTypeValue != 14454) {
  2023. this.$message({
  2024. message: !this.addForm.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
  2025. type: "error"
  2026. });
  2027. return;
  2028. }
  2029. }
  2030. if (this.invoiceList.length == 0) {
  2031. this.$message({
  2032. message: this.$t('pleaseaddtheinvoice'),
  2033. type: "error"
  2034. });
  2035. return;
  2036. }
  2037. let strObj = {
  2038. project: '',
  2039. datas: '',
  2040. fptype: '',
  2041. fyType: '',
  2042. rmb: '',
  2043. flg: false
  2044. }
  2045. for (var i in this.invoiceList) {
  2046. if (!this.invoiceList[i].projectId) {
  2047. strObj.project = this.$t('subordinatetotheproject')
  2048. strObj.flg = true
  2049. }
  2050. // if(!this.invoiceList[i].invoiceType || this.invoiceList[i].invoiceType == '') {
  2051. // strObj.fptype = '发票种类'
  2052. // strObj.flg = true
  2053. // }
  2054. if (!this.invoiceList[i].expenseType || this.invoiceList[i].expenseType == '') {
  2055. strObj.fyType = this.$t('costtype')
  2056. strObj.flg = true
  2057. }
  2058. if (!this.invoiceList[i].happenDate || this.invoiceList[i].happenDate == '') {
  2059. strObj.datas = this.$t('forthedate')
  2060. strObj.flg = true
  2061. }
  2062. if(this.user.companyId != 4811 && this.expenseMainTypeValue != 14454 && this.user.id != this.addForm.ownerId) {
  2063. if (!this.invoiceList[i].amount || this.invoiceList[i].amount == '') {
  2064. strObj.rmb = this.$t('feiYongJinE')
  2065. strObj.flg = true
  2066. }
  2067. }
  2068. }
  2069. if (strObj.flg) {
  2070. this.$message({
  2071. message: `${strObj.project} ${strObj.fptype} ${strObj.fyType} ${strObj.datas} ${strObj.rmb} ${this.$t('qingTianXieWanZheng')}`,
  2072. type: "error"
  2073. });
  2074. return;
  2075. }
  2076. // return
  2077. this.add();
  2078. }
  2079. });
  2080. },
  2081. // 点击新增
  2082. addxz() {
  2083. this.form = { happenDate: null, invoiceType: null, amount: null, invoiceNo: null, taxPercent: null, taxValue: null, remark: null, pic: null },
  2084. this.invoiceList.push(this.form)
  2085. },
  2086. addNewInvoice() {
  2087. this.form = { happenDate: null, invoiceType: null, amount: null, invoiceNo: null, taxPercent: null, taxValue: null, remark: null, pic: null },
  2088. this.ParticularsList.invoiceList.push(this.form)
  2089. this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
  2090. },
  2091. //获取项目列表
  2092. getProjectList() {
  2093. this.http.post(this.port.project.list, {},
  2094. res => {
  2095. if (res.code == "ok") {
  2096. //费用报销界面选择项目只针对进行中的
  2097. this.projectList = res.data.filter(i =>i.status==1);
  2098. } else {
  2099. this.$message({
  2100. message: res.msg,
  2101. type: "error"
  2102. });
  2103. }
  2104. },
  2105. error => {
  2106. this.$message({
  2107. message: error,
  2108. type: "error"
  2109. });
  2110. });
  2111. },
  2112. //获取审核模式
  2113. getAuditType() {
  2114. this.http.post('/expense-audit-setting/get', {},
  2115. res => {
  2116. if (res.code == "ok") {
  2117. this.auditTypeItem = res.data;
  2118. } else {
  2119. this.$message({
  2120. message: res.msg,
  2121. type: "error"
  2122. });
  2123. }
  2124. },
  2125. error => {
  2126. this.$message({
  2127. message: error,
  2128. type: "error"
  2129. });
  2130. });
  2131. },
  2132. //获取单据列表
  2133. getList() {
  2134. // console.log(this.date)
  2135. var stat = ''
  2136. var end = ''
  2137. if (this.date) {
  2138. stat = this.date[0]
  2139. end = this.date[1]
  2140. }
  2141. var param = {
  2142. pageIndex: this.page,
  2143. pageSize: this.size,
  2144. code: this.code,
  2145. // createDate: this.date,
  2146. startDate: stat,
  2147. endDate: end,
  2148. ownerId: this.ownerId,
  2149. type: this.queryExpenseMainType,
  2150. projectId: this.selectProject ? this.selectProject : null,
  2151. };
  2152. if (this.isAuditList) {
  2153. param.status = 1;
  2154. }
  2155. if (this.permissions.costExpenseRelease) {
  2156. param.sendState = this.sendState
  2157. }
  2158. this.list = [];
  2159. // this.total = 0;
  2160. this.http.post('/expense-sheet/list', param,
  2161. res => {
  2162. if (res.code == "ok") {
  2163. this.list = res.data.records;
  2164. this.total = res.data.total || 0;
  2165. } else {
  2166. this.$message({
  2167. message: res.msg,
  2168. type: "error"
  2169. });
  2170. }
  2171. },
  2172. error => {
  2173. this.$message({
  2174. message: error,
  2175. type: "error"
  2176. });
  2177. });
  2178. },
  2179. //删除单据
  2180. deletes(id) {
  2181. this.http.post('/expense-sheet/delete', { id: id },
  2182. res => {
  2183. if (res.code == "ok") {
  2184. this.getList()
  2185. this.$message({
  2186. message: this.$t('message.successfullyDeleted'),
  2187. type: "success"
  2188. });
  2189. } else {
  2190. this.$message({
  2191. message: res.msg,
  2192. type: "error"
  2193. });
  2194. }
  2195. },
  2196. error => {
  2197. this.$message({
  2198. message: error,
  2199. type: "error"
  2200. });
  2201. });
  2202. },
  2203. //创建单据
  2204. add() {
  2205. let newInvoiceList = JSON.parse(JSON.stringify(this.invoiceList))
  2206. for(var i in newInvoiceList) {
  2207. if(newInvoiceList[i].pic) {
  2208. newInvoiceList[i].pic = newInvoiceList[i].pic.map(item => item.name).join(',')
  2209. }
  2210. }
  2211. console.log(newInvoiceList)
  2212. this.addForm.items = JSON.stringify(newInvoiceList)//这里要传发票列表的json转string
  2213. this.addForm.totalAmount = this.totalCost
  2214. this.http.post('/expense-sheet/add', this.addForm,
  2215. res => {
  2216. if (res.code == "ok") {
  2217. this.$message({
  2218. message: this.$t('message.fillinsuccessfully'),
  2219. type: "success"
  2220. });
  2221. this.addForm = {
  2222. code: null,
  2223. ownerId: this.expenseMainTypeValue == 14454 ? '' : this.user.id,
  2224. createDate: null,
  2225. type: this.expenseMainTypeValue,
  2226. ticketNum: 1, remark: null, totalAmount: 0,
  2227. }
  2228. this.invoiceList = []
  2229. this.getNextCode()
  2230. } else {
  2231. this.$message({
  2232. message: res.msg,
  2233. type: "error"
  2234. });
  2235. }
  2236. },
  2237. error => {
  2238. this.$message({
  2239. message: error,
  2240. type: "error"
  2241. });
  2242. });
  2243. },
  2244. //获取单据编码
  2245. getNextCode() {
  2246. this.http.post('/expense-sheet/getNextCode', {
  2247. },
  2248. res => {
  2249. if (res.code == "ok") {
  2250. this.addForm.code = res.data;
  2251. } else {
  2252. this.$message({
  2253. message: res.msg,
  2254. type: "error"
  2255. });
  2256. }
  2257. },
  2258. error => {
  2259. this.$message({
  2260. message: error,
  2261. type: "error"
  2262. });
  2263. });
  2264. },
  2265. // 获取查看单据的数据
  2266. getParticulars(id) {
  2267. this.http.post('/expense-sheet/getDetail', {
  2268. id: id,
  2269. projectId: this.selectProject ? this.selectProject : '',
  2270. },
  2271. res => {
  2272. if (res.code == "ok") {
  2273. // this
  2274. console.log(res, '<=== 详情数据')
  2275. // this.ParticularsList = res.data
  2276. // this.expenseMainTypeValue = res.data.type
  2277. var s = []
  2278. // var b = []
  2279. for (var i in res.data.invoiceList) {
  2280. if (res.data.invoiceList[i].pic) {
  2281. let newPic = res.data.invoiceList[i].pic.split(',')
  2282. res.data.invoiceList[i].pic = newPic.map(item => {
  2283. return {
  2284. name: item,
  2285. url: `/upload/${item}`,
  2286. // url: `http://47.101.180.183/upload/${item}`,
  2287. title: this.$t('expensereimbursementvoucher')
  2288. }
  2289. })
  2290. }
  2291. }
  2292. this.ParticularsList = res.data
  2293. for (var i = 0; i <= this.ParticularsList.invoiceList.length - 1; i++) {
  2294. s.push(this.ParticularsList.invoiceList[i].projectId)
  2295. }
  2296. this.projectIdName = this.projectList.filter(item => { return s.indexOf(item.id) !== -1 })
  2297. // this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
  2298. // console.log(res.data, '查看当前状态');
  2299. // console.log(this.ParticularsList)
  2300. } else {
  2301. this.$message({
  2302. message: res.msg,
  2303. type: "error"
  2304. });
  2305. }
  2306. },
  2307. error => {
  2308. this.$message({
  2309. message: error,
  2310. type: "error"
  2311. });
  2312. })
  2313. },
  2314. //分页
  2315. handleCurrentChange(val) {
  2316. this.page = val;
  2317. console.log('page=======', this.page);
  2318. this.getList();
  2319. },
  2320. handleSizeChange(val) {
  2321. this.size = val;
  2322. this.getList();
  2323. },
  2324. deleteItem(item) {
  2325. this.$confirm(this.$t('yousureyouwanttodelete'), this.$t('other.prompts'), {
  2326. //type: 'warning'
  2327. }).then(() => {
  2328. this.http.post('/expense-sheet/delete', { id: item.id },
  2329. res => {
  2330. if (res.code == "ok") {
  2331. this.getList();
  2332. } else {
  2333. this.$message({
  2334. message: res.msg,
  2335. type: "error"
  2336. });
  2337. }
  2338. },
  2339. error => {
  2340. this.$message({
  2341. message: error,
  2342. type: "error"
  2343. });
  2344. });
  2345. });
  2346. },
  2347. // 点击删除
  2348. chanc(k) {
  2349. this.invoiceList.splice(k, 1)
  2350. },
  2351. // 双击
  2352. dbclick(row, event, column) {
  2353. this.isOK = true
  2354. },
  2355. oosk(s) {
  2356. this.isOK = false
  2357. },
  2358. ssl(index) {
  2359. this.z = index
  2360. this.addForm.type = index
  2361. this.ins = index;
  2362. this.expenseTypeList = this.allExpList.filter(a => a.mainType == this.ins);
  2363. this.addForm.ownerId = this.user.id;
  2364. this.getNextCode();
  2365. },
  2366. // 点击侧边栏事件
  2367. side() {
  2368. if (this.$refs.side.style.left < '0px') {
  2369. this.$refs.sidebars.style.width = '1px'
  2370. this.$refs.sid.style.left = '1px'
  2371. this.$refs.side.style.left = '1px'
  2372. this.$refs.sideI.className = 'el-icon-arrow-right'
  2373. this.$refs.staff.style.margin = '20px 20px 0 20px'
  2374. this.$refs.staff.style.width = '95%'
  2375. this.$refs.xiaomian.style.width = '100%'
  2376. this.$refs.headHe.style.paddingLeft = '20px'
  2377. this.currentClickNum = 0
  2378. } else {
  2379. this.$refs.sidebars.style.width = '200px'
  2380. this.$refs.sid.style.left = '200px'
  2381. this.$refs.side.style.left = '-19px'
  2382. this.$refs.sideI.className = 'el-icon-arrow-left'
  2383. this.$refs.staff.style.margin = '20px 20px 0 220px'
  2384. this.$refs.staff.style.width = '81%'
  2385. this.$refs.xiaomian.style.width = '85%'
  2386. this.$refs.headHe.style.paddingLeft = '220px'
  2387. this.currentClickNum = 70
  2388. }
  2389. },
  2390. // 费用金额失去焦点时触发
  2391. shiqu() {
  2392. this.addForm.totalAmount = this.invoiceList.reduce((prev, next) => {
  2393. return prev + parseFloat(next.amount);
  2394. }, 0)
  2395. },
  2396. kan() {
  2397. this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
  2398. return prev + parseFloat(next.amount)
  2399. }, 0)
  2400. },
  2401. zhi(e) {
  2402. // console.log('看看值', e)
  2403. var i = e
  2404. if (this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
  2405. return
  2406. }
  2407. this.invoiceList[i].taxValue = this.invoiceList[i].amount * this.invoiceList[i].taxPercent / 100
  2408. // console.log(this.invoiceList[i].amount, this.invoiceList[i].taxPercent)
  2409. var shui = this.invoiceList[i].taxPercent / 100 // 税率
  2410. var zhi = this.invoiceList[i].amount / (1 + shui) * shui
  2411. this.invoiceList[i].taxValue = zhi.toFixed(2)
  2412. },
  2413. zhiNum(i, val) {
  2414. // console.log('看看值', i, val)
  2415. // console.log(this.ParticularsList.invoiceList)
  2416. if (this.ParticularsList.invoiceList[i].amount == null || this.ParticularsList.invoiceList[i].amount == 'null' || this.ParticularsList.invoiceList[i].taxPercent == null || this.ParticularsList.invoiceList[i].taxPercent == 'null') {
  2417. return
  2418. }
  2419. var shui = this.ParticularsList.invoiceList[i].taxPercent / 100
  2420. var zhi = this.ParticularsList.invoiceList[i].amount / (1 + shui) * shui
  2421. this.ParticularsList.invoiceList[i].taxValue = zhi.toFixed(2)
  2422. },
  2423. zhis(e) {
  2424. var i = e
  2425. this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
  2426. },
  2427. fileonLoad(item) {
  2428. //首先判断文件类型
  2429. let str = item.file.name.split(".");
  2430. let format = str[str.length - 1];
  2431. if (format != "jpg" && format != "png" && format != "pdf") {
  2432. this.$message({
  2433. message: this.$t('pleaseselectpictures'),
  2434. type: "error"
  2435. });
  2436. } else {
  2437. this.listLoading = true;
  2438. let formData = new FormData();
  2439. formData.append("multipartFile", item.file);
  2440. this.http.uploadFile('/common/uploadFile', formData,
  2441. res => {
  2442. this.listLoading = false;
  2443. if (res.code == "ok") {
  2444. this.$message({
  2445. message: this.$t('uploadedsuccessfully'),
  2446. type: "success"
  2447. });
  2448. // this.getList();
  2449. this.invoiceList[this.apl].pic = res.data
  2450. // console.log(this.invoiceList)
  2451. } else {
  2452. this.$message({
  2453. message: res.msg,
  2454. type: "error"
  2455. });
  2456. }
  2457. },
  2458. error => {
  2459. this.listLoading = false;
  2460. this.$message({
  2461. message: error,
  2462. type: "error"
  2463. });
  2464. });
  2465. }
  2466. },
  2467. abl(e) {
  2468. this.apl = e
  2469. },
  2470. beforeRemove(file, fileList) {
  2471. var that = this
  2472. setTimeout(function () {
  2473. that.invoiceList[that.apl].pic = null
  2474. }, 200)
  2475. },
  2476. fileonLoads(item) {
  2477. //首先判断文件类型
  2478. let str = item.file.name.split(".");
  2479. let format = str[str.length - 1];
  2480. if (format != "jpg" && format != "png" && format != "pdf") {
  2481. this.$message({
  2482. message: this.$t('pleaseselectpictures'),
  2483. type: "error"
  2484. });
  2485. } else {
  2486. this.listLoading = true;
  2487. let formData = new FormData();
  2488. formData.append("multipartFile", item.file);
  2489. this.http.uploadFile('/common/uploadFile', formData,
  2490. res => {
  2491. this.listLoading = false;
  2492. if (res.code == "ok") {
  2493. this.$message({
  2494. message: this.$t('uploadedsuccessfully'),
  2495. type: "success"
  2496. });
  2497. // this.getList();
  2498. this.ParticularsList.invoiceList[this.apl].pic = res.data
  2499. // console.log(this.invoiceList)
  2500. } else {
  2501. this.$message({
  2502. message: res.msg,
  2503. type: "error"
  2504. });
  2505. }
  2506. },
  2507. error => {
  2508. this.listLoading = false;
  2509. this.$message({
  2510. message: error,
  2511. type: "error"
  2512. });
  2513. });
  2514. }
  2515. },
  2516. beforeRemoves(file, fileList) {
  2517. var that = this
  2518. setTimeout(function () {
  2519. // this.ParticularsList.invoiceList
  2520. that.ParticularsList.invoiceList[that.apl].pic = null
  2521. }, 200)
  2522. },
  2523. imgUrl(img) {
  2524. // var imgss = this.diz + '/upload/' + img
  2525. // var sp = []
  2526. // var is = {}
  2527. // is.url = imgss
  2528. // is.title = 1
  2529. // sp.push(is)
  2530. // this.imgs = sp
  2531. // console.log(imgss)
  2532. // console.log(this.$refs.imgsa)
  2533. // this.$refs.imgsa.click()
  2534. // console.log(location.protocol, location.host)
  2535. // console.log(location.protocol + '//' + location.host + imgs)
  2536. },
  2537. // 合计
  2538. getSummaries(param) {
  2539. const { columns, data } = param;
  2540. const sums = [];
  2541. columns.forEach((column, index) => {
  2542. if (index === 1) {
  2543. sums[index] = this.$t('benYeJineheJi');//this.$t('other.totals');
  2544. return;
  2545. }
  2546. if (index === 2) {
  2547. const values = data.map(item => Number(item[column.property]));
  2548. if (!values.every(value => isNaN(value))) {
  2549. sums[index] = values.reduce((prev, curr) => {
  2550. const value = Number(curr);
  2551. if (!isNaN(value)) {
  2552. return prev + curr;
  2553. } else {
  2554. return prev;
  2555. }
  2556. }, 0);
  2557. var zhi = +sums[index] + 0
  2558. var sl = zhi.toFixed(2)
  2559. sl += this.$t('yuan');
  2560. sums[index] = sl;
  2561. } else {
  2562. sums[index] = '';
  2563. }
  2564. } else {
  2565. sums[index] = '';
  2566. }
  2567. });
  2568. // console.log(sums, 123)
  2569. this.$nextTick(() => { this.$refs.tab.doLayout() })
  2570. return sums;
  2571. },
  2572. // 自定义组件事件
  2573. selectCal(obj) {
  2574. if (obj.distinction == '1') {
  2575. this.addForm.ownerId = obj.id
  2576. } else if (obj.distinction == '2') {
  2577. this.ownerId = obj.id
  2578. } else if (obj.distinction == '3') {
  2579. this.ParticularsList.ownerId = obj.id
  2580. } else if (obj.distinction == '4') {
  2581. this.addForm.firstCheckerId = obj.id
  2582. } else if (obj.distinction == '5') {
  2583. this.addForm.secondCheckerId = obj.id
  2584. } else if (obj.distinction == '6') {
  2585. this.ParticularsList.firstCheckerId = obj.id
  2586. } else if (obj.distinction == '7') {
  2587. this.ParticularsList.secondCheckerId = obj.id
  2588. }
  2589. },
  2590. // 单据导出
  2591. exportDocument() {
  2592. this.exportingData = true;
  2593. var stat = ''
  2594. var end = ''
  2595. if (this.date) {
  2596. stat = this.date[0]
  2597. end = this.date[1]
  2598. }
  2599. this.http.post('/expense-sheet/exportList', {
  2600. code: this.code,
  2601. startDate: stat,
  2602. endDate: end,
  2603. ownerId: this.ownerId,
  2604. type: this.type,
  2605. projectId: this.selectProject ? this.selectProject : null,
  2606. sendState: this.sendState
  2607. },
  2608. res => {
  2609. this.exportingData = false;
  2610. if (res.code == "ok") {
  2611. var filePath = res.data;
  2612. const a = document.createElement('a'); // 创建a标签
  2613. a.setAttribute('download', this.$t('feiYongBaoXiaoDanJuLieBiao'));// download属性
  2614. a.setAttribute('href', filePath);// href链接
  2615. a.click(); //自执行点击事件
  2616. a.remove();
  2617. } else {
  2618. this.$message({
  2619. message: res.msg,
  2620. type: "error"
  2621. });
  2622. }
  2623. },
  2624. error => {
  2625. this.$message({
  2626. message: error,
  2627. type: "error"
  2628. });
  2629. });
  2630. },
  2631. //报销凭证导出
  2632. exportDocumentFile() {
  2633. var stat = ''
  2634. var end = ''
  2635. if (this.date) {
  2636. stat = this.date[0]
  2637. end = this.date[1]
  2638. }
  2639. this.exportingData=true
  2640. var that = this;
  2641. this.http.downloadFile(`/expense-sheet/export`, {
  2642. code: this.code,
  2643. startDate: stat,
  2644. endDate: end,
  2645. ownerId: this.ownerId,
  2646. type: this.type,
  2647. projectId: this.selectProject ? this.selectProject : null,
  2648. sendState: this.sendState
  2649. }, '报销凭证导出.zip', function(err) {
  2650. that.exportingData = false;
  2651. that.$message({
  2652. message: err,
  2653. type: "error"
  2654. });
  2655. }, function() {
  2656. console.log('55555555555')
  2657. that.exportingData = false;
  2658. })
  2659. },
  2660. // 单据发放
  2661. documentIssuance(type) {
  2662. const newList = this.multipleSelection.filter(item => item.status == 1 || item.status == 2);
  2663. const unissueds = this.multipleSelection.filter(item => item.status != 1 && item.status != 2 && item.sendState == 0).map(item => item.id);
  2664. const Issueds = this.multipleSelection.filter(item => item.status != 1 && item.status != 2 && item.sendState == 1).map(item => item.id);
  2665. const showMessage = (msg, messageType) => {
  2666. this.$message({
  2667. message: msg,
  2668. type: messageType
  2669. });
  2670. };
  2671. if (newList.length > 0) {
  2672. showMessage(this.$t('cunZaiDaiShenHeHuoYiBoHuiDeDanJu'), 'warning');
  2673. return;
  2674. }
  2675. if (type == 1 && unissueds.length == 0) {
  2676. showMessage(this.$t('qingXuanZeWeiFaFangDeDanJu'), 'warning');
  2677. return;
  2678. }
  2679. if (type == 0 && Issueds.length == 0) {
  2680. showMessage(this.$t('qingXuanZeYiFaFangDeDanJu'), 'warning');
  2681. return;
  2682. }
  2683. if(type == 1 && this.sendStateList.length > 0) {
  2684. this.releaseData = {
  2685. id: '',
  2686. data: unissueds
  2687. }
  2688. this.dialogVisibleRelease = true
  2689. return
  2690. }
  2691. this.callingInterface(type, type == 1 ? unissueds : Issueds);
  2692. },
  2693. callingInterface(type, ids) {
  2694. this.http.post('/expense-sheet/editSendExpense', {
  2695. expenseIds: ids.join(','),
  2696. sendState: type,
  2697. payWayId: this.releaseData.id || ''
  2698. },
  2699. res => {
  2700. this.dialogVisibleRelease = false
  2701. if (res.code == "ok") {
  2702. this.$message({
  2703. message: this.$t('operationissuccessful'),
  2704. type: "success"
  2705. });
  2706. this.getList()
  2707. } else {
  2708. this.$message({
  2709. message: res.msg,
  2710. type: "error"
  2711. });
  2712. }
  2713. },
  2714. error => {
  2715. this.dialogVisibleRelease = false
  2716. this.$message({
  2717. message: error,
  2718. type: "error"
  2719. });
  2720. });
  2721. },
  2722. handleSelectionChange(val) {
  2723. this.multipleSelection = val;
  2724. },
  2725. // 打印
  2726. print() {
  2727. this.$print(this.$refs.printContent)
  2728. },
  2729. // 触发自定义函数
  2730. performCustomization(index, type = 1) {
  2731. this.apl = index
  2732. this.imgLoadType = type
  2733. this.$refs.uploadInput.click()
  2734. },
  2735. // 查看详情
  2736. viewDetailsImage(index, fields = 'invoiceList', fieldsCope) {
  2737. if(fieldsCope) {
  2738. this.imgLoadType = 2
  2739. this.dialogVisibleImageList = this[fields][fieldsCope][index].pic
  2740. } else{
  2741. this.imgLoadType = 1
  2742. this.dialogVisibleImageList = this[fields][index].pic
  2743. }
  2744. console.log(this.dialogVisibleImageList, '查看详情')
  2745. this.apl = index
  2746. this.dialogVisibleImage = true
  2747. },
  2748. // 删除图片
  2749. deteleIpc(index, fields = 'invoiceList', fieldsCope) {
  2750. if(fieldsCope) {
  2751. this[fields][fieldsCope][index].pic.splice(index, 1)
  2752. this.dialogVisibleImageList = this[fields][fieldsCope][index].pic
  2753. } else{
  2754. this[fields][index].pic.splice(index, 1)
  2755. this.dialogVisibleImageList = this[fields][index].pic
  2756. }
  2757. },
  2758. // 费用报销图片上传(多选)
  2759. fileMultLoad() {
  2760. let fileArr = this.$refs.uploadInput.files
  2761. this.listLoading = true;
  2762. let formData = new FormData();
  2763. for (let i = 0; i < fileArr.length; i++) {
  2764. formData.append("multipartFiles", fileArr[i]);
  2765. }
  2766. this.http.uploadFile('/common/uploadFileArray', formData,
  2767. res => {
  2768. this.listLoading = false;
  2769. if (res.code == "ok") {
  2770. this.$message({
  2771. message: this.$t('uploadedsuccessfully'),
  2772. type: "success"
  2773. });
  2774. if(res.data) {
  2775. let newList = res.data.split(';')
  2776. let newArr = newList.map(item => {
  2777. return {
  2778. name: item,
  2779. url: '/upload/' + item,
  2780. // url: `http://47.101.180.183/upload/${item}`,
  2781. title: this.$t('expensereimbursementvoucher')
  2782. }
  2783. })
  2784. if(this.imgLoadType == 1) {
  2785. let oldList = this.invoiceList[this.apl].pic || []
  2786. this.$set(this.invoiceList[this.apl], 'pic', [...oldList, ...newArr])
  2787. this.dialogVisibleImageList = [...oldList, ...newArr]
  2788. }
  2789. if(this.imgLoadType == 2) {
  2790. let oldList = this.ParticularsList.invoiceList[this.apl].pic || []
  2791. this.$set(this.ParticularsList.invoiceList[this.apl], 'pic', [...oldList, ...newArr])
  2792. this.dialogVisibleImageList = [...oldList, ...newArr]
  2793. }
  2794. }
  2795. console.log(this.apl, '<< === 赋值的索引')
  2796. } else {
  2797. this.$message({
  2798. message: res.msg,
  2799. type: "error"
  2800. });
  2801. }
  2802. },
  2803. error => {
  2804. this.listLoading = false;
  2805. this.$message({
  2806. message: error,
  2807. type: "error"
  2808. });
  2809. });
  2810. },
  2811. // 判断当前数据的文件类型
  2812. isFileType(item) {
  2813. let str = item.split('.');
  2814. let format = str[str.length - 1];
  2815. if (['jpg', 'png', 'jpeg', 'JPG', 'PNG', 'JPEG'].includes(format)) {
  2816. return 'image'
  2817. } else if (format == "pdf") {
  2818. return 'pdf'
  2819. }
  2820. },
  2821. // 查看pdf
  2822. openViewPdf(urls) {
  2823. // 新窗口打开pdf
  2824. window.open(urls)
  2825. },
  2826. // 获取发放方式
  2827. getSendStateList() {
  2828. this.http.post('/expense-pay-way/get', {
  2829. companyId: this.user.companyId
  2830. },
  2831. res => {
  2832. if (res.code == "ok") {
  2833. this.sendStateList = res.data;
  2834. } else {
  2835. this.$message({
  2836. message: res.msg,
  2837. type: "error"
  2838. });
  2839. }
  2840. },
  2841. error => {
  2842. this.$message({
  2843. message: error,
  2844. type: "error"
  2845. });
  2846. });
  2847. }
  2848. },
  2849. beforeDestroy() {
  2850. }
  2851. };
  2852. </script>
  2853. <style scoped lang="scss">
  2854. @import "../../assets/scss/handle";
  2855. .tups {
  2856. width: 100%;
  2857. height: 25px;
  2858. position: relative;
  2859. z-index: 99;
  2860. overflow: hidden;
  2861. }
  2862. .tups img {
  2863. // height: 25px !important;
  2864. // position: relative;
  2865. // z-index: 99;
  2866. width: 30px;
  2867. height: 30px;
  2868. margin-right: 4px;
  2869. }
  2870. .viewer-canvas {
  2871. position: absolute;
  2872. z-index: 9 !important;
  2873. }
  2874. .icl {
  2875. margin-top: -25px !important;
  2876. }
  2877. /* 费用报销标题 */
  2878. .headine {
  2879. width: 100%;
  2880. height: 46.4px;
  2881. line-height: 46.4px;
  2882. background: #fff;
  2883. box-sizing: border-box;
  2884. }
  2885. .headine h3 {
  2886. margin: 0;
  2887. display: inline-block;
  2888. box-sizing: border-box;
  2889. color: #999;
  2890. }
  2891. .headine p {
  2892. display: inline-block;
  2893. margin: 0;
  2894. }
  2895. /* /费用报销标题 */
  2896. .sidebars {
  2897. height: 100%;
  2898. position: absolute;
  2899. border-right: 1px solid #E6E6E6;
  2900. z-index: 2;
  2901. top: 0;
  2902. }
  2903. .sidebars h3 {
  2904. margin: 0;
  2905. line-height: 45px;
  2906. background: #ffffff;
  2907. font-weight: normal;
  2908. color: #666;
  2909. padding-left: 20px;
  2910. }
  2911. .sidebars .el-col-12 {
  2912. width: 100%
  2913. }
  2914. .public {
  2915. // height: 180px;
  2916. border-bottom: 1px solid #ddd;
  2917. }
  2918. .public .el-form-item {
  2919. display: inline-block;
  2920. }
  2921. .pu_button {
  2922. text-align: right;
  2923. width: 100%;
  2924. padding: 24px 30px;
  2925. box-sizing: border-box;
  2926. }
  2927. .pu_bu_x .pu_bu_t {
  2928. display: inline-block;
  2929. }
  2930. .pu_bu_x {
  2931. margin-right: 20px;
  2932. color: #20A0F7;
  2933. cursor: pointer;
  2934. }
  2935. .pu_bu_t {
  2936. color: #20A0F7;
  2937. cursor: pointer;
  2938. display: block;
  2939. float: right;
  2940. position:
  2941. relative;
  2942. top: -20px;
  2943. right: 63px;
  2944. }
  2945. .pu_table {
  2946. margin-left: 10px;
  2947. }
  2948. .pu_bu_t:hover {
  2949. color: #7bbcff;
  2950. }
  2951. .pu_bu_x:hover {
  2952. color: #7bbcff;
  2953. }
  2954. /* 我的单据报销凭证 */
  2955. .staff {
  2956. border-left: 1px solid #fff;
  2957. border-top: 1px solid #fff;
  2958. border-right: 1px solid #fff;
  2959. background: #fff;
  2960. }
  2961. /* */
  2962. .sdat {
  2963. display: inline-block;
  2964. width: 260px;
  2965. margin-left: 13px;
  2966. }
  2967. .messages .el-form-item {
  2968. display: inline-block;
  2969. }
  2970. .messages .el-date-editor.el-input,
  2971. .el-date-editor.el-input__inner {
  2972. width: 190px;
  2973. }
  2974. /* 我的报销凭证 */
  2975. .search {
  2976. position: relative;
  2977. top: 20px;
  2978. left: 20px;
  2979. }
  2980. .tables {
  2981. margin-top: 50px;
  2982. box-sizing: border-box;
  2983. padding: 10px;
  2984. }
  2985. .informant .el-form-item {
  2986. display: inline-block;
  2987. }
  2988. /* 侧边栏收索 */
  2989. .side {
  2990. position: absolute;
  2991. z-index: 2;
  2992. border-right: 2px solid #DDDDDD;
  2993. height: 100%;
  2994. top: 0;
  2995. width: 0;
  2996. }
  2997. .side .spans {
  2998. width: 20px;
  2999. height: 30px;
  3000. border: 1px solid #DDDDDD;
  3001. box-sizing: border-box;
  3002. position: absolute;
  3003. top: 50%;
  3004. margin-top: -50%;
  3005. text-align: center;
  3006. z-index: 1;
  3007. background: #fff;
  3008. }
  3009. .side .spans i {
  3010. margin-top: 7px;
  3011. color: #C0BFBF
  3012. }
  3013. .side:hover {
  3014. border-right: 2px solid;
  3015. @include border_color("border_color");
  3016. }
  3017. .side:hover .spans {
  3018. border: 1px solid;
  3019. @include border_color("border_color");
  3020. @include background_color("background_color");
  3021. }
  3022. .side:hover .spans i {
  3023. color: #fff;
  3024. }
  3025. /* 右边整体页面 */
  3026. .contents {
  3027. height: 100%;
  3028. /* padding: 30px; */
  3029. background: #F7F7F7;
  3030. /* position: absolute; */
  3031. }
  3032. .submits {
  3033. margin-left: 50%;
  3034. }
  3035. .waiting {
  3036. color: orange;
  3037. }
  3038. .rejected {
  3039. color: red;
  3040. }
  3041. .newInvoice {
  3042. position: absolute;
  3043. right: 10px;
  3044. top: -20px;
  3045. height: 20px;
  3046. line-height: 20px;
  3047. cursor: pointer;
  3048. color: #20a0f7;
  3049. font-size: 14px;
  3050. }
  3051. .newInvoice:hover {
  3052. color: #7bbcff;
  3053. }
  3054. /* 新增打印的费用报销类型 */
  3055. .printContent {
  3056. .printContent-detail {
  3057. display: flex;
  3058. flex-wrap: wrap;
  3059. }
  3060. .detail-item {
  3061. width: 33%;
  3062. font-size: 16px;
  3063. margin-bottom: 10px;
  3064. color: #000;
  3065. .detail-item-title {
  3066. color: #999;
  3067. }
  3068. .single {
  3069. font-size: 14px;
  3070. }
  3071. .printBox {
  3072. display: inline-block;
  3073. width: 125px;
  3074. text-align-last: justify;
  3075. box-sizing: border-box;
  3076. padding-right: 10px;
  3077. }
  3078. }
  3079. .conter-box {
  3080. .conter-border {
  3081. width: 100%;
  3082. box-sizing: border-box;
  3083. padding: 15px;
  3084. border: 1px solid #ddd;
  3085. border-radius: 4px;
  3086. display: flex;
  3087. flex-wrap: wrap;
  3088. margin-top: 20px;
  3089. .detail-item {
  3090. width: 50%;
  3091. margin-top: 10px;
  3092. }
  3093. }
  3094. }
  3095. }
  3096. .customIamgeLoad {
  3097. opacity: 0;
  3098. position: absolute;
  3099. top: -300vh;
  3100. left: -300vw;
  3101. }
  3102. .dayImge {
  3103. .xiaoImg {
  3104. width: 120px;
  3105. height: 120px;
  3106. margin-right: 25px;
  3107. margin-bottom: 20px;
  3108. position: relative;
  3109. display: inline-block;
  3110. img {
  3111. width: 100%;
  3112. height: 100%;
  3113. }
  3114. .imgIcon {
  3115. position: absolute;
  3116. right: 0px;
  3117. font-size: 20px;
  3118. top: 0px;
  3119. cursor: pointer;
  3120. background: rgba($color: #000000, $alpha: .6);
  3121. width: 30px;
  3122. height: 30px;
  3123. display: flex;
  3124. justify-content: center;
  3125. align-items: center;
  3126. border-radius: 4px;
  3127. z-index: 5;
  3128. }
  3129. }
  3130. .xiaoImg:nth-child(5n) {
  3131. margin-right: 0;
  3132. }
  3133. .dayImgeItem {
  3134. display: flex;
  3135. flex-wrap: wrap;
  3136. }
  3137. .dayImgeItemFile {
  3138. width: 100%;
  3139. .title {
  3140. font-size: 20px;
  3141. }
  3142. .text {
  3143. margin: 10px 30px;
  3144. }
  3145. }
  3146. }
  3147. </style>