Commit dc78430b authored by youjie's avatar youjie

门票总金额编辑

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