From dcbb09a0b06f093bf77ab094671d4672eb5317c5 Mon Sep 17 00:00:00 2001
From: luojie <125330818@qq.com>
Date: Sat, 3 Jan 2026 22:11:33 +0800
Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=8A=BD=E7=A6=BB2]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Template/BaseInfoFormPcakge.vue | 34 ++++-
src/components/Template/DecimalInput.vue | 146 +++++++++++++++++++
src/components/Template/HandleFormItem.vue | 159 ++++++++++-----------
src/store/modules/template.js | 6 +
.../comps/template/comps/sp/SWYPBQGZYZBB.vue | 86 +++++------
.../comps/template/comps/sp/SWYPFXCBYPZB.vue | 8 +-
.../comps/template/comps/sp/SWYPFXRYPZB.vue | 24 ++--
.../comps/template/mixins/templateMixin.js | 10 ++
vue.config.js | 4 +-
9 files changed, 330 insertions(+), 147 deletions(-)
create mode 100644 src/components/Template/DecimalInput.vue
diff --git a/src/components/Template/BaseInfoFormPcakge.vue b/src/components/Template/BaseInfoFormPcakge.vue
index 7a362cf..d140ebc 100644
--- a/src/components/Template/BaseInfoFormPcakge.vue
+++ b/src/components/Template/BaseInfoFormPcakge.vue
@@ -94,7 +94,7 @@
{{ formFields[sItem.subKey] }}
- {{ formFields[sItem.subKey] }}
+ {{ formFields[sItem.subKey] }}
{{ formFields[sItem.subKey] }}
-
{{ formFields[sItem.subKey] }}
+
{{ formFields[sItem.subKey] }}
@@ -157,12 +157,19 @@ export default {
}
}
},
-
mounted() {
this.handleFormField();
},
methods: {
+ getFillType(type) {
+ const typeObj = {
+ actFill: "orange-border",//实际填写的边框颜色
+ green: "green-border",
+ preFill: "blue-border",//预填写的边框颜色
+ }
+ return typeObj[type] || ""
+ },
onInputNumberChange(key, val){
if(val === 0){
this.formFields[key] = null;
@@ -413,4 +420,25 @@ export default {
width: auto;
margin-left: 10px;
}
+.clickable{
+ cursor: pointer;
+ width: auto;
+ margin-left: 10px;
+ min-width: 100px;
+ height: 28px;
+ border-radius: 4px;
+ border:1px solid #4ea2ff;
+}
+
+.orange-border {
+ border-color: #f9c588;
+}
+
+.green-border {
+ border-color: green;
+}
+
+.blue-border {
+ border-color: #4ea2ff;
+}
\ No newline at end of file
diff --git a/src/components/Template/DecimalInput.vue b/src/components/Template/DecimalInput.vue
new file mode 100644
index 0000000..0fe677c
--- /dev/null
+++ b/src/components/Template/DecimalInput.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue
index 9f14ea8..4d409fe 100644
--- a/src/components/Template/HandleFormItem.vue
+++ b/src/components/Template/HandleFormItem.vue
@@ -1,73 +1,54 @@
-
+
-
-
-
-
+
+
+
-
-
+
+
diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js
index 77b6906..18228a4 100644
--- a/src/views/business/comps/template/mixins/templateMixin.js
+++ b/src/views/business/comps/template/mixins/templateMixin.js
@@ -50,6 +50,16 @@ export default {
setConditionOptions(options) {
this.$store.commit('template/SET_CONDITION_OPTIONS', options)
},
+ //统一处理blur事件,因为有效周期和过期日期是相关的,所以需要在有效周期失焦时更新过期日期
+ onHandleBlur(fields){
+ const {key ,effectivePeriodUnit,effectivePeriod} = fields;
+ const {createTime} = this.formData;
+ if(key ==="effectivePeriod"){//统一处理有效周期失焦,计算失效事件,保证字段名不能变
+ const start = moment(createTime);
+ const end = start.add(Number(effectivePeriod), effectivePeriodUnit).format("YYYY-MM-DD HH:mm:ss");
+ this.$refs.stepFormPackageRef.updateFormField("expireDate", end);
+ }
+ }
},
diff --git a/vue.config.js b/vue.config.js
index 054942f..489b432 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://localhost:8080`,
- //target: `http://39.99.251.173:8080`,
+ // target: `http://localhost:8080`,
+ target: `http://39.99.251.173:8080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''