ソースを参照

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

gqx 2 年 前
コミット
05edc39673

+ 73 - 18
src/views/markets/modules/agreementUnit/account/goodsConsumeForm.vue

@@ -7,7 +7,7 @@
                         <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
                             <a-row>
                                 <a-col :span="24">
-                                    <a-form-model-item label="消费类目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
+                                    <a-form-model-item label="消费类目" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="categoryId">
                                         <a-select
                                                 v-model="model.categoryId"
                                                 style="width: 90%"
@@ -22,9 +22,9 @@
                                     </a-form-model-item>
                                 </a-col>
                                 <a-col :span="24">
-                                    <a-form-model-item label="消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payPrice">
+                                    <a-form-model-item label="消费金额" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="payPrice">
                                         <a-input-number
-                                                disabled
+                                                :disabled="goodsCount > 0"
                                                 v-model="model.payPrice"
                                                 placeholder="请输入金额"
                                                 style="width: 90%"
@@ -32,7 +32,7 @@
                                     </a-form-model-item>
                                 </a-col>
                                 <a-col :span="24">
-                                    <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+                                    <a-form-model-item label="备注" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="remarks">
                                         <a-textarea
                                                 v-model="model.remarks"
                                                 rows="4"
@@ -47,7 +47,7 @@
                     </j-form-container>
                 </a-spin>
             </div>
-            <div class="right">
+            <div class="right"  v-if="goodsCount > 0">
                 <a-spin :spinning="confirmLoading">
                     <j-form-container>
                         <a-form-model ref="formCommodity" :model="modelCommodity" slot="detail">
@@ -118,12 +118,12 @@
                         </template>
                         <template slot="numberSlot" slot-scope="text,record">
                             <a-input-number :class="record.id"
-                                    v-model="record.number"
-                                    placeholder="请输入数量"
-                                    style="width: 90%"
-                                    :min="0"
-                                    :disabled="record.sellingPrice == 0"
-                                    @change="e=>changeNumber(e,record)"
+                                            v-model="record.number"
+                                            placeholder="请输入数量"
+                                            style="width: 90%"
+                                            :min="0"
+                                            :disabled="record.sellingPrice == 0"
+                                            @change="e=>changeNumber(e,record)"
                             />
                         </template>
                         <template slot="inventorySlot" slot-scope="text,record">
@@ -177,6 +177,14 @@
                     amount:0,
                     remarks:'',//协议单位名称+备注
                 },
+                labelCol1: {
+                    xs: { span: 24 },
+                    sm: { span: 3 },
+                },
+                wrapperCol1: {
+                    xs: { span: 24 },
+                    sm: { span: 20 },
+                },
                 labelCol: {
                     xs: { span: 24 },
                     sm: { span: 6 },
@@ -224,7 +232,8 @@
                         scopedSlots: { customRender: 'inventorySlot' }
                     },
                 ],
-                projectName:''
+                projectName:'',
+                goodsCount:0,
                 // loading:true,
                 // dataSource:[]
             }
@@ -259,19 +268,65 @@
                     if (res.success) {
                         _this.childStockTypeList = res.result;
                     }
+                }).finally(() => {
+                    _this.handleSearch(1)
                 });
             },
-            handleSearch(){
+            handleSearch(type) {
                 var typeId = "";
                 var search = "";
-                if (this.modelCommodity.categoryTwoId){
-                    typeId = this.modelCommodity.categoryTwoId;
-                }
-                if (this.model.goodsName){
+                var _this = this;
+
+                if (this.model.goodsName) {
                     search = this.model.goodsName;
                 }
-                this.url.list = "/rooms/cesGoods/queryList?typeId="+typeId+"&search="+search;
+
+                if (type == 1) {
+                    if (this.model.categoryId) {
+                        typeId = this.model.categoryId;
+                    }
+
+                    httpAction(
+                        "/rooms/cesGoods/queryList?typeId=" + typeId + "&search=" + search,
+                        { },
+                        "get"
+                    ).then((res) => {
+                        console.log(res)
+                        if (res.success) {
+                            _this.goodsCount = res.result.length;
+                            console.log(_this.goodsCount)
+                            if (_this.goodsCount > 0){
+                                _this.labelCol1= {
+                                    xs: { span: 24 },
+                                    sm: { span: 8 },
+                                }
+                                _this.wrapperCol1= {
+                                    xs: { span: 24 },
+                                    sm: { span: 14 },
+                                }
+                            }else{
+                                _this.labelCol1= {
+                                    xs: { span: 24 },
+                                    sm: { span: 3 },
+                                }
+                                _this.wrapperCol1= {
+                                    xs: { span: 24 },
+                                    sm: { span: 20 },
+                                }
+                            }
+                        }
+                    }).finally(() => {
+                    });
+                } else {
+                    if (this.modelCommodity.categoryTwoId) {
+                        typeId = this.modelCommodity.categoryTwoId;
+                    }
+                }
+
+                this.url.list = "/rooms/cesGoods/queryList?typeId=" + typeId + "&search=" + search;
+
                 this.loadData(1);
+
             },
             handleChangeType(){
                 if (this.type == 1){

+ 40 - 8
src/views/markets/modules/agreementUnit/agreementAccount.vue

@@ -66,32 +66,32 @@
             </a-row>
         </div>
         <div class="oper">
-            <div class="oper-wrapper" v-if="settleType != 2">
-                <div class="oper-item">
+            <div class="oper-wrapper">
+                <div class="oper-item" v-if="settleType != 2">
                     <a-button @click="handleClick(1)">
                         <a-icon type="file" />
                         商品消费
                     </a-button>
                 </div>
-                <div class="oper-item">
+                <div class="oper-item" v-if="settleType != 2">
                     <a-button @click="handleClick(2)">
                         <a-icon type="file" />
                         入账
                     </a-button>
                 </div>
-                <div class="oper-item">
+                <div class="oper-item" v-if="settleType == 1">
                     <a-button @click="handleClick(3)">
                         <a-icon type="file" />
                         转账
                     </a-button>
                 </div>
-                <div class="oper-item">
+                <div class="oper-item" v-if="settleType == 1">
                     <a-button @click="handleClick(4)">
                         <a-icon type="file" />
                         结算
                     </a-button>
                 </div>
-                <div class="oper-item">
+                <div class="oper-item" v-if="settleType == 1">
                     <a-button @click="handleClick(5)">
                         <a-icon type="file" />
                         冲账
@@ -236,7 +236,6 @@ export default {
             settleType: 1,
             dateFormat: 'YYYY-MM-DD',
             rangeValue: [moment(first_date), moment(last_date)],
-            defaultRange: [first_date.format('yyyy-MM-dd'), last_date.format('yyyy-MM-dd')],
             agreementUnitInfo: {},
             accountModel: {
                 consume: '0',
@@ -322,6 +321,10 @@ export default {
                 revoke: "/business/busAgreementOrderFee/revoke",
                 queryAgreementAccount: "/business/busAgreementOrderFee/queryAgreementAccount",//获取协议单位消费、收款信息
             },
+            queryParam: {
+                startTime: first_date.format('yyyy-MM-dd'),
+                endTime: last_date.format('yyyy-MM-dd'),
+            },
         }
     },
     activated() {
@@ -340,7 +343,30 @@ export default {
     },
     methods: {
         moment,
-        onRangeChange(e) {
+        onRangeChange(date, dateString) {
+            console.log(date)
+            console.log(dateString)
+            if (dateString[0]=="" || dateString[1]=="") {
+                return
+            }
+            this.queryParam = {
+                startTime: dateString[0],
+                endTime: dateString[1],
+            }
+            if (this.settleType == 1 || this.settleType == 2){
+                this.url.list = this.url.baseList +"?status="+this.settleType+"&agreementUnitId="+this.agreementUnitInfo.id;
+            }else{
+                this.url.list = this.url.baseList+"?status=1&agreementUnitId="+this.agreementUnitInfo.id;
+            }
+            // if (!this.queryParam.startTime=="") {
+            //     this.url.list = this.url.list + "&startDate=" + this.queryParam.startTime
+            // }
+            // if (!this.queryParam.endTime=="") {
+            //     this.url.list = this.url.list + "&endDate=" + this.queryParam.endTime
+            // }
+            this.loadData(1);
+            this.selectedRowKeys = [];
+            this.selectionRows = [];
         },
         onTypeChange(e) {
             if (this.settleType == 1 || this.settleType == 2){
@@ -348,6 +374,12 @@ export default {
             }else{
                 this.url.list = this.url.baseList+"?status=1&agreementUnitId="+this.agreementUnitInfo.id;
             }
+            // if (!this.queryParam.startTime=="") {
+            //     this.url.list = this.url.list + "&startDate=" + this.queryParam.startTime
+            // }
+            // if (!this.queryParam.endTime=="") {
+            //     this.url.list = this.url.list + "&endDate=" + this.queryParam.endTime
+            // }
             this.loadData(1);
             this.selectedRowKeys = [];
             this.selectionRows = [];

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

@@ -644,17 +644,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
@@ -719,6 +720,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'">

+ 142 - 56
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -924,8 +924,12 @@
 
     <!-- 修改每日单价弹窗 -->
     <a-modal :visible="editPriceModal" title="调价" @cancel="editPriceModal = false" :width="800" @ok="editPriceOk">
-      <table>
-        <tr>
+      <template v-if="editPriceData.length>0">
+      <table v-for="(item, index) in editPriceData" :key="index">
+        <tr v-if="index==0">
+          <td style="text-align:center;background:#722ed1;color:#fff;">
+            <!-- 房号 -->
+          </td>
           <td style="text-align:center;background:#722ed1;color:#fff;">
             批量调价
           </td>
@@ -934,24 +938,37 @@
           </td>
         </tr>
         <th>
-          <td style="text-align:center;color:#722ed1;">
-            <div>每日房价</div>
-            <div v-if="model.roomPrices.length>0 && model.roomPrices[editPriceIndex]">
-              <a-input-number v-model="model.roomPrices[editPriceIndex].prefPrice" @change="batchPrice"></a-input-number>
-            </div>
-          </td>
+          <tr>
+            <td style="text-align:center;color:#722ed1;height:60px;width:100px;">
+              <div>房号</div>
+              <div style="line-height:30px">
+                {{item.roomNo}}
+              </div>
+            </td>
+          </tr>
+        </th>
+        <th>
+          <tr>
+            <td style="text-align:center;color:#722ed1;height:60px">
+              <div>每日房价</div>
+              <div>
+                <a-input-number :placeholder="item.marketPrice.toString()" @change="batchPrice($event, index)"></a-input-number>
+              </div>
+            </td>
+          </tr>
         </th>
-        <th style="display:flex;flex-wrap:wrap;">
-          <td v-for="(item, index) in editPriceData" :key="index">
+        <th style="display:flex;flex-wrap:wrap;height:60px;overflow: auto;">
+          <td v-for="(sItem, sIndex) in item.edit" :key="sIndex">
             <div style="text-align:center;">
-              {{item.day}}
+              {{sItem.day}}
             </div>
             <div>
-              <a-input-number v-model="item.price"></a-input-number>
+              <a-input-number v-model="sItem.price" />
             </div>
           </td>
         </th>
       </table>
+      </template>
     </a-modal>
 <member-card-modal ref="modalMemberCardInfo"></member-card-modal>
 <agreement-unit-modal ref="modalAgreementUnitInfo"></agreement-unit-modal>
@@ -1000,12 +1017,12 @@ const columns = [
   {
     title: "天数",
     dataIndex: "day",
-    width: 40,
+    width: 50,
   },
   {
     title: "房费",
     dataIndex: "roomFee",
-    width: 60,
+    width: 80,
   },
   {
     title: "押金",
@@ -1173,30 +1190,58 @@ export default {
   },
   computed: {
     editPriceData() {
-      let arr = [];
-      arr.length = this.model.orderInfo.dayCount;
-      for (let i = 0; i < arr.length; i++) {
-        arr[i] = {
-          day: this.addDate(this.model.orderInfo.arrivalTime2, i),
-          price:
-            (this.model.roomPrices[this.editPriceIndex] &&
-              this.model.roomPrices[this.editPriceIndex].prefPrice) ||
-            0,
-        };
-        let idx =
-          this.model.roomPrices[this.editPriceIndex] &&
-          this.model.roomPrices[this.editPriceIndex].editPriceTime &&
-          this.model.roomPrices[this.editPriceIndex].editPriceTime.findIndex(
-            (item) => item == arr[i].day
-          );
-        if (idx > -1) {
-          console.log(idx);
-          arr[i].price =
-            this.model.roomPrices[this.editPriceIndex].editPrice[idx];
+      // let arr = [];
+      // arr.length = this.model.orderInfo.dayCount;
+      // for (let i = 0; i < arr.length; i++) {
+      //   arr[i] = {
+      //     day: this.addDate(this.model.orderInfo.arrivalTime2, i),
+      //     price:
+      //       (this.model.roomPrices[this.editPriceIndex] &&
+      //         this.model.roomPrices[this.editPriceIndex].prefPrice) ||
+      //       0,
+      //   };
+      //   let idx =
+      //     this.model.roomPrices[this.editPriceIndex] &&
+      //     this.model.roomPrices[this.editPriceIndex].editPriceTime &&
+      //     this.model.roomPrices[this.editPriceIndex].editPriceTime.findIndex(
+      //       (item) => item == arr[i].day
+      //     );
+      //   if (idx > -1) {
+      //     console.log(idx);
+      //     arr[i].price = this.model.roomPrices[this.editPriceIndex].editPrice[idx];
+      //   }
+      //   arr[i] = {
+      //     day: this.addDate(this.model.orderInfo.arrivalTime2, i),
+      //     price:0
+      //   };
+      // }
+      let copy = JSON.parse(JSON.stringify(this.model.roomPrices));
+      for (let i = 0; i < copy.length; i++) {
+        let money = copy[i].prefPrice;
+        let brr = []
+        brr.length = this.model.orderInfo.dayCount;
+        for (let j = 0; j < brr.length; j++) {
+          brr[j] = {
+            day: this.addDate(this.model.orderInfo.arrivalTime2, j),
+            price:money
+          };
+          if (this.model.roomPrices[i].editPriceTime && this.model.roomPrices[i].editPriceTime.length > 0) {
+            let idx = this.model.roomPrices[i].editPriceTime.findIndex((item) => item == brr[j].day);
+            if (idx > -1) {
+              brr[j].price = this.model.roomPrices[i].editPrice[idx];
+            }            
+          }
         }
+        // brr.fill({day: this.addDate(this.model.orderInfo.arrivalTime2, i),price:money})
+        // brr[i] = {
+        //   day: this.addDate(this.model.orderInfo.arrivalTime2, i),
+        //   price:money
+        // };
+        copy[i].edit = brr
+        copy[i].day = this.model.orderInfo.dayCount
       }
-      this.PriceData = arr;
-      return arr;
+      this.PriceData = copy;
+      return copy;
     },
 
     formDisabled() {
@@ -1472,6 +1517,10 @@ export default {
     //  this.getcesRoomLayout();
   },
   methods: {
+    priceInput(e,idx,sidx){
+      console.log(e, idx, sidx);
+      this.editPriceData[idx].edit[sidx].price = e;
+    },
     handleSearchAgreementUnit(value) {
       let result;
       if (!value) {
@@ -1713,9 +1762,12 @@ export default {
       this.$refs.modalAgreementUnitTable.disableSubmit = true;
     },
     //批量调价
-    batchPrice(e) {
+    batchPrice(e,index) {
       console.log(e);
-      this.editPriceData.forEach((ele) => {
+      // this.editPriceData.forEach((ele) => {
+      //   ele.price = e;
+      // });
+      this.editPriceData[index].edit.forEach((ele) => {
         ele.price = e;
       });
     },
@@ -1743,7 +1795,7 @@ export default {
       this.editPriceIndex = idx;
       console.log(
         "11111111111111111111111",
-        this.model.roomPrices[this.editPriceIndex]
+        this.model.roomPrices
       );
       this.editPriceModal = true;
     },
@@ -1753,24 +1805,57 @@ export default {
      */
     editPriceOk() {
       console.log(this.editPriceData);
-      this.model.roomPrices[this.editPriceIndex].editPriceTime = [];
-      this.model.roomPrices[this.editPriceIndex].editPrice = [];
-      this.editPriceData.forEach((ele) => {
-        this.model.roomPrices[this.editPriceIndex].editPriceTime.push(ele.day);
-        this.model.roomPrices[this.editPriceIndex].editPrice.push(ele.price);
-      });
+      // this.model.roomPrices[this.editPriceIndex].editPriceTime = [];
+      // this.model.roomPrices[this.editPriceIndex].editPrice = [];
+      // this.editPriceData.forEach((ele) => {
+      //   this.model.roomPrices[this.editPriceIndex].editPriceTime.push(ele.day);
+      //   this.model.roomPrices[this.editPriceIndex].editPrice.push(ele.price);
+      // });
+      // console.log(this.model.roomPrices);
+      // this.model.roomPrices[this.editPriceIndex].prefPrice =
+      //   this.editPriceData[0].price;
+      // this.onCellChange(
+      //   "prefPrice",
+      //   this.editPriceIndex,
+      //   this.editPriceData[0].price
+      // );
+      // this.editPriceData.forEach((ele) => {
+      //   ele.price = 0;
+      // });
+      this.model.roomPrices = JSON.parse(JSON.stringify(this.editPriceData));
+      this.model.roomPrices.forEach((ele,index)=>{
+        ele.editPriceTime = [];
+        ele.editPrice = [];
+        ele.edit.forEach((t,tdx)=>{
+          // console.log(t.price);
+          ele.editPriceTime.push(t.day),
+          ele.editPrice.push(t.price)
+          this.onCellChange(
+            "prefPrice",
+            index,
+            ele.edit[tdx].price
+          );
+        })
+        ele.prefPrice = ele.edit[0].price;
+        
+      })
+      // this.editPriceData.forEach((ele, index) => {
+      //   if (this.model.roomPrices[index].roomId==ele.roomId) {
+      //     this.model.roomPrices[index].editPriceTime = [];
+      //     this.model.roomPrices[index].editPrice = [];
+      //     ele.edit.forEach(t=>{
+      //       this.model.roomPrices[index].editPriceTime.push(t.day);
+      //       this.model.roomPrices[index].editPrice.push(t.price);
+      //       this.model.roomPrices[index].prefPrice = ele.edit[0].price;
+      //     })
+      //       this.onCellChange(
+      //         "prefPrice",
+      //         index,
+      //         ele.edit[0].price
+      //       );
+      //   }
+      // });
       console.log(this.model.roomPrices);
-      this.model.roomPrices[this.editPriceIndex].prefPrice =
-        this.editPriceData[0].price;
-      this.onCellChange(
-        "prefPrice",
-        this.editPriceIndex,
-        this.editPriceData[0].price
-      );
-      this.editPriceData.forEach((ele) => {
-        ele.prcie = 0;
-      });
-      console.log(this.editPriceData);
       this.editPriceModal = false;
 
       var sum = 0;
@@ -1957,6 +2042,7 @@ export default {
         this.editPriceOk();
         i++;
       });
+      console.log(this.model.roomPrices);
     },
     disabledDate(current) {
       return current && current < moment().add(-1, "days").endOf("day");

+ 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;