expense.vue 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802
  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 @click="ssl(0)"> {{ $t('generalexpenses') }}</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" v-if="permissions.costAudit"><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. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits" size="mini">{{ $t('btn.submit') }}</el-button></p>
  53. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submitUpload" size="mini">{{ $t('batchupload') }}</el-button></p>
  54. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="customTypeOp" size="mini" v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
  55. </div>
  56. <!-- 上面部分 -->
  57. <div ref="staff" style="margin: 20px 20px 0 220px; width: 81.5%" >
  58. <div class="staff" v-if="!displayTable">
  59. <!-- 公共 -->
  60. <div class="public">
  61. <el-form :model="addForm" ref="mainAddForm" label-width="80px" :rules="addFormRules">
  62. <!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
  63. <!-- 报销人 -->
  64. <el-form-item :label="$t('peopleconcerned')" prop="ownerId">
  65. <!--普通员工只能自己填报自己的 -->
  66. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.ownerId" :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="!permissions.costAudit" filterable="true">
  67. <span v-for="(item, index) in users" :key="index">
  68. <el-option :label="item.name" :value="item.id"></el-option>
  69. </span>
  70. </el-select>
  71. <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>
  72. </el-form-item>
  73. <!-- 填报日期 -->
  74. <el-form-item :label="$t('fillinthedate')" style="position: relative;top: 38px;">
  75. <el-col :span="11">
  76. <el-date-picker type="date" :placeholder="$t('optiondate')" v-model="addForm.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  77. </el-col>
  78. </el-form-item>
  79. <!-- 发票张数 -->
  80. <el-form-item :label="$t('invoicenumber')">
  81. <el-input v-model="addForm.ticketNum" style="width: 150px"></el-input>
  82. </el-form-item>
  83. <!-- 费用类型 -->
  84. <el-form-item :label="$t('costtype')">
  85. <el-select v-model="addForm.type" disabled style="width: 150px" >
  86. <el-option :label="$t('yi-ban')" :value="0"></el-option>
  87. <el-option :label="$t('cha-lv')" :value="1"></el-option>
  88. <el-option :label="$t('wai-bao')" :value="2"></el-option>
  89. </el-select>
  90. </el-form-item>
  91. <!-- 备注 -->
  92. <el-form-item :label="$t('bei-zhu')" style="display: block; width: 70%; float: left;">
  93. <el-input type="textarea" v-model="addForm.remark" :autosize="{minRows: 2, maxRows: 2}"></el-input>
  94. </el-form-item>
  95. <!-- 总费用 -->
  96. <!-- <div style="float: left; line-height: 55px;margin-left:20px">总费用 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
  97. </el-form>
  98. </div>
  99. <!-- 按钮 -->
  100. <div class="pu_button">
  101. <span v-if="totalCost <= 0" style="color:#606266;">{{ $t('totalcostos') }} {{totalCost}} {{ $t('yuan') }}</span>
  102. <span v-else style="color:#606266;">{{ $t('totalcostos') }} ¥{{totalCost | numberToCurrency}} {{ $t('yuan') }}</span>
  103. <span class="pu_bu_x" style="margin-left:10px;" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> {{ $t('newinvoice') }}</span>
  104. </div>
  105. <!-- 表格 -->
  106. <div class="pu_table">
  107. <el-table
  108. :data="invoiceList"
  109. border
  110. style="width: 100%;height:100%"
  111. height="386px"
  112. @row-dblclick="dbclick">
  113. <el-table-column prop="projectName" :label="$t('subordinatetotheproject')" width="180">
  114. <template slot-scope="scope">
  115. <el-select size="small" v-model="scope.row.projectId" :placeholder="$t('other.project')" style="width: 150px" filterable popper-class="projectSelectPopperClass">
  116. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
  117. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  118. <span style="float: right;">{{ item.projectName }}</span>
  119. </el-option>
  120. </el-select>
  121. </template>
  122. </el-table-column>
  123. <el-table-column prop="happenDate" :label="$t('forthedate')" width="170px">
  124. <template slot-scope="scope">
  125. <el-date-picker size="small" v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
  126. </el-date-picker>
  127. </template>
  128. </el-table-column>
  129. <el-table-column :label="$t('invoices')" width="175px">
  130. <template slot-scope="scope">
  131. <el-select size="small" v-model="scope.row.invoiceType" :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px;">
  132. <el-option :label="$t('vATspecialinvoice')" value="0"></el-option>
  133. <el-option :label="$t('vATgeneralinvoice')" value="1"></el-option>
  134. </el-select>
  135. </template>
  136. </el-table-column>
  137. <el-table-column :label="$t('costtype')" width="175px">
  138. <template slot-scope="scope">
  139. <el-select size="small" v-model="scope.row.expenseType" :placeholder="$t('costtype')" style="width: 150px" >
  140. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName" :value="item.typeName" ></el-option>
  141. </el-select>
  142. </template>
  143. </el-table-column>
  144. <el-table-column :label="$t('amountoffees')" width="135px">
  145. <template slot-scope="scope">
  146. <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>
  147. </template>
  148. </el-table-column>
  149. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px">
  150. <template slot-scope="scope">
  151. <el-input size="small" v-model.number="scope.row.invoiceNo"></el-input>
  152. </template>
  153. </el-table-column>
  154. <el-table-column :label="$t('shui-shuai')" width="135px">
  155. <template slot-scope="scope">
  156. <el-input size="small" type= "number" v-model="scope.row.taxPercent" @input="zhi(scope.$index)"></el-input>
  157. </template>
  158. </el-table-column>
  159. <el-table-column :label="$t('taxs')" width="135px">
  160. <template slot-scope="scope">
  161. <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)"></el-input>
  162. </template>
  163. </el-table-column>
  164. <el-table-column :label="$t('bei-zhu')" width="135px">
  165. <template slot-scope="scope">
  166. <el-input size="small" v-model="scope.row.remark"></el-input>
  167. </template>
  168. </el-table-column>
  169. <el-table-column :label="$t('expensereimbursementvoucher')" width="135px">
  170. <template slot-scope="scope">
  171. <div @click="abl(scope.$index)">
  172. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :before-remove="beforeRemove" :http-request="fileonLoad" limit="1" name="multipartFile">
  173. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  174. </el-upload>
  175. </div>
  176. </template>
  177. </el-table-column>
  178. <el-table-column fixed="right"
  179. :label="$t('operation')">
  180. <template slot-scope="scope">
  181. <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>
  182. </template>
  183. </el-table-column>
  184. </el-table>
  185. </div>
  186. <!-- <el-button class="submits" type="warning" @click="submits">提交</el-button> -->
  187. </div>
  188. </div>
  189. </div>
  190. <!-- 下面部分 -->
  191. <div class="xiamian" ref="xiaomian" :style="'width: '+ (xiamianWidth - 400) +'px;float:right;background: #fff;position: relative;'">
  192. <div v-if="displayTable">
  193. <div style="padding-left:10px;padding-right:10px;">
  194. <div>
  195. <el-form label-width="70px" inline >
  196. <!-- 报销人 -->
  197. <el-form-item :label="$t('peopleconcerned')">
  198. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ownerId" size="small" clearable :placeholder="$t('selecttheapplicant')" style="width: 120px" :disabled="!permissions.costAudit" filterable="true">
  199. <span v-for="(item, index) in users" :key="index">
  200. <el-option :label="item.name" :value="item.id"></el-option>
  201. </span>
  202. </el-select>
  203. <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>
  204. </el-form-item>
  205. <!-- 单据编号 -->
  206. <el-form-item :label="$t('receiptnumber')" >
  207. <el-input v-model="code" size="small" :placeholder="$t('receiptnumber')" clearable="true" style="width: 120px"></el-input>
  208. </el-form-item>
  209. <!-- 费用类型 -->
  210. <el-form-item :label="$t('costtype')">
  211. <el-select v-model="type" size="small" :placeholder="$t('pleaseselectthetypeoffee')" clearable="true" style="width: 150px">
  212. <el-option :label="$t('generalcost')" value="0"></el-option>
  213. <el-option :label="$t('travelexpenses')" value="1"></el-option>
  214. <el-option :label="$t('outsourcingcost')" value="2"></el-option>
  215. </el-select>
  216. </el-form-item>
  217. <!-- 填报日期 -->
  218. <div style="display: inline-block;padding-left: 15px">
  219. <el-form-item :label="$t('fillinthedate')" >
  220. <el-date-picker
  221. v-model="date"
  222. type="daterange"
  223. value-format="yyyy-MM-dd"
  224. size="small"
  225. :range-separator="$t('other.to')"
  226. :start-placeholder="$t('time.startDate')"
  227. :end-placeholder="$t('time.endDate')"
  228. style="width: 280px">
  229. </el-date-picker>
  230. </el-form-item>
  231. <el-form-item>
  232. <el-button @click="getList" size="small">{{ $t('find') }}</el-button>
  233. </el-form-item>
  234. <el-form-item v-if="currentClick == '2-1'">
  235. <el-button @click="exportDocument()" size="small">单据导出</el-button>
  236. </el-form-item>
  237. </div>
  238. </el-form>
  239. </div>
  240. <el-divider ></el-divider>
  241. <!--列表-->
  242. <el-table ref="tab" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight - currentClickNum" style="width: 100%;" :summary-method="getSummaries" show-summary>
  243. <el-table-column prop="code" :label="$t('ticketnumber')"></el-table-column>
  244. <el-table-column prop="totalAmount" :label="$t('amountof')+ '('+$t('yuan')+')'" align="center">
  245. <template slot-scope="scope" >
  246. <span style="float:right;margin-right:20px">{{scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) : '0'}}</span>
  247. </template>
  248. </el-table-column>
  249. <el-table-column prop="ownerName" :label="$t('peopleconcerned')" >
  250. <template slot-scope="scope">
  251. <div>
  252. <span v-if="user.userNameNeedTranslate != 1">
  253. {{scope.row.ownerName}}
  254. </span>
  255. <span v-if="user.userNameNeedTranslate == 1">
  256. <ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data>
  257. </span>
  258. </div>
  259. </template>
  260. </el-table-column>
  261. <el-table-column prop="createDate" :label="$t('fillinthedate')" ></el-table-column>
  262. <el-table-column prop="ticketNum" :label="$t('invoicenumber')" ></el-table-column>
  263. <el-table-column prop="type" :label="$t('ppertype')" >
  264. <template slot-scope="scope">
  265. {{feeType[scope.row.type]}}
  266. </template>
  267. </el-table-column>
  268. <el-table-column prop="remark" :label="$t('bei-zhu')" width="180">
  269. <template slot-scope="scope">
  270. <span style="font-size:12px;">{{scope.row.remark}}</span>
  271. </template>
  272. </el-table-column>
  273. <el-table-column prop="status" :label="$t('state.states')" width="80">
  274. <template slot-scope="scope">
  275. <span v-if="scope.row.status == 1" class="waiting">{{statusTxt[scope.row.status]}}</span>
  276. <span v-if="scope.row.status == 2" class="rejected">{{statusTxt[scope.row.status]}}</span>
  277. <span v-if="scope.row.status == 0 || scope.row.status == 3" >{{statusTxt[scope.row.status]}}</span>
  278. </template>
  279. </el-table-column>
  280. <!-- <el-table-column prop="denyReason" :label="$t('dismissreason')" width="180">
  281. <template slot-scope="scope">
  282. <span style="font-size:12px;">{{scope.row.denyReason}}</span>
  283. </template>
  284. </el-table-column> -->
  285. <el-table-column fixed="right" :label="$t('operation')" :width="isAuditList?220:160">
  286. <template slot-scope="scope" >
  287. <div v-if="!isAuditList">
  288. <el-button icon="el-icon-view" circle size="mini" @click.stop.native="downloadByA(scope.row)" ></el-button>
  289. <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>
  290. <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>
  291. </div>
  292. <div v-if="isAuditList">
  293. <el-button size="mini" @click.stop.native="downloadByA(scope.row)" >{{ $t('cha-kan') }}</el-button>
  294. <el-button size="mini" style="margin-left:5px;" @click.stop.native="approve(scope.row)" >{{ $t('btn.through') }}</el-button>
  295. <el-button size="mini" style="margin-left:5px;" @click.stop.native="denyReason(scope.row)" >{{ $t('btn.rejected') }}</el-button>
  296. </div>
  297. </template>
  298. </el-table-column>
  299. </el-table>
  300. <!--工具条-->
  301. <el-col :span="24" class="toolbar">
  302. <el-pagination
  303. @size-change="handleSizeChange"
  304. @current-change="handleCurrentChange"
  305. :page-sizes="[20 , 50 , 80 , 100]"
  306. :page-size="20"
  307. layout="total, sizes, prev, pager, next"
  308. :total="total"
  309. style="float:right;"
  310. ></el-pagination>
  311. </el-col>
  312. </div>
  313. </div>
  314. </div>
  315. <!-- 我的单据报销展示 -->
  316. <el-dialog :title="$t('detailsofReimbursementvoucher')" :visible.sync="dialog" width="1000px">
  317. <!-- 内容主体 -->
  318. <div class="informant"><!-- 报销人 -->
  319. <el-form :model="ParticularsList" label-width="80px">
  320. <el-form-item :label="$t('peopleconcerned')" style="width: 270px" :rules="{ required: true, message: $t('pleaseselecttheapplicant'), trigger: 'blur' }">
  321. <el-input v-model="ParticularsList.ownerName" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId" v-if="user.userNameNeedTranslate != '1'"></el-input>
  322. <!-- <el-select v-model="ParticularsList.ownerId" :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId">
  323. <span v-for="(item, index) in users" :key="index">
  324. <el-option :label="item.name" :value="item.id"></el-option>
  325. </span>
  326. </el-select> -->
  327. <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>
  328. </el-form-item>
  329. <el-form-item :label="$t('fillinthedate')">
  330. <!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
  331. <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>
  332. </el-form-item>
  333. <el-form-item :label="$t('invoicenumber')">
  334. <el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
  335. </el-form-item>
  336. <el-form-item :label="$t('costtype')" style="width: 270px">
  337. <el-select v-model="ParticularsList.type" :placeholder="$t('defaultText.pleaseChoose')" :disabled="flg">
  338. <el-option :label="$t('yi-ban')" :value="0"></el-option>
  339. <el-option :label="$t('cha-lv')" :value="1"></el-option>
  340. <el-option :label="$t('wai-bao')" :value="2"></el-option>
  341. </el-select>
  342. </el-form-item>
  343. <el-form-item :label="$t('bei-zhu')" style="width: 280px">
  344. <el-input v-model="ParticularsList.remark" :disabled="flg"></el-input>
  345. </el-form-item>
  346. <el-form-item :label="$t('totalcostos')">
  347. ¥{{ParticularsList.totalAmount | numberToCurrency}}&nbsp;&nbsp;{{$t('yuan')}}
  348. </el-form-item>
  349. <!-- <template slot-scope="scope">
  350. <el-input v-model="scope.row.totalAmount" v-if="!flg"></el-input> 元
  351. <span v-else>{{scope.row.totalAmount}} 元</span>
  352. </template> -->
  353. </el-form>
  354. <div style="height:0;position:relative;" v-if="!flg">
  355. <span class="newInvoice" @click="addNewInvoice"> <i class="el-icon-circle-plus-outline"></i> {{ $t('newinvoice') }}</span>
  356. </div>
  357. <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
  358. <el-table-column prop="projectId" :label="$t('other.project')" width="155">
  359. <template slot-scope="scope">
  360. <el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')" style="width: 130px">
  361. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
  362. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  363. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  364. </el-option>
  365. </el-select>
  366. <!-- <span v-else>{{projectIdName[scope.$index].projectName}}</span> -->
  367. <div v-else>
  368. <div v-for="(item, index) in projectIdName" :key="index">
  369. <span v-if="item.id == scope.row.projectId">{{item.projectName}}</span>
  370. </div>
  371. </div>
  372. </template>
  373. </el-table-column>
  374. <el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
  375. <template slot-scope="scope">
  376. <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')">
  377. </el-date-picker>
  378. <span v-else>{{scope.row.happenDate}}</span>
  379. </template>
  380. </el-table-column>
  381. <el-table-column prop="invoiceType" :label="$t('invoices')" width="172">
  382. <template slot-scope="scope">
  383. <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType" :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px;">
  384. <el-option :label="$t('vATspecialinvoice')" :value="0"></el-option>
  385. <el-option :label="$t('vATgeneralinvoice')" :value="1"></el-option>
  386. </el-select>
  387. <span v-else>{{typeInvoic[scope.row.invoiceType]}}</span>
  388. </template>
  389. </el-table-column>
  390. <el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
  391. <template slot-scope="scope">
  392. <el-select v-if="!flg" size="small" v-model="scope.row.expenseType" :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px" >
  393. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName" :value="item.typeName" ></el-option>
  394. </el-select>
  395. <span v-else>{{scope.row.expenseType}}</span>
  396. </template>
  397. </el-table-column>
  398. <el-table-column prop="amount" :label="$t('amountoffees')" width="172">
  399. <template slot-scope="scope">
  400. <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>
  401. <span v-else>¥{{scope.row.amount}}</span>
  402. </template>
  403. </el-table-column>
  404. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="172">
  405. <template slot-scope="scope">
  406. <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
  407. <span v-else>{{scope.row.invoiceNo}}</span>
  408. </template>
  409. </el-table-column>
  410. <el-table-column prop="taxPercent" :label="$t('shui-shuai')" width="172">
  411. <template slot-scope="scope">
  412. <el-input size="small" v-if="!flg" v-model="scope.row.taxPercent" @input="zhiNum(scope.$index, scope)"></el-input>
  413. <span v-else>{{scope.row.taxPercent}}</span>
  414. </template>
  415. </el-table-column>
  416. <el-table-column prop="taxValue" :label="$t('taxs')+'('+$t('yuan')+')'" width="172">
  417. <template slot-scope="scope">
  418. <el-input size="small" v-if="!flg" v-model="scope.row.taxValue"></el-input>
  419. <span v-else>¥{{scope.row.taxValue}}</span>
  420. </template>
  421. </el-table-column>
  422. <el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
  423. <template slot-scope="scope">
  424. <el-input size="small" v-if="!flg" v-model="scope.row.remark"></el-input>
  425. <span v-else>{{scope.row.remark}}</span>
  426. </template>
  427. </el-table-column>
  428. <el-table-column prop="pic" :label="$t('expensereimbursementvoucher')" width="300">
  429. <template slot-scope="scope">
  430. <div v-if="!flg">
  431. <div @click="abl(scope.$index)" style="height: 35px;overflow: hidden;">
  432. <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">
  433. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  434. </el-upload>
  435. </div>
  436. </div>
  437. <div v-else>
  438. <span v-if="scope.row.pic">
  439. <div class="tups">
  440. <viewer :images="scope.row.pic">
  441. <img ref="imgsa" v-for="src in scope.row.pic" :src="src.url" :key="src.title">
  442. </viewer>
  443. </div>
  444. </span>
  445. <span v-else>{{ $t('nodocuments') }}</span>
  446. </div>
  447. </template>
  448. </el-table-column>
  449. <!-- 删除 -->
  450. <el-table-column fixed="right"
  451. :label="$t('operation')" v-if="!flg">
  452. <template slot-scope="scope">
  453. <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>
  454. </template>
  455. </el-table-column>
  456. </el-table>
  457. </div>
  458. <!-- <viewer :images="imgs">
  459. <img ref="imgsa" v-for="src in imgs" :src="src.url" :key="src.title">
  460. </viewer> -->
  461. <!-- 取消和确定 -->
  462. <span slot="footer" class="dialog-footer">
  463. <el-button @click="dialog = false">{{ $t('btn.cancel') }}</el-button>
  464. <el-button v-if="!flg" type="primary" @click="present()">{{ $t('btn.determine') }}</el-button>
  465. <el-button v-else type="primary" @click="dialog = false">{{ $t('btn.determine') }}</el-button>
  466. </span>
  467. </el-dialog>
  468. <!-- 批量上传 -->
  469. <el-dialog :title="$t('batchupload')" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth" width="500px">
  470. <p>1. {{ $t('other.download') }}
  471. <span>{{ $t('expensereimbursementimporttemplate') }}</span>
  472. <el-link type="primary" style="margin-left:5px;" :underline="false" :href="'./upload/'+$t('expensereimbursementimporttemplate')+'.xlsx'" :download="$t('expensereimbursementimporttemplate')+'.xlsx'">{{$t('expensereimbursementimporttemplate')}}.xlsx</el-link>
  473. </p>
  474. <p>2. {{ $t('exceltemplateanduploadit') }}。</p>
  475. <div style="padding-bottom:1em;">
  476. <div style="width:300px;margin:0 auto">
  477. <el-upload ref="upload" action="#" :auto-upload="false" multiple :on-change="fileListAdd" :on-remove="fileListDel">
  478. <el-button slot="trigger" size="small" type="primary" style="">{{ $t('selecthefile') }}</el-button>
  479. <el-button type="primary" size="small" style="margin-left:30px" :underline="false" :loading="importingData" @click="submitUploadSure" :disabled="fileList.length == 0">{{ $t('toupload') }}</el-button>
  480. <el-button size="small" style="margin-left:30px" @click="fileListClear">{{ $t('clears') }}</el-button>
  481. </el-upload>
  482. </div>
  483. </div>
  484. </el-dialog>
  485. <!-- 费用类型自定义 -->
  486. <el-dialog :title="$t('expensetypemanagement')" v-if="customTypeDialog" :visible.sync="customTypeDialog" customClass="customWidth" width="600px">
  487. <el-table :data="customTypeList" style="width:100%" height="400" :loading="customTypeListLoading">
  488. <el-table-column prop="typeName" :label="$t('costofname')" min-width="150"></el-table-column>
  489. <el-table-column :label="$t('costtype')" min-width="150">
  490. <template slot-scope="scope">
  491. <span>{{scope.row.mainType == 0 ? $t('generalcost') : (scope.row.mainType == 1 ? $t('travelexpenses') : $t('outsourcingcost'))}}</span>
  492. </template>
  493. </el-table-column>
  494. <el-table-column :label="$t('operation')" width="150">
  495. <template slot-scope="scope">
  496. <el-button @click="customTypeEditOp(scope.row)" size="small" type="primary">{{ $t('bian-ji') }}</el-button>
  497. <el-button @click="customTypeEditDelete(scope.row)" size="small" type="danger">{{ $t('btn.delete') }}</el-button>
  498. </template>
  499. </el-table-column>
  500. </el-table>
  501. <span slot="footer" class="dialog-footer">
  502. <el-button @click="customTypeDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  503. <el-button type="primary" @click="customTypeEditOp()" size="medium">{{ $t('newtype') }}</el-button>
  504. </span>
  505. <!-- 新增/编辑费用类型 -->
  506. <el-dialog :title="$t('addeditfeetypes')" v-if="customTypeEditDialog" :visible.sync="customTypeEditDialog" customClass="customWidth" width="400px" append-to-body>
  507. <el-form label-width="80px" :rules="editTypeDataRules" ref="editTypeDataForm" :model="editTypeData">
  508. <el-form-item :label="$t('belongstype')" style="margin:30px 0">
  509. <el-select v-model="editTypeData.mainType" size="medium" style="width:90%">
  510. <el-option :label="$t('generalcost')" :value="0"></el-option>
  511. <el-option :label="$t('travelexpenses')" :value="1"></el-option>
  512. <el-option :label="$t('outsourcingcost')" :value="2"></el-option>
  513. </el-select>
  514. </el-form-item>
  515. <el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
  516. <el-input id="editTypeDataInput" size="medium" v-model="editTypeData.typeName" :placeholder="$t('customizethfeetypename')" style="width:90%" @keyup.native="editTypeDataInput('editTypeDataInput')"></el-input>
  517. </el-form-item>
  518. </el-form>
  519. <span slot="footer" class="dialog-footer">
  520. <el-button @click="customTypeEditDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  521. <el-button type="primary" @click="customTypeEditSure" size="medium">{{ $t('btn.determine') }}</el-button>
  522. </span>
  523. </el-dialog>
  524. </el-dialog>
  525. <!-- 驳回弹出框 -->
  526. <el-dialog :title="$t('defaultText.pleaseEnterTheReason')" v-if="denyReasonDialog" :visible.sync="denyReasonDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  527. <div>
  528. <el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('reasonforyourdecisiontoreject')" />
  529. </div>
  530. <div slot="footer" class="dialog-footer">
  531. <el-button @click="denyReasonDialog = false" >{{ $t('btn.cancel') }}</el-button>
  532. <el-button type="primary" @click="deny()" >{{ $t('btn.determine') }}</el-button>
  533. </div>
  534. </el-dialog>
  535. </section>
  536. </template>
  537. <script>
  538. // 自定义select组件
  539. import selectCat from "@/components/select.vue"
  540. // 引入自定义级联组件
  541. import vueCascader from "@/components/cascader.vue"
  542. export default {
  543. name: "expense",
  544. components: {
  545. selectCat,
  546. vueCascader
  547. },
  548. props: {},
  549. data() {
  550. return {
  551. denyReasonDialog: false,
  552. denyForm:{
  553. reason: '',
  554. id: null
  555. },
  556. fileList: [],
  557. muHeight: document.documentElement.clientHeight || document.body.clientHeight,
  558. xiamianWidth: document.documentElement.clientWidth || document.body.clientWidth,
  559. imgs: [],
  560. addFormRules: {
  561. ownerId: [{ required: true, message: this.$t('pleaseselecttheapplicant'), trigger: "blur" }],
  562. createDate: [{ required: true, message: this.$t('pleaseselectadate'), trigger: "blur" }],
  563. },
  564. isAuditList: false,
  565. statusTxt:[this.$t('state.approved'),this.$t('state.WaitingAudit'), this.$t('state.rejected'), this.$t('state.undone')],
  566. user: JSON.parse(sessionStorage.getItem("user")),
  567. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  568. allExpList:[],
  569. expenseTypeList:[],
  570. tian:{a: null,b: null,c: null,d: null,e: null,f: null,g: null,h: null,},
  571. feeType:[this.$t('generalcost'),this.$t('travelexpenses'),this.$t('outsourcingcost')],
  572. typeInvoic: [this.$t('vATspecialinvoice'), this.$t('vATgeneralinvoice')],
  573. listLoading:false,
  574. tableHeight:0,
  575. list:[],
  576. total:0,
  577. code:null,
  578. date:null,
  579. type:null,
  580. ownerId: null,
  581. users: [], // 人员信息
  582. displayTable: false,
  583. getLists: [],
  584. ProjectList: [], // 项目列表
  585. companyId: [], // 人员的id
  586. dialogVisible: false,
  587. code: null,
  588. addForm:{code:null,ownerId:null,createDate: null, ticketNum:1,type:0,remark:null,totalAmount:0,},
  589. page: 1,
  590. size:20,
  591. form: {happenDate: null,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null},
  592. invoiceList: [],
  593. kkk: null, //
  594. ddId: null,
  595. dldl: [],
  596. isOK: false,
  597. z : null,
  598. value: null,
  599. dialog: false, // 单据查看展示
  600. ParticularsList: [],
  601. projectIdName: [], // 点击查看的项目名
  602. flg: false, // 是否禁用
  603. shuz: [this.$t('generalexpenses'), this.$t('travelexpensess'), this.$t('outsourcingcostshouldbereported')],
  604. ins: 0,
  605. apl: '',
  606. diz: 'http://worktime.ttkuaiban.com',
  607. importDialog: false,
  608. importingData: false,
  609. currentClick: '',
  610. currentClickNum: 0,
  611. // 费用类型自定义
  612. customTypeDialog: false,
  613. customTypeList: [],
  614. customTypeListLoading: false,
  615. customTypeEditDialog: false,
  616. editTypeData: {},
  617. editTypeDataRules:{
  618. typeName: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
  619. },
  620. };
  621. },
  622. computed: {
  623. totalCost : function(){
  624. let num = 0
  625. for(let i in this.invoiceList){
  626. if(this.invoiceList[i].amount){
  627. num += this.invoiceList[i].amount*1
  628. }
  629. }
  630. return num
  631. }
  632. },
  633. watch: {},
  634. created() {
  635. let height = window.innerHeight;
  636. this.tableHeight = height - 195;
  637. const that = this;
  638. window.onresize = function temp() {
  639. that.tableHeight = window.innerHeight - 195;
  640. };
  641. },
  642. mounted() {
  643. this.getNextCode();
  644. this.getUsers() // 获取人员信息
  645. this.getList() // 获取单据列表
  646. this.getProjectList();
  647. this.getExpList();
  648. },
  649. filters: {
  650. numberToCurrency(value) {
  651. if (!value) return '0.00'
  652. // console.log('v=='+value);
  653. value = value.toFixed(2)
  654. const intPart = Math.trunc(value)
  655. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  656. let floatPart = '.00'
  657. const valueArray = value.toString().split('.')
  658. if (valueArray.length === 2) { // 有小数部分
  659. floatPart = valueArray[1].toString() // 取得小数部分
  660. return intPartFormat + '.' + floatPart
  661. }
  662. return intPartFormat + floatPart
  663. }
  664. },
  665. methods: {
  666. // 费用类型自定义
  667. customTypeOp(){
  668. this.customTypeDialog = true
  669. this.customTypeListLoading = true
  670. this.getExpList()
  671. },
  672. customTypeEditOp(row){
  673. this.customTypeEditDialog = true
  674. if(row){
  675. this.editTypeData = row
  676. }else{
  677. this.editTypeData = {
  678. mainType: 0,
  679. typeName: '',
  680. companyId: this.user.companyId
  681. }
  682. }
  683. },
  684. customTypeEditSure(){
  685. this.$refs.editTypeDataForm.validate(valid => {
  686. if (valid) {
  687. this.http.post('/expense-type/addOrMod',this.editTypeData,
  688. res => {
  689. if(res.code == 'ok'){
  690. this.customTypeEditDialog = false
  691. this.customTypeOp()
  692. }else{
  693. this.$message({
  694. message: res.msg,
  695. type: 'error'
  696. })
  697. }
  698. },err => {
  699. this.$message({
  700. message: err,
  701. type: 'error'
  702. })
  703. })
  704. }})
  705. },
  706. customTypeEditDelete(row){
  707. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('other.prompts'),{
  708. confirmButtonText: this.$t('btn.determine'),
  709. cancelButtonText: this.$t('btn.cancel'),
  710. type: 'warning'
  711. }).then(()=>{
  712. this.http.post('/expense-type/delete',{
  713. id: row.id
  714. },
  715. res => {
  716. if(res.code == 'ok'){
  717. this.customTypeEditDialog = false
  718. this.customTypeOp()
  719. }else{
  720. this.$message({
  721. message: res.msg,
  722. type: 'error'
  723. })
  724. }
  725. },err => {
  726. this.$message({
  727. message: err,
  728. type: 'error'
  729. })
  730. })
  731. }).catch(()=>{
  732. this.$message({
  733. type: 'info',
  734. message: this.$t('thedeletionhasbeencancelled')
  735. })
  736. })
  737. },
  738. editTypeDataInput(typeName){
  739. let inpu = document.getElementById(typeName);
  740. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  741. },
  742. submitUpload(){
  743. this.importDialog = true
  744. },
  745. fileListAdd(file,fileList){
  746. let str = file.name.split(".");
  747. let format = str[str.length - 1];
  748. if (format != "xls" && format != "xlsx") {
  749. this.$message({
  750. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  751. type: "error"
  752. });
  753. fileList.splice(fileList.length-1)
  754. }
  755. this.fileList = fileList
  756. },
  757. fileListDel(file,fileList){
  758. this.fileList = fileList
  759. },
  760. fileListClear(){
  761. this.$refs.upload.clearFiles();
  762. this.fileList = []
  763. },
  764. submitUploadSure(){
  765. this.$confirm(this.$t('confirmtoupload'),this.$t('other.prompts'),{
  766. confirmButtonText: this.$t('btn.determine'),
  767. cancelButtonText: this.$t('btn.cancel'),
  768. type: 'success'
  769. }).then(()=>{
  770. let formData = new FormData();
  771. for(let i in this.fileList){
  772. formData.append("files", this.fileList[i].raw);
  773. }
  774. this.importingData = true
  775. // console.log(formData,this.fileList);
  776. // return
  777. this.http.uploadFile( '/expense-sheet/importData', formData,
  778. res => {
  779. if (res.code == "ok") {
  780. this.importingData = false
  781. this.$refs.upload.clearFiles();
  782. this.fileList = []
  783. this.$message({
  784. message: this.$t('uploadedsuccessfully'),
  785. type: "success"
  786. });
  787. } else {
  788. this.importingData = false
  789. this.$message({
  790. message: res.msg,
  791. type: "error"
  792. });
  793. }
  794. },error => {
  795. this.importingData = false
  796. this.$message({
  797. message: error,
  798. type: "error"
  799. });
  800. });
  801. }).catch(()=>{})
  802. },
  803. restrictNumber(targetId) {
  804. let inpu = document.getElementById(targetId);
  805. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  806. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  807. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  808. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  809. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  810. inpu.value = parseFloat(inpu.value);
  811. }
  812. },
  813. approve(item) {
  814. //审核通过
  815. this.http.post('/expense-sheet/approve', {id:item.id
  816. },
  817. res => {
  818. if (res.code == "ok") {
  819. this.getList();
  820. } else {
  821. this.$message({
  822. message: res.msg,
  823. type: "error"
  824. });
  825. }
  826. },
  827. error => {
  828. this.$message({
  829. message: error,
  830. type: "error"
  831. });
  832. });
  833. },
  834. denyReason(item){
  835. this.denyForm.id = item.id
  836. this.denyForm.reason = ''
  837. // this.denyReasonDialog = true
  838. this.deny()
  839. },
  840. deny() {
  841. //审核驳回
  842. this.http.post('/expense-sheet/deny', {
  843. id: this.denyForm.id,
  844. denyReason: this.denyForm.reason
  845. },
  846. res => {
  847. if (res.code == "ok") {
  848. this.denyReasonDialog = false
  849. this.getList();
  850. } else {
  851. this.$message({
  852. message: res.msg,
  853. type: "error"
  854. });
  855. }
  856. },
  857. error => {
  858. this.$message({
  859. message: error,
  860. type: "error"
  861. });
  862. });
  863. },
  864. getExpList() {
  865. this.http.post('/expense-type/getList', {
  866. },
  867. res => {
  868. this.customTypeListLoading = false
  869. if (res.code == "ok") {
  870. this.allExpList = res.data;
  871. this.customTypeList = res.data
  872. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == 0);
  873. if(!res.data != res.data.length == 0){
  874. this.http.post('/company/settingExpenseType',{},res => {
  875. if(res.code == 'ok'){}else{this.$message({message: res.msg,type: 'error'})}
  876. },err => {this.$message({message: err,type: 'error'})})
  877. }
  878. } else {
  879. this.$message({
  880. message: res.msg,
  881. type: "error"
  882. });
  883. }
  884. },
  885. error => {
  886. this.customTypeListLoading = false
  887. this.$message({
  888. message: error,
  889. type: "error"
  890. });
  891. });
  892. },
  893. // 单据查看
  894. downloadByA(val) {
  895. this.dialog = true
  896. this.flg = true;
  897. this.getParticulars(val.id);
  898. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == val.type);
  899. },
  900. // 单据编辑
  901. showEditName(val) {
  902. this.dialog = true,
  903. this.flg = false,
  904. delete val.invoiceList
  905. this.getParticulars(val.id)
  906. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == val.type);
  907. },
  908. staffs(key, keyPath) { // 控制员工费用报表
  909. if (keyPath[0] == '1') {
  910. this.displayTable = false;
  911. } else {
  912. this.displayTable = true;
  913. this.getList();
  914. }
  915. // currentClick
  916. // console.log(key, keyPath)
  917. this.currentClick = key
  918. key == '2-1' ? this.currentClickNum = 70 : this.currentClickNum = 0
  919. },
  920. bills(audit) { // 控制
  921. this.isAuditList = audit;
  922. this.getList();
  923. this.displayTable = true;
  924. },
  925. present(){
  926. this.dialog = false
  927. this.adds();
  928. },
  929. // 删除操作
  930. delec(ids) {
  931. // console.log('删除操作', ids);
  932. this.ParticularsList.invoiceList.splice(ids, 1)
  933. this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
  934. this.kan()
  935. },
  936. adds() {
  937. // happenDate
  938. // console.log(this.ParticularsList.invoiceList, '123')
  939. var spl = this.ParticularsList.invoiceList
  940. for(var i in spl) {
  941. if(spl[i].pic) {
  942. if(spl[i].pic[0].name) {
  943. spl[i].pic = spl[i].pic[0].name
  944. }
  945. }
  946. }
  947. // console.log(spl)
  948. // return
  949. this.ParticularsList.items = JSON.stringify(this.ParticularsList.invoiceList)//这里要传发票列表的json转string
  950. delete this.ParticularsList.invoiceList
  951. this.http.post('/expense-sheet/add', this.ParticularsList,
  952. res => {
  953. if (res.code == "ok") {
  954. this.bills(this.isAuditList);
  955. this.$message({
  956. message: this.$t('editsuccess'),
  957. type: "success"
  958. });
  959. } else {
  960. this.$message({
  961. message: res.msg,
  962. type: "error"
  963. });
  964. }
  965. },
  966. error => {
  967. this.$message({
  968. message: error,
  969. type: "error"
  970. });
  971. });
  972. },
  973. // 获取人员信息
  974. getUsers() {
  975. // this.http.post(this.port.manage.list, {
  976. // departmentId: -1,
  977. // pageIndex: 1,
  978. // // pageSize: 99999
  979. // pageSize: -1
  980. // },
  981. this.http.post('/user/getSimpleActiveUserList', {},
  982. res => {
  983. if (res.code == "ok") {
  984. // this.users = res.data.records;
  985. this.users = res.data;
  986. if (!this.permissions.costAudit) {
  987. this.addForm.ownerId = this.user.id;
  988. this.addForm.status = 1;
  989. this.$forceUpdate()
  990. }
  991. } else {
  992. this.$message({
  993. message: res.msg,
  994. type: "error"
  995. });
  996. }
  997. },
  998. error => {
  999. this.$message({
  1000. message: error,
  1001. type: "error"
  1002. });
  1003. });
  1004. },
  1005. // 提交事件
  1006. submits() {
  1007. this.$refs.mainAddForm.validate(valid => {
  1008. if (valid) {
  1009. if (this.invoiceList.length == 0) {
  1010. this.$message({
  1011. message: this.$t('pleaseaddtheinvoice'),
  1012. type: "error"
  1013. });
  1014. return;
  1015. }
  1016. let strObj = {
  1017. project: '',
  1018. datas: '',
  1019. fptype: '',
  1020. fyType: '',
  1021. rmb: '',
  1022. flg: false
  1023. }
  1024. for(var i in this.invoiceList) {
  1025. if(!this.invoiceList[i].projectId) {
  1026. strObj.project = '所属项目'
  1027. strObj.flg = true
  1028. }
  1029. if(!this.invoiceList[i].invoiceType || this.invoiceList[i].invoiceType == '') {
  1030. strObj.fptype = '发票种类'
  1031. strObj.flg = true
  1032. }
  1033. if(!this.invoiceList[i].expenseType || this.invoiceList[i].expenseType == '') {
  1034. strObj.fyType = '费用类型'
  1035. strObj.flg = true
  1036. }
  1037. if(!this.invoiceList[i].happenDate || this.invoiceList[i].happenDate == '') {
  1038. strObj.datas = '费用日期'
  1039. strObj.flg = true
  1040. }
  1041. if(!this.invoiceList[i].amount || this.invoiceList[i].amount == '') {
  1042. strObj.rmb = '费用金额'
  1043. strObj.flg = true
  1044. }
  1045. }
  1046. if(strObj.flg) {
  1047. this.$message({
  1048. message: `${strObj.project} ${strObj.fptype} ${strObj.fyType} ${strObj.datas} ${strObj.rmb} 请填写完整`,
  1049. type: "error"
  1050. });
  1051. return;
  1052. }
  1053. // return
  1054. this.add();
  1055. this.addForm = {
  1056. code:null,
  1057. ownerId:this.user.id,
  1058. createDate: null,
  1059. type:this.z,
  1060. ticketNum:1,remark:null,totalAmount:0,}
  1061. this.invoiceList = []
  1062. }
  1063. });
  1064. },
  1065. // 点击新增
  1066. addxz() {
  1067. this.form = {happenDate: null ,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null,pic: null},
  1068. this.invoiceList.push(this.form)
  1069. },
  1070. addNewInvoice(){
  1071. this.form = {happenDate: null,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null,pic: null},
  1072. this.ParticularsList.invoiceList.push(this.form)
  1073. this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
  1074. },
  1075. //获取项目列表
  1076. getProjectList() {
  1077. this.http.post( this.port.project.list, {},
  1078. res => {
  1079. if (res.code == "ok") {
  1080. this.projectList = res.data;
  1081. } else {
  1082. this.$message({
  1083. message: res.msg,
  1084. type: "error"
  1085. });
  1086. }
  1087. },
  1088. error => {
  1089. this.$message({
  1090. message: error,
  1091. type: "error"
  1092. });
  1093. });
  1094. },
  1095. //获取单据列表
  1096. getList() {
  1097. // console.log(this.date)
  1098. var stat = ''
  1099. var end = ''
  1100. if(this.date) {
  1101. stat = this.date[0]
  1102. end = this.date[1]
  1103. }
  1104. var param = {pageIndex: this.page,
  1105. pageSize: this.size,
  1106. code: this.code,
  1107. // createDate: this.date,
  1108. startDate: stat,
  1109. endDate: end,
  1110. ownerId:this.ownerId,
  1111. type:this.type,
  1112. };
  1113. if (this.isAuditList) {
  1114. param.status = 1;
  1115. }
  1116. this.list = [];
  1117. this.total = 0;
  1118. this.http.post('/expense-sheet/list', param,
  1119. res => {
  1120. if (res.code == "ok") {
  1121. this.list = res.data.records;
  1122. this.total = res.data.total;
  1123. } else {
  1124. this.$message({
  1125. message: res.msg,
  1126. type: "error"
  1127. });
  1128. }
  1129. },
  1130. error => {
  1131. this.$message({
  1132. message: error,
  1133. type: "error"
  1134. });
  1135. });
  1136. },
  1137. //删除单据
  1138. deletes(id) {
  1139. this.http.post('/expense-sheet/delete', {id: id},
  1140. res => {
  1141. if (res.code == "ok") {
  1142. this.getList()
  1143. this.$message({
  1144. message: this.$t('message.successfullyDeleted'),
  1145. type: "success"
  1146. });
  1147. } else {
  1148. this.$message({
  1149. message: res.msg,
  1150. type: "error"
  1151. });
  1152. }
  1153. },
  1154. error => {
  1155. this.$message({
  1156. message: error,
  1157. type: "error"
  1158. });
  1159. });
  1160. },
  1161. //创建单据
  1162. add() {
  1163. // happenDate
  1164. this.addForm.items = JSON.stringify(this.invoiceList)//这里要传发票列表的json转string
  1165. this.addForm.totalAmount = this.totalCost
  1166. this.http.post('/expense-sheet/add', this.addForm,
  1167. res => {
  1168. if (res.code == "ok") {
  1169. this.$message({
  1170. message: this.$t('message.fillinsuccessfully'),
  1171. type: "success"
  1172. });
  1173. this.getNextCode()
  1174. } else {
  1175. this.$message({
  1176. message: res.msg,
  1177. type: "error"
  1178. });
  1179. }
  1180. },
  1181. error => {
  1182. this.$message({
  1183. message: error,
  1184. type: "error"
  1185. });
  1186. });
  1187. },
  1188. //获取单据编码
  1189. getNextCode() {
  1190. this.http.post('/expense-sheet/getNextCode', {
  1191. },
  1192. res => {
  1193. if (res.code == "ok") {
  1194. this.addForm.code = res.data;
  1195. } else {
  1196. this.$message({
  1197. message: res.msg,
  1198. type: "error"
  1199. });
  1200. }
  1201. },
  1202. error => {
  1203. this.$message({
  1204. message: error,
  1205. type: "error"
  1206. });
  1207. });
  1208. },
  1209. // 获取查看单据的数据
  1210. getParticulars(id) {
  1211. this.http.post('/expense-sheet/getDetail', {id: id},
  1212. res => {
  1213. if (res.code == "ok") {this
  1214. // this.ParticularsList = res.data
  1215. var s = []
  1216. // var b = []
  1217. for(var i in res.data.invoiceList) {
  1218. if(res.data.invoiceList[i].pic) {
  1219. var b = []
  1220. var j = {}
  1221. var img = this.diz + '/upload/' + res.data.invoiceList[i].pic
  1222. j.url = img
  1223. j.title = this.$t('expensereimbursementvoucher'),
  1224. j.name = res.data.invoiceList[i].pic
  1225. b.push(j)
  1226. res.data.invoiceList[i].pic = b
  1227. // console.log(res.data.invoiceList[i].pic)
  1228. }
  1229. }
  1230. this.ParticularsList = res.data
  1231. for(var i = 0; i <= this.ParticularsList.invoiceList.length - 1; i++) {
  1232. s.push(this.ParticularsList.invoiceList[i].projectId)
  1233. }
  1234. this.projectIdName = this.projectList.filter( item => {return s.indexOf(item.id) !== -1})
  1235. // this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
  1236. // console.log(res.data, '查看当前状态');
  1237. // console.log(this.ParticularsList)
  1238. } else {
  1239. this.$message({
  1240. message: res.msg,
  1241. type: "error"
  1242. });
  1243. }
  1244. },
  1245. error => {
  1246. this.$message({
  1247. message: error,
  1248. type: "error"
  1249. });
  1250. })
  1251. },
  1252. //分页
  1253. handleCurrentChange(val) {
  1254. this.page = val;
  1255. this.getList();
  1256. },
  1257. handleSizeChange(val) {
  1258. this.size = val;
  1259. this.getList();
  1260. },
  1261. deleteItem(item) {
  1262. this.$confirm(this.$t('yousureyouwanttodelete'), this.$t('other.prompts'), {
  1263. //type: 'warning'
  1264. }).then(() => {
  1265. this.http.post('/expense-sheet/delete', {id:item.id},
  1266. res => {
  1267. if (res.code == "ok") {
  1268. this.getList();
  1269. } else {
  1270. this.$message({
  1271. message: res.msg,
  1272. type: "error"
  1273. });
  1274. }
  1275. },
  1276. error => {
  1277. this.$message({
  1278. message: error,
  1279. type: "error"
  1280. });
  1281. });
  1282. });
  1283. },
  1284. // 点击删除
  1285. chanc(k) {
  1286. this.invoiceList.splice(k, 1)
  1287. },
  1288. // 双击
  1289. dbclick(row, event, column){
  1290. this.isOK = true
  1291. },
  1292. oosk(s){
  1293. this.isOK = false
  1294. },
  1295. ssl(index) {
  1296. this.z = index
  1297. this.addForm.type = index
  1298. this.ins = index;
  1299. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == this.ins);
  1300. this.addForm.ownerId = this.user.id;
  1301. this.getNextCode();
  1302. },
  1303. // 点击侧边栏事件
  1304. side() {
  1305. if(this.$refs.side.style.left < '0px') {
  1306. this.$refs.sidebars.style.width = '1px'
  1307. this.$refs.sid.style.left = '1px'
  1308. this.$refs.side.style.left = '1px'
  1309. this.$refs.sideI.className = 'el-icon-arrow-right'
  1310. this.$refs.staff.style.margin = '20px 20px 0 20px'
  1311. this.$refs.staff.style.width = '95%'
  1312. this.$refs.xiaomian.style.width = '100%'
  1313. this.$refs.headHe.style.paddingLeft = '20px'
  1314. this.currentClickNum = 0
  1315. } else {
  1316. this.$refs.sidebars.style.width = '200px'
  1317. this.$refs.sid.style.left = '200px'
  1318. this.$refs.side.style.left = '-19px'
  1319. this.$refs.sideI.className = 'el-icon-arrow-left'
  1320. this.$refs.staff.style.margin = '20px 20px 0 220px'
  1321. this.$refs.staff.style.width = '81%'
  1322. this.$refs.xiaomian.style.width = '85%'
  1323. this.$refs.headHe.style.paddingLeft = '220px'
  1324. this.currentClickNum = 70
  1325. }
  1326. },
  1327. // 费用金额失去焦点时触发
  1328. shiqu(){
  1329. this.addForm.totalAmount = this.invoiceList.reduce((prev, next) => {
  1330. return prev + parseFloat(next.amount);
  1331. }, 0)
  1332. },
  1333. kan(){
  1334. this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
  1335. return prev + parseFloat(next.amount)
  1336. }, 0)
  1337. },
  1338. zhi(e) {
  1339. // console.log('看看值', e)
  1340. var i = e
  1341. if(this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
  1342. return
  1343. }
  1344. this.invoiceList[i].taxValue = this.invoiceList[i].amount * this.invoiceList[i].taxPercent / 100
  1345. // console.log(this.invoiceList[i].amount, this.invoiceList[i].taxPercent)
  1346. var shui = this.invoiceList[i].taxPercent / 100 // 税率
  1347. var zhi = this.invoiceList[i].amount / (1 + shui) * shui
  1348. this.invoiceList[i].taxValue = zhi.toFixed(2)
  1349. },
  1350. zhiNum(i, val) {
  1351. // console.log('看看值', i, val)
  1352. // console.log(this.ParticularsList.invoiceList)
  1353. 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') {
  1354. return
  1355. }
  1356. var shui = this.ParticularsList.invoiceList[i].taxPercent / 100
  1357. var zhi = this.ParticularsList.invoiceList[i].amount / (1 + shui) * shui
  1358. this.ParticularsList.invoiceList[i].taxValue = zhi.toFixed(2)
  1359. },
  1360. zhis(e) {
  1361. var i = e
  1362. this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
  1363. },
  1364. fileonLoad(item) {
  1365. //首先判断文件类型
  1366. let str = item.file.name.split(".");
  1367. let format = str[str.length - 1];
  1368. if (format != "jpg" && format != "png" && format != "pdf") {
  1369. this.$message({
  1370. message: this.$t('pleaseselectpictures'),
  1371. type: "error"
  1372. });
  1373. } else {
  1374. this.listLoading = true;
  1375. let formData = new FormData();
  1376. formData.append("multipartFile", item.file);
  1377. this.http.uploadFile('/common/uploadFile', formData,
  1378. res => {
  1379. this.listLoading = false;
  1380. if (res.code == "ok") {
  1381. this.$message({
  1382. message: this.$t('uploadedsuccessfully'),
  1383. type: "success"
  1384. });
  1385. // this.getList();
  1386. this.invoiceList[this.apl].pic = res.data
  1387. // console.log(this.invoiceList)
  1388. } else {
  1389. this.$message({
  1390. message: res.msg,
  1391. type: "error"
  1392. });
  1393. }
  1394. },
  1395. error => {
  1396. this.listLoading = false;
  1397. this.$message({
  1398. message: error,
  1399. type: "error"
  1400. });
  1401. });
  1402. }
  1403. },
  1404. abl(e) {
  1405. this.apl = e
  1406. },
  1407. beforeRemove(file, fileList) {
  1408. var that = this
  1409. setTimeout(function () {
  1410. that.invoiceList[that.apl].pic = null
  1411. }, 200)
  1412. },
  1413. fileonLoads(item) {
  1414. //首先判断文件类型
  1415. let str = item.file.name.split(".");
  1416. let format = str[str.length - 1];
  1417. if (format != "jpg" && format != "png" && format != "pdf") {
  1418. this.$message({
  1419. message: this.$t('pleaseselectpictures'),
  1420. type: "error"
  1421. });
  1422. } else {
  1423. this.listLoading = true;
  1424. let formData = new FormData();
  1425. formData.append("multipartFile", item.file);
  1426. this.http.uploadFile('/common/uploadFile', formData,
  1427. res => {
  1428. this.listLoading = false;
  1429. if (res.code == "ok") {
  1430. this.$message({
  1431. message: this.$t('uploadedsuccessfully'),
  1432. type: "success"
  1433. });
  1434. // this.getList();
  1435. this.ParticularsList.invoiceList[this.apl].pic = res.data
  1436. // console.log(this.invoiceList)
  1437. } else {
  1438. this.$message({
  1439. message: res.msg,
  1440. type: "error"
  1441. });
  1442. }
  1443. },
  1444. error => {
  1445. this.listLoading = false;
  1446. this.$message({
  1447. message: error,
  1448. type: "error"
  1449. });
  1450. });
  1451. }
  1452. },
  1453. beforeRemoves(file, fileList) {
  1454. var that = this
  1455. setTimeout(function () {
  1456. // this.ParticularsList.invoiceList
  1457. that.ParticularsList.invoiceList[that.apl].pic = null
  1458. }, 200)
  1459. },
  1460. imgUrl(img) {
  1461. // var imgss = this.diz + '/upload/' + img
  1462. // var sp = []
  1463. // var is = {}
  1464. // is.url = imgss
  1465. // is.title = 1
  1466. // sp.push(is)
  1467. // this.imgs = sp
  1468. // console.log(imgss)
  1469. // console.log(this.$refs.imgsa)
  1470. // this.$refs.imgsa.click()
  1471. // console.log(location.protocol, location.host)
  1472. // console.log(location.protocol + '//' + location.host + imgs)
  1473. },
  1474. // 合计
  1475. getSummaries(param) {
  1476. const { columns, data } = param;
  1477. const sums = [];
  1478. columns.forEach((column, index) => {
  1479. if (index === 0) {
  1480. sums[index] = this.$t('other.totals');
  1481. return;
  1482. }
  1483. if(index === 1) {
  1484. const values = data.map(item => Number(item[column.property]));
  1485. if (!values.every(value => isNaN(value))) {
  1486. sums[index] = values.reduce((prev, curr) => {
  1487. const value = Number(curr);
  1488. if (!isNaN(value)) {
  1489. return prev + curr;
  1490. } else {
  1491. return prev;
  1492. }
  1493. }, 0);
  1494. var zhi = +sums[index] + 0
  1495. var sl = zhi.toFixed(2)
  1496. sl += this.$t('yuan');
  1497. } else {
  1498. sums[index] = '';
  1499. }
  1500. } else {
  1501. sums[index] = '';
  1502. }
  1503. });
  1504. // console.log(sums, 123)
  1505. this.$nextTick(()=>{ this.$refs.tab.doLayout()})
  1506. return sums;
  1507. },
  1508. // 自定义组件事件
  1509. selectCal(obj) {
  1510. if(obj.distinction == '1') {
  1511. this.addForm.ownerId = obj.id
  1512. } else if(obj.distinction == '2') {
  1513. this.ownerId = obj.id
  1514. } else if(obj.distinction == '3') {
  1515. this.ParticularsList.ownerId = obj.id
  1516. }
  1517. },
  1518. // 单据导出
  1519. exportDocument() {
  1520. var stat = ''
  1521. var end = ''
  1522. if(this.date) {
  1523. stat = this.date[0]
  1524. end = this.date[1]
  1525. }
  1526. this.http.post('/expense-sheet/exportList', {
  1527. code: this.code,
  1528. startDate: stat,
  1529. endDate: end,
  1530. ownerId:this.ownerId,
  1531. type:this.type,
  1532. },
  1533. res => {
  1534. if (res.code == "ok") {
  1535. var filePath = res.data;
  1536. const a = document.createElement('a'); // 创建a标签
  1537. a.setAttribute('download', '费用报销单据列表');// download属性
  1538. a.setAttribute('href', filePath);// href链接
  1539. a.click(); //自执行点击事件
  1540. a.remove();
  1541. } else {
  1542. this.$message({
  1543. message: res.msg,
  1544. type: "error"
  1545. });
  1546. }
  1547. },
  1548. error => {
  1549. this.$message({
  1550. message: error,
  1551. type: "error"
  1552. });
  1553. });
  1554. }
  1555. },
  1556. };
  1557. </script>
  1558. <style scoped>
  1559. .tups {
  1560. width: 100%;
  1561. height: 25px;
  1562. position: relative;
  1563. z-index: 99;
  1564. overflow: hidden;
  1565. }
  1566. .tups img {
  1567. height: 25px !important;
  1568. position: relative;
  1569. z-index: 99;
  1570. }
  1571. .viewer-canvas {
  1572. position: absolute;
  1573. z-index: 9 !important;
  1574. }
  1575. .icl {
  1576. margin-top: -25px !important;
  1577. }
  1578. /* 费用报销标题 */
  1579. .headine {
  1580. width: 100%;
  1581. height: 46.4px;
  1582. line-height: 46.4px;
  1583. background: #fff;
  1584. box-sizing: border-box;
  1585. }
  1586. .headine h3 {
  1587. margin: 0;
  1588. display: inline-block;
  1589. box-sizing: border-box;
  1590. color: #999;
  1591. }
  1592. .headine p {
  1593. display: inline-block;
  1594. margin: 0;
  1595. }
  1596. /* /费用报销标题 */
  1597. .sidebars {
  1598. height: 100%;
  1599. position: absolute;
  1600. border-right: 1px solid #E6E6E6;
  1601. z-index: 2;
  1602. top: 0;
  1603. }
  1604. .sidebars h3 {
  1605. margin: 0;
  1606. line-height: 45px;
  1607. background: #ffffff;
  1608. font-weight: normal;
  1609. color: #666;
  1610. padding-left: 20px;
  1611. }
  1612. .sidebars .el-col-12 {
  1613. width: 100%
  1614. }
  1615. .public {
  1616. height: 180px;
  1617. border-bottom: 1px solid #ddd;
  1618. }
  1619. .public .el-form-item {
  1620. display: inline-block;
  1621. }
  1622. .pu_button {
  1623. text-align: right;
  1624. width: 100%;
  1625. padding: 24px 30px;
  1626. box-sizing: border-box;
  1627. }
  1628. .pu_bu_x .pu_bu_t {
  1629. display: inline-block;
  1630. }
  1631. .pu_bu_x {
  1632. margin-right: 20px;
  1633. color: #20A0F7;
  1634. cursor: pointer;
  1635. }
  1636. .pu_bu_t {
  1637. color: #20A0F7;
  1638. cursor: pointer;
  1639. display: block;
  1640. float: right;
  1641. position:
  1642. relative;
  1643. top: -20px;
  1644. right: 63px;
  1645. }
  1646. .pu_table {
  1647. margin-left: 10px;
  1648. }
  1649. .pu_bu_t:hover {
  1650. color: #7bbcff;
  1651. }
  1652. .pu_bu_x:hover {
  1653. color: #7bbcff;
  1654. }
  1655. /* 我的单据报销凭证 */
  1656. .staff{
  1657. border-left: 1px solid #fff;
  1658. border-top: 1px solid #fff;
  1659. border-right: 1px solid #fff;
  1660. background: #fff;
  1661. }
  1662. /* */
  1663. .sdat{
  1664. display: inline-block;
  1665. width: 260px;
  1666. margin-left: 13px;
  1667. }
  1668. .messages .el-form-item{
  1669. display: inline-block;
  1670. }
  1671. .messages .el-date-editor.el-input, .el-date-editor.el-input__inner{
  1672. width: 190px;
  1673. }
  1674. /* 我的报销凭证 */
  1675. .search {
  1676. position: relative;
  1677. top: 20px;
  1678. left: 20px;
  1679. }
  1680. .tables {
  1681. margin-top: 50px;
  1682. box-sizing: border-box;
  1683. padding: 10px;
  1684. }
  1685. .informant .el-form-item {
  1686. display: inline-block;
  1687. }
  1688. /* 侧边栏收索 */
  1689. .side {
  1690. position: absolute;
  1691. z-index: 2;
  1692. border-right: 2px solid #DDDDDD;
  1693. height: 100%;
  1694. top: 0;
  1695. width: 0;
  1696. }
  1697. .side .spans {
  1698. width: 20px;
  1699. height: 30px;
  1700. border: 1px solid #DDDDDD;
  1701. box-sizing: border-box;
  1702. position: absolute;
  1703. top: 50%;
  1704. margin-top: -50%;
  1705. text-align: center;
  1706. z-index: 1;
  1707. background: #fff;
  1708. }
  1709. .side .spans i{
  1710. margin-top: 7px;
  1711. color: #C0BFBF
  1712. }
  1713. .side:hover {
  1714. border-right: 2px solid #20A0FF;
  1715. }
  1716. .side:hover .spans {
  1717. border: 1px solid #20A0FF;
  1718. background: #20A0FF;
  1719. }
  1720. .side:hover .spans i{
  1721. color: #fff;
  1722. }
  1723. /* 右边整体页面 */
  1724. .contents {
  1725. height: 100%;
  1726. /* padding: 30px; */
  1727. background: #F7F7F7;
  1728. /* position: absolute; */
  1729. }
  1730. .submits {
  1731. margin-left: 50%;
  1732. }
  1733. .waiting {
  1734. color:orange;
  1735. }
  1736. .rejected {
  1737. color:red;
  1738. }
  1739. .newInvoice{
  1740. position: absolute;
  1741. right: 10px;
  1742. top: -20px;
  1743. height: 20px;
  1744. line-height: 20px;
  1745. cursor: pointer;
  1746. color: #20a0f7;
  1747. font-size: 14px;
  1748. }
  1749. .newInvoice:hover{
  1750. color: #7bbcff;
  1751. }
  1752. </style>