expense.vue 94 KB

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