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. 141
      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">
<el-table :data="dict.asbItem" border size="small" highlight-current-row
: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"
@row-click="chooseAsbItem">
<!--
@ -60,7 +60,7 @@
</div>
<div class="box">
<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)"
:summary-method="getSummaries" show-summary
: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) {
this.dict.payMode = res.data;
//

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

@ -5,11 +5,9 @@
<div style="display: flex;">
<div>
<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
height="240px"
v-loading="loading"
row-key="id"
class="el-table__body-wrapper tbody"
border:stripe="true"
@row-click="rowick"
@ -66,8 +64,7 @@
<div class="box">
<el-table :data="dict.asbItem"
width="160" border
:height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45"
row-key="id"
:height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45"
highlight-current-row
@row-dblclick="dbClickChoosedAsb"
@selection-change="handleSelectionChange" :row-class-name="handleRowClassName"
@ -110,10 +107,10 @@
<div class="box">
<el-table :data="sampleGroupAsbitems"
width="160" border
:height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45"
row-key="id"
highlight-current-row
>
:height="window.pageHeight < 600 ? 165:window.pageHeight - 150 - 240 - 45"
@selection-change="selecteditems" highlight-current-row
:row-class-name="handleRowClassName" @row-dblclick="removeAbs"
@row-click="removeAsbItem">
<el-table-column prop="displayName" label="已选组合项目" />
</el-table>
</div>
@ -256,8 +253,9 @@ import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "
export default {
data() {
return {
itemTypeIds:[], //
asbItemId:'', //ID
quickAsb:[], //
rules: {
displayName: [
{ required: true, message: "请输入活动名称", trigger: "blur" },
@ -397,10 +395,11 @@ export default {
//
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,20 +424,18 @@ export default {
async addAbs(asbItemChoosed,oprType) {
// console.log('this.customerOrgGroup',this.customerOrgGroup)
// 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
}
let message = []
let checked = true
let lfind = -1
//oprType
// start
// start
if(oprType && oprType == 'all'){
asbItemChoosed = deepCopy(this.dict.asbItem)
}else if(oprType && oprType == 'choosed'){
@ -457,28 +454,9 @@ export default {
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--) {
if (this.customerOrgGroup.forSexId == 'A') break //
if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue
@ -490,30 +468,17 @@ export default {
}
//console.log(222,checked)
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 })
lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItem.splice(lfind, 1)
//
this.getAsbItemByItemType()
lfind = arrayExistObj(this.dict.asbItemQuick, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItemQuick.splice(lfind, 1)
}
},
@ -597,15 +562,11 @@ export default {
//
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6
delAbs(absForDel,oprType) {
if(!this.customerOrgGroup.id){
if(!this.form.id){
this.$message.warning("请先选中单位分组")
return
}
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){
this.$message.warning("体检次数已完成,不允许操作")
return
}
let lfind = -1
@ -630,7 +591,7 @@ export default {
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)
absForDel.splice(i, 1)
@ -707,35 +668,28 @@ export default {
// console.log(v);
},
saveAsb() {
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;
// });
if(!this.form.id){
this.$message.warning("请选择要操作的分组!")
return
}
let details = []
let sampleGroupId = this.form.id;
// 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() {
this.loading = true;
groupinglist(this.pages).then((res) => {

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

@ -4,7 +4,7 @@
<el-card>
<div class="publiccss">支付方式</div>
<el-table
:data="tableData"
:data="tableData" border
style="width: 100%; height: 500px; margin-top: 20px"
row-key="id"
:height="tableHeight"
@ -12,13 +12,15 @@
@row-click="rowick"
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 label="操作">
<el-table-column label="操作" align="center">
<template>
<el-tag
class="move"

Loading…
Cancel
Save