index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. <template>
  2. <div>
  3. <div class="pending">
  4. <!-- 搜索 -->
  5. <div class="formSearch">
  6. <el-form :inline="true" :model="formInline" class="demo-form-inline">
  7. <el-form-item label="商品名称">
  8. <el-input v-model="formInline.search" maxlength="20" placeholder="请输入商品名称" />
  9. </el-form-item>
  10. <el-form-item label="上架状态">
  11. <el-select v-model="formInline.shelveState" placeholder="请选择上架状态">
  12. <el-option label="全部" :value="null" />
  13. <el-option label="上架" value="1" />
  14. <el-option label="下架" value="0" />
  15. </el-select>
  16. </el-form-item>
  17. <el-form-item label="官方分类">
  18. <el-cascader
  19. v-model="formInline.classifyId" :options="categoryList" clearable :props="{
  20. checkStrictly: true,
  21. expandTrigger: 'hover',
  22. label: 'categoryName',
  23. value: 'id',
  24. children: 'childs'
  25. }"
  26. />
  27. </el-form-item>
  28. <el-form-item>
  29. <el-button type="primary" plain @click="search">查询</el-button>
  30. <el-button plain @click="clear">重置</el-button>
  31. <el-button type="success" plain @click="add">新增商品</el-button>
  32. <el-button type="success" plain @click="sends">批量导入</el-button>
  33. <el-button type="success" plain @click="productDataExport">导出商品</el-button>
  34. <!-- <span v-for="(item,index) in btnList" :key="index" class="promissStyle">
  35. <el-button type="success" plain @click="btnClick(item)">{{ item.permissionName }}</el-button>
  36. </span> -->
  37. </el-form-item>
  38. </el-form>
  39. </div>
  40. <!-- 表格 -->
  41. <div class="tableBox">
  42. <el-table
  43. ref="multipleTable" :data="tableData" border
  44. :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%"
  45. >
  46. <el-table-column prop="productId" label="商品id" show-overflow-tooltip />
  47. <el-table-column label="商品主图" width="150" align="center">
  48. <template slot-scope="scope">
  49. <img height="80" width="80" :src="scope.row.productImage" alt srcset>
  50. </template>
  51. </el-table-column>
  52. <el-table-column prop="productName" label="商品名称" width="220" />
  53. <el-table-column prop="section" label="售价区间" show-overflow-tooltip />
  54. <el-table-column prop="memberSection" label="会员价" show-overflow-tooltip />
  55. <el-table-column prop="ifCredit" label="积分兑换" show-overflow-tooltip>
  56. <template slot-scope="scope">
  57. <span v-if="scope.row.ifCredit == 1">允许</span>
  58. <span v-if="scope.row.ifCredit == 0">不允许</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="stockNumber" label="库存" show-overflow-tooltip />
  62. <el-table-column prop="volume" label="销量" show-overflow-tooltip />
  63. <el-table-column prop="volume" label="上架状态" show-overflow-tooltip>
  64. <template slot-scope="scope">
  65. <span v-if="scope.row.shelveState == 0">未上架</span>
  66. <span v-if="scope.row.shelveState == 1">已上架</span>
  67. <span v-if="scope.row.shelveState == 2">待审核</span>
  68. <span v-if="scope.row.shelveState == 3">审核失败</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="reject" label="驳回原因" show-overflow-tooltip />
  72. <el-table-column :formatter="row => getBrandName(row)" label="品牌" show-overflow-tooltip />
  73. <el-table-column prop="createTime" label="创建时间" width="180" />
  74. <el-table-column label="操作" width="200">
  75. <template slot-scope="scope">
  76. <div class="btnList">
  77. <el-button type="text" @click="edit(scope.row)">编辑</el-button>
  78. <el-button v-if="scope.row.shelveState == 0" type="text" @click="down(scope.row)">上架</el-button>
  79. <el-button v-if="scope.row.shelveState == 1" type="text" @click="down(scope.row)">下架</el-button>
  80. <el-button v-if="scope.row.shelveState == 1" type="text" @click="setVipPrice(scope.row)">设置会员价</el-button>
  81. <el-button v-if="scope.row.shelveState != 1" type="text" @click="del(scope.row)">删除</el-button>
  82. </div>
  83. </template>
  84. </el-table-column>
  85. </el-table>
  86. <div class="fenye">
  87. <el-pagination
  88. :current-page="formInline.page" :page-sizes="[10, 20, 50, 100]" :page-size="10"
  89. layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
  90. @current-change="handleCurrentChange"
  91. />
  92. </div>
  93. </div>
  94. </div>
  95. <!-- 批量导入 -->
  96. <el-dialog title="批量导入商品" :visible.sync="batchAdd" :close-on-click-modal="false" center width="400px">
  97. <div class="uploadDialog">
  98. <el-upload
  99. drag :limit="1" :auto-upload="false" accept=".xlsx"
  100. :headers="headers" :action="UploadUrls"
  101. :before-upload="beforeUploadFile" :on-change="fileChange" :on-remove="batchRemove" :on-exceed="exceedFile"
  102. :on-success="handleSuccess" :on-error="handleError" :file-list="batchFileList"
  103. >
  104. <i class="el-icon-upload" />
  105. <div class="el-upload__text">
  106. <em>点击上传</em>
  107. </div>
  108. <div slot="tip" class="el-upload__tip">只能上传xlsx文件,且不超过10M</div>
  109. <div slot="tip" class="el-upload__tip">
  110. 上传前不知道excel模板的,请点击
  111. <span class="clickMe" @click="poDownload">点我下载模板</span> 去下载
  112. </div>
  113. </el-upload>
  114. <br>
  115. <el-button size="small" type="primary" @click="uploadFile">立即上传</el-button>
  116. </div>
  117. </el-dialog>
  118. <!-- 设置会员价弹窗 -->
  119. <el-dialog title="设置会员价" :visible.sync="vipPriceVisible" width="50%" class="vipDialog">
  120. <el-form ref="form" label-width="80px">
  121. <el-form-item label="优惠方式">
  122. <el-radio-group v-model="mode" @change="modeChange">
  123. <el-radio :label="1">折扣</el-radio>
  124. <el-radio :label="2">指定价格</el-radio>
  125. </el-radio-group>
  126. </el-form-item>
  127. <div class="priceTable">
  128. <table>
  129. <tr>
  130. <th>规格</th>
  131. <th>售价</th>
  132. <th v-for="(item, index) in gradeList" :key="index">
  133. {{ item }}
  134. </th>
  135. </tr>
  136. <tr v-for="(item, index) in productData" :key="index">
  137. <td>
  138. {{ item.value }}
  139. </td>
  140. <td>
  141. {{ item.price }}
  142. </td>
  143. <td v-for="(itemJ, indexJ) in item.memberPrices" :key="indexJ" class="td-input">
  144. <el-input v-model="itemJ.price" maxlength="9" oninput="value=value.replace(/([^\d|\.])/g, '')" /> {{
  145. mode == 1 ? '折' : '元' }}
  146. </td>
  147. </tr>
  148. </table>
  149. </div>
  150. <el-button type="success" class="clearBtn" @click="clearProductMember">清除所有旧会员价</el-button>
  151. </el-form>
  152. <span slot="footer" class="dialog-footer">
  153. <el-button @click="vipPriceVisible = false">取 消</el-button>
  154. <el-button type="primary" @click="vipPriceSubmit">确 定</el-button>
  155. </span>
  156. </el-dialog>
  157. <!-- 新增/修改商品弹窗 -->
  158. <el-dialog
  159. :title="!commId ? '新增商品' : '编辑商品'" :visible.sync="commidyVisible" width="74%" center
  160. top="10vh"
  161. :close-on-click-modal="false" @before-close="closeModal" @close="closeModal"
  162. >
  163. <CommAdd ref="child" :voucherList="voucherList" :show-tinymce="showTinymce" :product-id="commId" @cancel="cancelForm" />
  164. </el-dialog>
  165. </div>
  166. </template>
  167. <script>
  168. import CommAdd from './addCommodity.vue'
  169. import { getBtnList, getToken } from '@/utils/auth'
  170. import { uploadUrl } from '@/utils/request'
  171. import {
  172. getClassifyGetAll,
  173. getClassifyDelete,
  174. getClassifyStart,
  175. // downloadTemplate, // 导入商品模板表下载
  176. // importProduct, // 上传商品模板
  177. getClassify,
  178. // getProductMembers, // 商品会员价格数据查询
  179. // setProductMember, // 商品设置会员价
  180. // clearProductMember, // 清除商品会员价
  181. // productExport, // 导出商品信息
  182. getBrandList,
  183. getVoucher
  184. } from '@/api/platformProduct'
  185. export default {
  186. components: {
  187. CommAdd
  188. },
  189. data() {
  190. // 这里存放数据
  191. return {
  192. showTinymce: false,
  193. btnList: '',
  194. activeName: 'first',
  195. formInline: {
  196. search: '', // 搜索字段
  197. shelveState: '', // 上架状态 1-上架 0-不上架 null-全部
  198. stock: '', // 库存状态 1-有库存 0-无库存 null-全部
  199. classifyId: '', // 最下级分类id
  200. page: 1, // 当前页
  201. pageSize: 10
  202. },
  203. batchAdd: false,
  204. batchFileList: [],
  205. total: 1,
  206. tableData: [],
  207. categoryList: [],
  208. UploadUrl: uploadUrl,
  209. headers: {
  210. 'Authorization-business': getToken()
  211. },
  212. vipPriceVisible: false,
  213. productId: 0,
  214. mode: 1,
  215. productData: [],
  216. gradeList: [],
  217. commidyVisible: false,
  218. commId: 0,
  219. brandList: [],
  220. voucherList: []
  221. }
  222. },
  223. computed: {
  224. getBrandName() {
  225. return (row) => {
  226. const find = this.brandList.find((item) => item.id === row.brandId)
  227. if (find) return find.brandName
  228. return '-'
  229. }
  230. }
  231. },
  232. created () {
  233. getVoucher({
  234. page: 1,
  235. pageSize: 100,
  236. voucherId: '',
  237. voucherName: ''
  238. }).then(res => { // 获取可选的代金卷,用于创建和修改商品时定义代金卷的使用规则
  239. this.voucherList = res.data.list
  240. this.voucherList.push({
  241. voucherName: '不使用代金卷',
  242. updateTime: '123123123123',
  243. ratio: 'xxx',
  244. enabled: '666',
  245. id: '0',
  246. desc: '不支持代金卷'
  247. })
  248. })
  249. },
  250. mounted() {
  251. this.getBrandList()
  252. this.getAll(this.formInline)
  253. this.queryAllCategory()
  254. this.btnList = getBtnList()
  255. },
  256. // 方法集合
  257. methods: {
  258. async getBrandList() {
  259. const { data } = await getBrandList()
  260. this.brandList = data
  261. },
  262. cancelForm() {
  263. this.commidyVisible = false
  264. this.formInline = {
  265. search: '',
  266. shelveState: '',
  267. stock: '',
  268. classifyId: '',
  269. page: 1,
  270. pageSize: 10
  271. }
  272. this.getAll(this.formInline)
  273. this.closeModal()
  274. },
  275. closeModal() {
  276. this.showTinymce = false
  277. this.$refs.child.last()
  278. this.$refs.child.reset()
  279. },
  280. btnClick(id) {
  281. if (id.permissionName === '批量导入') {
  282. this.sends()
  283. } else if (id.permissionName === '新增商品') {
  284. this.add()
  285. }
  286. },
  287. handleSizeChange(val) {
  288. this.formInline.pageSize = val
  289. this.getAll(this.formInline)
  290. },
  291. handleCurrentChange(val) {
  292. this.formInline.page = val
  293. this.getAll(this.formInline)
  294. },
  295. // 查询
  296. search() {
  297. this.total = 1
  298. this.formInline.page = 1
  299. this.getAll(this.formInline)
  300. },
  301. // 重置
  302. clear() {
  303. this.formInline = {
  304. search: '', // 搜索字段
  305. shelveState: '', // 上架状态 1-上架 0-不上架 null-全部
  306. stock: '', // 库存状态 1-有库存 0-无库存 null-全部
  307. classifyId: '', // 最下级分类id
  308. page: 1, // 当前页
  309. pageSize: 10
  310. }
  311. this.search()
  312. },
  313. // 新增商品
  314. add() {
  315. this.showTinymce = true
  316. if (this.commId) {
  317. this.$refs.child.reset()
  318. }
  319. this.commidyVisible = true
  320. this.commId = 0
  321. // this.$router.push({ name: 'addCommodity', params: { id: '1' }})
  322. },
  323. // 导出商品
  324. async productDataExport() {
  325. this.$message({
  326. message: '数据导出中,请勿重复操作!',
  327. type: 'success'
  328. })
  329. const res = await productExport(this.formInline)
  330. if (!res) { return }
  331. const blob = new Blob([ res ], { type: 'application/vnd.ms-excel' })
  332. const fileName = '商品数据明细表.xls'
  333. if ('download' in document.createElement('a')) {
  334. // 非IE下载
  335. const elink = document.createElement('a')
  336. elink.download = fileName
  337. elink.href = URL.createObjectURL(blob)
  338. elink.style.display = 'none'
  339. document.body.appendChild(elink)
  340. elink.click()
  341. URL.revokeObjectURL(elink.href) // 释放URL 对象
  342. document.body.removeChild(elink)
  343. } else {
  344. // IE10+下载
  345. navigator.msSaveBlob(blob, fileName)
  346. }
  347. },
  348. // 批量导入
  349. sends() {
  350. this.batchAdd = true
  351. this.batchFileList = []
  352. },
  353. // 编辑商品
  354. async edit(row) {
  355. this.showTinymce = true
  356. this.commidyVisible = true
  357. this.commId = row.productId
  358. this.$nextTick(() => {
  359. this.$refs.child?.details()
  360. })
  361. // this.$router.push({
  362. // name: 'addCommodity',
  363. // params: { productId: row.productId }
  364. // })
  365. // let res = await getClassifyGetById({ productId: row.productId });
  366. // console.log(res);
  367. },
  368. // 设置会员价
  369. setVipPrice(row) {
  370. var _ = this
  371. this.productId = row.productId
  372. getProductMembers({ productId: row.productId }).then((res) => {
  373. if (res.code === '') {
  374. _.productData = res.data
  375. if (_.productData && _.productData.length > 0) {
  376. _.gradeList = []
  377. const _memberPrices = _.productData[0].memberPrices
  378. _memberPrices.forEach(function (item, i) {
  379. _.gradeList.push(item.memberLevelName)
  380. })
  381. _.mode = _.productData[0].mode ? _.productData[0].mode : 1
  382. _.vipPriceVisible = true
  383. }
  384. }
  385. })
  386. },
  387. // 设置会员价提交
  388. vipPriceSubmit() {
  389. for (let i = 0; i < this.productData.length; i++) {
  390. this.productData[i].mode = this.mode
  391. for (let j = 0; j < this.productData[i].memberPrices.length; j++) {
  392. this.productData[i].memberPrices[j].mode = this.mode
  393. var _price = this.productData[i].memberPrices[j].price
  394. if (!_price) {
  395. this.$message({
  396. type: 'warning',
  397. message: '会员价格不能为空!'
  398. })
  399. return false
  400. } else if (this.productData[i].mode === 1) {
  401. if (_price <= 0 || _price >= 10) {
  402. this.$message({
  403. type: 'warning',
  404. message: '会员折数必须大于0小于10!'
  405. })
  406. return false
  407. }
  408. } else if (this.productData[i].mode === 2) {
  409. if (_price > this.productData[i].price) {
  410. this.$message({
  411. type: 'warning',
  412. message: '会员价格不能大于原价!'
  413. })
  414. return false
  415. }
  416. }
  417. }
  418. }
  419. setProductMember({ productId: this.productId, members: this.productData }).then((res) => {
  420. if (res.code === '') {
  421. this.$message({
  422. type: 'success',
  423. message: '设置成功!'
  424. })
  425. this.getAll(this.formInline)
  426. this.vipPriceVisible = false
  427. }
  428. })
  429. },
  430. // 清空会员价
  431. clearProductMember() {
  432. console.log(this.productData, 'this.productData')
  433. this.$confirm('该商品所有旧设置的会员价将被清除, 是否继续?', '提示', {
  434. confirmButtonText: '确定',
  435. cancelButtonText: '取消',
  436. type: 'warning'
  437. }).then(() => {
  438. clearProductMember({ productId: this.productId }).then((res) => {
  439. if (res.code === '') {
  440. this.productData.map((item) => {
  441. item.memberPrices.map((itemChild) => {
  442. itemChild.price = null
  443. })
  444. })
  445. this.$message.success('清除成功')
  446. // this.vipPriceVisible = false
  447. }
  448. })
  449. })
  450. },
  451. // 删除商品
  452. del(row) {
  453. this.$confirm('选中数据将被永久删除, 是否继续?', '提示', {
  454. confirmButtonText: '确定',
  455. cancelButtonText: '取消',
  456. type: 'warning'
  457. })
  458. .then(() => {
  459. getClassifyDelete({ productId: row.productId }).then((res) => {
  460. if (res.code === '') {
  461. this.$message({
  462. type: 'success',
  463. message: '删除成功!'
  464. })
  465. this.getAll(this.formInline)
  466. }
  467. })
  468. })
  469. .catch(() => { })
  470. },
  471. // 商品上下架
  472. async down(row) {
  473. console.log(row.shelveState)
  474. if (row.shelveState) {
  475. console.log(111)
  476. const res = await getClassifyStart({
  477. productId: row.productId,
  478. shelveState: 0
  479. })
  480. if (res.code === '') {
  481. this.$message({
  482. type: 'success',
  483. message: '下架成功!'
  484. })
  485. this.getAll(this.formInline)
  486. }
  487. } else {
  488. const res = await getClassifyStart({
  489. productId: row.productId,
  490. shelveState: 1
  491. })
  492. if (res.code === '') {
  493. this.$message({
  494. type: 'success',
  495. message: '上架成功!'
  496. })
  497. this.getAll(this.formInline)
  498. }
  499. }
  500. },
  501. // 初始化查询所有数据
  502. async getAll(formInline) {
  503. this.formInline.classifyId =
  504. this.formInline.classifyId[2] ||
  505. this.formInline.classifyId[1] ||
  506. this.formInline.classifyId[0] ||
  507. this.formInline.classifyId
  508. const res = await getClassifyGetAll(formInline);
  509. this.total = res.data.total
  510. this.tableData = res.data.list
  511. },
  512. // 初始化查询所有分类
  513. async queryAllCategory() {
  514. const res = await getClassify()
  515. this.categoryList = res.data
  516. this.handleRemoveEmptyChild(this.categoryList)
  517. },
  518. handleRemoveEmptyChild(arr) {
  519. for (let i = 0; i < arr.length; i++) {
  520. if (arr[i].childs && Array.isArray(arr[i].childs)) {
  521. this.handleRemoveEmptyChild(arr[i].childs)
  522. }
  523. if (arr[i].childs && Array.isArray(arr[i].childs) && arr[i].childs.length === 0) {
  524. delete arr[i].childs
  525. }
  526. }
  527. },
  528. // *********************导入部分
  529. UploadUrls() {
  530. // 因为action参数是必填项,我们使用二次确认进行文件上传时,直接填上传文件的url会因为没有参数导致api报404,所以这里将action设置为一个返回为空的方法就行,避免抛错
  531. return ''
  532. },
  533. // 下载模板
  534. poDownload() {
  535. downloadTemplate().then((res) => {
  536. console.log(res, 1111)
  537. // const content = res
  538. const blob = new Blob([ res ])
  539. const fileName = '批量导入商品模板.xlsx'
  540. if ('download' in document.createElement('a')) {
  541. // 非IE下载
  542. const elink = document.createElement('a')
  543. elink.download = fileName
  544. elink.style.display = 'none'
  545. elink.href = URL.createObjectURL(blob)
  546. document.body.appendChild(elink)
  547. elink.click()
  548. URL.revokeObjectURL(elink.href) // 释放URL 对象
  549. document.body.removeChild(elink)
  550. } else {
  551. // IE10+下载
  552. navigator.msSaveBlob(blob, fileName)
  553. }
  554. })
  555. },
  556. // 导入
  557. uploadFile() {
  558. if (this.batchFileList.length === 0) {
  559. this.$message.warning('请上传文件')
  560. } else {
  561. const formDate = new FormData()
  562. formDate.append('file', this.batchFileList[0])
  563. console.log(formDate.get('file'))
  564. importProduct(formDate).then((res) => {
  565. console.log(res)
  566. if (res.code === '') {
  567. this.$message.success('导入成功')
  568. this.batchAdd = false
  569. this.batchFileList = []
  570. this.getAll(this.formInline)
  571. }
  572. })
  573. }
  574. },
  575. // 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传
  576. beforeUploadFile(file) {
  577. console.log('before upload')
  578. console.log(file)
  579. const extension = file.name.substring(file.name.lastIndexOf('.') + 1)
  580. const size = file.size / 1024 / 1024
  581. if (extension !== 'xlsx') {
  582. this.$message.warning('只能上传后缀是.xlsx的文件')
  583. }
  584. if (size > 10) {
  585. this.$message.warning('文件大小不得超过10M')
  586. }
  587. },
  588. // 文件状态改变时的钩子
  589. fileChange(file, batchFileList) {
  590. console.log(file.raw)
  591. this.batchFileList.push(file.raw)
  592. console.log(this.batchFileList)
  593. },
  594. batchRemove(file, batchFileList) {
  595. this.batchFileList = []
  596. },
  597. // 文件超出个数限制时的钩子
  598. exceedFile(files, batchFileList) {
  599. this.$message.warning(`只能选择1个文件`)
  600. },
  601. // 文件上传成功时的钩子
  602. handleSuccess(res, file, batchFileList) {
  603. this.$message.success('文件上传成功')
  604. },
  605. // 文件上传失败时的钩子
  606. handleError() {
  607. this.$message.error('文件上传失败')
  608. },
  609. // 切换优惠方式清除内容
  610. modeChange() {
  611. this.productData.forEach((item) => {
  612. item.memberPrices.forEach((itemJ) => {
  613. itemJ.price = ''
  614. })
  615. })
  616. }
  617. }
  618. }
  619. </script>
  620. <style lang='scss' scoped>
  621. //@import url(); 引入公共css类
  622. @import url("../../../styles/elDialog.scss");
  623. .pending {
  624. padding: 30px;
  625. }
  626. .fenye {
  627. margin-top: 20px;
  628. }
  629. .clickMe {
  630. color: #3a68f2;
  631. cursor: pointer;
  632. }
  633. .uploadDialog {
  634. // display: flex;
  635. // flex-direction: column;
  636. // justify-content: center;
  637. >>>.el-upload__tip {
  638. display: inline-block;
  639. width: 360px;
  640. margin: auto;
  641. }
  642. }
  643. .vipDialog {
  644. .priceTable {
  645. table {
  646. width: 100%;
  647. text-align: center;
  648. border-left: 1px solid #EBEEF5;
  649. border-bottom: 1px solid #EBEEF5;
  650. font-size: 14px;
  651. color: #606266;
  652. border-collapse: collapse;
  653. tr {
  654. border-top: 1px solid #EBEEF5;
  655. th {
  656. padding: 12px 0;
  657. background: #EEF3FF;
  658. color: #333;
  659. border-right: 1px solid #EBEEF5;
  660. }
  661. td {
  662. padding: 12px 0;
  663. border-right: 1px solid #EBEEF5;
  664. &.td-input {
  665. .el-input {
  666. width: 80px;
  667. margin-right: 0;
  668. }
  669. }
  670. &:nth-child(1),
  671. &:nth-child(2) {
  672. width: 80px;
  673. }
  674. .el-input {
  675. width: 100px;
  676. margin-right: 10px;
  677. }
  678. }
  679. }
  680. }
  681. }
  682. .clearBtn {
  683. margin-top: 20px;
  684. }
  685. }
  686. </style>