salesContractEdit.vue 49 KB

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