|
@@ -21,11 +21,12 @@
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
:datasource="datasource"
|
|
:datasource="datasource"
|
|
|
:cache-key="`${activeName}produceOrderTable`"
|
|
:cache-key="`${activeName}produceOrderTable`"
|
|
|
|
|
+ :selection.sync="selection"
|
|
|
>
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary">工单刷新</el-button>
|
|
<el-button type="primary">工单刷新</el-button>
|
|
|
<el-button type="success">领料</el-button>
|
|
<el-button type="success">领料</el-button>
|
|
|
- <el-button type="success">批量完结</el-button>
|
|
|
|
|
|
|
+ <el-button type="success" @click="toEnd()">批量完结</el-button>
|
|
|
<el-button type="success" @click="handleCreate">创建工单</el-button>
|
|
<el-button type="success" @click="handleCreate">创建工单</el-button>
|
|
|
<el-button type="success">工单操作控制</el-button>
|
|
<el-button type="success">工单操作控制</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -76,7 +77,7 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
- @click="planEdit(row)"
|
|
|
|
|
|
|
+ @click="toEnd(row)"
|
|
|
>
|
|
>
|
|
|
完结
|
|
完结
|
|
|
</el-link>
|
|
</el-link>
|
|
@@ -123,7 +124,8 @@
|
|
|
{ label: '内销计划', value: '1' },
|
|
{ label: '内销计划', value: '1' },
|
|
|
{ label: '外销计划', value: '2' },
|
|
{ label: '外销计划', value: '2' },
|
|
|
{ label: '预制计划', value: '3' }
|
|
{ label: '预制计划', value: '3' }
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ selection: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -141,12 +143,12 @@
|
|
|
],
|
|
],
|
|
|
second: [
|
|
second: [
|
|
|
{
|
|
{
|
|
|
- prop: 'empty1111',
|
|
|
|
|
|
|
+ prop: 'completeTime',
|
|
|
label: '完成时间',
|
|
label: '完成时间',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'empty1111',
|
|
|
|
|
|
|
+ prop: 'cycle',
|
|
|
label: '生产周期',
|
|
label: '生产周期',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
}
|
|
}
|
|
@@ -154,6 +156,13 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return [
|
|
return [
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ type: 'selection',
|
|
|
|
|
+ columnKey: 'selection',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ fixed: 'left'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
label: '序号',
|
|
@@ -307,14 +316,27 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 修改计划
|
|
// 修改计划
|
|
|
- planEdit ({ id }) {
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/saleOrder/salesToProduction',
|
|
|
|
|
- query: {
|
|
|
|
|
- type: 'edit',
|
|
|
|
|
- id
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ 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(() => {
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
handleTabChange () {
|
|
handleTabChange () {
|
|
|
this.$refs.searchRef.reset();
|
|
this.$refs.searchRef.reset();
|