futuresPurchaseContractEdit.vue 55 KB

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