提交代码

This commit is contained in:
unknown
2023-05-11 16:22:07 +08:00
parent 309b4e2fb6
commit fcd9576fd9
128 changed files with 20369 additions and 157 deletions

View File

@@ -0,0 +1,157 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-04 16:17:23
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="inspectionPositionCode" :label="$t('basic.code')">
<el-input v-model="dataForm.inspectionPositionCode" :placeholder="$t('basic.code')">
</el-input>
</el-form-item>
<el-form-item prop="inspectionPositionName" :label="$t('basic.name')">
<el-input v-model="dataForm.inspectionPositionName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="inspectionPositionNumber" :label="$t('quality.inspectionPositionNumber')">
<el-input v-model="dataForm.inspectionPositionNumber" :placeholder="$t('quality.inspectionPositionNumber')">
</el-input>
</el-form-item>
<!-- <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
<el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :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: "/quality/qmsInspectionPosition",
infoURL: "/quality/qmsInspectionPosition"
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: null,
inspectionPositionNumber: null,
inspectionPositionName:null,
inspectionPositionCode: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(`/quality/qmsDisposalMethod/${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,41 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-04 16:04:41
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag v-if="injectData.disposalMethodStatus === 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,230 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-04 13:57:52
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="customSamplingCode" :label="$t('basic.code')">
<el-input v-model="dataForm.customSamplingCode" :placeholder="$t('basic.code')">
</el-input>
</el-form-item>
<el-form-item prop="customSamplingName" :label="$t('basic.name')">
<el-input v-model="dataForm.customSamplingName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="planCategory" :label="$t('quality.planCategory')">
<el-input v-model="dataForm.planCategory" :placeholder="$t('quality.planCategory')"></el-input>
</el-form-item>
<el-form-item prop="criticalAcceptable" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.acceptable')])">
<el-input v-model="dataForm.criticalAcceptable"
:placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.acceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="criticalSampleSize" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.sampleSize')])">
<el-input v-model="dataForm.criticalSampleSize"
:placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.sampleSize')])">
</el-input>
</el-form-item>
<el-form-item prop="criticalUnacceptable" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.unacceptable')])">
<el-input v-model="dataForm.criticalUnacceptable"
:placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.unacceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="seriousDisadvantageAcceptable"
:label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.acceptable')])">
<el-input v-model="dataForm.seriousDisadvantageAcceptable"
:placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.acceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="seriousDisadvantageSampleSize"
:label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.sampleSize')])">
<el-input v-model="dataForm.seriousDisadvantageSampleSize"
:placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.sampleSize')])">
</el-input>
</el-form-item>
<el-form-item prop="seriousDisadvantageUnacceptable"
:label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.unacceptable')])">
<el-input v-model="dataForm.seriousDisadvantageUnacceptable"
:placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.unacceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="minorAcceptable" :label="$i18nForm([$t('quality.minor'), $t('quality.acceptable')])">
<el-input v-model="dataForm.minorAcceptable"
:placeholder="$i18nForm([$t('quality.minor'), $t('quality.acceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="minorSampleSize" :label="$i18nForm([$t('quality.minor'), $t('quality.sampleSize')])">
<el-input v-model="dataForm.minorSampleSize"
:placeholder="$i18nForm([$t('quality.minor'), $t('quality.sampleSize')])">
</el-input>
</el-form-item>
<el-form-item prop="minorUnacceptable" :label="$i18nForm([$t('quality.minor'), $t('quality.unacceptable')])">
<el-input v-model="dataForm.minorUnacceptable"
:placeholder="$i18nForm([$t('quality.minor'), $t('quality.unacceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="totalAcceptable" :label="$i18nForm([$t('quality.total'), $t('quality.acceptable')])">
<el-input v-model="dataForm.totalAcceptable"
:placeholder="$i18nForm([$t('quality.total'), $t('quality.acceptable')])">
</el-input>
</el-form-item>
<el-form-item prop="totalUnacceptable" :label="$i18nForm([$t('quality.total'), $t('quality.unacceptable')])">
<el-input v-model="dataForm.totalUnacceptable"
:placeholder="$i18nForm([$t('quality.total'), $t('quality.unacceptable')])">
</el-input>
</el-form-item>
<!-- <el-form-item prop="criticalSampleSize" :label="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
<el-input v-model="dataForm.criticalSampleSize"
:placeholder="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
</el-input>
</el-form-item>
<el-form-item prop="criticalUnacceptable" :label="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
<el-input v-model="dataForm.criticalUnacceptable"
:placeholder="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
</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: "/quality/qmsCustomSampling",
infoURL: "/quality/qmsCustomSampling/{id}",
getCodeURL: '/quality/qmsCustomSampling/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: null,
planCategory:null,
customSamplingCode:null,
customSamplingName:null,
criticalUnacceptable: null,
criticalAcceptable: null,
criticalSampleSize: null,
minorAcceptable:null,
minorSampleSize:null,
minorUnacceptable:null,
seriousDisadvantageAcceptable:null,
seriousDisadvantageSampleSize:null,
seriousDisadvantageUnacceptable:null,
totalAcceptable:null,
totalUnacceptable: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(`/quality/qmsCustomSampling/${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,141 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-04-04 14:27:18
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="customSamplingCode" :label="$t('basic.code')">
<el-input v-model="dataForm.customSamplingCode" :placeholder="$t('basic.code')"></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: "/sys/params/",
// infoURL: "/sys/params",
// },
urlOptions: {
getCustomerPageListURL: "/quality/qmsTransferScheme/page"
},
visible: false,
customerTypeList:{},
dataForm: {
customSamplingCode: null
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
methods: {
// 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(() => {});
// },
// 表单提交
// getDict() {
// this.$http
// .get(this.urlOptions.getCustomerPageListURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// this.dataListLoading = false;
// if (res.code !== 0) {
// this.customerTypeList = res.data
// }
// })
// },
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,157 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-04 16:18:38
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="disposalMethodName" :label="$t('quality.disposalMethodName')">
<el-input v-model="dataForm.disposalMethodName" :placeholder="$t('quality.disposalMethodName')">
</el-input>
</el-form-item>
<el-form-item prop="disposalMethodCode" :label="$t('quality.disposalMethodCode')">
<el-input v-model="dataForm.disposalMethodCode" :placeholder="$t('quality.disposalMethodCode')"></el-input>
</el-form-item>
<el-form-item prop="judgmentMark" :label="$t('quality.judgmentMark')">
<el-input v-model="dataForm.judgmentMark" :placeholder="$t('quality.judgmentMark')"></el-input>
</el-form-item>
<!-- <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
<el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :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: "/quality/qmsDisposalMethod",
infoURL: "/quality/qmsDisposalMethod"
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: null,
disposalMethodName: null,
disposalMethodCode:null,
judgmentMark:null,
disposalMethodStatus: 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(`/quality/qmsDisposalMethod/${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,145 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-04-04 16:20:32
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
<el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :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: "/sys/params/",
// infoURL: "/sys/params",
// },
urlOptions: {
getCustomerPageListURL: "/quality/qmsTransferScheme/page"
},
visible: false,
customerTypeList:{},
dataForm: {
disposalMethodStatus: null
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
methods: {
// 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(() => {});
// },
// 表单提交
// getDict() {
// this.$http
// .get(this.urlOptions.getCustomerPageListURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// this.dataListLoading = false;
// if (res.code !== 0) {
// this.customerTypeList = res.data
// }
// })
// },
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,216 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-04 15:44:45
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="sampleRange" :label="$t('quality.sampleRange')">
<el-input v-model="dataForm.sampleRange" :placeholder="$t('quality.sampleRange')">
</el-input>
</el-form-item>
<el-form-item prop="fourPointZero" :label="$t('quality.fourPointZero')">
<el-input v-model="dataForm.fourPointZero" :placeholder="$t('quality.fourPointZero')"></el-input>
</el-form-item>
<el-form-item prop="onePointFive" :label="$t('quality.onePointFive')">
<el-input v-model="dataForm.onePointFive" :placeholder="$t('quality.onePointFive')"></el-input>
</el-form-item>
<el-form-item prop="onePointZero" :label="$t('quality.onePointZero')">
<el-input v-model="dataForm.onePointZero" :placeholder="$t('quality.onePointZero')"></el-input>
</el-form-item>
<el-form-item prop="sixPointFive" :label="$t('quality.sixPointFive')">
<el-input v-model="dataForm.sixPointFive" :placeholder="$t('quality.sixPointFive')"></el-input>
</el-form-item>
<el-form-item prop="ten" :label="$t('quality.ten')">
<el-input v-model="dataForm.ten" :placeholder="$t('quality.ten')"></el-input>
</el-form-item>
<el-form-item prop="twoPointFive" :label="$t('quality.twoPointFive')">
<el-input v-model="dataForm.twoPointFive" :placeholder="$t('quality.twoPointFive')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointFour" :label="$t('quality.zeroPointFour')">
<el-input v-model="dataForm.zeroPointFour" :placeholder="$t('quality.zeroPointFour')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointOne" :label="$t('quality.zeroPointOne')">
<el-input v-model="dataForm.zeroPointOne" :placeholder="$t('quality.zeroPointOne')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointOneFive" :label="$t('quality.zeroPointOneFive')">
<el-input v-model="dataForm.zeroPointOneFive" :placeholder="$t('quality.zeroPointOneFive')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointSixFive" :label="$t('quality.zeroPointSixFive')">
<el-input v-model="dataForm.zeroPointSixFive" :placeholder="$t('quality.zeroPointSixFive')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointTwoFive" :label="$t('quality.zeroPointTwoFive')">
<el-input v-model="dataForm.zeroPointTwoFive" :placeholder="$t('quality.zeroPointTwoFive')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointZeroFour" :label="$t('quality.zeroPointZeroFour')">
<el-input v-model="dataForm.zeroPointZeroFour" :placeholder="$t('quality.zeroPointZeroFour')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointZeroOne" :label="$t('quality.zeroPointZeroOne')">
<el-input v-model="dataForm.zeroPointZeroOne" :placeholder="$t('quality.zeroPointZeroOne')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointZeroOneFive" :label="$t('quality.zeroPointZeroOneFive')">
<el-input v-model="dataForm.zeroPointZeroOneFive" :placeholder="$t('quality.zeroPointZeroOneFive')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointZeroSixFive" :label="$t('quality.zeroPointZeroSixFive')">
<el-input v-model="dataForm.zeroPointZeroSixFive" :placeholder="$t('quality.zeroPointZeroSixFive')"></el-input>
</el-form-item>
<el-form-item prop="zeroPointZeroTwoFive" :label="$t('quality.zeroPointZeroTwoFive')">
<el-input v-model="dataForm.zeroPointZeroTwoFive" :placeholder="$t('quality.zeroPointZeroTwoFive')"></el-input>
</el-form-item>
<!-- <el-form-item prop="criticalSampleSize" :label="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
<el-input v-model="dataForm.criticalSampleSize"
:placeholder="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
</el-input>
</el-form-item>
<el-form-item prop="criticalUnacceptable" :label="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
<el-input v-model="dataForm.criticalUnacceptable"
:placeholder="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
</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: "/quality/qmsSamplingPlan",
infoURL: "/quality/qmsSamplingPlan/{id}"
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: null,
fourPointZero: null,
onePointFive:null,
onePointZero:null,
sampleRange: null,
sixPointFive: null,
ten: null,
twoPointFive: null,
zeroPointFour: null,
zeroPointOne: null,
zeroPointOneFive: null,
zeroPointSixFive: null,
zeroPointTwoFive: null,
zeroPointZeroFour: null,
zeroPointZeroOne: null,
zeroPointZeroOneFive: null,
zeroPointZeroSixFive: null,
zeroPointZeroTwoFive: 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(`/quality/qmsCustomSampling/${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,285 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-04 14:29:43
* @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">
<customSampling-add ref="addOrUpdate" @refreshDataList="successSubmit">
</customSampling-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">
<customSampling-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customSampling-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 customSamplingAdd from "./components/customSampling-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: 'customSamplingCode',
label: i18n.t("basic.code"),
align: 'center'
},
{
prop: 'planCategory',
label: i18n.t("quality.planCategory"),
align: 'center'
},
{
prop: 'fatalFlaw',
label: i18n.t("quality.fatalFlaw"),
align: 'center',
children: [
{
prop: 'criticalAcceptable',
label: i18n.t("quality.acceptable"),
},
{
prop: 'criticalSampleSize',
label: i18n.t("quality.sampleSize"),
},
{
prop: 'criticalUnacceptable',
label: i18n.t("quality.unacceptable"),
},
]
},
{
prop: 'seriousDisadvantage',
label: i18n.t("quality.seriousDisadvantage"),
align: 'center',
children: [
{
prop: 'seriousDisadvantageAcceptable',
label: i18n.t("quality.acceptable"),
align: 'center'
},
{
prop: 'seriousDisadvantageSampleSize',
label: i18n.t("quality.sampleSize"),
align: 'center',
},
{
prop: 'seriousDisadvantageUnacceptable',
label: i18n.t("quality.unacceptable"),
align: 'center'
},
]
},
{
prop: 'minor',
label: i18n.t("quality.minor"),
align: 'center',
children: [
{
prop: 'minorAcceptable',
label: i18n.t("quality.acceptable"),
align: 'center'
},
{
prop: 'minorSampleSize',
label: i18n.t("quality.sampleSize"),
align: 'center'
},
{
prop: 'minorUnacceptable',
label: i18n.t("quality.unacceptable"),
align: 'center'
},
]
},
{
prop: 'total',
label: i18n.t("quality.total"),
children: [
{
prop: 'totalAcceptable',
label: i18n.t("quality.acceptable"),
align: 'center'
},
{
prop: 'totalUnacceptable',
label: i18n.t("quality.unacceptable"),
align: 'center'
},
]
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
customSamplingSearch,
customSamplingAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/quality/qmsCustomSampling/page",
deleteURL: "/quality/qmsCustomSampling",
},
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.$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.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-04-04 16:21:38
* @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">
<disposalMethod-add ref="addOrUpdate" @refreshDataList="successSubmit">
</disposalMethod-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">
<disposalMethod-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></disposalMethod-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 disposalMethodAdd from "./components/disposalMethod-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: 'disposalMethodName',
label: i18n.t("quality.disposalMethodName"),
align: 'center'
},
{
prop: 'disposalMethodCode',
label: i18n.t("quality.disposalMethodCode"),
align: 'center'
},
{
prop: 'judgmentMark',
label: i18n.t("quality.judgmentMark"),
align: 'center'
},
{
prop: 'disposalMethodStatus',
label: i18n.t("quality.disposalMethodStatus"),
align: 'center',
subcomponent: available,
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
disposalMethodSearch,
disposalMethodAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/quality/qmsDisposalMethod/page",
deleteURL: "/quality/qmsDisposalMethod",
},
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.$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.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,206 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-04 16:15:42
* @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">
<InspectionPosition-add ref="addOrUpdate" @refreshDataList="successSubmit">
</InspectionPosition-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">
<!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-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 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: 'inspectionPositionName',
label: i18n.t("basic.name"),
align: 'center'
},
{
prop: 'inspectionPositionCode',
label: i18n.t("basic.code"),
align: 'center'
},
{
prop: 'inspectionPositionNumber',
label: i18n.t("quality.inspectionPositionNumber"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
InspectionPositionAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/quality/qmsInspectionPosition/page",
deleteURL: "/quality/qmsInspectionPosition",
},
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.code = dataForm.code
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.$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.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,276 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-04 15:54: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 :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">
<samplingPlan-add ref="addOrUpdate" @refreshDataList="successSubmit">
</samplingPlan-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">
<!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-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 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: 'sampleRange',
label: i18n.t("quality.sampleRange"),
align: 'center'
},
{
prop: 'fourPointZero',
label: i18n.t("quality.fourPointZero"),
align: 'center'
},
{
prop: 'onePointFive',
label: i18n.t("quality.onePointFive"),
align: 'center'
},
{
prop: 'onePointZero',
label: i18n.t("quality.onePointZero"),
align: 'center'
},
{
prop: 'sixPointFive',
label: i18n.t("quality.sixPointFive"),
align: 'center'
},
{
prop: 'ten',
label: i18n.t("quality.ten"),
align: 'center'
},
{
prop: 'twoPointFive',
label: i18n.t("quality.twoPointFive"),
align: 'center'
},
{
prop: 'zeroPointFour',
label: i18n.t("quality.zeroPointFour"),
align: 'center'
},
{
prop: 'zeroPointOne',
label: i18n.t("quality.zeroPointOne"),
align: 'center'
},
{
prop: 'zeroPointOneFive',
label: i18n.t("quality.zeroPointOneFive"),
align: 'center'
},
{
prop: 'zeroPointSixFive',
label: i18n.t("quality.zeroPointSixFive"),
align: 'center'
},
{
prop: 'zeroPointTwoFive',
label: i18n.t("quality.zeroPointTwoFive"),
align: 'center'
},
{
prop: 'zeroPointZeroFour',
label: i18n.t("quality.zeroPointZeroFour"),
align: 'center'
},
{
prop: 'zeroPointZeroOne',
label: i18n.t("quality.zeroPointZeroOne"),
align: 'center'
},
{
prop: 'zeroPointZeroOneFive',
label: i18n.t("quality.zeroPointZeroOneFive"),
align: 'center'
},
{
prop: 'zeroPointZeroSixFive',
label: i18n.t("quality.zeroPointZeroSixFive"),
align: 'center'
},
{
prop: 'zeroPointZeroTwoFive',
label: i18n.t("quality.zeroPointZeroTwoFive"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
samplingPlanAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/quality/qmsSamplingPlan/page",
deleteURL: "/quality/qmsSamplingPlan",
},
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.code = dataForm.code
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.$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.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,276 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-04 15:55: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 :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">
<samplingPlan-add ref="addOrUpdate" @refreshDataList="successSubmit">
</samplingPlan-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">
<!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-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 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: 'sampleRange',
label: i18n.t("quality.sampleRange"),
align: 'center'
},
{
prop: 'fourPointZero',
label: i18n.t("quality.fourPointZero"),
align: 'center'
},
{
prop: 'onePointFive',
label: i18n.t("quality.onePointFive"),
align: 'center'
},
{
prop: 'onePointZero',
label: i18n.t("quality.onePointZero"),
align: 'center'
},
{
prop: 'sixPointFive',
label: i18n.t("quality.sixPointFive"),
align: 'center'
},
{
prop: 'ten',
label: i18n.t("quality.ten"),
align: 'center'
},
{
prop: 'twoPointFive',
label: i18n.t("quality.twoPointFive"),
align: 'center'
},
{
prop: 'zeroPointFour',
label: i18n.t("quality.zeroPointFour"),
align: 'center'
},
{
prop: 'zeroPointOne',
label: i18n.t("quality.zeroPointOne"),
align: 'center'
},
{
prop: 'zeroPointOneFive',
label: i18n.t("quality.zeroPointOneFive"),
align: 'center'
},
{
prop: 'zeroPointSixFive',
label: i18n.t("quality.zeroPointSixFive"),
align: 'center'
},
{
prop: 'zeroPointTwoFive',
label: i18n.t("quality.zeroPointTwoFive"),
align: 'center'
},
{
prop: 'zeroPointZeroFour',
label: i18n.t("quality.zeroPointZeroFour"),
align: 'center'
},
{
prop: 'zeroPointZeroOne',
label: i18n.t("quality.zeroPointZeroOne"),
align: 'center'
},
{
prop: 'zeroPointZeroOneFive',
label: i18n.t("quality.zeroPointZeroOneFive"),
align: 'center'
},
{
prop: 'zeroPointZeroSixFive',
label: i18n.t("quality.zeroPointZeroSixFive"),
align: 'center'
},
{
prop: 'zeroPointZeroTwoFive',
label: i18n.t("quality.zeroPointZeroTwoFive"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
samplingPlanAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/quality/qmsTransferScheme/page",
deleteURL: "/quality/qmsTransferScheme",
},
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.code = dataForm.code
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.$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.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>