SeekProduct.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <div class="seek-product">
  3. <el-dialog
  4. title="我要询价"
  5. :visible.sync="showObj.show">
  6. <div class="form_dialog">
  7. <ul class="list-inline">
  8. <li class="form-item">
  9. <span>品牌:</span>
  10. <p>{{productItem.brand}}</p>
  11. </li>
  12. <li class="form-item">
  13. <span>物料名称:</span>
  14. <p>{{productItem.prodName}}</p>
  15. </li>
  16. <li class="form-item">
  17. <span>型号:</span>
  18. <p>{{productItem.cmpCode}}</p>
  19. </li>
  20. <li class="form-item">
  21. <span>规格:</span>
  22. <p>{{productItem.spec}}</p>
  23. </li>
  24. <li class="form-item">
  25. <span><i>*</i>截止日期:</span>
  26. <el-date-picker
  27. :class="{'error': !validObj.deadline}"
  28. v-model="applyObj.deadline"
  29. type="date"
  30. :picker-options="pickerOptions"
  31. @change="setDeadLineValid"
  32. :editable="false"
  33. :clearable="true"
  34. size="mini">
  35. </el-date-picker>
  36. </li>
  37. <li class="form-item">
  38. <span>封装:</span>
  39. <input type="text" class="form-control" v-model="applyObj.encapsulation"/>
  40. </li>
  41. <!--<li class="form-item">-->
  42. <!--<span>单价预算:</span>-->
  43. <!--<select v-model="applyObj.currency" class="form-control" style="width:40px;">-->
  44. <!--<option value="RMB">¥</option>-->
  45. <!--<option value="USD">$</option>-->
  46. <!--</select>-->
  47. <!--<input type="number" v-model="applyObj.unitPrice" class="form-control" :class="{'error': !validObj.unitPrice}"/>-->
  48. <!--</li>-->
  49. <!--<li class="form-item">-->
  50. <!--<span>生产日期:</span>-->
  51. <!--<input type="text" class="form-control" v-model="applyObj.produceDate"/>-->
  52. <!--</li>-->
  53. <li class="form-item">
  54. <span>采购数量(PCS):</span>
  55. <input type="number" class="form-control" v-model="applyObj.amount" :class="{'error': !validObj.amount}"/>
  56. </li>
  57. </ul>
  58. </div>
  59. <span slot="footer" class="dialog-footer">
  60. <button @click="authorityInterceptor(baseUrls.userPublishSeek, goPublish)">询价提交</button>
  61. </span>
  62. </el-dialog>
  63. </div>
  64. </template>
  65. <script>
  66. import { seekProduct } from '~utils/mixin'
  67. export default {
  68. mixins: [seekProduct],
  69. props: {
  70. showObj: {
  71. type: Object,
  72. default: function () {
  73. return {show: false}
  74. }
  75. },
  76. /*
  77. * spec: '',
  78. prodName: '',
  79. brand: '',
  80. cmpCode: ''
  81. * */
  82. productItem: {
  83. type: Object,
  84. default: {}
  85. }
  86. },
  87. mounted() {
  88. console.log(this.productItem)
  89. },
  90. watch: {
  91. 'showObj.show': {
  92. handler: function (val) {
  93. if (val) {
  94. this.emptyForm()
  95. }
  96. }
  97. }
  98. }
  99. }
  100. </script>
  101. <style lang="scss">
  102. .seek-product {
  103. .el-dialog{
  104. width: 680px!important;
  105. .el-dialog__header{
  106. background: #4290f7;
  107. line-height: 40px;
  108. padding: 0 20px 0;
  109. display:block;
  110. .el-dialog__title{
  111. color:#fff;
  112. }
  113. .el-dialog__headerbtn:hover .el-dialog__close, .el-dialog__headerbtn:focus .el-dialog__close{
  114. color:#fff;
  115. }
  116. }
  117. .el-dialog__body{
  118. padding: 10px 20px;
  119. }
  120. .el-dialog__footer{
  121. text-align: center;
  122. button{
  123. display:inline-block;
  124. border:0;
  125. box-shadow: none;
  126. background: #3c7cf5;
  127. color:#fff;
  128. font-size: 14px;
  129. line-height: 30px;
  130. height:30px;
  131. padding:0 10px;
  132. border-radius:5px;
  133. }
  134. }
  135. }
  136. .form_dialog{
  137. .el-date-editor--date {
  138. width: 230px;
  139. &.error {
  140. input {
  141. border: 1px solid #f4645f !important;
  142. }
  143. }
  144. }
  145. ul{
  146. li{
  147. width:50%;
  148. font-size: 14px;
  149. color:#666;
  150. vertical-align: top;
  151. margin-bottom:15px;
  152. &.form-item {
  153. position: relative;
  154. p{
  155. margin:0;
  156. margin-left:112px;
  157. word-break: break-all;
  158. word-wrap: break-word;
  159. }
  160. span {
  161. float:left;
  162. width: 112px;
  163. text-align: right;
  164. display: inline-block;
  165. color:#3c7cf5;
  166. i {
  167. position: relative;
  168. top: 2px;
  169. right: 5px;
  170. color: #e41515;
  171. }
  172. }
  173. ul {
  174. line-height: normal;
  175. position: absolute;
  176. top: 19px;
  177. left: 79px;
  178. background: #fff;
  179. border: 1px solid #b5b5b5;
  180. z-index: 1;
  181. max-height: 120px;
  182. overflow-y: auto;
  183. overflow-x: hidden;
  184. border-radius: 3px;
  185. width: 114px;
  186. font-size: 12px;
  187. li {
  188. height: 24px;
  189. line-height: 24px;
  190. cursor: pointer;
  191. overflow: hidden;
  192. text-overflow: ellipsis;
  193. white-space: nowrap;
  194. padding: 0 5px;
  195. &:hover {
  196. background: #ddd;
  197. }
  198. }
  199. }
  200. select {
  201. width: 40px;
  202. position: absolute;
  203. height: 20px;
  204. background: url('/images/applyPurchase/select.png')no-repeat right;
  205. background-position-x: 23px;
  206. padding: 0 0 0 7px;
  207. border-radius: 0;
  208. & + input {
  209. padding-left: 45px;
  210. }
  211. }
  212. .el-input {
  213. width: 198px;
  214. }
  215. input {
  216. font-size: 14px;
  217. width: 198px;
  218. height: 20px;
  219. line-height: 20px;
  220. border-radius: 2px;
  221. padding: 0 3px;
  222. box-shadow: none;
  223. -webkit-box-shadow: none;
  224. -moz-box-shadow: none;
  225. &.error {
  226. border-color: #f4645f!important;
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. </style>