|
@@ -1,7 +1,7 @@
|
|
|
<!-- 任务处理中心 -->
|
|
|
<template>
|
|
|
<div class="production">
|
|
|
- <template v-if="!detailsVisible && !outsourceVisible && !checkVisible && !preCheckVisible">
|
|
|
+ <template v-if="!detailsVisible && !outsourceVisible && !checkVisible && !preCheckVisible && !purchaseVisible">
|
|
|
<el-header style="font-size: large;text-align: center">任务处理中心</el-header>
|
|
|
<el-table
|
|
|
:data="dataList"
|
|
@@ -128,8 +128,8 @@
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" size="small" @click="check(scope.row)">核料</el-button>
|
|
|
- <el-button type="text" size="small" @click="check(scope.row.id)">转采购</el-button>
|
|
|
- <el-button type="text" size="small" @click="outsourceHandle(scope.row.id)">转委外</el-button>
|
|
|
+ <el-button type="text" size="small" @click="purchaseHandle(scope.row)">转采购</el-button>
|
|
|
+ <el-button type="text" size="small" @click="outsourceHandle(scope.row)">转委外</el-button>
|
|
|
<el-button type="text" size="small" @click="preCheck(scope.row.id)">试制前检查</el-button>
|
|
|
<el-button v-if="isAuth('prod:production:plan')" type="text" size="small" @click="detail(scope.row.id, true)">排产</el-button>
|
|
|
<!-- <el-button v-if="isAuth('pur:commDetail:save') && Number(scope.row.outsourcing) === 0" type="text" size="small" @click="outsourceHandle(scope.row.id)">委外生产</el-button>-->
|
|
@@ -150,6 +150,8 @@
|
|
|
<detail v-if="detailsVisible" ref="details" @close="closeDialogEvent" @refreshDataList="getDataList" @onChose="onChose"/>
|
|
|
<!-- 委外 -->
|
|
|
<outsource v-if="outsourceVisible" ref="outsource" @refreshDataList="getDataList" @onChose="onChose"/>
|
|
|
+ <!-- 采购 -->
|
|
|
+ <purchase-add-or-update v-if="purchaseVisible" ref="purchase" @refreshDataList="getDataList" @onChose="onChose"/>
|
|
|
<!-- 核料 -->
|
|
|
<scheduling-check v-if="checkVisible" ref="check" @refreshDataList="getDataList" @onChose="onChose"/>
|
|
|
<!-- 试制前检查 -->
|
|
@@ -159,19 +161,21 @@
|
|
|
|
|
|
<script>
|
|
|
import Detail from './scheduling-details'
|
|
|
- import Outsource from './scheduling-outsource'
|
|
|
+ import Outsource from '@/views/modules/sale/outsource-add-or-update'
|
|
|
import { getSchedulingList } from '@/api/production'
|
|
|
import SchedulingCheck from '@/views/modules/production/scheduling-check'
|
|
|
import SchedulingPreCheck from '@/views/modules/production/scheduling-pre-check'
|
|
|
+ import PurchaseAddOrUpdate from '@/views/modules/sale/purchase-add-or-update'
|
|
|
export default {
|
|
|
name: 'scheduling',
|
|
|
- components: {SchedulingPreCheck, SchedulingCheck, Detail, Outsource},
|
|
|
+ components: {PurchaseAddOrUpdate, SchedulingPreCheck, SchedulingCheck, Detail, Outsource},
|
|
|
data () {
|
|
|
return {
|
|
|
detailsVisible: false,
|
|
|
outsourceVisible: false,
|
|
|
checkVisible: false,
|
|
|
preCheckVisible: false,
|
|
|
+ purchaseVisible: false,
|
|
|
dataForm: {},
|
|
|
dataList: [],
|
|
|
pageIndex: 1,
|
|
@@ -241,6 +245,7 @@
|
|
|
this.outsourceVisible = false
|
|
|
this.checkVisible = false
|
|
|
this.preCheckVisible = false
|
|
|
+ this.purchaseVisible = false
|
|
|
},
|
|
|
// 查询
|
|
|
queryPage () {
|
|
@@ -315,12 +320,21 @@
|
|
|
this.detailsVisible = false
|
|
|
},
|
|
|
// 委外生产
|
|
|
- outsourceHandle (id) {
|
|
|
+ outsourceHandle (row) {
|
|
|
this.outsourceVisible = true
|
|
|
let ids = []
|
|
|
- ids.push(id)
|
|
|
+ ids.push(row.productId)
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.outsource.init(id, ids)
|
|
|
+ this.$refs.outsource.init(null, ids, row.id)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 采购
|
|
|
+ purchaseHandle (row) {
|
|
|
+ this.purchaseVisible = true
|
|
|
+ let ids = []
|
|
|
+ ids.push(row.productId)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.purchase.init(null, row.id)
|
|
|
})
|
|
|
},
|
|
|
// 核料
|