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