Explorar el Código

fix: 1. 产品列表组件:改为通过supplierId匹配获取供应商名称
2. 发票列表页:添加明细导出按钮并配置导出参数
3. 应付账款信息表格:优化删除、日期、价格输入、备注的交互权限,修复文件组件类型判断逻辑

liujt hace 13 horas
padre
commit
c8798133f6

+ 4 - 3
src/BIZComponents/product-list.vue

@@ -623,9 +623,10 @@
             // item['entrustedEnterpriseIdList'] = supplierList[item.categoryId];
             if (supplierList[item.categoryId]?.length) {
               // item['entrustedEnterpriseId'] = supplierList[item.id][0].id;
-              item['supplierCode'] = supplierList[item.categoryId][0].code;
-              item['supplierId'] = supplierList[item.categoryId][0].id;
-              item['supplierName'] = supplierList[item.categoryId][0].name;
+              // item['supplierCode'] = supplierList[item.categoryId][0].code;
+              // item['supplierId'] = supplierList[item.categoryId][0].id;
+              // item['supplierName'] = supplierList[item.categoryId][0].name;
+              item['supplierName'] = supplierList[item.categoryId].find((i) => i.id == item.supplierId)?.name || '';
             }
           });
         }

+ 6 - 4
src/views/financialManage/payableManage/components/infoTable.vue

@@ -56,8 +56,8 @@
             v-if="dialogType !== 'view'"
             @confirm="handleDelInfo($index)"
           >
-            <template v-slot:reference>
-              <el-link type="danger" :underline="false" icon="el-icon-delete">
+            <template v-slot:reference="scope">
+              <el-link v-if="!scope.row?.id" type="danger" :underline="false" icon="el-icon-delete">
                 删除
               </el-link>
             </template>
@@ -76,6 +76,7 @@
             }"
           >
             <el-date-picker
+              :disabled="row?.id ? true : false"
               style="width: 95%"
               v-model="row.paidDate"
               type="date"
@@ -99,6 +100,7 @@
           >
             <el-input-number
               @change="(val, oldVal) => handlePrice(val, oldVal, row, $index)"
+              :disabled="row?.id ? true : false"
               v-model="row.paidTotalPrice"
               :controls="false"
               :precision="2"
@@ -110,12 +112,12 @@
         </template>
         <template v-slot:files="{ row, $index }">
           <el-form-item :prop="'detailList.' + $index + '.files'">
-            <fileMain v-model="row.files" :type="dialogType"></fileMain>
+            <fileMain v-model="row.files" :type="dialogType || (row.id ? 'view' : 'add')"></fileMain>
           </el-form-item>
         </template>
         <template v-slot:remark="{ row, $index }" v-if="dialogType !== 'view'">
           <el-form-item>
-            <el-input v-model="row.remark" type="textarea"></el-input>
+            <el-input :disabled="row?.id ? true : false" v-model="row.remark" type="textarea"></el-input>
           </el-form-item>
         </template>
         <template v-slot:columnRequired="{ column }">

+ 24 - 1
src/views/purchasingManage/purchaseOrder/invoice/index.vue

@@ -40,6 +40,14 @@
             >
               批量删除
             </el-button>
+
+            <exportButton
+              btnName="明细导出"
+              fileName="明细导出"
+              apiUrl="/eom/purchaseorderreceive/v1/exportDetail"
+              :params="exportParams"
+            ></exportButton>
+
             <el-dropdown trigger="click" :disabled="selection?.length === 0">
               <el-button type="primary" class="el-icon-printer" size="small">
                 打印<i class="el-icon-arrow-down el-icon--right"></i>
@@ -63,6 +71,8 @@
                 >
               </el-dropdown-menu>
             </el-dropdown>
+
+
           </template>
 
           <!-- 查看详情列 -->
@@ -232,6 +242,7 @@
     },
     data() {
       return {
+        params: {},
         activeComp: 'saleorder',
 
         selection: [], //单选中集合
@@ -378,7 +389,14 @@
         cacheKeyUrl: 'eos-8f646c6a-purchaseOrder-invoice'
       };
     },
-    computed: {},
+    computed: {
+      exportParams() {
+        return {
+          ...this.params,
+          receiveIds: this.selection.map(item => item.id)
+        }
+      }
+    },
     created() {
       enterprisePage({
         pageNum: 1,
@@ -393,6 +411,11 @@
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
+        this.params = {
+          pageNum: page,
+          size: limit,
+          ...where
+        };
         return getReceiveTableList({
           pageNum: page,
           size: limit,