|
@@ -221,13 +221,22 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
+ label: "归属公司",
|
|
|
+ prop: "corporationId",
|
|
|
+ data: companyData.value,
|
|
|
+ itemWidth: 33,
|
|
|
+ style: "width: 100%",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
label: "供应商",
|
|
|
prop: "supplyId",
|
|
|
data: supplierList.value,
|
|
|
fn: (val) => {
|
|
|
changeSupply(val);
|
|
|
},
|
|
|
- style: "width: 100%",
|
|
|
+ itemWidth: 35,
|
|
|
+ style: "width: 94%",
|
|
|
},
|
|
|
{
|
|
|
type: "slot",
|
|
@@ -387,11 +396,25 @@ const rules = ref({
|
|
|
],
|
|
|
type: [{ required: true, message: "请选择付款类型", trigger: "change" }],
|
|
|
rate: [{ required: true, message: "请输入税率", trigger: "blur" }],
|
|
|
+ corporationId: [
|
|
|
+ { required: true, message: "请选择归属公司", trigger: "change" },
|
|
|
+ ],
|
|
|
});
|
|
|
const fileList = ref([]);
|
|
|
const uploadData = ref({});
|
|
|
+const companyData = ref([]);
|
|
|
const getDict = () => {
|
|
|
proxy
|
|
|
+ .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
|
|
|
+ .then((res) => {
|
|
|
+ companyData.value = res.rows.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ label: x.name,
|
|
|
+ value: x.id,
|
|
|
+ }));
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy
|
|
|
.post("/dictTenantData/page", {
|
|
|
pageNum: 1,
|
|
|
pageSize: 999,
|
|
@@ -686,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);
|
|
|
};
|
|
@@ -748,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,
|
|
@@ -782,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,
|
|
@@ -826,6 +880,14 @@ const handlePushRoute = (row) => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
+const handlePushRouteOne = (row) => {
|
|
|
+ proxy.$router.push({
|
|
|
+ name: "AlreadyPurchase",
|
|
|
+ query: {
|
|
|
+ code: row.value,
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|