expense.vue 112 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964
  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')
  6. }}</h3>
  7. <el-divider></el-divider>
  8. <el-col :span="12">
  9. <el-menu default-active="1-1" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff"
  10. text-color="#666666" active-text-color="#20A0FF" style="width:100%">
  11. <el-submenu index="1">
  12. <template slot="title">
  13. <i class="iconfont firerock-icontianbao"></i>
  14. <span>{{ $t('fillinthestaffexpenses') }}</span>
  15. </template>
  16. <el-menu-item index="1-1">
  17. <p> {{ $t('expenses') }}</p>
  18. </el-menu-item>
  19. <!-- <el-menu-item index="1-2"><p @click="ssl(1)">{{ $t('travelexpensess') }}</p></el-menu-item>
  20. <el-menu-item index="1-3"><p @click="ssl(2)">{{ $t('outsourcingcostshouldbereported') }}</p></el-menu-item> -->
  21. </el-submenu>
  22. <el-submenu index="2">
  23. <template slot="title">
  24. <i class="iconfont firerock-iconbaoxiaodan"></i>
  25. <span>{{ permissions.costAll ? $t('listofreimbursementvouchers') : $t('myexpensevoucher') }}</span>
  26. </template>
  27. <el-menu-item index="2-1">
  28. <p @click="bills(false)">{{ $t('documentlist') }}</p>
  29. </el-menu-item>
  30. <el-menu-item index="2-2">
  31. <p @click="bills(true)">{{ $t('documentreview') }}</p>
  32. </el-menu-item>
  33. </el-submenu>
  34. <!-- <el-menu-item index="3" @select="bills" @click="bills(false)" v-if="user.role == 0">
  35. <i class="iconfont firerock-iconbaoxiaodan"></i>
  36. <span slot="title">{{user.role == 0?"我的报销凭证":"报销凭证列表"}}</span>
  37. </el-menu-item> -->
  38. </el-menu>
  39. </el-col>
  40. </div>
  41. <div class="side" @click="side" ref="sid" style="left: 200px">
  42. <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
  43. </div>
  44. </div>
  45. <!-- 侧边栏点击事件 -->
  46. <!-- <div class="side" @click="side" ref="sid" style="left: 430px">
  47. <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
  48. </div> -->
  49. <!-- 内容主体区域 -->
  50. <div class="contents">
  51. <div v-if="!displayTable" class="headine" ref="headine">
  52. <!-- <h3 ref="headHe" style="padding-left: 220px">{{shuz[ins]}}</h3> -->
  53. <h3 ref="headHe" style="padding-left: 220px">费用填报</h3>
  54. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits" size="mini">{{
  55. $t('btn.submit') }}</el-button></p>
  56. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submitUpload" size="mini">{{
  57. $t('batchupload') }}</el-button></p>
  58. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="customTypeOp" size="mini"
  59. v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
  60. <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="expenseTypeOp" size="mini"
  61. v-if="permissions.costAll">费用主类型管理</el-button></p>
  62. </div>
  63. <!-- 上面部分 -->
  64. <div ref="staff" style="margin: 20px 20px 0 220px; width: 81.5%">
  65. <div class="staff" v-if="!displayTable">
  66. <!-- 公共 -->
  67. <div class="public">
  68. <el-form :model="addForm" ref="mainAddForm" label-width="100px" :rules="addFormRules">
  69. <!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
  70. <!-- 报销人 -->
  71. <el-form-item :label="$t('peopleconcerned')" prop="ownerId">
  72. <!--普通员工只能自己填报自己的 -->
  73. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.ownerId"
  74. :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="!permissions.costAudit"
  75. filterable="true">
  76. <span v-for="(item, index) in users" :key="index">
  77. <el-option :label="item.name" :value="item.id"></el-option>
  78. </span>
  79. </el-select>
  80. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'1'"
  81. :subject="users" :disabled="!permissions.costAudit" :subjectId="addForm.ownerId" ref="selectCat"
  82. @selectCal="selectCal"></selectCat>
  83. </el-form-item>
  84. <!-- 填报日期 -->
  85. <el-form-item :label="$t('fillinthedate')" style="position: relative;top: 38px;">
  86. <el-col :span="11">
  87. <el-date-picker type="date" :placeholder="$t('optiondate')" v-model="addForm.createDate"
  88. value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  89. </el-col>
  90. </el-form-item>
  91. <!-- 发票张数 -->
  92. <el-form-item :label="$t('invoicenumber')" v-if="this.user.timeType.easyExpense == 0">
  93. <el-input v-model="addForm.ticketNum" style="width: 150px"></el-input>
  94. </el-form-item>
  95. <!-- 费用主类型 -->
  96. <el-form-item :label="'费用主类型'">
  97. <el-select v-model="expenseMainTypeValue" style="width: 150px" @change="this.getExpList">
  98. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name"
  99. :value="item.id"></el-option>
  100. </el-select>
  101. </el-form-item>
  102. <!-- 第一审核人 -->
  103. <el-form-item label="第一审核人" v-if="auditTypeItem.auditType == 2">
  104. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.firstCheckerId"
  105. :placeholder="'请选择审核人'" style="width: 150px"
  106. filterable="true">
  107. <span v-for="(item, index) in usersNoInfo" :key="index">
  108. <el-option :label="item.name" :value="item.id"></el-option>
  109. </span>
  110. </el-select>
  111. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'4'"
  112. :subject="usersNoInfo" :subjectId="addForm.firstCheckerId" ref="selectCat"
  113. @selectCal="selectCal"></selectCat>
  114. </el-form-item>
  115. <!-- 第一审核人 -->
  116. <el-form-item label="第二审核人" v-if="auditTypeItem.auditType == 2">
  117. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.secondCheckerId"
  118. :placeholder="'请选择审核人'" style="width: 150px"
  119. filterable="true">
  120. <span v-for="(item, index) in usersNoInfo" :key="index">
  121. <el-option :label="item.name" :value="item.id"></el-option>
  122. </span>
  123. </el-select>
  124. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'5'"
  125. :subject="usersNoInfo" :subjectId="addForm.secondCheckerId" ref="selectCat"
  126. @selectCal="selectCal"></selectCat>
  127. </el-form-item>
  128. <!-- 备注 -->
  129. <el-form-item :label="$t('bei-zhu')" style="display: block; width: 70%">
  130. <el-input type="textarea" v-model="addForm.remark" :autosize="{ minRows: 2, maxRows: 2 }"
  131. maxlength="100"></el-input>
  132. </el-form-item>
  133. <!-- 总费用 -->
  134. <!-- <div style="float: left; line-height: 55px;margin-left:20px">总费用 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
  135. </el-form>
  136. </div>
  137. <!-- 按钮 -->
  138. <div class="pu_button">
  139. <span v-if="totalCost <= 0" style="color:#606266;">{{ $t('totalcostos') }} {{ totalCost }} {{ $t('yuan')
  140. }}</span>
  141. <span v-else style="color:#606266;">{{ $t('totalcostos') }} ¥{{ totalCost | numberToCurrency }} {{ $t('yuan')
  142. }}</span>
  143. <span class="pu_bu_x" style="margin-left:10px;" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> {{
  144. $t('newinvoice') }}</span>
  145. </div>
  146. <!-- 表格 -->
  147. <div class="pu_table">
  148. <el-table :data="invoiceList" border style="width: 100%;height:100%" height="386px" @row-dblclick="dbclick">
  149. <el-table-column prop="projectName" :label="$t('subordinatetotheproject')" width="180">
  150. <template slot-scope="scope">
  151. <el-select size="small" v-model="scope.row.projectId" :placeholder="$t('other.project')"
  152. style="width: 150px" filterable popper-class="projectSelectPopperClass">
  153. <el-option v-for="(item, index) in projectList" :key="index"
  154. :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
  155. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  156. <span style="float: right;">{{ item.projectName }}</span>
  157. </el-option>
  158. </el-select>
  159. </template>
  160. </el-table-column>
  161. <el-table-column prop="happenDate" :label="$t('forthedate')" width="170px">
  162. <template slot-scope="scope">
  163. <el-date-picker size="small" v-model="scope.row.happenDate" type="date" style=" width: 145px"
  164. value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
  165. </el-date-picker>
  166. </template>
  167. </el-table-column>
  168. <el-table-column :label="$t('invoices')" width="175px" v-if="this.user.timeType.easyExpense == 0">
  169. <template slot-scope="scope">
  170. <el-select size="small" v-model="scope.row.invoiceType" :placeholder="$t('pleaseselectthetypeoffee')"
  171. style="width: 150px;">
  172. <el-option :label="$t('vATspecialinvoice')" value="0"></el-option>
  173. <el-option :label="$t('vATgeneralinvoice')" value="1"></el-option>
  174. </el-select>
  175. </template>
  176. </el-table-column>
  177. <el-table-column :label="$t('costtype')" width="175px">
  178. <template slot-scope="scope">
  179. <el-select size="small" v-model="scope.row.expenseType" :placeholder="$t('costtype')"
  180. style="width: 150px">
  181. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
  182. :value="item.typeName"></el-option>
  183. </el-select>
  184. </template>
  185. </el-table-column>
  186. <el-table-column :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'" width="135px">
  187. <template slot-scope="scope">
  188. <el-input size="small" :id="'upam' + scope.$index" v-model="scope.row.amount" @input="zhi(scope.$index)"
  189. @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam' + scope.$index)"></el-input>
  190. </template>
  191. </el-table-column>
  192. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px"
  193. v-if="this.user.timeType.easyExpense == 0">
  194. <template slot-scope="scope">
  195. <el-input size="small" v-model.number="scope.row.invoiceNo"></el-input>
  196. </template>
  197. </el-table-column>
  198. <el-table-column :label="$t('shui-shuai')" width="135px" v-if="this.user.timeType.easyExpense == 0">
  199. <template slot-scope="scope">
  200. <el-input size="small" type="number" v-model="scope.row.taxPercent"
  201. @input="zhi(scope.$index)"></el-input>
  202. </template>
  203. </el-table-column>
  204. <el-table-column :label="$t('taxs')" width="135px" v-if="this.user.timeType.easyExpense == 0">
  205. <template slot-scope="scope">
  206. <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)"></el-input>
  207. </template>
  208. </el-table-column>
  209. <el-table-column :label="$t('bei-zhu')" width="135px">
  210. <template slot-scope="scope">
  211. <el-input size="small" v-model="scope.row.remark"></el-input>
  212. </template>
  213. </el-table-column>
  214. <el-table-column :label="$t('expensereimbursementvoucher')" width="135px">
  215. <template slot-scope="scope">
  216. <!--
  217. <div @click="abl(scope.$index)">
  218. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :before-remove="beforeRemove"
  219. :http-request="fileonLoad" limit="1" name="multipartFile">
  220. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  221. </el-upload>
  222. </div>
  223. -->
  224. <div>
  225. <div v-if="scope.row.pic && scope.row.pic.length > 0">
  226. <el-button size="small" @click="viewDetailsImage(scope.$index)">查看详情</el-button>
  227. </div>
  228. <div v-else>
  229. <el-button type="primary" size="small" @click="performCustomization(scope.$index)" :loading="listLoading">点击上传</el-button>
  230. </div>
  231. </div>
  232. </template>
  233. </el-table-column>
  234. <el-table-column fixed="right" :label="$t('operation')">
  235. <template slot-scope="scope">
  236. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px"
  237. @click="chanc(scope.$index)">{{ $t('btn.delete') }}</el-button>
  238. </template>
  239. </el-table-column>
  240. </el-table>
  241. </div>
  242. <!-- <el-button class="submits" type="warning" @click="submits">提交</el-button> -->
  243. </div>
  244. </div>
  245. </div>
  246. <!-- 多张图片查看详情 -->
  247. <el-dialog title="查看详情" :visible.sync="dialogVisibleImage" width="745px" :before-close="handleClose">
  248. <div class="dayImge">
  249. <div class="dayImgeItem" v-if="dialogVisibleImageList">
  250. <viewer :images="dialogVisibleImageList" v-viewer="viewerOptions" class="dayImgeItem">
  251. <template v-for="src,i in dialogVisibleImageList" :id="src.url">
  252. <!-- 图片 -->
  253. <div class="xiaoImg" v-if="isFileType(src.url) == 'image'">
  254. <img ref="imgsa" :src="src.url">
  255. <div class="imgIcon" @click.stop="deteleIpc(apl)" v-if="imgLoadType==1"><i class="el-icon-circle-close"></i></div>
  256. <div class="imgIcon" @click.stop="deteleIpc(apl, 'ParticularsList', 'invoiceList')" v-if="imgLoadType==2"><i class="el-icon-circle-close"></i></div>
  257. </div>
  258. <!-- 文件 -->
  259. <div class="xiaoImg" v-if="isFileType(src.url) == 'pdf'" @click.stop="openViewPdf(src.url)">
  260. <img :src="pdfIcons">
  261. <div class="imgIcon" @click.stop="deteleIpc(apl)" v-if="imgLoadType==1"><i class="el-icon-circle-close"></i></div>
  262. <div class="imgIcon" @click.stop="deteleIpc(apl, 'ParticularsList', 'invoiceList')" v-if="imgLoadType==2"><i class="el-icon-circle-close"></i></div>
  263. </div>
  264. </template>
  265. <img @click.stop="performCustomization(apl, imgLoadType)" v-if="dialogVisibleImageList.length < 10" :src="require('../../assets/image/aacbc.png')" class="xiaoImg" style="margin-right: 0" />
  266. </viewer>
  267. </div>
  268. </div>
  269. </el-dialog>
  270. <!-- 下面部分 -->
  271. <div class="xiamian" ref="xiaomian"
  272. :style="'width: ' + (xiamianWidth - 400) + 'px;float:right;background: #fff;position: relative;'">
  273. <div v-if="displayTable">
  274. <div style="padding-left:10px;padding-right:10px;">
  275. <div>
  276. <el-form label-width="100px" inline>
  277. <!-- 报销人 -->
  278. <el-form-item :label="$t('peopleconcerned')">
  279. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ownerId" size="small" clearable
  280. :placeholder="$t('selecttheapplicant')" style="width: 120px" :disabled="!permissions.costAudit"
  281. filterable="true">
  282. <span v-for="(item, index) in users" :key="index">
  283. <el-option :label="item.name" :value="item.id"></el-option>
  284. </span>
  285. </el-select>
  286. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'small'" :widthStr="'120'" :distinction="'2'"
  287. :clearable="true" :subject="users" :disabled="!permissions.costAudit" :subjectId="ownerId"
  288. ref="selectCat" @selectCal="selectCal" :filterable="true"></selectCat>
  289. </el-form-item>
  290. <!-- 单据编号 -->
  291. <el-form-item :label="$t('receiptnumber')">
  292. <el-input v-model="code" size="small" :placeholder="$t('receiptnumber')" clearable="true"
  293. style="width: 120px"></el-input>
  294. </el-form-item>
  295. <!-- 费用主类型 -->
  296. <el-form-item :label="'费用主类型'">
  297. <el-select size="small" v-model="queryExpenseMainType" style="width: 150px" clearable placeholder="全部类型">
  298. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name"
  299. :value="item.id"></el-option>
  300. <!-- <el-option :label="$t('yi-ban')" :value="0"></el-option>
  301. <el-option :label="$t('cha-lv')" :value="1"></el-option>
  302. <el-option :label="$t('wai-bao')" :value="2"></el-option> -->
  303. </el-select>
  304. </el-form-item>
  305. <el-form-item :label="'发放状态'" v-if="permissions.costExpenseRelease">
  306. <el-select v-model="sendState" size="small" style="width: 150px"
  307. clearable>
  308. <el-option :label="'未发放'" :value="0"></el-option>
  309. <el-option :label="'已发放'" :value="1"></el-option>
  310. </el-select>
  311. </el-form-item>
  312. <!-- 填报日期 -->
  313. <div style="display: inline-block;">
  314. <el-form-item :label="'项目'">
  315. <el-select v-model="selectProject" size="small" style="width: 162px" clearable filterable>
  316. <el-option v-for="item in projectList" :label="item.projectName" :value="item.id" :key="item.id">
  317. <span style="float: left">{{ item.projectName }}</span>
  318. <span style="float: right; color: #8492a6;">{{ item.projectCode }}</span>
  319. </el-option>
  320. </el-select>
  321. </el-form-item>
  322. <el-form-item :label="$t('fillinthedate')">
  323. <el-date-picker v-model="date" type="daterange" value-format="yyyy-MM-dd" size="small"
  324. :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')"
  325. :end-placeholder="$t('time.endDate')" style="width: 280px">
  326. </el-date-picker>
  327. </el-form-item>
  328. <el-form-item>
  329. <el-button @click="getList" size="small">{{ $t('find') }}</el-button>
  330. </el-form-item>
  331. <el-form-item v-if="currentClick == '2-1'">
  332. <el-button @click="exportDocument()" size="small">单据导出</el-button>
  333. </el-form-item>
  334. <el-form-item v-if="currentClick == '2-1' && permissions.costExpenseRelease">
  335. <el-button @click="documentIssuance(1)" size="small">发放</el-button>
  336. </el-form-item>
  337. <el-form-item v-if="currentClick == '2-1' && permissions.costExpenseRelease">
  338. <el-button @click="documentIssuance(0)" size="small">取消发放</el-button>
  339. </el-form-item>
  340. <!-- <span>审核模式:{{ auditTypeItem.auditType }}</span> -->
  341. </div>
  342. </el-form>
  343. </div>
  344. <el-divider></el-divider>
  345. <!--列表-->
  346. <el-table ref="tab" :data="list" @selection-change="handleSelectionChange" highlight-current-row
  347. v-loading="listLoading" :height="tableHeight - currentClickNum" style="width: 100%;"
  348. :summary-method="getSummaries" show-summary>
  349. <el-table-column type="selection" width="55"></el-table-column>
  350. <el-table-column prop="code" :label="$t('ticketnumber')" width="120"></el-table-column>
  351. <el-table-column prop="totalAmount" :label="$t('amountof') + '(' + $t('yuan') + ')'" align="center" width="120">
  352. <template slot-scope="scope">
  353. <span style="float:right;margin-right:20px">{{ scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) :
  354. '0' }}</span>
  355. </template>
  356. </el-table-column>
  357. <el-table-column prop="ownerName" :label="$t('peopleconcerned')">
  358. <template slot-scope="scope">
  359. <div>
  360. <span v-if="user.userNameNeedTranslate != 1">
  361. {{ scope.row.ownerName }}
  362. </span>
  363. <span v-if="user.userNameNeedTranslate == 1">
  364. <ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data>
  365. </span>
  366. </div>
  367. </template>
  368. </el-table-column>
  369. <el-table-column prop="createDate" :label="$t('fillinthedate')" width="100"></el-table-column>
  370. <el-table-column prop="ticketNum" :label="$t('invoicenumber')"
  371. v-if="this.user.timeType.easyExpense == 0"></el-table-column>
  372. <el-table-column prop="type" :label="$t('ppertype')" v-if="this.user.timeType.easyExpense == 0">
  373. <template slot-scope="scope">
  374. {{ scope.row.expenseMainTypeName }}
  375. </template>
  376. </el-table-column>
  377. <el-table-column prop="remark" :label="$t('bei-zhu')" width="180">
  378. <template slot-scope="scope">
  379. <span style="font-size:12px;">{{ scope.row.remark }}</span>
  380. </template>
  381. </el-table-column>
  382. <el-table-column prop="status" :label="$t('state.states')" width="80">
  383. <template slot-scope="scope">
  384. <span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
  385. <span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
  386. <span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
  387. </template>
  388. </el-table-column>
  389. <el-table-column prop="reviewProcess" :label="'审核流程'" width="180" v-if="auditTypeItem.auditType == 2">
  390. <template slot-scope="scope">
  391. <span v-if="scope.row.reviewProcess == 0">待第一审核人审核</span>
  392. <span v-if="scope.row.reviewProcess == 1">待第二审核人审核</span>
  393. <span v-if="scope.row.reviewProcess == 2">审核完成</span>
  394. </template>
  395. </el-table-column>
  396. <!-- <el-table-column prop="denyReason" :label="$t('dismissreason')" width="180">
  397. <template slot-scope="scope">
  398. <span style="font-size:12px;">{{scope.row.denyReason}}</span>
  399. </template>
  400. </el-table-column> -->
  401. <el-table-column prop="sendState" label="发放状态" width="80" v-if="permissions.costExpenseRelease">
  402. <template slot-scope="scope">
  403. <span :style="`color: ${scope.row.sendState == 0 ? '#FFA500' : ''}`">{{ scope.row.sendState == 1 ? '已发放' :
  404. '未发放' }}</span>
  405. </template>
  406. </el-table-column>
  407. <el-table-column prop="payWayName" label="支付方式" width="80" v-if="permissions.costExpenseRelease">
  408. </el-table-column>
  409. <el-table-column fixed="right" :label="$t('operation')" :width="isAuditList ? 220 : 160">
  410. <template slot-scope="scope">
  411. <div v-if="!isAuditList">
  412. <el-button icon="el-icon-view" circle size="mini"
  413. @click.stop.native="downloadByA(scope.row)"></el-button>
  414. <el-button icon="el-icon-edit" circle size="mini" style="margin-left:10px;"
  415. @click.stop.native="showEditName(scope.row)"
  416. v-show="permissions.costAudit || scope.row.status == 1 || scope.row.status == 2"></el-button>
  417. <el-button icon="el-icon-delete" circle size="mini" style="margin-left:10px;"
  418. @click.stop.native="deleteItem(scope.row)"
  419. v-show="permissions.costAudit || scope.row.status == 1 || scope.row.status == 2"></el-button>
  420. </div>
  421. <div v-if="isAuditList">
  422. <div v-if="auditTypeItem.auditType == 0 || auditTypeItem.auditType == 2">
  423. <el-button size="mini" @click.stop.native="downloadByA(scope.row)">{{ $t('cha-kan') }}</el-button>
  424. <el-button size="mini" style="margin-left:5px;" @click.stop.native="approve(scope.row)">{{
  425. $t('btn.through') }}</el-button>
  426. <el-button size="mini" style="margin-left:5px;" @click.stop.native="denyReason(scope.row)">{{
  427. $t('btn.rejected') }}</el-button>
  428. </div>
  429. <div v-if="auditTypeItem.auditType == 1">
  430. <el-button size="mini" @click.stop.native="approve(scope.row)">审核</el-button>
  431. </div>
  432. </div>
  433. </template>
  434. </el-table-column>
  435. </el-table>
  436. <!--工具条-->
  437. <el-col :span="24" class="toolbar">
  438. <el-pagination key="expenseListTblPager" @size-change="handleSizeChange" @current-change="handleCurrentChange"
  439. :page-sizes="[20, 50, 80, 100]" :page-size="20" :current-page.sync="page"
  440. layout="total, sizes, prev, pager, next" :total="total" style="float:right;"></el-pagination>
  441. </el-col>
  442. </div>
  443. </div>
  444. </div>
  445. <!-- 我的单据报销展示 -->
  446. <el-dialog title="报销凭证详情" :visible.sync="dialog" width="1000px">
  447. <!-- 内容主体 -->
  448. <div class="informant"><!-- 报销人 -->
  449. <el-form :model="ParticularsList" label-width="100px">
  450. <el-form-item :label="$t('peopleconcerned')" style="width: 270px"
  451. :rules="{ required: true, message: $t('pleaseselecttheapplicant'), trigger: 'blur' }">
  452. <el-input v-model="ParticularsList.ownerName"
  453. :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId"
  454. v-if="user.userNameNeedTranslate != '1'"></el-input>
  455. <!-- <el-select v-model="ParticularsList.ownerId" :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId">
  456. <span v-for="(item, index) in users" :key="index">
  457. <el-option :label="item.name" :value="item.id"></el-option>
  458. </span>
  459. </el-select> -->
  460. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'3'"
  461. :subject="users" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId"
  462. :subjectId="ParticularsList.ownerId" ref="selectCat" @selectCal="selectCal"></selectCat>
  463. </el-form-item>
  464. <!-- 第一审核人 -->
  465. <el-form-item label="第一审核人" v-if="auditTypeItem.auditType == 2">
  466. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.firstCheckerId"
  467. :placeholder="'请选择审核人'" style="width: 150px" :disabled="ParticularsList.reviewProcess > 0"
  468. filterable="true">
  469. <span v-for="(item, index) in users" :key="index">
  470. <el-option :label="item.name" :value="item.id"></el-option>
  471. </span>
  472. </el-select>
  473. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'6'"
  474. :subject="users" :subjectId="ParticularsList.firstCheckerId" ref="selectCat" :disabled="ParticularsList.reviewProcess > 0"
  475. @selectCal="selectCal"></selectCat>
  476. </el-form-item>
  477. <!-- 第二审核人 -->
  478. <el-form-item label="第二审核人" v-if="auditTypeItem.auditType == 2">
  479. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.secondCheckerId"
  480. :placeholder="'请选择审核人'" style="width: 150px" :disabled="ParticularsList.reviewProcess > 1"
  481. filterable="true">
  482. <span v-for="(item, index) in users" :key="index">
  483. <el-option :label="item.name" :value="item.id"></el-option>
  484. </span>
  485. </el-select>
  486. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'7'"
  487. :subject="users" :subjectId="ParticularsList.secondCheckerId" ref="selectCat" :disabled="ParticularsList.reviewProcess > 1"
  488. @selectCal="selectCal"></selectCat>
  489. </el-form-item>
  490. <el-form-item :label="$t('fillinthedate')">
  491. <!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
  492. <el-date-picker type="date" :disabled="flg" :placeholder="$t('optiondate')"
  493. v-model="ParticularsList.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
  494. </el-form-item>
  495. <el-form-item :label="$t('invoicenumber')">
  496. <el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
  497. </el-form-item>
  498. <el-form-item :label="$t('costtype')" style="width: 270px">
  499. <el-select size="small" v-model="expenseMainTypeValue" style="width: 150px" :disabled="flg">
  500. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name" :value="item.id"></el-option>
  501. </el-select>
  502. </el-form-item>
  503. <el-form-item :label="$t('bei-zhu')" style="width: 280px">
  504. <el-input v-model="ParticularsList.remark" :disabled="flg" maxlength="100"></el-input>
  505. </el-form-item>
  506. <el-form-item :label="$t('totalcostos')">
  507. ¥{{ ParticularsList.totalAmount | numberToCurrency }}&nbsp;&nbsp;{{ $t('yuan') }}
  508. </el-form-item>
  509. </el-form>
  510. <div style="height:0;position:relative;" v-if="!flg">
  511. <span class="newInvoice" @click="addNewInvoice"> <i class="el-icon-circle-plus-outline"></i> {{ $t('newinvoice')
  512. }}</span>
  513. </div>
  514. <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
  515. <el-table-column prop="status" label="审核状态" width="172" v-if="auditTypeItem.auditType == 1">
  516. <template slot-scope="scope">
  517. <span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
  518. <span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
  519. <span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
  520. </template>
  521. </el-table-column>
  522. <el-table-column v-if="auditTypeItem.auditType == 1" width="172" label="审核人">
  523. <template slot-scope="scope">
  524. <span v-if="user.userNameNeedTranslate == 1">
  525. <ww-open-data type='userName' :openid='scope.row.projectManagerName'></ww-open-data>
  526. </span>
  527. <span v-else>{{ scope.row.projectManagerName }}</span>
  528. </template>
  529. </el-table-column>
  530. <el-table-column prop="projectId" :label="$t('other.project')" width="155">
  531. <template slot-scope="scope">
  532. <el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')"
  533. style="width: 130px">
  534. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode"
  535. :value="item.id" @click="ok(item)">
  536. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  537. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  538. </el-option>
  539. </el-select>
  540. <div v-else>
  541. <span>{{ scope.row.projectName }}</span>
  542. </div>
  543. </template>
  544. </el-table-column>
  545. <el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
  546. <template slot-scope="scope">
  547. <el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px"
  548. value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
  549. </el-date-picker>
  550. <span v-else>{{ scope.row.happenDate }}</span>
  551. </template>
  552. </el-table-column>
  553. <el-table-column prop="invoiceType" :label="$t('invoices')" width="172"
  554. v-if="this.user.timeType.easyExpense == 0">
  555. <template slot-scope="scope">
  556. <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType"
  557. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px;">
  558. <el-option :label="$t('vATspecialinvoice')" :value="0"></el-option>
  559. <el-option :label="$t('vATgeneralinvoice')" :value="1"></el-option>
  560. </el-select>
  561. <span v-else>{{ typeInvoic[scope.row.invoiceType] }}</span>
  562. </template>
  563. </el-table-column>
  564. <el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
  565. <template slot-scope="scope">
  566. <el-select v-if="!flg" size="small" v-model="scope.row.expenseType"
  567. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px">
  568. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
  569. :value="item.typeName"></el-option>
  570. </el-select>
  571. <span v-else>{{ scope.row.expenseType }}</span>
  572. </template>
  573. </el-table-column>
  574. <el-table-column prop="amount" :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'"
  575. width="172">
  576. <template slot-scope="scope">
  577. <el-input size="small" v-if="!flg" :id="'am' + scope.$index" v-model="scope.row.amount"
  578. @input="zhiNum(scope.$index, scope)" @change="kan"
  579. @keyup.native="restrictNumber('am' + scope.$index)"></el-input>
  580. <span v-else>¥{{ scope.row.amount }}</span>
  581. </template>
  582. </el-table-column>
  583. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="172"
  584. v-if="this.user.timeType.easyExpense == 0">
  585. <template slot-scope="scope">
  586. <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
  587. <span v-else>{{ scope.row.invoiceNo }}</span>
  588. </template>
  589. </el-table-column>
  590. <el-table-column prop="taxPercent" :label="$t('shui-shuai')" width="172"
  591. v-if="this.user.timeType.easyExpense == 0">
  592. <template slot-scope="scope">
  593. <el-input size="small" v-if="!flg" v-model="scope.row.taxPercent"
  594. @input="zhiNum(scope.$index, scope)"></el-input>
  595. <span v-else>{{ scope.row.taxPercent }}</span>
  596. </template>
  597. </el-table-column>
  598. <el-table-column prop="taxValue" :label="$t('taxs') + '(' + $t('yuan') + ')'" width="172"
  599. v-if="this.user.timeType.easyExpense == 0">
  600. <template slot-scope="scope">
  601. <el-input size="small" v-if="!flg" v-model="scope.row.taxValue"></el-input>
  602. <span v-else>¥{{ scope.row.taxValue }}</span>
  603. </template>
  604. </el-table-column>
  605. <el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
  606. <template slot-scope="scope">
  607. <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100"></el-input>
  608. <span v-else>{{ scope.row.remark }}</span>
  609. </template>
  610. </el-table-column>
  611. <el-table-column prop="pic" :label="$t('expensereimbursementvoucher')" width="300">
  612. <template slot-scope="scope">
  613. <!-- <div v-if="!flg">
  614. <div @click="abl(scope.$index)" style="height: 35px;overflow: hidden;">
  615. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :file-list="scope.row.pic"
  616. :before-remove="beforeRemoves" :http-request="fileonLoads" limit="1" name="multipartFile">
  617. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  618. </el-upload>
  619. </div>
  620. </div>
  621. <div v-else>
  622. <span v-if="scope.row.pic">
  623. <div class="tups">
  624. <viewer :images="scope.row.pic">
  625. <img ref="imgsa" v-for="src in scope.row.pic" :src="src.url" :key="src.title">
  626. </viewer>
  627. </div>
  628. </span>
  629. <span v-else>{{ $t('nodocuments') }}</span>
  630. </div> -->
  631. <div>
  632. <div v-if="scope.row.pic && scope.row.pic.length > 0">
  633. <el-button size="small" @click="viewDetailsImage(scope.$index, 'ParticularsList', 'invoiceList')">查看详情</el-button>
  634. </div>
  635. <div v-else>
  636. <el-button type="primary" size="small" @click="performCustomization(scope.$index, 2)" :loading="listLoading">点击上传</el-button>
  637. </div>
  638. </div>
  639. </template>
  640. </el-table-column>
  641. <!-- 删除 -->
  642. <el-table-column fixed="right" :label="$t('operation')" v-if="!flg">
  643. <template slot-scope="scope">
  644. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px"
  645. @click="delec(scope.$index)">{{ $t('btn.delete') }}</el-button>
  646. </template>
  647. </el-table-column>
  648. <el-table-column prop="status" label="审核" width="172" v-if="auditTypeItem.auditType == 1 && showSingleAudit"
  649. fixed="right">
  650. <template slot-scope="scope">
  651. <el-button v-if="scope.row.isIncharger && scope.row.status == 1"
  652. @click="approveSingle(scope.row)">通过</el-button><el-button
  653. v-if="scope.row.isIncharger && scope.row.status == 1" @click="denySingle(scope.row)">驳回</el-button>
  654. </template>
  655. </el-table-column>
  656. </el-table>
  657. </div>
  658. <!-- <viewer :images="imgs">
  659. <img ref="imgsa" v-for="src in imgs" :src="src.url" :key="src.title">
  660. </viewer> -->
  661. <!-- 取消和确定 -->
  662. <span slot="footer" class="dialog-footer">
  663. <!-- <el-button @click="print()">打印</el-button> -->
  664. <el-button @click="dialog = false">{{ $t('btn.cancel') }}</el-button>
  665. <el-button v-if="!flg" type="primary" @click="present()">{{ $t('btn.determine') }}</el-button>
  666. <el-button v-else type="primary" @click="dialog = false">{{ $t('btn.determine') }}</el-button>
  667. </span>
  668. </el-dialog>
  669. <!-- 批量上传 -->
  670. <el-dialog :title="$t('batchupload')" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth"
  671. width="500px">
  672. <p>1. {{ $t('other.download') }}
  673. <span>{{ $t('expensereimbursementimporttemplate') }}</span>
  674. <el-link type="primary" style="margin-left:5px;" :underline="false"
  675. :href="'./upload/' + $t('expensereimbursementimporttemplate') + '.xlsx'"
  676. :download="$t('expensereimbursementimporttemplate') + '.xlsx'">{{ $t('expensereimbursementimporttemplate')
  677. }}.xlsx</el-link>
  678. </p>
  679. <p>2. {{ $t('exceltemplateanduploadit') }}。</p>
  680. <div style="padding-bottom:1em;">
  681. <div style="width:300px;margin:0 auto">
  682. <el-upload ref="upload" action="#" :auto-upload="false" multiple :on-change="fileListAdd"
  683. :on-remove="fileListDel">
  684. <el-button slot="trigger" size="small" type="primary" style="">{{ $t('selecthefile') }}</el-button>
  685. <el-button type="primary" size="small" style="margin-left:30px" :underline="false" :loading="importingData"
  686. @click="submitUploadSure" :disabled="fileList.length == 0">{{ $t('toupload') }}</el-button>
  687. <el-button size="small" style="margin-left:30px" @click="fileListClear">{{ $t('clears') }}</el-button>
  688. </el-upload>
  689. </div>
  690. </div>
  691. </el-dialog>
  692. <!-- 主费用类型自定义 -->
  693. <el-dialog title="费用类型大类管理" v-if="expenseTypeDialog" :visible.sync="expenseTypeDialog" customClass="customWidth"
  694. width="600px">
  695. <el-table :data="expenseMainTypes" style="width:100%" height="400" :loading="expenseTypeListLoading">
  696. <el-table-column :label="'类型名称'" min-width="150">
  697. <template slot-scope="scope">
  698. <span>{{ scope.row.name }}</span>
  699. </template>
  700. </el-table-column>
  701. <el-table-column :label="'对应成本项'" min-width="150">
  702. <template slot-scope="scope">
  703. <span>{{ scope.row.basecostSettingName }}</span>
  704. </template>
  705. </el-table-column>
  706. <el-table-column :label="$t('operation')" width="150">
  707. <template slot-scope="scope">
  708. <el-button @click="expenseTypeEditOp(scope.row)" size="small" type="primary">{{ $t('bian-ji') }}</el-button>
  709. <el-button @click="expenseTypeEditDelete(scope.row)" size="small" type="danger">{{ $t('btn.delete')
  710. }}</el-button>
  711. </template>
  712. </el-table-column>
  713. </el-table>
  714. <span slot="footer" class="dialog-footer">
  715. <el-button @click="expenseTypeDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  716. <el-button type="primary" @click="expenseTypeEditOp()" size="medium">{{ $t('newtype') }}</el-button>
  717. </span>
  718. <!-- 新增/编辑费用类型 -->
  719. <el-dialog :title="$t('addeditfeetypes')" v-if="expenseTypeEditDialog" :visible.sync="expenseTypeEditDialog"
  720. customClass="customWidth" width="400px" append-to-body>
  721. <el-form label-width="100px" :rules="editExpenseTypeDataRules" ref="editExpenseTypeDataForm"
  722. :model="editExpenseTypeData">
  723. <el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
  724. <el-input id="editExpenseTypeDataInput" size="medium" v-model="editExpenseTypeData.name"
  725. :placeholder="$t('customizethfeetypename')" style="width:90%"
  726. @keyup.native="editExpenseTypeDataInput('editExpenseTypeDataInput')"></el-input>
  727. </el-form-item>
  728. <el-form-item label="对应成本项" style="margin:30px 0" prop="basecostSettingId">
  729. <el-select v-model="editExpenseTypeData.basecostSettingId" size="medium" style="width:90%" clearable>
  730. <el-option v-for="item in basecostSettingList" :key="item.id" :label="item.name" :value="item.id"
  731. :disabled="item.alarmType == 1"></el-option>
  732. </el-select>
  733. </el-form-item>
  734. </el-form>
  735. <span slot="footer" class="dialog-footer">
  736. <el-button @click="expenseTypeEditDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  737. <el-button type="primary" @click="expenseTypeEditSure" size="medium">{{ $t('btn.determine') }}</el-button>
  738. </span>
  739. </el-dialog>
  740. </el-dialog>
  741. <!-- 费用类型自定义 -->
  742. <el-dialog :title="$t('expensetypemanagement')" v-if="customTypeDialog" :visible.sync="customTypeDialog"
  743. customClass="customWidth" width="600px">
  744. <el-table :data="customTypeList" style="width:100%" height="400" :loading="customTypeListLoading">
  745. <el-table-column prop="typeName" :label="$t('costofname')" min-width="150"></el-table-column>
  746. <el-table-column :label="$t('costtype')" min-width="150">
  747. <template slot-scope="scope">
  748. <span>{{ scope.row.expenseMainTypeName }}</span>
  749. </template>
  750. </el-table-column>
  751. <el-table-column :label="$t('operation')" width="150">
  752. <template slot-scope="scope">
  753. <el-button @click="customTypeEditOp(scope.row)" size="small" type="primary">{{ $t('bian-ji') }}</el-button>
  754. <el-button @click="customTypeEditDelete(scope.row)" size="small" type="danger">{{ $t('btn.delete')
  755. }}</el-button>
  756. </template>
  757. </el-table-column>
  758. </el-table>
  759. <span slot="footer" class="dialog-footer">
  760. <el-button @click="customTypeDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  761. <el-button type="primary" @click="customTypeEditOp()" size="medium">{{ $t('newtype') }}</el-button>
  762. </span>
  763. <!-- 新增/编辑费用类型 -->
  764. <el-dialog :title="$t('addeditfeetypes')" v-if="customTypeEditDialog" :visible.sync="customTypeEditDialog"
  765. customClass="customWidth" width="400px" append-to-body>
  766. <el-form label-width="80px" :rules="editTypeDataRules" ref="editTypeDataForm" :model="editTypeData">
  767. <el-form-item :label="$t('belongstype')" style="margin:30px 0">
  768. <el-select v-model="editTypeData.mainType" size="medium" style="width:90%">
  769. <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name" :value="item.id"></el-option>
  770. </el-select>
  771. </el-form-item>
  772. <el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
  773. <el-input id="editTypeDataInput" size="medium" v-model="editTypeData.typeName"
  774. :placeholder="$t('customizethfeetypename')" style="width:90%"
  775. @keyup.native="editTypeDataInput('editTypeDataInput')"></el-input>
  776. </el-form-item>
  777. </el-form>
  778. <span slot="footer" class="dialog-footer">
  779. <el-button @click="customTypeEditDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
  780. <el-button type="primary" @click="customTypeEditSure" size="medium">{{ $t('btn.determine') }}</el-button>
  781. </span>
  782. </el-dialog>
  783. </el-dialog>
  784. <!-- 驳回弹出框 -->
  785. <el-dialog :title="$t('defaultText.pleaseEnterTheReason')" v-if="denyReasonDialog" :visible.sync="denyReasonDialog"
  786. :close-on-click-modal="false" customClass="customWidth" width="500px">
  787. <div>
  788. <el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('reasonforyourdecisiontoreject')" />
  789. </div>
  790. <div slot="footer" class="dialog-footer">
  791. <el-button @click="denyReasonDialog = false">{{ $t('btn.cancel') }}</el-button>
  792. <el-button type="primary" @click="deny()">{{ $t('btn.determine') }}</el-button>
  793. </div>
  794. </el-dialog>
  795. <!-- 详情查看弹出框 -->
  796. <el-dialog title="报销凭证详情" :visible.sync="detailDialog" width="1100px" :before-close="handleClose">
  797. <div ref="printContent" class="printContent">
  798. <div class="printContent-detail">
  799. <div class="detail-item">
  800. <span class="detail-item-title"> <span class="printBox">报销人</span> </span>
  801. <span class="detail-item-content">
  802. <span v-if="user.userNameNeedTranslate == 1">
  803. <ww-open-data type='userName' :openid='ParticularsList.ownerName'></ww-open-data>
  804. </span>
  805. <span v-else>{{ ParticularsList.ownerName }}</span>
  806. </span>
  807. </div>
  808. <div class="detail-item">
  809. <span class="detail-item-title"><span class="printBox">填报时间</span></span>
  810. <span class="detail-item-content">{{ ParticularsList.createDate }}</span>
  811. </div>
  812. <div class="detail-item">
  813. <span class="detail-item-title"><span class="printBox">发票张数</span></span>
  814. <span class="detail-item-content">{{ ParticularsList.ticketNum }} 张</span>
  815. </div>
  816. <div class="detail-item">
  817. <span class="detail-item-title"><span class="printBox">费用类型:</span></span>
  818. <span class="detail-item-content">{{ detaExpenseMainTypeName }}</span>
  819. </div>
  820. <div class="detail-item">
  821. <span class="detail-item-title"><span class="printBox">总费用</span></span>
  822. <span class="detail-item-content">¥ {{ ParticularsList.totalAmount | numberToCurrency }}</span>
  823. </div>
  824. <div class="detail-item" style="width: 100%">
  825. <span class="detail-item-title"><span class="printBox">备注</span></span>
  826. <span class="detail-item-content">{{ ParticularsList.remark }}</span>
  827. </div>
  828. </div>
  829. <!-- <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
  830. <el-table-column prop="projectId" :label="$t('other.project')" width="155">
  831. <el-table-column prop="status" label="审核状态" width="172" v-if="auditTypeItem.auditType == 1">
  832. <template slot-scope="scope">
  833. <span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
  834. <span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
  835. <span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
  836. </template>
  837. </el-table-column>
  838. <template slot-scope="scope">
  839. <el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')"
  840. style="width: 130px">
  841. <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode"
  842. :value="item.id" @click="ok(item)">
  843. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  844. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  845. </el-option>
  846. </el-select>
  847. <div v-else>
  848. <div v-for="(item, index) in projectIdName" :key="index">
  849. <span v-if="item.id == scope.row.projectId">{{ item.projectName }}</span>
  850. </div>
  851. </div>
  852. </template>
  853. </el-table-column>
  854. <el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
  855. <template slot-scope="scope">
  856. <el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px"
  857. value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
  858. </el-date-picker>
  859. <span v-else>{{ scope.row.happenDate }}</span>
  860. </template>
  861. </el-table-column>
  862. <el-table-column prop="invoiceType" :label="$t('invoices')" width="172"
  863. v-if="this.user.timeType.easyExpense == 0">
  864. <template slot-scope="scope">
  865. <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType"
  866. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px;">
  867. <el-option :label="$t('vATspecialinvoice')" :value="0"></el-option>
  868. <el-option :label="$t('vATgeneralinvoice')" :value="1"></el-option>
  869. </el-select>
  870. <span v-else>{{ typeInvoic[scope.row.invoiceType] }}</span>
  871. </template>
  872. </el-table-column>
  873. <el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
  874. <template slot-scope="scope">
  875. <el-select v-if="!flg" size="small" v-model="scope.row.expenseType"
  876. :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px">
  877. <el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
  878. :value="item.typeName"></el-option>
  879. </el-select>
  880. <span v-else>{{ scope.row.expenseType }}</span>
  881. </template>
  882. </el-table-column>
  883. <el-table-column prop="amount" :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'"
  884. width="172">
  885. <template slot-scope="scope">
  886. <el-input size="small" v-if="!flg" :id="'am' + scope.$index" v-model="scope.row.amount"
  887. @input="zhiNum(scope.$index, scope)" @change="kan"
  888. @keyup.native="restrictNumber('am' + scope.$index)"></el-input>
  889. <span v-else>¥{{ scope.row.amount }}</span>
  890. </template>
  891. </el-table-column>
  892. <el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="172"
  893. v-if="this.user.timeType.easyExpense == 0">
  894. <template slot-scope="scope">
  895. <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
  896. <span v-else>{{ scope.row.invoiceNo }}</span>
  897. </template>
  898. </el-table-column>
  899. <el-table-column prop="taxPercent" :label="$t('shui-shuai')" width="172"
  900. v-if="this.user.timeType.easyExpense == 0">
  901. <template slot-scope="scope">
  902. <el-input size="small" v-if="!flg" v-model="scope.row.taxPercent"
  903. @input="zhiNum(scope.$index, scope)"></el-input>
  904. <span v-else>{{ scope.row.taxPercent }}</span>
  905. </template>
  906. </el-table-column>
  907. <el-table-column prop="taxValue" :label="$t('taxs') + '(' + $t('yuan') + ')'" width="172"
  908. v-if="this.user.timeType.easyExpense == 0">
  909. <template slot-scope="scope">
  910. <el-input size="small" v-if="!flg" v-model="scope.row.taxValue"></el-input>
  911. <span v-else>¥{{ scope.row.taxValue }}</span>
  912. </template>
  913. </el-table-column>
  914. <el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
  915. <template slot-scope="scope">
  916. <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100"></el-input>
  917. <span v-else>{{ scope.row.remark }}</span>
  918. </template>
  919. </el-table-column>
  920. <el-table-column prop="pic" :label="$t('expensereimbursementvoucher')" width="300">
  921. <template slot-scope="scope">
  922. <div v-if="!flg">
  923. <div @click="abl(scope.$index)" style="height: 35px;overflow: hidden;">
  924. <el-upload :class="!scope.row.pic ? 'upload-demo' : 'upload-demo icl'" :file-list="scope.row.pic"
  925. :before-remove="beforeRemoves" :http-request="fileonLoads" limit="1" name="multipartFile">
  926. <el-button size="small" type="primary" v-if="!scope.row.pic">{{ $t('clickupload') }}</el-button>
  927. </el-upload>
  928. </div>
  929. </div>
  930. <div v-else>
  931. <span v-if="scope.row.pic">
  932. <div class="tups">
  933. <viewer :images="scope.row.pic">
  934. <img ref="imgsa" v-for="src in scope.row.pic" :src="src.url" :key="src.title">
  935. </viewer>
  936. </div>
  937. </span>
  938. <span v-else>{{ $t('nodocuments') }}</span>
  939. </div>
  940. </template>
  941. </el-table-column>
  942. <el-table-column fixed="right" :label="$t('operation')" v-if="!flg">
  943. <template slot-scope="scope">
  944. <el-button type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px"
  945. @click="delec(scope.$index)">{{ $t('btn.delete') }}</el-button>
  946. </template>
  947. </el-table-column>
  948. </el-table> -->
  949. <!-- 卡片列表 -->
  950. <div class="conter-box">
  951. <div class="conter-border" v-for="item, index in ParticularsList.invoiceList" :key="index">
  952. <div class="detail-item" v-if="auditTypeItem.auditType != 1">
  953. <span class="detail-item-title"> <span class="printBox">项目</span> </span>
  954. <span class="detail-item-content">
  955. {{ item.projectName }}
  956. <!-- <el-select size="small" v-if="!flg" v-model="item.projectId" :placeholder="$t('other.project')"
  957. style="width: 130px">
  958. <el-option v-for="(item, index) in projectList" :key="index"
  959. :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
  960. <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
  961. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  962. </el-option>
  963. </el-select>
  964. <div v-else>
  965. <div v-for="(item, index) in projectIdName" :key="index">
  966. <span v-if="item.id == item.projectId">{{ item.projectName }}</span>
  967. </div>
  968. </div> -->
  969. </span>
  970. </div>
  971. <div class="detail-item" v-if="auditTypeItem.auditType == 1">
  972. <span class="detail-item-title"> <span class="printBox">项目(审核状态)</span> </span>
  973. <span class="detail-item-content">
  974. <span v-if="item.status == 1" class="waiting">{{ statusTxt[item.status] }}</span>
  975. <span v-if="item.status == 2" class="rejected">{{ statusTxt[item.status] }}</span>
  976. <span v-if="item.status == 0 || item.status == 3">{{ statusTxt[item.status] }}</span>
  977. </span>
  978. </div>
  979. <div class="detail-item">
  980. <span class="detail-item-title"> <span class="printBox">费用日期</span> </span>
  981. <span class="detail-item-content">{{ item.happenDate }}</span>
  982. </div>
  983. <div class="detail-item">
  984. <span class="detail-item-title"> <span class="printBox">发票种类</span> </span>
  985. <span class="detail-item-content">{{ typeInvoic[item.invoiceType] }}</span>
  986. </div>
  987. <div class="detail-item">
  988. <span class="detail-item-title"> <span class="printBox">费用类型</span> </span>
  989. <span class="detail-item-content">{{ item.expenseType }}</span>
  990. </div>
  991. <div class="detail-item">
  992. <span class="detail-item-title single"> <span class="printBox">费用金额(含税)</span> </span>
  993. <span class="detail-item-content">{{ item.amount }}</span>
  994. </div>
  995. <div class="detail-item">
  996. <span class="detail-item-title"> <span class="printBox">发票号</span> </span>
  997. <span class="detail-item-content">{{ item.invoiceNo }}</span>
  998. </div>
  999. <div class="detail-item">
  1000. <span class="detail-item-title"> <span class="printBox">税率%</span> </span>
  1001. <span class="detail-item-content">{{ item.taxValue }}</span>
  1002. </div>
  1003. <div class="detail-item">
  1004. <span class="detail-item-title"> <span class="printBox">税额</span> </span>
  1005. <span class="detail-item-content">{{ item.taxValue ? `¥${item.taxValue}` : '' }}</span>
  1006. </div>
  1007. <div class="detail-item">
  1008. <span class="detail-item-title"> <span class="printBox">备注</span> </span>
  1009. <span class="detail-item-content">{{ item.remark }}</span>
  1010. </div>
  1011. <div class="detail-item" style="display: flex">
  1012. <span class="detail-item-title"> <span class="printBox">报销凭证</span> </span>
  1013. <div class="detail-item-content">
  1014. <div v-if="item.pic" style="display: inline-block;">
  1015. <div class="tups">
  1016. <!-- <viewer :images="item.pic">
  1017. <img ref="imgsa" v-for="src in item.pic" :src="src.url" :key="src.title">
  1018. </viewer> -->
  1019. <viewer :images="item.pic">
  1020. <template v-for="src,i in item.pic" :id="src.url">
  1021. <img ref="imgsa" :src="src.url" v-if="isFileType(src.url) == 'image'">
  1022. <img :src="pdfIcons" v-if="isFileType(src.url) == 'pdf'" @click.stop="openViewPdf(src.url)">
  1023. </template>
  1024. </viewer>
  1025. </div>
  1026. </div>
  1027. </div>
  1028. </div>
  1029. </div>
  1030. </div>
  1031. </div>
  1032. <span slot="footer" class="dialog-footer">
  1033. <el-button @click="print()">打 印</el-button>
  1034. <el-button @click="detailDialog = false">关 闭</el-button>
  1035. </span>
  1036. </el-dialog>
  1037. <!-- 自定义图片上传 -->
  1038. <div class="customIamgeLoad">
  1039. <input id="uploadInput" ref="uploadInput" type="file" class="file" @change="fileMultLoad" multiple accept="image/jpg,image/png,application/pdf" />
  1040. </div>
  1041. <!-- 发放支付方式 -->
  1042. <el-dialog title="发放方式" :visible.sync="dialogVisibleRelease" width="400px" :before-close="handleClose">
  1043. <div>
  1044. <el-select v-model="releaseData.id" placeholder="请选择支付方式" style="width: 100%" clearable>
  1045. <el-option v-for="item in sendStateList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1046. </el-select>
  1047. </div>
  1048. <span slot="footer" class="dialog-footer">
  1049. <el-button @click="dialogVisibleRelease = false">取 消</el-button>
  1050. <el-button type="primary" @click="callingInterface(1, releaseData.data)">确 定</el-button>
  1051. </span>
  1052. </el-dialog>
  1053. </section>
  1054. </template>
  1055. <script>
  1056. // 自定义select组件
  1057. import selectCat from "@/components/select.vue"
  1058. // 引入自定义级联组件
  1059. import vueCascader from "@/components/cascader.vue"
  1060. export default {
  1061. name: "expense",
  1062. components: {
  1063. selectCat,
  1064. vueCascader
  1065. },
  1066. props: {},
  1067. data() {
  1068. return {
  1069. pdfIcons: require('@/assets/image/pdfIcon.png'),
  1070. showSingleAudit: false,
  1071. auditTypeItem: { auditType: 0 },
  1072. queryExpenseMainType: null,
  1073. denyReasonDialog: false,
  1074. denyForm: {
  1075. reason: '',
  1076. id: null
  1077. },
  1078. basecostSettingList: [],
  1079. fileList: [],
  1080. muHeight: document.documentElement.clientHeight || document.body.clientHeight,
  1081. xiamianWidth: document.documentElement.clientWidth || document.body.clientWidth,
  1082. imgs: [],
  1083. addFormRules: {
  1084. ownerId: [{ required: true, message: this.$t('pleaseselecttheapplicant'), trigger: "blur" }],
  1085. createDate: [{ required: true, message: this.$t('pleaseselectadate'), trigger: "blur" }],
  1086. },
  1087. isAuditList: false,
  1088. statusTxt: [this.$t('state.approved'), this.$t('state.WaitingAudit'), this.$t('state.rejected'), this.$t('state.undone')],
  1089. user: JSON.parse(sessionStorage.getItem("user")),
  1090. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  1091. allExpList: [],
  1092. expenseTypeList: [],
  1093. tian: { a: null, b: null, c: null, d: null, e: null, f: null, g: null, h: null, },
  1094. typeInvoic: [this.$t('vATspecialinvoice'), this.$t('vATgeneralinvoice')],
  1095. listLoading: false,
  1096. tableHeight: 0,
  1097. list: [],
  1098. total: 0,
  1099. code: null,
  1100. date: null,
  1101. type: null,
  1102. ownerId: null,
  1103. users: [], // 人员信息
  1104. usersNoInfo: [], // 人员信息,去掉自己
  1105. displayTable: false,
  1106. getLists: [],
  1107. ProjectList: [], // 项目列表
  1108. companyId: [], // 人员的id
  1109. dialogVisible: false,
  1110. code: null,
  1111. addForm: { code: null, ownerId: null, createDate: null, ticketNum: 1, type: 0, remark: null, totalAmount: 0, },
  1112. page: 1,
  1113. size: 20,
  1114. form: { happenDate: null, invoiceType: null, amount: null, invoiceNo: null, taxPercent: null, taxValue: null, remark: null },
  1115. invoiceList: [],
  1116. kkk: null, //
  1117. ddId: null,
  1118. dldl: [],
  1119. isOK: false,
  1120. z: null,
  1121. value: null,
  1122. dialog: false, // 单据查看展示
  1123. ParticularsList: [],
  1124. projectIdName: [], // 点击查看的项目名
  1125. flg: false, // 是否禁用
  1126. shuz: [this.$t('generalexpenses'), this.$t('travelexpensess'), this.$t('outsourcingcostshouldbereported')],
  1127. ins: 0,
  1128. apl: '',
  1129. diz: 'http://worktime.ttkuaiban.com',
  1130. importDialog: false,
  1131. importingData: false,
  1132. currentClick: '',
  1133. currentClickNum: 0,
  1134. // 费用类型自定义
  1135. customTypeDialog: false,
  1136. customTypeList: [],
  1137. customTypeListLoading: false,
  1138. customTypeEditDialog: false,
  1139. editTypeData: {},
  1140. editTypeDataRules: {
  1141. typeName: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
  1142. },
  1143. expenseMainTypes: [],
  1144. expenseMainTypeValue: '',
  1145. expenseTypeDialog: false,
  1146. expenseTypeListLoading: false,
  1147. expenseTypeEditDialog: false,
  1148. editExpenseTypeData: {},
  1149. editExpenseTypeDataRules: {
  1150. name: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
  1151. },
  1152. // 详情弹出框
  1153. detailDialog: false,
  1154. detaExpenseMainTypeName: '',
  1155. multipleSelection: [],
  1156. sendState: '',
  1157. dialogVisibleImage: false,
  1158. dialogVisibleImageList: [],
  1159. imgLoadType: 1, // 1 为 费用填报的图片上传 2 单据修改的图片上传
  1160. releaseData: {
  1161. id: '',
  1162. data: '',
  1163. }, // 发放数据
  1164. sendStateList: [], // 发放状态列表
  1165. dialogVisibleRelease: false, // 发放弹出框
  1166. selectProject: null, // 项目选择
  1167. };
  1168. },
  1169. computed: {
  1170. totalCost: function () {
  1171. let num = 0
  1172. for (let i in this.invoiceList) {
  1173. if (this.invoiceList[i].amount) {
  1174. num += this.invoiceList[i].amount * 1
  1175. }
  1176. }
  1177. return num
  1178. }
  1179. },
  1180. watch: {},
  1181. created() {
  1182. let height = window.innerHeight;
  1183. this.tableHeight = height - 195;
  1184. const that = this;
  1185. window.onresize = function temp() {
  1186. that.tableHeight = window.innerHeight - 195;
  1187. };
  1188. },
  1189. mounted() {
  1190. this.getNextCode();
  1191. this.getUsers() // 获取人员信息
  1192. this.getList() // 获取单据列表
  1193. this.getProjectList();
  1194. this.getExpensMainTypes();
  1195. this.getExpList();
  1196. this.getBasecostItemList();
  1197. this.getAuditType();
  1198. this.getSendStateList();
  1199. },
  1200. filters: {
  1201. numberToCurrency(value) {
  1202. if (!value) return '0.00'
  1203. // console.log('v=='+value);
  1204. value = value.toFixed(2)
  1205. const intPart = Math.trunc(value)
  1206. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  1207. let floatPart = '.00'
  1208. const valueArray = value.toString().split('.')
  1209. if (valueArray.length === 2) { // 有小数部分
  1210. floatPart = valueArray[1].toString() // 取得小数部分
  1211. return intPartFormat + '.' + floatPart
  1212. }
  1213. return intPartFormat + floatPart
  1214. }
  1215. },
  1216. methods: {
  1217. getBasecostItemList() {
  1218. this.http.post('/project-basecost-setting/list', {},
  1219. res => {
  1220. if (res.code == 'ok') {
  1221. this.basecostSettingList = res.data;
  1222. } else {
  1223. this.$message({
  1224. message: res.msg,
  1225. type: 'error'
  1226. })
  1227. }
  1228. }, err => {
  1229. this.$message({
  1230. message: err,
  1231. type: 'error'
  1232. })
  1233. })
  1234. },
  1235. // 费用类型自定义
  1236. customTypeOp() {
  1237. this.customTypeDialog = true
  1238. this.customTypeListLoading = true
  1239. },
  1240. customTypeEditOp(row) {
  1241. this.customTypeEditDialog = true
  1242. if (row) {
  1243. this.editTypeData = row
  1244. } else {
  1245. this.editTypeData = {
  1246. mainType: '',
  1247. typeName: '',
  1248. companyId: this.user.companyId
  1249. }
  1250. }
  1251. },
  1252. customTypeEditSure() {
  1253. this.$refs.editTypeDataForm.validate(valid => {
  1254. if (valid) {
  1255. this.http.post('/expense-type/addOrMod', this.editTypeData,
  1256. res => {
  1257. if (res.code == 'ok') {
  1258. this.customTypeEditDialog = false
  1259. this.customTypeOp()
  1260. this.getExpList()
  1261. } else {
  1262. this.$message({
  1263. message: res.msg,
  1264. type: 'error'
  1265. })
  1266. }
  1267. }, err => {
  1268. this.$message({
  1269. message: err,
  1270. type: 'error'
  1271. })
  1272. })
  1273. }
  1274. })
  1275. },
  1276. customTypeEditDelete(row) {
  1277. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'), this.$t('other.prompts'), {
  1278. confirmButtonText: this.$t('btn.determine'),
  1279. cancelButtonText: this.$t('btn.cancel'),
  1280. type: 'warning'
  1281. }).then(() => {
  1282. this.http.post('/expense-type/delete', {
  1283. id: row.id
  1284. },
  1285. res => {
  1286. if (res.code == 'ok') {
  1287. this.customTypeEditDialog = false
  1288. this.customTypeOp()
  1289. this.getExpList()
  1290. } else {
  1291. this.$message({
  1292. message: res.msg,
  1293. type: 'error'
  1294. })
  1295. }
  1296. }, err => {
  1297. this.$message({
  1298. message: err,
  1299. type: 'error'
  1300. })
  1301. })
  1302. }).catch(() => {
  1303. this.$message({
  1304. type: 'info',
  1305. message: this.$t('thedeletionhasbeencancelled')
  1306. })
  1307. })
  1308. },
  1309. editTypeDataInput(typeName) {
  1310. let inpu = document.getElementById(typeName);
  1311. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  1312. },
  1313. // 费用主类型自定义
  1314. expenseTypeOp() {
  1315. this.expenseTypeDialog = true
  1316. this.customTypeListLoading = true
  1317. },
  1318. expenseTypeEditOp(row) {
  1319. this.expenseTypeEditDialog = true
  1320. if (row) {
  1321. this.editExpenseTypeData = row
  1322. } else {
  1323. this.editExpenseTypeData = {
  1324. isSystem: 0,
  1325. name: '',
  1326. companyId: this.user.companyId
  1327. }
  1328. }
  1329. },
  1330. expenseTypeEditSure() {
  1331. this.$refs.editExpenseTypeDataForm.validate(valid => {
  1332. if (valid) {
  1333. this.http.post('/expense-main-type/addOrMod', this.editExpenseTypeData,
  1334. res => {
  1335. if (res.code == 'ok') {
  1336. this.expenseTypeEditDialog = false
  1337. this.expenseTypeOp()
  1338. this.getExpensMainTypes()
  1339. this.getExpList()
  1340. } else {
  1341. this.$message({
  1342. message: res.msg,
  1343. type: 'error'
  1344. })
  1345. }
  1346. }, err => {
  1347. this.$message({
  1348. message: err,
  1349. type: 'error'
  1350. })
  1351. })
  1352. }
  1353. })
  1354. },
  1355. expenseTypeEditDelete(row) {
  1356. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'), this.$t('other.prompts'), {
  1357. confirmButtonText: this.$t('btn.determine'),
  1358. cancelButtonText: this.$t('btn.cancel'),
  1359. type: 'warning'
  1360. }).then(() => {
  1361. this.http.post('/expense-main-type/delete', {
  1362. id: row.id
  1363. },
  1364. res => {
  1365. if (res.code == 'ok') {
  1366. this.expenseTypeEditDialog = false
  1367. this.expenseTypeOp()
  1368. this.getExpensMainTypes()
  1369. } else {
  1370. this.$message({
  1371. message: res.msg,
  1372. type: 'error'
  1373. })
  1374. }
  1375. }, err => {
  1376. this.$message({
  1377. message: err,
  1378. type: 'error'
  1379. })
  1380. })
  1381. }).catch(() => {
  1382. this.$message({
  1383. type: 'info',
  1384. message: this.$t('thedeletionhasbeencancelled')
  1385. })
  1386. })
  1387. },
  1388. expenseTypeDataInput(typeName) {
  1389. let inpu = document.getElementById(typeName);
  1390. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  1391. },
  1392. editExpenseTypeDataInput(name) {
  1393. let inpu = document.getElementById(name);
  1394. inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
  1395. },
  1396. submitUpload() {
  1397. this.importDialog = true
  1398. },
  1399. fileListAdd(file, fileList) {
  1400. let str = file.name.split(".");
  1401. let format = str[str.length - 1];
  1402. if (format != "xls" && format != "xlsx") {
  1403. this.$message({
  1404. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  1405. type: "error"
  1406. });
  1407. fileList.splice(fileList.length - 1)
  1408. }
  1409. this.fileList = fileList
  1410. },
  1411. fileListDel(file, fileList) {
  1412. this.fileList = fileList
  1413. },
  1414. fileListClear() {
  1415. this.$refs.upload.clearFiles();
  1416. this.fileList = []
  1417. },
  1418. submitUploadSure() {
  1419. this.$confirm(this.$t('confirmtoupload'), this.$t('other.prompts'), {
  1420. confirmButtonText: this.$t('btn.determine'),
  1421. cancelButtonText: this.$t('btn.cancel'),
  1422. type: 'success'
  1423. }).then(() => {
  1424. let formData = new FormData();
  1425. for (let i in this.fileList) {
  1426. formData.append("files", this.fileList[i].raw);
  1427. }
  1428. this.importingData = true
  1429. // console.log(formData,this.fileList);
  1430. // return
  1431. this.http.uploadFile('/expense-sheet/importData', formData,
  1432. res => {
  1433. if (res.code == "ok") {
  1434. this.importingData = false
  1435. this.$refs.upload.clearFiles();
  1436. this.fileList = []
  1437. this.$message({
  1438. message: this.$t('uploadedsuccessfully'),
  1439. type: "success"
  1440. });
  1441. } else {
  1442. this.importingData = false
  1443. this.$message({
  1444. message: res.msg,
  1445. type: "error"
  1446. });
  1447. }
  1448. }, error => {
  1449. this.importingData = false
  1450. this.$message({
  1451. message: error,
  1452. type: "error"
  1453. });
  1454. });
  1455. }).catch(() => { })
  1456. },
  1457. restrictNumber(targetId) {
  1458. let inpu = document.getElementById(targetId);
  1459. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  1460. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  1461. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g, '').replace('$#*', '.');//去除其他"."
  1462. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  1463. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  1464. inpu.value = parseFloat(inpu.value);
  1465. }
  1466. },
  1467. approveSingle(item) {
  1468. this.http.post('/expense-sheet/approveSingleProject', {
  1469. id: item.id
  1470. },
  1471. res => {
  1472. if (res.code == "ok") {
  1473. this.getList();
  1474. // this.dialog = false;
  1475. this.getParticulars(item.expenseId);
  1476. } else {
  1477. this.$message({
  1478. message: res.msg,
  1479. type: "error"
  1480. });
  1481. }
  1482. },
  1483. error => {
  1484. this.$message({
  1485. message: error,
  1486. type: "error"
  1487. });
  1488. });
  1489. },
  1490. approve(item) {
  1491. if (this.auditTypeItem.auditType == 0 || this.auditTypeItem.auditType == 2) {
  1492. //默认模式,按有审核权限的人直接审核
  1493. this.showSingleAudit = false;
  1494. //审核通过
  1495. this.http.post('/expense-sheet/approve', {
  1496. id: item.id
  1497. },
  1498. res => {
  1499. if (res.code == "ok") {
  1500. this.getList();
  1501. } else {
  1502. this.$message({
  1503. message: res.msg,
  1504. type: "error"
  1505. });
  1506. }
  1507. },
  1508. error => {
  1509. this.$message({
  1510. message: error,
  1511. type: "error"
  1512. });
  1513. });
  1514. } else if (this.auditTypeItem.auditType == 1){
  1515. //项目经理按项目逐条审核
  1516. this.showSingleAudit = true;
  1517. this.downloadByA(item);
  1518. }
  1519. },
  1520. denySingle(item) {
  1521. //项目经理审核模式
  1522. this.http.post('/expense-sheet/denySingleProject', {
  1523. id: item.id
  1524. },
  1525. res => {
  1526. if (res.code == "ok") {
  1527. this.dialog = false;
  1528. this.showSingleAudit = false;
  1529. this.getList();
  1530. } else {
  1531. this.$message({
  1532. message: res.msg,
  1533. type: "error"
  1534. });
  1535. }
  1536. },
  1537. error => {
  1538. this.$message({
  1539. message: error,
  1540. type: "error"
  1541. });
  1542. });
  1543. },
  1544. denyReason(item) {
  1545. if (this.auditTypeItem.auditType == 0) {
  1546. this.denyForm.id = item.id
  1547. this.denyForm.reason = ''
  1548. // this.denyReasonDialog = true
  1549. this.deny()
  1550. } else {
  1551. this.downloadByA(item);
  1552. this.showSingleAudit = true;
  1553. }
  1554. },
  1555. deny() {
  1556. //审核驳回
  1557. this.http.post('/expense-sheet/deny', {
  1558. id: this.denyForm.id,
  1559. denyReason: this.denyForm.reason
  1560. },
  1561. res => {
  1562. if (res.code == "ok") {
  1563. this.denyReasonDialog = false
  1564. this.getList();
  1565. } else {
  1566. this.$message({
  1567. message: res.msg,
  1568. type: "error"
  1569. });
  1570. }
  1571. },
  1572. error => {
  1573. this.$message({
  1574. message: error,
  1575. type: "error"
  1576. });
  1577. });
  1578. },
  1579. getExpList() {
  1580. this.http.post('/expense-type/getList', {
  1581. },
  1582. res => {
  1583. this.customTypeListLoading = false
  1584. if (res.code == "ok") {
  1585. this.allExpList = res.data;
  1586. this.customTypeList = res.data
  1587. this.addForm.type = this.expenseMainTypeValue
  1588. this.expenseTypeList = this.allExpList.filter(a => a.mainType == this.expenseMainTypeValue);
  1589. this.invoiceList = []
  1590. if (!res.data != res.data.length == 0) {
  1591. this.http.post('/company/settingExpenseType', {}, res => {
  1592. if (res.code == 'ok') { } else { this.$message({ message: res.msg, type: 'error' }) }
  1593. }, err => { this.$message({ message: err, type: 'error' }) })
  1594. }
  1595. for (let i in this.invoiceList) {
  1596. this.invoiceList[i].expenseType = ''
  1597. }
  1598. } else {
  1599. this.$message({
  1600. message: res.msg,
  1601. type: "error"
  1602. });
  1603. }
  1604. },
  1605. error => {
  1606. this.customTypeListLoading = false
  1607. this.$message({
  1608. message: error,
  1609. type: "error"
  1610. });
  1611. });
  1612. },
  1613. getExpensMainTypes() {
  1614. this.http.post('/expense-main-type/list', {
  1615. },
  1616. res => {
  1617. if (res.code == "ok") {
  1618. this.expenseMainTypes = res.data
  1619. this.expenseMainTypeValue = this.expenseMainTypes[0].id
  1620. } else {
  1621. this.$message({
  1622. message: res.msg,
  1623. type: "error"
  1624. });
  1625. }
  1626. },
  1627. error => {
  1628. this.$message({
  1629. message: error,
  1630. type: "error"
  1631. });
  1632. });
  1633. },
  1634. // 单据查看
  1635. downloadByA(val) {
  1636. if (val.status == 0) {
  1637. this.detailDialog = true
  1638. } else {
  1639. this.dialog = true
  1640. }
  1641. console.log(val, '看看数据来源')
  1642. this.detaExpenseMainTypeName = val.expenseMainTypeName
  1643. this.flg = true;
  1644. this.getParticulars(val.id);
  1645. this.expenseTypeList = this.allExpList.filter(a => a.mainType == val.type);
  1646. },
  1647. // 单据编辑
  1648. showEditName(val) {
  1649. this.dialog = true,
  1650. this.flg = false,
  1651. delete val.invoiceList
  1652. this.getParticulars(val.id)
  1653. this.expenseTypeList = this.allExpList.filter(a => a.mainType == val.type);
  1654. },
  1655. staffs(key, keyPath) { // 控制员工费用报表
  1656. if (keyPath[0] == '1') {
  1657. this.displayTable = false;
  1658. } else {
  1659. this.displayTable = true;
  1660. this.getList();
  1661. }
  1662. // currentClick
  1663. // console.log(key, keyPath)
  1664. this.currentClick = key
  1665. key == '2-1' ? this.currentClickNum = 70 : this.currentClickNum = 0
  1666. },
  1667. bills(audit) { // 控制
  1668. this.isAuditList = audit;
  1669. this.displayTable = true;
  1670. },
  1671. present() {
  1672. this.adds();
  1673. },
  1674. // 删除操作
  1675. delec(ids) {
  1676. // console.log('删除操作', ids);
  1677. this.ParticularsList.invoiceList.splice(ids, 1)
  1678. this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
  1679. this.kan()
  1680. },
  1681. adds() {
  1682. var paramData = JSON.parse(JSON.stringify(this.ParticularsList));
  1683. var spl = paramData.invoiceList
  1684. for (var i in spl) {
  1685. if (spl[i].pic) {
  1686. spl[i].pic = spl[i].pic.map(a => a.name).join(',')
  1687. }
  1688. }
  1689. console.log(paramData, '<== paramData')
  1690. let noAmount = paramData.invoiceList.filter(item => !item.amount)
  1691. if(noAmount.length > 0) {
  1692. this.$message({
  1693. message: '请填写完整费用金额',
  1694. type: "error"
  1695. });
  1696. return;
  1697. }
  1698. paramData.items = JSON.stringify(paramData.invoiceList)//这里要传发票列表的json转string
  1699. // console.log(paramData, '<== paramData')
  1700. // return
  1701. delete paramData.invoiceList
  1702. this.http.post('/expense-sheet/add', paramData,
  1703. res => {
  1704. if (res.code == "ok") {
  1705. this.dialog = false;
  1706. this.bills(this.isAuditList);
  1707. this.$message({
  1708. message: this.$t('editsuccess'),
  1709. type: "success"
  1710. });
  1711. } else {
  1712. this.$message({
  1713. message: res.msg,
  1714. type: "error"
  1715. });
  1716. }
  1717. },
  1718. error => {
  1719. this.$message({
  1720. message: error,
  1721. type: "error"
  1722. });
  1723. });
  1724. },
  1725. // 获取人员信息
  1726. getUsers() {
  1727. // this.http.post(this.port.manage.list, {
  1728. // departmentId: -1,
  1729. // pageIndex: 1,
  1730. // // pageSize: 99999
  1731. // pageSize: -1
  1732. // },
  1733. this.http.post('/user/getSimpleActiveUserList', {},
  1734. res => {
  1735. if (res.code == "ok") {
  1736. // this.users = res.data.records;
  1737. const { id } = JSON.parse(sessionStorage.getItem('user'))
  1738. this.users = res.data;
  1739. this.usersNoInfo = res.data.filter(item => item.id != id)
  1740. if (!this.permissions.costAudit) {
  1741. this.addForm.ownerId = this.user.id;
  1742. this.addForm.status = 1;
  1743. this.$forceUpdate()
  1744. }
  1745. } else {
  1746. this.$message({
  1747. message: res.msg,
  1748. type: "error"
  1749. });
  1750. }
  1751. },
  1752. error => {
  1753. this.$message({
  1754. message: error,
  1755. type: "error"
  1756. });
  1757. });
  1758. },
  1759. // 提交事件
  1760. submits() {
  1761. this.$refs.mainAddForm.validate(valid => {
  1762. if (valid) {
  1763. if(this.auditTypeItem.auditType == 2 && (!this.addForm.firstCheckerId || !this.addForm.secondCheckerId)) {
  1764. this.$message({
  1765. message: !this.addForm.firstCheckerId ? '请选择第一审核人' : '请选择第二审核人',
  1766. type: "error"
  1767. });
  1768. return;
  1769. }
  1770. if (this.invoiceList.length == 0) {
  1771. this.$message({
  1772. message: this.$t('pleaseaddtheinvoice'),
  1773. type: "error"
  1774. });
  1775. return;
  1776. }
  1777. let strObj = {
  1778. project: '',
  1779. datas: '',
  1780. fptype: '',
  1781. fyType: '',
  1782. rmb: '',
  1783. flg: false
  1784. }
  1785. for (var i in this.invoiceList) {
  1786. if (!this.invoiceList[i].projectId) {
  1787. strObj.project = '所属项目'
  1788. strObj.flg = true
  1789. }
  1790. // if(!this.invoiceList[i].invoiceType || this.invoiceList[i].invoiceType == '') {
  1791. // strObj.fptype = '发票种类'
  1792. // strObj.flg = true
  1793. // }
  1794. if (!this.invoiceList[i].expenseType || this.invoiceList[i].expenseType == '') {
  1795. strObj.fyType = '费用类型'
  1796. strObj.flg = true
  1797. }
  1798. if (!this.invoiceList[i].happenDate || this.invoiceList[i].happenDate == '') {
  1799. strObj.datas = '费用日期'
  1800. strObj.flg = true
  1801. }
  1802. if (!this.invoiceList[i].amount || this.invoiceList[i].amount == '') {
  1803. strObj.rmb = '费用金额'
  1804. strObj.flg = true
  1805. }
  1806. }
  1807. if (strObj.flg) {
  1808. this.$message({
  1809. message: `${strObj.project} ${strObj.fptype} ${strObj.fyType} ${strObj.datas} ${strObj.rmb} 请填写完整`,
  1810. type: "error"
  1811. });
  1812. return;
  1813. }
  1814. // return
  1815. this.add();
  1816. }
  1817. });
  1818. },
  1819. // 点击新增
  1820. addxz() {
  1821. this.form = { happenDate: null, invoiceType: null, amount: null, invoiceNo: null, taxPercent: null, taxValue: null, remark: null, pic: null },
  1822. this.invoiceList.push(this.form)
  1823. },
  1824. addNewInvoice() {
  1825. this.form = { happenDate: null, invoiceType: null, amount: null, invoiceNo: null, taxPercent: null, taxValue: null, remark: null, pic: null },
  1826. this.ParticularsList.invoiceList.push(this.form)
  1827. this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
  1828. },
  1829. //获取项目列表
  1830. getProjectList() {
  1831. this.http.post(this.port.project.list, {},
  1832. res => {
  1833. if (res.code == "ok") {
  1834. //费用报销界面选择项目只针对进行中的
  1835. this.projectList = res.data.filter(i =>i.status==1);
  1836. } else {
  1837. this.$message({
  1838. message: res.msg,
  1839. type: "error"
  1840. });
  1841. }
  1842. },
  1843. error => {
  1844. this.$message({
  1845. message: error,
  1846. type: "error"
  1847. });
  1848. });
  1849. },
  1850. //获取审核模式
  1851. getAuditType() {
  1852. this.http.post('/expense-audit-setting/get', {},
  1853. res => {
  1854. if (res.code == "ok") {
  1855. this.auditTypeItem = res.data;
  1856. } else {
  1857. this.$message({
  1858. message: res.msg,
  1859. type: "error"
  1860. });
  1861. }
  1862. },
  1863. error => {
  1864. this.$message({
  1865. message: error,
  1866. type: "error"
  1867. });
  1868. });
  1869. },
  1870. //获取单据列表
  1871. getList() {
  1872. // console.log(this.date)
  1873. var stat = ''
  1874. var end = ''
  1875. if (this.date) {
  1876. stat = this.date[0]
  1877. end = this.date[1]
  1878. }
  1879. var param = {
  1880. pageIndex: this.page,
  1881. pageSize: this.size,
  1882. code: this.code,
  1883. // createDate: this.date,
  1884. startDate: stat,
  1885. endDate: end,
  1886. ownerId: this.ownerId,
  1887. type: this.queryExpenseMainType,
  1888. projectId: this.selectProject ? this.selectProject : null,
  1889. };
  1890. if (this.isAuditList) {
  1891. param.status = 1;
  1892. }
  1893. if (this.permissions.costExpenseRelease) {
  1894. param.sendState = this.sendState
  1895. }
  1896. this.list = [];
  1897. // this.total = 0;
  1898. this.http.post('/expense-sheet/list', param,
  1899. res => {
  1900. if (res.code == "ok") {
  1901. this.list = res.data.records;
  1902. this.total = res.data.total || 0;
  1903. } else {
  1904. this.$message({
  1905. message: res.msg,
  1906. type: "error"
  1907. });
  1908. }
  1909. },
  1910. error => {
  1911. this.$message({
  1912. message: error,
  1913. type: "error"
  1914. });
  1915. });
  1916. },
  1917. //删除单据
  1918. deletes(id) {
  1919. this.http.post('/expense-sheet/delete', { id: id },
  1920. res => {
  1921. if (res.code == "ok") {
  1922. this.getList()
  1923. this.$message({
  1924. message: this.$t('message.successfullyDeleted'),
  1925. type: "success"
  1926. });
  1927. } else {
  1928. this.$message({
  1929. message: res.msg,
  1930. type: "error"
  1931. });
  1932. }
  1933. },
  1934. error => {
  1935. this.$message({
  1936. message: error,
  1937. type: "error"
  1938. });
  1939. });
  1940. },
  1941. //创建单据
  1942. add() {
  1943. let newInvoiceList = JSON.parse(JSON.stringify(this.invoiceList))
  1944. for(var i in newInvoiceList) {
  1945. if(newInvoiceList[i].pic) {
  1946. newInvoiceList[i].pic = newInvoiceList[i].pic.map(item => item.name).join(',')
  1947. }
  1948. }
  1949. console.log(newInvoiceList)
  1950. this.addForm.items = JSON.stringify(newInvoiceList)//这里要传发票列表的json转string
  1951. this.addForm.totalAmount = this.totalCost
  1952. this.http.post('/expense-sheet/add', this.addForm,
  1953. res => {
  1954. if (res.code == "ok") {
  1955. this.$message({
  1956. message: this.$t('message.fillinsuccessfully'),
  1957. type: "success"
  1958. });
  1959. this.addForm = {
  1960. code: null,
  1961. ownerId: this.user.id,
  1962. createDate: null,
  1963. type: this.expenseMainTypeValue,
  1964. ticketNum: 1, remark: null, totalAmount: 0,
  1965. }
  1966. this.invoiceList = []
  1967. this.getNextCode()
  1968. } else {
  1969. this.$message({
  1970. message: res.msg,
  1971. type: "error"
  1972. });
  1973. }
  1974. },
  1975. error => {
  1976. this.$message({
  1977. message: error,
  1978. type: "error"
  1979. });
  1980. });
  1981. },
  1982. //获取单据编码
  1983. getNextCode() {
  1984. this.http.post('/expense-sheet/getNextCode', {
  1985. },
  1986. res => {
  1987. if (res.code == "ok") {
  1988. this.addForm.code = res.data;
  1989. } else {
  1990. this.$message({
  1991. message: res.msg,
  1992. type: "error"
  1993. });
  1994. }
  1995. },
  1996. error => {
  1997. this.$message({
  1998. message: error,
  1999. type: "error"
  2000. });
  2001. });
  2002. },
  2003. // 获取查看单据的数据
  2004. getParticulars(id) {
  2005. this.http.post('/expense-sheet/getDetail', {
  2006. id: id,
  2007. projectId: this.selectProject ? this.selectProject : '',
  2008. },
  2009. res => {
  2010. if (res.code == "ok") {
  2011. this
  2012. // this.ParticularsList = res.data
  2013. var s = []
  2014. // var b = []
  2015. for (var i in res.data.invoiceList) {
  2016. if (res.data.invoiceList[i].pic) {
  2017. let newPic = res.data.invoiceList[i].pic.split(',')
  2018. res.data.invoiceList[i].pic = newPic.map(item => {
  2019. return {
  2020. name: item,
  2021. url: `/upload/${item}`,
  2022. // url: `http://47.101.180.183/upload/${item}`,
  2023. title: '报销凭证'
  2024. }
  2025. })
  2026. }
  2027. }
  2028. this.ParticularsList = res.data
  2029. for (var i = 0; i <= this.ParticularsList.invoiceList.length - 1; i++) {
  2030. s.push(this.ParticularsList.invoiceList[i].projectId)
  2031. }
  2032. this.projectIdName = this.projectList.filter(item => { return s.indexOf(item.id) !== -1 })
  2033. // this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
  2034. // console.log(res.data, '查看当前状态');
  2035. // console.log(this.ParticularsList)
  2036. } else {
  2037. this.$message({
  2038. message: res.msg,
  2039. type: "error"
  2040. });
  2041. }
  2042. },
  2043. error => {
  2044. this.$message({
  2045. message: error,
  2046. type: "error"
  2047. });
  2048. })
  2049. },
  2050. //分页
  2051. handleCurrentChange(val) {
  2052. this.page = val;
  2053. console.log('page=======', this.page);
  2054. this.getList();
  2055. },
  2056. handleSizeChange(val) {
  2057. this.size = val;
  2058. this.getList();
  2059. },
  2060. deleteItem(item) {
  2061. this.$confirm(this.$t('yousureyouwanttodelete'), this.$t('other.prompts'), {
  2062. //type: 'warning'
  2063. }).then(() => {
  2064. this.http.post('/expense-sheet/delete', { id: item.id },
  2065. res => {
  2066. if (res.code == "ok") {
  2067. this.getList();
  2068. } else {
  2069. this.$message({
  2070. message: res.msg,
  2071. type: "error"
  2072. });
  2073. }
  2074. },
  2075. error => {
  2076. this.$message({
  2077. message: error,
  2078. type: "error"
  2079. });
  2080. });
  2081. });
  2082. },
  2083. // 点击删除
  2084. chanc(k) {
  2085. this.invoiceList.splice(k, 1)
  2086. },
  2087. // 双击
  2088. dbclick(row, event, column) {
  2089. this.isOK = true
  2090. },
  2091. oosk(s) {
  2092. this.isOK = false
  2093. },
  2094. ssl(index) {
  2095. this.z = index
  2096. this.addForm.type = index
  2097. this.ins = index;
  2098. this.expenseTypeList = this.allExpList.filter(a => a.mainType == this.ins);
  2099. this.addForm.ownerId = this.user.id;
  2100. this.getNextCode();
  2101. },
  2102. // 点击侧边栏事件
  2103. side() {
  2104. if (this.$refs.side.style.left < '0px') {
  2105. this.$refs.sidebars.style.width = '1px'
  2106. this.$refs.sid.style.left = '1px'
  2107. this.$refs.side.style.left = '1px'
  2108. this.$refs.sideI.className = 'el-icon-arrow-right'
  2109. this.$refs.staff.style.margin = '20px 20px 0 20px'
  2110. this.$refs.staff.style.width = '95%'
  2111. this.$refs.xiaomian.style.width = '100%'
  2112. this.$refs.headHe.style.paddingLeft = '20px'
  2113. this.currentClickNum = 0
  2114. } else {
  2115. this.$refs.sidebars.style.width = '200px'
  2116. this.$refs.sid.style.left = '200px'
  2117. this.$refs.side.style.left = '-19px'
  2118. this.$refs.sideI.className = 'el-icon-arrow-left'
  2119. this.$refs.staff.style.margin = '20px 20px 0 220px'
  2120. this.$refs.staff.style.width = '81%'
  2121. this.$refs.xiaomian.style.width = '85%'
  2122. this.$refs.headHe.style.paddingLeft = '220px'
  2123. this.currentClickNum = 70
  2124. }
  2125. },
  2126. // 费用金额失去焦点时触发
  2127. shiqu() {
  2128. this.addForm.totalAmount = this.invoiceList.reduce((prev, next) => {
  2129. return prev + parseFloat(next.amount);
  2130. }, 0)
  2131. },
  2132. kan() {
  2133. this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
  2134. return prev + parseFloat(next.amount)
  2135. }, 0)
  2136. },
  2137. zhi(e) {
  2138. // console.log('看看值', e)
  2139. var i = e
  2140. if (this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
  2141. return
  2142. }
  2143. this.invoiceList[i].taxValue = this.invoiceList[i].amount * this.invoiceList[i].taxPercent / 100
  2144. // console.log(this.invoiceList[i].amount, this.invoiceList[i].taxPercent)
  2145. var shui = this.invoiceList[i].taxPercent / 100 // 税率
  2146. var zhi = this.invoiceList[i].amount / (1 + shui) * shui
  2147. this.invoiceList[i].taxValue = zhi.toFixed(2)
  2148. },
  2149. zhiNum(i, val) {
  2150. // console.log('看看值', i, val)
  2151. // console.log(this.ParticularsList.invoiceList)
  2152. 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') {
  2153. return
  2154. }
  2155. var shui = this.ParticularsList.invoiceList[i].taxPercent / 100
  2156. var zhi = this.ParticularsList.invoiceList[i].amount / (1 + shui) * shui
  2157. this.ParticularsList.invoiceList[i].taxValue = zhi.toFixed(2)
  2158. },
  2159. zhis(e) {
  2160. var i = e
  2161. this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
  2162. },
  2163. fileonLoad(item) {
  2164. //首先判断文件类型
  2165. let str = item.file.name.split(".");
  2166. let format = str[str.length - 1];
  2167. if (format != "jpg" && format != "png" && format != "pdf") {
  2168. this.$message({
  2169. message: this.$t('pleaseselectpictures'),
  2170. type: "error"
  2171. });
  2172. } else {
  2173. this.listLoading = true;
  2174. let formData = new FormData();
  2175. formData.append("multipartFile", item.file);
  2176. this.http.uploadFile('/common/uploadFile', formData,
  2177. res => {
  2178. this.listLoading = false;
  2179. if (res.code == "ok") {
  2180. this.$message({
  2181. message: this.$t('uploadedsuccessfully'),
  2182. type: "success"
  2183. });
  2184. // this.getList();
  2185. this.invoiceList[this.apl].pic = res.data
  2186. // console.log(this.invoiceList)
  2187. } else {
  2188. this.$message({
  2189. message: res.msg,
  2190. type: "error"
  2191. });
  2192. }
  2193. },
  2194. error => {
  2195. this.listLoading = false;
  2196. this.$message({
  2197. message: error,
  2198. type: "error"
  2199. });
  2200. });
  2201. }
  2202. },
  2203. abl(e) {
  2204. this.apl = e
  2205. },
  2206. beforeRemove(file, fileList) {
  2207. var that = this
  2208. setTimeout(function () {
  2209. that.invoiceList[that.apl].pic = null
  2210. }, 200)
  2211. },
  2212. fileonLoads(item) {
  2213. //首先判断文件类型
  2214. let str = item.file.name.split(".");
  2215. let format = str[str.length - 1];
  2216. if (format != "jpg" && format != "png" && format != "pdf") {
  2217. this.$message({
  2218. message: this.$t('pleaseselectpictures'),
  2219. type: "error"
  2220. });
  2221. } else {
  2222. this.listLoading = true;
  2223. let formData = new FormData();
  2224. formData.append("multipartFile", item.file);
  2225. this.http.uploadFile('/common/uploadFile', formData,
  2226. res => {
  2227. this.listLoading = false;
  2228. if (res.code == "ok") {
  2229. this.$message({
  2230. message: this.$t('uploadedsuccessfully'),
  2231. type: "success"
  2232. });
  2233. // this.getList();
  2234. this.ParticularsList.invoiceList[this.apl].pic = res.data
  2235. // console.log(this.invoiceList)
  2236. } else {
  2237. this.$message({
  2238. message: res.msg,
  2239. type: "error"
  2240. });
  2241. }
  2242. },
  2243. error => {
  2244. this.listLoading = false;
  2245. this.$message({
  2246. message: error,
  2247. type: "error"
  2248. });
  2249. });
  2250. }
  2251. },
  2252. beforeRemoves(file, fileList) {
  2253. var that = this
  2254. setTimeout(function () {
  2255. // this.ParticularsList.invoiceList
  2256. that.ParticularsList.invoiceList[that.apl].pic = null
  2257. }, 200)
  2258. },
  2259. imgUrl(img) {
  2260. // var imgss = this.diz + '/upload/' + img
  2261. // var sp = []
  2262. // var is = {}
  2263. // is.url = imgss
  2264. // is.title = 1
  2265. // sp.push(is)
  2266. // this.imgs = sp
  2267. // console.log(imgss)
  2268. // console.log(this.$refs.imgsa)
  2269. // this.$refs.imgsa.click()
  2270. // console.log(location.protocol, location.host)
  2271. // console.log(location.protocol + '//' + location.host + imgs)
  2272. },
  2273. // 合计
  2274. getSummaries(param) {
  2275. const { columns, data } = param;
  2276. const sums = [];
  2277. columns.forEach((column, index) => {
  2278. if (index === 1) {
  2279. sums[index] = '本页金额合计';//this.$t('other.totals');
  2280. return;
  2281. }
  2282. if (index === 2) {
  2283. const values = data.map(item => Number(item[column.property]));
  2284. if (!values.every(value => isNaN(value))) {
  2285. sums[index] = values.reduce((prev, curr) => {
  2286. const value = Number(curr);
  2287. if (!isNaN(value)) {
  2288. return prev + curr;
  2289. } else {
  2290. return prev;
  2291. }
  2292. }, 0);
  2293. var zhi = +sums[index] + 0
  2294. var sl = zhi.toFixed(2)
  2295. sl += this.$t('yuan');
  2296. sums[index] = sl;
  2297. } else {
  2298. sums[index] = '';
  2299. }
  2300. } else {
  2301. sums[index] = '';
  2302. }
  2303. });
  2304. // console.log(sums, 123)
  2305. this.$nextTick(() => { this.$refs.tab.doLayout() })
  2306. return sums;
  2307. },
  2308. // 自定义组件事件
  2309. selectCal(obj) {
  2310. if (obj.distinction == '1') {
  2311. this.addForm.ownerId = obj.id
  2312. } else if (obj.distinction == '2') {
  2313. this.ownerId = obj.id
  2314. } else if (obj.distinction == '3') {
  2315. this.ParticularsList.ownerId = obj.id
  2316. } else if (obj.distinction == '4') {
  2317. this.addForm.firstCheckerId = obj.id
  2318. } else if (obj.distinction == '5') {
  2319. this.addForm.secondCheckerId = obj.id
  2320. } else if (obj.distinction == '6') {
  2321. this.ParticularsList.firstCheckerId = obj.id
  2322. } else if (obj.distinction == '7') {
  2323. this.ParticularsList.secondCheckerId = obj.id
  2324. }
  2325. },
  2326. // 单据导出
  2327. exportDocument() {
  2328. var stat = ''
  2329. var end = ''
  2330. if (this.date) {
  2331. stat = this.date[0]
  2332. end = this.date[1]
  2333. }
  2334. this.http.post('/expense-sheet/exportList', {
  2335. code: this.code,
  2336. startDate: stat,
  2337. endDate: end,
  2338. ownerId: this.ownerId,
  2339. type: this.type,
  2340. projectId: this.selectProject ? this.selectProject : null,
  2341. sendState: this.sendState
  2342. },
  2343. res => {
  2344. if (res.code == "ok") {
  2345. var filePath = res.data;
  2346. const a = document.createElement('a'); // 创建a标签
  2347. a.setAttribute('download', '费用报销单据列表');// download属性
  2348. a.setAttribute('href', filePath);// href链接
  2349. a.click(); //自执行点击事件
  2350. a.remove();
  2351. } else {
  2352. this.$message({
  2353. message: res.msg,
  2354. type: "error"
  2355. });
  2356. }
  2357. },
  2358. error => {
  2359. this.$message({
  2360. message: error,
  2361. type: "error"
  2362. });
  2363. });
  2364. },
  2365. // 单据发放
  2366. documentIssuance(type) {
  2367. const newList = this.multipleSelection.filter(item => item.status == 1 || item.status == 2);
  2368. const unissueds = this.multipleSelection.filter(item => item.status != 1 && item.status != 2 && item.sendState == 0).map(item => item.id);
  2369. const Issueds = this.multipleSelection.filter(item => item.status != 1 && item.status != 2 && item.sendState == 1).map(item => item.id);
  2370. const showMessage = (msg, messageType) => {
  2371. this.$message({
  2372. message: msg,
  2373. type: messageType
  2374. });
  2375. };
  2376. if (newList.length > 0) {
  2377. showMessage('存在待审核或已驳回的单据', 'warning');
  2378. return;
  2379. }
  2380. if (type == 1 && unissueds.length == 0) {
  2381. showMessage('请选择未发放的单据', 'warning');
  2382. return;
  2383. }
  2384. if (type == 0 && Issueds.length == 0) {
  2385. showMessage('请选择已发放的单据', 'warning');
  2386. return;
  2387. }
  2388. if(type == 1 && this.sendStateList.length > 0) {
  2389. this.releaseData = {
  2390. id: '',
  2391. data: unissueds
  2392. }
  2393. this.dialogVisibleRelease = true
  2394. return
  2395. }
  2396. this.callingInterface(type, type == 1 ? unissueds : Issueds);
  2397. },
  2398. callingInterface(type, ids) {
  2399. this.http.post('/expense-sheet/editSendExpense', {
  2400. expenseIds: ids.join(','),
  2401. sendState: type,
  2402. payWayId: this.releaseData.id || ''
  2403. },
  2404. res => {
  2405. this.dialogVisibleRelease = false
  2406. if (res.code == "ok") {
  2407. this.$message({
  2408. message: '操作成功',
  2409. type: "success"
  2410. });
  2411. this.getList()
  2412. } else {
  2413. this.$message({
  2414. message: res.msg,
  2415. type: "error"
  2416. });
  2417. }
  2418. },
  2419. error => {
  2420. this.dialogVisibleRelease = false
  2421. this.$message({
  2422. message: error,
  2423. type: "error"
  2424. });
  2425. });
  2426. },
  2427. handleSelectionChange(val) {
  2428. this.multipleSelection = val;
  2429. },
  2430. // 打印
  2431. print() {
  2432. this.$print(this.$refs.printContent)
  2433. },
  2434. // 触发自定义函数
  2435. performCustomization(index, type = 1) {
  2436. this.apl = index
  2437. this.imgLoadType = type
  2438. this.$refs.uploadInput.click()
  2439. },
  2440. // 查看详情
  2441. viewDetailsImage(index, fields = 'invoiceList', fieldsCope) {
  2442. if(fieldsCope) {
  2443. this.imgLoadType = 2
  2444. this.dialogVisibleImageList = this[fields][fieldsCope][index].pic
  2445. } else{
  2446. this.imgLoadType = 1
  2447. this.dialogVisibleImageList = this[fields][index].pic
  2448. }
  2449. console.log(this.dialogVisibleImageList, '查看详情')
  2450. this.apl = index
  2451. this.dialogVisibleImage = true
  2452. },
  2453. // 删除图片
  2454. deteleIpc(index, fields = 'invoiceList', fieldsCope) {
  2455. if(fieldsCope) {
  2456. this[fields][fieldsCope][index].pic.splice(index, 1)
  2457. this.dialogVisibleImageList = this[fields][fieldsCope][index].pic
  2458. } else{
  2459. this[fields][index].pic.splice(index, 1)
  2460. this.dialogVisibleImageList = this[fields][index].pic
  2461. }
  2462. },
  2463. // 费用报销图片上传(多选)
  2464. fileMultLoad() {
  2465. let fileArr = this.$refs.uploadInput.files
  2466. this.listLoading = true;
  2467. let formData = new FormData();
  2468. for (let i = 0; i < fileArr.length; i++) {
  2469. formData.append("multipartFiles", fileArr[i]);
  2470. }
  2471. this.http.uploadFile('/common/uploadFileArray', formData,
  2472. res => {
  2473. this.listLoading = false;
  2474. if (res.code == "ok") {
  2475. this.$message({
  2476. message: this.$t('uploadedsuccessfully'),
  2477. type: "success"
  2478. });
  2479. if(res.data) {
  2480. let newList = res.data.split(';')
  2481. let newArr = newList.map(item => {
  2482. return {
  2483. name: item,
  2484. url: '/upload/' + item,
  2485. // url: `http://47.101.180.183/upload/${item}`,
  2486. title: '报销凭证'
  2487. }
  2488. })
  2489. if(this.imgLoadType == 1) {
  2490. let oldList = this.invoiceList[this.apl].pic || []
  2491. this.$set(this.invoiceList[this.apl], 'pic', [...oldList, ...newArr])
  2492. this.dialogVisibleImageList = [...oldList, ...newArr]
  2493. }
  2494. if(this.imgLoadType == 2) {
  2495. let oldList = this.ParticularsList.invoiceList[this.apl].pic || []
  2496. this.$set(this.ParticularsList.invoiceList[this.apl], 'pic', [...oldList, ...newArr])
  2497. this.dialogVisibleImageList = [...oldList, ...newArr]
  2498. }
  2499. }
  2500. console.log(this.apl, '<< === 赋值的索引')
  2501. } else {
  2502. this.$message({
  2503. message: res.msg,
  2504. type: "error"
  2505. });
  2506. }
  2507. },
  2508. error => {
  2509. this.listLoading = false;
  2510. this.$message({
  2511. message: error,
  2512. type: "error"
  2513. });
  2514. });
  2515. },
  2516. // 判断当前数据的文件类型
  2517. isFileType(item) {
  2518. let str = item.split('.');
  2519. let format = str[str.length - 1];
  2520. if (['jpg', 'png', 'jpeg', 'JPG', 'PNG', 'JPEG'].includes(format)) {
  2521. return 'image'
  2522. } else if (format == "pdf") {
  2523. return 'pdf'
  2524. }
  2525. },
  2526. // 查看pdf
  2527. openViewPdf(urls) {
  2528. // 新窗口打开pdf
  2529. window.open(urls)
  2530. },
  2531. // 获取发放方式
  2532. getSendStateList() {
  2533. this.http.post('/expense-pay-way/get', {
  2534. companyId: this.user.companyId
  2535. },
  2536. res => {
  2537. if (res.code == "ok") {
  2538. this.sendStateList = res.data;
  2539. } else {
  2540. this.$message({
  2541. message: res.msg,
  2542. type: "error"
  2543. });
  2544. }
  2545. },
  2546. error => {
  2547. this.$message({
  2548. message: error,
  2549. type: "error"
  2550. });
  2551. });
  2552. }
  2553. },
  2554. beforeDestroy() {
  2555. }
  2556. };
  2557. </script>
  2558. <style scoped lang="scss">
  2559. .tups {
  2560. width: 100%;
  2561. height: 25px;
  2562. position: relative;
  2563. z-index: 99;
  2564. overflow: hidden;
  2565. }
  2566. .tups img {
  2567. // height: 25px !important;
  2568. // position: relative;
  2569. // z-index: 99;
  2570. width: 30px;
  2571. height: 30px;
  2572. margin-right: 4px;
  2573. }
  2574. .viewer-canvas {
  2575. position: absolute;
  2576. z-index: 9 !important;
  2577. }
  2578. .icl {
  2579. margin-top: -25px !important;
  2580. }
  2581. /* 费用报销标题 */
  2582. .headine {
  2583. width: 100%;
  2584. height: 46.4px;
  2585. line-height: 46.4px;
  2586. background: #fff;
  2587. box-sizing: border-box;
  2588. }
  2589. .headine h3 {
  2590. margin: 0;
  2591. display: inline-block;
  2592. box-sizing: border-box;
  2593. color: #999;
  2594. }
  2595. .headine p {
  2596. display: inline-block;
  2597. margin: 0;
  2598. }
  2599. /* /费用报销标题 */
  2600. .sidebars {
  2601. height: 100%;
  2602. position: absolute;
  2603. border-right: 1px solid #E6E6E6;
  2604. z-index: 2;
  2605. top: 0;
  2606. }
  2607. .sidebars h3 {
  2608. margin: 0;
  2609. line-height: 45px;
  2610. background: #ffffff;
  2611. font-weight: normal;
  2612. color: #666;
  2613. padding-left: 20px;
  2614. }
  2615. .sidebars .el-col-12 {
  2616. width: 100%
  2617. }
  2618. .public {
  2619. // height: 180px;
  2620. border-bottom: 1px solid #ddd;
  2621. }
  2622. .public .el-form-item {
  2623. display: inline-block;
  2624. }
  2625. .pu_button {
  2626. text-align: right;
  2627. width: 100%;
  2628. padding: 24px 30px;
  2629. box-sizing: border-box;
  2630. }
  2631. .pu_bu_x .pu_bu_t {
  2632. display: inline-block;
  2633. }
  2634. .pu_bu_x {
  2635. margin-right: 20px;
  2636. color: #20A0F7;
  2637. cursor: pointer;
  2638. }
  2639. .pu_bu_t {
  2640. color: #20A0F7;
  2641. cursor: pointer;
  2642. display: block;
  2643. float: right;
  2644. position:
  2645. relative;
  2646. top: -20px;
  2647. right: 63px;
  2648. }
  2649. .pu_table {
  2650. margin-left: 10px;
  2651. }
  2652. .pu_bu_t:hover {
  2653. color: #7bbcff;
  2654. }
  2655. .pu_bu_x:hover {
  2656. color: #7bbcff;
  2657. }
  2658. /* 我的单据报销凭证 */
  2659. .staff {
  2660. border-left: 1px solid #fff;
  2661. border-top: 1px solid #fff;
  2662. border-right: 1px solid #fff;
  2663. background: #fff;
  2664. }
  2665. /* */
  2666. .sdat {
  2667. display: inline-block;
  2668. width: 260px;
  2669. margin-left: 13px;
  2670. }
  2671. .messages .el-form-item {
  2672. display: inline-block;
  2673. }
  2674. .messages .el-date-editor.el-input,
  2675. .el-date-editor.el-input__inner {
  2676. width: 190px;
  2677. }
  2678. /* 我的报销凭证 */
  2679. .search {
  2680. position: relative;
  2681. top: 20px;
  2682. left: 20px;
  2683. }
  2684. .tables {
  2685. margin-top: 50px;
  2686. box-sizing: border-box;
  2687. padding: 10px;
  2688. }
  2689. .informant .el-form-item {
  2690. display: inline-block;
  2691. }
  2692. /* 侧边栏收索 */
  2693. .side {
  2694. position: absolute;
  2695. z-index: 2;
  2696. border-right: 2px solid #DDDDDD;
  2697. height: 100%;
  2698. top: 0;
  2699. width: 0;
  2700. }
  2701. .side .spans {
  2702. width: 20px;
  2703. height: 30px;
  2704. border: 1px solid #DDDDDD;
  2705. box-sizing: border-box;
  2706. position: absolute;
  2707. top: 50%;
  2708. margin-top: -50%;
  2709. text-align: center;
  2710. z-index: 1;
  2711. background: #fff;
  2712. }
  2713. .side .spans i {
  2714. margin-top: 7px;
  2715. color: #C0BFBF
  2716. }
  2717. .side:hover {
  2718. border-right: 2px solid #20A0FF;
  2719. }
  2720. .side:hover .spans {
  2721. border: 1px solid #20A0FF;
  2722. background: #20A0FF;
  2723. }
  2724. .side:hover .spans i {
  2725. color: #fff;
  2726. }
  2727. /* 右边整体页面 */
  2728. .contents {
  2729. height: 100%;
  2730. /* padding: 30px; */
  2731. background: #F7F7F7;
  2732. /* position: absolute; */
  2733. }
  2734. .submits {
  2735. margin-left: 50%;
  2736. }
  2737. .waiting {
  2738. color: orange;
  2739. }
  2740. .rejected {
  2741. color: red;
  2742. }
  2743. .newInvoice {
  2744. position: absolute;
  2745. right: 10px;
  2746. top: -20px;
  2747. height: 20px;
  2748. line-height: 20px;
  2749. cursor: pointer;
  2750. color: #20a0f7;
  2751. font-size: 14px;
  2752. }
  2753. .newInvoice:hover {
  2754. color: #7bbcff;
  2755. }
  2756. /* 新增打印的费用报销类型 */
  2757. .printContent {
  2758. .printContent-detail {
  2759. display: flex;
  2760. flex-wrap: wrap;
  2761. }
  2762. .detail-item {
  2763. width: 33%;
  2764. font-size: 16px;
  2765. margin-bottom: 10px;
  2766. color: #000;
  2767. .detail-item-title {
  2768. color: #999;
  2769. }
  2770. .single {
  2771. font-size: 14px;
  2772. }
  2773. .printBox {
  2774. display: inline-block;
  2775. width: 125px;
  2776. text-align-last: justify;
  2777. box-sizing: border-box;
  2778. padding-right: 10px;
  2779. }
  2780. }
  2781. .conter-box {
  2782. .conter-border {
  2783. width: 100%;
  2784. box-sizing: border-box;
  2785. padding: 15px;
  2786. border: 1px solid #ddd;
  2787. border-radius: 4px;
  2788. display: flex;
  2789. flex-wrap: wrap;
  2790. margin-top: 20px;
  2791. .detail-item {
  2792. width: 50%;
  2793. margin-top: 10px;
  2794. }
  2795. }
  2796. }
  2797. }
  2798. .customIamgeLoad {
  2799. opacity: 0;
  2800. position: absolute;
  2801. top: -300vh;
  2802. left: -300vw;
  2803. }
  2804. .dayImge {
  2805. .xiaoImg {
  2806. width: 120px;
  2807. height: 120px;
  2808. margin-right: 25px;
  2809. margin-bottom: 20px;
  2810. position: relative;
  2811. display: inline-block;
  2812. img {
  2813. width: 100%;
  2814. height: 100%;
  2815. }
  2816. .imgIcon {
  2817. position: absolute;
  2818. right: 0px;
  2819. font-size: 20px;
  2820. top: 0px;
  2821. cursor: pointer;
  2822. background: rgba($color: #000000, $alpha: .6);
  2823. width: 30px;
  2824. height: 30px;
  2825. display: flex;
  2826. justify-content: center;
  2827. align-items: center;
  2828. border-radius: 4px;
  2829. z-index: 5;
  2830. }
  2831. }
  2832. .xiaoImg:nth-child(5n) {
  2833. margin-right: 0;
  2834. }
  2835. .dayImgeItem {
  2836. display: flex;
  2837. flex-wrap: wrap;
  2838. }
  2839. .dayImgeItemFile {
  2840. width: 100%;
  2841. .title {
  2842. font-size: 20px;
  2843. }
  2844. .text {
  2845. margin: 10px 30px;
  2846. }
  2847. }
  2848. }
  2849. </style>