产线叫料物料处理
This commit is contained in:
@@ -21,16 +21,16 @@
|
||||
<!-- <span class="filter_label">物料</span> -->
|
||||
<span class="filter_label">{{$t('filter.material')}}</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" placeholder="" @change="selectChange"></uni-data-select>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="currentData.material_name" @tap="toJump">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<view class="zd-col-10">
|
||||
<!-- <span class="filter_label">用料数量</span> -->
|
||||
<span class="filter_label">{{$t('filter.material-use-number')}}</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<view class="zd-col-14">
|
||||
<input type="number" v-model="val3" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">{{unit}}</span></view>
|
||||
@@ -48,9 +48,9 @@
|
||||
</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 || !val2 || !index}" :disabled="disabled" @tap="_loading">确认</button> -->
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_loading">确认</button> -->
|
||||
<button class="zd-col-8 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-14 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_loading">{{$t('button.confirm')}}</button>
|
||||
<button class="zd-col-14 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_loading">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -71,8 +71,8 @@
|
||||
val2: '1',
|
||||
val3: '',
|
||||
unit: '',
|
||||
currentData: {},
|
||||
options: [],
|
||||
index: '',
|
||||
pointCode: '',
|
||||
disabled: false
|
||||
};
|
||||
@@ -83,6 +83,10 @@
|
||||
created () {
|
||||
},
|
||||
onShow() {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData = this.$store.getters.publicObj
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async _selectMaterialByRegion () {
|
||||
@@ -97,12 +101,17 @@
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
let selobj = this.options.find(item => item.value === this.index)
|
||||
this.val3 = selobj.qty
|
||||
this.unit = selobj.measure_unit_id
|
||||
toJump () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/ftdl/mater-list-cxjl?title=查询物料'
|
||||
})
|
||||
},
|
||||
// selectChange (e) {
|
||||
// this.index = e
|
||||
// let selobj = this.options.find(item => item.value === this.index)
|
||||
// this.val3 = selobj.qty
|
||||
// this.unit = selobj.measure_unit_id
|
||||
// },
|
||||
handleChange1 (e) {
|
||||
if (e) {
|
||||
this._getRegionByPoint(e)
|
||||
@@ -129,17 +138,16 @@
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.pointCode = ''
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _loading () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.index) {
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await loading(this.pointCode, this.val1, this.index, this.val2)
|
||||
let res = await loading(this.pointCode, this.val1, this.currentData.material_code, this.val2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user