master
Tuzki 2 years ago
parent e1ceca30e7
commit 4349d8c45e
  1. 6
      config.js
  2. 2
      main.js
  3. 21
      manifest.json
  4. 280
      pages.json
  5. 8
      pages/block/index.vue
  6. 14
      pages/index.vue
  7. 16
      pages/login.vue
  8. 16
      pages/mine/index.vue
  9. 4
      pages/work/index.vue
  10. 48
      permission.js
  11. 8
      store/index.js
  12. 6
      sunPages/addBlock/addBlock.vue
  13. 26
      sunPages/addCropForm/addCropForm.vue
  14. 21
      sunPages/addCrops/addCrops.vue
  15. 30
      sunPages/addNoteJob/addNoteJob.vue
  16. 54
      sunPages/addNoteJobForm/addNoteJobForm.vue
  17. 0
      sunPages/common/textview/index.vue
  18. 0
      sunPages/common/webview/index.vue
  19. 36
      sunPages/commonSearch/commonSearch.vue
  20. 14
      sunPages/commonSearch/nzSearch.vue
  21. 12
      sunPages/commonSearch/proSearch.vue
  22. 0
      sunPages/components/verifition/utils/ase.js
  23. 0
      sunPages/components/verifition/utils/request.js
  24. 0
      sunPages/components/verifition/verify.vue
  25. 0
      sunPages/components/verifition/verifyPoint/verifyPoint.vue
  26. 0
      sunPages/components/verifition/verifySlider/verifySlider.vue
  27. 4
      sunPages/drawMap/drawMap.vue
  28. 6
      sunPages/editBlock/editBlock.vue
  29. 11
      sunPages/jobCustom/jobCustom.vue
  30. 0
      sunPages/mine/about/index.vue
  31. 0
      sunPages/mine/avatar/index.vue
  32. 2
      sunPages/mine/base/baseList.vue
  33. 2
      sunPages/mine/base/index.vue
  34. 0
      sunPages/mine/business/index.vue
  35. 2
      sunPages/mine/help/index.vue
  36. 0
      sunPages/mine/info/edit.vue
  37. 0
      sunPages/mine/info/index.vue
  38. 0
      sunPages/mine/pwd/index.vue
  39. 2
      sunPages/mine/setting/index.vue
  40. 0
      sunPages/traceability-code/inventory.vue
  41. 0
      sunPages/traceability-code/sales.vue
  42. 11
      sunPages/traceability-product/delivery/deliveryEdit.vue
  43. 0
      sunPages/traceability-product/delivery/index.vue
  44. 28
      sunPages/traceability-product/index.vue
  45. 0
      sunPages/traceability-product/loss/index.vue
  46. 13
      sunPages/traceability-product/loss/lossEdit.vue
  47. 4
      sunPages/traceability-product/machining/index.vue
  48. 4
      sunPages/traceability-product/machining/materialsList.vue
  49. 0
      sunPages/traceability-product/sales/index.vue
  50. 17
      sunPages/traceability-product/sales/salesEdit.vue
  51. 4
      utils/request.js

@ -1,13 +1,13 @@
// 应用全局配置
module.exports = {
// baseUrl: 'http://api-dashboard.yudao.iocoder.cn',
baseUrl: 'https://sy.hbcjy.com/prod-api',
// baseUrl: 'http://127.0.0.1:48080',
baseUrl: 'http://192.168.130.193:48080',
// baseUrl: 'http://192.168.130.193:48080',
baseApi: '/admin-api',
// 应用信息
appInfo: {
// 应用名称
name: "yudao-app",
name: "农源追溯宝",
// 应用版本
version: "1.0.0",
// 应用logo

@ -6,8 +6,6 @@ import './permission' // permission
import {DICT_TYPE, getDictDataLabel, getDictDatas, getDictDatas2} from "@/utils/dict";
import { getDicts } from "@/api/system/dict/data";
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
// 注意要在use方法之后执行
Vue.use(plugins)

@ -41,7 +41,7 @@
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wxaf70a5cd03b06c19",
"appid" : "wx09c9feedd19378a3",
"setting" : {
"urlCheck" : false,
"es6" : false,
@ -52,15 +52,16 @@
"subPackages" : true
},
"usingComponents" : true,
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
},
"scope.userFuzzyLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos": ["chooseLocation","getLocation"]
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
},
"scope.userFuzzyLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ],
"lazyCodeLoading": "requiredComponents"
},
"vueVersion" : "2",
"h5" : {

@ -1,15 +1,18 @@
{
"pages": [
{
"pages": [{
"path": "pages/login",
"style": {
"navigationBarTitleText": "登录"
"navigationBarTitleText": "登录",
"componentPlaceholder": {
// "其他分包自定义组件": "占位组件"
"verify": "view"
}
}
},
{
"path": "pages/index",
"style": {
"navigationBarTitleText": "芋道移动端框架",
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
@ -30,139 +33,6 @@
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/mine/avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
},
{
"path": "pages/mine/info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "pages/mine/info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "pages/mine/pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/mine/setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
},
{
"path": "pages/mine/help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
},
{
"path": "pages/mine/about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/mine/business/index",
"style": {
"navigationBarTitleText": "企业信息"
}
}, {
"path": "pages/mine/base/index",
"style": {
"navigationBarTitleText": "基地信息"
}
}, {
"path": "pages/mine/base/baseList",
"style": {
"navigationBarTitleText": "基地列表"
}
},
{
"path": "pages/common/webview/index",
"style": {
"navigationBarTitleText": "浏览网页"
}
},
{
"path": "pages/common/textview/index",
"style": {
"navigationBarTitleText": "浏览文本"
}
},
{
"path": "pages/traceability-code/inventory",
"style": {
"navigationBarTitleText": "库存溯源码"
}
},
{
"path": "pages/traceability-code/sales",
"style": {
"navigationBarTitleText": "销售溯源码"
}
},
{
"path": "pages/traceability-product/index",
"style": {
"navigationBarTitleText": "溯源产品"
}
},
{
"path": "pages/traceability-product/delivery/index",
"style": {
"navigationBarTitleText": "配送记录"
}
},
{
"path": "pages/traceability-product/delivery/deliveryEdit",
"style": {
"navigationBarTitleText": "产品配送"
}
},
{
"path": "pages/traceability-product/sales/index",
"style": {
"navigationBarTitleText": "销售记录"
}
},
{
"path": "pages/traceability-product/sales/salesEdit",
"style": {
"navigationBarTitleText": "产品销售"
}
},
{
"path": "pages/traceability-product/loss/index",
"style": {
"navigationBarTitleText": "报损记录"
}
},
{
"path": "pages/traceability-product/loss/lossEdit",
"style": {
"navigationBarTitleText": "产品报损"
}
}, {
"path": "pages/traceability-product/machining/index",
"style": {
"navigationBarTitleText": "产品加工"
}
}, {
"path": "pages/traceability-product/machining/materialsList",
"style": {
"navigationBarTitleText": "生产原料"
}
}
],
"subPackages": [{
@ -248,6 +118,139 @@
"navigationBarTitleText": "农事记录",
"enablePullDownRefresh": false
}
},
{
"path": "mine/avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
},
{
"path": "mine/info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "mine/info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "mine/pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "mine/setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
},
{
"path": "mine/help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
},
{
"path": "mine/about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "mine/business/index",
"style": {
"navigationBarTitleText": "企业信息"
}
}, {
"path": "mine/base/index",
"style": {
"navigationBarTitleText": "基地信息"
}
}, {
"path": "mine/base/baseList",
"style": {
"navigationBarTitleText": "基地列表"
}
},
{
"path": "common/webview/index",
"style": {
"navigationBarTitleText": "浏览网页"
}
},
{
"path": "common/textview/index",
"style": {
"navigationBarTitleText": "浏览文本"
}
},
{
"path": "traceability-code/inventory",
"style": {
"navigationBarTitleText": "库存溯源码"
}
},
{
"path": "traceability-code/sales",
"style": {
"navigationBarTitleText": "销售溯源码"
}
},
{
"path": "traceability-product/index",
"style": {
"navigationBarTitleText": "溯源产品"
}
},
{
"path": "traceability-product/delivery/index",
"style": {
"navigationBarTitleText": "配送记录"
}
},
{
"path": "traceability-product/delivery/deliveryEdit",
"style": {
"navigationBarTitleText": "产品配送"
}
},
{
"path": "traceability-product/sales/index",
"style": {
"navigationBarTitleText": "销售记录"
}
},
{
"path": "traceability-product/sales/salesEdit",
"style": {
"navigationBarTitleText": "产品销售"
}
},
{
"path": "traceability-product/loss/index",
"style": {
"navigationBarTitleText": "报损记录"
}
},
{
"path": "traceability-product/loss/lossEdit",
"style": {
"navigationBarTitleText": "产品报损"
}
}, {
"path": "traceability-product/machining/index",
"style": {
"navigationBarTitleText": "产品加工"
}
}, {
"path": "traceability-product/machining/materialsList",
"style": {
"navigationBarTitleText": "生产原料"
}
}
]
}],
@ -294,6 +297,7 @@
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "RuoYi",
"navigationBarBackgroundColor": "#FFFFFF"
"navigationBarBackgroundColor": "#FFFFFF",
"usingComponents": {}
}
}

@ -67,6 +67,12 @@ export default {
}
};
},
watch: {
"$store.state.user.baseId"(newValue, oldVal) {
this.baseId=newValue
this.$refs.paging.reload();
}
},
onLoad() {
this.dataList = [];
// setTimeout(()=>{
@ -154,7 +160,7 @@ export default {
.then((res) => {
uni.showToast({
title: '删除成功',
icon: 'none',
icon: 'success',
success() {
this_.queryList();
}

@ -55,7 +55,7 @@
</navigator>
</view>
<view class="v-index-nav-item col-8">
<navigator url="/pages/traceability-product/machining/index">
<navigator url="/sunPages/traceability-product/machining/index">
<view class="icon">
<image class="v-index-bg"
src="https://sy.hbcjy.com/prod-api/admin-api/infra/file/23/get/f7735fc972de7a1e73fd315e38639b054b79a969830f0aa6c42e974f54579fed.png">
@ -65,7 +65,7 @@
</navigator>
</view>
<view class="v-index-nav-item col-8">
<navigator url="/pages/traceability-product/delivery/index">
<navigator url="/sunPages/traceability-product/delivery/index">
<view class="icon">
<image class="v-index-bg"
src="https://sy.hbcjy.com/prod-api/admin-api/infra/file/23/get/80bb27e0cedca02c88d3b226b169a5b57fe1b6c2505743ceda40ae328e161287.png">
@ -75,7 +75,7 @@
</navigator>
</view>
<view class="v-index-nav-item col-8">
<navigator url="/pages/traceability-product/sales/index">
<navigator url="/sunPages/traceability-product/sales/index">
<view class="icon">
<image class="v-index-bg"
src="https://sy.hbcjy.com/prod-api/admin-api/infra/file/23/get/42746f3ff8e9bda732e8821fa80b791e21b725053eb95de95a595b91b737594d.png">
@ -85,7 +85,7 @@
</navigator>
</view>
<view class="v-index-nav-item col-8">
<navigator url="/pages/traceability-product/loss/index">
<navigator url="/sunPages/traceability-product/loss/index">
<view class="icon">
<image class="v-index-bg"
src="https://sy.hbcjy.com/prod-api/admin-api/infra/file/23/get/5cc5e5c663df1f7bb8acf73219a60bc9b14ed13482f8df294349acc503163f1b.png">
@ -99,7 +99,7 @@
<!-- 首页 导航 -->
<view class="v-index-nav v-container row m-t-regular">
<view class="col-12">
<navigator url="/pages/traceability-product/index">
<navigator url="/sunPages/traceability-product/index">
<view class="v-index-nav-box product">
<view class="text">溯源产品</view>
<view class="icon">
@ -111,7 +111,7 @@
</navigator>
</view>
<view class="col-12">
<navigator url="/pages/traceability-code/sales">
<navigator url="/sunPages/traceability-code/sales">
<view class="v-index-nav-box sales">
<view class="text">销售溯源码</view>
<view class="icon">
@ -121,7 +121,7 @@
</view>
</view>
</navigator>
<navigator url="/pages/traceability-code/inventory">
<navigator url="/sunPages/traceability-code/inventory">
<view class="v-index-nav-box inventory">
<view class="text">库存溯源码</view>
<view class="icon">

@ -14,7 +14,7 @@
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
</view>
<Verify @success="pwdLogin" :mode="'pop'" :captchaType="'blockPuzzle'"
<verify @success="pwdLogin" :mode="'pop'" :captchaType="'blockPuzzle'"
:imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
<view class="action-btn">
<button @click="handleLogin" class="login-btn">登录</button>
@ -30,22 +30,22 @@
</template>
<script>
import Verify from "@/components/verifition/Verify"
import verify from "../sunPages/components/verifition/verify"
import * as CryptoUtils from '@/utils/cryptoUtils.js';
import store from "@/store"
export default {
name: 'Login',
components: {
Verify
verify
},
data() {
return {
captchaEnabled: true, // TODO
globalConfig: getApp().globalData.config,
loginForm: {
username: "admin",
password: "cjy@1501!",
username: "",
password: "",
captchaVerification: ""
}
}
@ -54,12 +54,12 @@
//
handlePrivacy() {
let site = this.globalConfig.appInfo.agreements[0]
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
this.$tab.navigateTo(`/sunPages/common/webview/index?title=${site.title}&url=${site.url}`)
},
//
handleUserAgrement() {
let site = this.globalConfig.appInfo.agreements[1]
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
this.$tab.navigateTo(`/sunPages/common/webview/index?title=${site.title}&url=${site.url}`)
},
//
async handleLogin(params) {
@ -88,7 +88,7 @@
console.log(res)
// setTimeout(()=>{
this.$store.dispatch('changeBaseId',1130)
this.$store.dispatch('changeBaseId',res[0].id)
// },1500)
})
})

@ -84,27 +84,27 @@
},
methods: {
handleToEnterpriseInfo() {
this.$tab.navigateTo('/pages/mine/business/index')
this.$tab.navigateTo('/sunPages/mine/business/index')
},
handleToBaseInfo() {
this.$tab.navigateTo('/pages/mine/base/index')
this.$tab.navigateTo('/sunPages/mine/base/index')
},
handleToInfo() {
this.$tab.navigateTo('/pages/mine/info/index')
this.$tab.navigateTo('/sunPages/mine/info/index')
},
handleToEditInfo() {
this.$tab.navigateTo('/pages/mine/info/edit')
this.$tab.navigateTo('/sunPages/mine/info/edit')
},
handleToSetting() {
console.log('32')
this.$tab.navigateTo('/pages/mine/setting/index')
this.$tab.navigateTo('/sunPages/mine/setting/index')
},
handleToLogin() {
this.$tab.reLaunch('/pages/login')
},
handleToAvatar() {
this.$tab.navigateTo('/pages/mine/avatar/index')
this.$tab.navigateTo('/sunPages/mine/avatar/index')
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
@ -114,10 +114,10 @@
})
},
handleHelp() {
this.$tab.navigateTo('/pages/mine/help/index')
this.$tab.navigateTo('/sunPages/mine/help/index')
},
handleAbout() {
this.$tab.navigateTo('/pages/mine/about/index')
this.$tab.navigateTo('/sunPages/mine/about/index')
},
handleJiaoLiuQun() {
this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群')

@ -75,11 +75,7 @@
</template>
<script>
import uniSection from "@/components/uni-section/uni-section"
export default {
components: {
uniSection
},
data() {
return {
current: 0,

@ -6,38 +6,34 @@ const loginPage = "/pages/login"
// 页面白名单
const whiteList = [
'/pages/login', '/pages/common/webview/index'
'/pages/login', '/sunPages/common/webview/index'
]
// 检查地址白名单
function checkWhite(url) {
const path = url.split('?')[0]
return whiteList.indexOf(path) !== -1
}
store.dispatch('dict/loadDictDatas')
// 页面跳转验证拦截器
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
// list.forEach(item => {
// uni.addInterceptor(item, {
// invoke(to) {
// if (getAccessToken()) {
// store.dispatch('dict/loadDictDatas')
// if (to.path === loginPage) {
// uni.reLaunch({ url: "/" })
// }
// return true
// } else {
// store.dispatch('dict/loadDictDatas')
// if (checkWhite(to.url)) {
// return true
// }
// uni.reLaunch({ url: loginPage })
// return false
// }
// },
// fail(err) {
// console.log(err)
// }
// })
// })
list.forEach(item => {
uni.addInterceptor(item, {
invoke(to) {
if (getAccessToken()) {
if (to.path === loginPage) {
uni.reLaunch({ url: "/" })
}
return true
} else {
if (checkWhite(to.url)) {
return true
}
uni.reLaunch({ url: loginPage })
return false
}
},
fail(err) {
console.log(err)
}
})
})

@ -8,6 +8,14 @@ import dict from './modules/dict'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
formData: null // 用于存储表单数据的状态
},
mutations: {
updateFormData(state, data) {
state.formData = data;
}
},
modules: {
user,
dict

@ -141,9 +141,7 @@ export default {
});
},
onUnload() {
uni.navigateBack({
delta:2
})
},
methods: {
openColor() {
@ -274,7 +272,7 @@ export default {
});
},
drawMap() {
uni.navigateTo({
uni.redirectTo({
url: '/sunPages/drawMap/drawMap'
});
},

@ -211,6 +211,11 @@ export default {
};
},
mixins: [mix],
computed: {
formDatas() {
return this.$store.state.formData; // Vuex
}
},
onLoad(options) {
if (options.params) {
this.formData = JSON.parse(options.params);
@ -223,6 +228,7 @@ export default {
}
console.log(this.formData);
if (this.formData.authenticationPic != undefined) {
this.imgList = []
this.imgList.push(this.formData.authenticationPic);
}
}
@ -232,6 +238,22 @@ export default {
this.$refs.formRef.setRules(this.formRules);
},
onShow() {
if (this.formDatas) {
// 使formData
console.log('this.formDatas', this.formDatas);
this.formData = this.formDatas;
const choo = this.formData.choose
console.log(choo,';;;;;')
if(choo == undefined){
this.formData.choose = true
}else{
this.formData.choose = choo
}
if (this.formData.authenticationPic != undefined) {
this.imgList = []
this.imgList.push(this.formData.authenticationPic);
}
}
//
let arr = this.getDictDatas(DICT_TYPE.AUTHENTICATION_TYPE);
arr.forEach((item) => {
@ -252,9 +274,7 @@ export default {
this.operationWayList = arr2;
},
onUnload() {
uni.navigateBack({
delta:0
})
this.$store.commit('updateFormData', null);
},
methods: {
getCustomChange() {

@ -34,12 +34,10 @@
<script>
import hyPopupSelect from "@/uni_modules/hy-popup-select/components/hy-popup-select/hy-popup-select"
import uniSection from "@/components/uni-section/uni-section"
import {getSpeciesList} from '@/api/system/addCrop/addCrop.js';
export default {
components: {
uniSection,
hyPopupSelect
},
data() {
@ -49,6 +47,11 @@ export default {
SpeciesList: null,
};
},
computed: {
formDatas() {
return this.$store.state.formData; // Vuex
}
},
onLoad(options) {
if (options.params) {
this.reviceData = JSON.parse(decodeURIComponent(options.params));
@ -57,6 +60,16 @@ export default {
this.reviceData = null;
}
},
onShow() {
if (this.formDatas) {
// 使formData
console.log('this.formDatas', this.formDatas);
this.reviceData = this.formDatas;
}
},
onUnload() {
this.$store.commit('updateFormData', null);
},
watch: {
reviceData: {
handler(val) {
@ -80,11 +93,11 @@ export default {
};
const val = JSON.stringify(obj);
console.log(val);
uni.redirectTo({
uni.navigateTo({
url: '/sunPages/commonSearch/commonSearch?isBlock=2&params=' + val
});
} else {
uni.redirectTo({
uni.navigateTo({
url: '/sunPages/commonSearch/commonSearch?isBlock=2'
});
}

@ -25,17 +25,29 @@ import { getJob } from '@/api/system/addNoteJob/addNoteJob.js';
}else{
this.reviceData = null
}
getJob().then(res => {
this.jobList = res.data.filter(item => item.id !== 1);
const obj = {
id: 9999,
husbandryName: '自定义'
}
this.jobList.push(obj)
console.log(this.jobList);
});
this.getJob()
},
onShow() {
const datas = uni.getStorageSync('canRefresh');
if(datas == 'true'){
this.getJob()
}
},
onUnload() {
uni.removeStorageSync('canRefresh')
},
methods: {
getJob(){
getJob().then(res => {
this.jobList = res.data.filter(item => item.id !== 1);
const obj = {
id: 9999,
husbandryName: '自定义'
}
this.jobList.push(obj)
console.log(this.jobList);
});
},
handleClick(item) {
if (item.id === 9999) {
uni.navigateTo({

@ -266,7 +266,12 @@ export default {
}
};
},
onLoad(options) {
computed: {
formDatas() {
return this.$store.state.formData; // Vuex
}
},
onLoad(options) {
if (options.params) {
this.formData = JSON.parse(decodeURIComponent(options.params));
if (this.formData.husbandryImage == undefined){
@ -284,20 +289,46 @@ export default {
this.showSave = false;
}
if (this.formData.husbandryImage != undefined) {
this.imgList = []
this.imgList.push(this.formData.husbandryImage);
}
if (this.formData.qualityImage != undefined) {
this.imgList1 = []
this.imgList1.push(this.formData.qualityImage);
}
this.getNzList(this.formData.husbandryId);
}
},
onReady() {
//
this.$refs.formRef.setRules(this.formRules);
},
onShow() {
// OPERATION_WAY
if (this.formDatas) {
// 使formData
console.log('this.formDatas', this.formDatas);
this.formData = this.formDatas;
if (this.formData.husbandryImage == undefined){
this.formData.hasNextBatch = '1';
}
const choo = this.formData.choose
if(choo == undefined){
this.formData.choose = true
}else{
this.formData.choose = choo
}
if (this.formData.husbandryId == 11) {
this.showSave = true;
} else {
this.showSave = false;
}
if (this.formData.husbandryImage != undefined) {
this.imgList = []
this.imgList.push(this.formData.husbandryImage);
}
if (this.formData.qualityImage != undefined) {
this.imgList1 = []
this.imgList1.push(this.formData.qualityImage);
}
this.getNzList(this.formData.husbandryId);
}
// OPERATION_WAY
let arr = this.getDictDatas(DICT_TYPE.QUALITY_INSPECTION);
arr.forEach((item) => {
item.text = item.label;
@ -318,6 +349,13 @@ export default {
this.getJobPerson();
},
onReady() {
//
this.$refs.formRef.setRules(this.formRules);
},
onUnload() {
this.$store.commit('updateFormData', null);
},
methods: {
parseTime(time, pattern) {
return parseTime(time, pattern);
@ -353,12 +391,12 @@ export default {
console.log(this.formData);
const val = encodeURIComponent(JSON.stringify(this.formData));
if (num == 1) {
uni.redirectTo({
uni.navigateTo({
url: '/sunPages/commonSearch/proSearch?params=' + val
});
}
if (num == 2) {
uni.redirectTo({
uni.navigateTo({
url: '/sunPages/commonSearch/nzSearch?params=' + val
});
}

@ -163,28 +163,40 @@ export default {
const obj = this.resviceData;
obj.productId = val.id;
obj.productName = val.productName;
const data = encodeURIComponent(JSON.stringify(obj));
uni.redirectTo({
url: '/sunPages/addCrops/addCrops?params=' + data
});
this.$store.commit('updateFormData', obj);
uni.navigateBack({
delta: 1
})
// const data = encodeURIComponent(JSON.stringify(obj));
// uni.redirectTo({
// url: '/sunPages/addCrops/addCrops?params=' + data
// });
} else if (this.resviceData == null && num != '1') {
const obj = {
productId: val.id,
productName: val.productName
};
const data = encodeURIComponent(JSON.stringify(obj));
uni.redirectTo({
url: '/sunPages/addCrops/addCrops?params=' + data
});
this.$store.commit('updateFormData', obj);
uni.navigateBack({
delta: 1
})
// const data = encodeURIComponent(JSON.stringify(obj));
// uni.redirectTo({
// url: '/sunPages/addCrops/addCrops?params=' + data
// });
} else {
const obj = this.resviceData;
obj.blockId = val.id;
obj.blockName = val.blockName;
obj.blockArea = val.blockArea;
const data = JSON.stringify(obj);
uni.redirectTo({
url: '/sunPages/addCropForm/addCropForm?params=' + data
});
this.$store.commit('updateFormData', obj);
uni.navigateBack({
delta: 1
})
// const data = JSON.stringify(obj);
// uni.redirectTo({
// url: '/sunPages/addCropForm/addCropForm?params=' + data
// });
}
},
searchByProductName(val) {

@ -21,8 +21,6 @@
</uni-transition>
</view>
</view>
<u-empty mode="data" v-else>
</u-empty>
<button class="m-next-step" @click="nextStep">保存</button>
</view>
</template>
@ -181,10 +179,14 @@ export default {
});
this.reviceData.agriculturalName = arr.join(',');
this.reviceData.agriculturalJson = JSON.stringify(this.reviceData.selectItems)
const data = encodeURIComponent(JSON.stringify(this.reviceData));
uni.redirectTo({
url: '/sunPages/addNoteJobForm/addNoteJobForm?params=' + data
});
this.$store.commit('updateFormData', this.reviceData);
uni.navigateBack({
delta: 1
})
// const data = encodeURIComponent(JSON.stringify(this.reviceData));
// uni.redirectTo({
// url: '/sunPages/addNoteJobForm/addNoteJobForm?params=' + data
// });
},
handler(selectArr, dataList) {
dataList.forEach((item) => {

@ -112,10 +112,14 @@ export default {
this.reviceData.batch = val.currentBatch;
this.reviceData.authenticationType = val.authenticationType;
console.log(this.reviceData);
const data = encodeURIComponent(JSON.stringify(this.reviceData));
uni.redirectTo({
url: '/sunPages/addNoteJobForm/addNoteJobForm?params=' + data
});
this.$store.commit('updateFormData', this.reviceData);
uni.navigateBack({
delta: 1
})
// const data = encodeURIComponent(JSON.stringify(this.reviceData));
// uni.redirectTo({
// url: '/sunPages/addNoteJobForm/addNoteJobForm?params=' + data
// });
}
}
};

@ -20,9 +20,9 @@ export default {
onLoad(options) {
if (options.str) {
this.str = options.str;
this.src = 'http://192.168.130.193:8848/H5/map.html?str=' + this.str
this.src = 'https://sy.hbcjy.com/h5/map.html?str=' + this.str
}else{
this.src = 'http://192.168.130.193:8848/H5/map.html?str=null'
this.src = 'https://sy.hbcjy.com/h5/map.html?str=null'
}
console.log(this.src)
}

@ -152,9 +152,7 @@ export default {
});
},
onUnload() {
uni.navigateBack({
delta:2
})
},
methods: {
openColor() {
@ -286,7 +284,7 @@ export default {
},
drawMap(val) {
const str = encodeURIComponent(JSON.stringify(val))
uni.navigateTo({
uni.redirectTo({
url:'/sunPages/drawMap/drawMap?str=' + str
});
},

@ -134,12 +134,13 @@ export default {
title: `新增成功`,
duration: 1500,
success() {
setTimeout(() => {
that.reset();
uni.redirectTo({
url: '/sunPages/addNoteJob/addNoteJob'
uni.setStorageSync( 'canRefresh', 'true');
that.reset();
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 1500);
}, 2000);
}
});
})

@ -93,7 +93,7 @@
async saveBase(){
await this.$store.dispatch('changeBaseId',this.currentBaseID)
uni.redirectTo({
url: '/pages/mine/base/index'
url: '/sunPages/mine/base/index'
});
},

@ -225,7 +225,7 @@
//
goBase() {
uni.redirectTo({
url: '/pages/mine/base/baseList'
url: '/sunPages/mine/base/baseList'
});
},

@ -55,7 +55,7 @@
},
methods: {
handleText(item) {
this.$tab.navigateTo(`/pages/common/textview/index?title=${item.title}&content=${item.content}`)
this.$tab.navigateTo(`/sunPages/common/textview/index?title=${item.title}&content=${item.content}`)
}
}
}

@ -27,7 +27,7 @@
},
methods: {
handleToPwd() {
this.$tab.navigateTo('/pages/mine/pwd/index')
this.$tab.navigateTo('/sunPages/mine/pwd/index')
},
handleToUpgrade() {
this.$modal.showToast('模块建设中~')

@ -211,11 +211,12 @@
icon: 'success',
duration: 2000,
complete: function() {
setTimeout(function() {
uni.redirectTo({
url: '/pages/traceability-product/index'
});
}, 2000);
uni.setStorageSync( 'canRefresh', 'true');
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 2000);
}
})
} catch (err) {

@ -116,28 +116,32 @@
}
},
mixins: [mix],
onUnload() {
uni.navigateBack({
delta: 1
})
},
onShow() {
const datas = uni.getStorageSync('canRefresh');
if(datas == 'true'){
// this.$refs.paging.reload()
}
},
onUnload() {
uni.removeStorageSync('canRefresh')
},
methods: {
//
GoToPage(value) {
switch (value) {
case "delivery":
wx.navigateTo({
url: '/pages/traceability-product/delivery/deliveryEdit?id=' + this.Product
uni.navigateTo({
url: '/sunPages/traceability-product/delivery/deliveryEdit?id=' + this.Product
});
break;
case "sales":
wx.navigateTo({
url: '/pages/traceability-product/sales/salesEdit?id=' + this.Product
uni.navigateTo({
url: '/sunPages/traceability-product/sales/salesEdit?id=' + this.Product
});
break;
case "loss":
wx.navigateTo({
url: '/pages/traceability-product/loss/lossEdit?id=' + this.Product
uni.navigateTo({
url: '/sunPages/traceability-product/loss/lossEdit?id=' + this.Product
});
break;
}
@ -219,4 +223,4 @@
</script>
<style lang="scss">
</style>
</style>

@ -115,10 +115,11 @@
icon: 'success',
duration: 2000,
complete: function() {
setTimeout(function() {
uni.redirectTo({
url: '/pages/traceability-product/index'
});
uni.setStorageSync( 'canRefresh', 'true');
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 2000);
}
})
@ -139,7 +140,7 @@
//
LossTypeChange(e) {
this.CurrenLossType = e.detail.value
this.CurrenLossType = e.detail.value
},
//
@ -155,4 +156,4 @@
</script>
<style>
</style>
</style>

@ -307,7 +307,7 @@
complete: function() {
setTimeout(function() {
uni.redirectTo({
url: '/pages/traceability-product/machining/index'
url: '/sunPages/traceability-product/machining/index'
});
}, 2000);
}
@ -428,7 +428,7 @@
goMaterials() {
const data = encodeURIComponent(JSON.stringify(this.formData));
uni.redirectTo({
url: '/pages/traceability-product/machining/materialsList?params=' + data
url: '/sunPages/traceability-product/machining/materialsList?params=' + data
});
},
/** 获取库存 */

@ -130,7 +130,7 @@
})
const data = encodeURIComponent(JSON.stringify(this.reviceData));
uni.redirectTo({
url: '/pages/traceability-product/machining/index?params=' + data
url: '/sunPages/traceability-product/machining/index?params=' + data
});
},
@ -155,4 +155,4 @@
</script>
<style>
</style>
</style>

@ -159,7 +159,7 @@
/** 提交按钮 */
async submitForm() {
//
//
try {
this.formData.salesType = this.SalesTypeList[this.CurrenSalesType].value
await this.$refs['formRef'].validate()
@ -170,11 +170,12 @@
icon: 'success',
duration: 2000,
complete: function() {
setTimeout(function() {
uni.redirectTo({
url: '/pages/traceability-product/index'
});
}, 2000);
uni.setStorageSync( 'canRefresh', 'true');
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 2000);
}
})
} catch (err) {
@ -195,7 +196,7 @@
},
//
ClientChange(e) {
ClientChange(e) {
this.CurrenClient = e.detail.value
console.log(this.CurrenClient)
this.formData.customId = this.ClientList[this.CurrenClient].id
@ -240,4 +241,4 @@
</script>
<style>
</style>
</style>

@ -12,8 +12,8 @@ const request = config => {
const isToken = (config.headers || {}).isToken === false
config.header = config.header || {}
if (getAccessToken() && !isToken) {
// config.header['Authorization'] = 'Bearer ' + getAccessToken()
config.header['Authorization'] = 'Bearer ' + 'd9be75cd7b904a789c6bf62c6fed9ac2'
config.header['Authorization'] = 'Bearer ' + getAccessToken()
// config.header['Authorization'] = 'Bearer ' + '888cfc9e0903437b87e44ef7064c7171'
}
// 设置租户 TODO 芋艿:强制 1 先
config.header['tenant-id'] = '1';

Loading…
Cancel
Save