BatchPublish.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <template>
  2. <div class="batch-publish">
  3. <p>成功上传<b class="red-text">{{bomNumber.successImport || 0}}</b>个<br/>另有<span class="red-text">{{bomNumber.nullField || 0}}</span>个必填项缺失,请在当前页完善信息</p>
  4. <table v-if="bomList.content.length">
  5. <thead>
  6. <tr>
  7. <th width="60">
  8. <label class="com-check-box">
  9. <input type="checkbox" id="all" @change="onCheck()" v-model="isCheckAll">
  10. <label for="all"></label>
  11. </label>全选
  12. </th>
  13. <th width="160"><i class="red-text">*</i>型号</th>
  14. <th width="132"><i class="red-text">*</i>品牌</th>
  15. <th width="100">采购数量</th>
  16. <th width="128">单价预算</th>
  17. <th width="76">封装</th>
  18. <th width="102">生产日期</th>
  19. <th width="144"><i class="red-text">*</i>截止时间</th>
  20. <th width="92">操作</th>
  21. </tr>
  22. </thead>
  23. <tbody v-for="(item, index) in bomList.content">
  24. <tr v-if="!item.active">
  25. <td>
  26. <label class="com-check-box">
  27. <input type="checkbox" @change="onCheck(index)" v-model="item.checked" :id="index">
  28. <label :for="index"></label>
  29. </label>
  30. </td>
  31. <td>
  32. <div v-if="item.code">{{item.code}}</div>
  33. <span class="red-text" v-if="!item.code">请完善信息</span>
  34. </td>
  35. <td>
  36. <div v-if="item.brand">{{item.brand}}</div>
  37. <span class="red-text" v-if="!item.brand">请完善信息</span>
  38. </td>
  39. <td>
  40. <div>{{item.amount || '-'}}</div>
  41. </td>
  42. <td class="blue-text">
  43. <div>
  44. <span v-if="item.unitPrice">{{(item.currency === 'RMB' ? '¥' : '$') + item.unitPrice}}</span>
  45. <span v-if="!item.unitPrice">-</span>
  46. </div>
  47. </td>
  48. <td>
  49. <div>
  50. {{item.encapsulation || '-'}}
  51. </div>
  52. </td>
  53. <td>
  54. <div>
  55. {{item.produceDate}}
  56. </div>
  57. </td>
  58. <td>
  59. <span v-if="item.deadline">{{item.deadline | date}}</span>
  60. <span class="red-text" v-if="!item.deadline">请完善信息</span>
  61. <div class="red-text" v-if="!isValidTime(item.deadline)">默认≤90天</div>
  62. </td>
  63. <td class="operate">
  64. <a class="delete-btn" @click="modifyItem(index)">编辑</a>
  65. <a class="modify-btn" @click="deleteItem(index)">删除</a>
  66. </td>
  67. </tr>
  68. <tr class="modify-row" v-if="item.active">
  69. <td>
  70. <label class="com-check-box">
  71. <input type="checkbox" @change="onCheck(index)" v-model="item.checked" :id="index">
  72. <label :for="index"></label>
  73. </label>
  74. </td>
  75. <td>
  76. <input type="text" class="form-control" v-model="modifyObj.code" :class="{'error': !validObj.code}" maxlength="30" @blur="checkCode" @input="onCodeChange" >
  77. <ul v-show="showSimilarCodeList">
  78. <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
  79. </ul>
  80. </td>
  81. <td>
  82. <input type="text" class="form-control" v-model="modifyObj.brand" :class="{'error': !validObj.brand}" maxlength="20" @blur="checkBrand" @input="onBrandChange">
  83. <ul class="brand-similar-list" v-show="showSimilarBrandList">
  84. <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
  85. </ul>
  86. </td>
  87. <td>
  88. <input type="text" class="form-control" v-model="modifyObj.amount" :class="{'error': !validObj.amount}" @blur="checkAmount" @input="onAmountInput">
  89. </td>
  90. <td>
  91. <select class="form-control" v-model="modifyObj.currency">
  92. <option value="RMB">¥</option>
  93. <option value="USD">$</option>
  94. </select>
  95. <input class="form-control" type="number" v-model="modifyObj.unitPrice" :class="{'error': !validObj.unitPrice}" @blur="checkUnitPrice" @input="onUnitPriceInput">
  96. </td>
  97. <td>
  98. <input type="text" class="form-control" v-model="modifyObj.encapsulation" maxlength="20" @input="onEncapsulationChange">
  99. </td>
  100. <td>
  101. <input type="text" class="form-control" v-model="modifyObj.produceDate" @input="onProduceDateChange">
  102. </td>
  103. <td>
  104. <el-date-picker
  105. v-model="modifyObj.deadline"
  106. type="date"
  107. :picker-options="pickerOptions"
  108. :editable="false"
  109. size="mini">
  110. </el-date-picker>
  111. <!--<input type="text" class="form-control" v-model="modifyObj.deadline">-->
  112. </td>
  113. <td class="operate">
  114. <a class="submit-btn" @click="submitModify(index)">确认</a>
  115. <a class="cancel-btn" @click="cancelModify(index)">取消</a>
  116. </td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. <page :total="bomList.totalElements" :page-size="pageSize"
  121. :current="nowPage" @childEvent="listenPage"></page>
  122. <div class="submit-area" v-if="bomList.content.length">
  123. <a class="modify-btn" @click="deleteItem()">删除</a>
  124. <a class="modify-btn delete-btn" @click="submitBOM">确认发布</a>
  125. </div>
  126. <!--提示框-->
  127. <div class="apply-del-box" v-if="showRemindBox">
  128. <div class="title">
  129. <a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>
  130. </div>
  131. <div class="content">
  132. <!--<p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>-->
  133. <!--<p style="line-height: 20px;">前往<a @click="goBrandApply()" target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>-->
  134. <p><img src="/images/applyPurchase/check.png" alt="">发布成功</p>
  135. <p>其中<span>{{onSaleNum}}</span>个求购型号有现货在售,您可前往“<span>买家中心-我的求购</span>”查询并直接购买</p>
  136. <div>
  137. <a @click="showRemindBox = false">继续发布</a>
  138. <a href="/user#/seekPurchase">前往我的求购</a>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </template>
  144. <script>
  145. let getRealLen = function (str) {
  146. let len = 0
  147. for (let i = 0; i < str.length; i++) {
  148. if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
  149. len += 2
  150. } else {
  151. len++
  152. }
  153. }
  154. return len
  155. }
  156. import Page from '~components/common/page/pageComponent.vue'
  157. export default {
  158. data () {
  159. return {
  160. pageSize: 10,
  161. nowPage: 1,
  162. isCheckAll: false,
  163. showRemindBox: false,
  164. modifyObj: {
  165. code: '',
  166. brand: '',
  167. unitPrice: '',
  168. currency: 'RMB',
  169. encapsulation: '',
  170. produceDate: '',
  171. amount: '',
  172. deadline: ''
  173. },
  174. pickerOptions: {
  175. disabledDate (time) {
  176. // 大于等于今天 小于三个月后
  177. return time.getTime() < Date.now() - 1000 * 60 * 60 * 24 || time.getTime() > Date.now() + 1000 * 60 * 60 * 24 * 30 * 3
  178. }
  179. },
  180. similarCode: [],
  181. similarBrand: [],
  182. validObj: {
  183. code: true,
  184. brand: true,
  185. unitPrice: true,
  186. // encapsulation: true,
  187. // produceDate: true,
  188. amount: true,
  189. deadline: true
  190. },
  191. onSaleNum: 0,
  192. showSimilarCodeList: false,
  193. showSimilarBrandList: false
  194. }
  195. },
  196. components: {
  197. Page
  198. },
  199. computed: {
  200. bomList () {
  201. let _this = this
  202. let list = this.$store.state.applyPurchase.bomMaterial.bomList.data
  203. for (let i = 0; i < list.content.length; i++) {
  204. _this.$set(list.content[i], 'checked', false)
  205. _this.$set(list.content[i], 'active', false)
  206. // list.content[i].checked = false
  207. // list.content[i].active = false
  208. // if (!list.content[i].code || list.content[i].brand || !list.content[i].deadline || !this.isValidDate(list.content[i].deadline)) {
  209. // _this.validList = false
  210. // }
  211. }
  212. return list
  213. },
  214. bomNumber () {
  215. return this.$store.state.applyPurchase.bomMaterial.bomNumber.data
  216. }
  217. },
  218. mounted () {
  219. let _this = this
  220. document.body.onclick = function () {
  221. _this.showSimilarCodeList = false
  222. _this.showSimilarBrandList = false
  223. }
  224. },
  225. filters: {
  226. date: function (input) {
  227. if (input) {
  228. const d = new Date(input)
  229. const year = d.getFullYear()
  230. const monthTemp = d.getMonth() + 1
  231. const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
  232. const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
  233. return year + '-' + month + '-' + day
  234. } else {
  235. return null
  236. }
  237. }
  238. },
  239. methods: {
  240. initModifyObj: function () {
  241. this.modifyObj = {
  242. code: '',
  243. brand: '',
  244. unitPrice: '',
  245. currency: 'RMB',
  246. encapsulation: '',
  247. produceDate: '',
  248. amount: '',
  249. deadline: ''
  250. }
  251. },
  252. listenPage: function (page) {
  253. this.nowPage = page
  254. this.reloadData()
  255. },
  256. reloadData: function () {
  257. this.$store.dispatch('applyPurchase/loadBOMMaterialList', {bomId: this.$route.params.id, page: this.nowPage, count: this.pageSize})
  258. },
  259. submitBOM: function () {
  260. let str = ''
  261. for (let i = 0; i < this.bomList.content.length; i++) {
  262. if (this.bomList.content[i].checked) {
  263. str += this.bomList.content[i].id + ','
  264. }
  265. }
  266. let param = {'bomId': Number(this.$route.params.id)}
  267. if (str.length) {
  268. str = str.substring(0, str.length - 1)
  269. param.spIds = str
  270. }
  271. this.$http.post('/seek/confirmBom', param)
  272. .then(response => {
  273. if (response.data.success) {
  274. this.showRemindBox = true
  275. this.onSaleNum = response.data.data
  276. this.listenPage(1)
  277. this.$store.dispatch('applyPurchase/loadBOMNumber', {bomId: this.$route.params.id})
  278. } else {
  279. this.$message.error('发布失败')
  280. }
  281. }, err => {
  282. console.log(err)
  283. this.$message.error('系统错误')
  284. })
  285. },
  286. onCheck: function (index) {
  287. if (typeof index === 'undefined') {
  288. let isCheckedAll = true
  289. for (let i = 0; i < this.bomList.content.length; i++) {
  290. if (!this.bomList.content[i].checked) {
  291. isCheckedAll = false
  292. break
  293. }
  294. }
  295. this.setAllCheck(!isCheckedAll)
  296. this.isCheckAll = !isCheckedAll
  297. }
  298. },
  299. setAllCheck: function (flag) {
  300. for (let i = 0; i < this.bomList.content.length; i++) {
  301. this.bomList.content[i].checked = flag
  302. }
  303. },
  304. modifyItem: function (index) {
  305. for (let i = 0; i < this.bomList.content.length; i++) {
  306. this.bomList.content[i].active = false
  307. }
  308. // this.$set(this.bomList.content[index], 'active', true)
  309. this.bomList.content[index].active = true
  310. let _this = this
  311. this.initModifyObj()
  312. for (let attr in this.bomList.content[index]) {
  313. _this.$set(_this.modifyObj, attr, _this.bomList.content[index][attr])
  314. // _this.modifyObj[attr] = _this.bomList.content[index][attr]
  315. }
  316. // this.modifyObj = this.bomList.content[index]
  317. this.modifyObj.deadline = this.getDate(this.bomList.content[index].deadline)
  318. },
  319. cancelModify: function (index) {
  320. this.bomList.content[index].active = false
  321. },
  322. getDate: function (input) {
  323. const d = new Date(input)
  324. const year = d.getFullYear()
  325. const monthTemp = d.getMonth() + 1
  326. const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
  327. const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
  328. return year + '-' + month + '-' + day
  329. },
  330. submitModify: function (index) {
  331. let checkValid = this.checkAll()
  332. if (this.getSingleValidInfo(this.modifyObj) && checkValid) {
  333. this.$http.put('/seek/updateSeekPurchaseByBatch', this.modifyObj)
  334. .then(response => {
  335. if (response.data.success) {
  336. this.reloadData()
  337. this.$message.success('修改成功')
  338. // this.bomList.content[index].active = false
  339. } else {
  340. this.$message.error('修改失败')
  341. }
  342. }, err => {
  343. console.log(err)
  344. this.$message.error('系统错误')
  345. })
  346. } else {
  347. if (!checkValid) {
  348. if (!this.validObj.code) {
  349. this.$message.error('型号不能为空')
  350. } else if (!this.validObj.brand) {
  351. this.$message.error('品牌不能为空')
  352. } else if (!this.validObj.deadline) {
  353. this.$message.error('截止日期不能为空')
  354. } else if (!this.validObj.amount || !this.validObj.unitPrice) {
  355. this.$message.error('请输入正确的数值')
  356. }
  357. } else {
  358. this.$message.error('请完善信息')
  359. }
  360. }
  361. },
  362. deleteItem: function (index) {
  363. if (!index) {
  364. let str = ''
  365. for (let i = 0; i < this.bomList.content.length; i++) {
  366. if (this.bomList.content[i].checked) {
  367. str += this.bomList.content[i].id + ','
  368. }
  369. }
  370. let param = {}
  371. if (str.length) {
  372. str = str.substring(0, str.length - 1)
  373. param.spIds = str
  374. this.doDelete(param)
  375. } else {
  376. this.$message.error('请勾选')
  377. return
  378. }
  379. } else {
  380. this.doDelete({spIds: this.bomList.content[index].id})
  381. }
  382. },
  383. doDelete: function (param) {
  384. this.$http.put('/seek/deleteSeekPurchaseByBatch', param)
  385. .then(response => {
  386. if (response.data.success) {
  387. this.listenPage(1)
  388. this.$message.success('删除成功')
  389. } else {
  390. this.$message.error('删除失败')
  391. }
  392. }, err => {
  393. console.log(err)
  394. this.$message.error('系统错误')
  395. })
  396. },
  397. isValidTime: function (time) {
  398. let now = new Date().getTime()
  399. return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 90)
  400. },
  401. isValidDate: function (date) {
  402. let now = new Date().getTime()
  403. let time = new Date(date).getTime()
  404. return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 90)
  405. },
  406. getSimilarCode: function () {
  407. this.$http.get('/search/similarComponents', {params: {keyword: this.modifyObj.code}})
  408. .then(response => {
  409. this.similarCode = response.data
  410. if (response.data.length) {
  411. this.showSimilarCodeList = true
  412. }
  413. })
  414. },
  415. getSimilarBrand: function () {
  416. this.$http.get('/search/similarBrands', {params: {keyword: this.modifyObj.brand}})
  417. .then(response => {
  418. this.similarBrand = response.data
  419. if (response.data.length) {
  420. this.showSimilarBrandList = true
  421. }
  422. })
  423. },
  424. getSingleValidInfo: function (item) {
  425. return item.code && item.brand && item.deadline && item.deadline !== 'NaN-NaN-NaN' && this.isValidDate(item.deadline)
  426. },
  427. checkCode: function () {
  428. this.validObj.code = this.modifyObj.code && this.modifyObj.code !== ''
  429. return this.validObj.code
  430. },
  431. checkBrand: function () {
  432. this.validObj.brand = this.modifyObj.brand && this.modifyObj.brand !== ''
  433. return this.validObj.brand
  434. },
  435. checkUnitPrice: function () {
  436. this.validObj.unitPrice = (!this.modifyObj.unitPrice || this.modifyObj.unitPrice === '') ? true : this.modifyObj.unitPrice > 0 && this.modifyObj.unitPrice < 100000000
  437. return this.validObj.unitPrice
  438. },
  439. // checkEncapsulation: function () {
  440. // this.validObj.encapsulation = this.applyObj.encapsulation && this.applyObj.encapsulation !== ''
  441. // },
  442. // checkProduceDate: function () {
  443. // this.validObj.produceDate = this.applyObj.produceDate && this.applyObj.produceDate !== ''
  444. // },
  445. checkAmount: function () {
  446. this.validObj.amount = (!this.modifyObj.amount || this.modifyObj.amount === '') ? true : this.modifyObj.amount > 0 && this.modifyObj.amount < 100000000
  447. return this.validObj.amount
  448. },
  449. checkAll: function () {
  450. return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount()
  451. },
  452. checkDeadline: function () {
  453. this.validObj.deadline = Boolean(this.modifyObj.deadline)
  454. return this.validObj.deadline
  455. },
  456. onUnitPriceInput: function () {
  457. let price = this.modifyObj.unitPrice
  458. if (price >= 10000) {
  459. this.modifyObj.unitPrice = price.substring(0, 4)
  460. } else if (price.indexOf('.') > -1) {
  461. let arr = price.split('.')
  462. if (arr[0].length > 4) {
  463. this.modifyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  464. } else if (arr[1].length > 6) {
  465. this.modifyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  466. }
  467. }
  468. },
  469. onProduceDateChange: function () {
  470. // console.log(getRealLen(this.modifyObj.produceDate))
  471. if (this.modifyObj.produceDate && getRealLen(this.modifyObj.produceDate) > 12) {
  472. console.log(this.modifyObj.produceDate.substring(0, this.modifyObj.produceDate.length - 1))
  473. this.modifyObj.produceDate = this.modifyObj.produceDate.substring(0, this.modifyObj.produceDate.length - 1)
  474. }
  475. },
  476. onEncapsulationChange: function () {
  477. if (this.modifyObj.encapsulation && getRealLen(this.modifyObj.encapsulation) > 20) {
  478. this.modifyObj.encapsulation = this.modifyObj.encapsulation.substring(0, this.modifyObj.encapsulation.length - 1)
  479. }
  480. },
  481. onCodeChange: function () {
  482. if (this.modifyObj.code && getRealLen(this.modifyObj.code) > 30) {
  483. this.modifyObj.code = this.modifyObj.code.substring(0, this.modifyObj.code.length - 1)
  484. } else {
  485. this.getSimilarCode()
  486. }
  487. },
  488. onBrandChange: function () {
  489. if (this.modifyObj.brand && getRealLen(this.modifyObj.brand) > 20) {
  490. this.modifyObj.brand = this.modifyObj.brand.substring(0, this.modifyObj.brand.length - 1)
  491. } else {
  492. this.getSimilarBrand()
  493. }
  494. },
  495. onAmountInput: function () {
  496. if (this.modifyObj.amount.length > 8 || !(/^[0-9]*$/).test(this.modifyObj.amount)) {
  497. this.modifyObj.amount = this.modifyObj.amount.substring(0, this.modifyObj.amount.length - 1)
  498. }
  499. },
  500. setCode: function (code) {
  501. this.modifyObj.code = code
  502. this.showSimilarCodeList = false
  503. },
  504. setBrand: function (brand) {
  505. this.modifyObj.brand = brand
  506. this.showSimilarBrandList = false
  507. }
  508. }
  509. }
  510. </script>
  511. <style lang="scss">
  512. .batch-publish {
  513. margin: 0 auto;
  514. width: 998px;
  515. .red-text {
  516. color: #ff0000;
  517. }
  518. .blue-text {
  519. color: #3c7cf5;
  520. }
  521. > p {
  522. margin: 59px 0 42px;
  523. font-size: 16px;
  524. }
  525. table {
  526. width: 100%;
  527. table-layout: fixed;
  528. thead {
  529. tr {
  530. th {
  531. background: #b8b8b8;
  532. color: #fff;
  533. font-weight: normal;
  534. height: 50px;
  535. line-height: 50px;
  536. text-align: center;
  537. .com-check-box {
  538. margin-right: 2px;
  539. }
  540. i {
  541. margin-right: 3px;
  542. }
  543. }
  544. }
  545. }
  546. tbody {
  547. tr {
  548. height: 85px;
  549. line-height: 85px;
  550. text-align: center;
  551. border : {
  552. bottom: 1px solid #d9d9d9;
  553. left: 1px solid #d9d9d9;
  554. right: 1px solid #d9d9d9;
  555. }
  556. &:hover {
  557. background: #f3f3f3;
  558. }
  559. td {
  560. position: relative;
  561. font-size: 12px;
  562. > div {
  563. overflow: hidden;
  564. overflow-y: unset;
  565. text-overflow: ellipsis;
  566. white-space: nowrap;
  567. }
  568. > ul {
  569. line-height: normal;
  570. position: absolute;
  571. top: 52px;
  572. left: 24px;
  573. background: #fff;
  574. border: 1px solid #b5b5b5;
  575. z-index: 1;
  576. max-height: 120px;
  577. overflow-y: auto;
  578. overflow-x: hidden;
  579. border-radius: 3px;
  580. width: 114px;
  581. li {
  582. height: 24px;
  583. line-height: 24px;
  584. cursor: pointer;
  585. overflow: hidden;
  586. text-overflow: ellipsis;
  587. white-space: nowrap;
  588. padding: 0 5px;
  589. &:hover {
  590. background: #ddd;
  591. }
  592. }
  593. &.brand-similar-list {
  594. left: 20px;
  595. width: 94px;
  596. }
  597. }
  598. div.red-text {
  599. line-height: normal;
  600. position: absolute;
  601. left: 42px;
  602. top: 49px;
  603. }
  604. &.operate {
  605. a {
  606. display: block;
  607. width: 64px;
  608. height: 24px;
  609. line-height: 22px;
  610. text-align: center;
  611. border-radius: 3px;
  612. margin: 0 auto 4px;
  613. font-size: 14px;
  614. &.submit-btn {
  615. border: 1px solid #f64900;
  616. color: #fff;
  617. background: #f64900;
  618. }
  619. &.cancel-btn {
  620. border: 1px solid #bbb;
  621. color: #fff;
  622. background: #bbb;
  623. }
  624. }
  625. }
  626. }
  627. &.modify-row {
  628. td {
  629. position: relative;
  630. input, select {
  631. height: 20px;
  632. border-radius: 3px;
  633. background: #f4f4f4;
  634. border: 1px solid #b5b5b5;
  635. text-align: center;
  636. padding: 0 5px;
  637. &.error {
  638. border-color: #f4645f !important;
  639. }
  640. }
  641. &:nth-child(2) {
  642. input {
  643. width: 113px;
  644. }
  645. }
  646. &:nth-child(3) {
  647. input {
  648. width: 93px;
  649. }
  650. }
  651. &:nth-child(4) {
  652. input {
  653. width: 71px;
  654. }
  655. }
  656. &:nth-child(5) {
  657. input {
  658. width: 65px;
  659. padding: 0 5px 0 30px;
  660. }
  661. select {
  662. width: 25px;
  663. padding: 0 0 0 2px;
  664. background: url(/images/applyPurchase/select.png) no-repeat right;
  665. background-size: 12px 19px;
  666. background-position: 13px 0;
  667. position: absolute;
  668. top: 33px;
  669. border-bottom: none;
  670. border-top: none;
  671. border-left: 0;
  672. }
  673. }
  674. &:nth-child(6) {
  675. input {
  676. width: 54px;
  677. }
  678. }
  679. &:nth-child(7) {
  680. input {
  681. width: 72px;
  682. }
  683. }
  684. &:nth-child(8) {
  685. div {
  686. width: 101px;
  687. overflow: unset;
  688. input {
  689. width: 101px;
  690. }
  691. }
  692. }
  693. }
  694. }
  695. }
  696. }
  697. }
  698. .modify-btn {
  699. border: 1px solid #3c7cf5;
  700. color: #3c7cf5;
  701. background: #fff;
  702. }
  703. .delete-btn {
  704. border: 1px solid #3c7cf5;
  705. color: #fff;
  706. background: #3c7cf5;
  707. }
  708. .submit-area {
  709. margin: 51px auto 60px;
  710. text-align: center;
  711. clear: both;
  712. a {
  713. display: inline-block;
  714. width: 64px;
  715. height: 24px;
  716. line-height: 22px;
  717. text-align: center;
  718. border-radius: 3px;
  719. &.modify-btn {
  720. width: 90px;
  721. margin-left: 14px;
  722. }
  723. }
  724. }
  725. .apply-del-box{
  726. position: fixed;
  727. z-index: 1000;
  728. height: auto;
  729. opacity: 1;
  730. background-color: white;
  731. width: 310px;
  732. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  733. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  734. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  735. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  736. margin: -155px 0 0 -75px;
  737. top: 55%;
  738. left: 43%;
  739. .title{
  740. height: 24px;
  741. background-color: #007aff;
  742. text-align: right;
  743. padding-right: 15px;
  744. line-height: 24px;
  745. a{
  746. color: white;
  747. font-size: 12px;
  748. }
  749. }
  750. .content{
  751. width: 100%;
  752. text-align: center;
  753. margin: 0 auto;
  754. p{
  755. padding: 12px 31px;
  756. margin: 0;
  757. &:nth-child(2) {
  758. font-size: 12px;
  759. padding-top: 0;
  760. }
  761. i{
  762. color: #5078cb;
  763. font-size: 16px;
  764. margin-right: 10px;
  765. }
  766. span {
  767. color: #007aff;
  768. }
  769. &:last-child {
  770. font-size: 12px;
  771. }
  772. }
  773. div{
  774. width: 100%;
  775. text-align: center;
  776. margin: 0 auto 20px;
  777. a{
  778. padding: 0 19px;
  779. height: 26px;
  780. line-height: 26px;
  781. display: inline-block;
  782. text-align: center;
  783. font-size: 14px;
  784. color: #fff;
  785. &:first-child{
  786. background: #c8c6c6;
  787. margin-right: 10px;
  788. }
  789. &:last-child{
  790. background: #007aff;
  791. }
  792. }
  793. }
  794. }
  795. }
  796. }
  797. </style>