Browse Source

sample

master
pengjun 2 years ago
parent
commit
098b095c58
  1. 4
      src/components/customerOrg/customerOrgGroupAsbitem.vue
  2. 4
      src/views/charge/charge.vue
  3. 127
      src/views/common-settings/SampleGroup.vue
  4. 16
      src/views/fee-settings/PayMode.vue

4
src/components/customerOrg/customerOrgGroupAsbitem.vue

@ -13,7 +13,7 @@
<div class="box"> <div class="box">
<el-table :data="dict.asbItem" border size="small" highlight-current-row <el-table :data="dict.asbItem" border size="small" highlight-current-row
:height="window.pageHeight < 668 ? 200:(window.pageHeight - 110 - 358)" :height="window.pageHeight < 668 ? 200:(window.pageHeight - 110 - 358)"
@row-dblclick="dbClickChoosedAsb"
@row-dblclick="dbClickChoosedAsb" row-key="id"
@selection-change="handleSelectionChange" :row-class-name="handleRowClassName" @selection-change="handleSelectionChange" :row-class-name="handleRowClassName"
@row-click="chooseAsbItem"> @row-click="chooseAsbItem">
<!-- <!--
@ -60,7 +60,7 @@
</div> </div>
<div class="box"> <div class="box">
<el-table :data="customerOrgGroupAsbitems" border size="small" <el-table :data="customerOrgGroupAsbitems" border size="small"
@selection-change="selecteditems" highlight-current-row :key="id"
@selection-change="selecteditems" highlight-current-row
:height="window.pageHeight < 668 ? 200:(window.pageHeight - 110 - 358)" :height="window.pageHeight < 668 ? 200:(window.pageHeight - 110 - 358)"
:summary-method="getSummaries" show-summary :summary-method="getSummaries" show-summary
:row-class-name="handleRowClassName" @row-dblclick="removeAbs" :row-class-name="handleRowClassName" @row-dblclick="removeAbs"

4
src/views/charge/charge.vue

@ -1131,8 +1131,8 @@ export default {
} }
}); });
//
getapi("/api/app/pay-mode").then((res) => {
// /api/app/pay-mode()
getapi("/api/app/paymode/getlistinisactive").then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.dict.payMode = res.data; this.dict.payMode = res.data;
// //

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

@ -5,11 +5,9 @@
<div style="display: flex;"> <div style="display: flex;">
<div> <div>
<div :style="'width:' + (window.pageWidth < 750 ? 595: window.pageWidth - 45 - 110) +'px;'"> <div :style="'width:' + (window.pageWidth < 750 ? 595: window.pageWidth - 45 - 110) +'px;'">
<el-table :data="tableData"
<el-table :data="tableData" row-key="id"
width="100%" border width="100%" border
height="240px" height="240px"
v-loading="loading"
row-key="id"
class="el-table__body-wrapper tbody" class="el-table__body-wrapper tbody"
border:stripe="true" border:stripe="true"
@row-click="rowick" @row-click="rowick"
@ -67,7 +65,6 @@
<el-table :data="dict.asbItem" <el-table :data="dict.asbItem"
width="160" border width="160" border
:height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45" :height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45"
row-key="id"
highlight-current-row highlight-current-row
@row-dblclick="dbClickChoosedAsb" @row-dblclick="dbClickChoosedAsb"
@selection-change="handleSelectionChange" :row-class-name="handleRowClassName" @selection-change="handleSelectionChange" :row-class-name="handleRowClassName"
@ -111,9 +108,9 @@
<el-table :data="sampleGroupAsbitems" <el-table :data="sampleGroupAsbitems"
width="160" border width="160" border
:height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45" :height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45"
row-key="id"
highlight-current-row
>
@selection-change="selecteditems" highlight-current-row
:row-class-name="handleRowClassName" @row-dblclick="removeAbs"
@row-click="removeAsbItem">
<el-table-column prop="displayName" label="已选组合项目" /> <el-table-column prop="displayName" label="已选组合项目" />
</el-table> </el-table>
</div> </div>
@ -256,8 +253,9 @@ import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "
export default { export default {
data() { data() {
return { return {
itemTypeIds:[], //
asbItemId:'', //ID asbItemId:'', //ID
quickAsb:[], //
rules: { rules: {
displayName: [ displayName: [
{ required: true, message: "请输入活动名称", trigger: "blur" }, { required: true, message: "请输入活动名称", trigger: "blur" },
@ -399,8 +397,9 @@ export default {
getAsbItemByItemType() { getAsbItemByItemType() {
this.getAsbItemByItemTypeAll() this.getAsbItemByItemTypeAll()
// //
arrayReduce(this.dict.asbItem, [...this.sampleGroupAsbitems], "id=asbitemId");
arrayReduce(this.dict.asbItemQuick, [...this.sampleGroupAsbitems], "id=asbitemId");
arrayReduce(this.dict.asbItem, [...this.sampleGroupAsbitems], "id=id");
arrayReduce(this.dict.asbItemQuick, [...this.sampleGroupAsbitems], "id=id");
this.quickAsb = deepCopy(this.dict.asbItemQuick)
}, },
// //
@ -425,14 +424,12 @@ export default {
async addAbs(asbItemChoosed,oprType) { async addAbs(asbItemChoosed,oprType) {
// console.log('this.customerOrgGroup',this.customerOrgGroup) // console.log('this.customerOrgGroup',this.customerOrgGroup)
// console.log('asbItemChoosed', asbItemChoosed) // console.log('asbItemChoosed', asbItemChoosed)
if(!this.customerOrgGroup.id){
this.$message.warning("请先选中单位分组")
return
}
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){
this.$message.warning("体检次数已完成,不允许操作")
if(!this.form.id){
this.$message.warning("请先选中条码分组")
return return
} }
let message = [] let message = []
let checked = true let checked = true
let lfind = -1 let lfind = -1
@ -457,28 +454,9 @@ export default {
return return
} }
//
// "displayName": "",
// "shortName": "f",
// "forSexId": "F",
// "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
// "price": 0,
// for (let i = 0; i < asbItemChoosed.length; i++) {
// if (this.customerOrgGroup.forSexId == 'A') break //
// if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue
// if (asbItemChoosed[i].forSexId != this.customerOrgGroup.sexId) {
// this.$message.warning(`${asbItemChoosed[i].displayName}`)
// checked = false
// break
// }
// }
// //console.log(222,checked)
// if (!checked) return
// //
arrayReduce(asbItemChoosed, this.sampleGroupAsbitems, "id=asbitemId")
arrayReduce(asbItemChoosed, this.sampleGroupAsbitems, "id=id")
/*
for (let i = asbItemChoosed.length - 1; i > - 1; i--) { for (let i = asbItemChoosed.length - 1; i > - 1; i--) {
if (this.customerOrgGroup.forSexId == 'A') break // if (this.customerOrgGroup.forSexId == 'A') break //
if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue
@ -490,30 +468,17 @@ export default {
} }
//console.log(222,checked) //console.log(222,checked)
if (!checked) this.$message.warning(`所选项目【${JSON.stringify(message)}】不适合当前人员性别`) if (!checked) this.$message.warning(`所选项目【${JSON.stringify(message)}】不适合当前人员性别`)
*/
for (let i = 0; i < asbItemChoosed.length; i++) {
let pojo = {
asbitemId: asbItemChoosed[i].id,
displayName:asbItemChoosed[i].displayName,
discount:100,
customerOrgGroupDetailAmount:1,
price:asbItemChoosed[i].price,
customerOrgGroupDetailPrice:asbItemChoosed[i].price,
customerOrgGroupDetailMoney: asbItemChoosed[i].price,
asbitemMoney: asbItemChoosed[i].price,
}
asbItemChoosed.forEach(e =>{
this.sampleGroupAsbitems.push(deepCopy(e))
})
this.sampleGroupAsbitems.push(pojo)
//this.sampleGroupAsbitems.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName })
//
this.getAsbItemByItemType()
lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItem.splice(lfind, 1)
lfind = arrayExistObj(this.dict.asbItemQuick, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItemQuick.splice(lfind, 1)
}
}, },
@ -597,14 +562,10 @@ export default {
// //
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6 ///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6
delAbs(absForDel,oprType) { delAbs(absForDel,oprType) {
if(!this.customerOrgGroup.id){
if(!this.form.id){
this.$message.warning("请先选中单位分组") this.$message.warning("请先选中单位分组")
return return
} }
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){
this.$message.warning("体检次数已完成,不允许操作")
return
}
let lfind = -1 let lfind = -1
@ -630,7 +591,7 @@ export default {
for (let i = 0; i < absForDel.length; i++) { for (let i = 0; i < absForDel.length; i++) {
lfind = arrayExistObj(this.sampleGroupAsbitems, 'asbitemId', absForDel[i].asbitemId)
lfind = arrayExistObj(this.sampleGroupAsbitems, 'id', absForDel[i].id)
if (lfind > -1) this.sampleGroupAsbitems.splice(lfind, 1) if (lfind > -1) this.sampleGroupAsbitems.splice(lfind, 1)
absForDel.splice(i, 1) absForDel.splice(i, 1)
@ -707,35 +668,28 @@ export default {
// console.log(v); // console.log(v);
}, },
saveAsb() { saveAsb() {
if(!this.form.id){
this.$message.warning("请选择要操作的分组!")
return
}
let details = []
let sampleGroupId = this.form.id; let sampleGroupId = this.form.id;
console.log(this.form.id);
console.log(this.sampleGroupAsbitems);
let sdate = [];
this.sampleGroupAsbitems.forEach((element) => {
let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
sdate.push(sss);
});
this.dict.asbItem.forEach((element) => {
let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
sdate.push(sss);
});
console.log(sdate);
if (sampleGroupId == undefined) {
this.$message.warning("请选择列表");
} else {
// batchcreaion(sdate).then((res) => {
// if (res.code == 0) {
// this.$message.success("");
// }
// this.isdislob = true;
// });
}
// url: "/api/app/sample-group-detail/many",
// method: "post",
this.sampleGroupAsbitems.forEach((e) => {
details.push({
sampleGroupId,
asbitemId:e.id
});
});
let body = { sampleGroupId, details }
postapi('/api/app/samplegroupdetail/createsamplegroupdetail',body).then(res =>{
if(res.code != -1){
this.$message.success("操作成功!");
}
})
}, },
// //
@ -979,6 +933,7 @@ export default {
}) })
}, },
getlist() { getlist() {
this.loading = true; this.loading = true;
groupinglist(this.pages).then((res) => { groupinglist(this.pages).then((res) => {

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

@ -4,7 +4,7 @@
<el-card> <el-card>
<div class="publiccss">支付方式</div> <div class="publiccss">支付方式</div>
<el-table <el-table
:data="tableData"
:data="tableData" border
style="width: 100%; height: 500px; margin-top: 20px" style="width: 100%; height: 500px; margin-top: 20px"
row-key="id" row-key="id"
:height="tableHeight" :height="tableHeight"
@ -12,13 +12,15 @@
@row-click="rowick" @row-click="rowick"
highlight-current-row highlight-current-row
> >
<el-table-column prop="id" label="编号" width="300">
</el-table-column>
<el-table-column prop="displayName" label="名称" width="300">
</el-table-column>
<el-table-column prop="simpleCode" label="快捷码" width="300">
<el-table-column prop="id" label="编号" min-width="80" align="center"/>
<el-table-column prop="displayName" label="名称" min-width="80" align="center"/>
<el-table-column prop="simpleCode" label="快捷码" min-width="80" align="center"/>
<el-table-column prop="isActive" label="启用" min-width="80" align="center">
<template slot-scope="scope">
<div>{{ scope.row.isActive == 'Y' ? '是':'否'}}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" align="center">
<template> <template>
<el-tag <el-tag
class="move" class="move"

Loading…
Cancel
Save