diff --git a/src/views/contract/components/addPropertyPlan.vue b/src/views/contract/components/addPropertyPlan.vue
new file mode 100644
index 0000000..7923d62
--- /dev/null
+++ b/src/views/contract/components/addPropertyPlan.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue
index fccafd4..b0a3164 100644
--- a/src/views/contract/components/editorContract.vue
+++ b/src/views/contract/components/editorContract.vue
@@ -190,9 +190,9 @@
政府采购项目
-
+
- {{ detail.gov_plane_id ? (detail.gov_plane.name || $refs['govPlane'].selected.name) : '' }}
+ {{ $refs['govPlane'].selected.name }}
请选择政府采购项目
@@ -592,6 +592,7 @@
gov_plane_id: res.gov_plane_id,
gov_plane: res.gov_plane
}
+ this.$refs['govPlane'].selected = res.gov_plane
this.plan = this.detail.plan
},
//y验证合同的名称是否存在重复
@@ -617,7 +618,8 @@
date: this.detail.date,
contract_plan_links: this.detail.plan.map(item => {
return item.value
- })
+ }),
+ gov_plane_id: this.detail.gov_plane_id
}).then(res => {
this.isShowEditor = false
Message({
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index 766082f..af9d1d0 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -158,6 +158,12 @@
+
+
+
@@ -483,6 +489,8 @@
form.gov_plane_id = row.id">
+
+
@@ -522,7 +530,8 @@ import detail from "./components/detailContract"
import paymentRegistration from "./components/paymentRegistration";
import contractSign from "@/views/contract/components/contractSign";
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
-import govPlane from './components/govPlane.vue'
+import govPlane from './components/govPlane.vue';
+import addPropertyPlan from "./components/addPropertyPlan.vue";
import {
download
} from '@/utils/downloadRequest'
@@ -533,7 +542,8 @@ export default {
paymentRegistration,
contractSign,
contractPaymentRegistration,
- govPlane
+ govPlane,
+ addPropertyPlan
},
data() {
var planPass = (rule, value, callback) => {
diff --git a/src/views/finance/components/addPropertyPlan.vue b/src/views/finance/components/addPropertyPlan.vue
index c76a756..ed8168a 100644
--- a/src/views/finance/components/addPropertyPlan.vue
+++ b/src/views/finance/components/addPropertyPlan.vue
@@ -29,6 +29,20 @@
+
+
+
计划评审时间 :
@@ -57,28 +71,28 @@
-
-
+
+
+
+
+
+
+
+
-
-
{
- contractSelect.page = e;
- getContracts();
- }
- "
- />
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -97,21 +111,42 @@ export default {
isShowModal: false,
isShow: false,
id: "",
+ pid: "",
type: "",
+ detail: {},
rowName: "",
form: {
project_id: "",
+ content: "",
plan_date: "",
actually_date: "",
},
rules: {
- project_id: [
+ actually_date: [
{
- required: true,
- message: "请填写项目",
+ validator: (rule, value, callback) => {
+ if (this.role == 1) {
+ value ? callback() : callback(new Error('请选择实际时间'))
+ } else {
+ callback()
+ }
+ },
+ message: "请选择实际时间",
},
],
+ plan_date: [
+ {
+ validator: (rule, value, callback) => {
+ if (this.role == 0) {
+ value ? callback() : callback(new Error('请选择计划时间'))
+ } else {
+ callback()
+ }
+ },
+ message: "请选择计划时间",
+ },
+ ]
},
contracts: [],
@@ -270,43 +305,33 @@ export default {
},
async getDetail() {
- const res = await show({ id: this.id });
- this.$integrateData(this.form, res);
+ const res = await show({ id: this.pid });
+ console.log(res.item.find(i => i.id === this.id))
+ this.$integrateData(this.form, res.item.find(i => i.id === this.id));
this.rowName = res.contract?.name;
+ this.detail = res
},
submit() {
- if (this.type === "add") {
- if (this.form.hasOwnProperty("id")) {
- delete this.form.id;
+ let temp = this.detail.item?.find(i => i.id === this.id)
+ let index = this.detail.item?.indexOf(temp)
+ this.detail.item?.splice(index,1,this.form)
+ this.detail.item_list = this.detail.item.map(i => {
+ return {
+ content: i.content,
+ actually_date: i.actually_date,
+ plan_date: i.plan_date
}
- store(this.form).then((res) => {
- this.$message({
- type: "success",
- message:
- this.type === "add" ? "新增财评评审" : "编辑财评评审" + "成功",
- });
- this.isShow = false;
- this.$emit("refresh");
- });
- }
- if (this.type === "editor") {
- Object.defineProperty(this.form, "id", {
- value: this.id,
- enumerable: true,
- configurable: true,
- writable: true,
- });
- save(this.form).then((res) => {
- this.$message({
- type: "success",
- message:
- this.type === "add" ? "新增财评评审" : "编辑财评评审" + "成功",
- });
- this.isShow = false;
- this.$emit("refresh");
- });
- }
+ })
+
+ save(this.detail).then(res => {
+ this.$message({
+ type: 'success',
+ message: '保存成功'
+ })
+ this.hidden();
+ this.$emit('refresh');
+ })
},
async getContracts() {
@@ -336,7 +361,7 @@ export default {
},
},
created() {
- this.getContracts();
+ // this.getContracts();
},
};
diff --git a/src/views/finance/components/file.vue b/src/views/finance/components/file.vue
index 305a0dc..03bee92 100644
--- a/src/views/finance/components/file.vue
+++ b/src/views/finance/components/file.vue
@@ -18,7 +18,7 @@