diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js
index f8ea06b4..f040f893 100644
--- a/src/api/model/mtm.js
+++ b/src/api/model/mtm.js
@@ -590,4 +590,40 @@ export default {
},
},
},
+ //工装
+ tooling: {
+ list: {
+ name: "列表",
+ req: async function (data) {
+ return await http.get(`${config.API_URL}/mtm/tooling/`, data);
+ },
+ },
+ item: {
+ name: "详情",
+ req: async function (id) {
+ return await http.get(`${config.API_URL}/mtm/tooling/${id}/`);
+ },
+ },
+ create: {
+ name: "创建",
+ req: async function (data) {
+ return await http.post(`${config.API_URL}/mtm/tooling/`, data);
+ },
+ },
+ update: {
+ name: "更新",
+ req: async function (id, data) {
+ return await http.put(
+ `${config.API_URL}/mtm/tooling/${id}/`,
+ data
+ );
+ },
+ },
+ delete: {
+ name: "删除",
+ req: async function (id) {
+ return await http.delete(`${config.API_URL}/mtm/tooling/${id}/`);
+ },
+ },
+ },
};
diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js
index e199471d..d17e14f8 100644
--- a/src/api/model/wpm.js
+++ b/src/api/model/wpm.js
@@ -683,6 +683,12 @@ export default {
return await http.get(`${config.API_URL}/wpmw/wpr/${id}/`);
},
},
+ update:{
+ name: "更新",
+ req: async function (id,data) {
+ return await http.patch(`${config.API_URL}/wpmw/wpr/${id}/`, data);
+ },
+ },
newNumber: {
name: "最新编号",
req: async function (data) {
diff --git a/src/views/em/tooling.vue b/src/views/em/tooling.vue
new file mode 100644
index 00000000..401c3200
--- /dev/null
+++ b/src/views/em/tooling.vue
@@ -0,0 +1,116 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/em/tooling_form.vue b/src/views/em/tooling_form.vue
new file mode 100644
index 00000000..2d5d8cdc
--- /dev/null
+++ b/src/views/em/tooling_form.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
diff --git a/src/views/wpm_bx/wprList.vue b/src/views/wpm_bx/wprList.vue
index f6d8dc50..aa426fe0 100644
--- a/src/views/wpm_bx/wprList.vue
+++ b/src/views/wpm_bx/wprList.vue
@@ -74,7 +74,7 @@
clearable
size="small"
style="width:100%"
- @change="handleToolingChange(scope.row, scope.row.tooling)"
+ @change="handleToolingChange(scope.row)"
>
{
+ that.$API.mtm.tooling.list.req({ page: 0}).then((res) => {
that.toolingOptions = Array.isArray(res) ? res : (res.results || []);
});
},
- handleToolingChange(row, toolingId){
+ handleToolingChange(row){
let that = this;
- that.$API.wpm.wpr.patch.req(row.id, { tooling: toolingId || null }).then(() => {
+ that.$API.wpm.wpr.update.req(row.id,{tooling:row.tooling}).then(() => {
that.$message.success("工装更新成功");
});
},