Selaa lähdekoodia

房态图右边 协议单位联动

DESKTOP-B78GIPM\admin 2 vuotta sitten
vanhempi
commit
7b55ab50c9

+ 22 - 3
src/views/room/fangtailive.vue

@@ -640,17 +640,18 @@
       </div>
       <div style="width: 1%"></div>
       <div style="width: 19%; overflow: hidden auto">
-        <div>
+        <div style="display:flex;justify-content: space-between;align-items:center;">
           <a-input-search
-            style="width: 100%; margin-bottom: 8px"
+            style="width: 80%;"
             placeholder="房间号/姓名/手机号/身份证号"
             enter-button="搜索"
             v-model="keyWord"
             type="danger"
             @search="checkChange"
           />
+          <a-button @click="()=>{this.$message.error('接口程序未打开,请打开接口程序')}">读卡</a-button>
         </div>
-        <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173)">
+        <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173);margin-top: 6px;">
           按楼层
         </p>
         <a-tree-select
@@ -715,6 +716,24 @@
           @change="checkChange"
         >
         </a-checkbox-group>
+        <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173);margin-top: 10px;">
+          房间信息
+        </p>
+        <a-checkbox-group
+          v-model="checkedCesRoomLayoutList"
+          :options="['欠费', '无押金', '续住', '换房', '租借', '不足']"
+          @change="checkChange"
+        >
+        </a-checkbox-group>
+        <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173);margin-top: 10px;">
+          对客服务
+        </p>
+        <a-checkbox-group
+          v-model="checkedCesRoomLayoutList"
+          :options="['生日', '叫醒', '免打扰', '免查询']"
+          @change="checkChange"
+        >
+        </a-checkbox-group>
       </div>
     </div>
     <template v-else-if="activeKey === '2'">

+ 121 - 0
src/views/room/modules/schedule/ScheduleRoomForm.vue

@@ -91,6 +91,59 @@
                   </a-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :span="24" v-if="model.orderInfo.customerType === 3">
+                  <!-- <a-form-model-item
+                    label="协议合同"
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    prop="orderInfo.contractTeamProtocolId"
+                  >
+                    <span style="color:red;cursor: pointer;" @click="showAgreementUnitTable(model.orderInfo.contractTeamId)">{{ model.orderInfo.contractTeamProtocolName }}</span>
+                  </a-form-model-item> -->
+                  <a-card :bordered="true" style="width: 130%;padding: 0 !important;">
+                    <a-row>
+                      <a-col :span="12">
+                        <a-form-model-item
+                    label="协议单位"
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    prop="orderInfo.contractTeamId"
+                  >
+                        <a-auto-complete v-model="agreementUnitData.customerName" @select="(e)=>handleSelectAgreementUnit(e)" @search="handleSearchAgreementUnit">
+                      <template slot="dataSource">
+                        <a-select-option
+                        :key="item.id"
+                        :value="item.id"
+                        :label="item.customerName"
+                        v-for="(item, index) in busMarketAgreementUnitList"
+                      >
+                      {{ item.customerName }}
+                      </a-select-option>
+                      </template>
+                    </a-auto-complete>
+                    </a-form-model-item>
+                      </a-col>
+                      <a-col :span="12">
+                        <a-form-model-item
+                    label="协议合同"
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    prop="orderInfo.contractTeamProtocolId"
+                  >
+                    <span style="color:red;cursor: pointer;" @click="showAgreementUnitTable(model.orderInfo.contractTeamId)">{{ model.orderInfo.contractTeamProtocolName }}</span>
+                  </a-form-model-item>
+                        </a-col>
+                    </a-row>
+                      <p>
+                        <a-row>
+                          <a-col :span="12">名称:{{ agreementUnitData.customerName }}</a-col>
+                          <a-col :span="12">签约开始日期:{{ busMarketAgreementCustomer.signTime }}</a-col>
+                          <a-col :span="12">签约结束日期:{{ busMarketAgreementCustomer.effective }}</a-col>
+                          <a-col :span="12">可用额度:{{ agreementUnitData.balance||0 }}</a-col>
+                        </a-row>
+                      </p>
+                    </a-card>
+                </a-col>
               <a-col :span="24" v-if="model.orderInfo.customerType == 2">
                 <a-card :bordered="true" style="width: 100%;padding: 0 !important;">
                   <p>
@@ -337,6 +390,10 @@ export default {
   },
   data() {
     return {
+      agreementUnitData: { customerName: "" },
+      oldBusMarketAgreementUnitList: [],
+      busMarketAgreementUnitList: [],
+      busMarketAgreementCustomer: {},
       canUserRoomsShow: true,
       visible: true,
       columns,
@@ -510,8 +567,72 @@ export default {
         this.loadRooms();
       }
     );
+    getAction("/business/busMarketAgreementUnit/list", {
+      pageSize: 99999,
+      pageNo: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.busMarketAgreementUnitList = res.result.records;
+        this.oldBusMarketAgreementUnitList = JSON.parse(
+          JSON.stringify(res.result.records)
+        );
+      }
+    });
   },
   methods: {
+    handleSelectAgreementUnit(value) {
+      let result = this.busMarketAgreementUnitList.find((t) => t.id == value);
+      this.model.orderInfo.contractTeamId = value;
+      this.agreementUnitData = JSON.parse(JSON.stringify(result));
+      this.contractTeamIdChange(value);
+    },
+    handleSearchAgreementUnit(value) {
+      let result;
+      if (!value) {
+        result = this.oldBusMarketAgreementUnitList;
+      } else {
+        result = this.oldBusMarketAgreementUnitList.filter((t) =>
+          t.customerName.includes(value)
+        );
+      }
+      this.busMarketAgreementUnitList = JSON.parse(JSON.stringify(result));
+    },
+    contractTeamIdChange(e) {
+      this.model.orderInfo.contractTeamId = e;
+      getAction("/business/busMarketAgreementCustomer/list", {
+        agreementId: this.model.orderInfo.contractTeamId,
+      }).then((res) => {
+        if (res.success) {
+          var list = res.result.records;
+          if (list && list.length > 0) {
+            this.model.orderInfo.contractTeamProtocolName = list[0].name;
+            this.model.orderInfo.contractTeamProtocolId = list[0].id;
+            this.busMarketAgreementCustomer = list[0];
+            var info = list[0];
+            if (info.fixedDiscount == 1 && info.discount > 0) {
+              if (this.model.roomPrices && this.model.roomPrices.length > 0) {
+                var i = 0;
+                this.model.roomPrices.forEach((t) => {
+                  t.prefPrice = (t.marketPrice * info.discount) / 100;
+                  t.roomFee = t.prefPrice * t.day;
+                  var editPrice = [];
+                  if (t.editPrice && t.editPrice.length > 0) {
+                    t.editPrice.forEach((p) => {
+                      editPrice.push(t.prefPrice);
+                    });
+                    t.editPrice = editPrice;
+                  }
+                  this.editPriceIndex = i;
+                  this.editPriceOk();
+                  i++;
+                  console.log("t", t);
+                });
+              }
+            }
+          }
+        }
+      });
+    },
     presetNumChange(e, record) {
       console.log(e);
       record.layout.canUseCount = record.layout.oldTags - e;