@@ -86,36 +86,36 @@ | |||||
<el-form> | <el-form> | ||||
<el-form-item> | <el-form-item> | ||||
<el-row type="flex" style="margin-top: 20px"> | <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-row> | ||||
</el-form-item> | </el-form-item> | ||||
<template v-for="(item,index) in hotelList"> | <template v-for="(item,index) in hotelList"> | ||||
<el-card class="card" shadow="hover" style="margin-top: 20px" :key="'hotel'+index"> | <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>--> | <!-- <i class="el-icon-circle-close" @click="delSinHotel(index)"></i>--> | ||||
<el-button @click="delSinHotel(index)" type="danger">删除</el-button> | <el-button @click="delSinHotel(index)" type="danger">删除</el-button> | ||||
</el-row> | </el-row> | ||||
<hotel :ref="'formhotel'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" :dataObj="item" | <hotel :ref="'formhotel'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" :dataObj="item" | ||||
:hotelListOpt="hotelListOpt" | |||||
:hotelListOpt="hotelListOpt" :btnHide="orderMain.receipt_order_status!=0" | |||||
:saleCount="saleCount" | :saleCount="saleCount" | ||||
:type="type"></hotel> | :type="type"></hotel> | ||||
</el-card> | </el-card> | ||||
</template> | </template> | ||||
<el-form-item> | <el-form-item> | ||||
<el-row type="flex" style="margin-top: 20px"> | <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-row> | ||||
</el-form-item> | </el-form-item> | ||||
<template v-for="(item,index) in hotelotherList"> | <template v-for="(item,index) in hotelotherList"> | ||||
<el-card class="card" shadow="hover" style="margin-top: 20px" :key="'hotelother'+index"> | <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>--> | <!-- <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> | </el-row> | ||||
<hotelother :ref="'formhotelother'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" | <hotelother :ref="'formhotelother'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" | ||||
:dataObj="item" :cf_itemOpt="cf_itemOpt" | :dataObj="item" :cf_itemOpt="cf_itemOpt" | ||||
:saleCount="saleCount" | |||||
:saleCount="saleCount" :btnHide="orderMain.receipt_order_status!=0" | |||||
:type="type"></hotelother> | :type="type"></hotelother> | ||||
</el-card> | </el-card> | ||||
</template> | </template> | ||||
@@ -153,10 +153,10 @@ | |||||
}, | }, | ||||
rules: { | rules: { | ||||
commissioner_id: [ | commissioner_id: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | |||||
{required: true, message: '请输入', trigger: 'change'}, | |||||
], | ], | ||||
channel_id: [ | channel_id: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | |||||
{required: true, message: '请输入', trigger: 'change'}, | |||||
], | ], | ||||
channel_order_no: [ | channel_order_no: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
@@ -3,7 +3,8 @@ | |||||
<el-collapse v-model="opened" v-if="type=='view'"> | <el-collapse v-model="opened" v-if="type=='view'"> | ||||
<el-collapse-item name="1"> | <el-collapse-item name="1"> | ||||
<template slot="title"> | <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"> | justify="space-between" align="middle"> | ||||
<el-col :span="2"> | <el-col :span="2"> | ||||
{{ '酒店' }} | {{ '酒店' }} | ||||
@@ -11,7 +12,7 @@ | |||||
<!-- <el-col :span="2" :push="3">--> | <!-- <el-col :span="2" :push="3">--> | ||||
<!-- <el-button>增补采购单</el-button>--> | <!-- <el-button>增补采购单</el-button>--> | ||||
<!-- </el-col>--> | <!-- </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 @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="save" type="primary">保存</el-button> | ||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</el-button> | <el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</el-button> | ||||
@@ -387,6 +388,7 @@ | |||||
type: String, | type: String, | ||||
saleCount: Number, | saleCount: Number, | ||||
dataObj: Object, | dataObj: Object, | ||||
btnHide: Boolean, | |||||
hotelListOpt: Array | hotelListOpt: Array | ||||
}, | }, | ||||
data() { | data() { | ||||
@@ -3,7 +3,8 @@ | |||||
<el-collapse v-model="opened" v-if="type=='view'"> | <el-collapse v-model="opened" v-if="type=='view'"> | ||||
<el-collapse-item name="1"> | <el-collapse-item name="1"> | ||||
<template slot="title"> | <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"> | justify="space-between" align="middle"> | ||||
<el-col :span="2"> | <el-col :span="2"> | ||||
{{'附加项目'}} | {{'附加项目'}} | ||||
@@ -11,7 +12,7 @@ | |||||
<!-- <el-col :span="2" :push="3">--> | <!-- <el-col :span="2" :push="3">--> | ||||
<!-- <el-button>增补采购单</el-button>--> | <!-- <el-button>增补采购单</el-button>--> | ||||
<!-- </el-col>--> | <!-- </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 @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="save" type="primary">保存</el-button> | ||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</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> | ||||
<el-col :span="6"> | <el-col :span="6"> | ||||
<el-form-item label-width="120px" label="采购负责人" prop="purchase_user_id"> | <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 | <el-option | ||||
v-for="item in userOpt" | v-for="item in userOpt" | ||||
:key="'purchase_user_id'+item.id" | :key="'purchase_user_id'+item.id" | ||||
@@ -286,7 +287,7 @@ | |||||
</el-col> | </el-col> | ||||
<el-col :span="6"> | <el-col :span="6"> | ||||
<el-form-item label-width="120px" label="采购负责人" prop="purchase_user_id"> | <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 | <el-option | ||||
v-for="item in userOpt" | v-for="item in userOpt" | ||||
:key="'purchase_user_id'+item.id" | :key="'purchase_user_id'+item.id" | ||||
@@ -330,6 +331,7 @@ | |||||
userOpt: Array, | userOpt: Array, | ||||
type: String, | type: String, | ||||
saleCount: Number, | saleCount: Number, | ||||
btnHide: Boolean, | |||||
dataObj: Object | dataObj: Object | ||||
}, | }, | ||||
data() { | data() { | ||||
@@ -345,9 +347,6 @@ | |||||
customer_name: [ | customer_name: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
], | ], | ||||
purchase_user_id: [ | |||||
{required: true, message: '请输入', trigger: 'change'}, | |||||
], | |||||
confirm_status: [ | confirm_status: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
], | ], | ||||
@@ -397,7 +396,7 @@ | |||||
let data = this.cf_itemOpt.find((item) => { | let data = this.cf_itemOpt.find((item) => { | ||||
return item.id == id | 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 | data.item_name = data.name | ||||
this.dataObjTemp = Object.assign(this.dataObjTemp, data); | this.dataObjTemp = Object.assign(this.dataObjTemp, data); | ||||
}, | }, | ||||