Browse Source

企业用户信息变更

huahaiyan 6 years ago
parent
commit
3bc7e2928b

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -59,9 +59,9 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
 
 
-          <el-table-column prop="RecUnitId" label="推荐单位编码" sortable min-width="130" align="center"
+          <!-- <el-table-column prop="RecUnitId" label="推荐单位编码" sortable min-width="130" align="center"
             show-overflow-tooltip>
             show-overflow-tooltip>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column prop="AccessCardNo" label="准入证号" sortable min-width="110" align="center"
           <el-table-column prop="AccessCardNo" label="准入证号" sortable min-width="110" align="center"
             show-overflow-tooltip>
             show-overflow-tooltip>
           </el-table-column>
           </el-table-column>

+ 39 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -357,14 +357,19 @@
         let params = {
         let params = {
           SuppTypeCode: '',
           SuppTypeCode: '',
         }
         }
-        _this.$axios.get('/suppliercertappend/getsupplier', {params})
+        _this.$axios.get('/suppliercertappend/getsupplier', {
+            params
+          })
           .then(res => {
           .then(res => {
             _this.supplierList = res.data
             _this.supplierList = res.data
             if (_this.supplierList) {
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
               _this.suplen = _this.supplierList.length
-            }else{
+            } else {
               _this.suplen = 0
               _this.suplen = 0
             }
             }
+            if (_this.IsCompanyUser == 1 && _this.supplierList) {
+              _this.entityForm.SupplierId = _this.supplierList[0].SupplierId
+            }
           })
           })
           .catch(err => {
           .catch(err => {
             console.error(err)
             console.error(err)
@@ -385,7 +390,38 @@
         })
         })
       },
       },
       addinfochange() {
       addinfochange() {
-        this.addshow = true
+        if (this.IsCompanyUser === 1) {
+          this.addInfoChangeCom()
+        } else {
+          this.addshow = true
+        }
+      },
+      addInfoChangeCom() {
+        api.addInfoChMain(this.entityForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            //保存成功后,初始化数据,变成修改
+            this.entityForm.Id = res.data.item;
+            this.$router.push({
+              path: '/oilsupplier/infochangech/' + this.entityForm.SupplierId + '/operation',
+              query: {
+                InfoStatus: 0,
+                infoId: this.entityForm.Id ,
+              }
+            })
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
       },
       },
       addInfoChange() {
       addInfoChange() {
         this.$refs['EntityFormref'].validate((valid) => {
         this.$refs['EntityFormref'].validate((valid) => {