futuresSalesContractEdit.vue 54 KB

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