This commit is contained in:
weipengfei 2024-01-31 14:17:10 +08:00
parent 3568e261d9
commit 12b274b8b5
16 changed files with 224 additions and 36 deletions

View File

@ -128,7 +128,7 @@
'vermifuge_name': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请输入驱虫药名称',
trigger: ['blur', 'change']
},
'deworming_method': {
@ -143,10 +143,10 @@
message: '请选择驱虫人员',
trigger: ['blur', 'change']
},
'vermifuge_name': {
'deworming_date': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请选择驱虫时间',
trigger: ['blur', 'change']
},
// 'remark': {

View File

@ -11,7 +11,7 @@
suffix-icon-style="color: #b6b6b6;"
border="none" v-model="feed_type" readonly></up-input>
</u-form-item>
<u-form-item label="饲料品牌" prop="formData.feed_brand" borderBottom required>
<u-form-item label="饲料品牌" prop="feed_brand" borderBottom required>
<up-input input-align="right" placeholder="请输入饲料品牌" :disabled="mode=='detail'"
border="none" v-model="formData.feed_brand"></up-input>
</u-form-item>
@ -142,6 +142,24 @@
message: '请选择饲料种类',
trigger: ['blur', 'change']
},
'feed_brand': {
type: 'string',
required: true,
message: '请输入饲料品牌',
trigger: ['blur', 'change']
},
'feed_consumption': {
type: 'string',
required: true,
message: '请输入饲料消耗量',
trigger: ['blur', 'change']
},
'operator': {
type: 'string',
required: true,
message: '请输入饲养人员',
trigger: ['blur', 'change']
},
// 'remark': {
// type: 'string',
// required: true,

View File

@ -133,10 +133,34 @@
return value;
};
const rules = {
'user': {
'disinfectant_name': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请输入消毒剂名称',
trigger: ['blur', 'change']
},
'concentration': {
type: 'string',
required: true,
message: '请输入消毒剂浓度',
trigger: ['blur', 'change']
},
'disinfectant_method': {
type: 'string',
required: true,
message: '请输入消毒方法',
trigger: ['blur', 'change']
},
'disinfectant_area': {
type: 'string',
required: true,
message: '请选择消毒区域',
trigger: ['blur', 'change']
},
'operator': {
type: 'string',
required: true,
message: '请输入消毒人员',
trigger: ['blur', 'change']
},
// 'remark': {

View File

@ -9,11 +9,11 @@
<up-input input-align="right" placeholder="请选择疫苗" border="none" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" v-model="formData.name" readonly></up-input>
</up-form-item> -->
<u-form-item label="疫苗名称" prop="formData.vaccine_name" borderBottom required>
<u-form-item label="疫苗名称" prop="vaccine_name" borderBottom required>
<up-input input-align="right" placeholder="请输入疫苗名称" :disabled="mode=='detail'" border="none"
v-model="formData.vaccine_name"></up-input>
</u-form-item>
<u-form-item label="疫苗厂家" prop="formData.vaccine_manufacturers" borderBottom required>
<u-form-item label="疫苗厂家" prop="vaccine_manufacturers" borderBottom required>
<up-input input-align="right" placeholder="请输入疫苗厂家" :disabled="mode=='detail'" border="none"
v-model="formData.vaccine_manufacturers"></up-input>
</u-form-item>
@ -150,10 +150,46 @@
return value;
};
const rules = {
'user': {
'vaccine_name': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请输入疫苗名称',
trigger: ['blur', 'change']
},
'vaccine_manufacturers': {
type: 'string',
required: true,
message: '请输入疫苗厂家',
trigger: ['blur', 'change']
},
'vaccine_batch': {
type: 'string',
required: true,
message: '请输入疫苗批次号',
trigger: ['blur', 'change']
},
'vaccination_method': {
type: 'string',
required: true,
message: '请选择疫苗接种方式',
trigger: ['blur', 'change']
},
'vaccination_site': {
type: 'string',
required: true,
message: '请输入疫苗接种部位',
trigger: ['blur', 'change']
},
'immune_validity_period': {
type: 'string',
required: true,
message: '请输入疫苗有限期',
trigger: ['blur', 'change']
},
'operator': {
type: 'string',
required: true,
message: '请输入疫苗注射人员',
trigger: ['blur', 'change']
},
// 'remark': {

View File

@ -118,12 +118,18 @@
return value;
};
const rules = {
'user': {
'water_consumption': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请输入喂水量',
trigger: ['blur', 'change']
},
'operator': {
type: 'string',
required: true,
message: '请输入喂水人',
trigger: ['blur', 'change']
},
// 'remark': {
// type: 'string',
// required: true,

View File

@ -71,6 +71,7 @@
onLoad(function(options){
const eventChannel = getCurrentInstance().proxy.getOpenerEventChannel();
eventChannel.on('setDatasItem', function(data) {
console.log(data);
Object.assign(formData, data)
initFeedingTypeLists();
})

View File

@ -95,10 +95,22 @@
return value;
};
const rules = {
'user': {
'animal_sn': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请输入耳号',
trigger: ['blur', 'change']
},
'old_fence_house_id': {
type: 'number',
required: true,
message: '请选择转出栏舍',
trigger: ['blur', 'change']
},
'new_fence_house_id': {
type: 'number',
required: true,
message: '请选择转入栏舍',
trigger: ['blur', 'change']
},
// 'remark': {
@ -181,7 +193,6 @@
}
const addFn = () => {
form.value.validate().then(res => {
console.log(res)
if (res) {
//
fenceHouseExchange(formData).then((res) => {

View File

@ -104,10 +104,28 @@
return value;
};
const rules = {
'user': {
'animal_sn': {
type: 'string',
required: true,
message: '请填写参与人',
message: '请输入耳号',
trigger: ['blur', 'change']
},
'fence_house_id': {
type: 'number',
required: true,
message: '请选择所在栏舍',
trigger: ['blur', 'change']
},
'leave_type': {
type: 'number',
required: true,
message: '请输入离舍类型',
trigger: ['blur', 'change']
},
'reason': {
type: 'string',
required: true,
message: '请输入离舍原因',
trigger: ['blur', 'change']
},
// 'remark': {

View File

@ -185,6 +185,54 @@
message: '请选择品类',
trigger: ['blur', 'change']
}],
brand: [{
type: 'string',
required: true,
message: '请选择品种',
trigger: ['blur', 'change']
}],
gender: [{
type: 'number',
required: true,
message: '请选择性别',
trigger: ['blur', 'change']
}],
physi_stage: [{
type: 'string',
required: true,
message: '请输入生理阶段',
trigger: ['blur', 'change']
}],
blood_purity: [{
type: 'string',
required: true,
message: '请输入血统纯度',
trigger: ['blur', 'change']
}],
current_estimation: [{
type: 'string',
required: true,
message: '请输入现估重',
trigger: ['blur', 'change']
}],
birth_estimation: [{
type: 'string',
required: true,
message: '请输入出生体重',
trigger: ['blur', 'change']
}],
brith_date: [{
type: 'string',
required: true,
message: '请选择出生日期',
trigger: ['blur', 'change']
}],
entry_date: [{
type: 'string',
required: true,
message: '请选择入场日期',
trigger: ['blur', 'change']
}],
}
});
const pic = reactive([]);

View File

@ -31,7 +31,7 @@
</view>
<block class="" v-if="feedList.length>0" v-for="(item, index) in feedList" :key="index">
<view class="thing-card" v-if="item != null">
<view class="card_body">
<view class="card_body" v-if="item">
<view class="left">
<u--image v-if="item&&item.pic" @click="perviewFn(item.pic[0])" radius='10' :src="item.pic[0]" width="200rpx"
height="200rpx"></u--image>
@ -235,12 +235,37 @@
url
})
}
const navFeed = (e, index)=>{
if(index==2) navTo(`/pages/feedDetail/feedDetail?id=${e.id}`)
if(index==4) navTo(`/pages/feedDetail/waterDetail?id=${e.id}`)
if(index==1) navTo(`/pages/feedDetail/sterilizeDetail?id=${e.id}`)
if(index==3) navTo(`/pages/feedDetail/vaccineDetail?id=${e.id}`)
if(index==0) navTo(`/pages/feedDetail/expellingDetail?id=${e.id}`)
const navFeed = (item, index)=>{
if(index==2) uni.navigateTo({
url: `/pages/feedDetail/feedDetail`,
success: (res) => {
res.eventChannel.emit('setDatasItem', item);
}
})
if(index==4) uni.navigateTo({
url: `/pages/feedDetail/waterDetail`,
success: (res) => {
res.eventChannel.emit('setDatasItem', item);
}
})
if(index==1) uni.navigateTo({
url: `/pages/feedDetail/sterilizeDetail`,
success: (res) => {
res.eventChannel.emit('setDatasItem', item);
}
})
if(index==3) uni.navigateTo({
url: `/pages/feedDetail/vaccineDetail`,
success: (res) => {
res.eventChannel.emit('setDatasItem', item);
}
})
if(index==0) uni.navigateTo({
url: `/pages/feedDetail/expellingDetail`,
success: (res) => {
res.eventChannel.emit('setDatasItem', item);
}
})
}

View File

@ -86,7 +86,7 @@
</view>
<block class="" v-if="feedList.length>0">
<view class="thing-card" v-for="(item, index) in feedList" :key="index" v-show="item">
<view class="card_body">
<view class="card_body" v-if="item">
<view class="left">
<u--image @click="perviewFn(item.pic[0])" radius='10' :src="item.pic[0]" width="200rpx"
height="200rpx"></u--image>
@ -202,7 +202,7 @@
fence_house_id: typeID.value
}).then(res=>{
res.data = res.data.map(item=>{
item.pic = JSON.parse(item.pic);
if(item!=null) item.pic = JSON.parse(item.pic||'[]');
return item;
})
feedList.value = res.data;
@ -223,7 +223,7 @@
id: typeID.value,
}).then((res) => {
if (res.code == 1) {
res.data.pic = JSON.parse(res.data.pic||'[]')
if(res.data.pic) res.data.pic = JSON.parse(res.data.pic||'[]');
Object.assign(dataobj, res.data);
}
});

View File

@ -37,7 +37,7 @@
<view class="thing-card" v-for="(item,index) in dataList" :key="index">
<view class="card_body">
<view class="left">
<u--image @click="perviewFn(item.img)" radius='10' :src="item.img" width="250rpx"
<u--image @click="perviewFn(item.pic[0])" radius='10' :src="item.pic[0]" width="250rpx"
height="250rpx"></u--image>
<u---image class="qr-code" @click="perviewFn(item.qr_code)" src="/static/main/house/su_yuan_ma_btn.png" width="60rpx" height="60rpx"></u---image>
</view>
@ -165,10 +165,12 @@
page_size: where.value.page_size
}).then((res) => {
if (res.code == 1) {
dataList.splice(0, dataList.length, ...res.data.lists);
dataList.forEach(item => {
item.showCode = false
res.data.lists = res.data.lists.map(item => {
item.showCode = false;
item.pic = JSON.parse(item.pic||'[]');
return item
})
dataList.splice(0, dataList.length, ...res.data.lists);
// console.log(dataList)
}
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long