| | |
| | | @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> |
| | | </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="handleExportTemplate" |
| | | 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> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> |
| | | |
| | | <el-table-column label="收入/支出" prop="price" sortable width="100" /> |
| | | <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> |
| | | <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"> |
| | | {{ getSrc2(scope.row.kind) }} |
| | | </template> |
| | | <template slot-scope="scope">{{scope.row.kind? scope.row.kind: '————'}}</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> |
| | | <el-table-column label="备注" prop="remark" sortable width="100" /> |
| | | <div @click="handleCheck(scope.row)"> |
| | | <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 === ','" |
| | | ></div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" prop="remark" sortable width="100" > |
| | | <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
| | | <el-button |
| | |
| | | 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> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | |
| | | <!-- 设备名称、时间、购买人、事项内容、存放地点、备注、电子文件 --> |
| | | <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="createTime"> |
| | | <el-form-item label="台账" prop="type"> |
| | | <el-input v-model="formDat.type" placeholder="请输入内容" clearable :style="{width: '100%'}" ></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="时间" prop="happenTime"> |
| | | <el-date-picker |
| | | v-model='formDat.createTime' |
| | | v-model='formDat.happenTime' |
| | | type='date' |
| | | placeholder='选择日期' |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="收入/支出" prop="price"> |
| | | <el-input v-model="formDat.price" placeholder="请输入收入/支出" clearable :style="{width: '100%'}" ></el-input> |
| | | <el-select v-model="formDat.price" 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="balance"> |
| | | <el-input v-model="formDat.balance" placeholder="请输入余额" clearable :style="{width: '100%'}" > |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="用途" prop="useFor"> |
| | | <el-input v-model="formDat.useFor" placeholder="请输入用途" clearable :style="{width: '100%'}" > |
| | |
| | | <el-input v-model="formDat.usePeople" placeholder="请输入使用人" clearable :style="{width: '100%'}" > |
| | | </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-form-item label="余额" prop="balance"> |
| | | <el-input v-model="formDat.balance" placeholder="请输入余额" clearable :style="{width: '100%'}" > |
| | | <el-form-item label="支付方式" prop="kind"> |
| | | <el-input v-model="formDat.kind" 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> |
| | |
| | | }], |
| | | type: [{ |
| | | required: true, |
| | | message: '请选择基金/台账', |
| | | trigger: 'change' |
| | | message: '请输入台账内容', |
| | | trigger: 'blur' |
| | | }], |
| | | balance: [{ |
| | | required: true, |
| | | message: '请输入余额', |
| | | message: '请输入金额', |
| | | trigger: 'blur' |
| | | }], |
| | | kind: [{ |
| | | required: true, |
| | | message: '请输入家庭号', |
| | | // required: true, |
| | | message: '请输入支付方式', |
| | | trigger: 'blur' |
| | | }], |
| | | createTime: [{ |
| | |
| | | }], |
| | | }, |
| | | typeOptions: [ |
| | | { |
| | | value: '0', |
| | | label: '基金', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '台账', |
| | | } |
| | | ], |
| | | { |
| | | value: '收入', |
| | | label: '收入', |
| | | }, |
| | | { |
| | | value: '支出', |
| | | 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() { |
| | |
| | | this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] |
| | | // 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; |
| | | this.reset(); |
| | | }, |
| | | getRowId(row) |
| | | { |
| | | return row.id |
| | | }, |
| | | // 取消按钮(数据权限) |
| | | cancelDataScope() { |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const Ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除序号为"' + Ids + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除所选数据项?').then(function() { |
| | | return delEconomy(Ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | const Ids = this.ids; |
| | | |
| | | if(Ids.length==0) |
| | | { |
| | | this.download('/zfEconomy/export', { |
| | | ...this.queryParams |
| | | }, `zfEconomy_${new Date().getTime()}.xlsx`) |
| | | }else |
| | | { |
| | | this.download('/zfEconomy/export1/'+Ids, { |
| | | }, `zfEconomy_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | , |
| | | handleExportTemplate(){ |
| | | this.download('/zfEconomy/model', { |
| | | |
| | | }, `zfEconomy_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | /** 导入操作*/ |
| | | handleEnport(params){ |
| | |
| | | let _this = this |
| | | alert(file) |
| | | enload(formData).then(response => { |
| | | _this.getList(); |
| | | _this.getList(); |
| | | Message({ message: "导入成功", type: 'warning' }) |
| | | |
| | | }).catch(err) |
| | |
| | | Message({ message: "导入失败", type: 'error' }) |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | }; |
| | | </script> |
| | | |