Browse Source

sample

master
pengjun 2 years ago
parent
commit
09a37b6f67
  1. 60
      src/views/common-settings/SampleGroup.vue
  2. 142
      src/views/fee-settings/PayMode.vue

60
src/views/common-settings/SampleGroup.vue

@ -10,7 +10,7 @@
height="240px"
class="el-table__body-wrapper tbody"
border:stripe="true"
@row-click="rowick"
@row-click="rowick" ref="info"
highlight-current-row
>
<el-table-column prop="id" label="编号" width="300">
@ -149,27 +149,27 @@
<el-dialog
:title="title == 1 ? '新增' : '修改'"
:visible.sync="dialogVisible"
width="53%"
:close-on-click-modal="false"
width="520px"
:close-on-click-modal="false" @close="closeDialog"
>
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-row>
<el-col :span="12">
<el-form-item label="编号">
<el-input v-model="form.id" disabled></el-input>
<el-input v-model="form.id" disabled size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="名称" prop="displayName">
<el-input
v-model="form.displayName"
v-model="form.displayName" size="small"
ref="refinput"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标本类型" prop="sampleTypeId">
<el-select v-model="form.sampleTypeId" placeholder="请选择">
<el-select v-model="form.sampleTypeId" placeholder="请选择" size="small">
<el-option
v-for="item in sampleTypeId"
:key="item.id"
@ -184,8 +184,7 @@
<el-form-item label="标本容器" prop="sampleContainerId">
<el-select
v-model="form.sampleContainerId"
placeholder="请选择"
>
placeholder="请选择" size="small">
<el-option
v-for="item in sampleContainerId"
:key="item.id"
@ -198,22 +197,24 @@
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="创建者">
<el-input v-model="form.creatorName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="创建时间">
<el-input :value="form.creationTime" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="修改者">
<el-input v-model="form.lastModifierName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="修改时间">
<el-input
:value="form.lastModificationTime"
@ -248,7 +249,7 @@ import {
import { specimenlist, containerlist } from "@/request/systemapi";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex";
import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "../../utlis/proFunc";
import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw, objCopy } from "../../utlis/proFunc";
export default {
data() {
@ -875,9 +876,13 @@ export default {
sampleTypeId: this.form.sampleTypeId,
sampleContainerId: this.form.sampleContainerId,
}).then((res) => {
if(res.code != -1){
this.$message.success("新增成功");
this.getlist();
// this.getlist();
this.form.id = res.data.id
this.tableData.push(deepCopy(res.data))
this.dialogVisible = false;
}
});
} else if (this.title == 2) {
barcodeediting(this.form.id, {
@ -885,14 +890,39 @@ export default {
sampleTypeId: this.form.sampleTypeId,
sampleContainerId: this.form.sampleContainerId,
}).then((res) => {
if(res.code != -1){
this.$message.success("修改成功");
// this.getlist();
this.dialogVisible = false;
this.getlist();
}
});
}
}
});
},
closeDialog(){
if(!this.form.id) return
let currentRow = {}
let lfind = arrayExistObj(this.tableData,'id',this.form.id)
if(lfind > -1){
objCopy(this.form,this.tableData[lfind])
currentRow = this.tableData[lfind]
}else{
currentRow = deepCopy(this.form)
lfind = this.tableData.length
this.tableData.push(currentRow)
}
if(lfind > -1){
this.$nextTick(()=>{
this.$refs['info'].setCurrentRow(currentRow)
this.rowick(currentRow)
})
}
},
//
btnAdd() {
this.dialogVisible = true;

142
src/views/fee-settings/PayMode.vue

@ -1,13 +1,13 @@
<template>
<div class="box">
<div style="width: 95%">
<div>
<el-card>
<div class="publiccss">支付方式</div>
<div slot="header">支付方式</div>
<div style="display: flex;">
<div :style="'width:' + (window.pageWidth - 45 - 110) + 'px;'">
<el-table
:data="tableData" border
style="width: 100%; height: 500px; margin-top: 20px"
row-key="id"
:height="tableHeight"
:height="window.pageHeight - 150"
class="el-table__body-wrapper tbody"
@row-click="rowick"
highlight-current-row
@ -40,11 +40,50 @@
</template>
</el-table-column>
</el-table>
</div>
<!-- 按钮 -->
<div style="margin-left: 10px; margin-top: 50px;">
<div>
<el-button type="" @click="editpopup" class="btnClass">编辑</el-button>
</div>
<div>
<el-button type="" @click="topping" class="btnClass"
>置顶</el-button
>
</div>
<div>
<el-button type="" @click="toppings" class="btnClass"
>置底</el-button
>
</div>
<div>
<el-button
type=""
:disabled="isshow"
@click="assertion"
class="btnClass"
>排序</el-button
>
</div>
<div>
<el-button
type=""
:disabled="isshow"
@click="cancellation"
class="btnClass"
>取消</el-button
>
</div>
</div>
</div>
</el-card>
<!-- 新增或者编辑 -->
<el-dialog
title="修改"
:visible.sync="dialogVisible"
width="40%"
width="600px"
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" label-width="80px">
@ -60,6 +99,14 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="启用">
<el-radio v-model="form.isActive" label="Y"></el-radio>
<el-radio v-model="form.isActive" label="N"></el-radio>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
@ -68,42 +115,6 @@
>
</span>
</el-dialog>
</el-card>
</div>
<!-- -->
<div style="margin-left: 10px; margin-top: 5%" class="buttonarea">
<el-button type="" @click="editpopup" class="commonbutton"
>编辑</el-button
>
<div style="margin-top: 10px">
<el-button type="" @click="topping" class="commonbutton"
>置顶</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="toppings" class="commonbutton"
>置底</el-button
>
</div>
<div style="margin-top: 10px">
<el-button
type=""
:disabled="isshow"
@click="assertion"
class="commonbutton"
>排序</el-button
>
</div>
<div style="margin-top: 10px">
<el-button
type=""
:disabled="isshow"
@click="cancellation"
class="commonbutton"
>取消</el-button
>
</div>
</div>
</div>
</template>
<script>
@ -114,16 +125,16 @@ import {
paytopandbottom,
paymentdraganddrop,
} from "@/request/commonapi";
import { mapState } from "vuex"
export default {
data() {
return {
isshow: true,
tableHeight: window.innerHeight - 180, //
screenHeight: window.innerHeight, // 1
initTableData: [],
tableData: [],
form: {
displayName: "",
isActive: "Y",
},
dialogVisible: false,
};
@ -133,21 +144,13 @@ export default {
},
mounted() {
this.rowDrop();
// window.onresize:
window.onresize = () => {
return (() => {
// window.innerHeight:
window.screenHeight = window.innerHeight;
this.screenHeight = window.screenHeight;
})();
};
},
watch: {
// screenHeighttable
screenHeight(val) {
this.screenHeight = val;
this.tableHeight = this.screenHeight - 180;
},
computed:{
...mapState(['window'])
},
methods: {
//
@ -232,6 +235,7 @@ export default {
} else {
paymentediting(this.form.id, {
displayName: this.form.displayName,
isActive:this.form.isActive
}).then((res) => {
this.$message.success("修改成功");
this.getlist();
@ -245,16 +249,10 @@ export default {
this.$message.warning("请点击选择操作的数据");
} else {
this.dialogVisible = true;
let copy = Object.assign({}, this.form);
this.form = copy;
// invoiceidquery(this.form.payModeId).then((res) => {
// console.log(res);
// this.form = res.data;
// });
}
},
rowick(row) {
this.form = row;
this.form = Object.assign({},row);
},
getlist() {
paymodelist().then((res) => {
@ -267,12 +265,16 @@ export default {
};
</script>
<style scoped>
::v-deep .el-table__header th {
/* font-size: px; */
background-color: rgb(245, 245, 245); /* 设置表头背景颜色 */
color: rgb(113, 113, 113); /* 设置表头文字颜色 */
}
.box {
display: flex;
@import '../../assets/css/global_button.css';
@import '../../assets/css/global_card.css';
@import '../../assets/css/global_dialog.css';
@import '../../assets/css/global_form.css';
@import '../../assets/css/global_input.css';
@import '../../assets/css/global_table.css';
@import '../../assets/css/global.css';
.btnClass {
width: 100px;
margin-top: 10px
}
</style>
Loading…
Cancel
Save