|
@@ -216,8 +216,16 @@
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="80"
|
|
|
+ :formatte="formatTaskType"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="工单类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ taskTypeOption.findIndex((t) => t.value == scope.row.taskType) > -1
|
|
|
+ ? taskTypeOption.find((t) => t.value == scope.row.taskType).label
|
|
|
+ : ''
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="taskName"
|
|
@@ -243,7 +251,7 @@
|
|
|
label="工单内容">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="receiver"
|
|
|
+ prop="receiverName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="100"
|
|
@@ -254,6 +262,7 @@
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="80"
|
|
|
+ :formatter="formatDate"
|
|
|
label="要求完成时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -298,7 +307,7 @@
|
|
|
<el-button v-if="!display" type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
|
</span>
|
|
|
<add-or-update v-if="productListVisible" ref="productList" @addItem="addItem" />
|
|
|
- <worder-add-or-update v-if="worderListVisible" ref="worderList" :userMultiple="true" @submit="addWorkItem"/>
|
|
|
+ <worder-add-or-update v-if="worderListVisible" ref="worderList" :userMultiple="true" @submitArray="addWorkItems"/>
|
|
|
<!-- 文件预览 -->
|
|
|
<preview-component v-if="previewVisible" ref="preview"/>
|
|
|
</div>
|
|
@@ -308,13 +317,14 @@
|
|
|
import { getOrderDetail } from '@/api/sale'
|
|
|
import UserComponent from '../common/user-component'
|
|
|
import UploadComponent from '../common/upload-component'
|
|
|
- import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
+ import { dealStepData, dealStepLogs, dateToString } from '@/api/util'
|
|
|
import CusComponent from '../common/cus-component'
|
|
|
import AddOrUpdate from '../product/template-add-or-update'
|
|
|
import WorderAddOrUpdate from '../worder/add-or-update-dialog'
|
|
|
import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
+ import {taskTypeOption} from '@/utils/enums'
|
|
|
|
|
|
- export default {
|
|
|
+export default {
|
|
|
name: 'order-add-or-update',
|
|
|
components: {PreviewComponent, WorderAddOrUpdate, CusComponent, UploadComponent, UserComponent, AddOrUpdate},
|
|
|
computed: {
|
|
@@ -342,7 +352,8 @@
|
|
|
deliveryDate: [{ required: true, message: '合同交期不能为空', trigger: 'change' }]
|
|
|
},
|
|
|
stepList: [],
|
|
|
- logList: []
|
|
|
+ logList: [],
|
|
|
+ taskTypeOption: taskTypeOption
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -412,6 +423,12 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ addWorkItems (items) {
|
|
|
+ if (!items) return
|
|
|
+ items.forEach(item => {
|
|
|
+ this.addWorkItem(item)
|
|
|
+ })
|
|
|
+ },
|
|
|
addWorkItem (item) {
|
|
|
this.worderListVisible = false
|
|
|
if (!item.recordId) {
|
|
@@ -529,6 +546,10 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.preview.init(fileName, url)
|
|
|
})
|
|
|
+ },
|
|
|
+ formatDate (row) {
|
|
|
+ if (!row || !row.planCompletionTime) return ''
|
|
|
+ return dateToString(row.planCompletionTime, 'yyyy-MM-dd')
|
|
|
}
|
|
|
}
|
|
|
}
|