add包装关系维护
This commit is contained in:
142
pages/SecondPhase/PackRelation.vue
Normal file
142
pages/SecondPhase/PackRelation.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- <nav-bar title="包装关系维护"></nav-bar> -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">销售订单号<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">{{$t('grid.sub-roll-number')}}<span style="color: #D7592F;font-weight: 700;">*</span></span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box v-model="val2" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">客户编号<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">{{$t('grid.customer-name')}}<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val4">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">{{$t('grid.product-code')}}<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val5">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">{{$t('grid.product-description')}}<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val6">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">{{$t('grid.net-weight')}}<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<NumberInput
|
||||
v-model="val7"
|
||||
input-class="filter_input"
|
||||
mode="mixed"
|
||||
:decimalLength="3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">产品厚度(mm)<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<NumberInput
|
||||
v-model="val8"
|
||||
input-class="filter_input"
|
||||
mode="mixed"
|
||||
:decimalLength="3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">物料类型<span style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val9">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !val3 || !val4 || !val5 || !val6 || !val7 || !val8 || !val9}" :disabled="disabled" @tap="_packagerelation">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {packagerelation} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
NumberInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
val5: '',
|
||||
val6: '',
|
||||
val7: '',
|
||||
val8: '',
|
||||
val9: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
async _packagerelation () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.val3 || !this.val4 || !this.val5 || !this.val6 || !this.val7 || !this.val8 || !this.val9) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await packagerelation(this.val1, this.val2, this.val3, this.val4, this.val5, this.val6, this.val7, this.val8, this.val9)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.val4 = ''
|
||||
this.val5 = ''
|
||||
this.val6 = ''
|
||||
this.val7 = ''
|
||||
this.val8 = ''
|
||||
this.val9 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -33,7 +33,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">{{$t('filter.time')}}</view>
|
||||
<view class="filter_label">{{$t('filter.time')}}({{$t('unit.minute')}})</view>
|
||||
<view class="filter_input_wraper">
|
||||
<!-- <input type="text" class="filter_input" v-model="val4"> -->
|
||||
<NumberInput
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
<NumberInput
|
||||
v-model="val2"
|
||||
input-class="filter_input"
|
||||
mode="integer"
|
||||
mode="mixed"
|
||||
:decimalLength="3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user