Ver Fonte

no message

GeekFish há 4 anos atrás
pai
commit
35ae2f0d94

+ 28 - 0
src/api/bankCheck/bank.js

@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+// 查询参数列表
+export function listBank(data) {
+  return request({
+    url: '/carbon-bank/bank/transfer/list',
+    method: 'post',
+    data: data
+  })
+}
+
+//清分
+export function sendApply(data) {
+  return request({
+    url: '/carbon-bank/bank/clear/clearing',
+    method: 'post',
+    data: data
+  })
+}
+
+//详情查看
+export function bankDetail(query) {
+  return request({
+    url: '/carbon-bank/bank/transfer/detail',
+    method: 'get',
+    params: query
+  })
+}

+ 21 - 0
src/api/bankCheck/farmer.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+// 查询参数列表
+export function listFarmer(data) {
+  return request({
+    url: '/carbon-bank/bank/clear/get',
+    method: 'post',
+    data: data
+  })
+}
+
+
+// 生成清分订单
+export function clearCreate(data) {
+  return request({
+    url: '/carbon-bank/bank/clear/create',
+    method: 'post',
+    data: data
+  })
+}
+
+

+ 9 - 0
src/api/belongToSubject/area.js

@@ -35,3 +35,12 @@ export function updateArea(data) {
     data: data
   })
 }
+
+//归属人删除
+export function delArea(data) {
+  return request({
+    url: '/system/web/area/del',
+    method: 'post',
+    data: data
+  })
+}

+ 197 - 0
src/views/bankCheck/bank/index.vue

@@ -0,0 +1,197 @@
+<template>
+  <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form-item prop="phonenumber">
+          <el-input
+            v-model="queryParams.condition"
+            placeholder="请输入类别名称"
+            clearable
+            size="small"
+            style="width: 240px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item prop="condition">
+          <el-date-picker
+            type="daterange"
+            v-model="dateRange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table v-loading="loading" :data="list">
+        <el-table-column label="序号" type="index" width="50" align="center" />
+        <el-table-column label="农户数量" align="center" prop="transferNum" />
+        <el-table-column label="打款金额" align="center" prop="transferAmount" :show-overflow-tooltip="true" />
+        <el-table-column label="创建时间" align="center" prop="createTime" width="160">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.createTime) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="打款时间" align="center" prop="transferTime" width="160">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.modifiedTime) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" align="center" prop="createName" />
+        <el-table-column label="打款人" align="center" prop="transferName" />
+        <el-table-column label="打款状态" align="center" prop="transferStatus" width="160">
+          <template slot-scope="scope">
+            <span v-if="scope.row.transferStatus == 0">未清分</span>
+            <span v-else-if="scope.row.transferStatus == 1">清分中</span>
+            <span v-else="scope.row.transferStatus == 2">清分完成</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          align="center"
+          width="280"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="primary"
+              icon="el-icon-view"
+              @click="handleView(scope.row)"
+            >查看</el-button>
+            <el-button
+              size="mini"
+              v-if="scope.row.transferStatus == 0"
+              type="warning"
+              @click="handleSubmit(scope.row)"
+            >发送申请</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNo"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+      <add-mobiel
+      			v-if="modal.view.visibleModal"
+      			:title="modal.view.title"
+      			:action="modal.view.action"
+      			:visible="modal.view.visibleModal"
+      			:selectRow="modal.view.selectRow"
+      			@closeviewmodal="closeviewmodal">
+      		</add-mobiel>
+      <apply-for
+          v-if="modal.apply.visibleModal"
+          :title="modal.apply.title"
+          :action="modal.apply.action"
+          :visible="modal.apply.visibleModal"
+          :selectRow="modal.apply.selectRow"
+          @closeapplymodal="closeapplymodal"
+      ></apply-for>
+  </div>
+</template>
+
+<script>
+import { listBank } from "@/api/bankCheck/bank";
+import addMobiel from './modal/addMobiel'
+import applyFor from './modal/applyFor'
+export default {
+  name: "bank",
+  components: {
+    addMobiel,
+    applyFor
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      list: null,
+      // 日期范围
+      dateRange: "",
+      // 表单参数
+      form: {},
+      //弹出层
+      modal:{
+        view:{
+          action:'',
+          title:'',
+          visibleModal:false,
+          selectRow:null
+        },
+        apply:{
+          action:'',
+          title:'',
+          visibleModal:false,
+          selectRow:null
+        }
+      },
+      // 查询参数
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /*清分*/
+    handleSubmit(row){
+      this.modal.apply.visibleModal = true
+      this.modal.apply.title = '开始清分'
+      this.modal.apply.action = 'add'
+      this.modal.apply.selectRow = row
+    },
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      listBank(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
+          if(res.retHead.errCode == 0){
+            this.list = res.retBody
+            this.total = res.retHead.total;
+          }
+          this.loading = false;
+        }
+      );
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNo = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 查看按钮操作 */
+    handleView(item){
+        this.modal.view.visibleModal = true
+        this.modal.view.title = '清分详情'
+        this.modal.view.action = 'view'
+        this.modal.view.selectRow = item
+    },
+    //窗口关闭
+    closeapplymodal(flag = false){
+      this.modal.apply.visibleModal = false
+      flag && this.getList()
+    },
+    closeviewmodal(flag = false){
+      this.modal.view.visibleModal = false
+      flag && this.getList()
+    }
+  }
+};
+</script>

+ 178 - 0
src/views/bankCheck/bank/modal/addMobiel.vue

@@ -0,0 +1,178 @@
+<template>
+  <el-dialog
+    :title="modalTitle"
+    :visible.sync="modalVisible"
+    :width="formLabelWidth"
+    top="2vh"
+    @close="handleCancel">
+    <div class="mobile">
+        <el-table
+              border
+              :data="list"
+              style="width: 100%">
+              <el-table-column prop="name" label="农户名称" align="center"></el-table-column>
+              <el-table-column prop="bankName" label="农户银行名称"></el-table-column>
+              <el-table-column prop="bankNo" label="农户银行账号"></el-table-column>
+              <el-table-column prop="accountPid" label="农户身份证号"></el-table-column>
+              <el-table-column prop="transferAmount" label="打款金额"></el-table-column>
+              <el-table-column prop="transferTime" label="申请打款时间"></el-table-column>
+              <el-table-column label="清分类型" align="center" width="160">
+                <template slot-scope="scope">
+                  <span v-if="scope.row.transferNation  == 0">行内转账</span>
+                  <span v-else-if="scope.row.transferNation  == 1">行外转账</span>
+                  <span v-else="scope.row.transferNation  == 2">贷报销</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="msg" label="银行响应消息"></el-table-column>
+              <el-table-column
+                label="操作"
+                align="center"
+                width="80"
+                class-name="small-padding fixed-width"
+              >
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="primary"
+                    icon="el-icon-view"
+                    @click="handleView(scope.row)"
+                  >查看</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNo"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getDetal"
+        />
+        <bank-order-mobiel
+            v-if="modal.visibleModal"
+            :title="modal.title"
+            :action="modal.action"
+            :visible="modal.visibleModal"
+            :selectRow="modal.selectRow"
+            @closemodal="closemodal"
+        ></bank-order-mobiel>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="handleCancel">取 消</el-button>
+      <el-button type="primary" @click="submit" v-if="!limit.isRead">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import bankOrderMobiel from "./bankOrderMobiel"
+import { bankDetail } from "@/api/bankCheck/bank";
+export default {
+  name: 'addMobiel',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: 'title'
+    },
+    action: {
+      type: String,
+      default: 'add'
+    },
+    selectRow: {
+      type: Object,
+      default:null
+    }
+  },
+  watch: {
+    visible(newVal, oldVal) {
+      this.modalVisible = newVal;
+    },
+    title(newVal, oldVal) {
+      this.modalTitle = newVal;
+    },
+    action(newVal, oldVal) {
+      this.modalAction = newVal;
+    },
+    selectRow(newVal, oldVal) {
+      this.modalSelectRow = newVal;
+    }
+  },
+  components:{
+    bankOrderMobiel
+  },
+  data() {
+    return {
+      modalTitle: this.title,
+      modalVisible: this.visible,
+      modalAction: this.action,
+      modalSelectRow: this.selectRow,
+      formLabelWidth: '1024px',
+      //弹出层
+      modal:{
+          action:'',
+          title:'',
+          visibleModal:false,
+          selectRow:null
+      },
+      //窗口权限
+      limit: {
+        isRead: false, //是否只读
+        isAdd: false //是否可写
+      },
+      // 查询参数
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10
+      },
+      total:0,
+      //列表
+      list:[]
+    };
+  },
+  created() {
+    // console.log(this.selectRow)
+    console.log(this.modalSelectRow)
+    switch (this.modalAction) {
+      case 'view':
+        this.limit.isRead = true;
+        break;
+      default:
+        break;
+    }
+    this.queryParams.guid = this.modalSelectRow.guid
+    this.getDetal()
+  },
+  methods: {
+    //获取数据列
+    getDetal(id){
+      bankDetail(this.queryParams).then(res => {
+          if (res.retHead.errCode === 0) {
+            this.list = res.retBody
+            this.total = res.retHead.total;
+          }
+      })
+    },
+    //详情查看
+    handleView(item){
+      console.log(item)
+      this.modal.visibleModal = true
+      this.modal.title = '清分详情'
+      this.modal.action = 'view'
+      this.modal.selectRow = item
+    },
+    //窗口关闭
+    handleCancel() {
+      this.$emit('closeviewmodal', false);
+    },
+    closemodal(){
+      this.modal.visibleModal = false
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 179 - 0
src/views/bankCheck/bank/modal/applyFor.vue

@@ -0,0 +1,179 @@
+<template>
+  <el-dialog
+    :title="modalTitle"
+    :visible.sync="modalVisible"
+    :width="formLabelWidth"
+    top="2vh"
+    @close="handleCancel">
+    <div class="mobile">
+        <div class="hc-box-wrap">
+            <el-form label-width="90px" :model="form" :rules="rules" ref="from" class="from">
+                <el-form-item label="清分账户:" prop="account">
+                    <el-input type="text" v-model="form.account" :disabled="limit.isRead"></el-input>
+                </el-form-item>
+                <el-form-item label="账户密码:" prop="password">
+                    <el-input type="password" v-model="form.password" placeholder="请输入清分账户密码"></el-input>
+                </el-form-item>
+                <el-form-item label="清分类型:" prop="clearType">
+                    <el-radio-group v-model="form.clearType">
+                      <el-radio v-for="(item,index) in clearTypeList" :label="item.id">{{item.name}}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item label="业务类型:" v-if="form.clearType == 1" prop="businessType">
+                    <el-radio-group v-model="form.businessType">
+                      <el-radio v-for="(item,index) in businessTypeList" :label="item.id">{{item.name}}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item label="操作方式:" v-if="form.clearType == 1" prop="op">
+                    <el-radio-group v-model="form.op">
+                      <el-radio v-for="(item,index) in opList" :label="item.id">{{item.name}}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="handleCancel">取 消</el-button>
+      <el-button type="primary" @click="submit" :loading="submitLoading">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { sendApply } from "@/api/bankCheck/bank";
+export default {
+  name: 'addMobiel',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: 'title'
+    },
+    action: {
+      type: String,
+      default: 'add'
+    },
+    selectRow: {
+      type: Object,
+      default:null
+    }
+  },
+  watch: {
+    visible(newVal, oldVal) {
+      this.modalVisible = newVal;
+    },
+    title(newVal, oldVal) {
+      this.modalTitle = newVal;
+    },
+    action(newVal, oldVal) {
+      this.modalAction = newVal;
+    },
+    selectRow(newVal, oldVal) {
+      this.modalSelectRow = newVal;
+    }
+  },
+  data() {
+    return {
+      modalTitle: this.title,
+      modalVisible: this.visible,
+      modalAction: this.action,
+      modalSelectRow: this.selectRow,
+      formLabelWidth: '624px',
+      submitLoading:false,
+      //窗口权限
+      limit: {
+        isRead: false, //是否只读
+        isAdd: false //是否可写
+      },
+      //清分类型
+      clearTypeList:[
+         {
+           id:0,
+           name:'行内/行外转账'
+         },
+         {
+           id:1,
+           name:'代发工资/代报销'
+         }
+      ],
+      //业务类型
+      businessTypeList:[
+        {
+          id:101,
+          name:'待发'
+        },
+        {
+          id:102,
+          name:'待报销'
+        }
+      ],
+      //操作方式
+      opList:[
+        {
+          id:0,
+          name:'账务处理'
+        },
+        {
+          id:1,
+          name:'数据校验'
+        },
+      ],
+      //验证
+      rules: {
+        account: [{ required: true, message: '清分账户不能为空!', trigger: 'blur' }],
+        password: [{ required: true, message: '账户密码不能为空!', trigger: 'blur' }],
+        clearType: [{ required: true, message: '清分类型不能为空!', trigger: 'blur' }],
+        businessType: [{ required: true, message: '业务类型不能为空!', trigger: 'blur' }],
+        op: [{ required: true, message: '操作方式不能为空!', trigger: 'blur' }],
+      },
+      //表单
+      form: {
+        clearType:0
+      }
+    };
+  },
+  created() {
+    this.form.transferId = this.modalSelectRow.guid
+    switch (this.modalAction) {
+      case 'add':
+        this.limit.isAdd = true;
+        break;
+    }
+  },
+  methods: {
+    //表单提交
+    submit() {
+      this.$refs.from.validate(valid => {
+        if (valid) {
+          this.submitLoading = true
+          let params = Object.assign({},this.form)
+          sendApply(params).then(res => {
+              if (res.retHead.errCode === 0) {
+                this.msgSuccess("操作成功");
+                this.modalVisible = false
+               	this.$emit('closeapplymodal', true);
+                this.submitLoading = false
+              }
+          }).catch(res=>{
+            this.submitLoading = false
+          })
+        } else {
+          return false;
+        }
+      });
+    },
+    //窗口关闭
+    handleCancel() {
+      this.$emit('closeapplymodal', false);
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+
+
+</style>

+ 87 - 0
src/views/bankCheck/bank/modal/bankOrderMobiel.vue

@@ -0,0 +1,87 @@
+<template>
+  <el-dialog
+    :title="modalTitle"
+    :visible.sync="modalVisible"
+    :width="formLabelWidth"
+    top="2vh"
+    append-to-body
+    @close="handleCancel">
+    <div class="mobile">
+        <table class="">
+          <tr>
+            <td class="title"></td>
+            <td class="content"></td>
+            <td class="title"></td>
+            <td class="content"></td>
+          </tr>
+        </table>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="handleCancel">取 消</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: 'addMobiel',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: 'title'
+    },
+    action: {
+      type: String,
+      default: 'add'
+    },
+    selectRow: {
+      type: Object,
+      default:null
+    }
+  },
+  watch: {
+    visible(newVal, oldVal) {
+      this.modalVisible = newVal;
+    },
+    title(newVal, oldVal) {
+      this.modalTitle = newVal;
+    },
+    action(newVal, oldVal) {
+      this.modalAction = newVal;
+    },
+    selectRow(newVal, oldVal) {
+      this.modalSelectRow = newVal;
+    }
+  },
+  data() {
+    return {
+      modalTitle: this.title,
+      modalVisible: this.visible,
+      modalAction: this.action,
+      modalSelectRow: this.selectRow,
+      formLabelWidth: '1024px',
+      //窗口权限
+      limit: {
+        isRead: false, //是否只读
+        isAdd: false //是否可写
+      },
+    };
+  },
+  created() {
+
+  },
+  methods: {
+    //窗口关闭
+    handleCancel() {
+      this.$emit('closemodal', false);
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 172 - 0
src/views/bankCheck/farmer/index.vue

@@ -0,0 +1,172 @@
+<template>
+  <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form-item prop="condition">
+          <el-input
+            v-model="queryParams.name"
+            placeholder="农户名称"
+            clearable
+            size="small"
+            style="width: 240px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item prop="condition">
+          <el-date-picker
+            type="daterange"
+            v-model="dateRange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            size="mini"
+            @click="createOrder"
+          >生成需打款名单</el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+      <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
+        <el-table-column
+          type="selection"
+          width="55">
+        </el-table-column>
+        <el-table-column label="序号" type="index" width="50" align="center" />
+        <el-table-column label="对象名称" align="center" width="160" prop="name">
+          <template slot-scope="scope">
+            <span>{{ scope.row.farmerInfoEntity.name}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="银行名称" align="center" width="160">
+          <template slot-scope="scope">
+            <span>{{ scope.row.farmerInfoEntity.bankName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="银行卡号" align="center" width="160">
+          <template slot-scope="scope">
+            <span>{{ scope.row.farmerInfoEntity.bankNo}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="银行机构代码" align="center" width="160">
+          <template slot-scope="scope">
+            <span>{{ scope.row.farmerInfoEntity.bankCode}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="清分类型" align="center" width="160">
+          <template slot-scope="scope">
+            <span>{{ scope.row.belongType == 1 ? '农户' : '组织' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="打款金额" align="center" prop="ammount" />
+        <el-table-column label="地址" align="center" width="160">
+          <template slot-scope="scope">
+            <span>{{ scope.row.farmerInfoEntity.address}}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNo"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+  </div>
+</template>
+
+<script>
+import { listFarmer , clearCreate } from "@/api/bankCheck/farmer";
+import addMobiel from './modal/addMobiel'
+export default {
+  name: "farmer",
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 日期范围
+      dateRange: "",
+      // 表格数据
+      list: null,
+      checkedList:[],
+      // 查询参数
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      listFarmer(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
+          if(res.retHead.errCode == 0){
+            this.list = res.retBody
+            this.total = res.retHead.total;
+          }
+          this.loading = false;
+        }
+      );
+    },
+    handleSelectionChange(val){
+       this.checkedList = val;
+    },
+    createOrder(){
+       let data = this.checkedList
+       if(data.length != 0){
+          let arr = []
+          let time = {
+            startTime:data[0].startTime,
+            endTime:data[0].endTime
+          }
+          for(let i = 0;i < data.length;i++){
+             arr.push({
+               fcName:data[i].farmerInfoEntity.fkFcId,
+               belongType:data[i].belongType,
+             })
+          }
+          let params = {
+            ...time,
+            clearings:arr
+          }
+          this.$confirm('是否确定生成需要打款名单?', "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(function() {
+              return clearCreate(params);
+            }).then(() => {
+              this.getList();
+              this.msgSuccess("清分成功!");
+            }).catch(function() {});
+       }else{
+         this.msgError("请先选择你所要清分的项目!")
+       }
+    },
+    handleQuery() {
+      this.queryParams.pageNo = 1;
+      this.getList();
+    },
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    }
+  }
+};
+</script>

+ 252 - 0
src/views/bankCheck/farmer/modal/addMobiel.vue

@@ -0,0 +1,252 @@
+<template>
+  <el-dialog
+    :title="modalTitle"
+    :visible.sync="modalVisible"
+    :width="formLabelWidth"
+    top="2vh"
+    @close="handleCancel">
+    <div class="mobile">
+      <div class="hc-box add">
+        <div class="hc-box-header">
+            产品类别信息
+        </div>
+        <div class="hc-box-wrap">
+            <el-form label-width="90px" :model="form" :rules="rules" ref="from" class="from">
+                <el-form-item label="类别名称:" prop="typeName">
+                    <el-input type="text" v-model="form.typeName" :disabled="limit.isRead"></el-input>
+                </el-form-item>
+                <el-form-item label="类别值:">
+                    <el-input type="text" v-model="form.typeVal" :disabled="true" placeholder="类别值后台自动生成"></el-input>
+                </el-form-item>
+                <el-form-item label="方法学名称:">
+                    <el-input type="text" v-model="form.methodology" :disabled="limit.isRead"></el-input>
+                </el-form-item>
+                <el-form-item label="备注:">
+                    <el-input type="textarea"
+                              :rows="3"
+                              v-model="form.typeDesc"
+                              :disabled="limit.isRead"></el-input>
+                </el-form-item>
+
+            </el-form>
+        </div>
+      </div>
+      <div class="hc-box taskList">
+        <div class="hc-box-header">
+           类别结构信息
+        </div>
+        <div class="hc-box-wrap">
+            <el-tag
+              :key="index"
+              v-for="(tag,index) in form.productTypeExpansions"
+              :closable="!limit.isRead"
+              :disable-transitions="false"
+              @close="handleClose(tag)">
+              {{tag.expansionItem}}
+            </el-tag>
+            <el-input
+              class="input-new-tag"
+              v-if="inputVisible"
+              v-model="inputValue"
+              ref="saveTagInput"
+              size="small"
+              @keyup.enter.native="handleInputConfirm"
+              @blur="handleInputConfirm"
+            >
+            </el-input>
+            <el-button v-else class="button-new-tag" size="small" @click="showInput" v-show="!limit.isRead">+ 添加类型属性</el-button>
+        </div>
+      </div>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="handleCancel">取 消</el-button>
+      <el-button type="primary" @click="submit" v-if="!limit.isRead">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { addProductType , updateProductType } from "@/api/baseManage/productType";
+export default {
+  name: 'addMobiel',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: 'title'
+    },
+    action: {
+      type: String,
+      default: 'add'
+    },
+    selectRow: {
+      type: Object,
+      default:null
+    }
+  },
+  watch: {
+    visible(newVal, oldVal) {
+      this.modalVisible = newVal;
+    },
+    title(newVal, oldVal) {
+      this.modalTitle = newVal;
+    },
+    action(newVal, oldVal) {
+      this.modalAction = newVal;
+    },
+    selectRow(newVal, oldVal) {
+      this.modalSelectRow = newVal;
+    }
+  },
+  data() {
+    return {
+      modalTitle: this.title,
+      modalVisible: this.visible,
+      modalAction: this.action,
+      modalSelectRow: this.selectRow,
+      formLabelWidth: '1024px',
+      //窗口权限
+      limit: {
+        isRead: false, //是否只读
+        isAdd: false //是否可写
+      },
+      //验证
+      rules: {
+        typeName: [{ required: true, message: '类别名称不能为空!', trigger: 'blur' }]
+      },
+      //属性
+      inputVisible: false,
+      inputValue:'',
+      //表单
+      form: {
+        productTypeExpansions:[]
+      }
+    };
+  },
+  created() {
+    // console.log(this.selectRow)
+    console.log(this.modalSelectRow)
+    switch (this.modalAction) {
+      case 'add':
+        this.limit.isAdd = true;
+        break;
+      case 'edit':
+        this.limit.isAdd = true;
+        this.form = Object.assign({},this.modalSelectRow)
+        break;
+      case 'view':
+        this.limit.isRead = true;
+        this.form = Object.assign({},this.modalSelectRow)
+        break;
+      default:
+        break;
+    }
+  },
+  methods: {
+    //删除类型属性
+    handleClose(tag) {
+      this.form.productTypeExpansions.splice(this.form.productTypeExpansions.indexOf(tag), 1);
+    },
+    //打开属性填写框
+    showInput() {
+      this.inputVisible = true;
+      this.$nextTick(_ => {
+        this.$refs.saveTagInput.$refs.input.focus();
+      });
+    },
+    //输入属性确定
+    handleInputConfirm() {
+      let inputValue = this.inputValue;
+      console.log(inputValue)
+      if (inputValue) {
+        this.form.productTypeExpansions.push({
+          "expansionItem":inputValue
+        });
+      }
+      this.inputVisible = false;
+      this.inputValue = '';
+    },
+    //表单提交
+    submit() {
+      this.$refs.from.validate(valid => {
+        if (valid) {
+          let params = Object.assign({},this.form)
+          console.log(params)
+          if(this.modalAction === 'add'){
+            addProductType(params).then(res => {
+                if (res.retHead.errCode === 0) {
+                  this.msgSuccess("操作成功");
+                  this.modalVisible = false
+                 	this.$emit('closeModal', true);
+                }
+            });
+          }else{
+            updateProductType(params).then(res => {
+                if (res.retHead.errCode === 0) {
+                  this.msgSuccess("操作成功");
+                  this.modalVisible = false
+                 	this.$emit('closeModal', true);
+                }
+            });
+          }
+        } else {
+          return false;
+        }
+      });
+    },
+    //窗口关闭
+    handleCancel() {
+      this.$emit('closeModal', false);
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+
+  .el-tag + .el-tag {
+      margin-left: 10px;
+    }
+    .button-new-tag {
+      margin-left: 10px;
+      height: 32px;
+      line-height: 30px;
+      padding-top: 0;
+      padding-bottom: 0;
+    }
+    .input-new-tag {
+      width: 90px;
+      margin-left: 10px;
+      vertical-align: bottom;
+    }
+
+  .hc-box{
+    border:1px solid #e9e9e9;
+    margin-bottom:20px;
+    .hc-box-header{
+        height:40px;
+        line-height:40px;
+        background:#fafafa;
+        font-weight:bold;
+        color:#333;
+        padding:0 15px;
+        .action{
+          margin-left:10px;
+          color:#304FFE
+        }
+    }
+  }
+  .add{
+    .hc-box-wrap{
+      padding:15px 30px 15px 0;
+    }
+  }
+  .taskList{
+    .hc-box-wrap{
+      padding:15px;
+    }
+  }
+</style>

+ 6 - 72
src/views/belongToSubject/area/index.vue

@@ -54,7 +54,7 @@
             <el-button
               size="mini"
               type="danger"
-              @click="handleDelete"
+              @click="handleDelete(scope.row)"
               icon="el-icon-delete"
             >删除</el-button>
           </template>
@@ -79,7 +79,7 @@
 </template>
 56757
 <script>
-import { listArea } from "@/api/belongToSubject/area";
+import { listArea ,delArea } from "@/api/belongToSubject/area";
 import addMobiel from './modal/addMobiel'
 export default {
   name: "area",
@@ -121,72 +121,6 @@ export default {
     /** 查询产婆类别列表 */
     getList() {
       this.loading = false;
-      this.list = [
-        {
-          id:"1",
-          typeName:'test1',
-          typeVal:'n019284423',
-          methodology:'花菜',
-          typeDesc:'备注描述',
-          createTime:'2015.10.11',
-          productTypeExpansionForms:[
-            {
-                expansionItem:'白菜'
-            },
-            {
-                expansionItem:'花菜'
-            }
-          ]
-        },
-        {
-          id:"2",
-          typeName:'test1',
-          typeVal:'n019284423',
-          methodology:'花菜',
-          typeDesc:'备注描述',
-          createTime:'2015.10.11',
-          productTypeExpansionForms:[
-            {
-                expansionItem:'白菜'
-            },
-            {
-                expansionItem:'花菜'
-            }
-          ]
-        },
-        {
-          id:"3",
-          typeName:'test1',
-          typeVal:'n019284423',
-          methodology:'花菜',
-          typeDesc:'备注描述',
-          createTime:'2015.10.11',
-          productTypeExpansionForms:[
-            {
-                expansionItem:'白菜'
-            },
-            {
-                expansionItem:'花菜'
-            }
-          ]
-        },
-        {
-          id:"3",
-          typeName:'test1',
-          typeVal:'n019284423',
-          methodology:'花菜',
-          typeDesc:'备注描述',
-          createTime:'2015.10.11',
-          productTypeExpansionForms:[
-            {
-                expansionItem:'白菜'
-            },
-            {
-                expansionItem:'花菜'
-            }
-          ]
-        }
-      ]
       listArea(this.queryParams).then(res => {
           if(res.retHead.errCode == 0){
             this.list = res.retBody
@@ -208,20 +142,20 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
         this.modal.visibleModal = true
-        this.modal.title = '新增产品类别'
+        this.modal.title = '新增归属区域'
         this.modal.action = 'add'
     },
     /** 查看按钮操作 */
     handleView(item){
         this.modal.visibleModal = true
-        this.modal.title = '产品类别详情'
+        this.modal.title = '归属区域详情'
         this.modal.action = 'view'
         this.modal.selectRow = item
     },
     /** 查看按钮操作 */
     handleEdit(item){
         this.modal.visibleModal = true
-        this.modal.title = '编辑产品类别'
+        this.modal.title = '编辑归属区域'
         this.modal.action = 'edit'
         this.modal.selectRow = item
     },
@@ -233,7 +167,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          // return delUser(userIds);
+          return delArea(row);
         }).then(() => {
           this.getList();
           this.msgSuccess("删除成功");

+ 13 - 7
src/views/belongToSubject/area/modal/addMobiel.vue

@@ -8,7 +8,7 @@
     <div class="mobile">
       <div class="hc-box add">
         <div class="hc-box-header">
-            产品类别信息
+            归属区域内容
         </div>
         <div class="hc-box-wrap">
             <el-form label-width="90px" :model="form" :rules="rules" ref="from" class="from">
@@ -17,8 +17,10 @@
                     ref="areaSelect"
                     v-model="form.areaAdd"
                     style="width:100%;"
+                    :disabled="limit.isRead"
                     :props="areaProps"
                     @change="handleSelectArea($event)"
+                    :placeholder="form.areaAddress"
                     clearable
                     ></el-cascader>
                 </el-form-item>
@@ -34,7 +36,7 @@
             </el-form>
             <el-row :gutter="20">
               <el-col :span="24">
-                  <el-divider content-position="left">贫困户图片</el-divider>
+                  <el-divider content-position="left">归属区域图片</el-divider>
                   <div class="uploadImg">
                      <el-upload
                        v-if="!limit.isRead"
@@ -164,23 +166,24 @@ export default {
     };
   },
   created() {
+    let datas
     switch (this.modalAction) {
       case 'add':
         this.limit.isAdd = true;
         break;
       case 'edit':
         this.limit.isAdd = true;
+        datas = Object.assign({},this.modalSelectRow)
+        datas.areaAdd = [datas.provinceId,datas.cityId,datas.countyId,datas.townId,datas.villageId]
+        datas.areaImages = datas.areaImages === '' ? [] : datas.areaImages.split(';')
+        this.form = datas
         break;
       case 'view':
         this.limit.isRead = true;
-        console.log(this.modalSelectRow)
-        let datas = Object.assign({},this.modalSelectRow)
+        datas = Object.assign({},this.modalSelectRow)
         datas.areaAdd = [datas.provinceId,datas.cityId,datas.countyId,datas.townId,datas.villageId]
         datas.areaImages = datas.areaImages === '' ? [] : datas.areaImages.split(';')
         this.form = datas
-        console.log(datas)
-
-
         break;
       default:
         break;
@@ -317,6 +320,9 @@ export default {
           color:#304FFE
         }
     }
+    .hc-box-wrap{
+      padding:30px 20px 0 20px;
+    }
     .uploadImg{
       padding:0 30px 30px 30px;
       .uploadImgList{

+ 1 - 0
vue.config.js

@@ -38,6 +38,7 @@ module.exports = {
         // target: `http://bobo.hw.hongweisoft.com/lymcq`,
         // target: `http://172.16.90.64:21998`,
         target: `http://172.16.90.102:21998`, //qiubo
+        // target: `http://172.16.90.3:21998`, //lql
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''