SeekProduct.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. watch: {
  88. 'showObj.show': {
  89. handler: function (val) {
  90. if (val) {
  91. this.emptyForm()
  92. }
  93. }
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss">
  99. .seek-product {
  100. .el-dialog{
  101. width: 680px!important;
  102. .el-dialog__header{
  103. background: #4290f7;
  104. line-height: 40px;
  105. padding: 0 20px 0;
  106. display:block;
  107. .el-dialog__title{
  108. color:#fff;
  109. }
  110. .el-dialog__headerbtn:hover .el-dialog__close, .el-dialog__headerbtn:focus .el-dialog__close{
  111. color:#fff;
  112. }
  113. }
  114. .el-dialog__body{
  115. padding: 10px 20px;
  116. }
  117. .el-dialog__footer{
  118. text-align: center;
  119. button{
  120. display:inline-block;
  121. border:0;
  122. box-shadow: none;
  123. background: #3c7cf5;
  124. color:#fff;
  125. font-size: 14px;
  126. line-height: 30px;
  127. height:30px;
  128. padding:0 10px;
  129. border-radius:5px;
  130. }
  131. }
  132. }
  133. .form_dialog{
  134. .el-date-editor--date {
  135. width: 230px;
  136. &.error {
  137. input {
  138. border: 1px solid #f4645f !important;
  139. }
  140. }
  141. }
  142. ul{
  143. li{
  144. width:50%;
  145. font-size: 14px;
  146. color:#666;
  147. vertical-align: top;
  148. margin-bottom:15px;
  149. &.form-item {
  150. position: relative;
  151. p{
  152. margin:0;
  153. margin-left:112px;
  154. word-break: break-all;
  155. word-wrap: break-word;
  156. }
  157. span {
  158. float:left;
  159. width: 112px;
  160. text-align: right;
  161. display: inline-block;
  162. color:#3c7cf5;
  163. i {
  164. position: relative;
  165. top: 2px;
  166. right: 5px;
  167. color: #e41515;
  168. }
  169. }
  170. ul {
  171. line-height: normal;
  172. position: absolute;
  173. top: 19px;
  174. left: 79px;
  175. background: #fff;
  176. border: 1px solid #b5b5b5;
  177. z-index: 1;
  178. max-height: 120px;
  179. overflow-y: auto;
  180. overflow-x: hidden;
  181. border-radius: 3px;
  182. width: 114px;
  183. font-size: 12px;
  184. li {
  185. height: 24px;
  186. line-height: 24px;
  187. cursor: pointer;
  188. overflow: hidden;
  189. text-overflow: ellipsis;
  190. white-space: nowrap;
  191. padding: 0 5px;
  192. &:hover {
  193. background: #ddd;
  194. }
  195. }
  196. }
  197. select {
  198. width: 40px;
  199. position: absolute;
  200. height: 20px;
  201. background: url('/images/applyPurchase/select.png')no-repeat right;
  202. background-position-x: 23px;
  203. padding: 0 0 0 7px;
  204. border-radius: 0;
  205. & + input {
  206. padding-left: 45px;
  207. }
  208. }
  209. .el-input {
  210. width: 198px;
  211. }
  212. input {
  213. font-size: 14px;
  214. width: 198px;
  215. height: 20px;
  216. line-height: 20px;
  217. border-radius: 2px;
  218. padding: 0 3px;
  219. box-shadow: none;
  220. -webkit-box-shadow: none;
  221. -moz-box-shadow: none;
  222. &.error {
  223. border-color: #f4645f!important;
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. }
  231. </style>