缓存线盘点
This commit is contained in:
@@ -37,6 +37,9 @@ uni-button:after {
|
|||||||
width: 48%;
|
width: 48%;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
.search-item-btns {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
.search-label{
|
.search-label{
|
||||||
width: 70px;
|
width: 70px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
@@ -77,8 +80,13 @@ uni-button:after {
|
|||||||
border: 1px solid #d1d1d1;
|
border: 1px solid #d1d1d1;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-indent: 10px;
|
text-indent: 10px;
|
||||||
|
}
|
||||||
|
.search-input-l .uni-input-input {
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
.search-input-l .uni-input-input:disabled {
|
||||||
|
background-color: #e1e1e1;
|
||||||
|
}
|
||||||
.confirm-button-wrap{
|
.confirm-button-wrap{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@@ -95,6 +103,9 @@ uni-button:after {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
}
|
}
|
||||||
|
.confirm-button_disabled {
|
||||||
|
background-color: #c9c9c9;
|
||||||
|
}
|
||||||
.grid-wrap{
|
.grid-wrap{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 187px); /** 42+ 15*5+ 35*2 */
|
height: calc(100% - 187px); /** 42+ 15*5+ 35*2 */
|
||||||
@@ -136,13 +147,11 @@ uni-button:after {
|
|||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
.status-wrap {
|
.status-wrap {
|
||||||
width: 48%;
|
width: 100%;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
padding: 0 15px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
.status-item {
|
.status-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -173,18 +182,22 @@ uni-button:after {
|
|||||||
background-color: #ff6a00;
|
background-color: #ff6a00;
|
||||||
}
|
}
|
||||||
.material-wrap {
|
.material-wrap {
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
height: calc(100% - 152px);/** 42+15*5+35 */
|
||||||
|
margin: 15px auto;
|
||||||
|
padding: 15px 15px 0 15px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
.material-item-wrap {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 50px);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
width: calc(100% - 30px);
|
|
||||||
height: calc(100% - 152px);/** 42+15*5+35 */
|
|
||||||
margin: 15px auto;
|
|
||||||
padding: 15px 15px 0 15px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
}
|
||||||
.material-item {
|
.material-item {
|
||||||
width: 8.2%;
|
width: 8.2%;
|
||||||
|
|||||||
@@ -65,6 +65,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/management/searchMater",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@@ -119,5 +119,5 @@
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
.grid-wrap
|
.grid-wrap
|
||||||
height calc(100% - 526rpx)
|
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
|
||||||
</style>
|
</style>
|
||||||
@@ -1,18 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<nav-bar title="缓存线盘点"></nav-bar>
|
<nav-bar title="缓存线盘点"></nav-bar>
|
||||||
<view class="search-confirm-wrap search-confirm-wrap1">
|
<view class="search-confirm-wrap">
|
||||||
<view class="search-wrap search-wrap1">
|
<view class="search-wrap">
|
||||||
<view class="search-item search-item1">
|
<view class="search-item">
|
||||||
<label class="search-label">缓存线</label>
|
<label class="search-label">生产区域</label>
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="confirm-button-wrap confirm-button-wrap1">
|
<view class="search-item">
|
||||||
|
<label class="search-label">缓存线</label>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="search-item search-item1">
|
||||||
<button class="confirm-button" @tap="toSearch()">刷 新</button>
|
<button class="confirm-button" @tap="toSearch()">刷 新</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="material-wrap">
|
||||||
<view class="status-wrap">
|
<view class="status-wrap">
|
||||||
<view class="status-item">
|
<view class="status-item">
|
||||||
<text class="status-icon bg-gray"></text>
|
<text class="status-icon bg-gray"></text>
|
||||||
@@ -31,11 +39,11 @@
|
|||||||
<text class="status-txt">异常</text>
|
<text class="status-txt">异常</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="material-item-wrap">
|
||||||
<view class="material-wrap">
|
<view class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red'][Number(e.status) - 1]" @tap="toInfo(e)">
|
||||||
<view class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red'][Number(e.status) - 1]" @tap="toInfo(e)">
|
<view class="material-title">{{e.vehicle_code}}</view>
|
||||||
<view class="material-title">{{e.vehicle_code}}</view>
|
<view class="material-spec">{{e.material_spec}}</view>
|
||||||
<view class="material-spec">{{e.material_spec}}</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="popup-bottom-wrap" :class="active === true ? 'addHeight' : 'delHeight'">
|
<view class="popup-bottom-wrap" :class="active === true ? 'addHeight' : 'delHeight'">
|
||||||
@@ -52,56 +60,56 @@
|
|||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">工序</label>
|
<label class="search-label">工序</label>
|
||||||
<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="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">物料</label>
|
<label class="search-label">物料</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper" @tap="searchMater">
|
||||||
<input type="text" class="search-input-l" v-model="val2">
|
<input type="text" class="search-input-l" v-model="val2">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">名称</label>
|
<label class="search-label">名称</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper" @tap="searchMater">
|
||||||
<input type="text" class="search-input-l" v-model="val3">
|
<input type="text" class="search-input-l" v-model="val3">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">规格</label>
|
<label class="search-label">规格</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper" @tap="searchMater">
|
||||||
<input type="text" class="search-input-l" v-model="val4">
|
<input type="text" class="search-input-l" v-model="val4">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">数量</label>
|
<label class="search-label">数量</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<input type="number" class="search-input-l" v-model="val5">
|
<input type="number" class="search-input-l" v-model="val6">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">重量</label>
|
<label class="search-label">重量</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<input type="number" class="search-input-l" v-model="val6">
|
<input type="number" class="search-input-l" v-model="val7">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">层</label>
|
<label class="search-label">层</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
<input type="number" class="search-input-l" v-model="obj.layer_num" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<label class="search-label">位置</label>
|
<label class="search-label">位置</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
|
<input type="text" class="search-input-l" v-model="obj.positionOrder_no" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="confirm-button-wrap">
|
<view class="confirm-button-wrap">
|
||||||
<button class="confirm-button" @tap="toSearch()">设为满框</button>
|
<button class="confirm-button" :class="{'confirm-button_disabled': !val1 || !index3 || !val6 || !val7}" :disabled="disabled1" @tap="_setfullBox">设为满框</button>
|
||||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">设为空框</button>
|
<button class="confirm-button" :class="{'confirm-button_disabled': !val1}" :disabled="disabled2" @tap="_setEmptyBox">设为空框</button>
|
||||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">设为空位</button>
|
<button class="confirm-button" :class="{'confirm-button_disabled': !val1}" :disabled="disabled3" @tap="_deleteBox">设为空位</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -111,13 +119,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {getCacheLine, workprocedureQuery, getCacheLineMaterialInfo, setfullBox, setEmptyBox, deleteBox} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar
|
NavBar,
|
||||||
|
SearchBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
|
||||||
index1: '',
|
index1: '',
|
||||||
options2: [],
|
options2: [],
|
||||||
index2: '',
|
index2: '',
|
||||||
@@ -129,29 +140,161 @@
|
|||||||
val4: '',
|
val4: '',
|
||||||
val5: '',
|
val5: '',
|
||||||
val6: '',
|
val6: '',
|
||||||
|
val7: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
active: false
|
active: false,
|
||||||
|
obj: {},
|
||||||
|
disabled1: false,
|
||||||
|
disabled2: false,
|
||||||
|
disabled3: false
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
for(let i = 1; i < 16; i++) {
|
for(let i = 1; i < 16; i++) {
|
||||||
this.dataList.push({vehicle_code: i + '', material_spec: '买了佛冷', status: '4'})
|
this.dataList.push({vehicle_code: i + '', material_spec: 'a', status: '4'})
|
||||||
|
}
|
||||||
|
this._getCacheLine('A1')
|
||||||
|
this._workprocedureQuery()
|
||||||
|
},
|
||||||
|
destroyed () {
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
if (this.$store.getters.publicObj !== '') {
|
||||||
|
this.val2 = this.$store.getters.publicObj.material_code
|
||||||
|
this.val3 = this.$store.getters.publicObj.material_name
|
||||||
|
this.val4 = this.$store.getters.publicObj.material_spec
|
||||||
|
this.val5 = this.$store.getters.publicObj.material_uuid
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 选择器1 */
|
/** 选择器1 */
|
||||||
selectChange1(e) {
|
selectChange1(e) {
|
||||||
this.index1 = e
|
this.index1 = e
|
||||||
|
if (this.index1) {
|
||||||
|
this._getCacheLine(e)
|
||||||
|
this.index2 = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 选择器2 */
|
||||||
|
selectChange2(e) {
|
||||||
|
this.index2 = e
|
||||||
|
if (this.index2) {
|
||||||
|
this._getCacheLineMaterialInfo()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 缓存线 */
|
||||||
|
async _getCacheLine (id) {
|
||||||
|
let res = await getCacheLine(id)
|
||||||
|
this.options2 = [...res.result]
|
||||||
|
},
|
||||||
|
async _getCacheLineMaterialInfo () {
|
||||||
|
let res = await getCacheLineMaterialInfo(this.index1, this.index2)
|
||||||
|
this.dataList = [...res.result]
|
||||||
|
},
|
||||||
|
/** 选择器3 */
|
||||||
|
selectChange3(e) {
|
||||||
|
this.index3 = e
|
||||||
|
},
|
||||||
|
/** 工序 */
|
||||||
|
async _workprocedureQuery () {
|
||||||
|
let res = await workprocedureQuery()
|
||||||
|
this.options3 = [...res.result]
|
||||||
|
},
|
||||||
|
toSearch () {
|
||||||
|
this._getCacheLineMaterialInfo()
|
||||||
},
|
},
|
||||||
toInfo(e) {
|
toInfo(e) {
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/pages/management/hcxInfo`
|
|
||||||
// })
|
|
||||||
this.active = true
|
this.active = true
|
||||||
|
this.obj = e
|
||||||
|
this.val1 = this.obj.vehicle_code
|
||||||
|
this.options3.map(el => {
|
||||||
|
if (el.value === e.workprocedure_code) {
|
||||||
|
this.index3 = el.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.val2 = this.obj.material_code
|
||||||
|
this.val3 = this.obj.material_name
|
||||||
|
this.val4 = this.obj.material_spec
|
||||||
|
this.val5 = this.obj.material_uuid
|
||||||
|
this.val6 = this.obj.quantity
|
||||||
|
this.val7 = this.obj.weight
|
||||||
|
},
|
||||||
|
searchMater () {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/management/searchMater'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
closePop () {
|
closePop () {
|
||||||
this.active = false
|
this.active = false
|
||||||
|
},
|
||||||
|
async __setfullBox () {
|
||||||
|
this.disabled1 = true
|
||||||
|
if (!this.val1 || !this.index3 || !this.val6 || !this.val7) {
|
||||||
|
this.disabled1 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.$set(this.obj, 'vehicle_code', this.val1)
|
||||||
|
this.$set(this.obj, 'workprocedure_code', this.index3)
|
||||||
|
this.$set(this.obj, 'material_code', this.val2)
|
||||||
|
this.$set(this.obj, 'material_name', this.val3)
|
||||||
|
this.$set(this.obj, 'material_spec', this.val4)
|
||||||
|
this.$set(this.obj, 'material_uuid', this.val5)
|
||||||
|
this.$set(this.obj, 'quantity', this.val6)
|
||||||
|
this.$set(this.obj, 'weight', this.val7)
|
||||||
|
let res = await setfullBox(this.obj)
|
||||||
|
this.disabled1 = false
|
||||||
|
this.toSearch()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled1 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _setEmptyBox () {
|
||||||
|
this.disabled2 = true
|
||||||
|
if (!this.val1) {
|
||||||
|
this.disabled2 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let obj = {}
|
||||||
|
this.$set(this.obj, 'vehicle_code', this.val1)
|
||||||
|
this.$set(this.obj, 'workprocedure_code', this.index3)
|
||||||
|
let res = await setEmptyBox(obj)
|
||||||
|
this.disabled2 = false
|
||||||
|
this.toSearch()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled2 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _deleteBox () {
|
||||||
|
this.disabled3 = true
|
||||||
|
if (!this.val1) {
|
||||||
|
this.disabled3 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let obj = {}
|
||||||
|
this.$set(this.obj, 'vehicle_code', this.val1)
|
||||||
|
let res = await deleteBox(obj)
|
||||||
|
this.disabled3 = false
|
||||||
|
this.toSearch()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled3 = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,15 +302,6 @@
|
|||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
.search-confirm-wrap1
|
|
||||||
_fj()
|
|
||||||
.search-wrap1
|
|
||||||
width 48%
|
|
||||||
.search-item1
|
|
||||||
width calc(100% - 120px)
|
|
||||||
.confirm-button-wrap1
|
|
||||||
width auto
|
|
||||||
justify-content flex-start
|
|
||||||
.popup-bottom-wrap
|
.popup-bottom-wrap
|
||||||
position fixed
|
position fixed
|
||||||
bottom 0
|
bottom 0
|
||||||
@@ -191,4 +325,11 @@
|
|||||||
.delHeight
|
.delHeight
|
||||||
transition height .2s linear
|
transition height .2s linear
|
||||||
height 0
|
height 0
|
||||||
|
.search-item
|
||||||
|
width 42%
|
||||||
|
&:nth-child(1)
|
||||||
|
margin-right 10px
|
||||||
|
.search-item1
|
||||||
|
width calc(16% - 10px)
|
||||||
|
justify-content flex-end
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,11 +23,15 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="search-item search-item-btns">
|
||||||
|
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||||
|
<button class="confirm-button" :disabled="disabled" @tap="toSure">确认</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="confirm-button-wrap">
|
<!-- <view class="confirm-button-wrap">
|
||||||
<button class="confirm-button" @tap="toSearch()">查询</button>
|
<button class="confirm-button" @tap="toSearch()">查询</button>
|
||||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
|
<button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-wrap">
|
<view class="grid-wrap">
|
||||||
<table class="grid-table">
|
<table class="grid-table">
|
||||||
@@ -89,6 +93,7 @@
|
|||||||
this.index1 = e
|
this.index1 = e
|
||||||
if (this.index1) {
|
if (this.index1) {
|
||||||
this._getCacheLine(e)
|
this._getCacheLine(e)
|
||||||
|
this.index2 = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 选择器2 */
|
/** 选择器2 */
|
||||||
@@ -139,9 +144,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
|
||||||
@import '../../common/style/mixin.styl';
|
|
||||||
.grid-wrap
|
|
||||||
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -23,11 +23,15 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="search-item search-item-btns">
|
||||||
|
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||||
|
<button class="confirm-button" :disabled="disabled" @tap="toSure">确认</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="confirm-button-wrap">
|
<!-- <view class="confirm-button-wrap">
|
||||||
<button class="confirm-button" @tap="toSearch()">查询</button>
|
<button class="confirm-button" @tap="toSearch()">查询</button>
|
||||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
|
<button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-wrap">
|
<view class="grid-wrap">
|
||||||
<table class="grid-table">
|
<table class="grid-table">
|
||||||
@@ -82,12 +86,16 @@
|
|||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this._getCacheLine('A1')
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 选择器1 */
|
/** 选择器1 */
|
||||||
selectChange1(e) {
|
selectChange1(e) {
|
||||||
this.index1 = e
|
this.index1 = e
|
||||||
if (this.index1) {
|
if (this.index1) {
|
||||||
this._getCacheLine(e)
|
this._getCacheLine(e)
|
||||||
|
this.index2 = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 选择器2 */
|
/** 选择器2 */
|
||||||
@@ -138,9 +146,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
|
||||||
@import '../../common/style/mixin.styl';
|
|
||||||
.grid-wrap
|
|
||||||
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
|
|
||||||
</style>
|
|
||||||
86
pages/management/searchMater.vue
Normal file
86
pages/management/searchMater.vue
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<nav-bar :inner2="true" @goIn="goIn" title="物料查询"></nav-bar>
|
||||||
|
<view class="search-confirm-wrap">
|
||||||
|
<view class="search-wrap">
|
||||||
|
<view class="search-item">
|
||||||
|
<label class="search-label">物料</label>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<input type="text" class="search-input-l" v-model="val1">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="search-item search-item-btns">
|
||||||
|
<button class="confirm-button" @tap="_materialQuery">查询</button>
|
||||||
|
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSure">确认</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="grid-wrap">
|
||||||
|
<table class="grid-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>选择</th>
|
||||||
|
<th>编码</th>
|
||||||
|
<th>名称</th>
|
||||||
|
<th>规格</th>
|
||||||
|
<th>系列</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="e in dataList" :key="e.material_uuid" @click="toRadio(e)">
|
||||||
|
<td>
|
||||||
|
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_uuid}"></view>
|
||||||
|
</td>
|
||||||
|
<td>{{e.material_code}}</td>
|
||||||
|
<td>{{e.material_name}}</td>
|
||||||
|
<td>{{e.material_spec}}</td>
|
||||||
|
<td>{{e.class_name}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import {materialQuery} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
dataList: [],
|
||||||
|
disabled: false,
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goIn () {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/management/hcxcheck`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async _materialQuery () {
|
||||||
|
let res = await materialQuery(this.val1)
|
||||||
|
this.dataList = [...res.result]
|
||||||
|
},
|
||||||
|
toRadio (e) {
|
||||||
|
this.pkId = this.pkId === e.material_uuid ? '' : e.material_uuid
|
||||||
|
this.pkObj = this.pkId === material_uuid ? e : {}
|
||||||
|
},
|
||||||
|
toSure () {
|
||||||
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
.grid-wrap
|
||||||
|
height: calc(100% - 137px); /** 42+ 15*4+ 35 */
|
||||||
|
</style>
|
||||||
@@ -34,4 +34,41 @@ export const inOutExceptionInstConfirm = (obj) => request({
|
|||||||
data: {
|
data: {
|
||||||
form: obj
|
form: obj
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/** 缓存线盘点 */
|
||||||
|
// 1.1工序下拉框查询
|
||||||
|
export const workprocedureQuery = () => request({
|
||||||
|
url:'api/cacheLineHand/workprocedureQuery',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 1.2缓存线盘点-缓存线物料信息盘点
|
||||||
|
export const getCacheLineMaterialInfo = (area, code) => request({
|
||||||
|
url:'api/cacheLineHand/getCacheLineMaterialInfo',
|
||||||
|
data: {
|
||||||
|
product_area: area,
|
||||||
|
wcsdevice_code: code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 1.3物料查询
|
||||||
|
export const materialQuery = (bar) => request({
|
||||||
|
url:'api/cacheLineHand/materialQuery',
|
||||||
|
data: {
|
||||||
|
search_bar: bar
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 1.4缓存线盘点-设置满箱
|
||||||
|
export const setfullBox = (obj) => request({
|
||||||
|
url:'api/cacheLineHand/setfullBox',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
// 1.5缓存线盘点-设置空箱
|
||||||
|
export const setEmptyBox = (obj) => request({
|
||||||
|
url:'api/cacheLineHand/setEmptyBox',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
// 1.6缓存线盘点-删除空箱
|
||||||
|
export const deleteBox = (obj) => request({
|
||||||
|
url:'api/cacheLineHand/deleteBox',
|
||||||
|
data: obj
|
||||||
})
|
})
|
||||||
23
vuex/modules/data.js
Normal file
23
vuex/modules/data.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import * as types from '../types'
|
||||||
|
const state = {
|
||||||
|
publicObj: ''
|
||||||
|
}
|
||||||
|
const getters = {
|
||||||
|
publicObj: state => state.publicObj
|
||||||
|
}
|
||||||
|
const actions = {
|
||||||
|
setPublicObj ({commit}, res) {
|
||||||
|
commit(types.PUBLIC_OBJ, res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const mutations = {
|
||||||
|
[types.PUBLIC_OBJ] (state, res) {
|
||||||
|
state.publicObj = res
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
state,
|
||||||
|
getters,
|
||||||
|
actions,
|
||||||
|
mutations
|
||||||
|
}
|
||||||
@@ -2,11 +2,13 @@ import Vue from 'vue'
|
|||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
import user from './modules/user'
|
import user from './modules/user'
|
||||||
|
import data from './modules/data'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
modules: {
|
modules: {
|
||||||
user
|
user,
|
||||||
|
data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ export const SAVE_LOGIN_NAME = 'SAVE_LOGIN_NAME'
|
|||||||
export const DEL_LOGIN_NAME = 'DEL_LOGIN_NAME'
|
export const DEL_LOGIN_NAME = 'DEL_LOGIN_NAME'
|
||||||
export const COM_CONFIG = 'COM_CONFIG'
|
export const COM_CONFIG = 'COM_CONFIG'
|
||||||
export const SAVE_USER_INFO = 'SAVE_USER_INFO'
|
export const SAVE_USER_INFO = 'SAVE_USER_INFO'
|
||||||
export const DEL_USER_INFO = 'DEL_USER_INFO'
|
export const DEL_USER_INFO = 'DEL_USER_INFO'
|
||||||
|
export const PUBLIC_OBJ = 'PUBLIC_OBJ'
|
||||||
Reference in New Issue
Block a user