|
@@ -40,7 +40,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="设计图" align="center" width="100">
|
|
|
+ <!-- <el-table-column label="设计图" align="center" width="100">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-form-item :prop="'skuSpecList.' + $index + '.designImgUrl'">
|
|
|
<el-upload
|
|
@@ -59,7 +59,7 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column label="品名" min-width="220">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-form-item :prop="'skuSpecList.' + $index + '.name'" :rules="rulesSpec.name" :inline-message="true" style="width: 100%">
|
|
@@ -74,6 +74,11 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="图稿文件" align="center" width="160">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-button type="primary" @click="clickDrawingFile($index)" text>选择</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="加工版面" width="140">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-form-item :prop="'skuSpecList.' + $index + '.machinedPanel'" style="width: 100%">
|
|
@@ -83,7 +88,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="尺寸(长宽高,cm)" align="center" width="300">
|
|
|
+ <el-table-column label="尺寸(长宽高,cm)" align="center" width="280">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
@@ -200,6 +205,13 @@
|
|
|
<el-button @click="openBOM = false" size="large">关 闭</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="选择BOM" v-if="openDrawingFile" v-model="openDrawingFile" width="70%">
|
|
|
+ <SelectPicture @selectPic="selectPic"></SelectPicture>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openDrawingFile = false" size="large">关 闭</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -208,6 +220,7 @@ import byForm from "@/components/byForm/index";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import Editor from "@/components/Editor/index.vue";
|
|
|
import SelectBOM from "@/views/group/BOM/management/index";
|
|
|
+import SelectPicture from "@/components/select-picture/index.vue";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const emit = defineEmits(["clickCancel"]);
|
|
@@ -422,18 +435,18 @@ const uploadFile = async (file) => {
|
|
|
const handleSuccess = (uploadFile, index) => {
|
|
|
formData.data.skuSpecList[index].specImgUrl = uploadFile.raw.fileUrl;
|
|
|
};
|
|
|
-const uploadDesignData = ref({});
|
|
|
-const uploadDesignFile = async (file) => {
|
|
|
- const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
|
- uploadDesignData.value = res.uploadBody;
|
|
|
- file.id = res.id;
|
|
|
- file.fileName = res.fileName;
|
|
|
- file.fileUrl = res.fileUrl;
|
|
|
- return true;
|
|
|
-};
|
|
|
-const handleDesignSuccess = (uploadFile, index) => {
|
|
|
- formData.data.skuSpecList[index].designImgUrl = uploadFile.raw.fileUrl;
|
|
|
-};
|
|
|
+// const uploadDesignData = ref({});
|
|
|
+// const uploadDesignFile = async (file) => {
|
|
|
+// const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
|
+// uploadDesignData.value = res.uploadBody;
|
|
|
+// file.id = res.id;
|
|
|
+// file.fileName = res.fileName;
|
|
|
+// file.fileUrl = res.fileUrl;
|
|
|
+// return true;
|
|
|
+// };
|
|
|
+// const handleDesignSuccess = (uploadFile, index) => {
|
|
|
+// formData.data.skuSpecList[index].designImgUrl = uploadFile.raw.fileUrl;
|
|
|
+// };
|
|
|
const clickDelete = (index) => {
|
|
|
formData.data.skuSpecList.splice(index, 1);
|
|
|
};
|
|
@@ -521,6 +534,17 @@ const clickRemoveBOM = (index) => {
|
|
|
formData.data.skuSpecList[index].bomSpecId = "";
|
|
|
formData.data.skuSpecList[index].bomSpecName = "";
|
|
|
};
|
|
|
+const drawingFileIndex = ref(0);
|
|
|
+const openDrawingFile = ref(false);
|
|
|
+const clickDrawingFile = (index) => {
|
|
|
+ drawingFileIndex.value = index;
|
|
|
+ openDrawingFile.value = true;
|
|
|
+};
|
|
|
+const selectPic = (row) => {
|
|
|
+ console.log(row);
|
|
|
+ ElMessage({ message: "选择完成", type: "success" });
|
|
|
+ openDrawingFile.value = false;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|