肥料使用监管展示调整
This commit is contained in:
		
							parent
							
								
									2b079191e2
								
							
						
					
					
						commit
						93378aa67b
					
				| @ -29,3 +29,28 @@ export function delSeedUseRegulatory(ids) { | ||||
| export function getRowDetails({ url, id }) { | ||||
|   return request(`${url}${id}`); | ||||
| } | ||||
| 
 | ||||
| /* 肥料使用监管-列表 */ | ||||
| export function getFertilizeUseRegulatoryRecords(params) { | ||||
|   return request('/inputGoods/supervise/fertilize/page', { | ||||
|     params, | ||||
|   }); | ||||
| } | ||||
| /* 肥料使用监管-新增 */ | ||||
| export function fertilizeUseRegulatorySave(data) { | ||||
|   return request('/inputGoods/supervise/fertilize/save', { | ||||
|     method: 'POST', | ||||
|     data, | ||||
|   }); | ||||
| } | ||||
| /* 肥料使用监管-编辑 */ | ||||
| export function editFertilizeUseRegulatory(data) { | ||||
|   return request('/inputGoods/supervise/fertilize/edit', { | ||||
|     data, | ||||
|     method: 'PUT', | ||||
|   }); | ||||
| } | ||||
| /* 肥料使用监管-删除 */ | ||||
| export function delFertilizeUseRegulatory(ids) { | ||||
|   return request(`/inputGoods/supervise/fertilize/delete/${ids}`); | ||||
| } | ||||
|  | ||||
| @ -6,14 +6,14 @@ | ||||
|         <div class="search-bar"> | ||||
|           <div class="search-bar-left"> | ||||
|             <el-form ref="searchForm" :inline="true" :model="formInline" class="demo-form-inline" :label-width="'auto'"> | ||||
|               <el-form-item label="关键字" prop="seedName"> | ||||
|                 <el-input v-model="formInline.seedName" placeholder="请输入姓名" clearable /> | ||||
|               <el-form-item label="关键字" prop="name"> | ||||
|                 <el-input v-model="formInline.name" placeholder="请输入姓名" clearable /> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="分类" prop="seedTypeId"> | ||||
|               <!-- <el-form-item label="分类" prop="seedTypeId"> | ||||
|                 <el-select v-model="formInline.seedTypeId" placeholder="请选择" clearable @change="seedTypeChange"> | ||||
|                   <el-option v-for="item in seedTypeList" :key="item.id" :value="item.id" :label="item.dataName" /> | ||||
|                 </el-select> | ||||
|               </el-form-item> | ||||
|               </el-form-item> --> | ||||
|               <el-form-item label=""> | ||||
|                 <el-button type="primary" icon="Search" @click="onSubmit">查询</el-button> | ||||
|                 <el-button icon="Refresh" @click="resetForm">重置</el-button> | ||||
| @ -34,7 +34,7 @@ | ||||
|           :total="tableTotal" | ||||
|           :current-page="formInline.current" | ||||
|           :page-size="formInline.size" | ||||
|           :show-sort="true" | ||||
|           :show-sort="false" | ||||
|           @page-change="handlePaginationChange" | ||||
|         > | ||||
|           <!-- 自定义-操作 --> | ||||
| @ -110,13 +110,20 @@ import { ref, reactive, computed, onMounted, onBeforeUnmount, nextTick } from 'v | ||||
| import tableComponent from '@/components/tableComponent.vue'; | ||||
| import { ElMessage } from 'element-plus'; | ||||
| import inputSuppliesApi from '@/apis/inputSuppliesApi'; | ||||
| const { getSeedList, seedSave, delSeed, getMaterailTypes } = inputSuppliesApi; | ||||
| const { getMaterailTypes } = inputSuppliesApi; | ||||
| import { | ||||
|   getFertilizeUseRegulatoryRecords, | ||||
|   fertilizeUseRegulatorySave, | ||||
|   editFertilizeUseRegulatory, | ||||
|   delFertilizeUseRegulatory, | ||||
|   getRowDetails, | ||||
| } from '@/apis/inputSuppliesApi/supervisionOfInputs'; | ||||
| import { useApp } from '@/hooks'; | ||||
| const app = useApp(); | ||||
| 
 | ||||
| // 查询条件 | ||||
| const formInline = reactive({ | ||||
|   seedName: '', | ||||
|   name: '', | ||||
|   seedTypeId: '', | ||||
|   current: 1, | ||||
|   size: 10, | ||||
| @ -136,13 +143,16 @@ const selectedIds = ref([]); | ||||
| const tableLoading = ref(false); | ||||
| const tableTotal = ref(0); | ||||
| const columns = ref([ | ||||
|   { prop: 'id', label: '编码' }, | ||||
|   { prop: 'seedName', label: '种子种苗名称' }, | ||||
|   { prop: 'varietyName', label: '品种名称' }, | ||||
|   { prop: 'brand', label: '品牌' }, | ||||
|   { prop: 'manufacturer', label: '生产厂家' }, | ||||
|   { prop: 'classifyName', label: '分类' }, | ||||
|   { prop: 'productUnit', label: '产品规格' }, | ||||
|   { prop: 'regionName', label: '所属行政区域' }, | ||||
|   { prop: 'regionCode', label: '行政区域编号' }, | ||||
|   { prop: 'landName', label: '地块名称' }, | ||||
|   { prop: 'landId', label: '地块编号' }, | ||||
|   { prop: 'gridName', label: '所属网格' }, | ||||
|   { prop: 'gridId', label: '网格编号' }, | ||||
|   { prop: 'name', label: '负责人姓名' }, | ||||
|   { prop: 'phone', label: '联系方式' }, | ||||
|   { prop: 'fertilizeId', label: '化肥编号' }, | ||||
|   { prop: 'fertilizeName', label: '化肥名称' }, | ||||
|   // { prop: 'action', label: '操作', slotName: 'action', width: 230, fixed: 'right' }, | ||||
| ]); | ||||
| const handlePaginationChange = ({ page, pageSize }) => { | ||||
| @ -153,7 +163,7 @@ const handlePaginationChange = ({ page, pageSize }) => { | ||||
| const loadData = async () => { | ||||
|   tableLoading.value = true; | ||||
|   try { | ||||
|     let response = await getSeedList(formInline); | ||||
|     let response = await getFertilizeUseRegulatoryRecords(formInline); | ||||
|     tableLoading.value = false; | ||||
|     if (response.code == 200) { | ||||
|       tableData.value = response.data.records; | ||||
| @ -281,7 +291,7 @@ const handleDelete = (row) => { | ||||
| }; | ||||
| const deleteGoods = async (ids) => { | ||||
|   try { | ||||
|     let res = await delSeed(ids); | ||||
|     let res = await delFertilizeUseRegulatory(ids); | ||||
|     return res; | ||||
|   } catch (error) { | ||||
|     return false; | ||||
| @ -298,9 +308,9 @@ const onSaveCategory = () => { | ||||
|         console.log(param); | ||||
|         let response; | ||||
|         if (dialogTitle.value == '新增') { | ||||
|           response = await seedSave(param); | ||||
|           response = await fertilizeUseRegulatorySave(param); | ||||
|         } else { | ||||
|           response = await seedSave(param); | ||||
|           response = await editFertilizeUseRegulatory(param); | ||||
|         } | ||||
|         if (response.code == 200) { | ||||
|           cancelDialog(); | ||||
|  | ||||
| @ -6,8 +6,8 @@ | ||||
|         <div class="search-bar"> | ||||
|           <div class="search-bar-left"> | ||||
|             <el-form ref="searchForm" :inline="true" :model="formInline" class="demo-form-inline" :label-width="'auto'"> | ||||
|               <el-form-item label="关键字" prop="seedName"> | ||||
|                 <el-input v-model="formInline.seedName" placeholder="请输入" clearable /> | ||||
|               <el-form-item label="关键字" prop="name"> | ||||
|                 <el-input v-model="formInline.name" placeholder="请输入" clearable /> | ||||
|               </el-form-item> | ||||
|               <!-- <el-form-item label="分类" prop="seedTypeId"> | ||||
|                 <el-select v-model="formInline.seedTypeId" placeholder="请选择" clearable @change="seedTypeChange"> | ||||
| @ -119,7 +119,7 @@ const app = useApp(); | ||||
| 
 | ||||
| // 查询条件 | ||||
| const formInline = reactive({ | ||||
|   seedName: '', | ||||
|   name: '', | ||||
|   seedTypeId: '', | ||||
|   current: 1, | ||||
|   size: 10, | ||||
| @ -139,9 +139,12 @@ const selectedIds = ref([]); | ||||
| const tableLoading = ref(false); | ||||
| const tableTotal = ref(0); | ||||
| const columns = ref([ | ||||
|   { prop: 'landName', label: '地块名称' }, | ||||
|   { prop: 'regionName', label: '所属行政区域' }, | ||||
|   { prop: 'regionCode', label: '行政区域编号' }, | ||||
|   { prop: 'landName', label: '地块名称' }, | ||||
|   { prop: 'landId', label: '地块编号' }, | ||||
|   { prop: 'gridName', label: '所属网格' }, | ||||
|   { prop: 'gridId', label: '网格编号' }, | ||||
|   { prop: 'name', label: '负责人姓名' }, | ||||
|   { prop: 'phone', label: '联系方式' }, | ||||
|   { prop: 'provenanceId', label: '种子编号' }, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user