billEdit.vue 54 KB

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