|
@@ -28,9 +28,15 @@
|
|
|
:beforeClose="onBuildTask"
|
|
:beforeClose="onBuildTask"
|
|
|
>
|
|
>
|
|
|
<div class="sub-task-list" >
|
|
<div class="sub-task-list" >
|
|
|
- <van-checkbox class="sub-task-checkbox" v-model="isCheckAll" :indeterminate="isIndeterminate" @change="checkAllChange">全选</van-checkbox>
|
|
|
|
|
|
|
+ <div style="display: flex;justify-content: space-between;">
|
|
|
|
|
+ <div><van-checkbox class="sub-task-checkbox" v-model="isCheckAll" :indeterminate="isIndeterminate" @change="checkAllChange">全选</van-checkbox></div>
|
|
|
|
|
+ <div v-if="taskType==='ITEM_PICK'" >
|
|
|
|
|
+ <van-tag type="primary" :plain="sortType==='number'" @click="onSort('sql')">按排序规则</van-tag>
|
|
|
|
|
+ <van-tag type="primary" :plain="sortType==='sql'" @click="onSort('number')">按库位数量</van-tag>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<van-checkbox-group v-model="checkedResult" @change="checkedChange">
|
|
<van-checkbox-group v-model="checkedResult" @change="checkedChange">
|
|
|
- <van-checkbox class="sub-task-checkbox" v-for="(item,index) in typeTaskList" :key="index" :name="item" :disabled="(item.allowPick===false && taskType==='AISLE_PICK') || item.status!==40" >
|
|
|
|
|
|
|
+ <van-checkbox class="sub-task-checkbox" v-for="(item,index) in typeTaskList" :key="index" :name="item" :disabled="(item.allowPick===false && taskType==='AISLE_PICK') || item.status!==40" >
|
|
|
<div class="sub-task-item" v-if="taskType==='LOCATION_PICK'">
|
|
<div class="sub-task-item" v-if="taskType==='LOCATION_PICK'">
|
|
|
<div style="font-size: 13px;font-weight: bold" >{{item.location}}</div>
|
|
<div style="font-size: 13px;font-weight: bold" >{{item.location}}</div>
|
|
|
<div class="sub-task-item-content" >
|
|
<div class="sub-task-item-content" >
|
|
@@ -97,6 +103,7 @@ const taskType=ref('LOCATION_PICK')
|
|
|
const subBigOrderTrueFalseBy=ref(false)
|
|
const subBigOrderTrueFalseBy=ref(false)
|
|
|
//子任务订单row
|
|
//子任务订单row
|
|
|
const subModel=ref({})
|
|
const subModel=ref({})
|
|
|
|
|
+const sortType=ref('sql')
|
|
|
const onTypeOrder=(row,type)=>{
|
|
const onTypeOrder=(row,type)=>{
|
|
|
taskType.value=type
|
|
taskType.value=type
|
|
|
subModel.value=row
|
|
subModel.value=row
|
|
@@ -104,12 +111,17 @@ const onTypeOrder=(row,type)=>{
|
|
|
warehouse:props.warehouse,
|
|
warehouse:props.warehouse,
|
|
|
orderNo:row.orderNo,
|
|
orderNo:row.orderNo,
|
|
|
type,
|
|
type,
|
|
|
|
|
+ status:40,
|
|
|
page:1,
|
|
page:1,
|
|
|
- size:200,
|
|
|
|
|
|
|
+ size:2000,
|
|
|
}
|
|
}
|
|
|
showLoading()
|
|
showLoading()
|
|
|
getBigPickingList(params).then(res=>{
|
|
getBigPickingList(params).then(res=>{
|
|
|
|
|
+ res.data.records.forEach((item,index)=>{
|
|
|
|
|
+ item.sqlIndex=index
|
|
|
|
|
+ })
|
|
|
typeTaskList.value=res.data.records
|
|
typeTaskList.value=res.data.records
|
|
|
|
|
+ onSort('sql')
|
|
|
subBigOrderTrueFalseBy.value=true
|
|
subBigOrderTrueFalseBy.value=true
|
|
|
isIndeterminate.value = false
|
|
isIndeterminate.value = false
|
|
|
isCheckAll.value=false
|
|
isCheckAll.value=false
|
|
@@ -179,14 +191,31 @@ const onBuildTask=(action)=>
|
|
|
api = getBigPickingLocation;
|
|
api = getBigPickingLocation;
|
|
|
}
|
|
}
|
|
|
showLoading()
|
|
showLoading()
|
|
|
- api(params).then(data => {
|
|
|
|
|
- showToast('大件任务创建成功!正在跳转')
|
|
|
|
|
- router.push('/picking')
|
|
|
|
|
|
|
+ api(params).then(res => {
|
|
|
|
|
+ console.log(res,"data")
|
|
|
|
|
+ closeLoading()
|
|
|
|
|
+ showToast({duration:5000,message:'大件任务创建成功!正在跳转'})
|
|
|
|
|
+ router.push({name:'PickingList',query: { code:res.data }})
|
|
|
}).finally(e=>{
|
|
}).finally(e=>{
|
|
|
closeLoading()
|
|
closeLoading()
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const onSort = (val) => {
|
|
|
|
|
+ sortType.value = val;
|
|
|
|
|
+ // 提取排序条件的字段
|
|
|
|
|
+ const sortField = val === 'sql' ? 'sqlIndex' : 'locationNum';
|
|
|
|
|
+ // 过滤出 status 为 40 的任务并排序
|
|
|
|
|
+ const sorted = typeTaskList.value
|
|
|
|
|
+ .filter(item => item.status === 40)
|
|
|
|
|
+ .sort((a, b) => b[sortField] - a[sortField]);
|
|
|
|
|
+ // 合并排序后的数组和 status 不等于 40 的任务
|
|
|
|
|
+ typeTaskList.value = [
|
|
|
|
|
+ ...sorted,
|
|
|
|
|
+ ...typeTaskList.value.filter(item => item.status !== 40)
|
|
|
|
|
+ ]
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
defineExpose({show})
|
|
defineExpose({show})
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="sass" scoped>
|
|
<style lang="sass" scoped>
|
|
@@ -198,7 +227,7 @@ defineExpose({show})
|
|
|
padding: 0 10px
|
|
padding: 0 10px
|
|
|
.big-task-item
|
|
.big-task-item
|
|
|
margin-bottom: 10px
|
|
margin-bottom: 10px
|
|
|
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4)
|
|
|
|
|
|
|
+ //box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4)
|
|
|
border-radius: 8px
|
|
border-radius: 8px
|
|
|
border: 1px solid #d3d3d3
|
|
border: 1px solid #d3d3d3
|
|
|
.big-task-content
|
|
.big-task-content
|
|
@@ -212,14 +241,15 @@ defineExpose({show})
|
|
|
.big-content
|
|
.big-content
|
|
|
flex: 1
|
|
flex: 1
|
|
|
.big-task-button
|
|
.big-task-button
|
|
|
- font-size: 13px
|
|
|
|
|
|
|
+ font-size: 14px
|
|
|
|
|
+ font-weight: bold
|
|
|
display: flex
|
|
display: flex
|
|
|
align-items: center
|
|
align-items: center
|
|
|
color: #0077ff
|
|
color: #0077ff
|
|
|
border-top: 1px solid #dfdfdf
|
|
border-top: 1px solid #dfdfdf
|
|
|
.big-button
|
|
.big-button
|
|
|
- height: 35px
|
|
|
|
|
- line-height: 35px
|
|
|
|
|
|
|
+ height: 38px
|
|
|
|
|
+ line-height: 38px
|
|
|
flex: 1
|
|
flex: 1
|
|
|
border-right: 1px solid #dfdfdf
|
|
border-right: 1px solid #dfdfdf
|
|
|
.big-button:last-child
|
|
.big-button:last-child
|