罗斌杰 2 years ago
parent
commit
29d5172861
  1. 63
      src/views/common-settings/ItemType.vue
  2. 8
      src/views/fee-settings/PayMode.vue
  3. 642
      src/views/fee-settings/cardRegister.vue
  4. 9
      src/views/login/Login.vue

63
src/views/common-settings/ItemType.vue

@ -75,14 +75,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="合并组合" prop="isMergeAsbitem">
<el-select v-model="form.isMergeAsbitem" placeholder="请选择" style="width: 100%" size="small">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检查类别" prop="checkTypeFlag"> <el-form-item label="检查类别" prop="checkTypeFlag">
<el-select v-model="form.checkTypeFlag" placeholder="请选择" style="width: 100%" size="small"> <el-select v-model="form.checkTypeFlag" placeholder="请选择" style="width: 100%" size="small">
@ -100,8 +92,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="结果是否换行" prop="lineModeFlagBox" label-width="100px">
<el-checkbox v-model="form.lineModeFlagBox" @change="boxToVal('lineModeFlag')" />
<el-form-item label="合并组合" prop="isMergeAsbitem">
<!-- <el-select v-model="form.isMergeAsbitem" placeholder="请选择" style="width: 100%" size="small">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select> -->
<el-checkbox v-model="form.isMergeAsbitem" true-label="Y" false-label="N" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结果是否换行" prop="isWrap" label-width="100px">
<el-checkbox v-model="form.isWrap" true-label="Y" false-label="N" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -195,7 +196,7 @@ export default {
checkTypeFlag: "", checkTypeFlag: "",
guidTypeId: "", guidTypeId: "",
medicalReportTypeId: "", medicalReportTypeId: "",
lineModeFlag: '0', //
isWrap: 'N', //
lineModeFlagBox: false, // box lineModeFlagBox: false, // box
}, },
value: "", // value: "", //
@ -215,39 +216,6 @@ export default {
...mapState(["window"]), ...mapState(["window"]),
}, },
methods: { methods: {
// Box
boxToVal(type) {
// console.log('this.form',this.form)
let val = 'N'
switch (type) {
case 'lineModeFlag':
if (this.form[type + 'Box']) {
val = '1';
} else {
val = '0';
}
break;
default:
//
if (this.form[type + 'Box']) val = 'Y'
break;
}
this.form[type] = val
},
// Box
valToBox(type){
let boxVal = false
switch (type) {
case 'lineModeFlag':
if(this.form[type] == '1') boxVal = true
break;
default:
if(this.form[type] == 'Y') boxVal = true
break;
}
this.form[type + 'Box'] = boxVal
},
cascaderchang(v) { cascaderchang(v) {
this.departmentname = v[v.length - 1]; this.departmentname = v[v.length - 1];
@ -276,7 +244,6 @@ export default {
projecttype(id).then((res) => { projecttype(id).then((res) => {
if (res.code != -1) { if (res.code != -1) {
objCopy(res.data,this.form) objCopy(res.data,this.form)
this.valToBox('lineModeFlag') // Box
} }
}); });
// getapi(`/api/app/item/in-item-type/${data.id}`).then((res) => { // getapi(`/api/app/item/in-item-type/${data.id}`).then((res) => {
@ -377,7 +344,7 @@ export default {
checkTypeFlag: this.form.checkTypeFlag, checkTypeFlag: this.form.checkTypeFlag,
guidTypeId: this.form.guidTypeId, guidTypeId: this.form.guidTypeId,
medicalReportTypeId: this.form.medicalReportTypeId, medicalReportTypeId: this.form.medicalReportTypeId,
lineModeFlag: this.form.lineModeFlag
isWrap: this.form.isWrap
}).then((res) => { }).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.$message.success("新增成功"); this.$message.success("新增成功");
@ -394,7 +361,7 @@ export default {
checkTypeFlag: this.form.checkTypeFlag, checkTypeFlag: this.form.checkTypeFlag,
guidTypeId: this.form.guidTypeId, guidTypeId: this.form.guidTypeId,
medicalReportTypeId: this.form.medicalReportTypeId, medicalReportTypeId: this.form.medicalReportTypeId,
lineModeFlag: this.form.lineModeFlag
isWrap: this.form.isWrap
}).then((res) => { }).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.$message.success("新增成功"); this.$message.success("新增成功");
@ -414,7 +381,7 @@ export default {
checkTypeFlag: this.form.checkTypeFlag, checkTypeFlag: this.form.checkTypeFlag,
guidTypeId: this.form.guidTypeId, guidTypeId: this.form.guidTypeId,
medicalReportTypeId: this.form.medicalReportTypeId, medicalReportTypeId: this.form.medicalReportTypeId,
lineModeFlag: this.form.lineModeFlag
isWrap: this.form.isWrap
}).then((res) => { }).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.$message.success("修改成功"); this.$message.success("修改成功");

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

@ -170,14 +170,14 @@ export default {
this.tableData.forEach((item, index) => { this.tableData.forEach((item, index) => {
// index 0 displayOrder // index 0 displayOrder
// const currentDisplayOrder = this.tableData.length -1 // const currentDisplayOrder = this.tableData.length -1
const currentDisplayOrder = this.initTableData[index].displayOrder;
if (item.displayOrder != currentDisplayOrder) {
// const currentDisplayOrder = this.initTableData[index].displayOrder;
// if (item.displayOrder != currentDisplayOrder) {
// displayOrder // displayOrder
result.push({ result.push({
id: item.id, id: item.id,
displayOrder: currentDisplayOrder,
displayOrder: index+1,
}); });
}
// }
}); });
paymentdraganddrop({ itemList: result }).then((res) => { paymentdraganddrop({ itemList: result }).then((res) => {
if(res.code!=-1){ if(res.code!=-1){

642
src/views/fee-settings/cardRegister.vue

@ -5,27 +5,60 @@
<div class="middlebox"> <div class="middlebox">
<div class="contenttitle"> <div class="contenttitle">
收费设置 / 收费设置 /
<span class="contenttitleBold"
>会员卡管理</span
>
<span class="contenttitleBold">会员卡管理</span>
</div> </div>
</div> </div>
<div style="background-color: #fff; padding: 15px; border-radius: 8px;display: flex;flex-wrap: wrap; margin-bottom: 10px;height:80px;margin-top: 7px;">
<div
style="
background-color: #fff;
padding: 15px;
border-radius: 8px;
display: flex;
flex-wrap: wrap;
margin-bottom: 10px;
height: 80px;
margin-top: 7px;
"
>
<div class="query"> <div class="query">
<el-select v-model="query.dateType" placeholder="请选择" filterable size="small"
style="width: 90px" >
<el-select
v-model="query.dateType"
placeholder="请选择"
filterable
size="small"
style="width: 90px"
>
<el-option label="登记日期" value="createDate" /> <el-option label="登记日期" value="createDate" />
<el-option label="有效日期" value="expiryDate" /> <el-option label="有效日期" value="expiryDate" />
</el-select> </el-select>
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" />
<el-date-picker
v-model="query.startDate"
type="date"
placeholder="起始日期"
size="small"
/>
<span>--</span> <span>--</span>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small"/>
<el-date-picker
v-model="query.endDate"
type="date"
placeholder="截止日期"
size="small"
/>
</div> </div>
<div class="query"> <div class="query">
<span>卡类别</span> <span>卡类别</span>
<el-select v-model="query.cardTypeId" placeholder="请选择" clearable size="small"
<el-select
v-model="query.cardTypeId"
placeholder="请选择"
clearable
size="small"
> >
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
<el-option
v-for="item in dict.cardType"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select> </el-select>
</div> </div>
<div class="query"> <div class="query">
@ -36,7 +69,11 @@
<el-radio :label="0">停用</el-radio> <el-radio :label="0">停用</el-radio>
</el-radio-group> </el-radio-group>
--> -->
<el-select v-model="query.isActive" placeholder="请选择" clearable size="small"
<el-select
v-model="query.isActive"
placeholder="请选择"
clearable
size="small"
> >
<el-option label="启用" value="Y" /> <el-option label="启用" value="Y" />
<el-option label="停用" value="N" /> <el-option label="停用" value="N" />
@ -44,35 +81,82 @@
</div> </div>
<div class="query"> <div class="query">
<span>卡号</span> <span>卡号</span>
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 190px"/>
<el-input
placeholder="卡号"
v-model="query.cardNo"
size="small"
clearable
style="width: 190px"
/>
</div> </div>
<div class="query"> <div class="query">
<span>卡主姓名</span> <span>卡主姓名</span>
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 190px"/>
<el-input
placeholder="卡主姓名"
v-model="query.customerName"
size="small"
clearable
style="width: 190px"
/>
</div> </div>
<div class="query"> <div class="query">
<span>身份证号</span> <span>身份证号</span>
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 190px"/>
<el-input
placeholder="身份证号"
v-model="query.idNo"
size="small"
clearable
style="width: 190px"
/>
</div> </div>
<div class="query"> <div class="query">
<span>电话</span> <span>电话</span>
<el-input placeholder="手机号/电话" v-model="query.mobileTelephone" size="small" clearable style="width: 190px" />
<el-input
placeholder="手机号/电话"
v-model="query.mobileTelephone"
size="small"
clearable
style="width: 190px"
/>
</div> </div>
<div class="query"> <div class="query">
<el-button class="commonbutton" @click="btnQuery">查询</el-button> <el-button class="commonbutton" @click="btnQuery">查询</el-button>
</div> </div>
</div> </div>
<div style="background-color: #fff; padding: 15px; border-radius: 8px;margin-bottom: 10px;">
<el-table :data="dataList" width="100%" :height="
<div
style="
background-color: #fff;
padding: 15px;
border-radius: 8px;
margin-bottom: 10px;
"
>
<el-table
:data="dataList"
width="100%"
:height="
window.pageHeight < 600 window.pageHeight < 600
? 210 ? 210
: Math.floor((window.pageHeight - 280) / 2) : Math.floor((window.pageHeight - 280) / 2)
" "
row-key="id" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
row-key="id"
highlight-current-row
ref="dataList"
@selection-change="handleSelectionChange"
@row-click="rowClick"
>
<el-table-column prop="cardTypeId" label="卡类别" width="70"> <el-table-column prop="cardTypeId" label="卡类别" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ dddw(dict.cardType, "id", scope.row.cardTypeId, "displayName") }}</div>
<div>
{{
dddw(
dict.cardType,
"id",
scope.row.cardTypeId,
"displayName"
)
}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cardNo" label="会员卡号" width="150" /> <el-table-column prop="cardNo" label="会员卡号" width="150" />
@ -88,10 +172,14 @@
<el-table-column prop="customerName" label="卡主姓名" width="80" /> <el-table-column prop="customerName" label="卡主姓名" width="80" />
<el-table-column prop="idNo" label="卡主身份证号" width="200" /> <el-table-column prop="idNo" label="卡主身份证号" width="200" />
<el-table-column prop="telephone" label="卡主电话" width="150" /> <el-table-column prop="telephone" label="卡主电话" width="150" />
<el-table-column prop="mobileTelephone" label="卡主手机号" width="150" />
<el-table-column
prop="mobileTelephone"
label="卡主手机号"
width="150"
/>
<el-table-column prop="isActive" label="启用" width="80"> <el-table-column prop="isActive" label="启用" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.isActive == 'N' ? '否' : '是' }}</div>
<div>{{ scope.row.isActive == "N" ? "否" : "是" }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" width="200" /> <el-table-column prop="remark" label="备注" width="200" />
@ -103,32 +191,57 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifierName" label="修改人员" width="100" />
<el-table-column prop="lastModificationTime" label="修改日期" width="150">
<el-table-column
prop="lastModifierName"
label="修改人员"
width="100"
/>
<el-table-column
prop="lastModificationTime"
label="修改日期"
width="150"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.lastModificationTime"> <div v-if="scope.row.lastModificationTime">
{{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
{{
moment(scope.row.lastModificationTime).format("yyyy-MM-DD")
}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="background-color: #fff; padding: 15px; border-radius: 8px;">
<el-table :data="cardBillList" width="100%" :height="
<div style="background-color: #fff; padding: 15px; border-radius: 8px">
<el-table
:data="cardBillList"
width="100%"
:height="
window.pageHeight < 600 window.pageHeight < 600
? 210 ? 210
: Math.floor((window.pageHeight - 300) / 2) : Math.floor((window.pageHeight - 300) / 2)
" row-key="id" highlight-current-row
ref="dataList" @selection-change="handleSelectionChange">
"
row-key="id"
highlight-current-row
ref="dataList"
@selection-change="handleSelectionChange"
>
<el-table-column prop="payModeId" label="支付方式"> <el-table-column prop="payModeId" label="支付方式">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div>
<div>
{{
dddw(dict.payMode, "id", scope.row.payModeId, "displayName")
}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="billMoney" label="记账金额" /> <el-table-column prop="billMoney" label="记账金额" />
<el-table-column prop="billFlag" label="记账标志"> <el-table-column prop="billFlag" label="记账标志">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ dddw(dict.billFlag, "id", scope.row.billFlag, "displayName") }}</div>
<div>
{{
dddw(dict.billFlag, "id", scope.row.billFlag, "displayName")
}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorName" label="创建人员" /> <el-table-column prop="creatorName" label="创建人员" />
@ -140,17 +253,31 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifierName" label="修改人员" /> <el-table-column prop="lastModifierName" label="修改人员" />
<el-table-column prop="lastModificationTime" label="修改日期" width="150">
<el-table-column
prop="lastModificationTime"
label="修改日期"
width="150"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.lastModificationTime"> <div v-if="scope.row.lastModificationTime">
{{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
{{
moment(scope.row.lastModificationTime).format("yyyy-MM-DD")
}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<div style="margin-left: 10px;margin-top: 3%;position: absolute;top: 0;right: 0;">
<div
style="
margin-left: 10px;
margin-top: 3%;
position: absolute;
top: 0;
right: 0;
"
>
<div> <div>
<el-button class="commonbutton" @click="add">新增</el-button> <el-button class="commonbutton" @click="add">新增</el-button>
</div> </div>
@ -169,15 +296,39 @@
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-button class="commonbutton" @click="bntOrder">充值</el-button> <el-button class="commonbutton" @click="bntOrder">充值</el-button>
</div> </div>
<div style="margin-top: 10px">
<el-button class="commonbutton" @click="refund">退费</el-button>
</div>
</div> </div>
</div> </div>
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="820px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small">
<el-dialog
:title="form.id ? '编辑' : '新增'"
:visible.sync="dialogVisible"
width="820px"
:close-on-click-modal="false"
>
<el-form
ref="form"
:model="form"
label-width="100px"
:rules="rules"
size="small"
>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="卡类别" prop="cardTypeId"> <el-form-item label="卡类别" prop="cardTypeId">
<el-select v-model="form.cardTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
<el-select
v-model="form.cardTypeId"
placeholder="请选择"
filterable
@change="category"
>
<el-option
v-for="item in dict.cardType"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -195,7 +346,13 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="有效期限" prop="expiryDate"> <el-form-item label="有效期限" prop="expiryDate">
<el-date-picker v-model="form.expiryDate" type="date" placeholder="有效期限" size="small" :style="'width: ' + Math.floor((820-340)/3) + 'px'" />
<el-date-picker
v-model="form.expiryDate"
type="date"
placeholder="有效期限"
size="small"
:style="'width: ' + Math.floor((820 - 340) / 3) + 'px'"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -230,9 +387,18 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="体检中心" prop="organizationUnitId"> <el-form-item label="体检中心" prop="organizationUnitId">
<el-select v-model="form.organizationUnitId" placeholder="请选择" filterable :disabled="peisid ? true:false" >
<el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
:value="item.id">
<el-select
v-model="form.organizationUnitId"
placeholder="请选择"
filterable
:disabled="peisid ? true : false"
>
<el-option
v-for="item in dict.organization"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -252,8 +418,14 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="创建时间" label-width="80px"> <el-form-item label="创建时间" label-width="80px">
<el-input :value="form.creationTime ? moment(form.creationTime).format('yyyy-MM-DD') : ''"
disabled></el-input>
<el-input
:value="
form.creationTime
? moment(form.creationTime).format('yyyy-MM-DD')
: ''
"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -263,40 +435,147 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="修改时间" label-width="80px"> <el-form-item label="修改时间" label-width="80px">
<el-input :value="form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD') : ''" disabled></el-input>
<el-input
:value="
form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD')
: ''
"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false" class="difference">取消</el-button>
<el-button type="primary" @click="onSubmit('form')" class="commonbutton">确定</el-button>
<el-button @click="dialogVisible = false" class="difference"
>取消</el-button
>
<el-button type="primary" @click="onSubmit('form')" class="commonbutton"
>确定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="会员卡充值" :visible.sync="dialogOrder" width="400px" :close-on-click-modal="false">
<el-form ref="order" :model="order" label-width="100px" :rules="orderRules" size="small">
<el-dialog
title="会员卡充值"
:visible.sync="dialogOrder"
width="400px"
:close-on-click-modal="false"
>
<el-form
ref="order"
:model="order"
label-width="100px"
:rules="orderRules"
size="small"
>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="会员卡号" prop="cardRegisterId"> <el-form-item label="会员卡号" prop="cardRegisterId">
<el-input v-model="order.cardNo" disabled style="width:200px;"/>
<el-input v-model="order.cardNo" disabled style="width: 200px" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="充值方式" prop="payModeId"> <el-form-item label="充值方式" prop="payModeId">
<el-select v-model="order.payModeId" placeholder="请选择" filterable :disabled="order.id ? true:false" style="width:200px;">
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" />
<el-select
v-model="order.payModeId"
placeholder="请选择"
filterable
:disabled="order.id ? true : false"
style="width: 200px"
>
<el-option
v-for="item in dict.payMode"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="充值金额" prop="billMoney">
<el-input
type="number"
v-model="order.billMoney"
:disabled="order.id ? true : false"
style="width: 200px"
/>
</el-form-item>
</el-col>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogOrder = false" class="difference"
>取消</el-button
>
<el-button
type="primary"
@click="orderSubmit('order')"
class="commonbutton"
>确定</el-button
>
</div>
</el-dialog>
<el-dialog
title="会员卡退费"
:visible.sync="refundOrder"
width="400px"
:close-on-click-modal="false"
>
<el-form
ref="refundorder"
:model="refundorder"
label-width="100px"
:rules="refundRules"
size="small"
>
<el-col :span="24">
<el-form-item label="会员卡号" prop="cardRegisterId">
<el-input
v-model="refundorder.cardNo"
disabled
style="width: 200px"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="退费方式" prop="payModeId">
<el-select
v-model="refundorder.payModeId"
placeholder="请选择"
filterable
:disabled="refundorder.id ? true : false"
style="width: 200px"
>
<el-option
v-for="item in dict.payMode"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="充值金额" prop="rechargeAmount">
<el-input type="number" v-model="order.rechargeAmount" :disabled="order.id ? true:false" style="width:200px;"/>
<el-form-item label="退费金额" prop="billMoney">
<el-input
type="number"
v-model="refundorder.billMoney"
:disabled="refundorder.id ? true : false"
style="width: 200px"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogOrder = false" class="difference">取消</el-button>
<el-button type="primary" @click="orderSubmit('order')" class="commonbutton">确定</el-button>
<el-button @click="refundOrder = false" class="difference"
>取消</el-button
>
<el-button
type="primary"
@click="orderSubmit('refundorder')"
class="commonbutton"
>确定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -305,29 +584,31 @@
import moment from "moment"; import moment from "moment";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj,deepCopy } from "@/utlis/proFunc";
import {
dddw,
objCopy,
arrayReduce,
arrayExistObj,
deepCopy,
} from "@/utlis/proFunc";
export default { export default {
components: {
},
components: {},
data() { data() {
return { return {
peisid: null, peisid: null,
query: { query: {
dateType: 'createDate',
cardModeId: '',
dateType: "createDate",
cardModeId: "",
cardTypeId: null, cardTypeId: null,
cardNo:'',
customerName:'',
isActive:'',
startDate:'',
endDate:'',
mobileTelephone:'',
cardNo: "",
customerName: "",
isActive: "",
startDate: "",
endDate: "",
mobileTelephone: "",
}, // }, //
dataList: [], // dataList: [], //
cardBillList: [], // cardBillList: [], //
multipleSelection: [], // multipleSelection: [], //
@ -335,36 +616,42 @@ export default {
form: { form: {
id: null, id: null,
cardTypeId: null, cardTypeId: null,
cardNo: '',
cardNo: "",
discount: 100, discount: 100,
expiryDate: null, expiryDate: null,
customerName: '',
idNo: '',
telephone: '',
mobileTelephone: '',
isActive: 'N',
remark: '',
customerName: "",
idNo: "",
telephone: "",
mobileTelephone: "",
isActive: "N",
remark: "",
organizationUnitId: null, organizationUnitId: null,
}, },
formInit: {}, formInit: {},
dialogOrder: false, dialogOrder: false,
refundOrder: false,
order: { order: {
id:'',
id: "",
cardRegisterId: null, cardRegisterId: null,
cardNo:'', //
payModeId:'',
rechargeAmount:0,
billFlag:'2',
cardNo: "", //
payModeId: "",
billMoney: null,
billFlag: "0",
},
refundorder: {
id: "",
cardRegisterId: null,
cardNo: "", //
payModeId: "",
billMoney: null,
billFlag: "2",
}, },
rules: { rules: {
cardTypeId: [ cardTypeId: [
{ required: true, message: "请填写卡类别", trigger: "blur" }, { required: true, message: "请填写卡类别", trigger: "blur" },
], ],
cardNo: [
{ required: true, message: "请填写卡号", trigger: "blur" },
],
cardNo: [{ required: true, message: "请填写卡号", trigger: "blur" }],
discount: [ discount: [
{ required: true, message: "请填写卡折扣", trigger: "blur" }, { required: true, message: "请填写卡折扣", trigger: "blur" },
], ],
@ -395,18 +682,29 @@ export default {
payModeId: [ payModeId: [
{ required: true, message: "请填写充值方式", trigger: "blur" }, { required: true, message: "请填写充值方式", trigger: "blur" },
], ],
rechargeAmount: [
billMoney: [
{ required: true, message: "请填写充值金额", trigger: "blur" }, { required: true, message: "请填写充值金额", trigger: "blur" },
], ],
}, },
refundRules: {
cardRegisterId: [
{ required: true, message: "请填写会员卡", trigger: "blur" },
],
payModeId: [
{ required: true, message: "请填写退费方式", trigger: "blur" },
],
billMoney: [
{ required: true, message: "请填写退费金额", trigger: "blur" },
],
},
curChoosedRow: {}, // curChoosedRow: {}, //
curChoosedId:'', //ID
curChoosedId: "", //ID
}; };
}, },
created() { created() {
this.peisid = window.sessionStorage.getItem('peisid');
this.peisid = window.sessionStorage.getItem("peisid");
if (!this.form.id) { if (!this.form.id) {
this.form.organizationUnitId = this.peisid; this.form.organizationUnitId = this.peisid;
} }
@ -425,14 +723,15 @@ export default {
}, },
methods: { methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
dddw,
moment,
// //
dictInit() { dictInit() {
// //
getapi('/api/app/cardtype/getcardtypelist')
.then((res) => {
getapi("/api/app/cardtype/getcardtypelist").then((res) => {
if (res.code != -1) { if (res.code != -1) {
console.log(res.data);
this.dict.cardType = res.data; this.dict.cardType = res.data;
} }
}); });
@ -452,7 +751,6 @@ export default {
this.dict.payMode = res.data; this.dict.payMode = res.data;
} }
}); });
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
@ -467,13 +765,28 @@ export default {
// //
getCardBill(cardId) { getCardBill(cardId) {
postapi(`/api/app/cardbill/getcardbilllistincardregisterid?CardRegisterId=${cardId}`).then(res =>{
postapi(
`/api/app/cardbill/getcardbilllistincardregisterid?CardRegisterId=${cardId}`
).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.cardBillList = res.data; this.cardBillList = res.data;
} }
}); });
}, },
category(e) {
if (!this.form.id) {
this.dict.cardType.forEach((item) => {
if (item.id == e) {
console.log(item);
this.form.discount = item.discount;
this.form.expiryDate = moment()
.subtract(-item.expiryDay, "days")
.format("YYYY-MM-DD");
// this.form.expiryDate=item.expiryDay
}
});
}
},
add() { add() {
this.form = deepCopy(this.formInit); this.form = deepCopy(this.formInit);
this.dialogVisible = true; this.dialogVisible = true;
@ -493,15 +806,15 @@ export default {
return; return;
} }
postapi(`/api/app/cardregister/updateactive?id=${this.curChoosedId}`, { postapi(`/api/app/cardregister/updateactive?id=${this.curChoosedId}`, {
"isActive": "Y"
}).then(res =>{
isActive: "Y",
}).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.dataList.forEach(item=>{
this.dataList.forEach((item) => {
if (item.id == this.curChoosedId) { if (item.id == this.curChoosedId) {
item.isActive="Y"
item.isActive = "Y";
} }
})
this.$message.success('操作成功!')
});
this.$message.success("操作成功!");
} }
}); });
}, },
@ -511,15 +824,15 @@ export default {
return; return;
} }
postapi(`/api/app/cardregister/updateactive?id=${this.curChoosedId}`, { postapi(`/api/app/cardregister/updateactive?id=${this.curChoosedId}`, {
"isActive": "N"
}).then(res =>{
isActive: "N",
}).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.dataList.forEach(item=>{
this.dataList.forEach((item) => {
if (item.id == this.curChoosedId) { if (item.id == this.curChoosedId) {
item.isActive="N"
item.isActive = "N";
} }
})
this.$message.success('操作成功!')
});
this.$message.success("操作成功!");
} }
}); });
}, },
@ -535,73 +848,99 @@ export default {
cancelButtonText: "否", cancelButtonText: "否",
type: "warning", type: "warning",
cancelButtonClass: "difference", cancelButtonClass: "difference",
confirmButtonClass:"commonbutton"
}).then(() => {
confirmButtonClass: "commonbutton",
})
.then(() => {
//console.log('{patientRegisterIds}',{patientRegisterIds}) //console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi(`/api/app/cardregister/delete?id=${this.curChoosedId}`);
}).then(res =>{
return postapi(
`/api/app/cardregister/delete?id=${this.curChoosedId}`
);
})
.then((res) => {
if (res.code != -1) { if (res.code != -1) {
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedId);
lfind = arrayExistObj(this.dataList, "id", this.curChoosedId);
if (lfind > -1) this.dataList.splice(lfind, 1); if (lfind > -1) this.dataList.splice(lfind, 1);
this.curChoosedId = null; this.curChoosedId = null;
this.$message.success('操作成功!')
this.$message.success("操作成功!");
} }
}); });
}, },
refund() {
if (!this.curChoosedId) {
this.$message.warning("请先选择要充值的会员卡!");
return;
}
this.refundorder = {
id: "",
cardRegisterId: this.curChoosedId,
cardNo: this.curChoosedRow.cardNo,
payModeId: "",
billMoney: null,
billFlag: "2",
};
this.refundOrder = true;
},
bntOrder() { bntOrder() {
if (!this.curChoosedId) { if (!this.curChoosedId) {
this.$message.warning("请先选择要充值的会员卡!"); this.$message.warning("请先选择要充值的会员卡!");
return; return;
} }
this.order = { this.order = {
id:'',
id: "",
cardRegisterId: this.curChoosedId, cardRegisterId: this.curChoosedId,
cardNo: this.curChoosedRow.cardNo, cardNo: this.curChoosedRow.cardNo,
payModeId:'',
billMoney:0,
billFlag:'2',
payModeId: "",
billMoney: null,
billFlag: "0",
}; };
this.dialogOrder = true; this.dialogOrder = true;
}, },
// //
orderSubmit(formName) { orderSubmit(formName) {
let body = {},lfind=-1;
let body = {},
lfind = -1;
this.$refs[formName].validate((valid, fields) => { this.$refs[formName].validate((valid, fields) => {
if (!valid) { if (!valid) {
//console.log('fields',fields,Object.keys(fields)); //console.log('fields',fields,Object.keys(fields));
this.$message.error(fields[Object.keys(fields)[0]][0].message); this.$message.error(fields[Object.keys(fields)[0]][0].message);
return; return;
} }
if (formName === "refundorder") {
body = deepCopy(this.refundorder);
body.billMoney = -body.billMoney;
} else if (formName === "order") {
body = deepCopy(this.order); body = deepCopy(this.order);
}
delete body.id; delete body.id;
delete body.cardNo; delete body.cardNo;
//delete body.billFlag; //delete body.billFlag;
// /api/app/cardregister/cardregisterrecharge // /api/app/cardregister/cardregisterrecharge
postapi('/api/app/cardregister/cardregisterrecharge',body).then(res =>{
postapi("/api/app/cardregister/addcardbill", body).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.getCardBill(this.curChoosedId); this.getCardBill(this.curChoosedId);
this.dialogOrder = false; this.dialogOrder = false;
this.dataList.forEach(item=>{
this.refundOrder = false;
this.dataList.forEach((item) => {
if (item.id == this.curChoosedId) { if (item.id == this.curChoosedId) {
item.cardBalance+=Number(this.order.rechargeAmount)
if (formName === "refundorder") {
item.cardBalance -= Number(this.refundorder.billMoney);
} else if (formName === "order") {
item.cardBalance += Number(this.order.billMoney);
} }
})
this.$message.success('操作成功!')
} }
}); });
this.$message.success("操作成功!");
}
});
}); });
}, },
// //
onSubmit(formName) { onSubmit(formName) {
let body = {},lfind=-1;
let body = {},
lfind = -1;
this.$refs[formName].validate((valid, fields) => { this.$refs[formName].validate((valid, fields) => {
if (!valid) { if (!valid) {
//console.log('fields',fields,Object.keys(fields)); //console.log('fields',fields,Object.keys(fields));
@ -624,43 +963,44 @@ export default {
// } // }
body = deepCopy(this.form); body = deepCopy(this.form);
delete body.id; delete body.id;
body.expiryDate = moment(this.form.expiryDate).format('yyyy-MM-DD');
body.expiryDate = moment(this.form.expiryDate).format("yyyy-MM-DD");
// //
if (this.form.id) { if (this.form.id) {
postapi(`/api/app/cardregister/update?id=${this.form.id}`,body).then(res =>{
postapi(`/api/app/cardregister/update?id=${this.form.id}`, body).then(
(res) => {
if (res.code != -1) { if (res.code != -1) {
lfind = arrayExistObj(this.dataList,'id',this.form.id);
lfind = arrayExistObj(this.dataList, "id", this.form.id);
if (lfind > -1) objCopy(this.form, this.dataList[lfind]); if (lfind > -1) objCopy(this.form, this.dataList[lfind]);
this.dialogVisible=false
this.$message.success('操作成功!')
this.dialogVisible = false;
this.$message.success("操作成功!");
} }
});
}
);
} else { } else {
// //
postapi('/api/app/cardregister/create',body).then(res =>{
postapi("/api/app/cardregister/create", body).then((res) => {
if (res.code != -1) { if (res.code != -1) {
objCopy(res.data, this.form); objCopy(res.data, this.form);
this.dataList.push(deepCopy(this.form)); this.dataList.push(deepCopy(this.form));
this.dialogVisible=false
this.$message.success('操作成功!')
this.dialogVisible = false;
this.$message.success("操作成功!");
} }
}); });
} }
}); });
}, },
// //
btnQuery(queryType) { btnQuery(queryType) {
let body = {}
let body = {};
switch (queryType) { switch (queryType) {
case 'idNo':
case "idNo":
if (!this.query.idNo) return; if (!this.query.idNo) return;
body = { idNo: this.query.idNo }; body = { idNo: this.query.idNo };
break; break;
case 'cardNo':
case "cardNo":
if (!this.query.cardNo) return; if (!this.query.cardNo) return;
body = { cardNo: this.query.cardNo }; body = { cardNo: this.query.cardNo };
break; break;
@ -676,14 +1016,16 @@ export default {
this.$message.error("数据不合法,起始日期不能大于截止日期!"); this.$message.error("数据不合法,起始日期不能大于截止日期!");
return; return;
} }
body.startDate = moment(this.query.startDate).format('yyyy-MM-DD');
body.endDate = moment(this.query.endDate).format('yyyy-MM-DD');
body.startDate = moment(this.query.startDate).format("yyyy-MM-DD");
body.endDate = moment(this.query.endDate).format("yyyy-MM-DD");
if (this.query.cardModeId) body.cardModeId = this.query.cardModeId; if (this.query.cardModeId) body.cardModeId = this.query.cardModeId;
if (this.query.cardTypeId) body.cardTypeId = this.query.cardTypeId; if (this.query.cardTypeId) body.cardTypeId = this.query.cardTypeId;
if(this.query.customerName) body.customerName = this.query.customerName;
if (this.query.customerName)
body.customerName = this.query.customerName;
if (this.query.isActive) body.isActive = this.query.isActive; if (this.query.isActive) body.isActive = this.query.isActive;
if(this.query.mobileTelephone) body.mobileTelephone = this.query.mobileTelephone;
if (this.query.mobileTelephone)
body.mobileTelephone = this.query.mobileTelephone;
} }
break; break;
} }
@ -698,8 +1040,7 @@ export default {
// "endDate": "string" // "endDate": "string"
// } // }
postapi('/api/app/cardregister/getcardregisterlist', body)
.then((res) => {
postapi("/api/app/cardregister/getcardregisterlist", body).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.dataList = res.data; this.dataList = res.data;
} }
@ -716,7 +1057,6 @@ export default {
this.query(); this.query();
} }
}, },
}, },
}; };
</script> </script>
@ -733,7 +1073,7 @@ export default {
padding-right: 25px; padding-right: 25px;
} }
::v-deep .el-icon-date:before { ::v-deep .el-icon-date:before {
content: ""
content: "";
} }
.query { .query {
margin-right: 25px; margin-right: 25px;

9
src/views/login/Login.vue

@ -238,4 +238,13 @@ export default {
height: 40px; height: 40px;
width: 100%; width: 100%;
} }
:deep .el-input--prefix .el-input__inner {
padding-left: 30px;
}
:deep .el-form-item {
margin-bottom: 22px;
}
:deep .el-button{
color: #fff;
}
</style> </style>
Loading…
Cancel
Save