purchaseContractEdit.vue 50 KB

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