涂板线叫空架
This commit is contained in:
@@ -48,6 +48,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/modules/calling-empty",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
// "pageOrientation": "landscape",
|
// "pageOrientation": "landscape",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<view class="header">首页</view>
|
<view class="header">首页</view>
|
||||||
<view class="userInfo-wrap">
|
<view class="userInfo-wrap">
|
||||||
<view class="userInfo">
|
<view class="userInfo">
|
||||||
<text class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).user_name : ''}}</text>
|
<text class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).username : ''}}</text>
|
||||||
<text class="p2">欢迎进入超威手持系统!</text>
|
<text class="p2">欢迎进入超威手持系统!</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="exit" @tap="Quit">
|
<view class="exit" @tap="Quit">
|
||||||
|
|||||||
@@ -97,8 +97,9 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('delLoginName', '')
|
this.$store.dispatch('delLoginName', '')
|
||||||
}
|
}
|
||||||
this.$store.dispatch('saveUserInfo', JSON.stringify(res.result))
|
console.log(res.user.user)
|
||||||
// this.$store.dispatch('saveToken', res.token)
|
this.$store.dispatch('saveUserInfo', JSON.stringify(res.user.user))
|
||||||
|
this.$store.dispatch('saveToken', res.token)
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
<view class="filter_label">区域</view>
|
<view class="filter_label">区域</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<!-- <uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select> -->
|
<input type="text" class="filter_input" v-model="val1" disabled="true">
|
||||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @inputChange="inputChange1" @change="selectChange1"></zxz-uni-data-select>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
@@ -15,7 +14,7 @@
|
|||||||
<span class="filter_label">点位</span>
|
<span class="filter_label">点位</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
<zxz-uni-data-select v-model="index2" filterable :localdata="options2" @inputChange="inputChange2" @change="selectChange2"></zxz-uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
@@ -38,7 +37,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {queryRegion, queryPoint, callingMaterialTask} from '@/utils/getData2.js'
|
import {queryPoint, callingMaterialTask} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -46,8 +45,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
val1: '包片机',
|
||||||
index1: '',
|
|
||||||
options2: [],
|
options2: [],
|
||||||
index2: '',
|
index2: '',
|
||||||
options3: [{text: '正极板', value: '1'}, {text: '负极板', value: '2'}, {text: '边负极板', value: '3'}],
|
options3: [{text: '正极板', value: '1'}, {text: '负极板', value: '2'}, {text: '边负极板', value: '3'}],
|
||||||
@@ -56,44 +54,27 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._queryRegion()
|
this._queryPoint('BPJ')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 选择器1 */
|
inputChange2 (e) {
|
||||||
inputChange1 (e) {
|
// console.log(e)
|
||||||
// console.log('inputChange1:' + e)
|
|
||||||
},
|
|
||||||
selectChange1(e) {
|
|
||||||
// console.log('selectChange1:' + e)
|
|
||||||
if (e) {
|
|
||||||
this.index1 = e.region_code
|
|
||||||
this._queryPoint(e.region_code)
|
|
||||||
} else {
|
|
||||||
this.options2 = []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
selectChange2(e) {
|
selectChange2(e) {
|
||||||
this.index2 = e
|
if (e) {
|
||||||
|
this.index2 = e.point_code
|
||||||
|
}
|
||||||
},
|
},
|
||||||
selectChange3(e) {
|
selectChange3(e) {
|
||||||
this.index3 = e
|
this.index3 = e
|
||||||
},
|
},
|
||||||
/** 获取区域下拉框 */
|
|
||||||
async _queryRegion () {
|
|
||||||
let res = await queryRegion()
|
|
||||||
this.options1 = [...res.result]
|
|
||||||
this.options1.map(el => {
|
|
||||||
this.$set(el, 'value', el.region_code)
|
|
||||||
this.$set(el, 'text', el.region_name)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 获取点位状态下拉框 */
|
/** 获取点位状态下拉框 */
|
||||||
async _queryPoint (e) {
|
async _queryPoint (e) {
|
||||||
let res = await queryPoint(e)
|
let res = await queryPoint(e)
|
||||||
this.options2 = [...res.result]
|
this.options2 = [...res]
|
||||||
this.options2.map(el => {
|
this.options2.map(el => {
|
||||||
this.$set(el, 'value', el.device_code)
|
this.$set(el, 'value', el.point_code)
|
||||||
this.$set(el, 'text', el.device_name)
|
this.$set(el, 'text', el.point_name)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 确定 */
|
/** 确定 */
|
||||||
@@ -121,9 +102,7 @@
|
|||||||
},
|
},
|
||||||
toCancle () {
|
toCancle () {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.index1 = ''
|
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.options2 = []
|
|
||||||
this.index3 = ''
|
this.index3 = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
143
pages/modules/calling-empty.vue
Normal file
143
pages/modules/calling-empty.vue
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar title="涂板线叫空架"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label">区域</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">点位</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<zxz-uni-data-select v-model="index2" filterable :localdata="options2" @inputChange="inputChange2" @change="selectChange2"></zxz-uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label">载具编码</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<search-box v-model="val1"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">物料类型</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="submit-bar">
|
||||||
|
<button class="submit-button" :class="{'btn-disabled': !val1 || !index2}" :disabled="disabled1" @tap="toSure">确认</button>
|
||||||
|
<button class="submit-button" @tap="toCancle">取消</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {queryPoint, outStructOutSave} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options1: [{text: '涂板线1', value: 'TBX1'}, {text: '涂板线2', value: 'TBX2'}],
|
||||||
|
index1: 'TBX1',
|
||||||
|
options2: [],
|
||||||
|
index2: '',
|
||||||
|
options3: [{text: '正极板', value: '1'}, {text: '负极板', value: '2'}, {text: '边负极板', value: '3'}],
|
||||||
|
index3: '',
|
||||||
|
val1: '',
|
||||||
|
disabled1: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this._queryPoint('TBX1')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 选择器1 */
|
||||||
|
selectChange1(e) {
|
||||||
|
this.index1 = e
|
||||||
|
if (e) {
|
||||||
|
this._queryPoint(e)
|
||||||
|
} else {
|
||||||
|
this.options2 = []
|
||||||
|
this.index2 = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
inputChange2 (e) {
|
||||||
|
// console.log(e)
|
||||||
|
},
|
||||||
|
selectChange2(e) {
|
||||||
|
if (e) {
|
||||||
|
this.index2 = e.point_code
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectChange3(e) {
|
||||||
|
this.index3 = e
|
||||||
|
},
|
||||||
|
/** 获取点位状态下拉框 */
|
||||||
|
async _queryPoint (e) {
|
||||||
|
let res = await queryPoint(e)
|
||||||
|
this.options2 = [...res]
|
||||||
|
this.options2.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_code)
|
||||||
|
this.$set(el, 'text', el.point_name)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 确定 */
|
||||||
|
async toSure () {
|
||||||
|
this.disabled1 = true
|
||||||
|
if (!this.index2) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '点位不能为空',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.disabled1 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.val1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '载具编码不能为空',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.disabled1 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await outStructOutSave(this.index2,this.val1, this.index3)
|
||||||
|
this.disabled1 = false
|
||||||
|
this.toCancle()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled1 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.disabled1 = false
|
||||||
|
this.index1 = 'TBX1'
|
||||||
|
this.index2 = ''
|
||||||
|
this.options2 = []
|
||||||
|
this._queryPoint('TBX1')
|
||||||
|
this.val1 = ''
|
||||||
|
this.index3 = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
</style>
|
||||||
@@ -6,8 +6,7 @@
|
|||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
<view class="filter_label">区域</view>
|
<view class="filter_label">区域</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<!-- <uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select> -->
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @inputChange="inputChange1" @change="selectChange1"></zxz-uni-data-select>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
@@ -15,13 +14,13 @@
|
|||||||
<span class="filter_label">点位</span>
|
<span class="filter_label">点位</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
<zxz-uni-data-select v-model="index2" filterable :localdata="options2" @inputChange="inputChange2" @change="selectChange2"></zxz-uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
<view class="filter_label">载具编码</view>
|
<view class="filter_label">载具编码</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<search-box v-model="val1" @handleChange="handleChange1"/>
|
<search-box v-model="val1"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
@@ -44,7 +43,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {queryRegion, queryPoint, outStructOutSave} from '@/utils/getData2.js'
|
import {queryPoint, outStructOutSave} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -52,8 +51,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [{text: '涂板线1', value: 'TBX1'}, {text: '涂板线2', value: 'TBX2'}],
|
||||||
index1: '',
|
index1: 'TBX1',
|
||||||
options2: [],
|
options2: [],
|
||||||
index2: '',
|
index2: '',
|
||||||
options3: [{text: '正极板', value: '1'}, {text: '负极板', value: '2'}, {text: '边负极板', value: '3'}],
|
options3: [{text: '正极板', value: '1'}, {text: '负极板', value: '2'}, {text: '边负极板', value: '3'}],
|
||||||
@@ -63,44 +62,37 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._queryRegion()
|
this._queryPoint('TBX1')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 选择器1 */
|
/** 选择器1 */
|
||||||
inputChange1 (e) {
|
|
||||||
// console.log('inputChange1:' + e)
|
|
||||||
},
|
|
||||||
selectChange1(e) {
|
selectChange1(e) {
|
||||||
// console.log('selectChange1:' + e)
|
this.index1 = e
|
||||||
if (e) {
|
if (e) {
|
||||||
this.index1 = e.region_code
|
this._queryPoint(e)
|
||||||
this._queryPoint(e.region_code)
|
|
||||||
} else {
|
} else {
|
||||||
this.options2 = []
|
this.options2 = []
|
||||||
|
this.index2 = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
inputChange2 (e) {
|
||||||
|
// console.log(e)
|
||||||
|
},
|
||||||
selectChange2(e) {
|
selectChange2(e) {
|
||||||
this.index2 = e
|
if (e) {
|
||||||
|
this.index2 = e.point_code
|
||||||
|
}
|
||||||
},
|
},
|
||||||
selectChange3(e) {
|
selectChange3(e) {
|
||||||
this.index3 = e
|
this.index3 = e
|
||||||
},
|
},
|
||||||
/** 获取区域下拉框 */
|
|
||||||
async _queryRegion () {
|
|
||||||
let res = await queryRegion()
|
|
||||||
this.options1 = [...res.result]
|
|
||||||
this.options1.map(el => {
|
|
||||||
this.$set(el, 'value', el.region_code)
|
|
||||||
this.$set(el, 'text', el.region_name)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 获取点位状态下拉框 */
|
/** 获取点位状态下拉框 */
|
||||||
async _queryPoint (e) {
|
async _queryPoint (e) {
|
||||||
let res = await queryPoint(e)
|
let res = await queryPoint(e)
|
||||||
this.options2 = [...res.result]
|
this.options2 = [...res]
|
||||||
this.options2.map(el => {
|
this.options2.map(el => {
|
||||||
this.$set(el, 'value', el.device_code)
|
this.$set(el, 'value', el.point_code)
|
||||||
this.$set(el, 'text', el.device_name)
|
this.$set(el, 'text', el.point_name)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 确定 */
|
/** 确定 */
|
||||||
@@ -136,9 +128,10 @@
|
|||||||
},
|
},
|
||||||
toCancle () {
|
toCancle () {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.index1 = ''
|
this.index1 = 'TBX1'
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.options2 = []
|
this.options2 = []
|
||||||
|
this._queryPoint('TBX1')
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
this.index3 = ''
|
this.index3 = ''
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const pdaUpdate = () => request({
|
|||||||
export const handLogin = (user, password) => request({
|
export const handLogin = (user, password) => request({
|
||||||
url:'api/pda/handlogin',
|
url:'api/pda/handlogin',
|
||||||
data: {
|
data: {
|
||||||
user: user,
|
username: user,
|
||||||
password: password
|
password: password
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -106,3 +106,13 @@ export const callingMaterialTask = (code, type) => request({
|
|||||||
material_type: type
|
material_type: type
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 涂板线叫空架
|
||||||
|
*/
|
||||||
|
export const callingEmpty = (code) => request({
|
||||||
|
url:'api/pda/callingEmpty',
|
||||||
|
data: {
|
||||||
|
point_code: code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ const request = (params) => {
|
|||||||
let url = params.url;
|
let url = params.url;
|
||||||
let method = params.method || 'POST';
|
let method = params.method || 'POST';
|
||||||
let data = params.data || {};
|
let data = params.data || {};
|
||||||
// let token = ''
|
let token = ''
|
||||||
// if (store.getters.saveToken !== '') {
|
if (store.getters.saveToken !== '') {
|
||||||
// token = store.getters.saveToken
|
token = store.getters.saveToken
|
||||||
// }
|
}
|
||||||
let defaultOpot = {
|
let defaultOpot = {
|
||||||
'Terminal-Type': 'innerH5',
|
'Terminal-Type': 'innerH5',
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
@@ -16,8 +16,8 @@ const request = (params) => {
|
|||||||
method = method.toUpperCase()
|
method = method.toUpperCase()
|
||||||
if (method == 'POST') {
|
if (method == 'POST') {
|
||||||
header = {
|
header = {
|
||||||
'Content-Type': 'application/json;charset=UTF-8'
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
// 'Authorization': token
|
'Authorization': token
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const requestUrl = `${store.getters.baseUrl}/` + url;
|
const requestUrl = `${store.getters.baseUrl}/` + url;
|
||||||
@@ -50,10 +50,10 @@ const request = (params) => {
|
|||||||
content: res[1].data.message,
|
content: res[1].data.message,
|
||||||
showCancel: false
|
showCancel: false
|
||||||
})
|
})
|
||||||
store.dispatch('delUserInfo')
|
// store.dispatch('delUserInfo')
|
||||||
uni.redirectTo({
|
// uni.redirectTo({
|
||||||
url: '/pages/login/login'
|
// url: '/pages/login/login'
|
||||||
})
|
// })
|
||||||
} else if (res[1] && res[1].statusCode === 200) {
|
} else if (res[1] && res[1].statusCode === 200) {
|
||||||
let {
|
let {
|
||||||
data: dataType
|
data: dataType
|
||||||
|
|||||||
Reference in New Issue
Block a user