purchaseContractEdit.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  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">查看合同详情</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. >返回</el-button
  16. >
  17. </el-col>
  18. </el-row>
  19. <ws-form
  20. ref="deptBudgetList"
  21. :rules="mainReportAdd"
  22. :model="deptBudgetList"
  23. >
  24. <div class="remark">
  25. <h3>基本信息</h3>
  26. </div>
  27. <ws-info-table>
  28. <ws-form-item
  29. label="合同编号"
  30. span="1"
  31. prop="contractNo"
  32. >
  33. {{deptBudgetList.contractNo}}
  34. </ws-form-item>
  35. <ws-form-item
  36. label="运输方式"
  37. span="1"
  38. prop="shippingType"
  39. >
  40. <ws-input
  41. v-model="deptBudgetList.shippingType"
  42. maxlength="100"
  43. size="small"
  44. />
  45. </ws-form-item>
  46. <ws-form-item
  47. label="买方"
  48. span="1"
  49. prop="buyer"
  50. >
  51. {{deptBudgetList.buyer}}
  52. </ws-form-item>
  53. <ws-form-item
  54. label="结算方式"
  55. span="1"
  56. prop="settlementMethod"
  57. >
  58. <ws-input
  59. v-model="deptBudgetList.settlementMethod"
  60. maxlength="100"
  61. size="small"
  62. />
  63. </ws-form-item>
  64. <ws-form-item
  65. label="卖方"
  66. span="1"
  67. prop="seller"
  68. >{{deptBudgetList.seller}}
  69. </ws-form-item>
  70. <ws-form-item
  71. label="货源地"
  72. span="1"
  73. prop="sourceGoods"
  74. >
  75. <ws-input
  76. v-model="deptBudgetList.sourceGoods"
  77. maxlength="100"
  78. size="small"
  79. />
  80. </ws-form-item>
  81. <ws-form-item
  82. label="买方电话"
  83. span="1"
  84. prop="buyerPhone"
  85. >
  86. <ws-input
  87. v-model="deptBudgetList.buyerPhone"
  88. maxlength="100"
  89. size="small"
  90. />
  91. </ws-form-item>
  92. <ws-form-item
  93. label="交货地"
  94. span="1"
  95. prop="placeDelivery">
  96. <ws-input
  97. v-model="deptBudgetList.placeDelivery"
  98. maxlength="100"
  99. size="small"
  100. />
  101. </ws-form-item>
  102. <ws-form-item
  103. label="卖方电话"
  104. span="1"
  105. prop="sellerPhone">
  106. <ws-input
  107. v-model="deptBudgetList.sellerPhone"
  108. maxlength="100"
  109. size="small"
  110. />
  111. </ws-form-item>
  112. <ws-form-item
  113. label="包装方式"
  114. span="1"
  115. prop="packingMethod">
  116. <ws-select
  117. v-model="deptBudgetList.packingMethod"
  118. placeholder=""
  119. class="typeselect"
  120. @change="selectpackingMethod"
  121. >
  122. <ws-option
  123. v-for="item in packtypeList"
  124. :key="item.constKey"
  125. :label="item.constValue"
  126. :value="item.constValue"
  127. />
  128. </ws-select>
  129. </ws-form-item>
  130. <ws-form-item
  131. label="重量(吨)"
  132. span="1"
  133. prop="weight">
  134. <ws-input
  135. v-model="deptBudgetList.weight"
  136. maxlength="100"
  137. size="small"
  138. />
  139. </ws-form-item>
  140. <ws-form-item
  141. label="验收方式"
  142. span="1"
  143. prop="acceptanceMethod">
  144. <el-select v-model="deptBudgetList.acceptanceMethod" :value='deptBudgetList.acceptanceMethod' placeholder="请选择验收方式" style="width: 100%;" filterable @change="selectunitList">
  145. <el-option v-for="(item,index) in unitList"
  146. :key="item.constValue"
  147. :label=" item.constValue"
  148. :value="item.constValue">
  149. <span class="unit-left" style="float: left">
  150. <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
  151. <!-- 新增文本框 -->
  152. <div style="width:160px" v-if="item.flag !== 'delete'" @click.stop>
  153. <ws-input v-model="item.constValue"
  154. clearable
  155. maxlength="10"
  156. style="width:100%;"></ws-input>
  157. </div>
  158. </span>
  159. <span style="float: right; color: #8492a6; font-size: 13px">
  160. <!-- 对号 -->
  161. <i class="el-icon-check" style="line-height: 29px;margin-left:10px" v-if="item.flag !== 'delete'" @click.stop="saveClick(item, index)"></i>
  162. <!-- 编辑 -->
  163. <i class="el-icon-edit" style="line-height: 29px;margin-left:10px" v-if="item.flag == 'delete'" @click.stop="editClick(item, index)"></i>
  164. <!-- 删除 -->
  165. <i class="el-icon-delete" style="line-height: 29px;" @click.stop="deleteClick(item, index)"></i>
  166. </span>
  167. </el-option>
  168. <!-- 新增按钮 -->
  169. <el-option value="" label="">
  170. <div style="text-align: center">
  171. <ws-button type="primary" @click.stop="addClick">{{$t('button.add')}}</ws-button>
  172. </div>
  173. </el-option>
  174. </el-select>
  175. </ws-form-item>
  176. <ws-form-item
  177. label="溢短装(%)"
  178. span="1"
  179. prop="overShort">
  180. <ws-input
  181. v-model="deptBudgetList.overShort"
  182. maxlength="100"
  183. size="small"
  184. />
  185. </ws-form-item>
  186. <ws-form-item
  187. label="交货日期(起)"
  188. span="1"
  189. prop="deliveryDateStart">
  190. <ws-date-picker
  191. :picker-options="pickerBeginDateBefore"
  192. v-model="deptBudgetList.deliveryDateStart"
  193. type="date"
  194. default-value="1980-01-01"
  195. placeholder="交货日期(起)"
  196. format="yyyy-MM-dd"
  197. value-format="yyyy-MM-dd"
  198. />
  199. </ws-form-item>
  200. <ws-form-item
  201. label="合同单价(元/吨)"
  202. span="1"
  203. prop="unitContractPrice">
  204. {{deptBudgetList.unitContractPrice}}
  205. </ws-form-item>
  206. <ws-form-item
  207. label="交货日期(止)"
  208. span="1"
  209. prop="deliveryDateEnd">
  210. <ws-date-picker
  211. :picker-options="pickerBeginDateBefore"
  212. v-model="deptBudgetList.deliveryDateEnd"
  213. type="date"
  214. default-value="1980-01-01"
  215. placeholder="交货日期(止)"
  216. format="yyyy-MM-dd"
  217. value-format="yyyy-MM-dd"
  218. />
  219. </ws-form-item>
  220. <ws-form-item
  221. label="合同总价(元)"
  222. span="1"
  223. prop="totalContractPrice">
  224. <ws-input
  225. v-model="deptBudgetList.totalContractPrice"
  226. maxlength="100"
  227. size="small"
  228. />
  229. </ws-form-item>
  230. <ws-form-item
  231. label="签订日期"
  232. span="1"
  233. prop="signingDate">
  234. <ws-date-picker
  235. :picker-options="pickerBeginDateBefore"
  236. v-model="deptBudgetList.deliveryDateEnd"
  237. type="date"
  238. default-value="1980-01-01"
  239. placeholder="签订日期"
  240. format="yyyy-MM-dd"
  241. value-format="yyyy-MM-dd"
  242. />
  243. </ws-form-item>
  244. </ws-info-table>
  245. </base-card>
  246. <!--面试信息-->
  247. <div class="remark">
  248. <h3>货物信息</h3>
  249. </div>
  250. <ws-info-table>
  251. <ws-form-item
  252. label="货名"
  253. span="1"
  254. prop="waterContent"
  255. >
  256. {{deptBudgetList.contractGoodsInfo.goodsName}}
  257. </ws-form-item>
  258. <ws-form-item
  259. label="水分(%)<="
  260. span="1"
  261. prop="intendedShipId"
  262. >
  263. {{deptBudgetList.contractGoodsInfo.waterContent}}
  264. </ws-form-item>
  265. <ws-form-item
  266. label="品级"
  267. span="1"
  268. prop="grade"
  269. >
  270. {{deptBudgetList.contractGoodsInfo.grade}}
  271. </ws-form-item>
  272. <ws-form-item
  273. label="杂质(%)<="
  274. span="1"
  275. prop="impurity"
  276. >
  277. {{deptBudgetList.contractGoodsInfo.impurity}}
  278. </ws-form-item>
  279. <ws-form-item
  280. label="容重(克/升)<="
  281. span="1"
  282. prop="bulkDensity"
  283. >
  284. {{deptBudgetList.contractGoodsInfo.bulkDensity}}
  285. </ws-form-item>
  286. <ws-form-item
  287. label="霉变粒(%)<="
  288. span="1"
  289. prop="mildewGrain"
  290. class="result"
  291. >
  292. {{deptBudgetList.contractGoodsInfo.mildewGrain}}
  293. </ws-form-item>
  294. <ws-form-item
  295. label="热损伤(%)<="
  296. span="1"
  297. prop="jiaorenli"
  298. >
  299. {{deptBudgetList.contractGoodsInfo.jiaorenli}}
  300. </ws-form-item>
  301. <ws-form-item
  302. label="不完善粒(%)<="
  303. span="1"
  304. prop="imperfectGrain"
  305. class="result"
  306. >
  307. {{deptBudgetList.contractGoodsInfo.imperfectGrain}}
  308. </ws-form-item>
  309. </ws-info-table>
  310. <div class="remark">
  311. <h3>流程信息</h3>
  312. </div>
  313. <ws-info-table>
  314. <ws-form-item
  315. label="合同收入(元)"
  316. span="1"
  317. prop="goodsNameKey"
  318. >
  319. {{deptBudgetList.contractProcessInfo.goodsNameKey}}
  320. </ws-form-item>
  321. <ws-form-item
  322. label="已开发票(元)"
  323. span="1"
  324. prop="goodsName"
  325. >
  326. {{deptBudgetList.contractProcessInfo.goodsName}}
  327. </ws-form-item>
  328. <ws-form-item
  329. label="费用支出(元)"
  330. span="1"
  331. prop="waterContent"
  332. >{{deptBudgetList.contractProcessInfo.waterContent}}
  333. </ws-form-item>
  334. <ws-form-item
  335. label="未开发票(元)"
  336. span="1"
  337. prop="impurity"
  338. >{{deptBudgetList.contractProcessInfo.impurity}}
  339. </ws-form-item>
  340. <ws-form-item
  341. label="未回款(元)"
  342. span="1"
  343. prop="mildewGrain"
  344. >{{deptBudgetList.contractProcessInfo.mildewGrain}}
  345. </ws-form-item>
  346. <ws-form-item
  347. label="已完成发运量(吨)"
  348. span="1"
  349. prop="imperfectGrain"
  350. class="result"
  351. >{{deptBudgetList.contractProcessInfo.imperfectGrain}}
  352. </ws-form-item>
  353. <ws-form-item
  354. label="双章原件回收情况"
  355. span="1"
  356. prop="grade"
  357. >{{deptBudgetList.contractProcessInfo.grade}}
  358. </ws-form-item>
  359. </ws-info-table>
  360. <div class="remark">
  361. <h3>备注信息</h3>
  362. </div>
  363. {{deptBudgetList.remarks}}
  364. <img :src="deptBudgetList.addressUrl" alt="">
  365. </base-card>
  366. </ws-form>
  367. <div style='text-align:right;padding:10px;'>
  368. <el-button
  369. class="bg-bottom"
  370. type="primary"
  371. size="small"
  372. @click="returnsales()"
  373. >关闭</el-button
  374. >
  375. </div>
  376. </div>
  377. </template>
  378. <script>
  379. import {
  380. packList,
  381. addList,
  382. xiala,
  383. addxiala,
  384. editxiala,
  385. delxiala,
  386. examineList,
  387. } from '@/model/contarct/index'
  388. import { dayjs } from 'base-core-lib'
  389. export default {
  390. name: 'viewSpareMoney',
  391. watch: {
  392. vesselId(val) {
  393. this.getVesselData()
  394. },
  395. isShow(val) {
  396. this.showType = val
  397. },
  398. },
  399. data() {
  400. return {
  401. //弹出框
  402. dialogViewSpareMoney: false,
  403. dialogApproveFormVisible: false,
  404. // 船舶类型
  405. monetaryKey: null,
  406. // 表格显示数据
  407. tableDate: [],
  408. // 是否显示
  409. showType: true,
  410. // 年
  411. year: '',
  412. // 提交类型
  413. submitType: true,
  414. tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
  415. ruleDeptBudget: [],
  416. deptBudgetList: {
  417. contractProcessInfo: {},
  418. contractGoodsInfo: {},
  419. },
  420. mainReportAdd: {},
  421. list: {},
  422. unitList: [],
  423. packtypeList: [],
  424. goodnameList: [],
  425. gradeList: [],
  426. ChapterTwoList: [],
  427. }
  428. },
  429. activated() {
  430. this.loaddata()
  431. this.showType = this.isShow
  432. },
  433. methods: {
  434. loaddata() {
  435. // 数据
  436. examineList({ id: this.$route.params.id })
  437. .toPromise()
  438. .then((response) => {
  439. this.deptBudgetList = response
  440. })
  441. // 包装方式
  442. packList({ constId: 'CON1' })
  443. .toPromise()
  444. .then((response) => {
  445. this.packtypeList = response
  446. })
  447. // 验收方式
  448. this.getUnitList()
  449. // 货名
  450. packList({ constId: 'CON2' })
  451. .toPromise()
  452. .then((response) => {
  453. this.goodnameList = response
  454. })
  455. // 品级
  456. packList({ constId: 'CON3' })
  457. .toPromise()
  458. .then((response) => {
  459. this.gradeList = response
  460. })
  461. // 双章
  462. packList({ constId: 'CON4' })
  463. .toPromise()
  464. .then((response) => {
  465. this.ChapterTwoList = response
  466. })
  467. },
  468. getUnitList() {
  469. xiala({
  470. compId: sessionStorage.getItem('ws-pf_compId'),
  471. constCode: 'TYPEYAN',
  472. })
  473. .toPromise()
  474. .then((response) => {
  475. this.unitList = response
  476. let currItem
  477. this.unitList.forEach((item, index, arr) => {
  478. item.flag = 'delete'
  479. if (this.vModel == item.constKey) {
  480. currItem = item
  481. }
  482. })
  483. //
  484. if (currItem) {
  485. this.selectContract(currItem.constValue)
  486. }
  487. })
  488. },
  489. // 关闭 dialog时 处理文件url 初始化upload组件
  490. handleClose() {
  491. this.dialogViewSpareMoney = false
  492. },
  493. handleExamine() {},
  494. approve() {},
  495. returnsales() {
  496. this.$router.push({ path: 'purchaseContract' })
  497. },
  498. },
  499. }
  500. </script>
  501. <style lang="scss" scoped>
  502. .el-form {
  503. padding: 0 20%;
  504. }
  505. .el-form-item {
  506. width: 50%;
  507. }
  508. .button-container {
  509. display: flex;
  510. flex-wrap: nowrap;
  511. justify-content: space-between;
  512. align-items: center;
  513. background-color: #fff;
  514. width: 100%;
  515. height: 50px;
  516. padding: 0 10px;
  517. & > div {
  518. margin-left: 10px;
  519. display: flex;
  520. flex-wrap: nowrap;
  521. flex-direction: row;
  522. & > span {
  523. line-height: 50px;
  524. }
  525. }
  526. /deep/.auditFlow-box {
  527. position: unset;
  528. margin-left: 10px;
  529. &/deep/.auditFlow-icon {
  530. width: auto;
  531. padding-right: 30px;
  532. }
  533. &/deep/.auditFlow-main {
  534. position: absolute;
  535. }
  536. }
  537. }
  538. .box-app {
  539. display: inline-block;
  540. float: left;
  541. margin-left: 30px;
  542. line-height: 50px;
  543. }
  544. /deep/.el-dialog {
  545. .el-form-item {
  546. margin-bottom: 0 !important;
  547. .el-input--medium {
  548. textarea {
  549. min-height: 100px !important;
  550. }
  551. }
  552. }
  553. }
  554. .collapse-bottom {
  555. margin-bottom: 20px;
  556. }
  557. .input-main .textarea .el-textarea__inner {
  558. width: 100%;
  559. z-index: 1;
  560. }
  561. .collapse-bottom {
  562. margin-bottom: 20px;
  563. }
  564. .input-main .textarea .el-textarea__inner {
  565. width: 100%;
  566. z-index: 1;
  567. }
  568. .bg-left {
  569. padding-left: 10px;
  570. }
  571. .bg-right {
  572. padding-right: 10px;
  573. text-align: right;
  574. }
  575. .bg-bottom {
  576. margin: 20px 0px;
  577. }
  578. .remark h3 {
  579. display: inline-block;
  580. margin-right: 20px;
  581. }
  582. .remark p {
  583. display: inline-block;
  584. }
  585. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  586. /* height: 82px;*/
  587. /*}*/
  588. // 控制select为只读的时候显示样式
  589. .hide-sel {
  590. .el-input__inner {
  591. border: 0px;
  592. }
  593. .el-icon-arrow-up {
  594. display: none;
  595. }
  596. .el-textarea__inner {
  597. background-color: #fff !important;
  598. border: 0;
  599. }
  600. .el-date-editor {
  601. i {
  602. display: none;
  603. }
  604. }
  605. .is-disabled {
  606. .el-input__inner:hover {
  607. background-color: #fff !important;
  608. border: 0;
  609. }
  610. color: #606266;
  611. .el-input__inner {
  612. background-color: #fff !important;
  613. border: 0;
  614. color: #606266;
  615. }
  616. .el-textarea__inner {
  617. background-color: #fff !important;
  618. border: 0;
  619. color: #606266;
  620. }
  621. }
  622. }
  623. // 控制select为只读的时候显示样式
  624. /deep/.ws-class-table-col {
  625. height: auto;
  626. padding: 0px 2px;
  627. /deep/.el-input__inner {
  628. padding: 0px 2px;
  629. }
  630. }
  631. /deep/.is-disabled {
  632. .el-input__prefix,
  633. .el-input__suffix {
  634. display: none;
  635. }
  636. .el-input__inner {
  637. background-color: #fff;
  638. border-color: #fff !important;
  639. color: #000 !important;
  640. font-size: 14px;
  641. cursor: text;
  642. padding: 0 !important;
  643. }
  644. }
  645. .winseaview-view {
  646. padding: 10px 0 20px;
  647. }
  648. .container {
  649. overflow: scroll;
  650. height: 93vh;
  651. }
  652. </style>