完成完成度
This commit is contained in:
tczjx58520 2020-02-05 19:16:44 +08:00
parent f517f16048
commit 289b39e0aa
7 changed files with 66 additions and 15 deletions

View file

@ -103,6 +103,7 @@ export function updatesaleplan2(query) {
export function searchEmpCategory(query) {
var params = new URLSearchParams()
params.append('iseffective', 1) // 你要传给后台的参数值 key/value
params.append('type', 2) // 你要传给后台的参数值 key/value
// if (query.type !== '' && query.type !== null && query.type !== undefined) {
// params.append('type', query.type)
// }

View file

@ -2129,7 +2129,8 @@ export default {
actualMoney: 'actualMoney',
xzmd: 'Enter',
planNum: 'No.',
trackingStatistics: 'trackingStats'
trackingStatistics: 'trackingStats',
progress: 'progress'
},
SaleOpportunity: {
title: 'subject',

View file

@ -2156,7 +2156,8 @@ export default {
actualMoney: '实际金额',
xzmd: '请输入内容',
planNum: '计划编号',
trackingStatistics: '跟踪统计'
trackingStatistics: '跟踪统计',
progress: '进度'
},
SaleOpportunity: {
title: '机会主题',

View file

@ -186,13 +186,14 @@
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElCascader ', type: 'visible', options: 'options'}" :label="$t('SalePlan.typeId')" prop="typeId" align="center" min-width="250px">
<template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.typeId" :placeholder="$t('SalePlan.xzmd')" clearable filterable style="margin-left: 18px;width: 180px">
<el-select v-if="isedit2(scope.row)" v-model="scope.row.typeId" :placeholder="$t('SalePlan.xzmd')" clearable filterable style="margin-left: 18px;width: 180px">
<el-option
v-for="(item, index) in CategoryList"
:key="index"
:label="item.categoryName"
:value="item.id"/>
</el-select>
<span v-else/>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('SalePlan.quantity')" prop="quantity" align="center" min-width="150" >
@ -506,9 +507,9 @@ export default {
list3: [],
//
validRules: {
address: [{
required: true, message: 'Please enter a address.', trigger: 'blur'
}],
// address: [{
// required: true, message: 'Please enter a address.', trigger: 'blur'
// }],
quantity: [{
required: true, message: 'Please enter a quantity.', trigger: ''
}],
@ -545,7 +546,7 @@ export default {
_that = this
},
methods: {
//
//
isedit(row) {
console.log('row============>', row)
const flag = row.planTarget
@ -555,6 +556,16 @@ export default {
return false
}
},
//
isedit2(row) {
console.log('row============>', row)
const flag = row.planTarget
if (flag === '1') {
return true
} else {
return false
}
},
//
jungleAddress(row, val) {
if (val === '7') {

View file

@ -696,13 +696,13 @@ export default {
},
//
isReview(row) {
// if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0) {
// const approvalUse = row.approvalUseVos
// const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
// if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) {
// return true
// }
// }
if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0) {
const approvalUse = row.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) {
return true
}
}
return true
},
//

View file

@ -76,6 +76,11 @@
style="width: 100%">
<el-editable-column type="selection" min-width="55" align="center"/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :label="$t('SalePlan.progress')" prop="" align="center" min-width="150px">
<template slot-scope="scope">
<el-progress ref="myprogress" :text-inside="true" :stroke-width="18" :percentage="clacProgress(scope.row)" :status="mystatus" :format="_format(scope.row)"/>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElCascader ', type: 'visible', options: 'options'}" :label="$t('SalePlan.planTarget')" prop="" align="center" min-width="250px">
<template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.planTarget" :placeholder="$t('SalePlan.xzmd')" disabled clearable filterable style="margin-left: 18px;width: 180px">
@ -263,6 +268,7 @@ export default {
},
data() {
return {
mystatus: '',
//
data2: [],
defaultProps: {
@ -312,6 +318,26 @@ export default {
methods: {
handlecancel() {
this.editVisible = false
},
//
clacProgress(row) {
console.log('row==================>', row)
const res = ((row.actualQuantity / row.quantity) * 100).toFixed(0)
if (res < 50) {
this.mystatus = 'exception'
} else if (res >= 50 && res < 100) {
this.mystatus = 'text'
} else {
this.mystatus = 'success'
}
console.log(typeof res)
return res > 100 ? 100 : res
},
_format(row) {
this.$nextTick(function() {
var dom = this.$refs.myprogress.$el.children[0].children[0].children[0].children[0].innerText = ((row.actualQuantity / row.quantity) * 100).toFixed(0) + '%'
console.log('dom=================>', dom)
})
}
}
}

View file

@ -175,13 +175,14 @@
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElCascader ', type: 'visible', options: 'options'}" :label="$t('SalePlan.typeId')" prop="typeId" align="center" min-width="250px">
<template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.typeId" :placeholder="$t('SalePlan.xzmd')" clearable filterable style="margin-left: 18px;width: 180px">
<el-select v-if="isedit2(scope.row)" v-model="scope.row.typeId" :placeholder="$t('SalePlan.xzmd')" clearable filterable style="margin-left: 18px;width: 180px">
<el-option
v-for="(item, index) in CategoryList"
:key="index"
:label="item.categoryName"
:value="item.id"/>
</el-select>
<span v-else/>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('SalePlan.quantity')" prop="quantity" align="center" min-width="150" >
@ -490,6 +491,16 @@ export default {
this.CategoryList = res.data.data.content.list
})
},
//
isedit2(row) {
console.log('row============>', row)
const flag = row.planTarget
if (flag === '1') {
return true
} else {
return false
}
},
//
isedit(row) {
console.log('row============>', row)