billEdit.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346
  1. <template>
  2. <div class="app-container zap-main">
  3. <header-bar :list="headerList"></header-bar>
  4. <el-row class="zap-margin-top">
  5. <div class="zap-title">基本信息</div>
  6. <el-row class="zap-form">
  7. <el-form ref="form" :model="form" :rules="rules" label-width="auto">
  8. <el-row>
  9. <el-col :span="12">
  10. <el-form-item label="账款类型" prop="wplIsInput">
  11. <el-radio-group class="zap-form-input--large" v-model="type" prop="type" :disabled="true">
  12. <el-radio-button label="00" v-if="type == '00'">应付账款</el-radio-button>
  13. <el-radio-button label="01" v-if="type == '01'">应收账款</el-radio-button>
  14. </el-radio-group>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="12">
  18. <el-form-item label="账款名称" prop="zbiName">
  19. <el-input class="zap-form-input--large" v-model="form.zbiName" clearable placeholder="请输入账款名称" maxlength="20" />
  20. </el-form-item>
  21. </el-col>
  22. </el-row>
  23. <el-col :span="12">
  24. <el-form-item label="应付方" prop="zbiPayerId">
  25. <el-input class="zap-form-input--large" v-model="form.payerName" maxlength="20" :disabled="true" v-if="
  26. company.scyId != form.zbiPayerId &&
  27. company.scyId != form.zbiPayeeId
  28. " />
  29. <el-select v-model="form.zbiPayerId" :disabled="true" filterable remote v-if="
  30. (type == '00' && company.scyId == form.zbiPayerId) ||
  31. (type == '00' && company.scyId == form.zbiPayeeId)
  32. ">
  33. <el-option :label="company.scyName" :value="company.scyId">
  34. </el-option>
  35. </el-select>
  36. <el-select class="zap-form-input--large" v-model="form.zbiPayerId" filterable clearable remote v-if="
  37. (type == '01' && company.scyId == form.zbiPayerId) ||
  38. (type == '01' && company.scyId == form.zbiPayeeId)
  39. ">
  40. <el-option v-for="(item, index) in companyRelList" :key="index" :label="
  41. item.launchScyId == company.scyId
  42. ? item.receiveScyName
  43. : item.launchScyName
  44. " :value="
  45. item.launchScyId == company.scyId
  46. ? item.receiveScyId
  47. : item.launchScyId
  48. ">
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="12">
  54. <el-form-item label="应收方" prop="zbiPayeeId">
  55. <el-input class="zap-form-input--large" v-model="form.payeeName" maxlength="20" :disabled="true" v-if="
  56. company.scyId != form.zbiPayerId &&
  57. company.scyId != form.zbiPayeeId
  58. " />
  59. <el-select v-model="form.zbiPayeeId" :disabled="true" filterable remote v-if="
  60. (type == '01' && company.scyId == form.zbiPayerId) ||
  61. (type == '01' && company.scyId == form.zbiPayeeId)
  62. ">
  63. <el-option :label="company.scyName" :value="company.scyId">
  64. </el-option>
  65. </el-select>
  66. <el-select class="zap-form-input--large" v-model="form.zbiPayeeId" filterable clearable remote v-if="
  67. (type == '00' && company.scyId == form.zbiPayerId) ||
  68. (type == '00' && company.scyId == form.zbiPayeeId)
  69. ">
  70. <el-option v-for="(item, index) in companyRelList" :key="index" :label="
  71. item.launchScyId == company.scyId
  72. ? item.receiveScyName
  73. : item.launchScyName
  74. " :value="
  75. item.launchScyId == company.scyId
  76. ? item.receiveScyId
  77. : item.launchScyId
  78. ">
  79. </el-option>
  80. </el-select>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="12">
  84. <el-form-item label="贸易日期" prop="zbiDate" size="large">
  85. <el-date-picker class="zap-form-input--large" v-model="form.zbiDate" clearable value-format="yyyy-MM-dd" type="date" placeholder="选择日期" :picker-options="pickerOptionsStart">
  86. </el-date-picker>
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="12">
  90. <el-form-item :label="
  91. type == '00'
  92. ? '预计付款日期'
  93. : type == '01'
  94. ? '预计收款日期'
  95. : '预计收/付款日期'
  96. " prop="zbiPayDate" size="large">
  97. <el-date-picker class="zap-form-input--large" v-model="form.zbiPayDate" clearable value-format="yyyy-MM-dd" type="date" placeholder="选择日期" :picker-options="pickerOptionsEnd">
  98. </el-date-picker>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :span="12">
  102. <el-form-item label="账款金额" size="large">
  103. <el-input class="zap-form-input--large" :disabled="true" :value="allAmount()" maxlength="20">
  104. <template slot="append">元</template>
  105. </el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="12">
  109. <el-form-item label="账款金额大写" size="large">
  110. <el-input class="zap-form-input--large" :disabled="true" :value="smallToBig(allAmount())">
  111. </el-input>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="12">
  115. <el-form-item label="贸易合同编号" prop="zbiContractNo" size="large">
  116. <el-input class="zap-form-input--large" v-model="form.zbiContractNo" clearable placeholder="请输入贸易合同编号" maxlength="20" />
  117. </el-form-item>
  118. </el-col>
  119. <el-col :span="12">
  120. <el-form-item label="贸易商品/服务" size="large">
  121. <el-input class="zap-form-input--large" v-model="form.zbiService" clearable placeholder="请输入贸易商品/服务" maxlength="20" />
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="12">
  125. <el-form-item label="配送企业" size="large">
  126. <el-input class="zap-form-input--large" v-model="form.zbiDistributor" clearable placeholder="请输入配送企业" maxlength="20" />
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="12">
  130. <el-form-item label="配送订单号" size="large">
  131. <el-input class="zap-form-input--large" v-model="form.zbiOrderNo" clearable placeholder="请输入配送订单号" maxlength="20" />
  132. </el-form-item>
  133. </el-col>
  134. <el-row>
  135. <el-form-item label="备注">
  136. <el-input class="zap-form__textarea" v-model="form.zbiRemark" placeholder="请输入备注" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="100" type="textarea" />
  137. </el-form-item>
  138. </el-row>
  139. </el-form>
  140. </el-row>
  141. </el-row>
  142. <el-row class="zap-margin-top">
  143. <div class="zap-title">发票列表</div>
  144. <div class="zap-form" style="padding-bottom: 20px;">
  145. <el-form ref="invoice" label-width="auto" :inline="true">
  146. <el-row type="flex" align="middle" justify="center">
  147. <el-col>
  148. <el-form-item label="合计:">{{
  149. handleInput(allAmount())
  150. }}</el-form-item>
  151. <el-form-item label="大写:">{{
  152. smallToBig(allAmount())
  153. }}</el-form-item>
  154. </el-col>
  155. <el-col>
  156. <el-form-item style="float: right">
  157. <el-button type="danger" @click="delInvoice">删除</el-button>
  158. </el-form-item>
  159. <el-form-item style="float: right">
  160. <el-button type="success" @click="openUpload()">上传/修改</el-button>
  161. </el-form-item>
  162. </el-col>
  163. </el-row>
  164. </el-form>
  165. <el-table :data="fileList" @selection-change="handleInvoiceSelectionChange" row-key="ziiId" default-expand-all :row-class-name="tableRowClassName" border stripe>
  166. <el-table-column type="selection" width="50" align="center" />
  167. <el-table-column label="发票代码" align="center" prop="ziiNo" maxlength="10" />
  168. <el-table-column label="发票号码" align="center" prop="ziiNumber" maxlength="10" />
  169. <el-table-column label="开票日期" align="center" prop="ziiDate" />
  170. <el-table-column label="购方识别号" align="center" prop="ziiPurchaserNo" />
  171. <el-table-column label="销方识别号" align="center" prop="ziiSellerNo" />
  172. <el-table-column label="合计金额" align="center" prop="ziiTotalAmount" />
  173. <el-table-column label="价税合计" align="center" prop="ziiAmount" />
  174. <el-table-column label="校验结果" align="center" prop="ziiCheckStt" :formatter="checkSttFormat" />
  175. <el-table-column label="附件" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
  176. <template slot-scope="scope">
  177. <el-button size="mini" type="text" @click="invoicePictureCardPreview(scope.row)">详情</el-button>
  178. </template>
  179. </el-table-column>
  180. </el-table>
  181. <!-- 上传附件 -->
  182. <el-dialog title="上传发票" :visible.sync="uploadOpen" width="500px" append-to-body>
  183. <el-upload class="upload-demo" drag ref="upload" :file-list="fileList" :auto-upload="true" :http-request="httpRequest" :before-remove="beforeRemove" :on-remove="invoiceRemove" :before-upload="beforeAvatarUpload" accept=".jpg,.jpeg,.png" action="" multiple>
  184. <i class="el-icon-upload"></i>
  185. <div class="el-upload__text">
  186. 将文件拖到此处,或<em>点击选择文件</em>
  187. </div>
  188. <div class="el-upload__tip">
  189. 按住Ctrl可同时多选,单个文件不能超过2mb
  190. </div>
  191. <div class="el-upload__tip">
  192. 严禁上传包含色情、暴力、反动等相关违法信息的文件。
  193. </div>
  194. </el-upload>
  195. <!-- <el-button type="primary" @click="submitUpload()"
  196. >点击上传</el-button
  197. > -->
  198. <el-button type="primary" @click="toCheck()">完成去验真</el-button>
  199. </el-dialog>
  200. <!-- 发票验真 -->
  201. <el-dialog title="发票验真" :visible.sync="open" width="1050px" append-to-body>
  202. <el-row class="zap-bill-dialog" type="flex">
  203. <div width="224px" style="background-color: white;flex: 0 0 224px;">
  204. <el-button style="width: 224px;" type="primary" @click="openUploadInvoice">上传发票</el-button>
  205. <div class="zap-bill-dialog__main">
  206. <div class="zap-bill-dialog__title"> <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  207. <label>已上传发票列表</label></div>
  208. <div class="zap-bill-dialog__item" :style="
  209. item.ziiCheckStt == '1'
  210. ? { 'background-color': '#a8f87f' }
  211. : {}
  212. " v-for="(item, index) in fileList" :label="item" :key="index">
  213. <i class="el-icon-question" style="color: blue" v-if="item.ziiCheckStt == '0'"><label @click="changeInvoice(item)">
  214. <el-link :underline="false">{{
  215. item.name
  216. }}</el-link>
  217. </label></i>
  218. <i class="el-icon-success" style="color: green" v-if="item.ziiCheckStt == '1'"><label @click="changeInvoice(item)">
  219. <el-link :underline="false">{{
  220. item.name
  221. }}</el-link>
  222. </label></i>
  223. <i class="el-icon-error" style="color: red" v-if="item.ziiCheckStt == '2' || item.ziiCheckStt == '3'"><label @click="changeInvoice(item)">
  224. <el-link :underline="false">{{
  225. item.name
  226. }}</el-link>
  227. </label><label>{{ checkSttFormat(item) }}</label></i>
  228. <el-link style="float: right" type="primary" :underline="false" @click="delInvoice(item)">删除</el-link>
  229. </div>
  230. </div>
  231. <div style="text-align: center; margin-top: 20px">
  232. <el-button type="primary" @click="toCheckAgian()">再次验证</el-button>
  233. <el-button type="primary" @click="submitCheck()">保存并上传</el-button>
  234. </div>
  235. </div>
  236. <div style="margin-left: 32px;">
  237. <el-row height="232px">
  238. <el-image style="width: 700px; height: 232px" :src="invoice.url" fit="scale-down" @click="invoicePictureCardPreview(invoice)"></el-image>
  239. <p v-if="invoice.zbiName && invoice.ziiCheckStt == '3'" style="text-align: center; color: red">
  240. 发票重复,已存在名称为“{{ invoice.zbiName }}”的往来账款中!
  241. </p>
  242. </el-row>
  243. <el-row class="mt20">
  244. <el-form ref="invoice" label-width="auto" :disabled="invoice.ziiCheckStt == '1'">
  245. <el-col :span="12">
  246. <el-form-item label="发票代码:">
  247. <el-input class="zap-bill-dialog__input" v-model="invoice.ziiNo" maxlength="20" />
  248. </el-form-item>
  249. </el-col>
  250. <el-col :span="12">
  251. <el-form-item label="发票号码:">
  252. <el-input class="zap-bill-dialog__input" v-model="invoice.ziiNumber" maxlength="20" />
  253. </el-form-item>
  254. </el-col>
  255. <el-col :span="12">
  256. <el-form-item label="开票日期:">
  257. <el-date-picker class="zap-bill-dialog__input" v-model="invoice.ziiDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期">
  258. </el-date-picker>
  259. </el-form-item>
  260. </el-col>
  261. <el-col :span="12">
  262. <el-form-item label="购货纳税人编号:">
  263. <el-input class="zap-bill-dialog__input" v-model="invoice.ziiPurchaserNo" maxlength="20" />
  264. </el-form-item>
  265. </el-col>
  266. <el-col :span="12">
  267. <el-form-item label="销货纳税人编号:">
  268. <el-input class="zap-bill-dialog__input" v-model="invoice.ziiSellerNo" maxlength="20" />
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="12">
  272. <el-form-item label="发票金额:">
  273. <el-input class="zap-bill-dialog__input" v-model="invoice.ziiTotalAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiTotalAmount,'0')" />
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="12">
  277. <el-form-item label="税价金额:">
  278. <el-input class="zap-bill-dialog__input" v-model="invoice.ziiAmount" maxlength="16" @input.native="changeRate($event,invoice.ziiAmount,'1')" />
  279. </el-form-item>
  280. </el-col>
  281. </el-form>
  282. </el-row>
  283. <el-footer>
  284. <el-button type="primary" @click="queryDouble()" style="float: right">确定</el-button>
  285. </el-footer>
  286. </div>
  287. </el-row>
  288. </el-dialog>
  289. </div>
  290. </el-row>
  291. <el-row class="zap-margin-top">
  292. <div class="zap-title">贸易合同</div>
  293. <div class="zap-form" style="padding-bottom: 20px;">
  294. <el-form ref="contract" label-width="auto" :inline="true">
  295. </el-form>
  296. <el-upload :file-list="contractList" :auto-upload="true" :http-request="httpRequestContract" action="" ref="contractUpload" list-type="picture-card" accept=".jpg,.jpeg,.png" :before-upload="beforeUpload" :on-preview="invoicePictureCardPreview" :before-remove="beforeRemove" :on-remove="handleRemoveContract">
  297. <!-- 触发文件选择框的内容 -->
  298. <div slot="trigger" class="zap-contract-add__upload">
  299. <i class="el-icon-upload"></i>
  300. <div class="zap-upload__text">上传文件</div>
  301. </div>
  302. <div slot="tip" class="zap-contract-add__tip">
  303. 支持格式:JPG/PNG </br>
  304. 单个文件不能超过2MB
  305. </div>
  306. </el-upload>
  307. </div>
  308. </el-row>
  309. <el-row class="zap-margin-top">
  310. <div class="zap-title">物流附件</div>
  311. <div class="zap-form" style="padding-bottom: 20px;">
  312. <el-form ref="logistics" label-width="auto" :inline="true">
  313. </el-form>
  314. <el-upload :file-list="logisticsList" :auto-upload="true" :http-request="httpRequestLogistics" action="" ref="logisticsUpload" list-type="picture-card" accept=".jpg,.jpeg,.png" :before-upload="beforeUpload" :on-preview="invoicePictureCardPreview" :before-remove="beforeRemove" :on-remove="handleRemoveLogistics">
  315. <!-- 触发文件选择框的内容 -->
  316. <div slot="trigger" class="zap-contract-add__upload">
  317. <i class="el-icon-upload"></i>
  318. <div class="zap-upload__text">上传文件</div>
  319. </div>
  320. <div slot="tip" class="zap-contract-add__tip">
  321. 支持格式:JPG/PNG </br>
  322. 单个文件不能超过2MB
  323. </div>
  324. </el-upload>
  325. </div>
  326. </el-row>
  327. <el-row class="zap-margin-top">
  328. <div class="zap-title">其他附件</div>
  329. <div class="zap-form" style="padding-bottom: 20px;">
  330. <el-form ref="other" label-width="auto" :inline="true">
  331. </el-form>
  332. <el-upload :file-list="otherList" :auto-upload="true" :http-request="httpRequestOther" action="" ref="otherUpload" list-type="picture-card" accept=".jpg,.jpeg,.png" :before-upload="beforeUpload" :on-preview="invoicePictureCardPreview" :before-remove="beforeRemove" :on-remove="handleRemoveOther">
  333. <!-- 触发文件选择框的内容 -->
  334. <div slot="trigger" class="zap-contract-add__upload">
  335. <i class="el-icon-upload"></i>
  336. <div class="zap-upload__text">上传文件</div>
  337. </div>
  338. <div slot="tip" class="zap-contract-add__tip">
  339. 支持格式:JPG/PNG </br>
  340. 单个文件不能超过2MB
  341. </div>
  342. </el-upload>
  343. </div>
  344. </el-row>
  345. <!-- 查看图片 -->
  346. <el-dialog :visible.sync="invoiceVisible">
  347. <img width="100%" :src="invoiceImageUrl" alt="" />
  348. </el-dialog>
  349. <el-row type="flex" justify="center" align="middle" style="height: 82px;">
  350. <el-button type="primary" @click="submit()">提交</el-button>
  351. </el-row>
  352. </div>
  353. </template>
  354. <script>
  355. import {
  356. getBill,
  357. getInvoice,
  358. addBill,
  359. getInvoiceText,
  360. invoiceVerification,
  361. delInvoice,
  362. uploadBillFile,
  363. getFile,
  364. delFile,
  365. commitBill,
  366. getAmount,
  367. queryDouble,
  368. } from "@/api/service/bill/bill";
  369. import {
  370. getOwnCompany,
  371. companyRelList
  372. } from "@/api/common/company";
  373. import {
  374. amtformat
  375. } from "@/utils/amtCommon";
  376. import {
  377. getToken
  378. } from "@/utils/auth";
  379. export default {
  380. name: "billEdit",
  381. components: {},
  382. data() {
  383. return {
  384. // 选中数组
  385. ids: [],
  386. // 非单个禁用
  387. single: true,
  388. // 非多个禁用
  389. multiple: true,
  390. // 是否显示弹出层
  391. open: false,
  392. uploadOpen: false,
  393. // 查询参数
  394. queryParams: {},
  395. // 表单参数
  396. form: {},
  397. // 表单校验
  398. rules: {
  399. zbiName: [{
  400. required: true,
  401. message: "账款名称不能为空",
  402. trigger: ["blur", "change"],
  403. },
  404. {
  405. pattern: /^[\u4E00-\u9FA5A-Za-z0-9]+$/,
  406. message: "账款名称只能包含中文、英文、数字",
  407. trigger: ["blur", "change"],
  408. },
  409. ],
  410. zbiPayerId: [{
  411. required: true,
  412. message: "应付方不能为空",
  413. trigger: ["blur", "change"],
  414. }, ],
  415. zbiDate: [{
  416. required: true,
  417. message: "贸易日期不能为空",
  418. trigger: ["blur", "change"],
  419. }, ],
  420. zbiPayDate: [{
  421. required: true,
  422. message: "预计收/付款日期不能为空",
  423. trigger: ["blur", "change"],
  424. }, ],
  425. zbiPayeeId: [{
  426. required: true,
  427. message: "应收方不能为空",
  428. trigger: ["blur", "change"],
  429. }, ],
  430. zbiAmount: [{
  431. required: true,
  432. message: "贸易金额不能为空",
  433. trigger: ["blur", "change"],
  434. },
  435. {
  436. pattern: /^(?:0|[1-9]\d{0,13})(?:\.\d{1,2})?$/,
  437. message: "请输入正确的金额",
  438. trigger: ["blur", "change"],
  439. },
  440. ],
  441. zbiContractNo: [{
  442. required: true,
  443. message: "合同编号不能为空",
  444. trigger: ["blur", "change"],
  445. },
  446. {
  447. pattern: /^[a-zA-Z0-9]+$/,
  448. message: "请输入数字或英文",
  449. trigger: ["blur", "change"],
  450. },
  451. ],
  452. },
  453. //类型
  454. type: "00",
  455. //贸易合同
  456. contractList: [],
  457. //物流附件
  458. logisticsList: [],
  459. //其他附件
  460. otherList: [],
  461. //发票列表
  462. fileList: [],
  463. //全选状态
  464. checkAll: false,
  465. //全选状态
  466. isIndeterminate: false,
  467. //选中值
  468. checkedInvoice: [],
  469. //发票对象
  470. invoice: {},
  471. //合计金额
  472. totalPrice: 0,
  473. //验证结果
  474. checkSttOptions: [],
  475. //图片路径
  476. invoiceImageUrl: null,
  477. //图片显示
  478. invoiceVisible: false,
  479. //等待框
  480. fullscreenLoading: false,
  481. //链属企业
  482. companyRelList: [],
  483. //链属企业
  484. company: {},
  485. pickerOptionsStart: {
  486. disabledDate: (time) => {
  487. if (this.form.zbiPayDate) {
  488. return (
  489. time.getTime() >
  490. new Date(this.form.zbiPayDate).getTime() -
  491. 14 * 24 * 60 * 60 * 1000
  492. );
  493. }
  494. },
  495. },
  496. pickerOptionsEnd: {
  497. disabledDate: (time) => {
  498. if (this.form.zbiDate) {
  499. return (
  500. time.getTime() <
  501. new Date(this.form.zbiDate).getTime() + 13 * 24 * 60 * 60 * 1000
  502. );
  503. }
  504. },
  505. },
  506. };
  507. },
  508. computed: {
  509. headerList() {
  510. return [{
  511. icon: require('../../../assets/images/components/headerBar/icon_creater.png'),
  512. label: '创建人:',
  513. value: this.form.createUser
  514. },
  515. {
  516. icon: require('../../../assets/images/components/headerBar/icon_calendar.png'),
  517. label: '创建日期:',
  518. value: this.parseTime(new Date(this.form.createTime))
  519. },
  520. {
  521. icon: require('../../../assets/images/components/headerBar/icon_list.png'),
  522. label: '编号:',
  523. value: this.form.zbiNumber
  524. },
  525. ]
  526. }
  527. },
  528. created() {
  529. const zbiId = this.$route.params && this.$route.params.zbiId;
  530. this.fullscreenLoading = true;
  531. getOwnCompany().then((response) => {
  532. this.company = response.data;
  533. });
  534. this.getCompanyRel();
  535. this.getDetail(zbiId);
  536. getInvoice(zbiId).then((response) => {
  537. response.data.forEach((element) => {
  538. element.url = element.url + "/" + getToken();
  539. });
  540. this.fileList = response.data;
  541. this.invoice = this.fileList[0] ? this.fileList[0] : {};
  542. this.ids = [];
  543. });
  544. getFile("0", zbiId).then((response) => {
  545. response.data.forEach((element) => {
  546. element.url = element.url + "/" + getToken();
  547. });
  548. this.contractList = response.data;
  549. });
  550. //查询物流
  551. getFile("1", zbiId).then((response) => {
  552. response.data.forEach((element) => {
  553. element.url = element.url + "/" + getToken();
  554. });
  555. this.logisticsList = response.data;
  556. });
  557. //查询其他附件
  558. getFile("2", zbiId).then((response) => {
  559. response.data.forEach((element) => {
  560. element.url = element.url + "/" + getToken();
  561. });
  562. this.otherList = response.data;
  563. });
  564. this.getDicts("zc_invoice_checkStt").then((response) => {
  565. this.checkSttOptions = response.data;
  566. });
  567. },
  568. activated() {},
  569. methods: {
  570. //查询往来账款详情
  571. getDetail(zbiId) {
  572. const loading = this.$loading({
  573. lock: true,
  574. text: "Loading",
  575. spinner: "el-icon-loading",
  576. background: "rgba(0, 0, 0, 0.7)",
  577. });
  578. getBill(zbiId)
  579. .then((response) => {
  580. this.form = response.data;
  581. if (this.form.zbiPayerId == this.company.scyId) {
  582. this.type = "00";
  583. } else {
  584. this.type = "01";
  585. }
  586. loading.close();
  587. })
  588. .catch(() => {
  589. loading.close();
  590. });
  591. },
  592. //切换账款类型
  593. changePayer(val) {
  594. if (val == "00") {
  595. this.form.zbiPayerId = this.company.scyId;
  596. this.form.zbiPayeeId = null;
  597. } else if (val == "01") {
  598. this.form.zbiPayerId = null;
  599. this.form.zbiPayeeId = this.company.scyId;
  600. }
  601. },
  602. //查询链属企业
  603. getCompanyRel(val) {
  604. this.queryParams.companyName = val;
  605. companyRelList(this.queryParams).then((response) => {
  606. this.companyRelList = response.data;
  607. });
  608. },
  609. //全选
  610. handleCheckAllChange(val) {
  611. this.checkedInvoice = val ? this.fileList : [];
  612. this.ids = val ? this.fileList.map((item) => item.id) : [];
  613. this.isIndeterminate = false;
  614. },
  615. // 多选框选中数据
  616. handleInvoiceSelectionChange(selection) {
  617. this.ids = selection.map((item) => item.id);
  618. this.single = selection.length !== 1;
  619. this.multiple = !selection.length;
  620. },
  621. //发票上传窗口
  622. openUpload() {
  623. this.open = true;
  624. },
  625. //上传
  626. submitUpload() {
  627. this.$refs.upload.submit();
  628. },
  629. //上传发票窗口
  630. openUploadInvoice() {
  631. this.uploadOpen = true;
  632. },
  633. //判重验证
  634. queryDouble() {
  635. const loading = this.$loading({
  636. lock: true,
  637. text: "Loading",
  638. spinner: "el-icon-loading",
  639. background: "rgba(0, 0, 0, 0.7)",
  640. });
  641. if (
  642. this.invoice &&
  643. this.invoice.ziiCheckStt != "1"
  644. ) {
  645. queryDouble(this.invoice).then((response) => {
  646. this.fileList.forEach((file) => {
  647. if (response.id == file.id) {
  648. file.ziiCheckStt = response.ziiCheckStt;
  649. file.zbiName = response.zbiName;
  650. }
  651. });
  652. // this.invoice = this.fileList[0] ? this.fileList[0] : {};
  653. loading.close();
  654. }).catch((response) => {
  655. loading.close();
  656. });
  657. } else {
  658. loading.close();
  659. }
  660. },
  661. //去验真
  662. toCheck() {
  663. this.uploadOpen = false;
  664. const loading = this.$loading({
  665. lock: true,
  666. text: "Loading",
  667. spinner: "el-icon-loading",
  668. background: "rgba(0, 0, 0, 0.7)",
  669. });
  670. let fd = new FormData(); // FormData 对象
  671. fd.append("fileList", JSON.stringify(this.fileList)); // 文件对象
  672. invoiceVerification(fd)
  673. .then((response) => {
  674. response.forEach((element) => {
  675. this.fileList.forEach((file) => {
  676. if (element.id == file.id) {
  677. file.ziiCheckStt = element.ziiCheckStt;
  678. file.zbiName = element.zbiName;
  679. }
  680. });
  681. });
  682. this.invoice = this.fileList[0] ? this.fileList[0] : {};
  683. loading.close();
  684. })
  685. .catch(() => {
  686. loading.close();
  687. });
  688. },
  689. //重新验真
  690. toCheckAgian() {
  691. const loading = this.$loading({
  692. lock: true,
  693. text: "Loading",
  694. spinner: "el-icon-loading",
  695. background: "rgba(0, 0, 0, 0.7)",
  696. });
  697. let checkList = this.checkedInvoice.filter((element) => {
  698. return element.ziiCheckStt == "0";
  699. });
  700. let fd = new FormData(); // FormData 对象
  701. fd.append("fileList", JSON.stringify(checkList)); // 文件对象
  702. invoiceVerification(fd)
  703. .then((response) => {
  704. response.forEach((element) => {
  705. this.fileList.forEach((file) => {
  706. if (element.id == file.id) {
  707. file.ziiCheckStt = element.ziiCheckStt;
  708. file.zbiName = element.zbiName;
  709. }
  710. });
  711. });
  712. loading.close();
  713. })
  714. .catch(() => {
  715. loading.close();
  716. });
  717. },
  718. //金额校验格式
  719. changeRate(e, input, type) {
  720. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  721. this.input = e.target.value;
  722. if ("0" == type) {
  723. this.invoice.ziiTotalAmount = e.target.value;
  724. } else if ("1" == type) {
  725. this.invoice.ziiAmount = e.target.value;
  726. }
  727. },
  728. //表格置灰
  729. tableRowClassName({
  730. row,
  731. rowIndex
  732. }) {
  733. if (row.ziiCheckStt != "1") {
  734. return "warning-row";
  735. }
  736. return "";
  737. },
  738. //切换发票
  739. changeInvoice(item) {
  740. this.invoice = item;
  741. },
  742. //手动上传发票触发
  743. httpRequest(param) {
  744. const loading = this.$loading({
  745. lock: true,
  746. text: "Loading",
  747. spinner: "el-icon-loading",
  748. background: "rgba(0, 0, 0, 0.7)",
  749. });
  750. let fileObj = param.file; // 相当于input里取得的files
  751. let fd = new FormData(); // FormData 对象
  752. fd.append("file", fileObj); // 文件对象
  753. fd.append("zbiId", this.form.zbiId); //文件类型
  754. getInvoiceText(fd)
  755. .then((response) => {
  756. response.data.url = response.data.url + "/" + getToken();
  757. var flag = true;
  758. this.fileList.forEach((element) => {
  759. if (element.ziiNo == response.data.ziiNo) {
  760. flag = false;
  761. }
  762. });
  763. if (flag) {
  764. this.fileList.push(response.data);
  765. } else {
  766. let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
  767. let idx = this.$refs.upload.uploadFiles.findIndex(
  768. (item) => item.uid === uid
  769. ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
  770. this.$refs.upload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
  771. this.$message.error("检测发票重复上传,请检查后重试");
  772. }
  773. loading.close();
  774. })
  775. .catch(() => {
  776. let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
  777. let idx = this.$refs.upload.uploadFiles.findIndex(
  778. (item) => item.uid === uid
  779. ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
  780. this.$refs.upload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
  781. loading.close();
  782. });
  783. },
  784. beforeUpload(files) {
  785. var testmsg = files.name.substring(files.name.lastIndexOf(".") + 1);
  786. const extension = testmsg === "jpg";
  787. const extension2 = testmsg === "jpeg";
  788. const extension3 = testmsg === "png";
  789. if (!extension && !extension2 && !extension3) {
  790. this.$message.warning(`请选择图片格式文件`);
  791. }
  792. return extension || extension2 || extension3;
  793. },
  794. //上传前校验
  795. beforeAvatarUpload(file) {
  796. const isJPG = file.type === "image/jpeg" || file.type === "image/png";
  797. const isLt2M = file.size / 1024 / 1024 < 2;
  798. if (!isJPG) {
  799. this.$message.error("上传图片只能是 JPG/PNG 格式");
  800. }
  801. if (!isLt2M) {
  802. this.$message.error("上传图片大小不能超过 2MB");
  803. }
  804. return isJPG && isLt2M;
  805. },
  806. //上传合同
  807. submitUploadContract() {
  808. this.$refs.contractUpload.submit();
  809. },
  810. //上传物流
  811. submitUploadLogistics() {
  812. this.$refs.logisticsUpload.submit();
  813. },
  814. //上传其他
  815. submitUploadOther() {
  816. this.$refs.otherUpload.submit();
  817. },
  818. //手动上传合同触发
  819. httpRequestContract(param) {
  820. const loading = this.$loading({
  821. lock: true,
  822. text: "Loading",
  823. spinner: "el-icon-loading",
  824. background: "rgba(0, 0, 0, 0.7)",
  825. });
  826. let fileObj = param.file; // 相当于input里取得的files
  827. let fd = new FormData(); // FormData 对象
  828. fd.append("file", fileObj); // 文件对象
  829. fd.append("zbiId", this.form.zbiId); //文件类型
  830. fd.append("type", "0"); //文件类型
  831. uploadBillFile(fd)
  832. .then((response) => {
  833. response.data.url = response.data.url + "/" + getToken();
  834. this.contractList.push(response.data);
  835. loading.close();
  836. })
  837. .catch(() => {
  838. let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
  839. let idx = this.$refs.contractUpload.uploadFiles.findIndex(
  840. (item) => item.uid === uid
  841. ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
  842. this.$refs.contractUpload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
  843. loading.close();
  844. });
  845. },
  846. //手动上传物流触发
  847. httpRequestLogistics(param) {
  848. const loading = this.$loading({
  849. lock: true,
  850. text: "Loading",
  851. spinner: "el-icon-loading",
  852. background: "rgba(0, 0, 0, 0.7)",
  853. });
  854. let fileObj = param.file; // 相当于input里取得的files
  855. let fd = new FormData(); // FormData 对象
  856. fd.append("file", fileObj); // 文件对象
  857. fd.append("zbiId", this.form.zbiId); //文件类型
  858. fd.append("type", "1"); //文件类型
  859. uploadBillFile(fd)
  860. .then((response) => {
  861. response.data.url = response.data.url + "/" + getToken();
  862. this.logisticsList.push(response.data);
  863. loading.close();
  864. })
  865. .catch(() => {
  866. let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
  867. let idx = this.$refs.logisticsUpload.uploadFiles.findIndex(
  868. (item) => item.uid === uid
  869. ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
  870. this.$refs.logisticsUpload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
  871. loading.close();
  872. });
  873. },
  874. //手动上传其他触发
  875. httpRequestOther(param) {
  876. const loading = this.$loading({
  877. lock: true,
  878. text: "Loading",
  879. spinner: "el-icon-loading",
  880. background: "rgba(0, 0, 0, 0.7)",
  881. });
  882. let fileObj = param.file; // 相当于input里取得的files
  883. let fd = new FormData(); // FormData 对象
  884. fd.append("file", fileObj); // 文件对象
  885. fd.append("zbiId", this.form.zbiId); //文件类型
  886. fd.append("type", "2"); //文件类型
  887. uploadBillFile(fd)
  888. .then((response) => {
  889. response.data.url = response.data.url + "/" + getToken();
  890. this.otherList.push(response.data);
  891. loading.close();
  892. })
  893. .catch(() => {
  894. let uid = fileObj.uid; // 关键作用代码,去除文件列表失败文件
  895. let idx = this.$refs.otherUpload.uploadFiles.findIndex(
  896. (item) => item.uid === uid
  897. ); // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
  898. this.$refs.otherUpload.uploadFiles.splice(idx, 1); // 关键作用代码,去除文件列表失败文件
  899. loading.close();
  900. });
  901. },
  902. //删除图片
  903. beforeRemove(file, fileList) {
  904. let a = true;
  905. if (file && file.status === "success") {
  906. a = this.$confirm(`确定移除 ${file.name}?`);
  907. }
  908. return a;
  909. },
  910. //删除贸易合同
  911. handleRemoveContract(file, fileList) {
  912. var self = this;
  913. // if (self.contractList) {
  914. // const loading = this.$loading({
  915. // lock: true,
  916. // text: 'Loading',
  917. // spinner: 'el-icon-loading',
  918. // background: 'rgba(0, 0, 0, 0.7)'
  919. // });
  920. // delFile(file.id).then(function () {
  921. self.contractList = self.contractList.reduce((total, current) => {
  922. current.id !== file.id && total.push(current);
  923. return total;
  924. }, []);
  925. // loading.close();
  926. // }).catch(() => {
  927. // loading.close();
  928. // });
  929. // }
  930. },
  931. //删除物流附件
  932. handleRemoveLogistics(file, fileList) {
  933. // var self = this
  934. // if (this.logisticsList) {
  935. // const loading = this.$loading({
  936. // lock: true,
  937. // text: 'Loading',
  938. // spinner: 'el-icon-loading',
  939. // background: 'rgba(0, 0, 0, 0.7)'
  940. // });
  941. // delFile(file.id).then(function () {
  942. self.logisticsList = self.logisticsList.reduce((total, current) => {
  943. current.id !== file.id && total.push(current);
  944. return total;
  945. }, []);
  946. // loading.close();
  947. // }).catch(() => {
  948. // loading.close();
  949. // });
  950. // }
  951. },
  952. //删除其他附件
  953. handleRemoveOther(file, fileList) {
  954. // var self = this
  955. // if (this.otherList) {
  956. // const loading = this.$loading({
  957. // lock: true,
  958. // text: 'Loading',
  959. // spinner: 'el-icon-loading',
  960. // background: 'rgba(0, 0, 0, 0.7)'
  961. // });
  962. // delFile(file.id).then(function () {
  963. self.otherList = self.otherList.reduce((total, current) => {
  964. current.id !== file.id && total.push(current);
  965. return total;
  966. }, []);
  967. // loading.close();
  968. // }).catch(() => {
  969. // loading.close();
  970. // });
  971. // }
  972. },
  973. //删除附件
  974. delFile(row) {
  975. var self = this;
  976. const ids = row.id || this.ids;
  977. self.fullscreenLoading = true;
  978. delFile(ids).then(function () {
  979. self.fullscreenLoading = false;
  980. });
  981. },
  982. //查看图片
  983. invoicePictureCardPreview(file) {
  984. this.invoiceImageUrl = file.url;
  985. this.invoiceVisible = true;
  986. },
  987. //删除发票
  988. invoiceRemove(file, fileList) {
  989. var self = this;
  990. if (file && file.status === "success") {
  991. this.fileList = this.fileList.filter((item) => {
  992. if (item.uid !== file.uid) {
  993. return item;
  994. } else {
  995. // const loading = this.$loading({
  996. // lock: true,
  997. // text: 'Loading',
  998. // spinner: 'el-icon-loading',
  999. // background: 'rgba(0, 0, 0, 0.7)'
  1000. // });
  1001. // delFile(item.id)
  1002. // .then(function () {
  1003. // loading.close();
  1004. // this.msgSuccess("删除成功");
  1005. // })
  1006. // .catch(() => {
  1007. // loading.close();
  1008. // });
  1009. }
  1010. });
  1011. }
  1012. },
  1013. //删除发票
  1014. delInvoice(row) {
  1015. var self = this;
  1016. const ids = row.id ? [row.id] : this.ids;
  1017. if (ids && ids.length != 0) {
  1018. this.$confirm("是否确认删除此数据项?", "警告", {
  1019. confirmButtonText: "确定",
  1020. cancelButtonText: "取消",
  1021. type: "warning",
  1022. })
  1023. // .then(function () {
  1024. // self.fullscreenLoading = true;
  1025. // return delFile(ids);
  1026. // })
  1027. .then(() => {
  1028. // self.fullscreenLoading = false;
  1029. ids.forEach((element) => {
  1030. self.fileList = self.fileList.reduce((total, current) => {
  1031. current.id !== element && total.push(current);
  1032. return total;
  1033. }, []);
  1034. });
  1035. this.msgSuccess("删除成功");
  1036. });
  1037. }
  1038. },
  1039. //确认发票
  1040. submitCheck() {
  1041. this.open = false;
  1042. },
  1043. //发票合计
  1044. allAmount() {
  1045. var strarr = [0.0];
  1046. for (let i in this.fileList) {
  1047. if ( this.fileList[i]["ziiCheckStt"] == "1" && !!(this.fileList[i]["ziiAmount"])) {
  1048. strarr.push(this.fileList[i]["ziiAmount"]);
  1049. }
  1050. }
  1051. return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果
  1052. // return this.handleInput(eval(strarr.join("+"))); //结果
  1053. },
  1054. // 结束
  1055. submit() {
  1056. this.$refs["form"].validate((valid) => {
  1057. if (valid) {
  1058. this.form.zbiAmount = this.allAmount();
  1059. this.form.fileList = this.fileList;
  1060. this.form.contractList = this.contractList;
  1061. this.form.logisticsList = this.logisticsList;
  1062. this.form.otherList = this.otherList;
  1063. const loading = this.$loading({
  1064. lock: true,
  1065. text: "Loading",
  1066. spinner: "el-icon-loading",
  1067. background: "rgba(0, 0, 0, 0.7)",
  1068. });
  1069. commitBill(this.form)
  1070. .then((response) => {
  1071. loading.close();
  1072. this.msgSuccess("修改账款成功");
  1073. this.$store.dispatch("tagsView/delView", this.$route);
  1074. this.$router.go(-1);
  1075. })
  1076. .catch(() => {
  1077. loading.close();
  1078. });
  1079. } else {
  1080. this.$message({
  1081. message: "账款基本信息未完善,请检查确认",
  1082. type: "warning",
  1083. });
  1084. }
  1085. });
  1086. },
  1087. //校验结果字典
  1088. checkSttFormat(row, column) {
  1089. return this.selectDictLabel(this.checkSttOptions, row.ziiCheckStt);
  1090. },
  1091. /* 金额展示 */
  1092. handleInput(str) {
  1093. return amtformat(str, 2, ".", ",");
  1094. },
  1095. /* // 将数字金额转换为大写金额 */
  1096. smallToBig(money) {
  1097. // 将数字金额转换为大写金额
  1098. var cnNums = new Array(
  1099. "零",
  1100. "壹",
  1101. "贰",
  1102. "叁",
  1103. "肆",
  1104. "伍",
  1105. "陆",
  1106. "柒",
  1107. "捌",
  1108. "玖"
  1109. ); //汉字的数字
  1110. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  1111. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  1112. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  1113. var cnInteger = "整"; //整数金额时后面跟的字符
  1114. var cnIntLast = "元"; //整数完以后的单位
  1115. //最大处理的数字
  1116. var maxNum = 999999999999999.9999;
  1117. var integerNum; //金额整数部分
  1118. var decimalNum; //金额小数部分
  1119. //输出的中文金额字符串
  1120. var chineseStr = "";
  1121. var parts; //分离金额后用的数组,预定义
  1122. if (money == "" || money == null || money == undefined) {
  1123. return "零元零角零分";
  1124. }
  1125. money = parseFloat(money);
  1126. if (money >= maxNum) {
  1127. //超出最大处理数字
  1128. return "超出最大处理数字";
  1129. }
  1130. if (money == 0) {
  1131. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  1132. return chineseStr;
  1133. }
  1134. //四舍五入保留两位小数,转换为字符串
  1135. money = Math.round(money * 100).toString();
  1136. integerNum = money.substr(0, money.length - 2);
  1137. decimalNum = money.substr(money.length - 2);
  1138. //获取整型部分转换
  1139. if (parseInt(integerNum, 10) > 0) {
  1140. var zeroCount = 0;
  1141. var IntLen = integerNum.length;
  1142. for (var i = 0; i < IntLen; i++) {
  1143. var n = integerNum.substr(i, 1);
  1144. var p = IntLen - i - 1;
  1145. var q = p / 4;
  1146. var m = p % 4;
  1147. if (n == "0") {
  1148. zeroCount++;
  1149. } else {
  1150. if (zeroCount > 0) {
  1151. chineseStr += cnNums[0];
  1152. }
  1153. //归零
  1154. zeroCount = 0;
  1155. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  1156. }
  1157. if (m == 0 && zeroCount < 4) {
  1158. chineseStr += cnIntUnits[q];
  1159. }
  1160. }
  1161. chineseStr += cnIntLast;
  1162. }
  1163. //小数部分
  1164. if (decimalNum != "") {
  1165. var decLen = decimalNum.length;
  1166. for (var i = 0; i < decLen; i++) {
  1167. var n = decimalNum.substr(i, 1);
  1168. if (n != "0") {
  1169. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  1170. }
  1171. }
  1172. }
  1173. if (chineseStr == "") {
  1174. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  1175. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  1176. chineseStr += cnInteger;
  1177. }
  1178. return chineseStr;
  1179. },
  1180. },
  1181. };
  1182. </script>
  1183. <style>
  1184. .el-table .warning-row {
  1185. background: rgb(223, 223, 223);
  1186. }
  1187. </style><style lang="scss" scoped>
  1188. .zap-title {
  1189. padding: 25px;
  1190. font-size: 16px;
  1191. color: #333333;
  1192. background-color: #ffffff;
  1193. }
  1194. ::v-deep .el-radio-button__inner {
  1195. display: flex;
  1196. align-items: center;
  1197. justify-content: center;
  1198. width: 100px;
  1199. height: 35px;
  1200. padding: 0;
  1201. border: 1px solid #e0e0e0;
  1202. }
  1203. ::v-deep .el-radio-button:first-child .el-radio-button__inner {
  1204. margin-right: 20px;
  1205. border-radius: 17px;
  1206. }
  1207. ::v-deep .el-radio-button:last-child .el-radio-button__inner {
  1208. border-radius: 17px;
  1209. }
  1210. ::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner {
  1211. color: #4280f2;
  1212. background: #ecf2fe;
  1213. border-color: #b3ccfa;
  1214. box-shadow: none;
  1215. }
  1216. .zap-form {
  1217. padding: 0 25px;
  1218. background-color: #ffffff;
  1219. }
  1220. .zap-table ::v-deep .el-form-item__content {
  1221. width: 100%;
  1222. }
  1223. .zap-contract-add__upload {
  1224. display: flex;
  1225. flex-direction: column;
  1226. justify-content: center;
  1227. align-items: center;
  1228. width: 148px;
  1229. height: 148px;
  1230. border: dashed 1px #e0e0e0;
  1231. background-color: #f4f5f6;
  1232. }
  1233. ::v-deep .el-upload--picture-card {
  1234. border: none;
  1235. }
  1236. ::v-deep .el-icon-upload {
  1237. font-size: 32px;
  1238. color: #02c464;
  1239. }
  1240. .zap-upload__text {
  1241. line-height: 1;
  1242. margin-top: 12px;
  1243. font-size: 12px;
  1244. color: #333333;
  1245. }
  1246. .zap-contract-add__tip {
  1247. width: 140px;
  1248. margin-top: 15px;
  1249. line-height: 19px;
  1250. font-size: 12px;
  1251. color: #999999;
  1252. }
  1253. // 设置缩略图模版。
  1254. .zap-contract-add__thumbnail {
  1255. position: relative;
  1256. width: 140px;
  1257. height: 140px;
  1258. cursor: pointer;
  1259. }
  1260. .zap-contract-add__thumbnail {
  1261. display: flex;
  1262. flex-direction: column;
  1263. align-items: center;
  1264. justify-content: center;
  1265. }
  1266. .zap-contract-add__fileimg {
  1267. width: 56px;
  1268. }
  1269. .zap-contractadd__filename {
  1270. margin-top: 12px;
  1271. line-height: 19px;
  1272. font-size: 14px;
  1273. color: #333333;
  1274. overflow: hidden; // 超出的文本隐藏
  1275. text-overflow: ellipsis; // 溢出用省略号显示
  1276. display: -webkit-box; // 将对象作为弹性伸缩盒子模型显示。
  1277. -webkit-line-clamp: 2; // 这个属性不是css的规范属性,需要组合上面两个属性,表示显示的行数。
  1278. -webkit-box-orient: vertical; // 从上到下垂直排列子元素(设置伸缩盒子的子元素排列方式)
  1279. }
  1280. .zap-contract-add__delete {
  1281. position: absolute;
  1282. top: 0;
  1283. right: 10px;
  1284. }
  1285. ::v-deep .el-icon-error {
  1286. font-size: 20px;
  1287. color: #f41d27;
  1288. }
  1289. .zap-contract-add__buttons {
  1290. padding: 30px;
  1291. text-align: center;
  1292. }
  1293. .zap-bill-dialog{
  1294. padding: 25px 40px 35px;
  1295. }
  1296. .zap-bill-dialog__main{
  1297. height: 408px;
  1298. margin-top: 16px;
  1299. border-radius: 4px;
  1300. border: 1px dashed #4280F2;
  1301. }
  1302. .zap-bill-dialog__title{
  1303. height: 32px;
  1304. line-height: 32px;
  1305. text-align: center;
  1306. font-size: 12px;
  1307. color: #4280F2;
  1308. background-color: #EBF3FF;
  1309. }
  1310. .zap-bill-dialog__input{
  1311. width: 200px !important;
  1312. }
  1313. .zap-bill-dialog__item{
  1314. padding: 18px 16px;
  1315. font-size: 14px;
  1316. }
  1317. </style>