已添加2个文件
已修改19个文件
597 ■■■■■ 文件已修改
src/api/publicApi/commonFile.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/issueManagement/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/components/formDia.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/index.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/contractManagement/filesDia.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementInvoiceLedger/fileList.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementInvoiceLedger/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/operationScheduling/components/formDia.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/operationScheduling/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionOrder/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/components/formDia.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/finalInspection/components/filesDia.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/finalInspection/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/processInspection/components/filesDia.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/processInspection/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/rawMaterialInspection/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceLedger/fileList.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceLedger/index.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceRegistration/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/publicApi/commonFile.js
@@ -8,4 +8,12 @@
    method: 'delete',
    data: ids
  })
}
// å¼€ç¥¨å°è´¦æ–‡ä»¶åˆ é™¤
export function delCommonFileInvoiceLedger(ids) {
  return request({
    url: '/invoiceLedger/delFile',
    method: 'delete',
    data: ids
  })
}
src/views/inventoryManagement/issueManagement/index.vue
@@ -95,7 +95,7 @@
           <el-table-column align="center" label="序号" type="index" width="60" />
           <el-table-column label="入库时间" prop="createTime" width="100" show-overflow-tooltip />
           <!-- <el-table-column label="入库批次" prop="inboundBatches" width="160" show-overflow-tooltip /> -->
<!-- &lt;!&ndash;            <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />&ndash;&gt; -->
<!--<el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />-->
           <el-table-column label="产品大类" prop="productCategory" show-overflow-tooltip />
           <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip />
           <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip />
@@ -153,7 +153,7 @@
            <el-table-column align="center" label="序号" type="index" width="60" />
            <el-table-column label="入库时间" prop="inboundDate" width="100" show-overflow-tooltip />
            <!-- <el-table-column label="入库批次" prop="inboundBatches" width="160" show-overflow-tooltip /> -->
            <!-- <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip /> -->
<!--             <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />-->
            <el-table-column label="产品大类" prop="productCategory" show-overflow-tooltip />
            <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip />
            <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip />
src/views/inventoryManagement/receiptManagement/components/formDia.vue
@@ -8,8 +8,6 @@
          placeholder="请选择采购订单号"
          clearable
          filterable
          remote
          :remote-method="loadPurchaseOptions"
          :loading="loadingPurchaseOptions"
          @change="handlePurchaseChange"
          :disabled="operationType === 'edit'"
@@ -44,28 +42,22 @@
        <el-table-column label="待入库数量" prop="quantity0" width="100" />
        <el-table-column label="本次入库数量" prop="quantityStock" width="150">
          <template #default="scope">
            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" />
            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" @change="() => calculateTotalPrice(scope.row)" />
          </template>
        </el-table-column>
<!--        <el-table-column label="税率(%)" prop="taxRate" width="120" />-->
<!--        <el-table-column-->
<!--          label="含税单价(元)"-->
<!--          prop="taxInclusiveUnitPrice"-->
<!--          :formatter="formattedNumber"-->
<!--          width="150"-->
<!--        />-->
<!--        <el-table-column-->
<!--          label="含税总价(元)"-->
<!--          prop="taxInclusiveTotalPrice"-->
<!--          :formatter="formattedNumber"-->
<!--          width="150"-->
<!--        />-->
<!--        <el-table-column-->
<!--          label="不含税总价(元)"-->
<!--          prop="taxExclusiveTotalPrice"-->
<!--          :formatter="formattedNumber"-->
<!--          width="150"-->
<!--        />-->
        <el-table-column label="税率(%)" prop="taxRate" width="120" />
        <el-table-column label="单价(元)" prop="unitPrice" width="150">
                    <template #default="scope">
                        <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.unitPrice" @change="() => calculateTotalPrice(scope.row)" />
                    </template>
                </el-table-column>
        <el-table-column
          label="总价(元)"
                    :formatter="formattedNumber"
          prop="totalPrice"
          width="150"
        >
        </el-table-column>
      </el-table>
    </el-form>
    <template #footer>
@@ -199,6 +191,18 @@
  return parseFloat(cellValue).toFixed(2);
};
// è®¡ç®—总价
const calculateTotalPrice = (row) => {
  const quantityStock = Number(row?.quantityStock ?? 0);
  const unitPrice = Number(row?.unitPrice ?? 0);
  if (Number.isFinite(quantityStock) && Number.isFinite(unitPrice)) {
    row.totalPrice = quantityStock * unitPrice;
  } else {
    row.totalPrice = 0;
  }
};
const fetchProductsByContract = async () => {
  if (!form.value.purchaseContractNumber) {
    proxy.$modal.msgWarning('请选择合同号')
@@ -217,6 +221,8 @@
    productList.value = productRes.data.map(item => ({
      ...item,
      quantityStock: 0,
      unitPrice: Number(item?.unitPrice ?? 0),
      totalPrice: 0,
      originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? 0),
    }))
  } catch (error) {
@@ -283,7 +289,9 @@
      nickName: userStore.nickName,
      details: selectedRows.value.map(product => ({
        id: product.id,
        inboundQuantity: Number(product.quantityStock)
        inboundQuantity: Number(product.quantityStock),
                unitPrice: Number(product.unitPrice),
                totalPrice: Number(product.totalPrice)
      })),
    };
    loading.value = true
@@ -365,6 +373,8 @@
      productList.value = res.data.map(item => ({
        ...item,
        quantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? row.inboundNum ?? 0),
        unitPrice: Number(item?.unitPrice ?? 0),
        totalPrice: Number(item?.quantityStock ?? 0) * Number(item?.unitPrice ?? 0),
        originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? row.inboundNum ?? 0),
      }))
      selectedRows.value = productList.value
src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue
@@ -31,12 +31,12 @@
            <el-input v-model="scope.row.unit" placeholder="请输入单位" />
          </template>
        </el-table-column>
        <!-- <el-table-column label="供应商" prop="supplierName" width="200">
        <el-table-column label="供应商" prop="supplierName" width="200">
          <template #default="scope">
            <el-input v-model="scope.row.supplierName" placeholder="请输入供应商" />
          </template>
        </el-table-column> -->
        <el-table-column label="物品类型" prop="itemType">
        </el-table-column>
        <el-table-column label="物品类型" prop="itemType" width="150">
          <template #default="scope">
            <el-select v-model="scope.row.itemType" filterable allow-create placeholder="请选择物品类型" style="width: 100%">
              <el-option
@@ -48,7 +48,7 @@
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="入库数量" prop="inboundNum">
        <el-table-column label="入库数量" prop="inboundNum" width="150">
          <template #default="scope">
            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.inboundNum" @change="() => calculateTotalPrice(scope.row)" />
          </template>
@@ -65,45 +65,22 @@
            />
          </template>
        </el-table-column>
<!--        <el-table-column label="税率(%)" prop="taxRate" width="150">-->
<!--          <template #default="scope">-->
<!--            <el-select v-model="scope.row.taxRate" placeholder="请选择税率" style="width: 100%" @change="() => calculateExclusivePrice(scope.row)">-->
<!--              <el-option-->
<!--                v-for="item in taxRateOptions"-->
<!--                :key="item.value"-->
<!--                :label="item.label"-->
<!--                :value="item.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column-->
<!--          label="含税单价(元)"-->
<!--          prop="taxInclusiveUnitPrice"-->
<!--          width="180"-->
<!--        >-->
<!--          <template #default="scope">-->
<!--            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="calculateTotalPrice(scope.row)" />-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column-->
<!--          label="含税总价(元)"-->
<!--          prop="taxInclusiveTotalPrice"-->
<!--          width="180"-->
<!--        >-->
<!--          <template #default="scope">-->
<!--            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveTotalPrice" @change="calculateExclusivePrice(scope.row)" />-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column-->
<!--          label="不含税总价(元)"-->
<!--          prop="taxExclusiveTotalPrice"-->
<!--          width="180"-->
<!--        >-->
<!--          <template #default="scope">-->
<!--            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxExclusiveTotalPrice" />-->
<!--          </template>-->
<!--        </el-table-column>-->
        <el-table-column label="数量" prop="quantityStock" width="150">
          <template #default="scope">
            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" @change="() => calculateTotalPrice(scope.row)" />
          </template>
        </el-table-column>
        <el-table-column label="单价(元)" prop="taxInclusiveUnitPrice" width="150">
          <template #default="scope">
            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="() => calculateTotalPrice(scope.row)" />
          </template>
        </el-table-column>
        <el-table-column
           label="总价(元)"
           prop="taxInclusiveTotalPrice"
           width="150"
         >
        </el-table-column>
        <el-table-column label="操作" width="80" v-if="operationType === 'add'">
          <template #default="scope">
            <el-button type="danger" size="small" @click="removeProductRow(scope.$index)">删除</el-button>
@@ -199,9 +176,10 @@
    itemType: '',
    inboundNum: 0,
    inboundDate: '',
    taxRate: null,
    quantityStock: 0,
    taxInclusiveUnitPrice: 0,
    taxInclusiveTotalPrice: 0,
    taxRate: null,
    taxExclusiveTotalPrice: 0,
  });
};
@@ -211,19 +189,20 @@
  productList.value.splice(index, 1);
};
// è®¡ç®—含税总价(根据单价和数量)
// è®¡ç®—总价(根据数量、单价和含税单价)
const calculateTotalPrice = (row) => {
  const unitPrice = Number(row.taxInclusiveUnitPrice || 0);
  const quantity = Number(row.inboundNum || 0);
  row.taxInclusiveTotalPrice = unitPrice * quantity;
  // è®¡ç®—普通总价:quantityStock * taxInclusiveUnitPrice
  const quantity = Number(row.quantityStock || 0);
  const taxInclusiveUnitPrice = Number(row.taxInclusiveUnitPrice || 0);
  row.taxInclusiveTotalPrice = quantity * taxInclusiveUnitPrice;
  calculateExclusivePrice(row);
};
// è®¡ç®—不含税总价(根据含税总价和税率)
const calculateExclusivePrice = (row) => {
  const totalPrice = Number(row.taxInclusiveTotalPrice || 0);
  const taxInclusiveTotalPrice = Number(row.taxInclusiveTotalPrice || 0);
  const taxRate = Number(row.taxRate || 0);
  row.taxExclusiveTotalPrice = totalPrice / (1 + taxRate / 100);
  row.taxExclusiveTotalPrice = taxInclusiveTotalPrice / (1 + taxRate / 100);
};
const submitForm = async () => {
@@ -267,9 +246,9 @@
      itemType: product.itemType,
      inboundDate: formatDateTime(product.inboundDate, false),
      taxRate: Number(product.taxRate || 0),
      taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0),
      taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0),
      taxExclusiveTotalPrice: Number(product.taxExclusiveTotalPrice || 0),
            taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0),
            taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0),
    }));
    loading.value = true
    if (operationType.value === 'edit') {
@@ -335,6 +314,7 @@
      itemType: row?.itemType ?? '',
      inboundNum: Number(row?.inboundNum ?? row?.inboundQuantity ?? 0),
      inboundDate: row?.inboundDate ?? row?.createTime ?? '',
      quantityStock: Number(row?.quantityStock ?? 0),
      taxRate: Number(row?.taxRate ?? 0),
      taxInclusiveUnitPrice: Number(row?.taxInclusiveUnitPrice ?? 0),
      taxInclusiveTotalPrice: Number(row?.taxInclusiveTotalPrice ?? 0),
src/views/inventoryManagement/receiptManagement/index.vue
@@ -28,12 +28,14 @@
          </div>
          <div>
            <el-button @click="handleOut">导出</el-button>
            <el-button type="danger" plain @click="handleDelete">删除</el-button>
          </div>
        </div>
        <div class="table_list">
          <el-table :data="tableData" border v-loading="tableLoading"
          <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
            :expand-row-keys="expandedRowKeys" :row-key="row => row.id" show-summary style="width: 100%"
            :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
            <el-table-column align="center" type="selection" width="55" />
            <el-table-column align="center" label="序号" type="index" width="60" />
            <el-table-column label="入库时间" prop="createTime" show-overflow-tooltip />
            <!-- <el-table-column label="入库批次" prop="inboundBatches" show-overflow-tooltip /> -->
@@ -42,11 +44,18 @@
            <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip />
            <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip />
            <el-table-column label="入库数量" prop="inboundNum" width="90" show-overflow-tooltip />
                        <el-table-column label="单价(元)" prop="unitPrice" width="150"></el-table-column>
                        <el-table-column label="总价(元)" prop="totalPrice" width="150"></el-table-column>
<!--            <el-table-column label="含税单价" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />-->
<!--            <el-table-column label="含税总价" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />-->
<!--            <el-table-column label="税率(%)" prop="taxRate" width="80" show-overflow-tooltip />-->
<!--            <el-table-column label="不含税总价" prop="taxExclusiveTotalPrice" width="100" show-overflow-tooltip />-->
            <!-- <el-table-column label="入库人" prop="createBy" width="80" show-overflow-tooltip /> -->
            <el-table-column fixed="right" label="操作" min-width="60" align="center">
              <template #default="scope">
                <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'production');">编辑</el-button>
              </template>
            </el-table-column>
          </el-table>
          <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
            :page="page.current" :limit="page.size" @pagination="paginationChange" />
@@ -92,11 +101,13 @@
           <el-table-column align="center" label="序号" type="index" width="60" />
           <el-table-column label="入库时间" prop="createTime" width="100" show-overflow-tooltip />
           <!-- <el-table-column label="入库批次" prop="inboundBatches" width="160" show-overflow-tooltip /> -->
<!--&lt;!&ndash;            <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />&ndash;&gt;-->
<el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />
           <el-table-column label="产品大类" prop="productCategory" show-overflow-tooltip />
           <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip />
           <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip />
           <el-table-column label="入库数量" prop="inboundNum" width="90" show-overflow-tooltip />
                     <el-table-column label="单价(元)" prop="unitPrice" width="150"></el-table-column>
                     <el-table-column label="总价(元)" prop="totalPrice" width="150"></el-table-column>
<!--&lt;!&ndash;            <el-table-column label="含税单价" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />&ndash;&gt;-->
<!--&lt;!&ndash;            <el-table-column label="含税总价" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />&ndash;&gt;-->
<!--&lt;!&ndash;            <el-table-column label="税率(%)" prop="taxRate" width="80" show-overflow-tooltip />&ndash;&gt;-->
@@ -152,12 +163,14 @@
            <el-table-column align="center" label="序号" type="index" width="60" />
            <el-table-column label="入库时间" prop="inboundDate" width="100" show-overflow-tooltip />
            <!-- <el-table-column label="入库批次" prop="inboundBatches" show-overflow-tooltip /> -->
            <!-- <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip /> -->
<!--             <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />-->
            <el-table-column label="产品大类" prop="productCategory" show-overflow-tooltip />
            <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip />
            <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip />
            <el-table-column label="物品类型" prop="itemType" show-overflow-tooltip />
            <el-table-column label="入库数量" prop="inboundNum" show-overflow-tooltip />
                        <el-table-column label="单价(元)" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
                        <el-table-column label="总价(元)" prop="taxInclusiveTotalPrice" width="150"></el-table-column>
<!--            <el-table-column label="含税单价" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />-->
<!--            <el-table-column label="含税总价" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />-->
<!--            <el-table-column label="税率(%)" prop="taxRate" width="80" show-overflow-tooltip />-->
@@ -328,14 +341,6 @@
    proxy.$modal.msgWarning('请选择数据')
    return
  }
  // æ£€æŸ¥æ˜¯å¦æœ‰ä»–人维护的数据
  const unauthorizedData = selectedRows.value.filter(item => item.createBy !== userStore.nickName)
  if (unauthorizedData.length > 0) {
    proxy.$modal.msgWarning("不可删除他人维护的数据")
    return
  }
  const ids = selectedRows.value.map(item => item.id)
  
  ElMessageBox.confirm('选中的内容将被删除,是否确认删除?', '删除', {
@@ -343,9 +348,24 @@
    cancelButtonText: '取消',
    type: 'warning',
  }).then(() => {
    // æ ¹æ®å½“前 tab ç±»åž‹é€‰æ‹©ä¸åŒçš„删除接口
    const deleteApi = activeTab.value === 'manual' ? delStockInCustom : delStockIn
    deleteApi({ ids }).then(() => {
    // æ ¹æ®å½“前 tab ç±»åž‹é€‰æ‹©ä¸åŒçš„删除接口和type参数
    let deleteApi, deleteParams
    if (activeTab.value === 'production') {
      // æˆå“åˆ é™¤ï¼Œtypeä¼ 2
      deleteApi = delStockIn
      deleteParams = { ids, type: 2 }
    } else if (activeTab.value === 'purchase') {
      // åŽŸæ–™åˆ é™¤ï¼Œtypeä¼ 1
      deleteApi = delStockIn
      deleteParams = { ids, type: 1 }
    } else {
      // ææ–™å…¥åº“
      deleteApi = delStockInCustom
      deleteParams = { ids }
    }
    deleteApi(deleteParams).then(() => {
      proxy.$modal.msgSuccess("删除成功")
      getList()
    }).catch(() => {
src/views/personnelManagement/contractManagement/filesDia.vue
@@ -30,16 +30,10 @@
          :isSelection="true"
          @selection-change="handleSelectionChange"
          height="500"
                    :page="page"
                    @pagination="pagination"
      >
      </PIMTable>
            <pagination
                style="margin: 10px 0"
                v-show="total > 0"
                @pagination="paginationSearch"
                :total="total"
                :page="page.current"
                :limit="page.size"
            />
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="closeDia">取消</el-button>
@@ -98,6 +92,7 @@
const page = reactive({
    current: 1,
    size: 100,
    total: 0
});
const total = ref(0);
const tableData = ref([]);
@@ -116,7 +111,7 @@
  currentId.value = row.id;
  getList()
}
const paginationSearch = (obj) => {
const pagination = (obj) => {
    page.current = obj.page;
    page.size = obj.limit;
    getList();
@@ -124,7 +119,7 @@
const getList = () => {
  fileListPage({accountId: currentId.value,accountType:accountType.value, ...page}).then(res => {
    tableData.value = res.data.records;
        total.value = res.data.total;
        page.total = res.data.total;
  })
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
src/views/procurementManagement/procurementInvoiceLedger/fileList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
<template>
  <el-dialog v-model="dialogVisible" title="附件" width="50%" :before-close="handleClose">
    <el-table :data="tableData" border height="40vh">
      <el-table-column label="附件名称" prop="name" min-width="400" show-overflow-tooltip />
      <el-table-column fixed="right" label="操作" width="200" align="center">
        <template #default="scope">
          <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">下载</el-button>
          <el-button link type="primary" size="small" @click="lookFile(scope.row)">预览</el-button>
          <el-button link type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-dialog>
  <filePreview ref="filePreviewRef" />
  <UploadModal ref="uploadModalRef" @uploadSuccess="handleUploadSuccess" />
</template>
<script setup>
import { ref } from 'vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import filePreview from '@/components/filePreview/index.vue'
import UploadModal from './Modal/UploadModal.vue'
import { delCommonFileInvoiceLedger} from '@/api/publicApi/commonFile.js'
const dialogVisible = ref(false)
const tableData = ref([])
const currentId = ref('')
const { proxy } = getCurrentInstance();
const filePreviewRef = ref()
const uploadModalRef = ref()
const handleClose = () => {
  dialogVisible.value = false
}
const open = (list, id = '') => {
  dialogVisible.value = true
  tableData.value = list
  currentId.value = id
}
const handleUpload = () => {
  if (!currentId.value) {
    ElMessage.warning('无法获取当前记录ID,请关闭后重新打开附件窗口')
    return
  }
  uploadModalRef.value.handleImport(currentId.value)
}
const handleUploadSuccess = (data) => {
  ElMessage.success('上传成功')
  // è¿™é‡Œå¯ä»¥æ·»åŠ åˆ·æ–°é™„ä»¶åˆ—è¡¨çš„é€»è¾‘
  // æš‚时先关闭上传模态框
}
const downLoadFile = (row) => {
  proxy.$download.name(row.url);
}
const lookFile = (row) => {
  filePreviewRef.value.open(row.url)
}
// åˆ é™¤é™„ä»¶
const handleDelete = (row) => {
  ElMessageBox.confirm(`确认删除附件"${row.name}"吗?`, '删除确认', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    type: 'warning',
  }).then(() => {
        delCommonFileInvoiceLedger([row.id]).then(() => {
      ElMessage.success('删除成功')
      // ä»Žåˆ—表中移除已删除的附件
      const index = tableData.value.findIndex(item => item.id === row.id)
      if (index !== -1) {
        tableData.value.splice(index, 1)
      }
    }).catch(() => {
      ElMessage.error('删除失败')
    })
  }).catch(() => {
    proxy.$modal.msg('已取消删除')
  })
}
defineExpose({
  open
})
</script>
<style></style>
src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -63,23 +63,8 @@
            <el-button link :icon="Files" type="danger"> é™„ä»¶ </el-button>
            <template #dropdown>
              <el-dropdown-menu>
                <el-dropdown-item
                  v-if="row.commonFiles.length !== 0"
                  :icon="Download"
                  command="download"
                >
                  ä¸‹è½½
                </el-dropdown-item>
                <el-dropdown-item :icon="Upload" command="upload">
                  ä¸Šä¼ 
                </el-dropdown-item>
                <el-dropdown-item
                  v-if="row.commonFiles.length !== 0"
                  :icon="Delete"
                  command="delete"
                  style="color: #f56c6c;"
                >
                  åˆ é™¤
                </el-dropdown-item>
              </el-dropdown-menu>
            </template>
@@ -88,14 +73,15 @@
        <template #operation="{ row }">
          <el-button
            type="primary"
            text
                        link
            @click="openEdit(row)"
          >
            ç¼–辑
          </el-button>
                    <el-button link type="primary" size="small" @click="downLoadFile(row)">附件</el-button>
          <el-button
            type="primary"
            text
                        link
            @click="handleDelete(row)"
          >
            åˆ é™¤
@@ -103,6 +89,7 @@
        </template>
      </PIMTable>
    </div>
        <FileList ref="fileListRef" />
    <UploadModal ref="modalRef" @uploadSuccess="uploadSuccess"></UploadModal>
    <EditModal ref="editmodalRef" @success="getTableData"></EditModal>
  </div>
@@ -130,9 +117,8 @@
import UploadModal from "./Modal/UploadModal.vue";
import EditModal from "./Modal/EditModal.vue";
import useUserStore from "@/store/modules/user.js";
import {delInvoiceLedgerByRegProductId} from "@/api/salesManagement/invoiceLedger.js";
import dayjs from "dayjs";
const userStore = useUserStore();
import FileList from "./fileList.vue";
defineOptions({
  name: "来票台账",
@@ -236,7 +222,7 @@
    },
    {
      fixed: "right",
      width: 150,
      width: 190,
      label: "操作",
      dataType: "slot",
      slot: "operation",
@@ -272,7 +258,12 @@
const handleSelectionChange = (val) => {
  multipleVal.value = val;
};
//附件相关
const fileListRef = ref(null)
//查看附件
const downLoadFile = (row) => {
    fileListRef.value.open(row.commonFiles, row.id)
}
// å¯¼å‡º
const handleOut = () => {
  ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
src/views/productionManagement/operationScheduling/components/formDia.vue
@@ -164,12 +164,12 @@
        if (sunqianUser) {
            sunqianUserId.value = sunqianUser.userId;
        }
        // åœ¨ç”¨æˆ·åˆ—表加载完成后创建行数据
        tableData.value = [createRow()];
        // åœ¨ç”¨æˆ·åˆ—表加载完成后创建行数据,并将产线数据带入
        tableData.value = [createRow(row)];
    });
}
const createRow = () => ({
const createRow = (row) => ({
    id: idFromRow.value,
    process: '包装',
    schedulingDate: '',
@@ -179,7 +179,7 @@
    unit: unitFromRow.value,
    remark: '',
    type: specificationModelFromRow.value,
    productionLine: '', // äº§çº¿å­—段
    productionLine: row?.productionLine ?? '', // ä»Žè¡Œæ•°æ®ä¸­èŽ·å–äº§çº¿ä¿¡æ¯
});
const submitForm = () => {
src/views/productionManagement/operationScheduling/index.vue
@@ -143,6 +143,11 @@
        width: 220,
    },
    {
        label: "产线",
        prop: "productionLine",
        width: 220,
    },
    {
        label: "单位",
        prop: "unit",
    },
src/views/productionManagement/productionOrder/index.vue
@@ -67,7 +67,7 @@
        width: 120,
    },
    {
        label: "合同号",
        label: "销售合同号",
        prop: "salesContractNo",
        width: 220,
    },
src/views/productionManagement/productionReporting/components/formDia.vue
@@ -13,8 +13,15 @@
              <el-input v-model="form.schedulingNum" placeholder="请输入" clearable disabled/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本次生产数量:" prop="finishedNum">
                    <el-col :span="12">
                        <el-form-item label="待生产数量:" prop="pendingNum">
                            <el-input v-model="form.pendingNum" placeholder="请输入" clearable disabled/>
                        </el-form-item>
                    </el-col>
        </el-row>
        <el-row :gutter="30">
                    <el-col :span="12">
                        <el-form-item label="本次生产数量:" prop="finishedNum">
                            <el-input-number
                                v-model="form.finishedNum"
                                placeholder="请输入"
@@ -25,13 +32,18 @@
                                style="width: 100%"
                                @change="changeNum"
                            />
                        </el-form-item>
                    </el-col>
          <el-col :span="12">
            <el-form-item label="单价(元):" prop="unitPrice">
              <el-input v-model="form.unitPrice" placeholder="请输入" clearable @input="calculateTotalPrice"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="待生产数量:" prop="pendingNum">
              <el-input v-model="form.pendingNum" placeholder="请输入" clearable disabled/>
            <el-form-item label="总价(元):" prop="totalPrice">
              <el-input v-model="form.totalPrice" placeholder="请输入" clearable disabled/>
            </el-form-item>
          </el-col>
        </el-row>
@@ -98,6 +110,8 @@
        finishedNum: "",
        schedulingUserId: "",
        schedulingDate: "",
        unitPrice: "",
        totalPrice: "",
  },
  rules: {
        schedulingNum: [{ required: true, message: "请输入", trigger: "blur" },],
@@ -121,6 +135,19 @@
        proxy.$modal.msgWarning('本次生产数量不可大于排产数量')
    }
    form.value.pendingNum = form.value.schedulingNum - form.value.finishedNum;
    calculateTotalPrice();
}
// è®¡ç®—总价
const calculateTotalPrice = () => {
    const quantity = Number(form.value.finishedNum ?? 0);
    const unitPrice = Number(form.value.unitPrice ?? 0);
    if (quantity > 0 && unitPrice > 0) {
        form.value.totalPrice = (quantity * unitPrice).toFixed(2);
    } else {
        form.value.totalPrice = '0.00';
    }
}
// æäº¤äº§å“è¡¨å•
const submitForm = () => {
src/views/qualityManagement/finalInspection/components/filesDia.vue
@@ -30,16 +30,10 @@
          :isSelection="true"
          @selection-change="handleSelectionChange"
          height="500"
                    :page="page"
                    @pagination="pagination"
      >
      </PIMTable>
            <pagination
                style="margin: 10px 0"
                v-show="total > 0"
                @pagination="paginationSearch"
                :total="total"
                :page="page.current"
                :limit="page.size"
            />
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="closeDia">取消</el-button>
@@ -95,6 +89,7 @@
const page = reactive({
    current: 1,
    size: 100,
    total: 0
});
const total = ref(0);
const tableData = ref([]);
@@ -111,7 +106,7 @@
  currentId.value = row.id;
  getList()
}
const paginationSearch = (obj) => {
const pagination = (obj) => {
    page.current = obj.page;
    page.size = obj.limit;
    getList();
@@ -119,7 +114,7 @@
const getList = () => {
  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
    tableData.value = res.data.records;
        total.value = res.data.total;
        page.total = res.data.total;
  })
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
src/views/qualityManagement/finalInspection/index.vue
@@ -150,7 +150,7 @@
    label: "操作",
    align: "center",
    fixed: "right",
    width: 280,
    width: 300,
    operation: [
      {
        name: "编辑",
src/views/qualityManagement/processInspection/components/filesDia.vue
@@ -30,16 +30,10 @@
          :isSelection="true"
          @selection-change="handleSelectionChange"
          height="500"
                    :page="page"
                    @pagination="pagination"
      >
      </PIMTable>
            <pagination
                style="margin: 10px 0"
                v-show="total > 0"
                @pagination="paginationSearch"
                :total="total"
                :page="page.current"
                :limit="page.size"
            />
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="closeDia">取消</el-button>
@@ -60,7 +54,6 @@
  qualityInspectFileDel,
  qualityInspectFileListPage
} from "@/api/qualityManagement/qualityInspectFile.js";
import Pagination from "@/components/PIMTable/Pagination.vue";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
@@ -98,6 +91,7 @@
const page = reactive({
    current: 1,
    size: 100,
    total: 0
});
const total = ref(0);
const tableData = ref([]);
@@ -114,17 +108,18 @@
  currentId.value = row.id;
  getList()
}
const paginationSearch = (obj) => {
const getList = () => {
  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
    tableData.value = res.data.records;
        page.total = res.data.total;
  })
}
const pagination = (obj) => {
    page.current = obj.page;
    page.size = obj.limit;
    getList();
};
const getList = () => {
  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
    tableData.value = res.data.records;
        total.value = res.data.total;
  })
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
const handleSelectionChange = (selection) => {
  selectedRows.value = selection;
src/views/qualityManagement/processInspection/index.vue
@@ -155,7 +155,7 @@
    label: "操作",
    align: "center",
    fixed: "right",
    width: 280,
    width: 300,
    operation: [
      {
        name: "编辑",
src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -30,16 +30,10 @@
          :isSelection="true"
          @selection-change="handleSelectionChange"
          height="500"
                    :page="page"
                    @pagination="pagination"
      >
      </PIMTable>
            <pagination
                style="margin: 10px 0"
                v-show="total > 0"
                @pagination="paginationSearch"
                :total="total"
                :page="page.current"
                :limit="page.size"
            />
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="closeDia">取消</el-button>
@@ -60,7 +54,6 @@
  qualityInspectFileDel,
  qualityInspectFileListPage
} from "@/api/qualityManagement/qualityInspectFile.js";
import Pagination from "@/components/PIMTable/Pagination.vue";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
@@ -97,6 +90,7 @@
const page = reactive({
    current: 1,
    size: 100,
    total: 0
});
const total = ref(0);
const tableData = ref([]);
@@ -114,15 +108,16 @@
  currentId.value = row.id;
  getList()
}
const paginationSearch = (obj) => {
const pagination = (obj) => {
    page.current = obj.page;
    page.size = obj.limit;
    getList();
};
const getList = () => {
  qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
    tableData.value = res.data.records;
        total.value = res.data.total;
        page.total = res.data.total;
  })
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -157,7 +157,7 @@
    label: "操作",
    align: "center",
    fixed: "right",
    width: 280,
    width: 300,
    operation: [
      {
        name: "编辑",
src/views/salesManagement/invoiceLedger/fileList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
<template>
  <el-dialog v-model="dialogVisible" title="附件" width="40%" :before-close="handleClose">
    <el-table :data="tableData" border height="40vh">
      <el-table-column label="附件名称" prop="name" min-width="400" show-overflow-tooltip />
      <el-table-column fixed="right" label="操作" width="150" align="center">
        <template #default="scope">
          <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">下载</el-button>
          <el-button link type="primary" size="small" @click="lookFile(scope.row)">预览</el-button>
          <el-button link type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-dialog>
  <filePreview ref="filePreviewRef" />
</template>
<script setup>
import { ref } from 'vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import filePreview from '@/components/filePreview/index.vue'
import { delCommonFileInvoiceLedger} from '@/api/publicApi/commonFile.js'
const dialogVisible = ref(false)
const tableData = ref([])
const { proxy } = getCurrentInstance();
const filePreviewRef = ref()
const handleClose = () => {
  dialogVisible.value = false
}
const open = (list) => {
  dialogVisible.value = true
  tableData.value = list
}
const downLoadFile = (row) => {
  proxy.$download.name(row.url);
}
const lookFile = (row) => {
  filePreviewRef.value.open(row.url)
}
// åˆ é™¤é™„ä»¶
const handleDelete = (row) => {
  ElMessageBox.confirm(`确认删除附件"${row.name}"吗?`, '删除确认', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    type: 'warning',
  }).then(() => {
        delCommonFileInvoiceLedger([row.id]).then(() => {
      ElMessage.success('删除成功')
      // ä»Žåˆ—表中移除已删除的附件
      const index = tableData.value.findIndex(item => item.id === row.id)
      if (index !== -1) {
        tableData.value.splice(index, 1)
      }
    }).catch(() => {
      ElMessage.error('删除失败')
    })
  }).catch(() => {
    proxy.$modal.msg('已取消删除')
  })
}
defineExpose({
  open
})
</script>
<style></style>
src/views/salesManagement/invoiceLedger/index.vue
@@ -42,7 +42,7 @@
        <el-table-column label="录入人" prop="invoicePerson" show-overflow-tooltip />
        <el-table-column label="录入日期" prop="createTime" show-overflow-tooltip :formatter="formatDate" width="180" />
        <el-table-column label="开票日期" prop="invoiceDate" show-overflow-tooltip width="120" />
        <el-table-column label="发票" prop="invoiceFileName" width="120" align="center" show-overflow-tooltip fixed="right">
        <!-- <el-table-column label="发票" prop="invoiceFileName" width="120" align="center" show-overflow-tooltip fixed="right">
          <template #default="scope">
            <el-button v-if="scope.row.invoiceFileName" text bg type="primary"
              @click="handleFile(scope.row.commonFiles)">
@@ -52,10 +52,11 @@
              ä¸Šä¼ 
            </el-button>
          </template>
        </el-table-column>
        </el-table-column> -->
        <el-table-column fixed="right" label="操作" width="150" align="center">
          <template #default="scope">
            <el-button link type="primary" size="small" @click="openForm(scope.row)">编辑</el-button>
            <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">附件</el-button>
            <el-button link type="primary" size="small" @click="delInvoiceLedger(scope.row)">删除</el-button>
          </template>
        </el-table-column>
@@ -107,7 +108,7 @@
            <el-form-item label="附件材料:" prop="remark">
              <el-upload v-model:file-list="fileList" :action="upload.url" multiple ref="fileUpload" auto-upload
                :headers="upload.headers" accept=".pdf" :limit="10" :before-upload="handleBeforeUpload"
                :on-error="handleUploadError" :on-success="handleUploadSuccess" :on-remove="handleRemove">
                :on-error="handleUploadError" :on-success="handleUploadSuccess">
                <el-button type="primary">上传</el-button>
                <template #tip>
                  <!--                  æ–‡ä»¶æ ¼å¼æ”¯æŒ doc,docx,xls,xlsx,ppt,pptx,pdf,txt,xml,jpg,jpeg,png,gif,bmp,rar,zip,7z-->
@@ -148,6 +149,7 @@
        </div>
      </template>
    </el-dialog>
    <FileList ref="fileListRef" />
  </div>
</template>
@@ -163,10 +165,11 @@
  commitFile,
  registrationProductPage,
  delInvoiceLedgerByRegProductId,
} from "../../../api/salesManagement/invoiceLedger.js";
} from "@/api/salesManagement/invoiceLedger.js";
import useUserStore from "@/store/modules/user.js";
import useFormData from "@/hooks/useFormData";
import dayjs from "dayjs";
import FileList from "./fileList.vue";
const { proxy } = getCurrentInstance();
const tableData = ref([]);
@@ -275,6 +278,10 @@
  invoiceLedgerProductInfo({ id: row.id }).then((res) => {
    form.value = { ...res.data };
    fileList.value = res.data.fileList;
    // ä¿å­˜ticketRegistrationId到表单数据中
    if (row.ticketRegistrationId) {
      form.value.ticketRegistrationId = row.ticketRegistrationId;
    }
    if (!form.value.invoicePerson) {
      form.value.invoicePerson = userStore.nickName;
      // ç§»é™¤å½•入日期默认值设置,只处理范围日期字段
@@ -292,7 +299,6 @@
};
// ä¸Šä¼ å‰æ ¡æ£€
function handleBeforeUpload(file) {
  console.log("file", file);
  // æ ¡æ£€æ–‡ä»¶å¤§å°
  if (file.size > 1024 * 1024 * 10) {
    proxy.$modal.msgError("上传文件大小不能超过10MB!");
@@ -304,6 +310,7 @@
    proxy.$modal.msgError("文件格式不匹配");
    return false;
  }
  console.log('handleBeforeUpload');
  proxy.$modal.loading("正在上传文件,请稍候...");
  return true;
}
@@ -315,20 +322,27 @@
// ä¸Šä¼ æˆåŠŸå›žè°ƒ
function handleUploadSuccess(res, file, uploadFiles) {
  proxy.$modal.closeLoading();
  console.log('handleUploadSuccess');
  if (res.code === 200) {
    proxy.$refs["fileUpload"].handleRemove(file);
    fileList.value.push(res.data);
    proxy.$modal.msgSuccess("上传成功");
    // å°†ä¸Šä¼ æˆåŠŸçš„æ–‡ä»¶ä¿¡æ¯æ·»åŠ åˆ°fileList中
    const fileInfo = {
      name: file.name,
      url: res.data.url || file.response?.data?.url || file.url,
      response: file.response
    };
    // æ£€æŸ¥æ˜¯å¦å·²å­˜åœ¨ç›¸åŒæ–‡ä»¶ï¼Œé¿å…é‡å¤æ·»åŠ 
    const existingFileIndex = fileList.value.findIndex(f => f.name === fileInfo.name);
    if (existingFileIndex === -1) {
      fileList.value.push(fileInfo);
    } else {
      fileList.value[existingFileIndex] = fileInfo;
    }
    // ç¡®ä¿è¡¨å•数据中的fileList也更新
    form.value.fileList = fileList.value;
  } else {
    proxy.$modal.msgError(res.msg);
    proxy.$refs.fileUpload.handleRemove(file);
  }
}
// ç§»é™¤æ–‡ä»¶
function handleRemove(file) {
  let index = fileList.value.findIndex((item) => item.url === file.url);
  if (index > -1) {
    fileList.value.splice(index, 1);
  }
}
// æäº¤è¡¨å•
@@ -362,13 +376,6 @@
    .catch(() => {
      proxy.$modal.msg("已取消");
    });
};
// æ‰“开附件上传弹窗
const handleDownload = (val) => {
  fileList.value = [];
  uploadModal.value = true;
  currentId.value = val.id;
};
// ç¡®è®¤æ–‡ä»¶ä¸Šä¼ 
@@ -434,6 +441,15 @@
  getList();
};
//附件相关
const fileListRef = ref(null)
//查看附件
const downLoadFile = (row) => {
    invoiceLedgerProductInfo({ id: row.id }).then((res) => {
        fileListRef.value.open(res.data.fileList)
    });
}
onMounted(() => {
  // è®¾ç½®å¼€ç¥¨æ—¥æœŸèŒƒå›´é»˜è®¤å€¼ä¸ºå½“天
  const today = dayjs().format('YYYY-MM-DD');
src/views/salesManagement/invoiceRegistration/index.vue
@@ -114,27 +114,24 @@
                    label="销售合同号"
                    prop="salesContractNo"
                    show-overflow-tooltip
                    width="200"
                />
                <el-table-column
                    label="客户合同号"
                    prop="customerContractNo"
                    width="200"
                    show-overflow-tooltip
                />
<!--                <el-table-column-->
<!--                    label="客户合同号"-->
<!--                    prop="customerContractNo"-->
<!--                    width="200"-->
<!--                    show-overflow-tooltip-->
<!--                />-->
                <el-table-column
                    label="客户名称"
                    prop="customerName"
                    show-overflow-tooltip
                    width="240"
                />
                <el-table-column label="业务员" prop="salesman" show-overflow-tooltip width="90"/>
                <el-table-column label="业务员" prop="salesman" show-overflow-tooltip/>
                <el-table-column
                    label="合同金额(元)"
                    prop="contractAmount"
                    show-overflow-tooltip
                    :formatter="formattedNumber"
                    width="220"
                
                />
                <el-table-column
@@ -142,7 +139,6 @@
                    prop="invoiceTotal"
                    show-overflow-tooltip
                    :formatter="formattedNumber"
                    width="120"
                />
                <el-table-column
                    label="未开票金额(元)"