expense.vue 112 KB

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