expense.vue 49 KB

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