|
@@ -5,6 +5,8 @@
|
|
|
<el-tab-pane label="销售订单" name="first"></el-tab-pane>
|
|
|
<!-- <el-tab-pane label="采购订单" name="second"></el-tab-pane> -->
|
|
|
<el-tab-pane label="生产进度" name="third"></el-tab-pane>
|
|
|
+ <el-tab-pane label="待采购" name="four"></el-tab-pane>
|
|
|
+
|
|
|
<!-- <el-tab-pane label="交易明细" name="third"></el-tab-pane>
|
|
|
<el-tab-pane label="外销跟单" name="four"> </el-tab-pane>
|
|
|
<el-tab-pane label="预算表" name="five" v-if="isShowSalesFinancemanArrange">
|
|
@@ -46,41 +48,169 @@
|
|
|
</div>
|
|
|
<div v-if="activeName === 'third'">
|
|
|
<byTable :hidePagination="true" :hideSearch="true" :source="tableData" :otherHeight="33" :config="config" highlight-current-row
|
|
|
- :action-list="[]">
|
|
|
+ :action-list="[]" :row-class-name="getRowClass">
|
|
|
+ <template #orderCode="{ item }">
|
|
|
+ <!-- class="el-click" @click="lookDetails(item)" -->
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{item.orderCode}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #pic="{ item }">
|
|
|
- <div v-if="item.fileUrl">
|
|
|
- <img :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
|
|
|
+ <div v-if="item.fileList &&item.fileList.length > 0">
|
|
|
+ <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #picOne="{ item }">
|
|
|
+ <div v-if="item.fileListOne &&item.fileListOne.length > 0">
|
|
|
+ <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
|
|
|
</div>
|
|
|
<div v-else></div>
|
|
|
</template>
|
|
|
+
|
|
|
<template #size="{ item }">
|
|
|
<div>
|
|
|
<span>{{ item.productLength }}</span>*
|
|
|
<span>{{ item.productWidth }}</span>*
|
|
|
<span>{{ item.productHeight }}</span>
|
|
|
</div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #isOverdue="{item}">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <span v-if="item.isOverdue=='1'" class="red"> 逾期 </span>
|
|
|
+ <span v-else> 未逾期 </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #produceStatus="{item}">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <span :class="{
|
|
|
+ 'red':item.produceStatus=='88' || item.produceStatus=='99'
|
|
|
+ }"> {{dictValueLabel(item.produceStatus, statusData)}} </span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
+
|
|
|
<template #progress="{item}">
|
|
|
<div style="width: 100%">
|
|
|
- <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
|
|
|
+ <el-progress type="circle" :percentage="item.percentage" width="60"
|
|
|
:status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #amount="{ item }">
|
|
|
- <div>{{ item.currency }} {{ moneyFormat(item.amount, 2) }}</div>
|
|
|
+
|
|
|
+ <template #prodTag="{ item }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-popover placement="top-start" :width="300" trigger="hover">
|
|
|
+ <div>
|
|
|
+ 备注:{{item.prodRemark}}
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <div style="width:100%;display:inline-block">
|
|
|
+ <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
|
|
|
+ {{ dictKeyValue(tag, contractTag) }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- <template #accountManagementName="{ item }">
|
|
|
- <div>
|
|
|
- {{ item.accountManagementName }} ({{
|
|
|
- item.accountManagementOpening
|
|
|
- }})
|
|
|
+
|
|
|
+ <template #logo="{item}">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{item.productLogoLength }} * {{item.productLogoWidth }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #shortageMaterials="{item}">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <!-- @click="lookDetail(item)" -->
|
|
|
+ <span v-if="item.lackStatus=='1'" class="red" style="cursor:pointer">
|
|
|
+ 欠料</span>
|
|
|
+ <span v-else>未欠料</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
|
|
|
+ <div style="width:100%">
|
|
|
+ <div v-if="pageActiveName !='4'">
|
|
|
+ <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block;cursor:pointer"
|
|
|
+ :class="showCotentQuantity(slotItem,item)">
|
|
|
+ <!-- @contextmenu="(e)=>handleContextmenu(slotItem,item,e)" -->
|
|
|
+ {{showCotent(slotItem,item,'finishQuantity')}}
|
|
|
+ </span>
|
|
|
+ <div v-else class="no-bk">
|
|
|
+ -
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- style="border-top:1px solid #ebeef5;margin-top:3px" -->
|
|
|
+ <div v-else>
|
|
|
+ <div v-if="isShowCotent(slotItem,item)">
|
|
|
+ {{showCotentOne(slotItem,item,'balanceQuantity') || ` `}}
|
|
|
+ </div>
|
|
|
+ <div v-else class="no-bk">
|
|
|
+ -
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
|
<div v-if="activeName === 'four'">
|
|
|
- <ExportTracking> </ExportTracking>
|
|
|
+ <byTable :hidePagination="true" :hideSearch="true" :source="tableDataOne" :otherHeight="33" :config="configOne" highlight-current-row
|
|
|
+ :action-list="[]">
|
|
|
+ <template #pic="{ item }">
|
|
|
+ <div v-if="item.fileList &&item.fileList.length > 0">
|
|
|
+ <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+ <template #size="{ item }">
|
|
|
+ <div>
|
|
|
+ <span>{{ item.productLength }}</span>*
|
|
|
+ <span>{{ item.productWidth }}</span>*
|
|
|
+ <span>{{ item.productHeight }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #purchaseCount="{item}">
|
|
|
+ <div style="width:100%;font-weight:700;color:#409EFF">
|
|
|
+ {{item.purchaseCount}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #count="{item}">
|
|
|
+ <div style="width:100%;font-weight:700;color:#409EFF">
|
|
|
+ {{item.count}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #prodTag="{ item }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-popover placement="top-start" :width="300" trigger="hover">
|
|
|
+ <div>
|
|
|
+ 备注:{{item.prodRemark}}
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <div style="width:100%;display:inline-block">
|
|
|
+ <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index"
|
|
|
+ :closable="useUserStore().user.companyId=='100'" @close="prodTagClose(index, item)">
|
|
|
+ {{ dictKeyValue(tag, contractTag) }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byTable>
|
|
|
</div>
|
|
|
+ <!-- <div v-if="activeName === 'four'">
|
|
|
+ <ExportTracking> </ExportTracking>
|
|
|
+ </div> -->
|
|
|
<div v-if="activeName === 'five'">
|
|
|
<ProfitBudgetEHSD> </ProfitBudgetEHSD>
|
|
|
</div>
|
|
@@ -116,10 +246,23 @@ import useUserStore from "@/store/modules/user";
|
|
|
const userInfo = useUserStore();
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
import { useRoute } from "vue-router";
|
|
|
+import { computed } from "vue";
|
|
|
const route = useRoute();
|
|
|
const props = defineProps({
|
|
|
contractId: String,
|
|
|
});
|
|
|
+const contractTag = computed(
|
|
|
+ () => proxy.useUserStore().allDict["contract_prod_tag"]
|
|
|
+);
|
|
|
+const backLinesData = computed(
|
|
|
+ () => proxy.useUserStore().allDict["back_lines"]
|
|
|
+);
|
|
|
+const frontLinesData = computed(
|
|
|
+ () => proxy.useUserStore().allDict["front_lines"]
|
|
|
+);
|
|
|
+const materialUnit = computed(
|
|
|
+ () => proxy.useUserStore().allDict["material_unit"]
|
|
|
+);
|
|
|
const activeName = ref("first");
|
|
|
const currentItem = ref({});
|
|
|
const approvalData = ref({});
|
|
@@ -129,6 +272,7 @@ const leftList = ref([]);
|
|
|
const contractDataList = ref([]);
|
|
|
const purchaseDataList = ref([]);
|
|
|
const tableData = ref([]);
|
|
|
+const tableDataOne = ref([]);
|
|
|
const transactionType = ref([
|
|
|
{
|
|
|
label: "请款",
|
|
@@ -196,11 +340,111 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "客户名称",
|
|
|
+ prop: "customerName",
|
|
|
+ width: 150,
|
|
|
+ // fixed: "left",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "业务员",
|
|
|
+ prop: "saleUserName",
|
|
|
+ width: 100,
|
|
|
+ // align: "center",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单号",
|
|
|
+ slot: "orderCode",
|
|
|
+ width: 150,
|
|
|
+ fixed: "left",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品名称",
|
|
|
+ prop: "productName",
|
|
|
+ "min-width": 200,
|
|
|
+ fixed: "left",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "业务公司",
|
|
|
+ prop: "contractCompanyName",
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "业务部门",
|
|
|
+ prop: "contractDeptName",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "是否逾期",
|
|
|
+ slot: "isOverdue",
|
|
|
+ width: 80,
|
|
|
+ // fixed: "left",
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "生产状态",
|
|
|
+ // prop: "produceStatus",
|
|
|
+ slot: "produceStatus",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictValueLabel(val, statusData.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单类型",
|
|
|
+ prop: "contractType",
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, contractTypeData.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "工厂",
|
|
|
+ prop: "companyName",
|
|
|
+ width: 100,
|
|
|
+ // align: "center",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "欠料状态",
|
|
|
+ prop: "produceStatus",
|
|
|
+ slot: "shortageMaterials",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "产品图片",
|
|
|
slot: "pic",
|
|
|
width: 80,
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品分类名称",
|
|
|
+ prop: "productClassifyNames",
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ },
|
|
|
// {
|
|
|
// attrs: {
|
|
|
// label: "设计图",
|
|
@@ -217,13 +461,6 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "产品名称",
|
|
|
- prop: "productName",
|
|
|
- "min-width": 150,
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- attrs: {
|
|
|
label: "规格尺寸(cm)",
|
|
|
slot: "size",
|
|
|
width: 160,
|
|
@@ -238,6 +475,33 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "正面纹路",
|
|
|
+ prop: "productFrontalTexture",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, frontLinesData.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "背面纹路",
|
|
|
+ prop: "productReverseTexture",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, backLinesData.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "LOGO尺寸(cm)",
|
|
|
+ slot: "logo",
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "生产件数",
|
|
|
prop: "quantity",
|
|
|
width: 100,
|
|
@@ -264,8 +528,165 @@ const config = computed(() => {
|
|
|
width: 100,
|
|
|
},
|
|
|
},
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "生产指示",
|
|
|
+ slot: "prodTag",
|
|
|
+ "min-width": 220,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "下单时间",
|
|
|
+ prop: "orderCreateTime",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "交期",
|
|
|
+ prop: "deliveryPeriod",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ if (val) {
|
|
|
+ return val.slice(0, 10);
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // attrs: {
|
|
|
+ // label: "投产时间",
|
|
|
+ // prop: "produceTime",
|
|
|
+ // width: 160,
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "完成时间",
|
|
|
+ prop: "finishTime",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "生产用时",
|
|
|
+ prop: "usageTime",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
];
|
|
|
});
|
|
|
+const configOne = computed(() => [
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "业务公司",
|
|
|
+ prop: "companyName",
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "单号",
|
|
|
+ prop: "subscribeCode",
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "物料图片",
|
|
|
+ slot: "pic",
|
|
|
+ align: "center",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "物料编码",
|
|
|
+ prop: "productCode",
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "物料名称",
|
|
|
+ prop: "productName",
|
|
|
+ "min-width": 150,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "规格尺寸 (cm)",
|
|
|
+ slot: "size",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "单位",
|
|
|
+ prop: "productUnit",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ render(unit) {
|
|
|
+ return proxy.dictKeyValue(unit, materialUnit.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "需求量",
|
|
|
+ prop: "prodNeedCount",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "需采购量",
|
|
|
+ slot: "count",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "已采购量",
|
|
|
+ slot: "purchaseCount",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "采购状态",
|
|
|
+ prop: "status",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ render(status) {
|
|
|
+ return status == 15 ? "待采购" : "部分采购";
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "生产指示",
|
|
|
+ slot: "prodTag",
|
|
|
+ "min-width": 220,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "申购人",
|
|
|
+ prop: "subcribeName",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "申购时间",
|
|
|
+ prop: "subcribeTime",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+]);
|
|
|
const handleClick = () => {};
|
|
|
|
|
|
const handleItemClick = (item) => {
|
|
@@ -280,7 +701,6 @@ const handleItemClick = (item) => {
|
|
|
processType: 20,
|
|
|
random: proxy.random(),
|
|
|
flowName: "销售订单详情",
|
|
|
-
|
|
|
businessId: currentItem.value.id,
|
|
|
};
|
|
|
} else if (activeName.value === "second") {
|
|
@@ -312,6 +732,54 @@ const pushProcessApproval = (row) => {
|
|
|
});
|
|
|
return;
|
|
|
};
|
|
|
+const contractTypeData = ref([
|
|
|
+ {
|
|
|
+ dictKey: "3",
|
|
|
+ dictValue: "打样订单",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "2",
|
|
|
+ dictValue: "内销订单",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "1",
|
|
|
+ dictValue: "外贸订单(退税)",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "4",
|
|
|
+ dictValue: "外贸订单(不退税)",
|
|
|
+ },
|
|
|
+]);
|
|
|
+const statusData = ref([
|
|
|
+ {
|
|
|
+ label: "未开始",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "生产中",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "生产完成",
|
|
|
+ value: "2",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "出库中",
|
|
|
+ value: "5",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已出库",
|
|
|
+ value: "10",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "作废",
|
|
|
+ value: "88",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "终止",
|
|
|
+ value: "99",
|
|
|
+ },
|
|
|
+]);
|
|
|
|
|
|
// const pushProcessApproval = (row) => {
|
|
|
// // 新页面打开方式
|
|
@@ -330,7 +798,7 @@ const pushProcessApproval = (row) => {
|
|
|
// window.open(page.href, "_blank");
|
|
|
// };
|
|
|
let first = true;
|
|
|
-
|
|
|
+let firstOne = true;
|
|
|
const handleChange = (val) => {
|
|
|
if (["first", "second"].includes(val)) {
|
|
|
if (val === "first") {
|
|
@@ -345,24 +813,131 @@ const handleChange = (val) => {
|
|
|
}
|
|
|
if (val === "third" && first) {
|
|
|
first = false;
|
|
|
+ // proxy
|
|
|
+ // .post("/contract/detail", {
|
|
|
+ // id: route.query.currentContractId,
|
|
|
+ // })
|
|
|
+ // .then((res) => {
|
|
|
+ // tableData.value = res.contractProductList.map((x) => ({
|
|
|
+ // ...x,
|
|
|
+ // incomplete: x.quantity - x.finishQuantity,
|
|
|
+ // }));
|
|
|
+ // let productIds = tableData.value.map((x) => x.productId);
|
|
|
+ // proxy.getFileData({
|
|
|
+ // businessIdList: productIds,
|
|
|
+ // data: tableData.value,
|
|
|
+ // att: "productId",
|
|
|
+ // businessType: "0",
|
|
|
+ // fileAtt: "fileList",
|
|
|
+ // filePathAtt: "fileUrl",
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .post("/produceOrderDetail/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ contractId: route.query.currentContractId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ res.rows.forEach((x) => {
|
|
|
+ if (x.prodTag) {
|
|
|
+ x.prodTags = x.prodTag.split(",");
|
|
|
+ } else {
|
|
|
+ x.prodTags = [];
|
|
|
+ }
|
|
|
+ x.incomplete = x.quantity - x.finishQuantity;
|
|
|
+ x.percentage = parseFloat(
|
|
|
+ (x.finishQuantity / x.quantity) * 100
|
|
|
+ ).toFixed(2);
|
|
|
+ });
|
|
|
+ tableData.value = res.rows.map((x) => ({ ...x, isCheck: true }));
|
|
|
+ // tableData.value.pagination.total = res.total;
|
|
|
+ // setTimeout(() => {
|
|
|
+ // loading.value = false;
|
|
|
+ // }, 200);
|
|
|
+ // nextTick(() => {
|
|
|
+ // let doms = document.querySelectorAll(".redClass");
|
|
|
+ // for (let i = 0; i < doms.length; i++) {
|
|
|
+ // doms[i].style.backgroundColor = "red";
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ const productIdList = res.rows.map((x) => x.productId);
|
|
|
+ // 请求文件数据并回显
|
|
|
+ if (productIdList.length > 0) {
|
|
|
+ // proxy.getFile(productIdList, tableData.value, "productId");
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: productIdList })
|
|
|
+ .then((fileObj) => {
|
|
|
+ for (let i = 0; i < tableData.value.length; i++) {
|
|
|
+ const ele = tableData.value[i];
|
|
|
+ for (const key in fileObj) {
|
|
|
+ if (
|
|
|
+ ele.productId == key &&
|
|
|
+ fileObj[ele.productId] &&
|
|
|
+ fileObj[ele.productId].length > 0
|
|
|
+ ) {
|
|
|
+ ele.fileList = fileObj[ele.productId].filter(
|
|
|
+ (x) => x.businessType == "0"
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ const productIdListOne = res.rows.map((x) => x.contractDetailId);
|
|
|
+ // 请求文件数据并回显
|
|
|
+ if (productIdListOne.length > 0) {
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: productIdListOne })
|
|
|
+ .then((fileObj) => {
|
|
|
+ for (let i = 0; i < tableData.value.length; i++) {
|
|
|
+ const ele = tableData.value[i];
|
|
|
+ for (const key in fileObj) {
|
|
|
+ if (
|
|
|
+ ele.contractDetailId == key &&
|
|
|
+ fileObj[ele.contractDetailId] &&
|
|
|
+ fileObj[ele.contractDetailId].length > 0
|
|
|
+ ) {
|
|
|
+ ele.fileListOne = fileObj[ele.contractDetailId].filter(
|
|
|
+ (x) => x.businessType == "0"
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // proxy.getFile(
|
|
|
+ // productIdListOne,
|
|
|
+ // tableData.value,
|
|
|
+ // "contractDetailId",
|
|
|
+ // "fileListOne"
|
|
|
+ // );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ if (val === "four" && firstOne) {
|
|
|
+ firstOne = false;
|
|
|
proxy
|
|
|
- .post("/contract/detail", {
|
|
|
- id: route.query.currentContractId,
|
|
|
+ .post("/subscribeDetail/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ contractId: route.query.currentContractId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- tableData.value = res.contractProductList.map((x) => ({
|
|
|
+ tableDataOne.value = res.rows.map((x) => ({
|
|
|
...x,
|
|
|
- incomplete: x.quantity - x.finishQuantity,
|
|
|
+ isCheck: true,
|
|
|
+ prodTags: x.prodTag ? x.prodTag.split(",") : [],
|
|
|
}));
|
|
|
- let productIds = tableData.value.map((x) => x.productId);
|
|
|
- proxy.getFileData({
|
|
|
- businessIdList: productIds,
|
|
|
- data: tableData.value,
|
|
|
- att: "productId",
|
|
|
- businessType: "0",
|
|
|
- fileAtt: "fileList",
|
|
|
- filePathAtt: "fileUrl",
|
|
|
- });
|
|
|
+ // sourceList.value.pagination.total = res.total;
|
|
|
+
|
|
|
+ let productIdList = res.rows.map((x) => x.productId);
|
|
|
+ // 请求文件数据并回显
|
|
|
+ if (productIdList.length > 0) {
|
|
|
+ proxy.getFile(productIdList, tableDataOne.value, "productId");
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
};
|
|
@@ -388,6 +963,30 @@ const getDetailsData = (id) => {
|
|
|
// tableData.value = res;
|
|
|
// });
|
|
|
};
|
|
|
+const processesData = ref([]);
|
|
|
+const getProcesses = () => {
|
|
|
+ proxy
|
|
|
+ .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
|
|
|
+ .then((res) => {
|
|
|
+ for (let i = 0; i < res.rows.length; i++) {
|
|
|
+ const ele = res.rows[i];
|
|
|
+ let attrs = {
|
|
|
+ label: `[ ${ele.name} ]`,
|
|
|
+ slot: ele.id,
|
|
|
+ isNeedHeaderSlot: false,
|
|
|
+ width: 110,
|
|
|
+ align: "center",
|
|
|
+ // fixed: "right",
|
|
|
+ };
|
|
|
+ config.value.push({
|
|
|
+ attrs,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ processesData.value = res.rows;
|
|
|
+ });
|
|
|
+};
|
|
|
+getProcesses();
|
|
|
if (props.contractId) {
|
|
|
getDetailsData(props.contractId);
|
|
|
}
|
|
@@ -405,7 +1004,68 @@ const checkShow = () => {
|
|
|
isShowSalesFinancemanArrange.value = true;
|
|
|
}
|
|
|
};
|
|
|
-checkShow();
|
|
|
+// checkShow();
|
|
|
+
|
|
|
+const getRowClass = ({ row }) => {
|
|
|
+ if (row.isOverdue == "1") {
|
|
|
+ return "redClass";
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+};
|
|
|
+
|
|
|
+const isShowCotent = (slot, item) => {
|
|
|
+ if (item && item.productionTaskProgressList) {
|
|
|
+ return item.productionTaskProgressList.some(
|
|
|
+ (x) => x.processesId == slot.id
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+};
|
|
|
+const showCotent = (slot, item, att) => {
|
|
|
+ if (item && item.productionTaskProgressList) {
|
|
|
+ const current = item.productionTaskProgressList.find(
|
|
|
+ (x) => x.processesId == slot.id
|
|
|
+ );
|
|
|
+ if (current) {
|
|
|
+ return current["schedulingCount"] + " / " + current["finishQuantity"];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const showCotentOne = (slot, item, att) => {
|
|
|
+ if (item && item.productionTaskProgressList) {
|
|
|
+ const current = item.productionTaskProgressList.find(
|
|
|
+ (x) => x.processesId == slot.id
|
|
|
+ );
|
|
|
+ if (current) {
|
|
|
+ return current["schedulingCount"] + " / " + current["balanceQuantity"];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const showCotentQuantity = (slot, item) => {
|
|
|
+ if (item && item.productionTaskProgressList) {
|
|
|
+ const current = item.productionTaskProgressList.find(
|
|
|
+ (x) => x.processesId == slot.id
|
|
|
+ );
|
|
|
+ if (current && Number(current.finishQuantity) > 0) {
|
|
|
+ if (Number(current.finishQuantity) >= item.quantity) {
|
|
|
+ return "tag-active";
|
|
|
+ } else if (Number(current.finishQuantity) < item.quantity) {
|
|
|
+ return "tag-active-1";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const handleClickFile = (file) => {
|
|
|
+ window.open(file.fileUrl, "_blank");
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -444,4 +1104,20 @@ checkShow();
|
|
|
line-height: 24px;
|
|
|
padding-left: 4px;
|
|
|
}
|
|
|
+
|
|
|
+::v-deep(.redClass) {
|
|
|
+ // color: #fff !important;
|
|
|
+ background-color: #fbdbdb !important;
|
|
|
+ .el-table-fixed-column--left,
|
|
|
+ .el-table-fixed-column--right {
|
|
|
+ background-color: #fbdbdb;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.red {
|
|
|
+ background: red;
|
|
|
+ border-radius: 2px;
|
|
|
+ padding: 4px;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
</style>
|