From 1932a62477dfc3a7e604918c29d0d0d3bfa9c9d8 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期六, 25 四月 2026 15:07:19 +0800
Subject: [PATCH] 阳光印刷web 销售订单查询 客户往来调整间距
---
src/views/productionManagement/productionOrder/BindRouteDialog.vue | 90 +++++++++++++++++++++++++++-----------------
1 files changed, 55 insertions(+), 35 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/BindRouteDialog.vue b/src/views/productionManagement/productionOrder/BindRouteDialog.vue
index 1922689..c09754a 100644
--- a/src/views/productionManagement/productionOrder/BindRouteDialog.vue
+++ b/src/views/productionManagement/productionOrder/BindRouteDialog.vue
@@ -45,8 +45,9 @@
<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>
@@ -58,14 +59,14 @@
</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"
@@ -89,7 +90,7 @@
: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"
@@ -128,8 +129,19 @@
</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;"
>
@@ -143,9 +155,9 @@
</el-descriptions-item>
</el-descriptions>
<!-- ================= 鍒囨枡鍥剧ず ================= -->
- <div class="section-title" v-if="formData.cuttingFileVo.length > 0">鍒囨枡鍥剧ず</div>
+ <div class="section-title" v-if="type === 'add' || (type === 'detail' && formData.cuttingFileVo.length > 0)">鍒囨枡鍥剧ず</div>
<ActionFileUpload
- v-if="formData.cuttingFileVo.length > 0"
+ v-if="type === 'add' || (type === 'detail' && formData.cuttingFileVo.length > 0)"
style="width: 50%;float: left;"
v-model:file-list="formData.cuttingFileVo"
:action="upload.url"
@@ -159,7 +171,7 @@
:onDownload="onDownload"
:onRemove="onRemove"
:onPreview="onPreview"
- :onView="type === 'detail' ? false : true"
+ :onView="type!=='detail'"
:tip-text="type === 'detail' ? '' : '鏀寔鍥剧墖锛坖pg, jpeg, png锛夋牸寮�'"
/>
<el-image
@@ -180,7 +192,7 @@
<el-input v-model="formData.cutNum" placeholder="鍒囨枡灏哄" :disabled="isDetail" />
</el-descriptions-item>
<el-descriptions-item label="鍒囨枡鏁伴噺" align="center">
- <el-input v-model="formData.cutSize" placeholder="鍒囨枡灏哄" :disabled="isDetail" />
+ <el-input v-model="formData.cutSize" placeholder="鍒囨枡鏁伴噺" :disabled="isDetail" />
</el-descriptions-item>
<el-descriptions-item label="涓洅鏁伴噺" align="center">
<el-input v-model="formData.mediumBoxQty" placeholder="涓洅鏁伴噺" :disabled="isDetail" />
@@ -388,18 +400,18 @@
</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";
-import { list } from "@/api/productionManagement/productionProcess.js"
-import { modelList, productTreeList } from "@/api/basicData/product.js"
+import {list} from "@/api/productionManagement/productionProcess.js"
+import {modelList, productTreeList} from "@/api/basicData/product.js"
import {getSalesLedgerWithProducts} from "@/api/salesManagement/salesLedger.js"
-import { getDeviceLedger } from "@/api/equipmentManagement/ledger.js"
-import { userListNoPageByTenantId } from "@/api/system/user.js"
-import { getToken } from "@/utils/auth";
+import {getDeviceLedger} from "@/api/equipmentManagement/ledger.js"
+import {userListNoPageByTenantId} from "@/api/system/user.js"
+import {getToken} from "@/utils/auth";
import filePreview from '@/components/filePreview/index.vue'
-import { ElMessage } from "element-plus";
+import {ElMessage} from "element-plus";
const props = defineProps({
modelValue: {
@@ -439,6 +451,10 @@
headers: { Authorization: 'Bearer ' + getToken() }
})
+const showCuttingFile = computed(() => {
+ return props.type === 'detail' && Array.isArray(formData.cuttingFileVo) && formData.cuttingFileVo.length > 0
+})
+
const filePreviewRef = ref()
const formData = reactive({
productOrderList:null,
@@ -450,6 +466,7 @@
no: "",
productName: "",
productDescription: "",
+ cuttingDiagramCheckout:"",
clientName: "",
finishedSize: "",
cutNum: "",
@@ -472,7 +489,6 @@
],
processContent: [
{
- id: "1",
processId: "",
processName: "",
mediumBoxQty: "",
@@ -488,7 +504,6 @@
],
materialInfo: [
{
- id: "1",
productId: "",
name: "",
productModelId: "",
@@ -517,7 +532,6 @@
})
const getUploadFileUrl = (file) => {
- console.log("file", file)
const response = file?.response
const data = response?.data
if (Array.isArray(data) && data.length) {
@@ -547,6 +561,7 @@
no: "",
productName: "",
productDescription: "",
+ cuttingDiagramCheckout:"骞冲紶",
clientName: "",
finishedSize: "",
cutNum: "",
@@ -569,7 +584,6 @@
],
processContent: [
{
- id: "1",
processId: "",
processName: "",
mediumBoxQty: "",
@@ -585,7 +599,6 @@
],
materialInfo: [
{
- id: "1",
productId: "",
name: "",
productModelId: "",
@@ -642,7 +655,6 @@
}
const resolveFileUrl = (rawUrl) => {
- console.log("rawUrl", rawUrl)
const u = String(rawUrl || "")
if (!u) return ""
if (/^(https?:)?\/\//i.test(u)) return u
@@ -655,7 +667,6 @@
// 鏂囦欢棰勮/涓嬭浇
const onDownload = (file) => {
- console.log(file)
const url = resolveFileUrl(getUploadFileUrl(file))
if (!url) return
proxy?.$modal?.loading?.("姝e湪涓嬭浇鏂囦欢锛岃绋嶅��...")
@@ -727,7 +738,6 @@
if(res){
formData.productOrderList = res
}
- console.log(formData)
})
}
@@ -796,11 +806,9 @@
}
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 || ""
@@ -824,21 +832,34 @@
}))
}
-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) => {
@@ -873,7 +894,6 @@
const addProcessRow = () => {
formData.processContent.push({
- id: Date.now().toString(),
processId: "",
processName: "",
openCount: "",
--
Gitblit v1.9.3