expense.vue 89 KB

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