接口
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index|| !val2}" :disabled="disabled" @tap="_vehicleOutConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -40,7 +40,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
|
||||
import {getSect, vehicleOutConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -50,8 +50,9 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
val2: '1',
|
||||
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false,
|
||||
currentData: {},
|
||||
@@ -62,23 +63,19 @@
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getSect()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getStructCount(e)
|
||||
}
|
||||
},
|
||||
async _getStructCount (e) {
|
||||
async _getSect () {
|
||||
try {
|
||||
let res = await getStructCount(e)
|
||||
let res = await getSect()
|
||||
if (res) {
|
||||
this.kwData = res
|
||||
this.options = res
|
||||
} else {
|
||||
this.kwData = {}
|
||||
this.options =[]
|
||||
}
|
||||
} catch (e) {
|
||||
this.kwData = {}
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
@@ -90,14 +87,14 @@
|
||||
this.disabled = false
|
||||
this.kwData = {}
|
||||
},
|
||||
async _pdaPalletIostorinvIn () {
|
||||
async _vehicleOutConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
if (!this.val1 || !this.index || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPalletIostorinvIn(this.val1, this.index)
|
||||
let res = await vehicleOutConfirm(this.index, this.val1, this.val2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
<span class="filter_label">目标站点</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_vehicleOutConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -32,7 +32,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
|
||||
import {getSect, vehicleOutConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -41,35 +41,30 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val2: '',
|
||||
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
val1: '',
|
||||
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false,
|
||||
currentData: {},
|
||||
kwData: {}
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getSect()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getStructCount(e)
|
||||
}
|
||||
},
|
||||
async _getStructCount (e) {
|
||||
async _getSect () {
|
||||
try {
|
||||
let res = await getStructCount(e)
|
||||
let res = await getSect()
|
||||
if (res) {
|
||||
this.kwData = res
|
||||
this.options = res
|
||||
} else {
|
||||
this.kwData = {}
|
||||
this.options =[]
|
||||
}
|
||||
} catch (e) {
|
||||
this.kwData = {}
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
@@ -79,16 +74,15 @@
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
this.kwData = {}
|
||||
},
|
||||
async _pdaPalletIostorinvIn () {
|
||||
async _vehicleOutConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPalletIostorinvIn(this.val1, this.index)
|
||||
let res = await vehicleOutConfirm(this.index, this.val1)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -31,19 +30,19 @@
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-row border-bottom" v-show="index == '2'">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">目标区域</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_transferConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -51,7 +50,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
|
||||
import {getSect, getRegion, transferConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -62,53 +61,55 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
options: [{text:'站点', value:'1'},{text:'区域',value: '2'}],
|
||||
index: '',
|
||||
// options2: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
options2: [],
|
||||
index2: '',
|
||||
disabled: false,
|
||||
currentData: {},
|
||||
kwData: {}
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getRegion()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getStructCount(e)
|
||||
}
|
||||
},
|
||||
async _getStructCount (e) {
|
||||
async _getRegion () {
|
||||
try {
|
||||
let res = await getStructCount(e)
|
||||
let res = await getRegion()
|
||||
if (res) {
|
||||
this.kwData = res
|
||||
this.options2 = res
|
||||
} else {
|
||||
this.kwData = {}
|
||||
this.options2 =[]
|
||||
}
|
||||
} catch (e) {
|
||||
this.kwData = {}
|
||||
this.options2 = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
selectChange2 (e) {
|
||||
this.index2 = e
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.index2 = ''
|
||||
this.disabled = false
|
||||
this.kwData = {}
|
||||
},
|
||||
async _pdaPalletIostorinvIn () {
|
||||
async _transferConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPalletIostorinvIn(this.val1, this.index)
|
||||
let res = await transferConfirm(this.val1, this.val2, this.index2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-primary" @tap="seachList">查询</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" @tap="_materialConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -57,7 +57,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {outStorageOrder, outStorageOrderList} from '@/utils/getData2.js'
|
||||
import {getMaterialDtl, materialConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -93,39 +93,24 @@
|
||||
this.id = options.id
|
||||
},
|
||||
created () {
|
||||
this._outStorageOrder()
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _outStorageOrder () {
|
||||
let res = await outStorageOrder()
|
||||
this.options = [...res]
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(e, this.code)
|
||||
}
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(this.index, e)
|
||||
this._getMaterialDtl()
|
||||
}
|
||||
},
|
||||
seachList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(this.index, this.code)
|
||||
this._getMaterialDtl()
|
||||
},
|
||||
async _outStorageOrderList (index, e) {
|
||||
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', index, e)
|
||||
async _getMaterialDtl () {
|
||||
let res = await getMaterialDtl(this.val1, this.val2, this.pageNum + '', this.pageSize + '')
|
||||
if (res.code === '200') {
|
||||
this.totalCount = res.totalElements
|
||||
if (res.totalElements > 0) {
|
||||
@@ -146,22 +131,39 @@
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageNum++
|
||||
this._outStorageOrderList(this.index, this.code)
|
||||
this._getMaterialDtl()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toChek (e) {
|
||||
this.pkId = this.pkId === e.code ? '' : e.code
|
||||
this.pkObj = this.pkId === e.code ? e : {}
|
||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
||||
this.pkObj = this.pkId === e.group_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
uni.navigateTo({
|
||||
url: '/pages/outbound/bill-out-store?title=单据出库'
|
||||
})
|
||||
async _materialConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await materialConfirm(this.pkId, this.pkObj.storagevehicle_code, this.val1, this.val2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box
|
||||
v-model="code"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,7 +36,7 @@
|
||||
<span class="filter_label filter_input_disabled">物料编号</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -43,7 +44,7 @@
|
||||
<span class="filter_label filter_input_disabled">物料批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.pcsn" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -51,7 +52,7 @@
|
||||
<span class="filter_label filter_input_disabled">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -59,15 +60,15 @@
|
||||
<span class="filter_label filter_input_disabled">出库数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" :class="{'hightlight': isDiff === false}" v-model="currentData.frozen_qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_ioStorageOut">强制确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_ioStorageOut">出库确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_confirm('2')">强制确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_confirm('1')">出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -75,7 +76,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {ioStorageOut} from '@/utils/getData2.js'
|
||||
import {iosOutgetVehicleMaterial, confirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -83,9 +84,10 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
code: '',
|
||||
val1: '',
|
||||
currentData: {},
|
||||
disabled: false
|
||||
disabled: false,
|
||||
isDiff: false,
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -98,14 +100,31 @@
|
||||
this.code = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _ioStorageOut () {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._iosOutgetVehicleMaterial(e)
|
||||
}
|
||||
},
|
||||
async _iosOutgetVehicleMaterial (e) {
|
||||
try {
|
||||
let res = await iosOutgetVehicleMaterial(e)
|
||||
if (res) {
|
||||
this.currentData = res
|
||||
} else {
|
||||
this.currentData = {}
|
||||
}
|
||||
} catch (e) {
|
||||
this.currentData = {}
|
||||
}
|
||||
},
|
||||
async _confirm (type) {
|
||||
this.disabled = true
|
||||
if (!this.code) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await ioStorageOut(this.code)
|
||||
let res = await confirm(this.currentData.group_id, this.val1, type)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
@@ -128,5 +147,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
.hightlight
|
||||
color #f00
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -30,8 +29,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">绑定</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">解绑</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindOrUnbind('1')">绑定</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindOrUnbind('0')">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -39,7 +38,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
|
||||
import {bindOrUnbind} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -51,7 +50,6 @@
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false,
|
||||
kwData: {}
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -60,35 +58,19 @@
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getStructCount(e)
|
||||
}
|
||||
},
|
||||
async _getStructCount (e) {
|
||||
try {
|
||||
let res = await getStructCount(e)
|
||||
if (res) {
|
||||
this.kwData = res
|
||||
} else {
|
||||
this.kwData = {}
|
||||
}
|
||||
} catch (e) {
|
||||
this.kwData = {}
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _pdaPalletIostorinvIn () {
|
||||
async _bindOrUnbind (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPalletIostorinvIn(this.val1, this.index)
|
||||
let res = await bindOrUnbind(this.val1, this.val2, type)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
Reference in New Issue
Block a user