diff --git a/src/api/model/pum.js b/src/api/model/pum.js
index 7ae2d41c..044919ca 100644
--- a/src/api/model/pum.js
+++ b/src/api/model/pum.js
@@ -1,6 +1,108 @@
import config from "@/config"
import http from "@/utils/request"
export default {
+ // 采购合同
+ contract: {
+ list: {
+ name: "采购合同列表",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract/`,
+ data
+ );
+ }
+ },
+ create: {
+ name: "创建采购合同",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract/`,
+ data);
+ }
+ },
+ cquery: {
+ name: "复杂查询",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract/cquery/`,
+ data);
+ }
+ },
+ item: {
+ name: "获取采购合同详情",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract/${id}/`
+ );
+ }
+ },
+ update: {
+ name: "更新采购合同",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/pum/pu_contract/${id}/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除采购合同",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/pum/pu_contract/${id}/`);
+ }
+ }
+ },
+ // 采购合同付款流水
+ contractRecord: {
+ list: {
+ name: "采购合同付款流水列表",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract_record/`,
+ data
+ );
+ }
+ },
+ create: {
+ name: "创建采购合同付款流水",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract_record/`,
+ data);
+ }
+ },
+ cquery: {
+ name: "复杂查询",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract_record/cquery/`,
+ data);
+ }
+ },
+ item: {
+ name: "获取采购合同付款流水详情",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract_record/${id}/`
+ );
+ }
+ },
+ update: {
+ name: "更新采购合同付款流水",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/pum/pu_contract_record/${id}/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除采购合同付款流水",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/pum/pu_contract_record/${id}/`);
+ }
+ }
+ },
// 采购订单
order: {
list: {
@@ -348,4 +450,4 @@ export default {
}
},
}
-}
\ No newline at end of file
+}
diff --git a/src/api/model/sam.js b/src/api/model/sam.js
index edf443f5..c158ea14 100644
--- a/src/api/model/sam.js
+++ b/src/api/model/sam.js
@@ -52,6 +52,56 @@ export default {
}
}
},
+ contractRecord: {
+ list: {
+ name: "合同流水列表",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/sam/contract_record/`,
+ data
+ );
+ }
+ },
+ create: {
+ name: "创建合同流水",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/sam/contract_record/`,
+ data);
+ }
+ },
+ cquery: {
+ name: "复杂查询",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/sam/contract_record/cquery/`,
+ data);
+ }
+ },
+ item: {
+ name: "获取合同流水详情",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/sam/contract_record/${id}/`
+ );
+ }
+ },
+ update: {
+ name: "更新合同流水",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/sam/contract_record/${id}/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除合同流水",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/sam/contract_record/${id}/`);
+ }
+ }
+ },
// 客户信息
customer: {
list: {
@@ -187,4 +237,4 @@ export default {
}
},
}
-}
\ No newline at end of file
+}
diff --git a/src/config/route.js b/src/config/route.js
index c776008b..d0f28f8b 100644
--- a/src/config/route.js
+++ b/src/config/route.js
@@ -2182,6 +2182,24 @@ const routes = [
},
component: "pum/planitem",
},
+ {
+ name: "puContract",
+ path: "/pum/contract",
+ meta: {
+ title: "采购合同",
+ perms: ["pu_contract"],
+ },
+ component: "pum/contract",
+ },
+ {
+ name: "puContractRecord",
+ path: "/pum/contract_record",
+ meta: {
+ title: "付款流水查询",
+ perms: ["pu_contract"],
+ },
+ component: "pum/contract_record",
+ },
{
name: "order",
path: "/pum/order",
@@ -2236,6 +2254,15 @@ const routes = [
},
component: "sam/contract",
},
+ {
+ name: "contractRecord",
+ path: "/sam/contract_record",
+ meta: {
+ title: "到款流水查询",
+ perms: ["contract"],
+ },
+ component: "sam/contract_record",
+ },
{
name: "samOrder",
path: "/sam/samOrder",
diff --git a/src/views/pum/components/PuContractRecordDrawer.vue b/src/views/pum/components/PuContractRecordDrawer.vue
new file mode 100644
index 00000000..e065c1df
--- /dev/null
+++ b/src/views/pum/components/PuContractRecordDrawer.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+ {{ statusMap[contract.status] || "-" }}
+
+
+
+
+
+
+ {{ contract.number }}
+ {{ contract.name }}
+ {{ contract.supplier_name }}
+ {{ contract.sign_date }}
+ {{ statusMap[contract.status] || "-" }}
+ {{ contract.description || "-" }}
+
+
+
+
+
+
+ {{ item.label }}
+ {{ item.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pum/components/PuContractRecordForm.vue b/src/views/pum/components/PuContractRecordForm.vue
new file mode 100644
index 00000000..60fa70d6
--- /dev/null
+++ b/src/views/pum/components/PuContractRecordForm.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 保存
+
+
+
+
+
+
diff --git a/src/views/pum/contract.vue b/src/views/pum/contract.vue
new file mode 100644
index 00000000..f73eba51
--- /dev/null
+++ b/src/views/pum/contract.vue
@@ -0,0 +1,170 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatMoney(scope.row.contract_amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.paid_amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.unpaid_amount) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ statusMap[scope.row.status] || "-" }}
+
+
+
+
+
+ 流水详情
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pum/contract_form.vue b/src/views/pum/contract_form.vue
new file mode 100644
index 00000000..0f9c12ce
--- /dev/null
+++ b/src/views/pum/contract_form.vue
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
diff --git a/src/views/pum/contract_record.vue b/src/views/pum/contract_record.vue
new file mode 100644
index 00000000..2f16d806
--- /dev/null
+++ b/src/views/pum/contract_record.vue
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 查看合同
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pum/order_form.vue b/src/views/pum/order_form.vue
index 56c12ed2..974b0032 100644
--- a/src/views/pum/order_form.vue
+++ b/src/views/pum/order_form.vue
@@ -40,6 +40,25 @@
+
+
+
+
+
+
+
{
+ this.contractOptions = res;
+ });
+ },
+ handleContractChange(value) {
+ const contract = this.contractOptions.find((item) => item.id === value);
+ if (contract) {
+ this.form.supplier = contract.supplier;
+ }
+ },
//提交
submit() {
this.$refs.dialogForm.validate(async (valid) => {
diff --git a/src/views/sam/components/ContractRecordDrawer.vue b/src/views/sam/components/ContractRecordDrawer.vue
new file mode 100644
index 00000000..e2cb71a9
--- /dev/null
+++ b/src/views/sam/components/ContractRecordDrawer.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+ {{ statusMap[contract.status] || "-" }}
+
+
+
+
+
+
+ {{ contract.number }}
+ {{ contract.name }}
+ {{ contract.customer_name }}
+ {{ contract.sign_date }}
+ {{ statusMap[contract.status] || "-" }}
+ {{ contract.description || "-" }}
+
+
+
+
+
+
+ {{ item.label }}
+ {{ item.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/sam/components/ContractRecordForm.vue b/src/views/sam/components/ContractRecordForm.vue
new file mode 100644
index 00000000..a7316da0
--- /dev/null
+++ b/src/views/sam/components/ContractRecordForm.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 保存
+
+
+
+
+
+
diff --git a/src/views/sam/contract.vue b/src/views/sam/contract.vue
index 96c26606..85f0d44d 100644
--- a/src/views/sam/contract.vue
+++ b/src/views/sam/contract.vue
@@ -12,23 +12,58 @@
-
-
+
+
+
+
+
+ {{ formatMoney(scope.row.amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.received_amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.unreceived_amount) }}
+
+
+
+
+
+
+
+
-
+
+
+
+ {{ statusMap[scope.row.status] || "-" }}
+
+
{{ scope.row.description }}
-
+
+
+ 流水详情
+
+
编辑
@@ -43,18 +78,27 @@
+
\ No newline at end of file
+
+
diff --git a/src/views/sam/contract_form.vue b/src/views/sam/contract_form.vue
index 31511550..e1affd11 100644
--- a/src/views/sam/contract_form.vue
+++ b/src/views/sam/contract_form.vue
@@ -43,6 +43,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 查看合同
+
+
+
+
+
+
+
+
+