优化测试问题

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": "机具", "author": "机具",
"license": "MIT", "license": "MIT",
"scripts": { "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": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"build:prod-nw": "vue-cli-service build --mode production-nw", "build:prod-nw": "vue-cli-service build --mode production-nw",

View File

@ -1,13 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="关键字" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input
maxlength="50" maxlength="50"
@ -26,12 +19,7 @@
style="width: 240px" style="width: 240px"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工程名称" prop="proId"> <el-form-item label="工程名称" prop="proId">
@ -43,12 +31,7 @@
style="width: 240px" style="width: 240px"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="typeId"> <el-form-item label="工机具类型" prop="typeId">
@ -63,8 +46,7 @@
}" }"
@change="handleNodeClick" @change="handleNodeClick"
aria-placeholder="请选择极具类型" aria-placeholder="请选择极具类型"
> ></el-cascader>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="退料申请时间" prop="time"> <el-form-item label="退料申请时间" prop="time">
<el-date-picker <el-date-picker
@ -74,24 +56,11 @@
end-placeholder="结束日期" end-placeholder="结束日期"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="退料状态" prop="taskStatus"> <el-form-item label="退料状态" prop="taskStatus">
<el-select <el-select v-model="queryParams.taskStatus" clearable filterable style="width: 240px" placeholder="请选择">
v-model="queryParams.taskStatus" <el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option>
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-select>
</el-form-item> </el-form-item>
<el-form-item label="协议号" prop="agreementCode"> <el-form-item label="协议号" prop="agreementCode">
@ -105,27 +74,14 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
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-item>
</el-form> </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 type="primary" plain size="mini" @click="handleAdd" <el-button type="primary" plain size="mini" @click="handleAdd">退料申请</el-button>
>退料申请</el-button
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
@ -138,87 +94,28 @@
> >
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col> </el-col>
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
v-loading="loading"
:data="typeList"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" width="80" type="index"> <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> <span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true" />
label="退料单号" <el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
align="center" <el-table-column label="退料工程" align="center" prop="lotName" :show-overflow-tooltip="true" />
prop="code" <el-table-column label="退料机具" align="center" prop="typeName" :show-overflow-tooltip="true" />
: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 <el-table-column label="退料申请时间" align="center" prop="backTime" :show-overflow-tooltip="true" />
label="退料单位" <el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
align="center" <el-table-column label="异常退料" align="center" prop="dictName" :show-overflow-tooltip="true">
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="dictName"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<!-- 暂时全部未否 --> <!-- 暂时全部未否 -->
@ -226,62 +123,20 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="退料状态" align="center" :show-overflow-tooltip="true">
label="退料状态"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 状态 37-待审核 38-已审核 --> <!-- 状态 37-待审核 38-已审核 -->
<el-button type="text" v-if="scope.row.taskStatus == '37'"> <el-button type="text" v-if="scope.row.taskStatus == '37'">待审核</el-button>
待审核 <el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '38'">已审核</el-button>
</el-button> <el-button type="text" v-if="scope.row.taskStatus == '39'">退料核查</el-button>
<el-button <el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '40'">退料完成</el-button>
type="text" <el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '101'">退料驳回</el-button>
style="color: #67c23a"
v-if="scope.row.taskStatus == '38'"
>
已审核
</el-button>
<el-button type="text" v-if="scope.row.taskStatus == '39'">
退料核查
</el-button>
<el-button
type="text"
style="color: #67c23a"
v-if="scope.row.taskStatus == '40'"
>
退料完成
</el-button>
<el-button
type="text"
style="color: #67c23a"
v-if="scope.row.taskStatus == '101'"
>
退料驳回
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
label="备注" <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="250"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">查看</el-button>
size="mini"
plain
icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')"
>查看</el-button
>
<!-- <el-button <!-- <el-button
size="mini" size="mini"
type="warning" type="warning"
@ -291,26 +146,11 @@
v-hasPermi="['store:labelType:edit']" v-hasPermi="['store:labelType:edit']"
>编辑</el-button >编辑</el-button
> --> > -->
<el-button <el-button size="mini" type="info" v-if="scope.row.taskStatus == '101'" @click="handleUpdate(scope.row)">
size="mini" 驳回提交
type="info" </el-button>
v-if="scope.row.taskStatus == '101'" <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
@click="handleUpdate(scope.row)" <el-button size="mini" type="info" @click="handlePrint(scope.row)">退料单</el-button>
>驳回提交</el-button
>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button
>
<el-button
size="mini"
type="info"
@click="handlePrint(scope.row)"
>退料单</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -324,13 +164,7 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
:title="title"
:visible.sync="open"
width="1000px"
append-to-body
:close-on-click-modal="false"
>
<el-form <el-form
:model="dialogQueryParams" :model="dialogQueryParams"
ref="queryForm1" ref="queryForm1"
@ -375,8 +209,7 @@
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择时间" placeholder="选择时间"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
@ -402,74 +235,32 @@
<el-row> <el-row>
<el-form-item label="关键字" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input v-model="dialogQueryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
v-model="dialogQueryParams.keyWord"
placeholder="请输入关键字"
clearable
style="width: 240px"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1">查询</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
icon="el-icon-search"
size="mini"
@click="handleQuery1"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery1"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table v-loading="loading" :data="loadingList" height="500px" @selection-change="handleSelectionChange">
v-loading="loading"
:data="loadingList"
height="500px"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope"> <template scope="scope">
<span>{{ (dialogQueryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span> <span>{{ (dialogQueryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
label="类型名称" <el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeCode"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column <!-- <el-table-column
label="编码" label="编码"
align="center" align="center"
prop="maCode" prop="maCode"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> --> /> -->
<el-table-column <el-table-column label="当前在用量" align="center" prop="useNum" :show-overflow-tooltip="true" />
label="当前在用量" <el-table-column label="退料数量" align="center" prop="num" class-name="small-padding fixed-width" width="200">
align="center"
prop="useNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料数量"
align="center"
prop="num"
class-name="small-padding fixed-width"
width="200"
>
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.num" v-model="scope.row.num"
@ -489,12 +280,7 @@
@pagination="getDialogList" @pagination="getDialogList"
/> />
<div <div slot="footer" class="dialog-footer" style="text-align: center" v-if="loadingType == 'update'">
slot="footer"
class="dialog-footer"
style="text-align: center"
v-if="loadingType == 'update'"
>
<el-button type="primary" @click="submitForm">确定</el-button> <el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
</div> </div>
@ -516,10 +302,7 @@
> >
<div class="submit_box"> <div class="submit_box">
<div> <div>
<i <i class="el-icon-circle-check" style="color: #ff9900; font-size: 30px"></i>
class="el-icon-circle-check"
style="color: #ff9900; font-size: 30px"
></i>
</div> </div>
<div class="submit_box_title"> <div class="submit_box_title">
<div>{{ openTextOne }}</div> <div>{{ openTextOne }}</div>
@ -528,9 +311,7 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">返回</el-button> <el-button @click="cancel">返回</el-button>
<el-button type="primary" @click="submitOpenOneForm()" <el-button type="primary" @click="submitOpenOneForm()">确定</el-button>
>确定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
@ -543,10 +324,7 @@
> >
<div class="submit_box_two"> <div class="submit_box_two">
<div> <div>
<i <i class="el-icon-circle-check" style="color: #00c196; font-size: 30px"></i>
class="el-icon-circle-check"
style="color: #00c196; font-size: 30px"
></i>
</div> </div>
<div class="submit_box_title">{{ openTextThree }}</div> <div class="submit_box_title">{{ openTextThree }}</div>
</div> </div>
@ -556,32 +334,24 @@
</template> </template>
<script> <script>
import { import { listType, getType, delType, addType, updateType, refreshCache, getUseTypeTree } from '@/api/system/dict/type'
listType, import {
getType,
delType,
addType,
updateType,
refreshCache,
getUseTypeTree,
} from '@/api/system/dict/type'
import {
ApiGetBackApplyList, ApiGetBackApplyList,
getViewByApply, getViewByApply,
backApplyDelApi, backApplyDelApi,
submitBackApplyApi, submitBackApplyApi,
} from '@/api/claimAndRefund/return.js' } from '@/api/claimAndRefund/return.js'
import { getInfo, h } from '@/api/login' import { getInfo, h } from '@/api/login'
import { import {
getUnitData, getUnitData,
getProData, getProData,
getAgreementInfoById, getAgreementInfoById,
getUseNumByTypeId // getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js' } from '@/api/claimAndRefund/receive.js'
import dialogFormByCq from './dialogFormByCq.vue' import dialogFormByCq from './dialogFormByCq.vue'
// 10:42startTime,endTime typeId // 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply // http://localhost/claimAndRefund/return/returnApply
export default { export default {
name: '', name: '',
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
components: { dialogFormByCq }, components: { dialogFormByCq },
@ -744,13 +514,11 @@
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$tab.closeOpenPage( this.$tab.closeOpenPage('/claimAndRefund/return/returnApplyAddByCq')
'/claimAndRefund/return/returnApplyAddByCq',
)
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.dictId) this.ids = selection.map(item => item.dictId)
this.single = selection.length != 1 this.single = selection.length != 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -782,7 +550,7 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs['queryForm1'].validate((valid) => { this.$refs['queryForm1'].validate(valid => {
if (valid) { if (valid) {
let backApplyInfo = [] let backApplyInfo = []
for (let i = 0; i < this.loadingList.length; i++) { for (let i = 0; i < this.loadingList.length; i++) {
@ -806,7 +574,7 @@
backApplyDetails: JSON.stringify(this.loadingList), backApplyDetails: JSON.stringify(this.loadingList),
} }
console.log('param----', params) console.log('param----', params)
submitBackApplyApi(params).then((res) => {}) submitBackApplyApi(params).then(res => {})
// if (this.form.dictId != undefined) { // if (this.form.dictId != undefined) {
// updateType(this.form).then(response => { // updateType(this.form).then(response => {
// this.$modal.msgSuccess(""); // this.$modal.msgSuccess("");
@ -875,7 +643,7 @@
{ {
...this.queryParams, ...this.queryParams,
}, },
`退料申请单_${new Date().getTime()}.xlsx`, `退料申请单_${new Date().getTime()}.xlsx`
) )
}, },
getDialogList() { getDialogList() {
@ -886,15 +654,15 @@
pageNum: this.dialogQueryParams.pageNum, pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize, pageSize: this.dialogQueryParams.pageSize,
} }
getViewByApply(params).then((res) => { getViewByApply(params).then(res => {
// console.log(res) // console.log(res)
this.loadingList = res.data.rows this.loadingList = res.data.rows
this.loadingList.forEach(item=>{ /* this.loadingList.forEach(item=>{
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{ getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
item.useNum = res.data item.useNum = res.data
}) })
}) })*/
this.loadingTotal = res.data.total this.loadingTotal = res.data.total
}) })
}, },
@ -906,7 +674,7 @@
}) })
}, },
InitIGetInfo() { InitIGetInfo() {
getInfo().then((res) => { getInfo().then(res => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
this.getList() this.getList()
}) })
@ -972,10 +740,10 @@
this.deptOptions = res.data this.deptOptions = res.data
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.submit_box { .submit_box {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
@ -995,9 +763,9 @@
font-size: 12px; font-size: 12px;
} }
} }
} }
.submit_box_two { .submit_box_two {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -1011,15 +779,15 @@
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
} }
} }
::v-deep.el-table .fixed-width .el-button--mini { ::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important; width: 60px !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
.dialog-footer { .dialog-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
</style> </style>

View File

@ -1,20 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="关键字" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
style="width: 240px"
/>
</el-form-item> </el-form-item>
<el-form-item label="退料单位" prop="unitId"> <el-form-item label="退料单位" prop="unitId">
<el-select <el-select
@ -25,13 +13,7 @@
style="width: 240px" style="width: 240px"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工程名称" prop="lotId"> <el-form-item label="工程名称" prop="lotId">
@ -43,13 +25,7 @@
style="width: 240px" style="width: 240px"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="协议号" prop="agreementCode"> <el-form-item label="协议号" prop="agreementCode">
@ -62,29 +38,12 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="typeId"> <el-form-item label="工机具类型" prop="typeId">
<Tree <Tree ref="mychildSon" :width="240" :dataList="deptList" @changeId="selectDrop"></Tree>
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item> </el-form-item>
<el-form-item label="退料状态" prop="taskStatus"> <el-form-item label="退料状态" prop="taskStatus">
<el-select <el-select v-model="queryParams.taskStatus" clearable filterable style="width: 240px" placeholder="请选择">
v-model="queryParams.taskStatus" <el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option>
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-select>
</el-form-item> </el-form-item>
@ -96,24 +55,12 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
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-item>
</el-form> </el-form>
@ -129,20 +76,10 @@
> >
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col> </el-col>
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList"> <el-table v-loading="loading" :data="typeList">
@ -151,28 +88,28 @@
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span> <span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true"/> <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="unitName" :show-overflow-tooltip="true" />
<el-table-column label="退料工程" align="center" prop="lotName" :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="typeName" :show-overflow-tooltip="true" />
<el-table-column label="退料人员" align="center" prop="backPerson" :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="phone" :show-overflow-tooltip="true" />
<el-table-column label="申请时间" align="center" prop="backTime" :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="agreementCode" :show-overflow-tooltip="true" />
<el-table-column label="退料状态" align="center" prop="taskName" :show-overflow-tooltip="true"> <el-table-column label="退料状态" align="center" prop="taskName" :show-overflow-tooltip="true"></el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')"> <el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">查看</el-button>
查看 <el-button
</el-button> size="mini"
<el-button size="mini" type="warning" @click="handleReturn(scope.row, 'see')" v-if="scope.row.taskStatus!='40'"> type="warning"
@click="handleReturn(scope.row, 'see')"
v-if="scope.row.taskStatus != '40'"
>
退料 退料
</el-button> </el-button>
<el-button size="mini" type="primary" @click="handlePrint(scope.row)"> <el-button size="mini" type="primary" @click="handlePrint(scope.row)">退料单</el-button>
退料单
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -186,31 +123,30 @@
/> />
<!-- 退料单 --> <!-- 退料单 -->
<dialogForm <dialogForm :dialogTitle="title" :isShowFlag.sync="isShowOneFlag" :rowObj="rowObj" :priKey="priKey"></dialogForm>
:dialogTitle="title"
:isShowFlag.sync="isShowOneFlag"
:rowObj="rowObj"
:priKey="priKey"
></dialogForm>
</div> </div>
</template> </template>
<script> <script>
import { getBackAuditList, getViewByExamine, ApiBackApplyAudit,ApiBackApplyRefuse,getBackReceiveList } from "@/api/claimAndRefund/return.js" import {
import { getInfo } from "@/api/login"; getBackAuditList,
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js" getViewByExamine,
import dialogForm from "./dialogFormExame.vue"; ApiBackApplyAudit,
import { listPartTypeApi } from '@/api/repairTest/repair' ApiBackApplyRefuse,
import Tree from './tree.vue' getBackReceiveList,
export default { } 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", // name: "ReturnExamine",
components: { dialogForm, Tree }, components: { dialogForm, Tree },
data() { data() {
return { return {
type: '', type: '',
isShowOneFlag: false,//退 isShowOneFlag: false, //退
priKey: '', priKey: '',
// //
loading: true, loading: true,
@ -227,7 +163,7 @@
// //
typeList: [], typeList: [],
// //
title: "", title: '',
// //
open: false, open: false,
// //
@ -236,15 +172,15 @@
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
keyWord: '',// keyWord: '', //
unitId: "",//id unitId: '', //id
lotId: '',//id lotId: '', //id
taskStatus: '',// taskStatus: '', //
typeId: '',// typeId: '', //
time: '', time: '',
agreementCode: '',// agreementCode: '', //
startTime: '', startTime: '',
endTime: '' endTime: '',
}, },
companyId: '', companyId: '',
deptList: [], deptList: [],
@ -273,7 +209,7 @@
}, },
], ],
rowObj: {}, rowObj: {},
}; }
}, },
created() { created() {
this.initSelectData() this.initSelectData()
@ -284,12 +220,12 @@
InitIGetInfo() { InitIGetInfo() {
getInfo().then(res => { getInfo().then(res => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
this.getList(); this.getList()
}) })
}, },
getTree() { getTree() {
listPartTypeApi().then((response) => { listPartTypeApi().then(response => {
console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data); console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data)
this.deptList = response.data this.deptList = response.data
}) })
}, },
@ -304,9 +240,7 @@
}, },
// //
async GetUnitData() { async GetUnitData() {
const params = { const params = {}
}
const res = await getUnitData(params) const res = await getUnitData(params)
this.unitList = res.data this.unitList = res.data
console.log('GetUnitData ======================', res) console.log('GetUnitData ======================', res)
@ -314,7 +248,7 @@
// //
async GetProData() { async GetProData() {
const params = { const params = {
id: this.queryParams.unitId id: this.queryParams.unitId,
} }
const res = await getProData(params) const res = await getProData(params)
this.proList = res.data this.proList = res.data
@ -323,16 +257,13 @@
}, },
// //
async InitGetAgreementInfoById() { async InitGetAgreementInfoById() {
const { const { unitId, proId } = this.queryParams
unitId,
proId
} = this.queryParams
if (!unitId || !proId) { if (!unitId || !proId) {
return return
} }
const params = { const params = {
unitId: unitId, unitId: unitId,
projectId: proId projectId: proId,
} }
const res = await getAgreementInfoById(params) const res = await getAgreementInfoById(params)
// this.proList = res.data // this.proList = res.data
@ -352,31 +283,30 @@
this.queryParams.endTime = this.dateRange[1] this.queryParams.endTime = this.dateRange[1]
try { try {
let params = { let params = {
flag:1, flag: 1,
companyId: this.companyId, companyId: this.companyId,
...this.queryParams ...this.queryParams,
} }
console.log("paramsparamsparams", params) console.log('paramsparamsparams', params)
const res = await getBackReceiveList(params) const res = await getBackReceiveList(params)
this.typeList = res.data.rows; this.typeList = res.data.rows
this.total = res.data.total; this.total = res.data.total
this.loading = false; this.loading = false
} catch (error) { } catch (error) {}
}
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = []
// this.resetForm("queryForm"); // this.resetForm("queryForm");
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = '' this.$refs.mychildSon.inputValue = ''
this.initSelectData() this.initSelectData()
this.handleQuery(); this.handleQuery()
}, },
//退 //退
handlePrint(row) { handlePrint(row) {
@ -387,36 +317,38 @@
// //
handleSee(row) { handleSee(row) {
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail', path: '/claimAndRefund/returnInDetail',
query:{ query: {
Id:row.id, Id: row.id,
isView:true, isView: true,
} },
}) })
}, },
//退 //退
handleReturn(row) { handleReturn(row) {
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail', path: '/claimAndRefund/returnInDetail',
query:{ query: {
Id:row.id, Id: row.id,
taskId:row.taskId taskId: row.taskId,
} },
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('base/backReceive/export', { this.download(
...this.queryParams 'base/backReceive/export',
}, `退料接收_${new Date().getTime()}.xlsx`) {
...this.queryParams,
}, },
`退料接收_${new Date().getTime()}.xlsx`
)
}} },
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.submit_box { .submit_box {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
@ -436,9 +368,9 @@
font-size: 12px; font-size: 12px;
} }
} }
} }
.submit_box_two { .submit_box_two {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -452,15 +384,15 @@
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
} }
} }
::v-deep.el-table .fixed-width .el-button--mini { ::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important; width: 60px !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
.dialog-footer { .dialog-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
</style> </style>

View File

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

View File

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

View File

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