xubinxcode 3年前
コミット
efdf68a358
3個のファイルの変更20行の追加19行の削除
  1. +9
    -9
      src/components/HelloWorld.vue
  2. +4
    -2
      src/components/hotel.vue
  3. +7
    -8
      src/components/hotelother.vue

+ 9
- 9
src/components/HelloWorld.vue ファイルの表示

@@ -86,36 +86,36 @@
<el-form>
<el-form-item>
<el-row type="flex" style="margin-top: 20px">
<el-button type="primary" @click="addHotel">添加酒店</el-button>
<el-button type="primary" v-if="orderMain.receipt_order_status==0 || type=='add'" @click="addHotel">添加酒店</el-button>
</el-row>
</el-form-item>
<template v-for="(item,index) in hotelList">
<el-card class="card" shadow="hover" style="margin-top: 20px" :key="'hotel'+index">
<el-row type="flex" justify="end" v-if="type=='add'">
<el-row type="flex" justify="end" v-if="item.editType=='add'">
<!-- <i class="el-icon-circle-close" @click="delSinHotel(index)"></i>-->
<el-button @click="delSinHotel(index)" type="danger">删除</el-button>

</el-row>
<hotel :ref="'formhotel'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" :dataObj="item"
:hotelListOpt="hotelListOpt"
:hotelListOpt="hotelListOpt" :btnHide="orderMain.receipt_order_status!=0"
:saleCount="saleCount"
:type="type"></hotel>
</el-card>
</template>
<el-form-item>
<el-row type="flex" style="margin-top: 20px">
<el-button type="primary" @click="addHotelOther">添加附加项目</el-button>
<el-button type="primary" v-if="orderMain.receipt_order_status==0 || type=='add'" @click="addHotelOther">添加附加项目</el-button>
</el-row>
</el-form-item>
<template v-for="(item,index) in hotelotherList">
<el-card class="card" shadow="hover" style="margin-top: 20px" :key="'hotelother'+index">
<el-row type="flex" justify="end" v-if="type=='add'">
<el-row type="flex" justify="end" v-if="item.editType=='add'">
<!-- <i class="el-icon-circle-close" @click="delSinHotelOther(index)"></i>-->
<el-button @click="delSinHotel(index)" type="danger">删除</el-button>
<el-button @click="delSinHotelOther(index)" type="danger">删除</el-button>
</el-row>
<hotelother :ref="'formhotelother'+index" :userOpt="userOpt" :supplier_idList="supplier_idList"
:dataObj="item" :cf_itemOpt="cf_itemOpt"
:saleCount="saleCount"
:saleCount="saleCount" :btnHide="orderMain.receipt_order_status!=0"
:type="type"></hotelother>
</el-card>
</template>
@@ -153,10 +153,10 @@
},
rules: {
commissioner_id: [
{required: true, message: '请输入', trigger: 'blur'},
{required: true, message: '请输入', trigger: 'change'},
],
channel_id: [
{required: true, message: '请输入', trigger: 'blur'},
{required: true, message: '请输入', trigger: 'change'},
],
channel_order_no: [
{required: true, message: '请输入', trigger: 'blur'},


+ 4
- 2
src/components/hotel.vue ファイルの表示

@@ -3,7 +3,8 @@
<el-collapse v-model="opened" v-if="type=='view'">
<el-collapse-item name="1">
<template slot="title">
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;background-color: #9fd8fc" type="flex"
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;background-color: #9fd8fc"
type="flex"
justify="space-between" align="middle">
<el-col :span="2">
{{ '酒店' }}
@@ -11,7 +12,7 @@
<!-- <el-col :span="2" :push="3">-->
<!-- <el-button>增补采购单</el-button>-->
<!-- </el-col>-->
<div v-if="dataObj.payment_order_status==0">
<div v-if="dataObj.payment_order_status==0&&!btnHide">
<el-button @click.stop.prevent="edit" v-show="dataObjTemp.editType=='view'" type="primary">修改</el-button>
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="save" type="primary">保存</el-button>
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</el-button>
@@ -387,6 +388,7 @@
type: String,
saleCount: Number,
dataObj: Object,
btnHide: Boolean,
hotelListOpt: Array
},
data() {


+ 7
- 8
src/components/hotelother.vue ファイルの表示

@@ -3,7 +3,8 @@
<el-collapse v-model="opened" v-if="type=='view'">
<el-collapse-item name="1">
<template slot="title">
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;;background-color: #9fd8fc" type="flex"
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;;background-color: #9fd8fc"
type="flex"
justify="space-between" align="middle">
<el-col :span="2">
{{'附加项目'}}
@@ -11,7 +12,7 @@
<!-- <el-col :span="2" :push="3">-->
<!-- <el-button>增补采购单</el-button>-->
<!-- </el-col>-->
<div v-if="dataObj.payment_order_status==0">>
<div v-if="dataObj.payment_order_status==0&&!btnHide">
<el-button @click.stop.prevent="edit" v-show="dataObjTemp.editType=='view'" type="primary">修改</el-button>
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="save" type="primary">保存</el-button>
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</el-button>
@@ -138,7 +139,7 @@
</el-col>
<el-col :span="6">
<el-form-item label-width="120px" label="采购负责人" prop="purchase_user_id">
<el-select style="width: 100%" v-model="dataObjTemp.purchase_user_id" placeholder="请选择">
<el-select style="width: 100%" v-model="dataObjTemp.purchase_user_id" disabled placeholder="请选择">
<el-option
v-for="item in userOpt"
:key="'purchase_user_id'+item.id"
@@ -286,7 +287,7 @@
</el-col>
<el-col :span="6">
<el-form-item label-width="120px" label="采购负责人" prop="purchase_user_id">
<el-select style="width: 100%" v-model="dataObjTemp.purchase_user_id" placeholder="请选择">
<el-select style="width: 100%" v-model="dataObjTemp.purchase_user_id" disabled placeholder="请选择">
<el-option
v-for="item in userOpt"
:key="'purchase_user_id'+item.id"
@@ -330,6 +331,7 @@
userOpt: Array,
type: String,
saleCount: Number,
btnHide: Boolean,
dataObj: Object
},
data() {
@@ -345,9 +347,6 @@
customer_name: [
{required: true, message: '请输入', trigger: 'blur'},
],
purchase_user_id: [
{required: true, message: '请输入', trigger: 'change'},
],
confirm_status: [
{required: true, message: '请输入', trigger: 'blur'},
],
@@ -397,7 +396,7 @@
let data = this.cf_itemOpt.find((item) => {
return item.id == id
})
console.log('changeItem', data,this.dataObj.purchase_user_id)
console.log('changeItem', data, this.dataObj.purchase_user_id)
data.item_name = data.name
this.dataObjTemp = Object.assign(this.dataObjTemp, data);
},


読み込み中…
キャンセル
保存