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

@ -5,16 +5,17 @@
<!-- 查询操作--> <!-- 查询操作-->
<el-form ref="form" :inline="true" :model="form" label-width="70px"> <el-form ref="form" :inline="true" :model="form" label-width="70px">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<!-- <el-input v-model="query.itemCode" clearable placeholder="请输入物料编码" style="width: 140px;"--> <!-- <el-input v-model="query.itemCode" clearable placeholder="请输入物料编码" style="width: 140px;"-->
<!-- class="filter-item"--> <!-- class="filter-item"-->
<!-- @keyup.enter.native="crud.toQuery"/>--> <!-- @keyup.enter.native="crud.toQuery"/>-->
<el-select v-model="query.itemCode" placeholder="物料代码" style="width: 140px;" class="filter-item"> <el-select v-model="query.itemCode" placeholder="物料代码" style="width: 140px;" class="filter-item">
<el-option <el-option
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
v-for="item in this.itemListData" v-for="item in this.itemListData"
:key="item.code" :key="item.code"
:label="item.code" :label="item.code"
:value="item.code"> :value="item.code"
>
<span style="float: left">{{ item.code }}</span> <span style="float: left">{{ item.code }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
</el-option> </el-option>
@ -24,16 +25,18 @@
<el-form-item label="物料名称"> <el-form-item label="物料名称">
<el-input v-model="query.itemName" clearable placeholder="请输入物料名称" style="width: 140px;" <el-input v-model="query.itemName" clearable placeholder="请输入物料名称" style="width: 140px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery"/> @keyup.enter.native="crud.toQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="任务号"> <el-form-item label="任务号">
<el-input v-model="query.po" clearable placeholder="请输入任务号" style="width: 140px;" class="filter-item" <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> </el-form-item>
<date-range-picker v-model="query.createTime" class="date-item" style="width: 100px" /> <date-range-picker v-model="query.createTime" class="date-item" style="width: 100px"/>
<!-- 搜索--> <!-- 搜索-->
<rrOperation :crud="crud"/> <rrOperation :crud="crud"/>
<!-- 重置--> <!-- 重置-->
@ -87,7 +90,6 @@
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
:loading="crud.delAllLoading" :loading="crud.delAllLoading"
:disabled="show_jh"
@click="getPickTask(crud.selections[0].id)" @click="getPickTask(crud.selections[0].id)"
> >
拣货确认 拣货确认
@ -97,7 +99,8 @@
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small"
style="width: 100%;" style="width: 100%;"
height="58vh" height="58vh"
@selection-change="selectionChangeHandlerTwo" border> @selection-change="selectionChangeHandlerTwo" border
>
<el-table-column type="selection" width="50"/> <el-table-column type="selection" width="50"/>
<el-table-column prop="id" label="序号"/> <el-table-column prop="id" label="序号"/>
<el-table-column prop="po" width="120" label="任务号"/> <el-table-column prop="po" width="120" label="任务号"/>
@ -124,23 +127,25 @@
<el-table-column prop="createBy" label="创建人"/> <el-table-column prop="createBy" label="创建人"/>
<el-table-column prop="createTime" width="150px" label="创建时间"> <el-table-column prop="createTime" width="150px" label="创建时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{getFormatDate(scope.row.createTime)}} {{ getFormatDate(scope.row.createTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" :disabled="scope.row.status!='OPEN'" type="primary" icon="el-icon-edit" <el-button size="mini" :disabled="scope.row.status!='OPEN'" type="primary" icon="el-icon-edit"
@click="editPick(scope.row)"/> @click="editPick(scope.row)"
/>
<template> <template>
<el-popconfirm <el-popconfirm
title="确定删除吗?" title="确定删除吗?"
icon='el-icon-delete' icon="el-icon-delete"
icon-color='red' icon-color="red"
@confirm="deletePick(scope.row)" @confirm="deletePick(scope.row)"
> >
<el-button slot="reference" :disabled="scope.row.status!='OPEN'" size="mini" type="danger" <el-button slot="reference" :disabled="scope.row.status!='OPEN'" size="mini" type="danger"
icon="el-icon-delete"/> icon="el-icon-delete"
/>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -152,11 +157,13 @@
<!--表单组件--> <!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" <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 ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="物料" prop="item"> <el-form-item label="物料" prop="item">
<el-select v-model="form.item" @focus="getItem" filterable placeholder="请选择物料" value-key="id" <el-select v-model="form.item" @focus="getItem" filterable placeholder="请选择物料" value-key="id"
style="width: 370px;"> style="width: 370px;"
>
<el-option <el-option
v-for="item in items" v-for="item in items"
:key="item.id" :key="item.id"
@ -191,14 +198,14 @@
<script> <script>
import crudPickDetail from '@/api/pickDetail' import crudPickDetail from '@/api/pickDetail'
import CRUD, {presenter, header, form, crud} from '@crud/crud' import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation.vue' import rrOperation from '@crud/RR.operation.vue'
import crudOperation from '@crud/CRUD.operation.vue' import crudOperation from '@crud/CRUD.operation.vue'
import udOperation from '@crud/UD.operation.vue' import udOperation from '@crud/UD.operation.vue'
import pagination from '@crud/Pagination.vue' import pagination from '@crud/Pagination.vue'
import {getItems, getItemsList} from "@/api/item" import { getItems, getItemsList } from '@/api/item'
import PickTask from "@/views/business-pick/pickDetail/pickTicketTask.vue" import PickTask from '@/views/business-pick/pickDetail/pickTicketTask.vue'
import DateRangePicker from "@/components/DateRangePicker/index.vue"; import DateRangePicker from '@/components/DateRangePicker/index.vue'
import { formatDate } from '@/utils/commonUtils' import { formatDate } from '@/utils/commonUtils'
const defaultForm = { const defaultForm = {
@ -233,7 +240,7 @@ const defaultForm = {
} }
export default { export default {
name: 'PickDetail', name: 'PickDetail',
components: {DateRangePicker, PickTask, pagination, crudOperation, rrOperation, udOperation}, components: { DateRangePicker, PickTask, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
dicts: ['pick_status'], dicts: ['pick_status'],
cruds() { cruds() {
@ -242,7 +249,7 @@ export default {
url: 'api/pickDetail', url: 'api/pickDetail',
idField: 'id', idField: 'id',
sort: 'id,desc', sort: 'id,desc',
crudMethod: {...crudPickDetail}, crudMethod: { ...crudPickDetail },
optShow: { optShow: {
add: true, add: true,
edit: false, edit: false,
@ -266,14 +273,14 @@ export default {
}, },
rules: { rules: {
item: [ item: [
{required: true, message: '物料必填', trigger: 'blur'} { required: true, message: '物料必填', trigger: 'blur' }
] ]
}, },
queryTypeOptions: [ queryTypeOptions: [
{key: 'itemCode', display_name: '物料编码'}, { key: 'itemCode', display_name: '物料编码' },
{key: 'itemName', display_name: '物料名称'}, { key: 'itemName', display_name: '物料名称' },
{key: 'po', display_name: '任务号'}, { key: 'po', display_name: '任务号' },
{key: 'status', display_name: '状态'} { key: 'status', display_name: '状态' }
], ],
itemListData: [] itemListData: []
} }
@ -281,8 +288,8 @@ export default {
}, },
mounted() { mounted() {
// //
this.getItem(); this.getItem()
this.itemDataGet(); this.itemDataGet()
}, },
methods: { methods: {
// false // false
@ -291,7 +298,7 @@ export default {
}, },
getItem() { getItem() {
getItems({}).then(res => { getItems({}).then(res => {
this.items = res.content.map(function (obj) { this.items = res.content.map(function(obj) {
if (obj.hasChildren) { if (obj.hasChildren) {
obj.children = null obj.children = null
} }
@ -303,36 +310,35 @@ export default {
selectionChangeHandlerTwo(val) { selectionChangeHandlerTwo(val) {
this.crud.selections = val this.crud.selections = val
if (this.crud.selections.length == 0) { if (this.crud.selections.length == 0) {
this.show_jh = true; this.show_jh = true
this.show_fp = true; this.show_fp = true
this.show_cancelfp = true; this.show_cancelfp = true
return; return
} }
const status = []; const status = []
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
status.push(this.crud.selections[i].status) status.push(this.crud.selections[i].status)
} }
if (this.isAllEqual(status) && status[0] == "OPEN") { if (this.isAllEqual(status) && status[0] == 'OPEN') {
this.show_jh = true; this.show_jh = true
this.show_fp = false; this.show_fp = false
return; return
} }
if (this.isAllEqual(status) && status[0] == "ALLOCATE") { if (this.isAllEqual(status) && status[0] == 'ALLOCATE') {
this.show_jh = true; this.show_jh = true
this.show_fp = true; this.show_fp = true
this.show_cancelfp = false; this.show_cancelfp = false
} }
// //
if (this.crud.selections.length == 1 && this.crud.selections[0].orderQty == this.crud.selections[0].allocatedQty) { if (this.crud.selections.length == 1 && this.crud.selections[0].orderQty == this.crud.selections[0].allocatedQty) {
this.show_jh = false; this.show_jh = true;
this.show_fp = true; this.show_fp = true
return; return
} }
}, },
allocate(datas) { allocate(datas) {
this.$confirm(`选中的${datas.length}条数据分配确认?`, '提示', { this.$confirm(`选中的${datas.length}条数据分配确认?`, '提示', {
@ -341,21 +347,21 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const ids = []; const ids = []
for (let i = 0; i < datas.length; i++) { for (let i = 0; i < datas.length; i++) {
ids.push(datas[i].id) ids.push(datas[i].id)
} }
crudPickDetail.allocate(ids).then(res => { crudPickDetail.allocate(ids).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS); this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery(); this.crud.toQuery()
}).catch(() => { }).catch(() => {
}) })
}).catch(() => { }).catch(() => {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS); this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}); })
}, },
cancelAllocate(datas) { cancelAllocate(datas) {
this.$confirm(`选中的${datas.length}条数据取消分配确认?`, '提示', { this.$confirm(`选中的${datas.length}条数据取消分配确认?`, '提示', {
@ -364,46 +370,46 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const ids = []; const ids = []
for (let i = 0; i < datas.length; i++) { for (let i = 0; i < datas.length; i++) {
ids.push(datas[i].id) ids.push(datas[i].id)
} }
crudPickDetail.cancelAllocate(ids).then(res => { crudPickDetail.cancelAllocate(ids).then(res => {
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS); this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery(); this.crud.toQuery()
}).catch(() => { }).catch(() => {
}) })
}).catch(() => { }).catch(() => {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS); this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}); })
}, },
getPickTask(id) { getPickTask(id) {
this.$refs.pickTask.dialog = true this.$refs.pickTask.dialog = true
this.$refs.pickTask.queryPickTask(id) this.$refs.pickTask.queryPickTask(id)
}, },
shuaxin() { shuaxin() {
this.crud.toQuery(); this.crud.toQuery()
}, },
clickChange(lab) { clickChange(lab) {
if (lab === "全部") { if (lab === '全部') {
this.crud.resetQuery(); this.crud.resetQuery()
this.crud.toQuery(); this.crud.toQuery()
} else if (lab === "打开") { } else if (lab === '打开') {
this.query.status = 'OPEN' this.query.status = 'OPEN'
this.crud.toQuery(); this.crud.toQuery()
} else if (lab === "已分配") { } else if (lab === '已分配') {
this.query.status = 'ALLOCATE' this.query.status = 'ALLOCATE'
this.crud.toQuery(); this.crud.toQuery()
} else if (lab === "拣货完成") { } else if (lab === '拣货完成') {
this.query.status = 'PICK_ALL' this.query.status = 'PICK_ALL'
this.crud.toQuery(); this.crud.toQuery()
} }
}, },
resetQuery() { resetQuery() {
this.radio3 = '全部'; this.radio3 = '全部'
this.crud.resetQuery() this.crud.resetQuery()
}, },
editPick(data) { editPick(data) {
@ -413,29 +419,29 @@ export default {
this.crud.doDelete(data) this.crud.doDelete(data)
}, isAllEqual(array) { }, isAllEqual(array) {
if (array.length > 0) { if (array.length > 0) {
return !array.some(function (value, index) { return !array.some(function(value, index) {
return value !== array[0]; return value !== array[0]
}); })
} else { } else {
return true; return true
} }
}, },
// //
itemDataGet() { itemDataGet() {
getItemsList().then(res => { getItemsList().then(res => {
this.itemListData = res; this.itemListData = res
}).catch(e => { }).catch(e => {
this.$message({ this.$message({
showClose: true, showClose: true,
message: '物料加载失败', message: '物料加载失败',
type: 'error' type: 'error'
}); })
}) })
}, },
// //
getFormatDate(data){ getFormatDate(data) {
return formatDate(data); return formatDate(data)
}, }
} }
} }
</script> </script>

View File

@ -6,7 +6,7 @@
<!-- 搜索 --> <!-- 搜索 -->
<!-- <label class="el-form-item-label">出库库区</label>--> <!-- <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-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 <el-option
style="width: 180px" style="width: 180px"
v-for="item in areaOptions" v-for="item in areaOptions"
@ -37,7 +37,9 @@
</div> </div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" :tableKey="this.$options.name"> <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>
<el-button <el-button
@ -69,7 +71,7 @@
class="filter-item" class="filter-item"
type="danger" type="danger"
size="mini" 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])" @click="pickConfirmOnOffM(crud.selections[0])"
v-permission="permission.pickConfirm" v-permission="permission.pickConfirm"
> >
@ -96,9 +98,10 @@
@click="pickOutConfirmM(crud.selections)" @click="pickOutConfirmM(crud.selections)"
v-permission="permission.pickOutConfirm" v-permission="permission.pickOutConfirm"
> >
出库确认 发运确认
</el-button> </el-button>
<el-button <el-button
v-if="false"
slot="right" slot="right"
class="filter-item" class="filter-item"
type="warning" type="warning"
@ -110,6 +113,7 @@
查看详情 查看详情
</el-button> </el-button>
<el-button <el-button
v-if="false"
slot="right" slot="right"
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -122,6 +126,7 @@
打印留样接收单 打印留样接收单
</el-button> </el-button>
<el-button <el-button
v-if="false"
slot="right" slot="right"
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -133,16 +138,16 @@
> >
打印留样回传单 打印留样回传单
</el-button> </el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- slot="right"--> <!-- slot="right"-->
<!-- class="filter-item"--> <!-- class="filter-item"-->
<!-- type="danger"--> <!-- type="danger"-->
<!-- size="mini"--> <!-- size="mini"-->
<!-- :disabled="crud.selections.length !== 1"--> <!-- :disabled="crud.selections.length !== 1"-->
<!-- @click="shipmentRegistrationM(crud.selections)"--> <!-- @click="shipmentRegistrationM(crud.selections)"-->
<!-- >--> <!-- >-->
<!-- 发货登记--> <!-- 发货登记-->
<!-- </el-button>--> <!-- </el-button>-->
</crudOperation> </crudOperation>
<!-- 取消拣货弹窗 --> <!-- 取消拣货弹窗 -->
@ -177,7 +182,7 @@
<el-table-column prop="item.name" label="物料名称"/> <el-table-column prop="item.name" label="物料名称"/>
<el-table-column prop="dstPoint.code" label="目标点位编码"/> <el-table-column prop="dstPoint.code" label="目标点位编码"/>
<el-table-column prop="moveQty" label="拣货数量"/> <el-table-column prop="moveQty" label="拣货数量"/>
<!-- <el-table-column prop="dstStockCode" label="目标托盘号"/>--> <!-- <el-table-column prop="dstStockCode" label="目标托盘号"/>-->
<el-table-column prop="srcStockCode" label="现品票" :show-overflow-tooltip="true"/> <el-table-column prop="srcStockCode" label="现品票" :show-overflow-tooltip="true"/>
<el-table-column prop="itemKey.propC1" label="批次号"/> <el-table-column prop="itemKey.propC1" label="批次号"/>
<el-table-column prop="createTime" label="创建时间"/> <el-table-column prop="createTime" label="创建时间"/>
@ -201,10 +206,10 @@
> >
<el-input v-model.number="pickTicketButton.onePickConfirmNumber" clearable></el-input> <el-input v-model.number="pickTicketButton.onePickConfirmNumber" clearable></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="目标托盘号:" prop="stockCode"--> <!-- <el-form-item label="目标托盘号:" prop="stockCode"-->
<!-- >--> <!-- >-->
<!-- <el-input v-model.number="pickTicketButton.stockCode" clearable></el-input>--> <!-- <el-input v-model.number="pickTicketButton.stockCode" clearable></el-input>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-button type="primary" @click="solePickGoods(crud.selections[0])" <el-button type="primary" @click="solePickGoods(crud.selections[0])"
style="float: right;padding-left: 10px" style="float: right;padding-left: 10px"
>确认 >确认
@ -228,10 +233,10 @@
v-model.trim="pickTicketButton.xppQRCode" clearable v-model.trim="pickTicketButton.xppQRCode" clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="托盘号:" prop="xppQRCode">--> <!-- <el-form-item label="托盘号:" prop="xppQRCode">-->
<!-- <el-input type="text" placeholder="托盘号" v-model.trim="pickTicketButton.stockCode" clearable--> <!-- <el-input type="text" placeholder="托盘号" v-model.trim="pickTicketButton.stockCode" clearable-->
<!-- ></el-input>--> <!-- ></el-input>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="备货人:" prop="xppQRCode" v-if="false"> <el-form-item label="备货人:" prop="xppQRCode" v-if="false">
<el-input type="text" placeholder="备货人" v-model.trim="pickTicketButton.bhr" clearable <el-input type="text" placeholder="备货人" v-model.trim="pickTicketButton.bhr" clearable
></el-input> ></el-input>
@ -253,6 +258,7 @@
整单拣货 整单拣货
</el-button> </el-button>
<el-button <el-button
v-if="false"
slot="right" slot="right"
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -262,6 +268,7 @@
批量拣货 批量拣货
</el-button> </el-button>
<el-button <el-button
v-if="false"
slot="right" slot="right"
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -271,6 +278,7 @@
单一拣货 单一拣货
</el-button> </el-button>
<el-button <el-button
v-if="false"
slot="right" slot="right"
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -284,11 +292,11 @@
style="width: 100%;margin-top: 10px;" border @selection-change="taskSelection" style="width: 100%;margin-top: 10px;" border @selection-change="taskSelection"
> >
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55"/>
<!-- <el-table-column :show-overflow-tooltip="true" prop="itemCode" label="任务号">--> <!-- <el-table-column :show-overflow-tooltip="true" prop="itemCode" label="任务号">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <div>{{ scope.row.pickDetail.po }}</div>--> <!-- <div>{{ scope.row.pickDetail.po }}</div>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column :show-overflow-tooltip="true" prop="itemCode" label="物料编码"> <el-table-column :show-overflow-tooltip="true" prop="itemCode" label="物料编码">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.item.code }}</div> <div>{{ scope.row.item.code }}</div>
@ -420,7 +428,8 @@
<el-button type="primary" @click="submitFrom(pickTicketFrom)"></el-button> <el-button type="primary" @click="submitFrom(pickTicketFrom)"></el-button>
</div> </div>
</el-dialog> </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" :select-data="crud.selections[0]" @queryDA="queryData" :key="key" :show_fp="show_fp"
></OutParticulars> ></OutParticulars>
@ -478,6 +487,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" @click="pickDetailRouter(scope.row)" <el-button type="primary" @click="pickDetailRouter(scope.row)"
style="float: right" style="float: right"
size="mini"
>明细 >明细
</el-button> </el-button>
<udOperation <udOperation
@ -515,9 +526,9 @@ import { formatDate } from '@/utils/commonUtils'
import { queryTaskData, queryTaskLog } from '@/api/task' import { queryTaskData, queryTaskLog } from '@/api/task'
import crudPickDetail from '@/api/pickDetail' import crudPickDetail from '@/api/pickDetail'
import OutParticulars from '@/views/business-pick/pickTicket/OutParticulars.vue' import OutParticulars from '@/views/business-pick/pickTicket/OutParticulars.vue'
import {pickOutConfirm} from "@/api/pickOut"; import { pickOutConfirm } from '@/api/pickOut'
import {xppHyIn} from "@/api/xppRecord"; import { xppHyIn } from '@/api/xppRecord'
import {mapGetters} from "vuex"; import { mapGetters } from 'vuex'
const defaultForm = { const defaultForm = {
id: null, id: null,
@ -576,11 +587,11 @@ export default {
optShow: { optShow: {
add: false, add: false,
edit: false, edit: false,
del: true, del: false,
reset: false, reset: false,
download: false download: false
}, },
query: { billTypeCode: ['QTCK','LYCK'] }, query: { billTypeCode: ['QTCK', 'LYCK'] },
queryOnPresenterCreated: true queryOnPresenterCreated: true
}) })
}, },
@ -681,7 +692,7 @@ export default {
// //
xppQRCode: null, xppQRCode: null,
// //
bhr:null, bhr: null
}, },
//task //task
tsakSelectData: [], tsakSelectData: [],
@ -694,19 +705,19 @@ export default {
dialogTableHight: 200, dialogTableHight: 200,
//viewDetails //viewDetails
// //
viewDetailsOnOff:false, viewDetailsOnOff: false,
// //
viewDetailsDatas:{ viewDetailsDatas: {
// data_pick_detail // data_pick_detail
outboundDetailsData:[], outboundDetailsData: [],
// data_task // data_task
allocationRecords:[], allocationRecords: [],
// data_task_log // data_task_log
pickingRecords:[] pickingRecords: []
}, },
// //
activeName: 'first', activeName: 'first',
key:1 key: 1
} }
}, },
computed: { computed: {
@ -758,11 +769,17 @@ export default {
this.billTypeOptions = res this.billTypeOptions = res
}) })
}, },
showReport(data){ 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){ 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() { getCodeNoM() {
// //
@ -782,7 +799,7 @@ export default {
}, },
submitFrom(data) { submitFrom(data) {
crudPickTicket.add(data).then(res => { crudPickTicket.add(data).then(res => {
this.$message.success('新增成功') this.crud.notify('新增成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.saveOnOff = false this.saveOnOff = false
this.pickTicketFrom = defaultForm this.pickTicketFrom = defaultForm
this.crud.toQuery() this.crud.toQuery()
@ -836,11 +853,13 @@ export default {
ids.push(datas[i].id) ids.push(datas[i].id)
} }
crudPickDetail.allocatePick(ids).then(res => { crudPickDetail.allocatePick(ids).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS) if (res.status = 200) {
this.crud.toQuery() this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => { this.crud.toQuery()
this.crud.notify('分配失败!', CRUD.NOTIFICATION_TYPE.ERROR) } else {
this.crud.toQuery() this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
this.crud.toQuery()
}
}) })
}).catch(() => { }).catch(() => {
@ -870,29 +889,29 @@ export default {
for (const datum of data) { for (const datum of data) {
list.push(datum.id) list.push(datum.id)
} }
pickOutConfirm(list).then(res=>{ pickOutConfirm(list).then(res => {
this.crud.toQuery() this.crud.toQuery()
this.$message.success(res) this.crud.notif(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
}) })
}, },
// //
viewDetailsM(data){// viewDetailsM(data) {//
// //
// console.log(data) // console.log(data)
// //
let data_ = {pickTicketId:null}; let data_ = { pickTicketId: null }
data_.pickTicketId=data.id; data_.pickTicketId = data.id
crudPickTicket.queryDetails(data.id).then(res=>{ 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) { cancelPick(data) {
@ -905,30 +924,30 @@ export default {
data_.pickConfirmNo = 4 data_.pickConfirmNo = 4
data_.pickTicketId = data.id data_.pickTicketId = data.id
pickingOperations(data_).then(res => { pickingOperations(data_).then(res => {
this.$message.success(res) this.crud.notify('取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery() this.crud.toQuery()
}) })
} else { } else {
this.$message.error('该单据有已经拣货确认的数据') this.crud.notify('该单据有已经拣货确认的数据', CRUD.NOTIFICATION_TYPE.ERROR)
} }
}) })
} else { } else {
this.$message.error('状态必须是已分配的才能取消拣货') this.crud.notify('状态必须是已分配的才能取消拣货', CRUD.NOTIFICATION_TYPE.ERROR)
} }
}, },
// //
singlePick(data) { singlePick(data) {
if (data.status === 'ALLOCATE'||data.status ==='PICKUP') { if (data.status === 'ALLOCATE' || data.status === 'PICKUP') {
let data_ = this.pickTicketButton let data_ = this.pickTicketButton
data_.pickConfirmNo = 1 data_.pickConfirmNo = 1
data_.pickTicketId = data.id data_.pickTicketId = data.id
pickWhole(data.id).then(res => { pickWhole(data.id).then(res => {
this.pickConfirmTF = false this.pickConfirmTF = false
this.$message.success(res) this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery() this.crud.toQuery()
}) })
} else { } else {
this.$message.error('状态必须是已分配的才能拣货确认') this.crud.notify('状态必须是已分配的才能拣货确认', CRUD.NOTIFICATION_TYPE.ERROR)
} }
}, },
// //
@ -940,11 +959,11 @@ export default {
} }
pickBatch(list).then(res => { pickBatch(list).then(res => {
this.pickConfirmTF = false this.pickConfirmTF = false
this.$message.success(res) this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.gbOnOff(); this.gbOnOff()
}) })
} else { } else {
this.$message.error('你未选着数据') this.crud.notif('你未选着数据', CRUD.NOTIFICATION_TYPE.ERROR)
} }
}, },
// //
@ -960,12 +979,12 @@ export default {
data_.taskId.push(dataKey.id) data_.taskId.push(dataKey.id)
} }
pickSingle(data_).then(res => { pickSingle(data_).then(res => {
this.gbOnOff(); this.gbOnOff()
this.$message.success(res) this.crud.notif(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.oneTf = false this.oneTf = false
}) })
} else { } else {
this.$message.error('你未选着数据或选着了多个') this.crud.notif('你未选着数据或选着了多个', CRUD.NOTIFICATION_TYPE.ERROR)
} }
} else { } else {
return false return false
@ -986,7 +1005,7 @@ export default {
data_.pickTicketId = data.id data_.pickTicketId = data.id
pickForXpp(data_).then(res => { pickForXpp(data_).then(res => {
this.pickConfirmOnOffM(data) this.pickConfirmOnOffM(data)
this.$message.success('操作成功') this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.xppOnOf = false this.xppOnOf = false
this.pickTicketButton.xppQRCode = null this.pickTicketButton.xppQRCode = null
this.pickTicketButton.stockCode = null this.pickTicketButton.stockCode = null
@ -1001,9 +1020,9 @@ export default {
solePickGoodsOnOff() { solePickGoodsOnOff() {
if (this.tsakSelectData.length !== 1) { if (this.tsakSelectData.length !== 1) {
if (this.tsakSelectData.length > 0) { if (this.tsakSelectData.length > 0) {
this.$message.error('你选着的数据大于1条') this.crud.notify('你选着的数据大于1条', CRUD.NOTIFICATION_TYPE.ERROR)
} else { } else {
this.$message.error('你未选着数据') this.crud.notify('你未选着数据', CRUD.NOTIFICATION_TYPE.ERROR)
} }
} else { } else {
// this.pickConfirmTF = false // this.pickConfirmTF = false
@ -1024,7 +1043,7 @@ export default {
pickingCancel(data_).then(res => { pickingCancel(data_).then(res => {
this.taskLogTF = false this.taskLogTF = false
this.crud.toQuery() 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 => { pickingCancel(data_).then(res => {
this.taskLogTF = false this.taskLogTF = false
this.crud.toQuery() this.crud.toQuery()
this.$message.success(res) this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
}) })
} else { } else {
this.$message.error('你未选着数据') this.crud.notify('你未选着数据', CRUD.NOTIFICATION_TYPE.ERROR)
} }
}, },
handleCancle() { handleCancle() {
@ -1054,23 +1072,23 @@ export default {
this.crud.toQuery() this.crud.toQuery()
}, },
// //
shipmentRegistrationM(data){ shipmentRegistrationM(data) {
// //
if (data[0].status === 'ALLOCATE'){ if (data[0].status === 'ALLOCATE') {
shipmentRegistration(data[0].id).then(res=>{ shipmentRegistration(data[0].id).then(res => {
this.crud.toQuery() this.crud.toQuery()
this.$message.success("发货登记成功") this.crud.notify('发货登记成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}) })
}else { } else {
this.$message.error("只有已匹配状态 才能进行直接发货") this.crud.notify('只有已匹配状态 才能进行直接发货', CRUD.NOTIFICATION_TYPE.ERROR)
} }
}, },
gbM(){ gbM() {
this.viewDetailsOnOff=false; this.viewDetailsOnOff = false
this.crud.toQuery() this.crud.toQuery()
this.key=this.key+1; this.key = this.key + 1
}, }
} }
} }
</script> </script>

View File

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