ÎļþÃû´Ó src/views/project/donorcharge/index.vue ÐÞ¸Ä |
| | |
| | | <span>{{ parseTime(scope.row.donatetime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="OPOç¼å·" align="center" prop="donateno" /> |
| | | <el-table-column label="æ¡ä¾ç¼å·" align="center" prop="donateno" /> |
| | | <el-table-column label="æç®å§å" align="center" prop="name" /> |
| | | <el-table-column label="åºçå¹´æ" align="center" prop="borthdate" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.borthdate, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ§å«" align="center" prop="sex" /> |
| | | <el-table-column label="å¹´é¾" align="center" prop="age" /> |
| | | <el-table-column label="æç®ç±»å«" align="center" prop="donationcategory" /> |
| | | <el-table-column label="æç®å¨å®" align="center" prop="donateorgan" /> |
| | | <el-table-column label="宿¶è´¹ç¨" align="center" prop="chargeamounted" /> |
| | | <el-table-column label="åºæ¶è´¹ç¨" align="center" prop="chargeamount" /> |
| | | <el-table-column label="å·²æ¶è´¹ç¨" align="center" prop="chargeamounted" /> |
| | | <el-table-column label="夿³¨" align="center" prop="remark" /> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="æä½" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:donorcharge:edit']">ä¿®æ¹</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)" |
| | | v-hasPermi="['system:donorcharge:edit']">详æ
</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:donorcharge:remove']">å é¤</el-button> |
| | | </template> |
| | |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table :data="donorchargerogans" v-loading="loading" max-height="1200" border highlight-current-row> |
| | | <el-table-column prop="orderno" align="center" label="åºå·" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="åºå·" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organno" align="center" label="å¨å®ç¼å·" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organno" placeholder="å¨å®ç¼å·" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organname" align="center" label="å¨å®åç§°" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organname" placeholder="å¨å®åç§°" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="hospitalname" align="center" label="æ¥æ¶å»é¢" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.hospitalname" placeholder="æ¥æ¶å»é¢" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amounttime" align="center" label="æ¥æ¶æ¶é´" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="æ¥æ¶æ¶é´"> |
| | | </el-date-picker> </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" align="center" label="å·²æ¶è´¹ç¨" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.amount" placeholder="å·²æ¶è´¹ç¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amounttime" align="center" label="æ¶æ¬¾æ¶é´" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="æ¶æ¬¾æ¶é´" @blur="getdays(scope.row)"> |
| | | </el-date-picker> </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organcharge" align="center" label="æ åè´¹ç¨" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organcharge" placeholder="å·²æ¶è´¹ç¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" label="夿³¨"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="夿³¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="showSelectionDialog" :close-on-click-modal="false" :title="'è¯·éæ©æç®æ¡ä¾'" width="500px" |
| | | style="text-align: center" v-loading="loading"> |
| | | <el-form ref="selectionForm" :model="selectionForm"> |
| | | <el-row> |
| | | <el-form-item label="æç®è
ååï¼" prop="donorname" label-width="120px"> |
| | | <el-select v-model="selectionForm.donorid" filterable reserve-keyword default-first-option |
| | | placeholder="请è¾å
¥æç®è
çå§å" style="width: 100%"> |
| | | <el-option v-for="item in donorlist" :key="item.donorid" :label="item.donorname" :value="item.donorid"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="showSelectionDialog = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmSelection()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import { listDonorcharge, getDonorcharge, delDonorcharge, addDonorcharge, updateDonorcharge, exportDonorcharge, listDonorchargeorgan, getDonorchargeorgan, delDonorchargeorgan, addDonorchargeorgan, updateDonorchargeorgan, exportDonorchargeorgan } from "@/api/project/donorcharge"; |
| | | export default { |
| | | name: "Donorcharge", |
| | |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | //å½åæ¡ä¾id |
| | | curInfoId: 0, |
| | | // æç®æ¡ä¾å¨å®åè¡¨æ ¼æ°æ® |
| | | donorchargeList: [], |
| | | donorchargerogans: [], |
| | | //æç®æ¡ä¾éæ© |
| | | showSelectionDialog: false, |
| | | donorlist: [], |
| | | donorinfolist: [], |
| | | selectionForm: { |
| | | index: null, |
| | | donorid: null, |
| | | donorname: null |
| | | }, |
| | | loadingdonorlist: false, |
| | | |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | // æ¥è¯¢è´¹ç¨è¡¨åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | infoid: null, |
| | | donateno: null, |
| | | donatetime: null, |
| | | name: null, |
| | | borthdate: null, |
| | | sex: null, |
| | | age: null, |
| | | donationcategory: null, |
| | | donateorgan: null, |
| | | chargeamount: null, |
| | | chargeamounted: null, |
| | | }, |
| | | //æ¥è¯¢æ¡ä¾åæ° |
| | | donorParams: { |
| | | pageNum: 1, |
| | | pageSize: 1000, |
| | | }, |
| | | // æ¥è¯¢è´¹ç¨å¨å®è¡¨åæ° |
| | | organParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | donorchargeid: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | |
| | | methods: { |
| | | //ä¸å®¶/å»çæºæ/è´¹ç¨æ¥éæºæéæ© |
| | | confirmSelection() { |
| | | var curdonorinfo = null; |
| | | //仿¡ä¾å表è·åä¿¡æ¯ |
| | | this.donorinfolist.map(item => { |
| | | if (this.selectionForm.donorid == item.id) { |
| | | curdonorinfo = item; |
| | | } |
| | | }); |
| | | this.showSelectionDialog = false; |
| | | this.$router.push({ |
| | | path: "/finance/donorchargedetail/", |
| | | query: { id: 0, operation: "add", data: curdonorinfo } |
| | | }); |
| | | }, |
| | | |
| | | /** æ¥è¯¢æç®æ¡ä¾å¨å®åå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.selectionForm.index = null; |
| | | this.selectionForm.donorid = null; |
| | | this.selectionForm.donorname = null; |
| | | |
| | | if (this.donorlist[0]) { |
| | | this.showSelectionDialog = true; |
| | | } |
| | | else { |
| | | //è·åæç®æ¡ä¾å表 |
| | | if (this.donorlist.length>0) { } |
| | | else { |
| | | this.loading = true; |
| | | listDonatebaseinfo(this.donorParams).then(res => { |
| | | this.donorinfolist = res.rows; |
| | | this.donorinfolist.forEach(item => { |
| | | this.donorlist.push({ |
| | | donorid: item.id, |
| | | donorname: item.name |
| | | }); |
| | | }); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | |
| | | this.showSelectionDialog = true; |
| | | }; |
| | | |
| | | /** |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å æç®æ¡ä¾å¨å®å"; |
| | | this.title = "æç®æ¡ä¾å¨å®è´¹ç¨æ
åµ"; |
| | | this.donorchargerogans = []; |
| | | */ |
| | | }, |
| | | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.$router.push({ |
| | | path: "/finance/donorchargedetail/", |
| | | query: { id: row.id, operation: "update", data: row } |
| | | }); |
| | | |
| | | /** |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getDonorcharge(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹æç®æ¡ä¾å¨å®å"; |
| | | this.title = "ä¿®æ¹æç®æ¡ä¾å¨å®è´¹ç¨æ
åµ"; |
| | | |
| | | //å¨å®è´¹ç¨ä¿¡æ¯ |
| | | // this.organParams.infoid = row.infoid; |
| | | this.organParams.donorchargeid = row.id; |
| | | listDonorchargeorgan(this.organParams).then(res => { |
| | | console.log(res); |
| | | this.donorchargerogans = res.rows; |
| | | if (this.donorchargerogans.length > 0) { |
| | | } else { |
| | | this.addRow(0); |
| | | } |
| | | }); |
| | | }); |
| | | */ |
| | | }, |
| | | |
| | | /** 详æ
æ¥çæé®æä½ */ |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: "/finance/donorchargedetail/", |
| | | query: { id: row.id, operation: "detail", data: row } |
| | | }); |
| | | }, |
| | | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤æç®æ¡ä¾å¨å®åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function () { |
| | | return delDonorcharge(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => { }); |
| | | }, |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å¯¼åºæææç®æ¡ä¾å¨å®åæ°æ®é¡¹ï¼').then(() => { |
| | | this.exportLoading = true; |
| | | return exportDonorcharge(queryParams); |
| | | }).then(response => { |
| | | this.$download.name(response.msg); |
| | | this.exportLoading = false; |
| | | }).catch(() => { }); |
| | | }, |
| | | |
| | | /** æäº¤æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤æç®æ¡ä¾å¨å®åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function () { |
| | | return delDonorcharge(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => { }); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å¯¼åºæææç®æ¡ä¾å¨å®åæ°æ®é¡¹ï¼').then(() => { |
| | | this.exportLoading = true; |
| | | return exportDonorcharge(queryParams); |
| | | }).then(response => { |
| | | this.$download.name(response.msg); |
| | | this.exportLoading = false; |
| | | }).catch(() => { }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |