加功能
This commit is contained in:
@@ -84,6 +84,15 @@ uni-button:after {
|
||||
color: #606266;
|
||||
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 {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
"MoveLocation": "Move into Storage Location",
|
||||
"Keyword": "Keyword",
|
||||
"Pointlocation": "Point location",
|
||||
"Pointlocationcarrier": "Point - location carrier"
|
||||
"Pointlocationcarrier": "Point - location carrier",
|
||||
"Unitmeasurement": "Unit of measurement"
|
||||
},
|
||||
"th": {
|
||||
"MaterialBoxNumber": "Material Box Number",
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
"MoveLocation": "Chuyển vào vị trí kho",
|
||||
"Keyword": "Từ khóa",
|
||||
"Pointlocation": "Điểm",
|
||||
"Pointlocationcarrier": "Vật chở tại điểm"
|
||||
"Pointlocationcarrier": "Vật chở tại điểm",
|
||||
"Unitmeasurement": "Đơn vị đo"
|
||||
},
|
||||
"th": {
|
||||
"MaterialBoxNumber": "Số hộp vật liệu",
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
"MoveLocation": "移入货位",
|
||||
"Keyword": "关键字",
|
||||
"Pointlocation": "点位",
|
||||
"Pointlocationcarrier": "点位载具"
|
||||
"Pointlocationcarrier": "点位载具",
|
||||
"Unitmeasurement": "计量单位"
|
||||
},
|
||||
"th": {
|
||||
"MaterialBoxNumber": "料框号",
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{$t('label.MaterialName')}}</th>
|
||||
<th><view style="width: 300rpx;">{{$t('MaterialSpecification')}}</view></th>
|
||||
<th>{{$t('MaterialCode')}}</th>
|
||||
<th><view style="width: 300rpx;">{{$t('label.MaterialSpecification')}}</view></th>
|
||||
<th>{{$t('label.MaterialCode')}}</th>
|
||||
<th>{{$t('label.Unitmeasurement')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -24,6 +25,7 @@
|
||||
<td>{{e.material_name}}</td>
|
||||
<td class="wrap">{{e.material_spec}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.base_unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<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.storagevehicle_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
@@ -61,7 +61,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<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>
|
||||
</template>
|
||||
@@ -85,8 +85,7 @@
|
||||
options1: [],
|
||||
index1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
allChecked: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -123,11 +122,14 @@
|
||||
}
|
||||
},
|
||||
async _linegetMaterialDtl () {
|
||||
this.pkId = ''
|
||||
this.allChecked = []
|
||||
try {
|
||||
let res = await linegetMaterialDtl(this.index, this.val2)
|
||||
if (res.status === '200') {
|
||||
this.dataList = [...res.data]
|
||||
this.dataList.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
@@ -136,17 +138,17 @@
|
||||
}
|
||||
},
|
||||
toChek (e) {
|
||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
||||
this.pkObj = this.pkId === e.group_id ? e : {}
|
||||
e.checked = !e.checked
|
||||
this.allChecked = this.dataList.filter(el => el.checked === true)
|
||||
},
|
||||
async _callMaterialConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.pkId || !this.val1 || !this.index1) {
|
||||
if (!this.allChecked.length === 0 || !this.val1 || !this.index1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
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') {
|
||||
this.clearUp()
|
||||
}
|
||||
@@ -164,8 +166,7 @@
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index1 = ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.allChecked = []
|
||||
this.dataList = []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
</view>
|
||||
<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 class="zd_wrapper grid-wraper">
|
||||
|
||||
@@ -43,7 +43,10 @@
|
||||
</view>
|
||||
<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 v-if="dataList.length" class="zd_wrapper grid-wraper">
|
||||
|
||||
Reference in New Issue
Block a user