|
@@ -57,6 +57,19 @@
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="物料名称">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="100"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="简图">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover placement="right" title="" trigger="hover">
|
|
|
+ <img :src="scope.row.simplePic" style="height: 400px;width: 500px">
|
|
|
+ <img slot="reference" :src="scope.row.simplePic" :alt="scope.row.simplePic" style="max-height: 50px;max-width: 130px">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="productSpecifications"
|
|
|
header-align="center"
|
|
@@ -138,19 +151,6 @@
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="主图号">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="100"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="简图">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-for="(item, index) in scope.row.attachList2" style="display: inline">
|
|
|
- <span v-if="index > 0">,</span>
|
|
|
- <a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="noticeChangeRecord"
|
|
|
header-align="center"
|
|
@@ -178,12 +178,20 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="techName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="100"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="工艺名称">
|
|
|
+ label="对应工艺">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.techId" type="text" size="small" @click="techDetails(scope.row.techId)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="生产明细">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.prodProductionList || scope.row.prodProductionList.length === 0" type="text" size="small" @click="productListHandle(scope.row)">查看</el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="relatedProduct"
|
|
@@ -212,6 +220,15 @@
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="备注">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="prodState"
|
|
|
+ header-align="center"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ :formatter="formatState"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="状态">
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</e-desc>
|
|
|
<e-desc title="任务工单派发">
|
|
@@ -300,6 +317,8 @@
|
|
|
<preview-component v-if="previewVisible" ref="preview"/>
|
|
|
<product-draw-detail-dialog v-if="drawVisible" ref="drawDetail"/>
|
|
|
<attach-detail-dialog v-if="attachVisible" ref="attachDetail"/>
|
|
|
+ <crafts-detail-dialog v-if="craftsVisible" ref="craftsDetail"/>
|
|
|
+ <prod-management-details-dialog v-if="prodVisible" ref="prodDetail"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -314,9 +333,15 @@
|
|
|
import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
import ProductDrawDetailDialog from '@/views/modules/tech/product-draw-detail-dialog'
|
|
|
import AttachDetailDialog from '@/views/modules/common/attach-detail-dialog'
|
|
|
+ import { downloadUrl } from '@/api/file'
|
|
|
+ import CraftsDetailDialog from '@/views/modules/tech/crafts-detail-dialog'
|
|
|
+ import {optionsMaterialState} from '@/utils/enums'
|
|
|
+ import ProdManagementDetailsDialog from '@/views/modules/production/prod-management-details-dialog'
|
|
|
export default {
|
|
|
name: 'order-detail',
|
|
|
components: {
|
|
|
+ ProdManagementDetailsDialog,
|
|
|
+ CraftsDetailDialog,
|
|
|
AttachDetailDialog,
|
|
|
ProductDrawDetailDialog,
|
|
|
PreviewComponent,
|
|
@@ -338,7 +363,10 @@ export default {
|
|
|
stepList: [],
|
|
|
logList: [],
|
|
|
drawVisible: false,
|
|
|
- attachVisible: false
|
|
|
+ attachVisible: false,
|
|
|
+ craftsVisible: false,
|
|
|
+ optionsState: optionsMaterialState,
|
|
|
+ prodVisible: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -374,6 +402,14 @@ export default {
|
|
|
// 任务单物料明细
|
|
|
if (data.data.saleROrderProductList) {
|
|
|
this.productDetails = data.data.saleROrderProductList
|
|
|
+ // 简图格式调整
|
|
|
+ this.productDetails.forEach(item => {
|
|
|
+ if (item.attachList2 && item.attachList2.length > 0) {
|
|
|
+ item.simplePic = downloadUrl + item.attachList2[0].url
|
|
|
+ } else {
|
|
|
+ item.simplePic = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
// 任务工单派发
|
|
|
if (data.data.workInfoList) {
|
|
@@ -414,6 +450,13 @@ export default {
|
|
|
loadingData (row, treeNode, resolve) {
|
|
|
getChildren(row.productId).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
+ data.data.forEach(item => {
|
|
|
+ if (item.attachList2 && item.attachList2.length > 0) {
|
|
|
+ item.simplePic = downloadUrl + item.attachList2[0].url
|
|
|
+ } else {
|
|
|
+ item.simplePic = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
resolve(data.data)
|
|
|
} else {
|
|
|
this.$message.error(data.msg)
|
|
@@ -426,6 +469,26 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.attachDetail.init(row.attachList)
|
|
|
})
|
|
|
+ },
|
|
|
+ // 对应工艺
|
|
|
+ techDetails (id) {
|
|
|
+ this.craftsVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.craftsDetail.init(id)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 格式化物料状态
|
|
|
+ formatState (row) {
|
|
|
+ if (!row.prodState) return ''
|
|
|
+ const item1 = this.optionsState.find((item) => item.code === row.prodState.toString())
|
|
|
+ return item1 ? item1.value : ''
|
|
|
+ },
|
|
|
+ // 查看生产明细
|
|
|
+ productListHandle (row) {
|
|
|
+ this.prodVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.prodDetail.init(row.prodProductionList)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|