shopAmend.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372
  1. <template>
  2. <div class="components-container main-cont">
  3. <div style="display: inline-block;font-size:18px;margin-bottom: 15px;">
  4. <a href="#" @click="prev" style="text-decoration:none;font-size: 14px;">
  5. <icon-svg name="jiantou" style="width: 1.2em;height: 1.2em;position: relative;top: 0.3em;"></icon-svg>
  6. 返回
  7. </a>
  8. <span style="display: inline-block;margin: 0 15px;color: #D9D9D9;">|</span>
  9. <span>商品修改</span>
  10. </div>
  11. <div v-loading="tableDataLoading">
  12. <div style="position: relative;">
  13. <el-row>
  14. <el-col :span="8">
  15. <span>商品名称:</span>
  16. <el-input style="width: 200px;" class="margin15" placeholder="请输入商品标题" v-model="goodsName"
  17. autosize></el-input>
  18. </el-col>
  19. <el-col :span="8">
  20. <span>商品分类:</span>
  21. <el-select v-model="classifyId" class="margin15" placeholder="请选择商品类型" style="width:200px;"
  22. @change="handleChange1">
  23. <el-option v-for="(item,index) in typeDatas" :key="index" :label="item.classifyName"
  24. :value="item.classifyId">
  25. </el-option>
  26. </el-select>
  27. </el-col>
  28. <el-col :span="8">
  29. <span>商品原价:</span>
  30. <el-input style="width:200px;" class="margin15" placeholder="请输入商品原价" type="number" :min="0"
  31. :controls="false" v-model="originalMoney" autosize></el-input>
  32. </el-col>
  33. <el-col :span="8">
  34. <span>商品售价:</span>
  35. <el-input style="width:200px;" class="margin15" placeholder="请输入商品售价" type="number" :min="0"
  36. :controls="false" v-model="goodsMoney" autosize></el-input>
  37. </el-col>
  38. <el-col :span="8">
  39. <span>打包费:</span>
  40. <el-input style="width:200px;" class="margin15" placeholder="请输入打包费" type="number" :min="0"
  41. :controls="false" v-model="packMoney" autosize></el-input>
  42. </el-col>
  43. <el-col :span="8">
  44. <span>商品销量:</span>
  45. <el-input style="width:200px;" class="margin15" placeholder="请输入商品销量" type="number" :min="0"
  46. :controls="false" v-model="sales" autosize></el-input>
  47. </el-col>
  48. <!-- <el-col :span="8">
  49. <span>库存:</span>
  50. <el-input style="width:200px;" class="margin15" placeholder="请输入库存" type="number" :min="0" :controls="false"
  51. v-model="inventory" autosize></el-input>
  52. </el-col> -->
  53. <el-col :span="8">
  54. <span>商品状态:</span>
  55. <el-select v-model="status" class="margin15" placeholder="请选择商品状态" style="width:200px;">
  56. <el-option v-for="(item,index) in statusmain2" :key="item.index" :label="item.label"
  57. :value="item.value">
  58. </el-option>
  59. </el-select>
  60. </el-col>
  61. <el-col :span="8">
  62. <span>商品简介:</span>
  63. <el-input style="width:200px;" class="margin15" placeholder="请输入商品简介" type="text"
  64. :controls="false" v-model="goodsDescribe" autosize></el-input>
  65. </el-col>
  66. </el-row>
  67. <el-row>
  68. <el-col :span="24">
  69. <div style="margin-top: 10px;">
  70. <span>商品标签:</span>
  71. <span class="bqList" v-for="(item,index) in labels" :key="index">{{item}}
  72. <span class="delss">
  73. <i class="el-icon-delete" @click="dels1(index)"></i>
  74. </span>
  75. </span>
  76. <el-input v-model="bq" style="width:200px;" placeholder="请输入标签"
  77. onkeyup="this.value=this.value.replace(/[, ]/g,'')"></el-input>
  78. <!-- <button class="tj" @click="btnTj">添加标签</button> -->
  79. <el-button type="primary" class="tj" size="mini" icon="el-icon-edit" circle @click="btnTj">
  80. </el-button>
  81. </div>
  82. </el-col>
  83. </el-row>
  84. <div style="display: flex;align-items: center;margin: 2% 0;">
  85. <span style="display: inline-block;text-align: right;">商品封面图:</span>
  86. <div
  87. style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
  88. <el-upload class="avatar-uploader" v-model="goodsCover"
  89. action="https://www.daweilinli.com/sqx_fast/alioss/upload" :show-file-list="false"
  90. :on-success="handleAvatarSuccess1">
  91. <img v-if="goodsCover" :src="goodsCover" class="avatar"
  92. style="width: 148px;height: 148px;" />
  93. <i v-else class="el-icon-plus avatar-uploader-icon"
  94. style="font-size: 28px;color: #8c939d"></i>
  95. </el-upload>
  96. </div>
  97. </div>
  98. <div style="display: flex;align-items: center;margin: 2% 0;flex-flow: wrap;">
  99. <span style="display: inline-block;text-align: right;">商品轮播图:</span>
  100. <div v-for="(item,index) of imgs">
  101. <div style="position: relative;margin: 5px;">
  102. <img :src="item" class="avatar" style="width:148px;height: 148px;" />
  103. <div @click="clear(index)" class="divhove">
  104. <i class="el-icon-delete" style="margin: 0;font-size: 18px;color: #fff;"></i>
  105. </div>
  106. </div>
  107. </div>
  108. <div>
  109. <el-upload action="https://www.daweilinli.com/sqx_fast/alioss/upload"
  110. list-type="picture-card" :on-success="handleUploadSuccess" :on-change="handleChange"
  111. :on-remove="handleRemove">
  112. <i class="el-icon-plus"></i>
  113. </el-upload>
  114. </div>
  115. </div>
  116. <div style="display: flex;align-items: center;margin: 2% 0;">
  117. <span style="display: inline-block;text-align: right;">商品规格:</span>
  118. <el-radio-group v-model="guige" @change="guigeChange">
  119. <el-radio :label="0">单规格</el-radio>
  120. <el-radio :label="1">多规格</el-radio>
  121. </el-radio-group>
  122. <div v-if="guigeshow" style="margin-left: 20px;">
  123. <el-select v-model="ruleId" placeholder="请选择商品规格" style="width:200px;"
  124. @change="selectTrigger(ruleId)">
  125. <el-option v-for="(item,index) in specifdata" :key="item.index" :label="item.ruleName"
  126. :value="item.id">
  127. </el-option>
  128. </el-select>
  129. </div>
  130. </div>
  131. <div v-if="ruleValue" style="margin-left: 70px;">
  132. <div class="ruleitem" v-for="(item,index) in ruleValue" :key="index">
  133. <div>{{item.value}} <span @click="deleterule(index)">
  134. <icon-svg name="schu" class="ruleicon"></icon-svg>
  135. </span></div>
  136. <div>
  137. <el-tag :key="tag" v-for="(tag,j) in item.detail.split(',')" closable
  138. :disable-transitions="false" @close="handleClose(tag,j,item)">
  139. {{tag}}
  140. </el-tag>
  141. <el-input class="input-new-tag" v-model="inputValues[index]" ref="saveTagInput" size="small"
  142. style="width:120px;" placeholder="请输入属性名"
  143. @keyup.enter.native="handleInputConfirm(index,item)">
  144. </el-input>
  145. <el-button class="button-new-tag" size="small"
  146. @click="handleInputConfirm(index,item)">添加</el-button>
  147. </div>
  148. </div>
  149. <div style="margin-top:20px;" v-if="ruleshow">
  150. <div v-if="isshow" class="btn_specif">
  151. <el-button type="primary" @click="btnToclick()">添加新规格</el-button>
  152. <el-button type="success" @click="create()">立即生成</el-button>
  153. </div>
  154. </div>
  155. <div style="margin-top:10px;">
  156. <div v-if="!isshow" style="margin-top: 20px;">
  157. <div style="display: inline-block;">
  158. <span style="width:80px;display: inline-block;text-align: right;">规格:</span>
  159. <el-input style="width:50%;" v-model="releobject.value" placeholder="例:颜色"></el-input>
  160. </div>
  161. <div style="display: inline-block;">
  162. <span style="width:80px;display: inline-block;text-align: right;">规格值:</span>
  163. <el-input style="width:50%;" v-model="releobject.detail" placeholder="例:黑色"></el-input>
  164. </div>
  165. <div style="display: inline-block;">
  166. <el-button type="primary" @click="speciTo()">确 定</el-button>
  167. <el-button @click="speciTotwo()">取 消</el-button>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <div style="display: flex;margin-top: 20px;" v-if="valueshow">
  173. <span>商品属性:</span>
  174. <div class="property_table">
  175. <table style="width: 100%;">
  176. <tr style="display:flex;">
  177. <th style="width:120px;text-align: left;" v-for="item in headerData" v-if="item!='图片'">
  178. {{item}}</th>
  179. </tr>
  180. </table>
  181. <el-table :data="valueData">
  182. <el-table-column v-if="detailJson.length == 1" prop="value0" width="120">
  183. </el-table-column>
  184. <el-table-column v-if="detailJson.length == 2" prop="value0" width="120">
  185. </el-table-column>
  186. <el-table-column v-if="detailJson.length == 2" prop="value1" width="120">
  187. </el-table-column>
  188. <el-table-column v-if="detailJson.length == 3" prop="value0" width="120">
  189. </el-table-column>
  190. <el-table-column v-if="detailJson.length == 3" prop="value1" width="120">
  191. </el-table-column>
  192. <el-table-column v-if="detailJson.length == 3" prop="value2" width="120">
  193. </el-table-column>
  194. <el-table-column v-if="detailJson.length == 4" prop="value0" width="120">
  195. </el-table-column>
  196. <el-table-column v-if="detailJson.length == 4" prop="value1" width="120">
  197. </el-table-column>
  198. <el-table-column v-if="detailJson.length == 4" prop="value2" width="120">
  199. </el-table-column>
  200. <el-table-column v-if="detailJson.length == 4" prop="value3" width="120">
  201. </el-table-column>
  202. <el-table-column v-if="detailJson.length == 5" prop="value0" width="120">
  203. </el-table-column>
  204. <el-table-column v-if="detailJson.length == 5" prop="value1" width="120">
  205. </el-table-column>
  206. <el-table-column v-if="detailJson.length == 5" prop="value2" width="120">
  207. </el-table-column>
  208. <el-table-column v-if="detailJson.length == 5" prop="value3" width="120">
  209. </el-table-column>
  210. <el-table-column v-if="detailJson.length == 5" prop="value4" width="120">
  211. </el-table-column>
  212. <!-- <el-table-column prop="skuImg" width="100">
  213. <template slot-scope="scope">
  214. <div class="imgWrap"
  215. style=" width:60px;height:60px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 60px;">
  216. <el-upload style="width: 60px;height: 60px;" class="avatar-uploader" v-model="scope.row.skuImg"
  217. action="https://www.daweilinli.com/sqx_fast/alioss/upload" :show-file-list="false"
  218. :on-success="handleAvatarSuccess">
  219. <img v-if="scope.row.skuImg" :src="scope.row.skuImg" class="avatar"
  220. style="border-radius: 6px;width:60px;height: 60px;" @click="curRowIndex=scope.$index"/>
  221. <i v-else class="el-icon-plus avatar-uploader-icon" @click="curRowIndex=scope.$index"></i>
  222. </el-upload>
  223. </div>
  224. </template>
  225. </el-table-column> -->
  226. <el-table-column prop="skuOriginalPrice" width="120">
  227. <template slot-scope="scope">
  228. <div>
  229. <el-input type="text" v-model="scope.row.skuOriginalPrice"
  230. style="width:80px;font-size:14px;">
  231. </el-input>
  232. </div>
  233. </template>
  234. </el-table-column>
  235. <el-table-column prop="skuPrice" width="120">
  236. <template slot-scope="scope">
  237. <div>
  238. <el-input type="text" v-model="scope.row.skuPrice"
  239. style="width:80px;font-size:14px;">
  240. </el-input>
  241. </div>
  242. </template>
  243. </el-table-column>
  244. <!-- <el-table-column prop="sales" width="120">
  245. <template slot-scope="scope">
  246. <div>
  247. <el-input type="text" v-model="scope.row.sales" style="width:80px;font-size:14px;">
  248. </el-input>
  249. </div>
  250. </template>
  251. </el-table-column> -->
  252. <el-table-column width="120">
  253. <template slot-scope="scope">
  254. <el-button :disabled="!isAuth('userList:delete')" size="mini" type="danger"
  255. @click="deleter(scope.$index)">删除
  256. </el-button>
  257. </template>
  258. </el-table-column>
  259. </el-table>
  260. </div>
  261. </div>
  262. <div style="display: flex;margin-top: 20px;" v-if="valueshow1">
  263. <span>商品属性:</span>
  264. <div class="property_table">
  265. <table style="width: 100%;">
  266. <tr style="display:flex;">
  267. <th style="width:150px;text-align: left;" v-for="item in headerData2" v-if="item!='图片'">
  268. {{item}}</th>
  269. </tr>
  270. </table>
  271. <el-table :data="valueData2">
  272. <!-- <el-table-column prop="skuImg" width="150">
  273. <template slot-scope="scope">
  274. <div class="imgWrap"
  275. style=" width:60px;height:60px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 60px;">
  276. <el-upload style="width: 60px;height: 60px;" class="avatar-uploader" v-model="scope.row.skuImg"
  277. action="https://www.daweilinli.com/sqx_fast/alioss/upload" :show-file-list="false"
  278. :on-success="handleAvatarSuccess3">
  279. <img v-if="scope.row.skuImg" :src="scope.row.skuImg" class="avatar"
  280. style="border-radius: 6px;width:60px;height: 60px;" @click="curRowIndex=scope.$index"/>
  281. <i v-else class="el-icon-plus avatar-uploader-icon" @click="curRowIndex=scope.$index"></i>
  282. </el-upload>
  283. </div>
  284. </template>
  285. </el-table-column> -->
  286. <el-table-column prop="skuOriginalPrice" width="150">
  287. <template slot-scope="scope">
  288. <div>
  289. <el-input type="text" v-model="scope.row.skuOriginalPrice"
  290. style="width:80px;font-size:14px;">
  291. </el-input>
  292. </div>
  293. </template>
  294. </el-table-column>
  295. <el-table-column prop="skuPrice" width="150">
  296. <template slot-scope="scope">
  297. <div>
  298. <el-input type="text" v-model="scope.row.skuPrice"
  299. style="width:80px;font-size:14px;">
  300. </el-input>
  301. </div>
  302. </template>
  303. </el-table-column>
  304. <!-- <el-table-column prop="sales" width="150">
  305. <template slot-scope="scope">
  306. <div>
  307. <el-input type="text" v-model="scope.row.sales" style="width:80px;font-size:14px;">
  308. </el-input>
  309. </div>
  310. </template>
  311. </el-table-column> -->
  312. </el-table>
  313. </div>
  314. </div>
  315. </div>
  316. <div class="tinymce-content" style="display: flex;padding-top: 30px;">
  317. <div style="width:90px;">商品详情:</div>
  318. <!-- <quill-editor ref="myTextEditor" v-model="goodsSynopsis" :options="quillOption"
  319. style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
  320. </quill-editor> -->
  321. <div v-for="(item,index) of goodsParticularsPicture">
  322. <div style="position: relative;margin: 5px;">
  323. <img :src="item" class="avatar" style="width:148px;height: 148px;" />
  324. <div @click="clearXq(index)" class="divhove">
  325. <i class="el-icon-delete" style="margin: 0;font-size: 18px;color: #fff;"></i>
  326. </div>
  327. </div>
  328. </div>
  329. <div class="imgs" style="width: 50%;">
  330. <el-upload action="https://www.daweilinli.com/sqx_fast/alioss/upload"
  331. list-type="picture-card" :show-file-list="false" :on-success="handleUploadSuccessXq"
  332. :on-progress="onprogress1">
  333. <el-progress v-if="percentage1>0 && percentage1<100" type="circle" :percentage="percentage1">
  334. </el-progress>
  335. <i v-else class="el-icon-plus"></i>
  336. </el-upload>
  337. <el-dialog :visible.sync="dialogVisible">
  338. <img width="100%" :src="dialogImageUrl" alt="">
  339. </el-dialog>
  340. </div>
  341. </div>
  342. <div style="text-align: center;margin-top:30px;">
  343. <el-button style='margin:0 20px 0 0;' size="mini" type="primary" icon="document" @click="prev">返回上一页
  344. </el-button>
  345. <el-button size="mini" type="primary" icon="document" @click="artiReleass">保存
  346. </el-button>
  347. </div>
  348. </div>
  349. </div>
  350. </template>
  351. <script>
  352. import {
  353. quillEditor
  354. } from 'vue-quill-editor'
  355. import 'quill/dist/quill.core.css'
  356. import 'quill/dist/quill.snow.css'
  357. import 'quill/dist/quill.bubble.css'
  358. import quillConfig from './quill-config.js'
  359. export default {
  360. components: {
  361. quillEditor
  362. },
  363. name: 'Tinymce',
  364. data() {
  365. return {
  366. tableDataLoading: true,
  367. originalPrice: '',
  368. price: '',
  369. sales: '',
  370. imgs: [],
  371. value: [],
  372. potost: [],
  373. statusmain2: [{
  374. value: 0,
  375. label: '上架'
  376. },
  377. {
  378. value: 1,
  379. label: '下架'
  380. }
  381. ],
  382. valueshow: true,
  383. valueshow1: true,
  384. // 富文本内容
  385. descrition: '',
  386. // curRowIndex: null,
  387. // ···········································
  388. specif: '',
  389. goodsId: '',
  390. goodsName: '',
  391. classifyId: '',
  392. merchants: '',
  393. originalMoney: '',
  394. goodsMoney: '',
  395. packMoney: '',
  396. memberPrice: '',
  397. labels: [], //标签集合
  398. bq: '', //输入的标签名
  399. createTime: '',
  400. positage: 0,
  401. guige: 1,
  402. skuImg: '',
  403. ruleId: '',
  404. postagePrice: '',
  405. priceshow: false,
  406. isshow: true,
  407. commissionPrice: '',
  408. buyReason: '',
  409. ruleshow: false,
  410. propshow: false,
  411. guigeshow: true,
  412. propshow1: false,
  413. ruleValue: [],
  414. attr: [],
  415. attrs: [],
  416. headerData: [],
  417. valueData: [],
  418. detailJson: [],
  419. inputValues: {
  420. inputValue0: '',
  421. inputValue1: '',
  422. inputValue2: '',
  423. inputValue3: '',
  424. inputValue4: '',
  425. inputValue5: ''
  426. },
  427. sku: [],
  428. img: '',
  429. salesVolume: '',
  430. sales:'',
  431. inventory: '',
  432. goodsSynopsis: '',
  433. status: 0,
  434. goodsPicture: '',
  435. typeDatas: [],
  436. value: [],
  437. isSelect: 1,
  438. homeGoods: 1,
  439. isRecommend: 1,
  440. isExpress: '',
  441. goodsCover: '',
  442. valueData2: [],
  443. headerData2: [],
  444. isExpressmain: [{
  445. value: 1,
  446. label: '普通商品需要发货'
  447. },
  448. {
  449. value: 2,
  450. label: '虚拟商品无需发货'
  451. },
  452. {
  453. value: 3,
  454. label: '商铺核销无需发货'
  455. }
  456. ],
  457. attrName: '',
  458. ruleName: '',
  459. attrValue: [],
  460. releobject: {
  461. value: '',
  462. detail: ''
  463. },
  464. brandId: '',
  465. brandIds: [],
  466. specifdata: [],
  467. dialogVisible: false,
  468. hideUpload: false,
  469. limit: 1,
  470. id: '',
  471. hasChange: false,
  472. hasInit: false,
  473. tinymceId: 'tinymceId',
  474. height: 435,
  475. toolbar: [],
  476. menubar: 'file edit insert view format table',
  477. languageTypeList: {
  478. 'en': 'en',
  479. 'zh': 'zh_CN'
  480. },
  481. artiCletypes: [],
  482. // 富文本内容
  483. quillOption: quillConfig,
  484. goodsDescribe: '',
  485. shopId: '',
  486. goodsParticularsPicture: [], //商品详情图
  487. percentage1: 0, //进度条
  488. dialogImageUrl: [],
  489. dialogVisible: false,
  490. }
  491. },
  492. methods: {
  493. // 返回上一级
  494. prev() {
  495. this.$router.back()
  496. },
  497. // 图标上传
  498. handleAvatarSuccess(file) {
  499. if (this.curRowIndex == 0) {
  500. this.skuImg = file.data;
  501. this.valueData[0].skuImg = this.skuImg
  502. return
  503. } else {
  504. this.skuImg = file.data;
  505. this.valueData[this.curRowIndex].skuImg = this.skuImg
  506. }
  507. },
  508. // 图标上传
  509. handleAvatarSuccess3(file) {
  510. this.skuImg = file.data;
  511. this.sku[0].skuImg = this.skuImg
  512. },
  513. // 是否包邮
  514. agreeChange(val) {
  515. if (val == 1) {
  516. this.priceshow = true
  517. this.postagePrice = ''
  518. } else {
  519. this.priceshow = false
  520. this.postagePrice = 0
  521. }
  522. },
  523. // 是否多规格
  524. guigeChange(val) {
  525. if (val == 0) {
  526. this.ruleId = 0
  527. this.valueshow = false
  528. this.valueshow1 = true
  529. this.guigeshow = false
  530. this.attr = []
  531. this.ruleshow = false
  532. this.ruleValue = []
  533. this.dansku()
  534. }
  535. if (val == 1) {
  536. this.ruleId = ''
  537. this.sku = []
  538. this.guigeshow = true
  539. this.valueshow1 = false
  540. }
  541. },
  542. // 获取单规格的sku
  543. dansku() {
  544. if (this.originalMoney == '') {
  545. this.originalMoney = '0'
  546. }
  547. if (this.goodsMoney == '') {
  548. this.goodsMoney = '0'
  549. }
  550. this.$http({
  551. url: this.$http.adornUrl('admin/goods/onlyFormatAttr'),
  552. method: 'get',
  553. params: this.$http.adornParams({
  554. 'originalPrice': this.originalMoney,
  555. 'price': this.goodsMoney,
  556. // 'coverImg': this.goodsCover,
  557. })
  558. }).then(({
  559. data
  560. }) => {
  561. let returnData = data.data;
  562. this.valueData2 = returnData.value
  563. this.headerData2 = returnData.header
  564. this.valueshow1 = true
  565. this.valueshow = false
  566. this.guigeshow = false
  567. // this.attr = returnData.value
  568. // this.sku = []
  569. this.sku = returnData.value
  570. })
  571. },
  572. // 回显规格
  573. echo(goodsId) {
  574. this.$http({
  575. url: this.$http.adornUrl('admin/goods/formatAttr'),
  576. method: 'get',
  577. params: this.$http.adornParams({
  578. 'goodsId': goodsId,
  579. })
  580. }).then(({
  581. data
  582. }) => {
  583. let returnData = data.data;
  584. this.valueData2 = returnData.value
  585. this.headerData2 = returnData.header
  586. this.valueshow1 = true
  587. this.valueshow = false
  588. this.guigeshow = false
  589. })
  590. },
  591. handleChange1(value) {
  592. this.classifyId = value;
  593. },
  594. // 删除
  595. clear(index) {
  596. this.imgs.splice(index, 1);
  597. },
  598. handleChange(file, fileList) {
  599. this.hideUpload = fileList.length >= this.limit;
  600. },
  601. handleRemove(file, fileList) {
  602. this.hideUpload = fileList.length >= this.limit;
  603. for (var i in this.potost) {
  604. if (this.potost[i] == file.response.data) {
  605. this.potost.splice(i, 1);
  606. }
  607. }
  608. },
  609. handleAvatarSuccess1(file, fileList) {
  610. this.goodsCover = file.data
  611. },
  612. //上传成功
  613. handleUploadSuccess(file, fileList) {
  614. console.log('file.data:', file.data, 'this.goodsPicture', this.goodsPicture)
  615. // this.potost += file.data + ','
  616. this.potost.push(file.data)
  617. },
  618. init() {
  619. this.tableDataLoading = true
  620. let goodsId = this.$route.query.goodsId
  621. this.$http({
  622. url: this.$http.adornUrl('admin/goods/selectGoodsById'),
  623. method: 'get',
  624. params: this.$http.adornParams({
  625. 'goodsId': goodsId
  626. })
  627. }).then(({
  628. data
  629. }) => {
  630. let returnData = data.data;
  631. if (returnData.goodsPicture) {
  632. let imgs = returnData.goodsPicture.split(',')
  633. this.imgs = imgs;
  634. console.log('this.imgs', this.imgs)
  635. }
  636. if (returnData.goodsLabel && returnData.goodsLabel != '') {
  637. let goodsLabel = returnData.goodsLabel.split(',')
  638. this.labels = goodsLabel
  639. }
  640. if (returnData.goodsParticularsPicture) {
  641. this.goodsParticularsPicture = returnData.goodsParticularsPicture.split(',')
  642. this.dialogImageUrl = this.goodsParticularsPicture
  643. } else {
  644. this.goodsParticularsPicture = []
  645. this.dialogImageUrl = []
  646. }
  647. this.goodsName = returnData.goodsName
  648. this.goodsId = returnData.goodsId;
  649. // this.goodsPicture = goodsPicture;
  650. this.goodsCover = returnData.goodsCover
  651. this.goodsMoney = returnData.goodsMoney
  652. this.originalMoney = returnData.originalMoney;
  653. this.packMoney = returnData.packMoney
  654. this.salesVolume = returnData.salesVolume;
  655. this.sales = returnData.sales;
  656. this.inventory = returnData.inventory;
  657. this.classifyId = returnData.classifyId;
  658. this.goodsDescribe = returnData.goodsDescribe;
  659. this.goodsSynopsis = returnData.goodsSynopsis
  660. this.status = returnData.status;
  661. this.createTime = returnData.createTime;
  662. this.shopId = returnData.shopId
  663. // this.memberPrice = returnData.memberPrice;
  664. // this.descrition = returnData.descrition;
  665. // this.status = returnData.status;
  666. // this.createAt = returnData.createAt;
  667. // this.isSelect = returnData.isSelect;
  668. // this.homeGoods = returnData.homeGoods;
  669. // this.isRecommend = returnData.isRecommend;
  670. // this.isExpress = returnData.isExpress;
  671. // this.createAt = returnData.createAt;
  672. // this.brandId = returnData.brandId;
  673. // let label = JSON.parse(returnData.type.parentId)
  674. // let value = JSON.parse(returnData.type.id)
  675. // this.value = [label, value]
  676. this.postagePrice = returnData.postagePrice
  677. if (this.postagePrice > 0) {
  678. this.positage = 1
  679. this.priceshow = true
  680. } else {
  681. this.positage = 0
  682. this.priceshow = false
  683. }
  684. this.attr = returnData.attr
  685. if (this.attr.length > 0) {
  686. this.guige = 1
  687. this.Triggerselect()
  688. this.create2()
  689. this.attrName = returnData.attr[0].attrName
  690. this.attrValue = returnData.attr[0].attrValue
  691. this.ruleId = returnData.attr[0].ruleId
  692. this.goodsId = returnData.attr[0].goodsId
  693. this.id = returnData.attr[0].id
  694. } else {
  695. this.guige = 0
  696. this.echo(this.goodsId)
  697. this.ruleId = 0
  698. this.sku = returnData.sku
  699. }
  700. this.specifSelect()
  701. this.dataSelect()
  702. this.tableDataLoading = false
  703. })
  704. },
  705. // 修改商品
  706. artiReleass() {
  707. // let id = this.$route.query.id
  708. var potost = this.potost.toString()
  709. if (this.imgs == '') {
  710. this.img = this.potost
  711. // this.img = this.img.substr(0, this.img.length - 1)
  712. } else {
  713. if (this.potost.length != 0) {
  714. this.img = this.imgs + ',' + this.potost
  715. } else {
  716. this.img = this.imgs
  717. // this.img = this.img.substr(0, this.img.length - 1)
  718. }
  719. }
  720. console.log('this.imgs', this.imgs)
  721. console.log('this.img', this.img)
  722. console.log('this.potost:', this.potost)
  723. // let photost = this.goodsPicture.toString()
  724. let goodsLabel = this.labels.toString()
  725. if (this.goodsLabel == '') {
  726. this.$notify({
  727. title: '提示',
  728. duration: 1800,
  729. message: '请输入标签',
  730. type: 'warning'
  731. });
  732. return
  733. }
  734. if (this.goodsName == '') {
  735. this.$notify({
  736. title: '提示',
  737. duration: 1800,
  738. message: '请输入商品标题',
  739. type: 'warning'
  740. });
  741. return
  742. }
  743. if (this.classifyId === '') {
  744. this.$notify({
  745. title: '提示',
  746. duration: 1800,
  747. message: '请选择商品类型',
  748. type: 'warning'
  749. });
  750. return
  751. }
  752. if (this.originalMoney === '') {
  753. this.$notify({
  754. title: '提示',
  755. duration: 1800,
  756. message: '请输入商品原价',
  757. type: 'warning'
  758. });
  759. return
  760. }
  761. if (this.goodsMoney === '') {
  762. this.$notify({
  763. title: '提示',
  764. duration: 1800,
  765. message: '请输入商品售价',
  766. type: 'warning'
  767. });
  768. return
  769. }
  770. if (this.packMoney === '') {
  771. this.$notify({
  772. title: '提示',
  773. duration: 1800,
  774. message: '请输入打包费',
  775. type: 'warning'
  776. });
  777. return
  778. }
  779. if (this.sales === '') {
  780. this.$notify({
  781. title: '提示',
  782. duration: 1800,
  783. message: '请输入商品销量',
  784. type: 'warning'
  785. });
  786. return
  787. }
  788. // if (this.inventory === '') {
  789. // this.$notify({
  790. // title: '提示',
  791. // duration: 1800,
  792. // message: '请输入商品库存',
  793. // type: 'warning'
  794. // });
  795. // return
  796. // }
  797. if (this.goodsCover == '') {
  798. this.$notify({
  799. title: '提示',
  800. duration: 1800,
  801. message: '请选择商品封面图',
  802. type: 'warning'
  803. });
  804. return
  805. }
  806. if (this.goodsDescribe == '') {
  807. this.$notify({
  808. title: '提示',
  809. duration: 1800,
  810. message: '请输入商品详情',
  811. type: 'warning'
  812. });
  813. return
  814. }
  815. if (this.guige == 1) {
  816. if (this.ruleId === 0 || this.ruleId === '') {
  817. this.$notify({
  818. title: '提示',
  819. duration: 1800,
  820. message: '请选择商品规格',
  821. type: 'warning'
  822. });
  823. return
  824. }
  825. }
  826. // if (this.sku.length == 0) {
  827. // this.$notify({
  828. // title: '提示',
  829. // duration: 1800,
  830. // message: '请选择商品规格',
  831. // type: 'warning'
  832. // });
  833. // return
  834. // }
  835. if (this.guige == 0) {
  836. if (this.valueData2.length > 0) {
  837. if (this.valueData2[0].skuOriginalPrice == null || this.valueData2[0].skuOriginalPrice === '') {
  838. this.$notify({
  839. title: '提示',
  840. duration: 1800,
  841. message: '商品属性原价不能为空',
  842. type: 'warning'
  843. });
  844. return
  845. }
  846. if (this.valueData2[0].skuPrice == null || this.valueData2[0].skuPrice === '') {
  847. this.$notify({
  848. title: '提示',
  849. duration: 1800,
  850. message: '商品属性售价不能为空',
  851. type: 'warning'
  852. });
  853. return
  854. }
  855. }
  856. this.sku = this.valueData2
  857. console.log('----', this.valueData2)
  858. } else {
  859. this.sku = this.valueData
  860. }
  861. this.tableDataLoading = true
  862. this.$http({
  863. url: this.$http.adornUrl('admin/goods/update'),
  864. method: 'post',
  865. data: this.$http.adornData({
  866. 'goodsId': this.goodsId,
  867. 'goodsPicture': this.img.toString(),
  868. 'goodsName': this.goodsName,
  869. 'classifyId': this.classifyId,
  870. 'originalMoney': this.originalMoney,
  871. 'goodsMoney': this.goodsMoney,
  872. 'packMoney': this.packMoney,
  873. 'memberPrice': this.memberPrice,
  874. 'salesVolume': this.salesVolume,
  875. 'sales':this.sales,
  876. 'inventory': this.inventory,
  877. 'goodsSynopsis': this.goodsSynopsis,
  878. 'status': this.status,
  879. 'goodsCover': this.goodsCover,
  880. 'goodsDescribe': this.goodsDescribe,
  881. 'postagePrice': this.postagePrice,
  882. 'sku': this.sku,
  883. 'attr': this.attr,
  884. 'goodsLabel': goodsLabel,
  885. 'createTime': this.createTime,
  886. 'goodsParticularsPicture': this.goodsParticularsPicture.toString()
  887. })
  888. }).then(({
  889. data
  890. }) => {
  891. if (data.code == 0) {
  892. this.tableDataLoading = false
  893. this.$message({
  894. message: '操作成功',
  895. type: 'success',
  896. duration: 1500,
  897. onClose: () => {
  898. // this.$router.push({
  899. // path: '/shopAdmin'
  900. // })
  901. this.$router.back()
  902. }
  903. })
  904. } else {
  905. this.tableDataLoading = false
  906. this.$message({
  907. message: data.msg,
  908. type: 'warning',
  909. duration: 1500,
  910. onClose: () => {
  911. }
  912. })
  913. }
  914. })
  915. },
  916. // 商品规格
  917. specifSelect() {
  918. this.$http({
  919. url: this.$http.adornUrl('selfGoodsRule/list'),
  920. method: 'get',
  921. params: this.$http.adornParams({
  922. 'shopId': this.shopId
  923. })
  924. }).then(({
  925. data
  926. }) => {
  927. let returnData = data.data;
  928. this.specifdata = returnData;
  929. })
  930. },
  931. // 商品规格
  932. Triggerselect() {
  933. let goodsId = this.$route.query.goodsId
  934. this.$http({
  935. url: this.$http.adornUrl('admin/goods/findAttrValue'),
  936. method: 'get',
  937. params: this.$http.adornParams({
  938. 'goodsId': goodsId
  939. })
  940. }).then(({
  941. data
  942. }) => {
  943. let returnData = data.data;
  944. this.ruleValue = returnData.attrValue
  945. this.attrName = returnData.attrName
  946. this.ruleshow = true
  947. })
  948. },
  949. // 删除商品属性
  950. deleter(index) {
  951. let length = this.sku.length
  952. if (length == 1) {
  953. this.$message({
  954. title: '提示',
  955. type: 'error',
  956. duration: 1800,
  957. message: '属性至少要有一个',
  958. type: 'warning'
  959. });
  960. return
  961. } else {
  962. this.sku.splice(index, 1);
  963. }
  964. },
  965. // 查询商品规格
  966. selectTrigger(val) {
  967. this.$http({
  968. url: this.$http.adornUrl('selfGoodsRule/find'),
  969. method: 'get',
  970. params: this.$http.adornParams({
  971. 'id': val
  972. })
  973. }).then(({
  974. data
  975. }) => {
  976. let returnData = data.data;
  977. this.ruleValue = returnData.ruleValue
  978. this.attrName = returnData.ruleName
  979. this.ruleshow = true
  980. this.ruleId = returnData.id
  981. this.create()
  982. })
  983. },
  984. deleterule(index) {
  985. this.ruleValue.splice(index, 1);
  986. },
  987. btnToclick() {
  988. this.isshow = false
  989. this.releobject.value = ''
  990. this.releobject.detail = ''
  991. },
  992. speciTotwo() {
  993. this.isshow = true
  994. this.releobject.value = ''
  995. this.releobject.detail = ''
  996. },
  997. speciTo() {
  998. if (this.releobject.value == '') {
  999. this.$message({
  1000. title: '提示',
  1001. type: 'error',
  1002. duration: 1800,
  1003. message: '请输入规格',
  1004. type: 'warning'
  1005. });
  1006. return
  1007. }
  1008. if (this.releobject.detail == '') {
  1009. this.$message({
  1010. title: '提示',
  1011. duration: 1800,
  1012. type: 'error',
  1013. message: '请输入规格值',
  1014. type: 'warning'
  1015. });
  1016. return
  1017. }
  1018. this.ruleValue.push({
  1019. value: this.releobject.value,
  1020. detail: this.releobject.detail
  1021. });
  1022. this.isshow = true
  1023. this.releobject.value = ''
  1024. this.releobject.detail = ''
  1025. },
  1026. handleClose(tag, j, item) {
  1027. var detailarr = item.detail.split(',')
  1028. detailarr.splice(j, 1);
  1029. if (detailarr.length < 1) {
  1030. this.$message({
  1031. title: '提示',
  1032. type: 'error',
  1033. duration: 1800,
  1034. message: '规格值至少要有一个',
  1035. type: 'warning'
  1036. });
  1037. return
  1038. } else {
  1039. item.detail = String(detailarr)
  1040. }
  1041. },
  1042. handleInputConfirm(index, item) {
  1043. let inputValue = this.inputValues[index];
  1044. if (inputValue) {
  1045. var detailarr = item.detail.split(',')
  1046. detailarr.push(inputValue)
  1047. for (var i = 0; i < detailarr.length; i++) {
  1048. for (var j = 0; j < detailarr.length; j++) {
  1049. if (detailarr[i] == detailarr[j] && i != j) {
  1050. detailarr.splice(j, 1);
  1051. }
  1052. }
  1053. }
  1054. item.detail = String(detailarr)
  1055. this.inputValues[index] = '';
  1056. }
  1057. this.inputVisible = false;
  1058. },
  1059. // 初始化立即生成
  1060. create2() {
  1061. let goodsId = this.$route.query.goodsId
  1062. this.$http({
  1063. url: this.$http.adornUrl('admin/goods/formatAttr'),
  1064. method: 'get',
  1065. params: this.$http.adornParams({
  1066. 'goodsId': goodsId
  1067. })
  1068. }).then(({
  1069. data
  1070. }) => {
  1071. let returnData = data.data;
  1072. this.headerData = returnData.header
  1073. this.valueData = returnData.value
  1074. this.valueshow = true
  1075. this.valueshow1 = false
  1076. this.sku = returnData.value
  1077. this.detailJson = returnData.value[0].detailJson.split(',')
  1078. })
  1079. },
  1080. // 立即生成
  1081. create() {
  1082. this.attr = []
  1083. this.attr.push({
  1084. attrName: this.attrName,
  1085. attrValue: this.ruleValue,
  1086. ruleId: this.ruleId
  1087. })
  1088. if (this.originalMoney == '') {
  1089. this.originalMoney = '0'
  1090. }
  1091. if (this.goodsMoney == '') {
  1092. this.goodsMoney = '0'
  1093. }
  1094. if (this.memberPrice == '') {
  1095. this.memberPrice = '0'
  1096. }
  1097. this.$http({
  1098. url: this.$http.adornUrl(
  1099. // `admin/goods/isFormatAttr?coverImg=${this.goodsCover}&originalPrice=${this.originalMoney}&price=${this.goodsMoney}`
  1100. `admin/goods/isFormatAttr?originalPrice=${this.originalMoney}&price=${this.goodsMoney}`
  1101. ),
  1102. method: 'post',
  1103. data: this.attr[0]
  1104. }).then(({
  1105. data
  1106. }) => {
  1107. let returnData = data.data;
  1108. this.headerData = returnData.header
  1109. this.valueData = returnData.value
  1110. this.valueshow = true
  1111. this.valueshow1 = false
  1112. this.sku = returnData.value
  1113. this.detailJson = returnData.value[0].detailJson.split(',')
  1114. })
  1115. },
  1116. // 获取品牌
  1117. brandSelect() {
  1118. let page = this.page - 1
  1119. this.tableDataLoading = true
  1120. this.$http({
  1121. url: this.$http.adornUrl('selfGoodsBrand/result'),
  1122. method: 'get',
  1123. params: this.$http.adornParams({})
  1124. }).then(({
  1125. data
  1126. }) => {
  1127. this.tableDataLoading = false
  1128. let returnData = data.data;
  1129. this.brandIds = returnData
  1130. })
  1131. },
  1132. // 商品分类
  1133. dataSelect() {
  1134. this.tableDataLoading = true
  1135. this.$http({
  1136. url: this.$http.adornUrl('admin/goods/selectAllClassify'),
  1137. method: 'get',
  1138. params: this.$http.adornParams({
  1139. 'shopId': this.shopId
  1140. })
  1141. }).then(({
  1142. data
  1143. }) => {
  1144. this.tableDataLoading = false
  1145. let returnData = data.data;
  1146. this.typeDatas = returnData
  1147. })
  1148. },
  1149. // 添加标签
  1150. btnTj() {
  1151. if (this.bq == '' || this.bq == ' ') {
  1152. this.$notify({
  1153. title: '提示',
  1154. duration: 1800,
  1155. message: '请输入标签名',
  1156. type: 'warning'
  1157. });
  1158. return
  1159. } else {
  1160. console.log('this.bq', this.bq)
  1161. this.labels.push(this.bq)
  1162. this.bq = ''
  1163. }
  1164. },
  1165. // 删除标签
  1166. dels1(index) {
  1167. this.labels.splice(index, 1);
  1168. console.log(this.labels)
  1169. },
  1170. // 删除详情图
  1171. clearXq(index) {
  1172. this.goodsParticularsPicture.splice(index, 1);
  1173. },
  1174. //上传成功
  1175. handleUploadSuccessXq(file, fileList) {
  1176. this.goodsParticularsPicture.push(file.data)
  1177. },
  1178. onprogress1(event, file, fileList) {
  1179. console.log('详情图上传进度', parseInt(event.percent))
  1180. this.percentage1 = parseInt(event.percent)
  1181. },
  1182. },
  1183. mounted() {
  1184. this.init()
  1185. this.specifSelect()
  1186. window.scrollTo(0, 0)
  1187. // this.brandSelect()
  1188. },
  1189. watch: {
  1190. '$route': 'init'
  1191. }
  1192. }
  1193. </script>
  1194. <style scoped="scoped">
  1195. .main-cont {
  1196. max-width: 100%;
  1197. min-width: 80%;
  1198. padding-bottom: 5%;
  1199. background-color: #fff;
  1200. }
  1201. .tinymce-container {
  1202. position: relative;
  1203. line-height: normal;
  1204. }
  1205. .tinymce-container>>>.mce-fullscreen {
  1206. z-index: 10000;
  1207. }
  1208. .tinymce-textarea {
  1209. visibility: hidden;
  1210. z-index: -1;
  1211. }
  1212. .hide .el-upload--picture-card {
  1213. display: none;
  1214. }
  1215. .margin15 {
  1216. margin-right: 15px;
  1217. margin-top: 10px;
  1218. }
  1219. .divhove {
  1220. position: absolute;
  1221. width: 100%;
  1222. height: 100%;
  1223. left: 0;
  1224. top: 0;
  1225. opacity: 0;
  1226. cursor: default;
  1227. text-align: center;
  1228. padding-top: 50%;
  1229. border-radius: 6px;
  1230. background-color: rgba(0, 0, 0, .5);
  1231. -webkit-transition: opacity .3s;
  1232. transition: opacity .3s;
  1233. }
  1234. .el-tag--medium {
  1235. margin-right: 10px;
  1236. }
  1237. .divhove:hover {
  1238. opacity: 0.8;
  1239. }
  1240. .ruleitem {
  1241. padding-left: 10px;
  1242. margin-top: 15px;
  1243. }
  1244. .ruleitem .ruleicon {
  1245. position: relative;
  1246. top: 3px;
  1247. left: 2px;
  1248. width: 1.2em;
  1249. height: 1.2em;
  1250. }
  1251. .el-tag+.el-tag {
  1252. margin-left: 10px;
  1253. }
  1254. .button-new-tag {
  1255. height: 32px;
  1256. line-height: 31px;
  1257. padding-top: 0;
  1258. padding-bottom: 0;
  1259. border-radius: 4px;
  1260. border-top-left-radius: 0;
  1261. border-bottom-left-radius: 0;
  1262. background-color: #f5f7fa;
  1263. position: relative;
  1264. left: -5px;
  1265. border-color: #dcdfe6;
  1266. border: 1px solid #dcdfe6;
  1267. }
  1268. .input-new-tag {
  1269. width: 90px;
  1270. margin-left: 10px;
  1271. vertical-align: bottom;
  1272. }
  1273. .el-input--small .el-input__inner {
  1274. border-top-right-radius: 0;
  1275. border-bottom-right-radius: 0;
  1276. }
  1277. .el-table--enable-row-transition .el-table__body td {
  1278. text-align: center;
  1279. }
  1280. .imgWrap .avatar-uploader .el-upload {
  1281. width: 60px;
  1282. }
  1283. .el-table .cell {
  1284. text-align: center !important;
  1285. }
  1286. .el-tag--medium {
  1287. margin-right: 10px;
  1288. }
  1289. .bqList {
  1290. padding: 4px 14px;
  1291. margin: 4px;
  1292. border: 1px solid #efefef;
  1293. font-size: 12px;
  1294. color: #999;
  1295. border-radius: 4px;
  1296. margin-right: 15px;
  1297. }
  1298. .delss {
  1299. display: none;
  1300. position: relative;
  1301. }
  1302. .delss .el-icon-delete {
  1303. position: absolute;
  1304. top: 0;
  1305. }
  1306. .bqList:hover .delss {
  1307. display: initial;
  1308. opacity: 0.5;
  1309. }
  1310. .tj {
  1311. padding: 6px !important;
  1312. margin: 4px;
  1313. font-size: 12px;
  1314. border: 1px solid #ccc;
  1315. border-radius: 4px;
  1316. }
  1317. </style>