Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -8,6 +8,7 @@ import javax.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 投诉受理单主业务对象 ts_complaint_accept
|
||||
@@ -33,6 +34,8 @@ public class TsComplaintAcceptBo extends BaseEntity {
|
||||
/**
|
||||
* 投诉日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date complaintDate;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -17,7 +18,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TsComplaintAcceptVo {
|
||||
public class TsComplaintAcceptVo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
39
klp-ui/src/api/flow/acceptCoilRel.js
Normal file
39
klp-ui/src/api/flow/acceptCoilRel.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listAcceptCoilRel(query) {
|
||||
return request({
|
||||
url: '/flow/acceptCoilRel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getAcceptCoilRel(relId) {
|
||||
return request({
|
||||
url: '/flow/acceptCoilRel/' + relId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function addAcceptCoilRel(data) {
|
||||
return request({
|
||||
url: '/flow/acceptCoilRel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateAcceptCoilRel(data) {
|
||||
return request({
|
||||
url: '/flow/acceptCoilRel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delAcceptCoilRel(relIds) {
|
||||
return request({
|
||||
url: '/flow/acceptCoilRel/' + relIds,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
54
klp-ui/src/api/flow/complaintAccept.js
Normal file
54
klp-ui/src/api/flow/complaintAccept.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listComplaintAccept(query) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getComplaintAccept(acceptId) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept/' + acceptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function addComplaintAccept(data) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateComplaintAccept(data) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delComplaintAccept(acceptIds) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept/' + acceptIds,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function opinionDispatch(acceptId) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept/opinionDispatch/' + acceptId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function feedbackDispatch(acceptId, deptIds) {
|
||||
return request({
|
||||
url: '/flow/complaintAccept/feedbackDispatch',
|
||||
method: 'post',
|
||||
params: { acceptId, deptIds }
|
||||
})
|
||||
}
|
||||
39
klp-ui/src/api/flow/complaintTask.js
Normal file
39
klp-ui/src/api/flow/complaintTask.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listComplaintTask(query) {
|
||||
return request({
|
||||
url: '/flow/complaintTask/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getComplaintTask(taskId) {
|
||||
return request({
|
||||
url: '/flow/complaintTask/' + taskId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function addComplaintTask(data) {
|
||||
return request({
|
||||
url: '/flow/complaintTask',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateComplaintTask(data) {
|
||||
return request({
|
||||
url: '/flow/complaintTask',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delComplaintTask(taskIds) {
|
||||
return request({
|
||||
url: '/flow/complaintTask/' + taskIds,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
39
klp-ui/src/api/flow/planExecuteRel.js
Normal file
39
klp-ui/src/api/flow/planExecuteRel.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listPlanExecuteRel(query) {
|
||||
return request({
|
||||
url: '/flow/planExecuteRel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getPlanExecuteRel(relId) {
|
||||
return request({
|
||||
url: '/flow/planExecuteRel/' + relId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function addPlanExecuteRel(data) {
|
||||
return request({
|
||||
url: '/flow/planExecuteRel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updatePlanExecuteRel(data) {
|
||||
return request({
|
||||
url: '/flow/planExecuteRel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delPlanExecuteRel(relIds) {
|
||||
return request({
|
||||
url: '/flow/planExecuteRel/' + relIds,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
<style scoped>
|
||||
.file-list-container {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
/* min-height: 100px; */
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
@@ -142,7 +142,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
padding: 4px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
<div style="font-weight: bold; margin-bottom: 10px; font-size: 14px;">产品表列配置</div>
|
||||
<el-checkbox v-model="selectAllColumns" :indeterminate="columnIndeterminate" @change="handleSelectAllColumns"
|
||||
style="margin-bottom: 8px;">全选</el-checkbox>
|
||||
<div v-for="col in columnConfigs" :key="col.key" style="margin-bottom: 6px;">
|
||||
<el-checkbox v-model="col.checked" @change="onColumnChange">{{ col.label }}</el-checkbox>
|
||||
<div v-for="col in columnConfigs" :key="col.key" style="margin-bottom: 6px; display: flex; align-items: center; gap: 4px;">
|
||||
<el-checkbox v-model="col.checked" @change="onColumnChange" style="flex-shrink: 0;"></el-checkbox>
|
||||
<el-input v-model="col.label" size="mini" style="flex: 1; min-width: 0;" @change="generatePreviewHtml"></el-input>
|
||||
</div>
|
||||
<el-button size="mini" style="margin-bottom: 8px;" @click="resetColumnLabels">重置表头</el-button>
|
||||
<el-divider />
|
||||
<div style="font-weight: bold; margin-bottom: 10px; font-size: 14px;">附加行配置</div>
|
||||
<el-checkbox v-model="selectAllRows" :indeterminate="rowIndeterminate" @change="handleSelectAllRows"
|
||||
@@ -77,16 +79,16 @@ export default {
|
||||
selectAllColumns: true,
|
||||
columnIndeterminate: false,
|
||||
columnConfigs: [
|
||||
{ key: 'spec', label: '规格(mm)', checked: true },
|
||||
{ key: 'material', label: '材质', checked: true },
|
||||
{ key: 'quantity', label: '数量(吨)', checked: true },
|
||||
{ key: 'taxPrice', label: '含税单价(元/吨)', checked: true },
|
||||
{ key: 'taxDivisor', label: '税率除数', checked: true },
|
||||
{ key: 'noTaxPrice', label: '无税单价(元/吨)', checked: true },
|
||||
{ key: 'taxTotal', label: '含税总额(元)', checked: true },
|
||||
{ key: 'noTaxTotal', label: '无税总额(元)', checked: true },
|
||||
{ key: 'taxAmount', label: '税额(元)', checked: true },
|
||||
{ key: 'remark', label: '备注', checked: true },
|
||||
{ key: 'spec', label: '规格(mm)', defaultLabel: '规格(mm)', checked: true },
|
||||
{ key: 'material', label: '材质', defaultLabel: '材质', checked: true },
|
||||
{ key: 'quantity', label: '数量(吨)', defaultLabel: '数量(吨)', checked: true },
|
||||
{ key: 'taxPrice', label: '含税单价(元/吨)', defaultLabel: '含税单价(元/吨)', checked: true },
|
||||
{ key: 'taxDivisor', label: '税率除数', defaultLabel: '税率除数', checked: true },
|
||||
{ key: 'noTaxPrice', label: '无税单价(元/吨)', defaultLabel: '无税单价(元/吨)', checked: true },
|
||||
{ key: 'taxTotal', label: '含税总额(元)', defaultLabel: '含税总额(元)', checked: true },
|
||||
{ key: 'noTaxTotal', label: '无税总额(元)', defaultLabel: '无税总额(元)', checked: true },
|
||||
{ key: 'taxAmount', label: '税额(元)', defaultLabel: '税额(元)', checked: true },
|
||||
{ key: 'remark', label: '备注', defaultLabel: '备注', checked: true },
|
||||
],
|
||||
selectAllRows: true,
|
||||
rowIndeterminate: false,
|
||||
@@ -120,6 +122,10 @@ export default {
|
||||
this.columnIndeterminate = false;
|
||||
this.generatePreviewHtml();
|
||||
},
|
||||
resetColumnLabels() {
|
||||
this.columnConfigs.forEach(col => { col.label = col.defaultLabel; });
|
||||
this.generatePreviewHtml();
|
||||
},
|
||||
onColumnChange() {
|
||||
const checkedCount = this.columnConfigs.filter(c => c.checked).length;
|
||||
this.selectAllColumns = checkedCount === this.columnConfigs.length;
|
||||
@@ -143,17 +149,24 @@ export default {
|
||||
const hasCol = (key) => activeCols.some(c => c.key === key);
|
||||
const hasRow = (key) => activeRows.some(r => r.key === key);
|
||||
|
||||
const colWidthMap = {
|
||||
spec: 80,
|
||||
material: 60,
|
||||
quantity: 55,
|
||||
taxPrice: 70,
|
||||
taxDivisor: 45,
|
||||
noTaxPrice: 70,
|
||||
taxTotal: 70,
|
||||
noTaxTotal: 70,
|
||||
taxAmount: 55,
|
||||
remark: 80,
|
||||
};
|
||||
|
||||
let headerCells = '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:30px;">序号</th>';
|
||||
if (hasCol('spec')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:80px;">规格(mm)</th>';
|
||||
if (hasCol('material')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:60px;">材质</th>';
|
||||
if (hasCol('quantity')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:55px;">数量(吨)</th>';
|
||||
if (hasCol('taxPrice')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:70px;">含税单价(元/吨)</th>';
|
||||
if (hasCol('taxDivisor')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:45px;">税率除数</th>';
|
||||
if (hasCol('noTaxPrice')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:70px;">无税单价(元/吨)</th>';
|
||||
if (hasCol('taxTotal')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:70px;">含税总额(元)</th>';
|
||||
if (hasCol('noTaxTotal')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:70px;">无税总额(元)</th>';
|
||||
if (hasCol('taxAmount')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:55px;">税额(元)</th>';
|
||||
if (hasCol('remark')) headerCells += '<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:80px;">备注</th>';
|
||||
activeCols.forEach(col => {
|
||||
const width = colWidthMap[col.key] || 60;
|
||||
headerCells += `<th style="border:1px solid #000;padding:5px 6px;font-weight:bold;width:${width}px;">${col.label}</th>`;
|
||||
});
|
||||
const colCount = activeCols.length + 1;
|
||||
|
||||
let bodyRows = '';
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
<!-- 第二行为表头 -->
|
||||
<div class="table-row">
|
||||
<div class="table-cell">序号</div>
|
||||
<div class="table-cell">规格(mm)</div>
|
||||
<div class="table-cell">规格<br>(mm)</div>
|
||||
<div class="table-cell">材质</div>
|
||||
<div class="table-cell">数量(吨)</div>
|
||||
<div class="table-cell">含税单价(元/吨)</div>
|
||||
<div class="table-cell">数量<br>(吨)</div>
|
||||
<div class="table-cell">含税单价<br>(元/吨)</div>
|
||||
<div class="table-cell">税率除数</div>
|
||||
<div class="table-cell">无税单价(元/吨)</div>
|
||||
<div class="table-cell">含税总额(元)</div>
|
||||
<div class="table-cell">无税总额(元)</div>
|
||||
<div class="table-cell">税额(元)</div>
|
||||
<div class="table-cell">无税单价<br>(元/吨)</div>
|
||||
<div class="table-cell">含税总额<br>(元)</div>
|
||||
<div class="table-cell">无税总额<br>(元)</div>
|
||||
<div class="table-cell">税额<br>(元)</div>
|
||||
<div class="table-cell">
|
||||
备注
|
||||
<el-button v-if="!readonly" type="primary" size="mini" icon="el-icon-plus" @click="addProduct"
|
||||
@@ -343,12 +343,11 @@ export default {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: grid;
|
||||
grid-template-columns: 45px 100px 90px 75px 100px 90px 100px 110px 110px 110px 1fr;
|
||||
grid-template-columns: 45px 100px 100px 90px 100px 90px 110px 110px 110px 110px 1fr;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ export default {
|
||||
{ label: '逻辑库位', key: 'warehouseName' },
|
||||
{ label: '实际库区', key: 'actualWarehouseName' },
|
||||
{ label: '班组', key: 'team' },
|
||||
{ label: '业务员', key: 'saleName' },
|
||||
{ label: '材料类型', key: 'materialType' },
|
||||
{ label: '物料名', key: 'itemName' },
|
||||
{ label: '规格', key: 'specification' },
|
||||
|
||||
@@ -61,7 +61,7 @@ graph TD
|
||||
|
||||
steelFullChain: `
|
||||
graph TD
|
||||
A["<b>销售部创建合同</b><br/>录入成品钢卷<br/>规格/数量/技术标准"]:::s1
|
||||
A["<b>销售部创建合同</b><br/>录入产品所需内容<br/>规格/数量/技术标准"]:::s1
|
||||
|
||||
A --> B["<b>原料卷到货</b>"]:::s2
|
||||
B --> C["<b>入库验收</b>"]:::s2
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="detail-section">
|
||||
<div class="detail-section-label">投诉情况</div>
|
||||
<div class="detail-section-text">{{ data.complaintContent || '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-section">
|
||||
<div class="detail-section-label">客户诉求</div>
|
||||
<div class="detail-section-text">{{ data.customerDemand || '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-section" v-if="data.file">
|
||||
<div class="detail-section-label">凭证文件</div>
|
||||
<FileList :ossIds="data.file" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FileList from "@/components/FileList/index.vue";
|
||||
|
||||
export default {
|
||||
name: 'BasicInfoSection',
|
||||
components: { FileList },
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.detail-section {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.detail-section-label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #909399;
|
||||
margin-bottom: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.detail-section-text {
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
line-height: 1.6;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="section-title">
|
||||
<span>关联钢卷</span>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="$emit('refresh')" title="刷新关联钢卷"></el-button>
|
||||
<slot name="selector"></slot>
|
||||
</div>
|
||||
<el-table :data="coilList" border size="small" v-loading="loading" v-if="loading || coilList.length > 0" style="width: 100%">
|
||||
<el-table-column label="当前卷号" align="center" prop="coilInfo.currentCoilNo" min-width="140" fixed />
|
||||
<el-table-column label="原料卷号" align="center" prop="coilInfo.enterCoilNo" width="120" />
|
||||
<el-table-column label="厂家卷号" align="center" prop="coilInfo.supplierCoilNo" width="140" show-overflow-tooltip />
|
||||
<el-table-column label="物料名称" align="center" prop="coilInfo.itemName" width="100" />
|
||||
<el-table-column label="规格" align="center" prop="coilInfo.specification" width="100" />
|
||||
<el-table-column label="材质" align="center" prop="coilInfo.material" width="100" />
|
||||
<el-table-column label="厂家" align="center" prop="coilInfo.manufacturer" width="90" />
|
||||
<el-table-column label="净重(t)" align="center" prop="coilInfo.netWeight" width="80" />
|
||||
<el-table-column label="质量状态" align="center" prop="coilInfo.qualityStatus" width="90">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag v-if="scope.row.coilInfo.qualityStatus" :options="dict.type.coil_quality_status" :value="scope.row.coilInfo.qualityStatus"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="coilInfo.remark" width="140" show-overflow-tooltip />
|
||||
<el-table-column v-if="editable" label="操作" align="center" width="70" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="$emit('remove', scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div v-else class="empty-data">暂无关联钢卷</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CoilInfoSection',
|
||||
dicts: ['coil_quality_status'],
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
editable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
coilList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 20px 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="section-title">合同信息</div>
|
||||
<el-table :data="contractList" border size="small" v-if="contractList.length > 0" style="width: 100%">
|
||||
<el-table-column label="合同编号" align="center" prop="contractCode" width="160" show-overflow-tooltip />
|
||||
<el-table-column label="合同名称" align="center" prop="contractName" width="140" show-overflow-tooltip />
|
||||
<el-table-column label="客户" align="center" prop="customer" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="供应商" align="center" prop="supplier" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="业务员" align="center" prop="salesman" width="80" />
|
||||
<el-table-column label="订单金额" align="center" prop="orderAmount" width="100" />
|
||||
<el-table-column label="签订时间" align="center" prop="signTime" width="120">
|
||||
<template slot-scope="scope">{{ parseTime(scope.row.signTime, '{y}-{m}-{d}') }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货日期" align="center" prop="deliveryDate" width="120">
|
||||
<template slot-scope="scope">{{ parseTime(scope.row.deliveryDate, '{y}-{m}-{d}') }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div v-else class="empty-data">暂无合同信息</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ContractInfoSection',
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
coilList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
contractList() {
|
||||
const map = new Map();
|
||||
(this.coilList || []).forEach(rel => {
|
||||
const orders = (rel.coilInfo && rel.coilInfo.orderList) || [];
|
||||
orders.forEach(order => {
|
||||
if (order.contractCode && !map.has(order.contractCode)) {
|
||||
map.set(order.contractCode, order);
|
||||
}
|
||||
});
|
||||
});
|
||||
return Array.from(map.values());
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 20px 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="section-title">
|
||||
<span>部门处理意见</span>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="$emit('refresh')" title="刷新部门处理意见"></el-button>
|
||||
</div>
|
||||
<div v-if="taskList.length > 0" class="card-grid">
|
||||
<div v-for="item in taskList" :key="item.taskId" class="invoice-card">
|
||||
<div class="invoice-row">
|
||||
<span class="invoice-dept">{{ getDeptName(item.deptId) }}</span>
|
||||
<el-tag v-if="item.taskStatus === 0" type="warning" size="mini">待填写</el-tag>
|
||||
<el-tag v-else-if="item.taskStatus === 1" type="success" size="mini">已完成</el-tag>
|
||||
</div>
|
||||
<hr class="invoice-divider" />
|
||||
<div class="invoice-body">
|
||||
<div v-if="item.deptOpinion" class="invoice-content" v-html="item.deptOpinion"></div>
|
||||
<div v-else class="invoice-empty">暂无意见</div>
|
||||
<div v-if="item.fillFile" class="invoice-file">
|
||||
<FileList :ossIds="item.fillFile" />
|
||||
</div>
|
||||
</div>
|
||||
<hr class="invoice-divider" />
|
||||
<div class="invoice-meta">
|
||||
<span v-if="item.fillNo" class="invoice-meta-item"><i class="el-icon-document"></i> {{ item.fillNo }}</span>
|
||||
<span v-if="item.fillTime" class="invoice-meta-item"><i class="el-icon-time"></i> {{ parseTime(item.fillTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty-data">暂无部门处理意见</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FileList from "@/components/FileList/index.vue";
|
||||
|
||||
export default {
|
||||
name: 'DepartmentOpinionSection',
|
||||
components: { FileList },
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
taskList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDeptName(deptId) {
|
||||
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
|
||||
return map[deptId] || '部门' + deptId;
|
||||
},
|
||||
parseTime(time, option) {
|
||||
if (!time) return '-';
|
||||
const date = new Date(time);
|
||||
if (isNaN(date.getTime())) return time;
|
||||
const formatStr = option || '{y}-{m}-{d} {h}:{i}:{s}';
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1;
|
||||
const day = date.getDate();
|
||||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
const seconds = date.getSeconds();
|
||||
return formatStr.replace('{y}', year)
|
||||
.replace('{m}', month < 10 ? '0' + month : month)
|
||||
.replace('{d}', day < 10 ? '0' + day : day)
|
||||
.replace('{h}', hours < 10 ? '0' + hours : hours)
|
||||
.replace('{i}', minutes < 10 ? '0' + minutes : minutes)
|
||||
.replace('{s}', seconds < 10 ? '0' + seconds : seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 20px 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.card-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
.invoice-card {
|
||||
flex: 0 0 calc((100% - 20px) / 3);
|
||||
background: #fff;
|
||||
border: 1px solid #e8eaec;
|
||||
border-left: 3px solid #409eff;
|
||||
border-radius: 2px;
|
||||
padding: 10px 12px 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.invoice-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.invoice-dept {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
.invoice-divider {
|
||||
border: none;
|
||||
border-top: 1px dashed #dcdfe6;
|
||||
margin: 6px 0;
|
||||
}
|
||||
.invoice-body {
|
||||
flex: 1;
|
||||
}
|
||||
.invoice-content {
|
||||
font-size: 12px;
|
||||
color: #606266;
|
||||
line-height: 1.6;
|
||||
word-break: break-all;
|
||||
max-height: 80px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.invoice-content /deep/ p {
|
||||
margin: 0;
|
||||
}
|
||||
.invoice-empty {
|
||||
color: #c0c4cc;
|
||||
font-size: 12px;
|
||||
}
|
||||
.invoice-file {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.invoice-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.invoice-meta-item {
|
||||
font-size: 11px;
|
||||
color: #909399;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.invoice-meta-item i {
|
||||
font-size: 11px;
|
||||
}
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="section-title">
|
||||
<span>执行反馈</span>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="$emit('refresh')" title="刷新执行反馈"></el-button>
|
||||
</div>
|
||||
<div v-if="executeList.length > 0" class="card-grid">
|
||||
<div v-for="item in executeList" :key="item.relId" class="invoice-card">
|
||||
<div class="invoice-row">
|
||||
<span class="invoice-dept">{{ getDeptName(item.deptId) }}</span>
|
||||
<el-tag v-if="item.executeStatus === 0" type="warning" size="mini">待执行</el-tag>
|
||||
<el-tag v-else-if="item.executeStatus === 1" type="success" size="mini">已反馈</el-tag>
|
||||
</div>
|
||||
<hr class="invoice-divider" />
|
||||
<div class="invoice-body">
|
||||
<div v-if="item.executeResult" class="invoice-content" v-html="item.executeResult"></div>
|
||||
<div v-else class="invoice-empty">暂无反馈</div>
|
||||
<div v-if="item.feedbackFile" class="invoice-file">
|
||||
<FileList :ossIds="item.feedbackFile" />
|
||||
</div>
|
||||
</div>
|
||||
<hr class="invoice-divider" />
|
||||
<div class="invoice-meta">
|
||||
<span v-if="item.feedbackNo" class="invoice-meta-item"><i class="el-icon-document"></i> {{ item.feedbackNo }}</span>
|
||||
<span v-if="item.feedbackTime" class="invoice-meta-item"><i class="el-icon-time"></i> {{ parseTime(item.feedbackTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty-data">暂无执行反馈</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FileList from "@/components/FileList/index.vue";
|
||||
|
||||
export default {
|
||||
name: 'ExecutionFeedbackSection',
|
||||
components: { FileList },
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
executeList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDeptName(deptId) {
|
||||
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
|
||||
return map[deptId] || '部门' + deptId;
|
||||
},
|
||||
parseTime(time, option) {
|
||||
if (!time) return '-';
|
||||
const date = new Date(time);
|
||||
if (isNaN(date.getTime())) return time;
|
||||
const formatStr = option || '{y}-{m}-{d} {h}:{i}:{s}';
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1;
|
||||
const day = date.getDate();
|
||||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
const seconds = date.getSeconds();
|
||||
return formatStr.replace('{y}', year)
|
||||
.replace('{m}', month < 10 ? '0' + month : month)
|
||||
.replace('{d}', day < 10 ? '0' + day : day)
|
||||
.replace('{h}', hours < 10 ? '0' + hours : hours)
|
||||
.replace('{i}', minutes < 10 ? '0' + minutes : minutes)
|
||||
.replace('{s}', seconds < 10 ? '0' + seconds : seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 20px 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.card-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
.invoice-card {
|
||||
flex: 0 0 calc((100% - 20px) / 3);
|
||||
background: #fff;
|
||||
border: 1px solid #e8eaec;
|
||||
border-left: 3px solid #409eff;
|
||||
border-radius: 2px;
|
||||
padding: 10px 12px 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.invoice-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.invoice-dept {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
.invoice-divider {
|
||||
border: none;
|
||||
border-top: 1px dashed #dcdfe6;
|
||||
margin: 6px 0;
|
||||
}
|
||||
.invoice-body {
|
||||
flex: 1;
|
||||
}
|
||||
.invoice-content {
|
||||
font-size: 12px;
|
||||
color: #606266;
|
||||
line-height: 1.6;
|
||||
word-break: break-all;
|
||||
max-height: 80px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.invoice-content /deep/ p {
|
||||
margin: 0;
|
||||
}
|
||||
.invoice-empty {
|
||||
color: #c0c4cc;
|
||||
font-size: 12px;
|
||||
}
|
||||
.invoice-file {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.invoice-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.invoice-meta-item {
|
||||
font-size: 11px;
|
||||
color: #909399;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.invoice-meta-item i {
|
||||
font-size: 11px;
|
||||
}
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="section-title">
|
||||
<span>处理方案</span>
|
||||
<el-button v-if="editable && !editing" size="mini" type="text" icon="el-icon-edit" @click="startEdit">编辑</el-button>
|
||||
<template v-if="editing">
|
||||
<el-button size="mini" type="text" icon="el-icon-check" @click="handleSave">保存</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-close" @click="cancelEdit">取消</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="editing">
|
||||
<editor v-model="editContent" :min-height="200" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="content" class="plan-content" v-html="content"></div>
|
||||
<div v-else class="empty-data">暂无处理方案</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HandlingSchemeSection',
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
editable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editing: false,
|
||||
editContent: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
content(val) {
|
||||
if (!this.editing) {
|
||||
this.editContent = val || '';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startEdit() {
|
||||
this.editContent = this.content || '';
|
||||
this.editing = true;
|
||||
},
|
||||
cancelEdit() {
|
||||
this.editing = false;
|
||||
this.editContent = '';
|
||||
},
|
||||
handleSave() {
|
||||
if (!this.editContent) {
|
||||
this.$modal.msgWarning('请输入处理方案');
|
||||
return;
|
||||
}
|
||||
this.$emit('save', this.editContent);
|
||||
this.editing = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-title {
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 20px 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
.plan-content {
|
||||
padding: 8px;
|
||||
background: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<div v-if="enabled" class="section-container">
|
||||
<div class="detail-header">
|
||||
<div class="detail-header-left">
|
||||
<div class="detail-complaint-no">{{ complaintNo }}</div>
|
||||
<el-tag :type="tagType" size="small">{{ flowStatusText }}</el-tag>
|
||||
</div>
|
||||
<div class="detail-header-right">
|
||||
<slot name="actions"></slot>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-meta">
|
||||
<span v-if="meta.createBy" title="创建人"><i class="el-icon-user"></i> 创建人:{{ meta.createBy }}</span>
|
||||
<span v-if="meta.createTime" title="创建时间"><i class="el-icon-time"></i> 创建时间:{{ parseTime(meta.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
<span v-if="meta.updateBy" title="修改人"><i class="el-icon-edit-outline"></i> 修改人:{{ meta.updateBy }}</span>
|
||||
<span v-if="meta.updateTime" title="修改时间"><i class="el-icon-time"></i> 修改时间:{{ parseTime(meta.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
<span v-if="meta.complaintDate" title="投诉日期"><i class="el-icon-date"></i> 投诉日期:{{ parseTime(meta.complaintDate, '{y}-{m}-{d}') }}</span>
|
||||
</div>
|
||||
|
||||
<slot name="basic-info"></slot>
|
||||
<slot name="contract-info"></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HeaderControlSection',
|
||||
props: {
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
complaintNo: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
flowStatus: {
|
||||
type: [Number, String],
|
||||
default: undefined
|
||||
},
|
||||
meta: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
flowStatusText() {
|
||||
const map = {
|
||||
1: '待审核',
|
||||
2: '意见填写中',
|
||||
3: '待汇总方案',
|
||||
4: '执行反馈中',
|
||||
5: '执行完成',
|
||||
6: '全部办结'
|
||||
};
|
||||
return map[this.flowStatus] || '未知';
|
||||
},
|
||||
tagType() {
|
||||
const map = {
|
||||
1: 'info',
|
||||
2: 'warning',
|
||||
3: '',
|
||||
4: 'warning',
|
||||
5: 'success',
|
||||
6: 'success'
|
||||
};
|
||||
return map[this.flowStatus] || '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
parseTime(time, option) {
|
||||
// 假设 parseTime 已全局注册或在此处定义
|
||||
// 为了简洁,这里假设父组件或全局混入了 parseTime
|
||||
// 如果不是,您需要导入或定义它
|
||||
// 这里为了演示,我们尝试使用一个简单的实现或占位符
|
||||
// 在实际项目中,请确保 parseTime 可用
|
||||
if (!time) return '-';
|
||||
const date = new Date(time);
|
||||
if (isNaN(date.getTime())) return time;
|
||||
|
||||
const formatStr = option || '{y}-{m}-{d} {h}:{i}:{s}';
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1;
|
||||
const day = date.getDate();
|
||||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
const seconds = date.getSeconds();
|
||||
|
||||
return formatStr.replace('{y}', year)
|
||||
.replace('{m}', month < 10 ? '0' + month : month)
|
||||
.replace('{d}', day < 10 ? '0' + day : day)
|
||||
.replace('{h}', hours < 10 ? '0' + hours : hours)
|
||||
.replace('{i}', minutes < 10 ? '0' + minutes : minutes)
|
||||
.replace('{s}', seconds < 10 ? '0' + seconds : seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.detail-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.detail-complaint-no {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #303133;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.detail-header-right {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.detail-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
.detail-meta span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.detail-meta i {
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
0
klp-ui/src/views/wms/post/objection/dashboard.vue
Normal file
0
klp-ui/src/views/wms/post/objection/dashboard.vue
Normal file
704
klp-ui/src/views/wms/post/objection/index.vue
Normal file
704
klp-ui/src/views/wms/post/objection/index.vue
Normal file
@@ -0,0 +1,704 @@
|
||||
<template>
|
||||
<div class="app-container objection-container">
|
||||
<DragResizePanel :initialSize="380" :minSize="280" :maxSize="600">
|
||||
<template #panelA>
|
||||
<div class="left-panel">
|
||||
<div class="panel-header">
|
||||
<div class="header-title">
|
||||
<i class="el-icon-s-claim"></i>
|
||||
<span>售后单列表</span>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="getList" style="margin-left:4px;"
|
||||
title="刷新列表"></el-button>
|
||||
</div>
|
||||
<el-select v-model="queryParams.flowStatus" placeholder="全部阶段" clearable size="mini" @change="handleQuery"
|
||||
class="header-filter">
|
||||
<el-option label="待审核" :value="1" />
|
||||
<el-option label="意见填写中" :value="2" />
|
||||
<el-option label="待汇总方案" :value="3" />
|
||||
<el-option label="执行反馈中" :value="4" />
|
||||
<el-option label="执行完成" :value="5" />
|
||||
<el-option label="全部办结" :value="6" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="search-row">
|
||||
<el-input v-model="queryParams.complaintNo" placeholder="搜索售后编号..." clearable prefix-icon="el-icon-search"
|
||||
size="small" @keyup.enter.native="handleQuery" @clear="handleQuery" />
|
||||
<el-button type="primary" size="small" @click="handleAdd">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div v-loading="loading" class="list-body">
|
||||
<div v-for="item in dataList" :key="item.acceptId" class="list-item"
|
||||
:class="{ active: currentRow && currentRow.acceptId === item.acceptId }" @click="handleRowClick(item)">
|
||||
<div class="item-main">
|
||||
<span class="item-title">{{ item.complaintNo }}</span>
|
||||
<span class="item-sub">{{ parseTime(item.complaintDate, '{y}-{m}-{d}') }}</span>
|
||||
</div>
|
||||
<div class="item-meta">
|
||||
<el-tag v-if="item.flowStatus === 1" type="info" size="mini">待审核</el-tag>
|
||||
<el-tag v-else-if="item.flowStatus === 2" type="warning" size="mini">意见填写中</el-tag>
|
||||
<el-tag v-else-if="item.flowStatus === 3" size="mini">待汇总方案</el-tag>
|
||||
<el-tag v-else-if="item.flowStatus === 4" type="warning" size="mini">执行反馈中</el-tag>
|
||||
<el-tag v-else-if="item.flowStatus === 5" type="success" size="mini">执行完成</el-tag>
|
||||
<el-tag v-else-if="item.flowStatus === 6" type="success" size="mini">全部办结</el-tag>
|
||||
</div>
|
||||
<div class="item-actions">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(item)"></el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(item)"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="dataList.length === 0 && !loading" class="list-empty">
|
||||
<i class="el-icon-folder-opened"></i>
|
||||
<span>暂无售后单数据</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-footer">
|
||||
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #panelB>
|
||||
<div class="right-panel">
|
||||
<div v-if="!currentRow" class="empty-tip">
|
||||
<i class="el-icon-info"></i>
|
||||
<span>请在左侧列表中选择一条售后单查看详情</span>
|
||||
</div>
|
||||
<div v-else v-loading="detailLoading" class="detail-content">
|
||||
<HeaderControlSection :complaintNo="currentRow.complaintNo" :flowStatus="currentRow.flowStatus"
|
||||
:meta="currentRow">
|
||||
<template #actions>
|
||||
<el-button v-if="currentRow.flowStatus === 1" size="mini" type="primary" plain
|
||||
icon="el-icon-s-promotion" @click="handleOpinionDispatch">意见下发</el-button>
|
||||
<el-button v-if="currentRow.flowStatus === 3" size="mini" type="warning" plain
|
||||
icon="el-icon-s-promotion" @click="handleFeedbackDispatch">执行下发</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="handleRefreshDetail"
|
||||
title="刷新详情">刷新</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(currentRow)">编辑</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleDelete(currentRow)">删除</el-button>
|
||||
</template>
|
||||
|
||||
<template #basic-info>
|
||||
<BasicInfoSection :data="currentRow" />
|
||||
</template>
|
||||
</HeaderControlSection>
|
||||
|
||||
<el-divider />
|
||||
|
||||
<CoilInfoSection :coilList="coilList" :loading="coilLoading" :editable="currentRow.flowStatus === 1"
|
||||
@refresh="loadCoilList(currentRow.acceptId)"
|
||||
@remove="handleRemoveCoil">
|
||||
<template v-if="currentRow.flowStatus === 1" #selector>
|
||||
<CoilSelector :multiple="true" :filters="{ status: 1 }" @confirm="handleSelectorConfirm"
|
||||
style="margin-left: 4px; display: inline-block;">
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-plus">添加</el-button>
|
||||
</CoilSelector>
|
||||
</template>
|
||||
</CoilInfoSection>
|
||||
|
||||
<div class="section-gap" />
|
||||
<ContractInfoSection :coilList="coilList" />
|
||||
|
||||
<div class="section-gap" />
|
||||
<DepartmentOpinionSection :taskList="taskList" @refresh="refreshTaskList" />
|
||||
|
||||
<div class="section-gap" />
|
||||
<HandlingSchemeSection :content="currentRow.planContent" :editable="currentRow.flowStatus === 3" @save="handleSavePlan" />
|
||||
|
||||
<div class="section-gap" />
|
||||
<ExecutionFeedbackSection :executeList="executeList" @refresh="refreshExecuteList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</DragResizePanel>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="售后编号" prop="complaintNo">
|
||||
<el-input v-model="form.complaintNo" placeholder="请输入售后编号" :disabled="!!form.acceptId" />
|
||||
</el-form-item>
|
||||
<el-form-item label="投诉日期" prop="complaintDate">
|
||||
<el-date-picker clearable v-model="form.complaintDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择投诉日期" style="width:100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="投诉情况" prop="complaintContent">
|
||||
<el-input v-model="form.complaintContent" type="textarea" :rows="4" placeholder="请输入投诉情况描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户诉求" prop="customerDemand">
|
||||
<el-input v-model="form.customerDemand" type="textarea" :rows="3" placeholder="请输入客户诉求" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联钢卷">
|
||||
<CoilSelector :multiple="true" :filters="{ status: 1 }" placeholder="选择钢卷" @confirm="handleCoilConfirm">
|
||||
<el-button type="primary" size="small"><i class="el-icon-search"></i> 选择钢卷</el-button>
|
||||
</CoilSelector>
|
||||
<div v-if="formCoilList.length > 0" style="margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px;">
|
||||
<div v-for="(coil, index) in formCoilList" :key="coil.coilId || index"
|
||||
style="display: flex; align-items: center; gap: 4px;">
|
||||
<CurrentCoilNo :currentCoilNo="coil.currentCoilNo || coil.coilNo || ''" />
|
||||
<el-button type="text" icon="el-icon-close" size="mini" @click="removeCoil(index)"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="凭证文件" prop="file">
|
||||
<file-upload v-model="form.file" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" :rows="2" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="选择下发部门" :visible.sync="deptDialogVisible" width="400px" append-to-body>
|
||||
<el-checkbox-group v-model="selectedDeptIds">
|
||||
<el-checkbox v-for="item in deptOptions" :key="item.deptId" :label="item.deptId">{{ item.deptName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="deptDialogVisible = false">取 消</el-button>
|
||||
<el-button :loading="dispatchLoading" type="primary" @click="confirmFeedbackDispatch">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listComplaintAccept, getComplaintAccept, addComplaintAccept, updateComplaintAccept, delComplaintAccept, opinionDispatch, feedbackDispatch } from "@/api/flow/complaintAccept";
|
||||
import { listComplaintTask } from "@/api/flow/complaintTask";
|
||||
import { listAcceptCoilRel, addAcceptCoilRel, delAcceptCoilRel } from "@/api/flow/acceptCoilRel";
|
||||
import { listPlanExecuteRel } from "@/api/flow/planExecuteRel";
|
||||
import CoilSelector from "@/components/CoilSelector/index.vue";
|
||||
import CurrentCoilNo from "@/components/KLPService/Renderer/CurrentCoilNo.vue";
|
||||
import DragResizePanel from "@/components/DragResizePanel/index.vue";
|
||||
import HeaderControlSection from "./components/HeaderControlSection.vue";
|
||||
import BasicInfoSection from "./components/BasicInfoSection.vue";
|
||||
import ContractInfoSection from "./components/ContractInfoSection.vue";
|
||||
import CoilInfoSection from "./components/CoilInfoSection.vue";
|
||||
import DepartmentOpinionSection from "./components/DepartmentOpinionSection.vue";
|
||||
import HandlingSchemeSection from "./components/HandlingSchemeSection.vue";
|
||||
import ExecutionFeedbackSection from "./components/ExecutionFeedbackSection.vue";
|
||||
|
||||
export default {
|
||||
name: "AftermarketObjection",
|
||||
components: {
|
||||
CoilSelector, CurrentCoilNo, DragResizePanel,
|
||||
HeaderControlSection, BasicInfoSection, ContractInfoSection,
|
||||
CoilInfoSection, DepartmentOpinionSection, HandlingSchemeSection, ExecutionFeedbackSection
|
||||
},
|
||||
dicts: ['coil_quality_status'],
|
||||
data() {
|
||||
return {
|
||||
buttonLoading: false,
|
||||
loading: true,
|
||||
detailLoading: false,
|
||||
coilLoading: false,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
dataList: [],
|
||||
currentRow: null,
|
||||
title: "",
|
||||
open: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
complaintNo: undefined,
|
||||
flowStatus: undefined
|
||||
},
|
||||
form: {},
|
||||
formCoilList: [],
|
||||
coilList: [],
|
||||
taskList: [],
|
||||
executeList: [],
|
||||
deptDialogVisible: false,
|
||||
dispatchLoading: false,
|
||||
selectedDeptIds: [],
|
||||
deptOptions: [
|
||||
{ deptId: 1, deptName: '生产部' },
|
||||
{ deptId: 2, deptName: '质量部' },
|
||||
{ deptId: 3, deptName: '销售部' }
|
||||
],
|
||||
rules: {
|
||||
complaintNo: [{ required: true, message: "请输入售后编号", trigger: "blur" }],
|
||||
complaintDate: [{ required: true, message: "请选择投诉日期", trigger: "blur" }],
|
||||
complaintContent: [{ required: true, message: "请输入投诉情况", trigger: "blur" }],
|
||||
customerDemand: [{ required: true, message: "请输入客户诉求", trigger: "blur" }]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listComplaintAccept(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams.complaintNo = undefined;
|
||||
this.queryParams.flowStatus = undefined;
|
||||
this.handleQuery();
|
||||
},
|
||||
handleRowClick(row) {
|
||||
this.currentRow = row;
|
||||
this.loadDetail(row.acceptId);
|
||||
},
|
||||
loadDetail(acceptId) {
|
||||
this.detailLoading = true;
|
||||
getComplaintAccept(acceptId).then(response => {
|
||||
this.currentRow = response.data;
|
||||
this.loadRelData(acceptId);
|
||||
}).finally(() => { this.detailLoading = false; });
|
||||
},
|
||||
loadRelData(acceptId) {
|
||||
this.loadCoilList(acceptId);
|
||||
listComplaintTask({ acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.taskList = r.rows || [];
|
||||
});
|
||||
listPlanExecuteRel({ acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.executeList = r.rows || [];
|
||||
});
|
||||
},
|
||||
loadCoilList(acceptId) {
|
||||
this.coilLoading = true;
|
||||
listAcceptCoilRel({ acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.coilList = r.rows || [];
|
||||
}).finally(() => { this.coilLoading = false; });
|
||||
},
|
||||
getDeptName(deptId) {
|
||||
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
|
||||
return map[deptId] || '部门' + deptId;
|
||||
},
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.formCoilList = [];
|
||||
this.open = true;
|
||||
this.title = "新增售后单";
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const acceptId = row.acceptId;
|
||||
getComplaintAccept(acceptId).then(response => {
|
||||
this.form = response.data;
|
||||
listAcceptCoilRel({ acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.formCoilList = (r.rows || []).map(rel => ({ coilId: rel.coilId, currentCoilNo: (rel.coilInfo && rel.coilInfo.currentCoilNo) || '' }));
|
||||
});
|
||||
this.open = true;
|
||||
this.title = "修改售后单";
|
||||
});
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
acceptId: undefined,
|
||||
complaintNo: undefined,
|
||||
complaintDate: undefined,
|
||||
complaintContent: undefined,
|
||||
customerDemand: undefined,
|
||||
file: undefined,
|
||||
auditStatus: undefined,
|
||||
auditOpinion: undefined,
|
||||
auditUserId: undefined,
|
||||
auditTime: undefined,
|
||||
flowStatus: undefined,
|
||||
principalUserId: undefined,
|
||||
planContent: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
this.formCoilList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
const formData = { ...this.form, coilIds: this.formCoilList.map(c => c.coilId) };
|
||||
if (this.form.acceptId != null) {
|
||||
updateComplaintAccept(formData).then(() => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => { this.buttonLoading = false; });
|
||||
} else {
|
||||
addComplaintAccept(formData).then(() => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => { this.buttonLoading = false; });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(row) {
|
||||
const acceptIds = row.acceptId;
|
||||
this.$modal.confirm('是否确认删除售后编号为"' + row.complaintNo + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delComplaintAccept(acceptIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
if (this.currentRow && this.currentRow.acceptId === row.acceptId) {
|
||||
this.currentRow = null;
|
||||
}
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { }).finally(() => { this.loading = false; });
|
||||
},
|
||||
handleExport() {
|
||||
this.download('flow/complaintAccept/export', { ...this.queryParams }, `售后单_${new Date().getTime()}.xlsx`);
|
||||
},
|
||||
handleOpinionDispatch() {
|
||||
this.$modal.confirm('确认将此售后单的意见下发至各部门?').then(() => {
|
||||
return opinionDispatch(this.currentRow.acceptId);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("意见下发成功");
|
||||
this.loadDetail(this.currentRow.acceptId);
|
||||
this.getList();
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleFeedbackDispatch() {
|
||||
this.selectedDeptIds = [];
|
||||
this.deptDialogVisible = true;
|
||||
},
|
||||
confirmFeedbackDispatch() {
|
||||
if (this.selectedDeptIds.length === 0) {
|
||||
this.$modal.msgWarning('请至少选择一个部门');
|
||||
return;
|
||||
}
|
||||
this.dispatchLoading = true;
|
||||
const deptIds = this.selectedDeptIds.join(',');
|
||||
feedbackDispatch(this.currentRow.acceptId, deptIds).then(() => {
|
||||
this.$modal.msgSuccess("执行下发成功");
|
||||
this.deptDialogVisible = false;
|
||||
this.loadDetail(this.currentRow.acceptId);
|
||||
this.getList();
|
||||
}).finally(() => { this.dispatchLoading = false; });
|
||||
},
|
||||
handleRefreshDetail() {
|
||||
if (this.currentRow && this.currentRow.acceptId) {
|
||||
this.loadDetail(this.currentRow.acceptId);
|
||||
}
|
||||
},
|
||||
handleSavePlan(planContent) {
|
||||
updateComplaintAccept({ acceptId: this.currentRow.acceptId, planContent }).then(() => {
|
||||
this.$modal.msgSuccess("处理方案保存成功");
|
||||
this.loadDetail(this.currentRow.acceptId);
|
||||
});
|
||||
},
|
||||
refreshTaskList() {
|
||||
if (this.currentRow && this.currentRow.acceptId) {
|
||||
listComplaintTask({ acceptId: this.currentRow.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.taskList = r.rows || [];
|
||||
});
|
||||
}
|
||||
},
|
||||
refreshExecuteList() {
|
||||
if (this.currentRow && this.currentRow.acceptId) {
|
||||
listPlanExecuteRel({ acceptId: this.currentRow.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.executeList = r.rows || [];
|
||||
});
|
||||
}
|
||||
},
|
||||
handleCoilConfirm(coils) {
|
||||
this.formCoilList = [...coils];
|
||||
},
|
||||
removeCoil(index) {
|
||||
this.formCoilList.splice(index, 1);
|
||||
},
|
||||
handleSelectorConfirm(coils) {
|
||||
if (!coils || coils.length === 0) return;
|
||||
const existIds = this.coilList.map(r => r.coilId);
|
||||
const toAdd = coils.filter(c => !existIds.includes(c.coilId));
|
||||
if (toAdd.length === 0) {
|
||||
this.$modal.msgWarning("所选钢卷已全部存在");
|
||||
return;
|
||||
}
|
||||
const addPromises = toAdd.map(c => addAcceptCoilRel({ acceptId: this.currentRow.acceptId, coilId: c.coilId }));
|
||||
Promise.all(addPromises).then(() => {
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.loadCoilList(this.currentRow.acceptId);
|
||||
});
|
||||
},
|
||||
handleRemoveCoil(row) {
|
||||
this.$modal.confirm('确认移除钢卷"' + (row.coilInfo.currentCoilNo || row.coilId) + '"?').then(() => {
|
||||
return delAcceptCoilRel(row.relId);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("移除成功");
|
||||
this.loadCoilList(this.currentRow.acceptId);
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.objection-container {
|
||||
height: calc(100vh - 84px);
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background: #f5f7fa;
|
||||
border-right: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 14px 8px;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.header-title i {
|
||||
color: #409eff;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.header-filter {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.search-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 0 14px 10px;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.list-body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 2px;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
.list-item:hover {
|
||||
background: #ebeef5;
|
||||
}
|
||||
|
||||
.list-item.active {
|
||||
background: #d9ecff;
|
||||
}
|
||||
|
||||
.list-item.active .item-title {
|
||||
color: #409eff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.item-main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.item-sub {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.item-meta {
|
||||
flex-shrink: 0;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.item-actions {
|
||||
flex-shrink: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.list-item:hover .item-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.list-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 60px 0;
|
||||
color: #c0c4cc;
|
||||
font-size: 13px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.list-empty i {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.list-footer {
|
||||
border-top: 1px solid #e4e7ed;
|
||||
padding: 2px 8px 0;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.detail-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.detail-complaint-no {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #303133;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.detail-header-right {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.detail-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.detail-meta span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.detail-meta i {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.detail-section {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.detail-section-label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #909399;
|
||||
margin-bottom: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.detail-section-text {
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
line-height: 1.6;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
margin: 16px 0 8px 0;
|
||||
padding-left: 8px;
|
||||
border-left: 3px solid #409eff;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.plan-content {
|
||||
padding: 8px;
|
||||
background: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.section-gap {
|
||||
height: 20px;
|
||||
}
|
||||
</style>
|
||||
314
klp-ui/src/views/wms/post/objection/opinion.vue
Normal file
314
klp-ui/src/views/wms/post/objection/opinion.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-bar">
|
||||
<div class="dept-tabs">
|
||||
<span v-for="tab in deptTabs" :key="tab.key" class="dept-tab" :class="{ active: activeDept === tab.key }" @click="switchDept(tab.key)">
|
||||
{{ tab.label }}
|
||||
</span>
|
||||
</div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" class="filter-form">
|
||||
<el-form-item label="售后编号">
|
||||
<el-input v-model="queryParams.complaintNo" placeholder="请输入售后编号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
<el-select v-model="queryParams.taskStatus" placeholder="请选择" clearable>
|
||||
<el-option label="待填写" :value="0" />
|
||||
<el-option label="已完成" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="loading" :data="taskList" border>
|
||||
<el-table-column label="售后编号" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.acceptInfo || {}).complaintNo || '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投诉日期" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime((scope.row.acceptInfo || {}).complaintDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务状态" align="center" prop="taskStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.taskStatus === 0" type="warning">待填写</el-tag>
|
||||
<el-tag v-else-if="scope.row.taskStatus === 1" type="success">已完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理意见" align="center" min-width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<div v-html="scope.row.deptOpinion"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="填写时间" align="center" prop="fillTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.fillTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="canEdit(scope.row)" size="mini" type="text" icon="el-icon-edit" @click="handleView(scope.row, true)">填写</el-button>
|
||||
<el-button v-else size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row, false)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog :title="(isEditable ? '填写' : '查看') + '处理意见 - ' + getDeptLabel()" :visible.sync="opinionOpen" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<div v-loading="detailLoading" class="opinion-dialog">
|
||||
<HeaderControlSection
|
||||
:complaintNo="acceptDetail.complaintNo"
|
||||
:flowStatus="acceptDetail.flowStatus"
|
||||
:meta="acceptDetail"
|
||||
>
|
||||
<template #actions>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="refreshDetail" title="刷新">刷新</el-button>
|
||||
</template>
|
||||
|
||||
<template #basic-info>
|
||||
<BasicInfoSection :data="acceptDetail" />
|
||||
</template>
|
||||
|
||||
<template #contract-info>
|
||||
<ContractInfoSection :coilList="dialogCoilList" />
|
||||
</template>
|
||||
</HeaderControlSection>
|
||||
|
||||
<el-divider />
|
||||
|
||||
<CoilInfoSection :coilList="dialogCoilList" :loading="coilLoading" :editable="false" />
|
||||
|
||||
<el-divider />
|
||||
|
||||
<div v-if="isEditable" class="opinion-form">
|
||||
<div class="section-title">填写处理意见</div>
|
||||
<el-form ref="opinionForm" :model="opinionForm" label-width="100px">
|
||||
<el-form-item label="处理意见" prop="deptOpinion">
|
||||
<editor v-model="opinionForm.deptOpinion" :min-height="200" />
|
||||
</el-form-item>
|
||||
<el-form-item label="意见文件">
|
||||
<file-upload v-model="opinionForm.fillFile" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="opinionOpen = false">{{ isEditable ? '取 消' : '关 闭' }}</el-button>
|
||||
<el-button v-if="isEditable" :loading="submitLoading" type="primary" @click="submitOpinion">提 交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listComplaintTask, getComplaintTask, updateComplaintTask } from "@/api/flow/complaintTask";
|
||||
import { getComplaintAccept } from "@/api/flow/complaintAccept";
|
||||
import { listAcceptCoilRel } from "@/api/flow/acceptCoilRel";
|
||||
import HeaderControlSection from "./components/HeaderControlSection.vue";
|
||||
import BasicInfoSection from "./components/BasicInfoSection.vue";
|
||||
import CoilInfoSection from "./components/CoilInfoSection.vue";
|
||||
import ContractInfoSection from "./components/ContractInfoSection.vue";
|
||||
|
||||
export default {
|
||||
name: "AftermarketOpinion",
|
||||
components: { HeaderControlSection, BasicInfoSection, CoilInfoSection, ContractInfoSection },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
detailLoading: false,
|
||||
coilLoading: false,
|
||||
submitLoading: false,
|
||||
total: 0,
|
||||
activeDept: 'production',
|
||||
deptTabs: [
|
||||
{ key: 'production', label: '生产部' },
|
||||
{ key: 'quality', label: '质量部' },
|
||||
{ key: 'sales', label: '销售部' }
|
||||
],
|
||||
deptMap: { production: 1, quality: 2, sales: 3 },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: 1,
|
||||
complaintNo: undefined,
|
||||
taskStatus: undefined
|
||||
},
|
||||
taskList: [],
|
||||
opinionOpen: false,
|
||||
opinionForm: { deptOpinion: '', fillFile: '' },
|
||||
acceptDetail: {},
|
||||
dialogCoilList: [],
|
||||
currentTask: {},
|
||||
isEditable: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
switchDept(key) {
|
||||
this.activeDept = key;
|
||||
this.queryParams.deptId = this.deptMap[key];
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const params = { ...this.queryParams };
|
||||
if (params.taskStatus === '' || params.taskStatus === undefined) {
|
||||
delete params.taskStatus;
|
||||
}
|
||||
listComplaintTask(params).then(response => {
|
||||
this.taskList = response.rows || [];
|
||||
this.total = response.total;
|
||||
}).finally(() => { this.loading = false; });
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams.complaintNo = undefined;
|
||||
this.queryParams.taskStatus = undefined;
|
||||
this.handleQuery();
|
||||
},
|
||||
handleView(row, editable) {
|
||||
this.currentTask = row;
|
||||
this.isEditable = editable;
|
||||
this.opinionForm = { deptOpinion: '', fillFile: '' };
|
||||
this.detailLoading = true;
|
||||
this.coilLoading = true;
|
||||
this.dialogCoilList = [];
|
||||
this.acceptDetail = row.acceptInfo || {};
|
||||
|
||||
listAcceptCoilRel({ acceptId: row.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.dialogCoilList = r.rows || [];
|
||||
}).finally(() => { this.coilLoading = false; this.detailLoading = false; });
|
||||
|
||||
getComplaintTask(row.taskId).then(response => {
|
||||
const task = response.data || {};
|
||||
this.opinionForm = {
|
||||
deptOpinion: task.deptOpinion || '',
|
||||
fillFile: task.fillFile || ''
|
||||
};
|
||||
});
|
||||
|
||||
this.opinionOpen = true;
|
||||
},
|
||||
refreshDetail() {
|
||||
if (!this.currentTask.acceptId) return;
|
||||
this.detailLoading = true;
|
||||
this.coilLoading = true;
|
||||
getComplaintAccept(this.currentTask.acceptId).then(response => {
|
||||
this.acceptDetail = response.data || {};
|
||||
}).finally(() => { this.detailLoading = false; });
|
||||
listAcceptCoilRel({ acceptId: this.currentTask.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.dialogCoilList = r.rows || [];
|
||||
}).finally(() => { this.coilLoading = false; });
|
||||
},
|
||||
getDeptLabel() {
|
||||
const map = { production: '生产部', quality: '质量部', sales: '销售部' };
|
||||
return map[this.activeDept] || '';
|
||||
},
|
||||
canEdit(row) {
|
||||
const status = (row.acceptInfo || {}).flowStatus;
|
||||
return (status === 2 || status === 3) && row.taskStatus === 0;
|
||||
},
|
||||
submitOpinion() {
|
||||
if (!this.opinionForm.deptOpinion) {
|
||||
this.$modal.msgWarning("请填写处理意见");
|
||||
return;
|
||||
}
|
||||
this.submitLoading = true;
|
||||
updateComplaintTask({
|
||||
taskId: this.currentTask.taskId,
|
||||
acceptId: this.currentTask.acceptId,
|
||||
deptId: this.currentTask.deptId,
|
||||
deptOpinion: this.opinionForm.deptOpinion,
|
||||
fillFile: this.opinionForm.fillFile,
|
||||
taskStatus: 1,
|
||||
fillTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("意见提交成功");
|
||||
this.opinionOpen = false;
|
||||
this.getList();
|
||||
}).finally(() => { this.submitLoading = false; });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.filter-bar {
|
||||
background: #fafafa;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 12px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.dept-tabs {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
}
|
||||
.dept-tab {
|
||||
padding: 6px 20px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
background: #fff;
|
||||
border: 1px solid #dcdfe6;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.dept-tab:first-child {
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
.dept-tab:last-child {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
.dept-tab.active {
|
||||
color: #fff;
|
||||
background: #409eff;
|
||||
border-color: #409eff;
|
||||
}
|
||||
.dept-tab:hover:not(.active) {
|
||||
color: #409eff;
|
||||
}
|
||||
.filter-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0;
|
||||
}
|
||||
.filter-form .el-form-item {
|
||||
margin-bottom: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.opinion-dialog {
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.opinion-dialog /deep/ .section-title {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 0 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.opinion-form {
|
||||
padding-top: 4px;
|
||||
}
|
||||
</style>
|
||||
270
klp-ui/src/views/wms/post/objection/todo.vue
Normal file
270
klp-ui/src/views/wms/post/objection/todo.vue
Normal file
@@ -0,0 +1,270 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="售后编号" prop="complaintNo">
|
||||
<el-input v-model="queryParams.complaintNo" placeholder="请输入售后编号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="执行状态" prop="executeStatus">
|
||||
<el-select v-model="queryParams.executeStatus" placeholder="请选择" clearable>
|
||||
<el-option label="待执行反馈" :value="0" />
|
||||
<el-option label="已反馈完成" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" border>
|
||||
<el-table-column label="售后编号" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.acceptInfo || {}).complaintNo || '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投诉日期" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime((scope.row.acceptInfo || {}).complaintDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行部门" align="center" prop="deptId" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ getDeptName(scope.row.deptId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行状态" align="center" prop="executeStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.executeStatus === 0" type="warning">待执行</el-tag>
|
||||
<el-tag v-else-if="scope.row.executeStatus === 1" type="success">已反馈</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行结果" align="center" min-width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<div v-html="scope.row.executeResult"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="反馈时间" align="center" prop="feedbackTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.feedbackTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.executeStatus === 0" size="mini" type="text" icon="el-icon-edit" @click="handleExecute(scope.row, true)">执行反馈</el-button>
|
||||
<el-button v-else size="mini" type="text" icon="el-icon-view" @click="handleExecute(scope.row, false)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<el-dialog :title="(isEditable ? '执行反馈 - ' : '查看反馈 - ') + getDeptLabel()" :visible.sync="execOpen" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<div v-loading="detailLoading" class="exec-dialog">
|
||||
<HeaderControlSection
|
||||
:complaintNo="acceptDetail.complaintNo"
|
||||
:flowStatus="acceptDetail.flowStatus"
|
||||
:meta="acceptDetail"
|
||||
>
|
||||
<template #basic-info>
|
||||
<BasicInfoSection :data="acceptDetail" />
|
||||
</template>
|
||||
</HeaderControlSection>
|
||||
|
||||
<el-divider />
|
||||
|
||||
<CoilInfoSection :coilList="dialogCoilList" :loading="coilLoading" :editable="false" />
|
||||
|
||||
<ContractInfoSection :coilList="dialogCoilList" />
|
||||
|
||||
<div v-if="acceptDetail.planContent">
|
||||
<div class="section-title">处理方案</div>
|
||||
<div class="plan-content" v-html="acceptDetail.planContent"></div>
|
||||
</div>
|
||||
|
||||
<div v-if="isEditable">
|
||||
<div class="section-title">填写执行反馈</div>
|
||||
<el-form ref="execForm" :model="execForm" label-width="100px">
|
||||
<el-form-item label="执行结果" prop="executeResult">
|
||||
<editor v-model="execForm.executeResult" :min-height="200" />
|
||||
</el-form-item>
|
||||
<el-form-item label="反馈文件">
|
||||
<file-upload v-model="execForm.feedbackFile" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ isEditable ? '取 消' : '关 闭' }}</el-button>
|
||||
<el-button v-if="isEditable" :loading="submitLoading" type="primary" @click="submitExecute">提 交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPlanExecuteRel, getPlanExecuteRel, updatePlanExecuteRel } from "@/api/flow/planExecuteRel";
|
||||
import { listAcceptCoilRel } from "@/api/flow/acceptCoilRel";
|
||||
import HeaderControlSection from "./components/HeaderControlSection.vue";
|
||||
import BasicInfoSection from "./components/BasicInfoSection.vue";
|
||||
import CoilInfoSection from "./components/CoilInfoSection.vue";
|
||||
import ContractInfoSection from "./components/ContractInfoSection.vue";
|
||||
|
||||
export default {
|
||||
name: "AftermarketTodo",
|
||||
components: { HeaderControlSection, BasicInfoSection, CoilInfoSection, ContractInfoSection },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
detailLoading: false,
|
||||
submitLoading: false,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
complaintNo: undefined,
|
||||
executeStatus: undefined
|
||||
},
|
||||
dataList: [],
|
||||
execOpen: false,
|
||||
isEditable: false,
|
||||
acceptDetail: {},
|
||||
dialogCoilList: [],
|
||||
coilLoading: false,
|
||||
execForm: { executeResult: '', feedbackFile: '' },
|
||||
currentRel: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const params = { ...this.queryParams };
|
||||
if (params.executeStatus === '' || params.executeStatus === undefined) {
|
||||
delete params.executeStatus;
|
||||
}
|
||||
let complaintNoFilter = params.complaintNo;
|
||||
delete params.complaintNo;
|
||||
listPlanExecuteRel(params).then(response => {
|
||||
let rows = response.rows || [];
|
||||
if (complaintNoFilter) {
|
||||
rows = rows.filter(row => {
|
||||
const no = ((row.acceptInfo || {}).complaintNo || '');
|
||||
return no.indexOf(complaintNoFilter) !== -1;
|
||||
});
|
||||
}
|
||||
this.dataList = rows;
|
||||
this.total = response.total;
|
||||
}).finally(() => { this.loading = false; });
|
||||
},
|
||||
getDeptName(deptId) {
|
||||
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
|
||||
return map[deptId] || '部门' + deptId;
|
||||
},
|
||||
getDeptLabel() {
|
||||
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
|
||||
return map[this.currentRel.deptId] || '';
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleExecute(row, editable) {
|
||||
this.currentRel = row;
|
||||
this.isEditable = editable;
|
||||
this.acceptDetail = row.acceptInfo || {};
|
||||
this.execForm = { executeResult: '', feedbackFile: '' };
|
||||
this.dialogCoilList = [];
|
||||
this.detailLoading = true;
|
||||
this.coilLoading = true;
|
||||
|
||||
listAcceptCoilRel({ acceptId: row.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||
this.dialogCoilList = r.rows || [];
|
||||
}).finally(() => { this.coilLoading = false; });
|
||||
|
||||
if (!editable) {
|
||||
getPlanExecuteRel(row.relId).then(response => {
|
||||
const rel = response.data || {};
|
||||
this.execForm = {
|
||||
executeResult: rel.executeResult || '',
|
||||
feedbackFile: rel.feedbackFile || ''
|
||||
};
|
||||
}).finally(() => { this.detailLoading = false; });
|
||||
} else {
|
||||
this.detailLoading = false;
|
||||
}
|
||||
this.execOpen = true;
|
||||
},
|
||||
closeDialog() {
|
||||
this.execOpen = false;
|
||||
this.isEditable = false;
|
||||
},
|
||||
submitExecute() {
|
||||
if (!this.execForm.executeResult) {
|
||||
this.$modal.msgWarning('请填写执行结果');
|
||||
return;
|
||||
}
|
||||
this.submitLoading = true;
|
||||
updatePlanExecuteRel({
|
||||
relId: this.currentRel.relId,
|
||||
acceptId: this.currentRel.acceptId,
|
||||
deptId: this.currentRel.deptId,
|
||||
executeResult: this.execForm.executeResult,
|
||||
feedbackFile: this.execForm.feedbackFile,
|
||||
executeStatus: 1,
|
||||
feedbackTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("执行反馈提交成功");
|
||||
this.execOpen = false;
|
||||
this.isEditable = false;
|
||||
this.getList();
|
||||
}).finally(() => { this.submitLoading = false; });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.exec-dialog {
|
||||
max-height: 65vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.exec-dialog /deep/ .section-title {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1d2129;
|
||||
margin: 16px 0 12px 0;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, #c0c4cc, transparent) 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.plan-content {
|
||||
padding: 12px;
|
||||
background: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.empty-data {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user