Просмотр исходного кода

提交任务池已承保添加默认按签单时间承保的逻辑

hxl13994548489 2 лет назад
Родитель
Сommit
4ac20091ac

+ 39 - 7
src/components/Form/retrievalForm.vue

@@ -112,6 +112,10 @@ export default {
       type: String,
       default: "120px",
     },
+    dateType :{
+      type: String,
+      default: "0",
+    }
   },
   data() {
     return {
@@ -131,14 +135,42 @@ export default {
   },
   created() {
     this.fields.forEach((field) => {
-      if (field.label === "报价时间" && !this.formData[field.list]) {
-        this.$set(this.formData, field.list, [
-          this.currentDate,
-          this.currentDate,
-        ]);
-        this.$set(this.formData, field.name[0], this.currentDate);
-        this.$set(this.formData, field.name[1], this.currentDate);
+      if(this.dateType!="3"){
+        if (field.label === "报价时间" && !this.formData[field.list]) {
+          this.$set(this.formData, field.list, [
+            this.currentDate,
+            this.currentDate,
+          ]);
+          this.$set(this.formData, field.name[0], this.currentDate);
+          this.$set(this.formData, field.name[1], this.currentDate);
+        }
+        if (field.label === "签单时间" && !this.formData[field.list]) {
+          this.$set(this.formData, field.list, [
+            '',
+            '',
+          ]);
+          this.$set(this.formData, field.name[0], '');
+          this.$set(this.formData, field.name[1], '');
+        }
+      }else{
+        if (field.label === "报价时间" && !this.formData[field.list]) {
+          this.$set(this.formData, field.list, [
+            '',
+            '',
+          ]);
+          this.$set(this.formData, field.name[0], '');
+          this.$set(this.formData, field.name[1], '');
+        }
+        if (field.label === "签单时间" && !this.formData[field.list]) {
+          this.$set(this.formData, field.list, [
+            this.currentDate,
+            this.currentDate,
+          ]);
+          this.$set(this.formData, field.name[0], this.currentDate);
+          this.$set(this.formData, field.name[1], this.currentDate);
+        }
       }
+      
     });
     this.formFields = this.fields;
     this.resetForm();

+ 1 - 1
src/views/Task/AgentPoolChannel/AgentPoolChannel3.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
+    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="3"
       @areaSelectChange="areaSelectChange"></retrievalForm>
     <kt-common-table :data="pageResult" :columns="columns1" element-loading-text="加载中..." v-loading="loading"
       :showBatchDelete="false" @findPage="findPage" button3Name="转发" button3Type="text"

+ 1 - 1
src/views/Task/CompanyPoolChannel/CompanyPoolChannel3.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
+    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="3"
       @areaSelectChange="areaSelectChange"></retrievalForm>
     <kt-common-table :data="pageResult" :columns="columns1" element-loading-text="加载中..." v-loading="loading"
       :showBatchDelete="false" @findPage="findPage" ref="commonTable" :stripe="false"

+ 2 - 2
src/views/Task/ElectricSales/AgentPoolChannel3.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
-    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
+    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="3"
       @areaSelectChange="areaSelectChange"></retrievalForm>
-    <kt-common-table :data="pageResult" :columns="columns1" element-loading-text="加载中..." v-loading="loading"
+    <kt-common-table :data="pageResult" :columns="columns1" element-loading-text="加载中..." v-loading="loading" 
       :showBatchDelete="false" @findPage="findPage" button3Name="转发" button3Type="text"
       @handleButton3="transmit" button2Name="报价轨迹" button2Type="text"  ref="commonTable" :stripe="false"
       button6Name="批单" button6Type="text" @handleButton6="batchOrder"

+ 1 - 1
src/views/Task/TaskPoolChannel/TaskPoolChannel3.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
+    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="3"
       @areaSelectChange="areaSelectChange"></retrievalForm>
     <kt-common-table :data="pageResult" ref="commonTable" :columns="columns1" element-loading-text="加载中..." v-loading="loading"
       :showBatchDelete="false" @findPage="findPage"

+ 6 - 0
src/views/Task/mixin.js

@@ -118,6 +118,12 @@ export const mixin = { // 导出混入对象
           type: 'date',
           list: 'attachList'
         },
+        {
+          name: ["signStartDateStr", "signEndDateStr"],
+          label: '签单时间',
+          type: 'date',
+          list: 'signList'
+        },
       ],
       loading: false,
       queryFrom: {},