simple 3 years ago
parent
commit
0897519ced
5 changed files with 1110 additions and 806 deletions
  1. 10 8
      config/index.js
  2. BIN
      dist.zip
  3. 612 563
      src/page/decorateManage/components/chargeItem.vue
  4. 477 232
      src/page/decorateManage/decorateList.vue
  5. 11 3
      src/service/leasing.js

+ 10 - 8
config/index.js

@@ -9,14 +9,15 @@ const servicePath = 'http://wyservice.gzbfdc.com:5008' //葛洲坝
 */
 
 //const servicePath = 'http://wy.ghhn.com' //葛洲坝
-// const servicePath = 'http://cms.wuyeface.com' //云环境
+// const servicePath = 'https://ebeitest.wuyeface.com:1188' //云环境
+const servicePath = 'http://172.18.1.253:8082'//aaaa
 //const servicePath = 'http://kolottest.laifung-gz.com.cn' //高乐测试
 //const servicePath = 'http://kolot.laifung-gz.com.cn' //高乐测试
 // const servicePath = 'http://wuye.enxiang.net:5906' //恩祥
 //const servicePath = 'http://wy.hkhc.com.cn' //香江新地址
 // const servicePath = 'https://pms.hajwy.com' //光大生产
 // const servicePath = 'http://wx.cqygwy.com' //渝高物业
-const servicePath = 'http://sys.chjpm.com:6902/' //漕河泾
+// const servicePath = 'http://sys.chjpm.com:6902/' //漕河泾
 // const servicePath = 'http://qpi.zhenghongwy.com:8800' //正弘
 
 
@@ -62,10 +63,11 @@ module.exports = {
         //      target: 'http://qiaoxintest.wuyeface.com/landcrm', //侨鑫
         //      target: 'http://rosmart.zhenro.com/landcrm', //正荣
         // target: servicePath + '/landcrm', //敏捷测试
-        target: 'https://wy.gmtcmpark.com/landcrm', //粤奥测试接口
-        // // target: 'http://qpi.zhenghongwy.com:8800', //正弘
+        // target: 'https://wy.gmtcmpark.com/landcrm', //粤奥测试接口
+        // target: 'http://qpi.zhenghongwy.com:8800', //正弘
         // target: 'http://qpi.zhenghongwy.com:8800/landcrm',
         // target: "http://172.18.0.23/landcrm",
+        target: 'https://ebeitest.wuyeface.com:1188/landcrm',
         secure: false,
         changeOrigin: true,
         pathRewrite: {
@@ -74,8 +76,8 @@ module.exports = {
       },
       "/leasing": {
         // target: 'http://wyappcs.gzbfdc.com:5708/decorationManage', //葛洲坝测试接口
-        // target: servicePath + '/decorationManage', //葛洲坝测试接口
-        target: 'https://wy.gmtcmpark.com/leasing', //葛洲坝测试接口
+        target: servicePath + '/decorationManage', //葛洲坝测试接口
+        // target: 'https://wy.gmtcmpark.com/leasing', //葛洲坝测试接口
         // target: 'http://172.18.1.253:8082/leasing',
         secure: false,
         changeOrigin: true,
@@ -85,8 +87,8 @@ module.exports = {
       },
       "/decorationManage": {
         // target: 'http://wyappcs.gzbfdc.com:5708/decorationManage', //葛洲坝测试接口
-        // target: servicePath + '/decorationManage', //葛洲坝测试接口
-        target: 'https://wy.gmtcmpark.com/decorationManage', //粤奥测试接口
+        target: servicePath + '/decorationManage', //葛洲坝测试接口
+        // target: 'https://wy.gmtcmpark.com/decorationManage', //粤奥测试接口
         // target: 'http://172.18.1.253:8082/decorationManage',
         secure: false,
         changeOrigin: true,

BIN
dist.zip


+ 612 - 563
src/page/decorateManage/components/chargeItem.vue

@@ -1,32 +1,41 @@
 <template>
   <div>
-    <div style="text-align:right">
-      <Button v-show="canshow" style="margin-bottom:5px;" type="primary" @click="addCharge">新增</Button>
+    <div style="text-align: right">
+      <Button
+        v-show="canshow"
+        style="margin-bottom: 5px"
+        type="primary"
+        @click="addCharge"
+        >新增</Button
+      >
     </div>
     <Table :columns="columns" :data="Lists"></Table>
-    <Modal v-model="modalCharge" title="新增应收费项" width="70%" height="50%" :mask-closable="false"
-      class-name="vertical-center-modal">
-      <div style="height:450px">
-        <div>
-          <!-- <p style="display:inline-block;margin-right:5px;">房屋类型</p>
-          <Select @on-change="changeHouseType" transfer v-model="houseType" placeholder="请选择"
-            style="width: 200px;margin-right:5px">
-            <Option v-for="(item,i) in HouseTypeList" :key="i" :value="item.Id">{{item.Name}}</Option>
-          </Select> -->
-          <p style="display:inline-block;margin-right:5px;">费用类型</p>
-          <Select @on-change="changeChargeType" transfer v-model="chargeType" placeholder="请选择" style="width: 200px">
-            <Option :value="item.chargeCategoryId" v-for="(item,i) in chargeTypeList" :key="i">
-              {{item.chargeCategoryName}} </Option>
-          </Select>
-        </div>
-        <div style="height:400px;overflow:auto;margin-top:10px">
-          <div v-for="(list,i) in data" :key="i" class="tableGroup">
-            <div style="margin-top:20px">
-              <p style="display:inline-block;margin-right:5px;font-weight: bold;">
-                {{list.fiName}}
+    <Modal
+      v-model="modalCharge"
+      title="新增应收费项"
+      width="70%"
+      height="50%"
+      :mask-closable="false"
+      class-name="vertical-center-modal"
+    >
+      <div style="height: 450px">
+        <div style="height: 400px; overflow: auto; margin-top: 10px">
+          <div v-for="(list, i) in data" :key="i" class="tableGroup">
+            <div style="margin-top: 20px">
+              <p
+                style="
+                  display: inline-block;
+                  margin-right: 5px;
+                  font-weight: bold;
+                "
+              >
+                {{ list.fiName }}
               </p>
             </div>
-            <div style="margin-top:10px;margin-bottom:27px" class="tableList tableGroup">
+            <div
+              style="margin-top: 10px; margin-bottom: 27px"
+              class="tableList tableGroup"
+            >
               <table>
                 <tr>
                   <th>项</th>
@@ -36,31 +45,48 @@
                   <th>数量</th>
                   <th>备注</th>
                 </tr>
-                <tr v-for="(item,index) in list.lists" :key="index">
-                  <td :rowSpan="list.lists.length" v-if="index==0">
-                    <Checkbox v-model="data[i].flag">{{  data[i].chargeItem}}</Checkbox>
+                <tr v-for="(item, index) in list.lists" :key="index">
+                  <td :rowSpan="list.lists.length" v-if="index == 0">
+                    <Checkbox v-model="data[i].flag">{{
+                      data[i].chargeItem
+                    }}</Checkbox>
                   </td>
-                  <td :rowSpan="list.lists.length" v-if="index==0">
-                    <DatePicker type="month" v-model="data[i].chargePeriod"></DatePicker>
+                  <td :rowSpan="list.lists.length" v-if="index == 0">
+                    <DatePicker
+                      type="month"
+                      v-model="data[i].chargePeriod"
+                    ></DatePicker>
                   </td>
                   <td>
-                    <span v-if="item.chargeItemDetailName ==''">--</span>
-                    <span v-else>{{item.chargeItemDetailName }}</span>
+                    <span v-if="item.chargeItemDetailName == ''">--</span>
+                    <span v-else>{{ item.chargeItemDetailName }}</span>
                   </td>
                   <td>
-                    <InputNumber :max="1000" :min="1" v-model="item.chargeItemDetailPrice"></InputNumber>
+                    <InputNumber
+                      :max="1000"
+                      :min="1"
+                      v-model="item.chargeItemDetailPrice"
+                    ></InputNumber>
                   </td>
                   <td>
-                    <InputNumber :max="1000" :min="1" v-model="item.count"></InputNumber>
+                    <InputNumber
+                      :max="1000"
+                      :min="1"
+                      v-model="item.count"
+                    ></InputNumber>
                   </td>
-                  <td :rowSpan="list.lists.length" v-if="index==0">
-                    <Input v-model="data[i].remark" type="textarea" :rows="1" placeholder="请输入" />
+                  <td :rowSpan="list.lists.length" v-if="index == 0">
+                    <Input
+                      v-model="data[i].remark"
+                      type="textarea"
+                      :rows="1"
+                      placeholder="请输入"
+                    />
                   </td>
                 </tr>
               </table>
             </div>
           </div>
-
         </div>
       </div>
       <div slot="footer" class="text-center">
@@ -68,13 +94,19 @@
         <Button @click="colse">取消</Button>
       </div>
     </Modal>
-    <Modal v-model="modalChargeEdit" title="编辑应收费项" :width="900" :mask-closable="false">
+    <Modal
+      v-model="modalChargeEdit"
+      title="编辑应收费项"
+      :width="900"
+      :mask-closable="false"
+    >
       <div>
-        <div style="margin-top:5px">
-          <p style="display:inline-block;margin-right:5px;">{{editInfo.chargeItem}}</p>
-
+        <div style="margin-top: 5px">
+          <p style="display: inline-block; margin-right: 5px">
+            {{ editInfo.chargeItem }}
+          </p>
         </div>
-        <div style="margin-top:10px" class="tableList tableGroup">
+        <div style="margin-top: 10px" class="tableList tableGroup">
           <table>
             <tr>
               <th>应收周期</th>
@@ -83,29 +115,42 @@
               <th>数量</th>
               <th>备注</th>
             </tr>
-            <tr v-for="(item,index) in chargeList" :key="index">
-              <td :rowSpan="chargeList.length" v-if="index==0">
-                <DatePicker type="month" v-model="dataEdit.chargePeriod"></DatePicker>
+            <tr v-for="(item, index) in chargeList" :key="index">
+              <td :rowSpan="chargeList.length" v-if="index == 0">
+                <DatePicker
+                  type="month"
+                  v-model="dataEdit.chargePeriod"
+                ></DatePicker>
               </td>
               <td>
-                <span v-if="item.chargeItemDetailName ==''">--</span>
-                <span v-else>{{item.chargeItemDetailName }}</span>
+                <span v-if="item.chargeItemDetailName == ''">--</span>
+                <span v-else>{{ item.chargeItemDetailName }}</span>
               </td>
               <td>
-                <InputNumber :max="1000" :min="1" v-model="item.chargeItemDetailPrice"></InputNumber>
+                <InputNumber
+                  :max="1000"
+                  :min="1"
+                  v-model="item.chargeItemDetailPrice"
+                ></InputNumber>
               </td>
               <td>
-                <InputNumber :max="1000" :min="1" v-model="item.quantity"></InputNumber>
+                <InputNumber
+                  :max="1000"
+                  :min="1"
+                  v-model="item.quantity"
+                ></InputNumber>
               </td>
-              <td :rowSpan="chargeList.length" v-if="index==0">
-                <Input v-model="dataEdit.remark" type="textarea" :rows="1" placeholder="请输入" />
+              <td :rowSpan="chargeList.length" v-if="index == 0">
+                <Input
+                  v-model="dataEdit.remark"
+                  type="textarea"
+                  :rows="1"
+                  placeholder="请输入"
+                />
               </td>
-
             </tr>
-
           </table>
         </div>
-
       </div>
       <div slot="footer" class="text-center">
         <Button type="primary" @click="saveEdit">保存</Button>
@@ -113,583 +158,587 @@
       </div>
     </Modal>
   </div>
-
 </template>
 <script>
-  import moment from "moment";
-  import {
-    getSysCodes, // 获取系统常量
-    getCategoryByProcessAndType, //根据流程key获取表单费项大类
-    getChargeItemByCategory, //根据收费大类ID获取表单费项明细
-    addFormFeeItem, //增加表单费项
-    listFormFeeItem, //查询表单费项
-    deleteFormFeeItem, //删除表单费项
-    updateFormFeeItem,
-    getBySettingId
-  } from '../../../service/leasing'
-  export default {
-    name: '',
-    components: {},
-    props: ['processKey'],
-    data() {
-      return {
-        canshow: false,
-        columns: [{
-            type: "index",
-            title: "序号",
-            width: 90,
-            align: "center"
-          },
-          {
-            title: "房屋类型",
-            key: "chargeCategoryTypeDesc",
-            align: "center"
-          },
-          {
-            title: "费项",
-            key: "fiName",
-            align: "center"
-          },
-          {
-            title: "含税金额",
-            key: "amountWithTax",
-            align: "center"
-          },
-          {
-            title: "不含税金额",
-            key: "amountWithoutTax",
-            align: "center"
-          },
-          {
-            title: "结算方式",
-            key: "settlementType",
-            align: "center"
-          },
-          {
-            title: "金额明细",
-            key: "amountDetail",
-            align: "center",
-            render: (h, params) => {
-              return h('ul',
-                this.Lists[params.index].amountDetail.split(",").map(item => {
-                  return h('li', item)
-                })
-              )
-            }
-          },
-          {
-            title: "备注",
-            key: "remark",
-            align: "center",
+import moment from "moment";
+import {
+  getSysCodes, // 获取系统常量
+  getCategoryByProcessAndType, //根据流程key获取表单费项大类
+  getChargeItemByCategory, //根据收费大类ID获取表单费项明细
+  addFormFeeItem, //增加表单费项
+  listFormFeeItem, //查询表单费项
+  deleteFormFeeItem, //删除表单费项
+  updateFormFeeItem,
+  getBySettingId,
+  getFeiXiang,
+} from "../../../service/leasing";
+export default {
+  name: "",
+  components: {},
+  props: ["processKey"],
+  data() {
+    return {
+      canshow: false,
+      columns: [
+        {
+          type: "index",
+          title: "序号",
+          width: 90,
+          align: "center",
+        },
+        {
+          title: "房屋类型",
+          key: "chargeCategoryTypeDesc",
+          align: "center",
+        },
+        {
+          title: "费项",
+          key: "fiName",
+          align: "center",
+        },
+        {
+          title: "含税金额",
+          key: "amountWithTax",
+          align: "center",
+        },
+        {
+          title: "不含税金额",
+          key: "amountWithoutTax",
+          align: "center",
+        },
+        {
+          title: "结算方式",
+          key: "settlementType",
+          align: "center",
+        },
+        {
+          title: "金额明细",
+          key: "amountDetail",
+          align: "center",
+          render: (h, params) => {
+            return h(
+              "ul",
+              this.Lists[params.index].amountDetail.split(",").map((item) => {
+                return h("li", item);
+              })
+            );
           },
-          {
-            title: "操作",
-            slot: "action",
-            align: "center",
-            render: (h, params) => {
-              return h('div', [
-
-                h('span', {
+        },
+        {
+          title: "备注",
+          key: "remark",
+          align: "center",
+        },
+        {
+          title: "操作",
+          slot: "action",
+          align: "center",
+          render: (h, params) => {
+            return h("div", [
+              h(
+                "span",
+                {
                   style: {
-                    display: this.canshow ? '' : 'none'
+                    display: this.canshow ? "" : "none",
                   },
                   class: "blue_link",
                   on: {
                     click: () => {
                       this.edit(params.row);
-                    }
-                  }
-                }, "编辑"),
+                    },
+                  },
+                },
+                "编辑"
+              ),
 
-                h('span', {
+              h(
+                "span",
+                {
                   style: {
-                    display: this.canshow ? '' : 'none'
+                    display: this.canshow ? "" : "none",
                   },
                   class: "blue_link",
 
                   on: {
                     click: () => {
                       this.delete(params.row, params.index);
-                    }
-                  }
-                }, "删除"),
-
-              ])
-            }
+                    },
+                  },
+                },
+                "删除"
+              ),
+            ]);
           },
-        ],
-        Lists: [],
-        paymentTypeList: [],
-        HouseTypeList: [],
-        modalCharge: false,
-        modalChargeEdit: false,
-        isButton: false,
-        data: [],
-        checkTable: '',
-        remark: '',
-        houseType: '0', //房屋类型
-        chargeType: '', //费用类型
-        chargeTypeList: [],
-        projectId: "",
-        projectLists: [],
-        chargeTxt: '', //费用名称
-        serialNumber: '', //流水号
-        chargeTable: [],
-        chargeDeposit: [],
-        flag: [],
-        editInfo: {},
-        dataEdit: [],
-        chargeList: [],
-        countTableData: [],
-        chargeItemId: ''
-      }
-    },
-    watch: {
-      Lists: {
-        handler() {
-          this.$emit('on-setFeeList', this.Lists.length)
-        }
+        },
+      ],
+      decorationId: null,
+      Lists: [],
+      paymentTypeList: [],
+      HouseTypeList: [],
+      modalCharge: false,
+      modalChargeEdit: false,
+      isButton: false,
+      data: [],
+      checkTable: "",
+      remark: "",
+      houseType: "0", //房屋类型
+      chargeType: "", //费用类型
+      chargeTypeList: [],
+      projectId: "",
+      projectLists: [],
+      chargeTxt: "", //费用名称
+      serialNumber: "", //流水号
+      chargeTable: [],
+      chargeDeposit: [],
+      flag: [],
+      editInfo: {},
+      dataEdit: [],
+      chargeList: [],
+      countTableData: [],
+      chargeItemId: "",
+    };
+  },
+  watch: {
+    Lists: {
+      handler() {
+        this.$emit("on-setFeeList", this.Lists.length);
       },
-      "houseType": {
-        handler() {
-          if (this.houseType == "") {
-            this.chargeType = '';
-          }
+    },
+    houseType: {
+      handler() {
+        if (this.houseType == "") {
+          this.chargeType = "";
         }
       },
-      "chargeItemId": {
-        handler() {
-          console.log("chargeItem", this.chargeItemId)
-          if (this.chargeItemId != "") {
-            for (var i = 0; i < this.countTableData.length; i++) {
-              if (this.countTableData[i].chargeItemId == this.chargeItemId) {
-                this.countTableData.splice(i, 1);
-
-              }
+    },
+    chargeItemId: {
+      handler() {
+        console.log("chargeItem", this.chargeItemId);
+        if (this.chargeItemId != "") {
+          for (var i = 0; i < this.countTableData.length; i++) {
+            if (this.countTableData[i].chargeItemId == this.chargeItemId) {
+              this.countTableData.splice(i, 1);
             }
           }
         }
       },
-
-
-
     },
-    created: function () {
-      console.log(this.$parent.$parent)
-      this.getTypeCodes(); //查询房屋类型    
+  },
+  created: function () {
+    console.log(this.$parent.$parent);
+    this.getTypeCodes(); //查询房屋类型
+  },
+  methods: {
+    addCharge() {
+      this.modalCharge = true;
+      this.getChargeItemByCategory(0);
     },
-    methods: {
-
-      addCharge() {
-        this.modalCharge = true;
-        this.getCategoryByProcessAndType(0)
-      },
-      // 根据流程key获取表单费项大类
-      getCategoryByProcessAndType(chargeCategoryType) {
-        this.chargeType = '';
-        this.chargeTypeList = [];
-        getCategoryByProcessAndType({
-          processKey: this.processKey, //流程定义key
-          chargeCategoryType: 0, //  *房屋类型0-写字楼1-裙楼
-          projectId: this.projectId, //   *项目ID
-        }).then(res => {
-          if (res.status == 200) {
-            this.chargeTypeList = res.data;
-            if (res.data.length > 0) {
-              this.chargeType = res.data[0].chargeCategoryId
-              this.getChargeItemByCategory(res.data[0].chargeCategoryId)
-            } else {
-              this.data = []
-            }
+    // 根据流程key获取表单费项大类
+    getCategoryByProcessAndType(chargeCategoryType) {
+      this.chargeType = "";
+      this.chargeTypeList = [];
+      getCategoryByProcessAndType({
+        processKey: this.processKey, //流程定义key
+        chargeCategoryType: 0, //  *房屋类型0-写字楼1-裙楼
+        projectId: this.projectId, //   *项目ID
+      }).then((res) => {
+        if (res.status == 200) {
+          this.chargeTypeList = res.data;
+          if (res.data.length > 0) {
+            this.chargeType = res.data[0].chargeCategoryId;
+            this.getChargeItemByCategory(res.data[0].chargeCategoryId);
+          } else {
+            this.data = [];
           }
-        })
-      },
-      // 根据收费大类ID获取表单费项明细
-      getChargeItemByCategory(categoryId) {
-        if (categoryId != '') {
+        }
+      });
+    },
+    // 根据收费大类ID获取表单费项明细
+    getChargeItemByCategory(categoryId) {
+      // getFeiXiang(this.projectId).then(res => {
+      //   if (res.status == 200) {
+
+      //   }
+      // })
+
+      getFeiXiang(this.projectId).then((res) => {
+        if (res.status == 200) {
+          console.log(1, res.data[0].activitiChargeItemVoList.length);
+          if (res.data[0].activitiChargeItemVoList.length > 0) {
+            let arr = [];
+            for (let i in res.data[0].activitiChargeItemVoList) {
+              for (let j in res.data[0].activitiChargeItemVoList[i]
+                .activitiChargeItemDetailList) {
+                res.data[0].activitiChargeItemVoList[
+                  i
+                ].activitiChargeItemDetailList[j].fiId =
+                  res.data[0].activitiChargeItemVoList[i].fiId;
+                arr.push(
+                  res.data[0].activitiChargeItemVoList[i]
+                    .activitiChargeItemDetailList[j]
+                );
+              }
+            }
+            console.log(arr);
+            // var arr = res.data[0].activitiChargeItemVoList;
+            var result = [];
+            var obj = {};
+            for (var i = 0; i < arr.length; i++) {
+              if (!obj[arr[i].chargeItemId]) {
+                arr[i].chargePeriod = moment(new Date()).format("YYYY-MM");
+                result.push(arr[i]);
+                obj[arr[i].chargeItemId] = true;
+              }
+            }
 
-          getChargeItemByCategory({
-            categoryId: categoryId
-          }).then(res => {
-            if (res.status == 200) {
-              console.log(1, res.data.length)
-              if (res.data.length > 0) {
-                var arr = res.data
-                var result = [];
-                var obj = {};
-                for (var i = 0; i < arr.length; i++) {
-                  if (!obj[arr[i].chargeItemId]) {
-                    arr[i].chargePeriod = moment(new Date()).format("YYYY-MM");
-                    result.push(arr[i]);
-                    obj[arr[i].chargeItemId] = true;
+            var c = [];
+            result.forEach((item) => {
+              var a = {};
+              for (var key in item) {
+                a[key] = item[key];
+              }
+              a.count = 1;
+              a.flag = false;
+              a.remark = "";
+              c.push(a);
+            });
+            // 控制新增的费项哪些是可以添加的
+            if (this.countTableData.length > 0) {
+              console.log("新增countTableData", this.countTableData);
+              this.countTableData.forEach((v) => {
+                if (c.length > 0) {
+                  for (var j = 0; j < c.length; j++) {
+                    if (c[j].chargeItemId == v.chargeItemId) {
+                      c.splice(j, 1);
+                    }
                   }
                 }
-
-
-                var c = [];
-                result.forEach(item => {
-
-                  var a = {}
+              });
+            }
+            //
+
+            var i = 0;
+            c.forEach((item1) => {
+              item1.lists = [];
+              item1.index = i;
+              arr.forEach((item) => {
+                if (item.chargeItemId == item1.chargeItemId) {
+                  var a = {};
                   for (var key in item) {
                     a[key] = item[key];
                   }
                   a.count = 1;
+                  a.index = item1.index;
                   a.flag = false;
-                  a.remark = '';
-                  c.push(a);
-
-                })
-                // 控制新增的费项哪些是可以添加的
-                if (this.countTableData.length > 0) {
-                  console.log("新增countTableData", this.countTableData)
-                  this.countTableData.forEach(v => {
-                    if (c.length > 0) {
-                      for (var j = 0; j < c.length; j++) {
-                        if (c[j].chargeItemId == v.chargeItemId) {
-                          c.splice(j, 1);
-                        }
-                      }
-                    }
-                  })
-
+                  item1.lists.push(a);
+                  i = i + 1;
                 }
-                // 
-
-                var i = 0
-                c.forEach(item1 => {
-                  item1.lists = [];
-                  item1.index = i;
-                  res.data.forEach(item => {
-                    if (item.chargeItemId == item1.chargeItemId) {
-                      var a = {}
-                      for (var key in item) {
-                        a[key] = item[key]
-                      }
-                      a.count = 1
-                      a.index = item1.index;
-                      a.flag = false;
-                      item1.lists.push(a)
-                      i = i + 1
-                    }
-                  })
-
-                })
+              });
+            });
 
-                this.data = c;
-
-                var chargeData = [];
-                this.data.forEach(item => {
-                  var d = {}
-                  for (var key in item) {
-                    d[key] = item[key]
-                  }
-                  chargeData.push(item)
-                })
-              } else {
-                this.data = []
+            this.data = c;
 
+            var chargeData = [];
+            this.data.forEach((item) => {
+              var d = {};
+              for (var key in item) {
+                d[key] = item[key];
               }
-            }
-
-          })
-        }
-
-      },
-      // 房屋类型改变
-      changeHouseType(val) {
-        this.getCategoryByProcessAndType(val);
-      },
-      //费项类型改变
-      changeChargeType(val) {
-        this.getChargeItemByCategory(val);
-      },
-      // 编辑
-      edit(row) {
-        this.modalChargeEdit = true;
-        this.editInfo = row;
-        this.dataEdit = {}
-        this.dataEdit.settingId = row.settingId
-        this.dataEdit.remark = row.remark
-        this.dataEdit.fiId = row.fiId
-        this.dataEdit.chargeItemId = row.chargeItemId;
-        this.dataEdit.chargePeriod = row.chargePeriod;
-        this.getBySettingId(row.settingId)
-      },
-      // 获得编辑时的信息
-      getBySettingId(settingId) {
-        getBySettingId({
-          settingId: settingId
-        }).then(res => {
-          if (res.status == 200) {
-            if (res.data.length > 0) {
-              this.chargeList = res.data;
-            }
-
+              chargeData.push(item);
+            });
           } else {
-            this.$Message.error(res.message)
+            this.data = [];
           }
-        })
-
-      },
-      colseEdit() {
-        this.modalChargeEdit = false;
-      },
-      saveEdit() {
-        var arr3 = {
-          fiId: this.dataEdit.fiId,
-          chargeItemId: this.dataEdit.chargeItemId,
-          settlementType: this.$parent.$parent.formItem.settlementType,
-          serialNumber: this.serialNumber,
-          settingId: this.dataEdit.settingId,
-          chargePeriod: moment(this.dataEdit.chargePeriod).format("YYYY-MM"),
         }
-        if (this.dataEdit.remark) {
-          arr3.remark = this.dataEdit.remark
+      });
+    },
+    // 房屋类型改变
+    changeHouseType(val) {
+      this.getCategoryByProcessAndType(val);
+    },
+    //费项类型改变
+    changeChargeType(val) {
+      this.getChargeItemByCategory(val);
+    },
+    // 编辑
+    edit(row) {
+      this.modalChargeEdit = true;
+      this.editInfo = row;
+      this.dataEdit = {};
+      this.dataEdit.settingId = row.settingId;
+      this.dataEdit.remark = row.remark;
+      this.dataEdit.fiId = row.fiId;
+      this.dataEdit.chargeItemId = row.chargeItemId;
+      this.dataEdit.chargePeriod = row.chargePeriod;
+      this.getBySettingId(row.settingId);
+    },
+    // 获得编辑时的信息
+    getBySettingId(settingId) {
+      getBySettingId({
+        settingId: settingId,
+      }).then((res) => {
+        if (res.status == 200) {
+          if (res.data.length > 0) {
+            this.chargeList = res.data;
+          }
         } else {
-          arr3.remark = ''
+          this.$Message.error(res.message);
         }
+      });
+    },
+    colseEdit() {
+      this.modalChargeEdit = false;
+    },
+    saveEdit() {
+      var arr3 = {
+        fiId: this.dataEdit.fiId,
+        chargeItemId: this.dataEdit.chargeItemId,
+        settlementType: this.$parent.$parent.formItem.settlementType,
+        // serialNumber: this.serialNumber,
+        decorationId: this.decorationId,
+        settingId: this.dataEdit.settingId,
+        chargePeriod: moment(this.dataEdit.chargePeriod).format("YYYY-MM"),
+      };
+      if (this.dataEdit.remark) {
+        arr3.remark = this.dataEdit.remark;
+      } else {
+        arr3.remark = "";
+      }
 
-        if (this.projectLists && this.projectLists.length > 0) {
-          this.projectLists.forEach(item => {
-            if (item.projectId == this.projectId) {
-              arr3.projectName = item.projectName
-            }
-          })
-        }
-        arr3.projectId = this.projectId;
-        var arr4 = [];
-        this.chargeList.forEach(item => {
-          var a = {}
-          for (var key in item) {
-            if (key == "fiId" || key == "quantity" || key == "chargeItemDetailPrice" || key ==
-              "chargeItemDetailName" || key == "chargeItemDetailId" || key == "chargeItemId") {
-              a[key] = item[key]
-            }
+      if (this.projectLists && this.projectLists.length > 0) {
+        this.projectLists.forEach((item) => {
+          if (item.projectId == this.projectId) {
+            arr3.projectName = item.projectName;
           }
-          arr4.push(a);
-
-        })
-        var paramsEdit = {
-          serialNumber: this.serialNumber,
-          setting: JSON.stringify(arr3),
-          formItemDetailStr: JSON.stringify(arr4)
-        }
-        updateFormFeeItem(paramsEdit).then(res => {
-          if (res.status == 200) {
-            this.modalChargeEdit = false;
-            this.listFormFeeItem()
-          } else {
-            this.$Message.error(res.message)
+        });
+      }
+      arr3.projectId = this.projectId;
+      var arr4 = [];
+      this.chargeList.forEach((item) => {
+        var a = {};
+        for (var key in item) {
+          if (
+            key == "fiId" ||
+            key == "quantity" ||
+            key == "chargeItemDetailPrice" ||
+            key == "chargeItemDetailName" ||
+            key == "chargeItemDetailId" ||
+            key == "chargeItemId"
+          ) {
+            a[key] = item[key];
           }
-        })
-      },
-      // 删除
-      delete(row, index) {
-        deleteFormFeeItem({
-          settingId: row.settingId
-        }).then(res => {
-          if (res.status == 200) {
-            for (var i = 0; i < this.countTableData.length; i++) {
-              if (this.countTableData[i].settingId == row.settingId) {
-                this.countTableData.splice(index, 1);
-              }
+        }
+        arr4.push(a);
+      });
+      var paramsEdit = {
+        // serialNumber: this.serialNumber,
+        decorationId: this.decorationId,
+        setting: JSON.stringify(arr3),
+        formItemDetailStr: JSON.stringify(arr4),
+      };
+      updateFormFeeItem(paramsEdit).then((res) => {
+        if (res.status == 200) {
+          this.modalChargeEdit = false;
+          this.listFormFeeItem();
+        } else {
+          this.$Message.error(res.message);
+        }
+      });
+    },
+    // 删除
+    delete(row, index) {
+      deleteFormFeeItem({
+        settingId: row.settingId,
+      }).then((res) => {
+        if (res.status == 200) {
+          for (var i = 0; i < this.countTableData.length; i++) {
+            if (this.countTableData[i].settingId == row.settingId) {
+              this.countTableData.splice(index, 1);
             }
-            this.Lists.splice(index, 1);
-          } else {
-            this.$Message.error(res.message);
           }
-        })
-
-      },
-
-      // 获得房屋类型
-      getTypeCodes() {
-        getSysCodes({
-          sysCodeType: "CHARGE_CATEGORY_TYPE"
-        }).then(res => {
-          if (res.status == 200 && res.data.length > 0) {
-            this.HouseTypeList = res.data;
-          }
-        })
-      },
-
-      // 取消
-      colse() {
-        this.modalCharge = false;
-      },
-      //保存
-      save() {
-        this.isButton = true;
-        var self = this;
-        setTimeout(function () {
-          self.isButton = false;
+          this.Lists.splice(index, 1);
+        } else {
+          this.$Message.error(res.message);
+        }
+      });
+    },
 
-        }, 1000)
-        var arr = [];
-        var arr2 = [];
-        var i = 1;
-        if (this.data && this.data.length > 0) {
-          this.data.forEach(item => {
+    // 获得房屋类型
+    getTypeCodes() {
+      getSysCodes({
+        sysCodeType: "CHARGE_CATEGORY_TYPE",
+      }).then((res) => {
+        if (res.status == 200 && res.data.length > 0) {
+          this.HouseTypeList = res.data;
+        }
+      });
+    },
 
-            if (item.flag == true) {
-              var a = {};
-              for (var key in item) {
-                a.chargePeriod = moment(item.chargePeriod).format("YYYY-MM");
-                if (key == "fiId" || key == "chargeItemId") {
-                  a[key] = item[key];
-                }
-                if (key == "remark") {
-                  a[key] = item[key];
-                }
+    // 取消
+    colse() {
+      this.modalCharge = false;
+    },
+    //保存
+    save() {
+      this.isButton = true;
+      var self = this;
+      setTimeout(function () {
+        self.isButton = false;
+      }, 1000);
+      var arr = [];
+      var arr2 = [];
+      var i = 1;
+      if (this.data && this.data.length > 0) {
+        this.data.forEach((item) => {
+          if (item.flag == true) {
+            var a = {};
+            for (var key in item) {
+              a.chargePeriod = moment(item.chargePeriod).format("YYYY-MM");
+              if (key == "fiId" || key == "chargeItemId") {
+                a[key] = item[key];
               }
-              a.settlementType = this.$parent.$parent.formItem.settlementType;
-              a.serialNumber = this.serialNumber;
-              if (this.projectLists && this.projectLists.length > 0) {
-                this.projectLists.forEach(item => {
-                  if (item.projectId == this.projectId) {
-                    a.projectName = item.projectName
-                  }
-                })
+              if (key == "remark") {
+                a[key] = item[key];
               }
-              a.projectId = this.projectId;
-              arr.push(a);
-              item.lists.forEach(v => {
-                var b = {};
-                for (var key in v) {
-                  if (key == "fiId" || key == "chargeItemDetailId" || key == "chargeItemDetailPrice" || key ==
-                    "chargeItemDetailName" || key == "chargeItemId") {
-                    b[key] = v[key];
-                  } else if (key == "count") {
-                    b.quantity = v.count;
-                  }
-                }
-                arr2.push(b);
-              })
-
             }
-
-          })
-        }
-
-        var params = {
-          serialNumber: this.serialNumber,
-          settingStr: JSON.stringify(arr),
-          formItemDetailStr: JSON.stringify(arr2)
-        }
-
-        if (arr.length > 0 || arr2.length > 0) {
-          addFormFeeItem(params).then(res => {
-            if (res.status == 200) {
-              this.modalCharge = false;
-              this.listFormFeeItem()
-            } else {
-              this.$Message.error(res.message)
+            a.settlementType = this.$parent.$parent.formItem.settlementType;
+            // a.serialNumber = this.serialNumber;
+            a.decorationId = this.decorationId;
+            if (this.projectLists && this.projectLists.length > 0) {
+              this.projectLists.forEach((item) => {
+                if (item.projectId == this.projectId) {
+                  a.projectName = item.projectName;
+                }
+              });
             }
-          })
-        } else {
-          this.$Message.error("请完善信息")
-        }
-
-      },
-      listFormFeeItem() {
-        listFormFeeItem({
-          serialNumber: this.serialNumber,
-          projectId: this.projectId,
-
-        }).then(res => {
-          if (res.status == 200) {
-            if (res.data && res.data.length > 0) {
-              this.countTableData = res.data; //获得的新增的记录
-              console.log("删除", this.countTableData)
-              this.Lists = [];
-              this.chargeDeposit = [];
-              res.data.forEach(item => {
-                if (item.fiType == "2") {
-                  this.Lists.push(item)
-                } else if (item.fiType == "3") {
-                  this.chargeDeposit.push(item)
-                  this.$emit('on-chargedeposit', this.chargeDeposit)
+            a.projectId = this.projectId;
+            arr.push(a);
+            item.lists.forEach((v) => {
+              var b = {};
+              for (var key in v) {
+                if (
+                  key == "fiId" ||
+                  key == "chargeItemDetailId" ||
+                  key == "chargeItemDetailPrice" ||
+                  key == "chargeItemDetailName" ||
+                  key == "chargeItemId"
+                ) {
+                  b[key] = v[key];
+                } else if (key == "count") {
+                  b.quantity = v.count;
                 }
+              }
+              arr2.push(b);
+            });
+          }
+        });
+      }
 
-              })
-            }
+      var params = {
+        // serialNumber: this.serialNumber,
+        decorationId: this.decorationId,
+        settingStr: JSON.stringify(arr),
+        formItemDetailStr: JSON.stringify(arr2),
+      };
 
+      if (arr.length > 0 || arr2.length > 0) {
+        addFormFeeItem(params).then((res) => {
+          if (res.status == 200) {
+            this.modalCharge = false;
+            this.listFormFeeItem();
           } else {
-            this.$Message.error(res.message)
+            this.$Message.error(res.message);
           }
-        })
-
-      },
-
-    }
-
-  }
-
+        });
+      } else {
+        this.$Message.error("请完善信息");
+      }
+    },
+    listFormFeeItem() {
+      listFormFeeItem({
+        // serialNumber: this.serialNumber,
+        decorationId: this.decorationId,
+        projectId: this.projectId,
+      }).then((res) => {
+        if (res.status == 200) {
+          if (res.data && res.data.length > 0) {
+            this.countTableData = res.data; //获得的新增的记录
+            console.log("删除", this.countTableData);
+            this.Lists = [];
+            this.chargeDeposit = [];
+            res.data.forEach((item) => {
+              this.Lists.push(item);
+            });
+          }
+        } else {
+          this.$Message.error(res.message);
+        }
+      });
+    },
+  },
+};
 </script>
 <style lang="less">
-  .tableList /deep/ .ivu-input-number {
-    width: 100% !important;
-  }
-
-  .tableList /deep/ .ivu-input-number-handler-wrap {
-    display: none;
-  }
-
-  .li-body /deep/ .ivu-input-number-input {
-    text-align: center;
-  }
-
-  .tableGroup table {
-    border: 1px solid #e8eaec;
-
-  }
-
-  .tableGroup table th {
-    border-bottom: 1px solid #e8eaec;
-    background-color: #f9f9f9;
-    text-align: center;
-    padding: 5px
-  }
-
-  .tableGroup table tr {
-    border-bottom: 1px solid #e8eaec;
+.tableList /deep/ .ivu-input-number {
+  width: 100% !important;
+}
+
+.tableList /deep/ .ivu-input-number-handler-wrap {
+  display: none;
+}
+
+.li-body /deep/ .ivu-input-number-input {
+  text-align: center;
+}
+
+.tableGroup table {
+  border: 1px solid #e8eaec;
+}
+
+.tableGroup table th {
+  border-bottom: 1px solid #e8eaec;
+  background-color: #f9f9f9;
+  text-align: center;
+  padding: 5px;
+}
+
+.tableGroup table tr {
+  border-bottom: 1px solid #e8eaec;
+}
+
+.tableGroup table tr td {
+  text-align: center;
+  padding: 5px;
+  width: 16.6%;
+}
+
+/* 操作按钮 */
+.blue_link {
+  color: #2d8cf0;
+  display: inline-block;
+  margin-right: 3px;
+  cursor: pointer;
+  text-decoration: none;
+
+  .left_icon {
+    float: left;
+    font-size: 20px;
+    margin: -2px 5px 0 0;
   }
+}
 
-  .tableGroup table tr td {
-    text-align: center;
-    padding: 5px;
-    width: 16.6%;
-  }
+.blue_link:hover {
+  color: #1860ad;
+}
 
-  /* 操作按钮 */
-  .blue_link {
-    color: #2D8CF0;
-    display: inline-block;
-    margin-right: 3px;
-    cursor: pointer;
-    text-decoration: none;
+//设置弹窗默认垂直居中
+.vertical-center-modal {
+  display: flex;
+  align-items: center;
+  justify-content: center;
 
-    .left_icon {
-      float: left;
-      font-size: 20px;
-      margin: -2px 5px 0 0;
-    }
+  .ivu-modal {
+    top: 0;
   }
-
-  .blue_link:hover {
-    color: #1860ad;
-
-  }
-
-  //设置弹窗默认垂直居中
-  .vertical-center-modal {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-
-    .ivu-modal {
-      top: 0;
-    }
-  }
-
+}
 </style>

File diff suppressed because it is too large
+ 477 - 232
src/page/decorateManage/decorateList.vue


+ 11 - 3
src/service/leasing.js

@@ -25,7 +25,7 @@ export const getChargeItemByCategory = (data) => fetch('/decorationApp/getCharge
 * @method POST
 
 */
-export const addFormFeeItem = (data) => fetch('/decorationApp/addFormFeeItem', leasing, data, 'JSON', 'POST', 'FORMDATA');
+export const addFormFeeItem = (data) => fetch('/decorationApp/addFormFeeItemNew', leasing, data, 'JSON', 'POST', 'FORMDATA');
 
 /**
  * @description 删除表单费项
@@ -40,13 +40,13 @@ export const deleteFormFeeItem = (data) => fetch('/decorationApp/deleteFormFeeIt
  * @method POST
  * @param	
  */
-export const updateFormFeeItem = (data) => fetch('/decorationApp/updateFormFeeItem', leasing, data, 'JSON', 'POST', 'FORMDATA');
+export const updateFormFeeItem = (data) => fetch('/decorationApp/updateFormFeeItemNew', leasing, data, 'JSON', 'POST', 'FORMDATA');
 /**
 * @description 查询表单费项
 * @method POST
 
 */
-export const listFormFeeItem = (data) => fetch('/decorationApp/listFormFeeItem', leasing, data, 'JSON', 'POST', 'FORMDATA');
+export const listFormFeeItem = (data) => fetch('/decorationApp/listFormFeeItemNew', leasing, data, 'JSON', 'POST', 'FORMDATA');
 /**
  * @description 
  * @method GET
@@ -73,3 +73,11 @@ export const addDecorationLeasing = (data = {}) => fetch(`/decorationApp/addDeco
  */
 export const generatingBills = (id, data = {}) => fetch(`/decorationApp/generatingBills/${id}`, '/decorationManage', {}, 'JSON2', 'POST');
 // export const addDecorationLeasing = (data = {}) => fetch(`/decorationApp/addDecorationLeasing`, leasing, data, 'JSON2', 'POST');
+/**
+ * 获取费项  new
+ */
+ export const getFeiXiang = (id, data = {}) => fetch(`/decorationApp/getFeixiang/${id}`, '/decorationManage', {}, 'JSON2', 'POST');
+ /**
+ * 生成账单  new
+ */
+  export const saveReceivableRecord = (data = {}) => fetch(`/decorationApp/saveReceivableRecord`, '/decorationManage', data, 'JSON2', 'POST');

Some files were not shown because too many files changed in this diff