Commit dc78430b authored by youjie's avatar youjie

门票总金额编辑

parent 55ea0871
......@@ -524,7 +524,7 @@
}}</span>
</template>
</el-table-column> -->
<el-table-column label="毛利" min-width="100">
<el-table-column label="利润" min-width="100">
<template slot-scope="scope">
<span class="fz15 fbold">{{ scope.row.Income-scope.row.CostMoney-scope.row.Refund>0?(scope.row.Income-scope.row.CostMoney-scope.row.Refund).toFixed(2):'-' }}</span>
</template>
......
<template>
<el-dialog title="关联OP" width="400px" :visible.sync="isShow" center @close="close">
<el-dialog :title="Title" width="400px" :visible.sync="isShow" center @close="close">
<el-form class="cdForm" label-width="90px" :model="msg" :rules="rules" ref="msg">
<template v-if="CorrelationObj.TypeNum!=4">
<el-form-item label="OP" prop="OpEmpId">
<el-select filterable v-model='msg.OpEmpId' placeholder="请选择OP">
<el-option v-for='item in EmployeeList'
......@@ -10,6 +11,12 @@
</el-option>
</el-select>
</el-form-item>
</template>
<template v-else>
<el-form-item label="总价" prop="Money">
<el-input v-model='msg.Money' placeholder="请输入总价"></el-input>
</el-form-item>
</template>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="close">{{$t('pub.cancelBtn')}}</button>
......@@ -27,9 +34,11 @@
},
data() {
return {
Title: '',
msg:{
OrderId: 0,
OpEmpId: null,
Money: 0
},
rules:{
OpEmpId: [{
......@@ -37,6 +46,11 @@
message: '请选择需要关联的OP',
trigger: 'change'
}],
Money: [{
required: true,
message: '请输入总价',
trigger: 'blur'
}],
},
employeeMsg:{ // 员工
GroupId:'',
......@@ -55,6 +69,12 @@
this.CorrelationObj = newValue
this.msg.OrderId = newValue.OrderId
this.msg.OpEmpId = newValue.OpEmpId?newValue.OpEmpId:null
if(newValue.TypeNum==4){
this.msg.Money = newValue.Money
this.Title = '修改总价'
}else{
this.Title = '关联OP'
}
},
deep:true,
},
......@@ -67,12 +87,18 @@
mounted() {
this.msg.OrderId = this.CorrelationObj.OrderId
this.msg.OpEmpId = this.CorrelationObj.OpEmpId?this.CorrelationObj.OpEmpId:null
if(this.CorrelationObj.TypeNum==4){
this.msg.Money = this.CorrelationObj.Money
this.Title = '修改总价'
}else{
this.Title = '关联OP'
}
this.getEmployee()
},
methods: {
sureBtn(){
let url
let msg
if(this.CorrelationObj.TypeNum==1){
url = 'dict_post_SetCustomerOrderOP'
}
......@@ -82,10 +108,23 @@
if(this.CorrelationObj.TypeNum===3){
url = 'CarSingle_post_SetCarOrderOP'
}
if(this.CorrelationObj.TypeNum===4){
msg = {
OrderId: this.msg.OrderId,
Money: this.msg.Money
}
url = 'ticket_post_SetTicketOrderMoney'
}else{
msg = {
OrderId: this.msg.OrderId,
OpEmpId: this.msg.OpEmpId
}
}
this.$refs['msg'].validate((valid) => {
if (valid) {
this.apipost(url, this.msg, res => {
this.apipost(url, msg, res => {
if(res.data.resultCode == 1) {
this.$emit('success')
}
......
......@@ -675,7 +675,7 @@
<span class="fz15 fbold">{{ scope.row.Refund ? scope.row.Refund : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="毛利" min-width="100">
<el-table-column label="利润" min-width="100">
<template slot-scope="scope">
<span class="fz15 fbold">{{ scope.row.Income-scope.row.CostMoney-scope.row.Refund>0?scope.row.Income-scope.row.CostMoney-scope.row.Refund:'-' }}</span>
</template>
......
......@@ -571,7 +571,7 @@
<span class="fz15 fbold">{{ scope.row.Refund ? scope.row.Refund : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="毛利" min-width="100">
<el-table-column label="利润" min-width="100">
<template slot-scope="scope">
<span class="fz15 fbold">{{ scope.row.Income-scope.row.CostMoney-scope.row.Refund>0?(scope.row.Income-scope.row.CostMoney-scope.row.Refund).toFixed(2):'-' }}</span>
</template>
......
......@@ -535,7 +535,7 @@
<span class="fz15 fbold">{{ scope.row.Refund ? scope.row.Refund : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="毛利" min-width="100">
<el-table-column label="利润" min-width="100">
<template slot-scope="scope">
<span class="fz15 fbold">{{ scope.row.Income-scope.row.CostMoney-scope.row.Refund>0?(scope.row.Income-scope.row.CostMoney-scope.row.Refund).toFixed(2):'-' }}</span>
</template>
......
......@@ -611,7 +611,12 @@
<span class="fz15 fbold">{{ scope.row.Refund ? scope.row.Refund : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="毛利" min-width="100">
<el-table-column label="待收" min-width="100">
<template slot-scope="scope">
<span class="fz15 fbold" :class="{'cF1416C':(item.Money-scope.row.Income-scope.row.PlatformTax+scope.row.Refund).toFixed(2)!=0}">{{ (item.Money-scope.row.Income-scope.row.PlatformTax+scope.row.Refund).toFixed(2)}}</span>
</template>
</el-table-column>
<el-table-column label="利润" min-width="100">
<template slot-scope="scope">
<span class="fz15 fbold">{{ scope.row.Income-scope.row.CostMoney-scope.row.Refund>0?(scope.row.Income-scope.row.CostMoney-scope.row.Refund).toFixed(2):'-' }}</span>
</template>
......@@ -750,7 +755,7 @@
<span class="fz12 c9e">订单总金额</span>
<div class="ml">
<span class="fz15 fbold">{{ item.Money.toFixed(2) }}</span>
<span class="fz12 ml">{{ item.CurrencyName }}</span>
<span class="fz12">{{ item.CurrencyName }}</span>
</div>
</div>
<div
......@@ -827,6 +832,15 @@
>
<span class="c059FF6">编辑关联OP</span>
</div>
<div
v-if="item.OrderStatus >1 && item.OrderStatus != 3
&& item.OrderStatus != 4
&&pagesTitle=='OP'&&is_correlationOP"
class="row-c cursor-pointer radius5 change py5"
@click="clickCorrelation(item,2)"
>
<span class="c059FF6">编辑总价</span>
</div>
<!-- <template v-if="item.OrderStatus==2">
<div class="column-jac fz12 flex-s c20C997">
<div class="mb5">已支付</div>
......@@ -985,7 +999,7 @@
</el-dialog>
<offset :isShow="cdState" :obj="queryObj" @close="cdState=false"></offset>
<correlationOP :isShowCorrelation="isShowCorrelation" :CorrelationObj="CorrelationObj"
@close="isShowCorrelation=false"
@close="close"
@success="success"></correlationOP>
</div>
</template>
......@@ -1128,14 +1142,20 @@ export default {
methods: {
close(){
this.isShowCorrelation = false
this.CorrelationObj.TypeNum=null
},
success(){
this.CorrelationObj.TypeNum=null
this.close()
this.$emit('success')
},
clickCorrelation(item,type){
this.CorrelationObj = item
this.CorrelationObj.TypeNum = 2
if(type==2){
this.CorrelationObj.TypeNum = 4 //编辑总价
}else{
this.CorrelationObj.TypeNum = 2
}
this.isShowCorrelation = true
},
isOffset(row, index, num){
......
......@@ -423,12 +423,12 @@ export default {
}
addList(data)
data.forEach((x) => {
x.Money = 0
// x.Money = 0
let Money = 0
x.DetailList.forEach((y) => {
Money+=y.Money
})
x.Money= Number(Money+x.MailingMoney)
// x.Money= Number(Money+x.MailingMoney)
})
this.OrderList = data;
......
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