purchaseContractEdit.vue 49 KB

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