国际化
This commit is contained in:
@@ -4,63 +4,43 @@
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val1"/>
|
||||
</view>
|
||||
<view class="is-required">
|
||||
<view class="filter_label">{{$t('label.CarrierCode')}}</view>
|
||||
<search-box v-model="val1"/>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="currentData.material_code" @tap="toJump">
|
||||
</view>
|
||||
<view>
|
||||
<view class="filter_label">{{$t('label.MaterialCode')}}</view>
|
||||
<input type="text" class="filter_input" v-model="currentData.material_code" @tap="toJump">
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
|
||||
</view>
|
||||
<view>
|
||||
<view class="filter_label">{{$t('label.MaterialName')}}</view>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料规格</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
|
||||
</view>
|
||||
<view>
|
||||
<view class="filter_label">{{$t('label.MaterialSpecification')}}</view>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="number" class="filter_input filter_input_disabled" v-model="totalQty" disabled>
|
||||
</view>
|
||||
<view>
|
||||
<view class="filter_label">{{$t('label.MaterialQuantity')}}</view>
|
||||
<input type="number" class="filter_input filter_input_disabled" v-model="totalQty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<button class="mini-btn" type="primary" size="mini" style="display: block;" @tap="addmater">添加料框</button>
|
||||
<button class="mini-btn" type="primary" size="mini" style="display: block;" @tap="addmater">{{$t('button.AddMaterialBox')}}</button>
|
||||
<view v-if="dataList.length" class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">料框号</th>
|
||||
<th width="30%">数量</th>
|
||||
<th>操作</th>
|
||||
<th width="50%">{{$t('th.MaterialBoxNumber')}}</th>
|
||||
<th width="30%">{{$t('Quantity')}}</th>
|
||||
<th>{{$t('button.Operation')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td><input class="sin_input" :class="{ 'input-error': e.mater_frame === '' }" type="text" placeholder="请输入料框号" v-model="e.mater_frame" @blur="checkMaterFrame(i)" @input="clearError(i)" ref="materFrameInputs"></td>
|
||||
<td><input class="sin_input" :class="{ 'input-error': e.mater_frame === '' }" type="text" v-model="e.mater_frame" @blur="checkMaterFrame(i)" @input="clearError(i)" ref="materFrameInputs"></td>
|
||||
<td><input class="sin_input" type="number" v-model="e.qty" @blur="checkQty(i)"></td>
|
||||
<td><button class="mini-btn" type="primary" size="mini" style="display: block" @tap="delItem(i)">删除</button></td>
|
||||
<td><button class="mini-btn" type="primary" size="mini" style="display: block" @tap="delItem(i)">{{$t('button.Delete')}}</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -68,8 +48,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1}" :disabled="disabled" @tap="_groupPlate">组盘确认</button>
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1}" :disabled="disabled" @tap="_groupPlate">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -114,7 +94,7 @@
|
||||
methods: {
|
||||
toJump () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/manage/common/cxwl?title=查询物料'
|
||||
url: '/pages/manage/common/cxwl?title=' + this.$t('home.QueryMaterials')
|
||||
})
|
||||
},
|
||||
addmater () {
|
||||
@@ -139,7 +119,7 @@
|
||||
const isDuplicate = this.dataList.some((item, i) => i !== index && item.mater_frame === mater_frame)
|
||||
if (isDuplicate) {
|
||||
uni.showToast({
|
||||
title: '料框号重复',
|
||||
title: this.$t('toast.boxnotduplicated'),
|
||||
icon: 'none'
|
||||
})
|
||||
// 清空当前料框号
|
||||
@@ -150,7 +130,7 @@
|
||||
const { qty } = this.dataList[index]
|
||||
if (qty < 0) {
|
||||
uni.showToast({
|
||||
title: '数量必须为非负数',
|
||||
title: this.$t('toast.quantitynonnegative'),
|
||||
icon: 'none'
|
||||
})
|
||||
// 重置数量为0
|
||||
|
||||
Reference in New Issue
Block a user