ApplyInfo.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065
  1. <template>
  2. <div class="apply-info">
  3. <div class="apply-info-title">
  4. <p>最新求购信息</p>
  5. <span>海量求购,一网打尽</span>
  6. <div>
  7. <input type="text" class="form-control" v-model="keyWord" @keyup.13="searchList" placeholder="型号/品牌" />
  8. <span @click="searchList">查询</span>
  9. </div>
  10. </div>
  11. <div class="apply-info-list">
  12. <p>
  13. <span>发布时间
  14. <a href="javascript:void(0)" @click="sortListByParam('releaseDate')">
  15. <i class=" fa fa-long-arrow-up" :class="{active: sorting.releaseDate == 'ASC'}"></i>
  16. <i class=" fa fa-long-arrow-down" :class="{active: sorting.releaseDate == 'DESC'}"></i>
  17. </a>
  18. </span>
  19. <span>买家</span>
  20. <span>型号</span>
  21. <span>品牌</span>
  22. <span>截止时间
  23. <a href="javascript:void(0)" @click="sortListByParam('deadline')">
  24. <i class=" fa fa-long-arrow-up" :class="{active: sorting.deadline == 'ASC'}"></i>
  25. <i class=" fa fa-long-arrow-down" :class="{active: sorting.deadline == 'DESC'}"></i>
  26. </a>
  27. </span>
  28. <span>已报价
  29. <a href="javascript:void(0)" @click="sortListByParam('offerAmount')">
  30. <i class=" fa fa-long-arrow-up" :class="{active: sorting.offerAmount == 'ASC'}"></i>
  31. <i class=" fa fa-long-arrow-down" :class="{active: sorting.offerAmount == 'DESC'}"></i>
  32. </a>
  33. </span>
  34. <span>操作</span>
  35. </p>
  36. <ul>
  37. <li v-for="(purchaseMan, index) in purchaseManList.content" :class="{'active': purchaseMan.active}">
  38. <div>{{purchaseMan.date| date}}</div>
  39. <div :title="purchaseMan.userName || purchaseMan.inquiry.enterprise.enName || '-'">{{purchaseMan.userName || purchaseMan.inquiry.enterprise.enName || '-'}}</div>
  40. <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode || '-'}}</div>
  41. <div :title="purchaseMan.inbrand">{{purchaseMan.inbrand || '-'}}</div>
  42. <div class="date-content"><span>剩余&nbsp;</span><span v-if="getDay(purchaseMan.remainingTime) > 0" v-text="getDay(purchaseMan.remainingTime)"></span><i v-if="getDay(purchaseMan.remainingTime) > 0">&nbsp;天&nbsp;</i><span v-if="getDay(purchaseMan.remainingTime) <= 0" v-text="getHours(purchaseMan.remainingTime)"></span><i v-if="getDay(purchaseMan.remainingTime) <= 0" >&nbsp;小时</i></div>
  43. <div class="number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10"><span :style="purchaseMan.offerAmount > 10 ? 'color: #ff9a00': ''">{{purchaseMan.offerAmount || 0}}</span>&nbsp;条</div>
  44. <div class="btn-content">
  45. <a>联系买家</a>
  46. <a v-if="!purchaseMan.quoted || purchaseMan.quoted != 1" @click="sayPrice(purchaseMan, index)">我要报价</a>
  47. <div class="is-say-price" v-else>已报价 <img src="/images/applyPurchase/green-check.png" alt="">
  48. <div class="say-price-history">
  49. <p class="price-title">历史报价</p>
  50. <div>
  51. <div>
  52. <span>交期:</span><span class="red-text">6 天</span>
  53. </div>
  54. <div>
  55. <span>附件:</span><a href="">下载</a>
  56. </div>
  57. <div class="pre-line">
  58. <span>规格:</span>2016-05-21
  59. </div>
  60. <p class="price-level">价格梯度</p>
  61. <ul>
  62. <li>
  63. <span>1333+</span>
  64. <span>$123123</span>
  65. </li>
  66. <li>
  67. <span>1333+</span>
  68. <span>$123123</span>
  69. </li>
  70. <li>
  71. <span>1333+</span>
  72. <span>$123123</span>
  73. </li>
  74. </ul>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="expand-content">
  80. <div>
  81. 封装:{{purchaseMan.encapsulation || '-'}}
  82. </div>
  83. <div>
  84. 采购数量:<span>{{purchaseMan.amount || '-'}}</span><span v-if="purchaseMan.amount">个</span>
  85. </div>
  86. <div>
  87. 单价预算:<span>{{purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'}}</span>
  88. </div>
  89. <div>
  90. 规格:{{purchaseMan.produceDate || '-'}}
  91. </div>
  92. </div>
  93. <!--<div class="say-price">
  94. <div>报价</div>
  95. <div>
  96. <i>*</i>单价
  97. <select v-if="!purchaseMan.currency" v-model="sayPriceObj.currency">
  98. <option value="RMB">¥</option>
  99. <option value="USD">$</option>
  100. </select>
  101. <div v-if="purchaseMan.currency" v-text="purchaseMan.currency == 'RMB' ? '¥' : '$'"></div>
  102. <input type="number" v-model="sayPriceObj.unitPrice" class="form-control" @blur="onUnitPriceBlur" @input="onUnitPriceChange">
  103. </div>
  104. <div>
  105. <i>*</i>交期&nbsp;
  106. <input type="number" v-model="sayPriceObj.minDay" @blur="onMinDayInput" @input="onMinDayChange" class="form-control">&nbsp;-&nbsp;<input type="number" v-model="sayPriceObj.maxDay" @blur="onMaxDayInput" @input="onMaxDayChange" class="form-control">&nbsp;天
  107. </div>
  108. <div>
  109. 生产日期&nbsp;<input v-model="sayPriceObj.produceDate" @input="onProduceDateChange" type="text" class="form-control">
  110. </div>
  111. <div>
  112. <span @click="cancelSayPrice(purchaseMan)">取消</span>
  113. <span @click="commitSayPrice(purchaseMan)">提交</span>
  114. </div>
  115. </div>-->
  116. </li>
  117. </ul>
  118. </div>
  119. <div class="modal-wrap" v-if="currentSayPriceIndex > -1">
  120. <div class="say-price-box" >
  121. <div class="title">
  122. <div>型号:<span :title="purchaseManList.content[currentSayPriceIndex].cmpCode">{{purchaseManList.content[currentSayPriceIndex].cmpCode}}</span></div>
  123. <div>品牌:<span :title="purchaseManList.content[currentSayPriceIndex].inbrand">{{purchaseManList.content[currentSayPriceIndex].inbrand}}</span></div>
  124. <i class="fa fa-close" @click="cancelSayPrice"></i>
  125. </div>
  126. <div class="content">
  127. <div class="content-line">
  128. <div class="form-item form-left">
  129. <span><i>*</i>交期:</span>
  130. <input type="number" class="form-control" placeholder="天数" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
  131. <!-- -
  132. <input type="text" class="form-control" placeholder="天数">-->
  133. </div>
  134. <div class="form-item form-upload">
  135. <label>
  136. <span><i>+</i>添加附件</span>
  137. <input type="file">
  138. </label>
  139. <!--<div>
  140. <span>我是Excel的名字111</span>
  141. <i class="fa fa-times-circle"></i>
  142. <a href="">更换</a>
  143. </div>-->
  144. </div>
  145. </div>
  146. <div class="content-line" v-for="(reply, index) in sayPriceObj.replies">
  147. <div class="form-item form-left">
  148. <span><i>*</i>价格梯度:</span>
  149. <input type="number" class="form-control" @bulr="onReplyLapQtyBlur(index)" v-model="reply.lapQty" placeholder="数量">
  150. <!-- -
  151. <input type="text" class="form-control" placeholder="数量">-->
  152. </div>
  153. <div class="form-item form-right">
  154. <span><i>*</i>单价({{purchaseManList.content[currentSayPriceIndex].currency == 'USD' ? '$' : '¥'}}):</span>
  155. <input type="number" class="form-control" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" placeholder="单价" v-model="reply.price">
  156. <i class="fa fa-minus-circle" v-if="sayPriceObj.replies.length > 1" @click="setReplies('sub', index)"></i>
  157. <i class="fa fa-plus-circle" v-if="sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="operate">
  162. <span @click="commitSayPrice">确定</span>
  163. <span @click="cancelSayPrice">取消</span>
  164. </div>
  165. </div>
  166. </div>
  167. <page :total="totalCount" :page-size="pageSize"
  168. :current="nowPage" v-on:childEvent="listenPage"></page>
  169. <loading v-show="showLoading"></loading>
  170. </div>
  171. </template>
  172. <script>
  173. // let getRealLen = function (str) {
  174. // let len = 0
  175. // for (let i = 0; i < str.length; i++) {
  176. // if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
  177. // len += 2
  178. // } else {
  179. // len++
  180. // }
  181. // }
  182. // return len
  183. // }
  184. // let cutOutString = function (str, length) {
  185. // for (let i = 1; i <= str.length; i++) {
  186. // if (getRealLen(str.substr(0, i)) > length) {
  187. // str = str.substr(0, i - 1)
  188. // break
  189. // }
  190. // }
  191. // return str
  192. // }
  193. import Page from '~components/common/page/pageComponent.vue'
  194. import Loading from '~components/common/loading/PageLoading.vue'
  195. export default {
  196. data () {
  197. return {
  198. pageSize: 10,
  199. nowPage: 1,
  200. sayPriceObj: {
  201. currency: 'RMB',
  202. leadtime: '',
  203. replies: [
  204. {
  205. lapQty: '',
  206. price: ''
  207. }
  208. ]
  209. },
  210. validSayPrice: {
  211. leadtime: false,
  212. repliesPrice: false,
  213. repliesLapQty: false
  214. },
  215. keyWord: '',
  216. sorting: {},
  217. showLoading: false,
  218. currentSayPriceIndex: -1
  219. }
  220. },
  221. components: {
  222. Page,
  223. Loading
  224. },
  225. filters: {
  226. date: function (date) {
  227. const d = new Date(Number(date))
  228. const year = d.getFullYear()
  229. const monthTemp = d.getMonth() + 1
  230. const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
  231. const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
  232. const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
  233. const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
  234. return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
  235. },
  236. phone: function (str) {
  237. return str.substring(0, 3) + '****' + str.substring(7, 11)
  238. }
  239. },
  240. computed: {
  241. purchaseManList () {
  242. return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
  243. },
  244. totalCount () {
  245. return this.purchaseManList.totalElements
  246. },
  247. user () {
  248. return this.$store.state.option.user
  249. }
  250. },
  251. methods: {
  252. getDay: function (timeStamp) {
  253. return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
  254. },
  255. getHours: function (timeStamp) {
  256. return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
  257. },
  258. // getPurchaseManName: function (purchaseMan) {
  259. // return purchaseMan.enUu ? purchaseMan.userName : purchaseMan.userName.charAt(0) + '**'
  260. // },
  261. listenPage: function (page) {
  262. this.nowPage = page
  263. this.resetList()
  264. },
  265. sayPrice: function (purchaseMan, index) {
  266. let _this = this
  267. for (let i = 0; i < this.purchaseManList.content.length; i++) {
  268. _this.purchaseManList.content[i].active = false
  269. }
  270. this.resetSayPrice()
  271. purchaseMan.active = true
  272. this.currentSayPriceIndex = index
  273. },
  274. cancelSayPrice: function () {
  275. this.purchaseManList.content[this.currentSayPriceIndex].active = false
  276. this.currentSayPriceIndex = -1
  277. },
  278. commitSayPrice: function () {
  279. if (this.user.logged) {
  280. if (this.user.data.enterprise.uu) {
  281. let purchaseMan = this.purchaseManList.content[this.currentSayPriceIndex]
  282. this.showLoading = true
  283. purchaseMan.leadtime = this.sayPriceObj.leadtime
  284. purchaseMan.replies = this.sayPriceObj.replies
  285. purchaseMan.vendUU = this.user.data.enterprise.uu
  286. purchaseMan.vendorUserUU = this.user.data.userUU
  287. this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
  288. this.showLoading = false
  289. if (response.data.success === false) {
  290. this.$message.error(response.data.message)
  291. } else {
  292. this.$message.success('报价成功')
  293. this.resetSayPrice()
  294. this.resetList()
  295. }
  296. }, error => {
  297. console.log(error)
  298. this.$message.error('系统错误')
  299. this.showLoading = false
  300. })
  301. } else {
  302. this.$message.error('个人账户不可报价')
  303. }
  304. // if (this.checkAllSayPrice()) {
  305. // } else {
  306. // if (!this.validSayPrice.unitPrice) {
  307. // if (!this.sayPriceObj.unitPrice) {
  308. // this.$message.error('单价不能为空')
  309. // } else {
  310. // this.$message.error('单价必须是大于0的数字')
  311. // }
  312. // } else if (!this.validSayPrice.minDay || !this.validSayPrice.maxDay) {
  313. // if ((!this.sayPriceObj.minDay && this.sayPriceObj.minDay !== 0) || (!this.sayPriceObj.maxDay && this.sayPriceObj.maxDay !== 0)) {
  314. // this.$message.error('交期不能为空')
  315. // } else {
  316. // if (this.sayPriceObj.minDay > 31 || this.sayPriceObj.minDay < 1 || this.sayPriceObj.minDay.toString().indexOf('.') !== -1 || this.sayPriceObj.maxDay > 31 || this.sayPriceObj.maxDay < 1 || this.sayPriceObj.maxDay.toString().indexOf('.') !== -1) {
  317. // this.$message.error('交期只能填写1-31之间的整数值')
  318. // } else {
  319. // this.$message.error('最短交期应小于等于最长交期')
  320. // }
  321. // }
  322. // }
  323. // }
  324. } else {
  325. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  326. }
  327. },
  328. resetList: function () {
  329. this.currentSayPriceIndex = -1
  330. this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.nowPage, pageSize: this.pageSize, keyWord: this.keyWord, sorting: !this.sorting || JSON.stringify(this.sorting) === '{}' ? {releaseDate: 'DESC'} : this.sorting})
  331. },
  332. resetSayPrice: function () {
  333. this.sayPriceObj = {
  334. currency: 'RMB',
  335. leadtime: '',
  336. replies: [
  337. {
  338. lapQty: '',
  339. price: ''
  340. }
  341. ]
  342. }
  343. },
  344. onLeadtimeInput: function () {
  345. if (this.sayPriceObj.leadtime.length > 2) {
  346. this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 2)
  347. }
  348. },
  349. onLeadtimeBlur: function () {
  350. if (!this.sayPriceObj.leadtime || this.sayPriceObj.leadtime < 1 || this.sayPriceObj.leadtime > 31 || this.sayPriceObj.leadtime.toString().indexOf('.') !== -1) {
  351. this.validSayPrice.leadtime = false
  352. this.$message.error('交期只能填写1-31之间的整数值')
  353. } else {
  354. this.validSayPrice.leadtime = true
  355. }
  356. },
  357. onReplyPriceInput: function (index) {
  358. let price = this.sayPriceObj.replies[index].price
  359. if (price >= 10000) {
  360. this.sayPriceObj.replies[index].price = price.substring(0, 4)
  361. } else if (price.indexOf('.') > -1) {
  362. let arr = price.split('.')
  363. if (arr[0].length > 4) {
  364. this.sayPriceObj.replies[index].price = Number(arr[0].substring(0, 4) + '.' + arr[1])
  365. } else if (arr[1].length > 6) {
  366. this.sayPriceObj.replies[index].price = Number(arr[0] + '.' + arr[1].substring(0, 6))
  367. }
  368. }
  369. },
  370. onReplyPriceBlur: function (index) {
  371. let price = this.sayPriceObj.replies[index].price
  372. if (price) {
  373. if (price <= 0) {
  374. this.$message.error('单价必须是大于0的数字')
  375. this.validSayPrice.repliesPrice = false
  376. } else {
  377. this.validSayPrice.repliesPrice = true
  378. }
  379. } else {
  380. this.$message.error('单价必须是大于0的数字')
  381. this.validSayPrice.repliesPrice = false
  382. }
  383. },
  384. onReplyLapQtyBlur: function (index) {
  385. let lapQty = this.sayPriceObj.replies[index].lapQty
  386. if (!lapQty || lapQty < 1) {
  387. this.sayPriceObj.replies[index].lapQty = ''
  388. this.$message.error('输入值必须为正整数')
  389. }
  390. },
  391. // onUnitPriceBlur: function () {
  392. // if (this.sayPriceObj.unitPrice) {
  393. // if (this.sayPriceObj.unitPrice <= 0) {
  394. // this.$message.error('单价必须是大于0的数字')
  395. // this.validSayPrice.unitPrice = false
  396. // } else {
  397. // this.validSayPrice.unitPrice = true
  398. // }
  399. // } else {
  400. // this.$message.error('单价必须是大于0的数字')
  401. // this.validSayPrice.unitPrice = false
  402. // }
  403. // },
  404. // onUnitPriceChange: function () {
  405. // let price = this.sayPriceObj.unitPrice
  406. // if (price >= 10000) {
  407. // this.sayPriceObj.unitPrice = price.substring(0, 4)
  408. // } else if (price.indexOf('.') > -1) {
  409. // let arr = price.split('.')
  410. // if (arr[0].length > 4) {
  411. // this.sayPriceObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  412. // } else if (arr[1].length > 6) {
  413. // this.sayPriceObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  414. // }
  415. // }
  416. // },
  417. // onMinDayInput: function () {
  418. // this.sayPriceObj.minDay = Number(this.sayPriceObj.minDay)
  419. // if (this.sayPriceObj.minDay < 1 || this.sayPriceObj.minDay > 31 || this.sayPriceObj.minDay.toString().indexOf('.') !== -1) {
  420. // this.validSayPrice.minDay = false
  421. // this.$message.error('交期只能填写1-31之间的整数值')
  422. // } else if (this.sayPriceObj.maxDay && this.sayPriceObj.maxDay < this.sayPriceObj.minDay) {
  423. // this.validSayPrice.minDay = false
  424. // this.$message.error('最短交期应小于等于最长交期')
  425. // } else {
  426. // this.validSayPrice.minDay = true
  427. // }
  428. // },
  429. // onMinDayChange: function () {
  430. // if (this.sayPriceObj.minDay.length > 2) {
  431. // this.sayPriceObj.minDay = this.sayPriceObj.minDay.substring(0, 2)
  432. // }
  433. // },
  434. // onMaxDayInput: function () {
  435. // this.sayPriceObj.maxDay = Number(this.sayPriceObj.maxDay)
  436. // if (this.sayPriceObj.maxDay < 1 || this.sayPriceObj.maxDay > 31 || this.sayPriceObj.maxDay.toString().indexOf('.') !== -1) {
  437. // this.validSayPrice.maxDay = false
  438. // this.$message.error('交期只能填写1-31之间的整数值')
  439. // } else if (this.sayPriceObj.minDay && this.sayPriceObj.maxDay < this.sayPriceObj.minDay) {
  440. // this.validSayPrice.maxDay = false
  441. // this.$message.error('最短交期应小于等于最长交期')
  442. // } else {
  443. // this.validSayPrice.maxDay = true
  444. // }
  445. // },
  446. // onMaxDayChange: function () {
  447. // if (this.sayPriceObj.maxDay.length > 2) {
  448. // this.sayPriceObj.maxDay = this.sayPriceObj.maxDay.substring(0, 2)
  449. // }
  450. // },
  451. // onProduceDateChange: function () {
  452. // if (this.sayPriceObj.produceDate && getRealLen(this.sayPriceObj.produceDate) > 12) {
  453. // this.sayPriceObj.produceDate = cutOutString(this.sayPriceObj.produceDate, 12)
  454. // }
  455. // },
  456. // checkAllSayPrice: function () {
  457. // return this.validSayPrice.unitPrice && this.validSayPrice.minDay && this.validSayPrice.maxDay
  458. // },
  459. searchList: function () {
  460. this.nowPage = 1
  461. this.resetList()
  462. },
  463. sortListByParam: function (param) {
  464. if (this.sorting[param]) {
  465. if (this.sorting[param] === 'ASC') {
  466. this.$set(this.sorting, param, 'DESC')
  467. } else {
  468. this.$delete(this.sorting, param)
  469. }
  470. } else {
  471. this.sorting = {}
  472. this.$set(this.sorting, param, 'ASC')
  473. }
  474. this.nowPage = 1
  475. this.resetList()
  476. },
  477. setReplies: function (type, index) {
  478. if (type === 'add' && this.sayPriceObj.replies.length < 5) {
  479. this.sayPriceObj.replies.splice(index + 1, 0, {
  480. lapQty: '',
  481. price: ''
  482. })
  483. } else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
  484. this.sayPriceObj.replies.splice(index, 1)
  485. }
  486. }
  487. }
  488. }
  489. </script>
  490. <style lang="scss" scoped>
  491. .apply-info {
  492. width: 1190px;
  493. margin: 0 auto;
  494. .apply-info-title {
  495. border-bottom: 1px solid #3975f4;
  496. >p {
  497. display: inline-block;
  498. width: 156px;
  499. height: 33px;
  500. line-height: 33px;
  501. color: #fff;
  502. background: #3975f4;
  503. font-size: 18px;
  504. text-align: center;
  505. border: {
  506. top-left-radius: 3px;
  507. top-right-radius: 3px;
  508. }
  509. margin: 0;
  510. }
  511. >span {
  512. color: #999;
  513. margin-left: 16px;
  514. }
  515. >div {
  516. float: right;
  517. height: 25px;
  518. line-height: 25px;
  519. >input {
  520. width: 241px;
  521. height: 25px;
  522. line-height: 25px;
  523. font-size: 13px;
  524. border: {
  525. top-right-radius: 0;
  526. bottom-right-radius: 0;
  527. }
  528. }
  529. >span {
  530. display: inline-block;
  531. width: 69px;
  532. color: #fff;
  533. background: #3975f4;
  534. text-align: center;
  535. margin: 0 6px 0 -1px;
  536. border: {
  537. top-right-radius: 3px;
  538. bottom-right-radius: 3px;
  539. }
  540. cursor: pointer;
  541. }
  542. >a {
  543. background: #ffa200;
  544. color: #fff;
  545. width: 79px;
  546. border-radius: 3px;
  547. text-align: center;
  548. display: inline-block;
  549. }
  550. }
  551. }
  552. .apply-info-list {
  553. >p {
  554. background: #ededed;
  555. height: 40px;
  556. line-height: 40px;
  557. margin: 9px 0 0 0;
  558. span {
  559. display: inline-block;
  560. text-align: center;
  561. a {
  562. i {
  563. color: #333;
  564. &.active {
  565. color: #5078cb;
  566. }
  567. }
  568. }
  569. &:nth-child(1) {
  570. width: 186px;
  571. }
  572. &:nth-child(2) {
  573. width: 106px;
  574. }
  575. &:nth-child(3) {
  576. width: 200px;
  577. }
  578. &:nth-child(4) {
  579. width: 174px;
  580. }
  581. &:nth-child(5) {
  582. width: 152px;
  583. }
  584. &:nth-child(6) {
  585. width: 158px;
  586. }
  587. &:nth-child(7) {
  588. width: 214px;
  589. }
  590. }
  591. }
  592. >ul {
  593. margin-bottom: 29px;
  594. > li {
  595. position: relative;
  596. min-height: 67px;
  597. line-height: 67px;
  598. border: 1px solid #ededed;
  599. >div {
  600. overflow-x: hidden;
  601. text-overflow: ellipsis;
  602. white-space: nowrap;
  603. display: inline-block;
  604. text-align: center;
  605. color: #3c3c3c;
  606. vertical-align: middle;
  607. &:nth-child(1) {
  608. width: 186px;
  609. }
  610. &:nth-child(2) {
  611. width: 106px;
  612. }
  613. &:nth-child(3) {
  614. width: 200px;
  615. }
  616. &:nth-child(4) {
  617. width: 174px;
  618. }
  619. &:nth-child(5) {
  620. width: 152px;
  621. }
  622. &:nth-child(6) {
  623. width: 158px;
  624. }
  625. &:nth-child(7) {
  626. width: 212px;
  627. }
  628. &.date-content {
  629. span {
  630. &:first-child {
  631. font-size: 12px;
  632. color: #666;
  633. }
  634. color: #f71026;
  635. }
  636. i {
  637. font-style: normal;
  638. }
  639. }
  640. &.number-content {
  641. span {
  642. color: #5392f9;
  643. &.active {
  644. color: #ff9a00;
  645. }
  646. }
  647. >img {
  648. margin-bottom: 5px;
  649. margin-right: 2px;
  650. }
  651. }
  652. &.btn-content {
  653. > a {
  654. display: inline-block;
  655. width: 71px;
  656. height: 28px;
  657. line-height: 28px;
  658. color: #fff;
  659. background: #3c7cf5;
  660. border-radius: 3px;
  661. cursor: pointer;
  662. &:first-child {
  663. background: #ffa200;
  664. margin-right: 10px;
  665. }
  666. }
  667. .is-say-price {
  668. display: inline-block;
  669. color: #39ae05;
  670. margin-left: 11px;
  671. img {
  672. margin-bottom: 2px;
  673. }
  674. .say-price-history {
  675. position: absolute;
  676. top: 53px;
  677. right: 11px;
  678. line-height: normal;
  679. width: 198px;
  680. height: 0;
  681. background: #fff;
  682. border: 1px solid #fab89a;
  683. z-index: 1;
  684. overflow: hidden;
  685. transition: height 1s;
  686. -moz-transition: height 1s; /* Firefox 4 */
  687. -webkit-transition: height 1s; /* Safari 和 Chrome */
  688. -o-transition: height 1s; /* Opera */
  689. opacity: 0;
  690. p {
  691. color: #020202;
  692. font-weight: bold;
  693. margin: 0;
  694. &.price-title {
  695. background: #fee6db;
  696. height: 28px;
  697. line-height: 28px;
  698. }
  699. &.price-level {
  700. margin: 6px 0;
  701. text-align: left;
  702. }
  703. }
  704. > div {
  705. padding: 9px 12px;
  706. > div {
  707. display: inline-block;
  708. text-align: left;
  709. &:nth-child(1) {
  710. float: left;
  711. }
  712. &:nth-child(2) {
  713. margin-left: 32px;
  714. }
  715. span {
  716. color: #020202;
  717. margin: 0;
  718. &.red-text {
  719. color: #f62d37;
  720. }
  721. }
  722. &.pre-line {
  723. display: block;
  724. padding: 13px 0;
  725. border-bottom: 1px dashed #fee6db;
  726. }
  727. }
  728. ul {
  729. li {
  730. color: #333;
  731. height: 22px;
  732. line-height: 22px;
  733. padding: 0 6px;
  734. &:nth-child(odd) {
  735. background: #f6f5f4;
  736. }
  737. span {
  738. color: #333;
  739. display: inline-block;
  740. text-align: left;
  741. width: 50%;
  742. margin: 0;
  743. }
  744. &:last-child {
  745. span {
  746. color: #4290f7;
  747. }
  748. }
  749. }
  750. }
  751. }
  752. }
  753. &:hover {
  754. .say-price-history {
  755. opacity: 1;
  756. /* animation: expand 1s infinite;
  757. -webkit-animation: expand 1s infinite; !*Safari and Chrome*!
  758. animation-iteration-count: 1;
  759. -webkit-animation-iteration-count: 1;*/
  760. height: 210px;
  761. }
  762. }
  763. /* @keyframes expand {
  764. from {bottom: 58px}
  765. to {bottom: auto}
  766. }
  767. @-webkit-keyframes expand {
  768. from {bottom: 58px}
  769. to {bottom: auto}
  770. }*/
  771. }
  772. }
  773. }
  774. .expand-content {
  775. display: none;
  776. justify-content: space-between;
  777. padding: 0 236px 0 36px;
  778. background: #fffbf0;
  779. height: 45px;
  780. line-height: 45px;
  781. color: #020202;
  782. div {
  783. display: inline-block;
  784. span {
  785. color: #f71026;
  786. }
  787. }
  788. }
  789. &:hover {
  790. box-shadow: 1.5px 3px 7px 0 rgb( 178, 178, 179 );
  791. .expand-content {
  792. display: flex;
  793. }
  794. }
  795. .say-price {
  796. background-color: #e7eef9;
  797. height: 64px;
  798. line-height: 64px;
  799. display: none;
  800. >div {
  801. display: inline-block;
  802. position: relative;
  803. height: 64px;
  804. line-height: 64px;
  805. input {
  806. border-radius: 3px;
  807. }
  808. &:nth-child(1) {
  809. width: 282px;
  810. background: url('/images/applyPurchase/say-price.png')no-repeat;
  811. text-align: center;
  812. margin-right: 44px;
  813. }
  814. &:nth-child(2) {
  815. margin-right: 39px;
  816. input {
  817. width: 118px;
  818. height: 26px;
  819. border: 1px solid #5392f9;
  820. }
  821. select {
  822. position: absolute;
  823. top: 19px;
  824. width: 32px;
  825. height: 26px;
  826. background: url('/images/applyPurchase/arrow-down.png')no-repeat right center;
  827. -webkit-box-shadow: none;
  828. -moz-box-shadow: none;
  829. box-shadow: none;
  830. border: {
  831. left: none;
  832. top: none;
  833. bottom: none;
  834. right: 1px solid #5392f9;
  835. bottom-left-radius: 4px;
  836. top-left-radius: 4px;
  837. }
  838. color: #5392f9;
  839. font: small-caption;
  840. padding-left: 8px;
  841. & + input {
  842. padding-left: 34px;
  843. }
  844. }
  845. div {
  846. position: absolute;
  847. top: 19px;
  848. left: 38px;
  849. width: 32px;
  850. height: 26px;
  851. line-height: 26px;
  852. text-align: center;
  853. border: {
  854. left: none;
  855. top: none;
  856. bottom: none;
  857. right: 1px solid #5392f9;
  858. bottom-left-radius: 4px;
  859. top-left-radius: 4px;
  860. }
  861. color: #5392f9;
  862. & + input {
  863. padding-left: 34px;
  864. }
  865. }
  866. }
  867. &:nth-child(3) {
  868. margin-right: 37px;
  869. input {
  870. width: 32px;
  871. height: 26px;
  872. padding: 0 0 0 6px;
  873. }
  874. }
  875. &:nth-child(4) {
  876. margin-right: 132px;
  877. input {
  878. width: 118px;
  879. height: 26px;
  880. }
  881. }
  882. &:nth-child(5) {
  883. span {
  884. width: 71px;
  885. height: 28px;
  886. line-height: 28px;
  887. text-align: center;
  888. display: inline-block;
  889. cursor: pointer;
  890. &:first-child {
  891. background: #dedddd;
  892. margin-right: 10px;
  893. }
  894. &:last-child {
  895. background: #fa4701;
  896. color: #fff;
  897. }
  898. }
  899. }
  900. i {
  901. color: #e41515;
  902. position: relative;
  903. top: 2px;
  904. right: 3px;
  905. }
  906. }
  907. }
  908. &.active {
  909. border-color: #f71026;
  910. box-shadow: none;
  911. .expand-content {
  912. display: flex;
  913. -webkit-box-shadow: none;
  914. -moz-box-shadow: none;
  915. box-shadow: none;
  916. }
  917. .say-price {
  918. display: block;
  919. }
  920. }
  921. }
  922. }
  923. }
  924. .page-wrap {
  925. text-align: right;
  926. float: none;
  927. }
  928. .say-price-box {
  929. position: fixed;
  930. width: 527px;
  931. top: 30%;
  932. left: 33%;
  933. border-radius: 5px;
  934. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  935. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  936. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  937. z-index: 1;
  938. .title {
  939. position: relative;
  940. height: 44px;
  941. background: #4290f7;
  942. line-height: 44px;
  943. color: #fff;
  944. > div {
  945. display: inline-block;
  946. padding-left: 66px;
  947. width: 49%;
  948. overflow: hidden;
  949. text-overflow: ellipsis;
  950. white-space: nowrap;
  951. }
  952. i {
  953. position: absolute;
  954. right: 10px;
  955. top: 8px;
  956. cursor: pointer;
  957. }
  958. }
  959. .content {
  960. padding: 9px 0;
  961. background: #fff;
  962. .content-line {
  963. margin: 0 0 14px 0;
  964. .form-item {
  965. display: inline-block;
  966. width: 49%;
  967. > span {
  968. i {
  969. color: #fd2637;
  970. margin-right: 4px;
  971. }
  972. }
  973. input {
  974. border: 1px solid #bfbfbf;
  975. border-radius: 2px;
  976. height: 28px;
  977. }
  978. &.form-left {
  979. span {
  980. display: inline-block;
  981. width: 104px;
  982. text-align: right;
  983. }
  984. input {
  985. width: 64px;
  986. }
  987. }
  988. &.form-upload {
  989. text-align: center;
  990. label {
  991. margin-bottom: 0;
  992. cursor: pointer;
  993. input {
  994. display: none;
  995. }
  996. span {
  997. display: block;
  998. width: 94px;
  999. height: 23px;
  1000. line-height: 18px;
  1001. font-weight: normal;
  1002. color: #4290f7;
  1003. text-align: center;
  1004. border: 1px dashed #4290f7;
  1005. border-radius: 11px;
  1006. i {
  1007. font-weight: bold;
  1008. font-style: normal;
  1009. font-size: 18px;
  1010. margin-right: 5px;
  1011. }
  1012. }
  1013. }
  1014. div {
  1015. i {
  1016. cursor: pointer;
  1017. color: #eb222c;
  1018. font-size: 16px;
  1019. margin-right: 10px;
  1020. }
  1021. span {
  1022. display: inline-block;
  1023. max-width: 128px;
  1024. overflow: hidden;
  1025. text-overflow: ellipsis;
  1026. white-space: nowrap;
  1027. }
  1028. }
  1029. }
  1030. &.form-right {
  1031. padding-left: 13px;
  1032. input {
  1033. width: 101px;
  1034. }
  1035. > i {
  1036. margin-left: 4px;
  1037. }
  1038. }
  1039. }
  1040. }
  1041. }
  1042. .operate {
  1043. border-top: 1px solid #e4e5e6;
  1044. background: #fff;
  1045. height: 62px;
  1046. text-align: center;
  1047. padding-top: 15px;
  1048. span {
  1049. display: inline-block;
  1050. width: 64px;
  1051. height: 28px;
  1052. line-height: 28px;
  1053. text-align: center;
  1054. background: #4290f7;
  1055. color: #fff;
  1056. cursor: pointer;
  1057. &:last-child {
  1058. margin-left: 15px;
  1059. background: #acabab;
  1060. }
  1061. }
  1062. }
  1063. }
  1064. }
  1065. </style>