| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="基金/台账" prop="type" > |
| | | <el-select |
| | | v-model="queryParams.type" |
| | | placeholder="基金/台账" |
| | | clearable |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in typeOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | <el-form-item label="类型" prop="type"> |
| | | <el-input |
| | | v-model="queryParams.type" |
| | | placeholder="请输入类型" |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="用途" prop="useFor"> |
| | |
| | | <el-button size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | |
| | | >导出</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['family:note:export']" |
| | | >导入模板下载</el-button> |
| | | </el-col> |
| | | <el-col :span="1.2"> |
| | | <el-upload |
| | | action="" |
| | | class="upload-demo" |
| | | :show-file-list="false" |
| | | :http-request="handleEnport" |
| | | > |
| | | <el-button size="mini" type="primary" |
| | | plain |
| | | icon="el-icon-plus" >导入</el-button> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['family:note:export']" |
| | | >导入模板下载</el-button> |
| | | </el-col> |
| | | <el-col :span="1.2"> |
| | | <el-upload |
| | | action="" |
| | | class="upload-demo" |
| | | :show-file-list="false" |
| | | :http-request="handleEnport" |
| | | > |
| | | <el-button size="mini" type="primary" |
| | | plain |
| | | icon="el-icon-plus" >导入</el-button> |
| | | |
| | | </el-upload> |
| | | </el-col> |
| | | </el-upload> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | <!-- 序号、基金/台账、时间、收入/支出、用途、使用人、现金/自动扣划、余额、电子文件、备注 操作--> |
| | | <!-- 这里有个familyList数组 是在data()中定义的 --> |
| | | <el-table v-loading="loading" :data="economyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> |
| | | <el-table v-loading="loading" :data="economyList" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> |
| | | <el-table-column label="基金/台账" prop="type" sortable width="120" > |
| | | <template slot-scope="scope"> |
| | | {{ getSrc1(scope.row.type) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="时间" align="center" sortable prop="createTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | {{ getSrc1(scope.row.type) }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="发生时间" prop="createTime" sortable width="100" align="center"> |
| | | <template slot-scope="scope">{{scope.row.createTime? scope.row.createTime: '————'}}</template> |
| | | </el-table-column> |
| | | <el-table-column label="台账" prop="type" sortable width="100" /> |
| | | <el-table-column label="收入/支出" prop="price" sortable width="100" /> |
| | | <el-table-column label="用途" prop="useFor" sortable width="100" /> |
| | | <!-- <el-table-column label="事项内容" prop="content" sortable :show-overflow-tooltip="true" width="150" /> --> |
| | | |
| | | <el-table-column label="使用人" prop="usePeople" sortable width="100" /> |
| | | <el-table-column label="现金/自动扣划" prop="kind" sortable width="130" > |
| | | <template slot-scope="scope"> |
| | | <template slot-scope="scope"> |
| | | {{ getSrc2(scope.row.kind) }} |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="余额" prop="balance" sortable width="100" /> |
| | | <el-table-column label="电子文件" prop="url" align="center" sortable width="110" > |
| | | <template slot-scope="scope" > |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | src="../../assets/images/deviceLis.png" |
| | | alt="" |
| | | style="width: 35px; height: 35px;" |
| | | fit="cover" |
| | | v-if="scope.row.url !== ','" |
| | | > |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | src="../../assets/images/deviceA.png" |
| | | alt="" |
| | | style="width: 35px; height: 35px;" |
| | | fit="cover" |
| | | v-if="scope.row.url === ','" |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | src="../../assets/images/deviceLis.png" |
| | | alt="" |
| | | style="width: 35px; height: 35px;" |
| | | fit="cover" |
| | | v-if="scope.row.url !== ','" |
| | | > |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | src="../../assets/images/deviceA.png" |
| | | alt="" |
| | | style="width: 35px; height: 35px;" |
| | | fit="cover" |
| | | v-if="scope.row.url === ','" |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" prop="remark" sortable width="100" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
| | |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:role:edit']" |
| | | v-hasPermi="['familymodel:economy:info']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:role:remove']" |
| | | >删除</el-button> |
| | | <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']"> |
| | | <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:economy:info']"> |
| | | <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">查看详情</el-button> |
| | | |
| | | </el-dropdown> |
| | |
| | | <!-- 设备名称、时间、购买人、事项内容、存放地点、备注、电子文件 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> |
| | | <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> |
| | | <el-form-item label="基金/台账" prop="type"> |
| | | <el-select v-model="formDat.type" placeholder="请选择基金/台账" clearable :style="{width: '100%'}" > |
| | | <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="基金/台账" prop="type"> |
| | | <el-select v-model="formDat.type" placeholder="请选择基金/台账" clearable :style="{width: '100%'}" > |
| | | <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="时间" prop="createTime"> |
| | | <el-form-item label="时间" prop="happenTime"> |
| | | <el-date-picker |
| | | v-model='formDat.createTime' |
| | | v-model='formDat.happenTime' |
| | | type='date' |
| | | placeholder='选择日期' |
| | | ></el-date-picker> |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="现金/自动扣划" prop="kind"> |
| | | <el-select v-model="formDat.kind" placeholder="请选择现金/自动扣划" clearable :style="{width: '100%'}" > |
| | | <el-option v-for="(item, index) in typeOptions1" :key="index" :label="item.label" :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-select v-model="formDat.kind" placeholder="请选择现金/自动扣划" clearable :style="{width: '100%'}" > |
| | | <el-option v-for="(item, index) in typeOptions1" :key="index" :label="item.label" :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="余额" prop="balance"> |
| | | <el-input v-model="formDat.balance" placeholder="请输入余额" clearable :style="{width: '100%'}" > |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="家庭号" prop="familyId"> |
| | | <el-input v-model="formDat.familyId" placeholder="请输入家庭号" clearable :style="{width: '100%'}" > |
| | | </el-input> |
| | | </el-form-item> --> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="formDat.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" ></el-input> |
| | | </el-form-item> |
| | |
| | | }], |
| | | }, |
| | | typeOptions: [ |
| | | { |
| | | value: '0', |
| | | label: '基金', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '台账', |
| | | } |
| | | { |
| | | value: '0', |
| | | label: '基金', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '台账', |
| | | } |
| | | ], |
| | | typeOptions1: [ |
| | | { |
| | | value: '0', |
| | | label: '现金', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '自动扣划', |
| | | } |
| | | { |
| | | value: '0', |
| | | label: '现金', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '自动扣划', |
| | | } |
| | | ], |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getCateInfor() |
| | | this.getCateInfor() |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | //基金/台账的选择 |
| | | getSrc1(type) { |
| | | if (type === 0) { |
| | | return '基金' |
| | | }else { |
| | | return '台账' |
| | | } |
| | | }, |
| | | //基金/台账的选择 |
| | | getSrc1(type) { |
| | | if (type === 0) { |
| | | return '基金' |
| | | }else { |
| | | return '台账' |
| | | } |
| | | }, |
| | | |
| | | getSrc2(kind) { |
| | | if (kind == 0) { |
| | | return '现金' |
| | | }else { |
| | | return '自动扣划' |
| | | } |
| | | }, |
| | | getSrc2(kind) { |
| | | if (kind == 0) { |
| | | return '现金' |
| | | }else { |
| | | return '自动扣划' |
| | | } |
| | | }, |
| | | |
| | | // 取消按钮 |
| | | cancelData() { |
| | |
| | | // console.log(this.queryParams) |
| | | // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | |
| | | listEconomy(this.queryParams).then(response => { |
| | | listEconomy(this.queryParams).then(response => { |
| | | // alert(123) |
| | | // console.log(response.data) |
| | | this.economyList = response.data.data; |
| | |
| | | } |
| | | }, |
| | | getCateInfor() |
| | | { |
| | | let _this = this |
| | | getCategory().then(response=>{ |
| | | { |
| | | let _this = this |
| | | getCategory().then(response=>{ |
| | | |
| | | response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | |
| | | let _this = this |
| | | alert(file) |
| | | enload(formData).then(response => { |
| | | _this.getList(); |
| | | _this.getList(); |
| | | Message({ message: "导入成功", type: 'warning' }) |
| | | |
| | | }).catch(err) |
| | |
| | | Message({ message: "导入失败", type: 'error' }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | }; |
| | | </script> |