This commit is contained in:
helloDy
2023-06-28 14:05:58 +08:00
180 changed files with 39863 additions and 7939 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-04 14:56:08
* @LastEditTime: 2023-05-17 15:00:50
* @LastEditors: zhp
* @Description:
-->
@@ -44,11 +44,11 @@ export default {
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
this.$message.error(data.msg);
},
});
} else {
this.$message.error(data.msg);
this.$message.error(data.msg)
}
});
// 路由参数

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', // axis显示该列下所有坐标轴对应数据item只显示该点数据
// 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-10 14:17:09
* @LastEditTime: 2023-05-17 14:21:45
* @LastEditors: zhp
* @Description:
-->
@@ -87,8 +87,7 @@
</el-form-item>
<el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
:value="item.id">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@@ -96,8 +95,8 @@
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
</el-input>
</el-form-item>
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
<el-form-item prop="recipient" :label="$t('gage.recipientName')">
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
@@ -209,7 +208,7 @@ export default {
],
visible: false,
dataForm: {
belongPerson:null,
belongPerson:'1067246875800000001',
benchmarkMeasurTool: null,
certificateCode: null,
certificateCodeBh: null,
@@ -231,7 +230,7 @@ export default {
name: null,
nextExternalInspectionTime: null,
nextInternalInspectionTime: null,
recipient: null,
recipient: '1067246875800000001',
remark: null,
updateDate: null,
useLocation: null,

View File

@@ -0,0 +1,327 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-12 15:35:59
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="partName" :label="$t('gage.partName')">
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
</el-input>
</el-form-item>
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="corporation" :label="$t('gage.corporation')">
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
</el-input>
</el-form-item>
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
</el-input>
</el-form-item>
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
</el-input>
</el-form-item>
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
</el-input>
</el-form-item>
<el-form-item prop="specification" :label="$t('gage.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
disabled>
</el-input>
</el-form-item>
<el-form-item prop="process" :label="$t('gage.process')">
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
</el-input>
</el-form-item>
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
</el-input>
</el-form-item>
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
</el-input>
</el-form-item>
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
<el-form-item prop="tester" :label="$t('gage.tester')">
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
</el-input>
</el-form-item>
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</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: "/gage/qmsGage",
infoURL: "/gage/qmsGage/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/page',
getGageList: '/gage/qmsGage/page',
getCustomerListURL: '/basic/qmsCustomer/page'
},
gageList: [],
userList: [],
customerList:[],
gageTypeList:[],
departmentList: [],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
],
listQuery: {
limit: 999,
page: 1
},
gageStatusList: [
{
id: 0,
name:'在用'
},
{
id: 1,
name: '备用'
},
{
id: 2,
name: '停用'
},
{
id: 3,
name: '封存'
},
{
id: 4,
name: '报废'
},
{
id: 5,
name: '降级使用'
}
],
certificateTypeList: [
{
id: 0,
name: '检定证书'
},
{
id: 1,
name: '校准证书'
},
{
id: 2,
name: '检测报告'
},
{
id: 3,
name: '自校报告'
}
],
visible: false,
dataForm: {
connection:null,
corporation: null,
fabrication: null,
gageId: null,
gageName: null,
gageTypeName: null,
id: null,
itemNo: null,
measurementNumber: null,
measurementTime: null,
measuringToolAccuracy: null,
measuringToolSpecification: null,
partName: null,
partNumber: null,
precisionDecimalPlace: null,
process: null,
publicErrand: null,
remark: null,
specification: null,
tester: 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.getData();
},
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()
}
});
},
getGageType() {
this.gageList.forEach(ele => {
if (val === ele.id) {
this.dataForm.gageTypeName = ele.gageTypeName
this.dataForm.measuringToolSpecification = ele.measuringToolSpecification
this.dataForm.measuringToolAccuracy = ele.measuringToolAccuracy
}
});
},
getData() {
this.$http.get(this.urlOptions.getGageList, {
params: this.listQuery,
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data)
this.gageList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.userList = res.data.list
}
})
.catch(() => {
})
},
// 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(`/gage/qmsGage/${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

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-08 10:34:55
* @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,
@@ -129,7 +129,9 @@ export default {
// .catch(() => {
// });
this.$http
.get(this.urlOptions.getGageListURL, this.listQuery)
.get(this.urlOptions.getGageListURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);

View File

@@ -0,0 +1,221 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-17 14:50:02
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="code" :label="$t('gage.code')">
<el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
</el-input>
</el-form-item>
<el-form-item prop="name" :label="$t('gage.name')">
<el-input v-model="dataForm.name" :placeholder="$t('gage.name')">
</el-input>
</el-form-item>
<el-form-item prop="decimalDigits" :label="$t('gage.decimalDigits')">
<el-input v-model="dataForm.decimalDigits" :placeholder="$t('gage.decimalDigits')">
</el-input>
</el-form-item>
<el-form-item prop="lsl" :label="$t('gage.lsl')">
<el-input v-model="dataForm.lsl" :placeholder="$t('gage.lsl')">
</el-input>
</el-form-item>
<el-form-item prop="serialNo" :label="$t('gage.serialNo')">
<el-input v-model="dataForm.serialNo" :placeholder="$t('gage.serialNo')">
</el-input>
</el-form-item>
<el-form-item prop="sl" :label="$t('gage.sl')">
<el-input v-model="dataForm.sl" :placeholder="$t('gage.sl')">
</el-input>
</el-form-item>
<el-form-item prop="usl" :label="$t('gage.usl')">
<el-input v-model="dataForm.usl" :placeholder="$t('gage.usl')">
</el-input>
</el-form-item>
<el-form-item prop="gageTypeId" :label="$t('gage.gageTypeName')">
<el-select v-model="dataForm.gageTypeId" :placeholder="$t('gage.gageTypeName')">
<el-option v-for="item in gageTypeList" :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: "/gage/qmsGageType",
infoURL: "/gage/qmsGageType/{ id }",
// getGageListURL: '/gage/qmsGage/page',
getGageTypeListURL: '/gage/qmsGageType/page',
// getTeamListURL: '/basic/qmsTeam/gape',
// getProductURL: '/basic/qmsProduct/gape',
// getSupplierListURL: '/supplier/qmsSupplier/gape'
},
gageTypeList:[],
// supplierList:[],
// productList:[],
// typeList: [],
// teamList:[],
listQuery: {
limit: 999,
gape: 1
},
measurementTypeList: [{
id: 0,
name: '计量'
},
{
id: 1,
name: '计数'
},
],
visible: false,
dataForm: {
id: null,
decimalDigits:null,
gageTypeId: null,
lsl: null,
name: null,
serialNo: null,
sl: null,
updateDate: null,
usl: 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.getData();
},
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()
}
});
},
getData() {
// this.$http
// .get(this.urlOptions.getTypeListURL, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.typeList = res.data.list
// }
// })
// .catch(() => {
// });
this.$http
.get(this.urlOptions.getGageTypeListURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageTypeList = res.data.list
}
})
.catch(() => {
})
},
// 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(`/gage/qmsGageTypeDifferenceParameter/${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

@@ -49,8 +49,8 @@
</el-form-item>
<el-form-item prop="parityBit" :label="$t('gage.parityBit')">
<el-radio-group v-model="dataForm.parityBit">
<el-radio :label="0">内部校验</el-radio>
<el-radio :label="1">外部校验</el-radio>
<el-radio :label="0">{{ $t('gage.outsideVerify') }}</el-radio>
<el-radio :label="1"> {{ $t('gage.outsideVerify') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="checker" :label="$t('gage.checker')">

View File

@@ -0,0 +1,218 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:36:04
* @remark: 报废原因--新增
-->
<template>
<el-dialog :visible.sync="visible">
<el-row :gutter="15">
<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" />
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
</span>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" append-to-body
@confirm="handleConfirm" :before-close="handleCancel">
<parameterShow-add ref="addOrUpdate" @refreshDataList="successSubmit">
</parameterShow-add>
</base-dialog>
</el-dialog>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import basicAdd from "@/mixins/basic-add"
// import gage from '@/filters/gage'
import { timeFormatter } from '@/filters'
import parameterShowAdd from './parameterShow-add'
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'batchNumber',
label: i18n.t("gage.batchTail"),
align: 'center'
},
{
prop: 'gageName',
label: i18n.t("gage.gageName"),
align: 'center'
},
{
prop: 'measuringToolAccuracy',
label: i18n.t("gage.measuringToolAccuracy"),
align: 'center'
},
{
prop: 'parameter',
label: i18n.t("gage.parameter"),
align: 'center'
},
{
prop: 'price',
label: i18n.t("gage.price"),
align: 'center'
},
{
prop: 'remark',
label: i18n.t("gage.remark"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
}
];
export default {
mixins: [basicPage, basicSearch, basicAdd],
components: {
parameterShowAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsStationDeviationAnalysis/page",
deleteURL: "/gage/qmsStationDeviationAnalysis",
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
tableProps,
tableBtn,
visible: false,
addOrUpdateVisible:false,
showParameterVisible: false,
searchOrEditTitle: '',
addOrEditTitle:'',
searchOrUpdateVisible: false,
formConfig: [
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar点击
init(id,) {
// this.dataForm.id = id || ""
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.listQuery.gageResumeId = id
console.log(this.listQuery.gageResumeId)
this.getDataList()
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo()
// } else {
// // this.getCode()
// }
});
},
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.name}]进行删除操作?`, "提示", {
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.getDataList();
break;
case "export":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
this.exportHandle();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,200 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-22 16:23:33
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
<el-input v-model="dataForm.batchNumber" :placeholder="$t('gage.batchTail')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="price" :label="$t('gage.price')">
<el-input v-model="dataForm.price" :placeholder="$t('gage.price')">
</el-input>
</el-form-item>
<el-form-item prop="parameter" :label="$t('gage.parameter')">
<el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
<el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" disabled>
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="remark" :label="$t('gage.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
</el-input>
</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: "/gage/qmsStationDeviationAnalysis",
infoURL: "/gage/qmsStationDeviationAnalysis/{ id }",
getGageListURL: '/gage/qmsGage/page'
},
gageList: [],
userList: [],
gageTypeList:[],
departmentList: [],
parameterList: [
{
id: 0,
name: '基准'
},
{
id: 1,
name: '校验'
},
],
listQuery: {
limit: 999,
page: 1
},
visible: false,
dataForm: {
batchNumber:null,
gageId: null,
gageResumeId: null,
id: null,
measuringToolAccuracy: null,
parameter: null,
price: null,
remark: 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.getData();
},
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()
}
});
},
getData() {
this.$http
.get(this.urlOptions.getGageListURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageList = res.data.list
}
})
.catch(() => {
});
},
// 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(`/gage/qmsStationDeviationAnalysis/${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

@@ -1,96 +1,134 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-10 13:45:58
* @LastEditTime: 2023-05-18 15:30:28
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="gageCode" :label="$t('gage.gageCode')">
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
<el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
</el-input>
</el-form-item>
<el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
<el-select v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
<el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="useLocation" :label="$t('gage.useLocation')">
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
</el-input>
</el-form-item>
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="processUserName" :label="$t('gage.processUserName')">
<el-select v-model="dataForm.processUserName" :placeholder="$t('gage.processUserName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="process" :label="$t('gage.process')">
<el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
<el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="transferDate" :label="$t('gage.transferDate')">
<el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="remark" :label="$t('gage.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
</el-input>
</el-form-item>
</el-form>
</el-form-item> -->
<el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
<el-select @change="changeShow" v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
<el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-tooltip class="item" effect="dark" :content="$t('gage.tips')" placement="top">
<i class="el-icon-warning"></i>
</el-tooltip>
</el-form-item>
<el-form-item v-if="receiveShow || returnShow || maintainShow || transferShow || detectionShow"
prop="userDepartment" :label="$t('gage.userDepartment')">
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="receiveShow || returnShow || maintainShow" prop="useLocation" :label="$t('gage.useLocation')">
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
</el-input>
</el-form-item>
<el-form-item v-if="!scrapShow" prop="recipient" :label="$t('gage.recipientName')">
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="processUserId" :label="$t('gage.processUserName')">
<el-select v-model="dataForm.processUserId" :placeholder="$t('gage.processUserName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="process" :label="$t('gage.process')">
<el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
<el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="receiveShow || maintainShow || detectionShow" prop="expectedReturnDate"
:label="$t('gage.expectedReturnDate')">
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime"
:placeholder="$t('gage.expectedReturnDate')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item v-if="transferShow" prop="transferDate" :label="$t('gage.transferDate')">
<el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="remark" :label="$t('gage.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
</el-input>
</el-form-item>
</el-form>
<el-form v-if="detectionShow && showForm" :model="parameterData" ref="parameterData" label-width="150px">
<el-form-item prop="parameter" :label="$t('gage.parameter')">
<el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
<el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
<el-input v-model="parameterData.batchNumber" :placeholder="$t('gage.batchTail')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="parameterData.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="price" :label="$t('gage.price')">
<el-input v-model="parameterData.price" :placeholder="$t('gage.price')">
</el-input>
</el-form-item>
<el-form-item prop="remark" :label="$t('gage.parameterRemark')">
<el-input v-model="parameterData.remark" :placeholder="$t('gage.parameterRemark')">
</el-input>
</el-form-item>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
// import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
// mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/gage/qmsGageResume",
infoURL: "/gage/qmsGageResume/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page'
// getTeamListURL: '/basic/qmsTeam/gape',
// getProductURL: '/basic/qmsProduct/gape',
// getSupplierListURL: '/supplier/qmsSupplier/gape'
getUserList: '/sys/user/page',
getGageList: '/gage/qmsGage/page',
submitStationDeviationAnalysisURL: '/gage/qmsStationDeviationAnalysis',
},
gageList: [],
userList:[],
gageResumeList: [],
userList: [],
showForm:true,
receiveShow: false,
returnShow: false,
scrapShow: false,
maintainShow: false,
purchaseShow: false,
detectionShow: false,
transferShow: false,
departmentList: [],
processList: [
{
@@ -106,18 +144,28 @@ export default {
name: '同意'
}
],
parameterList: [
{
id: 0,
name: '基准 '
},
{
id: 1,
name: '校验'
}
],
listQuery: {
limit: 999,
gape: 1
page: 1
},
eventList: [
{
id: 0,
id: 0,
name: '领用'
},
{
id: 1,
name: '归还'
},
{
id: 1,
name: '归还'
},
{
id: 2,
@@ -131,18 +179,34 @@ export default {
id: 4,
name: '量具购买'
},
{
id: 5,
name: '量具检测'
},
{
id: 6,
name: '量具转移'
},
],
visible: false,
parameterData: {
gageResumeId:null,
batchNumber: null,
measuringToolAccuracy: null,
parameter: null,
price: null,
remark: null,
},
dataForm: {
id: null,
expectedReturnDate:null,
gageCode: null,
gageId: null,
gageId: '',
measuringToolSpecification:null,
measurToolEvent: null,
process: null,
processUserId: null,
recipient: null,
processUserId: '1067246875800000001',
recipient: '1067246875800000001',
remark: null,
transferDate: null,
useLocation: null,
@@ -181,9 +245,80 @@ export default {
mounted () {
this.getData();
},
destroyed () {
this.receiveShow = false
this.returnShow = false
this.scrapShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
},
methods: {
changeShow(val) {
if (val === 0) {
this.receiveShow = true
this.returnShow = false
this.scrapShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if(val === 1 ) {
this.returnShow = true
this.receiveShow = false
this.scrapShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 2) {
this.scrapShow = true
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 3) {
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = true
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 4) {
this.purchaseShow = true
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 5) {
this.detectionShow = true
this.purchaseShow = false
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.transferShow = false
} else if (val === 6) {
this.detectionShow = false
this.purchaseShow = false
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.transferShow = true
}
},
init(id, ) {
this.dataForm.id = id || ""
if (id) {
this.showForm = false
}
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
@@ -206,7 +341,19 @@ export default {
}
})
.catch(() => {
});
})
this.$http
.get(this.urlOptions.getGageList, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.dictionaryDetailList, this.listQuery)
.then(({ data: res }) => {
@@ -244,35 +391,79 @@ export default {
})
.catch(() => { })
},
formClear() {
this.$refs.dataForm.resetFields()
this.tableData = []
},
// 表单提交
dataFormSubmitHandle: debounce(
function () {
dataFormSubmit() {
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);
}
if (this.dataForm.measurToolEvent === 5) {
var pattern = /^[0-9]+(_)[0-9]+$/
if (pattern.test(this.parameterData.batchNumber)) {
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.parameterData.gageResumeId = res.data
this.$http.post(this.urlOptions.submitStationDeviationAnalysisURL, 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.$message({
message: this.$t("prompt.success"),
type: "success",
message: this.$t("gage.batchTips"),
type: 'warning',
duration: 500,
onClose: () => {
console.log(1111);
this.visible = false;
this.$emit("successSubmit");
},
});
})
.catch(() => {});
})
}
} else {
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;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
}
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,267 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zhp
* @LastEditTime: 2023-06-20 15:35:58
* @remark: 报废原因--新增
-->
<template>
<el-drawer :title="$t('gage.verifyLog')" :visible.sync="visible" :direction="direction" size="50%"
:close-on-press-escape="true">
<div class="demo-drawer__content">
<el-tabs v-model="tabValue" @tab-click="clickTabs" :tab-position="tabPosition" style="height: 200px;">
<el-tab-pane name="0" :label="$t('gage.insideVerify')">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
</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" />
</el-tab-pane>
<el-tab-pane name="1" :label="$t('gage.outsideVerify')">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
</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" />
</el-tab-pane>
</el-tabs>
</div>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" append-to-body
@confirm="handleConfirm" :before-close="handleCancel">
<verifyShow-add ref="addOrUpdate" @refreshDataList="successSubmit">
</verifyShow-add>
</base-dialog>
</el-drawer>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import basicAdd from "@/mixins/basic-add"
// import gage from '@/filters/gage'
import { timeFormatter } from '@/filters'
import gage from '@/filters/gage'
import verifyShowAdd from './verifyShow-add'
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'client',
label: i18n.t("gage.client"),
align: 'center'
},
{
prop: 'certificateNo',
label: i18n.t("gage.certificateCode"),
align: 'center'
},
{
prop: 'gageName',
label: i18n.t("gage.gageName"),
align: 'center'
},
{
prop: 'parityBit',
label: i18n.t("gage.parityBit"),
align: 'center',
filter: gage('verifyType'),
},
{
prop: 'inspectionTime',
label: i18n.t("gage.inspectionTime"),
align: 'center',
filter: timeFormatter
},
{
prop: 'calibrationUnit',
label: i18n.t("gage.calibrationUnit"),
align: 'center'
},
{
prop: 'calibrationDepartment',
label: i18n.t("gage.calibrationDepartment"),
align: 'center'
},
{
prop: 'checker',
label: i18n.t("gage.checker"),
align: 'center'
},
{
prop: 'verificationResult',
label: i18n.t("gage.verificationResult"),
align: 'center'
},
{
prop: 'remark',
label: i18n.t("gage.remark"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
}
];
export default {
mixins: [basicPage, basicSearch, basicAdd],
components: {
verifyShowAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageVerification/page",
deleteURL: "/gage/qmsGageVerification",
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
direction: 'ttb',
tableProps,
tableBtn,
tabValue: 0,
visible: false,
gageId:null,
tabPosition:'left',
addOrUpdateVisible:false,
showParameterVisible: false,
searchOrEditTitle: '',
addOrEditTitle:'',
searchOrUpdateVisible: false,
formConfig: [
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
handleClose() {
this.visible = true
},
clickTabs(el) {
this.listQuery.gageId =this.gageId
this.listQuery.parityBit = Number(el.name)
this.getDataList()
},
//search-bar点击
init(id,) {
this.gageId = id || ""
this.visible = true
this.$nextTick(() => {
this.listQuery.gageId = id ? id : ''
this.listQuery.parityBit = Number(this.tabValue)
this.getDataList()
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo()
// } else {
// // this.getCode()
// }
});
},
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.name}]进行删除操作?`, "提示", {
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.getDataList();
break;
case "export":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
this.exportHandle();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,255 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-22 16:25:01
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="client" :label="$t('gage.client')">
<el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
</el-input>
</el-form-item>
<el-form-item prop="certificateNo" :label="$t('gage.certificateCode')">
<el-input v-model="dataForm.certificateNo" :placeholder="$t('gage.certificateCode')">
</el-input>
</el-form-item>
<el-form-item prop="verificationFee" :label="$t('gage.verificationFee')">
<el-input v-model="dataForm.verificationFee" :placeholder="$t('gage.verificationFee')">
</el-input>
</el-form-item>
<el-form-item prop="measure" :label="$t('gage.measure')">
<el-select v-model="dataForm.measure" :placeholder="$t('gage.measure')">
<el-option v-for="item in measureList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="parityBit" :label="$t('gage.parityBit')">
<el-radio-group v-model="dataForm.parityBit">
<el-radio :label="0">内部校验</el-radio>
<el-radio :label="1">外部校验</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('gage.inspectionTime')" prop="inspectionTime">
<el-date-picker v-model="dataForm.inspectionTime" size="small" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('gage.inspectionTime')" />
</el-form-item>
<el-form-item prop="calibrationUnit" :label="$t('gage.calibrationUnit')">
<el-input v-model="dataForm.calibrationUnit" :placeholder="$t('gage.calibrationUnit')">
</el-input>
</el-form-item>
<el-form-item prop="calibrationDepartment" :label="$t('gage.calibrationDepartment')">
<el-input v-model="dataForm.calibrationDepartment" :placeholder="$t('gage.calibrationDepartment')">
</el-input>
</el-form-item>
<el-form-item prop="checker" :label="$t('gage.checker')">
<el-select v-model="dataForm.checker" :placeholder="$t('gage.checker')">
<el-option v-for="item in checkerList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="verificationResult" :label="$t('gage.verificationResult')">
<el-input v-model="dataForm.verificationResult" :placeholder="$t('gage.verificationResult')">
</el-input>
</el-form-item>
<el-form-item prop="remark" :label="$t('gage.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
</el-input>
</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: "/gage/qmsGageVerification",
infoURL: "/gage/qmsGageVerification/{ id }",
getGageListURL: '/gage/qmsGage/page',
getUserListURL: '/sys/user/page'
},
gageList: [],
checkerList:[],
gageTypeList: [],
measureList: [
{
id: 0,
name: 'a'
},
{
id: 1,
name: 'b'
},
{
id: 2,
name: 'c'
}
],
departmentList: [],
parameterList: [
{
id: 0,
name: '基准'
},
{
id: 1,
name: '校验'
},
],
listQuery: {
limit: 999,
page: 1
},
visible: false,
dataForm: {
batchNumber:null,
gageId: null,
gageResumeId: null,
id: null,
measuringToolAccuracy: null,
parameter: null,
price: null,
remark: 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.getData();
},
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()
}
});
},
getData() {
this.$http
.get(this.urlOptions.getGageListURL, {
params:this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserListURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.checkerList = res.data.list
}
})
.catch(() => {
})
},
// 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(`/gage/qmsGageVerification/${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

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-10 15:54:33
* @LastEditTime: 2023-06-20 15:36:34
* @LastEditors: zhp
* @Description:
-->
@@ -42,6 +42,7 @@
</el-col>
</el-row>
</base-dialog>
<verify-show v-if="verifyShowVisible" ref="verifyShowOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
@@ -49,6 +50,8 @@
<script>
import basicPage from "@/mixins/basic-page"
import gapeAdd from "./components/gage-add"
import verifyShow from "./components/verify-show"
// import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
@@ -149,15 +152,16 @@ const tableBtn = [
btnName: "删除",
},
{
type: "parameter",
btnName: "台差参数",
},
type: "verify",
btnName: "校验",
}
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageSearch,
gapeAdd
gapeAdd,
verifyShow
},
data() {
return {
@@ -168,6 +172,7 @@ export default {
},
tableProps,
tableBtn,
verifyShowVisible:false,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
@@ -260,40 +265,16 @@ 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);
});
} else if (val.type === 'parameter') {
this.$router.push({
name: 'gage-qmsGageTypeDifferenceParameter',
query: {
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 === 'verify') {
this.verifyShowVisible = true
this.$nextTick(() => {
this.$refs.verifyShowOrUpdate.init(val.data.id)
});
}
},
buttonClick(val) {

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-11 15:30:11
* @LastEditTime: 2023-06-21 16:52:20
* @LastEditors: zhp
* @Description:
-->
@@ -22,9 +22,8 @@
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gape-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
<gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gapeGrs-add>
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
@@ -42,122 +41,126 @@
</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>
<script>
import basicPage from "@/mixins/basic-page"
import gapeAdd from "./components/gage-add"
// import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
import gapeGrsAdd from "./components/gageGrs-add"
import gageSearch from "./components/gageSearch"
// import available from "./components/gageAvailable.vue"
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
const tableProps = [
{
prop: 'client',
label: i18n.t("gage.client"),
prop: 'itemNo',
label: i18n.t("gage.itemNo"),
align: 'center'
},
{
prop: 'certificateCode',
label: i18n.t("gage.certificateCode"),
prop: 'partName',
label: i18n.t("gage.partName"),
align: 'center'
},
{
prop: 'certificateCodeBh',
label: i18n.t("gage.certificateCodeBh"),
prop: 'gageName',
label: i18n.t("gage.gageName"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("gage.code"),
align: 'center'
},
{
prop: 'name',
label: i18n.t("gage.name"),
align: 'center'
},
{
prop: 'gageTypeName',
label: i18n.t("gage.gageTypeName"),
align: 'center'
},
{
prop: 'internalInspectionCycle',
label: i18n.t("gage.internalInspectionCycle"),
align: 'center'
},
{
prop: 'internalInspectionTime',
label: i18n.t("gage.internalInspectionTime"),
align: 'center'
},
{
prop: 'nextInternalInspectionTime',
label: i18n.t("gage.nextInternalInspectionTime"),
align: 'center'
},
{
prop: 'externalInspectionCycle',
label: i18n.t("gage.externalInspectionCycle"),
align: 'center'
},
{
prop: 'externalInspectionTime',
label: i18n.t("gage.externalInspectionTime"),
align: 'center'
},
{
prop: 'nextExternalInspectionTime',
label: i18n.t("gage.nextExternalInspectionTime"),
align: 'center'
},
{
prop: 'description',
label: i18n.t("gage.description"),
align: 'center'
},
{
prop: 'gageStatus',
label: i18n.t("gage.gageStatus"),
prop: 'specification',
label: i18n.t("gage.measuringToolSpecification"),
align: 'center'
},
// {
// prop: 'gageStatus',
// label: i18n.t("available"),
// subcomponent: available,
// prop: 'measurementTime',
// label: i18n.t("gage.measurementTime"),
// align: 'center'
// },
{
prop: 'belongPersonName',
label: i18n.t("gage.belongPersonName"),
align: 'center'
prop: 'measurementTime',
label: i18n.t("gage.measurementTime"),
align: 'center',
filter: timeFormatter,
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
btnName: i18n.t("edit"),
},
{
type: "delete",
btnName: "删除",
btnName: i18n.t("delete"),
},
{
type: "report",
btnName: i18n.t("gage.report"),
},
{
type: "parameter",
btnName: "台差参数",
btnName: i18n.t("parameter"),
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageSearch,
gapeAdd
gapeGrsAdd
},
computed: {
//因为数据用到了dataform中的数据所以写在了computed中
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 {
@@ -166,7 +169,9 @@ export default {
deleteURL: "/gage/qmsGageGrr",
exportUrl: '/gage/qmsGageGrr/export'
},
dialogTableVisible:false,
tableProps,
dataForm: {},
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@@ -205,6 +210,31 @@ export default {
// AddOrUpdate,
// },
methods: {
columnStyle({ row, column, rowIndex, columnIndex }) {
console.log(rowIndex)
if (columnIndex == 0 || columnIndex == 2 || columnIndex == 4) {
//第三第四列的背景色就改变了2和3都是列数的下标
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;
@@ -260,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);
});
@@ -271,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-10 16:20:50
* @LastEditTime: 2023-06-20 15:36:23
* @LastEditors: zhp
* @Description:
-->
@@ -29,30 +29,34 @@
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<gageResume-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</gageResume-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>
</gageResume-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>
<parameter-show v-if="showParameterVisible" ref="showParameterOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import parameterShow from './components/parameter-show'
import qmsGageResumeAdd from "./components/qmsGageResume-add"
// import gage from '@/filters/gage'
import { timeFormatter } from '@/filters'
import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
import gageResumeSearch from "./components/gageResumeSearch"
// import available from "./components/available.vue"
@@ -72,7 +76,8 @@ const tableProps = [
{
prop: 'measurToolEvent',
label: i18n.t("gage.measurToolEvent"),
align: 'center'
align: 'center',
filter: gage('eventList')
},
{
prop: 'createDate',
@@ -119,13 +124,24 @@ const tableBtn = [
{
type: "parameter",
btnName: "台差参数",
showParam: {
type: '&',
data: [
{
name: 'measurToolEvent',
type: 'equal',
value: 5
}
]
}
}
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageResumeSearch,
qmsGageResumeAdd
qmsGageResumeAdd,
parameterShow
},
data() {
return {
@@ -136,18 +152,10 @@ export default {
},
tableProps,
tableBtn,
showParameterVisible:false,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('add'),
@@ -222,10 +230,17 @@ 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);
});
} else if (val.type === 'parameter') {
this.showParameterVisible = true
this.$nextTick(() => {
console.log(Object.prototype.toString.call(val.data.id) )
this.$refs.showParameterOrUpdate.init(val.data.id)
})
}
},
buttonClick(val) {

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 15:47:41
* @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-09 15:47:26
* @LastEditTime: 2023-06-20 15:36:15
* @LastEditors: zhp
* @Description:
-->
@@ -22,8 +22,8 @@
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gageType-add>
<gageTypeDifferenceParameter-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gageTypeDifferenceParameter-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@@ -48,7 +48,7 @@
<script>
import basicPage from "@/mixins/basic-page"
import gageTypeAdd from "./components/gageType-add"
import gageTypeDifferenceParameterAdd from "./components/gageTypeDifferenceParameter-add"
// import gage from '@/filters/gage'
import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
@@ -104,16 +104,20 @@ export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
gageTypeAdd
gageTypeDifferenceParameterAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
deleteURL: "/gage/qmsGageTypeDifferenceParameter",
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
tableProps,
listQuery: {
limit: 10,
page: 1,
gageTypeId: this.$route.query.gageTypeId ? this.$route.query.gageTypeId : null
},
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@@ -145,12 +149,12 @@ export default {
// components: {
// AddOrUpdate,
// },
mounted() {
if (this.$route.query) {
this.listQuery.gageTypeId = this.$route.query.gageTypeId
this.getDataList()
}
},
// mounted() {
// if (this.$route.query) {
// this.listQuery.gageTypeId = this.$route.query.gageTypeId
// this.getDataList()
// }
// },
methods: {
//search-bar点击
handleProductCancel() {
@@ -202,12 +206,33 @@ 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);
});
}
},
getDataList() {
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getDataListURL, {
params: 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) {
switch (val.btnName) {
case "search":
@@ -218,7 +243,7 @@ export default {
case "export":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
this.exportHandl();
this.exportHandle();
break;
case "add":
this.addOrEditTitle = '新增'

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

@@ -0,0 +1,341 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-12 13:49:44
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar>
</div>
<el-divider> {{ $t('gage.singleValueAnalysis') }} </el-divider>
<div id="priceMain" :style="{width: '100%', height: '500px'}" />
<el-divider> {{ $t('gage.stageDifferenceMeanAnalysis') }} </el-divider>
<div id="averageStationDifferenceMapMain" :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 {
averageStationDifferenceMapBatchTail: null,
averageStationDifferenceMapChecksums: null,
averageStationDifferenceMapDifference: null,
averageStationDifferenceMapReference: null,
priceBatchTailArr: null,
priceChecksumsArr: null,
priceDifferenceArr: null,
priceReferenceArr: null,
myChart:null,
urlOptions: {
getDataListURL: "/gage/qmsStationDeviationAnalysis/analzy",
getGageURL: "/gage/qmsGage/page",
getGageTypeURL: "/gage/qmsGageType/page",
},
listQuery: {
pageId: `1`,
batchNumber:null,
endTime: null,
gageTypeId: null,
parameter: null,
startTime: null,
},
formConfig: [
{
type: 'select',
label: i18n.t('gage.gageTypeName'),
selectOptions: [],
param: 'gageTypeId',
clearable: true,
filterable: true
},
{
type: 'select',
label: i18n.t('gage.gageName'),
selectOptions: [],
param: 'gageId',
clearable: true,
filterable: true,
},
{
type: 'select',
label: i18n.t('gage.analysisParameter'),
selectOptions: [],
param: 'parameter',
selectOptions: [
{
id: 0,
name: '基准'
},
{
id: 0,
name: '否'
},
{
id: 1,
name: '是'
}
],
clearable: true,
filterable: true,
},
{
type: 'input',
label: i18n.t('gage.batchTail'),
placeholder: i18n.t('gage.batchTail'),
param: 'batchNumber'
},
{
type: 'datePicker',
label: i18n.t('gage.inspectionTime'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
mounted () {
this.getData()
this.getDict()
},
methods: {
getDict() {
this.$http
.get(this.urlOptions.getGageURL, {
params: {
limit: 999,
page:1
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.formConfig[1].selectOptions = res.data.list
}
})
this.$http
.get(this.urlOptions.getGageTypeURL, {
params: {
limit: 999,
page: 1
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.formConfig[0].selectOptions = res.data.list
}
})
},
getData() {
this.$http
.get(this.urlOptions.getDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code === 0) {
let averageStationDifferenceMapBatchTail = []
let averageStationDifferenceMapChecksums = []
let averageStationDifferenceMapDifference = []
let averageStationDifferenceMapReference = []
let priceBatchTailArr = []
let priceChecksumsArr = []
let priceDifferenceArr = []
let priceReferenceArr = []
for (let i in res.data.averageStationDifferenceMap) {
averageStationDifferenceMapBatchTail.push(i)
averageStationDifferenceMapChecksums.push(res.data.averageStationDifferenceMap[i].checksums)
averageStationDifferenceMapDifference.push(res.data.averageStationDifferenceMap[i].difference)
averageStationDifferenceMapReference.push(res.data.averageStationDifferenceMap[i].reference)
}
for (let i in res.data.price) {
res.data.price[i].forEach(ele => {
priceBatchTailArr.push(i + '_' + ele.batchTail)
priceChecksumsArr.push(ele.checksums)
priceDifferenceArr.push(ele.difference)
priceReferenceArr.push(ele.reference)
})
}
this.averageStationDifferenceMapBatchTail = averageStationDifferenceMapBatchTail
this.averageStationDifferenceMapChecksums = averageStationDifferenceMapChecksums
this.averageStationDifferenceMapDifference = averageStationDifferenceMapDifference
this.averageStationDifferenceMapReference = averageStationDifferenceMapReference
this.priceBatchTailArr = priceBatchTailArr
this.priceChecksumsArr = priceChecksumsArr
this.priceDifferenceArr = priceDifferenceArr
this.priceReferenceArr = priceReferenceArr
this.priceLineCharts()
this.averageStationDifferenceMapLineCharts()
}
})
},
priceLineCharts() {
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: i18n.t('gage.contrastiveAnalysis')
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['大流量(基准)', '大流量(校验)', '大流量(台差)']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: this.priceBatchTailArr,
type: 'category',
axisLabel: {
clickable: true
},
silent: false,
triggerEvent: true
},
yAxis: {
type: 'value'
},
series: [
{
name: '大流量(基准)',
type: 'line',
stack: 'Total',
data: this.priceReferenceArr
},
{
name: '大流量(校验)',
type: 'line',
stack: 'Total',
data: this.priceChecksumsArr
},
{
name: '大流量(台差)',
type: 'line',
stack: 'Total',
data: this.priceDifferenceArr
},
]
};
option && myChart.setOption(option);
},
averageStationDifferenceMapLineCharts() {
var chartDom = document.getElementById('averageStationDifferenceMapMain');
var myChart = echarts.init(chartDom);
var option;
option = {
title: {
text: i18n.t('gage.contrastiveAnalysis')
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['大流量(基准)', '大流量(校验)', '大流量(台差)']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.averageStationDifferenceMapBatchTail
},
yAxis: {
type: 'value'
},
series: [
{
name: '大流量(基准)',
type: 'line',
stack: 'Total',
data: this.averageStationDifferenceMapReference
},
{
name: '大流量(校验)',
type: 'line',
stack: 'Total',
data: this.averageStationDifferenceMapChecksums
},
{
name: '大流量(台差)',
type: 'line',
stack: 'Total',
data: this.averageStationDifferenceMapDifference
},
]
};
option && myChart.setOption(option);
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.listQuery.batchNumber = val.batchNumber ? val.batchNumber : null
this.listQuery.gageId = val.gageId ? val.gageId : null
this.listQuery.gageTypeId = val.gageTypeId ? val.gageTypeId : null
this.listQuery.parameter = val.parameter ? val.parameter :null
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
this.listQuery.page = 1
this.getDataList();
break;
case "export":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
this.exportHandle();
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: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', // axis显示该列下所有坐标轴对应数据item只显示该点数据
// 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,5 +1,4 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="beanName" :label="$t('schedule.beanName')">
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
@@ -17,20 +16,21 @@
<el-input v-model="dataForm.remark" :placeholder="$t('schedule.remark')"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
<script>
import basicAdd from '@/mixins/basic-add'
import debounce from 'lodash/debounce'
import { cron } from 'vue-cron'
export default {
export default {
mixins: [basicAdd],
data () {
return {
visible: false,
visible: false,
urlOptions: {
submitURL: '/sys/schedule/',
infoURL: '/sys/schedule'
},
dataForm: {
id: '',
beanName: '',
@@ -57,8 +57,9 @@ export default {
}
}
},
methods: {
init () {
methods: {
init (id) {
this.dataForm.id = id || "";
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@@ -94,8 +95,8 @@ export default {
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
this.visible = false
this.$emit('successSubmit')
}
})
}).catch(() => {})

View File

@@ -1,71 +1,39 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-job__schedule">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@selection-change="dataListSelectionChangeHandle"
@sort-change="dataListSortChangeHandle"
style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
<el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
<el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
<el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
<el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
<el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
<el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
<el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
<el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="200"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
</base-dialog>
<!-- 弹窗, 日志列表 -->
<log v-if="logVisible" ref="log"></log>
</div>
@@ -73,124 +41,255 @@
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './schedule-add-or-update'
import Log from './schedule-log'
import basicPage from "@/mixins/basic-page";
import AddOrUpdate from "./schedule-add-or-update";
import Log from "./schedule-log";
import i18n from "@/i18n";
import sysFilter from "@/filters/sys-filter";
const tableProps = [
{
prop: "beanName",
label: i18n.t("schedule.beanName"),
},
{
prop: "params",
label: i18n.t("schedule.params"),
},
{
prop: "cronExpression",
label: i18n.t("schedule.cronExpression"),
},
{
prop: "remark",
label: i18n.t("schedule.remark"),
},
{
prop: "status",
label: i18n.t("schedule.status"),
filter: sysFilter("scheduleStatus"),
},
];
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "pause",
btnName: "暂停",
},
{
type: "restore",
btnName: "恢复",
},
{
type: "run",
btnName: "执行",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [mixinViewModule],
data () {
mixins: [basicPage],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/schedule/page',
getDataListIsPage: true,
deleteURL: '/sys/schedule',
deleteIsBatch: true
urlOptions: {
getDataListURL: "/sys/schedule/page",
deleteURL: "/sys/schedule",
},
dataForm: {
beanName: ''
beanName: "",
},
logVisible: false
}
tableProps,
tableBtn,
addDeleteURL: true,
logVisible: false,
formConfig: [
{
type: "input",
label: i18n.t("schedule.beanName"),
placeholder: i18n.t("schedule.beanName"),
param: "beanName",
},
{
type: "button",
btnName: "查询",
name: "search",
color: "primary",
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
plain: true,
},
{
type: "button",
btnName: "日志",
name: "log",
color: "success",
},
],
};
},
components: {
AddOrUpdate,
Log
Log,
},
methods: {
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.beanName = val.beanName;
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case "log":
this.logHandle();
break;
default:
console.log(val);
}
},
btnFun(val) {
if (val.type === "pause") {
this.pauseHandle(val.data.id);
} else if (val.type === "restore") {
this.resumeHandle(val.data.id);
} else {
this.runHandle(val.data.id);
}
},
// 暂停
pauseHandle (id) {
pauseHandle(id) {
if (!id && this.dataListSelections.length <= 0) {
return this.$message({
message: this.$t('prompt.deleteBatch'),
type: 'warning',
duration: 500
})
message: this.$t("prompt.deleteBatch"),
type: "warning",
duration: 500,
});
}
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.put('/sys/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).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()
}
})
}).catch(() => {})
}).catch(() => {})
this.$confirm(
this.$t("prompt.info", { handle: this.$t("schedule.pause") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
this.$http
.put("/sys/schedule/pause", id ? [id] : this.dataListSelections.map((item) => item.id))
.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();
},
});
})
.catch(() => {});
})
.catch(() => {});
},
// 恢复
resumeHandle (id) {
resumeHandle(id) {
if (!id && this.dataListSelections.length <= 0) {
return this.$message({
message: this.$t('prompt.deleteBatch'),
type: 'warning',
duration: 500
})
message: this.$t("prompt.deleteBatch"),
type: "warning",
duration: 500,
});
}
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.put('/sys/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).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()
}
})
}).catch(() => {})
}).catch(() => {})
this.$confirm(
this.$t("prompt.info", { handle: this.$t("schedule.resume") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
this.$http
.put("/sys/schedule/resume", id ? [id] : this.dataListSelections.map((item) => item.id))
.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();
},
});
})
.catch(() => {});
})
.catch(() => {});
},
// 执行
runHandle (id) {
runHandle(id) {
if (!id && this.dataListSelections.length <= 0) {
return this.$message({
message: this.$t('prompt.deleteBatch'),
type: 'warning',
duration: 500
})
message: this.$t("prompt.deleteBatch"),
type: "warning",
duration: 500,
});
}
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.put('/sys/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).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()
}
})
}).catch(() => {})
}).catch(() => {})
this.$confirm(
this.$t("prompt.info", { handle: this.$t("schedule.run") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
this.$http
.put("/sys/schedule/run", id ? [id] : this.dataListSelections.map((item) => item.id))
.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();
},
});
})
.catch(() => {});
})
.catch(() => {});
},
// 日志列表
logHandle () {
this.logVisible = true
logHandle() {
this.logVisible = true;
this.$nextTick(() => {
this.$refs.log.init()
})
}
}
}
this.$refs.log.init();
});
},
},
};
</script>

View File

@@ -0,0 +1,49 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-05-15 14:28:35
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-button type="text" @click="getExperienceDetail">{{ $t('oss.type1') }}} </el-button>
</span>
</template>
<script>
import i18n from "@/i18n"
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
methods: {
getExperienceDetail() {
this.$router.push({
name: 'laboratory-qmsLaboratoryTrainExperience',
query: {
laboratoryTesterId: this.injectData.userId
}
})
}
// 子级
// 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,56 @@
<!--
* @Author: zhp
* @Date: 2023-05-15 14:27:30
* @LastEditTime: 2023-05-15 14:27:31
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zhp
* @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-05-15 14:09:30
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button>
</span>
</template>
<script>
import i18n from "@/i18n"
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
methods: {
getInspectionDetail() {
this.$router.push({
name: 'laboratory-qmsLaboratoryTesterInspectionQualification',
query: {
laboratoryTesterId: this.injectData.userId
}
})
}
// 子级
// 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,49 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-05-15 14:09:30
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button>
</span>
</template>
<script>
import i18n from "@/i18n"
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
methods: {
getInspectionDetail() {
this.$router.push({
name: 'laboratory-qmsLaboratoryTesterInspectionQualification',
query: {
laboratoryTesterId: this.injectData.userId
}
})
}
// 子级
// 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,229 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-15 14:35:31
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="department" :label="$t('laboratory.department')">
<el-input v-model="dataForm.department" :placeholder="$t('laboratory.department')">
</el-input>
</el-form-item>
<el-form-item prop="position" :label="$t('laboratory.position')">
<el-input v-model="dataForm.position" :placeholder="$t('laboratory.position')">
</el-input>
</el-form-item>
<el-form-item prop="responsibilitie" :label="$t('laboratory.responsibilitie')">
<el-input v-model="dataForm.responsibilitie" :placeholder="$t('laboratory.responsibilitie')">
</el-input>
</el-form-item>
<el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</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: "/gage/qmsLaboratoryEmployeeResume",
infoURL: "/gage/qmsLaboratoryEmployeeResume/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page'
// getTeamListURL: '/basic/qmsTeam/gape',
// getProductURL: '/basic/qmsProduct/gape',
// getSupplierListURL: '/supplier/qmsSupplier/gape'
},
gageList: [],
userList:[],
departmentList: [],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
],
listQuery: {
limit: 999,
gape: 1
},
eventList: [
{
id: 0,
name: '领用'
},
{
id: 1,
name: '归还'
},
{
id: 2,
name: '量具报废'
},
{
id: 3,
name: '量具维修'
},
{
id: 4,
name: '量具购买'
},
],
visible: false,
dataForm: {
department:null,
endDate: null,
id: null,
laboratoryTesterId: null,
position: null,
remark: null,
responsibilitie: null,
startDate: null,
id: null,
laboratoryTesterId: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.getData();
},
methods: {
init(data) {
this.dataForm.id = data.id ? data.id : ''
this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
// 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()
}
});
},
getData() {
this.$http
.get(this.urlOptions.getUserList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.userList = res.data.list
}
})
.catch(() => {
});
this.$http
.get(this.urlOptions.dictionaryDetailList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.departmentList = res.data.list
}
})
.catch(() => {
})
},
// 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(`/gage/qmsLaboratoryEmployeeResume/${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,222 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-12 16:45:00
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="userId" :label="$t('laboratory.userName')">
<el-select v-model="dataForm.userId" :placeholder="$t('laboratory.userName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="remark" :label="$t('laboratory.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('laboratory.remark')">
</el-input>
</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: "/laboratory/qmsLaboratoryTester",
infoURL: "/laboratory/qmsLaboratoryTester/{ id }",
getUserList: '/sys/user/page'
},
gageList: [],
userList: [],
gageTypeList:[],
departmentList: [],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
],
listQuery: {
limit: 999,
gape: 1
},
gageStatusList: [
{
id: 0,
name:'在用'
},
{
id: 1,
name: '备用'
},
{
id: 2,
name: '停用'
},
{
id: 3,
name: '封存'
},
{
id: 4,
name: '报废'
},
{
id: 5,
name: '降级使用'
}
],
certificateTypeList: [
{
id: 0,
name: '检定证书'
},
{
id: 1,
name: '校准证书'
},
{
id: 2,
name: '检测报告'
},
{
id: 3,
name: '自校报告'
}
],
visible: false,
dataForm: {
id: 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.getData();
},
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()
}
});
},
getData() {
this.$http
.get(this.urlOptions.getUserList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.userList = res.data.list
}
})
.catch(() => {
})
},
// 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(`/laboratory/qmsLaboratoryTester/${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,202 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-15 14:24:05
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="code" :label="$t('laboratory.code')">
<el-input v-model="dataForm.code" :placeholder="$t('laboratory.code')">
</el-input>
</el-form-item>
<el-form-item prop="name" :label="$t('laboratory.name')">
<el-input v-model="dataForm.name" :placeholder="$t('laboratory.name')">
</el-input>
</el-form-item>
<el-form-item prop="getDate" :label="$t('laboratory.getDate')">
<el-date-picker v-model="dataForm.getDate" type="datetime" :placeholder="$t('laboratory.getDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="validDate" :label="$t('laboratory.validDate')">
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('laboratory.validDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="qualificationDescription" :label="$t('laboratory.qualificationDescription')">
<el-input v-model="dataForm.qualificationDescription" :placeholder="$t('laboratory.qualificationDescription')">
</el-input>
</el-form-item>
<el-form-item prop="remark" :label="$t('laboratory.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('laboratory.remark')">
</el-input>
</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: "/laboratory/qmsLaboratoryTesterInspectionQualification",
infoURL: "/laboratory/qmsLaboratoryTesterInspectionQualification/{ id }",
// getGageListURL: '/gage/qmsGage/page',
// getTeamListURL: '/basic/qmsTeam/gape',
// getProductURL: '/basic/qmsProduct/gape',
// getSupplierListURL: '/supplier/qmsSupplier/gape'
},
gageList:[],
// supplierList:[],
// productList:[],
// typeList: [],
// teamList:[],
listQuery: {
limit: 999,
gape: 1
},
visible: false,
dataForm: {
laboratoryTesterId:null,
code:null,
getDate: null,
id: null,
laboratoryTesterId: null,
name: null,
qualificationDescription: null,
remark: null,
validDate: 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.getData();
},
methods: {
init(data) {
this.dataForm.id = data.id ? data.id: ''
this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
// 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()
}
});
},
getData() {
// this.$http
// .get(this.urlOptions.getTypeListURL, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.typeList = res.data.list
// }
// })
// .catch(() => {
// });
this.$http
.get(this.urlOptions.getGageListURL, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageList = res.data.list
}
})
.catch(() => {
})
},
// 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(`/laboratory/qmsLaboratoryTesterInspectionQualification/${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,197 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-15 14:30:34
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="title" :label="$t('laboratory.title')">
<el-input v-model="dataForm.title" :placeholder="$t('laboratory.title')">
</el-input>
</el-form-item>
<el-form-item prop="trainContent" :label="$t('laboratory.trainContent')">
<el-input v-model="dataForm.trainContent" :placeholder="$t('laboratory.trainContent')">
</el-input>
</el-form-item>
<el-form-item prop="trainDuration" :label="$t('laboratory.trainDuration')">
<el-input v-model="dataForm.trainDuration" :placeholder="$t('laboratory.trainDuration')">
</el-input>
</el-form-item>
<el-form-item prop="trainType" :label="$t('laboratory.trainType')">
<el-input v-model="dataForm.trainType" :placeholder="$t('laboratory.trainType')">
</el-input>
</el-form-item>
<el-form-item prop="result" :label="$t('laboratory.result')">
<el-input v-model="dataForm.result" :placeholder="$t('laboratory.result')">
</el-input>
</el-form-item>
<el-form-item prop="trainDate" :label="$t('laboratory.trainDate')">
<el-date-picker v-model="dataForm.trainDate" type="datetime" :placeholder="$t('laboratory.trainDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</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: "/laboratory/qmsLaboratoryTrainExperience",
infoURL: "/laboratory/qmsLaboratoryTrainExperience/{ id }",
},
gageList: [],
userList: [],
customerList:[],
gageTypeList:[],
departmentList: [],
listQuery: {
limit: 999,
page: 1
},
visible: false,
dataForm: {
id: null,
laboratoryTesterId:null,
result: null,
title: null,
trainContent: null,
trainDate: null,
trainDuration: null,
trainType: 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.getData();
// },
methods: {
init(data) {
this.dataForm.id = data.id ? data.id : ''
this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
// 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()
}
});
},
// getData() {
// this.$http.get(this.urlOptions.getGageList, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data)
// this.gageList = res.data.list
// }
// })
// .catch(() => {
// })
// this.$http
// .get(this.urlOptions.getUserList, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.userList = res.data.list
// }
// })
// .catch(() => {
// })
// },
// 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(`/laboratory/qmsLaboratoryTrainExperience/${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>

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