提交代码

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,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,167 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-03-29 09:09:20
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="controlCode" :label="$t('basic.code')">
<el-input v-model="dataForm.controlCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="specification" :label="$t('basic.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('basic.specification')"></el-input>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :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: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsControlMode/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: "",
controlCode:null,
controlName:null,
customerTypeStatus: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 () {
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
this.getControlCode()
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
}
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsControlMode/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {});
},
getControlCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.controlCode = 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: () => {
this.visible = false;
console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,126 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-02-15 15:18:01
* @Description:
-->
<template>
<el-form
:model="dataForm"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<el-form-item prop="key" :label="$t('basic.name')">
<el-input
v-model="dataForm.key"
:placeholder="$t('basic.name')"
clearable
></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",
// },
visible: false,
dataForm: {
key: "",
},
};
},
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(() => {});
// },
// 表单提交
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,179 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:58:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="customerCode" :label="$t('basic.code')">
<el-input v-model="dataForm.customerCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="customerName" :label="$t('basic.name')">
<el-input v-model="dataForm.customerName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="customerTypeId" :label="$t('basic.customerTypeName')">
<el-select v-model="dataForm.customerTypeId" :placeholder="$t('basic.customerTypeName')">
<el-option v-for="item in customerTypeList" :key="item.id" :label="item.customerTypeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :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: "/basic/qmsCustomer",
getCustomerPageListURL: "/basic/qmsCustomerType/page",
infoURL: "/basic/qmsCustomer/{id}",
getCodeURL: '/basic/qmsCustomer/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
listQuery: {
limit: 999,
page:1
},
visible: false,
customerTypeList:{},
dataForm: {
id: "",
customerCode: null,
customerName: null,
customerTypeId: null,
customerTypeStatus: 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 || "";
// this.dataForm.dictTypeId = dictTypeId || "";
this.$http
.get(this.urlOptions.getCustomerPageListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
console.log(res.data.list);
this.customerTypeList = res.data.list
}
})
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
// console.log(1111);
this.getInfo();
} else {
this.getCode()
}
});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.customerCode = res.data
}
})
.catch(() => {
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsCustomer/${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: () => {
this.visible = false;
console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => { });
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,165 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-02-20 08:52:46
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<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-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="customerTypeId" :label="$t('basic.customerTypeName')">
<el-select v-model="dataForm.customerTypeId" :placeholder="$t('basic.customerTypeName')">
<el-option v-for="item in customerTypeList" :key="item.id" :label="item.customerTypeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :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: "/basic/qmsCustomerType/page"
},
visible: false,
customerTypeList:{},
dataForm: {
name: null,
code: null,
customerTypeId: null,
customerTypeStatus: 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",
// },
// ],
// };
// },
},
mounted () {
this.getDict();
},
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: {
limit: 999,
page:1
}
})
.then(({ data: res }) => {
console.log(res);
if (res.code === 0) {
this.customerTypeList = res.data.list
}
})
},
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,155 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:59:19
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="customerTypeCode" :label="$t('basic.code')">
<el-input v-model="dataForm.customerTypeCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="customerTypeName" :label="$t('basic.name')">
<el-input v-model="dataForm.customerTypeName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :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: "/basic/qmsCustomerType",
infoURL: "/basic/qmsCustomerType/{id}",
getCodeURL: '/basic/qmsCustomerType/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: "",
customerTypeCode:null,
customerTypeName:null,
customerTypeStatus: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 || "";
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.getCode()
}
});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.customerTypeCode = res.data
}
})
.catch(() => {
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsCustomerType/${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: () => {
this.visible = false;
console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,136 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-02-15 14:03:55
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="code" :label="$t('basic.code')">
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
</el-form-item>
<el-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></el-input>
</el-form-item>
<el-form-item prop="status" :label="$t('basic.status')">
<el-select v-model="dataForm.status" :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",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
code: null,
status: null,
name: null
},
};
},
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(() => {});
// },
// 表单提交
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,154 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:56:56
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="failureTypeCode" :label="$t('basic.code')">
<el-input v-model="dataForm.failureTypeCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="failureTypeName" :label="$t('basic.name')">
<el-input v-model="dataForm.failureTypeName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="failureTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.failureTypeStatus" :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: "/basic/qmsFailureType",
infoURL: "/basic/qmsFailureType/{id}",
getCodeURL: '/basic/qmsFailureType/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: "",
failureTypeCode:null,
failureTypeName:null,
failureTypeStatus: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 || "";
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.getCode()
}
});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.failureTypeCode = res.data
}
})
.catch(() => {
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsFailureType/${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,152 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-02-16 15:46:10
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<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-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="failureTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.failureTypeStatus" :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: "/basic/qmsCustomerType/page"
},
visible: false,
customerTypeList:{},
dataForm: {
name: null,
code: null,
failureTypeStatus: 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.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,68 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-04 14:56:08
* @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.getDataList();
},
});
} 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,176 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-04 15:35:31
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="productCode" :label="$t('basic.code')">
<el-input v-model="dataForm.productCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="productName" :label="$t('basic.name')">
<el-input v-model="dataForm.productName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="productSpecs" :label="$t('basic.specification')">
<el-input v-model="dataForm.productSpecs" :placeholder="$t('basic.specification')"></el-input>
</el-form-item>
<el-form-item prop="productTypeId" :label="$t('basic.productTypeName')">
<el-select v-model="dataForm.productTypeId" :placeholder="$t('basic.productTypeName')">
<el-option v-for="item in typeList" :key="item.id" :label="item.productTypeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="remark" :label="$t('basic.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('basic.remark')"></el-input>
</el-form-item>
<!-- <el-form-item prop="productTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.productTypeStatus" :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: "/basic/qmsProductType",
infoURL: "/basic/qmsProductType/{id}",
getCodeURL: '/basic/qmsProduct/getCode',
getTypeListURL: '/basic/qmsProductType/page'
},
typeList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
remark:null,
productCode:null,
productName: null,
productTypeId:null,
productTypeStatus: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 || "";
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.getCode()
}
});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.productTypeCode = res.data
}
})
.catch(() => {
});
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(() => {
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsProductType/${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,129 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:44:31
* @LastEditTime: 2023-04-04 14:39:49
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="productCode" :label="$t('basic.code')">
<el-input v-model="dataForm.productCode" :placeholder="$t('basic.code')" clearable></el-input>
</el-form-item>
<el-form-item prop="productName" :label="$t('basic.name')">
<el-input v-model="dataForm.productName" :placeholder="$t('basic.name')" clearable></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",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
productName: null,
productCode: null
},
};
},
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(() => {});
// },
// 表单提交
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,154 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:59:37
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="productTypeCode" :label="$t('basic.code')">
<el-input v-model="dataForm.productTypeCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="productTypeName" :label="$t('basic.name')">
<el-input v-model="dataForm.productTypeName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="productTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.productTypeStatus" :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: "/basic/qmsProductType",
infoURL: "/basic/qmsProductType/{id}",
getCodeURL: '/basic/qmsProductType/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: "",
productTypeCode:null,
productTypeName:null,
productTypeStatus: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 || "";
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.getCode()
}
});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.productTypeCode = res.data
}
})
.catch(() => {
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsProductType/${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,136 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:44:31
* @LastEditTime: 2023-02-21 14:45:31
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="code" :label="$t('basic.code')">
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
</el-form-item>
<el-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></el-input>
</el-form-item>
<el-form-item prop="status" :label="$t('basic.status')">
<el-select v-model="dataForm.status" :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",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
code: null,
status: null,
name: null
},
};
},
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(() => {});
// },
// 表单提交
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,242 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-02-14 14:12:11
* @Description:
-->
<template>
<div>
<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>
</template>
<script>
import debounce from "lodash/debounce";
// import basicAdd from "@/mixins/basic-add";
import basicPage from "@/mixins/basic-page";
const tableProps = [
{
prop: "productCode",
label: "编号",
},
{
prop: "productName",
label: "名称",
},
];
const tableBtn = [
{
type: "synchronous",
btnName: "同步",
showParam: {
type: "&",
data: [
{
type: "equal",
name: "controlCodeId",
value:null,
},
],
},
},
{
type: "cancel",
btnName: "取消关联",
showParam: {
type: "&",
data: [
{
type: "unequal",
name: "controlCodeId",
value: null,
},
],
},
},
];
export default {
// mixins: [basicAdd],
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsProduct/page",
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
},
tableProps,
tableBtn,
productData:{},
visible: false,
dataForm: {
id: "",
paramCode: "",
paramValue: "",
remark: "",
},
};
},
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.getDataList();
},
methods: {
init(data) {
console.log();
// this.dataForm.id = id || "";
this.productData = data? data: {}
this.visible = true;
this.$nextTick(() => {
this.listQuery.controllerModeId = data ? data.id : null;
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
this.getDataList();
// }
});
},
handleClick() {
if (val.type === "synchronous") {
if (!this.listQuery.controllerModeId) {
this.$message({
message: '请先选择控制模式',
type: 'warning'
});
} else {
const data={
controlCodeId: this.listQuery.controlCodeId,
finishInspection: this.productData.finishInspection,
incomingInspection: this.productData.finishInspection,
processInspection: this.productData.processInspection
}
this.$http['put']('/basic/qmsProduct',data).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(() => { })
}
// this.addOrUpdateVisible = true;
// this.addOrEditTitle = "编辑";
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(val.data.id);
// });
} else if (val.type === 'cancel') {
const data = {
controlCodeId: null,
finishInspection: null,
incomingInspection: null,
processInspection: null
}
this.$http['put']('/basic/qmsProduct', data).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(() => { })
}
},
// 获取信息
// 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(() => {});
// },
// 表单提交
dataFormSubmitHandle: debounce(
function () {
// 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: () => {
// this.visible = false;
// this.$emit("refreshDataList");
// },
// });
// })
// .catch(() => {});
// });
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,157 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 16:42:11
* @LastEditTime: 2023-02-24 15:08:39
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="teamCode" :label="$t('basic.code')">
<el-input v-model="dataForm.teamCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="teamName" :label="$t('basic.name')">
<el-input v-model="dataForm.teamName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="client" :label="$t('basic.client')">
<el-input v-model="dataForm.client" :placeholder="$t('basic.client')"></el-input>
</el-form-item>
<!-- <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :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: "/basic/qmsTeam",
infoURL: "/basic/qmsTeam/{id}",
getCodeURL: '/basic/qmsTeam/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: "",
teamCode:null,
teamName:null,
client: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 || "";
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.getCode()
}
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsTeam/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => {});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.teamCode = 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: () => {
this.visible = false;
// console.log(1111);
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,136 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-02-22 09:40:41
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="code" :label="$t('basic.code')">
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
</el-form-item>
<el-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></el-input>
</el-form-item>
<!-- <el-form-item prop="status" :label="$t('basic.status')">
<el-select v-model="dataForm.status" :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",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
code: null,
// status: null,
name: null
},
};
},
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(() => {});
// },
// 表单提交
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,272 @@
<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="productOrEditTitle" :dialogVisible="productOrUpdateVisible"
@cancel="handleProductCancel" :before-close="handleProductCancel">
<show-product-list ref="productOrUpdate" @successSubmit="successSubmit"></show-product-list>
<el-row slot="footer" type="flex" justify="end"> </el-row>
</base-dialog>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<control-add ref="addOrUpdate" @successSubmit="successSubmit"></control-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">
<control-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></control-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 controlSearch from "./components/controlSearch.vue";
import controlAdd from "./components/control-add.vue";
import available from "./components/available.vue";
import planBtn from "./components/planBtn.vue";
import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "controlCode",
label: i18n.t('basic.code'),
},
{
prop: "controlName",
label: i18n.t('basic.name'),
},
{
prop: "specifications",
label: i18n.t('basic.specification'),
},
{
prop: "detail",
label: i18n.t('basic.InspectionStage'),
subcomponent: radio,
},
{
prop: "controlStatus",
label: i18n.t('basic.available'),
subcomponent: available,
},
{
prop: "remark",
label: i18n.t('schedule.remark'),
},
{
prop: "valid",
label: i18n.t('basic.InspectionPlan'),
subcomponent: planBtn,
},
];
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: "/basic/qmsControlMode/page",
deleteURL: "/basic/qmsControlMode",
},
tableProps,
tableBtn,
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,
},
{
type: "button",
btnName: "关联产品列表",
name: "correlation",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "取消选中",
name: "cancel",
color: "primary",
// plain: true,
},
],
};
},
components: {
showProductList,
controlSearch,
controlAdd
},
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(key) {
// console.log(key);
console.log(key);
this.listQuery.key = key;
this.listQuery.page = 1;
this.getDataList(key);
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.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
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,261 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="4" 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"
: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">
<customer-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-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">
<customer-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customer-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 customerAdd from "./components/customer-add";
import customerSearch from "./components/customerSearch.vue";
import available from "./components/available.vue";
// import radio from "./components/radio.vue";
// import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "customerCode",
label: '编码'
},
{
prop: "customerName",
label: "客户"
},
{
prop: "customerTypeName",
label: "客户类型"
},
{
prop: "customerTypeStatus",
label: "状态",
subcomponent: available,
}
];
const tableBtn = [
{
type: "edit",
btnName: "修改"
},
{
type: "delete",
btnName: "删除"
}
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsCustomer/page",
deleteURL: "/basic/qmsCustomerType",
exportURL: '/basic/qmsCustomer/export'
},
tableProps,
tableBtn,
productData: {},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
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",
// plain: true,
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
customerAdd,
customerSearch,
},
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();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
// this.listQuery.key = key;
this.listQuery.code = dataForm.code
this.listQuery.name = dataForm.name
this.listQuery.customerTypeId = dataForm.customerTypeId
this.listQuery.customerTypeStatus = dataForm.customerTypeStatus
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick() {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerName}]进行删除操作?`, "提示", {
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);
});
}
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// this.listQuery.key = "";
this.listQuery.page = 1;
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.customerTypeId = null
this.listQuery.customerTypeStatus = null
this.getDataList();
break;
case "export":
this.exportHandle();
break;
case "add":
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -0,0 +1,268 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="3" 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"
: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">
<customer-type-add ref="addOrUpdate" @successSubmit="successSubmit"></customer-type-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">
<customerType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></customerType-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 customerTypeAdd from "./components/customerType-add";
import customerTypeSearch from "./components/customerTypeSearch.vue";
import available from "./components/available.vue";
import Cookies from 'js-cookie'
import qs from 'qs'
// import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "customerTypeCode",
label: '编码'
},
{
prop: "customerTypeName",
label: "名称"
},
{
prop: "customerTypeStatus",
label: "状态",
subcomponent: available,
}
];
const tableBtn = [
{
type: "edit",
btnName: "修改"
},
{
type: "delete",
btnName: "删除"
}
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsCustomerType/page",
deleteURL: "/basic/qmsCustomerType",
exportURL: "/basic/qmsCustomerType/export",
},
tableProps,
tableBtn,
productData: {},
addOrUpdateVisible:false,
searchOrEditTitle: "",
addOrEditTitle:'',
searchOrUpdateVisible: false,
productOrEditTitle: "",
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
customerTypeAdd,
customerTypeSearch
},
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();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.name = dataForm.name
this.listQuery.code = dataForm.code
this.listQuery.status = dataForm.status
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
handleClick(val) {
console.log(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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.name = null
this.listQuery.code = null
this.listQuery.status = null
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList();
break;
case "export":
this.exportHandle();
break;
case "add":
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
// case "correlation":
// this.productOrEditTitle = "产品";
// this.productOrUpdateVisible = true;
// this.addOrUpdateHandle(this.productData);
// console.log(this.productId);
// break;
// case "cancel":
// this.$refs.palletTable1.setCurrent("palletTable", -1);
// break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -0,0 +1,209 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-17 11:03:23
* @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="3" 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">
<failure-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></failure-type-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 failureTypeAdd from "./components/failureType-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: "failureTypeCode",
label: i18n.t("basic.code"),
},
{
prop: "failureTypeName",
label: i18n.t("basic.name"),
},
{
prop: "failureTypeStatus",
label: "状态",
subcomponent: available,
}
];
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
failureTypeSearch,
failureTypeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsFailureType/page",
deleteURL: "/basic/qmsFailureType",
},
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.code = dataForm.code
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.addOrEditTitle = "修改"
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,251 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="2" 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">
<product-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-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">
<product-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></product-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 productSearch from "./components/productSearch.vue";
import productAdd from "./components/product-add.vue";
import available from "./components/available.vue";
import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "productCode",
label: i18n.t('basic.code'),
},
{
prop: "productName",
label: i18n.t('basic.name'),
},
{
prop: "productSpecs",
label: i18n.t('basic.specification'),
},
{
prop: "productTypeName",
label: i18n.t('basic.productTypeName'),
},
{
prop: "detail",
label: i18n.t('basic.InspectionStage'),
subcomponent: radio,
},
{
prop: "controlStatus",
label: i18n.t('basic.available'),
subcomponent: available,
},
{
prop: "remark",
label: i18n.t('schedule.remark'),
},
];
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: "/basic/qmsProduct/page",
deleteURL: "/basic/qmsProduct",
},
tableProps,
tableBtn,
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: {
productSearch,
productAdd
},
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);
// console.log(key);
this.listQuery.productName = dataForm.productName
this.listQuery.productCode = dataForm.productCode
this.listQuery.page = 1;
this.getDataList();
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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
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,290 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-04-17 11:03:48
* @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"
: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">
<product-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-type-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">
<productType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></productType-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 productTypeAdd from "./components/productType-add";
import productTypeSearch from "./components/productTypeSearch.vue";
import available from "./components/available.vue";
import Cookies from 'js-cookie'
import qs from 'qs'
// import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "productTypeCode",
label: '编码'
},
{
prop: "productTypeName",
label: "名称"
},
{
prop: "productTypeStatus",
label: "状态",
subcomponent: available,
}
];
const tableBtn = [
{
type: "edit",
btnName: "修改"
},
{
type: "delete",
btnName: "删除"
}
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsProductType/page",
deleteURL: "/basic/qmsProductType",
exportURL: "/basic/qmsProductType/export",
},
tableProps,
tableBtn,
productData: {},
addOrUpdateVisible:false,
searchOrEditTitle: "",
addOrEditTitle:'',
searchOrUpdateVisible: false,
productOrEditTitle: "",
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
productTypeAdd,
productTypeSearch
},
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();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.name = dataForm.name
this.listQuery.code = dataForm.code
this.listQuery.status = dataForm.status
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
// handleCancel() {
// },
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmit()
// },
successSubmit() {
console.log(11111);
this.$refs.addOrUpdate.formClear()
this.addOrUpdateVisible = false
this.addOrEditTitle = ''
this.getDataList();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.productTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log(val);
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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.name = null
this.listQuery.code = null
this.listQuery.status = null
// console.log(i18n);
this.listQuery.page = 1
// console.log(basicPage)
this.getDataList();
break;
case "export":
this.exportHandle();
break;
case "add":
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
// case "correlation":
// this.productOrEditTitle = "产品";
// this.productOrUpdateVisible = true;
// this.addOrUpdateHandle(this.productData);
// console.log(this.productId);
// break;
// case "cancel":
// this.$refs.palletTable1.setCurrent("palletTable", -1);
// break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -0,0 +1,319 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-04-17 11:04:00
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-row :gutter="24">
<el-col :span="14">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="2" class="item">
<el-button type="primary" size="small" @click="conditionSearch">{{ $t("conditionSearch")}}}</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
: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">
<team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-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">
<team-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></team-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-col>
<el-col :span="10">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
: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">
<team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
</div>
</el-col>""
</el-row>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
import teamAdd from "./components/team-add";
import teamSearch from "./components/teamSearch.vue";
import Cookies from 'js-cookie'
import qs from 'qs'
// import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "teamCode",
label: i18n.t('basic.code')
},
{
prop: "teamName",
label: i18n.t('basic.name')
},
{
prop: "client",
label: i18n.t('basic.client')
},
{
prop: "remark",
label: i18n.t('basic.remark')
},
];
const tableBtn = [
{
type: "edit",
btnName: "修改"
},
{
type: "delete",
btnName: "删除"
}
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsTeam/page",
deleteURL: "/basic/qmsTeam",
exportURL: "/basic/qmsTeam/export",
},
tableProps,
tableBtn,
productData: {},
addOrUpdateVisible: false,
searchOrEditTitle: "",
addOrEditTitle: '',
searchOrUpdateVisible: false,
productOrEditTitle: "",
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "导出",
name: i18n.t('export'),
color: "primary",
// plain: true,
}
],
formConfigMember: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('teamMemberChange'),
name: "change",
color: "primary",
// plain: true,
}
],
};
},
components: {
teamAdd,
teamSearch
},
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();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.name = dataForm.name
this.listQuery.code = dataForm.code
this.listQuery.status = dataForm.status
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
handleClick(val) {
console.log(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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.name = null
this.listQuery.code = null
this.listQuery.status = null
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList();
break;
case "export":
this.exportHandle();
break;
case "add":
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
// case "correlation":
// this.productOrEditTitle = "产品";
// this.productOrUpdateVisible = true;
// this.addOrUpdateHandle(this.productData);
// console.log(this.productId);
// break;
// case "cancel":
// this.$refs.palletTable1.setCurrent("palletTable", -1);
// break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -0,0 +1,134 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-01-12 09:46:23
* @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-button type="primary" size="small" plain>导入</el-button>
</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"
>
<!-- <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update> -->
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
// import AddOrUpdate from './params-add-or-update'
import i18n from "@/i18n";
const tableProps = [
{
prop: "paramCode",
label: i18n.t("params.paramCode"),
},
{
prop: "paramValue",
label: i18n.t("params.paramValue"),
},
{
prop: "remark",
label: i18n.t("params.remark"),
},
];
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsControlMode/page",
deleteURL: "/basic/qmsControlMode",
},
tableProps,
tableBtn,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
plain: true,
},
],
};
},
// components: {
// AddOrUpdate,
// },
methods:{
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,41 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-08 11:09:49
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag v-if="injectData.gageTypeStatus === 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,376 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-10 14:17:09
* @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="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="certificateType" :label="$t('gage.certificateType')">
<el-select v-model="dataForm.certificateType" :placeholder="$t('gage.certificateType')">
<el-option v-for="item in certificateTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="certificateCodeBh" :label="$t('gage.certificateCodeBh')">
<el-input v-model="dataForm.certificateCodeBh" :placeholder="$t('gage.certificateCodeBh')">
</el-input>
</el-form-item>
<el-form-item prop="certificateCode" :label="$t('gage.certificateCode')">
<el-input v-model="dataForm.certificateCode" :placeholder="$t('gage.certificateCode')">
</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-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="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('gage.description')">
<el-input v-model="dataForm.description" :placeholder="$t('gage.description')">
</el-input>
</el-form-item>
<el-form-item prop="equipmentSupplier" :label="$t('gage.supplierName')">
<el-input v-model="dataForm.equipmentSupplier" :placeholder="$t('gage.supplierName')">
</el-input>
</el-form-item>
<el-form-item prop="internalInspectionCycle" :label="$t('gage.internalInspectionCycle')">
<el-input v-model="dataForm.internalInspectionCycle" :placeholder="$t('gage.internalInspectionCycle')">
</el-input>
</el-form-item>
<el-form-item prop="externalInspectionCycle" :label="$t('gage.externalInspectionCycle')">
<el-input v-model="dataForm.externalInspectionCycle" :placeholder="$t('gage.externalInspectionCycle')">
</el-input>
</el-form-item>
<el-form-item prop="internalInspectionTime" :label="$t('gage.internalInspectionTime')">
<el-date-picker v-model="dataForm.internalInspectionTime" type="datetime"
:placeholder="$t('gage.internalInspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="externalInspectionTime" :label="$t('gage.externalInspectionTime')">
<el-date-picker v-model="dataForm.externalInspectionTime" type="datetime"
:placeholder="$t('gage.externalInspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="nextInternalInspectionTime" :label="$t('gage.nextInternalInspectionTime')">
<el-date-picker v-model="dataForm.nextInternalInspectionTime" type="datetime"
:placeholder="$t('gage.nextInternalInspectionTime')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="nextExternalInspectionTime" :label="$t('gage.nextExternalInspectionTime')">
<el-date-picker v-model="dataForm.nextExternalInspectionTime" type="datetime"
:placeholder="$t('gage.nextExternalInspectionTime')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</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="benchmarkMeasurTool" :label="$t('gage.benchmarkMeasurTool')">
<el-radio-group v-model="dataForm.benchmarkMeasurTool">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="belongPerson" :label="$t('gage.belongPersonName')">
<el-select v-model="dataForm.belongPerson" :placeholder="$t('gage.belongPersonName')">
<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="gageStatus" :label="$t('gage.gageStatus')">
<el-select v-model="dataForm.gageStatus" :placeholder="$t('gage.gageStatus')">
<el-option v-for="item in gageStatusList" :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/qmsGage",
infoURL: "/gage/qmsGage/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/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: {
belongPerson:null,
benchmarkMeasurTool: null,
certificateCode: null,
certificateCodeBh: null,
certificateType: null,
client: null,
code: null,
createDate: null,
description: null,
equipmentSupplier: null,
externalInspectionCycle: null,
externalInspectionTime: null,
gageStatus: null,
gageTypeId: null,
id: null,
internalInspectionCycle: null,
internalInspectionTime: null,
measuringToolAccuracy: null,
measuringToolSpecification: null,
name: null,
nextExternalInspectionTime: null,
nextInternalInspectionTime: null,
recipient: null,
remark: null,
updateDate: null,
useLocation: null,
userDepartment: 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(() => {
});
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(() => {
})
this.$http
.get(this.urlOptions.getGageTypeList, 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/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

@@ -0,0 +1,41 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-09 15:39:05
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag v-if="injectData.gageStatus === 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,201 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-05-10 16:18:12
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="gageCode" :label="$t('gage.gageName')">
<el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageName')"></el-input>
</el-form-item>
<el-form-item prop="gageName" :label="$t('gage.gageName')">
<el-input v-model="dataForm.gageName" :placeholder="$t('gage.gageName')"></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="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-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 :label="$t('time')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
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>
</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",
getGageTypeList: '/gage/qmsGageType/page'
},
visible: false,
customerTypeList:{},
dataForm: {
gageName: null,
gageCode: null,
measurToolEvent: null,
process: null,
timeSlot:null,
},
gageTypeList:[],
eventList: [
{
id: 0,
name: '领用'
},
{
id: 1,
name: '归还'
},
{
id: 2,
name: '量具报废'
},
{
id: 3,
name: '量具维修'
},
{
id: 4,
name: '量具购买'
},
],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
]
};
},
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.getGageTypeList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageTypeList = res.data.list
}
})
.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,215 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-05-10 16:17:59
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<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.customSamplingCode" :placeholder="$t('gage.name')"></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="gageStatus" :label="$t('gage.gageStatus')">
<el-select v-model="dataForm.gageStatus" :placeholder="$t('gage.gageStatus')">
<el-option v-for="item in gageStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</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-item prop="belongPerson" :label="$t('gage.belongPersonName')">
<el-select v-model="dataForm.belongPerson" :placeholder="$t('gage.belongPersonName')">
<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>
</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",
getGageTypeList: '/gage/qmsGageType/page',
getUserList: '/sys/user/page',
},
visible: false,
gageStatusList: [
{
id: 0,
name: '在用'
},
{
id: 1,
name: '备用'
},
{
id: 2,
name: '停用'
},
{
id: 3,
name: '封存'
},
{
id: 4,
name: '报废'
},
{
id: 5,
name: '降级使用'
}
],
listQuery: {
page: 1,
limit:999
},
gageTypeList: [],
userList:[],
dataForm: {
name: null,
code: null,
measuringToolAccuracy: null,
gageStatus: null,
belongPerson: null,
gageTypeId: 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.getGageTypeList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageTypeList = 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(() => {
})
},
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,199 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-08 10:34:55
* @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="measurementType" :label="$t('gage.measurementType')">
<el-select v-model="dataForm.measurementType" :placeholder="$t('gage.measurementType')">
<el-option v-for="item in measurementTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="parentId" :label="$t('gage.parentId')">
<el-select v-model="dataForm.parentId" :placeholder="$t('gage.parentId')">
<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>
</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',
// getTeamListURL: '/basic/qmsTeam/gape',
// getProductURL: '/basic/qmsProduct/gape',
// getSupplierListURL: '/supplier/qmsSupplier/gape'
},
gageList:[],
// supplierList:[],
// productList:[],
// typeList: [],
// teamList:[],
listQuery: {
limit: 999,
gape: 1
},
measurementTypeList: [{
id: 0,
name: '计量'
},
{
id: 1,
name: '计数'
},
],
visible: false,
dataForm: {
id: null,
measurementType: null,
code: null,
name: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.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(`/gage/qmsGageType/${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,324 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-11 09:50:14
* @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>
<el-form-item prop="certificateCode" :label="$t('gage.certificateCode')">
<el-input v-model="dataForm.certificateCode" :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="calibrationUnit" :label="$t('gage.calibrationUnit')">
<el-input v-model="dataForm.calibrationUnit" :placeholder="$t('gage.calibrationUnit')">
</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="inspectionTime" :label="$t('gage.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('gage.inspectionTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="calibrationDepartment" :label="$t('gage.calibrationDepartment')">
<el-select v-model="dataForm.calibrationDepartment" :placeholder="$t('gage.calibrationDepartment')">
<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="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 prop="checker" :label="$t('gage.checker')">
<el-select v-model="dataForm.checker" :placeholder="$t('gage.checker')">
<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="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 }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageList: '/gage/qmsGage/page',
},
gageList: [],
userList: [],
gageTypeList:[],
departmentList: [],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
],
measureList: [
{
id: 0,
name: 'a'
},
{
id: 1,
name: 'b'
},
{
id: 2,
name: 'c'
}
],
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: '自校报告'
}
],
gageList: [],
visible: false,
dataForm: {
calibrationDepartment:null,
calibrationUnit: null,
certificateNo: null,
checker: null,
client: null,
createDate: null,
gageCode: null,
gageId: null,
id: null,
inspectionTime: null,
measure: null,
measuringToolAccuracy: null,
parityBit: null,
remark: null,
valid: null,
verificationFee: null,
verificationResult: 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(() => {
});
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(() => {
})
this.$http
.get(this.urlOptions.getGageList, 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/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

@@ -0,0 +1,204 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-05-11 10:13:33
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<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('time')" prop="timeSlot">
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
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>
</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",
getGageTypeList: '/gage/qmsGageType/page',
getUserList: '/sys/user/page',
getGageList: '/gage/qmsGage/page'
},
visible: false,
gageStatusList: [
{
id: 0,
name: '在用'
},
{
id: 1,
name: '备用'
},
{
id: 2,
name: '停用'
},
{
id: 3,
name: '封存'
},
{
id: 4,
name: '报废'
},
{
id: 5,
name: '降级使用'
}
],
listQuery: {
page: 1,
limit:999
},
gageList:[],
gageTypeList: [],
userList:[],
dataForm: {
gageId: null,
startTime: null,
endTime: 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.getGageTypeList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageTypeList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getGageList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageList = res.data.list
}
})
.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,278 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-10 13:45:58
* @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')">
<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>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
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'
},
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: {
id: null,
expectedReturnDate:null,
gageCode: null,
gageId: null,
measuringToolSpecification:null,
measurToolEvent: null,
process: null,
processUserId: null,
recipient: null,
remark: null,
transferDate: null,
useLocation: null,
userDepartment: 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.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/qmsGageResume/${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,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,322 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-10 15:54:33
* @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="6" 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">
<gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gape-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">
<gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-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 gapeAdd from "./components/gage-add"
// import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
import gageSearch from "./components/gageSearch"
// import available from "./components/gageAvailable.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'client',
label: i18n.t("gage.client"),
align: 'center'
},
{
prop: 'certificateCode',
label: i18n.t("gage.certificateCode"),
align: 'center'
},
{
prop: 'certificateCodeBh',
label: i18n.t("gage.certificateCodeBh"),
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"),
align: 'center'
},
// {
// prop: 'gageStatus',
// label: i18n.t("available"),
// subcomponent: available,
// align: 'center'
// },
{
prop: 'belongPersonName',
label: i18n.t("gage.belongPersonName"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
{
type: "parameter",
btnName: "台差参数",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageSearch,
gapeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGage/page",
deleteURL: "/gage/qmsGage",
exportUrl: '/gage/qmsGage/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.name = dataForm.name
this.listQuery.measuringToolAccuracy = dataForm.measuringToolAccuracy
this.listQuery.gageStatus = dataForm.gageStatus
this.listQuery.belongPerson = dataForm.belongPerson
this.listQuery.gageTypeId = dataForm.gageTypeId
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.$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()
},
});
})
}
},
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,322 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-11 15:30:11
* @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="6" 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">
<gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gape-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">
<gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-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 gapeAdd from "./components/gage-add"
// import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
import gageSearch from "./components/gageSearch"
// import available from "./components/gageAvailable.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'client',
label: i18n.t("gage.client"),
align: 'center'
},
{
prop: 'certificateCode',
label: i18n.t("gage.certificateCode"),
align: 'center'
},
{
prop: 'certificateCodeBh',
label: i18n.t("gage.certificateCodeBh"),
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"),
align: 'center'
},
// {
// prop: 'gageStatus',
// label: i18n.t("available"),
// subcomponent: available,
// align: 'center'
// },
{
prop: 'belongPersonName',
label: i18n.t("gage.belongPersonName"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
{
type: "parameter",
btnName: "台差参数",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageSearch,
gapeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageGrr/page",
deleteURL: "/gage/qmsGageGrr",
exportUrl: '/gage/qmsGageGrr/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.name = dataForm.name
this.listQuery.measuringToolAccuracy = dataForm.measuringToolAccuracy
this.listQuery.gageStatus = dataForm.gageStatus
this.listQuery.belongPerson = dataForm.belongPerson
this.listQuery.gageTypeId = dataForm.gageTypeId
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.$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()
},
});
})
}
},
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,254 @@
<!--
* @Author: zhp
* @Date: 2023-05-08 11:11:06
* @LastEditTime: 2023-05-10 16:20: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" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<qmsGageResume-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qmsGageResume-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">
<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>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import qmsGageResumeAdd from "./components/qmsGageResume-add"
// import gage from '@/filters/gage'
import { timeFormatter } from '@/filters'
// import AddOrUpdate from './params-add-or-update'
import gageResumeSearch from "./components/gageResumeSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'gageCode',
label: i18n.t("gage.gageCode"),
align: 'center'
},
{
prop: 'gageName',
label: i18n.t("gage.gageName"),
align: 'center'
},
{
prop: 'measurToolEvent',
label: i18n.t("gage.measurToolEvent"),
align: 'center'
},
{
prop: 'createDate',
label: i18n.t("gage.createDate"),
filter: timeFormatter,
align: 'center'
},
{
prop: 'recipientName',
label: i18n.t("gage.recipientName"),
align: 'center'
},
{
prop: 'userDepartment',
label: i18n.t("gage.userDepartment"),
align: 'center'
},
{
prop: 'useLocation',
label: i18n.t("gage.useLocation"),
align: 'center'
},
{
prop: 'remark',
label: i18n.t("gage.remark"),
align: 'center'
}
// {
// prop: 'measurementType',
// label: i18n.t("gage.measurementType"),
// align: 'center',
// filter: gage('measurementType'),
// }
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
{
type: "parameter",
btnName: "台差参数",
}
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageResumeSearch,
qmsGageResumeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageResume/page",
deleteURL: "/gage/qmsGageResume",
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.gageName = dataForm.gageName
this.listQuery.gageCode = dataForm.gageCode
this.listQuery.measurToolEvent = dataForm.measurToolEvent
this.listQuery.process = dataForm.process
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
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.$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,257 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 15:47:41
* @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">
<gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gageType-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 gageTypeAdd from "./components/gageType-add"
import gage from '@/filters/gage'
// 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: 'code',
label: i18n.t("gage.code"),
align: 'center'
},
{
prop: 'name',
label: i18n.t("gage.name"),
align: 'center'
},
{
prop: 'gageTypeStatus',
label: i18n.t("available"),
subcomponent: available,
align: 'center'
},
{
prop: 'measurementType',
label: i18n.t("gage.measurementType"),
align: 'center',
filter: gage('measurementType'),
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
{
type: "parameter",
btnName: "台差参数",
},
{
type: "change",
btnName: "改变状态",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
gageTypeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageType/page",
deleteURL: "/gage/qmsGageType",
submitURL: '/gage/qmsGageType'
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.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.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === 'parameter') {
this.$router.push({
name: 'gage-qmsGageTypeDifferenceParameter',
query: {
gageTypeId: val.data.id
}
})
} 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()
},
});
})
}
},
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,234 @@
<!--
* @Author: zhp
* @Date: 2023-05-08 10:31:11
* @LastEditTime: 2023-05-09 15:47:26
* @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">
<gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gageType-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 gageTypeAdd from "./components/gageType-add"
// import gage from '@/filters/gage'
import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'serialNo',
label: i18n.t("gage.serialNo"),
align: 'center'
},
{
prop: 'code',
label: i18n.t("gage.code"),
align: 'center'
},
{
prop: 'name',
label: i18n.t("gage.name"),
align: 'center'
},
{
prop: 'decimalDigits',
label: i18n.t("gage.decimalDigits"),
align: 'center'
},
{
prop: 'lsl',
label: i18n.t("gage.lsl"),
align: 'center'
},
{
prop: 'sl',
label: i18n.t("gage.sl"),
align: 'center'
},
{
prop: 'usl',
label: i18n.t("gage.usl"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
gageTypeAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
deleteURL: "/gage/qmsGageTypeDifferenceParameter",
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
mounted() {
if (this.$route.query) {
this.listQuery.gageTypeId = this.$route.query.gageTypeId
this.getDataList()
}
},
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.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.$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.exportHandl();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,325 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-11 10:20:06
* @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="2" 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">
<gageVerification-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gageVerification-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">
<gageVerification-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</gageVerification-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 gageVerificationAdd from "./components/gageVerification-add"
// import gageVerificationSearch from "./components/gageVerificationSearch"
// import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
import gageVerificationSearch from "./components/gageVerificationSearch"
// import available from "./components/gageAvailable.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'certificateNo',
label: i18n.t("gage.certificateCode"),
align: 'center'
},
{
prop: 'gageName',
label: i18n.t("gage.gageName"),
align: 'center'
},
{
prop: 'certificateCodeBh',
label: i18n.t("gage.certificateCodeBh"),
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"),
align: 'center'
},
// {
// prop: 'gageStatus',
// label: i18n.t("available"),
// subcomponent: available,
// align: 'center'
// },
{
prop: 'belongPersonName',
label: i18n.t("gage.belongPersonName"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
{
type: "parameter",
btnName: "台差参数",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageVerificationSearch,
gageVerificationAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/gage/qmsGageVerification/page",
deleteURL: "/gage/qmsGageVerification",
exportUrl: '/gage/qmsGageVerification/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.parityBit = dataForm.parityBit
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
this.listQuery.gageId = dataForm.gageId
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.$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()
},
});
})
}
},
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,328 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-12 15:54:19
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="approvalProcessCode" :label="$t('disqualification.approvalProcessCode')">
<el-input v-model="dataForm.approvalProcessCode" :placeholder="$t('disqualification.approvalProcessCode')">
</el-input>
</el-form-item>
<el-form-item prop="approvalProcessName" :label="$t('disqualification.approvalProcessName')">
<el-input v-model="dataForm.approvalProcessName" :placeholder="$t('disqualification.approvalProcessName')">
</el-input>
</el-form-item>
<el-form-item prop="approvalProcessType" :label="$t('disqualification.approvalProcessType')">
<el-select v-model="dataForm.approvalProcessType" :placeholder="$t('disqualification.approvalProcessType')">
<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>
<base-table border :table-props="tableProps" :table-data="tableData"
:add-button-show="addButtonShow" @emitFun="inputChange" @emitButtonClick="emitButtonClick" />
</div>
</template>
<script>
import debounce from "lodash/debounce"
// import basicAdd from "@/mixins/basic-add"
import inputArea from './inputArea'
import selectArea from './selectArea'
import i18n from "@/i18n"
import { kStringMaxLength } from "buffer"
const tableProps = [
{
prop: 'step',
label: i18n.t("disqualification.step"),
subcomponent: inputArea
},
{
prop: 'teamId',
label: i18n.t("disqualification.team"),
subcomponent: selectArea
}
]
export default {
// mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/nonconform/qmsApprovalProcess",
infoURL: "/nonconform/qmsApprovalProcess/{ id }",
stepDetailURL: "/nonconform/qmsApprovalProcessStepDetail",
stepDetailPageURL: "/nonconform/qmsApprovalProcessStepDetail/page",
},
supplierList:[],
productList:[],
typeList: [],
teamList: [],
tableData:[],
listQuery: {
limit: 999,
page: 1,
approvalProcessId:null,
},
options: [
{
value: 1,
label: '不合格品审批'
},
],
editData: {
id:null,
list:[]
},
visible: false,
tableProps,
addButtonShow:'新增',
dataForm: {
id: null,
approvalProcessCode: null,
approvalProcessName: null,
approvalProcessType: null,
qmsApprovalProcessStepDetailDTOList:[]
},
};
},
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: {
inputChange(val) {
console.log('=======')
console.log(val)
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
console.log(this.tableData)
},
emitButtonClick() {
console.log('emitButtonClick')
let obj = {}
for (let i of this.tableProps) {
obj[i.prop] = ''
}
this.tableData.push(obj)
// this.dataForm.qmsApprovalProcessStepDetailDTOList.push(obj)
// console.log(this.dataForm)
},
init(id, ) {
this.dataForm.id = id || ""
this.listQuery.approvalProcessId = id || ""
this.editData.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.getSupplierListURL, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.supplierList = res.data.list
// }
// })
// .catch(() => {
// })
// this.$http
// .get(this.urlOptions.getProductURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data)
// this.productList = 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(`/nonconform/qmsApprovalProcess/${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(this.urlOptions.stepDetailPageURL, {params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.tableData = res.data.list
}
})
.catch(() => {
});
},
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 (this.tableData.length === 0) {
this.editData.list = []
} else {
this.editData.list = this.tableData.map((item) => {
return {
step: item.step,
teamId: item.teamId,
approvalProcessId: res.data
}
})
}
this.$http.put(this.urlOptions.stepDetailURL, this.editData)
.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.tableData = []
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
if (res.code !== 0) {
return this.$message.error(res.msg);
}
})
.catch(() => { })
} else {
this.$http.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (!this.tableData.length === 0) {
const data = this.tableData.map((item) => {
return {
step: item.step,
teamId: item.teamId,
approvalProcessId: res.data
}
})
this.$http.post(this.urlOptions.stepDetailURL, data)
.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.tableData = []
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
} else {
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.tableData = []
this.$emit("refreshDataList");
},
});
}
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(() => { })
}
});
},
formClear() {
this.$refs.dataForm.resetFields()
this.tableData = []
}
// 表单提交
},
};
</script>

View File

@@ -0,0 +1,277 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-07 10:20:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
<el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
<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-item prop="productId" :label="$t('disqualification.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('disqualification.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="disposalMethod" :label="$t('disqualification.disposalMethod')">
<el-select v-model="dataForm.disposalMethod" :placeholder="$t('disqualification.disposalMethod')">
<el-option v-for="item in methodList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="approvalProcessId" :label="$t('disqualification.approvalProcessName')">
<el-select v-model="dataForm.approvalProcessId" :placeholder="$t('disqualification.approvalProcessName')">
<el-option v-for="item in approvalProcessList" :key="item.approvalProcessId" :label="item.approvalProcessName"
:value="item.approvalProcessId">
</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: "/nonconform/qmsApprovalProcessConfiguration",
infoURL: "/nonconform/qmsApprovalProcessConfiguration/{ id }",
getProductURL: '/basic/qmsProduct/page',
getApprovalProcessURL: '/nonconform/qmsApprovalProcess/page'
},
approvalProcessList: [],
productList: [],
methodList: [
{
value: 0,
label: '退货'
},
{
value: 1,
label: '让步接收'
},
{
value: 2,
label: '返工/返修'
},
{
value: 3,
label: '3报废'
}
],
listQuery: {
limit: 999,
page: 1
},
options: [{
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抽检'
},
],
visible: false,
dataForm: {
id: null,
approvalProcessId: null,
disposalMethod: null,
productId: null,
inspectionTypeId: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.getApprovalProcessURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.approvalProcessList= res.data.list
}
})
.catch(() => {
});
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data)
this.productList = 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(`/nonconform/qmsApprovalProcessConfiguration/${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,230 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-04-07 10:16:09
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
<el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
<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-item prop="productId" :label="$t('disqualification.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('disqualification.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :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: "/sys/params/",
// infoURL: "/sys/params",
// },
urlOptions: {
getCustomerPageListURL: "/quality/qmsTransferScheme/page",
getProductURL: '/basic/qmsProduct/page',
},
visible: false,
customerTypeList:{},
dataForm: {
productId: null,
inspectionTypeId:null
},
productList:[],
listQuery: {
limit: 999,
page:1
},
options: [{
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抽检'
},
],
};
},
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.getData();
},
methods: {
getData() {
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data)
this.productList = res.data.list
}
})
.catch(() => {
});
},
// 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,158 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zhp
* @LastEditTime: 2023-04-13 15:03:39
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="approvalProcessCode" :label="$t('disqualification.approvalProcessCode')">
<el-input v-model="dataForm.approvalProcessCode" :placeholder="$t('disqualification.approvalProcessCode')">
</el-input>
</el-form-item>
<el-form-item prop="approvalProcessName" :label="$t('disqualification.approvalProcessName')">
<el-input v-model="dataForm.approvalProcessName" :placeholder="$t('disqualification.approvalProcessName')">
</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",
getProductURL: '/basic/qmsProduct/page',
},
visible: false,
customerTypeList:{},
dataForm: {
approvalProcessName: null,
approvalProcessCode:null
},
productList:[]
};
},
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.getData();
},
methods: {
// getData() {
// this.$http
// .get(this.urlOptions.getProductURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data)
// this.productList = res.data.list
// }
// })
// .catch(() => {
// });
// },
// 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,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,189 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-09 13:56:57
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="dataDictionaryName" :label="$t('dictionary.name')">
<el-input v-model="dataForm.dataDictionaryName" :placeholder="$t('dictionary.name')">
</el-input>
</el-form-item>
<el-form-item prop="dataDictionaryCode" :label="$t('dictionary.code')">
<el-input v-model="dataForm.dataDictionaryCode" :placeholder="$t('dictionary.code')">
</el-input>
</el-form-item>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce"
import basicAdd from "@/mixins/basic-add"
// import inputArea from './inputArea'
// import selectArea from './selectArea'
import i18n from "@/i18n"
// import { kStringMaxLength } from "buffer"
export default {
// mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/mutual/qmsDataDictionary",
infoURL: "/mutual/qmsDataDictionary/{ id }",
},
visible: false,
addButtonShow:'新增',
dataForm: {
id: null,
dataDictionaryCode: null,
dataDictionaryName: null,
moduleDataDictionaryId:null
},
};
},
mixins: [
basicAdd
],
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, moduleDataDictionaryId ) {
this.dataForm.id = id || ""
this.dataForm.moduleDataDictionaryId = moduleDataDictionaryId || ""
// 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.getSupplierListURL, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.supplierList = res.data.list
// }
// })
// .catch(() => {
// })
// this.$http
// .get(this.urlOptions.getProductURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data)
// this.productList = 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(`/mutual/qmsDataDictionary/${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 }
),
formClear() {
this.$refs.dataForm.resetFields()
this.tableData = []
}
// 表单提交
},
};
</script>

View File

@@ -0,0 +1,189 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-09 13:56:28
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="dataDictionaryDetailName" :label="$t('dictionary.name')">
<el-input v-model="dataForm.dataDictionaryDetailName" :placeholder="$t('dictionary.name')">
</el-input>
</el-form-item>
<el-form-item prop="dataDictionaryDetailCode" :label="$t('dictionary.code')">
<el-input v-model="dataForm.dataDictionaryDetailCode" :placeholder="$t('dictionary.code')">
</el-input>
</el-form-item>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce"
import basicAdd from "@/mixins/basic-add"
// import inputArea from './inputArea'
// import selectArea from './selectArea'
import i18n from "@/i18n"
// import { kStringMaxLength } from "buffer"
export default {
// mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/mutual/qmsDataDictionaryDetail",
infoURL: "/mutual/qmsDataDictionaryDetail/{ id }",
},
visible: false,
addButtonShow:'新增',
dataForm: {
id: null,
dataDictionaryCode: null,
dataDictionaryName: null,
dataDictionaryId:null
},
};
},
mixins: [
basicAdd
],
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, dataDictionaryId ) {
this.dataForm.id = id || ""
this.dataForm.dataDictionaryId = dataDictionaryId || ""
// 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.getSupplierListURL, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.supplierList = res.data.list
// }
// })
// .catch(() => {
// })
// this.$http
// .get(this.urlOptions.getProductURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data)
// this.productList = 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(`/mutual/qmsDataDictionaryDetail/${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 }
),
formClear() {
this.$refs.dataForm.resetFields()
this.tableData = []
}
// 表单提交
},
};
</script>

View File

@@ -0,0 +1,29 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-13 14:52:42
* @LastEditors: zhp
* @Description:
-->
<template>
<div id="detailList">
<span v-for="(item,index) in injectData.qmsApprovalProcessStepDetailDTOList" :key="item.teamName">
<el-button type="text">{{item.teamName}}} </el-button>
<i v-if="index <+ injectData.qmsApprovalProcessStepDetailDTOList.length-1" class="el-icon-right"></i>
</span>
</div>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
methods: {
}
}
</script>

View File

@@ -0,0 +1,38 @@
<template>
<div class="tableInner">
<el-input v-model="list[itemProp]" @blur="changeInput" />
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
list: this.injectData
}
},
methods: {
changeInput() {
console.log(this.list)
this.$emit('emitData', this.list)
}
}
}
</script>
<style lang="css">
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@@ -0,0 +1,181 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-09 13:54:01
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="titleName" :label="$t('dictionary.name')">
<el-input v-model="dataForm.titleName" :placeholder="$t('dictionary.name')">
</el-input>
</el-form-item>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce"
import basicAdd from "@/mixins/basic-add"
// import i18n from "@/i18n"
// import { kStringMaxLength } from "buffer"
export default {
// mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/mutual/qmsModuleDataDictionary",
infoURL: "/mutual/qmsModuleDataDictionary/{ id }",
},
visible: false,
addButtonShow:'新增',
dataForm: {
id: null,
titleName: null
},
};
},
mixins: [
basicAdd
],
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()
}
});
},
// 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.getSupplierListURL, this.listQuery)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data);
// this.supplierList = res.data.list
// }
// })
// .catch(() => {
// })
// this.$http
// .get(this.urlOptions.getProductURL, {
// params: this.listQuery,
// })
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res.data)
// this.productList = 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(`/mutual/qmsModuleDataDictionary/${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 }
),
formClear() {
this.$refs.dataForm.resetFields()
this.tableData = []
}
// 表单提交
},
};
</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,67 @@
<!--
* @Author: zhp
* @Date: 2023-04-12 09:46:34
* @LastEditTime: 2023-04-12 10:19:44
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="tableInner">
<el-select v-model="list[itemProp]" @change="changeInput">
<el-option v-for=" item in teamList" :key="item.id" :label="item.teamName" :value="item.id"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
list: this.injectData,
teamList: [],
urlOptions: {
getTeamURL: '/basic/qmsTeam/page'
},
}
},
mounted() {
this.getData();
},
methods: {
getData() {
this.$http
.get(this.urlOptions.getTeamURL, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.teamList = res.data.list
}
})
.catch(() => {
});
},
changeInput() {
console.log(this.list)
this.$emit('emitData', this.list)
}
}
}
</script>
<style lang="css">
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@@ -0,0 +1,225 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-08 15:45:08
* @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="2" 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">
<approvalProcess-add ref="addOrUpdate" @refreshDataList="successSubmit">
</approvalProcess-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">
<approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</approvalProcess-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 approvalProcessAdd from "./components/approvalProcess-add"
// import nonconform from '@/filters/nonconform'
import description from './components/description'
// import AddOrUpdate from './params-add-or-update'
import approvalProcessSearch from "./components/approvalProcessSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'approvalProcessCode',
label: i18n.t("disqualification.approvalProcessCode"),
align: 'center'
},
{
prop: 'approvalProcessName',
label: i18n.t("disqualification.approvalProcessName"),
align: 'center'
},
{
prop: 'approvalProcessType',
label: i18n.t("disqualification.approvalProcessType"),
align: 'center'
},
{
prop: 'step',
label: i18n.t("disqualification.step"),
align: 'center'
},
{
prop: 'description',
label: i18n.t("disqualification.description"),
align: 'center',
subcomponent: description,
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
approvalProcessSearch,
approvalProcessAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/nonconform/qmsApprovalProcess/page",
deleteURL: "/nonconform/qmsApprovalProcess",
exportUrl: '/nonconform/qmsApprovalProcess/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.approvalProcessCode = dataForm.approvalProcessCode
this.listQuery.approvalProcessName = dataForm.approvalProcessName
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.approvalProcessName}]进行删除操作?`, "提示", {
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.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,214 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-08 10:26:26
* @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">
<approvalProcessConfiguration-add ref="addOrUpdate" @refreshDataList="successSubmit">
</approvalProcessConfiguration-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">
<approvalProcessConfiguration-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</approvalProcessConfiguration-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 approvalProcessConfigurationAdd from "./components/approvalProcessConfiguration-add"
import nonconform from '@/filters/nonconform'
// import AddOrUpdate from './params-add-or-update'
import approvalProcessConfigurationSearch from "./components/approvalProcessConfigurationSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'inspectionTypeId',
label: i18n.t("disqualification.inspectionTypeId"),
align: 'center',
filter: nonconform('inspectionType'),
},
{
prop: 'productName',
label: i18n.t("disqualification.productName"),
align: 'center'
},
{
prop: 'disposalMethod',
label: i18n.t("disqualification.disposalMethod"),
align: 'center'
},
{
prop: 'approvalProcessName',
label: i18n.t("disqualification.approvalProcessName"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
approvalProcessConfigurationSearch,
approvalProcessConfigurationAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/nonconform/qmsApprovalProcessConfiguration/page",
deleteURL: "/nonconform/qmsApprovalProcessConfiguration",
},
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.inspectionTypeId = dataForm.inspectionTypeId
this.listQuery.productId = dataForm.productId
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.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,233 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 11:08:28
* @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="2" 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">
<dataDictionary-add ref="addOrUpdate" @refreshDataList="successSubmit">
</dataDictionary-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">
<approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</approvalProcess-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 dataDictionaryAdd from "./components/dataDictionary-add"
// import nonconform from '@/filters/nonconform'
import description from './components/description'
// import AddOrUpdate from './params-add-or-update'
import approvalProcessSearch from "./components/approvalProcessSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'dataDictionaryCode',
label: i18n.t("dictionary.code"),
align: 'center'
},
{
prop: 'dataDictionaryName',
label: i18n.t("dictionary.name"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "detail",
btnName: "详情",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
approvalProcessSearch,
dataDictionaryAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/mutual/qmsDataDictionary/page",
deleteURL: "/mutual/qmsDataDictionary",
exportUrl: '/mutual/qmsDataDictionary/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
created() {
if (this.$route.query) {
console.log(this.$route.query)
this.listQuery.moduleDataDictionaryId = this.$route.query.moduleDataDictionaryId
this.getDataList()
}
},
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.approvalProcessCode = dataForm.approvalProcessCode
this.listQuery.approvalProcessName = dataForm.approvalProcessName
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.approvalProcessName}]进行删除操作?`, "提示", {
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, this.listQuery.moduleDataDictionaryId);
});
} else if (val.type === 'detail') {
this.$router.push({
name: 'mutual-qmsDataDictionaryDetail',
query: {
dataDictionaryId: 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,222 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 13:46:47
* @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="2" 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">
<dataDictionaryDetail-add ref="addOrUpdate" @refreshDataList="successSubmit">
</dataDictionaryDetail-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">
<approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</approvalProcess-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 dataDictionaryDetailAdd from "./components/dataDictionaryDetail-add"
// import nonconform from '@/filters/nonconform'
import description from './components/description'
// import AddOrUpdate from './params-add-or-update'
import approvalProcessSearch from "./components/approvalProcessSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'dataDictionaryDetailCode',
label: i18n.t("dictionary.code"),
align: 'center'
},
{
prop: 'dataDictionaryDetailName',
label: i18n.t("dictionary.name"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
approvalProcessSearch,
dataDictionaryDetailAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/mutual/qmsDataDictionaryDetail/page",
deleteURL: "/mutual/qmsDataDictionaryDetail",
exportUrl: '/mutual/qmsDataDictionaryDetail/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
],
};
},
// components: {
// AddOrUpdate,
// },
created() {
console.log(this.$route.query)
if (this.$route.query) {
console.log(this.$route.query)
this.listQuery.dataDictionaryId = this.$route.query.dataDictionaryId
this.getDataList()
}
},
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.approvalProcessName}]进行删除操作?`, "提示", {
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.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, this.listQuery.dataDictionaryId);
});
}
},
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,219 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-09 10:11: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">
<!-- <el-badge :value="2" 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">
<moduleDataDictionary-add ref="addOrUpdate" @refreshDataList="successSubmit">
</moduleDataDictionary-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">
<approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</approvalProcess-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 moduleDataDictionaryAdd from "./components/moduleDataDictionary-add"
// import nonconform from '@/filters/nonconform'
import description from './components/description'
// import AddOrUpdate from './params-add-or-update'
import approvalProcessSearch from "./components/approvalProcessSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
const tableProps = [
{
prop: 'titleName',
label: i18n.t("dictionary.name"),
align: 'center'
},
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "detail",
btnName: "详情",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
approvalProcessSearch,
moduleDataDictionaryAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/mutual/qmsModuleDataDictionary/page",
deleteURL: "/mutual/qmsModuleDataDictionary",
exportUrl: '/mutual/qmsModuleDataDictionary/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.approvalProcessName}]进行删除操作?`, "提示", {
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);
});
} else if (val.type === 'detail') {
this.$router.push({
name: 'mutual-qmsDataDictionary',
query: {
moduleDataDictionaryId: 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,157 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-06 15:05:01
* @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,247 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-06 15:12:57
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
<el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
<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-item prop="teamId" :label="$t('disqualification.teamName')">
<el-select v-model="dataForm.teamId" :placeholder="$t('disqualification.teamName')">
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productTypeId" :label="$t('disqualification.productTypeName')">
<el-select v-model="dataForm.productTypeId" :placeholder="$t('disqualification.productTypeName')">
<el-option v-for="item in typeList" :key="item.id" :label="item.productTypeName" :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: "/nonconform/qmsApprovalDispositionTeamConfiguration",
infoURL: "/nonconform/qmsApprovalDispositionTeamConfiguration/{ id }",
getTypeListURL: '/basic/qmsProductType/page',
getTeamListURL: '/basic/qmsTeam/page'
},
typeList: [],
teamList:[],
listQuery: {
limit: 999,
page: 1
},
options: [{
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抽检'
},
],
visible: false,
dataForm: {
id: null,
productTypeId: null,
teamId:null,
inspectionTypeId: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.getTeamListURL, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.teamList = 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(`/nonconform/qmsApprovalDispositionTeamConfiguration/${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,293 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-13 16:01:55
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
<el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
<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-item prop="title" :label="$t('disqualification.title')">
<el-input v-model="dataForm.title" :placeholder="$t('disqualification.title')">
</el-input>
</el-form-item>
<el-form-item prop="productCode" :label="$t('disqualification.productCode')">
<el-input v-model="dataForm.productCode" :placeholder="$t('disqualification.productCode')">
</el-input>
</el-form-item>
<el-form-item prop="orderNumber" :label="$t('disqualification.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('disqualification.orderNumber')">
</el-input>
</el-form-item>
<el-form-item prop="batchNo" :label="$t('disqualification.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('disqualification.batchNo')">
</el-input>
</el-form-item>
<el-form-item prop="remark" :label="$t('disqualification.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('disqualification.remark')">
</el-input>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('disqualification.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('disqualification.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="productId" :label="$t('disqualification.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('disqualification.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :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: "/nonconform/qmsApprovalDispositionTeamConfiguration",
infoURL: "/nonconform/qmsApprovalDispositionTeamConfiguration/{ id }",
// getTypeListURL: '/basic/qmsProductType/page',
// getTeamListURL: '/basic/qmsTeam/page',
getProductURL: '/basic/qmsProduct/page',
getSupplierListURL: '/supplier/qmsSupplier/page'
},
supplierList:[],
productList:[],
typeList: [],
teamList:[],
listQuery: {
limit: 999,
page: 1
},
options: [{
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抽检'
},
],
visible: false,
dataForm: {
id: null,
productId: null,
productCode: null,
orderNumber: null,
batchNo: null,
supplierId: null,
title:null,
reportTime: null,
userName:null,
disposalStatus: null,
disposalMethod: null,
disposalTime: null,
remark: null,
inspectionTypeId: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.getSupplierListURL, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data)
this.productList = 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(`/nonconform/qmsApprovalDispositionTeamConfiguration/${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,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,206 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-18 16: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" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<approvalDispositionTeamConfiguration-add ref="addOrUpdate" @refreshDataList="successSubmit">
</approvalDispositionTeamConfiguration-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 approvalDispositionTeamConfigurationAdd from "./components/approvalDispositionTeamConfiguration-add"
import nonconform from '@/filters/nonconform'
// 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: 'inspectionTypeId',
label: i18n.t("disqualification.inspectionTypeId"),
align: 'center',
filter: nonconform('inspectionType'),
},
{
prop: 'productTypeName',
label: i18n.t("disqualification.productTypeName"),
align: 'center'
},
{
prop: 'teamName',
label: i18n.t("disqualification.teamName"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
approvalDispositionTeamConfigurationAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/nonconform/qmsApprovalDispositionTeamConfiguration/page",
deleteURL: "/nonconform/qmsApprovalDispositionTeamConfiguration",
},
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.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -0,0 +1,272 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-04-07 15:31: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">
<nonconformityReviewSheet-add ref="addOrUpdate" @refreshDataList="successSubmit">
</nonconformityReviewSheet-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 nonconformityReviewSheetAdd from "./components/nonconformityReviewSheet-add"
import nonconform from '@/filters/nonconform'
// 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("disqualification.title"),
align: 'center'
},
{
prop: 'productCode',
label: i18n.t("disqualification.productCode"),
align: 'center'
},
{
prop: 'productName',
label: i18n.t("disqualification.productName"),
align: 'center'
},
{
prop: 'orderNumber',
label: i18n.t("disqualification.orderNumber"),
align: 'center'
},
{
prop: 'batchNo',
label: i18n.t("disqualification.batchNo"),
align: 'center'
},
{
prop: 'inspectionTypeId',
label: i18n.t("disqualification.inspectionTypeId"),
align: 'center',
filter: nonconform('inspectionType'),
},
{
prop: 'supplierName',
label: i18n.t("disqualification.supplierName"),
align: 'center'
},
{
prop: 'reportTime',
label: i18n.t("disqualification.reportTime"),
align: 'center'
},
{
prop: 'userName',
label: i18n.t("disqualification.userName"),
align: 'center'
},
{
prop: 'disposalStatus',
label: i18n.t("disqualification.disposalStatus"),
align: 'center'
},
{
prop: 'productTypeName',
label: i18n.t("disqualification.productTypeName"),
align: 'center'
},
{
prop: 'disposalMethod',
label: i18n.t("disqualification.disposalMethod"),
align: 'center'
},
{
prop: 'disposalTime',
label: i18n.t("disqualification.disposalTime"),
align: 'center'
},
{
prop: 'remark',
label: i18n.t("disqualification.remark"),
align: 'center'
}
]
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
nonconformityReviewSheetAdd
},
data() {
return {
urlOptions: {
getDataListURL: "/nonconform/qmsNonconformityReviewSheet/approvePage",
deleteURL: "/nonconform/qmsNonconformityReviewSheet",
exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
},
tableProps,
tableBtn,
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'),
name: "add",
color: "primary",
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
},
{
type: "button",
btnName: i18n.t('search'),
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.getDataList();
break;
case "export":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
this.exportHandl();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

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>

View File

@@ -0,0 +1,41 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-17 10:59:15
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag v-if="injectData.supplierTypeStatus === 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,233 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-19 15:29:42
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="evaluationTemplateId" :label="$t('supplier.evaluationTemplateName')">
<el-select v-model="dataForm.evaluationTemplateId" :placeholder="$t('supplier.evaluationTemplateName')"
@change="getProductCode">
<el-option v-for="item in templateList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="evaluationType" :label="$t('supplier.evaluationType')">
<el-select v-model="dataForm.evaluationType" :placeholder="$t('supplier.evaluationType')">
<el-option v-for="item in evaluationTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="title" :label="$t('supplier.title')">
<el-input v-model="dataForm.title" :placeholder="$t('supplier.title')">
</el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('supplier.description')">
<el-input v-model="dataForm.description" :placeholder="$t('supplier.description')">
</el-input>
</el-form-item>
<el-form-item prop="startTime" :label="$t('supplier.startTime')">
<el-date-picker v-model="dataForm.startTime" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('supplier.startTime')">
</el-date-picker>
</el-form-item>
<el-form-item prop="evaluationPeriod" :label="$t('supplier.evaluationPeriod')">
<el-date-picker v-model="dataForm.evaluationPeriod" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('supplier.evaluationPeriod')">
</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 {
templateList:[],
urlOptions: {
submitURL: "/supplier/qmsEvaluationTask",
infoURL: "/supplier/qmsEvaluationTask/{id}",
getSupplierListURL: '/supplier/qmsSupplier/page',
getTemplateListURL: '/supplier/qmsEvaluationTask/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
supplierList:null,
enterpriseNatureList: [
{
value: 0,
label: '私营'
},
{
value: 1,
label: '国有'
},
{
value: 2,
label: '外资'
},
{
value: 3,
label: '其他'
}
],
evaluationTypeList: [
{
id: 0,
name: '年度'
},
{
id: 1,
name: '1季度'
},
{
id: 2,
name: '月度'
}
],
supplierTypeList: [],
productList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
title: null,
supplierId: null,
evaluationPeriod:null,
evaluationType:null,
evaluationTemplateId: null,
startTime: null,
description: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: {
getProductCode(val) {
this.productList.forEach(ele => {
if (val === ele.id) {
this.dataForm.productCode = ele.productCode
}
});
},
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();
} else {
this.getCode()
}
});
},
getCode() {
this.$http
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getTemplateListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.templateList = res.data.list
}
})
.catch(() => {
})
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsEvaluationTask/${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: () => {
this.visible = false
this.$emit("successSubmit")
},
})
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@@ -0,0 +1,78 @@
<!--
* @Author: zhp
* @Date: 2023-04-18 09:19:02
* @LastEditTime: 2023-04-18 14:24:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-popover placement="right" width="400" trigger="click">
<base-table id="palletTable" :table-props="tableProps" ref="palletTable1"
:table-data="tableData" >
</base-table>
<i slot="reference" class="el-icon-plus" @click="showInnerTable(injectData.id)"/>
</el-popover>
</template>
<script>
import i18n from "@/i18n"
const tableProps = [
{
prop: "contact",
label: i18n.t('supplier.contact'),
},
{
prop: "contactEmail",
label: i18n.t('supplier.contactEmail')
},
{
prop: "contactPhone",
label: i18n.t('supplier.contactPhone')
},
{
prop: "enterpriseNature",
label: i18n.t('supplier.enterpriseNature')
},
{
prop: "industry",
label: i18n.t('supplier.industry')
},
{
prop: "productService",
label: i18n.t('supplier.productService')
}
];
export default {
name: 'InnerTable',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
tableProps,
list: this.injectData,
tableData: []
}
},
methods: {
showInnerTable(id) {
console.log(id)
this.tableData = [
{
contact: this.injectData.contact,
contactEmail: this.injectData.contactEmail,
contactPhone: this.injectData.contactPhone,
enterpriseNature: this.injectData.enterpriseNature,
industry: this.injectData.industry,
productService: this.injectData.productService
}
]
}
}
}
</script>

View File

@@ -0,0 +1,45 @@
<!--
* @Author: zhp
* @Date: 2023-04-18 09:11:41
* @LastEditTime: 2023-04-18 09:11:41
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="tableInner">
<el-input v-model="list[itemProp]" @blur="changeInput" />
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
list: this.injectData
}
},
methods: {
changeInput() {
console.log(this.list)
this.$emit('emitData', this.list)
}
}
}
</script>
<style lang="css">
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@@ -0,0 +1,68 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-04 14:56:08
* @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.getDataList();
},
});
} 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,221 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-19 14:20:14
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="productId" :label="$t('supplier.materialName')">
<el-select v-model="dataForm.productId" :placeholder="$t('supplier.materialName')" @change="getProductCode">
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productCode" :label="$t('supplier.materialCode')">
<el-input v-model="dataForm.productCode" :placeholder="$t('supplier.materialCode')" disabled>
</el-input>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('supplier.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('supplier.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="supplierBatch" :label="$t('supplier.supplierBatch')">
<el-input v-model="dataForm.supplierBatch" :placeholder="$t('supplier.supplierBatch')">
</el-input>
</el-form-item>
<el-form-item prop="offlineTime" :label="$t('supplier.offlineTime')">
<el-date-picker v-model="dataForm.offlineTime" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('supplier.offlineTime')">
</el-date-picker>
</el-form-item>
<el-form-item prop="defectiveQuantity" :label="$t('supplier.defectiveQuantity')">
<el-input v-model="dataForm.defectiveQuantity" :placeholder="$t('supplier.defectiveQuantity')">
</el-input>
</el-form-item>
<el-form-item prop="undesirablePhenomena" :label="$t('supplier.undesirablePhenomena')">
<el-input v-model="dataForm.undesirablePhenomena" :placeholder="$t('supplier.undesirablePhenomena')">
</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: "/supplier/qmsPoorLaunch",
infoURL: "/supplier/qmsPoorLaunch/{id}",
getProductListURL: '/basic/qmsProduct/page',
getSupplierListURL: '/supplier/qmsSupplier/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
supplierList:null,
enterpriseNatureList: [
{
value: 0,
label: '私营'
},
{
value: 1,
label: '国有'
},
{
value: 2,
label: '外资'
},
{
value: 3,
label: '其他'
}
],
supplierTypeList: [],
productList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
productId: null,
supplierId: null,
supplierBatch:null,
productCode:null,
offlineTime: null,
defectiveQuantity: null,
undesirablePhenomena: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: {
getProductCode(val) {
this.productList.forEach(ele => {
if (val === ele.id) {
this.dataForm.productCode = ele.productCode
}
});
},
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();
} else {
this.getCode()
}
});
},
getCode() {
this.$http
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.list
}
})
.catch(() => {
})
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsPoorLaunch/${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,251 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-18 15:40:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="productId" :label="$t('supplier.materialName')">
<el-select v-model="dataForm.productId" :placeholder="$t('supplier.materialName')" @change="getProductCode">
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productCode" :label="$t('supplier.materialCode')">
<el-input v-model="dataForm.productCode" :placeholder="$t('supplier.materialCode')" disabled>
</el-input>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('supplier.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('supplier.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="problemBatch" :label="$t('supplier.problemBatch')">
<el-input v-model="dataForm.problemBatch" :placeholder="$t('supplier.problemBatch')">
</el-input>
</el-form-item>
<el-form-item prop="applicationDate" :label="$t('supplier.applicationDate')">
<el-date-picker v-model="dataForm.applicationDate" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('supplier.applicationDate')">
</el-date-picker>
</el-form-item>
<el-form-item prop="lostHour" :label="$t('supplier.lostHour')">
<el-input v-model="dataForm.lostHour" :placeholder="$t('supplier.lostHour')">
</el-input>
</el-form-item>
<el-form-item prop="place" :label="$t('supplier.place')">
<el-input v-model="dataForm.place" :placeholder="$t('supplier.place')">
</el-input>
</el-form-item>
<el-form-item prop="causeAnalysis" :label="$t('supplier.causeAnalysis')">
<el-input v-model="dataForm.causeAnalysis" :placeholder="$t('supplier.causeAnalysis')">
</el-input>
</el-form-item>
<el-form-item prop="everlastMeasures" :label="$t('supplier.everlastMeasures')">
<el-input v-model="dataForm.everlastMeasures" :placeholder="$t('supplier.everlastMeasures')">
</el-input>
</el-form-item>
<el-form-item prop="interimMeasures" :label="$t('supplier.interimMeasures')">
<el-input v-model="dataForm.interimMeasures" :placeholder="$t('supplier.interimMeasures')">
</el-input>
</el-form-item>
<el-form-item prop="problemDescription" :label="$t('supplier.problemDescription')">
<el-input v-model="dataForm.problemDescription" :placeholder="$t('supplier.problemDescription')">
</el-input>
</el-form-item>
<el-form-item prop="closedLoop" :label="$t('supplier.closedLoop')">
<el-switch v-model="dataForm.closedLoop" :active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="rejectionRate" :label="$t('supplier.rejectionRate')">
<el-input v-model="dataForm.rejectionRate" :placeholder="$t('supplier.rejectionRate')">
</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: "/supplier/qmsQualityAccident",
infoURL: "/supplier/qmsQualityAccident/{id}",
getProductListURL: '/basic/qmsProduct/page',
getSupplierListURL: '/supplier/qmsSupplier/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
supplierList:null,
enterpriseNatureList: [
{
value: 0,
label: '私营'
},
{
value: 1,
label: '国有'
},
{
value: 2,
label: '外资'
},
{
value: 3,
label: '其他'
}
],
supplierTypeList: [],
productList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
productId: null,
supplierId: null,
applicationDate:null,
causeAnalysis:null,
closedLoop: null,
everlastMeasures: null,
interimMeasures:null,
lostHour: null,
place: null,
problemBatch: null,
problemDescription: null,
rejectionRate: 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: {
getProductCode(val) {
this.productList.forEach(ele => {
if (val === ele.id) {
this.dataForm.productCode = ele.productCode
}
});
},
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();
} else {
this.getCode()
}
});
},
getCode() {
this.$http
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.list
}
})
.catch(() => {
})
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsQualityAccident/${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,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,250 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-18 14:21:19
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="code" :label="$t('supplier.code')">
<el-input v-model="dataForm.code" :placeholder="$t('supplier.code')" />
</el-form-item>
<el-form-item prop="name" :label="$t('supplier.name')">
<el-input v-model="dataForm.name" :placeholder="$t('supplier.name')">
</el-input>
</el-form-item>
<el-form-item prop="abbreviation" :label="$t('supplier.abbreviation')">
<el-input v-model="dataForm.abbreviation" :placeholder="$t('supplier.abbreviation')">
</el-input>
</el-form-item>
<el-form-item prop="supplierTypeId" :label="$t('supplier.supplierType')">
<el-select v-model="dataForm.supplierTypeId" :placeholder="$t('supplier.supplierType')">
<el-option v-for="item in supplierTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="address" :label="$t('supplier.address')">
<el-input v-model="dataForm.address" :placeholder="$t('supplier.address')">
</el-input>
</el-form-item>
<el-form-item prop="ment" :label="$t('supplier.ment')">
<el-select v-model="dataForm.ment" :placeholder="$t('supplier.ment')">
<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-item prop="contact" :label="$t('supplier.contact')">
<el-input v-model="dataForm.contact" :placeholder="$t('supplier.contact')">
</el-input>
</el-form-item>
<el-form-item prop="contactEmail" :label="$t('supplier.contactEmail')">
<el-input v-model="dataForm.contactEmail" :placeholder="$t('supplier.contactEmail')">
</el-input>
</el-form-item>
<el-form-item prop="contactPhone" :label="$t('supplier.contactPhone')">
<el-input v-model="dataForm.contactPhone" :placeholder="$t('supplier.contactPhone')">
</el-input>
</el-form-item>
<el-form-item prop="enterpriseNature" :label="$t('supplier.enterpriseNature')">
<el-select v-model="dataForm.enterpriseNature" :placeholder="$t('supplier.enterpriseNature')">
<el-option v-for="item in enterpriseNatureList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="industry" :label="$t('supplier.industry')">
<el-input v-model="dataForm.industry" :placeholder="$t('supplier.industry')">
</el-input>
</el-form-item>
<el-form-item prop="productService" :label="$t('supplier.productService')">
<el-input v-model="dataForm.productService" :placeholder="$t('supplier.productService')">
</el-input>
</el-form-item>
<!-- <el-form-item prop="productTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.productTypeStatus" :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: "/supplier/qmsSupplier",
infoURL: "/supplier/qmsSupplier/{id}",
// getProductListURL: '/basic/qmsProduct/page',
getCodeURL: '/supplier/qmsSupplier/getCode',
getSupplierTypeListURL: '/supplier/qmsSupplierType/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
enterpriseNatureList: [
{
value: 0,
label: '私营'
},
{
value: 1,
label: '国有'
},
{
value: 2,
label: '外资'
},
{
value: 3,
label: '其他'
}
],
supplierTypeList: [],
productList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
code:null,
supplierId:null,
productId: null,
ment: null,
supplierTypeId:null,
name:null,
address: null,
abbreviation: null,
grade: null,
contact:null,
contactEmail:null,
contactPhone: null,
enterpriseNature: null,
industry: null,
productService: 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 || ""
// 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.data);
this.dataForm.code = res.data
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getSupplierTypeListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.supplierTypeList = res.data.list
}
})
.catch(() => {
})
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsSupplier/${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,176 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-18 09:36:39
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="productId" :label="$t('supplier.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('supplier.productName')">
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('supplier.supplierName')">
<el-select v-model="dataForm.supplierList" :placeholder="$t('supplier.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="productTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.productTypeStatus" :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: "/supplier/qmsSupplierType",
infoURL: "/supplier/qmsSupplierType/{id}",
getProductListURL: '/basic/qmsProduct/page',
// getCodeURL: '/supplier/qmsSupplierType/getCode',
getSupplierListURL: '/supplier/qmsSupplier/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
supplierList: [],
productList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
supplierId:null,
productId: 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 || ""
// 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
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery } )
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.supplierList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.productList = res.data.list
}
})
.catch(() => {
})
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsSupplierType/${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,125 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:44:31
* @LastEditTime: 2023-04-14 16:29:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="supplierName" :label="$t('supplier.supplierName')">
<el-input v-model="dataForm.supplierName" :placeholder="$t('supplier.supplierName')" clearable></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",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
supplierName: null
},
};
},
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(() => {});
// },
// 表单提交
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,175 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-17 10:56:39
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<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-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="supplierTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.supplierTypeStatus" :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-item prop="productTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.productTypeStatus" :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: "/supplier/qmsSupplierType",
infoURL: "/supplier/qmsSupplierType/{id}",
getCodeURL: '/supplier/qmsSupplierType/getCode',
// getTypeListURL: '/basic/qmsProductType/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
typeList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
code:null,
name: null,
supplierTypeStatus: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 || ""
// 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.code = res.data
}
})
.catch(() => {
});
// 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(() => {
// });
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsSupplierType/${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,129 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:44:31
* @LastEditTime: 2023-04-14 16:29:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="code" :label="$t('basic.code')">
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
</el-form-item>
<el-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></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",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
name: null,
code: null
},
};
},
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(() => {});
// },
// 表单提交
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,246 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-04-24 14:27:08
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<!-- <div class="mod-sys__user"> -->
<el-input v-model="name" :placeholder="$t('supplier.title')" style="width:300px" @blur="handleAdd"
@keyup.enter.native="handleAdd">
</el-input>
<!-- </div> -->
<el-card class="box-card" style="width:600px">
<div slot="header" class="clearfix">
<span> </span>
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-edit" />
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-delete" />
</div>
<span v-for="o in 4" :key="o" class="text item">
{{'列表内容 ' + o }}
</span>
</el-card>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import basicSearch from "@/mixins/basic-search"
// import supplierProductSearch from "./components/supplierProductSearch.vue"
// import evaluationTaskAdd from "./components/evaluationTask-add.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "/supplier/qmsEvaluationItemListLabel/page",
deleteURL: "/supplier/qmsEvaluationTask",
exportURL: '/supplier/qmsEvaluationTask/export',
getSupplierListURL: '/supplier/qmsSupplier/page',
getTemplateListURL: '/supplier/qmsEvaluationTask/page'
// submitURL: '/supplier/qmsSupplierType'
},
name: '',
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'select',
label: i18n.t('supplier.supplierName'),
selectOptions: [],
param: 'supplierName',
clearable: true,
filterable: true,
},
{
type: 'select',
label: i18n.t('supplier.evaluationTemplateName'),
selectOptions: [],
param: 'evaluationTemplateId',
clearable: true,
filterable: true,
},
{
type: 'datePicker',
label: i18n.t('supplier.startTime'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
},
methods: {
//search-bar点击
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
handleAdd() {
const data = {
name: this.name
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, data)
.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("successSubmit")
},
})
})
},
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.supplierName = dataForm.supplierName
this.listQuery.page = 1;
this.getDataList();
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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,363 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-04-19 14:30:08
* @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>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
@emitFun="inputChange" @emitButtonClick="emitButtonClick" :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">
<evaluationTask-add ref="addOrUpdate" @refreshDataList="successSubmit">
</evaluationTask-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">
<supplierProduct-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</supplierProduct-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 supplierProductSearch from "./components/supplierProductSearch.vue"
import evaluationTaskAdd from "./components/evaluationTask-add.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "evaluationType",
label: i18n.t('supplier.evaluationType')
},
{
prop: "title",
label: i18n.t('supplier.title')
},
{
prop: "evaluationTemplateName",
label: i18n.t('supplier.evaluationTemplateName')
},
{
prop: "evaluationPeriod",
label: i18n.t('supplier.evaluationPeriod')
},
{
prop: "description",
label: i18n.t('supplier.description'),
filter: timeFormatter
},
{
prop: "startTime",
label: i18n.t('supplier.startTime')
}
];
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: "/supplier/qmsEvaluationTask/page",
deleteURL: "/supplier/qmsEvaluationTask",
exportURL: '/supplier/qmsEvaluationTask/export',
getSupplierListURL: '/supplier/qmsSupplier/page',
getTemplateListURL: '/supplier/qmsEvaluationTask/page'
// submitURL: '/supplier/qmsSupplierType'
},
tableProps,
ment: '',
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'select',
label: i18n.t('supplier.supplierName'),
selectOptions: [],
param: 'supplierName',
clearable: true,
filterable: true,
},
{
type: 'select',
label: i18n.t('supplier.evaluationTemplateName'),
selectOptions: [],
param: 'evaluationTemplateId',
clearable: true,
filterable: true,
},
{
type: 'datePicker',
label: i18n.t('supplier.startTime'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
supplierProductSearch,
// supplierProduct,
evaluationTaskAdd
},
mounted () {
this.getData();
},
methods: {
inputChange(val) {
console.log('=======')
console.log(val)
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
console.log(this.tableData)
},
emitButtonClick() {
console.log('emitButtonClick')
let obj = {}
for (let i of this.tableData) {
obj[i.prop] = ''
}
this.tableData.push(obj)
},
getData() {
this.$http
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.formConfig[0].selectOptions = res.data.list.map((item) => {
return {
id: item.name,
name: item.name,
}
})
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getTemplateListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.formConfig[1].selectOptions = res.data.list
}
})
.catch(() => {
})
},
//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();
});
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.supplierName = dataForm.supplierName
this.listQuery.page = 1;
this.getDataList();
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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.evaluationTemplateId = val.evaluationTemplateId ? val.evaluationTemplateId : undefined
// this.listQuery.supplierBatch = val.supplierBatch ? val.supplierBatch : undefined
this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : undefined
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : undefined
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,354 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-04-18 15:20:13
* @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>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
@emitFun="inputChange" @emitButtonClick="emitButtonClick" :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">
<poorLaunch-add ref="addOrUpdate" @refreshDataList="successSubmit">
</poorLaunch-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">
<supplierProduct-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</supplierProduct-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 supplierProductSearch from "./components/supplierProductSearch.vue"
import poorLaunchAdd from "./components/poorLaunch-add.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "productName",
label: i18n.t('supplier.materialName')
},
{
prop: "productCode",
label: i18n.t('supplier.materialCode')
},
{
prop: "supplierName",
label: i18n.t('supplier.supplierName')
},
{
prop: "supplierBatch",
label: i18n.t('supplier.supplierBatch')
},
{
prop: "offlineTime",
label: i18n.t('supplier.offlineTime'),
filter: timeFormatter
},
{
prop: "defectiveQuantity",
label: i18n.t('supplier.defectiveQuantity')
},
{
prop: "undesirablePhenomena",
label: i18n.t('supplier.undesirablePhenomena')
}
];
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: "/supplier/qmsPoorLaunch/page",
deleteURL: "/supplier/qmsPoorLaunch",
exportURL: '/supplier/qmsPoorLaunch/export',
getSupplierListURL: '/supplier/qmsSupplier/page'
// submitURL: '/supplier/qmsSupplierType'
},
tableProps,
ment: '',
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('supplier.materialName'),
placeholder: i18n.t('supplier.materialName'),
param: 'productName'
},
{
type: 'input',
label: i18n.t('supplier.supplierBatch'),
placeholder: i18n.t('supplier.supplierBatch'),
param: 'supplierBatch'
},
{
type: 'select',
label: i18n.t('supplier.supplierName'),
selectOptions: [],
param: 'supplierName',
clearable: true,
filterable: true,
},
{
type: 'datePicker',
label: i18n.t('supplier.offlineTime'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
supplierProductSearch,
// supplierProduct,
poorLaunchAdd
},
mounted () {
this.getData();
},
methods: {
inputChange(val) {
console.log('=======')
console.log(val)
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
console.log(this.tableData)
},
emitButtonClick() {
console.log('emitButtonClick')
let obj = {}
for (let i of this.tableData) {
obj[i.prop] = ''
}
this.tableData.push(obj)
},
getData() {
this.$http
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.formConfig[2].selectOptions = res.data.list
}
})
.catch(() => {
})
},
//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();
});
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.supplierName = dataForm.supplierName
this.listQuery.page = 1;
this.getDataList();
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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.productName = val.productName ? val.productName : undefined
this.listQuery.supplierBatch = val.supplierBatch ? val.supplierBatch : undefined
this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : undefined
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : undefined
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,391 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-04-18 16:11:41
* @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>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
@emitFun="inputChange" @emitButtonClick="emitButtonClick" :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">
<qualityAccident-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qualityAccident-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">
<supplierProduct-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</supplierProduct-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 supplierProductSearch from "./components/supplierProductSearch.vue"
import qualityAccidentAdd from "./components/qualityAccident-add.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
import supplier from '@/filters/supplier'
// import i18n from "@/i18n";
const tableProps = [
{
prop: "applicationDate",
label: i18n.t('supplier.applicationDate'),
filter: timeFormatter
},
{
prop: "productName",
label: i18n.t('supplier.productName')
},
{
prop: "productCode",
label: i18n.t('supplier.productCode')
},
{
prop: "supplierName",
label: i18n.t('supplier.supplierName')
},
{
prop: "lostHour",
label: i18n.t('supplier.lostHour')
},
{
prop: "place",
label: i18n.t('supplier.place')
},
{
prop: "problemBatch",
label: i18n.t('supplier.problemBatch')
},
{
prop: "problemDescription",
label: i18n.t('supplier.problemDescription')
},
{
prop: "rejectionRate",
label: i18n.t('supplier.rejectionRate')
},
{
prop: "closedLoop",
label: i18n.t('supplier.closedLoop'),
filter: supplier('whether'),
}
];
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: "/supplier/qmsQualityAccident/page",
deleteURL: "/supplier/qmsQualityAccident",
exportURL: '/supplier/qmsQualityAccident/export',
getSupplierListURL: '/supplier/qmsSupplier/page'
// submitURL: '/supplier/qmsSupplierType'
},
tableProps,
closedLoop:null,
ment: '',
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('supplier.materialName'),
placeholder: i18n.t('supplier.materialName'),
param: 'productName'
},
{
type: 'select',
label: i18n.t('supplier.supplierName'),
selectOptions: [],
param: 'supplierName',
clearable: true,
filterable: true,
},
{
type: 'select',
label: i18n.t('supplier.closedLoop'),
selectOptions: [
{
id: '',
name:'全部'
},
{
id: 0,
name: '否'
},
{
id: 1,
name: '是'
}
],
param: 'closedLoop',
clearable: true,
filterable: true,
},
{
type: 'input',
label: i18n.t('supplier.problemDescription'),
placeholder: i18n.t('supplier.problemDescription'),
param: 'problemDescription'
},
{
type: 'datePicker',
label: i18n.t('supplier.applicationDate'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
// plain: true,
}
],
};
},
components: {
supplierProductSearch,
// supplierProduct,
qualityAccidentAdd
},
mounted () {
this.getData();
},
methods: {
inputChange(val) {
console.log('=======')
console.log(val)
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
console.log(this.tableData)
},
emitButtonClick() {
console.log('emitButtonClick')
let obj = {}
for (let i of this.tableData) {
obj[i.prop] = ''
}
this.tableData.push(obj)
},
getData() {
this.$http
.get(this.urlOptions.getSupplierListURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.formConfig[1].selectOptions = res.data.list
}
})
.catch(() => {
})
},
//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();
});
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.supplierName = dataForm.supplierName
this.listQuery.page = 1;
this.getDataList();
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.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.productName = val.productName ? val.productName : undefined
this.listQuery.problemDescription = val.problemDescription ? val.problemDescription : undefined
this.listQuery.closedLoop = closedLoop ? closedLoop : undefined
this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : undefined
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : undefined
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

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