|
|
@@ -0,0 +1,129 @@
|
|
|
+<template>
|
|
|
+ <div style="height: 100%">
|
|
|
+ <el-table v-loading="listLoading" border :data="list" height="calc(100% - 42px)">
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in columns"
|
|
|
+ :key="index"
|
|
|
+ align="center"
|
|
|
+ :label="item.label"
|
|
|
+ :min-width="item.width"
|
|
|
+ :prop="item.prop"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button v-if="item.prop === 'orderCode'" style="font-size: 14px" type="text" @click="handleDetail(row)">
|
|
|
+ {{ row.orderCode }}
|
|
|
+ </el-button>
|
|
|
+ <span v-else-if="item.prop === 'orderType'">
|
|
|
+ {{ row.orderType == '10' ? '软件' : '硬件' }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.prop === 'product'">
|
|
|
+ {{ selectDictLabel(productLineOptions, row.product) }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.prop === 'orderStatus'">
|
|
|
+ {{ selectDictLabel(deliveryStatusOptions, row.orderStatus) }}
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.prop === 'createdTime'">
|
|
|
+ {{ parseTime(row.createdTime, '{y}-{m}-{d}') }}
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ row[item.prop] }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import deliverApi from '@/api/work/deliver'
|
|
|
+ import to from 'await-to-js'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'DetailsDeliver',
|
|
|
+ props: {
|
|
|
+ details: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ listLoading: false,
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ label: '交付工单号',
|
|
|
+ width: '160px',
|
|
|
+ prop: 'orderCode',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '交付状态',
|
|
|
+ width: '160px',
|
|
|
+ prop: 'orderStatus',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '交付类型',
|
|
|
+ width: '160px',
|
|
|
+ prop: 'orderType',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目经理',
|
|
|
+ width: '160px',
|
|
|
+ prop: 'projectManName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '交付经理',
|
|
|
+ width: '160px',
|
|
|
+ prop: 'deliverManName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '产品线',
|
|
|
+ width: 'auto',
|
|
|
+ prop: 'product',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '完成信息',
|
|
|
+ width: 'auto',
|
|
|
+ prop: 'finishRemark',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建时间',
|
|
|
+ width: 'auto',
|
|
|
+ prop: 'createdTime',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ list: [],
|
|
|
+ deliveryStatusOptions: [],
|
|
|
+ productLineOptions: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getOptions()
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getOptions() {
|
|
|
+ Promise.all([this.getDicts('delivery_status'), this.getDicts('sys_product_line')])
|
|
|
+ .then(([deliveryStatus, productLine]) => {
|
|
|
+ this.deliveryStatusOptions = deliveryStatus.data.values || []
|
|
|
+ this.productLineOptions = productLine.data.values || []
|
|
|
+ })
|
|
|
+ .catch((err) => console.log(err))
|
|
|
+ },
|
|
|
+ handleDetail(row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/work/deliveryPlan',
|
|
|
+ query: {
|
|
|
+ id: row.id,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async fetchData() {
|
|
|
+ this.listLoading = true
|
|
|
+ let params = { contractId: this.details.id, pageNum: 0 }
|
|
|
+ const [err, res] = await to(deliverApi.getDeliverOrderList(params))
|
|
|
+ if (err) return (this.listLoading = false)
|
|
|
+ this.list = res.data.list || []
|
|
|
+ this.total = res.data.total
|
|
|
+ this.listLoading = false
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|