| | |
| | | params: contractNo |
| | | }) |
| | | } |
| | | |
| | | export function downloadWordFile(data) { |
| | | return request({ |
| | | url: '/mes/plan/customerOrder/package', |
| | | method: 'post', |
| | | params: data, |
| | | responseType: 'blob' |
| | | }).then((response) => { |
| | | // 处理返回的文件流 |
| | | const blob = response.data |
| | | const link = document.createElement('a') |
| | | link.href = URL.createObjectURL(blob) |
| | | link.download = data.originalFileName |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | window.setTimeout(function() { |
| | | URL.revokeObjectURL(blob) |
| | | document.body.removeChild(link) |
| | | }, 0) |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | style="margin-left:10px;" |
| | | type="primary" |
| | | @click="()=>exportDialogVisible=true" |
| | | >导出台账</el-button |
| | | > |
| | | >导出台账</el-button> |
| | | <el-button |
| | | style="margin-left:10px;" |
| | | type="primary" |
| | | @click="downloadWord" |
| | | >下载</el-button> |
| | | </template> |
| | | </ttable> |
| | | <!-- 弹窗, 日期选择 --> |
| | |
| | | exportCustomerOrder, |
| | | exportCustomerOrderSplit, |
| | | syncOrder, |
| | | dropByContractNo |
| | | dropByContractNo, |
| | | downloadWordFile |
| | | } from '../../../api/plan/customerorder' |
| | | import DocumentTable from '@/views/common/document.vue' |
| | | import { remote } from '@/api/admin/dict' |
| | |
| | | created() { |
| | | // this.getManufactureAttrs() |
| | | this.getTitles() |
| | | /** |
| | | * { |
| | | text: '获取销售订单', |
| | | type: 'primary', |
| | | fun: this.pullCustomerOrder, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '获取IFS行号', |
| | | type: 'primary', |
| | | fun: this.pullIfsLineNo, |
| | | disabled: false, |
| | | permitArr: [], |
| | | loading: false |
| | | }, |
| | | { |
| | | text: '提交审核', |
| | | type: 'primary', |
| | | fun: this.auditCustomerOrder, |
| | | disabled: false, |
| | | permitArr: [], |
| | | loading: false |
| | | }, |
| | | { |
| | | text: '主生产计划', |
| | | disabled: false, |
| | | fun: this.masterPlanHandle |
| | | } |
| | | */ |
| | | this.table.toolbar.push({ |
| | | text: '新增销售订单', |
| | | type: 'primary', |
| | |
| | | disabled: false, |
| | | permitArr: [] |
| | | }) |
| | | // this.table.toolbar.push({ |
| | | // text: '同步ERP', |
| | | // type: 'primary', |
| | | // fun: this.syncERP, |
| | | // loading: false, |
| | | // disabled: false, |
| | | // permitArr: [] |
| | | // }) |
| | | if (this.permissions.customerorder_from_otc) { |
| | | this.table.toolbar.push({ |
| | | text: '获取销售订单', |
| | |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | // if (this.permissions.customerorder_ifs_line) { |
| | | // this.table.toolbar.push({ |
| | | // text: '获取ERP行号', |
| | | // type: 'primary', |
| | | // fun: this.pullIfsLineNo, |
| | | // disabled: false, |
| | | // permitArr: [], |
| | | // loading: false |
| | | // }) |
| | | // } |
| | | if (this.permissions.customerorder_submit_oa) { |
| | | this.table.toolbar.push({ |
| | | text: '提交审核', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | //下载word |
| | | downloadWord(){ |
| | | let ids = this.multipleSelection.map(ele=>ele.id) |
| | | if(ids.length<1){ |
| | | this.$message.error("请选择一条数据") |
| | | return |
| | | } |
| | | downloadWordFile(ids) |
| | | }, |
| | | getOtcPartSyncOptionList() { |
| | | return this.otcPartSyncOptionList |
| | | }, |
| | |
| | | <el-row :gutter="10" style="width:100%;z-index: 10;height:30px;"> |
| | | <el-col :span="12">检验项目</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-dropdown @command="handleCommand" v-if="!isShow"> |
| | | <el-dropdown @command="handleCommand" v-if="!isShow && resultVal==null"> |
| | | <el-button size="mini" style="margin-right: 10px;" type="primary" > |
| | | 切换默认检验项<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |