no message

main
HUOJIN\92525 2024-11-08 13:29:32 +08:00
parent e970531b23
commit cbd21015f1
4 changed files with 4643 additions and 22726 deletions

26997
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,8 @@
v-for="item in this.itemListData"
:key="item.code"
:label="item.code"
:value="item.code">
:value="item.code"
>
<span style="float: left">{{ item.code }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
</el-option>
@ -24,13 +25,15 @@
<el-form-item label="物料名称">
<el-input v-model="query.itemName" clearable placeholder="请输入物料名称" style="width: 140px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"/>
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="任务号">
<el-input v-model="query.po" clearable placeholder="请输入任务号" style="width: 140px;" class="filter-item"
@keyup.enter.native="crud.toQuery"/>
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<date-range-picker v-model="query.createTime" class="date-item" style="width: 100px"/>
@ -87,7 +90,6 @@
icon="el-icon-edit"
size="mini"
:loading="crud.delAllLoading"
:disabled="show_jh"
@click="getPickTask(crud.selections[0].id)"
>
拣货确认
@ -97,7 +99,8 @@
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small"
style="width: 100%;"
height="58vh"
@selection-change="selectionChangeHandlerTwo" border>
@selection-change="selectionChangeHandlerTwo" border
>
<el-table-column type="selection" width="50"/>
<el-table-column prop="id" label="序号"/>
<el-table-column prop="po" width="120" label="任务号"/>
@ -131,16 +134,18 @@
<template slot-scope="scope">
<el-button size="mini" :disabled="scope.row.status!='OPEN'" type="primary" icon="el-icon-edit"
@click="editPick(scope.row)"/>
@click="editPick(scope.row)"
/>
<template>
<el-popconfirm
title="确定删除吗?"
icon='el-icon-delete'
icon-color='red'
icon="el-icon-delete"
icon-color="red"
@confirm="deletePick(scope.row)"
>
<el-button slot="reference" :disabled="scope.row.status!='OPEN'" size="mini" type="danger"
icon="el-icon-delete"/>
icon="el-icon-delete"
/>
</el-popconfirm>
</template>
@ -152,11 +157,13 @@
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
:title="crud.status.title" width="500px">
:title="crud.status.title" width="500px"
>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="物料" prop="item">
<el-select v-model="form.item" @focus="getItem" filterable placeholder="请选择物料" value-key="id"
style="width: 370px;">
style="width: 370px;"
>
<el-option
v-for="item in items"
:key="item.id"
@ -196,9 +203,9 @@ import rrOperation from '@crud/RR.operation.vue'
import crudOperation from '@crud/CRUD.operation.vue'
import udOperation from '@crud/UD.operation.vue'
import pagination from '@crud/Pagination.vue'
import {getItems, getItemsList} from "@/api/item"
import PickTask from "@/views/business-pick/pickDetail/pickTicketTask.vue"
import DateRangePicker from "@/components/DateRangePicker/index.vue";
import { getItems, getItemsList } from '@/api/item'
import PickTask from '@/views/business-pick/pickDetail/pickTicketTask.vue'
import DateRangePicker from '@/components/DateRangePicker/index.vue'
import { formatDate } from '@/utils/commonUtils'
const defaultForm = {
@ -281,8 +288,8 @@ export default {
},
mounted() {
//
this.getItem();
this.itemDataGet();
this.getItem()
this.itemDataGet()
},
methods: {
// false
@ -303,36 +310,35 @@ export default {
selectionChangeHandlerTwo(val) {
this.crud.selections = val
if (this.crud.selections.length == 0) {
this.show_jh = true;
this.show_fp = true;
this.show_cancelfp = true;
return;
this.show_jh = true
this.show_fp = true
this.show_cancelfp = true
return
}
const status = [];
const status = []
for (let i = 0; i < val.length; i++) {
status.push(this.crud.selections[i].status)
}
if (this.isAllEqual(status) && status[0] == "OPEN") {
this.show_jh = true;
this.show_fp = false;
return;
if (this.isAllEqual(status) && status[0] == 'OPEN') {
this.show_jh = true
this.show_fp = false
return
}
if (this.isAllEqual(status) && status[0] == "ALLOCATE") {
this.show_jh = true;
this.show_fp = true;
this.show_cancelfp = false;
if (this.isAllEqual(status) && status[0] == 'ALLOCATE') {
this.show_jh = true
this.show_fp = true
this.show_cancelfp = false
}
//
if (this.crud.selections.length == 1 && this.crud.selections[0].orderQty == this.crud.selections[0].allocatedQty) {
this.show_jh = false;
this.show_fp = true;
return;
this.show_jh = true;
this.show_fp = true
return
}
},
allocate(datas) {
this.$confirm(`选中的${datas.length}条数据分配确认?`, '提示', {
@ -341,21 +347,21 @@ export default {
type: 'warning'
}).then(() => {
const ids = [];
const ids = []
for (let i = 0; i < datas.length; i++) {
ids.push(datas[i].id)
}
crudPickDetail.allocate(ids).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS);
this.crud.toQuery();
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).catch(() => {
})
}).catch(() => {
this.$refs.table.clearSelection()
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS);
});
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
cancelAllocate(datas) {
this.$confirm(`选中的${datas.length}条数据取消分配确认?`, '提示', {
@ -364,46 +370,46 @@ export default {
type: 'warning'
}).then(() => {
const ids = [];
const ids = []
for (let i = 0; i < datas.length; i++) {
ids.push(datas[i].id)
}
crudPickDetail.cancelAllocate(ids).then(res => {
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS);
this.crud.toQuery();
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).catch(() => {
})
}).catch(() => {
this.$refs.table.clearSelection()
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS);
});
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
getPickTask(id) {
this.$refs.pickTask.dialog = true
this.$refs.pickTask.queryPickTask(id)
},
shuaxin() {
this.crud.toQuery();
this.crud.toQuery()
},
clickChange(lab) {
if (lab === "全部") {
this.crud.resetQuery();
this.crud.toQuery();
} else if (lab === "打开") {
if (lab === '全部') {
this.crud.resetQuery()
this.crud.toQuery()
} else if (lab === '打开') {
this.query.status = 'OPEN'
this.crud.toQuery();
} else if (lab === "已分配") {
this.crud.toQuery()
} else if (lab === '已分配') {
this.query.status = 'ALLOCATE'
this.crud.toQuery();
} else if (lab === "拣货完成") {
this.crud.toQuery()
} else if (lab === '拣货完成') {
this.query.status = 'PICK_ALL'
this.crud.toQuery();
this.crud.toQuery()
}
},
resetQuery() {
this.radio3 = '全部';
this.radio3 = '全部'
this.crud.resetQuery()
},
editPick(data) {
@ -414,28 +420,28 @@ export default {
}, isAllEqual(array) {
if (array.length > 0) {
return !array.some(function(value, index) {
return value !== array[0];
});
return value !== array[0]
})
} else {
return true;
return true
}
},
//
itemDataGet() {
getItemsList().then(res => {
this.itemListData = res;
this.itemListData = res
}).catch(e => {
this.$message({
showClose: true,
message: '物料加载失败',
type: 'error'
});
})
})
},
//
getFormatDate(data) {
return formatDate(data);
},
return formatDate(data)
}
}
}
</script>

View File

@ -6,7 +6,7 @@
<!-- 搜索 -->
<!-- <label class="el-form-item-label">出库库区</label>-->
<!-- <el-input v-model="query.area" clearable placeholder="出库库区" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />-->
<el-select v-model="query.areaCode" clearable placeholder="出库库区" filterable >
<el-select v-model="query.areaCode" class="filter-item" clearable placeholder="出库库区" filterable>
<el-option
style="width: 180px"
v-for="item in areaOptions"
@ -37,7 +37,9 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" :tableKey="this.$options.name">
<el-button type="primary" v-permission="permission.savepickTicket" @click="getCodeNoM()" icon="el-icon-plus" slot="left" class="filter-item" size="mini">
<el-button type="primary" v-permission="permission.savepickTicket" @click="getCodeNoM()" icon="el-icon-plus"
slot="left" class="filter-item" size="mini"
>
新增
</el-button>
<el-button
@ -69,7 +71,7 @@
class="filter-item"
type="danger"
size="mini"
:disabled="!((crud.selections.length === 1 && crud.selections[0].status === 'ALLOCATE')|| (crud.selections.length === 1 && crud.selections[0].status === 'PICKUP'))"
:disabled="crud.selections.length != 1||crud.selections[0].status != 'ALLOCATE'"
@click="pickConfirmOnOffM(crud.selections[0])"
v-permission="permission.pickConfirm"
>
@ -96,9 +98,10 @@
@click="pickOutConfirmM(crud.selections)"
v-permission="permission.pickOutConfirm"
>
出库确认
发运确认
</el-button>
<el-button
v-if="false"
slot="right"
class="filter-item"
type="warning"
@ -110,6 +113,7 @@
查看详情
</el-button>
<el-button
v-if="false"
slot="right"
class="filter-item"
type="primary"
@ -122,6 +126,7 @@
打印留样接收单
</el-button>
<el-button
v-if="false"
slot="right"
class="filter-item"
type="primary"
@ -253,6 +258,7 @@
整单拣货
</el-button>
<el-button
v-if="false"
slot="right"
class="filter-item"
type="primary"
@ -262,6 +268,7 @@
批量拣货
</el-button>
<el-button
v-if="false"
slot="right"
class="filter-item"
type="primary"
@ -271,6 +278,7 @@
单一拣货
</el-button>
<el-button
v-if="false"
slot="right"
class="filter-item"
type="primary"
@ -420,7 +428,8 @@
<el-button type="primary" @click="submitFrom(pickTicketFrom)"></el-button>
</div>
</el-dialog>
<OutParticulars :view-details-datas="viewDetailsDatas" :view-details-on-off = viewDetailsOnOff :height="crud.tableHeight" @gbOnOff="gbM()"
<OutParticulars :view-details-datas="viewDetailsDatas" :view-details-on-off=viewDetailsOnOff
:height="crud.tableHeight" @gbOnOff="gbM()"
:select-data="crud.selections[0]" @queryDA="queryData" :key="key" :show_fp="show_fp"
></OutParticulars>
@ -478,6 +487,8 @@
<template slot-scope="scope">
<el-button type="primary" @click="pickDetailRouter(scope.row)"
style="float: right"
size="mini"
>明细
</el-button>
<udOperation
@ -515,9 +526,9 @@ import { formatDate } from '@/utils/commonUtils'
import { queryTaskData, queryTaskLog } from '@/api/task'
import crudPickDetail from '@/api/pickDetail'
import OutParticulars from '@/views/business-pick/pickTicket/OutParticulars.vue'
import {pickOutConfirm} from "@/api/pickOut";
import {xppHyIn} from "@/api/xppRecord";
import {mapGetters} from "vuex";
import { pickOutConfirm } from '@/api/pickOut'
import { xppHyIn } from '@/api/xppRecord'
import { mapGetters } from 'vuex'
const defaultForm = {
id: null,
@ -576,7 +587,7 @@ export default {
optShow: {
add: false,
edit: false,
del: true,
del: false,
reset: false,
download: false
},
@ -681,7 +692,7 @@ export default {
//
xppQRCode: null,
//
bhr:null,
bhr: null
},
//task
tsakSelectData: [],
@ -759,10 +770,16 @@ export default {
})
},
showReport(data) {
this.$router.push({path:'/business-pick/business-bom/lyckd_report',query:{tableID:'留样接收单',parm: "code="+data.code+"&username="+this.user.username}})
this.$router.push({
path: '/business-pick/business-bom/lyckd_report',
query: { tableID: '留样接收单', parm: 'code=' + data.code + '&username=' + this.user.username }
})
},
showReportHc(data) {
this.$router.push({path:'/business-pick/business-bom/lyHcd_report',query:{tableID:'留样回传单',parm: "code="+data.code+"&username="+this.user.username}})
this.$router.push({
path: '/business-pick/business-bom/lyHcd_report',
query: { tableID: '留样回传单', parm: 'code=' + data.code + '&username=' + this.user.username }
})
},
getCodeNoM() {
//
@ -782,7 +799,7 @@ export default {
},
submitFrom(data) {
crudPickTicket.add(data).then(res => {
this.$message.success('新增成功')
this.crud.notify('新增成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.saveOnOff = false
this.pickTicketFrom = defaultForm
this.crud.toQuery()
@ -836,11 +853,13 @@ export default {
ids.push(datas[i].id)
}
crudPickDetail.allocatePick(ids).then(res => {
if (res.status = 200) {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).catch(() => {
this.crud.notify('分配失败!', CRUD.NOTIFICATION_TYPE.ERROR)
} else {
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
this.crud.toQuery()
}
})
}).catch(() => {
@ -872,7 +891,7 @@ export default {
}
pickOutConfirm(list).then(res => {
this.crud.toQuery()
this.$message.success(res)
this.crud.notif(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
//
@ -880,19 +899,19 @@ export default {
//
// console.log(data)
//
let data_ = {pickTicketId:null};
data_.pickTicketId=data.id;
let data_ = { pickTicketId: null }
data_.pickTicketId = data.id
crudPickTicket.queryDetails(data.id).then(res => {
//
this.viewDetailsDatas.outboundDetailsData = res.pickDetailList;
this.viewDetailsDatas.outboundDetailsData = res.pickDetailList
//
this.viewDetailsDatas.allocationRecords = res.pickDetailAllocateList;
this.viewDetailsDatas.allocationRecords = res.pickDetailAllocateList
//
this.viewDetailsDatas.pickingRecords=res.pickDetailPickingList;
this.viewDetailsDatas.pickingRecords = res.pickDetailPickingList
})
//
this.viewDetailsOnOff = true;
this.viewDetailsOnOff = true
},
//
cancelPick(data) {
@ -905,15 +924,15 @@ export default {
data_.pickConfirmNo = 4
data_.pickTicketId = data.id
pickingOperations(data_).then(res => {
this.$message.success(res)
this.crud.notify('取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
} else {
this.$message.error('该单据有已经拣货确认的数据')
this.crud.notify('该单据有已经拣货确认的数据', CRUD.NOTIFICATION_TYPE.ERROR)
}
})
} else {
this.$message.error('状态必须是已分配的才能取消拣货')
this.crud.notify('状态必须是已分配的才能取消拣货', CRUD.NOTIFICATION_TYPE.ERROR)
}
},
//
@ -924,11 +943,11 @@ export default {
data_.pickTicketId = data.id
pickWhole(data.id).then(res => {
this.pickConfirmTF = false
this.$message.success(res)
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
} else {
this.$message.error('状态必须是已分配的才能拣货确认')
this.crud.notify('状态必须是已分配的才能拣货确认', CRUD.NOTIFICATION_TYPE.ERROR)
}
},
//
@ -940,11 +959,11 @@ export default {
}
pickBatch(list).then(res => {
this.pickConfirmTF = false
this.$message.success(res)
this.gbOnOff();
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.gbOnOff()
})
} else {
this.$message.error('你未选着数据')
this.crud.notif('你未选着数据', CRUD.NOTIFICATION_TYPE.ERROR)
}
},
//
@ -960,12 +979,12 @@ export default {
data_.taskId.push(dataKey.id)
}
pickSingle(data_).then(res => {
this.gbOnOff();
this.$message.success(res)
this.gbOnOff()
this.crud.notif(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.oneTf = false
})
} else {
this.$message.error('你未选着数据或选着了多个')
this.crud.notif('你未选着数据或选着了多个', CRUD.NOTIFICATION_TYPE.ERROR)
}
} else {
return false
@ -986,7 +1005,7 @@ export default {
data_.pickTicketId = data.id
pickForXpp(data_).then(res => {
this.pickConfirmOnOffM(data)
this.$message.success('操作成功')
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.xppOnOf = false
this.pickTicketButton.xppQRCode = null
this.pickTicketButton.stockCode = null
@ -1001,9 +1020,9 @@ export default {
solePickGoodsOnOff() {
if (this.tsakSelectData.length !== 1) {
if (this.tsakSelectData.length > 0) {
this.$message.error('你选着的数据大于1条')
this.crud.notify('你选着的数据大于1条', CRUD.NOTIFICATION_TYPE.ERROR)
} else {
this.$message.error('你未选着数据')
this.crud.notify('你未选着数据', CRUD.NOTIFICATION_TYPE.ERROR)
}
} else {
// this.pickConfirmTF = false
@ -1024,7 +1043,7 @@ export default {
pickingCancel(data_).then(res => {
this.taskLogTF = false
this.crud.toQuery()
this.$message.success(res)
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
//
@ -1040,11 +1059,10 @@ export default {
pickingCancel(data_).then(res => {
this.taskLogTF = false
this.crud.toQuery()
this.$message.success(res)
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
})
} else {
this.$message.error('你未选着数据')
this.crud.notify('你未选着数据', CRUD.NOTIFICATION_TYPE.ERROR)
}
},
handleCancle() {
@ -1059,18 +1077,18 @@ export default {
if (data[0].status === 'ALLOCATE') {
shipmentRegistration(data[0].id).then(res => {
this.crud.toQuery()
this.$message.success("发货登记成功")
this.crud.notify('发货登记成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
} else {
this.$message.error("只有已匹配状态 才能进行直接发货")
this.crud.notify('只有已匹配状态 才能进行直接发货', CRUD.NOTIFICATION_TYPE.ERROR)
}
},
gbM() {
this.viewDetailsOnOff=false;
this.viewDetailsOnOff = false
this.crud.toQuery()
this.key=this.key+1;
this.key = this.key + 1
},
}
}
}
</script>

View File

@ -26,6 +26,7 @@
v-for="item in billTypeOptions"
:key="item.id"
:label="item.name"
v-if="item.name!='其他入库' "
:value="item"
/>
</el-select>
@ -47,7 +48,7 @@
<div style="width: 100%;position: relative;height: 45px;">
<div style="width: 50%;float: left">
<el-form-item label="单号" prop="code">
<el-input :disabled="true" v-model="pickTicketFromSave.code" style="width: 100%"/>
<el-input disabled="true" v-model="pickTicketFromSave.code" style="width: 100%"/>
</el-form-item>
</div>
<div style="width: 50%;float: right">
@ -60,6 +61,7 @@
<div style="width: 50%;float: left">
<el-button type="primary" :disabled="pickTicketFromSave.code != null"
@click="submitFromPockTicket(pickTicketFromSave)"
size="mini"
>提交
</el-button>
</div>
@ -403,7 +405,7 @@ export default {
let selectDate = { areaName: null }
selectDate.areaName = data
if (selectDate.areaName === null) {
this.$message.error('主表未绑定库区')
this.crud.notify('主表未绑定库区', CRUD.NOTIFICATION_TYPE.ERROR)
}
getOutPointAll(selectDate).then(res => {
this.pointOptions = res.map(function(obj) {
@ -421,11 +423,7 @@ export default {
getItemAll().then(res => {
this.itemOptions = res
}).catch(e => {
this.$message({
showClose: true,
message: '物料加载失败',
type: 'error'
})
this.crud.notify('物料加载失败', CRUD.NOTIFICATION_TYPE.ERROR)
})
//
getAreas().then(res => {
@ -477,7 +475,7 @@ export default {
this.pickTicketId = res.id
//
this.pickTicketTF()
this.$message.success('添加成功')
this.crud.notify('添加成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.crud.toQuery()
this.$router.push({ path: '/business-pick/viewPickTicket', query: { ids: res.id, billTypeCode: 'QTCK' } })
})