Browse Source

优化

master
陈裕财 4 years ago
parent
commit
c1f7d69791
  1. 52
      src/views/xm/core/xmTask/XmTaskEdit.vue
  2. 10
      src/views/xm/core/xmTaskOrder/ToPay.vue
  3. 9
      src/views/xm/core/xmTaskOrder/XmTaskOrderEdit.vue
  4. 11
      src/views/xm/core/xmTaskOrder/XmTaskOrderMng.vue

52
src/views/xm/core/xmTask/XmTaskEdit.vue

@ -281,7 +281,26 @@
{{editForm.budgetAt}}
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-col>
<el-col :span="6" v-if="editForm.bidStep=='4'">
<strong> 合计待付款:</strong>&nbsp;&nbsp;<font style="font-size:48px;color:red;"> {{needPayEfundsAt}}&nbsp;</font>
<br/>
<el-button class="padding" @click="toPayAt" type="primary">去付款</el-button>
</el-col>
</el-row>
</p>
<to-pay v-else-if="toPayVisible " :task-id="editForm.id" :visible="toPayVisible" @cancel="toPayVisible=false" @pay-success="onTaskPaySuccess"></to-pay>
</el-tab-pane>
<el-tab-pane label="营销推广" name="82" v-if="editForm.ntype!='1'">
<el-steps :active="calcTaskStep" align-center simple v-if="editForm.crowd==='1'">
<el-step v-for="(item,index) in dicts.bidStep" :title="item.name" :description="item.name" :key="index"></el-step>
</el-steps>
<p v-if="!toPayVisible">
<el-row v-if="editForm.crowd==='1'">
<el-col :span="18">
<el-row>
<el-col :span="6">
<el-form-item label="分享赚" prop="oshare" v-if="editForm.taskOut==='1'">
@ -325,7 +344,7 @@
<el-row>
<el-col :span="6">
<el-form-item label="加急" prop="urgent" v-if="editForm.taskOut==='1'">
<el-checkbox v-model="editForm.urgent" v-if="editForm.hot!='2'" true-label="1" false-label="0" id="urgent" @change="editXmTaskSomeFields(editForm,'urgent',$event)">加急</el-checkbox>
<el-checkbox v-model="editForm.urgent" v-if="editForm.urgent!='2'" true-label="1" false-label="0" id="urgent" @change="editXmTaskSomeFields(editForm,'urgent',$event)">加急</el-checkbox>
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'marketState',editForm.urgent)" :key="index" :type="item.className">{{item.name}}</el-tag>
</el-form-item>
</el-col>
@ -350,13 +369,13 @@
</el-row>
</el-col>
<el-col :span="6">
<strong> 合计待付款:</strong>&nbsp;&nbsp;<font style="font-size:48px;color:red;"> {{needPayAt}}&nbsp;</font>
<strong> 合计待付款:</strong>&nbsp;&nbsp;<font style="font-size:48px;color:red;"> {{needPayMarketAt}}&nbsp;</font>
<br/>
<el-button class="padding" @click="toPayAt" type="primary">去付款</el-button>
</el-col>
</el-row>
</p>
<to-pay v-else :task-id="editForm.id" :visible="toPayVisible" @cancel="toPayVisible=false"></to-pay>
<to-pay v-else :task-id="editForm.id" :visible="toPayVisible" @cancel="toPayVisible=false" @pay-success="onTaskPaySuccess"></to-pay>
</el-tab-pane>
<el-tab-pane label="关注" name="91">
<xm-my-do-focus v-if="activateTabPaneName=='91'" :biz-id="editForm.id" :pbiz-id="editForm.projectId" :biz-name="editForm.name" focus-type="2"></xm-my-do-focus>
@ -410,7 +429,7 @@
<script>
import util from '@/common/js/util';//
import {initDicts,editXmTask,setTaskCreateUser,editXmTaskSomeFields,batchChangeParentTask } from '@/api/xm/core/xmTask';
import {initDicts,editXmTask,setTaskCreateUser,editXmTaskSomeFields,batchChangeParentTask,listXmTask } from '@/api/xm/core/xmTask';
import {addXmRecordVisit } from '@/api/xm/core/xmRecordVisit';
import { mapGetters } from 'vuex';
import {sn} from '@/common/js/sequence';
@ -443,7 +462,15 @@
calcTaskStep(){
return this.dicts['bidStep'].findIndex(i=>i.id==this.editForm.bidStep)
},
needPayAt(){
needPayEfundsAt(){
var toPayAt=0;
if(this.editForm.estate=='1' && this.editForm.crowd==='1' && this.editForm.bidStep=='4'){
toPayAt=toPayAt+parseFloat(this.editForm.efunds||this.editForm.budgetAt)
}
return toPayAt;
},
needPayMarketAt(){
var toPayAt=0;
if(this.editForm.oshare=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.shareFee||0)
@ -459,10 +486,7 @@
}
if(this.editForm.crmSup=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.crmSupFee||0)
}
if(this.editForm.estate=='1'||this.editForm.crowd==='1'){
toPayAt=toPayAt+parseFloat(this.editForm.efunds||this.editForm.budgetAt)
}
}
return toPayAt;
}
},
@ -881,6 +905,14 @@
toPayAt(){
this.toPayVisible=true;
},
onTaskPaySuccess(orderId){
listXmTask({ids:[this.editForm.id]}).then(res=>{
Object.assign(this.editForm,res.data.data[0])
this.editFormBak={...this.editForm}
})
this.$emit("pay-success",this.editForm)
this.toPayVisible=false;
}
},//end method
components: {

10
src/views/xm/core/xmTaskOrder/ToPay.vue

@ -95,6 +95,7 @@
}
],
agreementChecked:false,
timer:0,
}//end return
},//end data
methods: {
@ -154,7 +155,7 @@
toAliPay(orderId) {
let params = {
id: orderId,
otype: 1,
otype: '3',
returnUrl: `${window.location.protocol+"//"+window.location.host}/${process.env.CONTEXT}/${process.env.VERSION}/#/my/order/paySuccess`
}
aliPay(params).then(res => {
@ -176,7 +177,7 @@
toWeixinPay(orderId) {
let params = {
id: orderId,
otype: 1,
otype: '3',
returnUrl: ""
}
weixinPay(params).then(res => {
@ -199,9 +200,10 @@
//
queryOrderStatus(orderId) {
console.log("查询订单");
checkWxPayStatus({'orderId': orderId, "otype": "1"}).then(res => {
checkWxPayStatus({'orderId': orderId, "otype": "3"}).then(res => {
if(res.data.tips.isOk) {
this.$router.push({path:'/my/order/paySuccess', query:{total_amount: this.data.amount, out_trade_no: orderId}});
//this.$router.push({path:'/my/order/paySuccess', query:{total_amount: this.data.amount, out_trade_no: orderId}});
this.$emit("pay-success",orderId)
clearInterval(this.timer);
}else {
}

9
src/views/xm/core/xmTaskOrder/XmTaskOrderEdit.vue

@ -20,8 +20,8 @@
<el-form-item label="更新时间" prop="ltime">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.ltime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="支付方式" prop="payType">
<el-input v-model="editForm.payType" placeholder="支付方式" :maxlength="1" @change="editSomeFields(editForm,'payType',$event)"></el-input>
<el-form-item label="支付方式1微信2支付宝" prop="payType">
<el-input v-model="editForm.payType" placeholder="支付方式1微信2支付宝" :maxlength="1" @change="editSomeFields(editForm,'payType',$event)"></el-input>
</el-form-item>
<el-form-item label="支付状态0待付款,1已付款" prop="payStatus">
<el-input v-model="editForm.payStatus" placeholder="支付状态0待付款,1已付款" :maxlength="1" @change="editSomeFields(editForm,'payStatus',$event)"></el-input>
@ -155,6 +155,9 @@
<el-form-item label="订单名称" prop="name">
<el-input v-model="editForm.name" placeholder="订单名称" :maxlength="255" @change="editSomeFields(editForm,'name',$event)"></el-input>
</el-form-item>
<el-form-item label="订单业务类型1-保证金,2-营销推广活动" prop="bizType">
<el-input v-model="editForm.bizType" placeholder="订单业务类型1-保证金,2-营销推广活动" :maxlength="1" @change="editSomeFields(editForm,'bizType',$event)"></el-input>
</el-form-item>
</el-form>
</el-row>
@ -206,7 +209,7 @@
]
},
editForm: {
ouserid:'',obranchId:'',ostatus:'',ctime:'',ltime:'',payType:'',payStatus:'',payTime:'',prepayId:'',id:'',finalFee:'',othFee:'',originFee:'',payAt:'',payAuthId:'',payOpenid:'',payUserid:'',payUsername:'',discount:'',topFee:'',topStime:'',topEtime:'',hotFee:'',hotStime:'',hotEtime:'',top:'',hot:'',crmSupFee:'',urgentFee:'',urgent:'',crmSup:'',efunds:'',estate:'',etoPlatTime:'',etoDevTime:'',ebackTime:'',taskId:'',topDays:'',hotDays:'',urgentDays:'',urgentStime:'',urgentEtime:'',calcStatus:'',calcTime:'',oshare:'',shareFee:'',payId:'',tranId:'',remark:'',name:''
ouserid:'',obranchId:'',ostatus:'',ctime:'',ltime:'',payType:'',payStatus:'',payTime:'',prepayId:'',id:'',finalFee:'',othFee:'',originFee:'',payAt:'',payAuthId:'',payOpenid:'',payUserid:'',payUsername:'',discount:'',topFee:'',topStime:'',topEtime:'',hotFee:'',hotStime:'',hotEtime:'',top:'',hot:'',crmSupFee:'',urgentFee:'',urgent:'',crmSup:'',efunds:'',estate:'',etoPlatTime:'',etoDevTime:'',ebackTime:'',taskId:'',topDays:'',hotDays:'',urgentDays:'',urgentStime:'',urgentEtime:'',calcStatus:'',calcTime:'',oshare:'',shareFee:'',payId:'',tranId:'',remark:'',name:'',bizType:''
},
maxTableHeight:300,
}//end return

11
src/views/xm/core/xmTaskOrder/XmTaskOrderMng.vue

@ -45,7 +45,7 @@
<span> {{scope.row.ltime}} </span>
</template>
</el-table-column>
<el-table-column prop="payType" label="支付方式" min-width="120" show-overflow-tooltip>
<el-table-column prop="payType" label="支付方式1微信2支付宝" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span> {{scope.row.payType}} </span>
</template>
@ -263,6 +263,11 @@
<el-table-column prop="name" label="订单名称" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span> {{scope.row.name}} </span>
</template>
</el-table-column>
<el-table-column prop="bizType" label="订单业务类型1-保证金,2-营销推广活动" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span> {{scope.row.bizType}} </span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" fixed="right">
@ -335,12 +340,12 @@ export default {
},// params={categoryId:'all',itemCodes:['sex']} {sex: [{id:'1',name:''},{id:'2',name:''}]}
addFormVisible: false,//xmTaskOrder
addForm: {
ouserid:'',obranchId:'',ostatus:'',ctime:'',ltime:'',payType:'',payStatus:'',payTime:'',prepayId:'',id:'',finalFee:'',othFee:'',originFee:'',payAt:'',payAuthId:'',payOpenid:'',payUserid:'',payUsername:'',discount:'',topFee:'',topStime:'',topEtime:'',hotFee:'',hotStime:'',hotEtime:'',top:'',hot:'',crmSupFee:'',urgentFee:'',urgent:'',crmSup:'',efunds:'',estate:'',etoPlatTime:'',etoDevTime:'',ebackTime:'',taskId:'',topDays:'',hotDays:'',urgentDays:'',urgentStime:'',urgentEtime:'',calcStatus:'',calcTime:'',oshare:'',shareFee:'',payId:'',tranId:'',remark:'',name:''
ouserid:'',obranchId:'',ostatus:'',ctime:'',ltime:'',payType:'',payStatus:'',payTime:'',prepayId:'',id:'',finalFee:'',othFee:'',originFee:'',payAt:'',payAuthId:'',payOpenid:'',payUserid:'',payUsername:'',discount:'',topFee:'',topStime:'',topEtime:'',hotFee:'',hotStime:'',hotEtime:'',top:'',hot:'',crmSupFee:'',urgentFee:'',urgent:'',crmSup:'',efunds:'',estate:'',etoPlatTime:'',etoDevTime:'',ebackTime:'',taskId:'',topDays:'',hotDays:'',urgentDays:'',urgentStime:'',urgentEtime:'',calcStatus:'',calcTime:'',oshare:'',shareFee:'',payId:'',tranId:'',remark:'',name:'',bizType:''
},
editFormVisible: false,//
editForm: {
ouserid:'',obranchId:'',ostatus:'',ctime:'',ltime:'',payType:'',payStatus:'',payTime:'',prepayId:'',id:'',finalFee:'',othFee:'',originFee:'',payAt:'',payAuthId:'',payOpenid:'',payUserid:'',payUsername:'',discount:'',topFee:'',topStime:'',topEtime:'',hotFee:'',hotStime:'',hotEtime:'',top:'',hot:'',crmSupFee:'',urgentFee:'',urgent:'',crmSup:'',efunds:'',estate:'',etoPlatTime:'',etoDevTime:'',ebackTime:'',taskId:'',topDays:'',hotDays:'',urgentDays:'',urgentStime:'',urgentEtime:'',calcStatus:'',calcTime:'',oshare:'',shareFee:'',payId:'',tranId:'',remark:'',name:''
ouserid:'',obranchId:'',ostatus:'',ctime:'',ltime:'',payType:'',payStatus:'',payTime:'',prepayId:'',id:'',finalFee:'',othFee:'',originFee:'',payAt:'',payAuthId:'',payOpenid:'',payUserid:'',payUsername:'',discount:'',topFee:'',topStime:'',topEtime:'',hotFee:'',hotStime:'',hotEtime:'',top:'',hot:'',crmSupFee:'',urgentFee:'',urgent:'',crmSup:'',efunds:'',estate:'',etoPlatTime:'',etoDevTime:'',ebackTime:'',taskId:'',topDays:'',hotDays:'',urgentDays:'',urgentStime:'',urgentEtime:'',calcStatus:'',calcTime:'',oshare:'',shareFee:'',payId:'',tranId:'',remark:'',name:'',bizType:''
},
maxTableHeight:300,
}

Loading…
Cancel
Save