소스 검색

医院管理列表

xiaohaizhao 2 달 전
부모
커밋
5a06ae9617

+ 17 - 2
components/Yl_Filtrate1/index.js

@@ -72,7 +72,7 @@ Component({
         startdate: "", //开始时间
         enddate: "", //结束时间
         periodstart: "",
-        periodend: "",
+        periodend: ""
     },
     observers: {
         "show"(newVal) {
@@ -128,10 +128,25 @@ Component({
             if (arrIndex == -1) {
                 list[index].index.push(i)
                 list[index].value.push(list[index].selectKey ? item[list[index].selectKey] : item)
+                if (item.mutextags.length) {
+                    try {
+                        list[index].ops[item.tag] = item.mutextags;
+                    } catch (error) {
+                        list[index].ops = {};
+                        list[index].ops[item.tag] = item.mutextags;
+                    }
+                }
             } else {
                 list[index].index.splice(arrIndex, 1)
                 list[index].value.splice(arrIndex, 1)
+                if (item.mutextags.length) {
+                    delete list[index].ops[item.tag]
+                }
             };
+            list[index].disableds = [];
+            for (const key in list[index].ops) {
+                list[index].disableds = list[index].disableds.concat(list[index].ops[key].map(v => v.tag))
+            }
             this.setData({
                 list
             })
@@ -219,7 +234,7 @@ Component({
             })
         },
         setTimeCycle(startdate = "", enddate = "") {
-            console.log(startdate,enddate)
+            console.log(startdate, enddate)
             if (typeof startdate == 'object') {
                 startdate = formatTime(startdate, '-').split(' ')[0]
             }

+ 3 - 1
components/Yl_Filtrate1/index.wxml

@@ -12,7 +12,9 @@
                     <van-button custom-class='but {{item.index==i?"active":""}}' wx:for="{{item.list}}" wx:for-item="data" wx:for-index="i" wx:key="i" data-item="{{data}}" data-index="{{index}}" data-i="{{i}}" bindtap="onSelect">{{language[data[item.showName]]||data[item.showName]}}</van-button>
                 </view>
                 <view wx:else class="{{rule?'content':'content1'}}">
-                    <van-button custom-class='but {{per.query(item.index,i)?"active":""}}' wx:for="{{item.list}}" wx:for-item="data" wx:for-index="i" wx:key="i" data-item="{{data}}" data-index="{{index}}" data-i="{{i}}" bindtap="onSelectCheckbox">{{language[data[item.showName]]||data[item.showName]}}</van-button>
+                    <van-button disabled="{{per.query(item.disableds,data[item.showName])}}" custom-class='but {{per.query(item.index,i)?"active":""}}' wx:for="{{item.list}}" wx:for-item="data" wx:for-index="i" wx:key="i" data-item="{{data}}" data-index="{{index}}" data-i="{{i}}" bindtap="{{per.query(item.disableds,data[item.showName])?'':'onSelectCheckbox'}}">
+                        {{language[data[item.showName]]||data[item.showName]}}
+                    </van-button>
                 </view>
             </view>
         </block>

+ 3 - 3
components/Yl_Filtrate1/modules/multilevelClass.js

@@ -37,10 +37,10 @@ Component({
                 getApp().globalData.temporaryId = this.data.item.selectKey ? item[this.data.item.selectKey] : JSON.parse(JSON.stringify(item));
                 this.setData({
                     "item.index": i,
-                    childClass: item.subdep.length ? {
+                    childClass: item.subarea.length ? {
                         index: null,
-                        label: item.itemclassname ? item.itemclassname + getApp().globalData.Language.getMapText('的下级分类') : item.depname + getApp().globalData.Language.getMapText('的下级部门'),
-                        list: item.subdep,
+                        label: item.itemclassname ? item.itemclassname + getApp().globalData.Language.getMapText('的下级分类') : item.areaname + getApp().globalData.Language.getMapText('的下级区域'),
+                        list: item.subarea,
                         selectKey: this.data.item.selectKey,
                         showName: this.data.item.showName,
                         type: this.data.item.type,

+ 2 - 2
components/organization/index.js

@@ -140,7 +140,7 @@ Component({
                 index
             } = e.currentTarget.dataset;
             let depGroud = this.data.depGroud.slice(0, index + 1);
-            depGroud[index].active = item.departmentid;
+            depGroud[index].active = item.sa_saleareaid;
             if (item.subdep.length) {
                 item.subdep.unshift(JSON.parse(JSON.stringify(item)))
                 item.subdep[0].depname = getApp().globalData.Language.getMapText('全部');
@@ -148,7 +148,7 @@ Component({
                 depGroud.push({
                     label: item.depname + getApp().globalData.Language.getMapText('下级部门'),
                     list: item.subdep,
-                    active: item.departmentid
+                    active: item.sa_saleareaid
                 })
             }
             item.name = item.depname

+ 1 - 1
components/organization/index.wxml

@@ -9,7 +9,7 @@
         </view>
     </view>
     <view class="content">
-        <van-button custom-class='but {{data.departmentid == item.active?" active":" "}}' wx:for="{{item.list}}" wx:for-item="data" wx:for-index="i" wx:key="i" data-item="{{data}}" data-index="{{index}}" data-i="{{i}}" bindtap="selectDep">{{data.depname}}</van-button>
+        <van-button custom-class='but {{data.sa_saleareaid == item.active?" active":" "}}' wx:for="{{item.list}}" wx:for-item="data" wx:for-index="i" wx:key="i" data-item="{{data}}" data-index="{{index}}" data-i="{{i}}" bindtap="selectDep">{{data.depname}}</van-button>
     </view>
 </view>
 <!-- 人员筛选 -->

+ 2 - 2
packageA/achievement/index.js

@@ -112,7 +112,7 @@ Page({
     const getData = (dataType) => {
       let active = this.data.active;
       let type = active.userid ? 0 : 1,
-        dataid = type == 0 ? active.userid : active.departmentid,
+        dataid = type == 0 ? active.userid : active.sa_saleareaid,
         where = {
           isleave: active.isleave
         };
@@ -314,7 +314,7 @@ Page({
     const model = this.selectComponent("#model" + dropdownItem);
     if (!model) return;
     const active = this.data.active;
-    model.init(active.departmentid ? '1' : '0', active.departmentid || active.userid);
+    model.init(active.sa_saleareaid ? '1' : '0', active.sa_saleareaid || active.userid);
   },
   onReady() {
     this.selectComponent("#ListBox").setHeight(".head", this);

+ 4 - 4
packageA/finishforecast/detail.js

@@ -21,7 +21,7 @@ Page({
         }],
         "content": {
             "type": 1,
-            "dataid": wx.getStorageSync('userMsg').departmentid,
+            "dataid": wx.getStorageSync('userMsg').sa_saleareaid,
             "baseonproject": 1,
             "title": ""
         },
@@ -86,7 +86,7 @@ Page({
         if (detail) this.setData({
             active: null,
             "content.type": 1,
-            "content.dataid": wx.getStorageSync('userMsg').departmentid,
+            "content.dataid": wx.getStorageSync('userMsg').sa_saleareaid,
         });
         this.selectComponent("#organization").initDepAndUser();
         this.getRests();
@@ -113,14 +113,14 @@ Page({
             this.selectComponent("#organization").initDepAndUser()
             this.setData({
                 active: null,
-                "content.dataid": wx.getStorageSync('userMsg').departmentid,
+                "content.dataid": wx.getStorageSync('userMsg').sa_saleareaid,
                 'content.type': 1,
                 isonlydep: false
             })
         } else {
             let active = this.selectComponent("#organization").data.result;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 active,
                 'content.dataid': dataid,

+ 4 - 4
packageA/invoiceforecast/detail.js

@@ -14,7 +14,7 @@ Page({
         active: null,
         "content": {
             "type": 1,
-            "dataid": wx.getStorageSync('userMsg').departmentid,
+            "dataid": wx.getStorageSync('userMsg').sa_saleareaid,
             "baseonproject": 0,
             "title": ""
         },
@@ -86,7 +86,7 @@ Page({
         if (detail) this.setData({
             active: null,
             "content.type": 1,
-            "content.dataid": wx.getStorageSync('userMsg').departmentid,
+            "content.dataid": wx.getStorageSync('userMsg').sa_saleareaid,
         });
         this.selectComponent("#organization").initDepAndUser();
         this.getRests();
@@ -112,14 +112,14 @@ Page({
             this.selectComponent("#organization").initDepAndUser()
             this.setData({
                 active: null,
-                "content.dataid": wx.getStorageSync('userMsg').departmentid,
+                "content.dataid": wx.getStorageSync('userMsg').sa_saleareaid,
                 'content.type': 1,
                 isonlydep: false
             })
         } else {
             let active = this.selectComponent("#organization").data.result;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 active,
                 'content.dataid': dataid,

+ 2 - 2
packageA/project/index.js

@@ -64,8 +64,8 @@ Page({
             label: "部门",
             index: null,
             showName: "depname", //显示字段
-            valueKey: "departmentid", //返回Key
-            selectKey: "departmentid", //传参 代表选着字段 不传参返回整个选择对象
+            valueKey: "sa_saleareaid", //返回Key
+            selectKey: "sa_saleareaid", //传参 代表选着字段 不传参返回整个选择对象
             value: "", //选中值
             type: 'multilevelClass',
             list: await _Http.basic({

+ 2 - 2
packageA/setclient/index.js

@@ -72,8 +72,8 @@ Page({
             label: "部门",
             index: null,
             showName: "depname", //显示字段
-            valueKey: "departmentid", //返回Key
-            selectKey: "departmentid", //传参 代表选着字段 不传参返回整个选择对象
+            valueKey: "sa_saleareaid", //返回Key
+            selectKey: "sa_saleareaid", //传参 代表选着字段 不传参返回整个选择对象
             value: "", //选中值
             type: 'multilevelClass',
             list: await _Http.basic({

+ 7 - 7
packageA/target/index.js

@@ -10,7 +10,7 @@ Page({
         active: "业绩目标",
         targetYear: null,
         hrid: null,
-        departmentid: null,
+        sa_saleareaid: null,
         "year": new Date().getFullYear().toString(),
         "content": {
             "nocache": true,
@@ -71,10 +71,10 @@ Page({
             let hrList = res.data.map(v => {
                 v.hr.unshift({
                     name: v.depname + ' (包含所有下级)',
-                    hrid: v.departmentid
+                    hrid: v.sa_saleareaid
                 })
                 return {
-                    id: v.departmentid,
+                    id: v.sa_saleareaid,
                     text: v.depname,
                     children: v.hr.map(value => {
                         const text = value.position ? value.name + ` (${value.position})` : value.name;
@@ -156,16 +156,16 @@ Page({
         detail
     }) {
         let hrid = null,
-            departmentid = null;
+            sa_saleareaid = null;
         if (detail.text.includes('包含所有下级')) {
-            departmentid = detail.id
+            sa_saleareaid = detail.id
         } else {
             hrid = detail.id
         };
         let text = detail.text.split("(")[0];
         this.setData({
             hrid,
-            departmentid,
+            sa_saleareaid,
             activeId: detail.id,
             text
         })
@@ -198,7 +198,7 @@ Page({
         })
         let content = this.data.content;
         if (this.data.hrid) content.hrid = this.data.hrid;
-        if (this.data.departmentid) content.departmentid = this.data.departmentid;
+        if (this.data.sa_saleareaid) content.sa_saleareaid = this.data.sa_saleareaid;
         _Http.basic({
             "id": 20220920133102,
             content

+ 2 - 2
portrayal/list/client.js

@@ -152,8 +152,8 @@ Component({
                 }
             } else if (detail.name == "confirm") {
                 const res = organization.data.result
-                content.type = res.departmentid ? 1 : 0;
-                content.dataid = res.departmentid || res.userid;
+                content.type = res.sa_saleareaid ? 1 : 0;
+                content.dataid = res.sa_saleareaid || res.userid;
                 content.where = {
                     "condition": content.where.condition || '',
                     "type": detail.type || '',

+ 2 - 2
portrayal/list/contacts.js

@@ -132,8 +132,8 @@ Component({
                 }
             } else if (detail.name == "confirm") {
                 const res = organization.data.result
-                content.type = res.departmentid ? 1 : 0;
-                content.dataid = res.departmentid || res.userid;
+                content.type = res.sa_saleareaid ? 1 : 0;
+                content.dataid = res.sa_saleareaid || res.userid;
                 content.where = {
                     "condition": content.where.condition || '',
                     "tag": detail.tag || [],

+ 2 - 2
portrayal/list/project.js

@@ -138,8 +138,8 @@ Component({
                 }
             } else if (detail.name == "confirm") {
                 const res = organization.data.result
-                content.type = res.departmentid ? 1 : 0;
-                content.dataid = res.departmentid || res.userid;
+                content.type = res.sa_saleareaid ? 1 : 0;
+                content.dataid = res.sa_saleareaid || res.userid;
                 content.where = {
                     "condition": content.where.condition || '',
                     "tag": detail.tag || '',

+ 2 - 2
portrayal/list/sales.js

@@ -102,8 +102,8 @@ Component({
                 }
             } else if (detail.name == "confirm") {
                 const res = organization.data.result
-                content.type = res.departmentid ? 1 : 0;
-                content.dataid = res.departmentid || res.userid;
+                content.type = res.sa_saleareaid ? 1 : 0;
+                content.dataid = res.sa_saleareaid || res.userid;
                 content.where = {
                     "condition": content.where.condition || '',
                     "begindate": detail.startdate || '',

+ 1 - 1
prsx/department/index.js

@@ -54,7 +54,7 @@ Page({
         this.getList(true)
 
         let filtratelist = [{
-            label: "医院类型",
+            label: "科室类型",
             index: null,
             showName: "value", //显示字段
             valueKey: "type", //返回Key

+ 2 - 2
prsx/department/index.wxml

@@ -48,9 +48,9 @@
 	<My_empty wx:if="{{list.length==0}}" />
 </Yl_ListBox>
 <!-- 显示类型 -->
-<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="{{language['取消']||'取消'}}" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
+<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
 <!-- 筛选条件 -->
-<Yl_Filtrate1 show='{{filterShow}}' list="{{filtratelist}}" dateRange bindhandle="handleFilter" />
+<Yl_Filtrate1 show='{{filterShow}}' list="{{filtratelist}}" dateRange bindhandle="handleFilter" dateRangeName='创建日期' />
 <!-- 浮动按钮 -->
 <Yl_FloatingButton wx:if="{{insert}}" bindtap="toAdd" />
 

+ 59 - 1
prsx/hospital/index.js

@@ -35,7 +35,7 @@ Page({
             }
         }
     },
-    onLoad(options) {
+    async onLoad(options) {
         getApp().globalData.Language.getLanguagePackage(this);
         let templetList = wx.getStorageSync('templetList')
         if (![0, 21].includes(wx.getStorageSync('userMsg').usertype)) templetList = templetList.filter(v => v.templetid != '99')
@@ -54,6 +54,64 @@ Page({
         });
         this.getList(true)
         getApp().globalData.Language.getLanguagePackage(this);
+
+        let filtratelist = [{
+            label: "营销区域",
+            index: null,
+            showName: "areaname", //显示字段
+            valueKey: "sa_saleareaid", //返回Key
+            selectKey: "sa_saleareaid", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            type: 'multilevelClass',
+            list: await _Http.basic({
+                "classname": "webmanage.sale.salearea.salearea",
+                "method": "query_area",
+                "content": {},
+            }).then(res => {
+                console.log("获取营销区域", res)
+                return res.code == 1 ? res.data : []
+            })
+        }, {
+            label: "医院等级",
+            index: null,
+            showName: "value", //显示字段
+            valueKey: "grade", //返回Key
+            selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: await _Http.getTypes('hospitalgrade', _Http)
+        }, {
+            label: "医院类型",
+            index: null,
+            showName: "value", //显示字段
+            valueKey: "type", //返回Key
+            selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: await _Http.getTypes('hospitaltype', _Http)
+        }, {
+            label: "开发状态",
+            index: null,
+            showName: "value", //显示字段
+            valueKey: "status", //返回Key
+            selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: [{
+                value: '未开发'
+            }, {
+                value: '已开发'
+            }]
+        }, {
+            label: "标签",
+            index: null,
+            type: "checkbox",
+            showName: "tag", //显示字段
+            valueKey: "tag", //返回Key
+            selectKey: "tag", //传参 代表选着字段 不传参返回整个选择对象
+            value: "", //选中值
+            list: await _Http.getTypes('tags', _Http)
+        }]
+        this.setData({
+            filtratelist
+        })
     },
     getList(init = false) {
         _Http.init(this.data.content, init).then(content => {

+ 1 - 1
prsx/hospital/index.wxml

@@ -58,7 +58,7 @@
 <!-- 显示类型 -->
 <van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
 <!-- 筛选条件 -->
-<Yl_Filtrate1 show='{{filterShow}}' list="{{filtratelist}}" dateRange bindhandle="handleFilter" />
+<Yl_Filtrate1 show='{{filterShow}}' list="{{filtratelist}}" dateRange bindhandle="handleFilter" dateRangeName='创建日期' />
 <!-- 浮动按钮 -->
 <Yl_FloatingButton wx:if="{{insert}}" bindtap="toAdd" />
 

+ 1 - 1
salesPanel/customerBlance/detail.js

@@ -92,7 +92,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 "content.dataid": dataid,
                 "content.type": type,

+ 1 - 1
salesPanel/dataOverview/OverviewAndDetails/Client.js

@@ -67,7 +67,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 "content.dataid": dataid,
                 "content.type": type,

+ 1 - 1
salesPanel/dataOverview/OverviewAndDetails/Clue.js

@@ -90,7 +90,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 "content.dataid": dataid,
                 "content.type": type,

+ 1 - 1
salesPanel/dataOverview/OverviewAndDetails/Costs.js

@@ -77,7 +77,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 "content.dataid": dataid,
                 "content.type": type,

+ 1 - 1
salesPanel/dataOverview/OverviewAndDetails/project.js

@@ -78,7 +78,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 "content.dataid": dataid,
                 "content.type": type,

+ 1 - 1
salesPanel/dataOverview/index.js

@@ -101,7 +101,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 isleave,
                 dataid,

+ 1 - 1
salesPanel/index/index.js

@@ -112,7 +112,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid
+                dataid = type == 0 ? active.userid : active.sa_saleareaid
             this.setData({
                 isleave,
                 dataid,

+ 2 - 2
salesPanel/salesHourglass/index.js

@@ -42,7 +42,7 @@ Page({
         "where": {
             "begindate": "",
             "enddate": "",
-            "departmentid": ""
+            "sa_saleareaid": ""
         },
         dateTypes: ["全部", "近一年", "近九个月", "近六个月", "近三个月"],
         content: {
@@ -179,7 +179,7 @@ Page({
             let active = this.selectComponent("#organization").data.result,
                 isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
-                dataid = type == 0 ? active.userid : active.departmentid;
+                dataid = type == 0 ? active.userid : active.sa_saleareaid;
             this.setData({
                 'content.dataid': dataid,
                 'content.type': type,

+ 1 - 1
utils/Http.js

@@ -30,7 +30,7 @@ class HTTP {
             content.total = res.total;
             content.sort = res.sort;
             if (this.isShowEmpty) this.empty = res.total == 0;
-            if (list.length) this.getTabs(that, ownertable, list = [], _Http)
+            if (list.length) this.getTabs(that, ownertable, list, _Http)
             return content;
         }