Commit df873366 authored by zhengke's avatar zhengke

修改

parent 389abd58
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<tr> <tr>
<td colspan="2"> <td colspan="2">
<p style="padding-top: 5px;"> <p style="padding-top: 5px;">
<a v-if="subItem.ContractUrl" target="_blank" :href="subItem.ContractUrl">手配书</a> <a v-if="subItem.ContractUrl" target="_blank" style="color:green" :href="subItem.ContractUrl">已上传手配书</a>
</p> </p>
<el-upload :http-request="uploadFileBtnS" :multiple="false" :show-file-list="false" action=''> <el-upload :http-request="uploadFileBtnS" :multiple="false" :show-file-list="false" action=''>
<el-button size="small" type="danger" @click='getItem(index, subIndex)'> <el-button size="small" type="danger" @click='getItem(index, subIndex)'>
...@@ -870,8 +870,13 @@ ...@@ -870,8 +870,13 @@
}); });
}) })
} }
var flag=true;
this.list.forEach(item => { this.list.forEach(item => {
item.HotelOrderList.forEach(subItem => { item.HotelOrderList.forEach(subItem => {
if(subItem.CurrencyId==3&&subItem.ContractUrl==''){
this.Error('请上传手配书');
flag=false;
}
subItem.OrderDetailsList.forEach((y, sIndex) => { subItem.OrderDetailsList.forEach((y, sIndex) => {
if (y.HouseTypeCount) { if (y.HouseTypeCount) {
y.HouseTypeCount = parseFloat(y.HouseTypeCount); y.HouseTypeCount = parseFloat(y.HouseTypeCount);
...@@ -900,23 +905,30 @@ ...@@ -900,23 +905,30 @@
} }
}); });
}) })
this.loading = true; if(flag){
this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => { this.loading = true;
this.loading = false; this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => {
if (res.data.resultCode == 1) { this.loading = false;
this.getList(); if (res.data.resultCode == 1) {
this.Success(res.data.message); this.getList();
} else { this.Success(res.data.message);
this.Error(res.data.message); } else {
} this.Error(res.data.message);
}, err => {}) }
}, err => {})
}
}, },
//单条保存 //单条保存
SaveSingle(item) { SaveSingle(item) {
item.HotelOrderState = 1; item.HotelOrderState = 1;
var flag=true;
this.list.forEach(item => { this.list.forEach(item => {
item.HotelOrderList.forEach(subItem => { item.HotelOrderList.forEach(subItem => {
subItem.OrderDetailsList.forEach(y => { subItem.OrderDetailsList.forEach(y => {
if(subItem.CurrencyId==3&&subItem.ContractUrl==''){
this.Error('请上传手配书');
flag=false;
}
if (y.HouseTypeCount) { if (y.HouseTypeCount) {
y.HouseTypeCount = parseFloat(y.HouseTypeCount); y.HouseTypeCount = parseFloat(y.HouseTypeCount);
} else { } else {
...@@ -945,18 +957,20 @@ ...@@ -945,18 +957,20 @@
} }
}); });
}) })
let mag = { if(flag){
TotalList: this.list, let mag = {
SingleItem: item TotalList: this.list,
}; SingleItem: item
this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => { };
if (res.data.resultCode == 1) { this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => {
this.Success(res.data.message); if (res.data.resultCode == 1) {
this.getList(); this.Success(res.data.message);
} else { this.getList();
this.Error(res.data.message); } else {
} this.Error(res.data.message);
}, err => {}) }
}, err => {})
}
}, },
// 获取供应商 // 获取供应商
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment