purchaseContractEdit.vue 48 KB

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