修改bug
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-06 15:15:30
 | 
			
		||||
 * @LastEditTime: 2023-11-21 14:11:18
 | 
			
		||||
 * @LastEditTime: 2024-02-18 14:07:08
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -102,11 +102,11 @@ export default {
 | 
			
		||||
      sourceList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '手动',
 | 
			
		||||
          name: '平板端',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '自动',
 | 
			
		||||
          name: '网页端',
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
			dataForm: {
 | 
			
		||||
 
 | 
			
		||||
@@ -130,8 +130,9 @@ export default {
 | 
			
		||||
    AddOrUpdate,
 | 
			
		||||
    DetailOrUpdate
 | 
			
		||||
	},
 | 
			
		||||
  created() {
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getDict()
 | 
			
		||||
    this.getDataList()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    otherMethods(val) {
 | 
			
		||||
@@ -214,7 +215,7 @@ export default {
 | 
			
		||||
						pageNo: 1,
 | 
			
		||||
						total: 1,
 | 
			
		||||
					};
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					this.getDataList()
 | 
			
		||||
					break;
 | 
			
		||||
				case 'add':
 | 
			
		||||
					this.addOrEditTitle = '新增';
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-01 14:55:51
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-12-06 14:08:00
 | 
			
		||||
 * @LastEditTime: 2024-02-20 08:46:05
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -69,6 +69,11 @@ const tableProps = [
 | 
			
		||||
    prop: 'productionOutputTime',
 | 
			
		||||
    label: '深加工下片时间',
 | 
			
		||||
    filter: parseTime
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'scrapDetail',
 | 
			
		||||
    label: '详情',
 | 
			
		||||
    filter: parseTime
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
@@ -83,18 +88,20 @@ export default {
 | 
			
		||||
      // },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      // tableBtn: [
 | 
			
		||||
      //   this.$auth.hasPermi(`base:packaging-print-log:update`)
 | 
			
		||||
      //     ? {
 | 
			
		||||
      //   // this.$auth.hasPermi(`base:packaging-print-log:update`)
 | 
			
		||||
      //   //   ?
 | 
			
		||||
      //     {
 | 
			
		||||
      //       type: 'edit',
 | 
			
		||||
      //       btnName: '编辑',
 | 
			
		||||
      //     }
 | 
			
		||||
      //     : undefined,
 | 
			
		||||
      //   this.$auth.hasPermi(`base:packaging-print-log:delete`)
 | 
			
		||||
      //     ? {
 | 
			
		||||
      //     },
 | 
			
		||||
      //     // : undefined,
 | 
			
		||||
      //   // this.$auth.hasPermi(`base:packaging-print-log:delete`)
 | 
			
		||||
      //   //   ?
 | 
			
		||||
      //     {
 | 
			
		||||
      //       type: 'delete',
 | 
			
		||||
      //       btnName: '删除',
 | 
			
		||||
      //     }
 | 
			
		||||
      //     : undefined,
 | 
			
		||||
      //     // : undefined,
 | 
			
		||||
 | 
			
		||||
      // ].filter((v) => v),
 | 
			
		||||
      list: [],
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,10 @@
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="检测人员" prop="checkPerson">
 | 
			
		||||
          <el-input v-model="innerDataForm.checkPerson" clearable @change="$emit('update', innerDataForm)"
 | 
			
		||||
            placeholder="请输入检测人员" />
 | 
			
		||||
          <el-select v-model="innerDataForm.checkPerson" placeholder="请选择检测人员" clearable filterable multiple
 | 
			
		||||
            @change="$emit('update', innerDataForm)">
 | 
			
		||||
            <el-option v-for="opt in userList" :key="opt.value" :label="opt.label" :value="opt.label" />
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
 | 
			
		||||
@@ -65,8 +67,8 @@
 | 
			
		||||
          <el-select v-model="innerDataForm.source" placeholder="请选择来源" filterable clearable
 | 
			
		||||
            @change="$emit('update', innerDataForm)">
 | 
			
		||||
            <el-option v-for="opt in [
 | 
			
		||||
            	{ label: '手动', value: 1 },
 | 
			
		||||
            	{ label: '自动', value: 2 },
 | 
			
		||||
            	{ label: '平板端', value: 1 },
 | 
			
		||||
            	{ label: '网页端', value: 2 },
 | 
			
		||||
            ]" :key="opt.value" :label="opt.label" :value="opt.value" />
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
@@ -104,13 +106,14 @@ export default {
 | 
			
		||||
			inspectionDetList: [],
 | 
			
		||||
			productionLineList: [],
 | 
			
		||||
      sectionList: [],
 | 
			
		||||
      userList:[],
 | 
			
		||||
      workOrderList:[],
 | 
			
		||||
			innerDataForm: {},
 | 
			
		||||
			cacheInspectionDetList: null,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
    Promise.all([this.getProductLineList(), this.getInspectionDetList(), this.getWorkOrderList()]).then(
 | 
			
		||||
    Promise.all([this.getProductLineList(), this.getInspectionDetList(), this.getWorkOrderList(),this.getUserList()]).then(
 | 
			
		||||
			() => {
 | 
			
		||||
				this.formLoading = false;
 | 
			
		||||
			}
 | 
			
		||||
@@ -180,6 +183,17 @@ export default {
 | 
			
		||||
        value: item.id,
 | 
			
		||||
      }));
 | 
			
		||||
    },
 | 
			
		||||
    async getUserList() {
 | 
			
		||||
      const response = await this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
 | 
			
		||||
        pageNo: 1,
 | 
			
		||||
        pageSize: 999
 | 
			
		||||
      })
 | 
			
		||||
      console.log(response);
 | 
			
		||||
      this.userList = response.data.map((item) => ({
 | 
			
		||||
        label: item.username,
 | 
			
		||||
        value: item.id,
 | 
			
		||||
      }));
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
		// 获取检测内容列表
 | 
			
		||||
		async getInspectionDetList() {
 | 
			
		||||
 
 | 
			
		||||
@@ -155,7 +155,16 @@ export default {
 | 
			
		||||
          selectOptions: [],
 | 
			
		||||
          param: 'inspectionDetContent',
 | 
			
		||||
          filterable: true
 | 
			
		||||
				},
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'select',
 | 
			
		||||
          label: '检测人员',
 | 
			
		||||
          placeholder: '请选择检测人员',
 | 
			
		||||
          selectOptions: [],
 | 
			
		||||
          param: 'checkPerson',
 | 
			
		||||
          filterable: true,
 | 
			
		||||
          multiple:true,
 | 
			
		||||
        },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'datePicker',
 | 
			
		||||
					label: '时间段',
 | 
			
		||||
@@ -217,17 +226,27 @@ export default {
 | 
			
		||||
          // width: 128,
 | 
			
		||||
          prop: 'workOrderName',
 | 
			
		||||
          label: '工单名称',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          // width: 128,
 | 
			
		||||
          prop: 'productionLineName',
 | 
			
		||||
          label: '产线',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          // width: 128,
 | 
			
		||||
          prop: 'sectionName',
 | 
			
		||||
          label: '工段',
 | 
			
		||||
        },
 | 
			
		||||
				{
 | 
			
		||||
					// width: 128,
 | 
			
		||||
					prop: 'inspectionDetContent',
 | 
			
		||||
					label: '检测内容',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					// width: 128,
 | 
			
		||||
          prop: 'productionLineName',
 | 
			
		||||
					label: '产线',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	// width: 128,
 | 
			
		||||
        //   prop: 'productionLineName',
 | 
			
		||||
				// 	label: '产线',
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					// width: 128,
 | 
			
		||||
					prop: 'checkPerson',
 | 
			
		||||
@@ -244,11 +263,11 @@ export default {
 | 
			
		||||
					width: 90,
 | 
			
		||||
					prop: 'source',
 | 
			
		||||
					label: '来源',
 | 
			
		||||
					filter: (val) => ['未知', '手动', '自动'][val],
 | 
			
		||||
          filter: (val) => ['平板端', '网页端'][val],
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
 | 
			
		||||
      searchBarKeys: ['inspectionDetContent', 'checkTime', 'workOrderId'],
 | 
			
		||||
      searchBarKeys: ['inspectionDetContent', 'checkTime', 'workOrderId','checkPerson'],
 | 
			
		||||
			form: {
 | 
			
		||||
        id: undefined,
 | 
			
		||||
        // workOrderId:undefined,
 | 
			
		||||
@@ -269,7 +288,8 @@ export default {
 | 
			
		||||
        pageSize: 10,
 | 
			
		||||
        workOrderId:null,
 | 
			
		||||
				inspectionDetContent: null,
 | 
			
		||||
				checkTime: [],
 | 
			
		||||
        checkTime: [],
 | 
			
		||||
        checkPerson:undefined,
 | 
			
		||||
				// productionLineId: null,
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
@@ -351,12 +371,24 @@ export default {
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
        );
 | 
			
		||||
      });
 | 
			
		||||
      })
 | 
			
		||||
      this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
 | 
			
		||||
          pageNo: 1,
 | 
			
		||||
          pageSize: 999
 | 
			
		||||
      }).then((res) => {
 | 
			
		||||
        // console.log(response);
 | 
			
		||||
        this.searchBarFormConfig[2].selectOptions = res.data.map((item) => ({
 | 
			
		||||
          name: item.username,
 | 
			
		||||
          id: item.username,
 | 
			
		||||
        }));
 | 
			
		||||
        })
 | 
			
		||||
		},
 | 
			
		||||
		/** 查询列表 */
 | 
			
		||||
		getList() {
 | 
			
		||||
			this.loading = true;
 | 
			
		||||
			// 执行查询
 | 
			
		||||
      // 执行查询
 | 
			
		||||
      let str = this.queryParams.checkPerson ?  this.queryParams.checkPerson.join() :undefined
 | 
			
		||||
      this.queryParams.checkPerson = str
 | 
			
		||||
			getQualityInspectionRecordPage(this.queryParams).then((response) => {
 | 
			
		||||
				this.list = response.data.list;
 | 
			
		||||
				this.total = response.data.total;
 | 
			
		||||
@@ -424,7 +456,9 @@ export default {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				// 修改的提交
 | 
			
		||||
        // 修改的提交
 | 
			
		||||
        let str = this.form.checkPerson.join()
 | 
			
		||||
        this.form.checkPerson = str
 | 
			
		||||
				if (this.form.id != null) {
 | 
			
		||||
					updateQualityInspectionRecord(this.form).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('修改成功');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user