| | |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :uploadInfo="uploadInfo" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :ajaxFun="ajaxFun" |
| | | ref="masterProductionScheduleTable" |
| | | > |
| | | <ttable :table="table" @handleSelectionChange="handleSelectionChange" :uploadInfo="uploadInfo" :prelang="prelang" |
| | | :options="options" :ajaxFun="ajaxFun" ref="masterProductionScheduleTable"> |
| | | <template #toolbar> |
| | | <el-dropdown |
| | | v-if="permissions.masterproductionschedule_create_order" |
| | | @command="orderTypeHandleCommand" |
| | | > |
| | | <el-dropdown v-if="permissions.masterproductionschedule_create_order" @command="orderTypeHandleCommand"> |
| | | <el-button> |
| | | 车间订单<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item |
| | | :command="item.command" |
| | | v-for="item in orderTypeArr" |
| | | :disabled="item.disabled" |
| | | >{{ item.label }}</el-dropdown-item |
| | | > |
| | | <el-dropdown-item :command="item.command" v-for="item in orderTypeArr" :disabled="item.disabled">{{ |
| | | item.label }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | |
| | | <el-dropdown |
| | | v-if="permissions.masterproductionschedule_state_change" |
| | | @command="handleCommand" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-dropdown v-if="permissions.masterproductionschedule_state_change" @command="handleCommand" |
| | | style="margin-left: 10px"> |
| | | <el-button> |
| | | 状态改变<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item |
| | | :command="item.command" |
| | | v-for="item in stateTagArr" |
| | | :disabled="item.disabled" |
| | | >{{ item.label }}</el-dropdown-item |
| | | > |
| | | <el-dropdown-item :command="item.command" v-for="item in stateTagArr" :disabled="item.disabled">{{ |
| | | item.label }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | |
| | | <el-dropdown |
| | | v-if="permissions.masterproductionschedule_doc_relate" |
| | | @command="documentHandle" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-dropdown v-if="permissions.masterproductionschedule_doc_relate" @command="documentHandle" |
| | | style="margin-left: 10px"> |
| | | <el-button> |
| | | 工艺文件<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item |
| | | :command="item.command" |
| | | v-for="item in documentTagArr" |
| | | :disabled="item.disabled" |
| | | > |
| | | <el-dropdown-item :command="item.command" v-for="item in documentTagArr" :disabled="item.disabled"> |
| | | {{ item.label }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <!--审核状态改变--> |
| | | <el-dropdown |
| | | v-if="permissions.masterproductionschedule_audit_change" |
| | | @command="handleCommitCommand" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-dropdown v-if="permissions.masterproductionschedule_audit_change" @command="handleCommitCommand" |
| | | style="margin-left: 10px"> |
| | | <el-button> |
| | | 审核状态改变<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item |
| | | :command="item.command" |
| | | v-for="item in commitStateTagArr" |
| | | :disabled="item.disabled" |
| | | >{{ item.label }}</el-dropdown-item |
| | | > |
| | | <el-dropdown-item :command="item.command" v-for="item in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-button |
| | | v-if="permissions.masterproductionschedule_submit_oa" |
| | | @click="commitOa()" |
| | | type="primary" |
| | | style="margin-left:10px;" |
| | | :loading="loadingOa" |
| | | >提交OA |
| | | <el-button v-if="permissions.masterproductionschedule_submit_oa" @click="commitOa()" type="primary" |
| | | style="margin-left:10px;" :loading="loadingOa">提交OA |
| | | </el-button> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="permissions.masterproductionschedule_sync_scm" |
| | | @click="syncScm()" |
| | | type="primary" |
| | |
| | | type="primary" |
| | | style="margin-left:10px;" |
| | | >新增采购计划 |
| | | </el-button> |
| | | </el-button> --> |
| | | </template> |
| | | </ttable> |
| | | |
| | | <!-- 弹窗, 修改 --> |
| | | <table-form |
| | | v-if="addOrUpdateVisible" |
| | | ref="addOrUpdate" |
| | | @refreshDataList="getData" |
| | | /> |
| | | <source-table |
| | | v-if="masterPlanSourceDialogVisible" |
| | | ref="source" |
| | | @refreshDataList="getData" |
| | | /> |
| | | <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData" /> |
| | | <source-table v-if="masterPlanSourceDialogVisible" ref="source" @refreshDataList="getData" /> |
| | | <order-table v-if="orderVisible" ref="order" /> |
| | | <manufacturing-order |
| | | v-if="manufacturingOrderVisible" |
| | | ref="manufacturingOrder" |
| | | @refreshDataList="getData" |
| | | /> |
| | | <outsourcing-order |
| | | v-if="outsourcingOrderVisible" |
| | | ref="outsourcingOrder" |
| | | @refreshDataList="getData" |
| | | /> |
| | | <manufacturing-order v-if="manufacturingOrderVisible" ref="manufacturingOrder" @refreshDataList="getData" /> |
| | | <outsourcing-order v-if="outsourcingOrderVisible" ref="outsourcingOrder" @refreshDataList="getData" /> |
| | | <!--库存--> |
| | | <stockDialog :currshowlist.sync="stockVisible" :partName="partName" /> |
| | | <!--工艺文件--> |
| | | <DocumentTable |
| | | :currshowlist.sync="showDocument" |
| | | :multiSelect="false" |
| | | :relationOrderList="masterPlanSelection" |
| | | @listenToDocumentEvent="selectDocument" |
| | | > |
| | | <DocumentTable :currshowlist.sync="showDocument" :multiSelect="false" :relationOrderList="masterPlanSelection" |
| | | @listenToDocumentEvent="selectDocument"> |
| | | </DocumentTable> |
| | | <!--手动创建车间订单--> |
| | | <ManualManufacturingOrder |
| | | :currshowlist.sync="showManualManufacturingOrder" |
| | | :manualMasterProduction="manualMasterProduction" |
| | | @refreshOrderFromManual="refreshOrderFromManual" |
| | | > |
| | | <ManualManufacturingOrder :currshowlist.sync="showManualManufacturingOrder" |
| | | :manualMasterProduction="manualMasterProduction" @refreshOrderFromManual="refreshOrderFromManual"> |
| | | </ManualManufacturingOrder> |
| | | <!--自动创建车间订单--> |
| | | <AutoManufacturingorder |
| | | :currshowlist.sync="showAutoManufacturingOrder" |
| | | :masterProduction="manualMasterProduction" |
| | | :isReportOperation="isReportOperation" |
| | | :outPutBatchList="selectedOutPutBatchList" |
| | | :qtyPlaned="qtyPlaned" |
| | | @refreshDataList="AutoManuFinished" |
| | | > |
| | | <AutoManufacturingorder :currshowlist.sync="showAutoManufacturingOrder" :masterProduction="manualMasterProduction" |
| | | :isReportOperation="isReportOperation" :outPutBatchList="selectedOutPutBatchList" :qtyPlaned="qtyPlaned" |
| | | @refreshDataList="AutoManuFinished"> |
| | | </AutoManufacturingorder> |
| | | |
| | | <!--弹窗,新增--> |
| | | <MasterproductionForm |
| | | :currshowlist.sync="showMasterproductionForm" |
| | | @refreshDataList="getData" |
| | | > |
| | | <MasterproductionForm :currshowlist.sync="showMasterproductionForm" @refreshDataList="getData"> |
| | | </MasterproductionForm> |
| | | <!--产出批次--> |
| | | <!--<OutPutBatch |
| | |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteMainPlan |
| | | } |
| | | // { |
| | | // text: '订单预留', |
| | |
| | | this.getSysParam(sysParam.IS_REPORT_OPERATION) |
| | | }, |
| | | methods: { |
| | | deleteMainPlan(row){ |
| | | console.log(row); |
| | | }, |
| | | getSysParam(paramKey) { |
| | | getSysParam(paramKey).then((response) => { |
| | | var paramVal = response.data.data |
| | |
| | | closeOnClickModal: false, |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | .then(function () { |
| | | return delObj(row.id) |
| | | }) |
| | | .then((data) => { |
| | |
| | | handleSelectionChange(val) { |
| | | // 根据状态,禁用表头按钮 |
| | | // 筛选出选中记录的状态 |
| | | var stateArr = val.map(function(value, index) { |
| | | var stateArr = val.map(function (value, index) { |
| | | return value.state |
| | | }) |
| | | // 选中状态数组元素去重 |
| | |
| | | localStorage.setItem('masterschedule_partno', row.partNo) |
| | | localStorage.setItem('masterschedule_qtyrequired', row.qtyRequired) |
| | | |
| | | this.$router.push('/warehouse/orderreserved/index').catch(() => {}) |
| | | this.$router.push('/warehouse/orderreserved/index').catch(() => { }) |
| | | } else { |
| | | this.$message.warning('该生产计划,不可进行客户订单预留!') |
| | | } |