فهرست منبع

采购页面权限

cz 1 سال پیش
والد
کامیت
6cd74c106a
2فایلهای تغییر یافته به همراه43 افزوده شده و 0 حذف شده
  1. 39 0
      src/components/process/PurchasePayment.vue
  2. 4 0
      src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

+ 39 - 0
src/components/process/PurchasePayment.vue

@@ -709,6 +709,15 @@ if (
 ) {
   isHave.value = true;
 }
+// 判断当前用户有无采购合同页面权限
+const isHavePurchase = ref(false);
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("alreadyPurchase")
+) {
+  isHavePurchase.value = true;
+}
+
 const getFormData = () => {
   return proxy.deepClone(formData.data);
 };
@@ -771,6 +780,17 @@ const getDecisionAids = () => {
       auxiliaryData.value[1].data = res.purchaseInfoList.map((item) => {
         return [
           {
+            label: "合同编号",
+            value: item.purchaseCode,
+            style: {
+              color: "#0084FF",
+              cursor: isHavePurchase.value ? "pointer" : "revert",
+            },
+            fn: isHavePurchase.value ? handlePushRouteOne : () => {},
+            id: item.purchaseId,
+            num: 1,
+          },
+          {
             label: "物品编码",
             value: item.productCode,
             id: item.productId,
@@ -805,6 +825,17 @@ const getDecisionAids = () => {
         }
         return [
           {
+            label: "合同编号",
+            value: item.purchaseCode,
+            style: {
+              color: "#0084FF",
+              cursor: isHavePurchase.value ? "pointer" : "revert",
+            },
+            fn: isHavePurchase.value ? handlePushRouteOne : () => {},
+            id: item.purchaseId,
+            num: 1,
+          },
+          {
             label: "物品编码",
             value: item.productCode,
             id: item.productId,
@@ -849,6 +880,14 @@ const handlePushRoute = (row) => {
     },
   });
 };
+const handlePushRouteOne = (row) => {
+  proxy.$router.push({
+    name: "AlreadyPurchase",
+    query: {
+      code: row.value,
+    },
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 4 - 0
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -338,6 +338,7 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { NumberToChinese } from "@/utils/util.js";
 import PurchasePDF from "@/components/PDF/purchasePDF.vue";
+const route = useRoute();
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -854,6 +855,9 @@ const handleArrival = (row) => {
 
 getDict();
 getHeaderData();
+if (route.query.code) {
+  sourceList.value.pagination.keyword = route.query.code;
+}
 getList();
 
 const start = () => {