expense.vue 48 KB

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