details.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <div class="details_info">
  3. <div class="container">
  4. <div class="crumbs">
  5. <div class="container">
  6. <div class="menu-com row">
  7. <div class="menu-title col-md-12">
  8. <a href="/">首页 ></a>
  9. <a href="/supplier">供应商资源 ></a>
  10. <span>供应商物料</span>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. <div class="top">
  16. <div class="img">
  17. <img src="/images/store/common/default.png">
  18. </div>
  19. <div class="right">
  20. <h4 v-text="detail.cmpCode">32222222222222222222</h4>
  21. <ul class="list-unstyled">
  22. <li class="item">
  23. <span>类目(名称)</span>
  24. <p v-text="detail.prodName? spliceString(detail.prodName, 400) : '暂无信息'">3errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr2</p>
  25. </li>
  26. <li class="item">
  27. <span>品牌</span>
  28. <p v-text="detail.brand ? detail.brand : '暂无信息'">32</p>
  29. </li>
  30. <li class="item">
  31. <span>单位</span>
  32. <p v-text="detail.unit ? detail.unit : '暂无信息'">32</p>
  33. </li>
  34. <li class="item">
  35. <span>规格</span>
  36. <p v-text="detail.spec ? detail.spec : '暂无信息'">32</p>
  37. </li>
  38. <li class="item">
  39. <span>种类</span>
  40. <p>32</p>
  41. </li>
  42. </ul>
  43. <a @click="hasDialog = true">立即询价</a>
  44. </div>
  45. </div>
  46. <div class="info">
  47. <table>
  48. <thead>
  49. <tr>
  50. <th colspan="4">
  51. <p>产品参数 <span>(仅供参考,以实际产品为准)</span></p>
  52. </th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <tr>
  57. <td width="297">工作温度范围: </td>
  58. <td width="297"></td>
  59. <td width="297">最大输入电压:</td>
  60. <td width="297"></td>
  61. </tr>
  62. <tr>
  63. <td>输出电压-Vout: </td>
  64. <td></td>
  65. <td>负载调节:</td>
  66. <td></td>
  67. </tr>
  68. <tr>
  69. <td>输出类型: </td>
  70. <td></td>
  71. <td>安装方式:</td>
  72. <td></td>
  73. </tr>
  74. <tr>
  75. <td>工作温度范围: </td>
  76. <td></td>
  77. <td>最大输入电压:</td>
  78. <td></td>
  79. </tr>
  80. <tr>
  81. <td>输出电压-Vout: </td>
  82. <td></td>
  83. <td>负载调节:</td>
  84. <td></td>
  85. </tr>
  86. <tr>
  87. <td>输出类型: </td>
  88. <td></td>
  89. <td>安装方式:</td>
  90. <td></td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. </div>
  95. </div>
  96. <el-dialog
  97. title="我要询价"
  98. :visible.sync="hasDialog ">
  99. <div class="form_dialog">
  100. <ul class="list-inline">
  101. <li class="form-item">
  102. <span>型号:</span>
  103. <p>32432</p>
  104. </li>
  105. <li class="form-item">
  106. <span>类目:</span>
  107. <p>3244333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333332</p>
  108. </li>
  109. <li class="form-item">
  110. <span>品牌:</span>
  111. <p>32432</p>
  112. </li>
  113. <li class="form-item">
  114. <span>规格:</span>
  115. <p>32432</p>
  116. </li>
  117. <li class="form-item">
  118. <span><i>*</i>截止日期:</span>
  119. <el-date-picker
  120. v-model="form.name"
  121. type="date"
  122. :picker-options="pickerOptions"
  123. @change="setDeadLineValid"
  124. :editable="false"
  125. :clearable="true"
  126. size="mini">
  127. </el-date-picker>
  128. </li>
  129. <li class="form-item">
  130. <span>封装:</span>
  131. <input type="text" class="form-control" v-model="form.date1"/>
  132. </li>
  133. <li class="form-item">
  134. <span>单价预算:</span>
  135. <select v-model="form.date1" class="form-control" style="width:40px;">
  136. <option value="RMB">¥</option>
  137. <option value="USD">$</option>
  138. </select>
  139. <input type="number" class="form-control"/>
  140. </li>
  141. <li class="form-item">
  142. <span>生产日期:</span>
  143. <el-date-picker
  144. v-model="form.date2"
  145. type="date"
  146. :picker-options="pickerOptions"
  147. @change="setDeadProduction"
  148. :editable="false"
  149. :clearable="true"
  150. size="mini">
  151. </el-date-picker>
  152. </li>
  153. <li class="form-item">
  154. <span>采购数量:</span>
  155. <input type="number" class="form-control"/>
  156. </li>
  157. </ul>
  158. </div>
  159. <span slot="footer" class="dialog-footer">
  160. <a type="button" @click="hasDialog=false">询价提交</a>
  161. </span>
  162. </el-dialog>
  163. </div>
  164. </template>
  165. <script>
  166. import {spliceStr, formatDate} from '~utils/baseUtils.js'
  167. export default {
  168. name: 'DetailsView',
  169. data () {
  170. return {
  171. pickerOptions: {
  172. disabledDate (time) {
  173. // 大于等于今天 小于三个月后
  174. return time.getTime() < Date.now() - 1000 * 60 * 60 * 24 || time.getTime() > Date.now() + 1000 * 60 * 60 * 24 * 30 * 3
  175. }
  176. },
  177. hasDialog: false,
  178. form: {
  179. name: '',
  180. region: '',
  181. date1: '',
  182. date2: '',
  183. delivery: false,
  184. type: [],
  185. resource: '',
  186. desc: ''
  187. },
  188. dialogVisible: false,
  189. searchCode: '',
  190. test: '322222222222222222222222222222222222222222222222222222'
  191. }
  192. },
  193. computed: {
  194. detail () {
  195. console.log(this.$store.state.supplier.detail.detail.data)
  196. return this.$store.state.supplier.detail.detail.data
  197. }
  198. },
  199. methods: {
  200. setDeadProduction () {
  201. this.form.name = formatDate(this.form.name, 'yyyy-MM-dd hh:mm:ss')
  202. },
  203. setDeadLineValid: function () {
  204. this.form.date2 = formatDate(this.form.date2, 'yyyy-MM-dd hh:mm:ss')
  205. // this.validObj.deadline = true
  206. },
  207. onSubmit () {
  208. console.log('submit!')
  209. },
  210. spliceString (str, length) {
  211. return spliceStr(str, length)
  212. }
  213. }
  214. }
  215. </script>
  216. <style type="text/scss" lang="scss">
  217. .details_info{
  218. background: #fff;
  219. .el-dialog{
  220. width: 680px!important;
  221. .el-dialog__header{
  222. background: #4290f7;
  223. line-height: 40px;
  224. padding: 0 20px 0;
  225. .el-dialog__title{
  226. color:#fff;
  227. }
  228. .el-dialog__headerbtn:hover .el-dialog__close, .el-dialog__headerbtn:focus .el-dialog__close{
  229. color:#fff;
  230. }
  231. }
  232. .el-dialog__body{
  233. padding: 10px 20px;
  234. }
  235. .el-dialog__footer{
  236. text-align: center;
  237. a{
  238. display:inline-block;
  239. background: #3c7cf5;
  240. color:#fff;
  241. font-size: 14px;
  242. line-height: 30px;
  243. height:30px;
  244. padding:0 10px;
  245. border-radius:5px;
  246. }
  247. }
  248. }
  249. .form_dialog{
  250. ul{
  251. li{
  252. width:50%;
  253. font-size: 14px;
  254. color:#666;
  255. vertical-align: top;
  256. margin-bottom:15px;
  257. &.form-item {
  258. position: relative;
  259. p{
  260. margin:0;
  261. margin-left:80px;
  262. word-break: break-all;
  263. word-wrap: break-word;
  264. }
  265. span {
  266. float:left;
  267. width: 80px;
  268. text-align: right;
  269. display: inline-block;
  270. color:#3c7cf5;
  271. i {
  272. position: relative;
  273. top: 2px;
  274. right: 5px;
  275. color: #e41515;
  276. }
  277. }
  278. ul {
  279. line-height: normal;
  280. position: absolute;
  281. top: 19px;
  282. left: 79px;
  283. background: #fff;
  284. border: 1px solid #b5b5b5;
  285. z-index: 1;
  286. max-height: 120px;
  287. overflow-y: auto;
  288. overflow-x: hidden;
  289. border-radius: 3px;
  290. width: 114px;
  291. font-size: 12px;
  292. li {
  293. height: 24px;
  294. line-height: 24px;
  295. cursor: pointer;
  296. overflow: hidden;
  297. text-overflow: ellipsis;
  298. white-space: nowrap;
  299. padding: 0 5px;
  300. &:hover {
  301. background: #ddd;
  302. }
  303. }
  304. }
  305. select {
  306. width: 40px;
  307. position: absolute;
  308. height: 20px;
  309. background: url('/images/applyPurchase/select.png')no-repeat right;
  310. background-position-x: 23px;
  311. padding: 0 0 0 7px;
  312. border-radius: 0;
  313. & + input {
  314. padding-left: 45px;
  315. }
  316. }
  317. .el-input {
  318. width: 230px;
  319. }
  320. input {
  321. font-size: 14px;
  322. width: 230px;
  323. height: 20px;
  324. line-height: 20px;
  325. border-radius: 2px;
  326. padding: 0 3px;
  327. box-shadow: none;
  328. -webkit-box-shadow: none;
  329. -moz-box-shadow: none;
  330. &.error {
  331. border-color: #f4645f!important;
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. .crumbs{
  339. background: #fff;
  340. .menu-com{
  341. margin: 0;
  342. .menu-title{
  343. line-height: 40px;
  344. font-size: 14px;
  345. padding-left: 0;
  346. margin:0;
  347. a{
  348. color: #5078cb;
  349. font-size: 14px;
  350. }
  351. }
  352. }
  353. }
  354. .top{
  355. margin-bottom:20px;
  356. .img{
  357. float:left;
  358. width:350px;
  359. height:350px;
  360. vertical-align: top;
  361. padding:36px;
  362. border:1px solid #bababa;
  363. img{
  364. width:100%;
  365. height:100%;
  366. }
  367. }
  368. .right{
  369. position:relative;
  370. height:350px;
  371. margin-left:370px;
  372. h4{
  373. width:800px;
  374. font-size: 25px;
  375. line-height: 25px;
  376. font-weight: bold;
  377. overflow: hidden;
  378. text-overflow: ellipsis;
  379. white-space:nowrap;
  380. border-bottom:1px solid #3c7cf5;
  381. margin:0;
  382. padding-bottom:20px;
  383. }
  384. a{
  385. display:inline-block;
  386. position:absolute;
  387. bottom:0;
  388. left: 0;
  389. background: #3c7cf5;
  390. color:#fff;
  391. font-size: 14px;
  392. line-height: 30px;
  393. height:30px;
  394. padding:0 10px;
  395. border-radius:5px;
  396. }
  397. ul{
  398. padding-top:35px;
  399. li{
  400. margin-bottom:25px;
  401. span{
  402. display:inline-block;
  403. width:70px;
  404. float:left;
  405. color:#3c7cf5;
  406. vertical-align: top;
  407. text-align: right;
  408. }
  409. p{
  410. width:365px;
  411. font-size: 14px;
  412. color:#333;
  413. margin:0;
  414. margin-left:90px;
  415. word-wrap: break-word;
  416. word-break: normal;
  417. }
  418. }
  419. }
  420. }
  421. }
  422. .info{
  423. padding-bottom:90px;
  424. table{
  425. thead{
  426. tr{
  427. line-height: 34px;
  428. th{
  429. font-weight: bold;
  430. color:#fff;
  431. background: #3c7cf5;
  432. padding-left:15px;
  433. p{
  434. font-size: 16px;
  435. margin:0;
  436. span{
  437. font-size: 12px;
  438. }
  439. }
  440. }
  441. }
  442. }
  443. tbody{
  444. tr{
  445. line-height: 34px;
  446. &:nth-child(odd){
  447. background: #fff;
  448. }
  449. &:nth-child(even){
  450. background: #f5f6f8;
  451. }
  452. td{
  453. text-align: center;
  454. }
  455. }
  456. }
  457. }
  458. }
  459. }
  460. </style>