goods-add.vue 24 KB

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