| | |
| | | @command="documentHandle" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-button> |
| | | <el-button style="padding: 9px 14px;"> |
| | | 工艺文件<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | |
| | | @command="handleCommitCommand" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-button> |
| | | <el-button style="padding: 9px 14px;"> |
| | | 审核状态改变<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-button |
| | | style="margin-left: 10px" |
| | | style="margin-left: 10px;padding: 9px 14px;" |
| | | type="primary" |
| | | @click="() => (exportDialogVisible = true)" |
| | | >导出台账</el-button |
| | | > |
| | | <el-button |
| | | style="margin-left: 10px;padding: 9px 14px;" |
| | | type="primary" |
| | | v-if="permissions.plan_customerorder_check" |
| | | @click="handleCheck" |
| | | >审核</el-button |
| | | > |
| | | <el-button |
| | | style="margin-left: 10px;padding: 9px 14px;" |
| | | type="primary" |
| | | v-if="permissions.plan_customerorder_check" |
| | | @click="syncPLM" |
| | | >同步PLM</el-button |
| | | > |
| | | <!-- <el-button |
| | | style="margin-left: 10px" |
| | |
| | | import { |
| | | interrelatedOrder, |
| | | getInterrelatedOrder, |
| | | checkHanderOrder, |
| | | checkHanderOrder |
| | | } from '@/api/plan/customerOrderInterrelated' |
| | | import ConfirmPullCustomerorder from './confirm-pull-customerorder' |
| | | import TableForm from './customerorder-form' |
| | |
| | | syncOrder, |
| | | dropByContractNo, |
| | | downloadProduct, |
| | | downloadWordFile |
| | | downloadWordFile, |
| | | syncPlm |
| | | } from '../../../api/plan/customerorder' |
| | | import DocumentTable from '@/views/common/document.vue' |
| | | import { remote } from '@/api/admin/dict' |
| | |
| | | interrelatedOrderId: null, |
| | | interrelatedOrderData: [], |
| | | showInterrelatedOrderDialog: false, |
| | | technologyDialog:true, |
| | | technologyDialog: true, |
| | | uniqueStateArr: [], |
| | | dataForm: { |
| | | selectTime: null, |
| | | exportTime: null, |
| | | exportTime: null |
| | | }, |
| | | dataRule: { |
| | | exportTime: [ |
| | | { required: true, message: '导出日期不能为空', trigger: 'change' }, |
| | | ], |
| | | { required: true, message: '导出日期不能为空', trigger: 'change' } |
| | | ] |
| | | }, |
| | | pickerOptions: { |
| | | onPick: ({ maxDate, minDate }) => { |
| | |
| | | ) |
| | | } |
| | | return false |
| | | }, |
| | | } |
| | | }, |
| | | exportDialogVisible: false, |
| | | syncDateVisible: false, |
| | |
| | | label: '标记零件待选', |
| | | command: '01partUnCheck', |
| | | disabled: false, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | label: '标记工艺文件待选', |
| | | command: '02technologyUnCheck', |
| | | disabled: false, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | label: '标记待计划', |
| | | command: '03plan', |
| | | disabled: false, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | label: '标记已下发', |
| | | command: '04planed', |
| | | disabled: false, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | label: '标记已作废', |
| | | command: '05cancel', |
| | | disabled: false, |
| | | permitArr: [], |
| | | }, |
| | | permitArr: [] |
| | | } |
| | | ], |
| | | documentTagArr: [ |
| | | { |
| | | label: '关联工艺文件', |
| | | command: 'RELEVANCE', |
| | | disabled: false, |
| | | disabled: false |
| | | }, |
| | | { |
| | | label: '移除工艺文件', |
| | | command: 'NORELEVANCE', |
| | | disabled: false, |
| | | }, |
| | | disabled: false |
| | | } |
| | | ], |
| | | commitStateTagArr: [ |
| | | { |
| | | label: '标记通过', |
| | | command: 'PROCESSED', |
| | | disabled: false, |
| | | permitArr: ['01draft'], |
| | | permitArr: ['01draft'] |
| | | }, |
| | | { |
| | | label: '标记取消', |
| | | command: 'CANCELED', |
| | | disabled: false, |
| | | permitArr: ['01draft'], |
| | | }, |
| | | permitArr: ['01draft'] |
| | | } |
| | | ], |
| | | ajaxFun: fetchListCustomerOrder, |
| | | events: '', |
| | |
| | | uploadInfo: { |
| | | // 是否展示上传EXCEL以及对应的url |
| | | isShow: false, |
| | | url: '', |
| | | url: '' |
| | | }, |
| | | prelang: 'operation', |
| | | options: { |
| | |
| | | isSearch: true, // 高级查询按钮 |
| | | defaultOrderBy: { column: 'placeOrderDate', direction: 'desc' }, |
| | | cancelRunCreated: true, |
| | | reserveSelection: true // 是否保留之前选择的数据 |
| | | }, |
| | | table: { |
| | | total: 0, |
| | |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | render: { fun: this.addOrUpdateHandle }, |
| | | render: { fun: this.addOrUpdateHandle } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | label: '工程名称', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | |
| | | formatter: this.getSourceId, |
| | | optList: () => { |
| | | return this.sourceIdList |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '200', |
| | |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'datetimerange', |
| | | formatter: this.formatDutyDate, |
| | | formatter: this.formatDutyDate |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'date', |
| | | formatter: this.formatDutyDate, |
| | | searchInfoType: 'datetimerange', |
| | | formatter: this.formatDutyDate |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | formatter: this.getCustomerCoState, |
| | | optList: () => { |
| | | return this.coStateList |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | formatter: this.getIsAudit, |
| | | optList: () => { |
| | | return this.isAuditList |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | formatter: this.checkIsPass, |
| | | optList: () => { |
| | | return this.isPassList |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | formatter: this.checkIsOa, |
| | | optList: () => { |
| | | return this.isOaList |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | label: '隶属品牌', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | label: '单位', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | |
| | | formatter: this.getManufactureAttr, |
| | | optList: () => { |
| | | return this.manufactureAttrList |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'datetimerange', |
| | | formatter: this.formatDutyDate, |
| | | }, |
| | | formatter: this.formatDutyDate |
| | | } |
| | | ], |
| | | toolbar: [], |
| | | operator: [ |
| | |
| | | // size: 'small', |
| | | // fun: this.packageExportHandle |
| | | // }, |
| | | { |
| | | text: '审核', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.checkHandOrder, |
| | | showFun: (row) => { |
| | | return row.sourceId === '1' |
| | | }, |
| | | show: { |
| | | val: [false], |
| | | key: 'isPass', |
| | | }, |
| | | }, |
| | | // { |
| | | // text: '审核', |
| | | // type: 'text', |
| | | // size: 'small', |
| | | // fun: this.checkHandOrder, |
| | | // showFun: (row) => { |
| | | // return row.sourceId === '1' |
| | | // }, |
| | | // show: { |
| | | // val: [false], |
| | | // key: 'isPass', |
| | | // }, |
| | | // }, |
| | | { |
| | | text: '已关联订单', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.showInterrelatedOrder, |
| | | fun: this.showInterrelatedOrder |
| | | }, |
| | | { |
| | | text: '删除', |
| | |
| | | val: [ |
| | | '01partUnCheck', |
| | | '02technologyUnCheck', |
| | | '03plan', |
| | | '03plan' |
| | | // '04planed' |
| | | ], |
| | | key: 'coState', |
| | | }, |
| | | }, |
| | | key: 'coState' |
| | | } |
| | | } |
| | | ], |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | | width: 200, |
| | | minWidth: 200, |
| | | }, |
| | | minWidth: 200 |
| | | } |
| | | }, |
| | | addOrUpdateVisible: false, |
| | | coStateList: [ |
| | | { |
| | | value: '01partUnCheck', |
| | | label: '零件待选', |
| | | label: '零件待选' |
| | | }, |
| | | { |
| | | value: '02technologyUnCheck', |
| | | label: '工艺文件待选', |
| | | label: '工艺文件待选' |
| | | }, |
| | | { |
| | | value: '03plan', |
| | | label: '待计划', |
| | | label: '待计划' |
| | | }, |
| | | { |
| | | value: '04planed', |
| | | label: '已下发', |
| | | label: '已下发' |
| | | }, |
| | | { |
| | | value: '05cancel', |
| | | label: '已作废', |
| | | label: '已作废' |
| | | }, |
| | | { |
| | | value: '06unedit', |
| | | label: '订单编辑', |
| | | }, |
| | | label: '订单编辑' |
| | | } |
| | | ], |
| | | manufactureAttrList: [ |
| | | { |
| | | label: '普通', |
| | | value: 'N', |
| | | value: 'N' |
| | | }, |
| | | { |
| | | label: '样品', |
| | | value: 'S', |
| | | value: 'S' |
| | | }, |
| | | { |
| | | label: '研发', |
| | | value: 'D', |
| | | }, |
| | | value: 'D' |
| | | } |
| | | ], |
| | | isAuditList: [ |
| | | { |
| | | value: '01draft', |
| | | label: '草稿', |
| | | label: '草稿' |
| | | }, |
| | | { |
| | | value: '02pending', |
| | | label: '审核中', |
| | | label: '审核中' |
| | | }, |
| | | { |
| | | value: '03accepted', |
| | | label: '通过', |
| | | label: '通过' |
| | | }, |
| | | { |
| | | value: '04reject', |
| | | label: '退回', |
| | | }, |
| | | label: '退回' |
| | | } |
| | | ], |
| | | sourceIdList: [ |
| | | { |
| | | label: '同步', |
| | | value: '0', |
| | | value: '0' |
| | | }, |
| | | { |
| | | label: '手动', |
| | | value: '1', |
| | | }, |
| | | value: '1' |
| | | } |
| | | ], |
| | | stockVisible: false, |
| | | partName: null, |
| | |
| | | id: '', |
| | | customerOrderNo: '', |
| | | splitQuantity: '', |
| | | title: '', |
| | | title: '' |
| | | }, |
| | | rules: { |
| | | splitQuantity: [ |
| | | { required: true, message: '数量不能为空', trigger: 'blur' }, |
| | | { validator: validateSixDecimal, trigger: 'blur' }, |
| | | { validator: validateSixDecimal, trigger: 'blur' } |
| | | ], |
| | | title: [{ required: true, message: '抬头不能为空', trigger: 'blur' }], |
| | | title: [{ required: true, message: '抬头不能为空', trigger: 'blur' }] |
| | | }, |
| | | titleList: [], |
| | | buttonDisable: false, |
| | | buttonDisable: false |
| | | }, |
| | | headers: { |
| | | Authorization: 'Bearer ' + getStore({ name: 'access_token' }), |
| | | Authorization: 'Bearer ' + getStore({ name: 'access_token' }) |
| | | }, |
| | | fileList: [], |
| | | outBatchUploadUrl: '/mes/operationTaskProduce/upload', |
| | |
| | | otcPartSyncOptionList: [ |
| | | { |
| | | value: true, |
| | | label: '已同步', |
| | | label: '已同步' |
| | | }, |
| | | { |
| | | value: false, |
| | | label: '未同步', |
| | | }, |
| | | label: '未同步' |
| | | } |
| | | ], |
| | | showSalesPartBatch: false, |
| | | addOrUpdateEescVisible: false, |
| | | isPassList: [ |
| | | { label: '未通过', value: false }, |
| | | { label: '通过', value: true }, |
| | | { label: '通过', value: true } |
| | | ], |
| | | isOaList: [ |
| | | { label: '未提交', value: false }, |
| | | { label: '已提交', value: true }, |
| | | ], |
| | | { label: '已提交', value: true } |
| | | ] |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | SalesPartBatchDialog, |
| | | TableFormDEesc, |
| | | CustomerorderReturnDialog, |
| | | TechnologyForm, |
| | | TechnologyForm |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']), |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | watch: { |
| | | exportDialogVisible(newVal) { |
| | |
| | | this.getData() |
| | | } |
| | | }, |
| | | immediate: true, |
| | | immediate: true |
| | | }, |
| | | interrelatedOrderId(newVal) { |
| | | if (newVal) { |
| | |
| | | console.error(error) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initQueryParams() |
| | |
| | | created() { |
| | | // this.getManufactureAttrs() |
| | | this.getTitles() |
| | | this.table.toolbar.push({ |
| | | text: '新增销售订单', |
| | | type: 'primary', |
| | | fun: this.addSampleCustomerOrder, |
| | | disabled: false, |
| | | permitArr: [], |
| | | }) |
| | | if (this.permissions.plan_customerorder_add) { |
| | | this.table.toolbar.push({ |
| | | text: '新增销售订单', |
| | | type: 'primary', |
| | | fun: this.addSampleCustomerOrder, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if (this.permissions.customerorder_from_otc) { |
| | | this.table.toolbar.push({ |
| | | text: '获取销售订单', |
| | | type: 'primary', |
| | | fun: this.syncERP, |
| | | disabled: false, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if (this.permissions.customerorder_submit_oa) { |
| | |
| | | fun: this.auditCustomerOrder, |
| | | disabled: false, |
| | | permitArr: [], |
| | | loading: false, |
| | | loading: false |
| | | }) |
| | | } |
| | | if (this.permissions.customerorder_set_salesparts) { |
| | |
| | | type: 'primary', |
| | | fun: this.setSalesPart, |
| | | disabled: false, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if(this.permissions.plan_download_process_file){ |
| | | this.table.toolbar.push({ |
| | | text: '下载工艺文件', |
| | | disabled: false, |
| | | type: 'primary', |
| | | fun: this.downloadWord, |
| | | permitArr: ['03plan','04planed'], |
| | | }) |
| | | if (this.permissions.plan_download_process_file) { |
| | | this.table.toolbar.push({ |
| | | text: '下载工艺文件', |
| | | disabled: false, |
| | | type: 'primary', |
| | | fun: this.downloadWord, |
| | | permitArr: ['03plan', '04planed'] |
| | | }) |
| | | } |
| | | if(this.permissions.plan_download_product_file){ |
| | | this.table.toolbar.push({ |
| | | text: '下载排产单', |
| | | disabled: false, |
| | | type: 'primary', |
| | | permitArr: [], |
| | | fun: this.downloadProductionScheduling, |
| | | }) |
| | | if (this.permissions.plan_download_product_file) { |
| | | this.table.toolbar.push({ |
| | | text: '下载排产单', |
| | | disabled: false, |
| | | type: 'primary', |
| | | permitArr: [], |
| | | fun: this.downloadProductionScheduling |
| | | }) |
| | | } |
| | | this.table.toolbar.push({ |
| | | text: '关联订单', |
| | | disabled: false, |
| | | type: 'primary', |
| | | fun: this.interrelatedOrderFun, |
| | | permitArr: [], |
| | | }) |
| | | if (this.permissions.plan_relevance_order) { |
| | | this.table.toolbar.push({ |
| | | text: '关联订单', |
| | | disabled: false, |
| | | type: 'primary', |
| | | fun: this.interrelatedOrderFun, |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if (this.permissions.customerorder_create_masterplan) { |
| | | this.table.toolbar.push({ |
| | | text: '主生产计划', |
| | | disabled: false, |
| | | fun: this.masterPlanHandle, |
| | | permitArr: [], |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | }, |
| | |
| | | this.$confirm('确认审核通过该销售订单吗?', '提示', { |
| | | confirmButtonText: '通过', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | checkHanderOrder(val) |
| | |
| | | } |
| | | interrelatedOrder({ |
| | | customerOrderAutoId: autoId, |
| | | customerOrderHandId: handId, |
| | | customerOrderHandId: handId |
| | | }) |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | //展示已关联订单 |
| | | // 展示已关联订单 |
| | | showInterrelatedOrder(currentOrder) { |
| | | this.interrelatedOrderId = currentOrder.id |
| | | this.showInterrelatedOrderDialog = true |
| | | }, |
| | | //下载排产通知单 |
| | | downloadProductionScheduling(){ |
| | | let ids = this.multipleSelection.map(obj => obj.id) |
| | | if(ids.length<1){ |
| | | this.$message.error("请选择一条数据") |
| | | return |
| | | } |
| | | downloadProduct(ids).then(res=>{ |
| | | if(res.status===200){ |
| | | transform(res) |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | // 下载排产通知单 |
| | | downloadProductionScheduling() { |
| | | const ids = this.multipleSelection.map((obj) => obj.id) |
| | | if (ids.length < 1) { |
| | | this.$message.error('请选择一条数据') |
| | | return |
| | | } |
| | | downloadProduct(ids) |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | transform(res) |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | //下载工艺文件 |
| | | downloadWord(){ |
| | | let ids = this.multipleSelection.map(ele=>ele.id) |
| | | if(ids.length<1){ |
| | | this.$message.error("请选择一条数据") |
| | | return |
| | | } |
| | | downloadWordFile(ids).then(response=>{ |
| | | // 下载工艺文件 |
| | | downloadWord() { |
| | | const ids = this.multipleSelection.map((ele) => ele.id) |
| | | if (ids.length < 1) { |
| | | this.$message.error('请选择一条数据') |
| | | return |
| | | } |
| | | downloadWordFile(ids) |
| | | .then((response) => { |
| | | // 处理返回的文件流 |
| | | const blob = response.data |
| | | const link = document.createElement('a') |
| | | link.href = URL.createObjectURL(blob) |
| | | const disposition = response.headers['content-disposition'] |
| | | let temp = disposition.substring(disposition.lastIndexOf('=') + 1) |
| | | const temp = disposition.substring(disposition.lastIndexOf('=') + 1) |
| | | link.download = decodeURI(temp) |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | window.setTimeout(function () { |
| | | window.setTimeout(function() { |
| | | URL.revokeObjectURL(blob) |
| | | document.body.removeChild(link) |
| | | }, 0) |
| | |
| | | queryParam.push( |
| | | Object.assign({ |
| | | prop: 'coState', |
| | | searchInfoType: 'select', |
| | | searchInfoType: 'select' |
| | | // propVal: '01partUnCheck' |
| | | // propVal: '02technologyUnCheck' |
| | | }) |
| | |
| | | this.getData() |
| | | }, |
| | | |
| | | getData() { |
| | | this.$refs.customerOrderTable.getDataList() |
| | | async getData() { |
| | | await this.$refs.customerOrderTable.getDataList() |
| | | this.$refs.customerOrderTable.toggleRowExpansion() |
| | | }, |
| | | // 获取数据列表去除已完成状态的 |
| | | handleDataList(command) { |
| | |
| | | } |
| | | }) |
| | | if (flag) { |
| | | checkOA( |
| | | this.multipleSelection.map((e) => e.id) |
| | | ).then((res) => { |
| | | if (res.data.data.success) { |
| | | this.auditCustomerOrderSure(ids) |
| | | } |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message) |
| | | }) |
| | | checkOA(this.multipleSelection.map((e) => e.id)) |
| | | .then((res) => { |
| | | if (res.data.data.success) { |
| | | this.auditCustomerOrderSure(ids) |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error(error.message) |
| | | }) |
| | | } else { |
| | | this.$message.error('存在销售订单未绑定零件号!') |
| | | } |
| | |
| | | id: row.id, |
| | | customerOrderNo: row.customerOrderNo, |
| | | splitQuantity: '', |
| | | title: '', |
| | | title: '' |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.packageExportForm.resetFields() |
| | |
| | | exportCustomerOrderSplit({ |
| | | id: this.packageExport.form.id, |
| | | splitQuantity: this.packageExport.form.splitQuantity, |
| | | title: this.packageExport.form.title, |
| | | title: this.packageExport.form.title |
| | | }) |
| | | .then((response) => { |
| | | transform(response) |
| | |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | closeOnClickModal: false, |
| | | type: 'warning', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | dropByContractNo({ id: row.id }).then((res) => { |
| | | if (res.data.code === 0) { |
| | |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | closeOnClickModal: false, |
| | | type: 'warning', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | return delCustomerOrder(row.id) |
| | |
| | | handleSelectionChange(val) { |
| | | // 根据状态,禁用表头按钮 |
| | | // 筛选出选中记录的状态 |
| | | var stateArr = val.map(function (value, index) { |
| | | var stateArr = val.map(function(value, index) { |
| | | return value.coState |
| | | }) |
| | | // 选中状态数组元素去重 |
| | |
| | | if (!isLt10M) { |
| | | this.$message({ |
| | | message: '文件大小', |
| | | type: 'warning', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | return isLt10M |
| | |
| | | } else { |
| | | this.$message({ |
| | | message: '上传成功', |
| | | type: 'success', |
| | | type: 'success' |
| | | }) |
| | | this.getData() |
| | | } |
| | |
| | | downDataTemplate() { |
| | | uploadBatchTemplate().then((response) => { |
| | | const blob = new Blob([response.data], { |
| | | type: 'application/force-download', |
| | | type: 'application/force-download' |
| | | }) |
| | | const filename = decodeURI('模板文件.xlsx') |
| | | // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件 |
| | |
| | | // } else { |
| | | // this.$message.error('请选择至少一条销售订单') |
| | | // } |
| | | this.$refs['exportForm'].validate((valid) => { |
| | | this.$refs.exportForm.validate((valid) => { |
| | | if (valid) { |
| | | const exportTime = this.dataForm.exportTime |
| | | let queryParam = this.$refs.customerOrderTable.getQueryParam() |
| | | const queryParam = this.$refs.customerOrderTable.getQueryParam() |
| | | queryParam.selectTime = exportTime |
| | | exportCustomerOrder(queryParam) |
| | | .then((response) => { |
| | |
| | | if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') { |
| | | otcCustomerOrderSync({ |
| | | selectTime: this.dataForm.selectTime, |
| | | pathCode: '1', |
| | | pathCode: '1' |
| | | }) |
| | | .then((response) => { |
| | | this.table.toolbar.find( |
| | |
| | | this.$message.error('请先选择日期') |
| | | } |
| | | }, |
| | | }, |
| | | handleCheck() { |
| | | if (this.multipleSelection.length > 0) { |
| | | for (let i = 0; i < this.multipleSelection.length; i++) { |
| | | if (this.multipleSelection[i].sourceId == 0) { |
| | | this.$message.error('请选择手动输入的销售订单') |
| | | return |
| | | } |
| | | if (this.multipleSelection[i].isPass) { |
| | | this.$message.error('请选择未审核通过的销售订单') |
| | | return |
| | | } |
| | | } |
| | | this.$confirm('确认审核通过选中的销售订单吗?', '提示', { |
| | | confirmButtonText: '通过', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | checkHanderOrder(this.multipleSelection) |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | this.$message.success('审核通过') |
| | | this.getData() |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error) |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.error('请选择至少一条销售订单') |
| | | } |
| | | }, |
| | | |
| | | syncPLM() { |
| | | console.log(this.multipleSelection) |
| | | if (this.multipleSelection.length > 0) { |
| | | this.$confirm('确认同步选中的销售订单吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | syncPlm(this.multipleSelection.map((item) => item.partNo)) |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | this.$message.success('同步成功') |
| | | this.getData() |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error) |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.error('请选择至少一条销售订单') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |