Browse Source

修改配置文件

pda_nev
李俊城 9 months ago
parent
commit
49f27a2a06
  1. 178
      fe/PDA/main.js
  2. 2
      fe/PDA/router/index.js
  3. 8
      fe/PDA/static/config.js
  4. 28
      fe/PDA/static/config_zhuoyue.js
  5. 53
      fe/PDA/static/config_zhuoyue_zhengshi.js

178
fe/PDA/main.js

@ -6,31 +6,6 @@ import url from './common/config.js'
import modelConfig from './common/modelConfig.js'
import utils from './common/utils.js'
import uView from "./uni_modules/uview-ui";
import config from "./static/config.js"
let initData =function(){
Vue.prototype.$dev_url = config.params.dev;
console.log("请求地址11",Vue.prototype.$dev_url)
Vue.prototype.$companyCode = config.params.companyCode;
Vue.prototype.$warehouseCode = config.params.warehouseCode;
Vue.prototype.$putawayLocationTypes = config.params.putawayLocationTypes; //创建上架任务的库存类型
Vue.prototype.$putawayInventoryStatus = config.params.putawayInventoryStatus; //创建上架任务的库存状态
Vue.prototype.$print_url = config.params.print_url; //打印的服务地址
Vue.prototype.$isScrapScanToLocation = config.params.isScrapScanToLocation; //原料报废是否显示库位
Vue.prototype.$isReceiptToday = config.params.isReceiptToday; //采购收货是否只看今天的采购任务
Vue.prototype.$scrapReason = config.params.scrapReason; //原料报废原因字典项
Vue.prototype.$purchaseReturnReason = config.params.purchaseReturnReason; //采购退货原因字典项
Vue.prototype.$returnBeforPutawayReason = config.params.returnBeforPutawayReason; //上架前退货原因字典项
Vue.prototype.$receiptCheckReason = config.params.receiptCheckReason; //采购收货不合格原因字典项
Vue.prototype.$configList = config.configList;
// getApp().globalData.text = config.params.version_update_url;
}
initData()
// import message from "@/common/message";
import axios from 'axios';
import VueAxios from 'vue-axios';
import './router/index'; //引入拦截
@ -39,73 +14,106 @@ import barcode from 'vue-barcode';
import {
RouterMount
} from "uni-simple-router";
// import message from "@/common/message";
import axios from 'axios';
Vue.use(barcode)
Vue.use(VueAxios, axios)
Vue.use(uView);
let startApp = function() {
console.log('startApp', 'startApp')
uni.request({
url: `./static/config.json?t=${new Date().getTime()}`
}).then(res => {
//在配置中读url,company等信息
Vue.prototype.$dev_url = res[1].data.params.dev;
console.log("请求地址", Vue.prototype.$dev_url)
Vue.prototype.$companyCode = res[1].data.params.companyCode;
Vue.prototype.$warehouseCode = res[1].data.params.warehouseCode;
Vue.prototype.$putawayLocationTypes = res[1].data.params.putawayLocationTypes; //创建上架任务的库存类型
Vue.prototype.$putawayInventoryStatus = res[1].data.params.putawayInventoryStatus; //创建上架任务的库存状态
Vue.prototype.$print_url = res[1].data.params.print_url; //打印的服务地址
Vue.prototype.$isScrapScanToLocation = res[1].data.params.isScrapScanToLocation; //原料报废是否显示库位
Vue.prototype.$isReceiptToday = res[1].data.params.isReceiptToday; //采购收货是否只看今天的采购任务
Vue.prototype.$request = request
Vue.prototype.$url = url.url_config
Vue.prototype.modelConfig = modelConfig.maxPageSize
Vue.prototype.versionCode = modelConfig.version
Vue.prototype.utils = utils;
Vue.prototype.$scrapReason = res[1].data.params.scrapReason; //原料报废原因字典项
Vue.prototype.$purchaseReturnReason = res[1].data.params.purchaseReturnReason; //采购退货原因字典项
Vue.prototype.$returnBeforPutawayReason = res[1].data.params.returnBeforPutawayReason; //上架前退货原因字典项
Vue.prototype.$receiptCheckReason = res[1].data.params.receiptCheckReason; //采购收货不合格原因字典项
Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$configList = res[1].data.configList;
initData()
getApp().globalData.text = res[1].data.params.version_update_url;
Vue.prototype.ScanErrorAudio = function() {
var music = null;
music = uni.createInnerAudioContext(); //创建播放器对象
music.src ="../../static/video/error.wav";
music.play(); //执行播放
music.onEnded(() => {
//播放结束
music = null;
});
})
}
startApp()
function initData() {
Vue.use(barcode)
Vue.use(VueAxios, axios)
Vue.use(uView);
Vue.prototype.$request = request
Vue.prototype.$url = url.url_config
Vue.prototype.modelConfig = modelConfig.maxPageSize
Vue.prototype.versionCode = modelConfig.version
Vue.prototype.utils = utils;
// // 添加全局v-focus指令
// Vue.directive("focus", {
// inserted: function(el, {
// modifiers: {
// noKeyboard
// }
// }) {
// try {
// const tagName = el.tagName;
// console.log('el',el)
// console.log('tagName',tagName)
// if (tagName === "INPUT") {
// let child = el.children[0];
// if (child && child.tagName === "INPUT") {
// el = child;
// }
// }
// el.focus();
// // 不弹起软键盘
// if (noKeyboard) {
// el.setAttribute("readonly", "readonly");
// var timer = null;
// timer = setTimeout(() => {
// el.removeAttribute("readonly");
// clearTimeout(timer);
// }, 100);
// }
// } catch (error) {
// throw new Error(error);
// }
// }
// });
Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.ScanErrorAudio = function() {
var music = null;
music = uni.createInnerAudioContext(); //创建播放器对象
music.src = "../../static/video/error.wav";
music.play(); //执行播放
music.onEnded(() => {
//播放结束
music = null;
});
}
App.mpType = 'app'
// // 添加全局v-focus指令
// Vue.directive("focus", {
// inserted: function(el, {
// modifiers: {
// noKeyboard
// }
// }) {
// try {
// const tagName = el.tagName;
// console.log('el',el)
// console.log('tagName',tagName)
// if (tagName === "INPUT") {
// let child = el.children[0];
// if (child && child.tagName === "INPUT") {
// el = child;
// }
// }
// el.focus();
// // 不弹起软键盘
// if (noKeyboard) {
// el.setAttribute("readonly", "readonly");
// var timer = null;
// timer = setTimeout(() => {
// el.removeAttribute("readonly");
// clearTimeout(timer);
// }, 100);
// }
// } catch (error) {
// throw new Error(error);
// }
// }
// });
//#ifdef H5
RouterMount(app, "#app");
//#endif
const app = new Vue({
store,
...App
})
app.$mount()
App.mpType = 'app'
//#ifdef H5
RouterMount(app, "#app");
//#endif
const app = new Vue({
store,
...App
})
app.$mount()
}

2
fe/PDA/router/index.js

@ -31,7 +31,7 @@ uni.addInterceptor('navigateTo', {
return true
},
success (e) {
// versionTool.isNewVersion()
versionTool.isNewVersion()
}
})

8
fe/PDA/static/config.js

@ -7,7 +7,7 @@ const configList = [{
},
{
"name": "服务地址",
"value": "http://dev.ccwin-in.com:60099"
"value": "http://10.164.233.10:60099"
},
{
"name": "原料报废扫描库位",
@ -24,9 +24,9 @@ const configList = [{
"warehouseCode": "T9",
"putawayLocationTypes": "1,2,3,4",
"putawayInventoryStatus": "2",
"dev": "http://dev.ccwin-in.com:60099",
"print_url": "http://dev.ccwin-in.com:59095",
"version_update_url": "http://dev.ccwin-in.com:60071",
"dev": "http://10.164.233.10:60099",
"print_url": "http://10.164.233.10:59095",
"version_update_url": "http://10.164.233.10:60071",
"isScrapScanToLocation": false,
"isReceiptToday": false,
"scrapReason": "ScrapReason",

28
fe/PDA/static/config_zhuoyue.js

@ -1,4 +1,5 @@
const configList = [{
{
"configList": [{
"name": "公司代码",
"value": "DongYang"
}, {
@ -7,7 +8,7 @@ const configList = [{
},
{
"name": "服务地址",
"value": "http://10.164.233.5:60099"
"value": "http://10.164.233.10:60099"
},
{
"name": "原料报废扫描库位",
@ -17,24 +18,24 @@ const configList = [{
"name": "只看当天采购任务",
"value": "是"
}
]
const params = {
],
"params": {
"companyCode": "DongYang",
"warehouseCode": "T9",
"putawayLocationTypes": "1,2,3,4",
"putawayInventoryStatus": "2",
"dev": "http://10.164.233.5:60099",
"print_url": "http://10.164.233.5:59095",
"version_update_url": "http://10.164.233.5:60071",
"dev": "http://10.164.233.10:60099",
"print_url": "http://10.164.233.10:59095",
"version_update_url": "http://10.164.233.10:60071",
"isScrapScanToLocation": false,
"isReceiptToday": false,
"scrapReason": "ScrapReason",
"purchaseReturnReason": "PurReturnReason",
"returnBeforPutawayReason": "UnqualifiedReason",
"receiptCheckReason": "UnqualifiedReason"
}
const desc = {
},
"desc": {
"companyCode": "公司代码",
"warehouseCode": "仓库代码",
"putawayLocationTypes": "上架库位类型",
@ -49,11 +50,4 @@ const configList = [{
"returnBeforPutawayReason": "上架前退货原因字典项",
"receiptCheckReason": "采购收货不合格原因字典项"
}
export default {
configList,
params,
desc
}

53
fe/PDA/static/config_zhuoyue_zhengshi.js

@ -0,0 +1,53 @@
{
"configList": [{
"name": "公司代码",
"value": "DongYang"
}, {
"name": "仓库代码",
"value": "T9"
},
{
"name": "服务地址",
"value": "http://10.164.233.5:60099"
},
{
"name": "原料报废扫描库位",
"value": "否"
},
{
"name": "只看当天采购任务",
"value": "是"
}
],
"params": {
"companyCode": "DongYang",
"warehouseCode": "T9",
"putawayLocationTypes": "1,2,3,4",
"putawayInventoryStatus": "2",
"dev": "http://10.164.233.5:60099",
"print_url": "http://10.164.233.5:59095",
"version_update_url": "http://10.164.233.5:60071",
"isScrapScanToLocation": false,
"isReceiptToday": false,
"scrapReason": "ScrapReason",
"purchaseReturnReason": "PurReturnReason",
"returnBeforPutawayReason": "UnqualifiedReason",
"receiptCheckReason": "UnqualifiedReason"
},
"desc": {
"companyCode": "公司代码",
"warehouseCode": "仓库代码",
"putawayLocationTypes": "上架库位类型",
"putawayInventoryStatus": "上架库存状态",
"dev": "api请求地址",
"print_url": "",
"version_update_url": "版本更新地址",
"isScrapScanToLocation": "原料报废是否显示扫描库位(false : 不显示扫描库位,true:显示扫描库位)",
"isReceiptToday": "采购收货是否只看今天的采购任务 (false : 看所有,true:只看今天):",
"ScrapReason": "原料报废原因字典项",
"purchaseReturnReason": "采购退货原因字典项",
"returnBeforPutawayReason": "上架前退货原因字典项",
"receiptCheckReason": "采购收货不合格原因字典项"
}
}
Loading…
Cancel
Save