feat(wms): 新增原料材质与钢卷类型不匹配查询及修复功能
refactor(crm): 重构销售员管理界面为左右分栏布局 style(wms): 优化钢卷发货状态显示为单选按钮组 chore: 新增考勤请求工具类文件
This commit is contained in:
@@ -397,4 +397,30 @@ export function getCoilStatisticsList(params) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询原料材质与钢卷类型不匹配的钢卷
|
||||||
|
*/
|
||||||
|
export function listMismatchedItemCoil(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/materialCoil/queryMaterialMismatchCoils',
|
||||||
|
method: 'get',
|
||||||
|
timeout: 600000,
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修复原料材质与钢卷类型不匹配的钢卷
|
||||||
|
*/
|
||||||
|
export function fixMismatchedItemCoil(coilId) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/materialCoil/fixMaterialMismatch',
|
||||||
|
method: 'put',
|
||||||
|
timeout: 600000,
|
||||||
|
params: {
|
||||||
|
coilId
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
32
klp-ui/src/utils/attendanceRequest.js
Normal file
32
klp-ui/src/utils/attendanceRequest.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
import { Notification, MessageBox, Message } from 'element-ui'
|
||||||
|
|
||||||
|
const request = axios.create({
|
||||||
|
baseURL: 'http://140.143.206.120:18000',
|
||||||
|
timeout: 5000
|
||||||
|
})
|
||||||
|
|
||||||
|
// 响应拦截器
|
||||||
|
request.interceptors.response.use(res => {
|
||||||
|
if (res.data.status == 'success') {
|
||||||
|
return res.data
|
||||||
|
} else {
|
||||||
|
Message({ message: res.data.message || '同步失败', type: 'error' })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.log('err' + error)
|
||||||
|
let { message } = error;
|
||||||
|
if (message == "Network Error") {
|
||||||
|
message = "后端接口连接异常";
|
||||||
|
} else if (message.includes("timeout")) {
|
||||||
|
message = "系统接口请求超时";
|
||||||
|
} else if (message.includes("Request failed with status code")) {
|
||||||
|
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||||
|
}
|
||||||
|
Message({ message: message, type: 'error', duration: 5 * 1000 })
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
export default request
|
||||||
@@ -1,164 +1,91 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<DragResizePanel direction="horizontal" :initialSize="400" :minSize="300" style="height: calc(100vh - 84px);">
|
||||||
<el-form-item label="销售员名称" prop="dictLabel">
|
<template #panelA>
|
||||||
<el-input
|
<div style="height: calc(100vh - 84px); padding: 10px; display: flex; flex-direction: column;">
|
||||||
v-model="queryParams.dictLabel"
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||||
placeholder="请输入销售员名称"
|
label-width="40px">
|
||||||
clearable
|
<el-form-item label="名称" prop="dictLabel">
|
||||||
@keyup.enter.native="handleQuery"
|
<el-input v-model="queryParams.dictLabel" placeholder="请输入销售员名称" clearable
|
||||||
/>
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="数据状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="数据状态" clearable @change="handleQuery">
|
||||||
<el-option
|
<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
|
||||||
v-for="dict in dict.type.sys_normal_disable"
|
:value="dict.value" />
|
||||||
:key="dict.value"
|
</el-select>
|
||||||
:label="dict.label"
|
</el-form-item>
|
||||||
:value="dict.value"
|
</el-form>
|
||||||
/>
|
|
||||||
</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">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||||
type="primary"
|
</el-col>
|
||||||
plain
|
<el-col :span="1.5">
|
||||||
icon="el-icon-plus"
|
<el-button type="success" plain icon="el-icon-refresh" size="mini" @click="handleQuery">刷新</el-button>
|
||||||
size="mini"
|
</el-col>
|
||||||
@click="handleAdd"
|
</el-row>
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<div v-loading="loading" class="card-container">
|
<div v-loading="loading" class="card-container">
|
||||||
<el-card
|
<div v-for="item in dataList" :key="item.dictCode"
|
||||||
v-for="item in dataList"
|
class="saleman-card"
|
||||||
:key="item.dictCode"
|
:class="{ 'saleman-card-selected': selectedItem && selectedItem.dictCode === item.dictCode }"
|
||||||
class="saleman-card"
|
@click="selectedItem = item"
|
||||||
shadow="hover"
|
shadow="hover">
|
||||||
>
|
<div class="card-header">
|
||||||
<div class="card-header">
|
<div class="card-title">
|
||||||
<div class="card-title">
|
<dict-tag :options="dict.type.sys_normal_disable" :value="item.status" />
|
||||||
<span v-if="item.listClass == '' || item.listClass == 'default'">{{item.dictLabel}}</span>
|
<div>{{ item.dictLabel }}</div>
|
||||||
<el-tag v-else :type="item.listClass == 'primary' ? '' : item.listClass">{{item.dictLabel}}</el-tag>
|
</div>
|
||||||
</div>
|
<div class="card-actions">
|
||||||
<div class="card-actions">
|
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(item)">修改</el-button>
|
||||||
<el-button
|
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(item)">删除</el-button>
|
||||||
size="mini"
|
</div>
|
||||||
type="text"
|
</div>
|
||||||
icon="el-icon-edit"
|
</div>
|
||||||
@click="handleUpdate(item)"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(item)"
|
|
||||||
>删除</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
|
||||||
<div class="card-info">
|
|
||||||
<span class="info-label">销售员编码:</span>
|
|
||||||
<span class="info-value">{{item.dictCode}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="card-info">
|
|
||||||
<span class="info-label">排序:</span>
|
|
||||||
<span class="info-value">{{item.dictSort}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="card-info">
|
|
||||||
<span class="info-label">状态:</span>
|
|
||||||
<span class="info-value"><dict-tag :options="dict.type.sys_normal_disable" :value="item.status"/></span>
|
|
||||||
</div>
|
|
||||||
<div class="card-info" v-if="item.remark">
|
|
||||||
<span class="info-label">备注:</span>
|
|
||||||
<span class="info-value">{{item.remark}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="card-info">
|
|
||||||
<span class="info-label">创建时间:</span>
|
|
||||||
<span class="info-value">{{ parseTime(item.createTime) }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<pagination
|
</template>
|
||||||
v-show="total>0"
|
<template #panelB>
|
||||||
:total="total"
|
<div v-if="selectedItem" class="right-panel">
|
||||||
:page.sync="queryParams.pageNum"
|
<el-tabs v-model="activeTab" type="border-card">
|
||||||
:limit.sync="queryParams.pageSize"
|
<el-tab-pane label="跟进客户" name="customer">
|
||||||
@pagination="getList"
|
客户
|
||||||
/>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="跟进合同" name="contract">
|
||||||
|
合同
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="发货单据" name="delivery">
|
||||||
|
<DeliveryTable :data="waybillList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="生产成果" name="production">
|
||||||
|
<CoilTable :data="productList || []" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="计划发货" name="planDelivery">
|
||||||
|
<CoilTable :data="deliveryList || []" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<div v-else class="right-panel">
|
||||||
|
<el-empty description="选择左侧的销售员查看相关信息" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</DragResizePanel>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="销售员类型">
|
|
||||||
<el-input v-model="form.dictType" :disabled="true" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="销售员名称" prop="dictLabel">
|
<el-form-item label="销售员名称" prop="dictLabel">
|
||||||
<el-input v-model="form.dictLabel" placeholder="请输入销售员名称" />
|
<el-input v-model="form.dictLabel" placeholder="请输入销售员名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="样式属性" prop="cssClass">
|
|
||||||
<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="显示排序" prop="dictSort">
|
|
||||||
<el-input-number :controls=false controls-position="right" v-model="form.dictSort" :min="0" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="回显样式" prop="listClass">
|
|
||||||
<el-select v-model="form.listClass">
|
|
||||||
<el-option
|
|
||||||
v-for="item in listClassOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label + '(' + item.value + ')'"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
||||||
v-for="dict in dict.type.sys_normal_disable"
|
}}</el-radio>
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{dict.label}}</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
@@ -174,11 +101,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DragResizePanel from "@/components/DragResizePanel";
|
||||||
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
||||||
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
|
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
|
||||||
|
import CoilTable from "../components/CoilTable.vue";
|
||||||
|
import DeliveryTable from "../components/DeliveryTable.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Data",
|
name: "Data",
|
||||||
|
components: { DragResizePanel, CoilTable, DeliveryTable },
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -202,6 +133,8 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 当前选中的销售员
|
||||||
|
selectedItem: null,
|
||||||
// 数据标签回显样式
|
// 数据标签回显样式
|
||||||
listClassOptions: [
|
listClassOptions: [
|
||||||
{
|
{
|
||||||
@@ -241,6 +174,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
// 当前激活的标签页
|
||||||
|
activeTab: 'customer',
|
||||||
|
// 生产成果列表
|
||||||
|
productList: [],
|
||||||
|
// 计划发货列表
|
||||||
|
deliveryList: [],
|
||||||
|
// 发货单据列表
|
||||||
|
waybillList: [],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
dictLabel: [
|
dictLabel: [
|
||||||
@@ -251,7 +192,7 @@ export default {
|
|||||||
],
|
],
|
||||||
dictSort: [
|
dictSort: [
|
||||||
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -329,7 +270,7 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.dictCode)
|
this.ids = selection.map(item => item.dictCode)
|
||||||
this.single = selection.length!=1
|
this.single = selection.length != 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@@ -343,7 +284,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 确保dictLabel和dictValue保持一致
|
// 确保dictLabel和dictValue保持一致
|
||||||
@@ -369,13 +310,13 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const dictCodes = row.dictCode || this.ids;
|
const dictCodes = row.dictCode || this.ids;
|
||||||
this.$modal.confirm('是否确认删除销售员编码为"' + dictCodes + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除销售员编码为"' + dictCodes + '"的数据项?').then(function () {
|
||||||
return delData(dictCodes);
|
return delData(dictCodes);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
|
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
|
||||||
}).catch(() => {});
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
@@ -383,71 +324,58 @@ export default {
|
|||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `data_${new Date().getTime()}.xlsx`)
|
}, `data_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
/** 复制按钮操作 */
|
|
||||||
// handleCopy() {
|
|
||||||
// // 复制销售员进入系统剪切板,数据结构:{dictName: '', dictType: '', data: [
|
|
||||||
// //
|
|
||||||
// // ], status: '0', remark: ''}
|
|
||||||
// this.reset();
|
|
||||||
// this.open = true;
|
|
||||||
// this.title = "复制销售员数据";
|
|
||||||
// this.form.dictType = this.queryParams.dictType;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.card-container {
|
.card-container {
|
||||||
display: grid;
|
flex: 1;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
overflow-y: scroll;
|
||||||
gap: 20px;
|
overflow-x: hidden;
|
||||||
margin-top: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.saleman-card {
|
.saleman-card {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.saleman-card:hover {
|
.saleman-card-selected {
|
||||||
transform: translateY(-2px);
|
background-color: #ecf5ff;
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|
border: 1px solid #409eff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 15px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 16px;
|
display: flex;
|
||||||
font-weight: bold;
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title dict-tag {
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-actions {
|
.card-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body {
|
.right-panel {
|
||||||
padding-top: 10px;
|
height: 100%;
|
||||||
}
|
background-color: #fafafa;
|
||||||
|
|
||||||
.card-info {
|
|
||||||
display: flex;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-label {
|
|
||||||
width: 100px;
|
|
||||||
color: #606266;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-value {
|
|
||||||
flex: 1;
|
|
||||||
color: #303133;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -40,10 +40,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="showWaybill" label="发货状态">
|
<el-form-item v-if="showWaybill" label="发货状态">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable>
|
<el-radio-group v-model="queryParams.status" @change="handleQuery">
|
||||||
|
<el-radio-button label="">全部</el-radio-button>
|
||||||
|
<el-radio-button label="0">未发货【{{ unshippedCount }}】</el-radio-button>
|
||||||
|
<el-radio-button label="1">已发货【{{ shippedCount }}】</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<!-- <el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable>
|
||||||
<el-option :value="0" label="未发货">未发货</el-option>
|
<el-option :value="0" label="未发货">未发货</el-option>
|
||||||
<el-option :value="1" label="已发货">已发货</el-option>
|
<el-option :value="1" label="已发货">已发货</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="showWaybill" label="发货单时间">
|
<el-form-item v-if="showWaybill" label="发货单时间">
|
||||||
@@ -61,12 +66,12 @@
|
|||||||
<el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button>
|
<el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item style="float: right;" v-if="showWaybill" v-loading="loading">
|
<!-- <el-form-item style="float: right;" v-if="showWaybill" v-loading="loading">
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item label="已发货数量">{{ shippedCount }}</el-descriptions-item>
|
<el-descriptions-item label="已发货数量">{{ shippedCount }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="未发货数量">{{ unshippedCount }}</el-descriptions-item>
|
<el-descriptions-item label="未发货数量">{{ unshippedCount }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8" v-if="showControl">
|
<el-row :gutter="10" class="mb8" v-if="showControl">
|
||||||
@@ -803,7 +808,7 @@ export default {
|
|||||||
parentCoilNos: undefined,
|
parentCoilNos: undefined,
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
itemIds: undefined,
|
itemIds: undefined,
|
||||||
status: undefined,
|
status: '',
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
orderBy: false,
|
orderBy: false,
|
||||||
...this.querys,
|
...this.querys,
|
||||||
@@ -1201,6 +1206,9 @@ export default {
|
|||||||
listBoundCoil({ ...query, status: 1 }).then(res => {
|
listBoundCoil({ ...query, status: 1 }).then(res => {
|
||||||
this.shippedCount = res.total;
|
this.shippedCount = res.total;
|
||||||
})
|
})
|
||||||
|
getCoilStatisticsList(query).then(res => {
|
||||||
|
this.statistics = res.data || [];
|
||||||
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
listMaterialCoil(query).then(response => {
|
listMaterialCoil(query).then(response => {
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container" v-loading="loading" >
|
<div class="app-container" v-loading="loading">
|
||||||
<el-row :gutter="10" class="mb8">
|
<div style="display: flex; align-items: center; justify-content: flex-start; gap: 10px;">
|
||||||
<el-col :span="1.5">
|
<el-radio-group v-model="activeTab" @change="handleRefresh">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportAll">导出</el-button>
|
<el-radio-button label="missing">类型缺失</el-radio-button>
|
||||||
</el-col>
|
<el-radio-button label="mismatch">匹配异常</el-radio-button>
|
||||||
<el-col :span="1.5">
|
</el-radio-group>
|
||||||
共 {{ totalCoil }} 卷
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<KLPTable :data="materialCoilList" @selection-change="handleSelectionChange" :floatLayer="true"
|
<el-button type="success" plain size="mini" icon="el-icon-refresh" @click="handleRefresh">刷新</el-button>
|
||||||
:floatLayerConfig="floatLayerConfig">
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<KLPTable :data="materialCoilList" @selection-change="handleSelectionChange" height="calc(100vh - 220px)"
|
||||||
|
:floatLayer="true" :floatLayerConfig="floatLayerConfig">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
||||||
<el-table-column label="更新人" align="center" prop="updateBy" />
|
<el-table-column label="更新人" align="center" prop="updateBy" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" prop="action" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">修正</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">修正</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePreviewLabel(scope.row)">
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePreviewLabel(scope.row)">
|
||||||
@@ -47,12 +47,14 @@
|
|||||||
打印标签
|
打印标签
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">追溯</el-button>
|
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">追溯</el-button>
|
||||||
|
<el-button v-if="activeTab === 'mismatch'" size="mini" type="text" icon="el-icon-close"
|
||||||
|
@click="handleFixType(scope.row)">一键修复类型</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</KLPTable>
|
</KLPTable>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList" />
|
@pagination="getListMismatched" />
|
||||||
|
|
||||||
<!-- 标签预览弹窗 -->
|
<!-- 标签预览弹窗 -->
|
||||||
<el-dialog title="标签预览" :visible.sync="labelRender.visible" append-to-body>
|
<el-dialog title="标签预览" :visible.sync="labelRender.visible" append-to-body>
|
||||||
@@ -162,7 +164,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listTypeErrorCoil, getMaterialCoilTrace, getMaterialCoil, updateMaterialCoilSimple } from "@/api/wms/coil";
|
import { listTypeErrorCoil, getMaterialCoilTrace, getMaterialCoil, updateMaterialCoilSimple, listMismatchedItemCoil, fixMismatchedItemCoil } from "@/api/wms/coil";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
import ProductSelect from "@/components/KLPService/ProductSelect";
|
import ProductSelect from "@/components/KLPService/ProductSelect";
|
||||||
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
||||||
@@ -281,6 +283,7 @@ export default {
|
|||||||
{ required: true, message: "毛重不能为空", trigger: "blur" }
|
{ required: true, message: "毛重不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
activeTab: 'missing',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -298,9 +301,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.handleRefresh();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleRefresh() {
|
||||||
|
if (this.activeTab === 'missing') {
|
||||||
|
this.getList();
|
||||||
|
} else if (this.activeTab === 'mismatch') {
|
||||||
|
this.getListMismatched();
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询类型不匹配的钢卷列表 */
|
/** 查询类型不匹配的钢卷列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -310,6 +320,38 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 查询原料材质与钢卷类型不匹配的钢卷列表 */
|
||||||
|
getListMismatched() {
|
||||||
|
this.loading = true;
|
||||||
|
listMismatchedItemCoil(this.queryParams).then(response => {
|
||||||
|
this.materialCoilList = response.rows || [];
|
||||||
|
this.total = response.total || 0;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 修复原料材质与钢卷类型不匹配的钢卷 */
|
||||||
|
handleFixType(row) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
this.$confirm('确认一键修复选中钢卷及其相关钢卷的原料材质吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
fixMismatchedItemCoil(row.coilId).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.$message.success('修复成功');
|
||||||
|
this.getListMismatched();
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg || '修复失败');
|
||||||
|
}
|
||||||
|
this.buttonLoading = false;
|
||||||
|
}).catch(err => {
|
||||||
|
console.error('修复失败:', err);
|
||||||
|
this.$message.error('修复失败,请重试');
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 追溯按钮操作 */
|
/** 追溯按钮操作 */
|
||||||
handleTrace(row) {
|
handleTrace(row) {
|
||||||
this.traceOpen = true;
|
this.traceOpen = true;
|
||||||
@@ -331,7 +373,7 @@ export default {
|
|||||||
handlePreviewLabel(row) {
|
handlePreviewLabel(row) {
|
||||||
this.labelRender.visible = true;
|
this.labelRender.visible = true;
|
||||||
const itemName = row.itemName || '';
|
const itemName = row.itemName || '';
|
||||||
|
|
||||||
this.labelRender.type = row.itemType === 'product' ? '3' : '2';
|
this.labelRender.type = row.itemType === 'product' ? '3' : '2';
|
||||||
this.labelRender.data = {
|
this.labelRender.data = {
|
||||||
...row,
|
...row,
|
||||||
|
|||||||
Reference in New Issue
Block a user