|
@@ -26,6 +26,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
+ <template #shortageMaterials="{item}">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <span v-if="item.lackStatus=='1'" class="red" style="cursor:pointer" @click="lookDetail(item)">
|
|
|
+ 欠料</span>
|
|
|
+ <span v-else>未欠料</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #prodTag="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
<el-popover placement="top-start" :width="300" trigger="hover">
|
|
@@ -304,6 +312,88 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="'欠料明细'" v-model="shortageMaterialDialog" width="80%" destroy-on-close>
|
|
|
+ <el-tabs v-model="shortageMaterialTab" type="card" class="demo-tabs">
|
|
|
+ <el-tab-pane label="待采购" name="1">
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="未到货" name="2">
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="待入库" name="3">
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <div style="width: 100%" v-show="shortageMaterialTab=='1'">
|
|
|
+ <el-table :data="shortageMaterialData.data.waitPurchase" style="width: 100%;">
|
|
|
+ <el-table-column prop="subscribeCode" label="单号" />
|
|
|
+ <el-table-column label="图片" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column prop="productCategory" label="分类名称" /> -->
|
|
|
+ <el-table-column prop="productCustomCode" label="编码" width="200" />
|
|
|
+ <el-table-column prop="productName" label="名称" min-width="150" />
|
|
|
+ <el-table-column label="规格尺寸 (cm)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productColor" label="颜色" width="170" />
|
|
|
+ <el-table-column prop="productUnit" label="单位" width="100" />
|
|
|
+ <el-table-column prop="count" label="需采购量" width="100" />
|
|
|
+ <el-table-column prop="purchaseCount" label="已采购量" width="100" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="width: 100%" v-show="shortageMaterialTab=='2'">
|
|
|
+ <el-table :data="shortageMaterialData.data.undeliveredGoods" style="width: 100%;">
|
|
|
+ <el-table-column prop="code" label="采购单号" />
|
|
|
+ <el-table-column prop="sellCorporationName" label="供应商" />
|
|
|
+ <el-table-column prop="deliveryTime" label="交付日期" />
|
|
|
+ <el-table-column prop="status" label="采购状态" :formatter="(row)=>dictValueLabel(row.status,purchaseStatus)" />
|
|
|
+ <el-table-column prop="userName" label="采购人" />
|
|
|
+ <el-table-column prop="createTime" label="采购时间" />
|
|
|
+ <el-table-column prop="arrivalStatus" label="到货状态" :formatter="(row)=>dictValueLabel(row.arrivalStatus,arrivalStatusData)" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="width: 100%" v-show="shortageMaterialTab=='3'">
|
|
|
+ <el-table :data="shortageMaterialData.data.waitInbound" style="width: 100%;">
|
|
|
+ <el-table-column prop="businessCode" label="单号" />
|
|
|
+ <el-table-column label="图片" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column prop="productCategory" label="分类名称" /> -->
|
|
|
+ <el-table-column prop="productCustomCode" label="编码" width="200" />
|
|
|
+ <el-table-column prop="productName" label="名称" min-width="150" />
|
|
|
+ <el-table-column label="规格尺寸 (cm)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productColor" label="颜色" width="170" />
|
|
|
+ <el-table-column prop="productUnit" label="单位" width="100" />
|
|
|
+ <el-table-column prop="quantity" label="需入库数量" width="100" />
|
|
|
+ <el-table-column prop="receiptQuantity" label="已入库数量" width="100" />
|
|
|
+ <el-table-column prop="waitQuantity" label="待入库数量" width="100" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="shortageMaterialDialog = false" size="defualt">关 闭</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -314,6 +404,7 @@ import moment from "moment";
|
|
|
import * as date from "@/utils/date.js";
|
|
|
import { ArrowLeftBold, ArrowRightBold } from "@element-plus/icons-vue";
|
|
|
import { async } from "@antv/x6/lib/registry/marker/main";
|
|
|
+import { reactive } from "vue";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const contractTag = computed(
|
|
@@ -385,6 +476,54 @@ const statusData = ref([
|
|
|
value: "99",
|
|
|
},
|
|
|
]);
|
|
|
+const arrivalStatusData = ref([
|
|
|
+ {
|
|
|
+ label: "未到货",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "部分到货",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已到货",
|
|
|
+ value: 2,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const purchaseStatus = ref([
|
|
|
+ {
|
|
|
+ label: "草稿",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审批中",
|
|
|
+ value: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "驳回",
|
|
|
+ value: 20,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已采购",
|
|
|
+ value: 30,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "变更中",
|
|
|
+ value: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已变更",
|
|
|
+ value: 70,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "作废",
|
|
|
+ value: 88,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "终止",
|
|
|
+ value: 99,
|
|
|
+ },
|
|
|
+]);
|
|
|
|
|
|
const isOverdueData = ref([
|
|
|
{
|
|
@@ -524,6 +663,14 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "欠料状态",
|
|
|
+ prop: "produceStatus",
|
|
|
+ slot: "shortageMaterials",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "交期",
|
|
|
prop: "deliveryPeriod",
|
|
|
width: 100,
|
|
@@ -1240,6 +1387,70 @@ const getRowClass = ({ row }) => {
|
|
|
}
|
|
|
return "";
|
|
|
};
|
|
|
+
|
|
|
+const shortageMaterialDialog = ref(false);
|
|
|
+const shortageMaterialTab = ref("1");
|
|
|
+const shortageMaterialData = reactive({
|
|
|
+ data: {
|
|
|
+ waitInbound: [],
|
|
|
+ waitPurchase: [],
|
|
|
+ undeliveredGoods: [],
|
|
|
+ },
|
|
|
+});
|
|
|
+const lookDetail = (row) => {
|
|
|
+ let contractId = row.contractId;
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .post("/subscribeDetail/page", { contractId, status: "15,30" })
|
|
|
+ .then((res) => {
|
|
|
+ shortageMaterialData.data.waitPurchase = res.rows;
|
|
|
+ let productIds = res.rows.map((x) => x.productId);
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: productIds,
|
|
|
+ data: shortageMaterialData.data.waitPurchase,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "fileList",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .post("/ehsdPurchase/page", {
|
|
|
+ dataResourceId: contractId,
|
|
|
+ arrivalStatus: "0,1",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ shortageMaterialData.data.undeliveredGoods = res.rows;
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy.post("/stockWait/page", { contractId }).then((res) => {
|
|
|
+ let arr = [];
|
|
|
+ for (let i = 0; i < res.rows.length; i++) {
|
|
|
+ const ele = res.rows[i];
|
|
|
+ for (let j = 0; j < ele.stockWaitDetailsList.length; j++) {
|
|
|
+ const jele = ele.stockWaitDetailsList[j];
|
|
|
+ jele.businessCode = ele.businessCode;
|
|
|
+ jele.waitQuantity =
|
|
|
+ Number(jele.quantity) - Number(jele.receiptQuantity);
|
|
|
+ arr.push(jele);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ shortageMaterialData.data.waitInbound = arr;
|
|
|
+ let productIds = arr.map((x) => x.productId);
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: productIds,
|
|
|
+ data: shortageMaterialData.data.waitInbound,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "fileList",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ shortageMaterialTab.value = "1";
|
|
|
+ shortageMaterialDialog.value = true;
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
::v-deep(.el-progress__text) {
|