diff --git a/src/api/baseManagement/basemateriallist.js b/src/api/baseManagement/basemateriallist.js
index a8e2c17..877db8a 100644
--- a/src/api/baseManagement/basemateriallist.js
+++ b/src/api/baseManagement/basemateriallist.js
@@ -55,3 +55,10 @@ export function delBaseMaterialList(pid) {
method: 'delete'
})
}
+//类别下拉
+export function GetMaterialTypeList() {
+ return request({
+ url: 'MasterDataManagement/Material/MaterialList/getMaterialTypePullDown',
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/src/api/productManagement/proworkorder.js b/src/api/productManagement/proworkorder.js
index c8027c0..55b58b3 100644
--- a/src/api/productManagement/proworkorder.js
+++ b/src/api/productManagement/proworkorder.js
@@ -221,3 +221,27 @@ export function GetWorkorderTraceProgressList(data) {
data
})
}
+
+//下发工单
+export function IssueWorkorder(workorder) {
+ return request({
+ url: `mes/productManagement/ProWorkorder/start_workorder?workorder=${workorder}`,
+ method: 'get',
+ // params: data
+ })
+}
+//暂停工单
+export function PauseWorkorder(workorder) {
+ return request({
+ url: `mes/productManagement/ProWorkorder/pause_workorder?workorder=${workorder}`,
+ method: 'get',
+
+ })
+}
+//结束工单
+export function EndWorkorder(workorder) {
+ return request({
+ url: `mes/productManagement/ProWorkorder/finish_workorder?workorder=${workorder}`,
+ method: 'get',
+ })
+}
\ No newline at end of file
diff --git a/src/views/masterDataManagement/Material/MaterialBom.vue b/src/views/masterDataManagement/Material/MaterialBom.vue
index 8be110c..31a2c8f 100644
--- a/src/views/masterDataManagement/Material/MaterialBom.vue
+++ b/src/views/masterDataManagement/Material/MaterialBom.vue
@@ -16,9 +16,12 @@
+ 新增
导入
导出
+ 批量删除
@@ -28,22 +31,37 @@
loadMethod: loadContentMethod,
iconOpen: 'vxe-icon-square-minus-fill',
iconClose: 'vxe-icon-square-plus-fill'
- }" :data="dataList">
+ }" :data="dataList" @checkbox-change="handleSelectionChange" @checkbox-all="handleSelectAll">
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -98,6 +116,7 @@ const columns = ref([
])
const total = ref(0)
const dataList = ref([])
+const tableRef = ref() // 添加表格引用
const queryRef = ref()
const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
@@ -114,6 +133,83 @@ function getList() {
}
})
}
+
+// 获取选中的行数据
+function getSelectedRows() {
+ if (tableRef.value) {
+ const selectedRows = tableRef.value.getCheckboxRecords()
+ console.log('选中的行数据:', selectedRows)
+ return selectedRows
+ }
+ return []
+}
+
+// 处理单个复选框选中状态变化
+function handleSelectionChange() {
+ const selectedRows = tableRef.value.getCheckboxRecords()
+ ids.value = selectedRows.map(row => row.id) // 假设有id字段
+ console.log('当前选中项ID:', ids.value)
+}
+
+// 处理全选/取消全选
+function handleSelectAll({ records }) {
+ ids.value = records.map(row => row.id) // 假设有id字段
+ console.log('全选/取消全选后ID:', ids.value)
+}
+
+// 批量编辑
+function handleBatchEdit() {
+ const selectedRows = getSelectedRows()
+ if (selectedRows.length === 0) {
+ proxy.$modal.msgWarning('请选择要编辑的数据')
+ return
+ }
+ console.log('批量编辑数据:', selectedRows)
+ // 这里实现批量编辑逻辑
+}
+
+// 批量删除
+function handleBatchDelete() {
+ const selectedRows = getSelectedRows()
+ if (selectedRows.length === 0) {
+ proxy.$modal.msgWarning('请选择要删除的数据')
+ return
+ }
+
+ proxy.$modal.confirm(`确认删除已选中的 ${selectedRows.length} 条数据?`)
+ .then(() => {
+ // 这里实现批量删除逻辑
+ console.log('批量删除数据:', selectedRows)
+ // 示例API调用
+ // return deleteBatch(ids.value)
+ })
+ .then(() => {
+ proxy.$modal.msgSuccess('删除成功')
+ getList()
+ })
+}
+
+//修改
+function handleEdit(row) {
+ console.log('编辑行数据:', row)
+ // 实现编辑逻辑
+}
+
+// 删除单行
+function handleDelete(row) {
+ proxy.$modal.confirm('确认删除该条数据?')
+ .then(() => {
+ // 实现删除逻辑
+ console.log('删除行数据:', row.id)
+ // 示例API调用
+ // return deleteById(row.id)
+ })
+ .then(() => {
+ proxy.$modal.msgSuccess('删除成功')
+ getList()
+ })
+}
+
// 子数据懒加载
function loadContentMethod({ row }) {
return new Promise((resolve) => {
@@ -165,7 +261,7 @@ function importTemplate() {
}
/** 文件上传异常处理 */
const handleFileError = (error, file, fileList) => {
- const { code, msg, data } = response
+ // 修复:使用正确的响应对象
if (error) {
proxy.$message.error('模板导入异常!')
return
@@ -264,4 +360,4 @@ function handleSync() {
/// =================================================================
handleQuery()
-
+
\ No newline at end of file
diff --git a/src/views/masterDataManagement/Material/MaterialList.vue b/src/views/masterDataManagement/Material/MaterialList.vue
index 400001a..a227c92 100644
--- a/src/views/masterDataManagement/Material/MaterialList.vue
+++ b/src/views/masterDataManagement/Material/MaterialList.vue
@@ -98,15 +98,19 @@
-
+
+
+
+
+
-
+
@@ -151,7 +155,8 @@ import {
addBaseMaterialList,
delBaseMaterialList,
updateBaseMaterialList,
- getBaseMaterialList
+ getBaseMaterialList,
+ GetMaterialTypeList
} from '@/api/baseManagement/basemateriallist.js'
const { proxy } = getCurrentInstance()
@@ -161,6 +166,7 @@ const showSearch = ref(true)
const dialogVisibleActualAssembly = ref(false)
const formRef = ref(null)
const title = ref("")
+const typeList=ref([])
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
@@ -213,6 +219,18 @@ function handleImport(type) {
upload.title = '导入'
upload.open = true
}
+function GetMaterialTypeListData() {
+ GetMaterialTypeList().then((res) => {
+ if (res.code == 200) {
+ typeList.value = res.data.map(item => {
+ return{
+ value: item.value,
+ label: item.label
+ }
+})
+ }
+ })
+}
//导出
function handleDownload() {
proxy
@@ -370,10 +388,12 @@ const handleAdd = () => {
open.value = true
title.value = '添加'
opertype.value = 1
+ GetMaterialTypeListData()
}
const handleEdit=(row)=>{
open.value = true
title.value = '修改'
+ GetMaterialTypeListData()
opertype.value = 2
getBaseMaterialList(row.id).then((res) => {
form.value = {
diff --git a/src/views/masterDataManagement/Process/ProcessOperationWorkstationMapping.vue b/src/views/masterDataManagement/Process/ProcessOperationWorkstationMapping.vue
index 74c9a86..3d40746 100644
--- a/src/views/masterDataManagement/Process/ProcessOperationWorkstationMapping.vue
+++ b/src/views/masterDataManagement/Process/ProcessOperationWorkstationMapping.vue
@@ -39,8 +39,10 @@
v-if="columns.showColumn('fkOperationCode')" />
-
+
+
有效
@@ -115,15 +117,15 @@
-
-
-
-
-
+
+
+
+
+
+
+
-