| | |
| | | <el-descriptions-item label="单据类型" :span="2" align="center"> |
| | | <el-checkbox-group v-model="introductionLetterList" :disabled="isDetail"> |
| | | <el-checkbox label="介绍信" value="介绍信" /> |
| | | <el-checkbox label="商标注册书" value="商标注册书" /> |
| | | <el-checkbox label="商标注册" value="商标注册" /> |
| | | <el-checkbox label="委印单" value="委印单" /> |
| | | <el-checkbox label="书号" value="书号" /> |
| | | </el-checkbox-group> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | |
| | | </div> |
| | | <el-table border :data="formData.materialInfo" style="width: 100%"> |
| | | <el-table-column label="材料名称"> |
| | | <template #default="{ row }" > |
| | | <template #default="{ row, $index }" > |
| | | <el-tree-select |
| | | v-if="!isDetail" |
| | | v-model="row.productById" |
| | | placeholder="请选择" |
| | | clearable |
| | | check-strictly |
| | | @change="(val) => getModels(val, row)" |
| | | @change="(val) => getModels(val, row, $index)" |
| | | :data="productOptions" |
| | | :render-after-expand="false" |
| | | :disabled="isDetail" |
| | |
| | | :disabled="isDetail" |
| | | > |
| | | <el-option |
| | | v-for="item in row.modelOptions || []" |
| | | v-for="item in row.modelOptions" |
| | | :key="item.id" |
| | | :label="item.model" |
| | | :value="item.id" |
| | |
| | | </el-table> |
| | | <el-descriptions border :column="2" :span="2"> |
| | | <el-descriptions-item |
| | | label="注意事项" |
| | | :span="2" |
| | | label="切料图示选择" |
| | | :span="1" |
| | | align="center" |
| | | style="white-space: pre-line; word-break: break-all; min-height: 60px;" |
| | | > |
| | | <el-radio-group v-model="formData.cuttingDiagramCheckout"> |
| | | <el-radio value="平张">平张</el-radio> |
| | | <el-radio value="卷筒">卷筒</el-radio> |
| | | </el-radio-group> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="切料注意事项" |
| | | :span="1" |
| | | align="center" |
| | | style="white-space: pre-line; word-break: break-all; min-height: 60px;" |
| | | > |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, computed, onMounted, watch, getCurrentInstance } from 'vue' |
| | | import {computed, getCurrentInstance, onMounted, reactive, ref, watch} from 'vue' |
| | | import dayjs from 'dayjs' |
| | | import FormDialog from '@/components/Dialog/FormDialog.vue' |
| | | import ActionFileUpload from "@/components/Upload/ActionFileUpload.vue"; |
| | |
| | | }) |
| | | |
| | | const getUploadFileUrl = (file) => { |
| | | console.log("file", file) |
| | | const response = file?.response |
| | | const data = response?.data |
| | | if (Array.isArray(data) && data.length) { |
| | |
| | | } |
| | | |
| | | const resolveFileUrl = (rawUrl) => { |
| | | console.log("rawUrl", rawUrl) |
| | | const u = String(rawUrl || "") |
| | | if (!u) return "" |
| | | if (/^(https?:)?\/\//i.test(u)) return u |
| | |
| | | |
| | | // 文件预览/下载 |
| | | const onDownload = (file) => { |
| | | console.log(file) |
| | | const url = resolveFileUrl(getUploadFileUrl(file)) |
| | | if (!url) return |
| | | proxy?.$modal?.loading?.("正在下载文件,请稍候...") |
| | |
| | | if(res){ |
| | | formData.productOrderList = res |
| | | } |
| | | console.log(formData) |
| | | }) |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | const handleProcessChange = (val, row) => { |
| | | console.log(row) |
| | | const process = processOptions.value.find(item => item.id === val) |
| | | if (process) { |
| | | row.processName = process.name |
| | | console.log(process) |
| | | if (process.deviceId) { |
| | | row.deviceId = process.deviceId || "" |
| | | row.deviceName = process.deviceName || "" |
| | |
| | | })) |
| | | } |
| | | |
| | | const getModels = (val, row) => { |
| | | const getModels = async (val, row, index) => { |
| | | const targetRow = formData.materialInfo[index] |
| | | row.productId = val || "" |
| | | row.productById = val || "" |
| | | row.productName = row.name || "" |
| | | row.name = val ? findProductLabelById(productOptions.value, val) : "" |
| | | |
| | | row.productModelId = "" |
| | | row.model = "" |
| | | row.unit = "" |
| | | row.modelOptions = [] |
| | | if (!val) { |
| | | return |
| | | |
| | | if (!val) return |
| | | |
| | | const res = await modelList({ id: val }) |
| | | formData.materialInfo[index] = { |
| | | ...targetRow, |
| | | modelOptions: Array.isArray(res) ? res : |
| | | Array.isArray(res?.data) ? res.data : |
| | | Array.isArray(res?.rows) ? res.rows : |
| | | Array.isArray(res?.data?.records) ? res.data.records : |
| | | [] |
| | | } |
| | | modelList({ id: val }).then(res => { |
| | | row.modelOptions = Array.isArray(res) ? res : Array.isArray(res?.data) ? res.data : [] |
| | | }) |
| | | // row.modelOptions = Array.isArray(res) ? res : |
| | | // Array.isArray(res?.data) ? res.data : |
| | | // Array.isArray(res?.rows) ? res.rows : |
| | | // Array.isArray(res?.data?.records) ? res.data.records : |
| | | // [] |
| | | |
| | | } |
| | | |
| | | const handleMaterialModelChange = (val, row) => { |