futuresPurchaseContractEdit.vue 55 KB

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