expense.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291
  1. <template>
  2. <section>
  3. <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff">
  4. <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>费用报销模块</h3>
  5. <el-divider ></el-divider>
  6. <el-col :span="12">
  7. <el-menu
  8. default-active="1-1"
  9. class="el-menu-vertical-demo"
  10. @select="staffs"
  11. background-color="#ffffff"
  12. text-color="#666666"
  13. active-text-color="#20A0FF"
  14. style="width:100%">
  15. <el-submenu index="1">
  16. <template slot="title">
  17. <i class="iconfont firerock-icontianbao"></i>
  18. <span>员工费用填报</span>
  19. </template>
  20. <el-menu-item index="1-1"><p @click="ssl(0)"> 一般费用填报</p></el-menu-item>
  21. <el-menu-item index="1-2"><p @click="ssl(1)">差旅费用填报</p></el-menu-item>
  22. <el-menu-item index="1-3"><p @click="ssl(2)">外包费用填报</p></el-menu-item>
  23. </el-submenu>
  24. <el-submenu index="2" v-if="user.role != 0">
  25. <template slot="title">
  26. <i class="iconfont firerock-iconbaoxiaodan"></i>
  27. <span>{{user.role == 0?"我的报销单据":"报销单据列表"}}</span>
  28. </template>
  29. <el-menu-item index="2-1" ><p @click="bills(false)" >单据列表</p></el-menu-item>
  30. <el-menu-item index="2-2" ><p @click="bills(true)">单据审核</p></el-menu-item>
  31. </el-submenu>
  32. <el-menu-item index="3" @select="bills" @click="bills(false)" v-if="user.role == 0">
  33. <i class="iconfont firerock-iconbaoxiaodan"></i>
  34. <span slot="title">{{user.role == 0?"我的报销单据":"报销单据列表"}}</span>
  35. </el-menu-item>
  36. </el-menu>
  37. <!-- <el-menu
  38. default-active="2"
  39. class="el-menu-vertical-demo"
  40. @select="bills"
  41. background-color="#ffffff"
  42. text-color="#666666"
  43. active-text-color="#20A0FF"
  44. style="width:100%">
  45. <el-menu-item index="2" @select="bills">
  46. <i class="iconfont firerock-iconbaoxiaodan"></i>
  47. <span slot="title">报销单据列表</span>
  48. </el-menu-item>
  49. </el-menu> -->
  50. </el-col>
  51. </div>
  52. <!-- 侧边栏点击事件 -->
  53. <div class="side" @click="side" ref="sid" style="left: 430px">
  54. <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
  55. </div>
  56. <!-- 内容主体区域 -->
  57. <div class="contents">
  58. <div v-if="!displayTable" class="headine" ref="headine">
  59. <h3 ref="headHe" style="padding-left: 220px">{{shuz[ins]}}</h3>
  60. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits" size="mini">提交</el-button></p>
  61. </div>
  62. <!-- 上面部分 -->
  63. <div ref="staff" style="margin: 20px 20px 0 220px; width: 81.5%" >
  64. <div class="staff" v-if="!displayTable">
  65. <!-- 公共 -->
  66. <div class="public">
  67. <el-form :model="addForm" ref="mainAddForm" label-width="80px" :rules="addFormRules">
  68. <!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
  69. <!-- 报销人 -->
  70. <el-form-item label="报销人" prop="ownerId">
  71. <!--普通员工只能自己填报自己的 -->
  72. <el-select v-model="addForm.ownerId" placeholder="请选择报销人" style="width: 150px" :disabled="user.role == 0" filterable="true">
  73. <span v-for="(item, index) in users" :key="index">
  74. <el-option :label="item.name" :value="item.id"></el-option>
  75. </span>
  76. </el-select>
  77. </el-form-item>
  78. <!-- 填报日期 -->
  79. <el-form-item label="填报日期" style="position: relative;top: 38px;">
  80. <el-col :span="11">
  81. <el-date-picker type="date" placeholder="选择日期" v-model="addForm.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  82. </el-col>
  83. </el-form-item>
  84. <!-- 发票张数 -->
  85. <el-form-item label="发票张数">
  86. <el-input v-model="addForm.ticketNum" style="width: 150px"></el-input>
  87. </el-form-item>
  88. <!-- 费用类型 -->
  89. <el-form-item label="费用类型">
  90. <el-select v-model="addForm.type" disabled style="width: 150px" >
  91. <el-option label="一般" :value="0"></el-option>
  92. <el-option label="差旅" :value="1"></el-option>
  93. <el-option label="外包" :value="2"></el-option>
  94. </el-select>
  95. </el-form-item>
  96. <!-- 备注 -->
  97. <el-form-item label="备注" style="display: block; width: 70%; float: left;">
  98. <el-input type="textarea" v-model="addForm.remark"></el-input>
  99. </el-form-item>
  100. <!-- 总成本 -->
  101. <!-- <div style="float: left; line-height: 55px;margin-left:20px">总成本 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
  102. </el-form>
  103. </div>
  104. <!-- 按钮 -->
  105. <div class="pu_button">
  106. <span v-if="this.addForm.totalAmount <= 0" style="color:#606266;">总成本 {{this.addForm.totalAmount}} 元</span>
  107. <span v-else style="color:#606266;">总成本 ¥{{this.addForm.totalAmount | numberToCurrency}} 元</span>
  108. <span class="pu_bu_x" style="margin-left:10px;" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> 新增发票</span>
  109. </div>
  110. <!-- 表格 -->
  111. <div class="pu_table">
  112. <el-table
  113. :data="invoiceList"
  114. border
  115. style="width: 100%;height: 100%"
  116. max-height="300px"
  117. @row-dblclick="dbclick">
  118. <el-table-column prop="projectName" label="所属项目" width="180">
  119. <template slot-scope="scope">
  120. <el-select size="small" v-model="scope.row.projectId" placeholder="项目" style="width: 150px" >
  121. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
  122. </el-select>
  123. </template>
  124. </el-table-column>
  125. <el-table-column prop="happenDate" label="费用日期" width="170px">
  126. <template slot-scope="scope">
  127. <el-date-picker size="small" v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" placeholder="选择日期">
  128. </el-date-picker>
  129. </template>
  130. </el-table-column>
  131. <el-table-column label="发票种类" width="175px">
  132. <template slot-scope="scope">
  133. <el-select size="small" v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
  134. <el-option label="增值税专用发票" value="0"></el-option>
  135. <el-option label="增值税普通发票" value="1"></el-option>
  136. </el-select>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="费用类型" width="155px">
  140. <template slot-scope="scope">
  141. <el-select size="small" v-model="scope.row.expenseType" placeholder="费用类型" style="width: 150px" >
  142. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName" :value="item.typeName" ></el-option>
  143. </el-select>
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="费用金额" width="135px">
  147. <template slot-scope="scope">
  148. <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>
  149. </template>
  150. </el-table-column>
  151. <el-table-column prop="invoiceNo" label="发票号" width="135px">
  152. <template slot-scope="scope">
  153. <el-input size="small" v-model.number="scope.row.invoiceNo"></el-input>
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="税率%" width="135px">
  157. <template slot-scope="scope">
  158. <el-input size="small" type= "number" v-model="scope.row.taxPercent" @input="zhi(scope.$index)"></el-input>
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="税额" width="135px">
  162. <template slot-scope="scope">
  163. <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)"></el-input>
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="备注" width="135px">
  167. <template slot-scope="scope">
  168. <el-input size="small" v-model="scope.row.remark"></el-input>
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="报销凭证" width="135px">
  172. <template slot-scope="scope">
  173. <div @click="abl(scope.$index)">
  174. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :before-remove="beforeRemove" :http-request="fileonLoad" limit="1" name="multipartFile">
  175. <el-button size="small" type="primary" v-if="!scope.row.pic">点击上传</el-button>
  176. </el-upload>
  177. </div>
  178. </template>
  179. </el-table-column>
  180. <el-table-column fixed="right"
  181. label="操作">
  182. <template slot-scope="scope">
  183. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px" @click="chanc(scope.$index)">删除</el-button>
  184. </template>
  185. </el-table-column>
  186. </el-table>
  187. </div>
  188. <!-- <el-button class="submits" type="warning" @click="submits">提交</el-button> -->
  189. </div>
  190. </div>
  191. </div>
  192. <!-- 下面部分 -->
  193. <div class="xiamian" ref="xiaomian" style="width: 85%;float:right;background: #fff;position: relative;">
  194. <div v-if="displayTable">
  195. <div style="padding-left:10px;padding-right:10px;">
  196. <div>
  197. <el-form label-width="80px" inline >
  198. <!-- 填报日期 -->
  199. <el-form-item label="单据编号" >
  200. <el-input v-model="code" size="small" placeholder="单据编号" clearable="true"></el-input>
  201. </el-form-item>
  202. <!-- 填报日期 -->
  203. <el-form-item label="填报日期" >
  204. <el-date-picker type="date" size="small" clearable="true" placeholder="选择日期" value-format="yyyy-MM-dd" v-model="date" style="width: 200px;"></el-date-picker>
  205. </el-form-item>
  206. <!-- 费用类型 -->
  207. <el-form-item label="费用类型">
  208. <el-select v-model="type" size="small" placeholder="请选择费用类型" clearable="true" style="width: 150px">
  209. <el-option label="一般费用" value="0"></el-option>
  210. <el-option label="差旅费用" value="1"></el-option>
  211. <el-option label="外包费用" value="2"></el-option>
  212. </el-select>
  213. </el-form-item>
  214. <el-form-item>
  215. <el-button @click="getList" size="small">查找</el-button>
  216. </el-form-item>
  217. </el-form>
  218. </div>
  219. <el-divider ></el-divider>
  220. <!--列表-->
  221. <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
  222. <el-table-column prop="code" label="票据编号"></el-table-column>
  223. <el-table-column prop="totalAmount" label="金额(元)" ></el-table-column>
  224. <el-table-column prop="ownerName" label="报销人" ></el-table-column>
  225. <el-table-column prop="createDate" label="填报日期" ></el-table-column>
  226. <el-table-column prop="ticketNum" label="发票张数" ></el-table-column>
  227. <el-table-column prop="type" label="票据类型" >
  228. <template slot-scope="scope">
  229. {{feeType[scope.row.type]}}
  230. </template>
  231. </el-table-column>
  232. <el-table-column prop="remark" label="备注" width="250">
  233. <template slot-scope="scope">
  234. <span style="font-size:12px;">{{scope.row.remark}}</span>
  235. </template>
  236. </el-table-column>
  237. <el-table-column prop="status" label="状态" width="100">
  238. <template slot-scope="scope">
  239. <span v-if="scope.row.status == 1" class="waiting">{{statusTxt[scope.row.status]}}</span>
  240. <span v-if="scope.row.status == 2" class="rejected">{{statusTxt[scope.row.status]}}</span>
  241. <span v-if="scope.row.status == 0 || scope.row.status == 3" >{{statusTxt[scope.row.status]}}</span>
  242. </template>
  243. </el-table-column>
  244. <el-table-column label="操作" :width="isAuditList?220:160">
  245. <template slot-scope="scope" >
  246. <div v-if="!isAuditList">
  247. <el-button icon="el-icon-view" circle size="mini" @click.stop.native="downloadByA(scope.row)" ></el-button>
  248. <el-button icon="el-icon-edit" circle size="mini" style="margin-left:10px;" @click.stop.native="showEditName(scope.row)" v-show="(scope.row.status == 1 || scope.row.status == 2) || user.role > 0 "></el-button>
  249. <el-button icon="el-icon-delete" circle size="mini" style="margin-left:10px;" @click.stop.native="deleteItem(scope.row)" v-show="(scope.row.status == 1 || scope.row.status == 2) || user.role > 0 "></el-button>
  250. </div>
  251. <div v-if="isAuditList">
  252. <el-button size="mini" @click.stop.native="downloadByA(scope.row)" >查看</el-button>
  253. <el-button size="mini" style="margin-left:5px;" @click.stop.native="approve(scope.row)" >通过</el-button>
  254. <el-button size="mini" style="margin-left:5px;" @click.stop.native="deny(scope.row)" >驳回</el-button>
  255. </div>
  256. </template>
  257. </el-table-column>
  258. </el-table>
  259. <!--工具条-->
  260. <el-col :span="24" class="toolbar">
  261. <el-pagination
  262. @size-change="handleSizeChange"
  263. @current-change="handleCurrentChange"
  264. :page-sizes="[20 , 50 , 80 , 100]"
  265. :page-size="20"
  266. layout="total, sizes, prev, pager, next"
  267. :total="total"
  268. style="float:right;"
  269. ></el-pagination>
  270. </el-col>
  271. </div>
  272. </div>
  273. </div>
  274. <!-- 我的单据报销展示 -->
  275. <el-dialog title="报销单据详情" :visible.sync="dialog" width="1000px">
  276. <!-- 内容主体 -->
  277. <div class="informant"><!-- 报销人 -->
  278. <el-form :model="ParticularsList" label-width="80px">
  279. <el-form-item label="报销人" style="width: 270px" :rules="{ required: true, message: '请选择报销人', trigger: 'blur' }">
  280. <!-- <el-input v-show="flg" v-model="ParticularsList.ownerName" disabled ></el-input> -->
  281. <el-select v-model="ParticularsList.ownerId" placeholder="请选择报销人" style="width: 150px" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId">
  282. <span v-for="(item, index) in users" :key="index">
  283. <el-option :label="item.name" :value="item.id"></el-option>
  284. </span>
  285. </el-select>
  286. </el-form-item>
  287. <el-form-item label="填报日期">
  288. <!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
  289. <el-date-picker type="date" :disabled="flg" placeholder="选择日期" v-model="ParticularsList.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  290. </el-form-item>
  291. <el-form-item label="发票张数">
  292. <el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
  293. </el-form-item>
  294. <el-form-item label="费用类型" style="width: 270px">
  295. <el-select v-model="ParticularsList.type" placeholder="请选择" :disabled="flg">
  296. <el-option label="一般" :value="0"></el-option>
  297. <el-option label="差旅" :value="1"></el-option>
  298. <el-option label="外包" :value="2"></el-option>
  299. </el-select>
  300. </el-form-item>
  301. <el-form-item label="备注" style="width: 280px">
  302. <el-input v-model="ParticularsList.remark" :disabled="flg"></el-input>
  303. </el-form-item>
  304. <el-form-item label="总成本">
  305. ¥{{ParticularsList.totalAmount | numberToCurrency}}&nbsp;&nbsp;元
  306. </el-form-item>
  307. <!-- <template slot-scope="scope">
  308. <el-input v-model="scope.row.totalAmount" v-if="!flg"></el-input> 元
  309. <span v-else>{{scope.row.totalAmount}} 元</span>
  310. </template> -->
  311. </el-form>
  312. <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
  313. <el-table-column prop="projectId" label="项目" width="155">
  314. <template slot-scope="scope">
  315. <el-select size="small" v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 130px">
  316. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
  317. </el-select>
  318. <!-- <span v-else>{{projectIdName[scope.$index].projectName}}</span> -->
  319. <div v-else>
  320. <div v-for="(item, index) in projectIdName" :key="index">
  321. <span v-if="item.id == scope.row.projectId">{{item.projectName}}</span>
  322. </div>
  323. </div>
  324. </template>
  325. </el-table-column>
  326. <el-table-column prop="happenDate" label="费用日期" width="172">
  327. <template slot-scope="scope">
  328. <el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" placeholder="选择日期">
  329. </el-date-picker>
  330. <span v-else>{{scope.row.happenDate}}</span>
  331. </template>
  332. </el-table-column>
  333. <el-table-column prop="invoiceType" label="发票种类" width="172">
  334. <template slot-scope="scope">
  335. <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
  336. <el-option label="增值税专用发票" :value="0"></el-option>
  337. <el-option label="增值税普通发票" :value="1"></el-option>
  338. </el-select>
  339. <span v-else>{{typeInvoic[scope.row.invoiceType]}}</span>
  340. </template>
  341. </el-table-column>
  342. <el-table-column prop="invoiceType" label="费用类型" width="172">
  343. <template slot-scope="scope">
  344. <el-select v-if="!flg" size="small" v-model="scope.row.expenseType" placeholder="请选择费用类型" style="width: 150px" >
  345. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName" :value="item.typeName" ></el-option>
  346. </el-select>
  347. <span v-else>{{scope.row.expenseType}}</span>
  348. </template>
  349. </el-table-column>
  350. <el-table-column prop="amount" label="费用金额(元)" width="172">
  351. <template slot-scope="scope">
  352. <el-input size="small" v-if="!flg" :id="'am'+scope.$index" v-model="scope.row.amount" @change="kan" @keyup.native="restrictNumber('am'+scope.$index)"></el-input>
  353. <span v-else>¥{{scope.row.amount}}</span>
  354. </template>
  355. </el-table-column>
  356. <el-table-column prop="invoiceNo" label="发票号" width="172">
  357. <template slot-scope="scope">
  358. <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
  359. <span v-else>{{scope.row.invoiceNo}}</span>
  360. </template>
  361. </el-table-column>
  362. <el-table-column prop="taxPercent" label="税率%" width="172">
  363. <template slot-scope="scope">
  364. <el-input size="small" v-if="!flg" v-model="scope.row.taxPercent"></el-input>
  365. <span v-else>{{scope.row.taxPercent}}</span>
  366. </template>
  367. </el-table-column>
  368. <el-table-column prop="taxValue" label="税额(元)" width="172">
  369. <template slot-scope="scope">
  370. <el-input size="small" v-if="!flg" v-model="scope.row.taxValue"></el-input>
  371. <span v-else>¥{{scope.row.taxValue}}</span>
  372. </template>
  373. </el-table-column>
  374. <el-table-column prop="remark" label="备注" width="300">
  375. <template slot-scope="scope">
  376. <el-input size="small" v-if="!flg" v-model="scope.row.remark"></el-input>
  377. <span v-else>{{scope.row.remark}}</span>
  378. </template>
  379. </el-table-column>
  380. <el-table-column prop="pic" label="报销单据" width="300">
  381. <template slot-scope="scope">
  382. <div v-if="!flg">
  383. <div @click="abl(scope.$index)" style="height: 35px;overflow: hidden;">
  384. <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">
  385. <el-button size="small" type="primary" v-if="!scope.row.pic">点击上传</el-button>
  386. </el-upload>
  387. </div>
  388. </div>
  389. <div v-else>
  390. <span v-if="scope.row.pic">
  391. <div class="tups">
  392. <viewer :images="scope.row.pic">
  393. <img ref="imgsa" v-for="src in scope.row.pic" :src="src.url" :key="src.title">
  394. </viewer>
  395. </div>
  396. </span>
  397. <span v-else>暂无单据</span>
  398. </div>
  399. </template>
  400. </el-table-column>
  401. <!-- 删除 -->
  402. <el-table-column fixed="right"
  403. label="操作" v-if="!flg">
  404. <template slot-scope="scope">
  405. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px" @click="delec(scope.$index)">删除</el-button>
  406. </template>
  407. </el-table-column>
  408. </el-table>
  409. </div>
  410. <!-- <viewer :images="imgs">
  411. <img ref="imgsa" v-for="src in imgs" :src="src.url" :key="src.title">
  412. </viewer> -->
  413. <!-- 取消和确定 -->
  414. <span slot="footer" class="dialog-footer">
  415. <el-button @click="dialog = false">取 消</el-button>
  416. <el-button v-if="!flg" type="primary" @click="present()">确 定</el-button>
  417. <el-button v-else type="primary" @click="dialog = false">确 定</el-button>
  418. </span>
  419. </el-dialog>
  420. </section>
  421. </template>
  422. <script>
  423. export default {
  424. name: "expense",
  425. components: {},
  426. props: {},
  427. data() {
  428. return {
  429. imgs: [],
  430. addFormRules:{ownerId: [{ required: true, message: "请选择报销人", trigger: "blur" }],}, isAuditList: false,
  431. statusTxt:["审核通过","待审核", "已驳回", "已撤销"],
  432. user: JSON.parse(sessionStorage.getItem("user")),
  433. allExpList:[],
  434. expenseTypeList:[],
  435. tian:{a: null,b: null,c: null,d: null,e: null,f: null,g: null,h: null,},
  436. feeType:["一般费用","差旅费用","外包费用"],
  437. typeInvoic: ['增值税专用发票', '增值税普通发票'],
  438. listLoading:false,
  439. tableHeight:0,
  440. list:[],
  441. total:0,
  442. code:null,
  443. date:null,
  444. type:null,
  445. ownerId: null,
  446. users: [], // 人员信息
  447. displayTable: false,
  448. getLists: [],
  449. ProjectList: [], // 项目列表
  450. companyId: [], // 人员的id
  451. dialogVisible: false,
  452. code: null,
  453. addForm:{code:null,ownerId:null,createDate: null, ticketNum:1,type:0,remark:null,totalAmount:0,},
  454. page: 1,
  455. size:20,
  456. form: {happenDate: null,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null},
  457. invoiceList: [],
  458. kkk: null, //
  459. ddId: null,
  460. dldl: [],
  461. isOK: false,
  462. z : null,
  463. value: null,
  464. dialog: false, // 单据查看展示
  465. ParticularsList: [],
  466. projectIdName: [], // 点击查看的项目名
  467. flg: false, // 是否禁用
  468. shuz: ['一般费用填报', '差旅费用填报', '外包费用填报'],
  469. ins: 0,
  470. apl: '',
  471. diz: 'http://worktime.ttkuaiban.com'
  472. };
  473. },
  474. computed: {},
  475. watch: {},
  476. created() {
  477. let height = window.innerHeight;
  478. this.tableHeight = height - 195;
  479. const that = this;
  480. window.onresize = function temp() {
  481. that.tableHeight = window.innerHeight - 195;
  482. };
  483. },
  484. mounted() {
  485. this.getNextCode();
  486. this.getUsers() // 获取人员信息
  487. this.getList() // 获取单据列表
  488. this.getProjectList();
  489. this.getExpList();
  490. },
  491. filters: {
  492. numberToCurrency(value) {
  493. if (!value) return '0.00'
  494. // console.log('v=='+value);
  495. value = value.toFixed(2)
  496. const intPart = Math.trunc(value)
  497. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  498. let floatPart = '.00'
  499. const valueArray = value.toString().split('.')
  500. if (valueArray.length === 2) { // 有小数部分
  501. floatPart = valueArray[1].toString() // 取得小数部分
  502. return intPartFormat + '.' + floatPart
  503. }
  504. return intPartFormat + floatPart
  505. }
  506. },
  507. methods: {
  508. restrictNumber(targetId) {
  509. let inpu = document.getElementById(targetId);
  510. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  511. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  512. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  513. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  514. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  515. inpu.value = parseFloat(inpu.value);
  516. }
  517. },
  518. approve(item) {
  519. //审核通过
  520. this.http.post('/expense-sheet/approve', {id:item.id
  521. },
  522. res => {
  523. if (res.code == "ok") {
  524. this.getList();
  525. } else {
  526. this.$message({
  527. message: res.msg,
  528. type: "error"
  529. });
  530. }
  531. },
  532. error => {
  533. this.$message({
  534. message: error,
  535. type: "error"
  536. });
  537. });
  538. },
  539. deny(item) {
  540. //审核驳回
  541. this.http.post('/expense-sheet/deny', {id:item.id
  542. },
  543. res => {
  544. if (res.code == "ok") {
  545. this.getList();
  546. } else {
  547. this.$message({
  548. message: res.msg,
  549. type: "error"
  550. });
  551. }
  552. },
  553. error => {
  554. this.$message({
  555. message: error,
  556. type: "error"
  557. });
  558. });
  559. },
  560. getExpList() {
  561. this.http.post('/expense-type/getList', {
  562. },
  563. res => {
  564. if (res.code == "ok") {
  565. this.allExpList = res.data;
  566. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == 0);
  567. } else {
  568. this.$message({
  569. message: res.msg,
  570. type: "error"
  571. });
  572. }
  573. },
  574. error => {
  575. this.$message({
  576. message: error,
  577. type: "error"
  578. });
  579. });
  580. },
  581. // 单据查看
  582. downloadByA(val) {
  583. this.dialog = true
  584. this.flg = true;
  585. this.getParticulars(val.id);
  586. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == val.type);
  587. },
  588. // 单据编辑
  589. showEditName(val) {
  590. this.dialog = true,
  591. this.flg = false,
  592. delete val.invoiceList
  593. this.getParticulars(val.id)
  594. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == val.type);
  595. },
  596. staffs(key, keyPath) { // 控制员工费用报表
  597. if (keyPath[0] == '1') {
  598. this.displayTable = false;
  599. } else {
  600. this.displayTable = true;
  601. this.getList();
  602. }
  603. },
  604. bills(audit) { // 控制
  605. this.isAuditList = audit;
  606. this.getList();
  607. this.displayTable = true;
  608. },
  609. present(){
  610. this.dialog = false
  611. this.adds();
  612. },
  613. // 删除操作
  614. delec(ids) {
  615. // console.log('删除操作', ids);
  616. this.ParticularsList.invoiceList.splice(ids, 1)
  617. },
  618. adds() {
  619. // happenDate
  620. // console.log(this.ParticularsList.invoiceList, '123')
  621. var spl = this.ParticularsList.invoiceList
  622. for(var i in spl) {
  623. if(spl[i].pic) {
  624. if(spl[i].pic[0].name) {
  625. spl[i].pic = spl[i].pic[0].name
  626. }
  627. }
  628. }
  629. // console.log(spl)
  630. // return
  631. this.ParticularsList.items = JSON.stringify(this.ParticularsList.invoiceList)//这里要传发票列表的json转string
  632. delete this.ParticularsList.invoiceList
  633. this.http.post('/expense-sheet/add', this.ParticularsList,
  634. res => {
  635. if (res.code == "ok") {
  636. this.bills(this.isAuditList);
  637. this.$message({
  638. message: '编辑成功',
  639. type: "success"
  640. });
  641. } else {
  642. this.$message({
  643. message: res.msg,
  644. type: "error"
  645. });
  646. }
  647. },
  648. error => {
  649. this.$message({
  650. message: error,
  651. type: "error"
  652. });
  653. });
  654. },
  655. // 获取人员信息
  656. getUsers() {
  657. this.http.post(this.port.manage.list, {
  658. departmentId: -1,
  659. pageIndex: 1,
  660. pageSize: 99999
  661. },
  662. res => {
  663. if (res.code == "ok") {
  664. this.users = res.data.records;
  665. if (this.user.role == 0) {
  666. this.addForm.ownerId = this.user.id;
  667. this.addForm.status = 1;
  668. }
  669. } else {
  670. this.$message({
  671. message: res.msg,
  672. type: "error"
  673. });
  674. }
  675. },
  676. error => {
  677. this.$message({
  678. message: error,
  679. type: "error"
  680. });
  681. });
  682. },
  683. // 提交事件
  684. submits() {
  685. this.$refs.mainAddForm.validate(valid => {
  686. if (valid) {
  687. if (this.invoiceList.length == 0) {
  688. this.$message({
  689. message: '请添加发票',
  690. type: "error"
  691. });
  692. return;
  693. }
  694. this.add();
  695. this.addForm = {code:null,ownerId:null,createDate: null,type:this.z, ticketNum:1,remark:null,totalAmount:0,}
  696. this.invoiceList = []
  697. }
  698. });
  699. },
  700. // 点击新增
  701. addxz() {
  702. this.form = {happenDate: null,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null,pic: null},
  703. this.invoiceList.push(this.form)
  704. },
  705. //获取项目列表
  706. getProjectList() {
  707. this.http.post( this.port.project.list, {},
  708. res => {
  709. if (res.code == "ok") {
  710. this.projectList = res.data;
  711. } else {
  712. this.$message({
  713. message: res.msg,
  714. type: "error"
  715. });
  716. }
  717. },
  718. error => {
  719. this.$message({
  720. message: error,
  721. type: "error"
  722. });
  723. });
  724. },
  725. //获取单据列表
  726. getList() {
  727. var param = {pageIndex: this.page,
  728. pageSize: this.size,
  729. code: this.code,
  730. createDate: this.date,
  731. ownerId:this.ownerId,
  732. type:this.type,
  733. };
  734. if (this.isAuditList) {
  735. param.status = 1;
  736. }
  737. this.list = [];
  738. this.total = 0;
  739. this.http.post('/expense-sheet/list', param,
  740. res => {
  741. if (res.code == "ok") {
  742. this.list = res.data.records;
  743. this.total = res.data.total;
  744. } else {
  745. this.$message({
  746. message: res.msg,
  747. type: "error"
  748. });
  749. }
  750. },
  751. error => {
  752. this.$message({
  753. message: error,
  754. type: "error"
  755. });
  756. });
  757. },
  758. //删除单据
  759. deletes(id) {
  760. this.http.post('/expense-sheet/delete', {id: id},
  761. res => {
  762. if (res.code == "ok") {
  763. this.getList()
  764. this.$message({
  765. message: '删除成功',
  766. type: "success"
  767. });
  768. } else {
  769. this.$message({
  770. message: res.msg,
  771. type: "error"
  772. });
  773. }
  774. },
  775. error => {
  776. this.$message({
  777. message: error,
  778. type: "error"
  779. });
  780. });
  781. },
  782. //创建单据
  783. add() {
  784. // happenDate
  785. this.addForm.items = JSON.stringify(this.invoiceList)//这里要传发票列表的json转string
  786. this.http.post('/expense-sheet/add', this.addForm,
  787. res => {
  788. if (res.code == "ok") {
  789. this.$message({
  790. message: '填报成功',
  791. type: "success"
  792. });
  793. } else {
  794. this.$message({
  795. message: res.msg,
  796. type: "error"
  797. });
  798. }
  799. },
  800. error => {
  801. this.$message({
  802. message: error,
  803. type: "error"
  804. });
  805. });
  806. },
  807. //获取单据编码
  808. getNextCode() {
  809. this.http.post('/expense-sheet/getNextCode', {
  810. },
  811. res => {
  812. if (res.code == "ok") {
  813. this.addForm.code = res.data;
  814. } else {
  815. this.$message({
  816. message: res.msg,
  817. type: "error"
  818. });
  819. }
  820. },
  821. error => {
  822. this.$message({
  823. message: error,
  824. type: "error"
  825. });
  826. });
  827. },
  828. // 获取查看单据的数据
  829. getParticulars(id) {
  830. this.http.post('/expense-sheet/getDetail', {id: id},
  831. res => {
  832. if (res.code == "ok") {this
  833. // this.ParticularsList = res.data
  834. var s = []
  835. // var b = []
  836. for(var i in res.data.invoiceList) {
  837. if(res.data.invoiceList[i].pic) {
  838. var b = []
  839. var j = {}
  840. var img = this.diz + '/upload/' + res.data.invoiceList[i].pic
  841. j.url = img
  842. j.title = '报销凭证',
  843. j.name = res.data.invoiceList[i].pic
  844. b.push(j)
  845. res.data.invoiceList[i].pic = b
  846. // console.log(res.data.invoiceList[i].pic)
  847. }
  848. }
  849. this.ParticularsList = res.data
  850. for(var i = 0; i <= this.ParticularsList.invoiceList.length - 1; i++) {
  851. s.push(this.ParticularsList.invoiceList[i].projectId)
  852. }
  853. this.projectIdName = this.projectList.filter( item => {return s.indexOf(item.id) !== -1})
  854. // this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
  855. // console.log(res.data, '查看当前状态');
  856. // console.log(this.ParticularsList)
  857. } else {
  858. this.$message({
  859. message: res.msg,
  860. type: "error"
  861. });
  862. }
  863. },
  864. error => {
  865. this.$message({
  866. message: error,
  867. type: "error"
  868. });
  869. })
  870. },
  871. //分页
  872. handleCurrentChange(val) {
  873. this.page = val;
  874. this.getList();
  875. },
  876. handleSizeChange(val) {
  877. this.size = val;
  878. this.getList();
  879. },
  880. deleteItem(item) {
  881. this.$confirm("确认要删除吗?", "提示", {
  882. //type: 'warning'
  883. }).then(() => {
  884. this.http.post('/expense-sheet/delete', {id:item.id},
  885. res => {
  886. if (res.code == "ok") {
  887. this.getList();
  888. } else {
  889. this.$message({
  890. message: res.msg,
  891. type: "error"
  892. });
  893. }
  894. },
  895. error => {
  896. this.$message({
  897. message: error,
  898. type: "error"
  899. });
  900. });
  901. });
  902. },
  903. // 点击删除
  904. chanc(k) {
  905. this.invoiceList.splice(k, 1)
  906. },
  907. // 双击
  908. dbclick(row, event, column){
  909. this.isOK = true
  910. },
  911. oosk(s){
  912. this.isOK = false
  913. },
  914. ssl(index) {
  915. this.z = index
  916. this.addForm.type = index
  917. this.ins = index;
  918. this.expenseTypeList = this.allExpList.filter(a=>a.mainType == this.ins);
  919. if (this.user.role == 0) {
  920. this.addForm.ownerId = this.user.id;
  921. }
  922. this.getNextCode();
  923. },
  924. // 点击侧边栏事件
  925. side() {
  926. if(this.$refs.side.style.left < '0px') {
  927. this.$refs.sidebars.style.display = 'none'
  928. this.$refs.sid.style.left = '230px'
  929. this.$refs.side.style.left = '1px'
  930. this.$refs.sideI.className = 'el-icon-arrow-right'
  931. this.$refs.staff.style.margin = '20px 20px 0 20px'
  932. this.$refs.staff.style.width = '95%'
  933. this.$refs.xiaomian.style.width = '100%'
  934. this.$refs.headHe.style.paddingLeft = '20px'
  935. } else {
  936. this.$refs.sidebars.style.display = 'block'
  937. this.$refs.sid.style.left = '430px'
  938. this.$refs.side.style.left = '-19px'
  939. this.$refs.sideI.className = 'el-icon-arrow-left'
  940. this.$refs.staff.style.margin = '20px 20px 0 220px'
  941. this.$refs.staff.style.width = '81%'
  942. this.$refs.xiaomian.style.width = '85%'
  943. this.$refs.headHe.style.paddingLeft = '220px'
  944. }
  945. },
  946. // 费用金额失去焦点时触发
  947. shiqu(){
  948. this.addForm.totalAmount = this.invoiceList.reduce((prev, next) => {
  949. return prev + parseFloat(next.amount);
  950. }, 0)
  951. },
  952. kan(){
  953. this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
  954. return prev + parseFloat(next.amount)
  955. }, 0)
  956. },
  957. zhi(e) {
  958. var i = e
  959. if(this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
  960. return
  961. }
  962. this.invoiceList[i].taxValue = this.invoiceList[i].amount * this.invoiceList[i].taxPercent / 100
  963. this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
  964. },
  965. zhis(e) {
  966. var i = e
  967. this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
  968. },
  969. fileonLoad(item) {
  970. //首先判断文件类型
  971. let str = item.file.name.split(".");
  972. let format = str[str.length - 1];
  973. if (format != "jpg" && format != "png") {
  974. this.$message({
  975. message: "请选择图片",
  976. type: "error"
  977. });
  978. } else {
  979. this.listLoading = true;
  980. let formData = new FormData();
  981. formData.append("multipartFile", item.file);
  982. this.http.uploadFile('/common/uploadFile', formData,
  983. res => {
  984. this.listLoading = false;
  985. if (res.code == "ok") {
  986. this.$message({
  987. message: "上传成功",
  988. type: "success"
  989. });
  990. // this.getList();
  991. this.invoiceList[this.apl].pic = res.data
  992. // console.log(this.invoiceList)
  993. } else {
  994. this.$message({
  995. message: res.msg,
  996. type: "error"
  997. });
  998. }
  999. },
  1000. error => {
  1001. this.listLoading = false;
  1002. this.$message({
  1003. message: error,
  1004. type: "error"
  1005. });
  1006. });
  1007. }
  1008. },
  1009. abl(e) {
  1010. this.apl = e
  1011. },
  1012. beforeRemove(file, fileList) {
  1013. var that = this
  1014. setTimeout(function () {
  1015. that.invoiceList[that.apl].pic = null
  1016. }, 200)
  1017. },
  1018. fileonLoads(item) {
  1019. //首先判断文件类型
  1020. let str = item.file.name.split(".");
  1021. let format = str[str.length - 1];
  1022. if (format != "jpg" && format != "png") {
  1023. this.$message({
  1024. message: "请选择图片",
  1025. type: "error"
  1026. });
  1027. } else {
  1028. this.listLoading = true;
  1029. let formData = new FormData();
  1030. formData.append("multipartFile", item.file);
  1031. this.http.uploadFile('/common/uploadFile', formData,
  1032. res => {
  1033. this.listLoading = false;
  1034. if (res.code == "ok") {
  1035. this.$message({
  1036. message: "上传成功",
  1037. type: "success"
  1038. });
  1039. // this.getList();
  1040. this.ParticularsList.invoiceList[this.apl].pic = res.data
  1041. // console.log(this.invoiceList)
  1042. } else {
  1043. this.$message({
  1044. message: res.msg,
  1045. type: "error"
  1046. });
  1047. }
  1048. },
  1049. error => {
  1050. this.listLoading = false;
  1051. this.$message({
  1052. message: error,
  1053. type: "error"
  1054. });
  1055. });
  1056. }
  1057. },
  1058. beforeRemoves(file, fileList) {
  1059. var that = this
  1060. setTimeout(function () {
  1061. // this.ParticularsList.invoiceList
  1062. that.ParticularsList.invoiceList[that.apl].pic = null
  1063. }, 200)
  1064. },
  1065. imgUrl(img) {
  1066. // var imgss = this.diz + '/upload/' + img
  1067. // var sp = []
  1068. // var is = {}
  1069. // is.url = imgss
  1070. // is.title = 1
  1071. // sp.push(is)
  1072. // this.imgs = sp
  1073. // console.log(imgss)
  1074. // console.log(this.$refs.imgsa)
  1075. // this.$refs.imgsa.click()
  1076. // console.log(location.protocol, location.host)
  1077. // console.log(location.protocol + '//' + location.host + imgs)
  1078. },
  1079. },
  1080. };
  1081. </script>
  1082. <style scoped>
  1083. .tups {
  1084. width: 100%;
  1085. height: 25px;
  1086. position: relative;
  1087. z-index: 99;
  1088. overflow: hidden;
  1089. }
  1090. .tups img {
  1091. height: 25px !important;
  1092. position: relative;
  1093. z-index: 99;
  1094. }
  1095. .viewer-canvas {
  1096. position: absolute;
  1097. z-index: 9 !important;
  1098. }
  1099. .icl {
  1100. margin-top: -25px !important;
  1101. }
  1102. /* 费用报销标题 */
  1103. .headine {
  1104. width: 100%;
  1105. height: 46.4px;
  1106. line-height: 46.4px;
  1107. background: #fff;
  1108. box-sizing: border-box;
  1109. }
  1110. .headine h3 {
  1111. margin: 0;
  1112. display: inline-block;
  1113. box-sizing: border-box;
  1114. color: #999;
  1115. }
  1116. .headine p {
  1117. display: inline-block;
  1118. margin: 0;
  1119. }
  1120. /* /费用报销标题 */
  1121. .sidebars {
  1122. height: 100%;
  1123. position: absolute;
  1124. border-right: 1px solid #E6E6E6;
  1125. z-index: 2;
  1126. top: 0;
  1127. }
  1128. .sidebars h3 {
  1129. margin: 0;
  1130. line-height: 45px;
  1131. background: #ffffff;
  1132. font-weight: normal;
  1133. color: #666;
  1134. padding-left: 20px;
  1135. }
  1136. .sidebars .el-col-12 {
  1137. width: 100%
  1138. }
  1139. .public {
  1140. height: 230px;
  1141. border-bottom: 1px solid #ddd;
  1142. }
  1143. .public .el-form-item {
  1144. display: inline-block;
  1145. }
  1146. .pu_button {
  1147. text-align: right;
  1148. width: 100%;
  1149. padding: 24px 30px;
  1150. box-sizing: border-box;
  1151. }
  1152. .pu_bu_x .pu_bu_t {
  1153. display: inline-block;
  1154. }
  1155. .pu_bu_x {
  1156. margin-right: 20px;
  1157. color: #20A0F7;
  1158. cursor: pointer;
  1159. }
  1160. .pu_bu_t {
  1161. color: #20A0F7;
  1162. cursor: pointer;
  1163. display: block;
  1164. float: right;
  1165. position:
  1166. relative;
  1167. top: -20px;
  1168. right: 63px;
  1169. }
  1170. .pu_table {
  1171. margin-left: 10px;
  1172. }
  1173. .pu_bu_t:hover {
  1174. color: #7bbcff;
  1175. }
  1176. .pu_bu_x:hover {
  1177. color: #7bbcff;
  1178. }
  1179. /* 我的单据报销凭证 */
  1180. .staff{
  1181. border-left: 1px solid #fff;
  1182. border-top: 1px solid #fff;
  1183. border-right: 1px solid #fff;
  1184. background: #fff;
  1185. }
  1186. /* */
  1187. .sdat{
  1188. display: inline-block;
  1189. width: 260px;
  1190. margin-left: 13px;
  1191. }
  1192. .messages .el-form-item{
  1193. display: inline-block;
  1194. }
  1195. .messages .el-date-editor.el-input, .el-date-editor.el-input__inner{
  1196. width: 190px;
  1197. }
  1198. /* 我的报销单据 */
  1199. .search {
  1200. position: relative;
  1201. top: 20px;
  1202. left: 20px;
  1203. }
  1204. .tables {
  1205. margin-top: 50px;
  1206. box-sizing: border-box;
  1207. padding: 10px;
  1208. }
  1209. .informant .el-form-item {
  1210. display: inline-block;
  1211. }
  1212. /* 侧边栏收索 */
  1213. .side {
  1214. position: absolute;
  1215. z-index: 2;
  1216. border-right: 2px solid #DDDDDD;
  1217. height: 100%;
  1218. top: 0;
  1219. width: 0;
  1220. }
  1221. .side .spans {
  1222. width: 20px;
  1223. height: 30px;
  1224. border: 1px solid #DDDDDD;
  1225. box-sizing: border-box;
  1226. position: absolute;
  1227. top: 50%;
  1228. margin-top: -50%;
  1229. text-align: center;
  1230. z-index: 1;
  1231. background: #fff;
  1232. }
  1233. .side .spans i{
  1234. margin-top: 7px;
  1235. color: #C0BFBF
  1236. }
  1237. .side:hover {
  1238. border-right: 2px solid #20A0FF;
  1239. }
  1240. .side:hover .spans {
  1241. border: 1px solid #20A0FF;
  1242. background: #20A0FF;
  1243. }
  1244. .side:hover .spans i{
  1245. color: #fff;
  1246. }
  1247. /* 右边整体页面 */
  1248. .contents {
  1249. height: 100%;
  1250. /* padding: 30px; */
  1251. background: #F7F7F7;
  1252. /* position: absolute; */
  1253. }
  1254. .submits {
  1255. margin-left: 50%;
  1256. }
  1257. .waiting {
  1258. color:orange;
  1259. }
  1260. .rejected {
  1261. color:red;
  1262. }
  1263. </style>