更新模块

This commit is contained in:
‘937886381’ 2023-06-21 16:56:28 +08:00
parent 52ad4588d3
commit 9ebd455859
139 changed files with 26302 additions and 196 deletions

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-08-22 14:57:50
* @LastEditors: zhp
* @LastEditTime: 2023-05-12 14:03:44
* @LastEditTime: 2023-06-21 13:55:38
* @Description:
-->
<!DOCTYPE html>
@ -38,7 +38,8 @@
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.76:8080/ym-pass';
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080/';
</script>
<% } %>
<!-- 集成测试环境 -->

View File

@ -418,7 +418,26 @@ t.supplier.description = '说明'
t.supplier.evaluationPeriod = '评估时间段'
t.supplier.evaluationType = '评估类型'
t.supplier.reminder = '提醒人'
t.supplier.title = '标题'
t.supplier.title = '标题'
t.supplier.projectTypeName = '类别'
t.supplier.requirement = '要求'
t.supplier.statisticalValue = '是否统计值'
t.supplier.evaluationTemplateName = '评估模板'
t.supplier.lastStartTime = '上次启动时间段'
t.supplier.lastStartEvaluationPeriod = '上次启动评估时间段'
t.supplier.estimatedNextStartTime = '预计下次启动时间'
t.supplier.offline = '下限'
t.supplier.online = '上限'
t.gage = {}
t.gage.name = '名称'
@ -503,6 +522,10 @@ t.gage.verifyLog = '校验记录'
t.gage.insideVerify = '内部校验'
t.gage.outsideVerify = '外部校验'
t.gage.verificationFee = '校验费用'
t.gage.report = '量具重复性及再现性分析报告'
t.gage.model = '型号'
@ -541,6 +564,84 @@ t.laboratory.trainDuration = '培训时长'
t.laboratory.trainType = '培训类型'
t.code = {}
t.code.name = '名称'
t.code.code = '编码'
t.code.description = '描述'
t.code.eightDisciplineType = '8D类型'
t.code.problemStatus = '状态'
t.code.eightDisciplineStatus = '状态'
t.code.actualResponsePeriod = '实际响应周期'
t.code.batchNumber = '批次数'
t.code.customName = '客户'
t.code.defectSource = '缺陷来源'
t.code.eightDisciplineId = '8D来源id'
t.code.eightDisciplineStatus = '8D类型'
t.code.productName = '产品名'
t.code.orderNo = '订单号'
t.code.productType = '产品类型'
t.code.requestResponseCycle = '要求响应周期'
t.code.responsibilityAttribution = '责任归属'
t.code.sampleAcceptanceTime = '样品接收时间'
t.code.supportProducts = '配套产品/系统'
t.code.title = '标题'
t.code.userId = '启动人'
t.code.examineStatus = '审核状态'
t.code.finalCompletionDate = '最终完成日期 '
t.code.occurrenceDate = '发生日期'
t.code.eightDTeam = '通知8D小组'
t.code.inspectionStatus = '报检状态'
t.code.batchNo = '批号'
t.code.batchQuantity = '批次数量'
t.code.batchSize = '批规格'
t.code.checkoutTime = '检验时间'
t.code.companyName = '单位'
t.code.inspectionQuantity = '报检数量'
t.code.inspectionStatus = '报检状态'
t.code.inspectionType = '检验类型'
t.code.orderNumber = '订单号'
t.code.productCode = '产品编码'
t.code.productName = '产品'
t.code.recheck = '复检'
t.code.remark = '备注'
t.code.samplesQuantity = '抽样数'
t.code.source = '来源'
t.code.supplierName = '供应商'
t.code.username = '检验人员'
t.code.factoryName = '工厂'
t.code.inspectionPlan = '报检计划'
t.code.inspectionTime = '报检时间'
t.code.customSampling = '抽样方案'
t.code.task = '任务'
t.code.upload = '上传'
t.code.judgmentResult = '判断结果'
t.code.defectiveQuantity = '不良数量'
t.code.defectsNumber = '缺陷数量'
t.code.submit = '提交'
t.code.processingMethod = '处理方法'
t.code.processingResults = '处理结果'
t.code.characteristics = '特性'
t.code.sampleSize = '样本大小'
t.code.grouping = '分组'
t.code.grouping = '分组'
t.code.meanRange = '均值极差图'
t.code.meanStandard = '均值标准差图'
t.code.medianRange = '中位数极差图'
t.code.singleValueMovingRange = '单值移动极差图'
t.code.meanMovingRangeRange = '均值移动极差极差极'
t.code.meanMovingRangeStandardDeviation = '均值移动极差标准差图'
t.code.originalData = '原始数据'
t.code.inspectionNumber = '检验单号'
t.code.locationNo = ' 样品/位置号'
t.code.groupNo = '组号'
t.code.parsingTime = '分析时间'
t.code.assayValue = '分析值'
t.code.status = '状态'
t.code.approval = '审批中'
t.code.approvalComplete = '审批完成'
t.code.uploaded = '已上传'
t.code.notUploaded = '未上传'
t.code.Examiner = '检验人'
@ -550,6 +651,19 @@ t.laboratory.trainType = '培训类型'

View File

@ -1,8 +1,8 @@
/*
* @Author: zhp
* @Date: 2023-01-06 10:13:07
* @LastEditTime: 2023-05-12 12:42:15
* @LastEditors: zwq
* @LastEditTime: 2023-05-31 10:11:32
* @LastEditors: zhp
* @Description:
*/
import axios from 'axios'

View File

@ -223,7 +223,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -192,7 +192,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -221,8 +221,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = "修改"
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-17 11:03:23
* @LastEditTime: 2023-06-20 15:37:39
* @LastEditors: zhp
* @Description:
-->
@ -178,8 +178,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = "修改"
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -201,8 +201,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = "修改"
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-04-17 11:03:48
* @LastEditTime: 2023-06-20 15:37:24
* @LastEditors: zhp
* @Description:
-->
@ -242,8 +242,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = "修改"
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-04-17 11:04:00
* @LastEditTime: 2023-06-20 15:37:17
* @LastEditors: zhp
* @Description:
-->
@ -272,8 +272,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = "修改"
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -0,0 +1,41 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-31 15:50:02
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag v-if="injectData.problemStatus === 1" type="success">可用</el-tag>
<el-tag v-else type="warning">不可用</el-tag>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
methods: {
//
// emitClick () {
// //
// const routeParams = {
// routeName: `${this.$route.name}__${this.injectData.id}`,
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
// path: 'sys/dict-data',
// params: {
// dictTypeId: this.injectData.id
// }
// }
// //
// addDynamicRoute(routeParams, this.$router)
// }
}
}
</script>

View File

@ -0,0 +1,427 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:04:28
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/deliveryInspection",
infoURL: "/code/deliveryInspection/{id}",
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
supplierList: [],
userList: [],
samplingPlanList:[],
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
unitList:[],
productList: [],
factoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
id:null,
batchNo: null,
batchSize: null,
checkoutTime: null,
companyId: null,
factoryId: null,
inspectionPlan: null,
inspectionQuantity: null,
inspectionStatus: null,
inspectionTime: null,
inspectionType: null,
orderNumber: null,
productCode: null,
productId: null,
recheck: null,
remark: null,
samplesQuantity: null,
shiftId: null,
source: null,
supplierId: null,
teamId: null,
userId: null,
},
};
},
computed: {
dataRule() {
return {
dictLabel: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
dictValue: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
sort: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
//
getInfo() {
this.$http
.get(`/code/deliveryInspection/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {})
},
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getDictDataList, {
params: {
limit: 999,
page: 1,
dictTypeId: '1665966021935190018'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.unitList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@ -0,0 +1,321 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:20:53
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="task" :label="$t('code.task')">
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode',
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
supplierList: [],
userList: [],
samplingPlanList: [],
unitList: [],
productList: [],
factoryList: [],
visible: false,
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
batchNo: null,
customSamplingId: null,
endTime: null,
factoryId: null,
inspectionStatus: null,
inspectionType: null,
productId: null,
recheck: null,
startTime: null,
supplierId: null,
task: null,
userId: null,
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
mounted () {
this.getDict()
},
methods: {
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
//
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
//
handleConditionSearch() {
this.$emit("successSubmit", this.dataForm)
},
// dataFormSubmitHandle: debounce(
// function () {
// // console.log(1111);
// // this.visible = false;
// this.$emit("successSubmit", this.dataForm.key);
// // this.$refs["dataForm"].validate((valid) => {
// // if (!valid) {
// // return false;
// // }
// // this.$http[!this.dataForm.id ? "post" : "put"](
// // "/sys/params",
// // this.dataForm
// // )
// // .then(({ data: res }) => {
// // if (res.code !== 0) {
// // return this.$message.error(res.msg);
// // }
// // this.$message({
// // message: this.$t("prompt.success"),
// // type: "success",
// // duration: 500,
// // onClose: () => {
// // },
// // });
// // })
// // .catch(() => {});
// // });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -0,0 +1,172 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-01 14:22:21
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="name" :label="$t('code.name')">
<el-input v-model="dataForm.name" :placeholder="$t('code.name')">
</el-input>
</el-form-item>
<el-form-item prop="code" :label="$t('code.code')">
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
</el-form-item>
<el-form-item prop="eightDisciplineStatus" :label="$t('code.eightDisciplineStatus')">
<el-switch v-model="dataForm.eightDisciplineStatus" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')">
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/eightDiscipline",
infoURL: "/code/eightDiscipline"
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
eightDisciplineTypeList: [
{
value: 0,
label: '重复发生问题 '
},
{
value: 1,
label: '1客诉问题'
},
{
value: 2,
label: '重大质量问题'
}
],
visible: false,
dataForm: {
id: null,
name: null,
code:null,
eightDisciplineType:null,
eightDisciplineStatus: null,
},
};
},
computed: {
dataRule() {
return {
// dictLabel: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
});
},
// getCode() {
// this.$http.post(this.urlOptions.getCodeURL)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res);
// this.dataForm.customSamplingCode = res.data
// }
// })
// .catch(() => {
// });
// },
//
getInfo() {
this.$http
.get(`/code/eightDiscipline/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {});
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
console.log(1111);
this.visible = false;
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@ -0,0 +1,428 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:05:29
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/productInspection",
infoURL: "/code/productInspection/{id}",
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
supplierList: [],
userList: [],
samplingPlanList:[],
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
unitList:[],
productList: [],
factoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
id: null,
batchNo: null,
batchSize: null,
checkoutTime: null,
companyId: null,
factoryId: null,
inspectionPlan: null,
inspectionQuantity: null,
inspectionStatus: null,
inspectionTime: null,
inspectionType: null,
orderNumber: null,
productCode: null,
productId: null,
recheck: null,
remark: null,
samplesQuantity: null,
shiftId: null,
source: null,
supplierId: null,
teamId: null,
userId: null,
},
};
},
computed: {
dataRule() {
return {
dictLabel: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
dictValue: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
sort: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
//
getInfo() {
this.$http
.get(`/code/productInspection/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {})
},
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getDictDataList, {
params: {
limit: 999,
page: 1,
dictTypeId: '1665966021935190018'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.unitList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@ -0,0 +1,321 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:23:54
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="task" :label="$t('code.task')">
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode',
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
supplierList: [],
userList: [],
samplingPlanList: [],
unitList: [],
productList: [],
factoryList: [],
visible: false,
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
batchNo: null,
customSamplingId: null,
endTime: null,
factoryId: null,
inspectionStatus: null,
inspectionType: null,
productId: null,
recheck: null,
startTime: null,
supplierId: null,
task: null,
userId: null,
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
mounted () {
this.getDict()
},
methods: {
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
//
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
//
handleConditionSearch() {
this.$emit("successSubmit", this.dataForm)
},
// dataFormSubmitHandle: debounce(
// function () {
// // console.log(1111);
// // this.visible = false;
// this.$emit("successSubmit", this.dataForm.key);
// // this.$refs["dataForm"].validate((valid) => {
// // if (!valid) {
// // return false;
// // }
// // this.$http[!this.dataForm.id ? "post" : "put"](
// // "/sys/params",
// // this.dataForm
// // )
// // .then(({ data: res }) => {
// // if (res.code !== 0) {
// // return this.$message.error(res.msg);
// // }
// // this.$message({
// // message: this.$t("prompt.success"),
// // type: "success",
// // duration: 500,
// // onClose: () => {
// // },
// // });
// // })
// // .catch(() => {});
// // });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -0,0 +1,634 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:18:54
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider content-position="center">GBT2828.1</el-divider>
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="critical" label="CR" label-width="50px">
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalAccept" label="Accept">
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="major" label="MA" label-width="50px">
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorAccept" label="Accept">
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="minor" label="MI" label-width="50px">
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorAccept" label="Accept">
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="total" label="total" label-width="50px">
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalAccept" label="Accept">
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
GBTSubmitURL: "/code/productRegistration",
submitURL: "/code/productRegistration",
infoURL: "/code/productRegistration/{id}",
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
supplierList: [],
userList: [],
samplingPlanList:[],
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
unitList:[],
productList: [],
factoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
GBTDataForm: {
critical:null,
criticalAccept: null,
criticalDefectiveNumber: null,
criticalNumber: null,
criticalReject: null,
id: null,
major: null,
majorAccept: null,
majorDefectiveNumber: null,
majorNumber: null,
majorReject: null,
minor: null,
minorAccept: null,
minorDefectiveNumber: null,
minorNumber: null,
minorReject: null,
purchaseRegistrationId: null,
total: null,
totalAccept: null,
totalDefectiveNumber: null,
totalNumber: null,
totalReject: null,
},
dataForm: {
batchNo:null,
batchQuantity: null,
batchSize: null,
checkoutTime: null,
companyId: null,
customSamplingId: null,
defectiveQuantity: null,
defectsNumber: null,
distributionUserId: null,
factoryId: null,
id: null,
inspectionQuantity: null,
inspectionTime: null,
inspectionType: null,
orderNumber: null,
parameterName: null,
processingMethod: null,
processingResults: null,
productId: null,
recordQuantity: null,
remark: null,
shiftId: null,
submit: null,
supplierId: null,
teamId: null,
upload: null,
userId: null,
},
};
},
computed: {
dataRule() {
return {
dictLabel: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
dictValue: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
sort: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
//
getInfo() {
this.$http
.get(`/code/productRegistration/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { })
this.$http
.get(`/code/shipmentInspectionNationalStandard/getById/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm = {
...this.GBTDataForm,
...res.data,
};
})
.catch(() => { })
},
getDict() {
this.$http
.post(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getDictDataList, {
params: {
limit: 999,
page: 1,
dictTypeId: '1665966021935190018'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.unitList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if (this.dataForm.id) {
this.$http.put(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm.purchaseRegistrationId = res.data
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
} else {
this.$http.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm.purchaseRegistrationId = res.data
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
}
});
},
//
},
};
</script>

View File

@ -0,0 +1,366 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:26:47
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="userId" :label="$t('code.Examiner')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="task" :label="$t('code.processingResults')">
<el-radio-group v-model="dataForm.processingResults">
<el-radio :label="0"> {{ $t('code.approval') }} </el-radio>
<el-radio :label="1">{{ $t('code.approvalComplete') }} </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="task" :label="$t('code.status')">
<el-radio-group v-model="dataForm.upload">
<el-radio :label="0">{{ $t('code.notUploaded') }}</el-radio>
<el-radio :label="1">{{ $t('code.uploaded') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode',
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
supplierList: [],
userList: [],
samplingPlanList: [],
judgmentResultList: [
{
id: 0,
name: '0未判定'
},
{
id: 1,
name: '1合格'
},
{
id: 2,
name: '不合格'
},
],
unitList: [],
productList: [],
factoryList: [],
visible: false,
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
processingResults: null,
batchNo: null,
customSamplingId: null,
factoryId: null,
inspectionType: null,
judgmentResult: null,
orderNumber: null,
productId: null,
recheck: null,
supplierId: null,
upload: null,
userId: null
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
mounted() {
this.getDict()
},
methods: {
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
//
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
//
handleConditionSearch() {
this.$emit("successSubmit", this.dataForm)
},
// dataFormSubmitHandle: debounce(
// function () {
// // console.log(1111);
// // this.visible = false;
// this.$emit("successSubmit", this.dataForm.key);
// // this.$refs["dataForm"].validate((valid) => {
// // if (!valid) {
// // return false;
// // }
// // this.$http[!this.dataForm.id ? "post" : "put"](
// // "/sys/params",
// // this.dataForm
// // )
// // .then(({ data: res }) => {
// // if (res.code !== 0) {
// // return this.$message.error(res.msg);
// // }
// // this.$message({
// // message: this.$t("prompt.success"),
// // type: "success",
// // duration: 500,
// // onClose: () => {
// // },
// // });
// // })
// // .catch(() => {});
// // });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -0,0 +1,49 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-01-31 16:47:32
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-radio v-model="injectData.incomingInspection" :label="1"
>进货检验</el-radio
>
<el-radio v-model="injectData.processInspection" :label="1"
>过程检验</el-radio
>
<el-radio v-model="injectData.finishInspection" :label="1"
>成品检验</el-radio
>
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
methods: {
//
// emitClick () {
// //
// const routeParams = {
// routeName: `${this.$route.name}__${this.injectData.id}`,
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
// path: 'sys/dict-data',
// params: {
// dictTypeId: this.injectData.id
// }
// }
// //
// addDynamicRoute(routeParams, this.$router)
// }
},
};
</script>

View File

@ -0,0 +1,634 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:27:51
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider content-position="center">GBT2828.1</el-divider>
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="critical" label="CR" label-width="50px">
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalAccept" label="Accept">
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="major" label="MA" label-width="50px">
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorAccept" label="Accept">
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="minor" label="MI" label-width="50px">
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorAccept" label="Accept">
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="total" label="total" label-width="50px">
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalAccept" label="Accept">
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
GBTSubmitURL: "/code/shipmentRegistration",
submitURL: "/code/shipmentRegistration",
infoURL: "/code/shipmentRegistration/{id}",
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
supplierList: [],
userList: [],
samplingPlanList:[],
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
unitList:[],
productList: [],
factoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
GBTDataForm: {
critical:null,
criticalAccept: null,
criticalDefectiveNumber: null,
criticalNumber: null,
criticalReject: null,
id: null,
major: null,
majorAccept: null,
majorDefectiveNumber: null,
majorNumber: null,
majorReject: null,
minor: null,
minorAccept: null,
minorDefectiveNumber: null,
minorNumber: null,
minorReject: null,
purchaseRegistrationId: null,
total: null,
totalAccept: null,
totalDefectiveNumber: null,
totalNumber: null,
totalReject: null,
},
dataForm: {
batchNo: null,
batchQuantity: null,
batchSize: null,
checkoutTime: null,
companyId: null,
customSamplingId: null,
defectiveQuantity: null,
defectsNumber: null,
distributionUserId: null,
factoryId: null,
id: null,
inspectionQuantity: null,
inspectionTime: null,
inspectionType: null,
orderNumber: null,
parameterName: null,
processingMethod: null,
processingResults: null,
productId: null,
recordQuantity: null,
remark: null,
shiftId: null,
submit: null,
supplierId: null,
teamId: null,
upload: null,
userId: null,
},
};
},
computed: {
dataRule() {
return {
dictLabel: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
dictValue: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
sort: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
//
getInfo() {
this.$http
.get(`/code/shipmentRegistration/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { })
this.$http
.get(`/code/purchaseRegistrationNationalStandard/getById/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm = {
...this.GBTDataForm,
...res.data,
};
})
.catch(() => { })
},
getDict() {
this.$http
.post(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getDictDataList, {
params: {
limit: 999,
page: 1,
dictTypeId: '1665966021935190018'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.unitList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if (this.dataForm.id) {
this.$http.put(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm.purchaseRegistrationId = res.data
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
} else {
this.$http.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm.purchaseRegistrationId = res.data
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
}
});
},
//
},
};
</script>

View File

@ -0,0 +1,366 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:27:11
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="userId" :label="$t('code.Examiner')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="task" :label="$t('code.processingResults')">
<el-radio-group v-model="dataForm.processingResults">
<el-radio :label="0"> {{ $t('code.approval') }} </el-radio>
<el-radio :label="1">{{ $t('code.approvalComplete') }} </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="task" :label="$t('code.status')">
<el-radio-group v-model="dataForm.upload">
<el-radio :label="0">{{ $t('code.notUploaded') }}</el-radio>
<el-radio :label="1">{{ $t('code.uploaded') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode',
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
supplierList: [],
userList: [],
samplingPlanList: [],
judgmentResultList: [
{
id: 0,
name: '0未判定'
},
{
id: 1,
name: '1合格'
},
{
id: 2,
name: '不合格'
},
],
unitList: [],
productList: [],
factoryList: [],
visible: false,
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
processingResults: null,
batchNo: null,
customSamplingId: null,
factoryId: null,
inspectionType: null,
judgmentResult: null,
orderNumber: null,
productId: null,
recheck: null,
supplierId: null,
upload: null,
userId: null
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
mounted() {
this.getDict()
},
methods: {
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
//
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
//
handleConditionSearch() {
this.$emit("successSubmit", this.dataForm)
},
// dataFormSubmitHandle: debounce(
// function () {
// // console.log(1111);
// // this.visible = false;
// this.$emit("successSubmit", this.dataForm.key);
// // this.$refs["dataForm"].validate((valid) => {
// // if (!valid) {
// // return false;
// // }
// // this.$http[!this.dataForm.id ? "post" : "put"](
// // "/sys/params",
// // this.dataForm
// // )
// // .then(({ data: res }) => {
// // if (res.code !== 0) {
// // return this.$message.error(res.msg);
// // }
// // this.$message({
// // message: this.$t("prompt.success"),
// // type: "success",
// // duration: 500,
// // onClose: () => {
// // },
// // });
// // })
// // .catch(() => {});
// // });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -0,0 +1,359 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-01 16:26:20
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="code" :label="$t('basic.code')">
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="title" :label="$t('basic.title')">
<el-input v-model="dataForm.title" :placeholder="$t('code.title')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')">
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="occurrenceDate" :label="$t('code.occurrenceDate')">
<el-date-picker v-model="dataForm.occurrenceDate" type="datetime" :placeholder="$t('code.occurrenceDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="requestResponseCycle" :label="$t('code.requestResponseCycle')">
<el-input v-model="dataForm.requestResponseCycle" :placeholder="$t('code.requestResponseCycle')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
<el-date-picker v-model="dataForm.finalCompletionDate" type="datetime"
:placeholder="$t('code.finalCompletionDate')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="sampleAcceptanceTime" :label="$t('code.sampleAcceptanceTime')">
<el-date-picker v-model="dataForm.sampleAcceptanceTime" type="datetime"
:placeholder="$t('code.sampleAcceptanceTime')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="defectSourceId" :label="$t('code.defectSource')">
<el-select v-model="dataForm.defectSourceId" :placeholder="$t('code.defectSource')">
<el-option v-for="item in defectList" :key="item.dictTypeId" :label="item.dictLabel"
:value="item.dictTypeId">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="actualResponsePeriod" :label="$t('code.actualResponsePeriod')">
<el-input v-model="dataForm.actualResponsePeriod" :placeholder="$t('code.requestResponseCycle')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="orderNo" :label="$t('code.orderNo')">
<el-input v-model="dataForm.orderNo" :placeholder="$t('code.orderNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="description" :label="$t('code.description')">
<el-input v-model="dataForm.description" :placeholder="$t('code.description')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="examineStatus" :label="$t('code.examineStatus')">
<el-select v-model="dataForm.examineStatus" :placeholder="$t('code.examineStatus')">
<el-option v-for="item in examineStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="teamList" :label="$t('code.eightDTeam')">
<el-select v-model="dataForm.teamList" :placeholder="$t('code.eightDTeam')" multiple>
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDiscipline",
infoURL: "/code/startEightDiscipline/{id}",
getDictURL: '/sys/dict/data/page',
customerListURL: '/basic/qmsCustomer/page',
productListURL: '/basic/qmsProduct/page',
teamListURL: '/basic/qmsTeam/page',
},
defectList: [],
teamList:[],
customerList: [],
productList: [],
dutyList: [],
examineStatusList: [
{
id: 0,
name: '不需要审批'
},
{
id: 1,
name: '需要审批'
}
],
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
eightDisciplineTypeList: [
{
value: 0,
label: '重复发生问题 '
},
{
value: 1,
label: '1客诉问题'
},
{
value: 2,
label: '重大质量问题'
}
],
listQuery: {
limit: 10,
page: 1
},
visible: false,
dataForm: {
actualResponsePeriod:null,
batchNumber: null,
code: null,
customId: null,
defectSourceId: null,
description: null,
eightDisciplineId: null,
eightDisciplineStatus: null,
eightDisciplineType: null,
examineStatus: null,
finalCompletionDate: null,
id: null,
occurrenceDate: null,
orderNo: null,
productId: null,
productTypeId: null,
teamList:undefined,
requestResponseCycle: null,
responsibilityAttributionId: null,
sampleAcceptanceTime: null,
supportProducts: null,
title: null,
userId: null,
},
};
},
computed: {
dataRule() {
return {
// dictLabel: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
mounted () {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo()
} else {
}
});
},
//
getInfo() {
this.$http
.get(`/code/startEightDiscipline/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {});
},
getDict() {
this.$http.get(this.urlOptions.teamListURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.teamList = res.data.list
}
})
.catch(() => {
})
this.$http.get(this.urlOptions.getDictURL, {
params: {
limit: 999,
page: 1,
dictTypeId: '1664162193896206337'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.defectList = res.data.list
}
})
.catch(() => {
})
this.$http.get(this.urlOptions.getDictURL, {
params: {
limit: 999,
page: 1,
dictTypeId: '1664162455184568321'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dutyList = res.data.list
}
})
.catch(() => {
})
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
console.log(1111);
this.visible = false;
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@ -0,0 +1,322 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:10
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<deliveryInspection-add ref="addOrUpdate" @successSubmit="successSubmit">
</deliveryInspection-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<deliveryInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</deliveryInspection-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
// import showProductList from "./components/showProductList.vue";
import deliveryInspectionSearch from "./components/deliveryInspectionSearch.vue";
import deliveryInspectionAdd from "./components/deliveryInspection-add.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "inspectionStatus",
label: i18n.t('code.inspectionStatus'),
},
{
prop: "factoryName",
label: i18n.t('code.factoryName'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "orderNumber",
label: i18n.t('code.orderNumber'),
},
{
prop: "productName",
label: i18n.t('code.productName'),
},
{
prop: "companyName",
label: i18n.t('code.companyName'),
},
{
prop: "productCode",
label: i18n.t('code.productCode'),
},
{
prop: "supplierName",
label: i18n.t('code.supplierName'),
},
{
prop: "batchQuantity",
label: i18n.t('code.batchQuantity'),
},
{
prop: "inspectionQuantity",
label: i18n.t('code.inspectionQuantity'),
},
{
prop: "checkoutTime",
label: i18n.t('code.checkoutTime'),
},
{
prop: "inspectionTime",
label: i18n.t('code.inspectionTime'),
},
{
prop: "inspectionType",
label: i18n.t('code.inspectionType'),
},
{
prop: "username",
label: i18n.t('code.username'),
},
{
prop: "source",
label: i18n.t('code.source'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
},
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "code/deliveryInspection/page/term",
deleteURL: "/code/deliveryInspection",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page:1
},
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible:false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
deliveryInspectionSearch,
deliveryInspectionAdd
},
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index);
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
this.listQuery.task = dataForm.task ? dataForm.task : null
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
this.listQuery.page = 1
this.getDataList(this.listQuery)
this.searchOrUpdateVisible = false
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.getDataListURL, this.listQuery,
)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
case "correlation":
this.productOrEditTitle = "产品";
this.productOrUpdateVisible = true;
// this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,197 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:12:25
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</eightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import eightDisciplineAdd from "./components/eightDiscipline-add"
// import AddOrUpdate from './params-add-or-update'
// import disposalMethodSearch from "./components/disposalMethodSearch"
import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'name',
label: i18n.t("code.name"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'problemStatus',
label: i18n.t("code.problemStatus"),
align: 'center',
subcomponent: available
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// disposalMethodSearch,
eightDisciplineAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/eightDiscipline/page",
deleteURL: "/code/eightDiscipline",
},
tableProps,
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.disposalMethodStatus = dataForm.disposalMethodStatus
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,214 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:12:12
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
{
prop: 'productName',
label: i18n.t("code.productName"),
align: 'center'
},
{
prop: 'customName',
label: i18n.t("code.customName"),
align: 'center'
},
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 8
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: 'select',
label: i18n.t('code.examineStatus'),
selectOptions: [
{
id: 0,
name: '不需要审批',
},
{
id: 1,
name: '需要审批',
}
],
param: 'examineStatus',
clearable: true,
filterable: true
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,321 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:02
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<productInspection-add ref="addOrUpdate" @successSubmit="successSubmit"></productInspection-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<productInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</productInspection-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
// import showProductList from "./components/showProductList.vue";
import productInspectionSearch from "./components/productInspectionSearch.vue";
import productInspectionAdd from "./components/productInspection-add.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "inspectionStatus",
label: i18n.t('code.inspectionStatus'),
},
{
prop: "factoryName",
label: i18n.t('code.factoryName'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "orderNumber",
label: i18n.t('code.orderNumber'),
},
{
prop: "productName",
label: i18n.t('code.productName'),
},
{
prop: "companyName",
label: i18n.t('code.companyName'),
},
{
prop: "productCode",
label: i18n.t('code.productCode'),
},
{
prop: "supplierName",
label: i18n.t('code.supplierName'),
},
{
prop: "batchQuantity",
label: i18n.t('code.batchQuantity'),
},
{
prop: "inspectionQuantity",
label: i18n.t('code.inspectionQuantity'),
},
{
prop: "checkoutTime",
label: i18n.t('code.checkoutTime'),
},
{
prop: "inspectionTime",
label: i18n.t('code.inspectionTime'),
},
{
prop: "inspectionType",
label: i18n.t('code.inspectionType'),
},
{
prop: "username",
label: i18n.t('code.username'),
},
{
prop: "source",
label: i18n.t('code.source'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
},
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "code/productInspection/page/term",
deleteURL: "/code/productInspection",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page:1
},
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible:false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
productInspectionSearch,
productInspectionAdd
},
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index);
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
this.listQuery.task = dataForm.task ? dataForm.task : null
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
this.listQuery.page = 1
this.getDataList(this.listQuery)
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.getDataListURL, this.listQuery,
)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
case "correlation":
this.productOrEditTitle = "产品";
this.productOrUpdateVisible = true;
// this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,338 @@
<!--
* @Author: zhp
* @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:36:58
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<productRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
</productRegistration-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<productRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</productRegistration-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
import productRegistrationSearch from "./components/productRegistrationSearch.vue";
import productRegistrationAdd from "./components/productRegistration-add.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "customSamplingId",
label: i18n.t('code.customSampling'),
},
{
prop: "factoryName",
label: i18n.t('code.factoryName'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "orderNumber",
label: i18n.t('code.orderNumber'),
},
{
prop: "upload",
label: i18n.t('code.upload'),
},
{
prop: "judgmentResult",
label: i18n.t('code.judgmentResult'),
},
{
prop: "productCode",
label: i18n.t('code.productCode'),
},
{
prop: "supplierName",
label: i18n.t('code.supplierName'),
},
{
prop: "batchQuantity",
label: i18n.t('code.batchQuantity'),
},
{
prop: "defectiveQuantity",
label: i18n.t('code.defectiveQuantity'),
},
{
prop: "defectsNumber",
label: i18n.t('code.defectsNumber'),
},
{
prop: "inspectionQuantity",
label: i18n.t('code.inspectionQuantity'),
},
{
prop: "checkoutTime",
label: i18n.t('code.checkoutTime'),
},
{
prop: "inspectionTime",
label: i18n.t('code.inspectionTime'),
},
{
prop: "inspectionType",
label: i18n.t('code.inspectionType'),
},
{
prop: "submit",
label: i18n.t('code.submit'),
},
{
prop: "username",
label: i18n.t('code.username'),
},
{
prop: "processingMethod",
label: i18n.t('code.processingMethod'),
},
{
prop: "processingResults",
label: i18n.t('code.processingResults'),
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
},
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "code/productRegistration/page/term",
deleteURL: "/code/productRegistration",
exportURL: "/code/productRegistration/export",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page:1
},
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible:false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
productRegistrationSearch,
productRegistrationAdd
},
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index);
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
this.listQuery.page = 1
this.getDataList(this.listQuery)
this.searchOrUpdateVisible = false
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.getDataListURL, this.listQuery,
)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
case "correlation":
this.productOrEditTitle = "产品";
this.productOrUpdateVisible = true;
// this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,338 @@
<!--
* @Author: zhp
* @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:36:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<shipmentRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
</shipmentRegistration-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<shipmentRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</shipmentRegistration-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
import shipmentRegistrationSearch from "./components/shipmentRegistrationSearch.vue";
import shipmentRegistrationAdd from "./components/shipmentRegistration-add.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "customSamplingId",
label: i18n.t('code.customSampling'),
},
{
prop: "factoryName",
label: i18n.t('code.factoryName'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "orderNumber",
label: i18n.t('code.orderNumber'),
},
{
prop: "upload",
label: i18n.t('code.upload'),
},
{
prop: "judgmentResult",
label: i18n.t('code.judgmentResult'),
},
{
prop: "productCode",
label: i18n.t('code.productCode'),
},
{
prop: "supplierName",
label: i18n.t('code.supplierName'),
},
{
prop: "batchQuantity",
label: i18n.t('code.batchQuantity'),
},
{
prop: "defectiveQuantity",
label: i18n.t('code.defectiveQuantity'),
},
{
prop: "defectsNumber",
label: i18n.t('code.defectsNumber'),
},
{
prop: "inspectionQuantity",
label: i18n.t('code.inspectionQuantity'),
},
{
prop: "checkoutTime",
label: i18n.t('code.checkoutTime'),
},
{
prop: "inspectionTime",
label: i18n.t('code.inspectionTime'),
},
{
prop: "inspectionType",
label: i18n.t('code.inspectionType'),
},
{
prop: "submit",
label: i18n.t('code.submit'),
},
{
prop: "username",
label: i18n.t('code.username'),
},
{
prop: "processingMethod",
label: i18n.t('code.processingMethod'),
},
{
prop: "processingResults",
label: i18n.t('code.processingResults'),
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
},
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "code/shipmentRegistration/page/term",
deleteURL: "/code/shipmentRegistration",
exportURL: "/code/shipmentRegistration/export",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page:1
},
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible:false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
shipmentRegistrationSearch,
shipmentRegistrationAdd
},
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index);
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
this.listQuery.page = 1
this.getDataList(this.listQuery)
this.searchOrUpdateVisible = false
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.getDataListURL, this.listQuery,
)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
case "correlation":
this.productOrEditTitle = "产品";
this.productOrUpdateVisible = true;
// this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,221 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:52
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<startEightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</startEightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import startEightDisciplineAdd from "./components/startEightDiscipline-add"
// import AddOrUpdate from './params-add-or-update'
// import customSamplingSearch from "./components/customSamplingSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// customSamplingSearch,
startEightDisciplineAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init()
});
},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
// this.listQuery.key = key;
this.listQuery.customSamplingCode = dataForm.customSamplingCode
// this.listQuery.name = dataForm.name
// this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
this.listQuery.page = 1
this.getDataList()
this.searchOrUpdateVisible = false
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,207 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:39
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferRecordsAdd from "./components/transferRecords-add"
// import AddOrUpdate from './params-add-or-update'
// import transferRecordsSearch from "./components/transferRecordsSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'productName',
label: i18n.t("quality.productName"),
align: 'center'
},
{
prop: 'supplierName',
label: i18n.t("quality.supplierName"),
align: 'center'
},
{
prop: 'transferOutName',
label: i18n.t("quality.transferOutName"),
align: 'center'
},
{
prop: 'transferInName',
label: i18n.t("quality.transferInName"),
align: 'center'
},
{
prop: 'dataSources',
label: i18n.t("quality.dataSources"),
align: 'center'
},
{
prop: 'remark',
label: i18n.t("quality.remark"),
align: 'center'
},
{
prop: 'userName',
label: i18n.t("quality.userName"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferRecordsSearch,
// transferRecordsAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 2
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,205 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:18
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 5
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,213 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:07
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import InspectionPositionAdd from "./components/InspectionPosition-add"
// import AddOrUpdate from './params-add-or-update'
// import failureTypeSearch from "./components/failureTypeSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
// {
// type: "edit",
// btnName: "",
// },
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
// InspectionPositionAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
searchOrEditTitle: '',
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus:1
},
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,205 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:50
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 6
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,204 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:40
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 4
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,205 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:30
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 8
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,212 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:13:01
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import samplingPlanAdd from "./components/samplingPlan-add"
// import AddOrUpdate from './params-add-or-update'
// import failureTypeSearch from "./components/failureTypeSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
// samplingPlanAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 3
},
tableProps,
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,204 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:09:59
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'title',
label: i18n.t("code.title"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("code.code"),
align: 'center'
},
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: 'description',
label: i18n.t("code.description"),
align: 'center'
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 7
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.failureTypeStatus = null
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,311 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:49:24
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.grouping')">
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="1"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="2"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="3"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/c/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList: [],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
divideIntoGroup:null
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null,
divideIntoGroup: null,
endTime: null,
startTime: null,
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.dataForm
}
)
.then(({ data: res }) => {
let defectNumberArr = []
let xAxisData = []
res.data.forEach((item) => {
defectNumberArr.push(item.defectNumber)
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: 'C图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: ' 缺陷数',
type: 'line',
stack: 'Total',
data: defectNumberArr
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,317 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:49:35
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.grouping')">
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="1"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="2"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="3"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/np/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList: [],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
divideIntoGroup:null
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null,
divideIntoGroup: null,
endTime: null,
startTime: null,
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.dataForm
}
)
.then(({ data: res }) => {
let xAxisData = []
res.data.forEach((item) => {
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: 'C图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value',
data: dpuData
},
series: [
{
name: '缺陷数量',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.defectNumber })
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,328 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:51:30
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.grouping')">
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="1"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="2"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="3"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/u/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList: [],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
divideIntoGroup:null
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null,
divideIntoGroup: null,
endTime: null,
startTime: null,
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.dataForm
}
)
.then(({ data: res }) => {
let xAxisData = []
res.data.forEach((item) => {
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: 'C图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value',
data: res.data.map(i => { return i.dpu })
},
series: [
{
name: ' 单位缺陷',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.dpu })
},
{
name: ' UCL',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.ucl })
},
{
name: 'LCL',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.lcl })
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,370 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:49:08
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/box/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId:val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'箱线图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
// tooltip: {
// trigger: 'item', // axisitem
// axisPointer: { //
// type: 'line' // 线'line' | 'shadow'
// },
// formatter: function (params) {
// var res = `
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'min:' + res.data.min}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'Q1:' + res.data.Q1}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'median:' + res.data.median}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'Q3:' + res.data.Q3}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'max:' + res.data.max}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'outlier:' + res.data.outlier}</span>
// </div>
// `
// return params.name + res
// }
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: [this.dataForm.characteristicsId ],
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: '最大值',
type: 'line',
stack: 'Total',
data: [res.data.max]
},
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,254 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-20 10:54:49
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/mean/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'rangeUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'rangeLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,254 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-20 10:54:52
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/mean/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'rangeUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'rangeLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,264 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-20 14:14:18
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/mean/range/chart",
},
tableData:[],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'rangeCl',
label: 'CL(图二)',
},
{
prop: 'rangeLcl',
label: 'LCL(图二)',
},
{
prop: 'rangeUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeLcl,
rangeUcl: res.data.rangeUcl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
let xAxisData = []
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageCl]
},
{
name: 'CL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,264 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-20 14:14:24
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/mean/standard/deviation/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageCl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
standardDeviationCl: res.data.standardDeviationCl,
standardDeviationLcl: res.data.standardDeviationLcl,
standardDeviationUcl: res.data.standardDeviationUcl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
let xAxisData = []
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.standardDeviationUcl]
},
{
name: 'USL',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageCl]
},
{
name: 'CL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.standardDeviationCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,271 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-20 14:14:37
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/median/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'rangeCl',
label: 'CL(图二)',
},
{
prop: 'rangeLcl',
label: 'LCL(图二)',
},
{
prop: 'rangeUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'median',
label: '中位数',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
this.tableData.push(ele.median)
})
let xAxisData = []
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'CL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,264 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-20 14:14:46
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/single/value/movement/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'rangeCl',
label: 'CL(图二)',
},
{
prop: 'rangeLcl',
label: 'LCL(图二)',
},
{
prop: 'rangeUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
let xAxisData = []
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,442 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:47:19
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item> -->
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getOriginalData">{{ $t('code.originalData') }}}</el-button>
</el-form-item>
</el-form>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="$t('code.meanRange')" name="first">
<mean-range ref="meanRange"></mean-range>
</el-tab-pane>
<el-tab-pane :label="$t('code.meanStandard')" name="second">
<mean-standard ref="meanStandard">
</mean-standard>
</el-tab-pane>
<el-tab-pane :label=" $t('code.medianRange')" name="third">
<median-range ref="medianRange">
</median-range>
</el-tab-pane>
<el-tab-pane :label="$t('code.singleValueMovingRange')" name="fourth">
<single-valueMovingRange ref="singleValueMovingRange">
</single-valueMovingRange>
</el-tab-pane>
<el-tab-pane :label="$t('code.meanMovingRangeRange')" name="fifth">
<mean-MovingRangeRange ref="meanMovingRangeRange">
</mean-MovingRangeRange>
</el-tab-pane>
<el-tab-pane :label="$t('code.meanMovingRangeStandardDeviation')" name="sixth">
<mean-movingRangeStandardDeviation ref="meanMovingRangeStandardDeviation">
</mean-movingRangeStandardDeviation>
</el-tab-pane>
</el-tabs>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData">
</base-table>
</el-card>
</template>
<script>
import meanRange from "./components/meanRange.vue"
import meanStandard from "./components/meanStandard.vue"
import medianRange from "./components/medianRange.vue"
import singleValueMovingRange from "./components/singleValueMovingRange.vue"
import meanMovingRangeRange from "./components/meanMovingRangeRange.vue"
import meanMovingRangeStandardDeviation from "./components/meanMovingRangeStandardDeviation.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
const tableProps = [
{
prop: "orderNumber",
label: i18n.t('code.inspectionNumber'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "locationNo",
label: i18n.t('code.locationNo'),
},
{
prop: "groupNo",
label: i18n.t('code.groupNo'),
},
{
prop: "meteringValue",
label: i18n.t('code.assayValue'),
},
{
prop: "createDate",
label: i18n.t('code.parsingTime'),
}
];
export default {
data() {
return {
myChart: null,
urlOptions: {
getXBarURL: '',
getDataListURL: "/code/productRegistration/mean/range/chart",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getOriginalDataURL: '/code/productRegistration/raw/data',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
tableData:[],
tableProps,
factoryList: [],
productList: [],
meanRangeShow:false,
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
activeName:null,
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'rangeUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'rangeLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
tableData: [],
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
components: {
meanRange,
meanStandard,
medianRange,
singleValueMovingRange,
meanMovingRangeRange,
meanMovingRangeStandardDeviation
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
mounted() {
// this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
handleClick(val) {
if (this.activeName === 'first') {
this.$nextTick(() => {
this.$refs.meanRange.getData(this.listQuery)
})
} else if (this.activeName === 'second') {
this.$nextTick(() => {
this.$refs.meanStandard.getData(this.listQuery)
})
} else if (this.activeName === 'third') {
this.$nextTick(() => {
this.$refs.medianRange.getData(this.listQuery)
})
} else if (this.activeName === 'fourth') {
this.$nextTick(() => {
this.$refs.singleValueMovingRange.getData(this.listQuery)
})
} else if (this.activeName === 'fifth') {
this.$nextTick(() => {
this.$refs.meanMovingRangeRange.getData(this.listQuery)
})
} else if (this.activeName === 'sixth') {
this.$nextTick(() => {
this.$refs.meanMovingRangeStandardDeviation.getData(this.listQuery)
})
}
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getOriginalData() {
this.$http.get(this.urlOptions.getOriginalDataURL, {
params:this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
this.tableData = res.data
}
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,312 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:50:01
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<!-- <el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<!--
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/pareto/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
// gerCharacteristics(val) {
// this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
// params: {
// productId:val
// },
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// this.dataForm.characteristicsId = res.data.parameterName
// }
// })
// },
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'帕累托图'
},
tooltip: {
formatter: (params) => {
// params
console.log(params)
// params.dataIndex
// params[0].dataIndex
let index = params.dataIndex
let obj = res.data[index] //
let str = `缺陷数量:${obj.number}<br/>
缺陷率${obj.defectRate}<br/>`
return str
}
},
xAxis: {
data: res.data.map(i => { return i.propertyName })
},
yAxis: [{
type: 'value',
name: '缺陷数量',
show: true,
interval: 10,
axisLine: {
lineStyle: {
color: '#5e859e',
width: 2
}
}
}],
series: [{
name: '缺陷率',
type: 'bar',
barWidth: '50%',
data: res.data.map(i => { return i.defectRate })
}, {
name: '缺陷数量',
type: 'line',
smooth: true,
data: res.data.map(i => { return i.number })
}]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
// this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
// this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,303 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 10:48:38
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/phase/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId:val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'散点图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: res.data.abscissaList,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [{
name: '缺陷率',
type: 'bar',
barWidth: '50%',
data: res.data.ordinateList
}]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,298 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:51:03
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/phase/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId:val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'阶段图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: res.data.purchaseRegistrationCharacteristicsDTOList.length,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,319 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:51:17
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/transition/diagram",
getFactoryURL: '/code/productRegistration/query/factory',
getProductURL: '/code/productRegistration/query/product',
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList:[],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
let yAxisData = []
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
yAxisData.push(ele.countValue)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '推移图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: res.data.map(i => { return i.batchNo + i.groupNo }),
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: '计数型值',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.countValue })
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-17 14:40:50
* @LastEditTime: 2023-05-30 14:39:38
* @LastEditors: zhp
* @Description:
-->
@ -52,7 +52,7 @@ export default {
// teamList:[],
listQuery: {
limit: 999,
gape: 1
page: 1
},
measurementTypeList: [{
id: 0,

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zhp
* @LastEditTime: 2023-05-22 15:24:00
* @LastEditTime: 2023-06-20 15:36:04
* @remark: 报废原因--新增
-->
<template>
@ -186,7 +186,7 @@ export default {
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = ' 修改'
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id)
});

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zhp
* @LastEditTime: 2023-05-23 14:21:48
* @LastEditTime: 2023-06-20 15:35:58
* @remark: 报废原因--新增
-->
<template>
@ -235,7 +235,7 @@ export default {
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = ' 修改'
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id)
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-22 16:40:43
* @LastEditTime: 2023-06-20 15:36:34
* @LastEditors: zhp
* @Description:
-->
@ -265,7 +265,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-12 14:29:12
* @LastEditTime: 2023-06-21 16:52:20
* @LastEditors: zhp
* @Description:
-->
@ -41,6 +41,18 @@
</el-col>
</el-row>
</base-dialog>
<el-dialog :title="$t('gage.report')" :visible.sync="dialogTableVisible">
<el-table :show-header="false" :data="data" :span-method="objectSpanMethod" border :cell-style="columnStyle"
style="width: 100%; margin-top: 20px">
<el-table-column width="180" prop="name"></el-table-column>
<el-table-column prop="amount1"></el-table-column>
<el-table-column width="180" prop="amount2"></el-table-column>
<el-table-column prop="amount3"></el-table-column>
<el-table-column prop="amount4"></el-table-column>
<el-table-column prop="amount5"></el-table-column>
</el-table>
</el-dialog>
</div>
</el-card>
</template>
@ -95,7 +107,10 @@ const tableBtn = [
{
type: "delete",
btnName: i18n.t("delete"),
},
{
type: "report",
btnName: i18n.t("gage.report"),
},
{
type: "parameter",
@ -108,6 +123,45 @@ export default {
gageSearch,
gapeGrsAdd
},
computed: {
//dataformcomputed
data() {
return [
{
name: i18n.t("gage.partName"),
amount1: this.dataForm.partName,
amount2: i18n.t("gage.gageName"),
amount3: this.dataForm.gageName,
amount4: i18n.t("gage.measurementTime"),
amount5: this.dataForm.measurementTime
},
{
name: i18n.t("gage.itemNo"),
amount1: this.dataForm.itemNo,
amount2: i18n.t("gage.model"),
amount3: this.dataForm.model,
amount4: i18n.t("gage.measurementTime"),
amount5: this.dataForm.measurementTime
},
{
name: i18n.t("gage.measuringToolSpecification"),
amount1: this.dataForm.measuringToolSpecification,
amount2: i18n.t("gage.measuringToolAccuracy"),
amount3: this.dataForm.measuringToolAccuracy,
amount4: i18n.t("gage.process"),
amount5: this.dataForm.process
},
// {
// name: i18n.t("gage.partName"),
// amount1: this.dataForm.partName,
// amount2: i18n.t("gage.gageName"),
// amount3: this.dataForm.gageName,
// amount4: i18n.t("gage.measurementTime"),
// amount5: this.dataForm.measurementTime
// },
];
}
},
data() {
return {
urlOptions: {
@ -115,7 +169,9 @@ export default {
deleteURL: "/gage/qmsGageGrr",
exportUrl: '/gage/qmsGageGrr/export'
},
dialogTableVisible:false,
tableProps,
dataForm: {},
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -154,6 +210,31 @@ export default {
// AddOrUpdate,
// },
methods: {
columnStyle({ row, column, rowIndex, columnIndex }) {
console.log(rowIndex)
if (columnIndex == 0 || columnIndex == 2 || columnIndex == 4) {
//23
return "background:#f3f6fc;";
} else {
return "background:#ffffff;";
}
},
//
// objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// if (columnIndex === 0) {
// if (rowIndex % 4 === 0) {
// return {
// rowspan: 4,
// colspan: 1
// };
// } else {
// return {
// rowspan: 0,
// colspan: 0
// };
// }
// }
// },
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
@ -209,7 +290,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
@ -220,29 +302,10 @@ export default {
gageTypeId: val.data.gageTypeId
}
})
} else if (val.type === 'change') {
const obj = {
id: val.data.id,
measurementType: val.data.measurementType,
name: val.data.name,
code: val.data.code,
gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
parentId: val.data.parentId
}
this.$http.put(this.urlOptions.submitURL, obj)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.getDataList()
},
});
})
} else if (val.type === 'report') {
this.dialogTableVisible = true
this.dataForm = val.data
console.log(val.data)
}
},
buttonClick(val) {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-05-08 11:11:06
* @LastEditTime: 2023-05-23 14:33:55
* @LastEditTime: 2023-06-20 15:36:23
* @LastEditors: zhp
* @Description:
-->
@ -230,7 +230,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-23 14:20:48
* @LastEditTime: 2023-06-20 15:36:19
* @LastEditors: zhp
* @Description:
-->
@ -195,7 +195,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-05-08 10:31:11
* @LastEditTime: 2023-05-17 14:41:23
* @LastEditTime: 2023-06-20 15:36:15
* @LastEditors: zhp
* @Description:
-->
@ -206,7 +206,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -2,7 +2,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-11 10:20:06
* @LastEditTime: 2023-06-20 15:36:10
* @LastEditors: zhp
* @Description:
-->
@ -263,7 +263,8 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-17 14:03:17
* @LastEditTime: 2023-06-12 13:49:44
* @LastEditors: zhp
* @Description:
-->
@ -106,12 +106,6 @@ export default {
param: 'timeSlot',
width: 350
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),

View File

@ -0,0 +1,311 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:52:15
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.grouping')">
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="1"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="2"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="3"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/c/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList: [],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
divideIntoGroup:null
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null,
divideIntoGroup: null,
endTime: null,
startTime: null,
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.dataForm
}
)
.then(({ data: res }) => {
let defectNumberArr = []
let xAxisData = []
res.data.forEach((item) => {
defectNumberArr.push(item.defectNumber)
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: 'C图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: ' 缺陷数',
type: 'line',
stack: 'Total',
data: defectNumberArr
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,317 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:52:51
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.grouping')">
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="1"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="2"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="3"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/np/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList: [],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
divideIntoGroup:null
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null,
divideIntoGroup: null,
endTime: null,
startTime: null,
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.dataForm
}
)
.then(({ data: res }) => {
let xAxisData = []
res.data.forEach((item) => {
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: 'C图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value',
data: dpuData
},
series: [
{
name: '缺陷数量',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.defectNumber })
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,328 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:53:43
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.grouping')">
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="1"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="2"></el-radio>
<el-radio v-model="dataForm.divideIntoGroup" label="3"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/u/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList: [],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
divideIntoGroup:null
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null,
divideIntoGroup: null,
endTime: null,
startTime: null,
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.dataForm
}
)
.then(({ data: res }) => {
let xAxisData = []
res.data.forEach((item) => {
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: 'C图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value',
data: res.data.map(i => { return i.dpu })
},
series: [
{
name: ' 单位缺陷',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.dpu })
},
{
name: ' UCL',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.ucl })
},
{
name: 'LCL',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.lcl })
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,370 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:51:56
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/box/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId:val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'箱线图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
// tooltip: {
// trigger: 'item', // axisitem
// axisPointer: { //
// type: 'line' // 线'line' | 'shadow'
// },
// formatter: function (params) {
// var res = `
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'min:' + res.data.min}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'Q1:' + res.data.Q1}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'median:' + res.data.median}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'Q3:' + res.data.Q3}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'max:' + res.data.max}</span>
// </div>
// <div>
// <div
// style='display: inline-block;
// width: 10px;
// height: 20px;
// color: ${params.color}'
// ></div>
// <span>${'outlier:' + res.data.outlier}</span>
// </div>
// `
// return params.name + res
// }
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: [this.dataForm.characteristicsId ],
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: '最大值',
type: 'line',
stack: 'Total',
data: [res.data.max]
},
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,43 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-17 11:10:37
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag
v-if="injectData.controlStatus === 1 || injectData.customerTypeStatus === 1 || injectData.customerStatus === 1 || injectData.failureTypeStatus === 1 || injectData.productTypeStatus === 1"
type="success">可用</el-tag>
<el-tag v-else type="warning">不可用</el-tag>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
methods: {
//
// emitClick () {
// //
// const routeParams = {
// routeName: `${this.$route.name}__${this.injectData.id}`,
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
// path: 'sys/dict-data',
// params: {
// dictTypeId: this.injectData.id
// }
// }
// //
// addDynamicRoute(routeParams, this.$router)
// }
}
}
</script>

View File

@ -0,0 +1,427 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:25:08
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/incomingInspection",
infoURL: "/code/incomingInspection/{id}",
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
supplierList: [],
userList: [],
samplingPlanList:[],
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
unitList:[],
productList: [],
factoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
id: null,
batchNo: null,
batchSize: null,
checkoutTime: null,
companyId: null,
factoryId: null,
inspectionPlan: null,
inspectionQuantity: null,
inspectionStatus: null,
inspectionTime: null,
inspectionType: null,
orderNumber: null,
productCode: null,
productId: null,
recheck: null,
remark: null,
samplesQuantity: null,
shiftId: null,
source: null,
supplierId: null,
teamId: null,
userId: null,
},
};
},
computed: {
dataRule() {
return {
dictLabel: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
dictValue: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
sort: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
//
getInfo() {
this.$http
.get(`/code/incomingInspection/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {})
},
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getDictDataList, {
params: {
limit: 999,
page: 1,
dictTypeId: '1665966021935190018'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.unitList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@ -0,0 +1,321 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:24:30
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="task" :label="$t('code.task')">
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode',
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
supplierList: [],
userList: [],
samplingPlanList: [],
unitList: [],
productList: [],
factoryList: [],
visible: false,
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
batchNo:null,
customSamplingId: null,
endTime: null,
factoryId: null,
inspectionStatus: null,
inspectionType: null,
productId: null,
recheck: null,
startTime: null,
supplierId: null,
task: null,
userId: null,
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
mounted () {
this.getDict()
},
methods: {
getDict() {
this.$http
.post(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
//
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
//
handleConditionSearch() {
this.$emit("successSubmit", this.dataForm)
},
// dataFormSubmitHandle: debounce(
// function () {
// // console.log(1111);
// // this.visible = false;
// this.$emit("successSubmit", this.dataForm.key);
// // this.$refs["dataForm"].validate((valid) => {
// // if (!valid) {
// // return false;
// // }
// // this.$http[!this.dataForm.id ? "post" : "put"](
// // "/sys/params",
// // this.dataForm
// // )
// // .then(({ data: res }) => {
// // if (res.code !== 0) {
// // return this.$message.error(res.msg);
// // }
// // this.$message({
// // message: this.$t("prompt.success"),
// // type: "success",
// // duration: 500,
// // onClose: () => {
// // },
// // });
// // })
// // .catch(() => {});
// // });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -0,0 +1,254 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-19 10:49:27
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'rangeUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'rangeLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,254 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-19 10:49:35
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'rangeUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'rangeLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,264 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-19 14:35:10
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
},
tableData:[],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'rangeCl',
label: 'CL(图二)',
},
{
prop: 'rangeLcl',
label: 'LCL(图二)',
},
{
prop: 'rangeUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeLcl,
rangeUcl: res.data.rangeUcl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
let xAxisData = []
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageCl]
},
{
name: 'CL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,264 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-19 14:42:37
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/productRegistration/mean/standard/deviation/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageCl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
standardDeviationCl: res.data.standardDeviationCl,
standardDeviationLcl: res.data.standardDeviationLcl,
standardDeviationUcl: res.data.standardDeviationUcl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
let xAxisData = []
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.standardDeviationUcl]
},
{
name: 'USL',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageCl]
},
{
name: 'CL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.standardDeviationCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,271 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-19 14:42:46
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/median/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'rangeCl',
label: 'CL(图二)',
},
{
prop: 'rangeLcl',
label: 'LCL(图二)',
},
{
prop: 'rangeUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'median',
label: '中位数',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
this.tableData.push(ele.median)
})
let xAxisData = []
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'CL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,68 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-17 15:00:50
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-button type="text" @click="emitClick()">同步所有关联产品</el-button>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
data() {
return {
urlOptions: {
syncURL: "/basic/qmsProduct/connectAllProduct"
},
}
},
methods: {
//
emitClick() {
const data = {
id: this.injectData.id,
finishInspection: this.injectData.finishInspection,
incomingInspection: this.injectData.incomingInspection,
outInspection: this.injectData.outInspection,
processInspection: this.injectData.outInspection
}
this.$http.put(this.urlOptions.syncURL, { data }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.$message.error(data.msg);
},
});
} else {
this.$message.error(data.msg)
}
});
//
// const routeParams = {
// routeName: `${this.$route.name}__${this.injectData.id}`,
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
// path: 'sys/dict-data',
// params: {
// dictTypeId: this.injectData.id
// }
// }
//
// addDynamicRoute(routeParams, this.$router)
}
}
}
</script>

View File

@ -0,0 +1,634 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:28:55
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider content-position="center">GBT2828.1</el-divider>
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="critical" label="CR" label-width="50px">
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalAccept" label="Accept">
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="major" label="MA" label-width="50px">
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorAccept" label="Accept">
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="minor" label="MI" label-width="50px">
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorAccept" label="Accept">
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="4">
<el-form-item prop="total" label="total" label-width="50px">
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalAccept" label="Accept">
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
GBTSubmitURL: "/code/purchaseRegistration",
submitURL: "/code/purchaseRegistration",
infoURL: "/code/purchaseRegistration/{id}",
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
supplierList: [],
userList: [],
samplingPlanList:[],
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
unitList:[],
productList: [],
factoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
GBTDataForm: {
critical:null,
criticalAccept: null,
criticalDefectiveNumber: null,
criticalNumber: null,
criticalReject: null,
id: null,
major: null,
majorAccept: null,
majorDefectiveNumber: null,
majorNumber: null,
majorReject: null,
minor: null,
minorAccept: null,
minorDefectiveNumber: null,
minorNumber: null,
minorReject: null,
purchaseRegistrationId: null,
total: null,
totalAccept: null,
totalDefectiveNumber: null,
totalNumber: null,
totalReject: null,
},
dataForm: {
batchNo: null,
batchQuantity: null,
batchSize: null,
checkoutTime: null,
companyId: null,
customSamplingId: null,
defectiveQuantity: null,
defectsNumber: null,
distributionUserId: null,
factoryId: null,
id: null,
inspectionQuantity: null,
inspectionTime: null,
inspectionType: null,
orderNumber: null,
parameterName: null,
processingMethod: null,
processingResults: null,
productId: null,
recordQuantity: null,
remark: null,
shiftId: null,
submit: null,
supplierId: null,
teamId: null,
upload: null,
userId: null
},
};
},
computed: {
dataRule() {
return {
dictLabel: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
dictValue: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
sort: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getDict()
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
//
getInfo() {
this.$http
.get(`/code/purchaseRegistration/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { })
this.$http
.get(`/code/purchaseRegistrationNationalStandard/getById/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm = {
...this.GBTDataForm,
...res.data,
};
})
.catch(() => { })
},
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getDictDataList, {
params: {
limit: 999,
page: 1,
dictTypeId: '1665966021935190018'
}
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.unitList = res.data
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data
}
})
.catch(() => {
})
// console.log(111111);
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if (this.dataForm.id) {
this.$http.put(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm.purchaseRegistrationId = res.data
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
} else {
this.$http.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.GBTDataForm.purchaseRegistrationId = res.data
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
}
});
},
//
},
};
</script>

View File

@ -0,0 +1,366 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 14:49:25
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item>
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="userId" :label="$t('code.Examiner')">
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item>
<el-form-item prop="recheck" :label="$t('code.recheck')">
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="task" :label="$t('code.processingResults')">
<el-radio-group v-model="dataForm.processingResults">
<el-radio :label="0"> {{ $t('code.approval')}} </el-radio>
<el-radio :label="1">{{ $t('code.approvalComplete')}} </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="task" :label="$t('code.status')">
<el-radio-group v-model="dataForm.upload">
<el-radio :label="0">{{ $t('code.notUploaded')}}</el-radio>
<el-radio :label="1">{{ $t('code.uploaded')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode',
getFactoryURL: '/code/factory/page',
getProductURL: '/basic/product/page',
getSupplierURL: '/supplier/qmsSupplier/page',
getDictDataList: '/sys/dict/data/page',
getUserURL: '/sys/user/page',
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
},
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
inspectionStatusList: [
{
id: 0,
name: '未登记'
},
{
id: 1,
name: '已登记'
}
],
supplierList: [],
userList: [],
samplingPlanList: [],
judgmentResultList: [
{
id: 0,
name: '0未判定'
},
{
id: 1,
name: '1合格'
},
{
id: 2,
name: '不合格'
},
],
unitList: [],
productList: [],
factoryList: [],
visible: false,
inspectionTypeList: [{
value: 0,
label: '监控'
},
{
value: 1,
label: '电芯来料检验'
},
{
value: 2,
label: 'IQC抽检'
},
{
value: 3,
label: 'IQC抽检2'
},
{
value: 4,
label: '原料抽检'
},
{
value: 5,
label: '进货外观检验'
},
{
value: 6,
label: '库内原料检验'
},
{
value: 7,
label: '来料检验'
},
{
value: 8,
label: '胶片'
},
{
value: 9,
label: '抽检'
},
{
value: 10,
label: '巡检'
}, {
value: 11,
label: '首检'
},
{
value: 12,
label: '末检'
},
{
value: 13,
label: '实时监测'
},
{
value: 14,
label: 'FQC抽检'
},
{
value: 15,
label: 'OQC抽检'
},
],
dataForm: {
processingResults: null,
batchNo: null,
customSamplingId: null,
factoryId: null,
inspectionType: null,
judgmentResult: null,
orderNumber: null,
productId: null,
recheck: null,
supplierId: null,
upload: null,
userId: null
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
mounted () {
this.getDict()
},
methods: {
getDict() {
this.$http
.get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get (this.urlOptions.getFactoryURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list
}
})
.catch(() => {
})
// console.log(111111);
},
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
//
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
//
handleConditionSearch() {
this.$emit("successSubmit", this.dataForm.key);
},
// dataFormSubmitHandle: debounce(
// function () {
// // console.log(1111);
// // this.visible = false;
// this.$emit("successSubmit", this.dataForm.key);
// // this.$refs["dataForm"].validate((valid) => {
// // if (!valid) {
// // return false;
// // }
// // this.$http[!this.dataForm.id ? "post" : "put"](
// // "/sys/params",
// // this.dataForm
// // )
// // .then(({ data: res }) => {
// // if (res.code !== 0) {
// // return this.$message.error(res.msg);
// // }
// // this.$message({
// // message: this.$t("prompt.success"),
// // type: "success",
// // duration: 500,
// // onClose: () => {
// // },
// // });
// // })
// // .catch(() => {});
// // });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -0,0 +1,49 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-01-31 16:47:32
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-radio v-model="injectData.incomingInspection" :label="1"
>进货检验</el-radio
>
<el-radio v-model="injectData.processInspection" :label="1"
>过程检验</el-radio
>
<el-radio v-model="injectData.finishInspection" :label="1"
>成品检验</el-radio
>
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
methods: {
//
// emitClick () {
// //
// const routeParams = {
// routeName: `${this.$route.name}__${this.injectData.id}`,
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
// path: 'sys/dict-data',
// params: {
// dictTypeId: this.injectData.id
// }
// }
// //
// addDynamicRoute(routeParams, this.$router)
// }
},
};
</script>

View File

@ -0,0 +1,264 @@
<!--
* @Author: zhp
* @Date: 2023-06-19 09:19:53
* @LastEditTime: 2023-06-19 14:43:40
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="18">
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-col>
<el-col :span="6">
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/single/value/movement/range/chart",
},
tableData: [],
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'averageUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'averageLcl',
label: 'LCL(图一)',
},
{
prop: 'rangeCl',
label: 'CL(图二)',
},
{
prop: 'rangeLcl',
label: 'LCL(图二)',
},
{
prop: 'rangeUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
};
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
// components: {
// AddOrUpdate,
// },
methods: {
getData(listQuery) {
this.$http
.post(this.urlOptions.getDataListURL, {
params: listQuery
}
)
.then(({ data: res }) => {
this.tableData.push({
average: res.data.average,
averageCl: res.data.averageCl,
averageLcl: res.data.averageLcl,
averageUcl: res.data.averageUcl,
ca: res.data.ca,
cp: res.data.cp,
cpk: res.data.cpk,
groupNum: res.data.groupNum,
lsl: res.data.lsl,
ppk: res.data.ppk,
rangeCl: res.data.rangeCl,
rangeLcl: res.data.rangeCl,
rangeUcl: res.data.rangeCl,
standardDeviationWhole: res.data.standardDeviationWhole,
usl: res.data.usl,
max: res.data.max,
min: res.data.min,
})
console.log(res)
let xAxisData = []
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '均值极差图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: xAxisData,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: 'lsl',
type: 'bar',
barWidth: '50%',
data: [res.data.lsl]
},
{
name: 'UCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageUcl]
},
{
name: 'UCL(图二)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeUcl]
},
{
name: 'USL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.usl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.rangeCl]
},
{
name: 'CL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageCl]
},
{
name: 'LCL(图一)',
type: 'bar',
barWidth: '50%',
data: [res.data.averageLcl]
},
{
name: 'SL',
type: 'bar',
barWidth: '50%',
data: [res.data.sl]
},
]
};
option && myChart.setOption(option);
})
},
}
};
</script>

View File

@ -0,0 +1,442 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:52:27
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getOriginalData">{{ $t('code.originalData') }}}</el-button>
</el-form-item>
</el-form>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="$t('code.meanRange')" name="first">
<mean-range ref="meanRange"></mean-range>
</el-tab-pane>
<el-tab-pane :label="$t('code.meanStandard')" name="second">
<mean-standard ref="meanStandard">
</mean-standard>
</el-tab-pane>
<el-tab-pane :label=" $t('code.medianRange')" name="third">
<median-range ref="medianRange">
</median-range>
</el-tab-pane>
<el-tab-pane :label="$t('code.singleValueMovingRange')" name="fourth">
<single-valueMovingRange ref="singleValueMovingRange">
</single-valueMovingRange>
</el-tab-pane>
<el-tab-pane :label="$t('code.meanMovingRangeRange')" name="fifth">
<mean-MovingRangeRange ref="meanMovingRangeRange">
</mean-MovingRangeRange>
</el-tab-pane>
<el-tab-pane :label="$t('code.meanMovingRangeStandardDeviation')" name="sixth">
<mean-movingRangeStandardDeviation ref="meanMovingRangeStandardDeviation">
</mean-movingRangeStandardDeviation>
</el-tab-pane>
</el-tabs>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData">
</base-table>
</el-card>
</template>
<script>
import meanRange from "./components/meanRange.vue"
import meanStandard from "./components/meanStandard.vue"
import medianRange from "./components/medianRange.vue"
import singleValueMovingRange from "./components/singleValueMovingRange.vue"
import meanMovingRangeRange from "./components/meanMovingRangeRange.vue"
import meanMovingRangeStandardDeviation from "./components/meanMovingRangeStandardDeviation.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
const tableProps = [
{
prop: "orderNumber",
label: i18n.t('code.inspectionNumber'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "locationNo",
label: i18n.t('code.locationNo'),
},
{
prop: "groupNo",
label: i18n.t('code.groupNo'),
},
{
prop: "meteringValue",
label: i18n.t('code.assayValue'),
},
{
prop: "createDate",
label: i18n.t('code.parsingTime'),
}
];
export default {
data() {
return {
myChart: null,
urlOptions: {
getXBarURL: '',
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getOriginalDataURL: '/code/purchaseRegistration/raw/data',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
tableData:[],
tableProps,
factoryList: [],
productList: [],
meanRangeShow:false,
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
activeName:null,
headers: [
{
prop: 'usl',
label: 'USL',
},
{
prop: 'sl',
label: 'SL',
},
{
prop: 'lsl',
label: 'LSL',
},
{
prop: 'rangeUcl',
label: 'CL(图一)',
},
{
prop: 'averageUcl',
label: 'UCL(图一)',
},
{
prop: 'rangeLcl',
label: 'LCL(图一)',
},
{
prop: 'standardDeviationCl',
label: 'CL(图二)',
},
{
prop: 'standardDeviationLcl',
label: 'LCL(图二)',
},
{
prop: 'standardDeviationUcl',
label: 'UCL(图二)',
},
{
prop: 'standardDeviationGroup',
label: '标准差',
},
{
prop: 'cpk',
label: 'cpk',
},
{
prop: 'standardDeviationWhole',
label: '总体标准差',
},
{
prop: 'ppk',
label: 'ppk',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'cp',
label: 'cp',
},
{
prop: 'ca',
label: 'ca',
},
{
prop: 'average',
label: '均值',
},
{
prop: 'max',
label: '最大值',
},
{
prop: 'max',
label: '最大值',
},
],
tableData: [],
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
components: {
meanRange,
meanStandard,
medianRange,
singleValueMovingRange,
meanMovingRangeRange,
meanMovingRangeStandardDeviation
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
mounted() {
// this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
handleClick(val) {
if (this.activeName === 'first') {
this.$nextTick(() => {
this.$refs.meanRange.getData(this.listQuery)
})
} else if (this.activeName === 'second') {
this.$nextTick(() => {
this.$refs.meanStandard.getData(this.listQuery)
})
} else if (this.activeName === 'third') {
this.$nextTick(() => {
this.$refs.medianRange.getData(this.listQuery)
})
} else if (this.activeName === 'fourth') {
this.$nextTick(() => {
this.$refs.singleValueMovingRange.getData(this.listQuery)
})
} else if (this.activeName === 'fifth') {
this.$nextTick(() => {
this.$refs.meanMovingRangeRange.getData(this.listQuery)
})
} else if (this.activeName === 'sixth') {
this.$nextTick(() => {
this.$refs.meanMovingRangeStandardDeviation.getData(this.listQuery)
})
}
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getOriginalData() {
this.$http.get(this.urlOptions.getOriginalDataURL, {
params:this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
this.tableData = res.data
}
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,312 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<incomingInspection-add ref="addOrUpdate" @successSubmit="successSubmit"></incomingInspection-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<incomingInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></incomingInspection-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
// import showProductList from "./components/showProductList.vue";
import incomingInspectionSearch from "./components/incomingInspectionSearch.vue";
import incomingInspectionAdd from "./components/incomingInspection-add.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "inspectionStatus",
label: i18n.t('code.inspectionStatus'),
},
{
prop: "factoryName",
label: i18n.t('code.factoryName'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "orderNumber",
label: i18n.t('code.orderNumber'),
},
{
prop: "productName",
label: i18n.t('code.productName'),
},
{
prop: "companyName",
label: i18n.t('code.companyName'),
},
{
prop: "productCode",
label: i18n.t('code.productCode'),
},
{
prop: "supplierName",
label: i18n.t('code.supplierName'),
},
{
prop: "batchQuantity",
label: i18n.t('code.batchQuantity'),
},
{
prop: "inspectionQuantity",
label: i18n.t('code.inspectionQuantity'),
},
{
prop: "checkoutTime",
label: i18n.t('code.checkoutTime'),
},
{
prop: "inspectionTime",
label: i18n.t('code.inspectionTime'),
},
{
prop: "inspectionType",
label: i18n.t('code.inspectionType'),
},
{
prop: "username",
label: i18n.t('code.username'),
},
{
prop: "source",
label: i18n.t('code.source'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
},
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "code/incomingInspection/page/term",
deleteURL: "/code/incomingInspection",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page:1
},
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible:false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
incomingInspectionSearch,
incomingInspectionAdd
},
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index);
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
this.listQuery.task = dataForm.task ? dataForm.task : null
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
this.listQuery.page = 1;
this.getDataList(this.listQuery)
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.getDataListURL, this.listQuery,
)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
case "correlation":
this.productOrEditTitle = "产品";
this.productOrUpdateVisible = true;
// this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,312 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:53:00
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<!-- <el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<!--
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/pareto/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
// gerCharacteristics(val) {
// this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
// params: {
// productId:val
// },
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// this.dataForm.characteristicsId = res.data.parameterName
// }
// })
// },
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'帕累托图'
},
tooltip: {
formatter: (params) => {
// params
console.log(params)
// params.dataIndex
// params[0].dataIndex
let index = params.dataIndex
let obj = res.data[index] //
let str = `缺陷数量:${obj.number}<br/>
缺陷率${obj.defectRate}<br/>`
return str
}
},
xAxis: {
data: res.data.map(i => { return i.propertyName })
},
yAxis: [{
type: 'value',
name: '缺陷数量',
show: true,
interval: 10,
axisLine: {
lineStyle: {
color: '#5e859e',
width: 2
}
}
}],
series: [{
name: '缺陷率',
type: 'bar',
barWidth: '50%',
data: res.data.map(i => { return i.defectRate })
}, {
name: '缺陷数量',
type: 'line',
smooth: true,
data: res.data.map(i => { return i.number })
}]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
// this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
// this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,337 @@
<!--
* @Author: zhp
* @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:35:49
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<purchaseRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
</purchaseRegistration-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<purchaseRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</purchaseRegistration-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
import purchaseRegistrationSearch from "./components/purchaseRegistrationSearch.vue";
import purchaseRegistrationAdd from "./components/purchaseRegistration-add.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "customSamplingId",
label: i18n.t('code.customSampling'),
},
{
prop: "factoryName",
label: i18n.t('code.factoryName'),
},
{
prop: "batchNo",
label: i18n.t('code.batchNo'),
},
{
prop: "orderNumber",
label: i18n.t('code.orderNumber'),
},
{
prop: "upload",
label: i18n.t('code.upload'),
},
{
prop: "judgmentResult",
label: i18n.t('code.judgmentResult'),
},
{
prop: "productCode",
label: i18n.t('code.productCode'),
},
{
prop: "supplierName",
label: i18n.t('code.supplierName'),
},
{
prop: "batchQuantity",
label: i18n.t('code.batchQuantity'),
},
{
prop: "defectiveQuantity",
label: i18n.t('code.defectiveQuantity'),
},
{
prop: "defectsNumber",
label: i18n.t('code.defectsNumber'),
},
{
prop: "inspectionQuantity",
label: i18n.t('code.inspectionQuantity'),
},
{
prop: "checkoutTime",
label: i18n.t('code.checkoutTime'),
},
{
prop: "inspectionTime",
label: i18n.t('code.inspectionTime'),
},
{
prop: "inspectionType",
label: i18n.t('code.inspectionType'),
},
{
prop: "submit",
label: i18n.t('code.submit'),
},
{
prop: "username",
label: i18n.t('code.username'),
},
{
prop: "processingMethod",
label: i18n.t('code.processingMethod'),
},
{
prop: "processingResults",
label: i18n.t('code.processingResults'),
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
},
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "code/purchaseRegistration/page/term",
deleteURL: "/code/purchaseRegistration",
exportURL: "/code/purchaseRegistration/export",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page:1
},
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible:false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
purchaseRegistrationSearch,
purchaseRegistrationAdd
},
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index);
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
this.listQuery.page = 1
this.getDataList(this.listQuery)
this.searchOrUpdateVisible = false
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id)
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.getDataListURL, this.listQuery,
)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
case "correlation":
this.productOrEditTitle = "产品";
this.productOrUpdateVisible = true;
// this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,303 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:53:12
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/phase/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId:val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'散点图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: res.data.abscissaList,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [{
name: '缺陷率',
type: 'bar',
barWidth: '50%',
data: res.data.ordinateList
}]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,298 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:53:18
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/phase/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList:[],
listQuery: {
characteristicsId:null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize:null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId:val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.characteristicsId = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text:'阶段图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: res.data.purchaseRegistrationCharacteristicsDTOList.length,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -0,0 +1,319 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:53:29
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
@change="getFactory" valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
</el-form-item>
<el-form-item :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('code.inspectionType')">
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
</el-form-item>
<el-form-item :label="$t('code.characteristics')">
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('code.sampleSize')">
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData">查询</el-button>
</el-form-item>
</el-form>
</div>
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
</el-card>
</template>
<script>
// import available from "./components/gageAvailable.vue"
import i18n from "@/i18n"
import * as echarts from 'echarts';
export default {
data() {
return {
myChart: null,
urlOptions: {
getDataListURL: "/code/purchaseRegistration/transition/diagram",
getFactoryURL: '/code/purchaseRegistration/query/factory',
getProductURL: '/code/purchaseRegistration/query/product',
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
},
factoryList: [],
productList: [],
characteristicsList:[],
listQuery: {
characteristicsId: null,
factoryId: null,
inspectionType: null,
productId: null,
sampleSize: null,
endTime: null,
startTime: null,
},
dataForm: {
productId: null,
timeSlot: [],
factoryId: null,
characteristicsId: null,
inspectionType: null,
sampleSize: null
},
selectOptions: [{
id: 0,
name: '监控'
},
{
id: 1,
name: '电芯来料检验'
},
{
id: 2,
lname: 'IQC抽检'
},
{
id: 3,
name: 'IQC抽检2'
},
{
id: 4,
name: '原料抽检'
},
{
id: 5,
name: '进货外观检验'
},
{
id: 6,
name: '库内原料检验'
},
{
id: 7,
name: '来料检验'
},
{
id: 8,
name: '胶片'
},
{
id: 9,
name: '抽检'
},
{
id: 10,
name: '巡检'
}, {
id: 11,
name: '首检'
},
{
id: 12,
name: '末检'
},
{
id: 13,
name: '实时监测'
},
{
id: 14,
name: 'FQC抽检'
},
{
id: 15,
name: 'OQC抽检'
},
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
this.getData()
// this.getDict()
},
methods: {
selectChanged(val) {
console.log(val)
alert(JSON.stringify(val))
},
getFactory(val) {
console.log(val)
this.$http.get(this.urlOptions.getFactoryURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.factoryList = res.data.map((item) => {
return {
id: item.factoryId,
name: item.factoryName
}
})
}
})
this.$http.get(this.urlOptions.getProductURL, {
params: {
startTime: val[0],
endTime: val[1]
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.map((item) => {
return {
id: item.productId,
name: item.productName
}
})
}
})
},
getInspectionType(val) {
this.$http.get(this.urlOptions.getInspectionTypeURL, {
params: {
startTime: this.dataForm.timeSlot[0],
endTime: this.dataForm.timeSlot[1],
factoryId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.dataForm.inspectionType = res.data.inspectionType
}
})
},
gerCharacteristics(val) {
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
params: {
productId: val
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.characteristicsList[0].id = res.data.id
this.characteristicsList[0].name = res.data.parameterName
}
})
},
getData() {
this.$http
.post(this.urlOptions.getDataListURL, {
params: this.listQuery
}
)
.then(({ data: res }) => {
console.log(res)
let xAxisData = []
let yAxisData = []
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
xAxisData.push(ele.batchNo + ele.groupNo)
})
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
yAxisData.push(ele.countValue)
})
var chartDom = document.getElementById('priceMain');
var myChart = echarts.init(chartDom)
this.myChart = myChart
var option;
// myChart.on('click', function (params) {
// console.log(params);
// });
myChart.on('click', 'xAxis.category', function (params) {
console.log(params);
});
option = {
title: {
text: '推移图'
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data: ['']
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: res.data.map(i => { return i.batchNo + i.groupNo }),
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: '计数型值',
type: 'line',
stack: 'Total',
data: res.data.map(i => { return i.countValue })
}
]
};
option && myChart.setOption(option);
})
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
this.dataForm.productId = val.productId ? val.productId : null
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
this.getData()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-05-08 11:11:06
* @LastEditTime: 2023-05-15 14:32:17
* @LastEditTime: 2023-06-20 15:35:38
* @LastEditors: zhp
* @Description:
-->
@ -197,7 +197,7 @@ export default {
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = '修改'
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
})

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-15 14:31:54
* @LastEditTime: 2023-06-20 15:35:33
* @LastEditors: zhp
* @Description:
-->
@ -201,6 +201,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-15 14:29:47
* @LastEditTime: 2023-06-20 15:35:30
* @LastEditors: zhp
* @Description:
-->
@ -201,7 +201,7 @@ export default {
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = '修改'
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init({ id:val.data.id })
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-15 14:32:25
* @LastEditTime: 2023-06-20 15:35:25
* @LastEditors: zhp
* @Description:
-->
@ -206,7 +206,7 @@ export default {
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '修改'
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init({ id: val.data.id })
})

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-08 15:45:08
* @LastEditTime: 2023-06-20 15:35:20
* @LastEditors: zhp
* @Description:
-->
@ -193,6 +193,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-08 10:26:26
* @LastEditTime: 2023-06-20 15:34:19
* @LastEditors: zhp
* @Description:
-->
@ -187,6 +187,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 11:08:28
* @LastEditTime: 2023-06-20 15:34:26
* @LastEditors: zhp
* @Description:
-->
@ -194,6 +194,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, this.listQuery.moduleDataDictionaryId);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 13:46:47
* @LastEditTime: 2023-06-20 15:35:08
* @LastEditors: zhp
* @Description:
-->
@ -190,7 +190,7 @@ export default {
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = '修改'
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, this.listQuery.dataDictionaryId);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 10:11:44
* @LastEditTime: 2023-06-20 15:34:33
* @LastEditors: zhp
* @Description:
-->
@ -180,6 +180,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-18 16:10:40
* @LastEditTime: 2023-06-20 15:34:38
* @LastEditors: zhp
* @Description:
-->
@ -179,6 +179,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-07 15:31:53
* @LastEditTime: 2023-06-20 15:34:42
* @LastEditors: zhp
* @Description:
-->
@ -240,6 +240,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-24 15:48:18
* @LastEditTime: 2023-05-26 11:21:02
* @LastEditors: zhp
* @Description:
-->
@ -11,7 +11,8 @@
<el-row>
<el-col :span="12">
<el-form-item prop="transferSchemeCode" :label="$t('quality.code')">
<el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('quality.code')">
<el-input @input="(e) => handlerShow(e)" v-model="dataForm.transferSchemeCode"
:placeholder="$t('quality.code')">
</el-input>
</el-form-item>
</el-col>
@ -116,6 +117,27 @@ export default {
// },
methods: {
handleShow(e) {
this.debounce(this.ajax(e),500)
},
ajax(e) {
console.log(e)
},
debounce(fn, delay) {
let timer
return function () {
console.log(timer)
if (timer) {
console.log('aaaaa')
clearTimeout(timer)
}
timer = setTimeout(() => {
console.log(arguments)
fn.apply(this, arguments) // this
timer = 0
}, delay)
}
},
init(id, ) {
this.dataForm.id = id || ""
// console.log(11111)

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-24 15:54:21
* @LastEditTime: 2023-06-02 13:54:08
* @LastEditors: zhp
* @Description:
-->
@ -267,8 +267,6 @@ export default {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.failureTypeStatus = null
this.getDataList();
break;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-24 15:54:07
* @LastEditTime: 2023-06-02 13:53:56
* @LastEditors: zhp
* @Description:
-->
@ -194,8 +194,6 @@ export default {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.failureTypeStatus = null
this.getDataList();
break;

Some files were not shown because too many files have changed in this diff Show More