|  | @@ -52,7 +52,7 @@
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </el-form>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <div class="mb-2">
 | 
	
		
			
				|  |  | +    <div class="mb-2 flex justify-between">
 | 
	
		
			
				|  |  |        <el-button
 | 
	
		
			
				|  |  |          size="small"
 | 
	
		
			
				|  |  |          type="primary"
 | 
	
	
		
			
				|  | @@ -60,6 +60,37 @@
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |          {{ $t('btn_add') }}
 | 
	
		
			
				|  |  |        </el-button>
 | 
	
		
			
				|  |  | +      <el-form inline>
 | 
	
		
			
				|  |  | +        <el-form-item label="审核人:">
 | 
	
		
			
				|  |  | +          <el-select
 | 
	
		
			
				|  |  | +            v-model="auditUser"
 | 
	
		
			
				|  |  | +            :loading="setAuditUserLoading"
 | 
	
		
			
				|  |  | +            class="min-w-[200px]"
 | 
	
		
			
				|  |  | +            filterable
 | 
	
		
			
				|  |  | +            placeholder="可搜索"
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <el-option
 | 
	
		
			
				|  |  | +              v-for="user in userList"
 | 
	
		
			
				|  |  | +              :key="user.id"
 | 
	
		
			
				|  |  | +              :value="user.id"
 | 
	
		
			
				|  |  | +              :label="`${user.name} (${user.username})`"
 | 
	
		
			
				|  |  | +            ></el-option>
 | 
	
		
			
				|  |  | +          </el-select>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-tooltip content="保存审核人">
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +              type="primary"
 | 
	
		
			
				|  |  | +              size="small"
 | 
	
		
			
				|  |  | +              :loading="setAuditUserLoading"
 | 
	
		
			
				|  |  | +              @click="setAuditUser"
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  | +              保存
 | 
	
		
			
				|  |  | +            </el-button>
 | 
	
		
			
				|  |  | +          </el-tooltip>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <el-table
 | 
	
	
		
			
				|  | @@ -203,6 +234,8 @@ import {
 | 
	
		
			
				|  |  |    ElPagination,
 | 
	
		
			
				|  |  |    ElCascader,
 | 
	
		
			
				|  |  |    ElDialog,
 | 
	
		
			
				|  |  | +  ElTooltip,
 | 
	
		
			
				|  |  | +  ElMessage,
 | 
	
		
			
				|  |  |  } from 'element-plus'
 | 
	
		
			
				|  |  |  import compEdit from './components/edit.vue'
 | 
	
		
			
				|  |  |  import compRecord from './components/record.vue'
 | 
	
	
		
			
				|  | @@ -210,6 +243,8 @@ import compExamine from './components/examine.vue'
 | 
	
		
			
				|  |  |  import { $t } from '@/i18n/index'
 | 
	
		
			
				|  |  |  import { getProductList, deleteProduct } from '@/api/product.js'
 | 
	
		
			
				|  |  |  import { getCategoryTree } from '@/api/indent.js'
 | 
	
		
			
				|  |  | +import userAPI from '@/api/user'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  defineComponent({
 | 
	
		
			
				|  |  |    name: 'ComponentIndentProductList',
 | 
	
		
			
				|  |  |  })
 | 
	
	
		
			
				|  | @@ -404,6 +439,53 @@ const imgClick = (url: string) => {
 | 
	
		
			
				|  |  |  watch(bigImageVisible, () => {
 | 
	
		
			
				|  |  |    if (!bigImageVisible.value) currentBigImage.value = ''
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  | +const userList = ref([] as any[])
 | 
	
		
			
				|  |  | +const getUserListFunc = () => {
 | 
	
		
			
				|  |  | +  userAPI
 | 
	
		
			
				|  |  | +    .getUserList({
 | 
	
		
			
				|  |  | +      page: 1,
 | 
	
		
			
				|  |  | +      limit: 200,
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    .then((res: any) => {
 | 
	
		
			
				|  |  | +      if (res.code !== 1) {
 | 
	
		
			
				|  |  | +        return
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      userList.value =
 | 
	
		
			
				|  |  | +        res.result.data
 | 
	
		
			
				|  |  | +          .filter((i: any) => i.status === 1)
 | 
	
		
			
				|  |  | +          .sort((a: any, b: any) => a.name.localeCompare(b.name)) || []
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +getUserListFunc()
 | 
	
		
			
				|  |  | +const auditUser = ref('')
 | 
	
		
			
				|  |  | +const getCurrentAuditUser = () => {
 | 
	
		
			
				|  |  | +  userAPI.getAuditUser().then((res: any) => {
 | 
	
		
			
				|  |  | +    console.log(res, 'res')
 | 
	
		
			
				|  |  | +    if (
 | 
	
		
			
				|  |  | +      res.code === 1 &&
 | 
	
		
			
				|  |  | +      Array.isArray(res.result.data) &&
 | 
	
		
			
				|  |  | +      res.result.data.length
 | 
	
		
			
				|  |  | +    ) {
 | 
	
		
			
				|  |  | +      const temp = res.result.data.filter((i: any) => i.type === 2)
 | 
	
		
			
				|  |  | +      console.log(temp, 'temp')
 | 
	
		
			
				|  |  | +      if (temp.length) auditUser.value = temp[0].check_id
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +getCurrentAuditUser()
 | 
	
		
			
				|  |  | +const setAuditUserLoading = ref(false)
 | 
	
		
			
				|  |  | +const setAuditUser = () => {
 | 
	
		
			
				|  |  | +  setAuditUserLoading.value = true
 | 
	
		
			
				|  |  | +  userAPI
 | 
	
		
			
				|  |  | +    .setAuditUser({ check_id: auditUser.value, type: 2 })
 | 
	
		
			
				|  |  | +    .then((res: any) => {
 | 
	
		
			
				|  |  | +      console.log(res, 'res')
 | 
	
		
			
				|  |  | +      if (res.code === 1) {
 | 
	
		
			
				|  |  | +        ElMessage.success('设置成功')
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    .finally(() => (setAuditUserLoading.value = false))
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <style lang="scss" scoped>
 |