|
@@ -271,7 +271,11 @@
|
|
|
label="工单类型"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.taskTypeName }}</span>
|
|
|
+ <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
|
|
@@ -290,7 +294,11 @@
|
|
|
label="级别"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.rankTypeName }}</span>
|
|
|
+ <span>{{
|
|
|
+ rankTypeOption.findIndex((t) => t.value == scope.row.ranks) > -1
|
|
|
+ ? rankTypeOption.find((t) => t.value == scope.row.ranks).label
|
|
|
+ : ''
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -314,7 +322,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="attachList"
|
|
|
+ prop="attachListVo"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="150"
|
|
@@ -323,11 +331,11 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
:disabled="
|
|
|
- !scope.row.attachList || scope.row.attachList.length === 0
|
|
|
+ !scope.row.attachListVo || scope.row.attachListVo.length === 0
|
|
|
"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- @click="attachDetails(scope.row.attachList)"
|
|
|
+ @click="attachDetails(scope.row.attachListVo)"
|
|
|
>查看</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -395,9 +403,10 @@
|
|
|
import { getCustomer, getCoDetail } from '@/api/cus'
|
|
|
import { getDictList } from '@/api/dict'
|
|
|
import uploadComponent from '../common/upload-component-v2'
|
|
|
-import AddOrUpdate from '../product/template-add-or-update'
|
|
|
+import AddOrUpdate from '../product/template-add-or-update-v2'
|
|
|
import WorderAddOrUpdate from '../worder/add-or-update'
|
|
|
import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
+import { taskTypeOption, rankTypeOption } from '@/utils/enums'
|
|
|
export default {
|
|
|
name: 'communicate-add-or-update',
|
|
|
components: {
|
|
@@ -433,19 +442,8 @@ export default {
|
|
|
cusRCommProductVOS: [],
|
|
|
workInfoList: [],
|
|
|
dataForm: {},
|
|
|
- taskTypeOption: [
|
|
|
- { label: '开始', value: 'start' },
|
|
|
- { label: '生产', value: 'produce' },
|
|
|
- { label: '检验', value: 'check' },
|
|
|
- { label: '总检', value: 't-check' },
|
|
|
- { label: '结束', value: 'end' },
|
|
|
- { label: '常规', value: 'routine' }
|
|
|
- ],
|
|
|
- rankTypeOption: [
|
|
|
- { label: '普通', value: 1 },
|
|
|
- { label: '紧急', value: 2 },
|
|
|
- { label: '加急', value: 3 }
|
|
|
- ],
|
|
|
+ taskTypeOption: taskTypeOption,
|
|
|
+ rankTypeOption: rankTypeOption,
|
|
|
dataRule: {
|
|
|
cusId: [
|
|
|
{ required: true, message: '客户名称不能为空', trigger: 'blur' }
|
|
@@ -510,14 +508,30 @@ export default {
|
|
|
this.detailVisible = false
|
|
|
}
|
|
|
// 附件显示
|
|
|
- this.fileList = []
|
|
|
- data.data.attachList.forEach((item) => {
|
|
|
- this.fileList.push({
|
|
|
- name: item.fileName,
|
|
|
- url: item.url,
|
|
|
- id: item.url
|
|
|
+ if (this.dataForm.attachListTechnical) {
|
|
|
+ this.dataForm.attachListTechnical.forEach((item) => {
|
|
|
+ item.name = item.fileName
|
|
|
+ item.id = item.url
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
+ if (this.dataForm.attachListDrawing) {
|
|
|
+ this.dataForm.attachListDrawing.forEach((item) => {
|
|
|
+ item.name = item.fileName
|
|
|
+ item.id = item.url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.dataForm.attachList) {
|
|
|
+ this.dataForm.attachList.forEach((item) => {
|
|
|
+ item.name = item.fileName
|
|
|
+ item.id = item.url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.dataForm.attachListOther) {
|
|
|
+ this.dataForm.attachListOther.forEach((item) => {
|
|
|
+ item.name = item.fileName
|
|
|
+ item.id = item.url
|
|
|
+ })
|
|
|
+ }
|
|
|
if (data.data.cusRCommProductVOS) {
|
|
|
data.data.cusRCommProductVOS.forEach((item) => {
|
|
|
this.addItem(item)
|
|
@@ -655,14 +669,15 @@ export default {
|
|
|
},
|
|
|
updateWorderHandle (row) {
|
|
|
this.worderVisible = true
|
|
|
+ row.attachList = row.attachListVo
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.worder.init(1, row)
|
|
|
})
|
|
|
},
|
|
|
attachDetails (attachList) {
|
|
|
- attachList.forEach((item) => {
|
|
|
- item.fileName = item.name
|
|
|
- })
|
|
|
+ // attachList.forEach((item) => {
|
|
|
+ // item.fileName = item.name
|
|
|
+ // })
|
|
|
this.$refs.attachDetail.init(attachList)
|
|
|
}
|
|
|
}
|