单据出库修改
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-6 button-primary" @tap="seachList">查询</button>
|
<button class="zd-col-6 button-primary" @tap="seachList">查询</button>
|
||||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_outStorageOrderConfirm">确认</button>
|
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -64,7 +64,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 {outStorageOrderList, outStorageOrderConfirm} from '@/utils/getData2.js'
|
import {outStorageOrderList} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -77,6 +77,7 @@
|
|||||||
code: '',
|
code: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
disabled: false,
|
disabled: false,
|
||||||
reload: false,
|
reload: false,
|
||||||
status: 'more',
|
status: 'more',
|
||||||
@@ -140,29 +141,12 @@
|
|||||||
},
|
},
|
||||||
toChek (e) {
|
toChek (e) {
|
||||||
this.pkId = this.pkId === e.code ? '' : e.code
|
this.pkId = this.pkId === e.code ? '' : e.code
|
||||||
|
this.pkObj = this.pkId === e.code ? e : {}
|
||||||
},
|
},
|
||||||
async _outStorageOrderConfirm () {
|
toSure () {
|
||||||
this.disabled = true
|
if (this.pkId) {
|
||||||
if (!this.pkId) {
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
this.disabled = false
|
uni.navigateBack()
|
||||||
return
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
let res = await outStorageOrderConfirm(this.pkId)
|
|
||||||
if (res.code === '200') {
|
|
||||||
if (res.content.length > 0) {
|
|
||||||
this.$store.dispatch('setPublicObj', res.content[0])
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.disabled = false
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<view class="zd-row">
|
<view class="zd-row">
|
||||||
<view class="zd-col-6"><span class="filter_label">仓库</span></view>
|
<view class="zd-col-6"><span class="filter_label">仓库</span></view>
|
||||||
<view class="zd-col-6 filter_select">
|
<view class="zd-col-6 filter_select">
|
||||||
<uni-data-select v-model="currentData.stor_code" :localdata="options1"></uni-data-select>
|
<uni-data-select v-model="currentData.stor_code" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-6"><span class="filter_label">车间</span></view>
|
<view class="zd-col-6"><span class="filter_label">车间</span></view>
|
||||||
<view class="zd-col-6 filter_select">
|
<view class="zd-col-6 filter_select">
|
||||||
@@ -90,7 +90,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 {outStorageOrder, outStorageOrderList, outStorageConfirm} from '@/utils/getData2.js'
|
import {outStorageOrder, outStorageOrderList, outStorageConfirm, outStorageOrderConfirm} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -140,6 +140,29 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
selectChange1 (e) {
|
||||||
|
this.currentData.stor_code = e
|
||||||
|
if (e) {
|
||||||
|
this._outStorageOrderConfirm(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _outStorageOrderConfirm (e) {
|
||||||
|
try {
|
||||||
|
let res = await outStorageOrderConfirm(this.currentData.code, e)
|
||||||
|
if (res.code === '200') {
|
||||||
|
if (res.content.length > 0) {
|
||||||
|
this.currentData = res.content[0]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
handleBlur (e) {
|
handleBlur (e) {
|
||||||
if (e.now_assign_qty < 0 || e.now_assign_qty > e.qty) {
|
if (e.now_assign_qty < 0 || e.now_assign_qty > e.qty) {
|
||||||
e.now_assign_qty = e.qty
|
e.now_assign_qty = e.qty
|
||||||
|
|||||||
@@ -154,9 +154,9 @@ export const outStorageOrderList = (page, size, type, code) => request({
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url:'api/pda/outStorage/orderList?page=' + page + '&size=' + size + '&form_type=' + type + '&code=' + code
|
url:'api/pda/outStorage/orderList?page=' + page + '&size=' + size + '&form_type=' + type + '&code=' + code
|
||||||
})
|
})
|
||||||
export const outStorageOrderConfirm = (code) => request({
|
export const outStorageOrderConfirm = (code, scode) => request({
|
||||||
url:'api/pda/outStorage/orderConfirm',
|
url:'api/pda/outStorage/orderConfirm',
|
||||||
data: {code: code}
|
data: {code: code, stor_code: scode}
|
||||||
})
|
})
|
||||||
export const outStorageConfirm = (obj) => request({
|
export const outStorageConfirm = (obj) => request({
|
||||||
url:'api/pda/outStorage/confirm',
|
url:'api/pda/outStorage/confirm',
|
||||||
|
|||||||
Reference in New Issue
Block a user