billAdd.vue 53 KB

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