|
@@ -77,7 +77,7 @@
|
|
|
</div>
|
|
|
<el-popover placement="left" :width="400" style="height" trigger="hover" @show="onShow(data.day)">
|
|
|
<template #reference>
|
|
|
- <div v-if="isShow(data.day)" style="height: calc(100% - 20px);">
|
|
|
+ <div v-if="isShow(data.day)">
|
|
|
<div style="height:5px;margin-bottom:5px;border-radius:2px" v-for="(item,index) in judgeDay(data.day)" :key="index"
|
|
|
:style="{ background: colorData[item]}">
|
|
|
</div>
|
|
@@ -199,7 +199,7 @@
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<div v-if="row.prodFileList && row.prodFileList.length > 0">
|
|
|
- <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}}</span>
|
|
|
+ <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}} (定制)</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -689,7 +689,7 @@ watch(
|
|
|
const getFileData = () => {
|
|
|
let ids = [];
|
|
|
formData.orderData.contractProductList.map((x) => {
|
|
|
- ids.push(x.productId);
|
|
|
+ // ids.push(x.productId);
|
|
|
x.contractProductBomList.map((y) => {
|
|
|
ids.push(y.materialId);
|
|
|
});
|
|
@@ -701,9 +701,9 @@ const getFileData = () => {
|
|
|
})
|
|
|
.then((fileObj) => {
|
|
|
formData.orderData.contractProductList.map((x) => {
|
|
|
- if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
|
|
|
- x.fileUrl = fileObj[x.productId][0].fileUrl;
|
|
|
- }
|
|
|
+ // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
|
|
|
+ // x.fileUrl = fileObj[x.productId][0].fileUrl;
|
|
|
+ // }
|
|
|
x.contractProductBomList.map((y) => {
|
|
|
y.fileList = fileObj[y.materialId] || [];
|
|
|
if (y.fileList && y.fileList.length > 0) {
|
|
@@ -723,12 +723,31 @@ const lookDetails = (item) => {
|
|
|
formData.orderData.contractProductList.length > 0
|
|
|
) {
|
|
|
getFileData();
|
|
|
- let ids = formData.data.contractProductList.map((x) => x.id);
|
|
|
+ let ids = formData.orderData.contractProductList.map((x) => x.id);
|
|
|
+ let productIds = formData.orderData.contractProductList.map(
|
|
|
+ (x) => x.productId
|
|
|
+ );
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: productIds,
|
|
|
+ data: formData.orderData.contractProductList,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "productFile",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+
|
|
|
proxy
|
|
|
- .post("/fileInfo/getList", { businessIdList: ids })
|
|
|
+ .getFileData({
|
|
|
+ businessIdList: ids,
|
|
|
+ getAll: true,
|
|
|
+ })
|
|
|
.then((fileObj) => {
|
|
|
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
- const ele = formData.data.contractProductList[i];
|
|
|
+ for (
|
|
|
+ let i = 0;
|
|
|
+ i < formData.orderData.contractProductList.length;
|
|
|
+ i++
|
|
|
+ ) {
|
|
|
+ const ele = formData.orderData.contractProductList[i];
|
|
|
for (const key in fileObj) {
|
|
|
if (
|
|
|
ele.id == key &&
|
|
@@ -777,6 +796,10 @@ const handleClickUpload = async (att, flag, index) => {
|
|
|
a.click();
|
|
|
document.body.removeChild(a);
|
|
|
};
|
|
|
+
|
|
|
+const onPicture = (path) => {
|
|
|
+ window.open(path, "_blank");
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|