模块更新
This commit is contained in:
40
src/views/modules/quality/components/normalToRelaxed.vue
Normal file
40
src/views/modules/quality/components/normalToRelaxed.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 15:00:47
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.normalToRelaxedOne }} 批中{{ injectData.normalToRelaxedTwo }} 批检验不合格
|
||||
</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>
|
||||
40
src/views/modules/quality/components/normalToTightened.vue
Normal file
40
src/views/modules/quality/components/normalToTightened.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 14:42:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.normalToTightenedOne}} 批中{{ injectData.normalToTightenedTwo }} 批检验不合格
|
||||
</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>
|
||||
40
src/views/modules/quality/components/relaxedToNormal.vue
Normal file
40
src/views/modules/quality/components/relaxedToNormal.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 15:05:00
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.relaxedToNormalOne }} 批中{{ injectData.relaxedToNormalTwo }} 批检验不合格
|
||||
</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>
|
||||
47
src/views/modules/quality/components/tightenedToNormal.vue
Normal file
47
src/views/modules/quality/components/tightenedToNormal.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-24 14:55:36
|
||||
* @LastEditTime: 2023-05-24 14:57:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 14:42:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.tightenedToNormalOne }} 批中{{ injectData.tightenedToNormalTwo }} 批检验不合格
|
||||
</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>
|
||||
300
src/views/modules/quality/components/transferRecords-add.vue
Normal file
300
src/views/modules/quality/components/transferRecords-add.vue
Normal file
@@ -0,0 +1,300 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-24 16:36:43
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||
<el-form-item prop="inspectionStage" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionStage" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionStageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('quality.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('quality.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('quality.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('quality.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferOutId" :label="$t('quality.transferOutName')">
|
||||
<el-select v-model="dataForm.transferOutId" :placeholder="$t('quality.transferOutName')">
|
||||
<el-option v-for="item in transferSchemeList" :key="item.id" :label="item.transferSchemeName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferInId" :label="$t('quality.transferInName')">
|
||||
<el-select v-model="dataForm.transferInId" :placeholder="$t('quality.transferInName')">
|
||||
<el-option v-for="item in transferSchemeList" :key="item.id" :label="item.transferSchemeName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="dataSources" :label="$t('quality.dataSources')">
|
||||
<el-input v-model="dataForm.dataSources" :placeholder="$t('quality.dataSources')"></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/qmsTransferRecords",
|
||||
getSupplierList: "/supplier/qmsSupplier/page",
|
||||
getProductList: "/basic/qmsProduct/page",
|
||||
infoURL: "/quality/qmsTransferRecords/{id}",
|
||||
getTransferSchemeListURL: '/quality/qmsTransferScheme/page'
|
||||
},
|
||||
supplierList: [],
|
||||
productList: [],
|
||||
transferSchemeList:[],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
inspectionStageList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '进货检验 ',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '成品检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '出货检验',
|
||||
}
|
||||
],
|
||||
inspectionTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '监控',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'IQC抽检',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'IQC抽检2',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '原料抽检',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '进货外观检验',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '库内原料检验',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: ' 来料检验',
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '胶片',
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: ' 抽检',
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: '巡检 ',
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: '首检',
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: '末检',
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: '实时监测',
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: 'FQC抽检',
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: 'OQC抽检',
|
||||
}
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
inspectionStage:null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
supplierId: null,
|
||||
supplierName: null,
|
||||
dataSources: null,
|
||||
transferInId: null,
|
||||
transferInName: null,
|
||||
transferOutId: 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()
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.$http.post(this.urlOptions.getSupplierList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.post(this.urlOptions.getProductList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.post(this.urlOptions.getTransferSchemeListURL)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.transferSchemeList = 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(`/quality/qmsTransferRecords/${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>
|
||||
267
src/views/modules/quality/components/transferRecordsSearch.vue
Normal file
267
src/views/modules/quality/components/transferRecordsSearch.vue
Normal file
@@ -0,0 +1,267 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-24 16:39:37
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item :label="$t('quality.transferTime')" 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-item prop="inspectionStage" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionStage" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionStageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('quality.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('quality.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('quality.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('quality.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</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",
|
||||
// },
|
||||
inspectionStageList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '进货检验 ',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '成品检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '出货检验',
|
||||
}
|
||||
],
|
||||
inspectionTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '监控',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'IQC抽检',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'IQC抽检2',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '原料抽检',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '进货外观检验',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '库内原料检验',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: ' 来料检验',
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '胶片',
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: ' 抽检',
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: '巡检 ',
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: '首检',
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: '末检',
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: '实时监测',
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: 'FQC抽检',
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: 'OQC抽检',
|
||||
}
|
||||
],
|
||||
urlOptions: {
|
||||
getSupplierList: "/supplier/qmsSupplier/page",
|
||||
getProductList: "/basic/qmsProduct/page",
|
||||
},
|
||||
visible: false,
|
||||
customerTypeList:{},
|
||||
dataForm: {
|
||||
timeSlot:null,
|
||||
inspectionStage:null,
|
||||
inspectionTypeId: null,
|
||||
productId: null,
|
||||
supplierId: null,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$http.post(this.urlOptions.getSupplierList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.post(this.urlOptions.getProductList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
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>
|
||||
190
src/views/modules/quality/components/transferScheme-add.vue
Normal file
190
src/views/modules/quality/components/transferScheme-add.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-24 15:48:18
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :rules="dataRule" :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
|
||||
label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="transferSchemeCode" :label="$t('quality.code')">
|
||||
<el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('quality.code')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="transferSchemeName" :label="$t('quality.name')">
|
||||
<el-input v-model="dataForm.transferSchemeName" :placeholder="$t('quality.name')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(1)正常检查转入放宽检查:最近
|
||||
<el-input v-model="dataForm.normalToRelaxedOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.normalToRelaxedTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(2)放宽检查恢复正常检查:最近
|
||||
<el-input v-model="dataForm.relaxedToNormalOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.relaxedToNormalTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(3)正常检查转入加严检查:最近
|
||||
<el-input v-model="dataForm.normalToTightenedOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.normalToTightenedTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(4)加严检查恢复正常检查:最近
|
||||
<el-input v-model="dataForm.tightenedToNormalOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.tightenedToNormalTwo" style="width: 10%;">
|
||||
</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/qmsTransferScheme",
|
||||
infoURL: "/quality/qmsTransferScheme/{id}",
|
||||
getCodeURL: "/quality/qmsTransferScheme/getCode"
|
||||
},
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
visible: false,
|
||||
dataRule:{
|
||||
transferSchemeName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("quality.name"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
transferSchemeCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("quality.code"),
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
},
|
||||
dataForm: {
|
||||
id: null,
|
||||
transferSchemeCode: null,
|
||||
normalToRelaxedOne: null,
|
||||
normalToRelaxedTwo: null,
|
||||
normalToTightenedOne: null,
|
||||
normalToTightenedTwo: null,
|
||||
relaxedToNormalOne: null,
|
||||
relaxedToNormalTwo: null,
|
||||
tightenedToNormalOne: null,
|
||||
tightenedToNormalTwo: null,
|
||||
transferSchemeName: null
|
||||
},
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
|
||||
// },
|
||||
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.transferSchemeCode = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/quality/qmsTransferScheme/${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>
|
||||
137
src/views/modules/quality/components/transferSchemeSearch.vue
Normal file
137
src/views/modules/quality/components/transferSchemeSearch.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-24 16:01:06
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="transferSchemeCode" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('basic.code')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferSchemeName" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.transferSchemeName" :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: {
|
||||
transferSchemeName: null,
|
||||
transferSchemeCode: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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
// 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>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 14:29:43
|
||||
* @LastEditTime: 2023-05-24 15:54:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -255,7 +255,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@@ -272,7 +273,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 16:21:38
|
||||
* @LastEditTime: 2023-05-24 15:54:07
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -182,7 +182,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@@ -199,7 +200,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 16:15:42
|
||||
* @LastEditTime: 2023-05-24 15:53:39
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -176,7 +176,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@@ -193,7 +194,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 15:54:53
|
||||
* @LastEditTime: 2023-05-24 15:53:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -246,7 +246,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@@ -263,7 +264,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
||||
234
src/views/modules/quality/qmsTransferRecords.vue
Normal file
234
src/views/modules/quality/qmsTransferRecords.vue
Normal file
@@ -0,0 +1,234 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 16:38: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="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">
|
||||
<transferRecords-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</transferRecords-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">
|
||||
<transferRecords-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</transferRecords-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 transferRecordsAdd from "./components/transferRecords-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import transferRecordsSearch from "./components/transferRecordsSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'productName',
|
||||
label: i18n.t("quality.productName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'supplierName',
|
||||
label: i18n.t("quality.supplierName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferOutName',
|
||||
label: i18n.t("quality.transferOutName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferInName',
|
||||
label: i18n.t("quality.transferInName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'dataSources',
|
||||
label: i18n.t("quality.dataSources"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("quality.remark"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userName',
|
||||
label: i18n.t("quality.userName"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
transferRecordsSearch,
|
||||
transferRecordsAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/quality/qmsTransferRecords/page",
|
||||
deleteURL: "/quality/qmsTransferRecords",
|
||||
},
|
||||
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.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : ''
|
||||
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : ''
|
||||
this.listQuery.inspectionStage = dataForm.inspectionStage
|
||||
this.listQuery.inspectionTypeId = dataForm.inspectionTypeId
|
||||
this.listQuery.productId = dataForm.productId
|
||||
this.listQuery.supplierId = dataForm.supplierId
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.code = null
|
||||
this.listQuery.name = null
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 15:55:58
|
||||
* @LastEditTime: 2023-05-24 16:01:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -22,13 +22,14 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<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> -->
|
||||
<transferScheme-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</transferScheme-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> -->
|
||||
<transferScheme-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</transferScheme-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
@@ -48,98 +49,52 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import samplingPlanAdd from "./components/samplingPlan-add"
|
||||
import transferSchemeAdd from "./components/transferScheme-add"
|
||||
import normalToRelaxed from "./components/normalToRelaxed"
|
||||
import normalToTightened from "./components/normalToTightened"
|
||||
import relaxedToNormal from "./components/relaxedToNormal"
|
||||
import tightenedToNormal from "./components/tightenedToNormal"
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'sampleRange',
|
||||
label: i18n.t("quality.sampleRange"),
|
||||
prop: 'transferSchemeCode',
|
||||
label: i18n.t("quality.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'fourPointZero',
|
||||
label: i18n.t("quality.fourPointZero"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'onePointFive',
|
||||
label: i18n.t("quality.onePointFive"),
|
||||
prop: 'transferSchemeName',
|
||||
label: i18n.t("quality.name"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'onePointZero',
|
||||
label: i18n.t("quality.onePointZero"),
|
||||
align: 'center'
|
||||
label: i18n.t("quality.normalToTightened"),
|
||||
align: 'center',
|
||||
subcomponent: normalToTightened
|
||||
},
|
||||
{
|
||||
prop: 'onePointFive',
|
||||
label: i18n.t("quality.tightenedToNormal"),
|
||||
align: 'center',
|
||||
subcomponent: tightenedToNormal
|
||||
},
|
||||
{
|
||||
prop: 'ten',
|
||||
label: i18n.t("quality.normalToRelaxed"),
|
||||
align: 'center',
|
||||
subcomponent: normalToRelaxed
|
||||
},
|
||||
{
|
||||
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'
|
||||
},
|
||||
label: i18n.t("quality.relaxedToNormal"),
|
||||
align: 'center',
|
||||
subcomponent: relaxedToNormal
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
@@ -154,8 +109,8 @@ const tableBtn = [
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
samplingPlanAdd
|
||||
transferSchemeSearch,
|
||||
transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -213,7 +168,9 @@ export default {
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.code = dataForm.code
|
||||
this.listQuery.transferSchemeCode = dataForm.transferSchemeCode
|
||||
this.listQuery.transferSchemeName = dataForm.transferSchemeName
|
||||
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
@@ -246,7 +203,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@@ -263,7 +221,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user