|
|
@@ -12,7 +12,7 @@
|
|
|
<vab-query-form>
|
|
|
<vab-query-form-left-panel :span="12">
|
|
|
<el-button
|
|
|
- v-permissions="['work:order:add']"
|
|
|
+ v-permissions="['work:sale:add']"
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@@ -40,21 +40,51 @@
|
|
|
:sortable="item.sortable"
|
|
|
:width="item.width">
|
|
|
<template #default="{ row }">
|
|
|
- <span v-if="item.prop === 'trainingDate'">
|
|
|
- {{ parseTime(row.trainingDate, '{y}-{m}-{d}') }}
|
|
|
+ <el-button
|
|
|
+ v-if="item.prop === 'distributorName'"
|
|
|
+ style="font-size: 14px"
|
|
|
+ type="text"
|
|
|
+ @click="handleDetail(row)">
|
|
|
+ {{ row.distributorName }}
|
|
|
+ </el-button>
|
|
|
+ <span v-else-if="item.prop === 'expectTrainDate'">
|
|
|
+ {{ parseTime(row.expectTrainDate, '{y}-{m}-{d}') }}
|
|
|
</span>
|
|
|
- <span v-else-if="item.prop === 'specificTime'">
|
|
|
- {{ parseTime(row.specificStartTime, '{y}-{m}-{d} {h}:{m}:{s}') }} -
|
|
|
- {{ parseTime(row.specificEndTime, '{y}-{m}-{d} {h}:{m}:{s}') }}
|
|
|
+ <span v-else-if="item.prop === 'expectTime'">
|
|
|
+ {{ parseTime(row.expectStartTime, '{h}:{i}') }} -
|
|
|
+ {{ parseTime(row.expectEndTime, '{h}:{i}') }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.prop === 'trainDate' && row.trainDate != ''">
|
|
|
+ {{ parseTime(row.trainDate, '{y}-{m}-{d}') }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.prop === 'specificTime' && row.specificStartTime != ''">
|
|
|
+ {{ parseTime(row.specificStartTime, '{h}:{i}') }} -
|
|
|
+ {{ parseTime(row.specificEndTime, '{h}:{i}') }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.prop === 'applyType'">
|
|
|
+ <el-tag v-if="row.applyType == '10'">已提交</el-tag>
|
|
|
+ <el-tag v-else-if="row.applyType == '20'" type="warning">已确认</el-tag>
|
|
|
+ <el-tag v-else-if="row.applyType == '30'" type="success">总结完成</el-tag>
|
|
|
</span>
|
|
|
<span v-else>{{ row[item.prop] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="text" @click="handleDetail(row)">查看</el-button>
|
|
|
- <el-button type="text" @click="createOrder(row, 'edit')">编辑</el-button>
|
|
|
- <el-button v-if="row.assess == 'yes'" type="text" @click="handleFinish(row)">总结</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="row.applyType == '10'"
|
|
|
+ v-permissions="['work:sale:edit']"
|
|
|
+ type="text"
|
|
|
+ @click="sureOrder(row, 'edit')">
|
|
|
+ 确认
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="row.applyType == '20'"
|
|
|
+ v-permissions="['work:sale:sure']"
|
|
|
+ type="text"
|
|
|
+ @click="handleFinish(row)">
|
|
|
+ 反馈
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template #empty>
|
|
|
@@ -74,6 +104,8 @@
|
|
|
<finish ref="finish" @fetch-data="restFetchData" />
|
|
|
<!-- 创建工单 -->
|
|
|
<order-edit ref="order-edit" @fetch-data="restFetchData" />
|
|
|
+ <!-- 确认 -->
|
|
|
+ <Sure ref="sure" @fetch-data="restFetchData" />
|
|
|
<!-- 详情 -->
|
|
|
<Details ref="details" />
|
|
|
</div>
|
|
|
@@ -86,16 +118,18 @@
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import orderEdit from '@/views/work/train/sale/components/Edit'
|
|
|
import Details from '@/views/work/train/sale/components/details'
|
|
|
+ import Sure from '@/views/work/train/sale/components/sure'
|
|
|
|
|
|
export default {
|
|
|
name: 'WorkOrder',
|
|
|
- components: { Finish, Details, orderEdit },
|
|
|
+ components: { Finish, Details, orderEdit, Sure },
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: 'first',
|
|
|
layout: 'total, sizes, prev, pager, next, jumper',
|
|
|
queryForm: {
|
|
|
distributorId: 0,
|
|
|
+ createdBy: 0,
|
|
|
mainProduct: '',
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -122,18 +156,18 @@
|
|
|
},
|
|
|
{
|
|
|
label: '参训人员',
|
|
|
- width: '100px',
|
|
|
+ width: '200px',
|
|
|
prop: 'trainees',
|
|
|
},
|
|
|
{
|
|
|
- label: '培训日期',
|
|
|
- width: '100px',
|
|
|
- prop: 'trainingDate',
|
|
|
+ label: '期望培训日期',
|
|
|
+ width: '120px',
|
|
|
+ prop: 'expectTrainDate',
|
|
|
},
|
|
|
{
|
|
|
- label: '具体时间',
|
|
|
- width: '300px',
|
|
|
- prop: 'specificTime',
|
|
|
+ label: '期望时间',
|
|
|
+ width: '120px',
|
|
|
+ prop: 'expectTime',
|
|
|
},
|
|
|
{
|
|
|
label: '培训主题',
|
|
|
@@ -142,7 +176,7 @@
|
|
|
},
|
|
|
{
|
|
|
label: '讲师要求',
|
|
|
- width: '120px',
|
|
|
+ width: '200px',
|
|
|
prop: 'instructorRequire',
|
|
|
},
|
|
|
{
|
|
|
@@ -150,6 +184,26 @@
|
|
|
width: '280px',
|
|
|
prop: 'focusPoint',
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '培训讲师',
|
|
|
+ width: '200px',
|
|
|
+ prop: 'trainInstructor',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '培训日期',
|
|
|
+ width: '120px',
|
|
|
+ prop: 'trainDate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '培训时间',
|
|
|
+ width: '120px',
|
|
|
+ prop: 'specificTime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '申请状态',
|
|
|
+ width: '120px',
|
|
|
+ prop: 'applyType',
|
|
|
+ },
|
|
|
],
|
|
|
deliveryStatusOptions: [],
|
|
|
productLineOptions: [],
|
|
|
@@ -158,6 +212,7 @@
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
userId: 'user/id',
|
|
|
+ roleKeys: 'user/roleKeys',
|
|
|
}),
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -171,12 +226,18 @@
|
|
|
createOrder(val, type) {
|
|
|
this.$refs['order-edit'].showEdit(val, type)
|
|
|
},
|
|
|
+ sureOrder(val, type) {
|
|
|
+ this.$refs['sure'].showEdit(val, type)
|
|
|
+ },
|
|
|
restFetchData() {
|
|
|
this.queryForm.pageNum = 1
|
|
|
this.fetchData()
|
|
|
},
|
|
|
async fetchData() {
|
|
|
this.listLoading = true
|
|
|
+ if (this.roleKeys.includes('SalesEngineer')) {
|
|
|
+ this.queryForm.createdBy = this.userId
|
|
|
+ }
|
|
|
const params = { ...this.queryForm }
|
|
|
const [err, res] = await to(Api.getList({ ...params }))
|
|
|
this.listLoading = false
|