|
@ -4,28 +4,28 @@ |
|
|
<div class="head-container"> |
|
|
<div class="head-container"> |
|
|
<div v-if="crud.props.searchToggle"> |
|
|
<div v-if="crud.props.searchToggle"> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="选择异常出库原因" |
|
|
title="选择异常出库原因" |
|
|
:visible.sync="reasonDialogVisible" |
|
|
:visible.sync="reasonDialogVisible" |
|
|
width="30%" |
|
|
width="30%" |
|
|
:before-close="closeReasonDialog" |
|
|
:before-close="closeReasonDialog" |
|
|
> |
|
|
> |
|
|
<el-form ref="reasonForm" :model="reasonForm" label-width="80px"> |
|
|
<el-form ref="reasonForm" :model="reasonForm" label-width="80px"> |
|
|
<el-form-item label="原因" prop="reason"> |
|
|
<el-form-item label="原因" prop="reason"> |
|
|
<el-select v-model="reasonForm.reason" placeholder="请选择异常出库原因"> |
|
|
<el-select v-model="reasonForm.reason" placeholder="请选择异常出库原因"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in dict.reason" |
|
|
v-for="item in dict.reason" |
|
|
:key="item.value" |
|
|
:key="item.value" |
|
|
:label="item.label" |
|
|
:label="item.label" |
|
|
:value="item.value" |
|
|
:value="item.value" |
|
|
></el-option> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button @click="closeReasonDialog">取消</el-button> |
|
|
<el-button @click="closeReasonDialog">取消</el-button> |
|
|
<el-button type="primary" @click="submitReason">确认</el-button> |
|
|
<el-button type="primary" @click="submitReason">确认</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<el-form |
|
|
<el-form |
|
|
:inline="true" |
|
|
:inline="true" |
|
|
class="demo-form-inline" |
|
|
class="demo-form-inline" |
|
@ -185,19 +185,19 @@ |
|
|
> |
|
|
> |
|
|
缓存区一键移库 |
|
|
缓存区一键移库 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<!-- Confirmation Dialog --> |
|
|
<!-- Confirmation Dialog --> |
|
|
</crudOperation> |
|
|
</crudOperation> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="确认" |
|
|
title="确认" |
|
|
:visible.sync="dialogVisible" |
|
|
:visible.sync="dialogVisible" |
|
|
width="30%" |
|
|
width="30%" |
|
|
> |
|
|
> |
|
|
<span>您确定要移库吗?</span> |
|
|
<span>您确定要移库吗?</span> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogVisible = false">取消</el-button> |
|
|
<el-button @click="dialogVisible = false">取消</el-button> |
|
|
<el-button type="primary" @click="confirmMove">确定</el-button> |
|
|
<el-button type="primary" @click="confirmMove">确定</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<!--表单组件--> |
|
|
<!--表单组件--> |
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px"> |
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"> |
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"> |
|
@ -366,7 +366,7 @@ |
|
|
:permission="permission" |
|
|
:permission="permission" |
|
|
/> |
|
|
/> |
|
|
<el-button |
|
|
<el-button |
|
|
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)" |
|
|
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)" |
|
|
size="mini" |
|
|
size="mini" |
|
|
type="text" |
|
|
type="text" |
|
|
icon="el-icon-view" |
|
|
icon="el-icon-view" |
|
@ -439,7 +439,7 @@ const defaultForm = { |
|
|
} |
|
|
} |
|
|
export default { |
|
|
export default { |
|
|
name: 'SchBasePoint', |
|
|
name: 'SchBasePoint', |
|
|
dicts: ['vehicle_type', 'TrueOrFalse','reason'], |
|
|
dicts: ['vehicle_type', 'TrueOrFalse', 'reason'], |
|
|
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation }, |
|
|
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation }, |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
cruds() { |
|
|
cruds() { |
|
@ -478,9 +478,9 @@ export default { |
|
|
region_code: [ |
|
|
region_code: [ |
|
|
{ required: true, message: '区域类型不能为空', trigger: 'blur' } |
|
|
{ required: true, message: '区域类型不能为空', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
},reasonDialogVisible: false, |
|
|
}, reasonDialogVisible: false, |
|
|
reasonForm: { |
|
|
reasonForm: { |
|
|
reason: "" |
|
|
reason: '' |
|
|
}, |
|
|
}, |
|
|
workShopList: [], |
|
|
workShopList: [], |
|
|
regionList: [], |
|
|
regionList: [], |
|
@ -489,7 +489,7 @@ export default { |
|
|
pointStatusDialogList: [], |
|
|
pointStatusDialogList: [], |
|
|
pointTypesDialogList: [], |
|
|
pointTypesDialogList: [], |
|
|
pointDialog: false, |
|
|
pointDialog: false, |
|
|
dialogVisible: false, |
|
|
dialogVisible: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -559,8 +559,8 @@ export default { |
|
|
this.crud.toQuery() |
|
|
this.crud.toQuery() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
showQtyButton(vehicle_qty,region_code) { |
|
|
showQtyButton(vehicle_qty, region_code) { |
|
|
if (vehicle_qty === 1 && (region_code === 'YL'|| region_code === 'YLHC')) { |
|
|
if (vehicle_qty === 1 && (region_code === 'YL' || region_code === 'YLHC')) { |
|
|
return true |
|
|
return true |
|
|
} |
|
|
} |
|
|
return false |
|
|
return false |
|
@ -587,52 +587,52 @@ export default { |
|
|
this.crud.query.point_type = null |
|
|
this.crud.query.point_type = null |
|
|
this.crud.query.point_status = null |
|
|
this.crud.query.point_status = null |
|
|
this.hand() |
|
|
this.hand() |
|
|
},openReasonDialog(row) { |
|
|
}, openReasonDialog(row) { |
|
|
// 打开选择原因的对话框 |
|
|
// 打开选择原因的对话框 |
|
|
this.reasonDialogVisible = true; |
|
|
this.reasonDialogVisible = true |
|
|
// 这里可以将row存储到data中,以便在提交时使用 |
|
|
// 这里可以将row存储到data中,以便在提交时使用 |
|
|
this.selectedRow = row; |
|
|
this.selectedRow = row |
|
|
},closeReasonDialog() { |
|
|
}, closeReasonDialog() { |
|
|
// 关闭选择原因的对话框 |
|
|
// 关闭选择原因的对话框 |
|
|
this.reasonDialogVisible = false; |
|
|
this.reasonDialogVisible = false |
|
|
this.$refs["reasonForm"].resetFields(); |
|
|
this.$refs['reasonForm'].resetFields() |
|
|
},submitReason() { |
|
|
}, submitReason() { |
|
|
// 提交选择的原因到后端接口 |
|
|
// 提交选择的原因到后端接口 |
|
|
const data = { |
|
|
const data = { |
|
|
reason: this.reasonForm.reason, |
|
|
reason: this.reasonForm.reason, |
|
|
device_code: this.selectedRow.point_code |
|
|
device_code: this.selectedRow.point_code |
|
|
}; |
|
|
} |
|
|
// 调用后端接口提交数据 |
|
|
// 调用后端接口提交数据 |
|
|
// 这里假设使用axios库发送POST请求 |
|
|
// 这里假设使用axios库发送POST请求 |
|
|
this.$axios |
|
|
this.$axios |
|
|
.post("/api/schBasePoint/outbound", data) |
|
|
.post('/api/schBasePoint/outbound', data) |
|
|
.then(response => { |
|
|
.then(response => { |
|
|
// 处理后端返回的数据 |
|
|
// 处理后端返回的数据 |
|
|
console.log("提交成功", response); |
|
|
console.log('提交成功', response) |
|
|
this.$message.success("提交成功"); |
|
|
this.$message.success('提交成功') |
|
|
this.closeReasonDialog(); |
|
|
this.closeReasonDialog() |
|
|
}) |
|
|
}) |
|
|
.catch(error => { |
|
|
.catch(error => { |
|
|
// 处理错误情况 |
|
|
// 处理错误情况 |
|
|
console.error("提交失败,废包材位有货", error); |
|
|
console.error('提交失败,废包材位有货', error) |
|
|
this.$message.error("提交失败,废包材位有货"); |
|
|
this.$message.error('提交失败,废包材位有货') |
|
|
}); |
|
|
}) |
|
|
},showConfirmationDialog() { |
|
|
}, showConfirmationDialog() { |
|
|
this.dialogVisible = true; |
|
|
this.dialogVisible = true |
|
|
}, |
|
|
}, |
|
|
confirmMove() { |
|
|
confirmMove() { |
|
|
this.$axios.post('/api/schBaseTask/move', { }) |
|
|
this.$axios.post('/api/schBaseTask/move', { }) |
|
|
.then(response => { |
|
|
.then(response => { |
|
|
console.log(response.data); |
|
|
console.log(response.data) |
|
|
}) |
|
|
}) |
|
|
.catch(error => { |
|
|
.catch(error => { |
|
|
// Handle error response |
|
|
// Handle error response |
|
|
console.error(error); |
|
|
console.error(error) |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
this.dialogVisible = false; // Close the dialog |
|
|
this.dialogVisible = false // Close the dialog |
|
|
}); |
|
|
}) |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|