| | |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | width="50%" |
| | | @confirm="confirm" |
| | | > |
| | | <el-alert title="妿ä»å¹³å°éæ©ååè¿è¡ç´æï¼å»ºè®®ç±»å«éæ©ä»å¹³å°åºéæ©ï¼ç³»ç»å·²åæ°æ®å
³èï¼" type="warning" effect="dark" :closable="false"></el-alert> |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="éæ©ç±»å«" prop="platCateId" v-if="form.type == 1"> |
| | | <el-select v-model="form.platCateId" placeholder="è¯·éæ©" @change="changeCategory"> |
| | | <el-select v-model="form.platCateId" filterable placeholder="è¯·éæ©" @change="changeCategory"> |
| | | <el-option |
| | | v-for="item in categoryList" |
| | | :key="item.id" |
| | |
| | | style="width: 100%"> |
| | | <el-table-column label="åæ°å"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.name" placeholder="请è¾å
¥å
容"></el-input> |
| | | <el-input v-model="scope.row.name" placeholder="请è¾å
¥åç§°"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="设置为é项"> |
| | |
| | | this.form.sortnum = item.sortnum |
| | | let arr = [] |
| | | item.baseCateParamList.forEach((row, index) => { |
| | | arr.push({ name: row.name, baseCateParamId: row.id, isselect: index <= 1 ? 1 : 0, isshow: 1 }) |
| | | arr.push({ name: row.name, baseCateParamId: row.id, isselect: 0, isshow: 1 }) |
| | | }) |
| | | this.form.tableData = arr |
| | | this.form.imgurl = item.imgurl |
| | |
| | | <el-input v-model="form.name" maxlength="50" placeholder="请è¾å
¥åååç§°ï¼ä¸è¶
è¿50个å" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="åååç" prop="brandId"> |
| | | <el-select v-model="form.brandId" placeholder="è¯·éæ©ï¼åé"> |
| | | <el-select v-model="form.brandId" filterable placeholder="è¯·éæ©ï¼åé"> |
| | | <el-option |
| | | v-for="item in brandList" |
| | | :key="item.id" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="ååç±»å«" prop="categoryId"> |
| | | <!-- @change="changeCategory(form.categoryId)" --> |
| | | <el-select v-model="form.categoryId" placeholder="è¯·éæ©ï¼åé"> |
| | | <el-select v-model="form.categoryId" filterable placeholder="è¯·éæ©ï¼åé"> |
| | | <el-option |
| | | v-for="item in categoryList" |
| | | :key="item.id" |
| | |
| | | <el-table-column prop="price" label="éè´ä»·ï¼å
ï¼" show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column label="å
¥æä»·ï¼å
ï¼" show-overflow-tooltip min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.purchasePrice" placeholder="请è¾å
¥"></el-input> |
| | | <el-input v-model="row.purchasePrice" @input="changeVal(row)" placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | changeVal(row) { |
| | | var zz2 = new RegExp("^[0-9]*[1-9][0-9]*$"); |
| | | if (!zz2.test(row.purchasePrice)) { |
| | | row.purchasePrice = '' |
| | | this.$message.warning({ message: 'åªè½è¾å
¥æ´æ°' }) |
| | | } |
| | | }, |
| | | getList() { |
| | | pageT({ |
| | | capacity: this.pageSize, |
| | |
| | | page: this.page |
| | | }).then(res => { |
| | | res.records.forEach(item => { |
| | | item.purchasePrice = item.price * this.form.rate |
| | | item.purchasePrice = Math.ceil(item.price * this.form.rate) |
| | | }) |
| | | this.tableData = res.records |
| | | this.total = res.total |
| | |
| | | console.log(arr) |
| | | }, |
| | | confirm() { |
| | | if (this.form.goodsParamList.length === 0) { |
| | | this.$message.warning({ message: '请å
å¾éåå' }) |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | createPlat({ |
| | |
| | | {{title}} |
| | | </h2> |
| | | <div class="user"> |
| | | <span style="font-size: 13px">{{ userInfo.company.name }}</span> |
| | | <el-dropdown trigger="click"> |
| | | <span class="el-dropdown-link"> |
| | | <img v-if="userInfo != null" :src="userInfo.avatar == null ? '@/assets/images/avatar/man.png' : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> |
| | |
| | | if (userInfo == null) { |
| | | return '' |
| | | } |
| | | if (userInfo.realname != null && userInfo.realname.trim().length > 0) { |
| | | return userInfo.realname |
| | | } |
| | | // if (userInfo.realname != null && userInfo.realname.trim().length > 0) { |
| | | // return userInfo.realname |
| | | // } |
| | | return userInfo.username |
| | | } |
| | | }, |
| | |
| | | width: 50%; |
| | | flex-shrink: 0; |
| | | text-align: right; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | text { |
| | | font-size: 18px !important; |
| | | color: #222222; |
| | | } |
| | | .el-dropdown-link { |
| | | height: 100%; |
| | | display: flex; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-upload |
| | | :style="customStyle" |
| | | :action="uploadImgUrl" |
| | | :data="uploadData" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :on-error="uploadError" |
| | | :before-upload="beforeAvatarUpload"> |
| | | <img v-if="file.imgurlfull" :src="file.imgurlfull" :style="customStyle" class="avatar"> |
| | | <div v-else :style="customStyle"> |
| | | <i class="el-icon-plus avatar-uploader-icon"></i> |
| | | <div class="tips-style">{{ tipsLabel }}</div> |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | file: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | uploadData: Object, |
| | | tipsLabel: '', |
| | | customStyle: { |
| | | type: String, |
| | | default: 'width: 90px; height: 90px;' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload', |
| | | // uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/uploadPicture', |
| | | // uploadData: { |
| | | // folder: 'upload', |
| | | // type: 'image' |
| | | // }, |
| | | imgurlfull: '' |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | // ä¸ä¼ å¾ç |
| | | handleAvatarSuccess(res, file) { |
| | | if (res.code == 200) { |
| | | let { data } = res |
| | | this.file.imgurl = data.imgaddr; |
| | | this.file.imgurlfull = data.url; |
| | | console.log(this.file); |
| | | this.$message.success('ä¸ä¼ æå') |
| | | this.$emit('uploadSuccess', { imgurl: data.imgaddr, imgurlfull: data.url }) |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | } |
| | | this.$emit('uploadEnd') |
| | | }, |
| | | uploadError() { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$emit('endUpload') |
| | | }, |
| | | // // æ¦æª |
| | | beforeAvatarUpload(file) { |
| | | this.$emit('uploadBegin') |
| | | return true; |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $image-width: 100px; |
| | | ::v-deep .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | line-height: 90px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | display: block; |
| | | } |
| | | .tips-style { |
| | | height: 13px; |
| | | font-size: 13px; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | line-height: 13px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | stripe |
| | | border |
| | | :header-cell-style="rowStyle" |
| | | :cell-style="rowStyle" |
| | | > |
| | | :cell-style="rowStyle"> |
| | | <el-table-column prop="name" label="åçåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="imgurl" label="徿 " min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="categoryName" label="ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type == 0">èªå»º</span> |
| | | <span v-else>æå</span> |
| | | <span v-if="row.type == 0">èªå®ä¹</span> |
| | | <span v-else>ç³»ç»</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç (ååº)" min-width="100px"></el-table-column> |
| | |
| | | type: '' |
| | | }, |
| | | typeList: [ |
| | | { name: 'èªå»º', id: 0 }, |
| | | { name: 'æå', id: 1 } |
| | | { name: 'èªå®ä¹', id: 0 }, |
| | | { name: 'ç³»ç»', id: 1 } |
| | | ] |
| | | } |
| | | }, |
| | |
| | | <el-table-column prop="name" label="ç±»å«åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type == 0">èªå»º</span> |
| | | <span v-else>æå</span> |
| | | <span v-if="row.type == 0">èªå®ä¹</span> |
| | | <span v-else>ç³»ç»</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç (ååº)" min-width="100px"></el-table-column> |
| | |
| | | type: '' |
| | | }, |
| | | typeList: [ |
| | | { name: 'èªå»º', id: 0 }, |
| | | { name: 'æå', id: 1 } |
| | | { name: 'èªå®ä¹', id: 0 }, |
| | | { name: 'ç³»ç»', id: 1 } |
| | | ] |
| | | } |
| | | }, |
| | |
| | | platCateId: res.platCateId, |
| | | tableData: res.paramList.map(item => { |
| | | return { |
| | | id: item.id, |
| | | name: item.name, |
| | | isselect: item.isselect, |
| | | isshow: item.isshow |
| | |
| | | }), |
| | | fileList: res.imgurl ? [{ url: res.prefixUrl + res.imgurl }] : [] |
| | | } |
| | | console.log(obj) |
| | | this.$refs.operaCategoryWindow.open('ç¼è¾ç±»å«', obj) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">å
容èå´å°ºå¯¸ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-input v-model="from.rangeSize" placeholder="æ¯æ750px-1200px"></el-input> |
| | | <el-input v-model="from.rangeSize" type="number" placeholder="æ¯æ750px-1200px"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">èæ¯å¾ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-upload |
| | | :action="action" |
| | | :data="{ folder: 'web_param' }" |
| | | list-type="picture-card" |
| | | :limit="1" |
| | | :on-exceed="exceed" |
| | | :file-list="fileList1" |
| | | :on-success="fileSuccess1" |
| | | :on-remove="handleRemove1"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <UploadAvatarImage |
| | | :file="{ 'imgurlfull': from.bgImgUrl, 'imgurl': from.bgImg }" |
| | | :uploadData="{ folder: 'web_param' }" |
| | | tipsLabel="" |
| | | @uploadSuccess="uploadReverseSuccess" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">é¡¶é¨å®£ä¼ å¾ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-upload |
| | | :action="action" |
| | | :data="{ folder: 'web_param' }" |
| | | list-type="picture-card" |
| | | :on-exceed="exceed" |
| | | :limit="1" |
| | | :file-list="fileList2" |
| | | :on-success="fileSuccess2" |
| | | :on-remove="handleRemove2"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <UploadAvatarImage |
| | | :file="{ 'imgurlfull': from.topImgUrl, 'imgurl': from.topImg }" |
| | | :uploadData="{ folder: 'web_param' }" |
| | | tipsLabel="" |
| | | @uploadSuccess="uploadReverseSuccess1" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="pz_item"> |
| | | <div class="pz_item_label">PKå°å¾ï¼</div> |
| | | <div class="pz_item_ipt"> |
| | | <el-upload |
| | | :action="action" |
| | | :data="{ folder: 'web_param' }" |
| | | list-type="picture-card" |
| | | :on-exceed="exceed" |
| | | :limit="1" |
| | | :file-list="fileList3" |
| | | :on-success="fileSuccess3" |
| | | :on-remove="handleRemove3"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <UploadAvatarImage |
| | | :file="{ 'imgurlfull': from.pkImgUrl, 'imgurl': from.pkImg }" |
| | | :uploadData="{ folder: 'web_param' }" |
| | | tipsLabel="" |
| | | @uploadSuccess="uploadReverseSuccess2" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="pz_footer"> |
| | |
| | | |
| | | <script> |
| | | import { getByLogin, renew } from '@/api/business/page.js' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage.vue' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | rangeSize: '', |
| | | mainColor: '', |
| | | bgImg: '', |
| | | bgImgUrl: '', |
| | | topImg: '', |
| | | pkImg: '' |
| | | }, |
| | | fileList1: [], |
| | | fileList2: [], |
| | | fileList3: [] |
| | | topImgUrl: '', |
| | | pkImg: '', |
| | | pkImgUrl: '' |
| | | } |
| | | } |
| | | }, |
| | | components: { UploadAvatarImage }, |
| | | created() { |
| | | this.getDesc() |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | if (this.from.rangeSize < 750) { |
| | | this.$message.warning({ message: '尺寸å¿
须大äº750' }) |
| | | return |
| | | } |
| | | if (this.from.rangeSize > 1200) { |
| | | this.$message.warning({ message: '尺寸å¿
é¡»å°äº1200' }) |
| | | return |
| | | } |
| | | renew(this.from) |
| | | .then(res => { |
| | | this.$message.success({ message: 'ä¿åæå' }) |
| | |
| | | this.from.mainColor = res.mainColor |
| | | if (res.bgImg) { |
| | | this.from.bgImg = res.bgImg |
| | | this.fileList1 = [{ name: res.bgImg, url: res.resourcePath + res.bgImg }] |
| | | this.from.bgImgUrl = res.resourcePath + res.bgImg |
| | | } |
| | | if (res.topImg) { |
| | | this.fileList2 = [] |
| | | this.from.topImg = res.topImg |
| | | let arr = res.topImg.split(',').map(item => item) |
| | | arr.forEach(item => { |
| | | this.fileList2.push({ name: item, url: res.resourcePath + item }) |
| | | }) |
| | | this.from.topImgUrl = res.resourcePath + res.topImg |
| | | } |
| | | if (res.pkImg) { |
| | | this.fileList3 = [] |
| | | this.from.pkImg = res.pkImg |
| | | let arr = res.pkImg.split(',').map(item => item) |
| | | arr.forEach(item => { |
| | | this.fileList3.push({ name: item, url: res.resourcePath + item }) |
| | | }) |
| | | this.from.pkImgUrl = res.resourcePath + res.pkImg |
| | | } |
| | | } |
| | | }) |
| | |
| | | this.$message.warning({ message: 'åªè½ä¸ä¼ ä¸å¼ å¾ç' }) |
| | | }, |
| | | |
| | | uploadReverseSuccess2(file) { |
| | | this.from.pkImg = file.imgurl; |
| | | this.from.pkImgUrl = file.imgurlfull; |
| | | }, |
| | | uploadReverseSuccess1(file) { |
| | | this.from.topImg = file.imgurl; |
| | | this.from.topImgUrl = file.imgurlfull; |
| | | }, |
| | | |
| | | uploadReverseSuccess(file) { |
| | | this.from.bgImg = file.imgurl; |
| | | this.from.bgImgUrl = file.imgurlfull; |
| | | }, |
| | | |
| | | handleRemove1(file, fileList) { |
| | | this.fileList1 = [] |
| | | this.from.bgImg = '' |