goods-add.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. <template>
  2. <div v-loading="loading">
  3. <div class="white-box">
  4. <el-form ref="form" label-width="auto" class="form-page">
  5. <el-form-item :label="$t('shop.productName')"><!-- 商品名称 -->
  6. <el-input v-model="form.goodsName"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="$t('shop.memberDiscount')"><!-- 会员折扣 -->
  9. <el-input v-model="form.sellDiscount"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="$t('shop.productType')"><!-- 商品类型 -->
  12. <el-checkbox v-for="(value,key) in GiftTypeArr" v-model="form.giftType[key-1]" :key="key" >{{value.name}}</el-checkbox>
  13. </el-form-item>
  14. <el-form-item :label="$t('shop.productCode')"><!-- 商品编号 -->
  15. <el-input v-model="form.goodsNo"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="$t('shop.unit')"><!-- 单位 -->
  18. <el-input v-model="form.unit"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="$t('shop.standardPrice')">
  21. <el-input-number v-model="form.sellPriceStandard" @input="handleInput" class="left-aligned-input" :precision="2" :step="0.1" :min="0" :controls="false" style="text-align: left"></el-input-number>
  22. </el-form-item>
  23. <el-form-item :label="$t('shop.priceBV')" v-show="pvDisabled"><!-- 价格BV -->
  24. <el-input v-model="form.pricePv"></el-input>
  25. </el-form-item>
  26. <el-form-item :label="$t('shop.availableCountries')"><!-- 可购买国家 -->
  27. <el-button type="primary" size="small" :disabled="!form.sellPriceStandard" @click="editAvailableCountries">{{ $t('shop.modifyAvailableCountries') }}</el-button>
  28. </el-form-item>
  29. <el-form-item :label="$t('shop.inventory')"><!-- 库存 -->
  30. <el-input v-model="form.storeNums"></el-input>
  31. </el-form-item>
  32. <el-form-item :label="$t('shop.productDetails')"><!-- 商品详情 -->
  33. <el-input
  34. type="textarea"
  35. :rows="2"
  36. :placeholder="$t('shop.enterContentNotice')"
  37. v-model="form.content">
  38. </el-input><!-- 请输入内容 -->
  39. </el-form-item>
  40. <el-form-item :label="$t('shop.order')"><!-- 排序 -->
  41. <el-input v-model="form.sort"></el-input>
  42. </el-form-item>
  43. <el-form-item :label="$t('shop.uploadImages')"><!-- 上传图片 -->
  44. <div class='up_load'>
  45. <Upload
  46. :request-route="'v1/shop/upload'"
  47. width="400px"
  48. height="160px"
  49. @on-success="upLoadSuccess"
  50. ></Upload>
  51. </div>
  52. </el-form-item>
  53. <el-form-item>
  54. <el-button type="primary" @click="addSubmit" :loading="submitButtonStat">{{ $t('table.add') }}<!-- 添加 --></el-button>
  55. </el-form-item>
  56. </el-form>
  57. </div>
  58. <el-dialog :title="$t('shop.modifyAvailableCountries')" :visible.sync="editAvailableCountriesDialog" top="3%" width="60%"><!-- 修改可购买国家 -->
  59. <el-form ref="form" label-width="130px" class="">
  60. <el-form-item :label="$t('shop.productName')"><!-- 商品名称 -->
  61. <el-input v-model="form.goodsName" disabled></el-input>
  62. </el-form-item>
  63. <el-form-item :label="$t('transportationConfig.countryName')">
  64. <el-input
  65. v-model="searchQuery"
  66. placeholder=""
  67. @input="updateTableData"
  68. ></el-input>
  69. </el-form-item>
  70. </el-form>
  71. <el-form :model="availableCountriesTableForm" ref="availableCountriesTableForm" :rules="rules">
  72. <el-table v-show="!searchQuery" :data="availableCountriesTableForm.availableCountriesList" ref="multipleTable" @row-click="handleRowClick" @selection-change="handleSelectionChange" @select="selectOne" :selectable="isRowSelectable" :header-cell-class-name="cellClass" stripe height="500" style="width: 100%;">
  73. <el-table-column
  74. type="selection"
  75. width="55"
  76. :selectable="selectable"
  77. :show-select-all="false"
  78. >
  79. </el-table-column>
  80. <el-table-column prop="NAME" :label="$t('transportationConfig.countryName')" />
  81. <el-table-column prop="LOCAL_CURRENCY_NAME" :label="$t('exchangeRateConfig.currencyType')" />
  82. <el-table-column :label="$t('shop.salesPrice')" min-width="100px;">
  83. <template slot-scope="scope">
  84. <el-form-item :prop="`availableCountriesList.${scope.$index}.sellPrice`" >
  85. <el-input-number v-model="scope.row.sellPrice" :precision="2" :min="0" :controls="false" clearable></el-input-number>
  86. </el-form-item>
  87. </template>
  88. </el-table-column>
  89. <el-table-column :label="$t('shop.marketPrice')" min-width="100px;">
  90. <template slot-scope="scope">
  91. <el-form-item :prop="`availableCountriesList.${scope.$index}.marketPrice`">
  92. <el-input-number v-model="scope.row.marketPrice" :precision="2" :min="0" :controls="false" clearable></el-input-number>
  93. </el-form-item>
  94. </template>
  95. </el-table-column>
  96. <el-table-column :label="$t('shop.taxRate')" min-width="100px;">
  97. <template slot-scope="scope">
  98. <el-form-item :prop="`availableCountriesList.${scope.$index}.taxRate`" >
  99. <div class="flexJfAc">
  100. <el-input-number v-model="scope.row.taxRate" :precision="2" :step="0.1" :min="0" :controls="false"></el-input-number><span>%</span>
  101. </div>
  102. </el-form-item>
  103. </template>
  104. </el-table-column>
  105. </el-table>
  106. <el-table v-show="searchQuery" :data="availableCountriesTableForm.tempData" ref="multipleTableTemp" @row-click="handleRowClickTemp" @selection-change="handleSelectionChangeTemp" @select="selectOneTemp" :selectable="isRowSelectable" :header-cell-class-name="cellClass" stripe height="500" style="width: 100%;">
  107. <el-table-column
  108. type="selection"
  109. width="55"
  110. :selectable="selectable"
  111. :show-select-all="false"
  112. >
  113. </el-table-column>
  114. <el-table-column prop="NAME" :label="$t('transportationConfig.countryName')" />
  115. <el-table-column prop="LOCAL_CURRENCY_NAME" :label="$t('exchangeRateConfig.currencyType')" />
  116. <el-table-column :label="$t('shop.salesPrice')" min-width="100px;">
  117. <template slot-scope="scope">
  118. <el-form-item :prop="`tempData.${scope.$index}.sellPrice`" >
  119. <el-input-number v-model="scope.row.sellPrice" :controls="false" clearable></el-input-number>
  120. </el-form-item>
  121. </template>
  122. </el-table-column>
  123. <el-table-column :label="$t('shop.marketPrice')" min-width="100px;">
  124. <template slot-scope="scope">
  125. <el-form-item :prop="`tempData.${scope.$index}.marketPrice`">
  126. <el-input-number v-model="scope.row.marketPrice" :precision="2" :min="0" :controls="false" clearable></el-input-number>
  127. </el-form-item>
  128. </template>
  129. </el-table-column>
  130. <el-table-column :label="$t('shop.taxRate')" min-width="100px;">
  131. <template slot-scope="scope">
  132. <el-form-item :prop="`tempData.${scope.$index}.taxRate`" >
  133. <div class="flexJfAc">
  134. <el-input-number v-model="scope.row.taxRate" :precision="2" :step="0.1" :min="0" :controls="false"></el-input-number><span>%</span>
  135. </div>
  136. </el-form-item>
  137. </template>
  138. </el-table-column>
  139. </el-table>
  140. </el-form>
  141. <div slot="footer" class="dialog-footer">
  142. <el-button type="warning" size="mini" @click="editAvailableCountriesDialog = false">{{ $t('table.cancel') }}</el-button>
  143. <el-button type="primary" size="mini" @click="submitAvailableCountries">{{ $t('table.confirm') }}</el-button>
  144. </div>
  145. </el-dialog>
  146. </div>
  147. </template>
  148. <script>
  149. import { addGoods, getAddGoodsConfig, getUploadToken } from '@/api/shop'
  150. import { getCountries } from "@/api/site"
  151. import Upload from '@/components/Upload'
  152. import baseInfo from '@/utils/baseInfo'
  153. export default {
  154. name: 'goods-add',
  155. components: {Upload},
  156. mounted () {
  157. this.getData()
  158. this.getFileToken()
  159. },
  160. data () {
  161. return {
  162. dialogImageUrl: '',
  163. dialogVisible: false,
  164. disabled: false,
  165. loading: false,
  166. file: null,
  167. uploadToken: '',
  168. pvSplitOptions: [
  169. {
  170. value: '0',
  171. label: this.$t('common.no')
  172. },
  173. {
  174. value: '1',
  175. label: this.$t('common.yes')
  176. }],
  177. form: {
  178. goodsName: '',
  179. type: '',
  180. giftType: [false, false, false, false],
  181. sellType: [false, false],
  182. goodsNo: '',
  183. unit: '',
  184. marketPrice: '',
  185. sellPrice: '',
  186. pvSplit: '0',
  187. pricePv: '',
  188. point: '',
  189. storeNums: '',
  190. content: '',
  191. sort: '',
  192. discount: '',
  193. cover: '',
  194. textarea: '',
  195. sellDiscount: '',
  196. categoryType: 1,
  197. sellPriceStandard: undefined,
  198. taxRate: 0,
  199. nature: []
  200. },
  201. submitButtonStat: false,
  202. goodsType: [],
  203. GiftTypeArr: [],
  204. categoryType: [],
  205. sellType: null,
  206. countries: [],
  207. width: '100px',
  208. height: '100px',
  209. pvDisabled: true,
  210. exchangeRate: baseInfo.exchangeRate(),
  211. editAvailableCountriesDialog: false,
  212. availableCountriesTableForm: {
  213. availableCountriesList: [],
  214. tempData:[],
  215. },
  216. multipleSelection: [],
  217. multipleSelectionTemp: [],
  218. rules: {},
  219. rulesTemp: {},
  220. searchQuery: '',
  221. selectionTempData: [],
  222. selectedIds: [], // 存储选中的项的 ID
  223. selectedIdsTemp: [],
  224. }
  225. },
  226. watch: {
  227. dialogVisible (newVal, oldVal) {
  228. console.log(newVal, oldVal)
  229. },
  230. // 监听商品分类,控制PV是否展示
  231. 'form.categoryType': {
  232. deep: true,
  233. handler (modern, origin) {
  234. this.pvDisabled = (parseInt(modern) === 1)
  235. }
  236. },
  237. // 监听商品标准价格,自动计算销售价格
  238. 'form.sellPriceStandard': {
  239. deep: true,
  240. handler(modern, origin) {
  241. if(modern){
  242. this.form.nature = []
  243. this.availableCountriesTableForm.availableCountriesList = []
  244. this.toggleSelection(this.form.nature)
  245. }
  246. }
  247. },
  248. },
  249. computed: {
  250. filteredData() {
  251. if (!this.searchQuery) {
  252. return this.availableCountriesTableForm.availableCountriesList;
  253. }
  254. const query = this.searchQuery.toLowerCase();
  255. // this.$refs.multipleTable.toggleRowSelection(JSON.parse(JSON.stringify(this.multipleSelection)),true)
  256. return this.availableCountriesTableForm.availableCountriesList.filter(row => {
  257. return row.NAME.toLowerCase().includes(query);
  258. });
  259. }
  260. },
  261. methods: {
  262. updateTableData() {
  263. // if (!this.searchQuery) {
  264. // return this.availableCountriesTableForm.availableCountriesList;
  265. // }
  266. // 临时存储原始数据,保持搜索时不改变其他列的值
  267. const query = this.searchQuery.toLowerCase();
  268. // this.$refs.multipleTable.toggleRowSelection(JSON.parse(JSON.stringify(this.multipleSelection)),true)
  269. if (this.availableCountriesTableForm.tempData.length === 0) {
  270. // this.availableCountriesTableForm.tempData = JSON.parse(JSON.stringify(this.availableCountriesTableForm.availableCountriesList));
  271. // this.selectionTempData = JSON.parse(JSON.stringify(this.multipleSelection));
  272. }
  273. // const query = this.searchQuery.toLowerCase();
  274. this.$nextTick(() => {
  275. // 在数据更新后,重新设置选中的项
  276. if(!this.searchQuery){
  277. this.setSelectionTemp();
  278. } else {
  279. this.availableCountriesTableForm.tempData = this.availableCountriesTableForm.availableCountriesList.filter(row => {
  280. // const originalRow = this.availableCountriesTableForm.availableCountriesList.find(item => item.NAME === row.NAME);
  281. // console.log(originalRow);
  282. //
  283. return row.NAME.toLowerCase().includes(query);
  284. });
  285. this.setSelection();
  286. }
  287. });
  288. // this.availableCountriesTableForm.availableCountriesList.forEach(row => {
  289. // if (row.NAME.toLowerCase().includes(query)) {
  290. // } else {
  291. // const originalRow = this.filteredData.find(item => item.NAME === row.NAME);
  292. // if (originalRow) {
  293. // if(originalRow.selected === true){
  294. // console.log('originalRow true')
  295. // }
  296. // row = originalRow;
  297. //
  298. // }
  299. // }
  300. // });
  301. // this.$refs.multipleTable.toggleRowSelection(this.selectionTempData)
  302. },
  303. setSelection() {
  304. this.availableCountriesTableForm.tempData.forEach(row => {
  305. if (this.selectedIds.includes(row.ID)) {
  306. this.$nextTick(() => {
  307. this.$refs.multipleTableTemp.toggleRowSelection(row, true);
  308. });
  309. }
  310. });
  311. },
  312. setSelectionTemp() {
  313. // this.$refs.multipleTable.clearSelection();
  314. let selectedIds = JSON.parse(JSON.stringify(this.selectedIds))
  315. let selectedIdsTemp = JSON.parse(JSON.stringify(this.selectedIdsTemp))
  316. let list = selectedIds.concat(selectedIdsTemp)
  317. this.availableCountriesTableForm.availableCountriesList.forEach(row => {
  318. if (list.includes(row.ID)) {
  319. this.$refs.multipleTable.toggleRowSelection(row, true);
  320. }
  321. });
  322. },
  323. handleRowClick(row) {
  324. console.log(row)
  325. // 手动控制行点击时的选中状态
  326. // this.$refs.multipleTable.toggleRowSelection(row,true);
  327. },
  328. handleRowClickTemp(row) {
  329. console.log(row)
  330. console.log('temp 选中')
  331. // 手动控制行点击时的选中状态
  332. // this.$refs.multipleTableTemp.toggleRowSelection(row,true);
  333. },
  334. handleInputBlur(row) {
  335. // 当输入框失去焦点时,将修改应用到原始数据
  336. let originalRow = this.availableCountriesTableForm.tempData.find(item => item.NAME === row.NAME);
  337. if (originalRow) {
  338. originalRow = row;
  339. }
  340. },
  341. handleInput(value) {
  342. // console.log(value)
  343. // if (value < 0 || value === 0) {
  344. // this.form.sellPriceStandard = "";
  345. // }
  346. },
  347. // 隐藏表头中的全选框
  348. cellClass(row) {
  349. if (row.columnIndex === 0) {
  350. return 'disabledCheck'
  351. }
  352. },
  353. isRowSelectable(row, index) {
  354. return row.CURRENCY_PRODUCT_RATE == 0;
  355. },
  356. selectable(row, index) {
  357. return row.CURRENCY_PRODUCT_RATE !== 0;
  358. },
  359. taxRateInput(scope){
  360. // 检查输入值是否为正数
  361. const value = scope.row.taxRate
  362. if (value > 0) {
  363. let moment = this.availableCountriesTableForm.availableCountriesList[scope.$index]
  364. this.$set(this.availableCountriesTableForm.availableCountriesList,scope.$index, moment)
  365. } else {
  366. scope.row.taxRate = ''; // 更新输入框的值
  367. }
  368. },
  369. marketPriceInput(scope){
  370. const value = scope.row.marketPrice
  371. if (value > 0) {
  372. let moment = this.availableCountriesTableForm.availableCountriesList[scope.$index]
  373. this.$set(this.availableCountriesTableForm.availableCountriesList,scope.$index, moment)
  374. } else {
  375. scope.row.marketPrice = ''; // 更新输入框的值
  376. }
  377. },
  378. edit(){
  379. },
  380. submitAvailableCountries(){
  381. this.$refs.availableCountriesTableForm.validate((valid) => {
  382. if (valid) {
  383. this.form.nature = this.multipleSelection
  384. this.editAvailableCountriesDialog = false
  385. } else {
  386. return false;
  387. }
  388. });
  389. },
  390. handleSelectionChange(val) {
  391. this.multipleSelection = val;
  392. // 更新选中的项
  393. this.selectedIds = val.map(item => item.ID);
  394. this.updateRules();
  395. },
  396. handleSelectionChangeTemp(val) {
  397. this.multipleSelectionTemp = val;
  398. // 更新选中的项
  399. this.selectedIdsTemp = val.map(item => item.ID);
  400. this.updateRulesTemp();
  401. },
  402. updateRules() {
  403. this.rules = {}; // 重置规则
  404. this.multipleSelection.forEach((row, index) => {
  405. this.rules[`availableCountriesList.${this.availableCountriesTableForm.availableCountriesList.indexOf(row)}.taxRate`] = [
  406. { required: true, message: this.$t('shop.enterTaxRate'), trigger: 'blur' }
  407. ];
  408. });
  409. },
  410. updateRulesTemp() {
  411. this.rules = {}; // 重置规则
  412. this.multipleSelectionTemp.forEach((row, index) => {
  413. this.rules[`tempData.${this.availableCountriesTableForm.tempData.indexOf(row)}.taxRate`] = [
  414. { required: true, message: this.$t('shop.enterTaxRate'), trigger: 'blur' }
  415. ];
  416. });
  417. },
  418. selectOne(selection,row){
  419. row.sellPrice = (row.CURRENCY_PRODUCT_RATE * this.form.sellPriceStandard).toFixed(2)
  420. row.marketPrice = (row.sellPrice * 1.2).toFixed(2)
  421. },
  422. selectOneTemp(selection,row){
  423. row.sellPrice = (row.CURRENCY_PRODUCT_RATE * this.form.sellPriceStandard).toFixed(2)
  424. row.marketPrice = (row.sellPrice * 1.2).toFixed(2)
  425. },
  426. editAvailableCountries(){
  427. this.availableCountriesTableForm.availableCountriesList = this.countries
  428. this.editAvailableCountriesDialog = true
  429. this.toggleSelection(this.form.nature)
  430. // getCountries({'filter': 1}).then(response => {
  431. // this.availableCountriesTableForm.availableCountriesList = response
  432. // this.editAvailableCountriesDialog = true
  433. // // this.multipleSelection = this.form.nature
  434. // this.toggleSelection(this.form.nature)
  435. // }).catch(err => {
  436. //
  437. // })
  438. },
  439. toggleSelection(rows) {
  440. if (rows) {
  441. rows.forEach(item => { // checkedData为已选数据
  442. this.$nextTick( ()=>{
  443. this.availableCountriesTableForm.availableCountriesList.find(obj => { // 表单数据
  444. if(item.ID === obj.ID) {
  445. obj.sellPrice = item.sellPrice
  446. obj.marketPrice = item.marketPrice
  447. obj.taxRate = item.taxRate
  448. this.$refs.multipleTable.toggleRowSelection(obj)
  449. }
  450. })
  451. })
  452. })
  453. } else {
  454. this.$refs.multipleTable.clearSelection();
  455. }
  456. },
  457. handleRemove (file) {
  458. console.log(file)
  459. },
  460. upLoadSuccess (file) {
  461. this.form.cover = file
  462. },
  463. handlePictureCardPreview (file) {
  464. this.dialogImageUrl = file.url
  465. this.dialogVisible = true
  466. this.file = file
  467. // console.log(file);
  468. },
  469. handleDownload (file) {
  470. console.log(file)
  471. },
  472. getFileToken () {
  473. getUploadToken().then(response => {
  474. this.uploadToken = response.data
  475. }).catch(err => {
  476. this.$message({
  477. message: this.$t('common.modifyData'),
  478. type: 'info'
  479. })
  480. })
  481. },
  482. getData (page, pageSize) {
  483. getAddGoodsConfig(this.filterModel).then(response => {
  484. this.categoryType = response.data.categoryType
  485. this.goodsType = response.data.goodsType
  486. this.GiftTypeArr = response.data.giftType
  487. this.sellType = response.data.sellType
  488. this.countries = response.data.countries
  489. }).catch(err => {
  490. this.$message({
  491. message: err,
  492. type: 'error'
  493. })
  494. })
  495. },
  496. addSubmit () {
  497. this.submitButtonStat = true
  498. let path = 'shop/goods-add'
  499. let sen_gift = []
  500. this.form.giftType.map((item, index) => {
  501. if (item) {
  502. sen_gift.push((index + 1).toString())
  503. }
  504. })
  505. let postData = {
  506. goodsName: this.form.goodsName,
  507. sellDiscount: this.form.sellDiscount,
  508. discount: this.form.type.discount,
  509. type: this.form.type,
  510. giftType: sen_gift,
  511. // sellType: sellType,
  512. sellType: this.form.sellType,
  513. pvSplit: this.form.pvSplit,
  514. categoryType: this.form.categoryType,
  515. goodsNo: this.form.goodsNo,
  516. unit: this.form.unit,
  517. // marketPrice: this.form.marketPrice,
  518. // sellPrice: this.form.sellPrice,
  519. sellPriceStandard: this.form.sellPriceStandard,
  520. pricePv: this.form.pricePv,
  521. // point: this.form.point,
  522. storeNums: this.form.storeNums,
  523. content: this.form.content,
  524. sort: this.form.sort,
  525. cover: this.form.cover,
  526. // taxRate: this.form.taxRate
  527. nature: this.form.nature,
  528. }
  529. addGoods(postData).then(response => {
  530. this.$message({
  531. message: response.data,
  532. type: 'success'
  533. })
  534. this.submitButtonStat = false
  535. this.$router.go(-1)
  536. }).catch(err => {
  537. this.$message({
  538. message: err,
  539. type: 'error'
  540. })
  541. this.submitButtonStat = false
  542. })
  543. }
  544. }
  545. }
  546. </script>
  547. <style lang="scss" scoped>
  548. /* 小于760 */
  549. @media (max-width:759px) {
  550. ::v-deep .el-input {
  551. width: 100% !important;
  552. }
  553. ::v-deep .el-input-number {
  554. width: 100% !important;
  555. .el-input {
  556. width: auto !important;
  557. padding: 0 5px;
  558. }
  559. }
  560. ::v-deep .el-input-number--medium {
  561. width: 100% !important;
  562. }
  563. ::v-deep .el-select {
  564. width: 100% !important;
  565. }
  566. ::v-deep .el-textarea {
  567. width: 100% !important;
  568. }
  569. ::v-deep .image-uploader {
  570. width: 100% !important;
  571. }
  572. ::v-deep i.el-icon-plus.uploader-icon {
  573. width:100% !important;
  574. }
  575. ::v-deep .form-page {
  576. width:100%;
  577. padding-left: 1%;
  578. }
  579. ::v-deep img {
  580. width: 100% !important;
  581. height: 100% !important;
  582. }
  583. }
  584. @media (min-width:760px) {
  585. ::v-deep .el-input {
  586. width: 400px !important;
  587. }
  588. ::v-deep .el-input-number {
  589. width: 100% !important;
  590. .el-input {
  591. width: auto !important;
  592. padding: 0 5px;
  593. }
  594. }
  595. ::v-deep .el-input-number--medium {
  596. width: 100% !important;
  597. }
  598. ::v-deep .el-select {
  599. width: 400px !important;
  600. }
  601. ::v-deep .el-textarea {
  602. width: 400px !important;
  603. }
  604. ::v-deep .upload-container {
  605. width: 400px !important;
  606. }
  607. ::v-deep .form-page {
  608. width:100%;
  609. padding-left: 10%;
  610. }
  611. }
  612. .el-input{
  613. width: 90%!important;
  614. }
  615. /* 去掉全选按钮 */
  616. ::v-deep .el-table .disabledCheck .cell .el-checkbox__inner {
  617. display: none !important;
  618. }
  619. ::v-deep .el-table .disabledCheck .cell::before {
  620. content: '';
  621. text-align: center;
  622. line-height: 37px;
  623. }
  624. .left-aligned-input .el-input-number__inner {
  625. text-align: left;
  626. }
  627. ::v-deep .el-input-number .el-input__inner {
  628. text-align: left;
  629. }
  630. ::v-deep .el-form-item{
  631. //margin-bottom: 16px !important;
  632. transform: translateY(6px);
  633. }
  634. </style>