|
|
@@ -21,11 +21,11 @@
|
|
|
:columns="columns"
|
|
|
:datasource="datasource"
|
|
|
:cache-key="`${activeName}produceOrderTable`"
|
|
|
- :selection.sync="selection"
|
|
|
+ :selection.sync="selection"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary">工单刷新</el-button>
|
|
|
- <el-button type="success">领料</el-button>
|
|
|
+ <el-button type="success" @click="handlePicking">领料</el-button>
|
|
|
<el-button type="success" @click="toEnd()">批量完结</el-button>
|
|
|
<el-button type="success" @click="handleCreate">创建工单</el-button>
|
|
|
<el-button type="success">工单操作控制</el-button>
|
|
|
@@ -86,7 +86,7 @@
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
<createDialog ref="createRef" @success="createSuccess" />
|
|
|
- <unpackDialog ref="unpackRef" @success="createSuccess" />
|
|
|
+ <unpackDialog ref="unpackRef" @success="createSuccess" />
|
|
|
<pickingDialog ref="PickingRef" />
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -102,7 +102,7 @@
|
|
|
produceOrderSearch,
|
|
|
pickingDialog,
|
|
|
createDialog,
|
|
|
- unpackDialog
|
|
|
+ unpackDialog
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -128,7 +128,7 @@
|
|
|
{ label: '外销计划', value: '2' },
|
|
|
{ label: '预制计划', value: '3' }
|
|
|
],
|
|
|
- selection: []
|
|
|
+ selection: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -159,13 +159,13 @@
|
|
|
};
|
|
|
|
|
|
return [
|
|
|
- {
|
|
|
- width: 45,
|
|
|
- type: 'selection',
|
|
|
- columnKey: 'selection',
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
{
|
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
|
@@ -176,7 +176,7 @@
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'code',
|
|
|
+ slot: 'code',
|
|
|
label: '生产工单号',
|
|
|
align: 'center'
|
|
|
},
|
|
|
@@ -287,6 +287,11 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handlePicking () {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/produceOrder/picking'
|
|
|
+ });
|
|
|
+ },
|
|
|
statusFormatter (status) {
|
|
|
const obj = this.statusOpt[this.activeName].find(
|
|
|
(i) => i.value == status
|
|
|
@@ -319,33 +324,32 @@
|
|
|
});
|
|
|
},
|
|
|
// 完结与批量完结
|
|
|
- toEnd ( row ) {
|
|
|
- if(row){
|
|
|
- this.$confirm(`是否要完结工单【${row.code}】?`, '提醒', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
-
|
|
|
- }).catch(() => {
|
|
|
- });
|
|
|
- }else{
|
|
|
- if(!this.selection.length) return this.$message.warning('请至少选择一条工单!')
|
|
|
- this.$confirm(`是否要完结${this.selection.length}条工单?`, '提醒', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
-
|
|
|
- }).catch(() => {
|
|
|
- });
|
|
|
- }
|
|
|
+ toEnd (row) {
|
|
|
+ if (row) {
|
|
|
+ this.$confirm(`是否要完结工单【${row.code}】?`, '提醒', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ if (!this.selection.length)
|
|
|
+ return this.$message.warning('请至少选择一条工单!');
|
|
|
+ this.$confirm(`是否要完结${this.selection.length}条工单?`, '提醒', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 拆分
|
|
|
+ toUnpack (row) {
|
|
|
+ this.$refs.unpackRef.open(row);
|
|
|
},
|
|
|
-
|
|
|
- // 拆分
|
|
|
- toUnpack(row){
|
|
|
- this.$refs.unpackRef.open(row);
|
|
|
- },
|
|
|
handleTabChange () {
|
|
|
this.$refs.searchRef.reset();
|
|
|
},
|
|
|
@@ -359,7 +363,7 @@
|
|
|
|
|
|
goDetail (row) {
|
|
|
this.$router.push({
|
|
|
- path: '/productionPlan/detail',
|
|
|
+ path: '/produceOrder/detail',
|
|
|
query: {
|
|
|
id: row.id
|
|
|
}
|