|
@@ -12,7 +12,7 @@
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="queryPage()">查询</el-button>
|
|
<el-button @click="queryPage()">查询</el-button>
|
|
<el-button v-if="isAuth('prod:production:planList')" type="primary" @click="batchPlan()">批量排产</el-button>
|
|
<el-button v-if="isAuth('prod:production:planList')" type="primary" @click="batchPlan()">批量排产</el-button>
|
|
- <el-button v-if="isAuth('pur:commDetail:save')" type="primary" @click="outsourceHandle2()">批量委外</el-button>
|
|
|
|
|
|
+<!-- <el-button v-if="isAuth('pur:commDetail:save')" type="primary" @click="outsourceHandle2()">批量委外</el-button>-->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<el-table
|
|
<el-table
|
|
@@ -77,6 +77,13 @@
|
|
:formatter="formatState"
|
|
:formatter="formatState"
|
|
label="当前状态">
|
|
label="当前状态">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="outsourcing"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ :formatter="formatOutsourcingState"
|
|
|
|
+ label="委外状态">
|
|
|
|
+ </el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="notes"
|
|
prop="notes"
|
|
header-align="center"
|
|
header-align="center"
|
|
@@ -93,7 +100,7 @@
|
|
label="操作">
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<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('prod:production:plan')" type="text" size="small" @click="detail(scope.row.id, true)">排产</el-button>
|
|
- <el-button v-if="isAuth('pur:commDetail:save')" type="text" size="small" @click="outsourceHandle(scope.row.id)">委外生产</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>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -147,6 +154,21 @@
|
|
value: '生产完成'
|
|
value: '生产完成'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ // 委外状态
|
|
|
|
+ outsourcingState: [
|
|
|
|
+ {
|
|
|
|
+ code: '0',
|
|
|
|
+ value: '正常'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ code: '1',
|
|
|
|
+ value: '成品委外'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ code: '2',
|
|
|
|
+ value: '工序委外'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
multipleSelection: []
|
|
multipleSelection: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -238,6 +260,14 @@
|
|
const item1 = this.optionsState.find((item) => item.code === row.state.toString())
|
|
const item1 = this.optionsState.find((item) => item.code === row.state.toString())
|
|
return item1 ? item1.value : ''
|
|
return item1 ? item1.value : ''
|
|
},
|
|
},
|
|
|
|
+ // 转换属性“委外状态”
|
|
|
|
+ formatOutsourcingState (row) {
|
|
|
|
+ if (!row.outsourcing) {
|
|
|
|
+ return ''
|
|
|
|
+ }
|
|
|
|
+ const item1 = this.outsourcingState.find((item) => item.code === row.outsourcing.toString())
|
|
|
|
+ return item1 ? item1.value : ''
|
|
|
|
+ },
|
|
closeDialogEvent () {
|
|
closeDialogEvent () {
|
|
this.detailsVisible = false
|
|
this.detailsVisible = false
|
|
},
|
|
},
|