|
@@ -91,6 +91,59 @@
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</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-col :span="24" v-if="model.orderInfo.customerType == 2">
|
|
|
<a-card :bordered="true" style="width: 100%;padding: 0 !important;">
|
|
<a-card :bordered="true" style="width: 100%;padding: 0 !important;">
|
|
|
<p>
|
|
<p>
|
|
@@ -337,6 +390,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ agreementUnitData: { customerName: "" },
|
|
|
|
|
+ oldBusMarketAgreementUnitList: [],
|
|
|
|
|
+ busMarketAgreementUnitList: [],
|
|
|
|
|
+ busMarketAgreementCustomer: {},
|
|
|
canUserRoomsShow: true,
|
|
canUserRoomsShow: true,
|
|
|
visible: true,
|
|
visible: true,
|
|
|
columns,
|
|
columns,
|
|
@@ -510,8 +567,72 @@ export default {
|
|
|
this.loadRooms();
|
|
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: {
|
|
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) {
|
|
presetNumChange(e, record) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
record.layout.canUseCount = record.layout.oldTags - e;
|
|
record.layout.canUseCount = record.layout.oldTags - e;
|