procurementPlanLook.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. // 查看采购计划
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left title">查看采购计划</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
  10. <img
  11. width="6"
  12. height="10"
  13. style="vertical-align: bottom; margin-right: 3px"
  14. src="../../../public/img/lujing.png"
  15. alt
  16. />返回
  17. </el-button>
  18. </el-col>
  19. </el-row>
  20. <div class="basicInformation">
  21. <el-radio-group @change="tasktypechange" v-model="dataList.taskTypeKey"></el-radio-group>
  22. <div class="center1">
  23. <div class="small-title">
  24. <h3>基本信息</h3>
  25. </div>
  26. <el-form ref="dataList" :model="dataList" label-width="140px">
  27. <!-- 标题 -->
  28. <el-form-item label="标题">
  29. <el-input disabled v-model="dataList.title" class="typeselect"></el-input>
  30. </el-form-item>
  31. <!-- 货名 -->
  32. <el-form-item label="货名">
  33. <el-input disabled v-model="dataList.goodsName" class="typeselect"></el-input>
  34. </el-form-item>
  35. <!-- 计划采购量(吨) -->
  36. <el-form-item label="计划采购量(吨)">
  37. <el-input disabled v-model="dataList.plannedPurchaseVolume" class="typeselect"></el-input>
  38. </el-form-item>
  39. <!-- 最小成交量(吨) -->
  40. <el-form-item label="最小成交量(吨)">
  41. <el-input disabled v-model="dataList.minimumVolume"></el-input>
  42. </el-form-item>
  43. <!--类型-->
  44. <el-form-item label="类型" span="1">
  45. <el-input disabled v-model="dataList.procurementPlanType" maxlength="120" />
  46. </el-form-item>
  47. <!-- 价格类型 -->
  48. <el-form-item label="价格类型">
  49. <el-input v-model="dataList.priceType" placeholder class="typeselect" disabled></el-input>
  50. </el-form-item>
  51. <ws-form-item v-show="dataList.procurementPlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
  52. <el-input v-model="dataList.basisPrice" disabled maxlength="120" size="small" />
  53. </ws-form-item>
  54. <!--采购价格(元)-->
  55. <ws-form-item v-show="dataList.procurementPlanType=='现货'" label="采购价格(元)" span="1" prop="procurementPrice">
  56. <el-input
  57. disabled
  58. v-model="dataList.procurementPrice"
  59. maxlength="120"
  60. size="small"
  61. />
  62. </ws-form-item>
  63. <!--收货库-->
  64. <el-form-item label="收货库" span="1">
  65. <el-input disabled v-model="dataList.receiveWarehouse" maxlength="120" size="small" />
  66. </el-form-item>
  67. <!--收货库所在地区-->
  68. <el-form-item label="收货库所在地区" span="1">
  69. <div class="forlist">
  70. {{dataList.receivePrivate}}{{dataList.receiveCity}}{{dataList.receiveArea}}
  71. </div>
  72. </el-form-item>
  73. <!--运费承担方-->
  74. <el-form-item label="运费承担方">
  75. <el-input disabled v-model="dataList.freightPayer" maxlength="120" size="small" />
  76. </el-form-item>
  77. <!--包装方式-->
  78. <el-form-item label="包装方式">
  79. <el-input disabled v-model="dataList.packingType" filterable></el-input>
  80. </el-form-item>
  81. <!--装袋备注=-->
  82. <el-form-item label="装袋备注" v-if="dataList.packingType == '大袋' || dataList.packingType == '小袋'">
  83. <el-input disabled v-model="dataList.baggingNotes" size="small" />
  84. </el-form-item>
  85. <!-- 买方 -->
  86. <el-form-item label="买方">
  87. <el-input disabled v-model="dataList.buyer" maxlength="120" size="small" />
  88. </el-form-item>
  89. <!-- 买方电话 -->
  90. <el-form-item label="买方电话">
  91. <el-input disabled v-model="dataList.buyerPhone" filterable></el-input>
  92. </el-form-item>
  93. <div class="small-title"></div>
  94. </el-form>
  95. </div>
  96. <div class="center1">
  97. <div class="small-title">
  98. <h3>货物要求</h3>
  99. </div>
  100. <el-form ref="dataList" :model="dataList" label-width="140px">
  101. <el-form-item label="水分(%)<=">
  102. <el-input disabled v-model="dataList.waterContent" class="typeselect" />
  103. </el-form-item>
  104. <!-- 容重 -->
  105. <el-form-item label="容重(g/l)>=">
  106. <el-input disabled v-model="dataList.bulkDensity" class="typeselect" />
  107. </el-form-item>
  108. <!-- 热损伤 -->
  109. <el-form-item label="热损伤(%)<=">
  110. <el-input disabled v-model="dataList.jiaorenli" class="typeselect" />
  111. </el-form-item>
  112. <!-- 杂质 -->
  113. <el-form-item label="杂质(%)<=">
  114. <el-input disabled v-model="dataList.impurity" class="typeselect" />
  115. </el-form-item>
  116. <!-- 霉变粒 -->
  117. <el-form-item label="霉变粒(%)<=">
  118. <el-input disabled v-model="dataList.mildewGrain" />
  119. </el-form-item>
  120. <!--不完善粒(%)<=-->
  121. <el-form-item label="不完善粒(%)<=" span="1">
  122. <el-input disabled v-model="dataList.imperfectGrain" maxlength="120" />
  123. </el-form-item>
  124. <!-- 蛋白(%)>= -->
  125. <el-form-item label="蛋白(%)>=" span="1">
  126. <el-input v-model="dataList.protein" placeholder class="typeselect" disabled />
  127. </el-form-item>
  128. <!--粒形-->
  129. <el-form-item label="粒形" span="1">
  130. <el-input disabled v-model="dataList.grain" maxlength="120" size="small" />
  131. </el-form-item>
  132. <!--水分(%)<=-->
  133. <el-form-item label="品级" span="1">
  134. <el-input disabled v-model="dataList.grade" maxlength="120" size="small" />
  135. </el-form-item>
  136. <!--产地-->
  137. <el-form-item label="产地" span="1">
  138. <div class="forlist">
  139. {{dataList.outputPrivate}}{{dataList.outputCity}}
  140. </div>
  141. </el-form-item>
  142. <!--产出年份-->
  143. <el-form-item label="产出年份" span="1">
  144. <el-date-picker
  145. disabled
  146. v-model="dataList.outputYear"
  147. type="year"
  148. align="right"
  149. unlink-panels
  150. range-separator="至"
  151. placeholder="产出年份"
  152. ></el-date-picker>
  153. </el-form-item>
  154. </el-form>
  155. </div>
  156. </div>
  157. <!-- 关闭 -->
  158. <div style="text-align: right; padding: 10px" class="center">
  159. <el-button class="bg-bottom" type="primary" size="small" @click="close()">关闭</el-button>
  160. </div>
  161. </div>
  162. </template>
  163. <script>
  164. import {
  165. procurementLook,
  166. } from '@/model/purchasingManagement/index'
  167. import Pagination from '@/components/Pagination'
  168. import WsUpload from '@/components/WsUpload'
  169. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  170. import { dayjs, EventBus } from 'base-core-lib'
  171. export default {
  172. name: 'viewSpareMoney',
  173. components: {
  174. WsUpload,
  175. Pagination
  176. },
  177. watch: {
  178. isShow(val) {
  179. this.showType = val
  180. }
  181. },
  182. computed: {
  183. ...mapGetters(['deptBudgetList'])
  184. },
  185. data() {
  186. return {
  187. //弹出框
  188. dialogViewSpareMoney: false,
  189. dialogApproveFormVisible: false,
  190. // 船舶类型
  191. monetaryKey: null,
  192. // 表格显示数据
  193. tableDate: [],
  194. // 是否显示
  195. showType: true,
  196. // 年
  197. year: '',
  198. contractNoList: [],
  199. deptBudgetTotal: 0,
  200. readonly: true,
  201. currentPage: 1,
  202. pageSize: 10,
  203. searchType: 1,
  204. searchKeyWord: '',
  205. radio: '1',
  206. contractType: 2,
  207. startDate: null,
  208. endDate: null,
  209. goodnameList: [],
  210. checked: true,
  211. form: {},
  212. staffList: [],
  213. options: [],
  214. storageType: [],
  215. storageType1: [],
  216. outContractNo: [],
  217. // 提交类型
  218. submitType: true,
  219. status: [],
  220. unitPricechange: [],
  221. warehouseNameList: [],
  222. warehouseNameList1: [],
  223. waterContentchange: [],
  224. appendixIdsAdd: '',
  225. uploadSuccess: {},
  226. warehouseInOutDetail: {},
  227. onChange: {},
  228. deptBudgetList1: [],
  229. gradeList: [],
  230. rules: {
  231. netWeight: [
  232. {
  233. required: true,
  234. type: 'number',
  235. message: '请输入活动名称',
  236. trigger: 'blur'
  237. }
  238. ]
  239. },
  240. size: 10,
  241. compId: sessionStorage.getItem('ws-pf_compId'),
  242. deptCircularPage: {},
  243. packtypeList: {},
  244. date: {
  245. year: dayjs().format('YYYY'),
  246. month: dayjs().format('MM')
  247. },
  248. contractList: [],
  249. inOutTaskNo: '',
  250. inOutTaskNo1: '',
  251. dataList: { taskTypeKey: '1' },
  252. dataList1: { taskTypeKey: '1' },
  253. historyList: [],
  254. pickerBeginDateBefore: {
  255. disabledDate: time => {
  256. return time.getTime() > Date.now()
  257. }
  258. },
  259. accessoryTFs: false
  260. }
  261. },
  262. activated() {
  263. this.getList()
  264. this.showType = this.isShow
  265. },
  266. mounted() {
  267. this.dataList.id = this.$route.query.id
  268. },
  269. methods: {
  270. //返回按钮
  271. returnsales() {
  272. this.$router.go(-1)
  273. },
  274. // 获取当前年月日
  275. getdate() {
  276. var date = new Date()
  277. var year = date.getFullYear() //获取完整的年份(4位)
  278. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  279. var datetime = date.getDate() //获取当前日(1-31)
  280. if (mouth < 10) {
  281. mouth = '0' + mouth
  282. }
  283. if (datetime < 10) {
  284. datetime = '0' + datetime
  285. }
  286. return year +'' + mouth + datetime
  287. },
  288. // 随机验证码
  289. verifyinit() {
  290. var arr = []
  291. for (var i = 48; i < 123; i++) {
  292. if (i > 57 && i < 65) continue
  293. if (i > 90) continue
  294. arr.push(String.fromCharCode(i))
  295. }
  296. arr.sort(function() {
  297. return Math.random() - 0.5
  298. })
  299. arr.length = 4
  300. return arr.join('')
  301. },
  302. dataFilter(val) {
  303. // console.log(val,"名")
  304. this.deptBudgetList.staffList = val
  305. if (val) {
  306. //val存在
  307. this.options = this.staffList.filter(item => {
  308. if (
  309. !!~item.staffName.indexOf(val) ||
  310. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  311. ) {
  312. return true
  313. }
  314. })
  315. } else {
  316. //val为空时,还原数组
  317. this.options = this.staffList
  318. }
  319. },
  320. selectstaff(e) {
  321. for (var i = 0; i < this.staffList.length; i++) {
  322. if (this.staffList[i].staffName == e) {
  323. this.dataList.agentKey = this.staffList[i].staffId
  324. }
  325. }
  326. },
  327. selectstaff1(e) {
  328. for (var i = 0; i < this.staffList.length; i++) {
  329. if (this.staffList[i].staffName == e) {
  330. this.dataList1.agentKey = this.staffList[i].staffId
  331. }
  332. }
  333. },
  334. requestadd(list, status) {
  335. this.$refs.dataList.validate(valid => {
  336. if (valid) {
  337. list.compId = sessionStorage.getItem('ws-pf_compId')
  338. list.publisher =
  339. sessionStorage.getItem('ws-pf_roleName') +
  340. sessionStorage.getItem('ws-pf_staffName')
  341. addoreditoutput(list)
  342. .toPromise()
  343. .then(response => {
  344. this.$message.success('添加成功')
  345. this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
  346. })
  347. } else {
  348. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  349. return false
  350. }
  351. })
  352. },
  353. //关闭
  354. close() {
  355. this.$router.push({ path: 'procurementPlanList' })
  356. },
  357. tarechange(e) {
  358. if (this.dataList.grossWeight && this.dataList.tare) {
  359. this.dataList.netWeight = Number(
  360. this.dataList.grossWeight - this.dataList.tare
  361. )
  362. }
  363. },
  364. grossWeightchange(e) {
  365. if (this.dataList.grossWeight && this.dataList.tare) {
  366. this.dataList.netWeight = Number(
  367. this.dataList.grossWeight - this.dataList.tare
  368. )
  369. }
  370. },
  371. selectgoodsName(e) {
  372. for (var i = 0; i < this.goodnameList.length; i++) {
  373. if (this.goodnameList[i].constValue == e) {
  374. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  375. }
  376. }
  377. },
  378. selectgoodsName1(e) {
  379. for (var i = 0; i < this.goodnameList.length; i++) {
  380. if (this.goodnameList[i].constValue == e) {
  381. this.dataList1.goodsNameKey = this.goodnameList[i].constKey
  382. }
  383. }
  384. },
  385. selectpackingMethod(e) {
  386. for (var i = 0; i < this.packtypeList.length; i++) {
  387. if (this.packtypeList[i].constValue == e) {
  388. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  389. }
  390. }
  391. },
  392. selectpackingMethod1(e) {
  393. for (var i = 0; i < this.packtypeList.length; i++) {
  394. if (this.packtypeList[i].constValue == e) {
  395. this.dataList1.packingMethodKey = this.packtypeList[i].constKey
  396. }
  397. }
  398. },
  399. selectstorageType(e) {
  400. for (var i = 0; i < this.storageType.length; i++) {
  401. if (this.storageType[i].constValue == e) {
  402. this.dataList.inOutTypeKey = this.storageType[i].constKey
  403. }
  404. }
  405. },
  406. selectstorageType1(e) {
  407. for (var i = 0; i < this.storageType1.length; i++) {
  408. if (this.storageType1[i].constValue == e) {
  409. this.dataList1.inOutTypeKey = this.storageType[i].constKey
  410. }
  411. }
  412. },
  413. handleClose() {
  414. this.accessoryTFs = false
  415. },
  416. tasktypechange() {
  417. this.tasknumber()
  418. },
  419. GetRandomNum(Min, Max) {
  420. var Range = Max - Min
  421. var Rand = Math.random()
  422. return Min + Math.round(Rand * Range)
  423. },
  424. getList(){
  425. procurementLook({
  426. id: this.$route.query.id
  427. })
  428. .toPromise()
  429. .then(response => {
  430. this.dataList = response
  431. })
  432. },
  433. }
  434. }
  435. </script>
  436. <style lang="scss" scoped>
  437. /deep/.basicInformation {
  438. .el-info-table {
  439. border: none;
  440. position: relative;
  441. }
  442. .el-form-item {
  443. width: 33.3333%;
  444. border: none;
  445. margin: 0;
  446. .el-form-item__label {
  447. text-align: left;
  448. font-size: 14px;
  449. font-family: PingFangSC-Regular, PingFang SC;
  450. font-weight: 400;
  451. color: #8890b1;
  452. }
  453. .el-form-item__content {
  454. padding-left: 0px;
  455. padding-right: 10px;
  456. // background: #fff;
  457. white-space: nowrap;
  458. height: 40px;
  459. display: flex;
  460. -webkit-box-align: center;
  461. align-items: center;
  462. text-align: left;
  463. overflow: hidden;
  464. }
  465. }
  466. }
  467. /deep/.el-radio {
  468. color: #606266;
  469. font-weight: 500;
  470. line-height: 1;
  471. cursor: pointer;
  472. white-space: nowrap;
  473. outline: 0;
  474. margin-right: 30px;
  475. margin-top: 15px;
  476. }
  477. /deep/.el-radio__inner {
  478. border: 1px solid #dcdfe6;
  479. border-radius: 100%;
  480. width: 14px;
  481. height: 14px;
  482. background-color: #fff;
  483. cursor: pointer;
  484. -webkit-box-sizing: border-box;
  485. box-sizing: border-box;
  486. margin-left: 100px;
  487. }
  488. /deep/.el-radio__input {
  489. white-space: nowrap;
  490. cursor: pointer;
  491. outline: 0;
  492. line-height: 1;
  493. vertical-align: middle;
  494. margin-top: -1px;
  495. }
  496. .title {
  497. position: relative;
  498. padding-left: 10px;
  499. }
  500. .title::before {
  501. content: '';
  502. display: inline-block;
  503. width: 5px;
  504. height: 30px;
  505. background: #5473e8;
  506. position: absolute;
  507. left: 0;
  508. }
  509. .el-form {
  510. padding: 0 15%;
  511. display: flex;
  512. flex-wrap: wrap;
  513. margin-left: -50px;
  514. margin-top: 15px;
  515. width: 110%;
  516. }
  517. .el-button--primary {
  518. background-color: #5878e8;
  519. border-color: #5878e8;
  520. }
  521. .el-col {
  522. background: #f6f7fc;
  523. }
  524. .bg-right {
  525. text-align: right;
  526. padding: 16px 20px;
  527. }
  528. .center {
  529. position: relative;
  530. top: 50px;
  531. width: 40%;
  532. height: 2000px;
  533. margin: 0 auto;
  534. margin-right: 180px;
  535. }
  536. /deep/.el-form-item__label {
  537. width: 160px;
  538. }
  539. .inspector {
  540. width: 50%;
  541. }
  542. /deep/.el-form-item--small .el-form-item__label,
  543. .el-form-item--small .el-form-item__content {
  544. text-align: left;
  545. }
  546. /deep/.el-input--small {
  547. font-size: 13px;
  548. position: relative;
  549. display: inline-block;
  550. }
  551. .center1 .small-title {
  552. margin-left: 323px;
  553. }
  554. .center1 {
  555. width: 90%;
  556. margin: 0 auto;
  557. margin-left: 10px;
  558. margin-top: 25px;
  559. }
  560. /deep/.el-input--small .el-input__inner {
  561. height: 32px;
  562. line-height: 32px;
  563. }
  564. /deep/.el-select {
  565. display: inline-block;
  566. position: relative;
  567. width: 100%;
  568. }
  569. .annu {
  570. height: 81px;
  571. background: #ffffff;
  572. border-radius: 4px;
  573. }
  574. .basicInformation .el-form-item {
  575. width: 50.3333%;
  576. border: none;
  577. margin: 0;
  578. }
  579. .el-form {
  580. font-size: 14px;
  581. font-family: PingFangSC-Regular, PingFang SC;
  582. font-weight: 400;
  583. color: #8890b1;
  584. line-height: 16px;
  585. margin-left: 130px;
  586. }
  587. .a {
  588. margin-left: -32px;
  589. }
  590. .el-radio-group {
  591. margin-left: 80px;
  592. }
  593. .ding {
  594. height: 23px;
  595. background: #e8ecf6;
  596. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  597. }
  598. .nav2 {
  599. height: 25px;
  600. background: #e8ecf6;
  601. margin-top: 15px;
  602. }
  603. .ziti {
  604. width: 72px;
  605. height: 20px;
  606. font-size: 14px;
  607. font-family: PingFangSC-Regular, PingFang SC;
  608. font-weight: 400;
  609. color: #8890b1;
  610. line-height: 20px;
  611. margin-left: 314px;
  612. /* margin-top: 112px; */
  613. }
  614. /deep/.ziti1 {
  615. height: 40px;
  616. font-size: 16px;
  617. font-family: PingFangSC-Medium, PingFang SC;
  618. font-weight: 500;
  619. color: #262626;
  620. line-height: 20px;
  621. margin-left: 381px;
  622. margin-top: -21px;
  623. width: 100px;
  624. }
  625. .winseaview-view {
  626. padding: 0 0 20px;
  627. }
  628. .container {
  629. overflow: scroll;
  630. height: 93vh;
  631. }
  632. /deep/.basicInformation .el-form-item .el-form-item__content {
  633. padding-left: 0px;
  634. padding-right: 10px;
  635. white-space: nowrap;
  636. height: 40px;
  637. display: -webkit-box;
  638. display: -ms-flexbox;
  639. display: flex;
  640. -webkit-box-align: center;
  641. -ms-flex-align: center;
  642. align-items: center;
  643. text-align: left;
  644. overflow: hidden;
  645. font-size: 12px;
  646. font-family: PingFangSC-Regular, PingFang SC;
  647. font-weight: 400;
  648. color: #232323;
  649. line-height: 14px;
  650. }
  651. .nav {
  652. width: 400px;
  653. height: 20px;
  654. }
  655. .forlist{
  656. background-color: #F5F7FA;
  657. border-radius: 10px;
  658. width: 100%;
  659. padding-left: 15px;
  660. height: 35px;
  661. line-height: 35px;
  662. color: #C0C4CC;
  663. font-size: 14px;
  664. }
  665. </style>