组盘
This commit is contained in:
@@ -53,15 +53,17 @@
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>点位</th>
|
||||
<th>物料数量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.group_id === pkId}">
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.checked}">
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.vehicle_type}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -77,7 +79,7 @@
|
||||
</view>
|
||||
<button class="zd-col-4 submit-button_new" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !index1 || !val1 || !val3 || !index2 || !$store.getters.publicObj}" :disabled="disabled1" @tap="_groupManual">开始组盘</button>
|
||||
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="_groupLink">开始配盘</button>
|
||||
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': checkArr.length === 0}" :disabled="disabled2" @tap="_groupLink">开始配盘</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -106,8 +108,7 @@
|
||||
isV: false,
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
checkArr: []
|
||||
};
|
||||
},
|
||||
created () {
|
||||
@@ -150,6 +151,9 @@
|
||||
/** grid */
|
||||
async _queryVehicleGroup () {
|
||||
let res = await queryVehicleGroup()
|
||||
res.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res]
|
||||
},
|
||||
getMater () {
|
||||
@@ -158,8 +162,8 @@
|
||||
})
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
||||
this.pkObj = this.pkId === e.group_id ? e : {}
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
isVirtual () {
|
||||
this.isV = !this.isV
|
||||
@@ -174,7 +178,7 @@
|
||||
try {
|
||||
let res = await groupManual(this.index1, this.val1, this.index2, this.val4, this.val5, this.val3, this.isV)
|
||||
this.disabled1 = false
|
||||
this.pkId = ''
|
||||
this.checkArr = []
|
||||
this.clearUp()
|
||||
this._queryVehicleGroup()
|
||||
uni.showToast({
|
||||
@@ -188,14 +192,20 @@
|
||||
/** 开始配盘 */
|
||||
async _groupLink () {
|
||||
this.disabled2 = true
|
||||
if (!this.pkId) {
|
||||
if (this.checkArr.length === 0) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await groupLink(this.pkId, this.val1)
|
||||
let arr = []
|
||||
this.checkArr.map(el => {
|
||||
if (el.checked) {
|
||||
arr.push(el.group_id)
|
||||
}
|
||||
})
|
||||
let res = await groupLink(arr.toString(), this.val1)
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this.checkArr = []
|
||||
this.clearUp()
|
||||
this._queryVehicleGroup()
|
||||
uni.showToast({
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-22">
|
||||
<view class="zd-row mgb10 flow_start_item" v-for="el in e.end_points" :key="el.point_code" @tap="checkcode2(el)" :class="{'flow_start_item_checked': pkId2 === el.point_code}">
|
||||
<view class="zd-row mgb10 flow_start_item" v-for="el in e.end_points" :key="el.point_code" @tap="checkcode2(el, e)" :class="{'flow_start_item_checked': pkId2 === el.point_code}">
|
||||
<view class="zd-col-8 pdl20 pdr20 font-size-1">{{el.point_code}}</view>
|
||||
<view class="zd-col-16 pdr20 font-size-2">{{el.point_name}}</view>
|
||||
<view v-show="pkId2 === el.point_code" class="iconfont icon_choosed"></view>
|
||||
@@ -68,7 +68,8 @@
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
pkId1: '',
|
||||
pkId2: ''
|
||||
pkId2: '',
|
||||
pkId3: ''
|
||||
};
|
||||
},
|
||||
created () {
|
||||
@@ -81,10 +82,18 @@
|
||||
this.dataList = [...res]
|
||||
},
|
||||
checkcode1 (e) {
|
||||
if (this.pkId3 !== '' && e.point_code !== this.pkId3) {
|
||||
this.pkId2 = ''
|
||||
this.pkId3 = ''
|
||||
}
|
||||
this.pkId1 = this.pkId1 === e.point_code ? '' : e.point_code
|
||||
},
|
||||
checkcode2 (e) {
|
||||
this.pkId2 = this.pkId2 === e.point_code ? '' : e.point_code
|
||||
checkcode2 (el, e) {
|
||||
if (this.pkId1 !== '' && this.pkId1 !== e.point_code) {
|
||||
return
|
||||
}
|
||||
this.pkId2 = this.pkId2 === el.point_code ? '' : el.point_code
|
||||
this.pkId3 = this.pkId2 === el.point_code ? e.point_code : ''
|
||||
},
|
||||
/** 重新下发 */
|
||||
async toSure () {
|
||||
|
||||
Reference in New Issue
Block a user