Commit 3f49f8e0 authored by huyufeng's avatar huyufeng

target

parent bcc9d729
......@@ -3,7 +3,7 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="部门ID" prop="deptId">
<el-form-item label="部门" prop="deptId">
<el-select v-model="queryParams.deptId" style="width: 300px;" placeholder="请选择部门">
<el-option v-for="item in this.deptData" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
......@@ -36,28 +36,40 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="主键ID" align="center" prop="id" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<el-table-column label="目标名称" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.deptName}}{{scope.row.targetPeriodName}}目标</span>
</template>
</el-table-column>
<el-table-column label="部门" align="center" prop="deptName" />
<el-table-column label="目标类型" align="center" prop="targetType">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<dict-tag :type="DICT_TYPE.TARGET_TYPE" :value="scope.row.targetType"/>
</template>
</el-table-column>
<el-table-column label="部门ID" align="center" prop="deptId" />
<el-table-column label="目标类型" align="center" prop="targetType" />
<el-table-column label="目标周期名称" align="center" prop="targetPeriodName" />
<el-table-column label="目标开始时间" align="center" prop="startTime" width="180">
<el-table-column label="时间范围" align="center" prop="targetPeriodName">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startTime) }}</span>
<span>{{scope.row.startTime}}~{{scope.row.endTime}}</span>
</template>
</el-table-column>
<el-table-column label="目标结束时间" align="center" prop="endTime" width="180">
<el-table-column label="部门人数" align="center" prop="deptEmpCount"/>
<el-table-column label="目标方数" align="center" prop="cubeNum" />
<el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime) }}</span>
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="scope.row.transportType"/>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="shippingChannel">
<template slot-scope="scope">
<span>{{ getShipChannelName(scope.row.shippingChannel) }}</span>
</template>
</el-table-column>
<el-table-column label="已完成方数" align="center" prop="completeCubeNum" />
<el-table-column label="完成比例" align="center">
<template slot-scope="scope">
<span>{{ (scope.row.completeCubeNum/scope.row.cubeNum*100).toFixed(2)+'%' }}</span>
</template>
</el-table-column>
<el-table-column label="运输方式" align="center" prop="transportType" />
<el-table-column label="出货渠道" align="center" prop="shippingChannel" />
<el-table-column label="立方数" align="center" prop="cubeNum" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
......@@ -166,6 +178,19 @@ export default {
}
};
},
computed:{
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
}
return '/'
}
}
},
created() {
listSimpleDepts().then(res =>{
res.data.forEach((item)=>{
......
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