Browse Source

交接单

lxf 1 year ago
parent
commit
00c69a2afb

+ 34 - 1
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -27,6 +27,17 @@
         </template>
       </byTable>
     </div>
+
+    <el-dialog title="交接单" v-if="openAllFile" v-model="openAllFile" width="500">
+      <div>
+        <div v-for="(file, index) in rowData.fileList" :key="index">
+          <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
+        </div>
+      </div>
+      <template #footer>
+        <el-button @click="openAllFile = false" size="large">关 闭</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -68,42 +79,49 @@ const config = computed(() => {
       attrs: {
         label: "合同到账时间",
         slot: "claimTime",
+        width: 160,
       },
     },
     {
       attrs: {
         label: "业务员",
         prop: "userName",
+        width: 140,
       },
     },
     {
       attrs: {
         label: "版本号",
         prop: "contractVersion",
+        width: 100,
       },
     },
     {
       attrs: {
         label: "产品编码",
         prop: "productCode",
+        width: 160,
       },
     },
     {
       attrs: {
         label: "产品名称",
         prop: "productName",
+        "min-width": 220,
       },
     },
     {
       attrs: {
         label: "单位",
         prop: "productUnit",
+        width: 140,
       },
     },
     {
       attrs: {
         label: "待采购数量",
         prop: "expendQuantity",
+        width: 140,
       },
     },
     {
@@ -123,7 +141,7 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              clickPurchase(row);
+              checkTheTransferSlip(row);
             },
           },
         ];
@@ -182,6 +200,21 @@ const selectData = ref([]);
 const selectRow = (data) => {
   selectData.value = data;
 };
+const rowData = ref({
+  fileList: [],
+});
+const openAllFile = ref(false);
+const checkTheTransferSlip = (item) => {
+  rowData.value = item;
+  rowData.value.fileList = [];
+  openAllFile.value = true;
+  proxy.post("/fileInfo/getList", { businessIdList: [item.contractId] }).then((fileObj) => {
+    rowData.value.fileList = fileObj[item.contractId] || [];
+  });
+};
+const openFile = (path) => {
+  window.open(path, "_blank");
+};
 </script>
 
 <style lang="scss" scoped>

+ 2 - 4
src/views/process/processApproval/index.vue

@@ -240,7 +240,7 @@ const handleSubmit = async (_type) => {
             }
           } else if (flowForm.flowKey == "contract_flow") {
             if (flowForm.tenantType === "EHSD") {
-              let fileList = data.fileList.map((item) => {
+              data.fileList = data.fileList.map((item) => {
                 return {
                   id: item.raw.id,
                   fileName: item.raw.fileName,
@@ -249,7 +249,6 @@ const handleSubmit = async (_type) => {
               });
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
-                fileList: fileList,
               });
               data.contractProductList = data.contractProductList.map((item) => {
                 let ehsdJson = JSON.stringify({
@@ -263,7 +262,7 @@ const handleSubmit = async (_type) => {
               });
             }
           } else if (flowForm.flowKey == "sample_flow") {
-            let fileList = data.fileList.map((item) => {
+            data.fileList = data.fileList.map((item) => {
               return {
                 id: item.raw.id,
                 fileName: item.raw.fileName,
@@ -272,7 +271,6 @@ const handleSubmit = async (_type) => {
             });
             data.ehsdJson = JSON.stringify({
               deliveryTime: data.deliveryTime,
-              fileList: fileList,
             });
             data.sampleProductList = data.sampleProductList.map((item) => {
               let ehsdJson = JSON.stringify({