Browse Source

fix:采购单管理

snow 2 years ago
parent
commit
6892ed1af6

+ 227 - 0
src/views/purchase/porder/columns.tsx

@@ -98,3 +98,230 @@ export function useColumns() {
     columns
   };
 }
+
+export const preview_columns: Array<{ field: string; label: string }> = [
+  {
+    label: "采购单名称",
+    field: "name"
+  },
+  {
+    label: "采购编号",
+    field: "sequenceNo"
+  },
+  {
+    label: "采购员",
+    field: "ownerName"
+  },
+  {
+    label: "部门",
+    field: "department"
+  },
+  {
+    label: "采购时间",
+    field: "createdTime"
+  },
+  {
+    label: "状态",
+    field: "status"
+  },
+  {
+    label: "采购单类型",
+    field: "cgdType"
+  },
+  {
+    label: "订单来源",
+    field: "cgdSource"
+  },
+  {
+    label: "业务企业编号",
+    field: "companyNo"
+  },
+  {
+    label: "业务企业公司",
+    field: "companyName"
+  },
+  {
+    label: "采购时间",
+    field: "cgdTime"
+  },
+  {
+    label: "备库编号",
+    field: "bkCode"
+  },
+  {
+    label: "确认单编号",
+    field: "qrdCode"
+  },
+  {
+    label: "商品编号",
+    field: "goodNo"
+  },
+  {
+    label: "商品名称",
+    field: "ownerid"
+  },
+  {
+    label: "商品类类型",
+    field: "goodType"
+  },
+  {
+    label: "品牌",
+    field: "goodBrand"
+  },
+  {
+    label: "一级分类",
+    field: "firstCat"
+  },
+  {
+    label: "二级分类",
+    field: "secCat"
+  },
+  {
+    label: "三级分类",
+    field: "thirdCat"
+  },
+  {
+    label: "核算码",
+    field: "fundCode"
+  },
+  {
+    label: "单位",
+    field: "goodUnit"
+  },
+  {
+    label: "工艺描述",
+    field: "goodDesc"
+  },
+  {
+    label: "金价",
+    field: "metalsType"
+  },
+  {
+    label: "贵金属类型",
+    field: "metalsType"
+  },
+  {
+    label: "贵金属重量",
+    field: "weight"
+  },
+  {
+    label: "金价",
+    field: "goldPrice"
+  },
+  {
+    label: "物流时间",
+    field: "deliveryDay"
+  },
+  {
+    label: "工期时间",
+    field: "workDay"
+  },
+  {
+    label: "税率",
+    field: "tax"
+  },
+  {
+    label: "裸价",
+    field: "barePrice"
+  },
+  {
+    label: "加标费",
+    field: "markPrice"
+  },
+  {
+    label: "包装费",
+    field: "packPrice"
+  },
+  {
+    label: "开模费",
+    field: "costPrice"
+  },
+  {
+    label: "物流费",
+    field: "deliveryPrice"
+  },
+  {
+    label: "单价",
+    field: "goodPrice"
+  },
+  {
+    label: "是否库存",
+    field: "isStock"
+  },
+  {
+    label: "商品数量",
+    field: "goodNum"
+  },
+  {
+    label: "总价",
+    field: "totalPrice"
+  },
+  {
+    label: "供应商编号",
+    field: "supplierNo"
+  },
+  {
+    label: "供应商名称",
+    field: "supplierName"
+  },
+  {
+    label: "已付金额",
+    field: "apay_fee"
+  },
+  {
+    label: "待付金额",
+    field: "wpay_fee"
+  },
+  {
+    label: "已回票",
+    field: "ainv_fee"
+  },
+  {
+    label: "未回票",
+    field: "winv_fee"
+  },
+  {
+    label: "发货方式",
+    field: "sendType"
+  },
+  {
+    label: "备库人员",
+    field: "bkCreater"
+  },
+  {
+    label: "发货状态",
+    field: "sendStatus"
+  },
+  {
+    label: "未发货数量",
+    field: "wsendNum"
+  },
+  {
+    label: "发货数量",
+    field: "sendNum"
+  },
+  {
+    label: "备注",
+    field: "remark"
+  },
+  {
+    label: "付款状态",
+    field: "pay_status"
+  },
+  {
+    label: "发票状态",
+    field: "inv_status"
+  },
+  {
+    label: "工差重量",
+    field: "diff_weight"
+  },
+  {
+    label: "工差金额",
+    field: "diff_fee"
+  },
+  {
+    label: "退货数量",
+    field: "thNum"
+  }
+];

+ 5 - 4
src/views/purchase/porder/index.vue

@@ -9,6 +9,7 @@ import { type PaginationProps } from "@pureadmin/table";
 import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 import { useNav } from "/@/layout/hooks/nav";
 import { statusList } from "/@/utils/status";
+import PreviewDialog from "./preview-dialog.vue";
 const { logout } = useNav();
 defineOptions({
   name: "role"
@@ -35,9 +36,8 @@ const form = reactive({
 const dataList = ref([]);
 const loading = ref(true);
 const { columns } = useColumns();
-const showModel = ref(false);
-const sitem = ref(null);
 const formRef = ref<FormInstance>();
+const PreviewDialogRef = ref<InstanceType<typeof PreviewDialog>>(null);
 
 const pagination = reactive<PaginationProps>({
   total: 0,
@@ -92,8 +92,7 @@ async function resetSearch() {
 }
 //新建/编辑/详情弹窗
 function editItem(row) {
-  sitem.value = row;
-  showModel.value = true;
+  PreviewDialogRef.value.onDisplay(row);
 }
 
 const resetForm = (formEl: FormInstance | undefined) => {
@@ -210,6 +209,8 @@ onMounted(() => {
         </PureTable>
       </template>
     </TableProBar>
+
+    <PreviewDialog ref="PreviewDialogRef" />
   </div>
 </template>
 

+ 26 - 0
src/views/purchase/porder/preview-dialog.vue

@@ -0,0 +1,26 @@
+<script setup lang="ts">
+import { ref } from "vue";
+import { preview_columns } from "./columns";
+const visible = ref(false);
+const data = ref({});
+
+defineExpose({
+  onDisplay: _data => {
+    visible.value = true;
+    data.value = _data;
+  }
+});
+</script>
+
+<template>
+  <el-dialog v-model="visible" title="采购单详情" center>
+    <el-descriptions :column="2" border size="small">
+      <el-descriptions-item
+        v-for="(item, index) in preview_columns"
+        :label="item.label"
+        :key="index"
+        >{{ data[item.field] }}</el-descriptions-item
+      >
+    </el-descriptions>
+  </el-dialog>
+</template>