diff --git a/common/request.js b/common/request.js
index 7b99414..1e9fce5 100644
--- a/common/request.js
+++ b/common/request.js
@@ -1,14 +1,24 @@
import store from "@/store"
export function host(host='default',suffix='/plant_manage'){
- return(
- process.env.NODE_ENV === 'development'?{
- default:`http://xvff42.natappfree.cc${suffix}` //陈
- // default:`http://6h8nxd.natappfree.cc${suffix}` //马
+ var url=process.env.NODE_ENV === 'development'?{
+ default:`http://2uktvr.natappfree.cc` //陈
+ // default:`http://6h8nxd.natappfree.cc` //马
}:{
- default:`http://qv6mj8.natappfree.cc${suffix}`
+ default:`http://qv6mj8.natappfree.cc`
}
- )[host]
+ return ({
+ default:`${url.default}${suffix}`,
+ imgUrl:`${url.default}/plant_manage/sys/common/static`
+ })[host]
+ // return(
+ // process.env.NODE_ENV === 'development'?{
+ // default:`http://10.0.0.217${suffix}` //陈
+ // // default:`http://6h8nxd.natappfree.cc${suffix}` //马
+ // }:{
+ // default:`http://qv6mj8.natappfree.cc${suffix}`
+ // }
+ // )[host]
}
diff --git a/pages/massif/mana/index.vue b/pages/massif/mana/index.vue
index d6e1110..0485452 100644
--- a/pages/massif/mana/index.vue
+++ b/pages/massif/mana/index.vue
@@ -27,13 +27,13 @@
-
+
-
+
@@ -53,7 +53,6 @@ export default {
{name:"采收记录",},
],
plotId:"",
- plantId:"",
}
},
onLoad(options){
diff --git a/pages/massif/mana/plantPlan.vue b/pages/massif/mana/plantPlan.vue
index 82c2563..5462c6a 100644
--- a/pages/massif/mana/plantPlan.vue
+++ b/pages/massif/mana/plantPlan.vue
@@ -1,124 +1,137 @@
-
-
-
- 加载失败
-
-
-
- {{v.plantStandard}} {{v.varietyName}}
+
+
+
+
+ 加载失败
+
+
+
+ {{v.plantStandard}} {{v.varietyName}}
+
+ 种植批次号:{{v.plantBatch}}
+ 已采收:{{v.harvested}}kg
+ {{v.plantArea}}
- 种植批次号:{{v.plantBatch}}
- 已采收:{{v.harvested}}kg
- {{v.plantArea}}
+
+
+ 本次预估采收时间:{{v.harvestTime}}
+
+
+
+
+ 已结束
-
- 本次预估采收时间:{{v.harvestTime}}
-
-
-
-
- 已结束
-
-
-
+
+
@@ -162,6 +175,8 @@ export default {
}
})
if(res.statu){
+ this.list=this.list.concat(res.data.records)
+ this.list=this.list.concat(res.data.records)
this.list=this.list.concat(res.data.records)
this.total=res.data.total
}else{
@@ -176,7 +191,7 @@ export default {
addPlant(){
uni.navigateTo({
url:`/pages/massif/plant_plan?plotId=${this.plotId}`,
- event:{ update:()=> {this.clean();this.search()} }
+ events:{ update:()=> {this.clean();this.search()} }
})
},
reDetail(id){
@@ -203,14 +218,9 @@ export default {
},
//跳转新增采收页面
toAdd(plantId){
- this.$emit("trigger",{tabIndex:2,plantId})
uni.navigateTo({
url:`/pages/massif/plant_info?plantId=${plantId}&plotId=${this.plotId}`,
- event:{ toRecovery:()=>{
- // this.$nextTick(()=>{
- this.$emit("trigger",{tabIndex:2,plantId})
- // })
- } }
+ events:{ toRecovery:()=> this.$emit("trigger",{tabIndex:2,plantId}) }
})
}
}
diff --git a/pages/massif/mana/recovery.vue b/pages/massif/mana/recovery.vue
index 466b11c..ffd7347 100644
--- a/pages/massif/mana/recovery.vue
+++ b/pages/massif/mana/recovery.vue
@@ -109,10 +109,6 @@ export default {
type:String,
defaylt:""
},
- plantId:{
- type:String,
- default:'',
- },
},
data(){
return{
@@ -134,25 +130,25 @@ export default {
return this.searchVal[this.dateType] || new Date().format('yyyy-MM-dd')
}
},
- watch:{
- plantId(){
- this.list=[]
- this.total=0
- this.searchVal.pageNo=1
- this.search()
- },
- },
created(){
this.search()
},
methods:{
- async search(){
+ reSearch(plantId){
+ this.$nextTick(()=>{
+ this.list=[]
+ this.total=0
+ this.searchVal.pageNo=1
+ this.search(plantId)
+ })
+ },
+ async search(plantId=''){
if(this.total==0||this.list.length
-
+
{{v.goodsName}} {{v.detailedType}}
@@ -80,9 +80,11 @@ export default {
},
list:[],
total:0,
+ eventChannel:null,
}
},
onLoad(){
+ this.eventChannel=this.getOpenerEventChannel()
this.search()
},
methods:{
@@ -114,6 +116,15 @@ export default {
events:{update:()=>{ this.clean();this.search() }}
})
},
+ toAddSepc(id){
+ uni.navigateTo({
+ url:`/pages/purchase/specs?id=${id}`,
+ events:{submit: e=>{
+ uni.navigateBack()
+ this.eventChannel.emit("submit",e)
+ }}
+ })
+ },
}
}
\ No newline at end of file
diff --git a/pages/purchase/apply.vue b/pages/purchase/apply.vue
index 80544b9..979dc79 100644
--- a/pages/purchase/apply.vue
+++ b/pages/purchase/apply.vue
@@ -93,32 +93,33 @@
- 申请人 {{info.name}}
+ 申请人 {{formData.applicantName}}
- 所在基地 {{info.baseName}}
+ 所在基地 {{formData.baseName}}
- 申请时间 {{new Date().format('yyyy-MM-dd')}}
+ 申请时间 {{formData.applicantTime}}
采购详情
-
+
- 化肥
- 中量元素水溶肥
- 删除
+ {{v.goodsName}}
+ {{v.detailedType}}
+ 删除
- 云南云天化股份有限公司
- 微量元素肥
+ {{v.supplier}}
+ {{v.detailedParentName}}
+
- 添加物品
+ 添加物品
@@ -133,7 +134,15 @@ import request from '@/common/request'
export default {
data(){
return{
- info:{},
+ formData:{
+ applicantId: "",
+ applicantName: "",
+ applicantTime: "",
+ baseName: "",
+ companyId: "",
+ plantPurchaseSubList: [],
+ // sysOrgCode: "",
+ },
}
},
onLoad(){
@@ -141,10 +150,13 @@ export default {
},
methods:{
async init(){
- //
var res=await request("/api/purchase/purchaseUserShow")
if(res.statu){
- this.info=res.data
+ this.formData.applicantId=res.data.userId
+ this.formData.applicantName=res.data.name
+ this.formData.applicantTime=new Date().format('yyyy-MM-dd')
+ this.formData.baseName=res.data.baseName
+ this.formData.companyId=this.$store.getters['userInfo'].companyId
}else{
uni.showModal({
title:"提示",
@@ -154,11 +166,30 @@ export default {
}
},
async submit(){
- var res=await request("/api/purchase/applicantStatus",{
- params:{
- status:2,
- purchaseId:"",
- }
+ if(this.formData.plantPurchaseSubList.length<=0){
+ uni.showToast({title:"请选择采购详情!",icon:"none"})
+ return false
+ }
+ var res=await request("/purchaseMain/purchaseMain/addPlantPurchaseSub",{
+ method:"post",
+ body: this.formData
+ })
+ if(res.statu){
+
+ }else{
+ uni.showModal({
+ title:"提示",
+ content:res.msg||"保存失败!",
+ showCancel:false,
+ })
+ }
+ },
+ toAddGoods(){
+ uni.navigateTo({
+ url:`/pages/purchase/agrProdList`,
+ events:{submit: e=>{
+ this.formData.plantPurchaseSubList.push(e)
+ }}
})
},
}
diff --git a/pages/purchase/newSpecs.vue b/pages/purchase/newSpecs.vue
index 48445ae..967eb30 100644
--- a/pages/purchase/newSpecs.vue
+++ b/pages/purchase/newSpecs.vue
@@ -53,19 +53,28 @@
规格
- kg
+ {{formData.massUnits}}
/
- 袋
+ {{formData.dressingUnit}}
例如:肥料一袋50kg,录入规格则为50kg/袋
预警值
- kg
+ {{formData.massUnits}}
-
+
+
+
\ No newline at end of file
diff --git a/uni_modules/d-picker/changelog.md b/uni_modules/d-picker/changelog.md
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/d-picker/components/d-picker/d-picker.vue b/uni_modules/d-picker/components/d-picker/d-picker.vue
new file mode 100644
index 0000000..4de6d36
--- /dev/null
+++ b/uni_modules/d-picker/components/d-picker/d-picker.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+ {{v.goodsName}}{{v.detailedType}}
+
+
+
+
+
+
+
diff --git a/uni_modules/d-picker/package.json b/uni_modules/d-picker/package.json
new file mode 100644
index 0000000..e40c6ef
--- /dev/null
+++ b/uni_modules/d-picker/package.json
@@ -0,0 +1,81 @@
+{
+ "id": "d-picker",
+ "displayName": "d-picker",
+ "version": "1.0.0",
+ "description": "d-picker",
+ "keywords": [
+ "d-picker"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "",
+ "data": "",
+ "permissions": ""
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "u",
+ "aliyun": "u"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "u",
+ "vue3": "u"
+ },
+ "App": {
+ "app-vue": "u",
+ "app-nvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "u",
+ "Android Browser": "u",
+ "微信浏览器(Android)": "u",
+ "QQ浏览器(Android)": "u"
+ },
+ "H5-pc": {
+ "Chrome": "u",
+ "IE": "u",
+ "Edge": "u",
+ "Firefox": "u",
+ "Safari": "u"
+ },
+ "小程序": {
+ "微信": "u",
+ "阿里": "u",
+ "百度": "u",
+ "字节跳动": "u",
+ "QQ": "u",
+ "钉钉": "u",
+ "快手": "u",
+ "飞书": "u",
+ "京东": "u"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/d-picker/readme.md b/uni_modules/d-picker/readme.md
new file mode 100644
index 0000000..48f3e97
--- /dev/null
+++ b/uni_modules/d-picker/readme.md
@@ -0,0 +1 @@
+# d-picker
\ No newline at end of file