优化测试问题

This commit is contained in:
BianLzhaoMin 2024-05-06 19:32:16 +08:00
parent 369c0c95c1
commit bbd4cd5409
6 changed files with 1230 additions and 1621 deletions

View File

@ -5,7 +5,7 @@
"author": "机具",
"license": "MIT",
"scripts": {
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"dev": "vue-cli-service serve",
"build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"build:prod-nw": "vue-cli-service build --mode production-nw",

File diff suppressed because it is too large Load Diff

View File

@ -1,124 +1,71 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="关键字" prop="keyWord">
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
</el-form-item>
<el-form-item label="退料单位" prop="unitId">
<el-select
v-model="queryParams.unitId"
clearable
filterable
@change="getAgreementByUnit"
style="width: 240px"
placeholder="请选择"
>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
style="width: 240px"
/>
</el-form-item>
<el-form-item label="退料单位" prop="unitId">
<el-select
v-model="queryParams.unitId"
clearable
filterable
@change="getAgreementByUnit"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="lotId">
<el-select
v-model="queryParams.lotId"
clearable
filterable
@change="getAgreementByProId"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input
v-model="queryParams.agreementCode"
placeholder="请选择协议号"
clearable
disabled
style="width: 240px"
/>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="lotId">
<el-select
v-model="queryParams.lotId"
clearable
filterable
@change="getAgreementByProId"
style="width: 240px"
placeholder="请选择"
>
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input
v-model="queryParams.agreementCode"
placeholder="请选择协议号"
clearable
disabled
style="width: 240px"
/>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<Tree ref="mychildSon" :width="240" :dataList="deptList" @changeId="selectDrop"></Tree>
</el-form-item>
<el-form-item label="退料状态" prop="taskStatus">
<el-select
v-model="queryParams.taskStatus"
clearable
filterable
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in taskStatusList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="退料状态" prop="taskStatus">
<el-select v-model="queryParams.taskStatus" clearable filterable style="width: 240px" placeholder="请选择">
<el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="退料申请时间" prop="dateRange">
<el-date-picker
v-model="dateRange"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="退料申请时间" prop="dateRange">
<el-date-picker
v-model="dateRange"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
></el-date-picker>
</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-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-col :span="1.5">
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
@ -128,339 +75,324 @@
>批量审核</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList">
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true"/>
<el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="退料工程" align="center" prop="lotName" :show-overflow-tooltip="true"/>
<el-table-column label="退料机具" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="退料人员" align="center" prop="backPerson" :show-overflow-tooltip="true"/>
<el-table-column label="联系电话" align="center" prop="phone" :show-overflow-tooltip="true"/>
<el-table-column label="申请时间" align="center" prop="backTime" :show-overflow-tooltip="true"/>
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
<el-table-column label="退料状态" align="center" prop="taskName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
<template slot-scope="scope">
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">
查看
</el-button>
<el-button size="mini" type="warning" @click="handleReturn(scope.row, 'see')" v-if="scope.row.taskStatus!='40'">
退料
</el-button>
<el-button size="mini" type="primary" @click="handlePrint(scope.row)">
退料单
</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"
/>
<!-- 退料单 -->
<dialogForm
:dialogTitle="title"
:isShowFlag.sync="isShowOneFlag"
:rowObj="rowObj"
:priKey="priKey"
></dialogForm>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-col>
</div>
</template>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList">
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true" />
<el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="退料工程" align="center" prop="lotName" :show-overflow-tooltip="true" />
<el-table-column label="退料机具" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="退料人员" align="center" prop="backPerson" :show-overflow-tooltip="true" />
<el-table-column label="联系电话" align="center" prop="phone" :show-overflow-tooltip="true" />
<el-table-column label="申请时间" align="center" prop="backTime" :show-overflow-tooltip="true" />
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
<el-table-column label="退料状态" align="center" prop="taskName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
<template slot-scope="scope">
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">查看</el-button>
<el-button
size="mini"
type="warning"
@click="handleReturn(scope.row, 'see')"
v-if="scope.row.taskStatus != '40'"
>
退料
</el-button>
<el-button size="mini" type="primary" @click="handlePrint(scope.row)">退料单</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"
/>
<!-- 退料单 -->
<dialogForm :dialogTitle="title" :isShowFlag.sync="isShowOneFlag" :rowObj="rowObj" :priKey="priKey"></dialogForm>
</div>
</template>
<script>
import { getBackAuditList, getViewByExamine, ApiBackApplyAudit,ApiBackApplyRefuse,getBackReceiveList } from "@/api/claimAndRefund/return.js"
import { getInfo } from "@/api/login";
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
import dialogForm from "./dialogFormExame.vue";
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
export default {
// name: "ReturnExamine",
components: { dialogForm, Tree },
data() {
return {
type: '',
isShowOneFlag: false,//退
priKey: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
typeList: [],
//
title: "",
//
open: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '',//
unitId: "",//id
lotId: '',//id
taskStatus: '',//
typeId: '',//
time: '',
agreementCode: '',//
startTime: '',
endTime: ''
import {
getBackAuditList,
getViewByExamine,
ApiBackApplyAudit,
ApiBackApplyRefuse,
getBackReceiveList,
} from '@/api/claimAndRefund/return.js'
import { getInfo } from '@/api/login'
import { getUnitData, getProData, getAgreementInfoById } from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogFormExame.vue'
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
export default {
// name: "ReturnExamine",
components: { dialogForm, Tree },
data() {
return {
type: '',
isShowOneFlag: false, //退
priKey: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
typeList: [],
//
title: '',
//
open: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '', //
unitId: '', //id
lotId: '', //id
taskStatus: '', //
typeId: '', //
time: '',
agreementCode: '', //
startTime: '',
endTime: '',
},
companyId: '',
deptList: [],
unitList: [],
proList: [],
taskStatusList: [
{
name: '待退料审核',
id: '37',
},
companyId: '',
deptList: [],
unitList: [],
proList: [],
taskStatusList: [
{
name: '待退料审核',
id: '37',
},
{
name: '退料审核通过',
id: '38',
},
{
name: '退料核查中',
id: '39',
},
{
name: '退料完成',
id: '40',
},
{
name: '退料审核驳回',
id: '101',
},
],
rowObj: {},
};
{
name: '退料审核通过',
id: '38',
},
{
name: '退料核查中',
id: '39',
},
{
name: '退料完成',
id: '40',
},
{
name: '退料审核驳回',
id: '101',
},
],
rowObj: {},
}
},
created() {
this.initSelectData()
this.InitIGetInfo()
this.getTree()
},
methods: {
InitIGetInfo() {
getInfo().then(res => {
this.companyId = res.user.companyId
this.getList()
})
},
created() {
getTree() {
listPartTypeApi().then(response => {
console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data)
this.deptList = response.data
})
},
//
selectDrop(value) {
this.queryParams.typeId = value
},
//
initSelectData() {
this.GetUnitData()
this.GetProData()
},
//
async GetUnitData() {
const params = {}
const res = await getUnitData(params)
this.unitList = res.data
console.log('GetUnitData ======================', res)
},
//
async GetProData() {
const params = {
id: this.queryParams.unitId,
}
const res = await getProData(params)
this.proList = res.data
console.log('GetProData ======================', res)
},
//
async InitGetAgreementInfoById() {
const { unitId, proId } = this.queryParams
if (!unitId || !proId) {
return
}
const params = {
unitId: unitId,
projectId: proId,
}
const res = await getAgreementInfoById(params)
// this.proList = res.data
console.log('getAgreementInfoById ======================', res)
this.queryParams.agreementCode = res.data.agreementCode
},
getAgreementByProId() {
this.InitGetAgreementInfoById()
},
getAgreementByUnit() {
this.GetProData()
},
/** 查询列表 startTime,结束日期endTime */
async getList() {
// this.loading = true;
this.queryParams.startTime = this.dateRange[0]
this.queryParams.endTime = this.dateRange[1]
try {
let params = {
flag: 1,
companyId: this.companyId,
...this.queryParams,
}
console.log('paramsparamsparams', params)
const res = await getBackReceiveList(params)
this.typeList = res.data.rows
this.total = res.data.total
this.loading = false
} catch (error) {}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.initSelectData()
this.InitIGetInfo()
this.getTree()
this.handleQuery()
},
methods: {
InitIGetInfo() {
getInfo().then(res => {
this.companyId = res.user.companyId
this.getList();
})
},
getTree() {
listPartTypeApi().then((response) => {
console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data);
this.deptList = response.data
})
},
//
selectDrop(value) {
this.queryParams.typeId = value
},
//
initSelectData() {
this.GetUnitData()
this.GetProData()
},
//
async GetUnitData() {
const params = {
}
const res = await getUnitData(params)
this.unitList = res.data
console.log('GetUnitData ======================', res)
},
//
async GetProData() {
const params = {
id: this.queryParams.unitId
}
const res = await getProData(params)
this.proList = res.data
console.log('GetProData ======================', res)
},
//
async InitGetAgreementInfoById() {
const {
unitId,
proId
} = this.queryParams
if (!unitId || !proId) {
return
}
const params = {
unitId: unitId,
projectId: proId
}
const res = await getAgreementInfoById(params)
// this.proList = res.data
console.log('getAgreementInfoById ======================', res)
this.queryParams.agreementCode = res.data.agreementCode
},
getAgreementByProId() {
this.InitGetAgreementInfoById()
},
getAgreementByUnit() {
this.GetProData()
},
/** 查询列表 startTime,结束日期endTime */
async getList() {
// this.loading = true;
this.queryParams.startTime = this.dateRange[0]
this.queryParams.endTime = this.dateRange[1]
try {
let params = {
flag:1,
companyId: this.companyId,
...this.queryParams
}
console.log("paramsparamsparams", params)
const res = await getBackReceiveList(params)
this.typeList = res.data.rows;
this.total = res.data.total;
this.loading = false;
} catch (error) {
}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.initSelectData()
this.handleQuery();
},
//退
handlePrint(row) {
// this.title = "退";
this.isShowOneFlag = true
this.rowObj = row
},
//
handleSee(row) {
this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail',
query:{
Id:row.id,
isView:true,
}
})
},
//退
handleReturn(row) {
this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail',
query:{
Id:row.id,
taskId:row.taskId
}
})
},
/** 导出按钮操作 */
handleExport() {
this.download('base/backReceive/export', {
...this.queryParams
}, `退料接收_${new Date().getTime()}.xlsx`)
},
}}
//退
handlePrint(row) {
// this.title = "退";
this.isShowOneFlag = true
this.rowObj = row
},
//
handleSee(row) {
this.$tab.closeOpenPage({
path: '/claimAndRefund/returnInDetail',
query: {
Id: row.id,
isView: true,
},
})
},
//退
handleReturn(row) {
this.$tab.closeOpenPage({
path: '/claimAndRefund/returnInDetail',
query: {
Id: row.id,
taskId: row.taskId,
},
})
},
/** 导出按钮操作 */
handleExport() {
this.download(
'base/backReceive/export',
{
...this.queryParams,
},
`退料接收_${new Date().getTime()}.xlsx`
)
},
},
}
</script>
<style lang="scss" scoped>
.submit_box {
display: flex;
justify-content: flex-start;
align-items: center;
.submit_box {
display: flex;
justify-content: flex-start;
align-items: center;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 15px;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 15px;
:first-child {
font-size: 14px;
font-weight: 600;
}
:last-child {
margin-top: 6px;
font-size: 12px;
}
}
:first-child {
font-size: 14px;
font-weight: 600;
}
.submit_box_two {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-left: 30%;
:last-child {
margin-top: 6px;
font-size: 12px;
}
}
}
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 10px;
font-size: 18px;
font-weight: 600;
}
}
.submit_box_two {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-left: 30%;
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
align-items: center;
}
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 10px;
font-size: 18px;
font-weight: 600;
}
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
align-items: center;
}
</style>

View File

@ -1,13 +1,6 @@
<template>
<div class="app-container" id="returnInDetail">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<!-- <el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.keyword"
@ -19,13 +12,7 @@
</el-form-item>-->
<el-form-item label="类型名称" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择类型名称"
clearable
filterable
style="width: 240px"
>
<el-select v-model="queryParams.typeId" placeholder="请选择类型名称" clearable filterable style="width: 240px">
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
@ -41,7 +28,7 @@
:options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px;"
style="width: 240px"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
@ -50,7 +37,8 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" :loading="loading">
查询</el-button>
查询
</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -67,9 +55,9 @@
<el-table v-loading="loading" :data="deviceList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column type="expand" v-if="isPlural">
@ -78,44 +66,26 @@
<el-table :data="scope.row.maTypeDetails" style="width: 100%">
<!-- 子表格的列 -->
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="预领数量"
align="center"
prop="partNum"
:show-overflow-tooltip="true"
/>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="预领数量" align="center" prop="partNum" :show-overflow-tooltip="true" />
</el-table>
</div>
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="申请数量" align="center" prop="preNum" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="partNum" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleViewCode(scope.row)"
v-if="scope.row.manageType=='0'||scope.row.manageType=='1'||scope.row.manageType=='2'"
>查看</el-button>
v-if="scope.row.manageType == '0' || scope.row.manageType == '1' || scope.row.manageType == '2'"
>
查看
</el-button>
<!-- <el-button
size="mini"
@click="handleViewNum(scope.row)"
@ -125,26 +95,32 @@
size="mini"
type="primary"
@click="handleCodeReturn(scope.row)"
v-if="!isView&&scope.row.manageType=='0'&&scope.row.num>0"
>编码退料</el-button>
v-if="!isView && scope.row.manageType == '0' && scope.row.num > 0"
>
编码退料
</el-button>
<el-button
size="mini"
type="primary"
@click="handleNumReturn(scope.row)"
v-if="!isView&&(scope.row.manageType=='1'||scope.row.manageType=='2')&&scope.row.num>0"
>数量退料</el-button>
v-if="!isView && (scope.row.manageType == '1' || scope.row.manageType == '2') && scope.row.num > 0"
>
数量退料
</el-button>
<el-button
size="mini"
icon="el-icon-zoom-in"
@click="handleBackup(scope.row)"
v-if="!isView&&scope.row.num<scope.row.preNum"
>撤回</el-button>
v-if="!isView && scope.row.num < scope.row.preNum"
>
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -153,7 +129,7 @@
<!-- 编码退料弹窗 -->
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body>
<div style="margin-left: 40px;margin-bottom: 10px;">退料数量{{returnNum}}</div>
<div style="margin-left: 40px; margin-bottom: 10px">退料数量{{ returnNum }}</div>
<el-form :model="codeQuery" ref="codeQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备编码" prop="maCode">
<el-input v-model="codeQuery.maCode" maxlength="20" />
@ -166,49 +142,24 @@
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="success"
size="mini"
:disabled="multiple"
@click="saveCodeBackBatch(1)"
>批量合格</el-button>
<el-button type="success" size="mini" :disabled="multiple" @click="saveCodeBackBatch(1)">批量合格</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
:disabled="multiple"
@click="saveCodeBackBatch(2)"
>批量维修</el-button>
<el-button type="primary" size="mini" :disabled="multiple" @click="saveCodeBackBatch(2)">批量维修</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
size="mini"
:disabled="multiple"
@click="saveCodeBackBatch(3)"
>批量报废</el-button>
<el-button type="warning" size="mini" :disabled="multiple" @click="saveCodeBackBatch(3)">批量报废</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="codeList"
height="500"
@selection-change="handleSelectionChange"
>
<el-table v-loading="loading" :data="codeList" height="500" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<template scope="scope">
<span>{{ (codeQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="maStatus" :show-overflow-tooltip="true" />
<el-table-column
@ -219,14 +170,14 @@
width="250"
>
<template slot-scope="scope">
<el-button size="mini" type="success" @click="saveCodeBack(scope.row,1)">合格</el-button>
<el-button size="mini" type="primary" @click="saveCodeBack(scope.row,2)">待维修</el-button>
<el-button size="mini" type="warning" @click="saveCodeBack(scope.row,3)">预报废</el-button>
<el-button size="mini" type="success" @click="saveCodeBack(scope.row, 1)">合格</el-button>
<el-button size="mini" type="primary" @click="saveCodeBack(scope.row, 2)">待维修</el-button>
<el-button size="mini" type="warning" @click="saveCodeBack(scope.row, 3)">预报废</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="codeTotal>0"
v-show="codeTotal > 0"
:total="codeTotal"
:page.sync="codeQuery.pageNum"
:limit.sync="codeQuery.pageSize"
@ -236,44 +187,21 @@
<!-- 数量退料弹窗 -->
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
<div v-if="dialogData.typeMange==1">
<div style="margin-left: 40px;margin-bottom: 10px;">退料数量{{returnNum}}</div>
<div v-if="dialogData.typeMange == 1">
<div style="margin-left: 40px; margin-bottom: 10px">退料数量{{ returnNum }}</div>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
v-if="returnNum>0"
@click="saveNumReturn(dialogData.typeMange)"
>保存</el-button>
<el-button type="primary" size="mini" v-if="returnNum > 0" @click="saveNumReturn(dialogData.typeMange)">
保存
</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="numList" height="500">
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料数量"
align="center"
prop="backNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="合格数量"
align="center"
prop="qualifiedNum"
:show-overflow-tooltip="true"
>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" />
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.qualifiedNum"
@ -286,12 +214,7 @@
/>
</template>
</el-table-column>
<el-table-column
label="待维修数量"
align="center"
prop="serviceNum"
:show-overflow-tooltip="true"
>
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.serviceNum"
@ -321,47 +244,24 @@
</el-table>
</div>
<div v-else>
<div
style="margin-bottom: 30px;"
>接收抱杆类型{{dialogData.typeName}}型号{{dialogData.typeCode}}付数{{returnNum}}接收明细如下</div>
<div style="margin-bottom: 30px">
接收抱杆类型{{ dialogData.typeName }}型号{{ dialogData.typeCode }}付数{{ returnNum }}接收明细如下
</div>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
v-if="returnNum>0"
@click="saveNumReturn(dialogData.typeMange)"
>保存</el-button>
<el-button type="primary" size="mini" v-if="returnNum > 0" @click="saveNumReturn(dialogData.typeMange)">
保存
</el-button>
</el-col>
</el-row>
<el-table :data="dialogData.maTypeDetails" style="width: 100%">
<!-- 子表格的列 -->
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="设备类型"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column
label="应退数量"
align="center"
prop="partNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="合格数量"
align="center"
prop="qualifiedNum"
:show-overflow-tooltip="true"
>
<el-table-column label="应退数量" align="center" prop="partNum" :show-overflow-tooltip="true" />
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.qualifiedNum"
@ -374,12 +274,7 @@
/>
</template>
</el-table-column>
<el-table-column
label="待维修数量"
align="center"
prop="serviceNum"
:show-overflow-tooltip="true"
>
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.serviceNum"
@ -450,7 +345,7 @@ export default {
//
title: '',
isView: false, //
isPlural:false,
isPlural: false,
dialogIsView: false, //
openIn: false,
//
@ -543,24 +438,31 @@ export default {
/** 查询列表 */
getList() {
this.loading = true
receiveView(this.queryParams).then(response => {
this.deviceList = response.data.rows;
this.deviceList.forEach(item=>{
if(item.manageType=='0'||item.manageType=='1'){
item.partNum = item.num
}else{
item.partNum = item.partNum
}
if(item.maTypeDetails.length>0){
this.isPlural=true;
}
})
receiveView(this.queryParams)
.then(response => {
this.deviceList = response.data.rows
console.log(this.deviceList, ' this.deviceList')
this.total = response.data.total
this.loading = false
}).catch(() => {
this.loading = false
})
// this.deviceList.forEach(item => {
// console.log(item.num, 'item.num')
// if (item.manageType == '0' || item.manageType == '1') {
// item.partNum = item.num
// } else {
// item.partNum = item.partNum
// }
// if (item.maTypeDetails.length > 0) {
// this.isPlural = true
// }
// })
console.log(this.deviceList, 'deviceList')
this.total = response.data.total
this.loading = false
})
.catch(() => {
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
@ -692,13 +594,13 @@ export default {
this.dialogData.typeMange = row.manageType
this.dialogData.typeName = row.typeName
this.dialogData.typeCode = row.typeCode
if(row.maTypeDetails){
row.maTypeDetails.forEach(item => {
this.$set(item, 'qualifiedNum', undefined)
this.$set(item, 'serviceNum', undefined)
this.$set(item, 'scrapNum', undefined)
})
this.dialogData.maTypeDetails = row.maTypeDetails
if (row.maTypeDetails) {
row.maTypeDetails.forEach(item => {
this.$set(item, 'qualifiedNum', undefined)
this.$set(item, 'serviceNum', undefined)
this.$set(item, 'scrapNum', undefined)
})
this.dialogData.maTypeDetails = row.maTypeDetails
}
this.numList = [row]
// this.getNumList()
@ -712,8 +614,10 @@ export default {
manageType: row.manageType,
createBy: this.createBy,
}
if(row.maTypeDetails&&row.maTypeDetails.length>0){
param.typeIds = row.maTypeDetails.map(item=>{return item.modelId})
if (row.maTypeDetails && row.maTypeDetails.length > 0) {
param.typeIds = row.maTypeDetails.map(item => {
return item.modelId
})
}
console.log(param)
revoke(param).then(response => {
@ -778,7 +682,7 @@ export default {
let arr = []
for (const item of data) {
let sumUnmber = (item.qualifiedNum || 0) + (item.serviceNum || 0) + (item.scrapNum || 0)
if (sumUnmber > item.partNum&&sumUnmber > item.num) {
if (sumUnmber > item.partNum && sumUnmber > item.num) {
this.$modal.msgError('退料总量已大于待退料数量!')
return
} else {

View File

@ -22,21 +22,21 @@
</template>
<script>
import { getToken } from "@/utils/auth";
import { getToken } from '@/utils/auth'
export default {
name: 'UploadFile',
props: {
fileList: {
type: Array,
default: () => []
default: () => [],
},
actionUrl: {
type: String,
default: 'https://jsonplaceholder.typicode.com/posts/'
default: 'https://jsonplaceholder.typicode.com/posts/',
},
limit: {
type: Number,
default: 3
default: 3,
},
// uploadTip: {
// type: String,
@ -44,54 +44,59 @@ export default {
// },
multiple: {
type: Boolean,
default: true
}
default: true,
},
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + '/dev-api' + this.actionUrl,
headers: {
Authorization: "Bearer " + getToken(),
Authorization: 'Bearer ' + getToken(),
},
uploadData: {
type: "sx"
fileType: 'sx',
},
}
},
methods: {
handleRemove(file, fileList) {
this.$emit('remove', file, fileList);
this.$emit('remove', file, fileList)
},
handleSuccess(response, file, fileList) {
this.$emit('success', response, fileList);
this.$emit('success', response, fileList)
},
handlePreview(file) {
this.$emit('preview', file);
this.$emit('preview', file)
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 ${this.limit} 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
this.$emit('exceed', files, fileList);
this.$message.warning(
`当前限制选择 ${this.limit} 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
)
this.$emit('exceed', files, fileList)
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name} `).then(() => {
this.$emit('before-remove', file, fileList);
}).catch(() => { });
return this.$confirm(`确定移除 ${file.name} `)
.then(() => {
this.$emit('before-remove', file, fileList)
})
.catch(() => {})
},
beforeUpload(file) {
console.log('file', file);
const isJPGorPNG = file.type == 'image/png' || file.type == 'image/jpg' || file.type == 'image/jpeg';
const isLt5M = file.size / 1024 / 1024 < 2; // 2MB
console.log('file', file)
const isJPGorPNG = file.type == 'image/png' || file.type == 'image/jpg' || file.type == 'image/jpeg'
const isLt5M = file.size / 1024 / 1024 < 2 // 2MB
if (!isJPGorPNG) {
this.$message.error('只能上传 JPG/PNG/jpeg 格式的图片');
this.$message.error('只能上传 JPG/PNG/jpeg 格式的图片')
}
if (!isLt5M) {
this.$message.error('上传图片大小不能超过 2MB');
this.$message.error('上传图片大小不能超过 2MB')
}
return isJPGorPNG && isLt5M;
}
}
};
return isJPGorPNG && isLt5M
},
},
}
</script>
<style scoped>

View File

@ -39,7 +39,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://112.29.103.165:21626`, //线上环境-重庆
// target: `http://112.29.103.165:21624`,//线上环境-宁夏 打包前放开数据大屏的路由
target: `http://192.168.0.14:21624`, //测试环境
// target: `http://192.168.0.14:21624`, //测试环境
// target: `http://1.12.248.179:23028`,//线上环境-南网
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
@ -48,7 +48,7 @@ module.exports = {
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/
// target: `http://10.40.92.153:8080`, //帅
// target: `http://10.40.92.14:28080`, //福
target: `http://10.40.92.5:28080`, //福
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;