修改
This commit is contained in:
@@ -67,7 +67,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<!-- <zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select> -->
|
<!-- <zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select> -->
|
||||||
<!-- <uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select> -->
|
|
||||||
<view class="input-wrapper">
|
<view class="input-wrapper">
|
||||||
<input
|
<input
|
||||||
class="input-field"
|
class="input-field"
|
||||||
@@ -91,11 +90,20 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">仓位编码</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-17 filter_select">
|
||||||
|
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-7 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="toSure">组盘确认</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="toSure">组盘确认</button>
|
||||||
|
<button class="zd-col-8 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="toSure2">组盘并绑定</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -104,7 +112,7 @@
|
|||||||
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 NumberInput from '@/components/NumberInput.vue'
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
import {vehiclelist, suppList, combination} from '@/utils/getData4.js'
|
import {vehiclelist, suppList, structList, combination, groupAndBind} from '@/utils/getData4.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -118,6 +126,8 @@
|
|||||||
currentData: {},
|
currentData: {},
|
||||||
options: [],
|
options: [],
|
||||||
index: '',
|
index: '',
|
||||||
|
options2: [],
|
||||||
|
index2: '',
|
||||||
// options1: [{text:'t1', value: 't1'}, {text:'t2', value: 't2'}],
|
// options1: [{text:'t1', value: 't1'}, {text:'t2', value: 't2'}],
|
||||||
// index1: '',
|
// index1: '',
|
||||||
vehicleCode: '',
|
vehicleCode: '',
|
||||||
@@ -140,6 +150,7 @@
|
|||||||
this.title = options.title
|
this.title = options.title
|
||||||
this._suppList()
|
this._suppList()
|
||||||
this._vehiclelist()
|
this._vehiclelist()
|
||||||
|
this._structList()
|
||||||
},
|
},
|
||||||
onShow () {
|
onShow () {
|
||||||
if (this.$store.getters.publicObj !== '') {
|
if (this.$store.getters.publicObj !== '') {
|
||||||
@@ -148,6 +159,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async _structList () {
|
||||||
|
try {
|
||||||
|
let res = await structList()
|
||||||
|
if (res) {
|
||||||
|
this.options2 = res.data
|
||||||
|
} else {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectChange2 (e) {
|
||||||
|
this.index2 = e
|
||||||
|
},
|
||||||
onInput(e) {
|
onInput(e) {
|
||||||
// console.log('输入内容:', e.detail.value)
|
// console.log('输入内容:', e.detail.value)
|
||||||
},
|
},
|
||||||
@@ -207,7 +233,11 @@
|
|||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.currentData = {}
|
this.currentData = {}
|
||||||
this.index = ''
|
this.index = ''
|
||||||
|
this.vehicleCode = ''
|
||||||
|
this.index2 = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
|
this._vehiclelist()
|
||||||
|
this._structList()
|
||||||
},
|
},
|
||||||
toSure () {
|
toSure () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
@@ -240,6 +270,44 @@
|
|||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
this.toEmpty()
|
||||||
|
this.disabled = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toSure2 () {
|
||||||
|
this.disabled = true
|
||||||
|
if (JSON.stringify(this.currentData) === '{}') {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (Number(this.currentData.single_weight) > 2000) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '输入的重量'+ Number(this.currentData.single_weight) +'过大,是否继续?',
|
||||||
|
confirmColor: '#ff6a00',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this._groupAndBind()
|
||||||
|
} else if (res.cancel) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this._groupAndBind()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _groupAndBind () {
|
||||||
|
try {
|
||||||
|
let selobj = this.options.find(item => item.value === this.index)
|
||||||
|
let res = await groupAndBind(this.vehicleCode, this.currentData.pcsn, this.currentData.material_id, selobj.value, selobj.text, this.currentData.single_weight, this.index2)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.toEmpty()
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
|
|||||||
@@ -344,6 +344,12 @@ export const combination = (vcode, pcsn, mid, spcode, spname, sweight) => reques
|
|||||||
data: {vehicle_code: vcode, pcsn: pcsn, material_id: mid, supp_code: spcode, supp_name: spname, single_weight: sweight}
|
data: {vehicle_code: vcode, pcsn: pcsn, material_id: mid, supp_code: spcode, supp_name: spname, single_weight: sweight}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 组盘并绑定
|
||||||
|
export const groupAndBind = (vcode, pcsn, mid, spcode, spname, sweight, pcode) => request({
|
||||||
|
url:'api/pda/jb/groupAndBind',
|
||||||
|
data: {vehicle_code: vcode, pcsn: pcsn, material_id: mid, supp_code: spcode, supp_name: spname, single_weight: sweight, point_code: pcode}
|
||||||
|
})
|
||||||
|
|
||||||
// 料桶组盘-可用载具数组
|
// 料桶组盘-可用载具数组
|
||||||
export const vehiclelist = () => request({
|
export const vehiclelist = () => request({
|
||||||
url:'api/pda/jb/vehiclelist',
|
url:'api/pda/jb/vehiclelist',
|
||||||
|
|||||||
Reference in New Issue
Block a user