|
@@ -1,11 +1,15 @@
|
|
|
<template>
|
|
|
- <div class="pageIndexClass a">
|
|
|
+ <div class="pageIndexClass">
|
|
|
<byTable :hideTable="true" :hidePagination="true" :config="[]" highlight-current-row :selectConfig="selectConfig"
|
|
|
:pagination="sourceList.pagination" :action-list="[ {
|
|
|
- text: '打印任务单',
|
|
|
+ text: '排程',
|
|
|
+ action: () => addScheduling('add'),
|
|
|
+ disabled: ['1','2','3','4'].includes(pageActiveName),
|
|
|
+ } ,{
|
|
|
+ text: '打印',
|
|
|
action: () => openModal('add'),
|
|
|
disabled: selectIds.length==0,
|
|
|
- }]" @get-list="getList">
|
|
|
+ }]" @get-list="handleSearch">
|
|
|
</byTable>
|
|
|
|
|
|
<div style="background:#fff">
|
|
@@ -14,7 +18,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>在手任务</div>
|
|
|
- <div class="badge">{{taskCountObj['onHandCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="taskCountObj['onHandCount']">{{taskCountObj['onHandCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-tab-pane>
|
|
@@ -22,7 +26,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>已完成</div>
|
|
|
- <div class="badge">{{taskCountObj['completedCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="taskCountObj['completedCount']">{{taskCountObj['completedCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -31,7 +35,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>所有任务</div>
|
|
|
- <div class="badge">{{taskCountObj['allCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="taskCountObj['allCount']">{{taskCountObj['allCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-tab-pane>
|
|
@@ -39,7 +43,7 @@
|
|
|
<template #label>
|
|
|
<div style="display:flex;align-items:center">
|
|
|
<div>车间工序结存</div>
|
|
|
- <div class="badge">{{taskCountObj['balanceCount'] || 0}}</div>
|
|
|
+ <div class="badge" v-if="taskCountObj['balanceCount']">{{taskCountObj['balanceCount'] || 0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -52,7 +56,7 @@
|
|
|
</el-badge> -->
|
|
|
<div>
|
|
|
{{item.name}} </div>
|
|
|
- <div class="badge">{{Number(taskCountObj[item.id])||0}}</div>
|
|
|
+ <div class="badge" v-if="Number(taskCountObj[item.id])>0">{{Number(taskCountObj[item.id])||0}}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-tab-pane>
|
|
@@ -176,8 +180,8 @@
|
|
|
</div>
|
|
|
|
|
|
<div v-else>
|
|
|
- <byTable :source="sourceListOne.data" :otherHeight="65" :pagination="sourceListOne.pagination" :config="configOne" :loading="loading"
|
|
|
- highlight-current-row :selectConfig="selectConfigOne" :action-list="[{
|
|
|
+ <byTable :hideSearch="true" :source="sourceListOne.data" :otherHeight="80" :pagination="sourceListOne.pagination" :config="configOne"
|
|
|
+ :loading="loading" highlight-current-row :selectConfig="selectConfigOne" :action-list="[{
|
|
|
text: '排程',
|
|
|
action: () => addScheduling('add'),
|
|
|
disabled: false,
|
|
@@ -207,6 +211,7 @@
|
|
|
<span>{{ item.productWidth }}</span>*
|
|
|
<span>{{ item.productHeight }}</span>
|
|
|
</div>
|
|
|
+ <div v-else></div>
|
|
|
</template>
|
|
|
|
|
|
<template #isOverdue="{item}">
|
|
@@ -577,11 +582,6 @@ const handlePageTabChange = (val) => {
|
|
|
} else {
|
|
|
sourceList.value.pagination.isScheduling = "";
|
|
|
}
|
|
|
- if (val == "2") {
|
|
|
- sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
- } else {
|
|
|
- sourceList.value.pagination.produceStatus = "";
|
|
|
- }
|
|
|
switch (val) {
|
|
|
case "1":
|
|
|
break;
|
|
@@ -593,6 +593,7 @@ const handlePageTabChange = (val) => {
|
|
|
break;
|
|
|
default:
|
|
|
getTableList();
|
|
|
+ getTaskCount();
|
|
|
break;
|
|
|
}
|
|
|
if (["1", "2", "3", "4"].includes(val)) {
|
|
@@ -616,6 +617,7 @@ const sourceList = ref({
|
|
|
endTime: "",
|
|
|
isOverdue: "",
|
|
|
isScheduling: "0",
|
|
|
+ schedulingDate: "",
|
|
|
},
|
|
|
});
|
|
|
const treeData = ref([]);
|
|
@@ -714,13 +716,24 @@ const selectConfig = computed(() => [
|
|
|
placeholderOne: "结束日期",
|
|
|
propOne: "endDeliveryPeriod",
|
|
|
},
|
|
|
+ // {
|
|
|
+ // type: "time",
|
|
|
+ // label: "下单日期",
|
|
|
+ // placeholder: "开始日期",
|
|
|
+ // prop: "beginTime",
|
|
|
+ // placeholderOne: "结束日期",
|
|
|
+ // propOne: "endTime",
|
|
|
+ // },
|
|
|
{
|
|
|
type: "time",
|
|
|
- label: "下单日期",
|
|
|
- placeholder: "开始日期",
|
|
|
- prop: "beginTime",
|
|
|
- placeholderOne: "结束日期",
|
|
|
- propOne: "endTime",
|
|
|
+ label: "排程日期",
|
|
|
+ placeholder: "排程日期",
|
|
|
+ prop: "schedulingDate",
|
|
|
+ placeholderOne: "",
|
|
|
+ propOne: "",
|
|
|
+ fn: () => {
|
|
|
+ getTableList();
|
|
|
+ },
|
|
|
},
|
|
|
]);
|
|
|
const config = ref([
|
|
@@ -969,6 +982,8 @@ const sourceListOne = ref({
|
|
|
sourceListOne.value.pagination.schedulingDate = moment().format(
|
|
|
"yyyy-MM-DD HH:mm:ss"
|
|
|
);
|
|
|
+sourceList.value.pagination.schedulingDate =
|
|
|
+ sourceListOne.value.pagination.schedulingDate;
|
|
|
|
|
|
const selectConfigOne = computed(() => [
|
|
|
{
|
|
@@ -1134,14 +1149,17 @@ const rules = ref({
|
|
|
});
|
|
|
|
|
|
const getTableList = (req) => {
|
|
|
- sourceListOne.value.pagination = {
|
|
|
- ...sourceListOne.value.pagination,
|
|
|
- ...req,
|
|
|
- };
|
|
|
- sourceListOne.value.pagination.processesId = pageActiveName.value;
|
|
|
+ // sourceListOne.value.pagination = {
|
|
|
+ // ...sourceListOne.value.pagination,
|
|
|
+ // ...req,
|
|
|
+ // };
|
|
|
+ if (pageActiveName.value == "2") {
|
|
|
+ sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
+ }
|
|
|
+ sourceList.value.pagination.processesId = pageActiveName.value;
|
|
|
loading.value = true;
|
|
|
proxy
|
|
|
- .post("/productionScheduling/page", sourceListOne.value.pagination)
|
|
|
+ .post("/productionScheduling/page", sourceList.value.pagination)
|
|
|
.then((res) => {
|
|
|
sourceListOne.value.data = res.rows;
|
|
|
sourceListOne.value.pagination.total = res.total;
|
|
@@ -1152,15 +1170,23 @@ const getTableList = (req) => {
|
|
|
};
|
|
|
|
|
|
const taskCountObj = ref({});
|
|
|
-const getTaskCount = () => {
|
|
|
- proxy.post("/produceOrderDetail/taskCount").then((res) => {
|
|
|
- taskCountObj.value = res;
|
|
|
- });
|
|
|
+const getTaskCount = (req) => {
|
|
|
+ if (pageActiveName.value == "2") {
|
|
|
+ sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
+ }
|
|
|
+ proxy
|
|
|
+ .post("/produceOrderDetail/taskCount", sourceList.value.pagination)
|
|
|
+ .then((res) => {
|
|
|
+ taskCountObj.value = res;
|
|
|
+ });
|
|
|
};
|
|
|
getTaskCount();
|
|
|
|
|
|
-const getList = async (req) => {
|
|
|
- sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+const getList = async () => {
|
|
|
+ // sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ if (pageActiveName.value == "2") {
|
|
|
+ sourceList.value.pagination.produceStatus = "2,5,10";
|
|
|
+ }
|
|
|
loading.value = true;
|
|
|
proxy
|
|
|
.post("/produceOrderDetail/page", sourceList.value.pagination)
|
|
@@ -1239,6 +1265,13 @@ const getList = async (req) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const handleSearch = (req) => {
|
|
|
+ sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ getList();
|
|
|
+ getTableList();
|
|
|
+ getTaskCount();
|
|
|
+};
|
|
|
+
|
|
|
const printList = ref([]);
|
|
|
|
|
|
const selectIds = ref([]);
|
|
@@ -1646,7 +1679,7 @@ const selectTask = (row) => {
|
|
|
),
|
|
|
quantity: null,
|
|
|
});
|
|
|
- openSelectTask.value = false;
|
|
|
+ // openSelectTask.value = false;
|
|
|
return proxy.msgTip("选择成功");
|
|
|
}
|
|
|
return proxy.msgTip("该任务已选择", 2);
|
|
@@ -1764,16 +1797,16 @@ const submitFormOne = () => {
|
|
|
padding: 0px !important;
|
|
|
}
|
|
|
}
|
|
|
-.el-tabs__nav-wrap,
|
|
|
-.el-tabs__nav-scroll {
|
|
|
- overflow: visible !important;
|
|
|
-}
|
|
|
-::v-deep(.el-tabs__nav-wrap) {
|
|
|
- overflow: visible !important;
|
|
|
-}
|
|
|
-::v-deep(.el-tabs__nav-scroll) {
|
|
|
- overflow: visible !important;
|
|
|
-}
|
|
|
+// .el-tabs__nav-wrap,
|
|
|
+// .el-tabs__nav-scroll {
|
|
|
+// overflow: visible !important;
|
|
|
+// }
|
|
|
+// ::v-deep(.el-tabs__nav-wrap) {
|
|
|
+// overflow: visible !important;
|
|
|
+// }
|
|
|
+// ::v-deep(.el-tabs__nav-scroll) {
|
|
|
+// overflow: visible !important;
|
|
|
+// }
|
|
|
.badge {
|
|
|
padding: 6px;
|
|
|
font-size: 12px;
|