Explorar o código

Merge branch 'master' of https://git.agilestar.cn/spfm-group/spfm-market-front into test

wgp %!s(int64=3) %!d(string=hai) anos
pai
achega
314c8e6492
Modificáronse 2 ficheiros con 40 adicións e 10 borrados
  1. 39 9
      src/pages/main/terminal/advcheck.vue
  2. 1 1
      src/pages/main/terminal/advdetailed.vue

+ 39 - 9
src/pages/main/terminal/advcheck.vue

@@ -26,9 +26,10 @@
                     <el-table-column label="操作" width="120px" align="center">
                         <template slot-scope="scope">
                             <el-button size="mini" type="primary" @click="dialogCheck(scope.row,1)">查看</el-button>
-                            <el-button size="mini" type="danger" v-if="userInfo.loginName != scope.row.opName"
+                            <el-button size="mini" type="danger" v-if="userInfo.loginName != scope.row.opName||scope.row.sts==3"
                                 @click="dialogCheck(scope.row,2)">审核</el-button>
-                            <el-button v-if="userInfo.loginName == scope.row.opName&&scope.row.sts=='1'" size="mini" type="primary" @click="advSure(scope.row)">归档
+                            <el-button v-if="userInfo.loginName == scope.row.opName&&scope.row.sts=='1'" size="mini"
+                                type="primary" @click="advSure(scope.row)">归档
                             </el-button>
                         </template>
                     </el-table-column>
@@ -103,14 +104,14 @@
                 advopt: [{
                     id: '0',
                     name: '待审批',
-                },{
+                }, {
                     id: '2',
                     name: '定稿',
                 }, ],
                 btnctrlStatus: false,
                 typeList: [],
                 advtype: '',
-                dgid:'',
+                dgid: '',
             }
         },
         methods: {
@@ -135,14 +136,39 @@
                     this.tableData = res.data.data;
                     this.total = res.data.totalRecord;
                     this.loading = false;
+                    this.tableData.forEach(item => {
+                        this.getSts(item);
+                    });
                 });
             },
+			getSts(v){
+				this.$http({
+				    url: '/bpm/api/taskInit',
+				    method: "post",
+				    headers: {
+				        "Content-Type": "application/json",
+				    },
+				    data: {
+				        taskId: v.taskId,
+				        woNo: v.id
+				    },
+				}).then((res) => {
+				    if(res.data.taskName == '需求部门'){
+                        v.sts = '1'
+                        return
+                    }
+                    if(res.data.assigneeNo == this.userInfo.loginNo){
+                        v.sts = '3'
+                        return
+                    }
+				});
+			},
             // 分页
             currchange(v) {
                 this.pageSize = v;
                 this.getList(this.params, this.pageSize);
             },
-            advchange(){
+            advchange() {
                 this.getList(this.params, this.pageSize);
             },
             //处理申请
@@ -166,16 +192,20 @@
                 this.dialogStatusc = true;
                 this.dgid = v.id;
             },
-            dialogCli(v){
+            dialogCli(v) {
                 let _this = this;
-                if(v == 1){
+                if (v == 1) {
                     let advTypeName = '';
                     for (let i = 0; i < this.typeList.length; i++) {
                         if (this.typeList[i].dataCode == this.advtype) {
                             advTypeName = this.typeList[i].dataName;
                         }
                     }
-                    let param = {woNo:this.dgid,advTypeName:advTypeName,advType:this.advtype}
+                    let param = {
+                        woNo: this.dgid,
+                        advTypeName: advTypeName,
+                        advType: this.advtype
+                    }
                     this.$http({
                         url: "/market/cadv/mkConfirmAdv",
                         method: "post",
@@ -242,7 +272,7 @@
         },
         mounted() {
             this.userInfo = JSON.parse(window.sessionStorage.userInfo);
-            console.log(this.userInfo)
+            // console.log(this.userInfo)
             this.advstatus = this.$route.query.type;
             this.getList({}, 1);
             this.ctrlbtn();

+ 1 - 1
src/pages/main/terminal/advdetailed.vue

@@ -123,7 +123,7 @@
                 this.pageSize = n;
                 let _this = this;
                 this.$http({
-                    url: "/market/designSupplier/queryList",
+                    url: "/market/cDesignSupplier/queryList",
                     method: "post",
                     headers: {
                         "Content-Type": "application/json",