Commit 3d07d9bb authored by youjie's avatar youjie

赔偿

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