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