purchaseContractEdit.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691
  1. <!--销售合同-->
  2. <!--2019年5月30日 20:25:16 by jlx-->
  3. <template>
  4. <div class="container">
  5. <el-row>
  6. <el-col :span="12">
  7. <h2 class="bg-left title">修改合同信息</h2>
  8. </el-col>
  9. <el-col :span="12" class="bg-right">
  10. <el-button
  11. class="bg-bottom"
  12. type="primary"
  13. size="small"
  14. @click="returnsales()"
  15. ><img
  16. width="6"
  17. height="10"
  18. style="vertical-align: bottom; margin-right: 3px"
  19. src="../../../public/img/lujing.png"
  20. alt=""
  21. />
  22. 返回</el-button
  23. >
  24. </el-col>
  25. </el-row>
  26. <ws-form
  27. ref="deptBudgetList"
  28. :rules="mainReportAdd"
  29. :model="deptBudgetList"
  30. >
  31. <div class="remark">
  32. <h3>基本信息</h3>
  33. <p style="color: #8890b1">
  34. &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
  35. 标记的条目提交后不可修改。
  36. </p>
  37. </div>
  38. <ws-info-table>
  39. <!-- 合同编号 -->
  40. <ws-form-item
  41. class="readonly"
  42. label="合同编号"
  43. span="1"
  44. prop="contractNo"
  45. >
  46. {{ deptBudgetList.contractNo }}
  47. </ws-form-item>
  48. <!-- 运输方式 -->
  49. <ws-form-item label="运输方式" span="1" prop="shippingType">
  50. <ws-input
  51. v-model="deptBudgetList.shippingType"
  52. maxlength="100"
  53. placeholder="请输入运输方式"
  54. size="small"
  55. />
  56. </ws-form-item>
  57. <!-- 买方 -->
  58. <ws-form-item class="readonly" label="买方" span="1" prop="buyer">
  59. {{ deptBudgetList.buyer }}
  60. </ws-form-item>
  61. <!-- 交货方式 -->
  62. <ws-form-item label="结算方式" span="1" prop="settlementMethod">
  63. <ws-input
  64. v-model="deptBudgetList.settlementMethod"
  65. maxlength="100"
  66. placeholder="请输入结算方式"
  67. size="small"
  68. />
  69. </ws-form-item>
  70. <!-- 卖方 -->
  71. <ws-form-item class="readonly" label="卖方" span="1" prop="seller"
  72. >{{ deptBudgetList.seller }}
  73. </ws-form-item>
  74. <ws-form-item
  75. class="readonly"
  76. label="交货方式"
  77. span="1"
  78. prop="sourceGoods"
  79. >
  80. {{ deptBudgetList.deliverType1 }}
  81. </ws-form-item>
  82. <!-- 买方电话 -->
  83. <ws-form-item label="买方电话" span="1" prop="buyerPhone">
  84. <ws-input
  85. v-model="deptBudgetList.buyerPhone"
  86. maxlength="100"
  87. size="small"
  88. />
  89. </ws-form-item>
  90. <!-- 包装方式 -->
  91. <ws-form-item label="包装方式" span="1" prop="packingMethod">
  92. <ws-select
  93. v-model="deptBudgetList.packingMethod"
  94. placeholder=""
  95. class="typeselect"
  96. @change="selectpackingMethod"
  97. >
  98. <ws-option
  99. v-for="item in packtypeList"
  100. :key="item.constKey"
  101. :label="item.constValue"
  102. :value="item.constValue"
  103. />
  104. </ws-select>
  105. </ws-form-item>
  106. <!-- 卖方电话 -->
  107. <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
  108. <ws-input
  109. v-model="deptBudgetList.sellerPhone"
  110. maxlength="100"
  111. size="small"
  112. placeholder="请输入卖方电话"
  113. />
  114. </ws-form-item>
  115. <!-- 验收方式 -->
  116. <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
  117. <el-select
  118. v-model="deptBudgetList.acceptanceMethod"
  119. placeholder="请选择验收方式"
  120. style="width: 100%"
  121. filterable
  122. @change="selectunitList"
  123. >
  124. <el-option
  125. v-for="(item, index) in unitList"
  126. :key="item.constValue"
  127. :label="item.constValue"
  128. :value="item.constValue"
  129. >
  130. <span class="unit-left" style="float: left">
  131. <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
  132. <!-- 新增文本框 -->
  133. <div v-if="item.flag !== 'delete'" @click.stop>
  134. <ws-input
  135. v-model="item.constValue"
  136. clearable
  137. maxlength="10"
  138. style="width: 200px"
  139. ></ws-input>
  140. </div>
  141. </span>
  142. <span style="float: right; color: #8492a6; font-size: 13px">
  143. <!-- 对号 -->
  144. <i
  145. class="el-icon-check"
  146. style="line-height: 29px; margin-left: 10px"
  147. v-if="item.flag !== 'delete'"
  148. @click.stop="saveClick(item, index)"
  149. ></i>
  150. <!-- 编辑 -->
  151. <i
  152. class="el-icon-edit"
  153. style="line-height: 29px; margin-left: 10px"
  154. v-if="item.flag == 'delete'"
  155. @click.stop="editClick(item, index)"
  156. ></i>
  157. <!-- 删除 -->
  158. <i
  159. class="el-icon-delete"
  160. style="line-height: 29px"
  161. @click.stop="deleteClick(item, index)"
  162. ></i>
  163. </span>
  164. </el-option>
  165. <!-- 新增按钮 -->
  166. <el-option value="" label="">
  167. <div
  168. style="
  169. text-align: right;
  170. border-top: 1px solid #dcdfe6;
  171. padding: 5px;
  172. "
  173. >
  174. <ws-button type="primary" @click.stop="addClick">{{
  175. $t('button.add')
  176. }}</ws-button>
  177. </div>
  178. </el-option>
  179. </el-select>
  180. </ws-form-item>
  181. <!-- 重量(吨) -->
  182. <ws-form-item label="重量(吨)" span="1" prop="weight">
  183. <ws-input
  184. v-model="deptBudgetList.weight"
  185. maxlength="100"
  186. size="small"
  187. placeholder="请输入重量(吨)"
  188. />
  189. </ws-form-item>
  190. <!-- 交货日期(起) -->
  191. <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
  192. <ws-date-picker
  193. v-model="deptBudgetList.deliveryDateStart"
  194. type="date"
  195. placeholder="请选择交货日期(起)"
  196. value-format="yyyy-MM-dd"
  197. />
  198. </ws-form-item>
  199. <!-- 溢短装(%) -->
  200. <ws-form-item label="溢短装(%)" span="1" prop="overShort">
  201. <ws-input
  202. v-model="deptBudgetList.overShort"
  203. maxlength="100"
  204. size="small"
  205. placeholder="请输入溢短装比例(%)"
  206. />
  207. </ws-form-item>
  208. <!-- 交货日期(止) -->
  209. <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
  210. <ws-date-picker
  211. v-model="deptBudgetList.deliveryDateEnd"
  212. type="date"
  213. placeholder="请选择交货日期(止)"
  214. value-format="yyyy-MM-dd"
  215. />
  216. </ws-form-item>
  217. <!-- 合同单价(元/吨) -->
  218. <ws-form-item
  219. class="readonly"
  220. label="合同单价(元/吨)"
  221. span="1"
  222. prop="unitContractPrice"
  223. >
  224. <span v-if="deptBudgetList.unitContractPrice != 'null'">{{
  225. deptBudgetList.unitContractPrice
  226. }}</span>
  227. </ws-form-item>
  228. <!-- 合同总价(元) -->
  229. <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
  230. <ws-input
  231. v-model="deptBudgetList.totalContractPrice"
  232. maxlength="100"
  233. placeholder="请输入合同单价"
  234. size="small"
  235. />
  236. </ws-form-item>
  237. <!-- 货源所在地区 -->
  238. <ws-form-item label="货源所在地区" span="1" prop="packingMethod">
  239. <el-cascader
  240. :options="options_"
  241. v-model="selectedOptions"
  242. clearable
  243. size="large"
  244. placeholder="请选择货源所在地区"
  245. style="width: 200%"
  246. @change="handleChange"
  247. />
  248. </ws-form-item>
  249. <!-- 货源详细地址 -->
  250. <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
  251. <ws-input
  252. v-model="deptBudgetList.sourceGoods"
  253. maxlength="100"
  254. placeholder="请输入货源详细地址"
  255. size="small"
  256. />
  257. </ws-form-item>
  258. <!-- 交货地所在地区 -->
  259. <ws-form-item label="交货地所在地区" span="1" prop="packingMethod">
  260. <el-cascader
  261. :options="options_"
  262. v-model="selectedOptions1"
  263. clearable
  264. size="large"
  265. placeholder="请选择交货地所在地区"
  266. style="width: 200%"
  267. @change="handleChange1"
  268. />
  269. </ws-form-item>
  270. <!-- 交货地详细地址 -->
  271. <ws-form-item label="交货地详细地址" span="1" prop="placeDelivery">
  272. <ws-input
  273. v-model="deptBudgetList.placeDelivery"
  274. maxlength="100"
  275. placeholder="请输入交货地详细地址"
  276. size="small"
  277. />
  278. </ws-form-item>
  279. <!-- 签订日期 -->
  280. <ws-form-item label="签订日期" span="1" prop="signingDate">
  281. <ws-date-picker
  282. v-model="deptBudgetList.signingDate"
  283. type="date"
  284. placeholder="请选择合同签订日期"
  285. value-format="yyyy-MM-dd"
  286. />
  287. </ws-form-item>
  288. <!-- 最终实际交易量(吨) -->
  289. <ws-form-item
  290. label="最终实际交易量(吨)"
  291. span="1"
  292. prop="totalContractPrice"
  293. >
  294. <ws-input
  295. v-model="deptBudgetList.finalTradingVolume"
  296. maxlength="100"
  297. placeholder="请输入最终实际交易量"
  298. size="small"
  299. />
  300. </ws-form-item>
  301. <!-- 临时仓库负责人 -->
  302. <ws-form-item
  303. label="临时仓库负责人"
  304. span="1"
  305. prop="packingMethod"
  306. v-if="deptBudgetList.deliverType == 1"
  307. >
  308. <el-select
  309. v-model="deptBudgetList.personCharge"
  310. placeholder="请选择临时仓库负责人"
  311. filterable
  312. :filter-method="dataFilter"
  313. @change="selectstaff"
  314. >
  315. <el-option
  316. v-for="item in options"
  317. :key="item.value"
  318. :label="item.staffName"
  319. :value="item.staffName"
  320. />
  321. </el-select>
  322. </ws-form-item>
  323. </ws-info-table>
  324. <base-card>
  325. <!--面试信息-->
  326. <div class="remark">
  327. <h3>货物信息</h3>
  328. </div>
  329. <ws-info-table>
  330. <ws-form-item
  331. class="readonly"
  332. label="货名"
  333. span="1"
  334. prop="waterContent"
  335. >
  336. {{ deptBudgetList.contractGoodsInfo.goodsName }}
  337. </ws-form-item>
  338. <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
  339. <ws-input
  340. v-model="deptBudgetList.contractGoodsInfo.waterContent"
  341. placeholder="请输入水分占比"
  342. maxlength="100"
  343. size="small"
  344. />
  345. </ws-form-item>
  346. <ws-form-item label="品级" span="1" prop="grade" class="readonly">
  347. {{ deptBudgetList.contractGoodsInfo.grade}}
  348. </ws-form-item>
  349. <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
  350. <ws-input
  351. v-model="deptBudgetList.contractGoodsInfo.impurity"
  352. placeholder="请输入杂质占比(%)"
  353. maxlength="100"
  354. size="small"
  355. />
  356. </ws-form-item>
  357. <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
  358. <ws-input
  359. v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
  360. placeholder="请输入容重"
  361. maxlength="100"
  362. size="small"
  363. />
  364. </ws-form-item>
  365. <ws-form-item
  366. label="霉变粒(%)<="
  367. span="1"
  368. prop="mildewGrain"
  369. class="result"
  370. >
  371. <ws-input
  372. v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
  373. placeholder="请输入霉变粒占比(%)"
  374. maxlength="100"
  375. size="small"
  376. />
  377. </ws-form-item>
  378. <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
  379. <ws-input
  380. v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
  381. placeholder="请输入输入热损伤占比(%)"
  382. maxlength="100"
  383. size="small"
  384. />
  385. </ws-form-item>
  386. <ws-form-item
  387. label="不完善粒(%)<="
  388. span="1"
  389. prop="imperfectGrain"
  390. class="result"
  391. >
  392. <ws-input
  393. v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
  394. placeholder="请输入不完整粒占比(%)"
  395. maxlength="100"
  396. size="small"
  397. />
  398. </ws-form-item>
  399. </ws-info-table>
  400. <div class="remark">
  401. <h3>流程信息</h3>
  402. </div>
  403. <ws-info-table>
  404. <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
  405. <ws-input
  406. v-model="deptBudgetList.contractProcessInfo.mildewGrain"
  407. placeholder="请输入已付款(元)"
  408. maxlength="100"
  409. size="small"
  410. />
  411. </ws-form-item>
  412. <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
  413. <ws-input
  414. v-model="deptBudgetList.contractProcessInfo.goodsName"
  415. placeholder="请输入已开发票(元)"
  416. maxlength="100"
  417. size="small"
  418. />
  419. </ws-form-item>
  420. <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
  421. <ws-input
  422. v-model="deptBudgetList.contractProcessInfo.waterContent"
  423. placeholder="请输入费用支出(元)"
  424. maxlength="100"
  425. size="small"
  426. />
  427. </ws-form-item>
  428. <ws-form-item label="未开发票(元)" span="1" prop="impurity"
  429. ><ws-input
  430. v-model="deptBudgetList.contractProcessInfo.impurity"
  431. placeholder="请输入未开发票(元)"
  432. maxlength="100"
  433. size="small"
  434. />
  435. </ws-form-item>
  436. <ws-form-item
  437. label="已完成发运量(吨)"
  438. span="1"
  439. prop="imperfectGrain"
  440. class="result"
  441. >
  442. <ws-input
  443. v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
  444. maxlength="100"
  445. size="small"
  446. />
  447. </ws-form-item>
  448. <ws-form-item label="双章原件回收情况" span="1" prop="grade"
  449. ><ws-select
  450. v-model="deptBudgetList.contractProcessInfo.grade"
  451. placeholder=""
  452. class="typeselect"
  453. @change="selectChapterTwo"
  454. >
  455. <ws-option
  456. v-for="item in ChapterTwoList"
  457. :key="item.constValue"
  458. :label="item.constValue"
  459. :value="item.constValue"
  460. />
  461. </ws-select>
  462. </ws-form-item>
  463. </ws-info-table>
  464. <div class="remark">
  465. <h3>备注信息</h3>
  466. </div>
  467. <ws-input
  468. v-model="deptBudgetList.remarks"
  469. type="textarea"
  470. row="3"
  471. placeholder="请输入备注信息,不超过200字"
  472. maxlength="200"
  473. />
  474. <el-upload
  475. class="upload-demo"
  476. action="https://www.zthymaoyi.com/upload/admin"
  477. :on-success="
  478. (res, file) => {
  479. uploadSuccessHandle(res)
  480. }
  481. "
  482. multiple
  483. :limit="3"
  484. :file-list="fileList"
  485. >
  486. <el-button size="small" type="primary">上传附件</el-button>
  487. <div slot="tip" class="el-upload__tip">
  488. 推荐格式.jpg, .jpeg, .png, .gif, .pdf, .doc, .zip, .rar,单个文件大小不超过10M
  489. </div>
  490. </el-upload>
  491. </base-card>
  492. </ws-form>
  493. <div style="text-align: right; padding: 10px">
  494. <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
  495. >提交</el-button
  496. >
  497. </div>
  498. </div>
  499. </template>
  500. <script>
  501. import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
  502. import {
  503. packList,
  504. addList,
  505. xiala,
  506. addxiala,
  507. editxiala,
  508. delxiala,
  509. examineList,
  510. editInfo,
  511. getstaff,
  512. } from '@/model/contarct/index'
  513. import WsUpload from '@/components/WsUpload'
  514. import { EventBus, dayjs } from 'base-core-lib'
  515. export default {
  516. name: 'viewSpareMoney',
  517. watch: {
  518. vesselId(val) {
  519. this.getVesselData()
  520. },
  521. isShow(val) {
  522. this.showType = val
  523. },
  524. },
  525. components: {
  526. WsUpload,
  527. },
  528. data() {
  529. return {
  530. //弹出框
  531. dialogViewSpareMoney: false,
  532. dialogApproveFormVisible: false,
  533. // 船舶类型
  534. monetaryKey: null,
  535. // 表格显示数据
  536. tableDate: [],
  537. // 是否显示
  538. showType: true,
  539. // 年
  540. year: '',
  541. size: 10,
  542. // 提交类型
  543. submitType: true,
  544. tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
  545. ruleDeptBudget: [],
  546. deptBudgetList: {
  547. contractProcessInfo: {},
  548. contractGoodsInfo: {},
  549. },
  550. options_: regionData,
  551. selectedOptions: [],
  552. selectedOptions1: [],
  553. mainReportAdd: {},
  554. list: {},
  555. unitList: [],
  556. options: [],
  557. staffList: [],
  558. packtypeList: [],
  559. goodnameList: [],
  560. gradeList: [],
  561. ChapterTwoList: [],
  562. appendixIdsAdd: '',
  563. pickerBeginDateBefore: {
  564. disabledDate: (time) => {
  565. return time.getTime() > Date.now()
  566. },
  567. },
  568. acceptanceCheck: {},
  569. compId: sessionStorage.getItem('ws-pf_compId'),
  570. addressUrls:[],
  571. addressUrl:'',
  572. fileList:[],
  573. }
  574. },
  575. activated() {
  576. getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
  577. .toPromise()
  578. .then((response) => {
  579. this.options = response
  580. this.staffList = response
  581. })
  582. this.loaddata()
  583. this.showType = this.isShow
  584. },
  585. methods: {
  586. close(index) {
  587. this.addressUrls.splice(index, 1)
  588. },
  589. dataFilter(val) {
  590. this.deptBudgetList.personCharge = val
  591. if (val) {
  592. //val存在
  593. this.options = this.staffList.filter((item) => {
  594. if (
  595. !!~item.staffName.indexOf(val) ||
  596. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  597. ) {
  598. return true
  599. }
  600. })
  601. } else {
  602. //val为空时,还原数组
  603. this.options = this.staffList
  604. }
  605. },
  606. selectstaff(e) {
  607. for (var i = 0; i < this.staffList.length; i++) {
  608. if (this.staffList[i].staffName == e) {
  609. this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
  610. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  611. }
  612. }
  613. },
  614. handleChange(value) {
  615. this.selectedOptions = value
  616. },
  617. handleChange1(value) {
  618. this.selectedOptions1 = value
  619. },
  620. loaddata() {
  621. // 数据
  622. examineList({ id: this.$route.query.id })
  623. .toPromise()
  624. .then((response) => {
  625. if (response.weight) {
  626. response.weight = String(response.weight)
  627. }
  628. if (response.overShort) {
  629. response.overShort = String(response.overShort)
  630. }
  631. if (response.totalContractPrice) {
  632. response.totalContractPrice = String(response.totalContractPrice)
  633. }
  634. if (response.unitContractPrice) {
  635. response.unitContractPrice = String(response.unitContractPrice)
  636. }
  637. var tmp = []
  638. tmp[0] = TextToCode[response.sourceProvince].code
  639. tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
  640. if (tmp[0] == 810000 || tmp[0] == 820000) {
  641. tmp[2] = null
  642. } else {
  643. tmp[2] =
  644. TextToCode[response.sourceProvince][response.sourceCity][
  645. response.sourceArea
  646. ].code
  647. }
  648. this.selectedOptions = tmp
  649. var tmp1 = []
  650. tmp1[0] = TextToCode[response.deliveryProvince].code
  651. tmp1[1] =
  652. TextToCode[response.deliveryProvince][response.deliveryCity].code
  653. if (tmp1[0] == 810000 || tmp1[0] == 820000) {
  654. tmp1[2] = null
  655. } else {
  656. tmp1[2] =
  657. TextToCode[response.deliveryProvince][response.deliveryCity][
  658. response.deliveryArea
  659. ].code
  660. }
  661. this.selectedOptions1 = tmp1
  662. this.deptBudgetList = response
  663. if (this.deptBudgetList.deliverType == 1) {
  664. this.deptBudgetList.deliverType1 = '我方自提'
  665. } else if (this.deptBudgetList.deliverType == 2) {
  666. this.deptBudgetList.deliverType1 = '对方送货'
  667. }
  668. if(this.deptBudgetList.addressUrl != null){
  669. this.addressUrls = this.deptBudgetList.addressUrl.split(",")
  670. this.fileList = this.deptBudgetList.addressUrl.split(",")
  671. }
  672. })
  673. // 包装方式
  674. packList({ constId: 'CON1' })
  675. .toPromise()
  676. .then((response) => {
  677. this.packtypeList = response
  678. })
  679. // 验收方式
  680. this.getUnitList()
  681. // 货名
  682. packList({ constId: 'CON2' })
  683. .toPromise()
  684. .then((response) => {
  685. this.goodnameList = response
  686. })
  687. // 品级
  688. packList({ constId: 'CON3' })
  689. .toPromise()
  690. .then((response) => {
  691. this.gradeList = response
  692. })
  693. // 双章
  694. packList({ constId: 'CON4' })
  695. .toPromise()
  696. .then((response) => {
  697. this.ChapterTwoList = response
  698. })
  699. },
  700. addClick() {
  701. this.unitList.push({
  702. flag: 'add',
  703. constValue: '',
  704. constKey: '',
  705. })
  706. },
  707. // 上传附件
  708. uploadSuccessHandle(e) {
  709. this.addressUrl += e.url+""
  710. this.addressUrls.push(this.addressUrl.split(","))
  711. },
  712. getUnitList() {
  713. xiala({
  714. compId: sessionStorage.getItem('ws-pf_compId'),
  715. constCode: 'TYPEYAN',
  716. })
  717. .toPromise()
  718. .then((response) => {
  719. this.unitList = response
  720. let currItem
  721. this.unitList.forEach((item, index, arr) => {
  722. item.flag = 'delete'
  723. if (this.vModel == item.constKey) {
  724. currItem = item
  725. }
  726. })
  727. //
  728. if (currItem) {
  729. this.selectContract(currItem.constValue)
  730. }
  731. })
  732. },
  733. // 关闭 dialog时 处理文件url 初始化upload组件
  734. handleClose() {
  735. this.dialogViewSpareMoney = false
  736. },
  737. handleExamine() {},
  738. approve() {},
  739. returnsales() {
  740. this.$router.push({ path: 'buyContract' })
  741. },
  742. selectChapterTwo(e) {
  743. for (var i = 0; i < this.ChapterTwoList.length; i++) {
  744. if (this.ChapterTwoList[i].constValue == e) {
  745. this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
  746. }
  747. }
  748. },
  749. selectunitList(e) {
  750. for (var i = 0; i < this.unitList.length; i++) {
  751. if (this.unitList[i].constValue == e) {
  752. this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
  753. }
  754. }
  755. },
  756. selectgrade(e) {
  757. for (var i = 0; i < this.gradeList.length; i++) {
  758. if (this.gradeList[i].constValue == e) {
  759. this.deptBudgetList.gradeKey = this.gradeList[i].constKey
  760. }
  761. }
  762. },
  763. selectpackingMethod(e) {
  764. for (var i = 0; i < this.packtypeList.length; i++) {
  765. if (this.packtypeList[i].constValue == e) {
  766. this.deptBudgetList.acceptanceMethodKey =
  767. this.packtypeList[i].constKey
  768. }
  769. }
  770. },
  771. saveClick(item, index) {
  772. console.log(item)
  773. if (Object.is(item.id, 1)) {
  774. return
  775. }
  776. if (Object.is(this.unitList[index].flag, 'delete')) {
  777. this.$set(this.unitList, index, { flag: 'check' })
  778. } else {
  779. this.$set(this.unitList, index, { flag: 'delete' })
  780. }
  781. if (!item.constValue) {
  782. this.unitList.splice(index, 1)
  783. return
  784. }
  785. if (item.flag == 'add') {
  786. item.constKey = Math.random() * 20
  787. this.acceptanceCheck.compId = this.compId
  788. this.acceptanceCheck.constKey = item.constKey
  789. this.acceptanceCheck.constCode = 'TYPEYAN'
  790. this.acceptanceCheck.constValue = item.constValue
  791. this.acceptanceCheck.id = item.id
  792. addxiala(this.acceptanceCheck)
  793. .toPromise()
  794. .then((response) => {
  795. this.getUnitList()
  796. })
  797. } else if (item.flag == 'check') {
  798. this.acceptanceCheck.compId = this.compId
  799. this.acceptanceCheck.constKey = item.constKey
  800. this.acceptanceCheck.constCode = 'TYPEYAN'
  801. this.acceptanceCheck.constValue = item.constValue
  802. this.acceptanceCheck.id = item.id
  803. editxiala(this.acceptanceCheck)
  804. .toPromise()
  805. .then((response) => {
  806. this.getUnitList()
  807. })
  808. }
  809. },
  810. // 编辑
  811. editClick(item, index) {
  812. const map = JSON.parse(JSON.stringify(item))
  813. if (Object.is(item.id, 1)) {
  814. return
  815. }
  816. if (Object.is(this.unitList[index].flag, 'delete')) {
  817. map.flag = 'check'
  818. this.$set(this.unitList, index, map)
  819. } else {
  820. map.flag = 'delete'
  821. this.$set(this.unitList, index, map)
  822. }
  823. },
  824. // 删除
  825. deleteClick(item, index) {
  826. if (Object.is(item.constKey, 1)) {
  827. return
  828. }
  829. if (!item.constValue) {
  830. this.unitList.splice(index, 1)
  831. return
  832. }
  833. delxiala({ id: this.unitList[index].id })
  834. .toPromise()
  835. .then((response) => {
  836. this.getUnitList()
  837. this.pleaseChoose = ''
  838. })
  839. },
  840. submit() {
  841. if (!this.deptBudgetList.contractNo) {
  842. this.$message({
  843. message: '合同编号不能为空',
  844. type: 'warning',
  845. })
  846. return
  847. }
  848. if (
  849. this.deptBudgetList.contractNo.length < 6 ||
  850. this.deptBudgetList.contractNo.length > 20
  851. ) {
  852. this.$message({
  853. message: '合同编号长度不符合要求,请输入6到20个字符之内!',
  854. type: 'warning',
  855. })
  856. return
  857. }
  858. if (!this.deptBudgetList.shippingType) {
  859. this.$message({
  860. message: '运输方式不能为空',
  861. type: 'warning',
  862. })
  863. return
  864. }
  865. if (
  866. this.deptBudgetList.shippingType.length < 1 ||
  867. this.deptBudgetList.shippingType.length > 20
  868. ) {
  869. this.$message({
  870. message: '运输方式长度不符合要求,请输入1到20个字符之内!',
  871. type: 'warning',
  872. })
  873. return
  874. }
  875. if (!this.deptBudgetList.buyer) {
  876. this.$message({
  877. message: '买方名称不能为空',
  878. type: 'warning',
  879. })
  880. return
  881. }
  882. if (this.deptBudgetList.buyer.length > 30) {
  883. this.$message({
  884. message: '买方名称长度不符合要求,请输入30个字符之内!',
  885. type: 'warning',
  886. })
  887. return
  888. }
  889. if (!this.deptBudgetList.settlementMethod) {
  890. this.$message({
  891. message: '结算方式不能为空',
  892. type: 'warning',
  893. })
  894. return
  895. }
  896. if (
  897. this.deptBudgetList.settlementMethod.length < 1 ||
  898. this.deptBudgetList.settlementMethod.length > 20
  899. ) {
  900. this.$message({
  901. message: '结算方式长度不符合要求,请输入1到20个字符之内!',
  902. type: 'warning',
  903. })
  904. return
  905. }
  906. if (!this.deptBudgetList.seller) {
  907. this.$message({
  908. message: '请输入卖方名称!',
  909. type: 'warning',
  910. })
  911. return
  912. }
  913. if (this.deptBudgetList.seller.length > 30) {
  914. this.$message({
  915. message: '卖方名称长度不符合要求,请输入30个字符之内!',
  916. type: 'warning',
  917. })
  918. return
  919. }
  920. if (!this.deptBudgetList.buyerPhone) {
  921. this.$message({
  922. message: '请输入买方电话!',
  923. type: 'warning',
  924. })
  925. return
  926. }
  927. if (isNaN(this.deptBudgetList.buyerPhone)) {
  928. this.$message({
  929. message: '输入买方电话有误!',
  930. type: 'warning',
  931. })
  932. return
  933. }
  934. if (
  935. this.deptBudgetList.buyerPhone.length < 7 ||
  936. this.deptBudgetList.buyerPhone.length > 20
  937. ) {
  938. this.$message({
  939. message: '买方电话长度不符合要求,请输入7到20个字符之内!',
  940. type: 'warning',
  941. })
  942. return
  943. }
  944. if (!this.deptBudgetList.sellerPhone) {
  945. this.$message({
  946. message: '请输入卖方电话!',
  947. type: 'warning',
  948. })
  949. return
  950. }
  951. if (isNaN(this.deptBudgetList.sellerPhone)) {
  952. this.$message({
  953. message: '输入卖方电话有误!',
  954. type: 'warning',
  955. })
  956. return
  957. }
  958. if (
  959. this.deptBudgetList.sellerPhone.length < 7 ||
  960. this.deptBudgetList.sellerPhone.length > 20
  961. ) {
  962. this.$message({
  963. message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
  964. type: 'warning',
  965. })
  966. return
  967. }
  968. if (!this.deptBudgetList.acceptanceMethod) {
  969. this.$message({
  970. message: '请选择验收方式',
  971. type: 'warning',
  972. })
  973. return
  974. }
  975. if (!this.deptBudgetList.weight) {
  976. this.$message({
  977. message: '请输入重量!',
  978. type: 'warning',
  979. })
  980. return
  981. }
  982. if (
  983. isNaN(this.deptBudgetList.weight) ||
  984. (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
  985. String(this.deptBudgetList.weight).length -
  986. (String(this.deptBudgetList.weight).indexOf('.') + 1) >
  987. 3) ||
  988. this.deptBudgetList.weight < 0 ||
  989. this.deptBudgetList.weight > 200000
  990. ) {
  991. this.$message({
  992. message: '输入重量有误!',
  993. type: 'warning',
  994. })
  995. return
  996. }
  997. if (!this.deptBudgetList.deliveryDateStart) {
  998. this.$message({
  999. message: '请选择交货日期(起)',
  1000. type: 'warning',
  1001. })
  1002. return
  1003. }
  1004. if (!this.deptBudgetList.overShort){
  1005. this.$message({
  1006. message: '请输入溢短装!',
  1007. type: 'warning',
  1008. })
  1009. return
  1010. }
  1011. if (
  1012. isNaN(this.deptBudgetList.overShort) ||
  1013. (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
  1014. String(this.deptBudgetList.overShort).length -
  1015. (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
  1016. 2) ||
  1017. this.deptBudgetList.overShort < 0 ||
  1018. this.deptBudgetList.overShort > 50
  1019. ) {
  1020. this.$message({
  1021. message: '溢短装输入有误!',
  1022. type: 'warning',
  1023. })
  1024. return
  1025. }
  1026. if (!this.deptBudgetList.deliveryDateEnd) {
  1027. this.$message({
  1028. message: '请选择交货日期(止)',
  1029. type: 'warning',
  1030. })
  1031. return
  1032. }
  1033. //时间
  1034. if (
  1035. new Date(this.deptBudgetList.deliveryDateStart).getTime() >
  1036. new Date(this.deptBudgetList.deliveryDateEnd).getTime()
  1037. ) {
  1038. this.$message({
  1039. message: '交货日期(止)选择错误',
  1040. type: 'warning',
  1041. })
  1042. return
  1043. }
  1044. if (!this.deptBudgetList.unitContractPrice) {
  1045. this.$message({
  1046. message: '请输入合同单价!',
  1047. type: 'warning',
  1048. })
  1049. return
  1050. }
  1051. if (
  1052. isNaN(this.deptBudgetList.unitContractPrice) ||
  1053. (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
  1054. String(this.deptBudgetList.unitContractPrice).length -
  1055. (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
  1056. 2) ||
  1057. this.deptBudgetList.unitContractPrice <= 0 ||
  1058. this.deptBudgetList.unitContractPrice > 10000
  1059. ) {
  1060. this.$message({
  1061. message: '合同单价输入有误!',
  1062. type: 'warning',
  1063. })
  1064. return
  1065. }
  1066. if (!this.deptBudgetList.totalContractPrice) {
  1067. this.$message({
  1068. message: '请输入合同总价!',
  1069. type: 'warning',
  1070. })
  1071. return
  1072. }
  1073. if (
  1074. isNaN(this.deptBudgetList.totalContractPrice) ||
  1075. (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
  1076. String(this.deptBudgetList.totalContractPrice).length -
  1077. (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
  1078. 2) ||
  1079. this.deptBudgetList.totalContractPrice <= 0 ||
  1080. this.deptBudgetList.totalContractPrice > 1000000000
  1081. ) {
  1082. this.$message({
  1083. message: '合同总价输入有误!',
  1084. type: 'warning',
  1085. })
  1086. return
  1087. }
  1088. if (this.selectedOptions.length == 0) {
  1089. this.$message({
  1090. message: '请选择货源所在地区!',
  1091. type: 'warning',
  1092. })
  1093. return
  1094. }
  1095. if (!this.deptBudgetList.sourceGoods) {
  1096. this.$message({
  1097. message: '请输入货源详细地址!',
  1098. type: 'warning',
  1099. })
  1100. return
  1101. }
  1102. if (this.selectedOptions1.length == 0) {
  1103. this.$message({
  1104. message: '请选择交货所在地区!',
  1105. type: 'warning',
  1106. })
  1107. return
  1108. }
  1109. if (!this.deptBudgetList.placeDelivery) {
  1110. this.$message({
  1111. message: '请输入交货详细地址!',
  1112. type: 'warning',
  1113. })
  1114. return
  1115. }
  1116. if (!this.deptBudgetList.signingDate) {
  1117. this.$message({
  1118. message: '请选择签订日期',
  1119. type: 'warning',
  1120. })
  1121. return
  1122. }
  1123. if (
  1124. isNaN(this.deptBudgetList.finalTradingVolume) ||
  1125. (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
  1126. String(this.deptBudgetList.finalTradingVolume).length -
  1127. (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
  1128. 3) ||
  1129. this.deptBudgetList.finalTradingVolume < 0 ||
  1130. this.deptBudgetList.finalTradingVolume > 200000
  1131. ) {
  1132. this.$message({
  1133. message: '最终实际成交量有误!',
  1134. type: 'warning',
  1135. })
  1136. return
  1137. }
  1138. //货物信息
  1139. if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
  1140. this.$message({
  1141. message: '请选择货名',
  1142. type: 'warning',
  1143. })
  1144. return
  1145. }
  1146. if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
  1147. this.$message({
  1148. message: '请输入水分',
  1149. type: 'warning',
  1150. })
  1151. return
  1152. }
  1153. if (
  1154. this.deptBudgetList.contractGoodsInfo.waterContent &&
  1155. String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
  1156. String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
  1157. (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
  1158. 2||this.deptBudgetList.contractGoodsInfo.waterContent>40||this.deptBudgetList.contractGoodsInfo.waterContent<1
  1159. ) {
  1160. this.$message({
  1161. message: '水分输入错误',
  1162. type: 'warning',
  1163. })
  1164. return
  1165. }
  1166. if (!this.deptBudgetList.contractGoodsInfo.grade) {
  1167. this.$message({
  1168. message: '请选择品级',
  1169. type: 'warning',
  1170. })
  1171. return
  1172. }
  1173. if (!this.deptBudgetList.contractGoodsInfo.impurity) {
  1174. this.$message({
  1175. message: '请输入杂质',
  1176. type: 'warning',
  1177. })
  1178. return
  1179. }
  1180. if (
  1181. this.deptBudgetList.contractGoodsInfo.impurity &&
  1182. String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
  1183. String(this.deptBudgetList.contractGoodsInfo.impurity).length -
  1184. (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
  1185. 2||this.deptBudgetList.contractGoodsInfo.impurity>40||this.deptBudgetList.contractGoodsInfo.impurity<1
  1186. ) {
  1187. this.$message({
  1188. message: '杂质输入错误',
  1189. type: 'warning',
  1190. })
  1191. return
  1192. }
  1193. if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
  1194. this.$message({
  1195. message: '请输入容重',
  1196. type: 'warning',
  1197. })
  1198. return
  1199. }
  1200. if (
  1201. (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
  1202. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
  1203. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
  1204. (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
  1205. 2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo.bulkDensity < 500
  1206. ) {
  1207. this.$message({
  1208. message: '容重输入错误',
  1209. type: 'warning',
  1210. })
  1211. return
  1212. }
  1213. if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
  1214. this.$message({
  1215. message: '请输入霉变粒',
  1216. type: 'warning',
  1217. })
  1218. return
  1219. }
  1220. if (
  1221. !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
  1222. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1223. '.'
  1224. ) != -1 &&
  1225. String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
  1226. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1227. '.'
  1228. ) +
  1229. 1) >
  1230. 2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
  1231. ) {
  1232. this.$message({
  1233. message: '霉变粒输入错误',
  1234. type: 'warning',
  1235. })
  1236. return
  1237. }
  1238. if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
  1239. this.$message({
  1240. message: '请输入热损伤',
  1241. type: 'warning',
  1242. })
  1243. return
  1244. }
  1245. if (
  1246. !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
  1247. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
  1248. -1 &&
  1249. String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
  1250. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
  1251. '.'
  1252. ) +
  1253. 1) >
  1254. 2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
  1255. ) {
  1256. this.$message({
  1257. message: '热损伤输入错误',
  1258. type: 'warning',
  1259. })
  1260. return
  1261. }
  1262. if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
  1263. this.$message({
  1264. message: '请输入不完善粒',
  1265. type: 'warning',
  1266. })
  1267. return
  1268. }
  1269. if (
  1270. !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
  1271. (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
  1272. '.'
  1273. ) != -1 &&
  1274. String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
  1275. (String(
  1276. this.deptBudgetList.contractGoodsInfo.imperfectGrain
  1277. ).indexOf('.') +
  1278. 1) >
  1279. 2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
  1280. ) {
  1281. this.$message({
  1282. message: '不完整粒输入错误',
  1283. type: 'warning',
  1284. })
  1285. return
  1286. }
  1287. if (
  1288. (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
  1289. (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
  1290. (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
  1291. '.'
  1292. ) != -1 &&
  1293. String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
  1294. (String(
  1295. this.deptBudgetList.contractProcessInfo.goodsNameKey
  1296. ).indexOf('.') +
  1297. 1) >
  1298. 2)
  1299. ) {
  1300. this.$message({
  1301. message: '合同收入金额输入错误',
  1302. type: 'warning',
  1303. })
  1304. return
  1305. }
  1306. if (
  1307. (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
  1308. (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
  1309. (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
  1310. '.'
  1311. ) != -1 &&
  1312. String(this.deptBudgetList.contractProcessInfo.waterContent).length -
  1313. (String(
  1314. this.deptBudgetList.contractProcessInfo.waterContent
  1315. ).indexOf('.') +
  1316. 1) >
  1317. 2)
  1318. ) {
  1319. this.$message({
  1320. message: '费用支出输入错误',
  1321. type: 'warning',
  1322. })
  1323. return
  1324. }
  1325. if (
  1326. (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
  1327. (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
  1328. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1329. '.'
  1330. ) != -1 &&
  1331. String(this.deptBudgetList.contractProcessInfo.goodsName).length -
  1332. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1333. '.'
  1334. ) +
  1335. 1) >
  1336. 2)
  1337. ) {
  1338. this.$message({
  1339. message: '已开发票金额输入错误',
  1340. type: 'warning',
  1341. })
  1342. return
  1343. }
  1344. if (
  1345. (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
  1346. (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
  1347. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1348. '.'
  1349. ) != -1 &&
  1350. String(this.deptBudgetList.contractProcessInfo.impurity).length -
  1351. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1352. '.'
  1353. ) +
  1354. 1) >
  1355. 2)
  1356. ) {
  1357. this.$message({
  1358. message: '未开发票金额输入错误',
  1359. type: 'warning',
  1360. })
  1361. return
  1362. }
  1363. if (
  1364. (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
  1365. (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
  1366. (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
  1367. '.'
  1368. ) != -1 &&
  1369. String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
  1370. (String(
  1371. this.deptBudgetList.contractProcessInfo.mildewGrain
  1372. ).indexOf('.') +
  1373. 1) >
  1374. 2)
  1375. ) {
  1376. this.$message({
  1377. message: '未回款金额输入错误',
  1378. type: 'warning',
  1379. })
  1380. return
  1381. }
  1382. this.$confirm(`确定提交本次修改?`, {
  1383. cancelButtonText: '取消',
  1384. confirmButtonText: '确定',
  1385. type: 'warning'
  1386. })
  1387. .then(() => {
  1388. this.$refs.deptBudgetList.validate((valid) => {
  1389. if (valid) {
  1390. this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
  1391. this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
  1392. this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
  1393. this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
  1394. this.deptBudgetList.compId = this.compId
  1395. this.deptBudgetList.contractType = 2
  1396. if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
  1397. this.deptBudgetList.deliveryArea = "特别行政区"
  1398. }else{
  1399. this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
  1400. }
  1401. if(this.deptBudgetList.sourceProvince =="澳门特别行政区" || this.deptBudgetList.sourceProvince == "澳门特别行政区"){
  1402. this.deptBudgetList.sourceArea = "特别行政区"
  1403. }else{
  1404. this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
  1405. }
  1406. this.deptBudgetList.addressUrl = this.addressUrls.toString()
  1407. editInfo(this.deptBudgetList)
  1408. .toPromise()
  1409. .then((response) => {
  1410. this.$message.success('编辑成功')
  1411. this.$router.push({ path: 'buyContract' })
  1412. })
  1413. } else {
  1414. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1415. return false
  1416. }
  1417. })
  1418. })
  1419. },
  1420. },
  1421. }
  1422. </script>
  1423. <style lang="scss" scoped>
  1424. .el-form {
  1425. padding: 0 15%;
  1426. }
  1427. /deep/.ws-info-table .el-form-item {
  1428. border-right: 1px solid #cdd2dc;
  1429. border-bottom: 1px solid #cdd2dc;
  1430. }
  1431. .readonly {
  1432. position: relative;
  1433. }
  1434. .readonly:after {
  1435. content: '*';
  1436. color: #ff2727;
  1437. position: absolute;
  1438. right: 8px;
  1439. z-index: 10;
  1440. top: 21%;
  1441. font-size: 20px;
  1442. }
  1443. .title {
  1444. position: relative;
  1445. }
  1446. .title::before {
  1447. content: '';
  1448. display: inline-block;
  1449. width: 5px;
  1450. height: 30px;
  1451. background: #5473e8;
  1452. position: absolute;
  1453. left: 0;
  1454. }
  1455. .el-button--primary {
  1456. background-color: #5878e8;
  1457. border-color: #5878e8;
  1458. }
  1459. .el-col {
  1460. background: #f6f7fc;
  1461. }
  1462. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1463. padding: 0 25px;
  1464. border-left: 1px solid #cdd2dc;
  1465. background: #fafbfc;
  1466. color: #8890B1;
  1467. }
  1468. /deep/.el-form-item.is-success .el-input__inner , /deep/.el-cascader .el-input .el-input__inner, /deep/.el-textarea__inner{
  1469. color: #8890B1;
  1470. }
  1471. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1472. width: 140px;
  1473. text-align: center;
  1474. background: #f0f2f6;
  1475. // border: 1px solid #cdd2dc;
  1476. }
  1477. .button-container {
  1478. display: flex;
  1479. flex-wrap: nowrap;
  1480. justify-content: space-between;
  1481. align-items: center;
  1482. background-color: #fff;
  1483. width: 100%;
  1484. height: 50px;
  1485. padding: 0 10px;
  1486. & > div {
  1487. margin-left: 10px;
  1488. display: flex;
  1489. flex-wrap: nowrap;
  1490. flex-direction: row;
  1491. & > span {
  1492. line-height: 50px;
  1493. }
  1494. }
  1495. /deep/.auditFlow-box {
  1496. position: unset;
  1497. margin-left: 10px;
  1498. &/deep/.auditFlow-icon {
  1499. width: auto;
  1500. padding-right: 30px;
  1501. }
  1502. &/deep/.auditFlow-main {
  1503. position: absolute;
  1504. }
  1505. }
  1506. }
  1507. .box-app {
  1508. display: inline-block;
  1509. float: left;
  1510. margin-left: 30px;
  1511. line-height: 50px;
  1512. }
  1513. /deep/.el-dialog {
  1514. .el-form-item {
  1515. margin-bottom: 0 !important;
  1516. .el-input--medium {
  1517. textarea {
  1518. min-height: 100px !important;
  1519. }
  1520. }
  1521. }
  1522. }
  1523. .collapse-bottom {
  1524. margin-bottom: 20px;
  1525. }
  1526. .input-main .textarea .el-textarea__inner {
  1527. width: 100%;
  1528. z-index: 1;
  1529. }
  1530. .bg-left {
  1531. padding-left: 30px;
  1532. }
  1533. .bg-right {
  1534. padding-right: 10px;
  1535. text-align: right;
  1536. }
  1537. .bg-bottom {
  1538. margin: 15px 0px;
  1539. }
  1540. .wenzi {
  1541. width: 900px;
  1542. margin: 0 auto;
  1543. }
  1544. .wenzi h3 {
  1545. display: inline-block;
  1546. left: 10px;
  1547. }
  1548. .wenzi p {
  1549. display: inline-block;
  1550. }
  1551. .center {
  1552. width: 900px;
  1553. margin: 0 auto;
  1554. }
  1555. .el-form-item {
  1556. width: 50%;
  1557. }
  1558. .el-form-item__label {
  1559. text-align: center;
  1560. }
  1561. .ce {
  1562. width: 900px;
  1563. margin: 0 auto;
  1564. }
  1565. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  1566. /* height: 82px;*/
  1567. /*}*/
  1568. // 控制select为只读的时候显示样式
  1569. .hide-sel {
  1570. .el-input__inner {
  1571. border: 0px;
  1572. }
  1573. .el-icon-arrow-up {
  1574. display: none;
  1575. }
  1576. .el-textarea__inner {
  1577. background-color: #fff !important;
  1578. border: 0;
  1579. }
  1580. .el-date-editor {
  1581. i {
  1582. display: none;
  1583. }
  1584. }
  1585. .is-disabled {
  1586. .el-input__inner:hover {
  1587. background-color: #fff !important;
  1588. border: 0;
  1589. }
  1590. color: #606266;
  1591. .el-input__inner {
  1592. background-color: #fff !important;
  1593. border: 0;
  1594. color: #606266;
  1595. }
  1596. .el-textarea__inner {
  1597. background-color: #fff !important;
  1598. border: 0;
  1599. color: #606266;
  1600. }
  1601. }
  1602. }
  1603. // 控制select为只读的时候显示样式
  1604. /deep/.ws-class-table-col {
  1605. height: auto;
  1606. padding: 0px 2px;
  1607. /deep/.el-input__inner {
  1608. padding: 0px 2px;
  1609. }
  1610. }
  1611. /deep/.is-disabled {
  1612. .el-input__prefix,
  1613. .el-input__suffix {
  1614. display: none;
  1615. }
  1616. .el-input__inner {
  1617. background-color: #fff;
  1618. border-color: #fff !important;
  1619. color: #000 !important;
  1620. font-size: 14px;
  1621. cursor: text;
  1622. padding: 0 !important;
  1623. }
  1624. }
  1625. .winseaview-view {
  1626. padding: 0 0 20px;
  1627. }
  1628. .container {
  1629. overflow: scroll;
  1630. height: 93vh;
  1631. }
  1632. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1633. width: 130px;
  1634. }
  1635. .el-textarea{
  1636. width: 101%;
  1637. }
  1638. /deep/.iconclose:before {
  1639. display: none;
  1640. }
  1641. /deep/.winsea-card .card__header {
  1642. font-size: 14px;
  1643. color: #409eff;
  1644. padding: 0 0 20px 10px;
  1645. position: relative;
  1646. display: none;
  1647. }
  1648. .addressUrls {
  1649. width: 100%;
  1650. display: flex;
  1651. margin-top: 10px;
  1652. }
  1653. .addressUrls-item {
  1654. position: relative;
  1655. display: flex;
  1656. }
  1657. .icon-guanbi {
  1658. position: absolute;
  1659. right: 8px;
  1660. }
  1661. .addressUrl {
  1662. margin: 0px 10px;
  1663. border-radius: 3px;
  1664. }
  1665. //上传文件成功标识
  1666. /deep/.el-upload-list__item-status-label {
  1667. position: absolute;
  1668. right: 22px;
  1669. top: -1px;
  1670. line-height: inherit;
  1671. display: none;
  1672. }
  1673. </style>