billAdd.vue 53 KB

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