| | |
| | | title: "销售流向", |
| | | //Tab项设置 |
| | | tabs_d: [ |
| | | {code: "month", name: "月流向", dataname: "flow_daily_sell", filterTxt: "", orderby: ""}, |
| | | {code: "daily", name: "日流向", dataname: "flow_month_sell", filterTxt: "", orderby: ""}, |
| | | {code: "month", name: "月流向", dataname: "flow_month_sell_sum", filterTxt: "", orderby: ""}, |
| | | {code: "daily", name: "日流向", dataname: "flow_daily_sell", filterTxt: "", orderby: ""}, |
| | | ], |
| | | d_tabs: { |
| | | month: true, |
| | |
| | | {isshow: "T", field: "org_code", name: "经销商编码", filterfield:"", filteroperator: "like", type: ""}, |
| | | {isshow: "T", field: "org_name", name: "经销商名称", filterfield:"", filteroperator: "like", type: ""}, |
| | | ], |
| | | dataversion: "月度初版", |
| | | default_filterObj: { |
| | | month: { |
| | | // dataversion: "月度初版" |
| | | //year: new Date().getFullYear().toString(), |
| | | //month: (new Date().getMonth() + 1).toString(), |
| | | // month: dateFormat(new Date(), "yyyy-MM"), |
| | | //month: new Date().getFullYear() + "-" + new Date().getMonth()+1, |
| | | // dataversion: "1" |
| | | }, |
| | | daily: { |
| | | //year: new Date().getFullYear().toString(), |
| | | //month: (new Date().getMonth()+1).toString(), |
| | | // month: dateFormat(new Date(), "yyyy-MM"), |
| | | }, |
| | | }, |
| | | |
| | | cbuttons_r: {}, |
| | | ctabs_r: {}, |
| | |
| | | isSales: false,//销售人员(销售代表、大区经理、小区经理) |
| | | isRegionR: false,//大区经理 |
| | | saveUser: null,//登录者id |
| | | |
| | | newdate_month: "", |
| | | newdate_day: "", |
| | | |
| | | }, |
| | | created() { |
| | | this.newdate_month = dateFormat(new Date(), "yyyy年MM月") |
| | | this.newdate_day = dateFormat(new Date(), "yyyy年MM月dd日") |
| | | if (window.top.vue.userinfo) { |
| | | this.saveUser = window.top.vue.userinfo.id; |
| | | if (window.top.vue.userinfo.currentactor.code == "Capacity-Sale" || window.top.vue.userinfo.currentactor.code == "Capacity-Region-R" || window.top.vue.userinfo.currentactor.code == "Capacity-Region-M") { |
| | |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(tableFields_); |
| | | |
| | | me.selectTabObj.filterObj = clone(me.default_filterObj[me.selectTabObj.code]) |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //辖区医院列表 |
| | | var tablefieldClick_hospital = { |
| | | code: {//字段事件设置 |
| | | var tablefieldClick_month = { |
| | | // flow_month_sell_qty__qty_check |
| | | // flow_month_sell_qty__amt_check |
| | | // flow_month_sell_qty__qty_grant |
| | | // flow_month_sell_qty__amt_grant |
| | | |
| | | flow_month_sell_qty__qty_check: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | onclick: function(obj) {//数据值点击事件 |
| | | me.showInfo(obj); |
| | | var filter_ = "_datano='"+ obj.row.datano +"'" |
| | | me.showInfo(obj, "v_fee_working_qty_task", filter_, "结算明细"); |
| | | }, |
| | | }, |
| | | }, |
| | | flow_month_sell_qty__qty_grant: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var filter_ = "datano='"+ obj.row.datano +"'" |
| | | me.showInfo(obj, "v_fee_working_grant_task", filter_, "执行明细"); |
| | | }, |
| | | }, |
| | | } |
| | | }; |
| | | //辖区变更 |
| | | var tablefieldClick_info = { |
| | | //waiting |
| | | hospital_code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | onclick: function(obj) {//数据值点击事件 |
| | | me.showChangeInfo(obj); |
| | | }, |
| | | }, |
| | | }, |
| | | state_name: {//状态 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","草稿"], |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | var config = { |
| | | totab: false, |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "popup_workflow_step_user" + obj.row.id, |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {}, |
| | | sceneCode: "browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | //医院授权列表 |
| | | var tablefieldClick_org = { |
| | | category_name: {//授权产品 |
| | | val: { |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [ |
| | | { |
| | | field: "id", |
| | | val: null, |
| | | } |
| | | ],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | me.showAuthInfo(obj.row) |
| | | }, |
| | | }, |
| | | defaultval: { |
| | | val: "查看",//空值时的显示值 |
| | | onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | me.showAuthInfo(obj.row) |
| | | } |
| | | }, |
| | | }, |
| | | state_name: {//状态 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","草稿"], |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | var config = { |
| | | totab: false, |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "popup_workflow_step_user" + obj.row.id, |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {}, |
| | | sceneCode: "browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | //授权变更 |
| | | var tablefieldClick_auth = { |
| | | state_name: {//状态 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","草稿"], |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | var config = { |
| | | totab: false, |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "popup_workflow_step_user" + obj.row.id, |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {}, |
| | | sceneCode: "browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | type_name: {//授权产品 |
| | | val: { |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | me.showAuthChange(obj.row) |
| | | }, |
| | | }, |
| | | defaultval: { |
| | | val: "查看",//空值时的显示值 |
| | | onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | me.showAuthChange(obj.row) |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | var filterfieldClick = {}; |
| | | |
| | | //医院管理列表-辖区医院tab |
| | | if (this.selectTabObj.code == "hospital") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick_hospital; |
| | | } |
| | | //辖区新增/变更-辖区审批中、全部辖区申请tab |
| | | else if (this.selectTabObj.code == "infoUnderApproval" || this.selectTabObj.code == "infoAll") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick_info; |
| | | } |
| | | //医院授权列表-医院授权tab |
| | | else if (this.selectTabObj.code == "authorize") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick_org; |
| | | } |
| | | //授权变更-授权审批中、全部授权申请tab |
| | | else if (this.selectTabObj.code == "authUnderApproval" || this.selectTabObj.code == "authAll") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick_auth; |
| | | if (this.selectTabObj.code == "month") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick_month; |
| | | } |
| | | |
| | | this.filterfieldClick = filterfieldClick; |
| | |
| | | } |
| | | }, |
| | | |
| | | delDataPolicy(obj, row) { |
| | | let me = this; |
| | | let name_ = "该数据"; |
| | | |
| | | if (!row.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择删除数据' |
| | | }); |
| | | return |
| | | } |
| | | if (row.md_hospital__name) { |
| | | name_ = "_" + row.md_hospital__name + "_"; |
| | | } |
| | | |
| | | Root.confirm('确定删除' + name_ + '吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let param = { |
| | | id: row.id, |
| | | dataname: me.selectTabObj.dataname, |
| | | } |
| | | Server.call("root/data/deleteEntity", param, function(result) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | me.onQuery(); |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | commitData(obj) { |
| | | // 通用查看弹窗 |
| | | showInfo(obj, dataname, filter, text) { |
| | | var me = this; |
| | | Root.confirm('确定提交辖区医院' + obj.md_hospital__name + '吗?', '提交提示', { |
| | | confirmButtonText: '提交', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | var param = { |
| | | dataname: me.selectTabObj.dataname, |
| | | id: obj.id, |
| | | to_state: "OpeningApproval" |
| | | } |
| | | console.log(me.selectTabObj) |
| | | Server.call("root/data/commit", param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '提交成功' |
| | | }); |
| | | me.onQuery(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | openPolicy(sceneCode, row) { |
| | | let me = this; |
| | | var text = ""; |
| | | |
| | | // type_code: "", // Standard标准价目表、Customer经销商价目表 |
| | | if (sceneCode == "add") { |
| | | } |
| | | else if (sceneCode == "edit" || sceneCode == "browse") { |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // if (row.customer_name) { |
| | | // text = row.customer_name; |
| | | // } |
| | | |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "900px", |
| | | height: "320px", |
| | | icon: "icon-product", |
| | | text: "辖区医院" + text, |
| | | id: "popup_position_hospital" + row.id + sceneCode,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/terminal/page/popup/popup_position_hospital.html", |
| | | data: row, |
| | | delta: {dataname: me.selectTabObj.dataname,}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | |
| | | //辖区医院新增 |
| | | onAddData() { |
| | | var me = this; |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "900px", |
| | | height: "900px", |
| | | icon: "icon-product", |
| | | text: "医院管理信息", |
| | | id: "hospital_list_info",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/terminal/page/hospital_list_info.html", |
| | | data: {}, |
| | | delta: {}, |
| | | sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | //isSales提交后刷新'辖区审批中'tab |
| | | // if(me.isSales) { |
| | | var tab = { |
| | | name: 'infoUnderApproval', |
| | | }; |
| | | me.activeTabName = 'infoUnderApproval'; |
| | | me.handleClick(tab); |
| | | me.onQuery(); |
| | | // } else { |
| | | // me.onQuery(); |
| | | // } |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | //辖区医院信息查看 |
| | | showInfo(obj) { |
| | | var me = this; |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1200px", |
| | | height: "600px", |
| | | icon: "icon-product", |
| | | text: obj.row.name + " 医院管理信息", |
| | | text: text, |
| | | id: "hospital_list_info" + "browse" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/terminal/page/hospital_list_info.html", |
| | | data: obj.row, |
| | | url: "module/tool/page/popup_list_dataname.html", |
| | | data: {}, |
| | | dataname: dataname, |
| | | filter: filter, // "sell_qty_id='"+ obj.row.id +"'", |
| | | delta: {}, |
| | | sceneCode: "browse", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | |
| | | <div v-cloak id="vbody"> |
| | | <div id="page_root"> |
| | | <div class="topbar"> |
| | | <span>{{title}}</span> |
| | | <span style="float: left;">{{title}}</span> |
| | | |
| | | <div style="float: right;"> |
| | | <el-button-group style="margin-left: 3px"> |
| | | <el-button v-show="cbuttons_r.linkpharmacy" @click="onShowLinkPharmacy">关联院外店</el-button> |
| | | <el-button v-show="cbuttons_r.downloadTemplate" @click="DownloadTemplate">模板下载</el-button> |
| | | <el-tooltip class="item" effect="dark" :content="buttonsconfig.clearandappend.tooltip" placement="top-start"> |
| | | <el-button v-show="cbuttons_r.import" @click="onPopupByUploadFile":icon="buttonsconfig.clearandappend.icon">{{buttonsconfig.clearandappend.name}}</el-button> |
| | | </el-tooltip> |
| | | <el-button v-show="cbuttons_r.export" type="primary" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> |
| | | <!-- <el-button |
| | | v-show="cbuttons_r.Add && selectTabObj.code == 'hospital'" @click="addData":icon="buttonsconfig.add.icon">{{buttonsconfig.add.name}} |
| | | </el-button> |
| | | <el-button |
| | | v-show="cbuttons_r.Add && selectTabObj.code == 'hospital'" |
| | | :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id)" |
| | | @click="onEditDataChange" :icon="buttonsconfig.change.icon">变更 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | v-show="cbuttons_r.Auth && selectTabObj.code == 'hospital'" |
| | | :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id)" |
| | | @click="onAuthorize('add')" :icon="buttonsconfig.authorize.icon">新增授权 |
| | | </el-button> |
| | | |
| | | <el-button-group v-show="selectTabObj.code == 'authorize'" style="margin-left: 3px;"> |
| | | <el-button |
| | | v-show="cbuttons_r.Auth" |
| | | @click="onAuthorize('add')" :icon="buttonsconfig.authorize.icon">新增授权 |
| | | </el-button> |
| | | <el-button |
| | | v-show="cbuttons_r.Auth" |
| | | :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id)" |
| | | @click="onAuthorize('change')" :icon="buttonsconfig.authorize.icon">变更授权 |
| | | </el-button> |
| | | <el-button |
| | | v-show="cbuttons_r.Auth" |
| | | :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id)" |
| | | type="danger" |
| | | @click="onAuthorize('delete')" :icon="buttonsconfig.authorize.icon">取消授权 |
| | | </el-button> |
| | | <div style="float: right; margin-right: 18px;"> |
| | | <el-button-group |
| | | v-if="selectTabObj && selectTabObj.code == 'month' && dataversion == '月度初版'" |
| | | style="margin-left: 3px;"> |
| | | <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.biz_date)" |
| | | type="primary" @click="onAddSS" :icon="buttonsconfig.add.icon">申诉</el-button> |
| | | </el-button-group> |
| | | |
| | | <el-button-group v-show="selectTabObj.code == 'infoAll'" style="margin-left: 3px;"> |
| | | <el-button |
| | | v-show="cbuttons_r.Add" |
| | | :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && (selectTabObj.selectedrow.state_code == 'Rejected' || selectTabObj.selectedrow.state_code == 'Input') && selectTabObj.selectedrow.create_id == saveUser)" |
| | | @click="reEditInfo" :icon="buttonsconfig.edit.icon">编辑 |
| | | </el-button> |
| | | <el-button-group style="margin-left: 3px;"> |
| | | <el-button type="primary" @click="" |
| | | :icon="buttonsconfig.import.icon">{{buttonsconfig.import.name}}</el-button> |
| | | <el-button type="primary" @click="" |
| | | :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> |
| | | </div> |
| | | |
| | | <el-button-group v-show="selectTabObj.code == 'authAll'" style="margin-left: 3px;"> |
| | | <el-button |
| | | v-show="cbuttons_r.Auth" |
| | | :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && (selectTabObj.selectedrow.state_code == 'Rejected' || selectTabObj.selectedrow.state_code == 'Input') && selectTabObj.selectedrow.create_id == saveUser)" |
| | | @click="reEditAuth" :icon="buttonsconfig.edit.icon">编辑 |
| | | </el-button> |
| | | </el-button-group> --> |
| | | <div style="float: left; margin-left: 20%;"> |
| | | <span>报告日期:</span> |
| | | <span v-if="selectTabObj && selectTabObj.code == 'month'">{{newdate_month}}</span> |
| | | <span v-if="selectTabObj && selectTabObj.code == 'daily'">{{newdate_day}}</span> |
| | | <el-radio-group style="margin-left: 10px;" |
| | | v-if="selectTabObj && selectTabObj.filterObj && selectTabObj.code=='month'" |
| | | v-model="dataversion" size="mini" fill="#4cb108"> |
| | | <el-radio-button label="月度初版">初版</el-radio-button> |
| | | <el-radio-button label="月度终版">终版</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | </div> |
| | | |