| | |
| | | pageVue = new TabTableVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | title: "销售流向", |
| | | 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_inv", filterTxt: "", orderby: ""}, |
| | | {code: "daily", name: "日流向", dataname: "flow_daily_inv", 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: ""}, |
| | | ], |
| | | 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") { |
| | |
| | | if (!me.selectTabObj.filterFields || (me.selectTabObj.filterFields && me.selectTabObj.filterFields.length == 0)) { |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(tableFields_); |
| | | |
| | | me.selectTabObj.filterObj = clone(me.default_filterObj[me.selectTabObj.code]) |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | |
| | | <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' && selectTabObj.filterObj.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="selectTabObj.filterObj.dataversion" size="mini" fill="#4cb108"> |
| | | <el-radio-button label="月度初版">初版</el-radio-button> |
| | | <el-radio-button label="月度终版">终版</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | </div> |
| | | |