Commit 3d07d9bb authored by youjie's avatar youjie

赔偿

parent 025f5e44
...@@ -230,6 +230,13 @@ ...@@ -230,6 +230,13 @@
@click="openDetails(item)">{{item.FrID}}</span> @click="openDetails(item)">{{item.FrID}}</span>
</div> </div>
<div class="documents-right"> <div class="documents-right">
<el-tooltip
class="item-but" effect="dark" content="赔偿" placement="top"
style="margin-right: 5px;">
<i class="iconfont iconwenbenbianji cp"
:class="item.OrderStatus!=2&&item.OrderStatus!=5&&item.OrderStatus!=6?'blue':''"
@click="item.OrderStatus!=2&&item.OrderStatus!=5&&item.OrderStatus!=6?makeAdocument(item,index,2,1):''"></i>
</el-tooltip>
<el-tooltip <el-tooltip
class="item-but" effect="dark" content="制单" placement="top"> class="item-but" effect="dark" content="制单" placement="top">
<i class="iconfont iconwenbenbianji cp" <i class="iconfont iconwenbenbianji cp"
...@@ -678,7 +685,7 @@ export default { ...@@ -678,7 +685,7 @@ export default {
this.emptyMore() this.emptyMore()
}, },
// 制作单据 // 制作单据
makeAdocument(row, index, num) { makeAdocument(row, index, num,num2) {
let list = row.OrderType && row.OrderType.split(","); let list = row.OrderType && row.OrderType.split(",");
if (list != null && list.length > 1 && num == 1) { if (list != null && list.length > 1 && num == 1) {
...@@ -698,22 +705,22 @@ export default { ...@@ -698,22 +705,22 @@ export default {
}); });
this.dataList[index].cost = true; this.dataList[index].cost = true;
} else { } else {
this.makeAdocumentFun(row, index, num); this.makeAdocumentFun(row, index, num,num2);
} }
}, },
makeAdocumentFun(row, index, num) { makeAdocumentFun(row, index, num,num2) {
if (this.superManage) { if (this.superManage) {
this.makeAdocumentFunction(row, index, num) this.makeAdocumentFunction(row, index, num,num2)
}else{ }else{
if (this.userInfo.EmployeeId != row.EnterID && this.userInfo.EmployeeId != row.CreateBy) { if (this.userInfo.EmployeeId != row.EnterID && this.userInfo.EmployeeId != row.CreateBy) {
this.ValidateOperator(); this.ValidateOperator();
} else { } else {
this.makeAdocumentFunction(row, index, num) this.makeAdocumentFunction(row, index, num,num2)
} }
} }
}, },
makeAdocumentFunction(row, index, num){ makeAdocumentFunction(row, index, num,num2){
let type; let type;
type = num == 1 ? 1 : 2; // 1收款 2退款 3成本 type = num == 1 ? 1 : 2; // 1收款 2退款 3成本
let href; let href;
...@@ -755,16 +762,34 @@ export default { ...@@ -755,16 +762,34 @@ export default {
} }
} }
if (num == "2") { if (num == "2") {
data = [ // num2==1 赔偿退款
{ if(num2){
path: "ChoiceAddFinancialDocuments", data = [
type: type, {
OtherType: 55, path: "addFinancialDocuments",
ReFinanceId: row.OrderId, type: type,
ReFinanceId2: num, OtherType: 55,
GuestId: row.GuestId, ReFinanceId: row.OrderId,
}, ReFinanceId2: num,
]; GuestId: row.GuestId,
id: this.userInfo.RB_Branch_id==0?11:16,
RB_Branch_Id: this.userInfo.RB_Branch_id,
isRB_Branch_Id: true
},
];
}else{
data = [
{
path: "ChoiceAddFinancialDocuments",
type: type,
OtherType: 55,
ReFinanceId: row.OrderId,
ReFinanceId2: num,
GuestId: row.GuestId,
},
];
}
href = href =
url + url +
"automaticLogin?token=" + "automaticLogin?token=" +
...@@ -780,15 +805,31 @@ export default { ...@@ -780,15 +805,31 @@ export default {
} }
} }
} else { } else {
data = [{ // num2==1 赔偿退款
path: 'ChoiceAddFinancialDocuments', if(num2){
type: type, data = [{
OtherType: 55, path: 'addFinancialDocuments',
ReFinanceId: row.OrderId, type: type,
ReFinanceId2: num, OtherType: 55,
GuestId: row.GuestId, ReFinanceId: row.OrderId,
RelevanceFrId: num==2?1:row.OrderType, // 单据类型 ReFinanceId2: num,
}] GuestId: row.GuestId,
RelevanceFrId: num==2?1:row.OrderType, // 单据类型
id: this.userInfo.RB_Branch_id==0?11:16,
RB_Branch_Id: this.userInfo.RB_Branch_id,
isRB_Branch_Id: true
}]
}else{
data = [{
path: 'ChoiceAddFinancialDocuments',
type: type,
OtherType: 55,
ReFinanceId: row.OrderId,
ReFinanceId2: num,
GuestId: row.GuestId,
RelevanceFrId: num==2?1:row.OrderType, // 单据类型
}]
}
href = href =
url + url +
"automaticLogin?token=" + "automaticLogin?token=" +
......
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