修改功能
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<span class="filter_label">仓库</span>
|
<span class="filter_label">仓库</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
<uni-data-select v-model="formData.storCode" :localdata="options"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<span class="filter_label">物料编码</span>
|
<span class="filter_label">物料编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<input type="text" class="filter_input" v-model="val1">
|
<input type="text" class="filter_input" v-model="formData.materialCode">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<span class="filter_label">载具编码</span>
|
<span class="filter_label">载具编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<input type="text" class="filter_input" v-model="val3">
|
<input type="text" class="filter_input" v-model="formData.vehicleCode">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<span class="filter_label">仓位编码</span>
|
<span class="filter_label">仓位编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<input type="text" class="filter_input" v-model="val4">
|
<input type="text" class="filter_input" v-model="formData.structCode">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<span class="filter_label">物料批次</span>
|
<span class="filter_label">物料批次</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<input type="text" class="filter_input" v-model="val2">
|
<input type="text" class="filter_input" v-model="formData.pcsn">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -93,12 +93,14 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
formData: {
|
||||||
|
storCode: 'FStockId',
|
||||||
|
materialCode: '',
|
||||||
|
vehicleCode: '',
|
||||||
|
structCode: '',
|
||||||
|
pcsn: ''
|
||||||
|
},
|
||||||
options: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
|
options: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
|
||||||
index: 'FStockId',
|
|
||||||
val2: '',
|
|
||||||
val3: '',
|
|
||||||
val4: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
@@ -116,6 +118,9 @@
|
|||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
|
if (this.$store.getters.formData !== '') {
|
||||||
|
this.formData = this.$store.getters.formData
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchList () {
|
searchList () {
|
||||||
@@ -124,7 +129,7 @@
|
|||||||
this._structattrPage()
|
this._structattrPage()
|
||||||
},
|
},
|
||||||
async _structattrPage () {
|
async _structattrPage () {
|
||||||
let res = await structattrPage(this.pageNum + '', this.pageSize + '', this.index, this.val1, true, this.val2, this.val3, this.val4)
|
let res = await structattrPage(this.pageNum + '', this.pageSize + '', this.formData.storCode, this.formData.materialCode, true, this.formData.pcsn, this.formData.vehicleCode, this.formData.structCode)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
this.totalCount = res.totalElements
|
this.totalCount = res.totalElements
|
||||||
if (res.totalElements > 0) {
|
if (res.totalElements > 0) {
|
||||||
@@ -156,8 +161,14 @@
|
|||||||
this.pkObj = this.pkId === e.id ? e : {}
|
this.pkObj = this.pkId === e.id ? e : {}
|
||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.index = ''
|
this.formData = {
|
||||||
this.val1 = ''
|
storCode: 'FStockId',
|
||||||
|
materialCode: '',
|
||||||
|
vehicleCode: '',
|
||||||
|
structCode: '',
|
||||||
|
pcsn: ''
|
||||||
|
}
|
||||||
|
this.$store.dispatch('setFormData', '')
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
@@ -165,6 +176,7 @@
|
|||||||
toSure () {
|
toSure () {
|
||||||
if (this.pkId) {
|
if (this.pkId) {
|
||||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
|
this.$store.dispatch('setFormData', this.formData)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,8 +98,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
<button :class="isChecked1 ? 'zd-col-5' : 'zd-col-6'" class="button-default" @tap="clearUp">清空</button>
|
||||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1|| !val2 || !val3 || (val2 === val3)}" :disabled="disabled" @tap="toSure">拣选确认</button>
|
<button v-if="isChecked1" class="zd-col-8 button-primary" :class="{'button-info': !val1|| !val2 || !val3 || (val2 === val3)}" :disabled="disabled" @tap="handlePrint">标签打印</button>
|
||||||
|
<button class="button-primary" :class="{'button-info': !val1|| !val2 || !val3 || (val2 === val3) || (isChecked1 && !isPrintSuccessful), 'zd-col-8': isChecked1,'zd-col-16': !isChecked1}" :disabled="disabled" @tap="toSure">拣选确认</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||||
<view class="pop-line"></view>
|
<view class="pop-line"></view>
|
||||||
@@ -142,7 +143,8 @@
|
|||||||
isChecked1: true,
|
isChecked1: true,
|
||||||
data: {},
|
data: {},
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: false
|
show: false,
|
||||||
|
isPrintSuccessful: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
@@ -194,9 +196,27 @@
|
|||||||
this.isChecked1 = true
|
this.isChecked1 = true
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.show = false
|
this.show = false
|
||||||
|
this.isPrintSuccessful = false
|
||||||
|
},
|
||||||
|
handlePrint () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.val1|| !this.val2 || !this.val3) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.val2 === this.val3) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '出库和入库料箱不能相同',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let data = Object.assign({}, this.data, {lxCode: this.val2})
|
||||||
|
this.toPrint(data)
|
||||||
},
|
},
|
||||||
toSure () {
|
toSure () {
|
||||||
if (!this.val1|| !this.val2 || !this.val3) {
|
if (!this.val1|| !this.val2 || !this.val3 || (this.isChecked1 && !this.isPrintSuccessful)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.val2 === this.val3) {
|
if (this.val2 === this.val3) {
|
||||||
@@ -209,13 +229,7 @@
|
|||||||
this.show = true
|
this.show = true
|
||||||
},
|
},
|
||||||
toConfirm () {
|
toConfirm () {
|
||||||
if (this.isChecked1) {
|
this._savePickTask()
|
||||||
this.disabled = true
|
|
||||||
let data = Object.assign({}, this.data, {lxCode: this.val2})
|
|
||||||
this.toPrint(data)
|
|
||||||
} else {
|
|
||||||
this._savePickTask()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async _savePickTask () {
|
async _savePickTask () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
@@ -281,9 +295,8 @@
|
|||||||
title: '打印成功',
|
title: '打印成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
if (this.isChecked1) {
|
this.disabled = false
|
||||||
this._savePickTask()
|
this.isPrintSuccessful = true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import * as types from '../types'
|
import * as types from '../types'
|
||||||
const state = {
|
const state = {
|
||||||
publicObj: '',
|
publicObj: '',
|
||||||
publicArr: ''
|
publicArr: '',
|
||||||
|
formData: ''
|
||||||
}
|
}
|
||||||
const getters = {
|
const getters = {
|
||||||
publicObj: state => state.publicObj,
|
publicObj: state => state.publicObj,
|
||||||
publicArr: state => state.publicArr
|
publicArr: state => state.publicArr,
|
||||||
|
formData: state => state.formData
|
||||||
}
|
}
|
||||||
const actions = {
|
const actions = {
|
||||||
setPublicObj ({commit}, res) {
|
setPublicObj ({commit}, res) {
|
||||||
@@ -13,6 +15,9 @@ const actions = {
|
|||||||
},
|
},
|
||||||
setPublicArr ({commit}, res) {
|
setPublicArr ({commit}, res) {
|
||||||
commit(types.PUBLIC_ARR, res)
|
commit(types.PUBLIC_ARR, res)
|
||||||
|
},
|
||||||
|
setFormData ({commit}, res) {
|
||||||
|
commit(types.FORM_DATA, res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@@ -21,6 +26,9 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
[types.PUBLIC_ARR] (state, res) {
|
[types.PUBLIC_ARR] (state, res) {
|
||||||
state.publicArr = res
|
state.publicArr = res
|
||||||
|
},
|
||||||
|
[types.FORM_DATA] (state, res) {
|
||||||
|
state.formData = res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -12,3 +12,4 @@ export const SAVE_TOKEN = 'SAVE_TOKEN'
|
|||||||
*/
|
*/
|
||||||
export const PUBLIC_OBJ = 'PUBLIC_OBJ'
|
export const PUBLIC_OBJ = 'PUBLIC_OBJ'
|
||||||
export const PUBLIC_ARR = 'PUBLIC_ARR'
|
export const PUBLIC_ARR = 'PUBLIC_ARR'
|
||||||
|
export const FORM_DATA = 'FORM_DATA'
|
||||||
Reference in New Issue
Block a user