Merge remote-tracking branch 'origin/master'
| | |
| | | } |
| | | |
| | | // æ¥è¯¢----ä¼ä¸èå |
| | | export function fetchTree1 () { |
| | | return request.post(`/system/menu/treeList/1`) |
| | | export function fetchTree1 (type) { |
| | | type = type || 1; |
| | | return request.post(`/system/menu/treeList/${type}`) |
| | | } |
| | | |
| | | // æ°å»º |
| | |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label" style="width: 100px;">è¥ä¸æ§ç
§ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | <div class="image" v-if="form.businessImg.fileurlFull"> |
| | | <div class="image" v-if="form.businessImg && form.businessImg.fileurlFull"> |
| | | <el-image |
| | | v-if="form.businessImg.fileurlFull!=null" |
| | | v-if="form.businessImg!=null&&form.businessImg.fileurlFull!=null" |
| | | style="width: 90px; height: 90px" |
| | | :src="form.businessImg.fileurlFull" |
| | | :preview-src-list="[form.businessImg.fileurlFull]"> |
| | |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label" style="width: 100px;">æ³äººèº«ä»½è¯ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | <div class="image" v-if="form.idcardImgList[0].fileurlFull"> |
| | | <div class="image" v-if="form.idcardImgList && form.idcardImgList .length>1 && form.idcardImgList[0].fileurlFull"> |
| | | <el-image |
| | | append-to-body |
| | | v-if="form.idcardImgList[0].fileurlFull" |
| | |
| | | :preview-src-list="[form.idcardImgList[0].fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | <div class="image" v-if="form.idcardImgList[1].fileurlFull"> |
| | | <div class="image" v-if="form.idcardImgList && form.idcardImgList .length>2 && form.idcardImgList[1].fileurlFull"> |
| | | <el-image |
| | | append-to-body |
| | | v-if="form.idcardImgList[1].fileurlFull" |
| | |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label" style="width: 100px;">ä¼ä¸ç¾ç« ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | <div class="image" v-if="form.signImg.fileurlFull"> |
| | | <div class="image" v-if="form.signImg && form.signImg.fileurlFull"> |
| | | <el-image |
| | | v-if="form.signImg.fileurlFull!=null" |
| | | style="width: 90px; height: 90px" |
| | |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | |
| | | if(res.businessImg){ |
| | | this.form.file.imgurl = res.businessImg.fileurl |
| | | this.form.file.imgurlfull = res.businessImg.fileurlFull |
| | | } |
| | | if (res.idcardImgList&& res.idcardImgList.length>1) { |
| | | this.form.file1.imgurl = res.idcardImgList[0].fileurl |
| | | this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull |
| | | } |
| | | if (res.idcardImgList && res.idcardImgList.length>2) { |
| | | this.form.file2.imgurl = res.idcardImgList[1].fileurl |
| | | this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull |
| | | } |
| | | if (res.signImg) { |
| | | this.form.file3.imgurl = res.signImg.fileurl |
| | | this.form.file3.imgurlfull = res.signImg.fileurlFull |
| | | } |
| | | |
| | | listForCompany({ companyId: this.dataId }) |
| | | .then(resa => { |
| | |
| | | <el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" v-else>{{num}}s</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="éªè¯ç " prop="captche" v-if="form.type !== 1"> |
| | | <el-form-item label="éªè¯ç " prop="captche" v-if="!form.id"> |
| | | <el-input v-model="form.captche" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="å
¬å¸è´¦å·" prop="username" v-if="form.type !== 1"> |
| | | <el-form-item label="å
¬å¸è´¦å·" prop="username" v-if="!form.id"> |
| | | <el-input v-model="form.username" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="认è¯é®ç®±" prop="email" > |
| | |
| | | <!-- </div>--> |
| | | <!-- </el-form-item>--> |
| | | </el-form> |
| | | <el-button type="primary" style="margin-bottom: 15px;" @click="add" v-if="form.type !== 1">æ·»å </el-button> |
| | | <el-button type="primary" style="margin-bottom: 15px;" @click="add" v-if="!form.id">æ·»å </el-button> |
| | | <el-table |
| | | v-if="form.type !== 1" |
| | | v-if="!form.id" |
| | | :data="form.solutionList" |
| | | border |
| | | style="width: 100%"> |
| | |
| | | } |
| | | ], |
| | | type: '0', |
| | | actionType: '0', |
| | | file: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | |
| | | { required: true, message: '请è¾å
¥å
¬å¸è´¦å·' } |
| | | ] |
| | | }, |
| | | |
| | | programme: [] |
| | | } |
| | | }, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | :withFooter="false" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <div class="info"> |
| | | <div class="info_label"> |
| | | <span>ä¼ä¸è¯¦æ
</span> |
| | | <div> |
| | | <el-button type="primary" @click="$refs.modification.open('ä¿®æ¹ä¿é©æ¹æ¡', form)">æ´æ¹ä¿é©æ¹æ¡</el-button> |
| | | <el-button type="primary" @click="$refs.operaCompanyWindow.open('ç¼è¾ä¼ä¸ä¿¡æ¯', form)">ä¿®æ¹ä¼ä¸ä¿¡æ¯</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="info_list"> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">ä¼ä¸åç§°ï¼</div> |
| | | <div class="info_list_item_val">{{form.name || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">ç»ä¸ä¿¡ç¨ä»£ç ï¼</div> |
| | | <div class="info_list_item_val">{{form.code || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">å
¬å¸è´¦å·ï¼</div> |
| | | <div class="info_list_item_val">{{form.username || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">ç»å®ææºå·ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | {{form.phone || '-'}} |
| | | <el-button type="primary" size="mini" style="margin-left: 10px;" @click="visiblePhone = true">æ´æ¹ç»å®</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">认è¯é®ç®±ï¼</div> |
| | | <div class="info_list_item_val">{{form.email || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">纳ç¨äººè¯å«å·ï¼</div> |
| | | <div class="info_list_item_val">{{form.taxCode || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">弿·è¡ï¼</div> |
| | | <div class="info_list_item_val">{{form.taxBank || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label">é¶è¡è´¦å·ï¼</div> |
| | | <div class="info_list_item_val">{{form.taxAccount || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item" style="width: 100%;"> |
| | | <div class="info_list_item_label">å°åãçµè¯ï¼</div> |
| | | <div class="info_list_item_val">{{form.taxAddr || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item" style="width: 100%;"> |
| | | <div class="info_list_item_label">çµååç¥¨æ¥æ¶å°åï¼</div> |
| | | <div class="info_list_item_val">{{form.invoiceEmail || '-'}}</div> |
| | | </div> |
| | | <div class="info_list_item" style="width: 100%;"> |
| | | <div class="info_list_item_label">纸质åç¥¨æ¥æ¶å°åï¼</div> |
| | | <div class="info_list_item_val">{{form.invoiceAddr || '-'}}</div> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="form.solutionListName" |
| | | border |
| | | style="width: 100%; margin-bottom: 20px;"> |
| | | <el-table-column |
| | | label="åºå·" |
| | | align="center" |
| | | width="80"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="solutionName" |
| | | align="center" |
| | | label="ä¿é©æ¹æ¡"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="å åä¿åè½"> |
| | | <template slot-scope="{row}"> |
| | | <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canAdd">å ä¿</el-checkbox> |
| | | <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canReduce">åä¿</el-checkbox> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="info_list" v-if="JSON.stringify(form) !== '{}'"> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label" style="width: 100px;">è¥ä¸æ§ç
§ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | <div class="image" v-if="form.businessImg && form.businessImg.fileurlFull"> |
| | | <el-image |
| | | v-if="form.businessImg!=null&&form.businessImg.fileurlFull!=null" |
| | | style="width: 90px; height: 90px" |
| | | :src="form.businessImg.fileurlFull" |
| | | :preview-src-list="[form.businessImg.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label" style="width: 100px;">æ³äººèº«ä»½è¯ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | <div class="image" v-if="form.idcardImgList && form.idcardImgList .length>1 && form.idcardImgList[0].fileurlFull"> |
| | | <el-image |
| | | append-to-body |
| | | v-if="form.idcardImgList[0].fileurlFull" |
| | | style="width: 90px; height: 90px" |
| | | :src="form.idcardImgList[0].fileurlFull" |
| | | :preview-src-list="[form.idcardImgList[0].fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | <div class="image" v-if="form.idcardImgList && form.idcardImgList .length>2 && form.idcardImgList[1].fileurlFull"> |
| | | <el-image |
| | | append-to-body |
| | | v-if="form.idcardImgList[1].fileurlFull" |
| | | style="width: 90px; height: 90px" |
| | | :src="form.idcardImgList[1].fileurlFull" |
| | | :preview-src-list="[form.idcardImgList[1].fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="info_list_item"> |
| | | <div class="info_list_item_label" style="width: 100px;">ä¼ä¸ç¾ç« ï¼</div> |
| | | <div class="info_list_item_val"> |
| | | <div class="image" v-if="form.signImg && form.signImg.fileurlFull"> |
| | | <el-image |
| | | v-if="form.signImg.fileurlFull!=null" |
| | | style="width: 90px; height: 90px" |
| | | :src="form.signImg.fileurlFull" |
| | | :preview-src-list="[form.signImg.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaCompanyWindow ref="operaCompanyWindow" @success="callback"/> |
| | | <!-- ä¿®æ¹ä¿é©æ¹æ¡ --> |
| | | <modification ref="modification" @success="callback"/> |
| | | <!-- ä¿®æ¹ææºå· --> |
| | | <el-dialog |
| | | title="æ´æ¹ç»å®ææºå·" |
| | | :visible.sync="visiblePhone" |
| | | width="500px" |
| | | :modal="false" |
| | | :show-close="false" |
| | | :close-on-click-modal="false" |
| | | center> |
| | | <div class="form"> |
| | | <div class="form_item"> |
| | | <div class="form_item_label">ç»å®ææºå·ï¼</div> |
| | | <div class="form_item_val"> |
| | | <el-input v-model="phone" placeholder="请è¾å
¥"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="form_item"> |
| | | <div class="form_item_label">éªè¯ç ï¼</div> |
| | | <div class="form_item_val"> |
| | | <el-input v-model="code" placeholder="请è¾å
¥"></el-input> |
| | | <el-button type="primary" style="margin-left: 20px;" @click="send" v-if="num === 0">åééªè¯ç </el-button> |
| | | <el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" v-else>{{num}}s</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="close">å æ¶</el-button> |
| | | <el-button type="primary" @click="updatePhoneEvent">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import OperaCompanyWindow from '@/components/business/OperaCompanyWindow' |
| | | import modification from '@/components/business/modification' |
| | | import { getById, updatePhone } from '@/api/business/company' |
| | | import { listForCompany } from '@/api/business/solutions' |
| | | import { sendSms } from '@/api/business/smsEmail' |
| | | export default { |
| | | name: 'OperaCompanyDescWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, OperaCompanyWindow, modification }, |
| | | data () { |
| | | return { |
| | | ruleForm: { |
| | | phone: '', |
| | | code: '' |
| | | }, |
| | | dataId: null, |
| | | num: 0, |
| | | timer: null, |
| | | // è¡¨åæ°æ® |
| | | form: {}, |
| | | phone: '', |
| | | code: '', |
| | | visiblePhone: false, |
| | | options: [], |
| | | tableData: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/company', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | close () { |
| | | this.visiblePhone = false |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | }, |
| | | updatePhoneEvent () { |
| | | if (!this.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | if (!this.code) { |
| | | this.$message.warning('请è¾å
¥éªè¯ç ') |
| | | return |
| | | } |
| | | updatePhone({ |
| | | id: this.form.id, |
| | | captche: this.code, |
| | | phone: this.phone |
| | | }).then(res => { |
| | | this.form.phone = JSON.parse(JSON.stringify(this.phone)) |
| | | this.$message.success('æä½æå') |
| | | this.visiblePhone = false |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | }) |
| | | }, |
| | | send () { |
| | | if (!this.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | sendSms({ phone: this.phone }) |
| | | .then(res => { |
| | | this.num = 60 |
| | | this.setTime() |
| | | }) |
| | | }, |
| | | setTime () { |
| | | this.timer = setInterval(() => { |
| | | this.num -= 1 |
| | | if (this.num === 0) { |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | } |
| | | }, 1000) |
| | | }, |
| | | open (title, target) { |
| | | const that = this |
| | | this.title = title |
| | | this.dataId = target.id |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | this.getDetail() |
| | | }, |
| | | getDetail () { |
| | | var that = this |
| | | getById(this.dataId) |
| | | .then(res => { |
| | | this.form = res |
| | | this.form.type = 1 |
| | | |
| | | this.form.file = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file1 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file2 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file3 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | if(res.businessImg){ |
| | | this.form.file.imgurl = res.businessImg.fileurl |
| | | this.form.file.imgurlfull = res.businessImg.fileurlFull |
| | | } |
| | | if (res.idcardImgList&& res.idcardImgList.length>1) { |
| | | this.form.file1.imgurl = res.idcardImgList[0].fileurl |
| | | this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull |
| | | } |
| | | if (res.idcardImgList && res.idcardImgList.length>2) { |
| | | this.form.file2.imgurl = res.idcardImgList[1].fileurl |
| | | this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull |
| | | } |
| | | if (res.signImg) { |
| | | this.form.file3.imgurl = res.signImg.fileurl |
| | | this.form.file3.imgurlfull = res.signImg.fileurlFull |
| | | } |
| | | |
| | | listForCompany({ companyId: this.dataId }) |
| | | .then(resa => { |
| | | that.form.solutionList = resa.map(item => { |
| | | return { |
| | | solutionBaseId: item.solutionBaseId, |
| | | canAdd: item.canAdd, |
| | | canReduce: item.canReduce |
| | | } |
| | | }) |
| | | that.form.solutionListName = resa.map(item => { |
| | | return { |
| | | solutionName: item.solutionName, |
| | | canAdd: item.canAdd, |
| | | canReduce: item.canReduce |
| | | } |
| | | }) |
| | | console.log(that.form) |
| | | that.visible = true |
| | | }) |
| | | }) |
| | | }, |
| | | callback () { |
| | | this.getDetail() |
| | | this.$emit('success') |
| | | // this.visible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .form { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .form_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | .form_item_label { |
| | | width: 100px; |
| | | flex-shrink: 0; |
| | | font-size: 14px; |
| | | color: black; |
| | | } |
| | | .form_item_val { |
| | | flex: 1; |
| | | height: 35px; |
| | | display: flex; |
| | | align-items: center; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 14px; |
| | | color: black; |
| | | padding: 5px 10px; |
| | | outline: none; |
| | | box-sizing: border-box; |
| | | border: 1px solid #ececec; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .info { |
| | | width: 100%; |
| | | .info_label { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | span { |
| | | font-size: 18px; |
| | | font-weight: 500; |
| | | color: #000000; |
| | | } |
| | | } |
| | | .info_list { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | .info_list_item { |
| | | width: 33.3%; |
| | | display: flex; |
| | | align-items: start; |
| | | margin-bottom: 20px; |
| | | .info_list_item_label { |
| | | /*width: 150px;*/ |
| | | flex-shrink: 0; |
| | | } |
| | | .info_list_item_val { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | .image { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | margin-right: 10px; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | img { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" style="width: 50%;"> |
| | | <el-form-item label="åæ·åç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ä¸ä¿¡ç¨ä»£ç " prop="code"> |
| | | <el-input v-model="form.code" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æ³äººå§å" prop="legalName"> |
| | | <el-input v-model="form.legalName" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ç»å®ææºå·" prop="phone" v-if="!form.id"> |
| | | <div style="width: 100%; display: flex; align-items: center;"> |
| | | <el-input v-model="form.phone" maxlength="11" type="number" style="flex: 1;" placeholder="请è¾å
¥" v-trim/> |
| | | <el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" @click="send" v-if="num === 0">åééªè¯ç </el-button> |
| | | <el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" v-else>{{num}}s</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="éªè¯ç " prop="captche" v-if="!form.id"> |
| | | <el-input v-model="form.captche" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="å
¬å¸è´¦å·" prop="username" v-if="!form.id"> |
| | | <el-input v-model="form.username" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="认è¯é®ç®±" prop="email" > |
| | | <el-input v-model="form.email" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="纳ç¨äººè¯å«å·" prop="taxCode"> |
| | | <el-input v-model="form.taxCode" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="é¶è¡è´¦å·" prop="taxAccount"> |
| | | <el-input v-model="form.taxAccount" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="弿·è¡" prop="taxBank"> |
| | | <el-input v-model="form.taxBank" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="å°åãçµè¯" prop="taxAddr"> |
| | | <el-input v-model="form.taxAddr" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="çµååç¥¨æ¥æ¶å°å" prop="invoiceEmail"> |
| | | <el-input v-model="form.invoiceEmail" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="纸质åç¥¨æ¥æ¶å°å" prop="invoiceAddr"> |
| | | <el-input v-model="form.invoiceAddr" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="è¥ä¸æ§ç
§" prop="businessImg"> |
| | | <div style="width: 100%; height: 100px; display: flex; align-items: center;"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file" @uploadSuccess="result" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="æ³äººèº«ä»½è¯" prop="idcardImgList" style="height: 120px"> |
| | | <div style="width: 100%; display: flex; align-items: center;"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file1" @uploadSuccess="result1" /> |
| | | <div style="width: 15px;height: 100%;"></div> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file2" @uploadSuccess="result2" /> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="çµåç¾ç« " prop="signImg">--> |
| | | <!-- <div style="width: 100%; height: 100px; display: flex; align-items: center;">--> |
| | | <!-- <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file3" @uploadSuccess="result3" />--> |
| | | <!-- </div>--> |
| | | <!-- </el-form-item>--> |
| | | </el-form> |
| | | |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { all } from '@/api/business/solutions' |
| | | import { sendSms } from '@/api/business/smsEmail' |
| | | export default { |
| | | name: 'OperaCompanyWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | initParam:{ |
| | | id: null, |
| | | name: '', |
| | | code: '', |
| | | legalName: '', |
| | | taxCode: '', |
| | | taxAccount: '', |
| | | username: '', |
| | | taxBank: '', |
| | | taxAddr: '', |
| | | invoiceEmail: '', |
| | | invoiceAddr: '', |
| | | phone: '', |
| | | email: '', |
| | | type: 1, |
| | | actionType: 0, |
| | | captche: '', |
| | | businessImg: { |
| | | fileurl: '', |
| | | name: '' |
| | | }, |
| | | idcardImgList: [], |
| | | signImg: { |
| | | fileurl: '', |
| | | name: '' |
| | | }, |
| | | solutionList: [ |
| | | { |
| | | solution: null, |
| | | canAdd: 0, |
| | | canReduce: 0 |
| | | } |
| | | ], |
| | | file: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | file1: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | file2: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | file3: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | }, |
| | | form: {}, |
| | | timer: null, |
| | | num: 0, |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥å
¬å¸åç§°' } |
| | | ], |
| | | code: [ |
| | | { required: true, message: '请è¾å
¥ç»ä¸ä¿¡ç¨ä»£ç ' } |
| | | ], |
| | | captche: [ |
| | | { required: true, message: '请è¾å
¥éªè¯ç ' } |
| | | ], |
| | | legalName: [ |
| | | { required: true, message: '请è¾å
¥æ³äººå§å' } |
| | | ], |
| | | phone: [ |
| | | { required: true, message: '请è¾å
¥ææºå·' } |
| | | ], |
| | | // taxAccount: [ |
| | | // { required: true, message: '请è¾å
¥é¶è¡å¡' } |
| | | // ], |
| | | email: [ |
| | | { required: true, message: '请è¾å
¥è®¤è¯é®ç®±' } |
| | | ], |
| | | businessImg: [ |
| | | { required: true, message: '请ä¸ä¼ è¥ä¸æ§ç
§' } |
| | | ], |
| | | idcardImgList: [ |
| | | { required: true, message: '请ä¸ä¼ æ³äººèº«ä»½è¯' } |
| | | ], |
| | | signImg: [ |
| | | { required: true, message: '请ä¸ä¼ çµåç¾ç« ' } |
| | | ], |
| | | username: [ |
| | | { required: true, message: '请è¾å
¥å
¬å¸è´¦å·' } |
| | | ] |
| | | }, |
| | | |
| | | programme: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/company', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | watch: { |
| | | visible: { |
| | | handler (news) { |
| | | if (news) { |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | changeSolution(row,index){ |
| | | this.form.solutionList[index].solution=row |
| | | // console.log(this.form.solutionList) |
| | | }, |
| | | send () { |
| | | if (!this.form.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | sendSms({ phone: this.form.phone }) |
| | | .then(res => { |
| | | this.num = 60 |
| | | this.setTime() |
| | | }) |
| | | }, |
| | | setTime () { |
| | | this.timer = setInterval(() => { |
| | | this.num -= 1 |
| | | if (this.num === 0) { |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | } |
| | | }, 1000) |
| | | }, |
| | | open (title, target,type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form = this.initParam |
| | | this.getAll() |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | }) |
| | | }, |
| | | // è·åå
¨é¨æ¹æ¡ |
| | | getAll () { |
| | | all({}) |
| | | .then(res => { |
| | | this.programme = res |
| | | }) |
| | | }, |
| | | dele (index) { |
| | | if (this.form.solutionList.length === 1) { |
| | | this.$message.warning('è³å°ä¿çä¸é¡¹') |
| | | return |
| | | } |
| | | this.form.solutionList.splice(index, 1) |
| | | }, |
| | | add () { |
| | | this.form.solutionList.push({ |
| | | solutionId:null, |
| | | solution: {}, |
| | | canAdd: '', |
| | | canReduce: '' |
| | | }) |
| | | }, |
| | | handleRemove (file, fileList) { |
| | | console.log(file, fileList) |
| | | }, |
| | | // æ¥æ¶è¥ä¸æ§ç
§æ°æ® |
| | | result (data) { |
| | | this.form.businessImg = { |
| | | fileurl: '', |
| | | name: '' |
| | | } |
| | | this.form.businessImg.fileurl = data.imgurl |
| | | this.form.businessImg.name = data.name |
| | | }, |
| | | // 身份è¯ç
§ç1 |
| | | result1 (data) { |
| | | this.form.idcardImgList[0] = { |
| | | fileurl: '', |
| | | name: '' |
| | | } |
| | | this.form.idcardImgList[0] = { fileurl: data.imgurl, name: data.name } |
| | | }, |
| | | // 身份è¯ç
§ç2 |
| | | result2 (data) { |
| | | this.form.idcardImgList[1] = { |
| | | fileurl: '', |
| | | name: '' |
| | | } |
| | | this.form.idcardImgList[1] = { fileurl: data.imgurl, name: data.name } |
| | | }, |
| | | // çµåç¾ç« |
| | | result3 (data) { |
| | | this.form.signImg = { |
| | | fileurl: '', |
| | | name: '' |
| | | } |
| | | this.form.signImg.fileurl = data.imgurl |
| | | this.form.signImg.name = data.name |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | methods: { |
| | | // è·åææèå |
| | | fetchData () { |
| | | if (this.type === '1') { |
| | | fetchTree1() |
| | | if (this.type == '1' || this.type == '2') { |
| | | fetchTree1(this.type) |
| | | .then(records => { |
| | | this.data = [] |
| | | this.__fillData(this.data, records) |
| | |
| | | <p class="tip" v-if="form.parent != null && form.id == null">为 <em>{{parentName}}</em> æ°å»ºåèå</p> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ä¸çº§èå" prop="parentId"> |
| | | <MenuSelect v-if="visible" type="1" v-model="form.parentId" placeholder="è¯·éæ©ä¸çº§èå" :exclude-id="excludeMenuId" clearable :inline="false"/> |
| | | <MenuSelect v-if="visible" :type="form.type" v-model="form.parentId" placeholder="è¯·éæ©ä¸çº§èå" :exclude-id="excludeMenuId" clearable :inline="false"/> |
| | | </el-form-item> |
| | | <el-form-item label="èååç§°" prop="name" required> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥èååç§°" v-trim maxlength="50"/> |
| | |
| | | * @target: ç¼è¾çèå对象 |
| | | * @parent: æ°å»ºæ¶çä¸çº§èå |
| | | */ |
| | | open (title, target, parent) { |
| | | open (title, target, parent, type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form.type = type || 1 |
| | | // æ°å»ºï¼menu为空æ¶è¡¨ç¤ºæ°å»ºèå |
| | | if (target == null) { |
| | | this.excludeMenuId = null |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.id = null |
| | | this.form.type = parent.type |
| | | this.form.type = parent != null ? parent.type : (type || 1) |
| | | this.form.parentId = parent == null ? null : parent.id |
| | | this.parentName = parent == null ? null : parent.name |
| | | }) |
| | |
| | | <el-form-item label="æéåç§°" prop="name" required> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥æéåç§°" v-trim maxlength="50"/> |
| | | </el-form-item> |
| | | <el-form-item label="å¹³å°ç±»å" prop="type" required> |
| | | <el-select v-model="form.type" placeholder="è¯·éæ©å¹³å°ç±»å" > |
| | | <el-option label="éç¨" value="0"></el-option> |
| | | <el-option label="å¹³å°ç«¯" value="1"></el-option> |
| | | <el-option label="ä¼ä¸ç«¯" value="2"></el-option> |
| | | <el-option label="åæ·ç«¯" value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æé夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥æé夿³¨" type="textarea" :rows="3" v-trim maxlength="500"/> |
| | | </el-form-item> |
| | |
| | | id: null, |
| | | code: '', |
| | | name: '', |
| | | remark: '' |
| | | remark: '', |
| | | type: '0' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | code: [ |
| | | { required: true, message: '请è¾å
¥æéç¼ç ' } |
| | | ], |
| | | type: [ |
| | | { required: true, message: 'è¯·éæ©å¹³å°ç±»å' } |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥æéåç§°' } |
| | |
| | | this.originPermissionCode = target.code |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | this.form.type=this.form.type+'' |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | username: '' |
| | | username: '', |
| | | type:0 |
| | | } |
| | | } |
| | | }, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:company:queryShop']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="åæ·åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥åæ·åç§°" @keypress.enter.native="search"></el-input> |
| | | </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> |
| | | <ul class="toolbar" v-permissions="['business:company:createShop']"> |
| | | <li><el-button type="primary" @click="$refs.operaShopWindow.open('æ°å»ºåæ·')" v-permissions="['business:company:createShop']">æ°å»ºåæ·</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column prop="name" label="åæ·åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="ç»ä¸ä¿¡ç¨ä»£ç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æ·»å æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="ç»å®ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column label="å¯ç¨ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeStatus($event, row)" |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="çµåç¾è®¤è¯ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.signStatus === 0">å¾
认è¯</span> |
| | | <span v-if="row.signStatus === 1">认è¯ä¸</span> |
| | | <span v-if="row.signStatus === 2">认è¯å¤±è´¥</span> |
| | | <span v-if="row.signStatus === 3">认è¯éè¿</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:company:updateShop', 'business:company:deleteShop'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaShopDescWindow.open('åæ·è¯¦æ
', row)" v-permissions="['business:company:updateShop']">æ¥ç详æ
</el-button> |
| | | <el-button type="text" @click="edit(row)" v-permissions="['business:company:updateShop']">ä¿®æ¹</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaShopWindow ref="operaShopWindow" @success="handlePageChange" /> |
| | | <!-- 详æ
--> |
| | | <OperaShopDescWindow ref="operaShopDescWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaShopWindow from '@/components/business/OperaShopWindow' |
| | | import OperaShopDescWindow from '@/components/business/OperaShopDescWindow' |
| | | import { updateStatus, getById } from '@/api/business/company' |
| | | export default { |
| | | name: 'Company', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaShopWindow, OperaShopDescWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | username: '', |
| | | type: 1 |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'åæ·ä¿¡æ¯è¡¨', |
| | | api: '/business/company', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | edit (row) { |
| | | getById(row.id) |
| | | .then(res => { |
| | | const form = res |
| | | form.type = 1 |
| | | form.file = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | form.file1 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | form.file2 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | form.file3 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | form.file.imgurl = res.businessImg.fileurl |
| | | form.file.imgurlfull = res.businessImg.fileurlFull |
| | | if (res.idcardImgList == null) { |
| | | res.idcardImgList = new Array() |
| | | } |
| | | if (res.idcardImgList && res.idcardImgList.length > 0) { |
| | | form.file1.imgurl = res.idcardImgList[0].fileurl |
| | | form.file1.imgurlfull = res.idcardImgList[0].fileurlFull |
| | | } |
| | | if (res.idcardImgList && res.idcardImgList.length > 1) { |
| | | form.file2.imgurl = res.idcardImgList[1].fileurl |
| | | form.file2.imgurlfull = res.idcardImgList[1].fileurlFull |
| | | } |
| | | form.file3.imgurl = res.signImg.fileurl |
| | | form.file3.imgurlfull = res.signImg.fileurlFull |
| | | this.$refs.operaShopWindow.open('ç¼è¾åæ·', form) |
| | | }) |
| | | }, |
| | | // ä¿®æ¹ç¶æ |
| | | changeStatus (status, row) { |
| | | updateStatus({ id: row.id, status }) |
| | | .then(res => { |
| | | this.search() |
| | | }) |
| | | .catch(err => { |
| | | row.status = row.status === 0 ? 1 : 0 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['system:menu:create', 'system:menu:delete', 'system:menu:sort']"> |
| | | <li><el-button type="primary" @click="$refs.OperaMenuComWindow.open('æ°å»ºä¸çº§èå')" icon="el-icon-plus" v-permissions="['system:menu:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.OperaMenuComWindow.open('æ°å»ºä¸çº§èå',null,null,1)" icon="el-icon-plus" v-permissions="['system:menu:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:menu:delete']">å é¤</el-button></li> |
| | | <li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['system:menu:sort']">ä¸ç§»</el-button></li> |
| | | <li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" v-permissions="['system:menu:sort']">ä¸ç§»</el-button></li> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout class="menu-layout" :permissions="['system:menu:query']"> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['system:menu:create', 'system:menu:delete', 'system:menu:sort']"> |
| | | <li><el-button type="primary" @click="$refs.OperaMenuComWindow.open('æ°å»ºåæ·ä¸çº§èå',null,null,2)" icon="el-icon-plus" v-permissions="['system:menu:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:menu:delete']">å é¤</el-button></li> |
| | | <li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['system:menu:sort']">ä¸ç§»</el-button></li> |
| | | <li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" v-permissions="['system:menu:sort']">ä¸ç§»</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | ref="table" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | row-key="id" |
| | | stripe |
| | | :default-expand-all="false" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" fixed="left"></el-table-column> |
| | | <el-table-column prop="name" label="èååç§°" fixed="left" min-width="160px"></el-table-column> |
| | | <el-table-column prop="icon" label="徿 " min-width="80px" class-name="table-column-icon"> |
| | | <template slot-scope="{row}"> |
| | | <i v-if="row.icon != null && row.icon !== ''" :class="{[row.icon]: true}"></i> |
| | | <template v-else>æªè®¾ç½®</template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="path" label="访é®è·¯å¾" min-width="140px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createUser" label="å建人" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column prop="updateUser" label="æ´æ°äºº" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="updateTime" label="æ´æ°æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column prop="disabled" label="æ¯å¦å¯ç¨" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch v-model="row.disabled" :active-value="false" :inactive-value="true" @change="switchDisabled(row)"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['system:menu:update', 'system:menu:create', 'system:menu:delete'])" |
| | | label="æä½" |
| | | min-width="220" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMenuComWindow.open('ç¼è¾åæ·èå', {...row, type: 2})" v-permissions="['system:menu:update']">ç¼è¾</el-button> |
| | | <el-button type="text" icon="el-icon-plus" @click="$refs.OperaMenuComWindow.open('æ°å»ºåæ·åèå', null, {...row, type: 2},2)" v-permissions="['system:menu:create']">æ°å»ºåèå</el-button> |
| | | <el-button v-if="!row.fixed" type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:menu:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaMenuComWindow ref="OperaMenuComWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import OperaMenuComWindow from '@/components/system/menu/OperaMenuComWindow' |
| | | import { fetchTree1, updateStatus, sort } from '@/api/system/menu' |
| | | export default { |
| | | name: 'SystemMenu', |
| | | extends: BaseTable, |
| | | components: { OperaMenuComWindow, TableLayout }, |
| | | data () { |
| | | return { |
| | | // æ¯å¦æ£å¨å¤çä¸ |
| | | isWorking: { |
| | | sort: false |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // æ¥è¯¢æ°æ® |
| | | handlePageChange () { |
| | | this.isWorking.search = true |
| | | fetchTree1(2) |
| | | .then(records => { |
| | | this.tableData.list = records |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | // æåº |
| | | sort (direction) { |
| | | if (this.isWorking.sort) { |
| | | return |
| | | } |
| | | if (this.tableData.selectedRows.length === 0) { |
| | | this.$tip.warning('è¯·éæ©ä¸æ¡æ°æ®') |
| | | return |
| | | } |
| | | if (this.tableData.selectedRows.length > 1) { |
| | | this.$tip.warning('æåºæ¶ä»
å
è®¸éæ©ä¸æ¡æ°æ®') |
| | | return |
| | | } |
| | | const menuId = this.tableData.selectedRows[0].id |
| | | // æ¾å°èåèå´ |
| | | let menuPool |
| | | for (const rootMenu of this.tableData.list) { |
| | | const parent = this.__findParent(menuId, rootMenu) |
| | | if (parent != null) { |
| | | menuPool = parent.children |
| | | } |
| | | } |
| | | menuPool = menuPool || this.tableData.list |
| | | const menuIndex = menuPool.findIndex(menu => menu.id === menuId) |
| | | // ä¸ç§»æ ¡éª |
| | | if (direction === 'top' && menuIndex === 0) { |
| | | this.$tip.warning('èåå·²å°é¡¶é¨') |
| | | return |
| | | } |
| | | // ä¸ç§»æ ¡éª |
| | | if (direction === 'bottom' && menuIndex === menuPool.length - 1) { |
| | | this.$tip.warning('èåå·²å°åºé¨') |
| | | return |
| | | } |
| | | this.isWorking.sort = true |
| | | sort({ |
| | | id: this.tableData.selectedRows[0].id, |
| | | direction |
| | | }) |
| | | .then(() => { |
| | | if (direction === 'top') { |
| | | menuPool.splice(menuIndex, 0, menuPool.splice(menuIndex - 1, 1)[0]) |
| | | } else { |
| | | menuPool.splice(menuIndex, 0, menuPool.splice(menuIndex + 1, 1)[0]) |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.sort = false |
| | | }) |
| | | }, |
| | | // å¯ç¨/ç¦ç¨èå |
| | | switchDisabled (row) { |
| | | if (!row.disabled) { |
| | | this.__updateMenuStatus(row) |
| | | return |
| | | } |
| | | this.$dialog.disableConfirm(`确认ç¦ç¨ ${row.name} èååï¼`) |
| | | .then(() => { |
| | | this.__updateMenuStatus(row) |
| | | }).catch(() => { |
| | | row.disabled = !row.disabled |
| | | }) |
| | | }, |
| | | // æ¥è¯¢ç¶èç¹ |
| | | __findParent (id, parent) { |
| | | if (parent.children === 0) { |
| | | return |
| | | } |
| | | for (const menu of parent.children) { |
| | | if (menu.id === id) { |
| | | return parent |
| | | } |
| | | if (menu.children.length > 0) { |
| | | const m = this.__findParent(id, menu) |
| | | if (m != null) { |
| | | return m |
| | | } |
| | | } |
| | | } |
| | | return null |
| | | }, |
| | | // ä¿®æ¹èåç¶æ |
| | | __updateMenuStatus (row) { |
| | | updateStatus({ |
| | | id: row.id, |
| | | parentId: row.parentId, |
| | | disabled: row.disabled |
| | | }) |
| | | .then(() => { |
| | | this.$tip.apiSuccess('ä¿®æ¹æå') |
| | | }) |
| | | .catch(e => { |
| | | row.disabled = !row.disabled |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'èå', |
| | | api: '/system/menu' |
| | | }) |
| | | this.search() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/variables.scss"; |
| | | .menu-layout { |
| | | /deep/ .table-content { |
| | | margin-top: 0; |
| | | } |
| | | } |
| | | // 徿 å |
| | | .table-column-icon { |
| | | // element-ui徿 |
| | | i { |
| | | background-color: $primary-color; |
| | | opacity: 0.72; |
| | | font-size: 20px; |
| | | color: #fff; |
| | | padding: 4px; |
| | | border-radius: 50%; |
| | | } |
| | | // èªå®ä¹å¾æ |
| | | [class^="eva-icon-"] { |
| | | width: 20px; |
| | | height: 20px; |
| | | background-size: 16px; |
| | | vertical-align: middle; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-form-item label="æéåç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" v-trim placeholder="请è¾å
¥æéåç§°" @keypress.enter.native="search"/> |
| | | </el-form-item> |
| | | <el-form-item label="å¹³å°ç±»å" prop="type"> |
| | | <el-select v-model="searchForm.type" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option label="éç¨" value="0"></el-option> |
| | | <el-option label="å¹³å°ç«¯" value="1"></el-option> |
| | | <el-option label="ä¼ä¸ç«¯" value="2"></el-option> |
| | | <el-option label="åæ·ç«¯" value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | |
| | | <el-table-column type="selection" fixed="left" width="55"></el-table-column> |
| | | <el-table-column prop="code" label="æéç¼ç " fixed="left" min-width="200px"></el-table-column> |
| | | <el-table-column prop="name" label="æéåç§°" fixed="left" min-width="120px"></el-table-column> |
| | | <el-table-column prop="name" label="å¹³å°ç±»å" fixed="left" min-width="120px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type == null || row.type ===0">éç¨</span> |
| | | <span v-if="row.type === 1">å¹³å°ç«¯</span> |
| | | <span v-if="row.type === 2">ä¼ä¸ç«¯</span> |
| | | <span v-if="row.type === 3">åæ·ç«¯</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="æé夿³¨" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createUser" label="å建人" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template> |
| | |
| | | searchForm: { |
| | | code: '', |
| | | name: '', |
| | | type: '', |
| | | remark: '' |
| | | } |
| | | } |
| | |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.dao.system.model.SystemMenu; |
| | | import com.doumee.dao.system.vo.SystemMenuListVO; |
| | |
| | | @Autowired |
| | | private SystemMenuBiz systemMenuBiz; |
| | | |
| | | @ApiOperation("èåæåº") |
| | | @PostMapping("/updateSort") |
| | | @RequiresPermissions("system:menu:sort") |
| | | public ApiResponse updateSort (@Validated @RequestBody UpdateSystemMenuSortDTO dto) { |
| | | systemMenuBiz.updateSort(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢èåæ ") |
| | | @GetMapping("/treeNodes") |
| | | public ApiResponse<List<SystemMenuNodeVO>> getTreeMenu () { |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(); |
| | | return ApiResponse.success(systemMenuBiz.findTree(loginUserInfo.getId(),loginUserInfo.getType())); |
| | | return ApiResponse.success(systemMenuBiz.findTree(loginUserInfo.getId(), Constants.ONE)); |
| | | } |
| | | |
| | | // @ApiOperation("æ¥è¯¢å表æ ") |
| | | // @PostMapping("/treeList") |
| | | // @RequiresPermissions("system:menu:query") |
| | | // public ApiResponse<List<SystemMenuListVO>> findTree () { |
| | | // LoginUserInfo loginUserInfo = this.getLoginUser(); |
| | | // return ApiResponse.success(systemMenuBiz.findTreeByType(loginUserInfo.getType())); |
| | | // } |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢å表æ ") |
| | | @PostMapping("/treeList/{type}") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> treeList (@PathVariable Integer type) { |
| | | return ApiResponse.success(systemMenuBiz.findTreeByType(type)); |
| | | return ApiResponse.success(systemMenuBiz.findTreeByType(Constants.ONE)); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:menu:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemMenu systemMenu) { |
| | | return ApiResponse.success(systemMenuBiz.create(systemMenu)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemMenuBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemMenuBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹èåç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateStatus(@Validated(OperaType.UpdateStatus.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemPermissionDTO; |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.vo.SystemPermissionListVO; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private SystemPermissionBiz systemPermissionBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:permission:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemPermission systemPermission) { |
| | | return ApiResponse.success(systemPermissionBiz.create(systemPermission)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemPermissionBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemPermissionBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:permission:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemPermission systemPermission) { |
| | | systemPermissionBiz.updateById(systemPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<PageData<SystemPermissionListVO>> findPage (@RequestBody PageWrap<QuerySystemPermissionDTO> pageWrap) { |
| | | return ApiResponse.success(systemPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ææ") |
| | | @GetMapping("/all") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<List<SystemPermission>> findAll () { |
| | | SystemPermission systemPermission = new SystemPermission(); |
| | | systemPermission.setTypeList(Arrays.asList(new Integer[]{Constants.ZERO,Constants.TWO})); |
| | | systemPermission.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPermissionService.findList(systemPermission)); |
| | | } |
| | |
| | | applyChagneDetailService.updateById(applyChagneDetail); |
| | | return ApiResponse.success(null); |
| | | } |
| | | // |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | |
| | | import com.doumee.service.business.CompanyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.Logical; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | companyService.startSignAuth(company.getId()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»ºåæ·") |
| | | @PostMapping("/createShop") |
| | | @RequiresPermissions("business:company:createShop") |
| | | public ApiResponse createShop(@RequestBody Company company) { |
| | | companyService.createShop(company); |
| | | companyService.startSignAuth(company.getId()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:company:delete") |
| | | @RequiresPermissions(value = {"business:company:delete", "business:company:deleteShop"}, logical = Logical.OR) |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | companyService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:company:delete") |
| | | @RequiresPermissions(value = {"business:company:delete", "business:company:deleteShop"}, logical = Logical.OR) |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:company:update") |
| | | @RequiresPermissions(value = {"business:company:update", "business:company:updateShop"}, logical = Logical.OR) |
| | | public ApiResponse updateById(@RequestBody Company company) { |
| | | companyService.updateById(company); |
| | | companyService.startSignAuth(company.getId()); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDç¦ç¨å¯ç¨") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("business:company:update") |
| | | @RequiresPermissions(value = {"business:company:update", "business:company:updateShop"}, logical = Logical.OR) |
| | | public ApiResponse updateStatus(@RequestBody Company company) { |
| | | companyService.updateStatus(company); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("ä¿®æ¹ä¿é©æ¹æ¡") |
| | | @PostMapping("/updateSolutions") |
| | | @RequiresPermissions("business:company:update") |
| | | @RequiresPermissions(value = {"business:company:update", "business:company:updateShop"}, logical = Logical.OR) |
| | | public ApiResponse updateSolutions(@RequestBody Company company) { |
| | | companyService.updateSolutions(company); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("ä¼ä¸æ´æ¢ææºå·") |
| | | @PostMapping("/updatePhone") |
| | | @RequiresPermissions("business:company:update") |
| | | @RequiresPermissions(value = {"business:company:update", "business:company:updateShop"}, logical = Logical.OR) |
| | | public ApiResponse updatePhone(@RequestBody Company company) { |
| | | companyService.updatePhone(company); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:company:query") |
| | | @RequiresPermissions(value = {"business:company:query", "business:company:queryShop"}, logical = Logical.OR) |
| | | public ApiResponse<PageData<Company>> findPage (@RequestBody PageWrap<Company> pageWrap) { |
| | | //æéèå´å
|
| | | return ApiResponse.success(companyService.findPage(pageWrap)); |
| | |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨æ°æ®") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:company:query") |
| | | @RequiresPermissions(value = {"business:company:query", "business:company:queryShop"}, logical = Logical.OR) |
| | | public ApiResponse<List<Company>> findList (@RequestBody Company pageWrap) { |
| | | pageWrap.setQueryFlag(Constants.ZERO);//æ¥è¯¢å
¨é¨æéèå´å
|
| | | return ApiResponse.success(companyService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:company:exportExcel") |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:company:query") |
| | | @RequiresPermissions(value = {"business:company:query", "business:company:queryShop"}, logical = Logical.OR) |
| | | public ApiResponse<Company> findById(@PathVariable Integer id) { |
| | | |
| | | return ApiResponse.success(companyService.findById(id)); |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<List<SystemPermission>> findAll () { |
| | | SystemPermission systemPermission = new SystemPermission(); |
| | | systemPermission.setTypeList(Arrays.asList(new Integer[]{Constants.ZERO,Constants.ONE})); |
| | | systemPermission.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPermissionService.findList(systemPermission)); |
| | | } |
| | |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<List<SystemPermission>> findAllCom () { |
| | | SystemPermission systemPermission = new SystemPermission(); |
| | | systemPermission.setType(Constants.ONE); |
| | | systemPermission.setTypeList(Arrays.asList(new Integer[]{Constants.ZERO,Constants.TWO})); |
| | | systemPermission.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPermissionService.findList(systemPermission)); |
| | | } |
| | |
| | | private Integer status; |
| | | @ApiModelProperty(value = "åå¹¶åç¼ç ï¼å
³èunion_change)", example = "1") |
| | | @ExcelColumn(name="åå¹¶åç¼ç ï¼å
³èunion_change)") |
| | | private Integer unionChange; |
| | | private Integer unionChangeId; |
| | | @ApiModelProperty(value = "å¨çº¿ç¾ç« ååå·") |
| | | private String signApplyNo; |
| | | @ApiModelProperty(value = "ææä¿é©çæèµ·æ") |
| | |
| | | package com.doumee.dao.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.constants.OperaType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç³»ç»æé |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²å é¤", hidden = true) |
| | | private Boolean deleted; |
| | | @ApiModelProperty(value = "ç±»å 0å¹³å°ç¨æ· 1ä¼ä¸ç¨æ·") |
| | | @ApiModelProperty(value = "ç±»å 0å¹³å°ç¨æ· 1ä¼ä¸ç¨æ· 2åæ·ç¨æ·") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "ç±»åéå") |
| | | @TableField(exist = false) |
| | | private List<Integer> typeList; |
| | | |
| | | } |
| | |
| | | * @return Integer |
| | | */ |
| | | Company create(Company company); |
| | | Company createShop(Company company); |
| | | void updateStatus(Company company); |
| | | void updatePhone(Company company); |
| | | /** |
| | |
| | | company.setStatus(Constants.ZERO); |
| | | company.setType(Constants.ZERO); |
| | | company.setSignStatus(Constants.ZERO); |
| | | company.setType(Constants.ZERO); |
| | | company.setSignIdStatus(Constants.ZERO); |
| | | companyMapper.insert(company); |
| | | company.setEditDate(company.getCreateDate()); |
| | |
| | | dealFileData(company); |
| | | //å¤çå
³èæ¹æ¡ |
| | | dealSolutionsData(company); |
| | | return company; |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public Company createShop(Company company) { |
| | | isValidCreateParam(company); |
| | | if(companyMapper.selectCount(new QueryWrapper<Company>().lambda() |
| | | .eq(Company::getCode,company.getCode()) |
| | | .or().eq(Company::getPhone,company.getPhone()) |
| | | .or().eq(Company::getEmail,company.getEmail()) |
| | | .or().eq(Company::getUsername,company.getUsername()) |
| | | .or().eq(Company::getName,company.getName()))>0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ä¼ä¸ãåç§°ããç»ä¸ä¿¡ç¨ä»£ç ããé®ç®±ãæè
ãææºå·ãå·²åå¨ï¼è¯·ç¡®è®¤åéæ°æäº¤ï¼"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | company.setCreator(user.getId()); |
| | | company.setCreateDate(new Date()); |
| | | company.setType(Constants.ONE); |
| | | company.setIsdeleted(Constants.ZERO); |
| | | company.setStatus(Constants.ZERO); |
| | | company.setType(Constants.ZERO); |
| | | company.setSignStatus(Constants.ZERO); |
| | | company.setSignIdStatus(Constants.ZERO); |
| | | companyMapper.insert(company); |
| | | company.setEditDate(company.getCreateDate()); |
| | | company.setEditor(user.getId()); |
| | | //å¤çç»éè´¦å·ä¿¡æ¯ |
| | | dealSystemUserData(company); |
| | | //å¤çéä»¶ä¿¡æ¯ |
| | | dealFileData(company); |
| | | return company; |
| | | } |
| | | @Override |
| | |
| | | if(company.getSignImg()!=null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){ |
| | | multifileList.add(initMultiFileByCompay(company,company.getSignImg(),Constants.MultiFile.COM_SING_IMG.getKey())); |
| | | }else { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请ä¸ä¼ çµåç¾ç« ï¼"); |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请ä¸ä¼ çµåç¾ç« ï¼"); |
| | | } |
| | | if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null&& company.getIdcardImgList().size()>0){ |
| | | for(Multifile f : company.getIdcardImgList()){ |
| | |
| | | |
| | | @Override |
| | | public List<SystemPermission> findList(SystemPermission systemPermission) { |
| | | Wrapper<SystemPermission> wrapper = new QueryWrapper<>(systemPermission); |
| | | QueryWrapper<SystemPermission> wrapper = new QueryWrapper<>(systemPermission); |
| | | if(systemPermission.getTypeList()!=null){ |
| | | wrapper.lambda().and(w->{w.isNull(SystemPermission::getType).or() |
| | | .in(SystemPermission::getType,systemPermission.getTypeList()); |
| | | }); |
| | | } |
| | | return systemPermissionMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | </resultMap> |
| | | <select id="selectManageList" resultMap="SystemPermissionListVO"> |
| | | SELECT |
| | | perm.`ID`, perm.`CODE`, perm.`NAME`, perm.`REMARK`, perm.`FIXED`, perm.`CREATE_TIME`, perm.`UPDATE_TIME`, perm.`CREATE_USER`, perm.`UPDATE_USER`, perm.`DELETED`, |
| | | perm.`ID`, perm.`type`, perm.`CODE`, perm.`NAME`, perm.`REMARK`, perm.`FIXED`, perm.`CREATE_TIME`, perm.`UPDATE_TIME`, perm.`CREATE_USER`, perm.`UPDATE_USER`, perm.`DELETED`, |
| | | create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME, |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME |
| | | FROM SYSTEM_PERMISSION perm |
| | |
| | | LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = perm.UPDATE_USER |
| | | <where> |
| | | perm.DELETED = 0 |
| | | <if test="dto.code != null"> |
| | | <if test="dto.code != null and dto.code!=''"> |
| | | AND perm.CODE LIKE CONCAT('%', #{dto.code}, '%') |
| | | </if> |
| | | <if test="dto.name != null"> |
| | | <if test="dto.type != null"> |
| | | AND ifnull(perm.type,0) in(0, ${dto.type}) |
| | | </if> |
| | | <if test="dto.name != null and dto.name!=''"> |
| | | AND perm.`NAME` LIKE CONCAT('%', #{dto.name}, '%') |
| | | </if> |
| | | </where> |
| | |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.dao.system.model.SystemMenu; |
| | | import com.doumee.dao.system.vo.SystemMenuListVO; |
| | |
| | | @Autowired |
| | | private SystemMenuBiz systemMenuBiz; |
| | | |
| | | @ApiOperation("èåæåº") |
| | | @PostMapping("/updateSort") |
| | | @RequiresPermissions("system:menu:sort") |
| | | public ApiResponse updateSort (@Validated @RequestBody UpdateSystemMenuSortDTO dto) { |
| | | systemMenuBiz.updateSort(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢èåæ ") |
| | | @GetMapping("/treeNodes") |
| | | public ApiResponse<List<SystemMenuNodeVO>> getTreeMenu () { |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(); |
| | | return ApiResponse.success(systemMenuBiz.findTree(loginUserInfo.getId(),loginUserInfo.getType())); |
| | | return ApiResponse.success(systemMenuBiz.findTree(loginUserInfo.getId(), Constants.TWO)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å表æ ") |
| | | @PostMapping("/treeList/{type}") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> treeList (@PathVariable Integer type) { |
| | | type = Constants.TWO;//åæ·èå |
| | | return ApiResponse.success(systemMenuBiz.findTreeByType(type)); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:menu:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemMenu systemMenu) { |
| | | return ApiResponse.success(systemMenuBiz.create(systemMenu)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemMenuBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemMenuBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹èåç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateStatus(@Validated(OperaType.UpdateStatus.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemPermissionDTO; |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.vo.SystemPermissionListVO; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private SystemPermissionBiz systemPermissionBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:permission:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemPermission systemPermission) { |
| | | return ApiResponse.success(systemPermissionBiz.create(systemPermission)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemPermissionBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemPermissionBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:permission:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemPermission systemPermission) { |
| | | systemPermissionBiz.updateById(systemPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<PageData<SystemPermissionListVO>> findPage (@RequestBody PageWrap<QuerySystemPermissionDTO> pageWrap) { |
| | | return ApiResponse.success(systemPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ææ") |
| | | @GetMapping("/all") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<List<SystemPermission>> findAll () { |
| | | SystemPermission systemPermission = new SystemPermission(); |
| | | systemPermission.setTypeList(Arrays.asList(new Integer[]{Constants.ZERO,Constants.THREE})); |
| | | systemPermission.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPermissionService.findList(systemPermission)); |
| | | } |