|
@@ -305,11 +305,11 @@
|
|
|
/>
|
|
|
<waste-recycling-dialog
|
|
|
ref="wasteRecyclingDialogRef"
|
|
|
- @handleSaveSuccess="getLot()"
|
|
|
+ @handleSaveSuccess="getLot"
|
|
|
></waste-recycling-dialog>
|
|
|
<InBatchesDialog ref="inBatchesDialogRef" :getList="handleQuerydaywork" />
|
|
|
- <once-change ref="onceChangeRef" @handleSaveSuccess="getLot()" />
|
|
|
- <multi-change ref="multiChangeRef" @handleSaveSuccess="getLot()" />
|
|
|
+ <once-change ref="onceChangeRef" @handleSaveSuccess="getLot" />
|
|
|
+ <multi-change ref="multiChangeRef" @handleSaveSuccess="getLot" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup name="ProductionPlan">
|
|
@@ -346,11 +346,15 @@ const deptList = ref([]);
|
|
|
const queryParams = ref({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
+ productDescription: "",
|
|
|
+ productionPlanNo: "",
|
|
|
lotCode: "",
|
|
|
deptId: null,
|
|
|
flag: null,
|
|
|
- productionPlanNo: "",
|
|
|
lineNumber: null,
|
|
|
+ deptName: "",
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
});
|
|
|
const queryDeptParams = ref({
|
|
|
lineNumber: "",
|
|
@@ -369,7 +373,11 @@ function getDept() {
|
|
|
if (res.code == 200) {
|
|
|
deptList.value = res.data;
|
|
|
}
|
|
|
+ if (lotStore().lotQueryParams != null) {
|
|
|
+ deptName.value = lotStore().lotQueryParams.deptName;
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
getProcess();
|
|
|
if (route.params.productionPlanNo != ":productionPlanNo") {
|
|
|
queryParams.value.productionPlanNo = route.params.productionPlanNo;
|
|
@@ -384,6 +392,9 @@ function handleDateChange() {
|
|
|
console.log(queryParams.value.endTime);
|
|
|
}
|
|
|
function getProcess() {
|
|
|
+ if (lotStore().lotQueryParams != null) {
|
|
|
+ processAlias.value = lotStore().lotQueryParams.processAlias;
|
|
|
+ }
|
|
|
getProcessList(queryParams.value).then((response) => {
|
|
|
processList.value = response.data;
|
|
|
});
|
|
@@ -440,10 +451,11 @@ function handleOnceSingleChange() {
|
|
|
|
|
|
/**获取生产计划列表 */
|
|
|
function getLot() {
|
|
|
- console.log("storeLot", lotStore().lotQueryParams);
|
|
|
+ const lotQueryParams = lotStore().lotQueryParams;
|
|
|
+ console.log("getLot", lotQueryParams);
|
|
|
|
|
|
- if (lotStore().lotQueryParams != null) {
|
|
|
- queryParams.value = lotStore().lotQueryParams;
|
|
|
+ if (lotQueryParams != null) {
|
|
|
+ queryParams.value = lotQueryParams;
|
|
|
}
|
|
|
|
|
|
loading.value = true;
|
|
@@ -522,7 +534,9 @@ function handleQuerydaywork() {
|
|
|
) {
|
|
|
proxy.$modal.msgError("结束时间不能小于开始时间");
|
|
|
} else {
|
|
|
- lotStore().setlotQueryParams(queryParams.value);
|
|
|
+ const lotQueryParams = JSON.parse(JSON.stringify(queryParams.value));
|
|
|
+ console.log("lotQueryParams", lotQueryParams);
|
|
|
+ lotStore().setlotQueryParams(lotQueryParams);
|
|
|
getLot();
|
|
|
}
|
|
|
}
|
|
@@ -589,6 +603,7 @@ const handleProcessSelect = (item) => {
|
|
|
console.log(item);
|
|
|
processAlias.value = item.label.trim();
|
|
|
queryParams.value.processId = item.value;
|
|
|
+ queryParams.value.processAlias = processAlias.value;
|
|
|
};
|
|
|
|
|
|
const queryDeptSearchAsync = (arg, cb) => {
|
|
@@ -605,6 +620,7 @@ const queryDeptSearchAsync = (arg, cb) => {
|
|
|
const handleDeptSelect = (item) => {
|
|
|
console.log(item);
|
|
|
deptName.value = item.deptName.trim();
|
|
|
+ queryParams.value.deptName = deptName.value;
|
|
|
queryParams.value.deptId = item.deptId;
|
|
|
};
|
|
|
const handleClearProcess = () => {
|
|
@@ -622,8 +638,9 @@ const checkRecycle = () => {
|
|
|
// 判断是否是废品回用,废品回用的无论分批还是单批单改多批单改废品回用都不能做
|
|
|
return selections.value.some((v) => v.isWasteRecycling == 1);
|
|
|
};
|
|
|
-getLot();
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getDept();
|
|
|
+ // getLot();
|
|
|
});
|
|
|
</script>
|