|
@@ -9,7 +9,7 @@
|
|
|
text: '打印',
|
|
|
action: () => openModal('add'),
|
|
|
disabled: selectIds.length==0,
|
|
|
- }]" @get-list="handleSearch">
|
|
|
+ }]" :isCustomResetFn="true" @get-list="handleSearch" @search-reset="searchReset">
|
|
|
</byTable>
|
|
|
|
|
|
<div style="background:#fff">
|
|
@@ -18,7 +18,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>在手任务</div>
|
|
|
- <div class="badge" v-if="taskCountObj['onHandCount']">{{taskCountObj['onHandCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="Number(taskCountObj['onHandCount'])">{{taskCountObj['onHandCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-tab-pane>
|
|
@@ -26,7 +26,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>已完成</div>
|
|
|
- <div class="badge" v-if="taskCountObj['completedCount']">{{taskCountObj['completedCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="Number(taskCountObj['completedCount'])">{{taskCountObj['completedCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -35,7 +35,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>所有任务</div>
|
|
|
- <div class="badge" v-if="taskCountObj['allCount']">{{taskCountObj['allCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="Number(taskCountObj['allCount'])">{{taskCountObj['allCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-tab-pane>
|
|
@@ -43,7 +43,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>车间工序结存</div>
|
|
|
- <div class="badge" v-if="taskCountObj['balanceCount']">{{taskCountObj['balanceCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="Number(taskCountObj['balanceCount'])">{{taskCountObj['balanceCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -124,8 +124,9 @@
|
|
|
|
|
|
<template #produceStatus="{item}">
|
|
|
<div style="width: 100%">
|
|
|
- <span class="red" v-if="item.produceStatus=='99'"> 作废 </span>
|
|
|
- <span v-else> {{dictValueLabel(item.produceStatus, statusData)}} </span>
|
|
|
+ <span :class="{
|
|
|
+ 'red':item.produceStatus=='88' || item.produceStatus=='99'
|
|
|
+ }"> {{dictValueLabel(item.produceStatus, statusData)}} </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -575,13 +576,18 @@ const contractTag = computed(
|
|
|
() => proxy.useUserStore().allDict["contract_prod_tag"]
|
|
|
);
|
|
|
const pageActiveName = ref("1");
|
|
|
+const lastPageActiveName = ref("");
|
|
|
const handlePageTabChange = (val) => {
|
|
|
- selectIds.value = [];
|
|
|
- if (val == "1") {
|
|
|
- sourceList.value.pagination.isScheduling = "0";
|
|
|
- } else {
|
|
|
+ if (lastPageActiveName.value == "2") {
|
|
|
+ sourceList.value.pagination.produceStatus = "";
|
|
|
+ }
|
|
|
+ if (lastPageActiveName.value == "1") {
|
|
|
+ sourceList.value.pagination.isScheduling = "";
|
|
|
+ }
|
|
|
+ if (val != "1") {
|
|
|
sourceList.value.pagination.isScheduling = "";
|
|
|
}
|
|
|
+ selectIds.value = [];
|
|
|
switch (val) {
|
|
|
case "1":
|
|
|
break;
|
|
@@ -592,13 +598,14 @@ const handlePageTabChange = (val) => {
|
|
|
case "4":
|
|
|
break;
|
|
|
default:
|
|
|
- getTableList();
|
|
|
- getTaskCount();
|
|
|
break;
|
|
|
}
|
|
|
+ getTableList();
|
|
|
if (["1", "2", "3", "4"].includes(val)) {
|
|
|
getList();
|
|
|
+ } else {
|
|
|
}
|
|
|
+ lastPageActiveName.value = val;
|
|
|
};
|
|
|
const companyData = ref([]);
|
|
|
const loading = ref(false);
|
|
@@ -616,7 +623,7 @@ const sourceList = ref({
|
|
|
beginTime: "",
|
|
|
endTime: "",
|
|
|
isOverdue: "",
|
|
|
- isScheduling: "0",
|
|
|
+ isScheduling: "",
|
|
|
schedulingDate: "",
|
|
|
},
|
|
|
});
|
|
@@ -733,6 +740,7 @@ const selectConfig = computed(() => [
|
|
|
propOne: "",
|
|
|
fn: () => {
|
|
|
getTableList();
|
|
|
+ getTaskCount();
|
|
|
},
|
|
|
},
|
|
|
]);
|
|
@@ -979,11 +987,11 @@ const sourceListOne = ref({
|
|
|
schedulingDate: "",
|
|
|
},
|
|
|
});
|
|
|
-sourceListOne.value.pagination.schedulingDate = moment().format(
|
|
|
- "yyyy-MM-DD HH:mm:ss"
|
|
|
-);
|
|
|
-sourceList.value.pagination.schedulingDate =
|
|
|
- sourceListOne.value.pagination.schedulingDate;
|
|
|
+// sourceListOne.value.pagination.schedulingDate = moment().format(
|
|
|
+// "yyyy-MM-DD HH:mm:ss"
|
|
|
+// );
|
|
|
+// sourceList.value.pagination.schedulingDate =
|
|
|
+// sourceListOne.value.pagination.schedulingDate;
|
|
|
|
|
|
const selectConfigOne = computed(() => [
|
|
|
{
|
|
@@ -1153,6 +1161,10 @@ const getTableList = (req) => {
|
|
|
// ...sourceListOne.value.pagination,
|
|
|
// ...req,
|
|
|
// };
|
|
|
+ if (pageActiveName.value == "1") {
|
|
|
+ sourceList.value.pagination.isScheduling = "0";
|
|
|
+ }
|
|
|
+
|
|
|
if (pageActiveName.value == "2") {
|
|
|
sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
}
|
|
@@ -1171,6 +1183,10 @@ const getTableList = (req) => {
|
|
|
|
|
|
const taskCountObj = ref({});
|
|
|
const getTaskCount = (req) => {
|
|
|
+ if (pageActiveName.value == "1") {
|
|
|
+ sourceList.value.pagination.isScheduling = "0";
|
|
|
+ }
|
|
|
+
|
|
|
if (pageActiveName.value == "2") {
|
|
|
sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
}
|
|
@@ -1184,6 +1200,10 @@ getTaskCount();
|
|
|
|
|
|
const getList = async () => {
|
|
|
// sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ if (pageActiveName.value == "1") {
|
|
|
+ sourceList.value.pagination.isScheduling = "0";
|
|
|
+ }
|
|
|
+
|
|
|
if (pageActiveName.value == "2") {
|
|
|
sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
}
|
|
@@ -1272,6 +1292,29 @@ const handleSearch = (req) => {
|
|
|
getTaskCount();
|
|
|
};
|
|
|
|
|
|
+const searchReset = () => {
|
|
|
+ sourceList.value.pagination = {
|
|
|
+ total: 3,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ keyword: "",
|
|
|
+ produceStatus: "",
|
|
|
+ staDeliveryPeriod: "",
|
|
|
+ endDeliveryPeriod: "",
|
|
|
+ beginTime: "",
|
|
|
+ endTime: "",
|
|
|
+ isOverdue: "",
|
|
|
+ isScheduling: "",
|
|
|
+ schedulingDate: "",
|
|
|
+ };
|
|
|
+ if (pageActiveName.value == "1") {
|
|
|
+ sourceList.value.pagination.isScheduling = "0";
|
|
|
+ } else if (pageActiveName.value == "2") {
|
|
|
+ sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
+ }
|
|
|
+ handleSearch(sourceList.value.pagination);
|
|
|
+};
|
|
|
+
|
|
|
const printList = ref([]);
|
|
|
|
|
|
const selectIds = ref([]);
|