|
@@ -727,8 +727,10 @@
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="记录查看" v-model="recordDialog" width="70%" destroy-on-close v-if="recordDialog">
|
|
|
|
|
|
+ <el-dialog title="物料明细查看" v-model="recordDialog" width="90%" destroy-on-close v-if="recordDialog">
|
|
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
|
|
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
|
|
|
|
+ <el-tab-pane label="欠料查询" name="4">
|
|
|
|
+ </el-tab-pane>
|
|
<el-tab-pane label="采购记录" name="1">
|
|
<el-tab-pane label="采购记录" name="1">
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="到货登记记录" name="3">
|
|
<el-tab-pane label="到货登记记录" name="3">
|
|
@@ -737,6 +739,36 @@
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
<byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
|
|
<byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
|
|
|
|
+ <template #detail1 v-if="activeName=='4'">
|
|
|
|
+ <div style="width:100%">
|
|
|
|
+ <el-table :data="formData.recordData.oweData" :span-method="objectSpanMethod">
|
|
|
|
+ <el-table-column prop="orderCode" label="订单号" width="130" />
|
|
|
|
+ <el-table-column label="物料图片" width="80">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="productCode" label="物料编码" />
|
|
|
|
+ <el-table-column prop="productName" label="productName" />
|
|
|
|
+ <el-table-column label="规格尺寸(cm)" width="140">
|
|
|
|
+ <template #default="{ row, $index }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="物料颜色" prop="productColor" width="170" />
|
|
|
|
+ <el-table-column label="订单量" prop="orderQuantity" width="100" />
|
|
|
|
+ <el-table-column label="总需求" prop="demandQuantity" width="100" />
|
|
|
|
+ <el-table-column label="库存" prop="stockQuantity" width="100" />
|
|
|
|
+ <el-table-column label="已领料" prop="prodOutQuantity" width="100" />
|
|
|
|
+ <el-table-column label="采购在途" prop="transitQuantity" width="100" />
|
|
|
|
+ <el-table-column label="净需求欠量" prop="lackQuantity" width="100" />
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
<template #detail1 v-if="activeName=='1'">
|
|
<template #detail1 v-if="activeName=='1'">
|
|
<div style="width:100%">
|
|
<div style="width:100%">
|
|
<el-table :data="formData.recordData.purchaseProductList">
|
|
<el-table :data="formData.recordData.purchaseProductList">
|
|
@@ -787,7 +819,6 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<template #detail2 v-if="activeName=='2'">
|
|
<template #detail2 v-if="activeName=='2'">
|
|
<div style="width:100%">
|
|
<div style="width:100%">
|
|
<el-table :data="formData.recordData.stockJournalDetailsList">
|
|
<el-table :data="formData.recordData.stockJournalDetailsList">
|
|
@@ -1073,7 +1104,7 @@
|
|
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
<el-button @click="confirmDialogOne =false" size="default" v-debounce>取 消</el-button>
|
|
<el-button @click="confirmDialogOne =false" size="default" v-debounce>取 消</el-button>
|
|
- <el-button @click="submitConfirmOne(true)" type="primary" size="default" v-debounce v-if="rowDataOne.beginWorkStatus ==10">提
|
|
|
|
|
|
+ <el-button @click="submitConfirmOne(true)" type="primary" size="default" v-debounce v-if="rowDataOne.beginWorkStatus!=10">提
|
|
交</el-button>
|
|
交</el-button>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -1436,6 +1467,8 @@ const config = ref([
|
|
render(val) {
|
|
render(val) {
|
|
if (val) {
|
|
if (val) {
|
|
return proxy.dictValueLabel(val, prodConfirmStatusData.value);
|
|
return proxy.dictValueLabel(val, prodConfirmStatusData.value);
|
|
|
|
+ } else {
|
|
|
|
+ return "未发起";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -1777,6 +1810,8 @@ const configCopy = ref([
|
|
render(val) {
|
|
render(val) {
|
|
if (val) {
|
|
if (val) {
|
|
return proxy.dictValueLabel(val, prodConfirmStatusData.value);
|
|
return proxy.dictValueLabel(val, prodConfirmStatusData.value);
|
|
|
|
+ } else {
|
|
|
|
+ return "未发起";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -2697,6 +2732,17 @@ const recordFormConfig = computed(() => {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
type: "title1",
|
|
type: "title1",
|
|
|
|
+ title: "欠料查询",
|
|
|
|
+ isShow: activeName.value == "4",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "slot",
|
|
|
|
+ slotName: "detail1",
|
|
|
|
+ label: " ",
|
|
|
|
+ isShow: activeName.value == "4",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "title1",
|
|
title: "采购记录",
|
|
title: "采购记录",
|
|
isShow: activeName.value == "1",
|
|
isShow: activeName.value == "1",
|
|
},
|
|
},
|
|
@@ -2732,7 +2778,7 @@ const recordFormConfig = computed(() => {
|
|
});
|
|
});
|
|
const activeName = ref("1");
|
|
const activeName = ref("1");
|
|
const lookDetails = (item) => {
|
|
const lookDetails = (item) => {
|
|
- activeName.value = "1";
|
|
|
|
|
|
+ activeName.value = "4";
|
|
recordDialog.value = true;
|
|
recordDialog.value = true;
|
|
proxy
|
|
proxy
|
|
.post("/produceOrder/detail", {
|
|
.post("/produceOrder/detail", {
|
|
@@ -2793,6 +2839,27 @@ const lookDetails = (item) => {
|
|
});
|
|
});
|
|
}, 1200);
|
|
}, 1200);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ proxy
|
|
|
|
+ .post("/contractMrpInfo/page", {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 999,
|
|
|
|
+ contractId: item.contractId,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ formData.recordData.oweData = res.rows;
|
|
|
|
+ const productIds = formData.recordData.oweData.map(
|
|
|
|
+ (x) => x.materialId
|
|
|
|
+ );
|
|
|
|
+ proxy.getFileData({
|
|
|
|
+ businessIdList: productIds,
|
|
|
|
+ data: formData.recordData.oweData,
|
|
|
|
+ att: "materialId",
|
|
|
|
+ businessType: "0",
|
|
|
|
+ fileAtt: "fileList",
|
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
@@ -3211,7 +3278,7 @@ const confirmRules = ref({
|
|
const submitConfirm = (flag) => {
|
|
const submitConfirm = (flag) => {
|
|
if (flag) {
|
|
if (flag) {
|
|
confirmFormDom.value.handleSubmit(() => {
|
|
confirmFormDom.value.handleSubmit(() => {
|
|
- confirmFormData.data.beginWorkStatus = "1";
|
|
|
|
|
|
+ // confirmFormData.data.beginWorkStatus = "1";
|
|
formLoading.value = true;
|
|
formLoading.value = true;
|
|
proxy
|
|
proxy
|
|
.post("/produceOrderDetail/editBeginWork", confirmFormData.data)
|
|
.post("/produceOrderDetail/editBeginWork", confirmFormData.data)
|
|
@@ -3223,7 +3290,7 @@ const submitConfirm = (flag) => {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- confirmFormData.data.beginWorkStatus = "0";
|
|
|
|
|
|
+ // confirmFormData.data.beginWorkStatus = "0";
|
|
formLoading.value = true;
|
|
formLoading.value = true;
|
|
proxy
|
|
proxy
|
|
.post("/produceOrderDetail/editBeginWork", confirmFormData.data)
|
|
.post("/produceOrderDetail/editBeginWork", confirmFormData.data)
|
|
@@ -3303,7 +3370,7 @@ const addSchedule = (row, val, date) => {
|
|
.then(
|
|
.then(
|
|
(res) => {},
|
|
(res) => {},
|
|
(err) => {
|
|
(err) => {
|
|
- proxy.msgTip("排程失败,请联系管理员");
|
|
|
|
|
|
+ proxy.msgTip("排程失败,请联系管理员", 2);
|
|
}
|
|
}
|
|
);
|
|
);
|
|
};
|
|
};
|
|
@@ -3321,7 +3388,7 @@ const scheduleBlur = (row, date) => {
|
|
.then(
|
|
.then(
|
|
(res) => {},
|
|
(res) => {},
|
|
(err) => {
|
|
(err) => {
|
|
- proxy.msgTip("排程失败,请联系管理员");
|
|
|
|
|
|
+ proxy.msgTip("排程失败,请联系管理员", 2);
|
|
}
|
|
}
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -3469,6 +3536,40 @@ const changeOpUser = (val) => {
|
|
.post("/productionBeginConfirm/add", { opUserId: val })
|
|
.post("/productionBeginConfirm/add", { opUserId: val })
|
|
.then((res) => {});
|
|
.then((res) => {});
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const flitterData = (arr) => {
|
|
|
|
+ let spanOneArr = [];
|
|
|
|
+ let concatOne = 0;
|
|
|
|
+ arr.forEach((item, index) => {
|
|
|
|
+ if (index === 0) {
|
|
|
|
+ spanOneArr.push(1);
|
|
|
|
+ } else {
|
|
|
|
+ //注意这里的contractId是表格绑定的字段,根据自己的需求来改
|
|
|
|
+ if (item.contractId === arr[index - 1].contractId) {
|
|
|
|
+ //第一列需合并相同内容的判断条件
|
|
|
|
+ spanOneArr[concatOne] += 1;
|
|
|
|
+ spanOneArr.push(0);
|
|
|
|
+ } else {
|
|
|
|
+ spanOneArr.push(1);
|
|
|
|
+ concatOne = index;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return {
|
|
|
|
+ one: spanOneArr,
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const objectSpanMethod = ({ rowIndex, columnIndex }) => {
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ const _row = flitterData(sourceList.value.data).one[rowIndex];
|
|
|
|
+ const _col = _row > 0 ? 1 : 0;
|
|
|
|
+ return {
|
|
|
|
+ rowspan: _row,
|
|
|
|
+ colspan: _col,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|