expense.vue 66 KB

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