| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function allList (data) { |
| | | return request.post('/business/goods/list', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function detail (id) { |
| | | return request.get(`/business/goods/${id}`) |
| | | } |
| | |
| | | .red{ |
| | | color: red; |
| | | } |
| | | .grey{ |
| | | color: grey; |
| | | } |
| | | .green{ |
| | | color: green; |
| | | } |
| | | .blue{ |
| | | color: blue; |
| | | color: #216EEE; |
| | | }.orange{ |
| | | color: orange; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="80%" |
| | | :visible.sync="visible" |
| | | @confirm="confirm" |
| | | > |
| | | <TableLayout :permissions="['business:goods:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" style="display: block;" > |
| | | <el-form-item label="" prop="name" label-width="5px" style="display: inline-block;margin-right: 30px;"> |
| | | <el-input v-model="searchForm.name" style="width: 150px;" placeholder="åååç§°" clearable @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="categoryId" label-width="5px" style="display: inline-block;margin-right: 30px;" > |
| | | <el-select v-model="searchForm.categoryId" placeholder="æå±åç±»" clearable style="width: 150px;" > |
| | | <el-option v-for="item in labels" :key="item.id" :value="item.id" :label="item.name" ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="brandId" label-width="5px" style="display: inline-block"> |
| | | <el-select v-model="searchForm.brandId" placeholder="æå±åç" style="width: 150px;" > |
| | | <el-option v-for="item in brands" :key="item.id" :value="item.id" :label="item.name" clearable ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <div :style="'display: flex;height:'+tabelHeight+'px;'"> |
| | | <div style="flex: 6;"> |
| | | <ul class="toolbar"> |
| | | <li><el-button type="primary" icon="el-icon-plus" @click="addAll()" :disabled="!(tableData.selectedRows && tableData.selectedRows.length)">æ¹éæ·»å </el-button></li> |
| | | </ul> |
| | | <el-table |
| | | ref="singleTable" |
| | | :height="tabelHeight-80" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" :selectable="checkSelectable" width="55"></el-table-column> |
| | | <el-table-column prop="imgurl" label="å表å¾" min-width="70px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image style="width: 50px;height: 50px;" v-if="row.imgurl && row.imgurl!=''" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="id" label="ååID" ></el-table-column> |
| | | <el-table-column prop="name" label="åååç§°" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="categoryName" label="æå±åç±»" ></el-table-column> |
| | | <el-table-column prop="brandName" label="æå±åç" ></el-table-column> |
| | | <el-table-column prop="price" label="å±ç¤ºä»·æ ¼" ></el-table-column> |
| | | <el-table-column prop="skuPrice" label="é¶å®ä»·(å
)" ></el-table-column> |
| | | <el-table-column label="æä½" align="center" min-width="80px" fixed="right" > |
| | | <template slot-scope="{ row }"> |
| | | <el-button style="color: red" v-if="row.tabStatus === 2" type="text" icon="el-icon-delete" @click="delItem(row)">ç§»é¤</el-button> |
| | | <el-button v-else type="text" icon="el-icon-plus" @click="add(row)">æ·»å </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </div> |
| | | <div style="flex: 2;margin-left: 20px;border: 1px solid #f2f2f2;padding: 10px;font-size: 12px;"> |
| | | <div style="display: flex;"> |
| | | <div style="flex: 6"> <span>已鿩<i class="blue" style="margin: 0 10px">{{selectGoods.length||0}}</i>ä»¶åå</span></div> |
| | | <div style="flex: 1;text-align: right"> <el-button size="mini" type="danger" class="blue" @click="cleanAll">æ¸
空</el-button></div> |
| | | </div> |
| | | <div :style="`display: flex;flex-direction: column;max-height: ${tabelHeight-80}px;overflow: auto`"> |
| | | <div v-for="(item,index) in selectGoods" style="display: flex;margin: 10px 0;" :key="'selGoods'+item.id"> |
| | | <div style="flex: 6">{{item.name}}<br><span class="red">ï¿¥{{item.skuPrice || 0}}</span></div> |
| | | <div style="flex: 1;text-align: right;"> |
| | | <el-button class="blue" style="border: none;color: red" icon="el-icon-delete" @click="del(item,index)"></el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </TableLayout> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { findAll as labelList } from '@/api/business/labels' |
| | | export default { |
| | | name: 'OperaCouponGoodsWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | | title: '', |
| | | visible: false, |
| | | tabelHeight: null, |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | categoryId: '', |
| | | brandId: '', |
| | | type: '0', // å¹³å°åå |
| | | status: '', |
| | | isrec: '', |
| | | labels: '' |
| | | }, |
| | | labels: [], |
| | | serials: [], |
| | | brands: [], |
| | | selectGoods: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleResize); |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleResize); |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ååä¿¡æ¯è¡¨', |
| | | api: '/business/goods', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | labelList({ |
| | | type: 0 // åååç±» |
| | | }).then(res => { |
| | | this.labels = res |
| | | }) |
| | | labelList({ |
| | | type: 1 // åååç |
| | | }) |
| | | .then(res => { |
| | | this.brands = res |
| | | }) |
| | | this.handleResize() |
| | | }, |
| | | methods: { |
| | | handleResize(){ |
| | | this.tabelHeight = window.innerHeight - 300 |
| | | }, |
| | | checkSelectable (row) { |
| | | return row.tabStatus !== 2 |
| | | }, |
| | | addAll () { |
| | | if (this.tableData.selectedRows && this.tableData.selectedRows.length) { |
| | | this.tableData.selectedRows.forEach(item => { |
| | | this.add(item) |
| | | }) |
| | | this.$nextTick(() => { |
| | | if (this.$refs.singleTable) { |
| | | this.$refs.singleTable.clearSelection() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | cleanAll () { |
| | | this.selectGoods = [] |
| | | this.tableData.list.forEach(item => { |
| | | item.tabStatus = 1 |
| | | }) |
| | | this.$nextTick(() => { |
| | | if (this.$refs.singleTable) { |
| | | this.$refs.singleTable.clearSelection() |
| | | } |
| | | }) |
| | | }, |
| | | add (row) { |
| | | var add = true |
| | | row.tabStatus = 2 |
| | | console.log(this.tableData.list) |
| | | this.selectGoods.forEach(item => { |
| | | if (item.id === row.id) { |
| | | add = false |
| | | } |
| | | }) |
| | | if (add) { |
| | | this.selectGoods.push(row) |
| | | } |
| | | }, |
| | | del (row, index) { |
| | | this.selectGoods.splice(index, 1) |
| | | this.tableData.list.forEach(item => { |
| | | if (item.id === row.id) { |
| | | item.tabStatus = 1 |
| | | } |
| | | }) |
| | | }, |
| | | delItem (delItem) { |
| | | this.selectGoods.forEach((item, index) => { |
| | | if (item.id === delItem.id) { |
| | | this.del(item, index) |
| | | } |
| | | }) |
| | | }, |
| | | confirm () { |
| | | this.$emit('success', this.selectGoods) |
| | | this.visible = false |
| | | }, |
| | | open (title, goods) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.cleanAll() |
| | | if (goods && goods.length) { |
| | | goods.forEach(item => { |
| | | this.selectGoods.push(item) |
| | | }) |
| | | } |
| | | this.search() |
| | | }, |
| | | handlePageChange (pageIndex) { |
| | | this.__checkApi() |
| | | this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex |
| | | this.isWorking.search = true |
| | | this.api.fetchList({ |
| | | page: this.tableData.pagination.pageIndex, |
| | | capacity: this.tableData.pagination.pageSize, |
| | | model: this.searchForm, |
| | | sorts: this.tableData.sorts |
| | | }) |
| | | .then(data => { |
| | | this.tableData.list = data.records || [] |
| | | this.tableData.pagination.total = data.total |
| | | this.tableData.list.forEach(item => { |
| | | item.tabStatus = 1 |
| | | this.selectGoods.forEach(row => { |
| | | if (item.id === row.id) { |
| | | item.tabStatus = 2 |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | goPriceSet (row) { |
| | | |
| | | }, |
| | | handleClick (val) { |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <GlobalAlertWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="80%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px" label-suffix="ï¼" inline> |
| | | <p class="tip-header" >åºæ¬å±æ§</p> |
| | | <el-form-item label="伿 å¸åç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥ä¼æ å¸åç§°" :maxlength="12" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="伿 å¸è¯´æ" prop="info"> |
| | | <el-input v-model="form.info" placeholder="请è¾å
¥ä¼æ å¸è¯´æ" :maxlength="30" v-trim/> |
| | | <el-form-item label="ç±»å" prop="couponType"> |
| | | <el-radio-group v-model="form.couponType"> |
| | | <el-radio :label="0" >满åå¸</el-radio> |
| | | <el-radio :label="1">ææ£å¸</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="伿 è§å" prop="couponRule"> |
| | | <el-form-item label="伿 è§å" prop="couponRule" > |
| | | <div class="coupon-rule"> |
| | | <div class="discrep">è®¢åæ»¡</div> |
| | | <el-input |
| | | v-model="form.limitPrice" |
| | | placeholder="请è¾å
¥" |
| | | @input="inputAction(form, 'limitPrice')" |
| | | <el-input v-model="form.limitPrice" placeholder="请è¾å
¥" @input="inputAction(form, 'limitPrice')" |
| | | > |
| | | <template slot="append">å
</template> |
| | | </el-input> |
| | | <div class="discrep">å</div> |
| | | <el-input |
| | | v-model="form.price" |
| | | placeholder="请è¾å
¥" |
| | | @input="inputAction(form, 'price')" |
| | | > |
| | | <template slot="append">å
</template> |
| | | <div class="discrep" >{{form.couponType === 1?'ï¼äº«':'ï¼å'}}</div> |
| | | <el-input v-model="form.price" placeholder="请è¾å
¥" @input="inputAction(form, 'price')" > |
| | | <template slot="append" >{{form.couponType ===1?'æ':'å
'}}</template> |
| | | </el-input> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="åæ¾æ»é" prop="num"> |
| | | <div class="num-style"> |
| | | <el-input-number step-strictly v-model="form.num" :controls="false" :min="1" :max="99999" placeholder="请è¾å
¥åæ¾æ»é(1~99999)" v-trim></el-input-number> |
| | | </div> |
| | | <el-form-item label="伿 å¸è¯´æ" prop="info"> |
| | | <el-input type="textarea" v-model="form.info" placeholder="请è¾å
¥ä¼æ å¸è¯´æ" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type==1" label="å
æ¢æ¡ä»¶" prop="integral"> |
| | | <el-input-number step-strictly v-model="form.integral" :controls="false" :min="1" :max="99999" placeholder="请è¾å
¥" v-trim/> åè±å
æ¢ä¸å¼ 伿 å¸ |
| | | <p class="tip-header" >使ç¨éå¶</p> |
| | | <el-form-item label="æææ" prop="useType"> |
| | | <el-radio-group v-model="form.useType"> |
| | | <el-radio :label="0">åºå®æ¶æ®µ</el-radio> |
| | | <el-radio :label="1">åºå®æ¶é¿</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å¯é¢åæ¶é´" prop="getDate"> |
| | | <el-form-item label="ä½¿ç¨æ¶æ®µ" prop="getDate" v-if="form.useType===0"> |
| | | <div class="date-style"> |
| | | <el-date-picker |
| | | v-model="getDate" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | @change="selectDate" |
| | | v-model="getDate" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | @change="selectDate" |
| | | ></el-date-picker> |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="å¯ç¨æ¶é´" prop="validDays"> |
| | | <!-- <el-input v-model="form.validDays" placeholder="请è¾å
¥é¢å忿天æ°" v-trim/> --> |
| | | <el-form-item label="åºå®æ¶é¿" prop="validDays" v-if="form.useType===1"> |
| | | <div class="coupon-rule"> |
| | | <div class="discrep">é¢åµå</div> |
| | | <el-input |
| | | v-model="form.validDays" |
| | | placeholder="请è¾å
¥" |
| | | @input="inputAction(form, 'validDays')" |
| | | v-model="form.validDays" |
| | | placeholder="请è¾å
¥" |
| | | @input="inputAction(form, 'validDays')" |
| | | > |
| | | <template slot="append">天</template> |
| | | </el-input> |
| | | <div class="discrep">å
ææï¼é¢ååç«å³çæ</div> |
| | | <div class="discrep">ææ</div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type==0" label="å
³èåºéº" prop="shopId"> |
| | | <el-select |
| | | v-model="form.shopId" |
| | | placeholder="请è¾å
¥åºéºåç§°ï¼åéæ©" |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | :remote-method="remoteMethod" |
| | | :loading="searchLoading" |
| | | |
| | | > |
| | | <el-option |
| | | v-for="item in shops" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | <el-form-item label="éç¨å¯¹è±¡" prop="applyType"> |
| | | <el-radio-group v-model="form.applyType"> |
| | | <el-radio :label="0">å
¨åºéç¨</el-radio> |
| | | <el-radio :label="1">æåç±»</el-radio> |
| | | <el-radio :label="2">æå®åå</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.applyType===1" label="éæ©åç±»" prop="applyCateIdList" > |
| | | <el-select v-model="form.applyCateIdList" placeholder="è¯·éæ©,æ¯æå¤é" filterable multiple clearable > |
| | | <el-option v-for="item in categorys" :key="'optCate'+item.id" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.applyType===2" label="éæ©åå" prop="applyIdList" style="display: flex"> |
| | | <span style="font-size: 12px;color: #216EEE" @click="selectGoods">å·²æå®ã {{applyDataList.length}} ãä»¶åå</span> |
| | | <el-button style="margin-left:30px;display: inline-block;width: 80px;" type="primary" @click="selectGoods">å»éæ© </el-button> |
| | | </el-form-item> |
| | | <p class="tip-header" >åæ¾è§å</p> |
| | | <el-form-item label="åæ¾æ»é" prop="num"> |
| | | <div class="num-style"> |
| | | <el-input-number v-model="form.num" :controls="false" :min="1" :max="99999" placeholder="请è¾å
¥åæ¾æ»é(1~99999)" v-trim></el-input-number> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | <OperaCouponGoodsWindow ref="OperaCouponGoodsWindow" @success="doSelect"/> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | import { fetchList as shopList } from '@/api/business/shop' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { findAll as labelList } from '@/api/business/labels' |
| | | import { allList as goodsList} from '@/api/business/goods' |
| | | import OperaCouponGoodsWindow from '@/components/business/OperaCouponGoodsWindow' |
| | | export default { |
| | | name: 'OperaCouponWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow }, |
| | | components: { GlobalWindow,OperaCouponGoodsWindow }, |
| | | data () { |
| | | let couponRules = (rule, value, callback) => { |
| | | const couponRules = (rule, value, callback) => { |
| | | if (!this.form.limitPrice) { |
| | | callback(new Error('请è¾å
¥æ»¡é¢')) |
| | | } else if (!this.form.price) { |
| | | callback(new Error('请è¾å
¥ä¼æ éé¢')) |
| | | callback(new Error('请å®å伿 è§å')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | let getDateRules = (rule, value, callback) => { |
| | | const getDateRules = (rule, value, callback) => { |
| | | if (!this.form.startDate) { |
| | | callback(new Error('è¯·éæ©å¼å§æ¶é´')) |
| | | } else if (!this.form.endDate) { |
| | |
| | | callback() |
| | | } |
| | | } |
| | | let numRule = (rule, value, callBack) => { |
| | | const numRule = (rule, value, callBack) => { |
| | | if (value < 0) { |
| | | callBack(new Error()) |
| | | } else { |
| | |
| | | return { |
| | | searchLoading: false, |
| | | getDate: [], |
| | | applyDataList:[], |
| | | showGoods:false, |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | couponType: 0, |
| | | applyType: 0, |
| | | useType: 0, |
| | | shopId: '', |
| | | type: '', |
| | | applyIdList: [], |
| | | applyCateIdList: [], |
| | | type: 0, |
| | | limitPrice: '', |
| | | price: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | applyIds: '', |
| | | validDays: '', |
| | | getMethod: '', |
| | | integral: '', |
| | |
| | | info: '' |
| | | }, |
| | | shops: [], |
| | | categorys: [], |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥ä¼æ å¸åç§°', tigger: 'blur' } |
| | | ], |
| | | couponRule: [ |
| | | { required: true, validator: couponRules, tigger: 'blur'} |
| | | { required: true, validator: couponRules, tigger: 'blur' } |
| | | ], |
| | | useType: [ |
| | | { required: true, message: 'è¯·éæ©ææææ¹å¼' } |
| | | ], |
| | | couponType: [ |
| | | { required: true, message: 'è¯·éæ©ç±»å' } |
| | | ], |
| | | applyType: [ |
| | | { required: true, message: 'è¯·éæ©éç¨å¯¹è±¡ç±»å' } |
| | | ], |
| | | num: [ |
| | | { required: true, validator: numRule, message: '请è¾å
¥åæ¾æ»æ°', tigger: 'blur'} |
| | | { required: true, validator: numRule, message: '请è¾å
¥åæ¾æ»æ°', tigger: 'blur' } |
| | | ], |
| | | integral: [ |
| | | { required: true, validator: numRule, message: '请è¾å
¥å
æ¢æ¡ä»¶', tigger: 'blur'} |
| | | ], |
| | | validDays: [ |
| | | { required: true, message: '请è¾å
¥å¯ç¨æ¶é´', tigger: 'blur'} |
| | | ], |
| | | getDate: [ |
| | | { required: true, validator: getDateRules, tigger: 'change'} |
| | | ], |
| | | shopId: [ |
| | | { required: true, validator: numRule, message: 'è¯·éæ©å
³èåºéº', tigger: 'change'} |
| | | ], |
| | | /*integral: [ |
| | | { required: true, validator: numRule, message: '请è¾å
¥å
æ¢æ¡ä»¶', tigger: 'blur' } |
| | | ],*/ |
| | | // validDays: [ |
| | | // { required: true, message: '请è¾å
¥å¯ç¨æ¶é´', tigger: 'blur' } |
| | | // ], |
| | | // getDate: [ |
| | | // { required: true, validator: getDateRules, tigger: 'change' } |
| | | // ], |
| | | // shopId: [ |
| | | // { required: true, validator: numRule, message: 'è¯·éæ©å
³èåºéº', tigger: 'change' } |
| | | // ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | selectGoods(){ |
| | | this.$refs.OperaCouponGoodsWindow.open('éæ©åå', this.applyDataList) |
| | | }, |
| | | loadLabels(){ |
| | | labelList({ |
| | | type: 0 // åååç±» |
| | | }).then(res => { |
| | | this.categorys = res || [] |
| | | }) |
| | | }, |
| | | loadSelectGoods(){ |
| | | console.log(this.form.applyIdList) |
| | | if(!this.form.applyIdList || !this.form.applyIdList.length){ |
| | | return |
| | | } |
| | | goodsList({ |
| | | idList: this.form.applyIdList // åååç±» |
| | | }).then(res => { |
| | | this.applyDataList = res || [] |
| | | }) |
| | | }, |
| | | doSelect(rows){ |
| | | console.log(rows,this.applyDataList) |
| | | this.applyDataList =[] |
| | | this.form.applyIdList=[] |
| | | if(rows && rows.length){ |
| | | rows.forEach(item => { |
| | | this.applyDataList.push(item) |
| | | this.form.applyIdList.push(item.id) |
| | | }) |
| | | } |
| | | }, |
| | | open (title, target, type) { |
| | | this.showGoods=false |
| | | this.title = title |
| | | this.visible = true |
| | | this.form.type = type |
| | | this.getDate = [] |
| | | this.form.startDate = '' |
| | | this.form.endDate = '' |
| | | this.applyDataList=[] |
| | | this.form.applyIdList=[] |
| | | this.form.applyCateIdList=[] |
| | | this.loadLabels() |
| | | this.form.limitPrice=null |
| | | this.form.price=null |
| | | this.form.startDate=null |
| | | this.form.endDate=null |
| | | this.form.num=1 |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | console.log(this.form); |
| | | console.log(this.form) |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | |
| | | this.form[key] = target[key] |
| | | } |
| | | this.getDate = [target.startDate, target.endDate] |
| | | if(this.form.applyType === 1){ |
| | | this.form.applyCateIdList =[] |
| | | var ta = this.form.applyIds.split(',') |
| | | if(ta && ta.length){ |
| | | ta.forEach(tt =>{ |
| | | this.form.applyCateIdList.push(parseInt(tt)) |
| | | }) |
| | | } |
| | | } |
| | | if(this.form.applyType === 2){ |
| | | this.form.applyIdList = this.form.applyIds.split(',') |
| | | this.loadSelectGoods() |
| | | } |
| | | }) |
| | | }, |
| | | selectDate(value) { |
| | | selectDate (value) { |
| | | this.form.startDate = value[0] |
| | | this.form.endDate = value[1] |
| | | }, |
| | | inputAction(item, key) { |
| | | if(item[key]<0) { |
| | | inputAction (item, key) { |
| | | if (item[key] < 0) { |
| | | item[key] = '' |
| | | } else { |
| | | item[key] = item[key].replace(/[^\d.]/g, '') |
| | | .replace(/\.{2,}/g, '.') |
| | | .replace('.', '$#$') |
| | | .replace(/\./g, '') |
| | | .replace('$#$', '.') |
| | | .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') |
| | | .replace(/^\./g, '') |
| | | .replace(/\.{2,}/g, '.') |
| | | .replace('.', '$#$') |
| | | .replace(/\./g, '') |
| | | .replace('$#$', '.') |
| | | .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') |
| | | .replace(/^\./g, '') |
| | | } |
| | | }, |
| | | remoteMethod(query) { |
| | | remoteMethod (query) { |
| | | if (query !== '') { |
| | | this.searchLoading = true |
| | | let action = this.form.type==2 ? activityList : shopList |
| | | const action = this.form.type == 2 ? activityList : shopList |
| | | action({ |
| | | capacity: 999, |
| | | model: { |
| | |
| | | this.searchLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <TableLayout :permissions="['business:coupon:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="伿 å¸åç§°" prop="name"> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥ä¼æ å¸åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <!-- 0å家伿 å¸ 1å¹³å°ä¼æ å¸ --> |
| | | <!-- <el-form-item label="伿 å¸ç±»å" prop="type"> |
| | | <el-select |
| | | v-model="searchForm.type" |
| | | placeholder="è¯·éæ©ä¼æ å¸ç±»å" |
| | | > |
| | | <el-option key="0" :value="0" label="å家伿 å¸"></el-option> |
| | | <el-option key="1" :value="1" label="å¹³å°ä¼æ å¸"></el-option> |
| | | <el-form-item label="ç±»å" prop="couponType"> |
| | | <el-select v-model="searchForm.couponType" clearable placeholder="è¯·éæ©ä¼æ å¸ç±»å" > |
| | | <el-option key="0" :value="0" label="满åå¸"></el-option> |
| | | <el-option key="1" :value="1" label="ææ£å¸"></el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:coupon:create', 'business:coupon:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCouponWindow.open('æ°å»ºå¹³å°ä¼æ å¸', null, 1)" v-permissions="['business:coupon:create']">æ°å»ºå¹³å°ä¼æ å¸</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaCouponWindow.open('æ°å»ºå家伿 å¸', null, 0)" v-permissions="['business:coupon:create']">æ°å»ºå家伿 å¸</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:coupon:delete']">å é¤</el-button></li> |
| | | <li><el-button type="primary" icon="el-icon-plus" @click="$refs.operaCouponWindow.open('æ°å»º', null, 1)" v-permissions="['business:coupon:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:coupon:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="伿 å¸åç§°" align="center" min-width="120px"> |
| | | <el-table-column prop="name" label="伿 å¸åç§°" align="center" min-width="120px"></el-table-column> |
| | | <el-table-column label="ç±»å" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="showDetail(row)">{{ row.name }}</el-button> |
| | | <span v-if="row.couponType ===0"> 满åå¸</span> |
| | | <span v-if="row.couponType ===1"> ææ£å¸</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="伿 è§å" align="center" min-width="100px"> |
| | | <el-table-column label="伿 è§å" align="center" min-width="150px" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | {{ `满${row.limitPrice}å${row.price}` }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="伿 å¸ç±»å" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.type==0?'å家伿 å¸':'å¹³å°ä¼æ å¸' }} |
| | | <span v-if="row.couponType ===0"> {{ `è®¢åæ»¡${row.limitPrice||0}å
ï¼å${row.price||0}` }}å
</span> |
| | | <span v-if="row.couponType ===1"> {{ `è®¢åæ»¡${row.limitPrice||0}å
ï¼äº«${row.price||0}æ` }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="åæ¾æ»é" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column label="å·²é¢å" align="center" min-width="100px"> |
| | | <el-table-column label="å·²åéæ°é" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="showCouponUse(row.id)">{{ row.unused + row.used }}</el-button> |
| | | </template> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="used" label="ä½¿ç¨æ°é" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="validDays" label="é¢å忿天æ°" align="center" min-width="110px"></el-table-column> |
| | | <el-table-column prop="startDate" label="å¼å§æ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="endDate" label="ç»ææ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column label="è¿è¡ç¶æ" align="center" min-width="100px"> |
| | | <el-table-column prop="validDays" label="ä½¿ç¨æææ" align="center" min-width="210px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.status==0 ? 'æªå¼å§' : row.status==1 ? 'è¿è¡ä¸' : 'å·²ç»æ' }} |
| | | <span v-if="row.useType ===0"><li> èµ·ï¼{{ row.startDate}}</li> <li>æ¢ï¼{{row.endDate }}</li></span> |
| | | <span v-if="row.useType ===1"> {{ `é¢ç¨å${row.validDays||0}天ææ` }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="éç¨ç±»å" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.applyType ===0"> å
¨ç¨éç¨</span> |
| | | <span v-if="row.applyType ===1"> æåç±»</span> |
| | | <span v-if="row.applyType ===2"> æå®åå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" align="center" min-width="100px"> |
| | |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | align="center" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaCouponWindow.open('ç¼è¾ä¼æ å¸', row)" icon="el-icon-edit" v-permissions="['business:coupon:update']">ç¼è¾</el-button> |
| | |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | type: '' |
| | | couponType: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.$refs.operaCouponDetail.open('伿 å¸è¯¦æ
', row) |
| | | }, |
| | | showCouponUse(id) { |
| | | |
| | | |
| | | this.$refs.operaCouponUsedDetail.open('伿 å¸é¢å详æ
', id) |
| | | }, |
| | | statusChange(row) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="box" style="max-height:calc(100% - 60px);margin-bottom:50px;overflow-y: auto" > |
| | | <el-form :model="form" ref="form"> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">ã1ãæ³¨åå¥å±</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="积åå¥å±" label-width="150px" prop="regIntegralRewardStatus"> |
| | | <el-switch v-model="form.regIntegralRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="æ°äººæ³¨åé" label-width="250px" prop="regIntegralReward"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.regIntegralReward" placeholder="请è¾å
¥" v-trim> |
| | | <template slot="append">积å</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="伿 å¸å¥å±" label-width="150px" prop="regCouponRewardStatus"> |
| | | <el-switch v-model="form.regCouponRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <div > |
| | | <el-form-item label="æ°äººæ³¨åé伿 å¸" label-width="250px" prop="regCouponRewardList"> |
| | | </el-form-item> |
| | | <div style="margin-left: 150px;border: 1px solid #f2f2f2"> |
| | | <el-table style="width: 600px;" :data="form.regCouponRewardList"> |
| | | <el-table-column prop="shopPrice" label="伿 å¸" min-width="300px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px" clearable filterable placeholder="è¯·éæ©ä¼æ å¸" > |
| | | <el-option v-for="item in couponList" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ°é" min-width="200px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-input style="width: 100px;margin: 0px 20px" type="number" v-model="row.num" placeholder="请è¾å
¥æ°é" v-trim/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="100px" align="center"> |
| | | <template slot-scope="scope" > |
| | | <el-button style="color: red;border: none;" @click="delCoupon(0,scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(0)" style="height: 30px;margin: 10px;">æ·»å </el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">ã2ãé请好åå¥å±</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="积åå¥å±" label-width="150px" prop="shareIntegralRewardStatus"> |
| | | <el-switch v-model="form.shareIntegralRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="好åæå注åéé请人" label-width="250px" prop="shareIntegralReward"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.shareIntegralReward" placeholder="请è¾å
¥" v-trim> |
| | | <template slot="append">积å</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="伿 å¸å¥å±" label-width="150px" prop="shareCouponRewardStatus"> |
| | | <el-switch v-model="form.shareCouponRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <div > |
| | | <el-form-item label="好å宿é¦åééè¯·äººä¼æ å¸" label-width="250px" prop="shareCouponRewardList"> |
| | | </el-form-item> |
| | | <div style="margin-left: 150px;border: 1px solid #f2f2f2"> |
| | | <el-table style="width: 600px;" :data="form.shareCouponRewardList"> |
| | | <el-table-column prop="couponId" label="伿 å¸" min-width="300px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px" clearable filterable placeholder="è¯·éæ©ä¼æ å¸" > |
| | | <el-option v-for="item in couponList" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ°é" min-width="200px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-input style="width: 100px;margin: 0px 20px" type="number" v-model="row.num" placeholder="请è¾å
¥æ°é" v-trim/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="100px" align="center"> |
| | | <template slot-scope="scope" > |
| | | <el-button style="color: red;border: none;" @click="delCoupon(1,scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(1)" style="height: 30px;margin: 10px;">æ·»å </el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">ã3ãæ¶è´¹è¿ç§¯å</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="è¿ç¨æ·ç§¯å" label-width="150px" prop="returnMemberIntegralStatus"> |
| | | <el-switch v-model="form.returnMemberIntegralStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="订åå®ä»é颿¯æ»¡" label-width="250px" prop="returnMemberIntegral"> |
| | | <el-input style="width: 250px;margin: 0px 20px" type="number" v-model="form.returnMemberIntegral" placeholder="请è¾å
¥" v-trim> |
| | | <template slot="append">å
è¿ç¨æ·1积å</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>æéï¼å®ä»éé¢å»é¤è¿è´¹</p> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="è¿ç»éå积å" label-width="150px" prop="returnShopIntegralStatus"> |
| | | <el-switch v-model="form.returnShopIntegralStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="订åå®ä»é颿¯æ»¡" label-width="250px" prop="returnShopIntegral"> |
| | | <el-input style="width: 250px;margin: 0px 20px" type="number" v-model="form.returnShopIntegral" placeholder="请è¾å
¥" v-trim> |
| | | <template slot="append">å
è¿ç»éå1积å</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>æéï¼å®ä»éé¢å»é¤è¿è´¹</p> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">ã4ãåè®¡ä¼æ æ¿æ
æ¯ä¾</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="æ»é¨æ¿æ
" label-width="150px" prop="totalRate"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.totalRate" placeholder="请è¾å
¥" v-trim> |
| | | <template slot="append">%</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>æéï¼è®¾ç½®æ»é¨åç»éåå¨è®¢ååè®¡ä¼æ éé¢ä¸ï¼ä¼æ å¸+ç§¯åæµæ£ï¼åèªæ¿æ
çæ¯ä¾</p> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item style="margin-top: 100px;width: 100%;text-align: center"> |
| | | <el-button type="primary" style="width: 300px" :loading="working" @click="submit">ä¿åé
置项</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlatformConfig, updPlatformConfig } from '@/api/system/dictData' |
| | | import {allList} from '@/api/business/coupon' |
| | | export default { |
| | | name: '', |
| | | data () { |
| | | return { |
| | | uploadData: { |
| | | folder: '' |
| | | }, |
| | | isUploading: false, |
| | | working: false, |
| | | couponList: [], |
| | | form: { |
| | | regIntegralRewardStatus: 0, |
| | | shareIntegralRewardStatus: 0, |
| | | regCouponRewardStatus: 0, |
| | | shareCouponRewardStatus: 0, |
| | | regIntegralReward: 0, |
| | | shareIntegralReward: 0, |
| | | regCouponRewardList: [], |
| | | shareCouponRewardList: [], |
| | | returnMemberIntegralStatus: 0, |
| | | returnShopIntegralStatus: 0, |
| | | returnMemberIntegral: 0, |
| | | returnShopIntegral: 0, |
| | | totalRate: 0 |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.getCouponList() |
| | | this.getData() |
| | | }, |
| | | |
| | | methods: { |
| | | getCouponList () { |
| | | allList({}) |
| | | .then(res => { |
| | | if (res) { |
| | | this.couponList = res || [] |
| | | } |
| | | }) |
| | | }, |
| | | delCoupon(type,index){ |
| | | if(type ===0){ |
| | | this.form.regCouponRewardList.splice(index,1) |
| | | }else if(type ===1){ |
| | | this.form.shareCouponRewardList.splice(index,1) |
| | | } |
| | | }, |
| | | addCoupon(type){ |
| | | if(type ===0){ |
| | | this.form.regCouponRewardList.push({couponId:null,num:null}) |
| | | }else if(type ===1){ |
| | | this.form.shareCouponRewardList.push({couponId:null,num:null}) |
| | | } |
| | | |
| | | }, |
| | | getData () { |
| | | getPlatformConfig({}) |
| | | .then(res => { |
| | | if (res) { |
| | | this.form = { |
| | | regIntegralRewardStatus: res.regIntegralRewardStatus || 0, |
| | | shareIntegralRewardStatus: res.shareIntegralRewardStatus || 0, |
| | | regCouponRewardStatus: res.regCouponRewardStatus || 0, |
| | | shareCouponRewardStatus: res.shareCouponRewardStatus || 0, |
| | | regIntegralReward: res.regIntegralReward || 0, |
| | | shareIntegralReward: res.shareIntegralReward || 0, |
| | | regCouponRewardList: res.regCouponRewardList || [], |
| | | shareCouponRewardList: res.shareCouponRewardList || [], |
| | | returnMemberIntegralStatus: res.returnMemberIntegralStatus || 0, |
| | | returnShopIntegralStatus: res.returnShopIntegralStatus || 0, |
| | | returnMemberIntegral: res.returnMemberIntegral || 0, |
| | | returnShopIntegral: res.returnShopIntegral || 0, |
| | | totalRate: res.totalRate || 0 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | submit () { |
| | | console.log(this.form) |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | updPlatformConfig(this.form).then(res => { |
| | | this.$message.success('ä¿åæå') |
| | | this.getData() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .el-container /deep/ .el-main{ |
| | | width: 100%; |
| | | overflow-y: auto !important ; |
| | | height: calc(100% - 94px); |
| | | } |
| | | .item-content{ |
| | | display: flex; |
| | | width: 100%; |
| | | } |
| | | .header{ |
| | | margin: 20px 0 20px 0;padding:10px;background-color: rgba(140,147,157,0.61); |
| | | } |
| | | /deep/ .el-main{ |
| | | width: 100%; |
| | | //height: 100%; |
| | | overflow-y: auto !important ; |
| | | height: calc(100% - 94px); |
| | | } |
| | | .box { |
| | | width: 100%; |
| | | padding: 30px; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | } |
| | | </style> |
| | |
| | | public ApiResponse<PageData<Goods>> findPage (@RequestBody PageWrap<Goods> pageWrap) { |
| | | return ApiResponse.success(goodsService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:goods:query") |
| | | public ApiResponse<List<Goods>> findList (@RequestBody Goods pageWrap) { |
| | | return ApiResponse.success(goodsService.findList(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®ä¸åºåç±»æ¥è¯¢åå") |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import com.doumee.dao.business.model.Areas; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | public static final String ORDERSET_RETURN_SHOP_INTEGRAL_STATUS="ORDERSET_RETURN_SHOP_INTEGRAL_STATUS"; |
| | | public static final String ORDERSET_RETURN_MEMBER_INTEGRAL="ORDERSET_RETURN_MEMBER_INTEGRAL"; |
| | | public static final String ORDERSET_RETURN_SHOP_INTEGRAL="ORDERSET_RETURN_SHOP_INTEGRAL"; |
| | | |
| | | public static final String INTERALSET_DEDUCTINTEGRALLIMIT="INTERALSET_DEDUCTINTEGRALLIMIT"; |
| | | public static final String INTERALSET_MININTEGRALPRICELIMIT="INTERALSET_MININTEGRALPRICELIMIT"; |
| | | public static final String INTERALSET_INTEGRALINVALIDTYPE="INTERALSET_INTEGRALINVALIDTYPE"; |
| | | public static final String INTERALSET_INTEGRALINVALIDCIRCLE="INTERALSET_INTEGRALINVALIDCIRCLE"; |
| | | public static final String INTERALSET_INTEGRALRULEINFO="INTERALSET_INTEGRALRULEINFO"; |
| | | |
| | | public static final String ORDERSET_TOTAL_RATE="ORDERSET_TOTAL_RATE"; |
| | | public static final String ORDER_SET ="ORDER_SET" ; |
| | | public static final String INTEGRAL_SET ="INTEGRAL_SET" ; |
| | | |
| | | /** |
| | | * mq tag |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 伿 å¸ä¿¡æ¯è¡¨ |
| | |
| | | @ApiModelProperty(value = "éç¨ç±»åï¼0=å
¨åº;1=åç±»ï¼2=æå®åå") |
| | | private Integer applyType; |
| | | |
| | | @ApiModelProperty(value = "éç¨å
³è对象信æ¯ä¸»é®") |
| | | @ApiModelProperty(value = "éç¨å
³è对象信æ¯ä¸»é®,å¤ä¸ªè±æéå·éå¼") |
| | | private String applyIds; |
| | | |
| | | @ApiModelProperty(value = "ææ£å·æ»¡åä¸ééé¢") |
| | |
| | | @ApiModelProperty(value = "æªä½¿ç¨æ°é", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer unused; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "éç¨å
³è对象信æ¯ä¸»é®,å¤ä¸ªè±æéå·éå¼") |
| | | @TableField(exist = false) |
| | | private List<Integer> applyIdList; |
| | | @ApiModelProperty(value = "éç¨å
³èå类信æ¯ä¸»é®,å¤ä¸ªè±æéå·éå¼") |
| | | @TableField(exist = false) |
| | | private List<Integer> applyCateIdList; |
| | | } |
| | |
| | | @ApiModelProperty(value = "ååskuä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Sku> skuList; |
| | | @ApiModelProperty(value = "ååç¼ç éå") |
| | | @TableField(exist = false) |
| | | private List<Integer> idList; |
| | | @ApiModelProperty(value = "ååskuä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Labels> brandList; |
| | |
| | | |
| | | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | |
| | | import com.doumee.dao.system.dto.QuerySystemDictDataDTO; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.vo.SystemDictDataListVO; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface SystemDictDataMapper extends BaseMapper<SystemDictData> { |
| | | public interface SystemDictDataMapper extends MPJBaseMapper<SystemDictData> { |
| | | |
| | | /** |
| | | * æ¥è¯¢åå
¸æ°æ®ç®¡çå表 |
| | |
| | | private BigDecimal returnShopIntegral; |
| | | @ApiModelProperty(value = "åè®¡ä¼æ æ¿æ
æ¯ä¾ï¼%ï¼") |
| | | private BigDecimal totalRate; |
| | | @ApiModelProperty(value = "å¤å°ç§¯åæµæ£1å
") |
| | | private Integer deductIntegralLimit; |
| | | @ApiModelProperty(value = "满å¤å°éé¢å¯ä½¿ç¨ç§¯å") |
| | | private BigDecimal minIntegralPriceLimit; |
| | | @ApiModelProperty(value = "积åå¤±ææ¹å¼ 0é¿æææ 1æç§¯åäº§çæ¶é´å¤±æ") |
| | | private Integer integralInvalidType; |
| | | @ApiModelProperty(value = "积å鿝卿") |
| | | private Integer integralInvalidCircle; |
| | | @ApiModelProperty(value = "积å使ç¨è§å说æ") |
| | | private String integralRuleInfo; |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 伿 å¸ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | @Override |
| | | public Integer create(Coupon coupon) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | coupon.setType(Constants.ONE); |
| | | coupon.setGetMethod(Constants.ZERO); |
| | | isCreateParamValid(coupon); |
| | | |
| | | /**å¹³å°ä¼æ 叿¯å
æ¢ä¼æ å¸ï¼å家伿 叿¯é¢å伿 å¸*/ |
| | | if(Constants.equalsInteger(coupon.getType(),Constants.ZERO)){ |
| | | coupon.setGetMethod(Constants.ZERO); |
| | | }else if(Constants.equalsInteger(coupon.getType(),Constants.ONE)){ |
| | | coupon.setGetMethod(Constants.ONE); |
| | | } |
| | | coupon.setIsdeleted(Constants.ZERO); |
| | | coupon.setCreator(user.getId()); |
| | | coupon.setCreateDate(new Date()); |
| | | coupon.setStatus(Constants.ONE); |
| | | coupon.setEditor(user.getId()); |
| | | coupon.setEditDate(new Date()); |
| | | coupon.setStatus(Constants.ONE);//é»è®¤ç¦ç¨ |
| | | couponMapper.insert(coupon); |
| | | return coupon.getId(); |
| | | } |
| | | |
| | | public void isCreateParamValid(Coupon coupon){ |
| | | |
| | | if(StringUtils.isBlank(coupon.getName()) |
| | | || coupon.getType()==null |
| | | ||coupon.getLimitPrice()==null |
| | |
| | | /* ||coupon.getIntegral()==null*/ |
| | | ||coupon.getStartDate()==null |
| | | ||coupon.getEndDate()==null |
| | | ||coupon.getValidDays()==null |
| | | // ||coupon.getValidDays()==null |
| | | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage()); |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "å
³èçåºéºä¸åå¨ï¼"); |
| | | } |
| | | } |
| | | coupon.setApplyIds(""); |
| | | if(Constants.equalsInteger(coupon.getApplyType(),Constants.TWO) && coupon.getApplyIdList()!=null){ |
| | | coupon.setApplyIds(coupon.getApplyIdList().stream().map(String::valueOf).collect(Collectors.joining(",")));//使ç¨å¯¹è±¡ç¼ç éå |
| | | } |
| | | if(Constants.equalsInteger(coupon.getApplyType(),Constants.ONE) && coupon.getApplyCateIdList()!=null){ |
| | | coupon.setApplyIds(coupon.getApplyCateIdList().stream().map(String::valueOf).collect(Collectors.joining(",")));//使ç¨å¯¹è±¡ç¼ç éå |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | |
| | | Coupon query= couponMapper.selectById(id); |
| | | initCouponStatus(query); |
| | | if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){ |
| | |
| | | isCreateParamValid(coupon); |
| | | Coupon query= couponMapper.selectById(coupon.getId()); |
| | | initCouponStatus(query); |
| | | if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){ |
| | | /* if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "æ´»å¨å·²å¼å§/å·²ç»æç¶æï¼ä¸æ¯æç¼è¾æä½"); |
| | | } |
| | | }*/ |
| | | coupon.setEditor(user.getId()); |
| | | coupon.setEditDate(new Date()); |
| | | couponMapper.updateById(coupon); |
| | |
| | | queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id and STATUS=1) as used"); |
| | | |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Coupon::getName,pageWrap.getModel().getName()); |
| | | queryWrapper.eq(pageWrap.getModel().getCouponType()!=null,Coupon::getCouponType,pageWrap.getModel().getCouponType()); |
| | | queryWrapper.eq(Coupon::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.orderByDesc(Coupon::getCreateDate); |
| | | IPage<Coupon> result = couponJoinMapper.selectJoinPage(page,Coupon.class, queryWrapper); |
| | |
| | | @Override |
| | | public List<Goods> findList(Goods goods) { |
| | | QueryWrapper<Goods> wrapper = new QueryWrapper<>(goods); |
| | | wrapper.lambda() |
| | | .in(goods.getIdList() != null && goods.getIdList().size()>0, Goods::getId, goods.getIdList()) |
| | | .eq( Goods::getIsdeleted, Constants.ZERO); |
| | | return goodsMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | IPage<Goods> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Goods> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | queryWrapper.selectAll(Goods.class); |
| | | |
| | | queryWrapper.select("t1.name",Goods::getCategoryName); |
| | | queryWrapper.select("t2.name" ,Goods::getBrandName); |
| | | queryWrapper.select("t3.name" ,Goods::getParentName); |
| | |
| | | queryWrapper.eq(pageWrap.getModel().getParentCategoryId() != null, Goods::getParentCategoryId, pageWrap.getModel().getParentCategoryId()); |
| | | queryWrapper.eq(pageWrap.getModel().getBrandId() != null, Goods::getBrandId, pageWrap.getModel().getBrandId()); |
| | | queryWrapper.eq(pageWrap.getModel().getStatus() != null, Goods::getStatus, pageWrap.getModel().getStatus()); |
| | | |
| | | queryWrapper.orderByDesc(Goods::getCreateDate); |
| | | queryWrapper.in(pageWrap.getModel().getIdList() != null && pageWrap.getModel().getIdList().size()>0, Goods::getId, pageWrap.getModel().getIdList()); |
| | | queryWrapper.orderByDesc(Goods::getId); |
| | | IPage<Goods> result = goodsAdminJoinMapper.selectJoinPage(page, Goods.class, queryWrapper); |
| | | initResult(result.getRecords()); |
| | | return PageData.from(result); |
| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | platformConfigDTO.setReturnMemberIntegralStatus(0); |
| | | platformConfigDTO.setReturnShopIntegralStatus(0); |
| | | |
| | | platformConfigDTO.setMinIntegralPriceLimit(new BigDecimal(0)); |
| | | platformConfigDTO.setDeductIntegralLimit(0); |
| | | platformConfigDTO.setIntegralRuleInfo(""); |
| | | platformConfigDTO.setIntegralInvalidType(0); |
| | | platformConfigDTO.setIntegralInvalidCircle(0); |
| | | |
| | | platformConfigDTO.setTotalRate(new BigDecimal(0)); |
| | | |
| | | SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda() |
| | | /* SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda() |
| | | .eq(SystemDict::getCode,Constants.ORDER_SET).last("limit 1")); |
| | | if(dict == null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æ°æ®åå
¸é
ç½®æ°æ®æè¯¯ï¼è¯·è系系ç»ç®¡çåå¤çï¼"); |
| | | } |
| | | |
| | | List<SystemDictData> systemDictDataList = systemDictDataMapper.selectList(new QueryWrapper<SystemDictData>() |
| | | .lambda().eq(SystemDictData::getDictId,dict.getId()) |
| | | .in(SystemDictData::getLabel |
| | | , Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS |
| | | , Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS |
| | | , Constants.ORDERSET_REG_COUPON_REWARD_STATUS |
| | | , Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS |
| | | , Constants.ORDERSET_REG_INTEGRAL_REWARD |
| | | , Constants.ORDERSET_SHARE_INTEGRAL_REWARD |
| | | , Constants.ORDERSET_REG_COUPON_REWARD_LIST |
| | | , Constants.ORDERSET_SHARE_COUPON_REWARD_LIST |
| | | , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS |
| | | , Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS |
| | | , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL |
| | | , Constants.ORDERSET_RETURN_SHOP_INTEGRAL |
| | | ,Constants.ORDERSET_TOTAL_RATE ) |
| | | */ |
| | | List<SystemDictData> systemDictDataList = systemDictDataMapper.selectJoinList(SystemDictData.class,new MPJLambdaWrapper<SystemDictData>() |
| | | .selectAll(SystemDictData.class) |
| | | .leftJoin(SystemDict.class,SystemDict::getId,SystemDictData::getDictId) |
| | | .in(SystemDict::getCode,Constants.ORDER_SET,Constants.INTEGRAL_SET) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictDataList)){ |
| | | for (SystemDictData systemDictData:systemDictDataList) { |
| | |
| | | platformConfigDTO.setReturnShopIntegralStatus(getIntegerValByStr(systemDictData.getCode())); |
| | | }else if(systemDictData.getLabel().equals(Constants.ORDERSET_TOTAL_RATE)) { |
| | | platformConfigDTO.setTotalRate(getDecimalValByStr(systemDictData.getCode())); |
| | | } |
| | | else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDTYPE)) { |
| | | platformConfigDTO.setIntegralInvalidType(getIntegerValByStr(systemDictData.getCode())); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDCIRCLE)) { |
| | | platformConfigDTO.setIntegralInvalidCircle(getIntegerValByStr(systemDictData.getCode())); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALRULEINFO)) { |
| | | platformConfigDTO.setIntegralRuleInfo(systemDictData.getCode()); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_DEDUCTINTEGRALLIMIT)) { |
| | | platformConfigDTO.setDeductIntegralLimit(getIntegerValByStr(systemDictData.getCode())); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_MININTEGRALPRICELIMIT)) { |
| | | platformConfigDTO.setMinIntegralPriceLimit(getDecimalValByStr(systemDictData.getCode())); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class, BusinessException.class}) |
| | | public void updPlatformConfig(PlatformConfigDTO platformConfigDTO) { |
| | | SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda() |
| | | /* SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda() |
| | | .eq(SystemDict::getCode, Constants.ORDER_SET).last("limit 1")); |
| | | if (dict == null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "æ°æ®åå
¸é
ç½®æ°æ®æè¯¯ï¼è¯·è系系ç»ç®¡çåå¤çï¼"); |
| | | } |
| | | List<SystemDictData> systemDictDataList = systemDictDataMapper.selectList(new QueryWrapper<SystemDictData>() |
| | | .lambda() |
| | | .eq(SystemDictData::getDictId, dict.getId()) |
| | | .in(SystemDictData::getLabel |
| | | , Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS |
| | | , Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS |
| | | , Constants.ORDERSET_REG_COUPON_REWARD_STATUS |
| | | , Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS |
| | | , Constants.ORDERSET_REG_INTEGRAL_REWARD |
| | | , Constants.ORDERSET_SHARE_INTEGRAL_REWARD |
| | | , Constants.ORDERSET_REG_COUPON_REWARD_LIST |
| | | , Constants.ORDERSET_SHARE_COUPON_REWARD_LIST |
| | | , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS |
| | | , Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS |
| | | , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL |
| | | , Constants.ORDERSET_RETURN_SHOP_INTEGRAL |
| | | , Constants.ORDERSET_TOTAL_RATE) |
| | | }*/ |
| | | List<SystemDictData> systemDictDataList = systemDictDataMapper.selectJoinList(SystemDictData.class,new MPJLambdaWrapper<SystemDictData>() |
| | | .selectAll(SystemDictData.class) |
| | | .leftJoin(SystemDict.class,SystemDict::getId,SystemDictData::getDictId) |
| | | .in(SystemDict::getCode,Constants.ORDER_SET,Constants.INTEGRAL_SET) |
| | | ); |
| | | if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictDataList)) { |
| | | for (SystemDictData systemDictData : systemDictDataList) { |
| | |
| | | } else if (systemDictData.getLabel().equals(Constants.ORDERSET_TOTAL_RATE)) { |
| | | systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getTotalRate()).doubleValue() + ""); |
| | | } |
| | | |
| | | else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDTYPE)) { |
| | | systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getIntegralInvalidType()) + ""); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALINVALIDCIRCLE)) { |
| | | systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getIntegralInvalidCircle()) + ""); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_INTEGRALRULEINFO)) { |
| | | systemDictData.setCode(platformConfigDTO.getIntegralRuleInfo()); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_DEDUCTINTEGRALLIMIT)) { |
| | | systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getDeductIntegralLimit()) + ""); |
| | | }else if(systemDictData.getLabel().equals(Constants.INTERALSET_MININTEGRALPRICELIMIT)) { |
| | | systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getReturnShopIntegral()).doubleValue() + ""); |
| | | } |
| | | systemDictDataMapper.update(new UpdateWrapper<SystemDictData>().lambda() |
| | | .set(SystemDictData::getCode, systemDictData.getCode()) |
| | | .eq(SystemDictData::getId, systemDictData.getId())); |