加功能

This commit is contained in:
2025-09-25 17:39:07 +08:00
parent 80bd41cd5c
commit b557002498
8 changed files with 39 additions and 18 deletions

View File

@@ -84,6 +84,15 @@ uni-button:after {
color: #606266; color: #606266;
padding: 0 10rpx; padding: 0 10rpx;
} }
.filter_unit {
height: 80rpx;
line-height: 80rpx;
border: 1rpx solid #e5e5e5;
background-color: transparent;
font-size: 28rpx;
color: #606266;
text-align:center;
}
.filter_input_disabled { .filter_input_disabled {
background-color: #eee; background-color: #eee;
} }

View File

@@ -72,7 +72,8 @@
"MoveLocation": "Move into Storage Location", "MoveLocation": "Move into Storage Location",
"Keyword": "Keyword", "Keyword": "Keyword",
"Pointlocation": "Point location", "Pointlocation": "Point location",
"Pointlocationcarrier": "Point - location carrier" "Pointlocationcarrier": "Point - location carrier",
"Unitmeasurement": "Unit of measurement"
}, },
"th": { "th": {
"MaterialBoxNumber": "Material Box Number", "MaterialBoxNumber": "Material Box Number",

View File

@@ -72,7 +72,8 @@
"MoveLocation": "Chuyển vào vị trí kho", "MoveLocation": "Chuyển vào vị trí kho",
"Keyword": "Từ khóa", "Keyword": "Từ khóa",
"Pointlocation": "Điểm", "Pointlocation": "Điểm",
"Pointlocationcarrier": "Vật chở tại điểm" "Pointlocationcarrier": "Vật chở tại điểm",
"Unitmeasurement": "Đơn vị đo"
}, },
"th": { "th": {
"MaterialBoxNumber": "Số hộp vật liệu", "MaterialBoxNumber": "Số hộp vật liệu",

View File

@@ -72,7 +72,8 @@
"MoveLocation": "移入货位", "MoveLocation": "移入货位",
"Keyword": "关键字", "Keyword": "关键字",
"Pointlocation": "点位", "Pointlocation": "点位",
"Pointlocationcarrier": "点位载具" "Pointlocationcarrier": "点位载具",
"Unitmeasurement": "计量单位"
}, },
"th": { "th": {
"MaterialBoxNumber": "料框号", "MaterialBoxNumber": "料框号",

View File

@@ -15,8 +15,9 @@
<thead> <thead>
<tr> <tr>
<th>{{$t('label.MaterialName')}}</th> <th>{{$t('label.MaterialName')}}</th>
<th><view style="width: 300rpx;">{{$t('MaterialSpecification')}}</view></th> <th><view style="width: 300rpx;">{{$t('label.MaterialSpecification')}}</view></th>
<th>{{$t('MaterialCode')}}</th> <th>{{$t('label.MaterialCode')}}</th>
<th>{{$t('label.Unitmeasurement')}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -24,6 +25,7 @@
<td>{{e.material_name}}</td> <td>{{e.material_name}}</td>
<td class="wrap">{{e.material_spec}}</td> <td class="wrap">{{e.material_spec}}</td>
<td>{{e.material_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.base_unit_name}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -45,7 +45,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.group_id}"> <tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': e.checked}">
<td>{{e.struct_code}}</td> <td>{{e.struct_code}}</td>
<td>{{e.storagevehicle_code}}</td> <td>{{e.storagevehicle_code}}</td>
<td>{{e.material_name}}</td> <td>{{e.material_name}}</td>
@@ -61,7 +61,7 @@
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">{{$t('button.clear')}}</button> <button class="zd-col-6 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId || !val1 || !index1}" @tap="_callMaterialConfirm">{{$t('button.confirm')}}</button> <button class="zd-col-16 button-primary" :class="{'button-info': allChecked.length === 0 || !val1 || !index1}" @tap="_callMaterialConfirm">{{$t('button.confirm')}}</button>
</view> </view>
</view> </view>
</template> </template>
@@ -85,8 +85,7 @@
options1: [], options1: [],
index1: '', index1: '',
dataList: [], dataList: [],
pkId: '', allChecked: [],
pkObj: {},
disabled: false disabled: false
}; };
}, },
@@ -123,11 +122,14 @@
} }
}, },
async _linegetMaterialDtl () { async _linegetMaterialDtl () {
this.pkId = '' this.allChecked = []
try { try {
let res = await linegetMaterialDtl(this.index, this.val2) let res = await linegetMaterialDtl(this.index, this.val2)
if (res.status === '200') { if (res.status === '200') {
this.dataList = [...res.data] this.dataList = [...res.data]
this.dataList.map(el => {
this.$set(el, 'checked', false)
})
} else { } else {
this.dataList = [] this.dataList = []
} }
@@ -136,17 +138,17 @@
} }
}, },
toChek (e) { toChek (e) {
this.pkId = this.pkId === e.group_id ? '' : e.group_id e.checked = !e.checked
this.pkObj = this.pkId === e.group_id ? e : {} this.allChecked = this.dataList.filter(el => el.checked === true)
}, },
async _callMaterialConfirm () { async _callMaterialConfirm () {
this.disabled = true this.disabled = true
if (!this.pkId || !this.val1 || !this.index1) { if (!this.allChecked.length === 0 || !this.val1 || !this.index1) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await callMaterialConfirm(this.val1, this.pkObj, this.index1) let res = await callMaterialConfirm(this.val1, this.allChecked, this.index1)
if (res.status === '200') { if (res.status === '200') {
this.clearUp() this.clearUp()
} }
@@ -164,8 +166,7 @@
this.val1 = '' this.val1 = ''
this.val2 = '' this.val2 = ''
this.index1 = '' this.index1 = ''
this.pkId = '' this.allChecked = []
this.pkObj = {}
this.dataList = [] this.dataList = []
} }
} }

View File

@@ -22,7 +22,10 @@
</view> </view>
<view> <view>
<view class="filter_label">{{$t('label.MaterialQuantity')}}</view> <view class="filter_label">{{$t('label.MaterialQuantity')}}</view>
<input type="number" class="filter_input filter_input_disabled" v-model="totalQty" disabled> <view class="zd-row">
<view class="zd-col-20"><input type="number" class="filter_input filter_input_disabled" v-model="totalQty" disabled></view>
<view class="zd-col-4 filter_unit">{{currentData.base_unit_name}}</view>
</view>
</view> </view>
</view> </view>
<view class="zd_wrapper grid-wraper"> <view class="zd_wrapper grid-wraper">

View File

@@ -43,7 +43,10 @@
</view> </view>
<view> <view>
<view class="filter_label">{{$t('label.MaterialQuantity')}}</view> <view class="filter_label">{{$t('label.MaterialQuantity')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled> <view class="zd-row">
<view class="zd-col-20"><input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled></view>
<view class="zd-col-4 filter_unit">{{currentData.qty_unit_name}}</view>
</view>
</view> </view>
</view> </view>
<view v-if="dataList.length" class="zd_wrapper grid-wraper"> <view v-if="dataList.length" class="zd_wrapper grid-wraper">