Browse Source

采购申请页面跳转

master
邓宏 2 years ago
parent
commit
66c227f7d6
  1. 4
      common/request.js
  2. 4
      pages.js
  3. 38
      pages.json
  4. 2
      pages/home/index.vue
  5. 7
      pages/home/my.vue
  6. 3
      pages/purchase/apply.vue
  7. 2
      uni.scss
  8. 41
      uni_modules/d-form/components/d-form/d-form.vue

4
common/request.js

@ -2,8 +2,8 @@ import store from "@/store"
export function host(host='default',suffix='/plant_manage'){
var url=process.env.NODE_ENV === 'development'?{
// default:`http://zrxsae.natappfree.cc` //陈
default:`http://uq5pak.natappfree.cc` //马
default:`http://wmyrzw.natappfree.cc` //陈
// default:`http://uq5pak.natappfree.cc` //马
}:{
default:`http://qv6mj8.natappfree.cc`
}

4
pages.js

@ -38,13 +38,13 @@ module.exports = hot((pagesJson)=>{
list: [
// {name:"测试页面",path:"pages/demo"},
// {name: "地块管理",path: "pages/massif/mana/index","query": ""},
{name: "地块基本信息",path: "pages/massif/info","query": ""},
{name: "登录",path: "pages/home/login","query": ""},
{name: "首页",path: "pages/home/index","query": ""},
{name: "仓库管理",path: "pages/warehouse/mana","query": ""},
{name: "仓库基本信息",path: "pages/warehouse/info","query": ""},
{name: "仓库详情",path: "pages/warehouse/detail","query": ""},
{name: "地块详情",path: "pages/massifDetail","query": ""},
{name: "地块基本信息",path: "pages/massifInfo","query": ""}
{name: "地块详情",path: "pages/massif/detail","query": ""},
]
}
}

38
pages.json

@ -1,16 +1,26 @@
{
"easycom":{
"^u-(.*)":"uview-ui/components/u-$1/u-$1.vue"
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {},
"condition" : {
"current": 0,
"list": []
}
"easycom" : {
"^u-(.*)" : "uview-ui/components/u-$1/u-$1.vue"
},
"globalStyle" : {
"navigationBarTextStyle" : "black",
"navigationBarTitleText" : "uni-app",
"navigationBarBackgroundColor" : "#F8F8F8",
"backgroundColor" : "#F8F8F8"
},
"uniIdRouter" : {},
"condition" : {
"current" : 0,
"list" : []
},
"pages" : [
{
"path" : "pages/home/index",
"style" : {}
},
{
"path" : "pages/massif/info",
"style" : {}
}
]
}

2
pages/home/index.vue

@ -314,7 +314,7 @@
</view>
<view class="matter">
<text class="plant-jilu" style="--c:16, 193, 118;margin-right:40px;">农事记录</text>
<text class="plant-tourupin" style="--c:6, 184, 249;">投入品</text>
<text class="plant-tourupin" style="--c:255, 195, 83;">投入品</text>
</view>
<view class="item" style="--c:16, 193, 118;">

7
pages/home/my.vue

@ -84,6 +84,13 @@ import {host} from '@/common/request'
host,
}
},
onLoad(options){
this.$nextTick(()=>{
if(options.toPage){
uni.navigateTo({url:`/pages/purchase/${options.toPage}`})
}
})
},
methods:{
}

3
pages/purchase/apply.vue

@ -146,6 +146,7 @@ export default {
}
},
onLoad(){
uni.reLaunch({url:"/pages/home/my?toPage=record"})
this.init()
},
methods:{
@ -175,7 +176,7 @@ export default {
body: this.formData
})
if(res.statu){
uni.showToast({title:"保存成功!",icon:"success"})
uni.switchTab({url:"/pages/home/my?toPage=record"})
}else{
uni.showModal({
title:"提示",

2
uni.scss

@ -77,7 +77,7 @@ $uni-font-size-paragraph:15px;
@import '@/common/main.css';
@import 'uview-ui/theme.scss';
@import url('https://at.alicdn.com/t/c/font_3852037_jjiimlkafse.css');
@import url('https://at.alicdn.com/t/c/font_3852037_dzizkbp2jzo.css');
[class*=plant-]{
font-family: "plantMana" !important;
font-size: 16px;

41
uni_modules/d-form/components/d-form/d-form.vue

@ -427,40 +427,51 @@ import {dataType} from 'black-knight/lib/config/tools'
openMap(){
/* #ifdef APP-PLUS */
this.showMap=true
if(!this.maps){
var amap=uni.createMapContext("amap",this)
for(var i in plus.maps.MapStyles){
console.log(i,'-plus.maps.MapStyles-------')
}
this.maps=amap.$getAppMap()
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE)
var polyline=new plus.maps.Polyline([])
polyline.setLineWidth(8)
polyline.setStrokeColor("#10C176")
this.maps.addOverlay(polyline)
this.maps.onclick=(e)=>{
if(this.value.length<0){
if(this.value.length<=0 && this.markerList.length<=2){
var marker=new plus.maps.Marker(new plus.maps.Point(e.longitude, e.latitude));
marker.setIcon("/static/map_point_1.png");
marker.bringToTop()
marker.setDraggable(true)
marker.onDrag= e=>{
console.log("-----Drag:",JSON.stringify(e.getPoint()))
}
this.markerList.push(marker)
this.maps.addOverlay(marker);
polyline.setPath(this.markerList.map(v=>{
var point=v.getPoint()
return new plus.maps.Point(point.longitude, point.latitude)
}))
}
console.log(e,'-------maps--click---------')
}
// var polygon=new plus.maps.Polygon([
// new plus.maps.Point(116.39524,39.925301),
// new plus.maps.Point(116.400444,39.925285),
// new plus.maps.Point(116.400558,39.923282),
// new plus.maps.Point(116.395502,39.923082),
// ])
// polygon.setLineWidth(2)
// polygon.setLineWidth(3)
// polygon.setStrokeColor("#10C176")
// polygon.setFillColor("#10C176")
// polygon.setFillOpacity(0.3)
// this.maps.addOverlay(polygon)
var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055));
marker.setIcon("/static/map_point_1.png");
marker.bringToTop()
marker.setDraggable(true)
marker.onclick= e=>{
console.log('---onclick----')
}
marker.onDrag= e=>{
console.log("-----Drag:",JSON.stringify(e.getPoint()))
}
this.maps.addOverlay(marker);
}
/* #endif */
}

Loading…
Cancel
Save