expense.vue 129 KB

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