Browse Source

联调仓库接口

master
邓宏 2 years ago
parent
commit
4cba8eb753
  1. 8
      pages/home/index.vue
  2. 13
      pages/warehouse/info.vue

8
pages/home/index.vue

@ -196,7 +196,10 @@
margin:20rpx 0;
padding-bottom:20rpx;
border-bottom:2rpx solid #D8D8D8;
display:flex;
align-items: center;
text{
flex-shrink: 0;
display: inline-flex;
align-items: center;
&:before{
@ -207,6 +210,10 @@
&.active{
color:rgba(var(--c),1);
}
&.more{
color:#999;
margin-left:auto;
}
}
}
.item{
@ -321,6 +328,7 @@
<view class="matter">
<text class="plant-jilu" :class="{active:baseIndex=='record'}" style="--c:16, 193, 118;margin-right:40px;" @click="baseIndex=='record'?baseIndex='':baseIndex='record'">农事记录</text>
<text class="plant-tourupin" :class="{active:baseIndex=='input'}" style="--c:255, 195, 83;" @click="baseIndex=='input'?baseIndex='':baseIndex='input'">投入品</text>
<text class="more">更多>></text>
</view>
<template v-if="!baseIndex || baseIndex=='record'">

13
pages/warehouse/info.vue

@ -87,7 +87,7 @@ import request from '@/common/request.js'
submit(){
this.$refs.form.validate().then(async valid=>{
if(valid){
var res=await request("/api/AddWarehouseApi/add",{
var res=await request("/api/WarehouseManageApi/addOrUpdate",{
method:"post",
body:{
...this.formData,
@ -107,12 +107,15 @@ import request from '@/common/request.js'
}
})
},
async getDetail(warehouseId){
var res=await request("/api/WarehouseManageApi/addOrUpdate",{
params:{warehouseId}
async getDetail(id){
var res=await request("/api/WarehouseManageApi/queryById",{
params:{id}
})
if(res.statu){
this.formData=res.data.upper
this.formData=res.data
this.fields.warehousePic.value=res.data.warehousePic
this.formData.warehousePic=res.data.warehousePic?.split?.(",")?.filter?.(v=>v)||[]
this.fields.warehouseType.value=[res.data.warehouseType]
}else{
uni.showModal({
title:"提示",

Loading…
Cancel
Save