|
@@ -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>
|