expense.vue 68 KB

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