diff --git a/src/api/wms/product.js b/src/api/wms/product.js
index 9a8a974..f580eb9 100644
--- a/src/api/wms/product.js
+++ b/src/api/wms/product.js
@@ -55,3 +55,12 @@ export function delProduct(productId) {
method: 'delete'
});
}
+
+// 修改物料信息
+export function updateProductAttached(data) {
+ return request({
+ url: '/wms/attached',
+ method: 'put',
+ data: data
+ });
+}
diff --git a/src/views/wms/product/index.vue b/src/views/wms/product/index.vue
index 5b00c47..a8fa9e8 100644
--- a/src/views/wms/product/index.vue
+++ b/src/views/wms/product/index.vue
@@ -62,6 +62,18 @@
>修改
+
+ 修改附属属性
+
同步物料工艺
+ >同步物料工艺
@@ -420,93 +432,120 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- {{
- form.productCode
- }}
- {{
- form.productDescZh
- }}
-
- {{
- form.productGroup
- }}
- {{
- form.productGroupName
- }}
- {{
- form.mtart
- }}
- {{
- form.reportRate
- }}
- {{
- form.category
- }}
- {{
- form.pc
- }}
- {{
- form.iei
- }}
- {{
- form.manStandar
- }}
- {{
- form.sprayWay
- }}
- {{
- form.blankDiameter
- }}
- {{
- form.blankNo
- }}
- {{
- form.sprayVolume
- }}
- {{
- form.liquidNo
- }}
- {{
- form.endometrialDosage
- }}
- {{
- form.outerFilmDosage
- }}
- {{
- form.support
- }}
- {{
- form.supportNo
- }}
- {{
- form.pvc
- }}
- {{
- form.supportPlate
- }}
- {{
- form.other
- }}
-
+ {{
+ form.productGroup
+ }}
+ {{
+ form.productGroupName
+ }}
+ {{
+ form.mtart
+ }}
+ {{
+ form.reportRate
+ }}
+ {{
+ form.category
+ }}
+ {{
+ form.pc
+ }}
+ {{
+ form.iei
+ }}
+ {{
+ form.manStandar
+ }}
+ {{
+ form.sprayWay
+ }}
+ {{
+ form.blankDiameter
+ }}
+ {{
+ form.blankNo
+ }}
+ {{
+ form.sprayVolume
+ }}
+ {{
+ form.liquidNo
+ }}
+ {{
+ form.endometrialDosage
+ }}
+ {{
+ form.outerFilmDosage
+ }}
+ {{
+ form.support
+ }}
+ {{
+ form.supportNo
+ }}
+ {{
+ form.pvc
+ }}
+ {{
+ form.supportPlate
+ }}
+ {{
+ form.other
+ }}
+
@@ -519,6 +558,7 @@ import {
delProduct,
addProduct,
updateProduct,
+ updateProductAttached,
} from "@/api/wms/product";
import { syncProductSAP } from "@/api/technology/proroute";
@@ -537,7 +577,7 @@ export default {
loading: true,
// 选中数组
ids: [],
- productCodes:[],
+ productCodes: [],
// 非单个禁用
single: true,
// 非多个禁用
@@ -552,6 +592,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
+ openAttachedView: false,
openAttached: false,
// 查询参数
queryParams: {
@@ -637,14 +678,22 @@ export default {
this.open = false;
this.reset();
},
- // 取消按钮
- cancelAttached() {
+ // 查看取消按钮
+ cancelAttachedView() {
+ this.openAttachedView = false;
+ this.reset();
+ },
+ // 更新附属表取消按钮
+ cancelOpenAttached() {
this.openAttached = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
+ id: null,
+ iei: null,
+ manStandar: null,
productId: null,
productCode: null,
productDescZh: null,
@@ -704,7 +753,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.productId);
- this.productCodes = selection.map(item => item.productCode)
+ this.productCodes = selection.map((item) => item.productCode);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -724,16 +773,18 @@ export default {
this.title = "修改产品信息";
});
},
+
// 查询明细按钮操作
handleView(row) {
this.reset();
const productId = row.productId || this.ids;
getProduct(productId).then((response) => {
this.form = response.data;
- this.openAttached = true;
+ this.openAttachedView = true;
this.title = "查看产品信息";
});
},
+
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
@@ -754,6 +805,37 @@ export default {
}
});
},
+
+ /** 修改按钮操作 */
+ handleUpdateAttached(row) {
+ this.reset();
+ const productId = row.productId || this.ids;
+ getProduct(productId).then((response) => {
+ this.form.id = response.data.id;
+ this.form.iei = response.data.iei;
+ this.form.manStandar = response.data.manStandar;
+ this.openAttached = true;
+ this.title = "查看产品信息";
+ });
+ },
+
+ /** 提交按钮 */
+ submitAttachedForm() {
+ this.$refs["form"].validate((valid) => {
+ console.log(this.form);
+ if (valid) {
+ if (this.form.id != null) {
+ console.log(this.form);
+ updateProductAttached(this.form).then((response) => {
+ this.$modal.msgSuccess("修改产品附属信息成功");
+ this.openAttached = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+
/** 删除按钮操作 */
handleDelete(row) {
const productIds = row.productId || this.ids;
@@ -781,10 +863,10 @@ export default {
);
},
/**选择产品进行工艺同步**/
- handleSyncProductSAP(){
+ handleSyncProductSAP() {
const productCodes = this.productCodes;
return syncProductSAP(productCodes);
- }
+ },
},
};