company/.env.development | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/api/business/solutionsBase.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/business/OperaSolutionsBaseDescWindow.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/components/business/OperaSolutionsBaseWindow.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/views/business/insurance.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/views/business/solutions.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/views/business/solutionsBase.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
company/src/views/login.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
company/.env.development
@@ -7,8 +7,8 @@ VUE_APP_COOKIE_NAME='dmplat-auth-token' # æµè¯æ VUE_APP_API = 'https://dmtest.ahapp.net/yyb_admin_api/' # VUE_APP_API = 'http://localhost:10030/' # VUE_APP_API = 'http://192.168.0.135:10030/' # VUE_APP_API = 'https://www.yyb.red/yyb_admin_api/' # 任康 # VUE_APP_API = 'http://192.168.0.138:10030/' company/src/api/business/solutionsBase.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,37 @@ import request from '../../utils/request' // æ¥è¯¢ export function fetchList (data) { return request.post('/business/solutionsBase/page', data, { trim: true }) } // å建 export function create (data) { return request.post('/business/solutionsBase/create', data) } // ä¿®æ¹ export function updateById (data) { return request.post('/business/solutionsBase/updateById', data) } // å é¤ export function deleteById (id) { return request.get(`/business/solutionsBase/delete/${id}`) } // æ ¹æ®idæ¥è¯¢ export function solutionsBaseId (id) { return request.get(`/business/solutionsBase/${id}`) } // æ¹éå é¤ export function deleteByIdInBatch (ids) { return request.get('/business/solutionsBase/delete/batch', { params: { ids } }) } company/src/components/business/OperaSolutionsBaseDescWindow.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,283 @@ <template> <GlobalWindow :title="title" width="100%" text="ä¿®æ¹" :withFooter="userInfo.type !== 1" :visible.sync="visible" :confirm-working="isWorking" @confirm="$refs.operaSolutionsWindow.open('ç¼è¾æ¹æ¡', form)" > <div class="info"> <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.insuranceName}}</div> </div> <div class="info_list_item"> <div class="info_list_item_label">æ¿ä¿å ¬å¸ï¼</div> <div class="info_list_item_val">{{form.companyName}}</div> </div> <!-- <div class="info_list_item">--> <!-- <div class="info_list_item_label">æä¿å¨æï¼</div>--> <!-- <div class="info_list_item_val">1æ</div>--> <!-- </div>--> <div class="info_list_item"> <div class="info_list_item_label">æ¹æ¹æéæ¶é´ï¼</div> <div class="info_list_item_val">{{form.correctWarnTime}}</div> </div> <div class="info_list_item"> <div class="info_list_item_label">æ¹å¢çæï¼</div> <div class="info_list_item_val">{{form.addValidDays||0}} 天</div> </div> <div class="info_list_item"> <div class="info_list_item_label">æ¹åçæï¼</div> <div class="info_list_item_val">{{form.delOnlyReplace === 1 ? 'æ¯' : 'å¦'}}</div> </div> <div class="info_list_item"> <div class="info_list_item_label">æ¹æ¹æ¯æï¼</div> <div class="info_list_item_val"> <span style="margin-right: 50px">å ä¿ <i :class="form.canAdd ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canAdd ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span> <span style="margin-right: 50px">åä¿ <i :class="form.canReduce ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canReduce ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span> <span>æ´æ¢æ´¾é£åä½ <i :class="form.canChangeUnit ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canChangeUnit ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span> </div> </div> <div class="info_list_item"> <div class="info_list_item_label">æ¹åä» æ¯ææ¿æ¢ï¼</div> <div class="info_list_item_val">æ¯</div> </div> </div> <el-table :data="form.worktypeList" 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="worktypeName" align="center" label="å·¥ç§åç§°"> </el-table-column> </el-table> <div class="info_agree"> <div class="info_agree_label">ç¹å«çº¦å®ï¼<div v-html="form.specialAgreement"></div></div> <div class="info_agree_label">ç¹å«è¯´æï¼<div v-html="form.specialInfo"></div></div> <div class="info_agree_label">å ¶ä»è¯´æï¼<div v-html="form.ortherInfo"></div></div> </div> </div> <!-- ä¿®æ¹ --> <OperaSolutionsWindow ref="operaSolutionsWindow" @success="callback"/> <OperaPdfViewerWindow ref="OperaPdfViewerWindow" /> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import OperaSolutionsWindow from '@/components/business/OperaSolutionsWindow' import OperaPdfViewerWindow from '@/components/business/OperaPdfViewerWindow' import { solutionsBaseId } from '@/api/business/solutionsBase' import { mapState } from 'vuex' export default { name: 'OperaSolutionsBaseDescWindow', extends: BaseOpera, components: { GlobalWindow, OperaPdfViewerWindow,OperaSolutionsWindow }, data () { return { // è¡¨åæ°æ® form: { id: null, name: '', companyName: '', insuranceId: '', validType: 0, type: 0, minAge: '', maxAge: '', price: '', timeUnit: '', insureCycle: '', shopName: '', insureCycleUnit: '', validTypeNum: '', email: '', canReduce: 0, canChangeUnit: 0, addValidDays: 0, delValidDays: 0, delOnlyReplace: 0, canAdd: 0, correctWarnTime: '', specialAgreement: '', specialInfo: '', ortherInfo: '', insuranceName: '', signKeyword: '', worktypeList: [], worktypeIdList: [] } } }, computed: { ...mapState(['userInfo']) }, created () { this.config({ api: '/business/solutionsBase', 'field.id': 'id' }) }, methods: { open (title, target) { this.title = title this.visible = true this.form = { id: null, name: '', companyName: '', insuranceId: '', validType: 0, type: 0, minAge: '', maxAge: '', price: '', timeUnit: '', insureCycle: '', shopName: '', insureCycleUnit: '', validTypeNum: '', email: '', specialAgreement: '', specialInfo: '', ortherInfo: '', fanganFile: null, canReduce: 0, canChangeUnit: 0, addValidDays: 0, correctWarnTime: '', delValidDays: 0, delOnlyReplace: 0, canAdd: 0, insuranceName: '', signKeyword: '', worktypeList: [], worktypeIdList: [] } this.$nextTick(() => { for (const key in this.form) { this.form[key] = target[key] } this.getDetails() }) }, openFile (url) { setTimeout(() => { this.$refs.OperaPdfViewerWindow.open('æ¹æ¡ç¡®è®¤ä¹¦',url) // window.open(url) }, 500) }, getDetails () { solutionsBaseId(this.form.id) .then(res => { for (const key in this.form) { this.form[key] = res[key] } if (res.worktypeList) { this.form.worktypeIdList = res.worktypeList.map(item => { return { worktypeId: item.worktypeId } }) } }) }, callback () { this.$emit('success') this.visible = false } } } </script> <style lang="scss" scoped> .info { width: 100%; .info_agree { width: 100%; display: flex; flex-direction: column; margin-top: 20px; .info_agree_label { font-size: 14px; font-weight: 500; color: #000000; margin-top: 5px; } .info_agree_val { font-size: 14px; font-weight: 500; color: #000000; margin-top: 5px; } } .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_fwb { width: 100%; margin-top: 20px; } .info_list { width: 100%; display: flex; align-items: center; flex-wrap: wrap; .info_list_item { width: 50%; display: flex; align-items: start; margin-bottom: 20px; .info_list_item_label { 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; img { width: 100%; } } } } } } </style> company/src/components/business/OperaSolutionsBaseWindow.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,390 @@ <template> <GlobalWindow :title="title" width="100%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm" > <el-form :model="form" ref="form" :rules="rules"> <el-form-item label="æ¹æ¡åç§°" prop="name"> <el-input v-model="form.name" placeholder="请è¾å ¥" v-trim/> </el-form-item> <el-form-item label="ä¿é©å ¬å¸" prop="insuranceId"> <el-select v-model="form.insuranceId" filterable @change="getAllWorktype1" placeholder="è¯·éæ©"> <el-option v-for="item in company" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="æ¿ä¿å ¬å¸" prop="companyName"> <el-input v-model="form.companyName" placeholder="请è¾å ¥" v-trim/> </el-form-item> <el-form-item label="æä¿å¹´é¾" prop="minAge"> <div style="display: flex; align-items: center;"> <el-select v-model="form.minAge" style="flex: 1;" placeholder="è¯·éæ©"> <el-option v-for="item in 80" :key="item" :label="item" :value="item"> </el-option> </el-select> <span style="margin: 0 30px;">è³</span> <el-select v-model="form.maxAge" style="flex: 1;" placeholder="è¯·éæ©"> <el-option v-for="item in 80" :key="item" :label="item" :value="item"> </el-option> </el-select> </div> </el-form-item> <el-form-item label="çææ¶é´" prop="validTypeNum"> <div style="width: 100%; display: flex; align-items: center;"> <div style="flex-shrink: 0;"> <el-radio-group v-model="form.validType" @change="changeValidType"> <el-radio :label="0">æ¥åçæ</el-radio> <el-radio :label="1">次æçæ</el-radio> </el-radio-group> </div> <el-input style="margin-left: 20px;" type="number" v-model="form.validTypeNum" placeholder="请è¾å ¥å»¶è¿å¤©æ°" v-if="form.validType === 0"></el-input> </div> </el-form-item> <el-form-item label="æ¹æ¹æ¯æ" prop="canAdd"> <div style="width: 100%; display: flex; align-items: center;"> <el-checkbox :true-label="1" :false-label="0" v-model="form.canAdd">å ä¿</el-checkbox> <el-checkbox :true-label="1" :false-label="0" v-model="form.canReduce">åä¿</el-checkbox> <el-checkbox :true-label="1" :false-label="0" v-model="form.canChangeUnit">æ´æ¢æ´¾é£åä½</el-checkbox> </div> </el-form-item> <el-form-item label="æ¹åä» æ¯ææ¿æ¢ï¼åä¿æ¹æ¹ä» æ¯ææ¿æ¢äººåå³åä¿äººåå°äºå ä¿äººåï¼" prop="delOnlyReplace"> <div style="width: 100%; display: flex; align-items: center;"> <el-radio-group v-model="form.delOnlyReplace"> <el-radio :label="1">æ¯</el-radio> <el-radio :label="0">å¦</el-radio> </el-radio-group> </div> </el-form-item> <el-form-item label="æ¹å¢çæï¼å¤©æ°ï¼" prop="addValidDays" v-if="form.delOnlyReplace != 1"> <div style="width: 100%; display: flex; align-items: center;"> <el-input style="margin-left: 0px;" type="number" v-model="form.addValidDays" placeholder="请è¾å ¥æ¹å¢çææ¶é´ï¼å¤©æ°ï¼" ></el-input> </div> </el-form-item> <el-form-item label="æ¹åçæï¼å¤©æ°ï¼" prop="delValidDays"> <div style="width: 100%; display: flex; align-items: center;"> <el-input style="margin-left: 0px;" type="number" v-model="form.delValidDays" placeholder="请è¾å ¥æ¹åçææ¶é´ï¼å¤©æ°ï¼" ></el-input> </div> </el-form-item> <el-form-item label="æ¹æ¹æéæ¶é´" prop="correctWarnTime">{{form.correctWarnTime}} <el-time-picker value-format="HH:hh:mm" v-model="form.correctWarnTime" placeholder="è¯·éæ©æ¹æ¹æéæ¶é´"> </el-time-picker> </el-form-item> <el-button type="primary" @click="add" style="margin-bottom: 10px;">æ·»å å·¥ç§</el-button> <el-table :data="form.worktypeIdList" 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 align="center" label="æå±å·¥ç§"> <template slot-scope="{row}"> <el-select filterable v-model="row.worktypeId" placeholder="è¯·éæ©"> <el-option v-for="item in typeWork" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </template> </el-table-column> <el-table-column label="æä½" align="center" width="100"> <template slot-scope="scope"> <el-button type="text" size="small" style="color: red;" @click="dele(scope.$index)">å é¤</el-button> </template> </el-table-column> </el-table> <el-form-item label="ç¹å«çº¦å®" prop="specialAgreement"> <RichEditor :richData="form.specialAgreement" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor" :readonly="false"/> </el-form-item> <el-form-item label="ç¹å«è¯´æ" prop="specialInfo"> <RichEditor :richData="form.specialInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor1" :readonly="false"/> </el-form-item> <el-form-item label="å ¶ä»è¯´æ" prop="ortherInfo"> <RichEditor :richData="form.ortherInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor2" :readonly="false"/> </el-form-item> </el-form> </GlobalWindow> </template> <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import { all } from '@/api/business/insurance' import { all as allWorktype } from '@/api/business/worktype' import { solutionsBaseId } from '@/api/business/solutionsBase' import { pageAll as shopList } from '@/api/business/company' import UploadFile from '@/components/common/UploadFile' import { numRule } from '@/utils/form' import RichEditor from '@/components/common/RichEditor' export default { name: 'OperaSolutionsBaseWindow', extends: BaseOpera, components: { GlobalWindow, UploadFile, RichEditor }, data () { var validType = (rule, value, callback) => { if (this.form.validType === 0 && !value) { return callback(new Error('å»¶è¿å¤©æ°ä¸è½ä¸ºç©º')) } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) { return callback(new Error('å»¶è¿å¤©æ°åªè½ä¸ºæ£æ´æ°')) } callback() } var canAddFun = (rule, value, callback) => { if (!this.form.canAdd && !form.canReduce && !form.canChangeUnit) { return callback(new Error('æ¹æ¹æ¯æä¸è½ä¸ºç©º')) } callback() } return { // è¡¨åæ°æ® form: { id: null, name: '', companyName: '', insuranceId: '', validType: 0, minAge: '', maxAge: '', specialAgreement: '', specialInfo: '', ortherInfo: '', validTypeNum: '', canReduce: 0, canChangeUnit: 0, addValidDays: 0, delValidDays: 0, delOnlyReplace: 0, canAdd: 0, correctWarnTime: '', worktypeIdList: [{ worktypeId: '' }] }, // éªè¯è§å rules: { name: [ { required: true, message: '请è¾å ¥æ¹æ¡åç§°' } ], delOnlyReplace: [ { required: true, message: 'è¯·éæ©' } ], addValidDays: [ { required: true, validator: numRule } ], delValidDays: [ { required: true, validator: numRule } ], insuranceId: [ { required: true, message: 'è¯·éæ©ä¿é©å ¬å¸' } ], companyName: [ { required: true, message: '请è¾å ¥æ¿ä¿å ¬å¸' } ], minAge: [ { required: true, message: 'è¯·éæ©æä¿å¹´é¾' } ], validTypeNum: [ { required: true, validator: validType } ], correctWarnTime: [ { required: true, message: '请è¾å ¥æ¹æ¹æéæ¶é´' } ], canAdd: [ { required: true, validator: canAddFun } ] }, shops: [], company: [], typeWork: [] } }, created () { this.config({ api: '/business/solutionsBase', 'field.id': 'id' }) }, methods: { getWangedditor(val){ this.form.specialAgreement = val; }, getWangedditor1(val){ this.form.specialInfo = val; }, getWangedditor2(val){ this.form.ortherInfo = val; }, handNumberInput (value) { const regex = /^[-+]?\d*$/ if (!regex.test(value)) { // 妿è¾å ¥ç䏿¯æ´æ°ï¼å设置为ä¸ä¸ä¸ªææçæ´æ°å¼ this.form.addValidDays = value.replace(/[^0-9]/g, '') this.form.addValidDays = value.replace(/[^0-9]/g, '') this.form.delValidDays = value.replace(/[^0-9]/g, '') } }, // åæ¢å ¬å¸ getAllWorktype1 () { this.form.worktypeIdList = [{ worktypeId: '' }] this.getAllWorktype() }, changeValidType(e) { if (e === 1) { this.form.validTypeNum = 0 } else { this.form.validTypeNum = '' } }, // 确认æ°å»º/ä¿®æ¹ confirm () { const data = JSON.parse(JSON.stringify(this.form)) data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId) data.correctWarnTime = data.correctWarnTime.substring(0, data.correctWarnTime.lastIndexOf(':')) this.$refs.form.validate((valid) => { if (!valid) { return } // è°ç¨æ°å»ºæ¥å£ this.isWorking = true if (data.id == null || data.id === '') { this.api.create(data) .then(() => { this.visible = false this.$tip.apiSuccess('æ°å»ºæå') this.$emit('success') }) .catch(e => { this.$tip.apiFailed(e) }) .finally(() => { this.isWorking = false }) } else { this.api.updateById(data) .then(() => { this.visible = false this.$tip.apiSuccess('ä¿®æ¹æå') this.$emit('success') }) .catch(e => { this.$tip.apiFailed(e) }) .finally(() => { this.isWorking = false }) } }) }, open (title, target) { this.title = title this.visible = true this.form.maxAge = '' this.form.validTypeNum = '' this.form.canReduce = 0 this.form.canChangeUnit = 0 this.form.addValidDays = 0 this.form.delOnlyReplace = 0 this.form.delValidDays = 0 this.form.canAdd = 0 this.form.worktypeIdList = [{ worktypeId: '' }] // this.$refs['$upload'].clearFiles()//åå§åå¯¼å ¥ç»ä»¶ this.allCompany() this.allShops() // æ°å»º if (target == null) { this.$nextTick(() => { this.$refs.form.resetFields() this.form.maxAge = '' this.form.validTypeNum = '' this.form.fanganFile = null this.form.worktypeIdList = [{ worktypeId: '' }] this.form[this.configData['field.id']] = null }) return } // ç¼è¾ this.$nextTick(() => { solutionsBaseId(target.id) .then(res => { for (const key in this.form) { this.form[key] = res[key] } this.form.correctWarnTime = `${this.form.correctWarnTime}:00` console.log(this.form.correctWarnTime) if (res.worktypeList) { this.form.worktypeIdList = res.worktypeList.map(item => { return { worktypeId: item.worktypeId } }) } this.getAllWorktype() }) }) }, // æ¥è¯¢ä¿é©å ¬å¸ä¸å ¨é¨å·¥ç§ getAllWorktype () { allWorktype({ insuranceId: this.form.insuranceId }).then(res => { this.typeWork = res }) }, // æ¥è¯¢å ¨é¨ä¿é©å ¬å¸ allCompany () { all({ dataType: 2, status: 0 }) .then(res => { console.log(res) this.company = res }) }, allShops () { shopList({ type: 1, status: 0 }) .then(res => { console.log(res) this.shops = res }) }, add () { this.form.worktypeIdList.push({ worktypeId: '' }) }, dele (index) { if (this.form.worktypeIdList.length === 1) { this.$message.warning('è³å°è¦ä¿çä¸é¡¹') return } this.form.worktypeIdList.splice(index, 1) } } } </script> company/src/views/business/insurance.vue
@@ -27,6 +27,10 @@ </template> </el-table-column> <el-table-column prop="name" label="ä¿é©å ¬å¸" min-width="100px"></el-table-column> <el-table-column prop="name" label="LOGO" min-width="100px"></el-table-column> <el-table-column prop="name" label="è±æåç§°" min-width="100px"></el-table-column> <el-table-column prop="name" label="è系人" min-width="100px"></el-table-column> <el-table-column prop="name" label="èç³»çµè¯" min-width="100px"></el-table-column> <el-table-column label="å¯ç¨ç¶æ" min-width="100px"> <template slot-scope="{row}"> <el-switch company/src/views/business/solutions.vue
@@ -5,18 +5,6 @@ <el-form-item label="ä¿é©æ¹æ¡" prop="name"> <el-input v-model="searchForm.name" placeholder="请è¾å ¥" @keypress.enter.native="search"></el-input> </el-form-item> <el-form-item label="å¯ç¨ç¶æ" prop="status" v-if="userInfo.type !== 1"> <el-select v-model="searchForm.status" placeholder="è¯·éæ©" @keypress.enter.native="search"> <el-option label="å¯ç¨" value="0"></el-option> <el-option label="ç¦ç¨" value="1"></el-option> </el-select> </el-form-item> <el-form-item label="ç±»å" prop="type" > <el-select v-model="searchForm.type" placeholder="è¯·éæ©" @keypress.enter.native="search"> <el-option label="ç´ä¿" value="0"></el-option> <el-option label="å§ææä¿" value="1"></el-option> </el-select> </el-form-item> <section> <el-button type="primary" @click="search">æç´¢</el-button> <el-button @click="reset">éç½®</el-button> @@ -39,22 +27,15 @@ <span>{{scope.$index + 1}}</span> </template> </el-table-column> <el-table-column prop="name" label="ä¿é©æ¹æ¡" min-width="150px"></el-table-column> <el-table-column prop="insuranceName" label="ä¿é©å ¬å¸" min-width="100px"></el-table-column> <el-table-column label="æä¿å¹´é¾" min-width="100px"> <el-table-column prop="name" label="åæ¹æ¡åç§°" min-width="150px"></el-table-column> <el-table-column prop="insuranceName" label="ä¸»æ¹æ¡" min-width="100px"></el-table-column> <el-table-column label="æä¿ç±»å" min-width="120px" align="center"> <template slot-scope="{row}"> <span>{{row.minAge}}è³{{row.maxAge}}å²</span> <span v-if="row.type === 0">ç´ä¿</span> <span v-if="row.type === 1">å§æ<div style="color: blue;display: block" >{{row.shopName||'-'}}</div></span> </template> </el-table-column> <el-table-column label="æä¿çææ¥æ" min-width="100px"> <template slot-scope="{row}"> <span v-if="row.validType === 0">{{row.validTypeNum}}æ¥åçæ</span> <span v-if="row.validType === 1">次æçæ</span> </template> </el-table-column> <!-- <el-table-column prop="addValidDays" label="æ¹å¢çææ¶é´" min-width="100px"> </el-table-column> <el-table-column prop="delValidDays" label="æ¹åçææ¶é´" min-width="100px"> </el-table-column>--> <el-table-column label="æ¹æ¡è´¹ç¨" min-width="100px"> <el-table-column label="æä¿ä»·æ ¼" min-width="100px"> <template slot-scope="{row}"> <span>{{row.price}}å /人/</span> <span v-if="row.timeUnit === 0">天</span> @@ -65,12 +46,8 @@ <span v-if="row.timeUnit === 5">å¹´</span> </template> </el-table-column> <el-table-column label="æä¿ç±»å" min-width="120px" align="center"> <template slot-scope="{row}"> <span v-if="row.type === 0">ç´ä¿</span> <span v-if="row.type === 1">å§æ<div style="color: blue;display: block" >{{row.shopName||'-'}}</div></span> </template> </el-table-column> <el-table-column prop="name" label="éè¦å¤å®¡"></el-table-column> <el-table-column prop="createDate" label="æ¹æ¡åå»ºæ¥æ" min-width="100px"></el-table-column> <el-table-column prop="status" label="å¯ç¨ç¶æ" min-width="100px" v-if="userInfo.type !== 1"> <template slot-scope="{row}"> <el-switch @@ -83,7 +60,6 @@ </el-switch> </template> </el-table-column> <el-table-column prop="createDate" label="æ¹æ¡æ¥æ" min-width="100px"></el-table-column> <el-table-column v-if="containPermissions(['business:solutions:update', 'business:solutions:delete'])" label="æä½" company/src/views/business/solutionsBase.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,134 @@ <template> <TableLayout :permissions="['business:solutions:query']"> <!-- æç´¢è¡¨å --> <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:solutions:create']"> <template v-if="userInfo.type !== 1"> <li><el-button type="primary" @click="$refs.operaSolutionsBaseWindow.open('æ°å»ºä¸»æ¹æ¡')" v-permissions="['business:solutions:create']">æ·»å æ¹æ¡</el-button></li> </template> </ul> <el-table v-loading="isWorking.search" :data="tableData.list" stripe > <el-table-column label="åºå·" width="50px"> <template slot-scope="scope"> <span>{{scope.$index + 1}}</span> </template> </el-table-column> <el-table-column prop="name" label="ä¿é©æ¹æ¡" min-width="150px"></el-table-column> <el-table-column prop="insuranceName" label="ä¿é©å ¬å¸" min-width="100px"></el-table-column> <el-table-column label="æä¿å¹´é¾" min-width="100px"> <template slot-scope="{row}"> <span>{{row.minAge}}è³{{row.maxAge}}å²</span> </template> </el-table-column> <el-table-column label="æä¿çææ¥æ" min-width="100px"> <template slot-scope="{row}"> <span v-if="row.validType === 0">{{row.validTypeNum}}æ¥åçæ</span> <span v-if="row.validType === 1">次æçæ</span> </template> </el-table-column> <el-table-column prop="createDate" label="æ¹æ¡åå»ºæ¥æ" min-width="100px"></el-table-column> <el-table-column prop="status" label="å¯ç¨ç¶æ" min-width="100px" v-if="userInfo.type !== 1"> <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 v-if="containPermissions(['business:solutions:update', 'business:solutions:delete'])" label="æä½" min-width="180" fixed="right" > <template slot-scope="{row}"> <el-button type="text" @click="$refs.operaSolutionsBaseDescWindow.open('æ¹æ¡è¯¦æ ', { id: row.id })" icon="el-icon-edit" v-permissions="['business:solutions:update']">æ¥ç详æ </el-button> <template v-if="userInfo.type !== 1"> <el-button type="text" @click="$refs.operaSolutionsBaseWindow.open('ç¼è¾ä¸»æ¹æ¡', { id: row.id })" icon="el-icon-edit" v-permissions="['business:solutions:update']">ä¿®æ¹</el-button> </template> <el-button type="text" @click="deleteById(row)" icon="el-icon-delete">å é¤</el-button> </template> </el-table-column> </el-table> <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination" > </pagination> </template> <!-- ä¿®æ¹ --> <OperaSolutionsBaseWindow ref="operaSolutionsBaseWindow" @success="handlePageChange"/> <!-- 详æ --> <OperaSolutionsBaseDescWindow ref="operaSolutionsBaseDescWindow" @success="handlePageChange"/> </TableLayout> </template> <script> import BaseTable from '@/components/base/BaseTable' import TableLayout from '@/layouts/TableLayout' import Pagination from '@/components/common/Pagination' import OperaSolutionsBaseWindow from '@/components/business/OperaSolutionsBaseWindow' import OperaSolutionsBaseDescWindow from '@/components/business/OperaSolutionsBaseDescWindow' import { updateStatus } from '@/api/business/solutionsBase' import { mapState } from 'vuex' export default { name: 'mainPlan', extends: BaseTable, components: { TableLayout, Pagination, OperaSolutionsBaseWindow, OperaSolutionsBaseDescWindow }, data () { return { // æç´¢ searchForm: { name: '' } } }, computed: { ...mapState(['userInfo']) }, created () { this.config({ module: 'ä¸»æ¹æ¡ä¿¡æ¯è¡¨', api: '/business/solutionsBase', 'field.id': 'id', 'field.main': 'id' }) if (this.userInfo.type === 1) { this.searchForm.status = '0' } else { this.searchForm.status = '' } this.search() }, methods: { // ä¿®æ¹ç¶æ changeStatus (status, row) { updateStatus({ id: row.id, status }) .then(res => { this.search() }) .catch(err => { row.status = row.status === 0 ? 1 : 0 }) } } } </script> company/src/views/login.vue
@@ -139,7 +139,7 @@ if (this.loading) { return } if (this.readed != 1) { if (this.readed !== 1) { this.$message.error('请å é 读ååæãæå¡åè®®ãåãéç§åè®®ã') return }