futuresPurchaseContractEdit.vue 56 KB

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