seek_btob_details.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <template>
  2. <div class="orderbtob_details_wrapper">
  3. <div class="mobile-header">
  4. <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
  5. <p v-if="active === 'done'">已报价</p>
  6. <p v-if="active === 'end'">已失效</p>
  7. <p v-if="active === 'agreed'">已采纳</p>
  8. <p v-if="active === 'todo'">待报价</p>
  9. </div>
  10. <div class="orderbtob_details_content">
  11. <div class="orderbtob_details_top">
  12. <div class="item">
  13. <span class="name">供应商:</span>
  14. {{listInfo.enterprise && listInfo.enterprise.enName}}
  15. </div>
  16. <div class="item clearfix">
  17. <span class="name fl">收货地址:</span>
  18. <span class="fl" style="width: 5.2rem">{{listInfo.inquiry.enterprise && listInfo.inquiry.enterprise.enAddress}}</span>
  19. </div>
  20. <div class="item">
  21. <span class="name">单据:</span>
  22. {{listInfo.inquiry.code}}
  23. </div>
  24. <div class="item clearfix">
  25. <span class="name fl">物料:</span>
  26. <span class="fl" style="width: 5.2rem">
  27. <p>{{listInfo.product.code}}</p>
  28. <p style="margin:5px 0">{{listInfo.product.title}}</p>
  29. <p>{{listInfo.product.spec}}</p>
  30. </span>
  31. </div>
  32. <div class="item">
  33. <span class="name">币别:</span>
  34. {{listInfo.currency}}
  35. </div>
  36. <div class="item">
  37. <span class="name">税率:</span>
  38. {{listInfo.taxrate + '%' || '无'}}
  39. </div>
  40. <div class="item">
  41. <span class="name">询价类型:</span>
  42. {{listInfo.inquiry.inquirytype || '无'}}
  43. </div>
  44. </div>
  45. <div class="orderbtob_details_middle">
  46. <div class="list">
  47. <div class="item clearfix">
  48. <span class="name">交货周期:</span>
  49. <span>{{listInfo.leadtime || '-'}}天</span>
  50. </div>
  51. <div class="item clearfix">
  52. <span class="name">最小起订:</span>
  53. <span>{{listInfo.minOrderQty || '-'}}PCS</span>
  54. </div>
  55. <div class="item clearfix">
  56. <span class="name">最小包装:</span>
  57. <span>{{listInfo.minPackQty || '-'}}PCS</span>
  58. </div>
  59. <div class="item clearfix" style="position: relative" v-if="listInfo.replies && listInfo.replies.length > 0">
  60. <span class="fl name">分段报价:</span>
  61. <ul class="fl table">
  62. <li class="li_title clearfix">
  63. <div class="fl fisrt">段数</div>
  64. <div class="fl">分段数量</div>
  65. <div class="fl" >分段单价</div>
  66. </li>
  67. <li class="li_content clearfix" v-for="(item, index) in listInfo.replies">
  68. <div class="fl fisrt">{{index + 1}}</div>
  69. <div class="fl" v-if="index === 0">
  70. <input type="number" value="0" disabled readonly />
  71. </div>
  72. <div class="fl" v-if="index !== 0">
  73. <input type="number" v-model="item.lapQty" />
  74. </div>
  75. <div class="fl" >
  76. <input type="number" v-model="item.price" readonly/>
  77. </div>
  78. </li>
  79. </ul>
  80. <div style="clear:both"></div>
  81. </div>
  82. </div>
  83. <div class="list-status">
  84. <div v-if="listInfo.status === 200 && listInfo.agreed !== 1 && listInfo.invalid !== 1 && listInfo.check === 0">
  85. <span class="text-trans success">待报价</span>
  86. </div>
  87. <div v-if="listInfo.status === 201 && listInfo.invalid === 0 && listInfo.overdue === 0">
  88. <span class="text-trans error">已报价</span>
  89. </div>
  90. <div v-if="listInfo.invalid === 1 || listInfo.status === 314 || listInfo.check === 1 || listInfo.overdue === 1">
  91. <span class="text-trans half">已失效</span>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. export default {
  100. name: 'user_seek_btob_details',
  101. layout: 'mobileActivity',
  102. middleware: 'authenticated',
  103. data() {
  104. return {
  105. active: this.$route.query.active,
  106. listInfo: {
  107. inquiry: { },
  108. replies: [{
  109. lapQty: 0,
  110. price: ''
  111. }],
  112. product: {}
  113. }
  114. }
  115. },
  116. created() {
  117. this.getInitInfo()
  118. },
  119. methods: {
  120. getInitInfo() {
  121. this.$http.get(`/sale/inquiry/${this.$route.query.id}/info/mobile`).then(res => {
  122. if (res.data.replies.length === 0 || !res.data.replies[0].price) {
  123. res.data.replies[0] = res.data.replies[0] || {}
  124. res.data.replies[0].price = ''
  125. }
  126. this.listInfo = res.data
  127. })
  128. }
  129. },
  130. filters: {
  131. time: function(time) {
  132. if (typeof time === 'number') {
  133. if (!time) {
  134. return '无'
  135. } else {
  136. let d = new Date(time)
  137. let year = d.getFullYear()
  138. let month = d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : '' + (d.getMonth() + 1)
  139. let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
  140. return year + '-' + month + '-' + day
  141. }
  142. }
  143. }
  144. }
  145. }
  146. </script>
  147. <style scoped lang="scss">
  148. .orderbtob_details_wrapper {
  149. background: #f5f5f5;
  150. position: absolute;
  151. height: 100%;
  152. width: 100%;
  153. overflow-y: scroll;
  154. .mobile-header{
  155. position: fixed;
  156. top: 0;
  157. z-index: 10;
  158. width:100%;
  159. height:.88rem;
  160. line-height: .88rem;
  161. /*border-bottom:.01rem solid #ccc;*/
  162. background: #3e82f5;
  163. padding:0 .2rem 0 .1rem;
  164. color:#fff;
  165. }
  166. .mobile-header p{
  167. overflow: hidden;
  168. text-overflow: ellipsis;
  169. white-space: nowrap;
  170. font-size:.36rem;
  171. text-align: center;
  172. margin: 0;
  173. width: 6rem;
  174. padding-left: 1rem;
  175. }
  176. .mobile-header a{
  177. font-size:.28rem;
  178. color:#fff;
  179. position: absolute;
  180. }
  181. .mobile-header a i{
  182. font-size: .48rem;
  183. margin-right: -.1rem;
  184. }
  185. .orderbtob_details_content {
  186. margin-top: 0.9rem;
  187. padding: 0.2rem;
  188. .orderbtob_details_top {
  189. background: #3f84f6;
  190. border-radius: 0.07rem;
  191. border: solid 0.01rem #e3e5e8;
  192. padding: 0.24rem 0.2rem 0.14rem;
  193. .item {
  194. color: #fff;
  195. font-size: 0.28rem;
  196. margin-bottom: 0.1rem;
  197. }
  198. }
  199. .orderbtob_details_middle {
  200. margin-top: 0.2rem;
  201. position: relative;
  202. .list {
  203. border: solid 1px #e3e5e8;
  204. border-radius: 0.07rem;
  205. overflow: hidden;
  206. color: #333;
  207. font-size: 0.28rem;
  208. padding: 0.24rem 0.2rem;
  209. margin-bottom: 0.2rem;
  210. background: #fff;
  211. .item {
  212. margin-bottom: 0.1rem;
  213. line-height: 0.5rem;
  214. }
  215. .ovrflow {
  216. width: 5.2rem;
  217. line-height: 0.5rem
  218. }
  219. .name {
  220. color: #666;
  221. width: 1.6rem;
  222. display: inline-block;
  223. }
  224. .dateinput {
  225. width: 3.49rem;
  226. height: .5rem;
  227. line-height: .5rem;
  228. border: 1px solid #aeaeae;
  229. font-size: .26rem;
  230. vertical-align: middle;
  231. background: #fff;
  232. border-radius: 0;
  233. margin-right: 0.05rem;
  234. }
  235. }
  236. .replayBtn {
  237. width: 6.59rem;
  238. height: 0.77rem;
  239. background-color: #3f84f6;
  240. border-radius: 0.08rem;
  241. font-size: 0.28rem;
  242. line-height: 0.77rem;
  243. color: #ffffff;
  244. overflow: hidden;
  245. text-align: center;
  246. margin-top: 0.2rem
  247. }
  248. .table {
  249. width: 4.52rem;
  250. background-color: #f3f3f3;
  251. color: #333333;
  252. font-size: 0.28rem;
  253. .li_title {
  254. border: 1px solid #c5c5c5;
  255. div {
  256. width: 1.87rem;
  257. text-align: center;
  258. border-right: 1px solid #c5c5c5;
  259. &:last-child {
  260. border-right: 0
  261. }
  262. }
  263. .fisrt {
  264. width: 0.74rem;
  265. }
  266. }
  267. .li_content {
  268. border: 1px solid #c5c5c5;
  269. background: #fff;
  270. border-top: 0px;
  271. div {
  272. width: 1.87rem;
  273. text-align: center;
  274. border-right: 1px solid #c5c5c5;
  275. &:last-child {
  276. border-right: 0
  277. }
  278. input {
  279. text-align: center;
  280. width: 100%;
  281. height: 0.49rem;
  282. border: 0;
  283. }
  284. }
  285. .fisrt {
  286. width: 0.74rem;
  287. }
  288. }
  289. }
  290. .list-status {
  291. position: absolute;
  292. right: 0.2rem;
  293. top: 0.2rem
  294. }
  295. }
  296. .bottom {
  297. font-size: 0.2rem;
  298. color: #999;
  299. border-top: 1px solid #aeaeae;
  300. padding-top: 0.1rem;
  301. }
  302. .noborder{
  303. border: 0
  304. }
  305. }
  306. .icon-add {
  307. color: #00d300;
  308. font-size: 0.4rem
  309. }
  310. .icon-minus {
  311. color: #cacaca;
  312. font-size: 0.4rem;
  313. display: block;
  314. }
  315. .posixicon {
  316. position: absolute;
  317. right: 0.3rem;
  318. width: 0.4rem;
  319. top: 0;
  320. }
  321. }
  322. </style>