| | |
| | | <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;" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="下发状态:"> |
| | | <el-select v-model="searchForm.status" |
| | | placeholder="请选择状态" |
| | | placeholder="请选择状态" |
| | | clearable |
| | | filterable |
| | | style="width: 100px"> |
| | |
| | | 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> |
| | |
| | | <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" |
| | | :column="tableColumn" |
| | |
| | | :selectable="isSelectable" |
| | | @selection-change="handleSelectionChange" |
| | | @pagination="pagination"> |
| | | <template #quantity="{ row }"> |
| | | {{ row.quantity || '-' }}<span style="color:rgb(63, 95, 211)"> 块</span> |
| | | </template> |
| | | <template #volume="{ row }"> |
| | | {{ row.volume || '-' }}<span style="color:rgba(12, 46, 40, 0.76)"> 方</span> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <!-- 合并下发弹窗 --> |
| | | <el-dialog v-model="isShowNewModal" |
| | | destroy-on-close |
| | | title="合并下发" |
| | | width="600px"> |
| | | <el-form :model="mergeForm" |
| | |
| | | </el-dialog> |
| | | <!-- 追踪进度弹窗 --> |
| | | <el-dialog v-model="showTrackProgressDialog" |
| | | destroy-on-close |
| | | :title="`追踪进度 - ${trackProgressForm.materialCode || ''}`" |
| | | width="600px"> |
| | | <el-form :model="trackProgressForm" |
| | |
| | | @close="handleImportClose" /> |
| | | <!-- 新增/编辑弹窗 --> |
| | | <el-dialog v-model="dialogVisible" |
| | | destroy-on-close |
| | | :title="operationType === 'add' ? '新增生产计划' : '编辑生产计划'" |
| | | width="600px"> |
| | | <el-form ref="formRef" |
| | |
| | | <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"; |
| | |
| | | { |
| | | label: "块数", |
| | | prop: "quantity", |
| | | formatData: cell => (cell ? `${cell}块` : ""), |
| | | align: "right", |
| | | dataType: "slot", |
| | | slot: "quantity", |
| | | }, |
| | | { |
| | | label: "方数", |
| | | prop: "volume", |
| | | width: "150px", |
| | | align: "right", |
| | | dataType: "slot", |
| | | slot: "volume", |
| | | className: "volume-cell", |
| | | formatData: cell => (cell ? `${cell}方` : ""), |
| | | }, |
| | | { |
| | | label: "下发状态", |
| | |
| | | applyNo: "", |
| | | dateRange: [], |
| | | }, |
| | | searchFormExpanded: false, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | const { searchForm, searchFormExpanded } = toRefs(data); |
| | | |
| | | // 切换搜索表单展开/收起状态 |
| | | const toggleSearchForm = () => { |
| | | data.searchFormExpanded = !data.searchFormExpanded; |
| | | }; |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | |
| | | sum + |
| | | (row.volume == null |
| | | ? 0 |
| | | : (Number(row.volume) - Number(row.assignedQuantity)).toFixed(4)) |
| | | : Number(Number(row.volume) - Number(row.assignedQuantity).toFixed(4))) |
| | | ); |
| | | }, 0); |
| | | sumAssignedQuantity.value = totalAssignedQuantity; |
| | |
| | | } |
| | | |
| | | console.log(mergeForm, "mergeForm"); |
| | | productionPlanCombine(mergeForm) |
| | | const strengthItem = block_strength.value.find( |
| | | item => item.id === mergeForm.strength |
| | | ); |
| | | const payload = { |
| | | ...mergeForm, |
| | | strength: strengthItem ? strengthItem.label : mergeForm.strength, |
| | | }; |
| | | productionPlanCombine(payload) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("下发成功"); |
| | |
| | | } |
| | | |
| | | .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) { |