salesContractEdit.vue 48 KB

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