| | |
| | | type="primary" |
| | | @click="()=>exportDialogVisible=true" |
| | | >导出台账</el-button> |
| | | <el-button |
| | | style="margin-left:10px;" |
| | | type="primary" |
| | | @click="downloadWord" |
| | | >下载</el-button> |
| | | </template> |
| | | </ttable> |
| | | <!-- 弹窗, 日期选择 --> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | uniqueStateArr: [], |
| | | dataForm: { |
| | | selectTime: null, |
| | | exportTime: null |
| | |
| | | text: '设置销售件', |
| | | type: 'primary', |
| | | fun: this.setSalesPart, |
| | | disabled: false |
| | | disabled: false, |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if (this.permissions.customerorder_create_masterplan) { |
| | | this.table.toolbar.push({ |
| | | text: '主生产计划', |
| | | disabled: false, |
| | | fun: this.masterPlanHandle |
| | | fun: this.masterPlanHandle, |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | this.table.toolbar.push({ |
| | | text: '下载Word', |
| | | disabled: false, |
| | | type: 'primary', |
| | | fun: this.downloadWord, |
| | | permitArr: ['03plan','04planed'], |
| | | }) |
| | | }, |
| | | methods: { |
| | | //下载word |
| | |
| | | this.$message.error("请选择一条数据") |
| | | return |
| | | } |
| | | downloadWordFile(ids) |
| | | downloadWordFile(ids).then().catch(error=>{ |
| | | console.error(error); |
| | | }) |
| | | }, |
| | | getOtcPartSyncOptionList() { |
| | | return this.otcPartSyncOptionList |
| | |
| | | this.stateTagArr[i].disabled = true |
| | | } |
| | | } |
| | | // 循环表头按钮,判断每个按钮的permitArr是否完全包含选中状态,若完全包含,则按钮亮,否则按钮灰 |
| | | var toolbar = this.table.toolbar |
| | | for (var j = 0; j < toolbar.length; j++) { |
| | | if ( |
| | | uniqueStateArr.every((val) => |
| | | toolbar[j].permitArr.length <= 0 |
| | | ? true |
| | | : toolbar[j].permitArr.includes(val) |
| | | ) |
| | | ) { |
| | | toolbar[j].disabled = false |
| | | } else { |
| | | toolbar[j].disabled = true |
| | | } |
| | | } |
| | | this.multipleSelection = val |
| | | }, |
| | | getCustomerCoState(row, column, cellValue) { |