浏览代码

1.隐藏参数设置中模块
2.添加反馈截止日期字段

306132416@qq.com 4 年之前
父节点
当前提交
3149628da4
共有 3 个文件被更改,包括 49 次插入14 次删除
  1. 1 1
      src/App.vue
  2. 38 3
      src/views/data/UploadInfor.vue
  3. 10 10
      src/views/parameter/routerConfig.js

+ 1 - 1
src/App.vue

@@ -38,7 +38,7 @@ export default {
     return {
       navTitle1: ' > 数据管理',
       navTitle2: '',
-      isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
+      isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
       userAccount: ''
     }
   },

+ 38 - 3
src/views/data/UploadInfor.vue

@@ -121,6 +121,21 @@
       </div>
     </div>
 
+    <div class="dataName" style="margin-top: 2%;">
+      <span>反馈设置</span>
+      <select class="selectStyle" v-model="isFeedBack" autocomplete="off">
+        <option value="0">否</option>
+        <option value="1">是</option>
+      </select>
+      <input
+              type="date"
+              :min="localDay"
+              class="inputStyle"
+              v-model="feedBackTime"
+              v-show="isFeedBack === '1'"
+              @change="feedBackTimeChange"
+      />
+    </div>
     <div class="uploadFile">
       <p>附件</p>
       <label for="fileInput" @change="getFileInfo($event)"
@@ -166,6 +181,7 @@ export default {
       inforName: "",
       inforDes: "",
       materialTime: "",
+      feedBackTime:'',
       scope: "1", //1为共通 , 0为部分
       checkedBoxList: [], // 多选框选中的值
       addByCustomize: "",
@@ -181,11 +197,13 @@ export default {
       areaList: [], // 按区域添加
       groupList: [], // 按小组添加
       localMonth: "",
+      localDay:'',
       tableData: [], // 表格显示的数据
       allDlr: [], // 所有经销商数据
       idList: [],
       tipModalFlag: false,
       tipModalText: "",
+      isFeedBack:'0'
     };
   },
   computed: {
@@ -218,6 +236,11 @@ export default {
       // this.materialTime = this.localMonth.replace('-', '/');
       console.log(this.materialTime);
     },
+    // 反馈时间变化
+    feedBackTimeChange: function () {
+      // this.materialTime = this.localMonth.replace('-', '/');
+      console.log(this.feedBackTime);
+    },
     // 显示隐藏按小组添加下拉框
     showOption() {
       this.optionFlag = !this.optionFlag;
@@ -331,6 +354,9 @@ export default {
     },
     // 点击提交,检查名字是否重复,获取数据
     submit: function () {
+      if(this.isFeedBack === '0'){
+        this.feedBackTime = '';
+      }
       this.checkName();
       if (!this.tipFlag) {
         if (!this.inforDes) {
@@ -338,11 +364,17 @@ export default {
           return;
         }
         if (!this.materialTime) {
-          alert("素材时间不能为空");
+          alert("请选择素材时间");
           return;
         }
+        if(this.isFeedBack === '1'){
+          if(!this.feedBackTime){
+            alert("请选择截止日期");
+            return;
+          }
+        }
         if (!this.file) {
-          alert("请导入附件");
+          alert("请导入资料附件");
           return;
         }
         this.dlrIdList();
@@ -363,12 +395,15 @@ export default {
       let data = new Date();
       let year = data.getFullYear();
       let month = data.getMonth() + 1;
+      let day = data.getDate();
       if (month < 10) {
         month = "0" + month;
       } else {
         month = month + "";
       }
       this.localMonth = year + "-" + month;
+      this.localDay =  year + "-" + month + "-" + day;
+      console.log(this.localDay)
     },
     // 提交接口
     submitRequest: function () {
@@ -376,10 +411,10 @@ export default {
       this.file.forEach((item) => {
         paramData.append("file", item);
       });
-
       paramData.append("dataName", this.inforName);
       paramData.append("dataDesc", this.inforDes);
       paramData.append("sourceTime", this.materialTime);
+      paramData.append("endDate", this.feedBackTime);
       paramData.append("dealerScope", this.scope);
       console.log(this.scope, 111);
       if (this.scope === "0") {

+ 10 - 10
src/views/parameter/routerConfig.js

@@ -28,17 +28,17 @@ const TAG = [
         num: 6,
         title: '权限分组',
         path: 'grouping'
-    },
-    {
-        num: 7,
-        title: '链接上传',
-        path: 'linkUpload'
-    },
-    {
-        num: 8,
-        title: '常用参数',
-        path: 'commonParam'
     }
+    // {
+    //     num: 7,
+    //     title: '链接上传',
+    //     path: 'linkUpload'
+    // },
+    // {
+    //     num: 8,
+    //     title: '常用参数',
+    //     path: 'commonParam'
+    // }
 ]
 
 module.exports = {