| | |
| | | data: data, |
| | | }); |
| | | } |
| | | // 工艺路线参数修改 |
| | | // 工艺路线参数删除 |
| | | export function delProcessRouteItemParam(id) { |
| | | return request({ |
| | | url: `/ProcessRouteItemParam/remove/${id}`, |
| | |
| | | // 列表查询 |
| | | export function findProductProcessRouteItemList(query) { |
| | | return request({ |
| | | url: "/productProcessRoute/list", |
| | | url: `/processRouteItemInstance/list/${query.orderId}`, |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // 列表查询-生产订单 |
| | | export function findProcessRouteItemInstanceList(query) { |
| | | return request({ |
| | | url: `/processRouteItemInstance/list/${query.orderId}`, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | |
| | | export function addOrUpdateProductProcessRouteItem(data) { |
| | | return request({ |
| | | url: "/productProcessRoute/updateRouteItem", |
| | | method: "post", |
| | | url: "/processRouteItemInstance/update", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | |
| | | // 生产订单下:新增工艺路线项目 |
| | | export function addRouteItem(data) { |
| | | return request({ |
| | | url: "/productProcessRoute/addRouteItem", |
| | | url: "/processRouteItemInstance/add", |
| | | method: "post", |
| | | data, |
| | | }); |
| | |
| | | // 删除工艺路线项目(路由后拼接 id) |
| | | export function deleteRouteItem(id) { |
| | | return request({ |
| | | url: `/productProcessRoute/deleteRouteItem/${id}`, |
| | | url: `/processRouteItemInstance/delete/${id}`, |
| | | method: "delete", |
| | | }); |
| | | } |
| | |
| | | data, |
| | | }); |
| | | } |
| | | // 获取工序参数列表-生产订单 |
| | | export function findProcessParamListOrder(query) { |
| | | return request({ |
| | | url: `/processRouteItemParamInstance/list`, |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // 工艺路线参数新增-生产订单 |
| | | export function addProcessRouteItemParamOrder(data) { |
| | | return request({ |
| | | url: "/processRouteItemParamInstance/add", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | // 工艺路线参数修改-生产订单 |
| | | export function editProcessRouteItemParamOrder(data) { |
| | | return request({ |
| | | url: "/processRouteItemParamInstance/update", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | // 工艺路线参数删除-生产订单 |
| | | export function delProcessRouteItemParamOrder(id) { |
| | | return request({ |
| | | url: `/processRouteItemParamInstance/delete/${id}`, |
| | | method: "delete", |
| | | }); |
| | | } |
| | |
| | | // 生产订单-绑定工艺路线 |
| | | export function bindingRoute(data) { |
| | | return request({ |
| | | url: "/productOrder/bindingRoute", |
| | | url: "/appendix/bindingRoute", |
| | | method: "post", |
| | | data, |
| | | }); |
| | |
| | | <el-table-column align="center" |
| | | type="selection" |
| | | width="55" |
| | | v-if="isSelection" /> |
| | | v-if="isSelection" |
| | | :selectable="selectable" /> |
| | | <el-table-column align="center" |
| | | label="序号" |
| | | type="index" |
| | |
| | | type: [String, Object], |
| | | default: () => ({ width: "100%" }), |
| | | }, |
| | | selectable: { |
| | | type: Function, |
| | | default: () => true, |
| | | }, |
| | | }); |
| | | |
| | | // Data |
| | |
| | | placeholder="请输入排序" /> |
| | | </el-form-item> |
| | | <el-form-item label="是否必填"> |
| | | <el-switch v-model="selectedParam.isRequired" /> |
| | | <el-switch :active-value="true" |
| | | :inactive-value="false" |
| | | v-model="selectedParam.isRequired" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-empty v-else |
| | |
| | | editProcessRouteItemParam, |
| | | addProcessRouteItemParam, |
| | | } from "@/api/productionManagement/processRouteItem.js"; |
| | | import { |
| | | addProcessRouteItemParamOrder, |
| | | delProcessRouteItemParamOrder, |
| | | editProcessRouteItemParamOrder, |
| | | } from "@/api/productionManagement/productProcessRoute.js"; |
| | | |
| | | import { getBaseParamList } from "@/api/basicData/parameterMaintenance.js"; |
| | | |
| | | const props = defineProps({ |
| | |
| | | editable: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | orderId: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | pageType: { |
| | | type: String, |
| | | default: "route", |
| | | }, |
| | | }); |
| | | |
| | |
| | | minValue: null, |
| | | maxValue: null, |
| | | sort: 1, |
| | | isRequired: 0, |
| | | isRequired: false, |
| | | paramType: null, |
| | | paramFormat: "", |
| | | unit: "", |
| | |
| | | minValue: param.minValue, |
| | | maxValue: param.maxValue, |
| | | sort: param.sort || 1, |
| | | isRequired: param.isRequired || 0, |
| | | isRequired: param.isRequired || false, |
| | | paramType: param.parameterType || param.paramType, |
| | | paramFormat: param.parameterFormat || param.paramFormat, |
| | | unit: param.unit || param.unit, |
| | |
| | | }) |
| | | .then(() => { |
| | | // 调用API删除参数 |
| | | if (props.pageType === "order") { |
| | | delProcessRouteItemParamOrder(param.id) |
| | | .then(res => { |
| | | ElMessage.success("删除成功"); |
| | | emit("refresh"); |
| | | }) |
| | | .catch(err => { |
| | | ElMessage.error("删除参数失败"); |
| | | console.error("删除参数失败:", err); |
| | | }); |
| | | } else { |
| | | delProcessRouteItemParam(param.id) |
| | | .then(res => { |
| | | ElMessage.success("删除成功"); |
| | |
| | | ElMessage.error("删除参数失败"); |
| | | console.error("删除参数失败:", err); |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | |
| | | } |
| | | |
| | | // 判断参数类型,只有数值类型才传标准值、最大值和最小值 |
| | | const isNumericMode = selectedParam.value.valueMode === 1; |
| | | |
| | | const isNumericMode = selectedParam.value.paramType == 1; |
| | | console.log(isNumericMode, "isNumericMode"); |
| | | // 调用API新增参数 |
| | | addProcessRouteItemParam({ |
| | | routeItemId: props.process.id, |
| | | if (props.pageType === "order") { |
| | | addProcessRouteItemParamOrder({ |
| | | orderId: Number(props.orderId), |
| | | processId: props.process.id, |
| | | routeItemId: Number(props.routeId), |
| | | paramId: selectedParam.value.id, |
| | | standardValue: isNumericMode ? selectedParam.value.standardValue || "" : "", |
| | | standardValue: isNumericMode |
| | | ? selectedParam.value.standardValue || "" |
| | | : "", |
| | | minValue: isNumericMode ? selectedParam.value.minValue || 0 : null, |
| | | maxValue: isNumericMode ? selectedParam.value.maxValue || 0 : null, |
| | | isRequired: selectedParam.value.isRequired || 0, |
| | | isRequired: selectedParam.value.isRequired || false, |
| | | sort: selectedParam.value.sort || 1, |
| | | }) |
| | | .then(res => { |
| | |
| | | ElMessage.error("添加参数失败"); |
| | | console.error("添加参数失败:", err); |
| | | }); |
| | | } else { |
| | | addProcessRouteItemParam({ |
| | | routeItemId: props.process.id, |
| | | paramId: selectedParam.value.id, |
| | | standardValue: isNumericMode |
| | | ? selectedParam.value.standardValue || "" |
| | | : "", |
| | | minValue: isNumericMode ? selectedParam.value.minValue || 0 : null, |
| | | maxValue: isNumericMode ? selectedParam.value.maxValue || 0 : null, |
| | | isRequired: selectedParam.value.isRequired || false, |
| | | sort: selectedParam.value.sort || 1, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("添加参数成功"); |
| | | selectParamDialogVisible.value = false; |
| | | emit("refresh"); |
| | | } else { |
| | | ElMessage.error(res.msg || "添加参数失败"); |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | ElMessage.error("添加参数失败"); |
| | | console.error("添加参数失败:", err); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // 提交编辑参数 |
| | |
| | | editParamFormRef.value.validate(valid => { |
| | | if (valid) { |
| | | // 判断参数类型,只有数值类型才传标准值、最大值和最小值 |
| | | const isNumericMode = editParamForm.value.valueMode == 1; |
| | | |
| | | // 调用API修改参数 |
| | | editProcessRouteItemParam({ |
| | | const isNumericMode = editParamForm.value.paramType == 1; |
| | | console.log(isNumericMode, "isNumericMode"); |
| | | if (props.pageType === "order") { |
| | | editProcessRouteItemParamOrder({ |
| | | id: editParamForm.value.id, |
| | | routeItemId: props.process.id, |
| | | paramId: editParamForm.value.paramId, |
| | | // routeItemId: props.process.id, |
| | | // paramId: editParamForm.value.paramId, |
| | | standardValue: isNumericMode |
| | | ? editParamForm.value.standardValue || "" |
| | | : "", |
| | | minValue: isNumericMode ? editParamForm.value.minValue || 0 : null, |
| | | maxValue: isNumericMode ? editParamForm.value.maxValue || 0 : null, |
| | | isRequired: editParamForm.value.isRequired || 0, |
| | | isRequired: editParamForm.value.isRequired || false, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | |
| | | ElMessage.error("编辑参数失败"); |
| | | console.error("编辑参数失败:", err); |
| | | }); |
| | | } else { |
| | | // 调用API修改参数 |
| | | editProcessRouteItemParam({ |
| | | id: editParamForm.value.id, |
| | | routeItemId: props.process.id, |
| | | paramId: editParamForm.value.paramId, |
| | | standardValue: isNumericMode |
| | | ? editParamForm.value.standardValue || "" |
| | | : "", |
| | | minValue: isNumericMode ? editParamForm.value.minValue || 0 : null, |
| | | maxValue: isNumericMode ? editParamForm.value.maxValue || 0 : null, |
| | | isRequired: editParamForm.value.isRequired || false, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("编辑成功"); |
| | | editParamDialogVisible.value = false; |
| | | emit("refresh"); |
| | | } else { |
| | | ElMessage.error(res.msg || "编辑失败"); |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | ElMessage.error("编辑参数失败"); |
| | | console.error("编辑参数失败:", err); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | |
| | | minValue: null, |
| | | maxValue: null, |
| | | sort: 1, |
| | | isRequired: 0, |
| | | isRequired: false, |
| | | paramType: null, |
| | | paramFormat: "", |
| | | unit: "", |
| | |
| | | gap: 20px; |
| | | } |
| | | .left { |
| | | width: 465px; |
| | | min-width: 465px; |
| | | width: 35%; |
| | | min-width: 35%; |
| | | background: #ffffff; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | |
| | | } |
| | | .search_form { |
| | | :deep(.el-form-item) { |
| | | margin-bottom: 0px !important; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | } |
| | | .search_form { |
| | | :deep(.el-form-item) { |
| | | margin-bottom: 0px !important; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :value="option.dictCode" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态:"> |
| | | <el-select v-model="searchForm.status" |
| | | style="width: 200px;" |
| | | placeholder="请选择状态" |
| | | clearable |
| | | @change="handleQuery"> |
| | | <el-option label="已批准" |
| | | :value="true" /> |
| | | <el-option label="草稿" |
| | | :value="false" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" |
| | | @click="handleQuery">搜索</el-button> |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | dictCode: "", |
| | | status: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | prop: "processRouteCode", |
| | | }, |
| | | { |
| | | label: "状态", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | |
| | | formatData: params => { |
| | | if (params) { |
| | | return "已批准"; |
| | | } else { |
| | | return "草稿"; |
| | | } |
| | | }, |
| | | formatType: params => { |
| | | if (params) { |
| | | return "success"; |
| | | } else { |
| | | return "info"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "产品类型", |
| | | prop: "dictLabel", |
| | | }, |
| | |
| | | </el-form-item> |
| | | <el-form-item label="是否质检"> |
| | | <el-tag size="small" |
| | | :type="selectedProcessItem.isQuality ? 'success' : 'info'"> |
| | | {{ selectedProcessItem.isQuality ? '质检' : '非质检' }} |
| | | :type="selectedProcessItem.isQuality == 1 ? 'success' : 'info'"> |
| | | {{ selectedProcessItem.isQuality == 1 ? '质检' : '非质检' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" |
| | |
| | | <el-form-item label="是否质检" |
| | | prop="isQuality"> |
| | | <el-switch v-model="processForm.isQuality" |
| | | :active-value="true" |
| | | inactive-value="false" /> |
| | | :active-value="1" |
| | | :inactive-value="0" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-empty v-else |
| | |
| | | processForm.productName = ""; |
| | | processForm.productModelName = ""; |
| | | processForm.unit = ""; |
| | | processForm.isQuality = row.isQuality || false; |
| | | processForm.isQuality = row.isQuality || 0; |
| | | }; |
| | | |
| | | // 处理工序选择时的产品选择 |
| | |
| | | class="section-header"> |
| | | <div class="section-title">工艺路线项目列表</div> |
| | | <div class="section-actions"> |
| | | <div class="sort-tip">拖拽表格排序</div> |
| | | <el-button icon="Grid" |
| | | @click="toggleView" |
| | | style="margin-right: 10px;"> |
| | |
| | | <el-table-column label="是否质检" |
| | | prop="isQuality"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.isQuality ? 'success' : 'danger'"> |
| | | {{scope.row.isQuality ? '是' : '否' }} |
| | | <el-tag :type="scope.row.isQuality == 1 ? 'success' : 'danger'"> |
| | | {{scope.row.isQuality == 1 ? '是' : '否' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <div class="section-header"> |
| | | <div class="section-title">工艺路线项目列表</div> |
| | | <div class="section-actions"> |
| | | <div class="sort-tip">长按拖拽卡片排序</div> |
| | | <el-button icon="Menu" |
| | | @click="toggleView" |
| | | style="margin-right: 10px;"> |
| | |
| | | <div class="card-process-name">{{ getProcessName(item.processId) || '-' }}</div> |
| | | </div> |
| | | <!-- 产品信息 --> |
| | | <div class="card-content"> |
| | | </div> |
| | | <!-- <div class="card-content"> |
| | | </div> --> |
| | | <!-- 操作按钮 --> |
| | | <div class="card-footer"> |
| | | <el-button type="primary" |
| | |
| | | <el-form-item label="是否质检" |
| | | prop="isQuality"> |
| | | <el-switch v-model="form.isQuality" |
| | | :active-value="true" |
| | | inactive-value="false" /> |
| | | :active-value="1" |
| | | :inactive-value="0" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | <ProcessParamListDialog v-model="showParamListDialog" |
| | | :title="`${currentProcess ? getProcessName(currentProcess.processId) : ''} - 参数列表`" |
| | | :route-id="routeId" |
| | | :editable="false" |
| | | :editable="editable" |
| | | :order-id="orderId" |
| | | :process="currentProcess" |
| | | :page-type="pageType" |
| | | :param-list="paramList" |
| | | @refresh="refreshParamList" /> |
| | | </div> |
| | |
| | | findProductProcessRouteItemList, |
| | | deleteRouteItem, |
| | | addRouteItem, |
| | | findProcessParamListOrder, |
| | | addOrUpdateProductProcessRouteItem, |
| | | sortRouteItem, |
| | | } from "@/api/productionManagement/productProcessRoute.js"; |
| | |
| | | const routeId = computed(() => route.query.id); |
| | | const orderId = computed(() => route.query.orderId); |
| | | const pageType = computed(() => route.query.type); |
| | | const editable = computed(() => route.query.editable === "true"); |
| | | |
| | | const tableLoading = ref(false); |
| | | const tableData = ref([]); |
| | |
| | | productName: "", |
| | | model: "", |
| | | unit: "", |
| | | isQuality: false, |
| | | isQuality: 0, |
| | | }); |
| | | |
| | | const rules = { |
| | |
| | | |
| | | const addPromise = isOrderPage |
| | | ? addRouteItem({ |
| | | productOrderId: orderId.value, |
| | | productRouteId: routeId.value, |
| | | orderId: orderId.value, |
| | | routeId: routeId.value, |
| | | processId: form.value.processId, |
| | | productModelId: form.value.productModelId, |
| | | isQuality: form.value.isQuality, |
| | | dragSort, |
| | | }) |
| | | : addOrUpdateProcessRouteItem({ |
| | | routeId: routeId.value, |
| | |
| | | ? addOrUpdateProductProcessRouteItem({ |
| | | id: form.value.id, |
| | | processId: form.value.processId, |
| | | productModelId: form.value.productModelId, |
| | | isQuality: form.value.isQuality, |
| | | }) |
| | | : addOrUpdateProcessRouteItem({ |
| | |
| | | ghostClass: "sortable-ghost", |
| | | handle: ".process-card", |
| | | filter: ".el-button", |
| | | delay: 500, // 长按500毫秒后开始拖拽 |
| | | onEnd: evt => { |
| | | if (evt.oldIndex === evt.newIndex || !tableData.value[evt.oldIndex]) |
| | | return; |
| | |
| | | const handleViewParams = process => { |
| | | currentProcess.value = process; |
| | | // 调用API获取参数列表 |
| | | if (pageType.value === "order") { |
| | | findProcessParamListOrder({ |
| | | orderId: orderId.value, |
| | | routeItemId: process.id, |
| | | pageNum: 1, |
| | | pageSize: 1000, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | paramList.value = res.data || []; |
| | | } else { |
| | | ElMessage.error(res.msg || "获取参数列表失败"); |
| | | paramList.value = []; |
| | | } |
| | | showParamListDialog.value = true; |
| | | }) |
| | | .catch(err => { |
| | | console.error("获取参数列表失败:", err); |
| | | ElMessage.error("获取参数列表失败"); |
| | | paramList.value = []; |
| | | showParamListDialog.value = true; |
| | | }); |
| | | } else { |
| | | getProcessParamList({ |
| | | routeItemId: process.id, |
| | | pageNum: 1, |
| | |
| | | paramList.value = []; |
| | | showParamListDialog.value = true; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // 刷新参数列表 |
| | | const refreshParamList = () => { |
| | | if (!currentProcess.value) return; |
| | | // 重新调用API获取参数列表 |
| | | if (pageType.value === "order") { |
| | | findProcessParamListOrder({ |
| | | orderId: orderId.value, |
| | | routeItemId: currentProcess.value.id, |
| | | pageNum: 1, |
| | | pageSize: 1000, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | paramList.value = res.data || []; |
| | | } else { |
| | | ElMessage.error(res.msg || "获取参数列表失败"); |
| | | paramList.value = []; |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | console.error("获取参数列表失败:", err); |
| | | ElMessage.error("获取参数列表失败"); |
| | | paramList.value = []; |
| | | }); |
| | | } else { |
| | | getProcessParamList({ |
| | | routeItemId: currentProcess.value.id, |
| | | pageNum: 1, |
| | |
| | | ElMessage.error("获取参数列表失败"); |
| | | paramList.value = []; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | onUnmounted(() => { |
| | |
| | | |
| | | .cards-wrapper { |
| | | display: flex; |
| | | gap: 16px; |
| | | gap: 24px; |
| | | overflow-x: auto; |
| | | padding: 10px 0; |
| | | min-height: 200px; |
| | | /* min-height: 250px; */ |
| | | } |
| | | |
| | | .cards-wrapper::-webkit-scrollbar { |
| | |
| | | |
| | | .process-card { |
| | | flex-shrink: 0; |
| | | width: 220px; |
| | | /* width: 300px; */ |
| | | background: #fff; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| | | padding: 16px; |
| | | border-radius: 12px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); |
| | | /* padding: 30px 24px; */ |
| | | padding: 25px 50px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | cursor: move; |
| | |
| | | } |
| | | |
| | | .process-card:hover { |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); |
| | | transform: translateY(-4px); |
| | | } |
| | | |
| | | .card-header { |
| | | text-align: center; |
| | | margin-bottom: 12px; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .card-number { |
| | | width: 36px; |
| | | height: 36px; |
| | | line-height: 36px; |
| | | width: 60px; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | border-radius: 50%; |
| | | background: #409eff; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-size: 16px; |
| | | margin: 0 auto 8px; |
| | | font-size: 20px; |
| | | margin: 0 auto 16px; |
| | | } |
| | | |
| | | .card-process-name { |
| | | font-size: 14px; |
| | | font-size: 18px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | font-weight: 600; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .card-content { |
| | | flex: 1; |
| | | margin-bottom: 12px; |
| | | min-height: 60px; |
| | | margin-bottom: 20px; |
| | | min-height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .product-info { |
| | | font-size: 13px; |
| | | font-size: 14px; |
| | | color: #666; |
| | | text-align: center; |
| | | width: 100%; |
| | |
| | | } |
| | | |
| | | .product-name { |
| | | margin-bottom: 6px; |
| | | margin-bottom: 8px; |
| | | word-break: break-all; |
| | | line-height: 1.5; |
| | | text-align: center; |
| | |
| | | |
| | | .product-model { |
| | | color: #909399; |
| | | font-size: 12px; |
| | | font-size: 13px; |
| | | word-break: break-all; |
| | | line-height: 1.5; |
| | | text-align: center; |
| | |
| | | } |
| | | |
| | | .product-tag { |
| | | margin: 10px 0; |
| | | margin: 12px 0; |
| | | } |
| | | |
| | | .card-footer { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | padding-top: 12px; |
| | | justify-content: center; |
| | | gap: 20px; |
| | | padding-top: 16px; |
| | | border-top: 1px solid #f0f0f0; |
| | | } |
| | | |
| | | .card-footer .el-button { |
| | | padding: 0; |
| | | font-size: 12px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .card-footer .el-button:nth-child(1) { |
| | | color: #409eff; |
| | | } |
| | | |
| | | .card-footer .el-button:nth-child(2) { |
| | | color: #67c23a; |
| | | } |
| | | |
| | | .card-footer .el-button:nth-child(3) { |
| | | color: #f56c6c; |
| | | } |
| | | |
| | | :deep(.sortable-ghost) { |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .sort-tip { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | margin-left: 8px; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | /* 工艺路线信息卡片样式 */ |
| | | .route-info-card { |
| | |
| | | <el-table-column label="产品类型" |
| | | prop="dictLabel" /> |
| | | </el-table> |
| | | <div v-if="dataValue.isEdit && dataValue.dataList.length == 0" |
| | | <div v-if="dataValue.isEdit" |
| | | style="text-align: center;border: 1px solid #e4e7ed;padding: 10px;transition: all 0.3s ease;cursor: pointer;" |
| | | :class="{'hover-effect': dataValue.isEdit && dataValue.dataList.length == 0}"> |
| | | :class="{'hover-effect': dataValue.isEdit}"> |
| | | <el-button type="primary" |
| | | text |
| | | @click="addItem"> |
| | |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" |
| | | :inline="true"> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input v-model="searchForm.customerName" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="合同号:"> |
| | | <el-input v-model="searchForm.salesContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称:"> |
| | | <el-input v-model="searchForm.productCategory" |
| | | <el-input v-model="searchForm.productName" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格:"> |
| | | <el-input v-model="searchForm.specificationModel" |
| | | <el-input v-model="searchForm.model" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="状态:"> |
| | | <el-select v-model="searchForm.status" |
| | | placeholder="请选择" |
| | | style="width: 160px;" |
| | | @change="handleQuery"> |
| | | <el-option v-for="item in statusOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" |
| | | @click="handleQuery">搜索</el-button> |
| | | <el-button type="primary" |
| | | @click="handleReset">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button type="primary" @click="isShowNewModal = true">新增</el-button> |
| | | <el-button type="danger" @click="handleDelete">删除</el-button> |
| | | <el-button type="danger" |
| | | @click="handleDelete">退回</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | :tableLoading="tableLoading" |
| | | :row-class-name="tableRowClassName" |
| | | :isSelection="true" |
| | | :selectable="row => row.status != 4" |
| | | @selection-change="handleSelectionChange" |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | | <el-progress |
| | | :percentage="toProgressPercentage(row?.completionStatus)" |
| | | <el-progress :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" |
| | | /> |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" /> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <new-product-order v-if="isShowNewModal" |
| | | v-model:visible="isShowNewModal" |
| | | @completed="handleQuery" /> |
| | |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { useRouter } from "vue-router"; |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | | bindingRoute, |
| | | listProcessBom, delProductOrder, |
| | | listProcessBom, |
| | | delProductOrder, |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listPage } from "@/api/productionManagement/processRoute.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import {fileDel} from "@/api/financialManagement/revenueManagement.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | const NewProductOrder = defineAsyncComponent(() => |
| | | import("@/views/productionManagement/productionOrder/New.vue") |
| | | ); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "状态", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | |
| | | formatData: val => { |
| | | const statusMap = { |
| | | 1: "待开始", |
| | | 2: "进行中", |
| | | 3: "已完成", |
| | | 4: "已取消", |
| | | }; |
| | | return statusMap[val] || ""; |
| | | }, |
| | | formatType: val => { |
| | | const statusMap = { |
| | | 1: "error", |
| | | 2: "warning", |
| | | 3: "success", |
| | | 4: "info", |
| | | }; |
| | | return statusMap[val] || "info"; |
| | | }, |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "生产订单号", |
| | | prop: "npsNo", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | prop: "salesContractNo", |
| | | width: '150px', |
| | | }, |
| | | { |
| | | label: "客户名称", |
| | | prop: "customerName", |
| | | width: '200px', |
| | | width: "120px", |
| | | }, |
| | | { |
| | | label: "产品名称", |
| | | prop: "productCategory", |
| | | width: '120px', |
| | | prop: "productName", |
| | | width: "120px", |
| | | }, |
| | | { |
| | | label: "规格", |
| | | prop: "specificationModel", |
| | | width: '120px', |
| | | prop: "model", |
| | | width: "120px", |
| | | }, |
| | | { |
| | | label: "物料编码", |
| | | prop: "materialCode", |
| | | width: "120px", |
| | | }, |
| | | { |
| | | label: "工艺路线编号", |
| | | prop: "processRouteCode", |
| | | width: '200px', |
| | | width: "200px", |
| | | }, |
| | | { |
| | | label: "需求数量", |
| | |
| | | }, |
| | | { |
| | | label: "交付日期", |
| | | prop: "deliveryDate", |
| | | prop: "planCompleteTime", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | width: 300, |
| | | operation: [ |
| | | { |
| | | name: "来源", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showSourceData(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "工艺路线", |
| | | type: "text", |
| | |
| | | { |
| | | name: "绑定工艺路线", |
| | | type: "text", |
| | | showHide: row => !row.processRouteCode, |
| | | showHide: row => !row.routeId, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "产品结构", |
| | | name: "删除", |
| | | type: "text", |
| | | showHide: row => row.status == 4, |
| | | clickFun: row => { |
| | | showProductStructure(row); |
| | | handleDeleteSolo(row); |
| | | }, |
| | | }, |
| | | // { |
| | | // name: "产品结构", |
| | | // type: "text", |
| | | // clickFun: row => { |
| | | // showProductStructure(row); |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | ]); |
| | |
| | | customerName: "", |
| | | salesContractNo: "", |
| | | projectName: "", |
| | | productCategory: "", |
| | | specificationModel: "", |
| | | productName: "", |
| | | model: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | |
| | | // 添加表行类名方法 |
| | | const tableRowClassName = ({ row }) => { |
| | | if (!row.deliveryDate) return ''; |
| | | if (row.isFh) return ''; |
| | | |
| | | const diff = row.deliveryDaysDiff; |
| | | if (diff === 15) { |
| | | return 'yellow'; |
| | | } else if (diff === 10) { |
| | | return 'pink'; |
| | | } else if (diff === 2) { |
| | | return 'purple'; |
| | | } else if (diff < 2) { |
| | | return 'red'; |
| | | } |
| | | // if (!row.planCompleteTime) return ""; |
| | | // if (row.isFh) return ""; |
| | | // const diff = row.deliveryDaysDiff; |
| | | // if (diff === 15) { |
| | | // return "yellow"; |
| | | // } else if (diff === 10) { |
| | | // return "pink"; |
| | | // } else if (diff === 2) { |
| | | // return "purple"; |
| | | // } else if (diff < 2) { |
| | | // return "red"; |
| | | // } |
| | | }; |
| | | |
| | | // 绑定工艺路线弹框 |
| | |
| | | const bindRouteLoading = ref(false); |
| | | const bindRouteSaving = ref(false); |
| | | const routeOptions = ref([]); |
| | | const productTypeOptions = ref([]); |
| | | const bindForm = reactive({ |
| | | orderId: null, |
| | | routeId: null, |
| | |
| | | bindForm.routeId = null; |
| | | bindRouteDialogVisible.value = true; |
| | | routeOptions.value = []; |
| | | if (!row.productModelId) { |
| | | if (!row.model) { |
| | | proxy.$modal.msgWarning("当前订单缺少产品型号,无法查询工艺路线"); |
| | | bindRouteDialogVisible.value = false; |
| | | return; |
| | | } |
| | | bindRouteLoading.value = true; |
| | | const distName = |
| | | row.productName == "板材" |
| | | ? row.productName |
| | | : row.productName + "-" + row.strength; |
| | | |
| | | try { |
| | | const res = await listProcessRoute({ productModelId: row.productModelId }); |
| | | routeOptions.value = res.data || []; |
| | | // 获取产品类型字典 |
| | | const dictRes = await getDicts("product_type"); |
| | | if (dictRes.code === 200) { |
| | | productTypeOptions.value = dictRes.data; |
| | | // 用distName匹配dictLabel,获取dictCode |
| | | const matchedType = productTypeOptions.value.find( |
| | | item => item.dictLabel === distName |
| | | ); |
| | | const dictCode = matchedType ? matchedType.dictCode : row.productType; |
| | | |
| | | // 使用dictCode查询工艺路线列表 |
| | | const res = await listPage({ dictCode, status: true }); |
| | | routeOptions.value = res.data.records || []; |
| | | } |
| | | } catch (e) { |
| | | console.error("获取工艺路线列表失败:", e); |
| | | proxy.$modal.msgError("获取工艺路线列表失败"); |
| | |
| | | bindRouteSaving.value = false; |
| | | } |
| | | }; |
| | | |
| | | const statusOptions = ref([ |
| | | { value: 1, label: "待开始" }, |
| | | { value: 2, label: "进行中" }, |
| | | { value: 3, label: "已完成" }, |
| | | { value: 4, label: "已取消" }, |
| | | ]); |
| | | const handleReset = () => { |
| | | searchForm.value = { |
| | | customerName: "", |
| | | salesContractNo: "", |
| | | projectName: "", |
| | | productName: "", |
| | | model: "", |
| | | status: "", |
| | | }; |
| | | handleQuery(); |
| | | }; |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | |
| | | const showRouteItemModal = async row => { |
| | | const orderId = row.id; |
| | | try { |
| | | const res = await getOrderProcessRouteMain(orderId); |
| | | const data = res.data || {}; |
| | | if (!data || !data.id) { |
| | | proxy.$modal.msgWarning("未找到关联的工艺路线"); |
| | | return; |
| | | } |
| | | router.push({ |
| | | path: "/productionManagement/processRouteItem", |
| | | query: { |
| | | id: data.id, |
| | | processRouteCode: data.processRouteCode || "", |
| | | productName: data.productName || "", |
| | | model: data.model || "", |
| | | bomNo: data.bomNo || "", |
| | | description: data.description || "", |
| | | orderId, |
| | | id: row.routeId, |
| | | processRouteCode: row.processRouteCode || "", |
| | | productName: row.productName || "", |
| | | model: row.model || "", |
| | | bomNo: row.bomNo || "", |
| | | bomId: row.bomId || "", |
| | | description: row.description || "", |
| | | dictLabel: |
| | | row.productName == "板材" |
| | | ? row.productName |
| | | : row.productName + "-" + row.strength, |
| | | orderId: row.id, |
| | | type: "order", |
| | | editable: true, |
| | | }, |
| | | }); |
| | | } catch (e) { |
| | |
| | | }; |
| | | |
| | | const showProductStructure = row => { |
| | | if (!row.processRouteCode) { |
| | | proxy.$modal.msgWarning("请先绑定工艺路线"); |
| | | return; |
| | | } |
| | | router.push({ |
| | | path: "/productionManagement/productStructureDetail", |
| | | query: { |
| | | id: row.id, |
| | | bomNo: row.bomNo || "", |
| | | productName: row.productCategory || "", |
| | | productModelName: row.specificationModel || "", |
| | | productName: row.productName || "", |
| | | productModelName: row.model || "", |
| | | orderId: row.id, |
| | | type: "order", |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | // 查看来源生产计划数据 |
| | | const showSourceData = row => { |
| | | // 这里需要根据实际的API和路由进行调整 |
| | | // 假设生产订单中有生产计划ID字段,比如productionPlanId |
| | | if (row.productionPlanId) { |
| | | // 跳转到生产计划详情页面 |
| | | router.push({ |
| | | path: "/productionManagement/productionPlan", |
| | | query: { |
| | | id: row.productionPlanId, |
| | | }, |
| | | }); |
| | | } else { |
| | | proxy.$modal.msgWarning("当前订单没有关联的生产计划"); |
| | | } |
| | | }; |
| | | |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | const handleSelectionChange = selection => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | const handleDeleteSolo = row => { |
| | | ElMessageBox.confirm("选中的内容将被退回,是否确认退回?", "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProductOrder([row.id]).then(res => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | ids = selectedRows.value.map(item => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("请选择数据"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("选中的内容将被删除,是否确认删除?", "导出", { |
| | | ElMessageBox.confirm("选中的内容将被退回,是否确认退回?", "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | delProductOrder(ids).then((res) => { |
| | | }) |
| | | .then(() => { |
| | | delProductOrder(ids).then(res => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getList(); |
| | | }); |
| | | }).catch(() => { |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/productOrder/export", {...searchForm.value}, "生产订单.xlsx"); |
| | | proxy.download( |
| | | "/productOrder/export", |
| | | { ...searchForm.value }, |
| | | "生产订单.xlsx" |
| | | ); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | |
| | | } |
| | | |
| | | ::v-deep .yellow { |
| | | background-color: #FAF0DE; |
| | | background-color: #faf0de; |
| | | } |
| | | |
| | | ::v-deep .pink { |
| | | background-color: #FAE1DE; |
| | | background-color: #fae1de; |
| | | } |
| | | |
| | | ::v-deep .red { |
| | |
| | | } |
| | | |
| | | ::v-deep .purple{ |
| | | background-color: #F4DEFA; |
| | | background-color: #f4defa; |
| | | } |
| | | </style> |
| | |
| | | {{ process.status ? '启用' : '停用' }} |
| | | </el-tag> |
| | | <el-tag size="small" |
| | | :type="process.isQuality ? 'warning' : 'info'" |
| | | :type="process.isQuality == 1 ? 'warning' : 'info'" |
| | | style="margin-left: 8px"> |
| | | {{ process.isQuality ? '质检' : '非质检' }} |
| | | {{ process.isQuality == 1 ? '质检' : '非质检' }} |
| | | </el-tag> |
| | | </div> |
| | | <span class="param-count">工资定额: ¥{{ process.salaryQuota || 0 }}</span> |
| | |
| | | <el-form-item label="是否质检" |
| | | prop="isQuality"> |
| | | <el-switch v-model="processForm.isQuality" |
| | | :active-value="true" |
| | | inactive-value="false" /> |
| | | :active-value="1" |
| | | :inactive-value="0" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序描述" |
| | | prop="remark"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="是否必填"> |
| | | <el-switch v-model="selectedParam.isRequired" |
| | | :active-value="1" |
| | | :inactive-value="0" /> |
| | | :active-value="true" |
| | | :inactive-value="false" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-empty v-else |
| | |
| | | <el-form-item label="是否必填" |
| | | prop="isRequired"> |
| | | <el-switch v-model="editParamForm.isRequired" |
| | | :active-value="1" |
| | | :inactive-value="0" /> |
| | | :active-value="true" |
| | | :inactive-value="false" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | no: "", |
| | | name: "", |
| | | salaryQuota: null, |
| | | isQuality: false, |
| | | isQuality: 0, |
| | | remark: "", |
| | | status: true, |
| | | }); |
| | |
| | | minValue: null, |
| | | maxValue: null, |
| | | sort: 1, |
| | | isRequired: 0, |
| | | isRequired: false, |
| | | tenantId: 1, |
| | | }); |
| | | const editParamRules = { |
| | |
| | | label: "是否必填", |
| | | prop: "isRequired", |
| | | dataType: "tag", |
| | | formatType: row => (row.isRequired === 1 ? "success" : "info"), |
| | | formatData: row => (row.isRequired === 1 ? "是" : "否"), |
| | | formatType: row => (row.isRequired === true ? "success" : "info"), |
| | | formatData: row => (row.isRequired === true ? "是" : "否"), |
| | | }, |
| | | { |
| | | label: "操作", |
| | |
| | | processForm.no = ""; |
| | | processForm.name = ""; |
| | | processForm.salaryQuota = null; |
| | | processForm.isQuality = false; |
| | | processForm.isQuality = 0; |
| | | processForm.remark = ""; |
| | | processForm.status = true; |
| | | processDialogVisible.value = true; |
| | |
| | | processForm.no = process.no; |
| | | processForm.name = process.name; |
| | | processForm.salaryQuota = process.salaryQuota; |
| | | processForm.isQuality = process.isQuality || false; |
| | | processForm.isQuality = process.isQuality || 0; |
| | | processForm.remark = process.remark || ""; |
| | | processForm.status = process.status; |
| | | processDialogVisible.value = true; |
| | |
| | | editParamForm.minValue = row.minValue; |
| | | editParamForm.maxValue = row.maxValue; |
| | | editParamForm.sort = row.sort || 1; |
| | | editParamForm.isRequired = row.isRequired || 0; |
| | | editParamForm.isRequired = row.isRequired || false; |
| | | editParamForm.tenantId = 1; |
| | | editParamDialogVisible.value = true; |
| | | }; |
| | |
| | | standardValue: selectedParam.value.standardValue, |
| | | minValue: selectedParam.value.minValue, |
| | | maxValue: selectedParam.value.maxValue, |
| | | isRequired: selectedParam.value.isRequired || 0, |
| | | isRequired: selectedParam.value.isRequired || false, |
| | | tenantId: 1, |
| | | }) |
| | | .then(() => { |
| | |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-width: 0; |
| | | } |
| | | |
| | | .param-table-wrapper { |
| | | flex: 1; |
| | | padding: 0 20px 20px; |
| | | overflow: auto; |
| | | min-width: 100%; |
| | | } |
| | | |
| | | /* 表格横向滚动 */ |
| | | :deep(.el-table) { |
| | | // min-width: 800px; |
| | | .param-table-wrapper :deep(.el-table) { |
| | | min-width: 100%; |
| | | } |
| | | |
| | | .param-table-wrapper :deep(.el-table__body-wrapper) { |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | .pagination-container { |
| | | margin-top: 10px; |
| | | overflow-x: auto; |
| | | padding-bottom: 8px; |
| | | } |
| | | |
| | | .pagination-container .el-pagination { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | /* 响应式调整 */ |
| | | @media screen and (max-width: 768px) { |
| | | .pagination-container { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .pagination-container .el-pagination__sizes { |
| | | margin-right: 8px; |
| | | } |
| | | |
| | | .pagination-container .el-pagination__jump { |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .pagination-container .el-pagination__page-size { |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | |
| | | .empty-tip { |
| | |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" |
| | | :inline="true"> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input v-model="searchForm.customerName" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <!-- 简化版搜索条件 --> |
| | | <el-form-item label="产品名称:"> |
| | | <el-input v-model="searchForm.productName" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:"> |
| | | <el-input v-model="searchForm.model" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="物料编码:"> |
| | | <el-input v-model="searchForm.materialCode" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="申请单编号:"> |
| | | <el-input v-model="searchForm.applyNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | |
| | | value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 展开版搜索条件 --> |
| | | <template v-if="searchFormExpanded"> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input v-model="searchForm.customerName" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:"> |
| | | <el-input v-model="searchForm.model" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="物料编码:"> |
| | | <el-input v-model="searchForm.materialCode" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="申请单编号:"> |
| | | <el-input v-model="searchForm.applyNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | </template> |
| | | <el-form-item> |
| | | <el-button type="primary" |
| | | @click="handleQuery">搜索</el-button> |
| | |
| | | </el-form> |
| | | <div> |
| | | </div> |
| | | </div> |
| | | <div class="search-header"> |
| | | <el-button type="text" |
| | | @click="toggleSearchForm"> |
| | | <el-icon> |
| | | <ArrowUp v-if="searchFormExpanded" /> |
| | | <ArrowDown v-else /> |
| | | </el-icon> |
| | | {{ searchFormExpanded ? '收起搜索条件' : '展开搜索条件' }} |
| | | </el-button> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable rowKey="id" |
| | |
| | | <script setup> |
| | | import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { ArrowUp, ArrowDown } from "@element-plus/icons-vue"; |
| | | import dayjs from "dayjs"; |
| | | import ImportDialog from "@/components/Dialog/ImportDialog.vue"; |
| | | import { getToken } from "@/utils/auth"; |
| | |
| | | applyNo: "", |
| | | dateRange: [], |
| | | }, |
| | | searchFormExpanded: false, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | const { searchForm, searchFormExpanded } = toRefs(data); |
| | | |
| | | // 切换搜索表单展开/收起状态 |
| | | const toggleSearchForm = () => { |
| | | data.searchFormExpanded = !data.searchFormExpanded; |
| | | }; |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | |
| | | } |
| | | |
| | | console.log(mergeForm, "mergeForm"); |
| | | const strengthItem = block_strength.value.find(item => item.id === mergeForm.strength); |
| | | const strengthItem = block_strength.value.find( |
| | | item => item.id === mergeForm.strength |
| | | ); |
| | | const payload = { |
| | | ...mergeForm, |
| | | strength: strengthItem ? strengthItem.label : mergeForm.strength |
| | | strength: strengthItem ? strengthItem.label : mergeForm.strength, |
| | | }; |
| | | productionPlanCombine(payload) |
| | | .then(res => { |
| | |
| | | } |
| | | |
| | | .search_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 24px; |
| | | // margin-bottom: 24px; |
| | | padding: 20px; |
| | | background-color: #ffffff; |
| | | border-radius: 6px; |
| | |
| | | } |
| | | } |
| | | |
| | | .search-header { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // margin-bottom: 5px; |
| | | // padding-bottom: 5px; |
| | | position: relative; |
| | | bottom: 35px; |
| | | // border-bottom: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .search-title { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | .search-header .el-button { |
| | | color: #606266; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .search-header .el-button:hover { |
| | | color: #409eff; |
| | | } |
| | | |
| | | .search-header .el-icon { |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .table_list { |
| | | // margin-bottom: 24px; |
| | | background-color: #ffffff; |
| | |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05); |
| | | overflow: hidden; |
| | | height: calc(100vh - 250px); |
| | | margin-top: 0px !important; |
| | | } |
| | | |
| | | :deep(.el-table) { |