|
|
@@ -15,7 +15,7 @@ |
|
|
|
<method-btn |
|
|
|
v-if="tableBtn.length" |
|
|
|
slot="handleBtn" |
|
|
|
:width="220" |
|
|
|
:width="260" |
|
|
|
label="操作" |
|
|
|
fixed="right" |
|
|
|
:method-list="tableBtn" |
|
|
@@ -68,7 +68,8 @@ import OffShelfPackagingDetail from './components/OffShelfPackagingDetail.vue' |
|
|
|
import OffShelfPackagingContinue from './components/OffShelfPackagingContinue.vue' |
|
|
|
import { |
|
|
|
unloadPalletPage, |
|
|
|
unloadPalletFinish |
|
|
|
unloadPalletFinish, |
|
|
|
unloadPalletDelete |
|
|
|
} from '@/api/productionScheduling' |
|
|
|
const tableProps = [ |
|
|
|
{ |
|
|
@@ -150,6 +151,11 @@ const tableBtn = [ |
|
|
|
type: 'equal', |
|
|
|
name: 'status', |
|
|
|
value: 2 |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'unequal', |
|
|
|
name: 'num', |
|
|
|
value: 0 |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
@@ -171,6 +177,25 @@ const tableBtn = [ |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'clean', |
|
|
|
btnName: '清空', |
|
|
|
showParam: { |
|
|
|
type: '&', |
|
|
|
data: [ |
|
|
|
{ |
|
|
|
type: 'equal', |
|
|
|
name: 'status', |
|
|
|
value: 2 |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'unequal', |
|
|
|
name: 'num', |
|
|
|
value: 0 |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
export default { |
|
|
@@ -309,39 +334,52 @@ export default { |
|
|
|
}, |
|
|
|
handleClick(val) { |
|
|
|
console.log(val) |
|
|
|
if (val.type === 'edit') { |
|
|
|
this.centervisible = true |
|
|
|
this.addOrEditTitle = '编辑' |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.offShelfPackagingAdd.init(val.data.id) |
|
|
|
}) |
|
|
|
} else if (val.type === 'end') { |
|
|
|
this.$confirm( |
|
|
|
'确认结束包装玻璃架ID" ' + val.data.glassRackId + ' "吗?', |
|
|
|
{ |
|
|
|
type: 'warning' |
|
|
|
} |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
unloadPalletFinish({ id: val.data.id }).then(() => { |
|
|
|
this.$message({ |
|
|
|
message: '结束包装成功', |
|
|
|
type: 'success' |
|
|
|
switch (val.type) { |
|
|
|
case 'edit': |
|
|
|
this.centervisible = true |
|
|
|
this.addOrEditTitle = '编辑' |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.offShelfPackagingAdd.init(val.data.id) |
|
|
|
}) |
|
|
|
break |
|
|
|
case 'end': |
|
|
|
this.$confirm( |
|
|
|
'确认结束包装玻璃架ID" ' + val.data.glassRackId + ' "吗?', |
|
|
|
{ |
|
|
|
type: 'warning' |
|
|
|
} |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
unloadPalletFinish({ id: val.data.id }).then(() => { |
|
|
|
this.$message({ |
|
|
|
message: '结束包装成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
break |
|
|
|
case 'continue': |
|
|
|
this.centervisible2 = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.offShelfPackagingContinue.init(val.data.id) |
|
|
|
}) |
|
|
|
break |
|
|
|
case 'detail': |
|
|
|
this.detailVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.packagingDetail.init(val.data.id) |
|
|
|
}) |
|
|
|
break |
|
|
|
default: |
|
|
|
unloadPalletDelete({ id: val.data.id }).then(() => { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
} else if (val.type === 'continue') { |
|
|
|
this.centervisible2 = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.offShelfPackagingContinue.init(val.data.id) |
|
|
|
}) |
|
|
|
} else if (val.type === 'detail') { |
|
|
|
this.detailVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.packagingDetail.init(val.data.id) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleCancel() { |
|
|
|