Procházet zdrojové kódy

Merge branch 'bing-xuanchuan' into 'master-copy'

宣传物料工作流

See merge request spfm/spfm-market-front!419
盛冰 před 2 roky
rodič
revize
b373351b2b

+ 29 - 7
src/pages/main/advertising/materialApplication.vue

@@ -78,7 +78,7 @@
                 </el-table-column>
                  <el-table-column label="申请人类型" prop="applyType">
                 </el-table-column>
-                <el-table-column label="申请时间" prop="riqi">
+                <el-table-column label="申请时间" prop="applyTime">
                 </el-table-column>
                 <el-table-column label="当前进度" prop="progressBar">
                     <template slot-scope="props">
@@ -1323,23 +1323,45 @@
     //   this.clickHandle(r);
     },
        //获取userID
-      getUserIds() {
+    //   getUserIds() {
+    //     this.$http({
+    //     url: "/market/waf/queryRoleByName",
+    //     method: "post",
+    //     headers: {
+    //      "Content-Type": "application/json",
+    //     },
+    //      data: {
+    //       userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
+    //    },
+    //   }).then((res) => {
+    //     // console.log(res.data.data.rows[0].name);
+    //     // console.log(res.data.data.rows[0].userCode);
+    //     this.request_form.userName = res.data.data.rows[0].name;
+    //     this.request_form.userId = res.data.data.rows[0].userCode;
+    //     this.request_form.title = this.infolist.needName;
+    //     console.log(this.request_form);
+    //     this.clickHandle(this.infolist);
+    //    });
+    //  },
+        getUserIds() {
+        let id = JSON.parse(window.sessionStorage.userInfo).loginNo
         this.$http({
-        url: "/market/waf/queryRoleByName",
+        url: "/market//api/user/info/queryNodePers?params="+ id,
         method: "post",
         headers: {
          "Content-Type": "application/json",
         },
          data: {
-          userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
+          // params: JSON.parse(window.sessionStorage.userInfo).loginNo,
        },
       }).then((res) => {
         // console.log(res.data.data.rows[0].name);
         // console.log(res.data.data.rows[0].userCode);
-        this.request_form.userName = res.data.data.rows[0].name;
-        this.request_form.userId = res.data.data.rows[0].userCode;
+        // console.log(res.data[0].children);
+        this.request_form.userName = res.data[0].children[0].loginNameStr;
+        this.request_form.userId = res.data[0].children[0].loginNoStr;
         this.request_form.title = this.infolist.needName;
-        console.log(this.request_form);
+        // console.log(this.request_form);
         this.clickHandle(this.infolist);
        });
      },

+ 50 - 6
src/pages/main/advertising/materialApplicationadd.vue

@@ -176,12 +176,11 @@
         v-loading="loadinged"
       >
         <div class="info-line">
-            <el-form-item prop="region">
+            <el-form-item prop="region" >
             <span>地市名称</span>
             <el-select
               @change="verifcheck1(1, $event)"
-              clearable
-             
+              :disabled="shijinyong"
               v-model="formlist.region"
               placeholder="地市名称"
             >
@@ -505,7 +504,7 @@ export default {
         useCase: [{required: true,trigger: "change",message: "请选择使用场景"}],
         formType: [{required: true,trigger: "change",message: "请选择表单类型"}],
         material: [{required: true,trigger: "change",message: "请选择物料名称"}],
-        region: [{required: true,trigger: "change",message: "请选择地市",},],
+        region: [{required: true,trigger: "blur",message: "请选择地市",},],
         district: [{required: true,trigger: "change",message: "请选择区县"}],
         channelQuartersSchool: [{required: true,trigger: "blur",message: "不能为空",},],
         quantity: [{required: true,trigger: "blur",message: "数量不能为空",},],
@@ -579,6 +578,7 @@ export default {
       typests: false,
       suppliersts: false,
       matersts: false,
+      shijinyong:false,
       typelist: [],
       suppList: [],
       materList: [],
@@ -671,6 +671,7 @@ export default {
       userListOpt: [],
       list: {},
       companyFlag: "",
+      selectcurrent:"",
       // approvalDirection: 1,
       //地市,区县,渠道 是否全选
       isSelAllCity: false,
@@ -1013,6 +1014,7 @@ export default {
       this.typests = true;
       this.getRegion();
       
+      
       // let obj1 = {id:2};
       // let obj2 = {name:'hhhhh'};
       // let obj3 = {...obj1,...obj2};
@@ -1033,7 +1035,49 @@ export default {
         },
       }).then((res) => {
         this.regionOpt = res.data;
+        if(this.$route.query.applyType == "地市"){
+          this.shijinyong = true;
+           this.formlist.region = this.userInfo.cityName;
+           let that = this;
+            // console.log(that);
+            let hh = that.regionOpt.filter(function (c, i, a) {
+              // console.log(c,i,a);
+           if (c.compName == that.formlist.region) {
+          return c;
+           }
+          });
+         this.selectcurrent = hh[0].compId;
+         console.log(this.selectcurrent);
+         this.$http({
+                url: "/sysmgr/regionComp/queryList",
+                method: "post",
+                headers: {
+                  "Content-Type": "application/json",
+                },
+                data: {
+                  parentCompId: this.selectcurrent,
+                },
+              }).then((res) => {
+                // console.log(res.data);
+                this.countyOpt = res.data;
+              });
+               this.$http({
+                url: "/market/cadvBusiMetirial/queryList",
+                method: "post",
+                headers: {
+                  "Content-Type": "application/json",
+                },
+                data: {
+                  regionCode: this.selectcurrent,
+                },
+              }).then((res) => {
+                // console.log(res.data);
+                // this.countyOpt = res.data;
+              });
+        }
+       
       });
+        
     },
     //获取素材
     getmater(v) {
@@ -1095,7 +1139,7 @@ export default {
           this.centarapply.quantity = this.formlist.quantity;
           this.centarapply.formType = this.formlist.formType;
           this.centarapply.channelQuartersSchool = this.formlist.channelQuartersSchool;
-          this.centarapply.region = this.selectLettercurrent;
+          this.centarapply.region = this.formlist.region;
           this.centarapply.district = this.formlist.district;
            this.centarapply.spec = this.selectLetter.size;
           this.centarapply.unit = this.selectLetter.unit;
@@ -1189,7 +1233,7 @@ export default {
                   let list = {}
               list.businessName = this.infolist.businessName;//业务名称
               console.log(this.infolist.cycle);
-              list.cycleList = [this.$util.dateFormat(this.infolist.cycle[0]),this.$util.datetimeFormat(this.infolist.cycle[1])];
+              list.cycleList = [this.$util.dateFormat(this.infolist.cycle[0]),this.$util.dateFormat(this.infolist.cycle[1])];
               list.needCode = this.infolist.needCode;
               // list.xcwlProProcessList = this.infomaterType;
               list.xcwlProProcessList = this.multipleSelection;

+ 1 - 1
src/pages/main/advertising/materialApplicationds.vue

@@ -78,7 +78,7 @@
                 </el-table-column>
                  <el-table-column label="申请人类型" prop="applyType">
                 </el-table-column>
-                <el-table-column label="申请时间" prop="riqi">
+                <el-table-column label="申请时间" prop="applyTime">
                 </el-table-column>
                 <el-table-column label="当前进度" prop="progressBar">
                     <template slot-scope="props">

+ 5 - 5
src/pages/main/advertising/materiel.vue

@@ -7,17 +7,17 @@
                     :searchList="searchList"
                     @searchInfo="searchInfo"
                 ></mySearch>
-                <el-button class="btn-check" size="medium" type="primary" @click="exportTempletelist">下载导入模板
+                <el-button class="btn-check" size="medium" type="primary" @click="exportTempletelist" v-if="userInfo.duty <= 9">下载导入模板
                 </el-button>
                 <el-button
                     class="btn-check"
                     size="medium"
                     type="primary"
-                    @click="dialogCheck(3)" v-if="userInfo.duty <= 9"
+                    @click="dialogCheck(3)" v-if="userInfo.loginNoStr == 'jiangshuai'"
                     >添加
                 </el-button>
                 
-                <myUpload style="display:inline-block;" :fileInfo="fileInfot" v-if="userInfo.areaName=='省公司'"
+                <myUpload style="display:inline-block;" :fileInfo="fileInfot" v-if="userInfo.loginNoStr == 'jiangshuai'"
                           :fileList="fileInfot.fileList" @uploadBack='uploadBack'></myUpload>
             </div>
             <div class="tabbox">
@@ -79,7 +79,7 @@
                             <el-button
                                 size="mini"
                                 type="primary"
-                                @click="dialogCheck(2, scope.row)" v-if="userInfo.duty <= 9"
+                                @click="dialogCheck(2, scope.row)" v-if="userInfo.loginNoStr == 'jiangshuai'"
                                 >修改</el-button
                             >
                             
@@ -87,7 +87,7 @@
                             <el-button
                                 size="mini"
                                 type="danger"
-                                @click="delLine(scope.row)" v-if="userInfo.duty <= 9"
+                                @click="delLine(scope.row)" v-if="userInfo.loginNoStr == 'jiangshuai'"
                                 >删除</el-button
                             >
                         </template>