Blame view

src/views/system/sqywgz/sqywDetail.vue 9.49 KB
田浩浩 committed
1
<template>
2
  <div>
田浩浩 committed
3
    <ul class="edit-title-list" v-if="djlxList.length > 0">
4 5
      <li v-for="(item, index) in djlxList" @click="handleTitleSelct(item, index)" :key="index"
        :class="{ active: index == tn }">
田浩浩 committed
6 7 8
        {{ item.nodename }}
      </li>
    </ul>
9 10 11 12
    <div class="contentBox">
      <el-form :model="form" v-show="n == 0" label-width="135px" ref="ruleForm">
        <el-row>
          <el-col :span="8">
13
            <el-form-item label="申请分类" v-if="form.ywDetail && form.ywDetail.sqfl">
14 15
              <el-select v-model="form.ywDetail.sqfl" disabled placeholder="请选择" class="width100">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
16 17 18 19 20
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
21
            <el-form-item label="登记业务编码" v-if="form.ywDetail && form.ywDetail.djywbm">
22 23 24 25
              <el-input v-model="form.ywDetail.djywbm" disabled></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
26
            <el-form-item label="登记业务名称" v-if="form.ywDetail && form.ywDetail.djywmc">
27 28 29 30 31 32
              <el-input v-model="form.ywDetail.djywmc" disabled></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
33
            <el-form-item label="发起业务单元类型" v-if="form.ywDetail && form.ywDetail.fqywdylx">
34 35
              <el-select v-model="form.ywDetail.fqywdylx" disabled placeholder="请选择" class="width100">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="是否启用" prop="enabled">
              <el-radio-group v-model="form.ywDetail.enabled">
                <el-radio label="1">启用</el-radio>
                <el-radio label="0">禁用</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="业务流程ID" prop="flowid">
              <el-input v-model="form.ywDetail.flowid"></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="8">
            <el-form-item label="登记原因设置" prop="sfqydjyymb">
              <el-radio-group v-model="form.ywDetail.sfqydjyymb">
                <el-radio label="1">启用</el-radio>
                <el-radio label="0">禁用</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="登记情形及材料">
66
              <el-input v-model="form.ywDetail.djqxcl" placeholder="仅支持execl文件导入"></el-input>
67 68 69
            </el-form-item>
          </el-col>
          <el-col :span="1">
70 71 72
            <el-upload ref="upload" :action="imgUploadUrl" :limit="1" accept=".xls, .xlsx" :show-file-list="false"
              :disabled="requested" :file-list="fileList" :before-upload="uploadRecord" :on-success="handleSuccess">
              <el-button type="primary" icon="el-icon-upload" :loading="requested">上传材料</el-button>
73 74 75 76 77 78
            </el-upload>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="登记原因模板" prop="djyy">
79
              <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="form.ywDetail.djyy">
80 81 82 83 84
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
85
      <el-collapse class="modifycollapse" accordion>
86 87
        <el-collapse-item title="登记情形设置" name="1">
          <lb-table :column="djqxCol" border :pagination="false" heightNumSetting :data="form.djqx">
88 89
          </lb-table>
        </el-collapse-item>
90 91
        <el-collapse-item title="材料信息设置" name="2">
          <lb-table :column="clxxCol" border heightNumSetting :pagination="false" :data="form.clxx">
92 93
          </lb-table>
        </el-collapse-item>
94
        <el-collapse-item title="刷选权利设置" name="3" v-if="form.ywDetail.sfsxql == '1'">
95 96 97
          <div class="dyztsd-title">
            <b>请勾选需要查询的权利信息</b>
            <div>
98
              <el-button type="text" @click="handleSelectall">选择全部
田浩浩 committed
99
              </el-button>
100 101 102 103 104 105
              <el-button type="text" @click="handleInvert">清除全部</el-button>
            </div>
          </div>
          <el-divider></el-divider>
          <ul class="qlxx-list">
            <li v-for="(item, index) in form.sxql" :key="index">
田浩浩 committed
106
              <el-checkbox v-model="item.checked">{{
107
                item.sxzdmc
田浩浩 committed
108
              }}</el-checkbox>
109 110 111
            </li>
          </ul>
        </el-collapse-item>
112
        <el-collapse-item title="办理状态设置" name="4">
113 114 115 116
          <ul class="screen-list">
            <li v-for="(item, index) in form.sxzt" :key="index">
              <div class="screen-list-left">
                {{ item.sxzdmc }}
田浩浩 committed
117
                <el-checkbox v-model="item.checked">禁止办理</el-checkbox>
118 119 120 121 122 123
              </div>
            </li>
          </ul>
        </el-collapse-item>
      </el-collapse>
    </div>
124
    <div slot="footer" class="dialog_footer text-center">
125
      <el-button @click="$popupCacel()">取 消</el-button>
126
      <el-button type="primary" @click="submit" plain>提 交</el-button>
田浩浩 committed
127
    </div>
128
  </div>
田浩浩 committed
129 130
</template>
<script>
田浩浩 committed
131 132
import { mapGetters } from "vuex";
import { upward, down } from "@/utils/operation";
133
import { getDjlxInfo, getSqdjywDetail, saveSqdjyw } from "@/api/system.js";
田浩浩 committed
134
import { datas, sendThis } from "./sqywDetail";
田浩浩 committed
135
export default {
136
  name: "componentDialog",
田浩浩 committed
137
  props: {
138 139 140 141
    formData: {
      type: Object,
      default: () => { }
    }
田浩浩 committed
142
  },
143
  data () {
田浩浩 committed
144 145 146 147 148 149 150
    return {
      tn: 0,
      n: 0,
      djlxList: [],
      title: "",
      activeName: "1",
      form: {},
田浩浩 committed
151 152
      djqxCol: datas.djqxCol(),
      clxxCol: datas.clxxCol(),
田浩浩 committed
153 154
    };
  },
155
  computed: {
田浩浩 committed
156 157
    ...mapGetters(["dictData"]),
  },
158 159 160
  mounted () {
    sendThis(this)
    this.init()
田浩浩 committed
161
  },
田浩浩 committed
162 163
  methods: {
    //页面初始化
164
    init () {
165
      this.tn = 0;
166
      getDjlxInfo(this.formData.bsmSqyw).then((res) => {
田浩浩 committed
167 168
        let { result } = res;
        this.djlxList = result ? result : [];
田浩浩 committed
169
        if (this.djlxList.length > 0) {
170
          this.getDetail(this.djlxList[0].bsmSqyw);
田浩浩 committed
171
        } else {
172
          this.getDetail(this.formData.bsmSqyw);
田浩浩 committed
173
        }
174
      })
田浩浩 committed
175 176
    },
    //tab选项卡事件
177
    handleTitleSelct (obj, index) {
田浩浩 committed
178 179 180 181
      this.n = 0;
      this.tn = index;
      this.getDetail(this.djlxList[index].bsmSqyw);
    },
田浩浩 committed
182
    //获取业务具体明细内容
183
    getDetail (bsmSqyw) {
184
      getSqdjywDetail(bsmSqyw).then((res) => {
田浩浩 committed
185 186
        if (res.code === 200) {
          this.form = res.result;
187
          console.log(this.form, 'this.formthis.formthis.form');
田浩浩 committed
188 189 190 191 192
        } else {
          this.$alert(res.message);
        }
      });
    },
田浩浩 committed
193
    //提交保存数据
194
    submit () {
195
      let that = this;
田浩浩 committed
196
      saveSqdjyw(this.form).then((res) => {
197 198
        if (res.code == 200) {
          that.$message({
田浩浩 committed
199 200 201
            message: "修改成功",
            type: "success",
          });
202
          this.$popupCacel()
203
        }
田浩浩 committed
204
      });
田浩浩 committed
205
    },
任超 committed
206
    // 上移下移
207
    moveUpward (index, row, type) {
任超 committed
208
      if (type == "clxx") {
209
        upward(index, this.form.clxx);
任超 committed
210
      } else {
211
        upward(index, this.form.djqx);
田浩浩 committed
212 213
      }
    },
214
    moveDown (index, row, type) {
任超 committed
215
      if (type == "clxx") {
216
        down(index, this.form.clxx);
任超 committed
217
      } else {
218
        down(index, this.form.djqx);
田浩浩 committed
219 220
      }
    },
221
    addDjqx () {
222 223 224 225 226 227 228 229
      this.form.djqx.push({
        nodecode: "",
        nodename: "",
        enabled: "1",
        djyy: "",
        sfqydjyymb: "0",
      });
    },
230
    removeDjqx (index, row) {
231 232
      this.form.djqx.splice(index, 1);
    },
233
    addClxx () {
234 235 236 237 238 239 240 241 242
      this.form.clxx.push({
        isrequired: "1",
        djqxbm: "",
        clbm: "",
        clmc: "",
        cllx: "",
        sfggcl: "1",
      });
    },
243
    removeClxx (index, row) {
244 245
      this.form.clxx.splice(index, 1);
    },
田浩浩 committed
246 247 248 249 250
  },
};
</script>
<style lang='scss' scoped>
@import "~@/styles/mixin.scss";
251
@import "~@/styles/dialogBox.scss";
252
@import "~@/styles/collapse.scss";
xiaomiao committed
253
@import "~@/styles/dialogBoxheader.scss";
254

255 256 257 258 259
.contentBox {
  height: 75vh;
  overflow-y: scroll;
}

任超 committed
260 261 262 263
.el-radio-group {
  white-space: nowrap;
}

田浩浩 committed
264 265 266 267
.form {
  background: #eee;
  padding: 0 10px;
}
268

田浩浩 committed
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
.edit-title-list {
  @include flex;

  li {
    flex: 1;
    @include flex-center;
    border: 1px solid $borderColor;
    line-height: 36px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;

    &:hover {
      @extend .active;
    }
  }
}
286

田浩浩 committed
287 288 289 290
.active {
  background: $light-blue !important;
  color: #fff;
}
291

田浩浩 committed
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
.dyztsd-title {
  @include flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 20px;
}

.qlxx-list {
  @include flex;
  flex-wrap: wrap;
  padding-left: 20px;

  li {
    width: 25%;
    margin-bottom: 15px;
  }
}

.screen-list {
  @include flex;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid $borderColor;
  border-bottom: none;

  li {
    @include flex;
    align-items: center;
    width: 25%;
    line-height: 50px;
    border-bottom: 1px solid $borderColor;
    padding-left: 20px;
  }

  &-left {
    margin-right: 20px;
    width: 160px;
    white-space: nowrap;
  }

  li:nth-child(odd) {
    border-right: 1px solid $borderColor;
  }
}
336
</style>