details.vue 12 KB

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