更新模块
This commit is contained in:
41
src/views/modules/code/components/available.vue
Normal file
41
src/views/modules/code/components/available.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 09:49:36
|
||||
* @LastEditTime: 2023-05-31 15:50:02
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-tag v-if="injectData.problemStatus === 1" type="success">可用</el-tag>
|
||||
<el-tag v-else type="warning">不可用</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { addDynamicRoute } from '@/router'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
427
src/views/modules/code/components/deliveryInspection-add.vue
Normal file
427
src/views/modules/code/components/deliveryInspection-add.vue
Normal file
@@ -0,0 +1,427 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:04:28
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/deliveryInspection",
|
||||
infoURL: "/code/deliveryInspection/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
id:null,
|
||||
batchNo: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
factoryId: null,
|
||||
inspectionPlan: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionStatus: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
productCode: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
remark: null,
|
||||
samplesQuantity: null,
|
||||
shiftId: null,
|
||||
source: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
dictLabel: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
dictValue: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/deliveryInspection/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
console.log(1111);
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
321
src/views/modules/code/components/deliveryInspectionSearch.vue
Normal file
321
src/views/modules/code/components/deliveryInspectionSearch.vue
Normal file
@@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:20:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.task')">
|
||||
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
endTime: null,
|
||||
factoryId: null,
|
||||
inspectionStatus: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
startTime: null,
|
||||
supplierId: null,
|
||||
task: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// init(id) {
|
||||
// this.dataForm.id = id || "";
|
||||
// this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/sys/params/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm)
|
||||
},
|
||||
// dataFormSubmitHandle: debounce(
|
||||
// function () {
|
||||
// // console.log(1111);
|
||||
// // this.visible = false;
|
||||
// this.$emit("successSubmit", this.dataForm.key);
|
||||
// // this.$refs["dataForm"].validate((valid) => {
|
||||
// // if (!valid) {
|
||||
// // return false;
|
||||
// // }
|
||||
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
// // "/sys/params",
|
||||
// // this.dataForm
|
||||
// // )
|
||||
// // .then(({ data: res }) => {
|
||||
// // if (res.code !== 0) {
|
||||
// // return this.$message.error(res.msg);
|
||||
// // }
|
||||
// // this.$message({
|
||||
// // message: this.$t("prompt.success"),
|
||||
// // type: "success",
|
||||
// // duration: 500,
|
||||
// // onClose: () => {
|
||||
|
||||
// // },
|
||||
// // });
|
||||
// // })
|
||||
// // .catch(() => {});
|
||||
// // });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
172
src/views/modules/code/components/eightDiscipline-add.vue
Normal file
172
src/views/modules/code/components/eightDiscipline-add.vue
Normal file
@@ -0,0 +1,172 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-01 14:22:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||
<el-form-item prop="name" :label="$t('code.name')">
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('code.name')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" :label="$t('code.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="eightDisciplineStatus" :label="$t('code.eightDisciplineStatus')">
|
||||
<el-switch v-model="dataForm.eightDisciplineStatus" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
|
||||
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')">
|
||||
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/eightDiscipline",
|
||||
infoURL: "/code/eightDiscipline"
|
||||
},
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
eightDisciplineTypeList: [
|
||||
{
|
||||
value: 0,
|
||||
label: '重复发生问题 '
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '1客诉问题'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '重大质量问题'
|
||||
}
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
name: null,
|
||||
code:null,
|
||||
eightDisciplineType:null,
|
||||
eightDisciplineStatus: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
// getCode() {
|
||||
// this.$http.post(this.urlOptions.getCodeURL)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res);
|
||||
// this.dataForm.customSamplingCode = res.data
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/eightDiscipline/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
428
src/views/modules/code/components/productInspection-add.vue
Normal file
428
src/views/modules/code/components/productInspection-add.vue
Normal file
@@ -0,0 +1,428 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:05:29
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/productInspection",
|
||||
infoURL: "/code/productInspection/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
id: null,
|
||||
batchNo: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
factoryId: null,
|
||||
inspectionPlan: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionStatus: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
productCode: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
remark: null,
|
||||
samplesQuantity: null,
|
||||
shiftId: null,
|
||||
source: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
dictLabel: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
dictValue: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/productInspection/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
console.log(1111);
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
321
src/views/modules/code/components/productInspectionSearch.vue
Normal file
321
src/views/modules/code/components/productInspectionSearch.vue
Normal file
@@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:23:54
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.task')">
|
||||
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
endTime: null,
|
||||
factoryId: null,
|
||||
inspectionStatus: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
startTime: null,
|
||||
supplierId: null,
|
||||
task: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// init(id) {
|
||||
// this.dataForm.id = id || "";
|
||||
// this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/sys/params/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm)
|
||||
},
|
||||
// dataFormSubmitHandle: debounce(
|
||||
// function () {
|
||||
// // console.log(1111);
|
||||
// // this.visible = false;
|
||||
// this.$emit("successSubmit", this.dataForm.key);
|
||||
// // this.$refs["dataForm"].validate((valid) => {
|
||||
// // if (!valid) {
|
||||
// // return false;
|
||||
// // }
|
||||
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
// // "/sys/params",
|
||||
// // this.dataForm
|
||||
// // )
|
||||
// // .then(({ data: res }) => {
|
||||
// // if (res.code !== 0) {
|
||||
// // return this.$message.error(res.msg);
|
||||
// // }
|
||||
// // this.$message({
|
||||
// // message: this.$t("prompt.success"),
|
||||
// // type: "success",
|
||||
// // duration: 500,
|
||||
// // onClose: () => {
|
||||
|
||||
// // },
|
||||
// // });
|
||||
// // })
|
||||
// // .catch(() => {});
|
||||
// // });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
634
src/views/modules/code/components/productRegistration-add.vue
Normal file
634
src/views/modules/code/components/productRegistration-add.vue
Normal file
@@ -0,0 +1,634 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:18:54
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center">GBT2828.1</el-divider>
|
||||
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="critical" label="CR" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="major" label="MA" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="minor" label="MI" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="total" label="total" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
GBTSubmitURL: "/code/productRegistration",
|
||||
submitURL: "/code/productRegistration",
|
||||
infoURL: "/code/productRegistration/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
GBTDataForm: {
|
||||
critical:null,
|
||||
criticalAccept: null,
|
||||
criticalDefectiveNumber: null,
|
||||
criticalNumber: null,
|
||||
criticalReject: null,
|
||||
id: null,
|
||||
major: null,
|
||||
majorAccept: null,
|
||||
majorDefectiveNumber: null,
|
||||
majorNumber: null,
|
||||
majorReject: null,
|
||||
minor: null,
|
||||
minorAccept: null,
|
||||
minorDefectiveNumber: null,
|
||||
minorNumber: null,
|
||||
minorReject: null,
|
||||
purchaseRegistrationId: null,
|
||||
total: null,
|
||||
totalAccept: null,
|
||||
totalDefectiveNumber: null,
|
||||
totalNumber: null,
|
||||
totalReject: null,
|
||||
},
|
||||
dataForm: {
|
||||
batchNo:null,
|
||||
batchQuantity: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
customSamplingId: null,
|
||||
defectiveQuantity: null,
|
||||
defectsNumber: null,
|
||||
distributionUserId: null,
|
||||
factoryId: null,
|
||||
id: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
parameterName: null,
|
||||
processingMethod: null,
|
||||
processingResults: null,
|
||||
productId: null,
|
||||
recordQuantity: null,
|
||||
remark: null,
|
||||
shiftId: null,
|
||||
submit: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
upload: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
dictLabel: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
dictValue: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/productRegistration/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
this.$http
|
||||
.get(`/code/shipmentInspectionNationalStandard/getById/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm = {
|
||||
...this.GBTDataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
this.$http.put(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
} else {
|
||||
this.$http.post(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
},
|
||||
};
|
||||
</script>
|
||||
366
src/views/modules/code/components/productRegistrationSearch.vue
Normal file
366
src/views/modules/code/components/productRegistrationSearch.vue
Normal file
@@ -0,0 +1,366 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:26:47
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="userId" :label="$t('code.Examiner')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
|
||||
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
|
||||
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.processingResults')">
|
||||
<el-radio-group v-model="dataForm.processingResults">
|
||||
<el-radio :label="0"> {{ $t('code.approval') }} </el-radio>
|
||||
<el-radio :label="1">{{ $t('code.approvalComplete') }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.status')">
|
||||
<el-radio-group v-model="dataForm.upload">
|
||||
<el-radio :label="0">{{ $t('code.notUploaded') }}</el-radio>
|
||||
<el-radio :label="1">{{ $t('code.uploaded') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
judgmentResultList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '0未判定'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '1合格'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '不合格'
|
||||
},
|
||||
],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
processingResults: null,
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
judgmentResult: null,
|
||||
orderNumber: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
supplierId: null,
|
||||
upload: null,
|
||||
userId: null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// init(id) {
|
||||
// this.dataForm.id = id || "";
|
||||
// this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/sys/params/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm)
|
||||
},
|
||||
// dataFormSubmitHandle: debounce(
|
||||
// function () {
|
||||
// // console.log(1111);
|
||||
// // this.visible = false;
|
||||
// this.$emit("successSubmit", this.dataForm.key);
|
||||
// // this.$refs["dataForm"].validate((valid) => {
|
||||
// // if (!valid) {
|
||||
// // return false;
|
||||
// // }
|
||||
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
// // "/sys/params",
|
||||
// // this.dataForm
|
||||
// // )
|
||||
// // .then(({ data: res }) => {
|
||||
// // if (res.code !== 0) {
|
||||
// // return this.$message.error(res.msg);
|
||||
// // }
|
||||
// // this.$message({
|
||||
// // message: this.$t("prompt.success"),
|
||||
// // type: "success",
|
||||
// // duration: 500,
|
||||
// // onClose: () => {
|
||||
|
||||
// // },
|
||||
// // });
|
||||
// // })
|
||||
// // .catch(() => {});
|
||||
// // });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
49
src/views/modules/code/components/radio.vue
Normal file
49
src/views/modules/code/components/radio.vue
Normal 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>
|
||||
634
src/views/modules/code/components/shipmentRegistration-add.vue
Normal file
634
src/views/modules/code/components/shipmentRegistration-add.vue
Normal file
@@ -0,0 +1,634 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:27:51
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center">GBT2828.1</el-divider>
|
||||
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="critical" label="CR" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="major" label="MA" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="minor" label="MI" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="total" label="total" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
GBTSubmitURL: "/code/shipmentRegistration",
|
||||
submitURL: "/code/shipmentRegistration",
|
||||
infoURL: "/code/shipmentRegistration/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
GBTDataForm: {
|
||||
critical:null,
|
||||
criticalAccept: null,
|
||||
criticalDefectiveNumber: null,
|
||||
criticalNumber: null,
|
||||
criticalReject: null,
|
||||
id: null,
|
||||
major: null,
|
||||
majorAccept: null,
|
||||
majorDefectiveNumber: null,
|
||||
majorNumber: null,
|
||||
majorReject: null,
|
||||
minor: null,
|
||||
minorAccept: null,
|
||||
minorDefectiveNumber: null,
|
||||
minorNumber: null,
|
||||
minorReject: null,
|
||||
purchaseRegistrationId: null,
|
||||
total: null,
|
||||
totalAccept: null,
|
||||
totalDefectiveNumber: null,
|
||||
totalNumber: null,
|
||||
totalReject: null,
|
||||
},
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
batchQuantity: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
customSamplingId: null,
|
||||
defectiveQuantity: null,
|
||||
defectsNumber: null,
|
||||
distributionUserId: null,
|
||||
factoryId: null,
|
||||
id: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
parameterName: null,
|
||||
processingMethod: null,
|
||||
processingResults: null,
|
||||
productId: null,
|
||||
recordQuantity: null,
|
||||
remark: null,
|
||||
shiftId: null,
|
||||
submit: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
upload: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
dictLabel: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
dictValue: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/shipmentRegistration/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
this.$http
|
||||
.get(`/code/purchaseRegistrationNationalStandard/getById/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm = {
|
||||
...this.GBTDataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
this.$http.put(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
} else {
|
||||
this.$http.post(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, this.parameterData)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
},
|
||||
};
|
||||
</script>
|
||||
366
src/views/modules/code/components/shipmentRegistrationSearch.vue
Normal file
366
src/views/modules/code/components/shipmentRegistrationSearch.vue
Normal file
@@ -0,0 +1,366 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:27:11
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="userId" :label="$t('code.Examiner')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
|
||||
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
|
||||
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.processingResults')">
|
||||
<el-radio-group v-model="dataForm.processingResults">
|
||||
<el-radio :label="0"> {{ $t('code.approval') }} </el-radio>
|
||||
<el-radio :label="1">{{ $t('code.approvalComplete') }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.status')">
|
||||
<el-radio-group v-model="dataForm.upload">
|
||||
<el-radio :label="0">{{ $t('code.notUploaded') }}</el-radio>
|
||||
<el-radio :label="1">{{ $t('code.uploaded') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
judgmentResultList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '0未判定'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '1合格'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '不合格'
|
||||
},
|
||||
],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
processingResults: null,
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
judgmentResult: null,
|
||||
orderNumber: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
supplierId: null,
|
||||
upload: null,
|
||||
userId: null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// init(id) {
|
||||
// this.dataForm.id = id || "";
|
||||
// this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/sys/params/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm)
|
||||
},
|
||||
// dataFormSubmitHandle: debounce(
|
||||
// function () {
|
||||
// // console.log(1111);
|
||||
// // this.visible = false;
|
||||
// this.$emit("successSubmit", this.dataForm.key);
|
||||
// // this.$refs["dataForm"].validate((valid) => {
|
||||
// // if (!valid) {
|
||||
// // return false;
|
||||
// // }
|
||||
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
// // "/sys/params",
|
||||
// // this.dataForm
|
||||
// // )
|
||||
// // .then(({ data: res }) => {
|
||||
// // if (res.code !== 0) {
|
||||
// // return this.$message.error(res.msg);
|
||||
// // }
|
||||
// // this.$message({
|
||||
// // message: this.$t("prompt.success"),
|
||||
// // type: "success",
|
||||
// // duration: 500,
|
||||
// // onClose: () => {
|
||||
|
||||
// // },
|
||||
// // });
|
||||
// // })
|
||||
// // .catch(() => {});
|
||||
// // });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
359
src/views/modules/code/components/startEightDiscipline-add.vue
Normal file
359
src/views/modules/code/components/startEightDiscipline-add.vue
Normal file
@@ -0,0 +1,359 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-01 16:26:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="code" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="title" :label="$t('basic.title')">
|
||||
<el-input v-model="dataForm.title" :placeholder="$t('code.title')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
|
||||
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')">
|
||||
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="occurrenceDate" :label="$t('code.occurrenceDate')">
|
||||
<el-date-picker v-model="dataForm.occurrenceDate" type="datetime" :placeholder="$t('code.occurrenceDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="requestResponseCycle" :label="$t('code.requestResponseCycle')">
|
||||
<el-input v-model="dataForm.requestResponseCycle" :placeholder="$t('code.requestResponseCycle')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
|
||||
<el-date-picker v-model="dataForm.finalCompletionDate" type="datetime"
|
||||
:placeholder="$t('code.finalCompletionDate')" format='yyyy-MM-dd HH:mm:ss'
|
||||
valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="sampleAcceptanceTime" :label="$t('code.sampleAcceptanceTime')">
|
||||
<el-date-picker v-model="dataForm.sampleAcceptanceTime" type="datetime"
|
||||
:placeholder="$t('code.sampleAcceptanceTime')" format='yyyy-MM-dd HH:mm:ss'
|
||||
valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="defectSourceId" :label="$t('code.defectSource')">
|
||||
<el-select v-model="dataForm.defectSourceId" :placeholder="$t('code.defectSource')">
|
||||
<el-option v-for="item in defectList" :key="item.dictTypeId" :label="item.dictLabel"
|
||||
:value="item.dictTypeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="actualResponsePeriod" :label="$t('code.actualResponsePeriod')">
|
||||
<el-input v-model="dataForm.actualResponsePeriod" :placeholder="$t('code.requestResponseCycle')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNo" :label="$t('code.orderNo')">
|
||||
<el-input v-model="dataForm.orderNo" :placeholder="$t('code.orderNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
|
||||
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
|
||||
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
|
||||
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="description" :label="$t('code.description')">
|
||||
<el-input v-model="dataForm.description" :placeholder="$t('code.description')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
|
||||
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
|
||||
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
|
||||
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="examineStatus" :label="$t('code.examineStatus')">
|
||||
<el-select v-model="dataForm.examineStatus" :placeholder="$t('code.examineStatus')">
|
||||
<el-option v-for="item in examineStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="teamList" :label="$t('code.eightDTeam')">
|
||||
<el-select v-model="dataForm.teamList" :placeholder="$t('code.eightDTeam')" multiple>
|
||||
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/startEightDiscipline",
|
||||
infoURL: "/code/startEightDiscipline/{id}",
|
||||
getDictURL: '/sys/dict/data/page',
|
||||
customerListURL: '/basic/qmsCustomer/page',
|
||||
productListURL: '/basic/qmsProduct/page',
|
||||
teamListURL: '/basic/qmsTeam/page',
|
||||
},
|
||||
defectList: [],
|
||||
teamList:[],
|
||||
customerList: [],
|
||||
productList: [],
|
||||
dutyList: [],
|
||||
examineStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '不需要审批'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '需要审批'
|
||||
}
|
||||
],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
eightDisciplineTypeList: [
|
||||
{
|
||||
value: 0,
|
||||
label: '重复发生问题 '
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '1客诉问题'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '重大质量问题'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
actualResponsePeriod:null,
|
||||
batchNumber: null,
|
||||
code: null,
|
||||
customId: null,
|
||||
defectSourceId: null,
|
||||
description: null,
|
||||
eightDisciplineId: null,
|
||||
eightDisciplineStatus: null,
|
||||
eightDisciplineType: null,
|
||||
examineStatus: null,
|
||||
finalCompletionDate: null,
|
||||
id: null,
|
||||
occurrenceDate: null,
|
||||
orderNo: null,
|
||||
productId: null,
|
||||
productTypeId: null,
|
||||
teamList:undefined,
|
||||
requestResponseCycle: null,
|
||||
responsibilityAttributionId: null,
|
||||
sampleAcceptanceTime: null,
|
||||
supportProducts: null,
|
||||
title: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/startEightDiscipline/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
getDict() {
|
||||
this.$http.get(this.urlOptions.teamListURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.teamList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.get(this.urlOptions.getDictURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1664162193896206337'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.defectList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.get(this.urlOptions.getDictURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1664162455184568321'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.dutyList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
322
src/views/modules/code/deliveryInspection.vue
Normal file
322
src/views/modules/code/deliveryInspection.vue
Normal file
@@ -0,0 +1,322 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 15:52:51
|
||||
* @LastEditTime: 2023-06-20 15:37:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<deliveryInspection-add ref="addOrUpdate" @successSubmit="successSubmit">
|
||||
</deliveryInspection-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<deliveryInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</deliveryInspection-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
// import showProductList from "./components/showProductList.vue";
|
||||
import deliveryInspectionSearch from "./components/deliveryInspectionSearch.vue";
|
||||
import deliveryInspectionAdd from "./components/deliveryInspection-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "inspectionStatus",
|
||||
label: i18n.t('code.inspectionStatus'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: i18n.t('code.productName'),
|
||||
},
|
||||
{
|
||||
prop: "companyName",
|
||||
label: i18n.t('code.companyName'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "source",
|
||||
label: i18n.t('code.source'),
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/deliveryInspection/page/term",
|
||||
deleteURL: "/code/deliveryInspection",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
deliveryInspectionSearch,
|
||||
deliveryInspectionAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
|
||||
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.task = dataForm.task ? dataForm.task : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery,
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
197
src/views/modules/code/eightDiscipline.vue
Normal file
197
src/views/modules/code/eightDiscipline.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:12:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</eightDiscipline-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import eightDisciplineAdd from "./components/eightDiscipline-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import disposalMethodSearch from "./components/disposalMethodSearch"
|
||||
import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t("code.name"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'problemStatus',
|
||||
label: i18n.t("code.problemStatus"),
|
||||
align: 'center',
|
||||
subcomponent: available
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// disposalMethodSearch,
|
||||
eightDisciplineAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/eightDiscipline/page",
|
||||
deleteURL: "/code/eightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.disposalMethodStatus = dataForm.disposalMethodStatus
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.code = null
|
||||
this.listQuery.name = null
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
214
src/views/modules/code/examineAndApprove.vue
Normal file
214
src/views/modules/code/examineAndApprove.vue
Normal file
@@ -0,0 +1,214 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:12:12
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productName',
|
||||
label: i18n.t("code.productName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'customName',
|
||||
label: i18n.t("code.customName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 8
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('code.examineStatus'),
|
||||
selectOptions: [
|
||||
{
|
||||
id: 0,
|
||||
name: '不需要审批',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '需要审批',
|
||||
}
|
||||
],
|
||||
param: 'examineStatus',
|
||||
clearable: true,
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
321
src/views/modules/code/productInspection.vue
Normal file
321
src/views/modules/code/productInspection.vue
Normal file
@@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 15:52:51
|
||||
* @LastEditTime: 2023-06-20 15:37:02
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<productInspection-add ref="addOrUpdate" @successSubmit="successSubmit"></productInspection-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<productInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</productInspection-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
// import showProductList from "./components/showProductList.vue";
|
||||
import productInspectionSearch from "./components/productInspectionSearch.vue";
|
||||
import productInspectionAdd from "./components/productInspection-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "inspectionStatus",
|
||||
label: i18n.t('code.inspectionStatus'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: i18n.t('code.productName'),
|
||||
},
|
||||
{
|
||||
prop: "companyName",
|
||||
label: i18n.t('code.companyName'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "source",
|
||||
label: i18n.t('code.source'),
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/productInspection/page/term",
|
||||
deleteURL: "/code/productInspection",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
productInspectionSearch,
|
||||
productInspectionAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
|
||||
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.task = dataForm.task ? dataForm.task : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery,
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
338
src/views/modules/code/productRegistration.vue
Normal file
338
src/views/modules/code/productRegistration.vue
Normal file
@@ -0,0 +1,338 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-12 13:22:50
|
||||
* @LastEditTime: 2023-06-20 15:36:58
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<productRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
|
||||
</productRegistration-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<productRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</productRegistration-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
import productRegistrationSearch from "./components/productRegistrationSearch.vue";
|
||||
import productRegistrationAdd from "./components/productRegistration-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "customSamplingId",
|
||||
label: i18n.t('code.customSampling'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "upload",
|
||||
label: i18n.t('code.upload'),
|
||||
},
|
||||
{
|
||||
prop: "judgmentResult",
|
||||
label: i18n.t('code.judgmentResult'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectiveQuantity",
|
||||
label: i18n.t('code.defectiveQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectsNumber",
|
||||
label: i18n.t('code.defectsNumber'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "submit",
|
||||
label: i18n.t('code.submit'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "processingMethod",
|
||||
label: i18n.t('code.processingMethod'),
|
||||
},
|
||||
{
|
||||
prop: "processingResults",
|
||||
label: i18n.t('code.processingResults'),
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/productRegistration/page/term",
|
||||
deleteURL: "/code/productRegistration",
|
||||
exportURL: "/code/productRegistration/export",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
productRegistrationSearch,
|
||||
productRegistrationAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
|
||||
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery,
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
338
src/views/modules/code/shipmentRegistration.vue
Normal file
338
src/views/modules/code/shipmentRegistration.vue
Normal file
@@ -0,0 +1,338 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-12 13:22:50
|
||||
* @LastEditTime: 2023-06-20 15:36:53
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<shipmentRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
|
||||
</shipmentRegistration-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<shipmentRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</shipmentRegistration-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
import shipmentRegistrationSearch from "./components/shipmentRegistrationSearch.vue";
|
||||
import shipmentRegistrationAdd from "./components/shipmentRegistration-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "customSamplingId",
|
||||
label: i18n.t('code.customSampling'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "upload",
|
||||
label: i18n.t('code.upload'),
|
||||
},
|
||||
{
|
||||
prop: "judgmentResult",
|
||||
label: i18n.t('code.judgmentResult'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectiveQuantity",
|
||||
label: i18n.t('code.defectiveQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectsNumber",
|
||||
label: i18n.t('code.defectsNumber'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "submit",
|
||||
label: i18n.t('code.submit'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "processingMethod",
|
||||
label: i18n.t('code.processingMethod'),
|
||||
},
|
||||
{
|
||||
prop: "processingResults",
|
||||
label: i18n.t('code.processingResults'),
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/shipmentRegistration/page/term",
|
||||
deleteURL: "/code/shipmentRegistration",
|
||||
exportURL: "/code/shipmentRegistration/export",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
shipmentRegistrationSearch,
|
||||
shipmentRegistrationAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
|
||||
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery,
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
221
src/views/modules/code/startEightDiscipline.vue
Normal file
221
src/views/modules/code/startEightDiscipline.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:52
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<startEightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</startEightDiscipline-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import startEightDisciplineAdd from "./components/startEightDiscipline-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import customSamplingSearch from "./components/customSamplingSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// customSamplingSearch,
|
||||
startEightDisciplineAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init()
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
// console.log(key);
|
||||
// this.listQuery.key = key;
|
||||
this.listQuery.customSamplingCode = dataForm.customSamplingCode
|
||||
// this.listQuery.name = dataForm.name
|
||||
// this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
|
||||
this.listQuery.page = 1
|
||||
this.getDataList()
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.code = null
|
||||
this.listQuery.name = null
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
207
src/views/modules/code/startEightDisciplineCreateTeam.vue
Normal file
207
src/views/modules/code/startEightDisciplineCreateTeam.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:39
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferRecordsAdd from "./components/transferRecords-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import transferRecordsSearch from "./components/transferRecordsSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'productName',
|
||||
label: i18n.t("quality.productName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'supplierName',
|
||||
label: i18n.t("quality.supplierName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferOutName',
|
||||
label: i18n.t("quality.transferOutName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferInName',
|
||||
label: i18n.t("quality.transferInName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'dataSources',
|
||||
label: i18n.t("quality.dataSources"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("quality.remark"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userName',
|
||||
label: i18n.t("quality.userName"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferRecordsSearch,
|
||||
// transferRecordsAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 2
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,205 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:18
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 5
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,213 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:07
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import InspectionPositionAdd from "./components/InspectionPosition-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
// {
|
||||
// type: "edit",
|
||||
// btnName: "编辑",
|
||||
// },
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
// InspectionPositionAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus:1
|
||||
},
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
205
src/views/modules/code/startEightDisciplinePreventRecurrence.vue
Normal file
205
src/views/modules/code/startEightDisciplinePreventRecurrence.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:10:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 6
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
204
src/views/modules/code/startEightDisciplineRootCauseAnalysis.vue
Normal file
204
src/views/modules/code/startEightDisciplineRootCauseAnalysis.vue
Normal file
@@ -0,0 +1,204 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:10:40
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 4
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
205
src/views/modules/code/startEightDisciplineSummaryExperience.vue
Normal file
205
src/views/modules/code/startEightDisciplineSummaryExperience.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:10:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 8
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,212 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:13:01
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import samplingPlanAdd from "./components/samplingPlan-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
// samplingPlanAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 3
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
204
src/views/modules/code/startEightDisciplineValidation.vue
Normal file
204
src/views/modules/code/startEightDisciplineValidation.vue
Normal file
@@ -0,0 +1,204 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:09:59
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 7
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.title = val.title ? val.title : ''
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user