接口
This commit is contained in:
@@ -66,7 +66,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': JSON.stringify(currentData) === '{}' || !val1}" :disabled="disabled" @tap="_groupPlate">组盘确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1 || !index}" :disabled="disabled" @tap="_zwgroupPlate">组盘确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -75,7 +75,7 @@
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {regionList, groupPlate} from '@/utils/getData4.js'
|
||||
import {getFormDataList, zwgroupPlate} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -101,12 +101,17 @@
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._regionList()
|
||||
this._getFormDataList()
|
||||
},
|
||||
methods: {
|
||||
async _regionList () {
|
||||
toJump () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/mater-list?title=查询物料'
|
||||
})
|
||||
},
|
||||
async _getFormDataList () {
|
||||
try {
|
||||
let res = await regionList()
|
||||
let res = await getFormDataList()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
@@ -125,22 +130,15 @@
|
||||
this.currentData = {}
|
||||
this.disabled = false
|
||||
},
|
||||
async _groupPlate () {
|
||||
async _zwgroupPlate () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}' || !this.val1) {
|
||||
if (JSON.stringify(this.currentData) === '{}' || !this.val1 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.currentData.stor_code = this.index
|
||||
let arr = [
|
||||
{
|
||||
material_id: this.currentData.material_id,
|
||||
qty: this.currentData.qty,
|
||||
pcsn: this.currentData.pcsn,
|
||||
}
|
||||
]
|
||||
let res = await groupPlate(arr, this.val1)
|
||||
let res = await zwgroupPlate(this.val1, this.currentData.material_id, this.currentData.qty, this.index)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
|
||||
@@ -253,7 +253,13 @@ export const updatePointType = (code, type) => request({
|
||||
})
|
||||
|
||||
// 组盘入库
|
||||
export const groupPlate = (mid, pcsn, qty, vcode, ecode) => request({
|
||||
// 物料组盘(带单据)
|
||||
export const zwgroupPlate = (vcode, mid, qty, ecode) => request({
|
||||
url:'api/pda/iosIn/groupPlate',
|
||||
data: {material_id: mid, pcsn: pcsn, qty: qty, vehicle_code: vcode, ext_code: ecode}
|
||||
data: {vehicle_code: vcode, material_id: mid, qty: qty, ext_code: ecode}
|
||||
})
|
||||
// 获取单据下拉清单
|
||||
// export const getFormDataList = (fdcode) => request({
|
||||
// url:'api/pda/iosIn/getFormDataList',
|
||||
// data: {form_data_code: fdcode}
|
||||
// })
|
||||
|
||||
Reference in New Issue
Block a user