|
@@ -1,65 +1,33 @@
|
|
|
<template>
|
|
|
<div class="page-container column-container">
|
|
|
<!-- 搜索区 -->
|
|
|
- <el-form
|
|
|
- class="list-search-container"
|
|
|
- :model="queryParams"
|
|
|
- ref="queryRef"
|
|
|
- :inline="true"
|
|
|
- >
|
|
|
+ <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
|
<el-form-item label="产品描述:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入产品描述"
|
|
|
- v-model.trim="queryParams.productDescription"
|
|
|
- style="width: 150px"
|
|
|
- clearable
|
|
|
- @keyup.enter="handleQuerydaywork"
|
|
|
- @keydown.enter.prevent
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入产品描述" v-model.trim="queryParams.productDescription" style="width: 150px" clearable
|
|
|
+ @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="生产计划单号:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入生产计划单号"
|
|
|
- v-model.trim="queryParams.productionPlanNo"
|
|
|
- style="width: 120px"
|
|
|
- clearable
|
|
|
- @keyup.enter="handleQuerydaywork"
|
|
|
- @keydown.enter.prevent
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入生产计划单号" v-model.trim="queryParams.productionPlanNo" style="width: 120px" clearable
|
|
|
+ @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="序号:">
|
|
|
<el-input placeholder="请输入序号" v-model.trim="queryParams.lineNumber" style="width: 130px" clearable
|
|
|
@keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="批次号:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入批次号"
|
|
|
- v-model.trim="queryParams.lotCode"
|
|
|
- style="width: 130px"
|
|
|
- clearable
|
|
|
- @keyup.enter="handleQuerydaywork"
|
|
|
- @keydown.enter.prevent
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入批次号" v-model.trim="queryParams.lotCode" style="width: 130px" clearable
|
|
|
+ @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工段:">
|
|
|
<!-- <el-select-v2 v-model="queryParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 140px" /> -->
|
|
|
- <el-autocomplete
|
|
|
- v-model.trim="deptName"
|
|
|
- clearable
|
|
|
- :fetch-suggestions="queryDeptSearchAsync"
|
|
|
- placeholder="请选择工段"
|
|
|
- @select="handleDeptSelect"
|
|
|
- style="width: 140px"
|
|
|
- @clear="handleClearDept"
|
|
|
- >
|
|
|
+ <el-autocomplete v-model.trim="deptName" clearable :fetch-suggestions="queryDeptSearchAsync" placeholder="请选择工段"
|
|
|
+ @select="handleDeptSelect" style="width: 140px" @clear="handleClearDept">
|
|
|
<template #default="{ item }">
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<div class="name" style="font-size: 12px">
|
|
|
{{ item.deptName }}
|
|
|
</div>
|
|
@@ -68,67 +36,30 @@
|
|
|
</el-autocomplete>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="标识:">
|
|
|
- <el-select
|
|
|
- style="width: 160px"
|
|
|
- multiple
|
|
|
- v-model="queryParams.flags"
|
|
|
- collapse-tags
|
|
|
- collapse-tags-tooltip
|
|
|
- clearable
|
|
|
- placeholder="请选择标识"
|
|
|
- @change="handleFlagChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in is_identification"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- ></el-option>
|
|
|
+ <el-select style="width: 160px" multiple v-model="queryParams.flags" collapse-tags collapse-tags-tooltip
|
|
|
+ clearable placeholder="请选择标识" @change="handleFlagChange">
|
|
|
+ <el-option v-for="item in is_identification" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="时间:">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.startTime"
|
|
|
- type="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- :editable="false"
|
|
|
- :clearable="false"
|
|
|
- placeholder="请选择开始时间"
|
|
|
- style="width: 130px"
|
|
|
- @change="handleDateChange"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD" :editable="false"
|
|
|
+ :clearable="false" placeholder="请选择开始时间" style="width: 130px" @change="handleDateChange" />
|
|
|
<span>To</span>
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.endTime"
|
|
|
- type="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- :editable="false"
|
|
|
- :clearable="false"
|
|
|
- placeholder="请选择结束时间"
|
|
|
- style="width: 130px"
|
|
|
- @change="handleDateChange"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="queryParams.endTime" type="date" value-format="YYYY-MM-DD" :editable="false"
|
|
|
+ :clearable="false" placeholder="请选择结束时间" style="width: 130px" @change="handleDateChange" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工序:">
|
|
|
<!-- <el-select-v2 v-model="processAlias" :options="processList" placeholder="请选择工序" style="width: 140px"
|
|
|
@change="handleProcessChange" /> -->
|
|
|
- <el-autocomplete
|
|
|
- v-model.trim="processAlias"
|
|
|
- clearable
|
|
|
- :fetch-suggestions="queryProcessSearchAsync"
|
|
|
- placeholder="请选择工序"
|
|
|
- @select="handleProcessSelect"
|
|
|
- style="width: 140px"
|
|
|
- @clear="handleClearProcess"
|
|
|
- >
|
|
|
+ <el-autocomplete v-model.trim="processAlias" clearable :fetch-suggestions="queryProcessSearchAsync"
|
|
|
+ placeholder="请选择工序" @select="handleProcessSelect" style="width: 140px" @clear="handleClearProcess">
|
|
|
<template #default="{ item }">
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<div class="name" style="font-size: 12px">
|
|
|
{{ item.label }}
|
|
|
</div>
|
|
@@ -137,175 +68,68 @@
|
|
|
</el-autocomplete>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="info" icon="Search" @click="handleQuerydaywork"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
+ <el-button type="info" icon="Search" @click="handleQuerydaywork">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
<div style="margin-top: 20px">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="handleWasteRecycling"
|
|
|
- :disabled="selections.length == 0 || selections.length > 1"
|
|
|
- v-hasPermi="['business:lot:wasteRecycling']"
|
|
|
- >添加废品回用</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- :disabled="selections.length !== 1"
|
|
|
- type="primary"
|
|
|
- @click="showInBatch"
|
|
|
- v-hasPermi="['business:lot:inBatch']"
|
|
|
- >分批</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :disabled="once"
|
|
|
- @click="handleOnceSingleChange"
|
|
|
- v-hasPermi="['business:lot:onceSingleChange']"
|
|
|
- >单批单改</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :disabled="multi"
|
|
|
- @click="handleMultiSingleChange"
|
|
|
- v-hasPermi="['business:lot:multiSingleChange']"
|
|
|
- >多批单改</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="handleWasteRecycling"
|
|
|
+ :disabled="selections.length == 0 || selections.length > 1 || checkRecycle()"
|
|
|
+ v-hasPermi="['business:lot:wasteRecycling']">添加废品回用</el-button>
|
|
|
+ <el-button :disabled="selections.length !== 1 || checkRecycle()" type="primary" @click="showInBatch"
|
|
|
+ v-hasPermi="['business:lot:inBatch']">分批</el-button>
|
|
|
+ <el-button type="primary" :disabled="once || checkRecycle()" @click="handleOnceSingleChange"
|
|
|
+ v-hasPermi="['business:lot:onceSingleChange']">单批单改</el-button>
|
|
|
+ <el-button type="primary" :disabled="multi || checkRecycle()" @click="handleMultiSingleChange"
|
|
|
+ v-hasPermi="['business:lot:multiSingleChange']">多批单改</el-button>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<!-- 列表区 -->
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table
|
|
|
- ref="dayworkTable"
|
|
|
- v-loading="loading"
|
|
|
- row-key="lotId"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- height="100%"
|
|
|
- :data="lotList"
|
|
|
- >
|
|
|
+ <el-table ref="dayworkTable" v-loading="loading" row-key="lotId" @selection-change="handleSelectionChange"
|
|
|
+ height="100%" :data="lotList">
|
|
|
<el-table-column type="selection" width="40" align="center" />
|
|
|
- <el-table-column
|
|
|
- label="客户简称"
|
|
|
- prop="companyAlias"
|
|
|
- width="120"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="生产计划单号"
|
|
|
- width="100"
|
|
|
- prop="productionPlanNo"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="序号"
|
|
|
- width="60"
|
|
|
- prop="lineNumber"
|
|
|
- align="center"
|
|
|
- />
|
|
|
+ <el-table-column label="客户简称" prop="companyAlias" width="120" align="center" />
|
|
|
+ <el-table-column label="生产计划单号" width="100" prop="productionPlanNo" align="center" />
|
|
|
+ <el-table-column label="序号" width="60" prop="lineNumber" align="center" />
|
|
|
|
|
|
- <el-table-column
|
|
|
- label="批次号"
|
|
|
- prop="lotCode"
|
|
|
- align="center"
|
|
|
- width="150px"
|
|
|
- >
|
|
|
+ <el-table-column label="批次号" prop="lotCode" align="center" width="150px">
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="handleColumnClick(scope.row.lotCode)"
|
|
|
- ><span>{{ scope.row.lotCode }}</span></el-button
|
|
|
- >
|
|
|
+ <el-button link type="primary" @click="handleColumnClick(scope.row.lotCode)"><span>{{ scope.row.lotCode
|
|
|
+ }}</span></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="产品描述"
|
|
|
- prop="productDescription"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="图纸版本"
|
|
|
- width="80"
|
|
|
- prop="technologyVersion"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="投产量"
|
|
|
- width="100"
|
|
|
- prop="productionQuantity"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="下达日期"
|
|
|
- prop="createTime"
|
|
|
- width="100"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column label="产品描述" prop="productDescription" align="center" />
|
|
|
+ <el-table-column label="图纸版本" width="80" prop="technologyVersion" align="center" />
|
|
|
+ <el-table-column label="投产量" width="100" prop="productionQuantity" align="center" />
|
|
|
+ <el-table-column label="下达日期" prop="createTime" width="100" align="center">
|
|
|
<template #default="scope">
|
|
|
<span>{{
|
|
|
- proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
|
|
|
- }}</span>
|
|
|
+ proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="当前工段"
|
|
|
- width="100"
|
|
|
- prop="deptName"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="当前工序"
|
|
|
- width="120"
|
|
|
- prop="processAlias"
|
|
|
- align="center"
|
|
|
- />
|
|
|
+ <el-table-column label="当前工段" width="100" prop="deptName" align="center" />
|
|
|
+ <el-table-column label="当前工序" width="120" prop="processAlias" align="center" />
|
|
|
<el-table-column label="标识" width="300" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-tag
|
|
|
- v-if="scope.row.isWaste == 1"
|
|
|
- class="spacing"
|
|
|
- type="danger"
|
|
|
- >{{ "批废" }}</el-tag
|
|
|
- >
|
|
|
- <el-tag
|
|
|
- v-if="scope.row.isAmend == 1"
|
|
|
- class="spacing"
|
|
|
- type="danger"
|
|
|
- >{{ "工艺修改" }}</el-tag
|
|
|
- >
|
|
|
- <el-tag
|
|
|
- v-if="scope.row.isWasteRecycling == 1"
|
|
|
- class="spacing"
|
|
|
- type="primary"
|
|
|
- >{{ "废品回用" }}</el-tag
|
|
|
- >
|
|
|
+ <el-tag v-if="scope.row.isWaste == 1" class="spacing" type="danger">{{ "批废" }}</el-tag>
|
|
|
+ <el-tag v-if="scope.row.isAmend == 1" class="spacing" type="danger">{{ "工艺修改" }}</el-tag>
|
|
|
+ <el-tag v-if="scope.row.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="母批号" prop="fromCode" align="center" >
|
|
|
+ <el-table-column label="母批号" prop="fromCode" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- width="150px"
|
|
|
- @click="handleColumnClick(scope.row.fromCode)"
|
|
|
- ><span>{{ scope.row.fromCode }}</span></el-button
|
|
|
- >
|
|
|
+ <el-button link type="primary" width="150px" @click="handleColumnClick(scope.row.fromCode)"><span>{{
|
|
|
+ scope.row.fromCode }}</span></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- v-model:page="queryParams.pageNum"
|
|
|
- v-model:limit="queryParams.pageSize"
|
|
|
- @pagination="getLot"
|
|
|
- />
|
|
|
- <waste-recycling-dialog
|
|
|
- ref="wasteRecyclingDialogRef" @handleSaveSuccess="getLot()"
|
|
|
- ></waste-recycling-dialog>
|
|
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
+ v-model:limit="queryParams.pageSize" @pagination="getLot" />
|
|
|
+ <waste-recycling-dialog ref="wasteRecyclingDialogRef" @handleSaveSuccess="getLot()"></waste-recycling-dialog>
|
|
|
<InBatchesDialog ref="inBatchesDialogRef" :getList="handleQuerydaywork" />
|
|
|
<once-change ref="onceChangeRef" @handleSaveSuccess="getLot()" />
|
|
|
<multi-change ref="multiChangeRef" @handleSaveSuccess="getLot()" />
|
|
@@ -607,6 +431,10 @@ const handleClearDept = () => {
|
|
|
const handleFlagChange = (selection) => {
|
|
|
console.log(selection);
|
|
|
};
|
|
|
+const checkRecycle = () => {
|
|
|
+ // 判断是否是废品回用,废品回用的无论分批还是单批单改多批单改废品回用都不能做
|
|
|
+ return selections.value.some(v => v.isWasteRecycling == 1)
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
getDept();
|
|
|
});
|