生产过程检验+手持版本管理

yangwl
zhaoxiaolin 1 year ago
parent 9e980dadf8
commit 2973a271ad

@ -10,6 +10,10 @@ server {
index index.html index.htm; index index.html index.htm;
} }
location /download/ {
root /opt/apkFile/;
}
location /prod-api/ { location /prod-api/ {
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;

@ -42,3 +42,12 @@ export function delQcProduce(recordId) {
method: 'delete' method: 'delete'
}); });
} }
// 查询工作中心列表
export function getQcListWorkCenter(query) {
return request({
url: '/quality/qcProduce/getQcListWorkCenter',
method: 'get',
params: query
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询手持apk版本控制列表
export function listFile(query) {
return request({
url: '/system/apkFile/list',
method: 'get',
params: query
});
}
// 查询手持apk版本控制详细
export function getFile(id) {
return request({
url: '/system/apkFile/' + id,
method: 'get'
});
}
// 新增手持apk版本控制
export function addFile(data) {
return request({
url: '/system/apkFile',
method: 'post',
data: data
});
}
// 修改手持apk版本控制
export function updateFile(data) {
return request({
url: '/system/apkFile',
method: 'put',
data: data
});
}
// 删除手持apk版本控制
export function delFile(id) {
return request({
url: '/system/apkFile/' + id,
method: 'delete'
});
}

@ -1,6 +1,14 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务编号" prop="checkNo">
<el-input
v-model="queryParams.checkNo"
placeholder="请输入检验任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次号" prop="incomeBatchNo"> <el-form-item label="批次号" prop="incomeBatchNo">
<el-input <el-input
v-model="queryParams.incomeBatchNo" v-model="queryParams.incomeBatchNo"
@ -25,6 +33,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="检验结果" prop="checkResult">
<el-select
v-model="queryParams.checkResult"
placeholder="检验结果"
clearable
>
<el-option
v-for="dict in dict.type.check_result"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="来料时间" prop="incomeTimeArray"> <el-form-item label="来料时间" prop="incomeTimeArray">
<el-date-picker <el-date-picker
v-model="queryParams.incomeTimeArray" v-model="queryParams.incomeTimeArray"
@ -35,7 +57,6 @@
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<!--
<el-form-item label="检测地点" prop="checkLoc"> <el-form-item label="检测地点" prop="checkLoc">
<el-input <el-input
v-model="queryParams.checkLoc" v-model="queryParams.checkLoc"
@ -43,7 +64,7 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item>--> </el-form-item>
<el-form-item label="检验时间" prop="checkTimeArray"> <el-form-item label="检验时间" prop="checkTimeArray">
<el-date-picker <el-date-picker
v-model="queryParams.checkTimeArray" v-model="queryParams.checkTimeArray"
@ -318,7 +339,7 @@ import moment from 'moment';
export default { export default {
name: "Income", name: "Income",
components: { ItemSelectMaterial,ItemSelectSupplier,ItemSelectUser,ItemSelectProject}, components: { ItemSelectMaterial,ItemSelectSupplier,ItemSelectUser,ItemSelectProject},
dicts: ["unit","check_status"], dicts: ["unit","check_status","check_result"],
data() { data() {
return { return {
// //

@ -11,7 +11,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
<el-form-item label="员工工号"> <el-form-item label="员工工号">
<el-input <el-input
v-model="queryParams.userCoe" v-model="queryParams.userCode"
placeholder="员工工号" placeholder="员工工号"
clearable clearable
style="width: 240px" style="width: 240px"

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="检验任务编号" prop="checkNo"> <el-form-item label="任务编号" prop="checkNo">
<el-input <el-input
v-model="queryParams.checkNo" v-model="queryParams.checkNo"
placeholder="请输入检验任务编号" placeholder="请输入检验任务编号"
@ -41,31 +41,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="quality"> <el-form-item label="车间名称" prop="carName">
<el-input
v-model="queryParams.quality"
placeholder="请输入数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input
v-model="queryParams.unit"
placeholder="请输入单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属车间编码" prop="carCode">
<el-input
v-model="queryParams.carCode"
placeholder="请输入所属车间编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属车间名称" prop="carName">
<el-input <el-input
v-model="queryParams.carName" v-model="queryParams.carName"
placeholder="请输入所属车间名称" placeholder="请输入所属车间名称"
@ -73,14 +49,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="生产时间" prop="produceDate">
<el-date-picker clearable
v-model="queryParams.produceDate" <el-form-item label="生产时间" prop="produceDateArray">
type="date" <el-date-picker
value-format="yyyy-MM-dd" v-model="queryParams.produceDateArray"
placeholder="请选择生产时间"> format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="检测地点" prop="checkLoc"> <el-form-item label="检测地点" prop="checkLoc">
<el-input <el-input
v-model="queryParams.checkLoc" v-model="queryParams.checkLoc"
@ -89,15 +71,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="检测人工号" prop="checkManCode"> <el-form-item label="检测人" prop="checkManName">
<el-input
v-model="queryParams.checkManCode"
placeholder="请输入检测人工号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测人姓名" prop="checkManName">
<el-input <el-input
v-model="queryParams.checkManName" v-model="queryParams.checkManName"
placeholder="请输入检测人姓名" placeholder="请输入检测人姓名"
@ -105,61 +79,29 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="检验时间" prop="checkTime"> <el-form-item label="检验时间" prop="checkTimeArray">
<el-date-picker clearable <el-date-picker
v-model="queryParams.checkTime" v-model="queryParams.checkTimeArray"
type="date" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd" type="datetimerange"
placeholder="请选择检验时间"> range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="检验结果Y合格" prop="checkResult"> <el-form-item label="检验结果" prop="checkResult">
<el-input <el-select
v-model="queryParams.checkResult" v-model="queryParams.checkResult"
placeholder="请输入检验结果Y合格" placeholder="检验结果"
clearable clearable
@keyup.enter.native="handleQuery" >
/> <el-option
</el-form-item> v-for="dict in dict.type.check_result"
<el-form-item label="预留字段1" prop="attr1"> :key="dict.value"
<el-input :label="dict.label"
v-model="queryParams.attr1" :value="dict.value"
placeholder="请输入预留字段1"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预留字段2" prop="attr2">
<el-input
v-model="queryParams.attr2"
placeholder="请输入预留字段2"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预留字段3" prop="attr3">
<el-input
v-model="queryParams.attr3"
placeholder="请输入预留字段3"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预留字段4" prop="attr4">
<el-input
v-model="queryParams.attr4"
placeholder="请输入预留字段4"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工厂编码" prop="factoryCode">
<el-input
v-model="queryParams.factoryCode"
placeholder="请输入工厂编码"
clearable
@keyup.enter.native="handleQuery"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -178,6 +120,7 @@
v-hasPermi="['quality:qcProduce:add']" v-hasPermi="['quality:qcProduce:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<!--
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -198,7 +141,7 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['quality:qcProduce:remove']" v-hasPermi="['quality:qcProduce:remove']"
>删除</el-button> >删除</el-button>-->
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -215,23 +158,30 @@
<el-table v-loading="loading" :data="qcProduceList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="qcProduceList" @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="id" align="center" prop="recordId" /> <el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" /> <el-table-column label="任务编号" align="center" prop="checkNo" />
<el-table-column label="批次号" align="center" prop="batchNo" /> <el-table-column label="批次号" align="center" prop="batchNo" />
<el-table-column label="订单号" align="center" prop="orderNo" /> <el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="物料号" align="center" prop="materialCode" /> <el-table-column label="物料号" align="center" prop="materialCode" />
<el-table-column label="物料名称" align="center" prop="materialName" /> <el-table-column label="物料名称" align="center" prop="materialName" />
<el-table-column label="数量" align="center" prop="quality" /> <el-table-column label="数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="所属车间编码" align="center" prop="carCode" /> <el-table-column label="车间编码" align="center" prop="carCode" />
<el-table-column label="所属车间名称" align="center" prop="carName" /> <el-table-column label="车间名称" align="center" prop="carName" />
<el-table-column label="生产时间" align="center" prop="produceDate" width="180"> <el-table-column label="生产时间" align="center" prop="produceDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.produceDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.produceDate, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测地点" align="center" prop="checkLoc" /> <el-table-column label="检测地点" align="center" prop="checkLoc" />
<el-table-column label="检测状态" align="center" prop="checkStatus" /> <el-table-column label="检测状态" align="center" prop="checkStatus" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.check_status"
:value="scope.row.checkStatus"
/>
</template>
</el-table-column>
<el-table-column label="检测人工号" align="center" prop="checkManCode" /> <el-table-column label="检测人工号" align="center" prop="checkManCode" />
<el-table-column label="检测人姓名" align="center" prop="checkManName" /> <el-table-column label="检测人姓名" align="center" prop="checkManName" />
<el-table-column label="检验时间" align="center" prop="checkTime" width="180"> <el-table-column label="检验时间" align="center" prop="checkTime" width="180">
@ -239,29 +189,34 @@
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检验结果Y合格" align="center" prop="checkResult" /> <el-table-column label="检验结果" align="center" prop="checkResult" />
<el-table-column label="是否启用1启用0停用" align="center" prop="status" /> <el-table-column label="是否启用" align="center" width="100">
<el-table-column label="预留字段1" align="center" prop="attr1" /> <template slot-scope="scope">
<el-table-column label="预留字段2" align="center" prop="attr2" /> <el-switch
<el-table-column label="预留字段3" align="center" prop="attr3" /> v-model="scope.row.status"
<el-table-column label="预留字段4" align="center" prop="attr4" /> active-value="1"
<el-table-column label="工厂编码" align="center" prop="factoryCode" /> inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcProduce:edit']" v-hasPermi="['quality:qcProduce:edit']"
>修改</el-button> >检验</el-button>
<!--
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['quality:qcProduce:remove']" v-hasPermi="['quality:qcProduce:remove']"
>删除</el-button> >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -275,95 +230,142 @@
/> />
<!-- 添加或修改生产过程检验任务对话框 --> <!-- 添加或修改生产过程检验任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="检验任务编号" prop="checkNo"> <el-row>
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" /> <el-col :span="8">
</el-form-item> <el-form-item label="检验任务编号" prop="checkNo">
<el-form-item label="批次号" prop="batchNo"> <el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
<el-input v-model="form.batchNo" placeholder="请输入批次号" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="订单号" prop="orderNo"> <el-col :span="8">
<el-input v-model="form.orderNo" placeholder="请输入订单号" /> <el-form-item label="批次号" prop="batchNo">
</el-form-item> <el-input v-model="form.batchNo" placeholder="请输入批次号" />
<el-form-item label="物料号" prop="materialCode"> </el-form-item>
<el-input v-model="form.materialCode" placeholder="请输入物料号" /> </el-col>
</el-form-item> <el-col :span="8">
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.materialName" placeholder="请输入物料名称" /> <el-input v-model="form.orderNo" placeholder="请输入订单号" />
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="quality"> </el-col>
<el-input v-model="form.quality" placeholder="请输入数量" /> </el-row>
</el-form-item> <el-row>
<el-form-item label="单位" prop="unit"> <el-col :span="12">
<el-input v-model="form.unit" placeholder="请输入单位" /> <el-form-item label="物料名称" prop="materialName">
</el-form-item> <el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-form-item label="所属车间编码" prop="carCode"> <el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
<el-input v-model="form.carCode" placeholder="请输入所属车间编码" /> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属车间名称" prop="carName"> </el-col>
<el-input v-model="form.carName" placeholder="请输入所属车间名称" />
</el-form-item> <el-col :span="12">
<el-form-item label="生产时间" prop="produceDate"> <el-form-item label="物料号" prop="materialCode">
<el-date-picker clearable <el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
v-model="form.produceDate" </el-form-item>
type="date" </el-col>
value-format="yyyy-MM-dd" </el-row>
placeholder="请选择生产时间"> <el-row>
</el-date-picker> <el-col :span="12">
</el-form-item> <el-form-item label="收货数量" prop="quality">
<el-form-item label="检测地点" prop="checkLoc"> <el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="检测人工号" prop="checkManCode"> <el-col :span="12">
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" /> <el-form-item label="单位" prop="unit" >
</el-form-item> <el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-form-item label="检测人姓名" prop="checkManName"> <el-option
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" /> v-for="dict in dict.type.unit"
</el-form-item> :key="dict.value"
<el-form-item label="检验时间" prop="checkTime"> :label="dict.label"
<el-date-picker clearable :value="dict.value"
v-model="form.checkTime" ></el-option>
type="date" </el-select>
value-format="yyyy-MM-dd" </el-form-item>
placeholder="请选择检验时间"> </el-col>
</el-date-picker> </el-row>
</el-form-item> <el-row>
<el-form-item label="检验结果Y合格" prop="checkResult"> <el-col :span="8">
<el-input v-model="form.checkResult" placeholder="请输入检验结果Y合格" /> <el-form-item label="车间名称" prop="carName">
</el-form-item> <el-input v-model="form.carName" placeholder="请输入所属车间名称" >
<el-form-item label="预留字段1" prop="attr1"> <el-button slot="append" @click="handleSelectWorkCenter" icon="el-icon-search"></el-button>
<el-input v-model="form.attr1" placeholder="请输入预留字段1" /> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="预留字段2" prop="attr2"> </el-col>
<el-input v-model="form.attr2" placeholder="请输入预留字段2" /> <el-col :span="8">
</el-form-item> <el-form-item label="车间编码" prop="carCode">
<el-form-item label="预留字段3" prop="attr3"> <el-input v-model="form.carCode" placeholder="请输入所属车间编码" disabled/>
<el-input v-model="form.attr3" placeholder="请输入预留字段3" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="预留字段4" prop="attr4"> <el-col :span="8">
<el-input v-model="form.attr4" placeholder="请输入预留字段4" /> <el-form-item label="生产时间" prop="produceDate">
</el-form-item> <el-date-picker clearable
<el-form-item label="工厂编码" prop="factoryCode"> v-model="form.produceDate"
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" /> type="datetime"
</el-form-item> value-format="yyyy-MM-dd HH:mm:ss"
<el-form-item label="删除标识1删除0正常" prop="delFlag"> placeholder="请选择生产时间">
<el-input v-model="form.delFlag" placeholder="请输入删除标识1删除0正常" /> </el-date-picker>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检测人工号" prop="checkManCode" >
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检测地点" prop="checkLoc">
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<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>
</el-dialog> </el-dialog>
<!--产品物料选择弹窗-->
<ItemSelectMaterial
ref="itemSelectMaterial"
@onSelected="onSelectMaterial"
></ItemSelectMaterial>
<!--工作中心(车间)选择弹窗-->
<ItemSelectWorkCenter
ref="itemSelectWorkCenter"
@onSelected="onSelectWorkCenter"
></ItemSelectWorkCenter>
<!--人员选择弹窗-->
<ItemSelectUser
ref="itemSelectUser"
@onSelected="onSelectUser"
></ItemSelectUser>
<!--检验项目弹窗-->
<ItemSelectProject
ref="itemSelectProject"
@saveCheck="saveCheck"
></ItemSelectProject>
</div> </div>
</template> </template>
<script> <script>
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce } from "@/api/quality/qcProduce"; import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce } from "@/api/quality/qcProduce";
import moment from 'moment';
import ItemSelectMaterial from "../qcIncome/selectMaterial.vue";
import ItemSelectWorkCenter from "./selectWorkCenter.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue";
import ItemSelectProject from "../qcIncome/checkProjectType.vue";
export default { export default {
name: "QcProduce", name: "QcProduce",
components: { ItemSelectMaterial,ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject},
dicts: ["unit","check_status","check_result"],
data() { data() {
return { return {
// //
@ -386,6 +388,8 @@ export default {
open: false, open: false,
// //
queryParams: { queryParams: {
produceDateArray: [],
checkTimeArray: [],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
checkNo: null, checkNo: null,
@ -415,19 +419,72 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
factoryCode: [ batchNo: [
{ required: true, message: "工厂编码不能为空", trigger: "blur" } { required: true, message: "批次号不能为空", trigger: "blur" }
],
orderNo: [
{ required: true, message: "订单号不能为空", trigger: "blur" }
],
materialName: [
{ required: true, message: "物料号不能为空", trigger: "blur" }
],
quality: [
{ required: true, message: "数量不能为空", trigger: "blur" }
],
unit: [
{ required: true, message: "单位不能为空", trigger: "blur" }
],
carName: [
{ required: true, message: "车间不能为空", trigger: "blur" }
],
produceDate: [
{ required: true, message: "生产时间不能为空", trigger: "blur" }
],
checkManName: [
{ required: true, message: "检测人不能为空", trigger: "blur" }
],
checkLoc: [
{ required: true, message: "检测地点不能为空", trigger: "blur" }
], ],
} }
}; };
}, },
created() { created() {
this.getDate();
this.getList(); this.getList();
}, },
methods: { methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
let end = this.Fungetdate (1)
this.queryParams.produceDateArray.push(start,end)
this.queryParams.checkTimeArray.push(start,end)
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d+" 00:00:00";
},
/** 查询生产过程检验任务列表 */ /** 查询生产过程检验任务列表 */
getList() { getList() {
this.loading = true; this.loading = true;
if(this.queryParams.produceDateArray!=null){
this.queryParams.produceDateStart = moment(this.queryParams.produceDateArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.produceDateEnd = moment(this.queryParams.produceDateArray[1]).format('YYYY-MM-DD HH:mm:ss');
}
if(this.queryParams.checkTimeArray!=null){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}
listQcProduce(this.queryParams).then(response => { listQcProduce(this.queryParams).then(response => {
this.qcProduceList = response.rows; this.qcProduceList = response.rows;
this.total = response.total; this.total = response.total;
@ -537,9 +594,59 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('qcProduce/qcProduce/export', { this.download('quality/qcProduce/export', {
...this.queryParams ...this.queryParams
}, `qcProduce_${new Date().getTime()}.xlsx`) }, `qcProduce_${new Date().getTime()}.xlsx`)
},
//
handleStatusChange(row) {
let text = row.status === "0" ? "停用" : "启用";
this.$modal.confirm('确认要"' + text + '""' + row.checkNo + '"吗?').then(function() {
return changeIncomeStatus(row.recordId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === "0" ? "1" : "0";
});
},
/**物料选择弹出框**/
handleSelectMaterial() {
this.$refs.itemSelectMaterial.showFlag = true;
},
//
onSelectMaterial(obj) {
this.form.materialCode = obj.code;
this.form.materialName = obj.name;
},
/**工作中心选择弹出框**/
handleSelectWorkCenter() {
this.$refs.itemSelectWorkCenter.showFlag = true;
},
//
onSelectWorkCenter(obj) {
this.form.carCode = obj.code;
this.form.carName = obj.name;
},
/**人员选择弹出框**/
handleSelectUser() {
this.$refs.itemSelectUser.showFlag = true;
},
//
onSelectUser(obj) {
this.form.checkManCode = obj.code;
this.form.checkManName = obj.name;
},
//
handleCheckProject(row){
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row);
},
//
saveCheck(){
this.getList();
} }
} }
}; };

@ -0,0 +1,289 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="文件名称" prop="fileName">
<el-input
v-model="queryParams.fileName"
placeholder="请输入文件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input
v-model="queryParams.version"
placeholder="请输入版本号"
clearable
@keyup.enter.native="handleQuery"
/>
</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-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:apkFile:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:apkFile:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:apkFile:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:apkFile:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="fileList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="文件名称" align="center" prop="fileName" />
<el-table-column label="文件地址" align="center" prop="fileAddress" />
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:apkFile:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:apkFile:remove']"
>删除</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"
/>
<!-- 添加或修改手持apk版本控制对话框 -->
<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-item label="文件名称" prop="fileName">
<el-input v-model="form.fileName" placeholder="请输入文件名称" />
</el-form-item>
<!--
<el-form-item label="文件地址" prop="fileAddress">
<el-input v-model="form.fileAddress" placeholder="请输入文件地址" />
</el-form-item>-->
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listFile, getFile, delFile, addFile, updateFile } from "@/api/system/apkFile";
export default {
name: "File",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// apk
fileList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
fileName: null,
fileAddress: null,
version: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
},
//
form: {},
//
rules: {
fileName: [
{ required: true, message: "文件名称不能为空", trigger: "blur" }
],
version: [
{ required: true, message: "文件名称不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询手持apk版本控制列表 */
getList() {
this.loading = true;
listFile(this.queryParams).then(response => {
this.fileList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
fileName: null,
fileAddress: null,
version: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加手持apk版本控制";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getFile(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改手持apk版本控制";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateFile(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addFile(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除手持apk版本控制编号为"' + ids + '"的数据项?').then(function() {
return delFile(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/file/export', {
...this.queryParams
}, `file_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -99,37 +99,8 @@
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" 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="附件" prop="fileList"> <el-form-item label="附件" prop="fileList">
<FileUpload v-model="form.fileList"/> <FileUpload v-model="form.fileList"/>
</el-form-item> </el-form-item>
<template>
<el-button @click="toggleSelection()"></el-button>
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
label="日期"
width="120">
<template slot-scope="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="120">
</el-table-column>
<el-table-column
prop="address"
label="地址"
show-overflow-tooltip>
</el-table-column>
</el-table>
</template>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>

Loading…
Cancel
Save