Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling

dev-scheduling
ysn 2 months ago
commit 6e8b12e2a6
  1. 9
      src/api/storeManagement/matureSubmission.js
  2. 1
      src/views/inboundOutboundManagement/components/addEditDialog.vue
  3. 319
      src/views/inboundOutboundManagement/otherIssuing/index.vue
  4. 557
      src/views/inboundOutboundManagement/otherIssuing/otherIssuingDailog.vue
  5. 7
      src/views/orderManagement/components/exception/dataMissing.vue
  6. 1
      src/views/productionManagement/components/coatingMater/assayedContent.vue
  7. 4
      src/views/system/menu.vue
  8. 164
      src/views/warehouseManagement/materialExpiration/InspectionDialog.vue
  9. 208
      src/views/warehouseManagement/materialExpiration/matureSubmission.vue

@ -9,3 +9,12 @@ export const getList = params => {
params params
}); });
}; };
// 确认送检 stExpireSubmission/submit
export const save = params => {
return request({
url: '/api/blade-wms/stExpireSubmission/submit',
method: 'post',
data: params
});
};

@ -402,6 +402,7 @@ export default {
console.log('index--------', index); console.log('index--------', index);
getGlassPieList({ getGlassPieList({
woCode: e.target.value, woCode: e.target.value,
goodsCode:this.tableData[index].goodsCode,
}).then(res => { }).then(res => {
console.log('res--------', res); console.log('res--------', res);
}); });

@ -1,26 +1,58 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" <avue-crud
v-model:page="page" ref="crud" :option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
v-model:search="searchForm" v-model:search="searchForm"
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @row-del="rowDel"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange"
:before-open="beforeOpen"> @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
:before-open="beforeOpen"
>
<template #menu-left> <template #menu-left>
<el-input v-model="checkCode" @keyup.enter.native="changeCode" style="width: 240px; margin-right: 24px" placeholder="请扫描条形码" /> <el-input
v-model="checkCode"
@keyup.enter.native="changeCode"
style="width: 240px; margin-right: 24px"
placeholder="请扫描条形码"
/>
<el-button type="primary" @click="addView()">新增</el-button> <el-button type="primary" @click="addView()">新增</el-button>
</template> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="text" @click="handeDetails(scope.row)">详情</el-button> <el-button type="text" @click="handeDetails(scope.row)">详情</el-button>
<el-button type="text" v-if="scope.row.approvalStatus === 0" @click="handeExamine(scope.row)">审批</el-button> <el-button
type="text"
v-if="scope.row.approvalStatus === 0"
@click="handeExamine(scope.row)"
>审批</el-button
>
</template> </template>
<!-- <template #menu="scope"> <!-- <template #menu="scope">
<el-button type="text" size="mini" @click="handle(scope.row.tbId)">处理</el-button> <el-button type="text" size="mini" @click="handle(scope.row.tbId)">处理</el-button>
</template> --> </template> -->
</avue-crud> </avue-crud>
<otherIssuingDailog v-if="openShow" :showDialog="openShow" :checkCode="checkCode" @closeDialog="closeDialog"></otherIssuingDailog> <otherIssuingDailog
<detailsDialog v-if="showDetail" :showDialog="showDetail" :id="checkId" @closeDialog="closeDialog"></detailsDialog> v-if="openShow"
:showDialog="openShow"
:checkCode="checkCode"
@closeDialog="closeDialog"
></otherIssuingDailog>
<detailsDialog
v-if="showDetail"
:showDialog="showDetail"
:id="checkId"
@closeDialog="closeDialog"
></detailsDialog>
<el-dialog width="30%" v-model="approveDialog" title="审批"> <el-dialog width="30%" v-model="approveDialog" title="审批">
<el-form :model="auditForm" :rules="auditRules" ref="auditForm"> <el-form :model="auditForm" :rules="auditRules" ref="auditForm">
<el-form-item label="是否审核通过" prop="approvalResult"> <el-form-item label="是否审核通过" prop="approvalResult">
@ -38,8 +70,8 @@
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList,getDetail,approve} from "@/api/storeManagement/otherIssuing" import { getList, getDetail, approve } from '@/api/storeManagement/otherIssuing';
import otherIssuingDailog from "./otherIssuingDailog.vue"; import otherIssuingDailog from './otherIssuingDailog.vue';
import detailsDialog from './detailsDialog.vue'; import detailsDialog from './detailsDialog.vue';
export default { export default {
components: { components: {
@ -51,13 +83,13 @@ export default {
openShow: false, openShow: false,
checkId: '', checkId: '',
showDetail: false, showDetail: false,
checkCode:"", checkCode: '',
selectionList: [], selectionList: [],
query: {}, query: {},
searchForm: {}, searchForm: {},
loading: false, loading: false,
option: { option: {
height: "auto", height: 'auto',
calcHeight: 32, calcHeight: 32,
tip: false, tip: false,
// size: "medium", // size: "medium",
@ -73,12 +105,12 @@ export default {
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
addBtn: false, addBtn: false,
editBtnText: "修改", editBtnText: '修改',
editBtn: false, editBtn: false,
viewBtnIcon: " ", viewBtnIcon: ' ',
delBtnIcon: " ", delBtnIcon: ' ',
editBtnIcon: " ", editBtnIcon: ' ',
viewBtnText: "详情", viewBtnText: '详情',
labelWidth: 120, labelWidth: 120,
menuWidth: 120, menuWidth: 120,
dialogWidth: 1200, dialogWidth: 1200,
@ -91,22 +123,22 @@ export default {
excelBtn: true, excelBtn: true,
columnSort: true, columnSort: true,
index: true, index: true,
searchLabelPosition: "left", searchLabelPosition: 'left',
searchLabelWidth: "auto", searchLabelWidth: 'auto',
searchGutter: 24, searchGutter: 24,
searchSpan: 6, searchSpan: 6,
menuAlign: "center", menuAlign: 'center',
gridBtn: false, gridBtn: false,
searchMenuPosition: "right", searchMenuPosition: 'right',
addBtnIcon: " ", addBtnIcon: ' ',
viewBtnIcon: " ", viewBtnIcon: ' ',
delBtnIcon: " ", delBtnIcon: ' ',
editBtnIcon: " ", editBtnIcon: ' ',
align: "center", align: 'center',
column: [ column: [
{ {
label: "出库单号", label: '出库单号',
prop: "sirCode", prop: 'sirCode',
// bind: "stAccBill.billCode", // bind: "stAccBill.billCode",
sortable: true, sortable: true,
filter: true, filter: true,
@ -115,18 +147,24 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "出库日期", label: '出库日期',
prop: "inOutDate", prop: 'inOutDate',
// bind: "stAccBill.billDate", // bind: "stAccBill.billDate",
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
width: 180, width: 180,
type: 'date',
searchRange: true,
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
}, },
{ {
label: "出库仓库", label: '出库仓库',
prop: "shName", prop: 'shName',
// bind: "stAccBill.coStorehouse.shName", // bind: "stAccBill.coStorehouse.shName",
search: true, search: true,
sortable: true, sortable: true,
@ -135,9 +173,9 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "出库类别", label: '出库类别',
prop: "outType", prop: 'outType',
type: "select", type: 'select',
// bind: "stAccBill.billFlagStr", // bind: "stAccBill.billFlagStr",
search: false, search: false,
sortable: true, sortable: true,
@ -146,22 +184,21 @@ export default {
width: 110, width: 110,
dicData: [ dicData: [
/*0:报废出库,1:料头出库,2.超额出库,3复检出库,4领用出库,5库转移,6退货出库,11不合格退库*/ /*0:报废出库,1:料头出库,2.超额出库,3复检出库,4领用出库,5库转移,6退货出库,11不合格退库*/
{ label: "报废出库", value: 0 }, { label: '报废出库', value: 0 },
{ label: "料头出库", value: 1 }, { label: '料头出库', value: 1 },
{ label: "超额出库", value: 2 }, { label: '超额出库', value: 2 },
{ label: "复检出库", value: 3 }, { label: '复检出库', value: 3 },
{ label: "领用出库", value: 4 }, { label: '领用出库', value: 4 },
{ label: "库转移", value: 5 }, { label: '库转移', value: 5 },
{ label: "退货出库", value: 6 }, { label: '退货出库', value: 6 },
{ label: "班组提请", value: 8 }, { label: '班组提请', value: 8 },
{ label: "不合格退库", value: 11 }, { label: '不合格退库', value: 11 },
],
]
}, },
{ {
label: "出库原因", label: '出库原因',
prop: "inOutReason", prop: 'inOutReason',
type: "select", type: 'select',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -170,56 +207,55 @@ export default {
dicData: [ dicData: [
{ {
value: '0', value: '0',
label: "报废出库" label: '报废出库',
}, },
{ {
value: '1', value: '1',
label: "料头出库" label: '料头出库',
}, },
{ {
value: '2', value: '2',
label: "超额出库" label: '超额出库',
}, },
{ {
value: '3', value: '3',
label: "复检出库" label: '复检出库',
}, },
{ {
value: '4', value: '4',
label: "领用出库" label: '领用出库',
}, },
{ {
value: '5', value: '5',
label: "库转移" label: '库转移',
}, },
{ {
value: '6', value: '6',
label: "退货出库" label: '退货出库',
}, },
{ {
value: '7', value: '7',
label: "物料出库" label: '物料出库',
}, },
{ {
value: '8', value: '8',
label: "班组提请" label: '班组提请',
}, },
{label:'不合格退库',value:'11'} { label: '不合格退库', value: '11' },
] ],
}, },
{ {
label: "领料人", label: '领料人',
prop: "pickerName", prop: 'pickerName',
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
width: 100, width: 100,
}, },
{ {
label: "制单人", label: '制单人',
prop: "createUserName", prop: 'createUserName',
// bind: "stAccBill.createMan.userName", // bind: "stAccBill.createMan.userName",
search: false, search: false,
sortable: true, sortable: true,
@ -228,8 +264,8 @@ export default {
width: 100, width: 100,
}, },
{ {
label: "工装编号", label: '工装编号',
prop: "toolCode", prop: 'toolCode',
// bind: "pjMold.toolingCode", // bind: "pjMold.toolingCode",
search: false, search: false,
sortable: true, sortable: true,
@ -239,8 +275,8 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "报废单号", label: '报废单号',
prop: "bfCode", prop: 'bfCode',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -249,8 +285,8 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "关联车间订单号", label: '关联车间订单号',
prop: "woCode", prop: 'woCode',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -259,26 +295,26 @@ export default {
width: 150, width: 150,
}, },
{ {
label: "审批状态", label: '审批状态',
prop: "approvalStatus", prop: 'approvalStatus',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
display: false, display: false,
type: "select", type: 'select',
width: 180, width: 180,
dicData: [ dicData: [
{ {
label: "审批中", label: '审批中',
value: 0, value: 0,
}, },
{ {
label: "审批通过", label: '审批通过',
value: 1, value: 1,
}, },
{ {
label: "审批驳回", label: '审批驳回',
value: 10, value: 10,
}, },
// { // {
@ -288,8 +324,8 @@ export default {
], ],
}, },
{ {
label: "审批意见", label: '审批意见',
prop: "approvalOpinion", prop: 'approvalOpinion',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -298,8 +334,8 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "审批人", label: '审批人',
prop: "approverName", prop: 'approverName',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -308,22 +344,22 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "审批时间", label: '审批时间',
prop: "approvalTime", prop: 'approvalTime',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
display: false, display: false,
type: "datetime", type: 'datetime',
width: 180, width: 180,
}, },
{ {
label: "报废原因", label: '报废原因',
prop: "bfType", prop: 'bfType',
// bind: "scrapReason", // bind: "scrapReason",
search: false, search: false,
type:"select", type: 'select',
sortable: true, sortable: true,
// /** // /**
// * // *
@ -338,10 +374,10 @@ export default {
// */ // */
// public static final Short BF_TYPE_GLASS_CAKE = 3; // public static final Short BF_TYPE_GLASS_CAKE = 3;
dicData: [ dicData: [
{ label: "到期维护报废", value: 1 }, { label: '到期维护报废', value: 1 },
{ label: "未报废", value: 0 }, { label: '未报废', value: 0 },
{ label: "归还报废", value: 2 }, { label: '归还报废', value: 2 },
{ label: "玻璃饼报废", value: 3 } { label: '玻璃饼报废', value: 3 },
], ],
filter: true, filter: true,
span: 24, span: 24,
@ -349,8 +385,8 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "提请单号", label: '提请单号',
prop: "crCode", prop: 'crCode',
// bind: "stAccBill.billCode", // bind: "stAccBill.billCode",
sortable: true, sortable: true,
filter: true, filter: true,
@ -359,8 +395,8 @@ export default {
width: 180, width: 180,
}, },
{ {
label: "备注", label: '备注',
prop: "memo", prop: 'memo',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -368,7 +404,6 @@ export default {
display: false, display: false,
width: 180, width: 180,
}, },
], ],
}, },
form: {}, form: {},
@ -380,12 +415,12 @@ export default {
approveDialog: false, approveDialog: false,
auditForm: {}, auditForm: {},
auditRules: { auditRules: {
approvalResult:[{ required: true, message: '请选择是否通过审核', trigger: 'blur' }] approvalResult: [{ required: true, message: '请选择是否通过审核', trigger: 'blur' }],
}, },
}; };
}, },
created() { created() {
if (JSON.stringify(this.$store.state.client.otherOutParams) !== "{}") { if (JSON.stringify(this.$store.state.client.otherOutParams) !== '{}') {
this.query = this.$store.state.client.otherOutParams; this.query = this.$store.state.client.otherOutParams;
this.searchForm = this.$store.state.client.otherOutParams; this.searchForm = this.$store.state.client.otherOutParams;
} }
@ -395,14 +430,14 @@ export default {
this.openShow = true; this.openShow = true;
}, },
changeCode(val) { changeCode(val) {
if(this.checkCode == "") return if (this.checkCode == '') return;
this.openShow = true this.openShow = true;
}, },
beforeOpen(done, type) { beforeOpen(done, type) {
if (['view'].includes(type)) { if (['view'].includes(type)) {
getDetail({ id: this.form.id }).then(res => { getDetail({ id: this.form.id }).then(res => {
console.log('res=============',res) console.log('res=============', res);
}) });
} else { } else {
done(); done();
} }
@ -410,66 +445,66 @@ export default {
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad() this.onLoad();
this.$store.dispatch("changeSetting", { this.$store.dispatch('changeSetting', {
title: "otherOutParams", title: 'otherOutParams',
form: this.query, form: this.query,
}); });
done() done();
}, },
searchReset() { searchReset() {
this.query = {} this.query = {};
this.$store.dispatch("changeSetting", { this.$store.dispatch('changeSetting', {
title: "otherOutParams", title: 'otherOutParams',
form: this.query, form: this.query,
}); });
this.onLoad() this.onLoad();
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage this.page.currentPage = currentPage;
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize this.page.pageSize = pageSize;
}, },
closeDialog(val) { closeDialog(val) {
this.openShow = false this.openShow = false;
this.showDetail = false this.showDetail = false;
if (val) { if (val) {
this.onLoad() this.onLoad();
} }
}, },
handleDelete() { handleDelete() {
if (this.selectionList.length === 0) { if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据"); this.$message.warning('请选择至少一条数据');
return; return;
} }
this.$confirm("确定将选择数据删除?", { this.$confirm('确定将选择数据删除?', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning',
}).then(() => {}); }).then(() => {});
}, },
handeExamine(row) { handeExamine(row) {
this.auditForm = {} this.auditForm = {};
this.auditForm.id = row.id this.auditForm.id = row.id;
this.approveDialog = true this.approveDialog = true;
}, },
handeDetails(row) { handeDetails(row) {
this.showDetail = true this.showDetail = true;
this.checkId = row.id this.checkId = row.id;
}, },
submit() { submit() {
this.$refs.auditForm.validate(valid => { this.$refs.auditForm.validate(valid => {
if (valid) { if (valid) {
approve({ ...this.auditForm }).then(res => { approve({ ...this.auditForm }).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message.success('审批成功') this.$message.success('审批成功');
this.approveDialog = false this.approveDialog = false;
this.onLoad() this.onLoad();
} }
}) });
} }
}) });
}, },
// //
selectionChange(list) { selectionChange(list) {
@ -477,18 +512,26 @@ export default {
}, },
onLoad() { onLoad() {
this.loading = true; this.loading = true;
let params = {
...this.query,
startInOutDate:
this.query.inOutDate && this.query.inOutDate.length != 0 && this.query.inOutDate[0],
endInOutDate:
this.query.inOutDate && this.query.inOutDate.length != 0 && this.query.inOutDate[1],
};
if (params.inOutDate) delete params.inOutDate;
getList({ getList({
current: this.page.currentPage, current: this.page.currentPage,
size: this.page.pageSize, size: this.page.pageSize,
...this.query, ...params,
}).then(res => { }).then(res => {
res.data.data.records.forEach(item => { res.data.data.records.forEach(item => {
item.approvalStatus = item.approvalStatus === -1 ? '' : item.approvalStatus item.approvalStatus = item.approvalStatus === -1 ? '' : item.approvalStatus;
}) });
this.data = res.data.data.records this.data = res.data.data.records;
this.page.total = res.data.data.total this.page.total = res.data.data.total;
this.loading = false this.loading = false;
}) });
// this.data = [ // this.data = [
// { // {
// tbId: 'OT2023001', // tbId: 'OT2023001',

@ -1,53 +1,67 @@
<template> <template>
<el-dialog title="新增其他出库" append-to-body :modelValue="openShow" width="70%" @close="closeDialog" fullscreen> <el-dialog
title="新增其他出库"
<el-form ref="form" :model="stOtherOutRecord" :rules="rules" label-width="100px" size="mini"> append-to-body
:modelValue="openShow"
width="70%"
@close="closeDialog"
fullscreen
>
<el-form ref="form" :model="stOtherOutRecord" :rules="rules" label-width="100px">
<el-row> <el-row>
<!-- <el-col :span="8">
<el-form-item label="出库单号" prop="stAccBill.billCode">
<el-input v-model="stOtherOutRecord.stAccBill.billCode" :disabled="true" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="6">
<el-form-item label="出库日期" prop="billDate">
<el-date-picker class="item-choose" v-model="stOtherOutRecord.billDate"
:picker-options="billDatePicker" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" clearable
placeholder="请选择" style="width: 250px;" />
</el-form-item>
</el-col> -->
<el-col :span="6"> <el-col :span="6">
<el-form-item label="出库原因" prop="outType"> <el-form-item label="出库原因" prop="outType">
<el-select v-model="stOtherOutRecord.outType" @change="changeUseType" class="item-choose"> <el-select
<el-option v-for="(item, index) in useTypeOptions" :key="index" :label="item.label" v-model="stOtherOutRecord.outType"
:value="item.value" /> @change="changeUseType"
class="item-choose"
>
<el-option
v-for="(item, index) in useTypeOptions"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="出库仓库" prop="shId"> <el-form-item label="出库仓库" prop="shId">
<!-- <co-store-house-sel ref="storeHouse" v-model="stOtherOutRecord.stAccBill.coStorehouse.shId" <el-select
:option="shOption" @itemValue="storeHouseChange" /> --> v-model="stOtherOutRecord.shId"
<el-select v-model="stOtherOutRecord.shId" @change="storeHouseChange" @change="storeHouseChange"
class="item-choose"> class="item-choose"
<el-option v-for="(item, index) in wareList" :key="item.id" :label="item.shName" >
:value="item.id" /> <el-option
v-for="(item, index) in wareList"
:key="item.id"
:label="item.shName"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="领料人员" prop="userId"> <el-form-item label="领料人员" prop="picker">
<el-select v-model="stOtherOutRecord.userId" filterable <el-select v-model="stOtherOutRecord.picker" filterable class="item-choose">
class="item-choose"> <el-option
<el-option v-for="(item, index) in userData" :key="item.id" v-for="(item, index) in userData"
:label="`${item.realName}(${item.workNo})`" :value="item.id" /> :key="item.id"
:label="`${item.realName}(${item.workNo})`"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="工装编号" prop="mid"> <el-form-item label="工装编号" prop="mid">
<el-select v-model="stOtherOutRecord.mid" value-key="id" filterable class="item-choose"> <el-select v-model="stOtherOutRecord.mid" value-key="id" filterable class="item-choose">
<el-option v-for="item in treeData" :key="item.mid" :label="item.toolingCode" <el-option
:value="item.mid" /> v-for="item in treeData"
:key="item.mid"
:label="item.toolingCode"
:value="item.mid"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -58,64 +72,90 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="备注" prop="memo" class="auto-fit"> <el-form-item label="备注" prop="memo" class="auto-fit">
<el-input placeholder="请输入" :rows="2" v-model="stOtherOutRecord.memo" type="textarea" <el-input
minlength="0" maxlength="100" show-word-limit style="width: 100%;" /> placeholder="请输入"
:rows="2"
v-model="stOtherOutRecord.memo"
type="textarea"
minlength="0"
maxlength="100"
show-word-limit
style="width: 100%"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row> </el-row>
<div slot="left" style="margin-bottom: 12px">
</el-row> <el-button type="primary" @click="insertEvent()">插入一行</el-button>
<div slot="left" style="margin-bottom: 12px;"> <el-button type="danger" @click="deleteRow()">删除一行</el-button>
<el-button type="success" size="mini" @click="insertEvent()">插入一行</el-button>
<el-button type="danger" size="mini" @click="deleteRow()">删除一行</el-button>
<!-- <el-button type="primary" size="mini" @click="submit()">保存</el-button> -->
</div> </div>
<el-table ref="xTable" :data="outbankList" border @select="selectChange"> <el-table ref="xTable" :data="outbankList" border @select="selectChange">
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column label="出库单号" prop="sirCode" width="120" align="center"></el-table-column> <el-table-column
<el-table-column label="仓库物料" prop="goodsCode" width="200" align="center" > label="出库单号"
prop="sirCode"
width="120"
align="center"
></el-table-column>
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>仓库物料</span> <span><i style="color: red">*</i>仓库物料</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.goodsCode" @change="(val) => changeCode(val,scope.$index)"> <!-- <el-select v-model="scope.row.goodsCode" @change="val => changeCode(val, scope.$index)">
<el-option v-for="item in goodsList" :key="item.id" :label="item.goodsCode" :value="item.goodsCode"></el-option> <el-option
</el-select> v-for="item in goodsList"
:key="item.id"
:label="item.goodsCode"
:value="item.goodsCode"
></el-option>
</el-select> -->
<jhSelect
@input="val => (scope.row.goodsCode = val)"
:value="scope.row.goodsCode"
placeholder="请搜索选择"
api-url="/blade-wms/stGoods/list"
echo-api="/blade-wms/stGoods/list"
echoParamsKey="goodsCode"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="goodsCode"
value-key="goodsCode"
search-key="goodsCode"
:debounce-time="100"
@change="(val, item) => changeCode(val, item, scope.$index)"
:title="'修改'"
/>
</template> </template>
</el-table-column> </el-table-column>
<!-- <template v-slot:edit="scope">
<st-store-goods-out v-model="scope.row.rlsId" :option="[]" :params="goodsParams"
@itemValue="goodsItemValue" />
</template>
<template v-slot="{ row }">{{ row.goodsCodeAndGoodsName }}</template> -->
<el-table-column label="物料名称" prop="goodsName" align="center"> <el-table-column label="物料名称" prop="goodsName" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>物料名称</span> <span><i style="color: red">*</i>物料名称</span>
</template> </template>
<!-- <template #default="scope">
<el-input v-model="scope.row.coGoods.goodsName" disabled placeholder="请输入" />
</template> -->
</el-table-column> </el-table-column>
<el-table-column label="型号/牌号" prop="materialModel" align="center"> <el-table-column label="型号/牌号" prop="materialModel" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>型号/牌号</span> <span><i style="color: red">*</i>型号/牌号</span>
</template> </template>
<!-- <template #default="scope">
<el-input v-model="scope.row.coGoods.mtltmrk" placeholder="请输入" />
</template> -->
</el-table-column> </el-table-column>
<el-table-column label="库位号" prop="slId" align="center"> <el-table-column label="库位号" prop="slId" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>库位号</span> <span><i style="color: red">*</i>库位号</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.slId" @change="(val) => changeLocation(val,scope.$index)"> <el-select v-model="scope.row.slId" @change="val => changeLocation(val, scope.$index)">
<el-option v-for="item in scope.row.locationList" :key="item.id" <el-option
:label="item.location" :value="item.slId"></el-option> v-for="item in scope.row.locationList"
:key="item.id"
:label="item.location"
:value="item.slId"
></el-option>
</el-select> </el-select>
<!-- <el-input v-model="scope.row.storageLocation.location" placeholder="请输入" /> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次号" prop="piNo" align="center"> <el-table-column label="批次号" prop="piNo" align="center">
@ -124,59 +164,59 @@
</template> </template>
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)"> <el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)">
<el-option v-for="item in scope.row.piNoList" :key="item.piNo" <el-option
:label="item.piNo" :value="item.piNo"></el-option> v-for="item in scope.row.piNoList"
:key="item.piNo"
:label="item.piNo"
:value="item.piNo"
></el-option>
</el-select> </el-select>
<!-- <el-input v-model="scope.row.piNo" placeholder="请输入" /> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="炉批号" prop="stovePiNo" align="center"> <el-table-column label="炉批号" prop="stovePiNo" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>炉批号</span> <span><i style="color: red">*</i>炉批号</span>
</template> </template>
<!-- <template #default="scope">
<el-input v-model="scope.row.stovePiNo" placeholder="请输入" />
</template> -->
</el-table-column> </el-table-column>
<el-table-column label="库存数量" prop="quantity" align="center"> <el-table-column label="库存数量" prop="quantity" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>库存数量</span> <span><i style="color: red">*</i>库存数量</span>
</template> </template>
<!-- <template #default="scope">
<el-input v-model="scope.row.quantity" placeholder="请输入" type="number"/>
</template> -->
</el-table-column> </el-table-column>
<!-- <el-table-column label="出库件数" :edit-render="{ type: 'default' }" prop="outQuantity">
<template v-slot:edit="scope">
<vd-input-number v-model="scope.row.outQuantity" :min="-1000000000" :max="1000000000"
:precision="4" />
</template>
<template v-slot="{ row }">{{ row.outQuantity }}</template>
</el-table-column> -->
<el-table-column label="出库件数" prop="outQuantity" align="center"> <el-table-column label="出库件数" prop="outQuantity" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>出库件数</span> <span><i style="color: red">*</i>出库件数</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-input-number style="width:90%;" v-model="scope.row.outQuantity" <el-input-number
:max="scope.row.quantity" placeholder="请输入" controls-position="right"></el-input-number> style="width: 90%"
v-model="scope.row.outQuantity"
:max="scope.row.quantity"
placeholder="请输入"
controls-position="right"
></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计量单位" prop="unitName" align="center"> <el-table-column label="计量单位" prop="unitName" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>计量单位</span> <span><i style="color: red">*</i>计量单位</span>
</template> </template>
<!-- <template #default="scope">
<el-input v-model="scope.unitName" placeholder="请输入"/>
</template> -->
</el-table-column> </el-table-column>
<el-table-column label="到期日期" prop="scrapCycle" align="center"> <el-table-column label="到期日期" prop="scrapCycle" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>到期日期</span> <span><i style="color: red">*</i>到期日期</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-date-picker disabled v-model="scope.row.scrapCycle" format="YYYY-MM-DD HH:mm:ss" <el-date-picker
value-format="YYYY-MM-DD HH:mm:ss" type="date" placeholder="选择日期" style="width: 100%" /> disabled
v-model="scope.row.scrapCycle"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
type="date"
placeholder="选择日期"
style="width: 100%"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库日期" prop="inOutDate" align="center"> <el-table-column label="入库日期" prop="inOutDate" align="center">
@ -184,12 +224,18 @@
<span><i style="color: red">*</i>入库日期</span> <span><i style="color: red">*</i>入库日期</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-date-picker disabled v-model="scope.row.inOutDate" format="YYYY-MM-DD HH:mm:ss" <el-date-picker
value-format="YYYY-MM-DD HH:mm:ss" type="date" placeholder="选择日期" style="width: 100%" /> disabled
v-model="scope.row.inOutDate"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
type="date"
placeholder="选择日期"
style="width: 100%"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
<template #footer> <template #footer>
@ -201,35 +247,36 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {dateFormat} from '@/utils/date' import { dateFormat } from '@/utils/date';
import {getOtherOutNo,getWarehouseList,getKeeperList,getGoodsOutList,getLocationList,completeIssue, import {
getLocationData,addIssue,getShList} from "@/api/storeManagement/otherIssuing" getOtherOutNo,
getWarehouseList,
getKeeperList,
getGoodsOutList,
getLocationList,
completeIssue,
getLocationData,
addIssue,
getShList,
} from '@/api/storeManagement/otherIssuing';
export default { export default {
props: { props: {
showDialog: { showDialog: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
checkCode: { checkCode: {
type: String, type: String,
default: '' default: '',
} },
}, },
data() { data() {
const assQuantityValid = ({ const assQuantityValid = ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => {
cellValue,
rule,
rules,
row,
rowIndex,
column,
columnIndex
}) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (row.coGoods) { if (row.coGoods) {
if (row.coGoods.numAcc) { if (row.coGoods.numAcc) {
if (cellValue == null) { if (cellValue == null) {
reject(new Error(this.$t("store.goodsMustInputAssQuatity"))); reject(new Error(this.$t('store.goodsMustInputAssQuatity')));
} }
} }
} }
@ -255,7 +302,7 @@ export default {
mid: null, mid: null,
outType: 4, outType: 4,
woCode: null, woCode: null,
memo: null memo: null,
}, },
btnLoading: false, btnLoading: false,
outbankList: [], outbankList: [],
@ -265,104 +312,100 @@ export default {
useTypeOptions: [ useTypeOptions: [
{ {
value: 0, value: 0,
label: "报废出库" label: '报废出库',
}, },
{ {
value: 1, value: 1,
label: "料头出库" label: '料头出库',
}, },
{ {
value: 2, value: 2,
label: "超额出库" label: '超额出库',
}, },
{ {
value: 3, value: 3,
label: "复检出库" label: '复检出库',
}, },
{ {
value: 4, value: 4,
label: "领用出库" label: '领用出库',
}, },
{ {
value: 5, value: 5,
label: "库转移" label: '库转移',
}, },
{ {
value: 6, value: 6,
label: "退货出库" label: '退货出库',
}, },
{ {
value: 7, value: 7,
label: "物料出库" label: '物料出库',
}, },
{ {
value: 8, value: 8,
label: "班组提请" label: '班组提请',
} },
], ],
goodsParams: {}, goodsParams: {},
piNoParams: {}, piNoParams: {},
rules: { rules: {
// stAccBill: { // stAccBill: {
// coStorehouse: { // coStorehouse: {
shId: [{ required: true,message:"请选择仓库",trigger:"blur" }], shId: [{ required: true, message: '请选择仓库', trigger: 'blur' }],
// }, // },
// pfUserInfo: { // pfUserInfo: {
userId: [{ required: true,message:"请选择领料人",trigger:"blur" }], picker: [{ required: true, message: '请选择领料人', trigger: 'blur' }],
// } // }
// }, // },
// moId: [], // moId: [],
outType: [{ required: true,message:"请选择出库原因",trigger:"blur" }], outType: [{ required: true, message: '请选择出库原因', trigger: 'blur' }],
}, },
gridRules: { gridRules: {
rlsId: [{ required: true }], rlsId: [{ required: true }],
shelfNo: [{ required: true }], shelfNo: [{ required: true }],
assQuantity: [{ validator: assQuantityValid }] assQuantity: [{ validator: assQuantityValid }],
}, },
isShowInput: false, isShowInput: false,
userData: [] userData: [],
} };
}, },
mounted() { mounted() {
this.openShow = this.showDialog this.openShow = this.showDialog;
this.getCode() this.getCode();
if(this.checkCode == ""){ if (this.checkCode == '') {
this.getWare() this.getWare();
this.getKeeper() this.getKeeper();
this.getGoods() this.getGoods();
} else { } else {
this.getKeeper() this.getKeeper();
this.getShData() this.getShData();
} }
}, },
methods: { methods: {
getShData() { getShData() {
getShList({ getShList({
goodsCode:this.checkCode goodsCode: this.checkCode,
}).then(res => { }).then(res => {
this.wareList = res.data.data this.wareList = res.data.data;
});
})
}, },
getBasicData() { getBasicData() {
completeIssue({ completeIssue({
barCode:this.checkCode barCode: this.checkCode,
}).then(res => { }).then(res => {
this.outbankList = [ this.outbankList = [{ sirCode: this.billCode, ...res.data.data }];
{sirCode:this.billCode,...res.data.data} this.stOtherOutRecord.shId = res.data.data.shId;
] });
this.stOtherOutRecord.shId = res.data.data.shId
})
}, },
getCode() { getCode() {
getOtherOutNo().then(res => { getOtherOutNo().then(res => {
this.billCode = res.data.data.sirCode this.billCode = res.data.data.sirCode;
if (this.checkCode != '') { if (this.checkCode != '') {
this.getBasicData() this.getBasicData();
} }
}) });
}, },
uniqueById(arr) { uniqueById(arr) {
const seen = new Map(); const seen = new Map();
@ -373,70 +416,71 @@ export default {
} }
return Array.from(seen.values()); return Array.from(seen.values());
}, },
changeCode(val,index){ changeCode(val, item, index) {
let tmp = this.goodsList.find(item => item.goodsCode == val) // let tmp = this.goodsList.find(item => item.goodsCode == val);
console.log('tmp------------',tmp) // console.log('tmp------------', tmp);
this.outbankList[index].goodsName = tmp.goodsName
this.outbankList[index].materialModel = tmp.materialModel
this.outbankList[index].unitName = tmp.unitName
this.outbankList[index].goodsId = tmp.id
this.outbankList[index].slId = ""
this.outbankList[index].piNo = ""
this.outbankList[index].quantity = ''
if (item != undefined) {
this.outbankList[index].goodsName = item.goodsName;
this.outbankList[index].materialModel = item.materialModel;
this.outbankList[index].unitName = item.unitName;
this.outbankList[index].goodsId = item.id;
this.outbankList[index].slId = '';
this.outbankList[index].piNo = '';
this.outbankList[index].quantity = '';
}
getLocationData({ getLocationData({
shId: this.stOtherOutRecord.shId, shId: this.stOtherOutRecord.shId,
goodsId:tmp.id goodsId: item.id,
}).then(res => { }).then(res => {
console.log('res--------',res) console.log('res--------', res);
let data = this.uniqueById(res.data.data.records) let data = this.uniqueById(res.data.data.records);
this.outbankList[index].locationList = data this.outbankList[index].locationList = data;
}) });
}, },
changeLocation(val, index) { changeLocation(val, index) {
this.outbankList[index].piNo = "" this.outbankList[index].piNo = '';
getLocationData({ getLocationData({
shId: this.stOtherOutRecord.shId, shId: this.stOtherOutRecord.shId,
goodsId: this.outbankList[index].goodsId, goodsId: this.outbankList[index].goodsId,
slId:val slId: val,
}).then(res => { }).then(res => {
this.outbankList[index].piNoList = res.data.data.records this.outbankList[index].piNoList = res.data.data.records;
}) });
}, },
changePiNo(val, index) { changePiNo(val, index) {
let tmp = this.outbankList[index].piNoList.find(item => item.piNo == val) let tmp = this.outbankList[index].piNoList.find(item => item.piNo == val);
if (tmp) { if (tmp) {
this.outbankList[index].stovePiNo = tmp.stovePiNo this.outbankList[index].stovePiNo = tmp.stovePiNo;
this.outbankList[index].quantity = tmp.quantity this.outbankList[index].quantity = tmp.quantity;
this.outbankList[index].scrapCycle = tmp.scrapCycle this.outbankList[index].scrapCycle = tmp.scrapCycle;
this.outbankList[index].inOutDate = tmp.inOutDate this.outbankList[index].inOutDate = tmp.inOutDate;
this.outbankList[index].id = tmp.id this.outbankList[index].id = tmp.id;
} }
}, },
getGoods() { getGoods() {
getGoodsOutList().then(res => { getGoodsOutList().then(res => {
this.goodsList = res.data.data.records this.goodsList = res.data.data.records;
}) });
}, },
getKeeper() { getKeeper() {
getKeeperList().then(res => { getKeeperList().then(res => {
this.userData = res.data.data this.userData = res.data.data;
}) });
}, },
getWare() { getWare() {
getWarehouseList().then(res => { getWarehouseList().then(res => {
this.wareList = res.data.data.records this.wareList = res.data.data.records;
}) });
}, },
closeDialog(val) { closeDialog(val) {
this.openShow = false this.openShow = false;
this.$emit('closeDialog', val); this.$emit('closeDialog', val);
}, },
userDataFn() { userDataFn() {
// this.$ajax.post("sysComBox/user", { "filterValue": null, "paging": { "pageSize": 9999999, "pageNumber": 1 }, "baseParams": {} }).then(res => { // this.$ajax.post("sysComBox/user", { "filterValue": null, "paging": { "pageSize": 9999999, "pageNumber": 1 }, "baseParams": {} }).then(res => {
// if (this.$ifAjax(res)) { // if (this.$ifAjax(res)) {
// this.userData = res.data.list; // this.userData = res.data.list;
// } // }
// }); // });
}, },
@ -445,11 +489,11 @@ export default {
stAccBill: { stAccBill: {
billDate: new Date(), billDate: new Date(),
pfUserInfo: { dept: {} }, pfUserInfo: { dept: {} },
coStorehouse: { shId: null } coStorehouse: { shId: null },
}, },
mid: null, mid: null,
outType: 4, outType: 4,
memo: null memo: null,
}; };
this.oldShId = null; this.oldShId = null;
this.outbankList = []; this.outbankList = [];
@ -473,25 +517,23 @@ export default {
// if (this.$ifAjax(res)) { // if (this.$ifAjax(res)) {
// this.stOtherOutRecord.stAccBill.billCode = // this.stOtherOutRecord.stAccBill.billCode =
// res.data.stAccBill.billCode; // res.data.stAccBill.billCode;
// } // }
// }); // });
}, },
queryDataForAdd() { queryDataForAdd() {
this.$ajax.get("stOtherOutRecord/preparedForAdd").then(res => { this.$ajax.get('stOtherOutRecord/preparedForAdd').then(res => {
this.stOtherOutRecord = res.data; this.stOtherOutRecord = res.data;
this.userOption = [ this.userOption = [
{ {
userId: this.stOtherOutRecord.stAccBill.pfUserInfo.userId, userId: this.stOtherOutRecord.stAccBill.pfUserInfo.userId,
userName: this.stOtherOutRecord.stAccBill.pfUserInfo.userName userName: this.stOtherOutRecord.stAccBill.pfUserInfo.userName,
} },
]; ];
}); });
}, },
queryData() { queryData() {
// ID // ID
this.$ajax.get("stOtherOutRecord/queryForEdit/" + this.abId).then(res => { this.$ajax.get('stOtherOutRecord/queryForEdit/' + this.abId).then(res => {
const { stOtherOutRecord, outbankList, prMoldOrder } = res.data; const { stOtherOutRecord, outbankList, prMoldOrder } = res.data;
this.stOtherOutRecord = stOtherOutRecord; this.stOtherOutRecord = stOtherOutRecord;
this.outbankList = outbankList; this.outbankList = outbankList;
@ -499,14 +541,14 @@ export default {
this.userOption = [ this.userOption = [
{ {
userId: this.stOtherOutRecord.stAccBill.pfUserInfo.userId, userId: this.stOtherOutRecord.stAccBill.pfUserInfo.userId,
userName: this.stOtherOutRecord.stAccBill.pfUserInfo.userName userName: this.stOtherOutRecord.stAccBill.pfUserInfo.userName,
} },
]; ];
this.shOption = [ this.shOption = [
{ {
shId: this.stOtherOutRecord.stAccBill.coStorehouse.shId, shId: this.stOtherOutRecord.stAccBill.coStorehouse.shId,
shName: this.stOtherOutRecord.stAccBill.coStorehouse.shName shName: this.stOtherOutRecord.stAccBill.coStorehouse.shName,
} },
]; ];
this.stOtherOutRecord.moId = prMoldOrder.moId; this.stOtherOutRecord.moId = prMoldOrder.moId;
this.moldOption[prMoldOrder.moId] = prMoldOrder; this.moldOption[prMoldOrder.moId] = prMoldOrder;
@ -515,7 +557,7 @@ export default {
insertEvent(row = -1) { insertEvent(row = -1) {
if (!this.stOtherOutRecord.shId || this.stOtherOutRecord.shId == '') { if (!this.stOtherOutRecord.shId || this.stOtherOutRecord.shId == '') {
this.$message.error('请选择仓库!'); this.$message.error('请选择仓库!');
return return;
} }
// //
// //
@ -529,7 +571,7 @@ export default {
} }
const newRow = { const newRow = {
sirCode: sirCode, sirCode: sirCode,
_select:false _select: false,
}; };
this.outbankList.push(newRow); this.outbankList.push(newRow);
}, },
@ -538,24 +580,22 @@ export default {
}, },
// //
deleteRow() { deleteRow() {
this.$confirm("确定将选择数据删除?", { this.$confirm('确定将选择数据删除?', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning',
}).then(() => { }).then(() => {
this.outbankList = this.outbankList.filter(row => !row._select); this.outbankList = this.outbankList.filter(row => !row._select);
}); });
}, },
editActived({ row, rowIndex, column, columnIndex, $columnIndex, cell }) { editActived({ row, rowIndex, column, columnIndex, $columnIndex, cell }) {},
},
editClosed({ row, rowIndex, column, columnIndex, $columnIndex, cell }) { editClosed({ row, rowIndex, column, columnIndex, $columnIndex, cell }) {
// //
if ( if (
column.property === "quantity" || column.property === 'quantity' ||
column.property === "unitPrice" || column.property === 'unitPrice' ||
column.property === "abdMoney" || column.property === 'abdMoney' ||
column.property === "assQuantity" column.property === 'assQuantity'
) { ) {
this.changeData(row, column.property); this.changeData(row, column.property);
} }
@ -563,81 +603,78 @@ export default {
activeCellMethod({ column, columnIndex }) { activeCellMethod({ column, columnIndex }) {
// //
if (this.stOtherOutRecord.stAccBill.coStorehouse.shId == null) { if (this.stOtherOutRecord.stAccBill.coStorehouse.shId == null) {
this.$message.error(this.$t("store.pleaseChoseStore")); this.$message.error(this.$t('store.pleaseChoseStore'));
return false; return false;
} }
var row = this.$refs.xTable.getCurrentRecord(); var row = this.$refs.xTable.getCurrentRecord();
if (column.property === "assQuantity") { if (column.property === 'assQuantity') {
if (!row.coGoods.numAcc) { if (!row.coGoods.numAcc) {
this.$message.error(this.$t("store.pleaseChoseGoodsForNumAcc")); this.$message.error(this.$t('store.pleaseChoseGoodsForNumAcc'));
return false; return false;
} }
} }
return true; return true;
}, },
close(isRefresh) { close(isRefresh) {
this.$emit("cancel", isRefresh === true); this.$emit('cancel', isRefresh === true);
}, },
goodsItemValue(item) { goodsItemValue(item) {
// //
var row = this.$refs.xTable.getCurrentRecord(); var row = this.$refs.xTable.getCurrentRecord();
if (item.storageLocation != null) { if (item.storageLocation != null) {
this.$set(row, "storageLocation", item.storageLocation); this.$set(row, 'storageLocation', item.storageLocation);
} }
this.$set(row, "quantity", item.quantity); this.$set(row, 'quantity', item.quantity);
this.$set(row, "coGoods", item.coGoods); this.$set(row, 'coGoods', item.coGoods);
this.$set(row, "rlsId", item.rlsId); this.$set(row, 'rlsId', item.rlsId);
this.$set(row, "piNo", item.piNo); this.$set(row, 'piNo', item.piNo);
this.$set(row, "stovePiNo", item.stovePiNo); this.$set(row, 'stovePiNo', item.stovePiNo);
this.$set(row, "goodsCodeAndGoodsName", item.goodsCodeAndGoodsName); this.$set(row, 'goodsCodeAndGoodsName', item.goodsCodeAndGoodsName);
this.$set(row, "createTime", item.createTime); this.$set(row, 'createTime', item.createTime);
this.$set(row, "scrapCycle", item.scrapCycle); this.$set(row, 'scrapCycle', item.scrapCycle);
}, },
storeHouseChange(val) { storeHouseChange(val) {
// console.log("item", item) // console.log("item", item)
console.log('wareList---------',this.wareList) console.log('wareList---------', this.wareList);
let tmp = this.wareList.find(item => item.id == val) let tmp = this.wareList.find(item => item.id == val);
if(tmp.shName.indexOf("玻璃饼") !== -1){ if (tmp.shName.indexOf('玻璃饼') !== -1) {
this.isShowInput = true; this.isShowInput = true;
} else { } else {
this.isShowInput = false; this.isShowInput = false;
} }
if (this.outbankList.length == 1) { if (this.outbankList.length == 1) {
this.outbankList[0].slId = '' this.outbankList[0].slId = '';
this.outbankList[0].piNo = '' this.outbankList[0].piNo = '';
this.outbankList[0].quantity = '' this.outbankList[0].quantity = '';
getGoodsOutList({ getGoodsOutList({
shId:val shId: val,
}).then(res => { }).then(res => {
this.goodsList = res.data.data.records this.goodsList = res.data.data.records;
if (this.outbankList[0].goodsCode != '') { if (this.outbankList[0].goodsCode != '') {
let tmp = this.goodsList.find(item => item.goodsCode == this.outbankList[0].goodsCode) let tmp = this.goodsList.find(item => item.goodsCode == this.outbankList[0].goodsCode);
this.outbankList[0].goodsId = tmp.id this.outbankList[0].goodsId = tmp.id;
if (tmp) { if (tmp) {
getLocationData({ getLocationData({
shId: val, shId: val,
goodsId:tmp.id goodsId: tmp.id,
}).then(res => { }).then(res => {
console.log('res--------',res) console.log('res--------', res);
let data = this.uniqueById(res.data.data.records) let data = this.uniqueById(res.data.data.records);
this.outbankList[0].locationList = data this.outbankList[0].locationList = data;
}) });
} }
} }
}) });
} else { } else {
this.outbankList = [] this.outbankList = [];
} }
}, },
changeUseType(outType) { changeUseType(outType) {},
},
changeData(row, fieldName) { changeData(row, fieldName) {
// //
@ -662,24 +699,20 @@ export default {
} }
const n = this.$number; const n = this.$number;
if ( if (fieldName === 'quantity' || fieldName === 'unitPrice' || fieldName === 'assQuantity') {
fieldName === "quantity" ||
fieldName === "unitPrice" ||
fieldName === "assQuantity"
) {
if (numAcc) { if (numAcc) {
abdMoneyVal = n.floatMul(priceVal, assQuantityVal, 2); abdMoneyVal = n.floatMul(priceVal, assQuantityVal, 2);
} else { } else {
abdMoneyVal = n.floatMul(priceVal, quantityVal, 2); abdMoneyVal = n.floatMul(priceVal, quantityVal, 2);
} }
this.$set(row, "abdMoney", abdMoneyVal); this.$set(row, 'abdMoney', abdMoneyVal);
} else { } else {
if (numAcc) { if (numAcc) {
priceVal = n.floatDiv(abdMoneyVal, assQuantityVal, 6); priceVal = n.floatDiv(abdMoneyVal, assQuantityVal, 6);
} else { } else {
priceVal = n.floatDiv(abdMoneyVal, quantityVal, 6); priceVal = n.floatDiv(abdMoneyVal, quantityVal, 6);
} }
this.$set(row, "abdMoney", abdMoneyVal); this.$set(row, 'abdMoney', abdMoneyVal);
} }
}, },
getMinBillDate() { getMinBillDate() {
@ -688,24 +721,20 @@ export default {
return { return {
disabledDate(time) { disabledDate(time) {
if (self.stOtherOutRecord.stAccBill.billDate) { if (self.stOtherOutRecord.stAccBill.billDate) {
return ( return new Date(self.stOtherOutRecord.stAccBill.billDate).getTime() > time.getTime();
new Date(self.stOtherOutRecord.stAccBill.billDate).getTime() >
time.getTime()
);
}
} }
},
}; };
}, },
submit() { submit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
this.outbankList.map(item => { this.outbankList.map(item => {
if (item.outQuantity > item.quantity) { if (item.outQuantity > item.quantity) {
this.$message.error('出库数量不可大于库存数量') this.$message.error('出库数量不可大于库存数量');
return return;
} }
}) });
// //
const submitData = this.outbankList.map(row => { const submitData = this.outbankList.map(row => {
const { piNoList, locationList, _select, ...validData } = row; // const { piNoList, locationList, _select, ...validData } = row; //
@ -713,32 +742,32 @@ export default {
}); });
let params = { let params = {
outList: submitData, outList: submitData,
stOtherOutRecord:this.stOtherOutRecord stOtherOutRecord: this.stOtherOutRecord,
} };
console.log('params',params) console.log('params', params);
addIssue(params).then(res => { addIssue(params).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message.success('保存成功') this.$message.success('保存成功');
this.outbankList.map((item, index) => { this.outbankList.map((item, index) => {
getLocationData({ getLocationData({
shId: this.stOtherOutRecord.shId, shId: this.stOtherOutRecord.shId,
goodsId: item.goodsId, goodsId: item.goodsId,
slId:item.slId slId: item.slId,
}).then(res => { }).then(res => {
item.piNoList = res.data.data.records item.piNoList = res.data.data.records;
let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo) let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo);
item.quantity = tmp.quantity item.quantity = tmp.quantity;
}) });
}) });
// this.outbankList = [] // this.outbankList = []
// this.stOtherOutRecord = {} // this.stOtherOutRecord = {}
// this.closeDialog(true) // this.closeDialog(true)
// this.onLoad() // this.onLoad()
} }
}) });
} }
}) });
// this.$message.success(""); // this.$message.success("");
// this.$refs.form.validate(formValid => { // this.$refs.form.validate(formValid => {
// if (formValid) { // if (formValid) {
@ -824,9 +853,9 @@ export default {
}, },
piCodeChange(id, item) { piCodeChange(id, item) {
this.stOtherOutRecord.taskCode = item.moCode; this.stOtherOutRecord.taskCode = item.moCode;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.item-choose { .item-choose {

@ -876,7 +876,6 @@ export default {
} }
}, },
partCodeChange(val,value,item) { partCodeChange(val,value,item) {
console.log(val, value,item,9090909090)
this.editForm.partName =item.partName this.editForm.partName =item.partName
}, },
submitEdit() { submitEdit() {
@ -1011,3 +1010,9 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
:deep(.el-dialog){
height: 85vh;
margin-top: 5vh;
}
</style>

@ -151,7 +151,6 @@ export default {
label: '化验时间', label: '化验时间',
prop: 'assayTime', prop: 'assayTime',
span: 24, span: 24,
type: 'datetime',
overflow: true, overflow: true,
search: false, search: false,
headerAlign: 'center', headerAlign: 'center',

@ -102,12 +102,12 @@ addBtnIcon: ' ',
delBtnIcon: ' ', delBtnIcon: ' ',
editBtnIcon: ' ', editBtnIcon: ' ',
searchShowBtn:false, searchShowBtn:false,
align: 'center', // align: 'center',
column: [ column: [
{ {
label: '菜单名称', label: '菜单名称',
prop: 'name', prop: 'name',
width: 300, width: 240,
search: true, search: true,
rules: [ rules: [
{ {

@ -0,0 +1,164 @@
<template>
<el-dialog
title="批量送检"
append-to-body
:modelValue="openShow"
width="90%"
@close="closeDialog"
>
<el-table
ref="xTable"
:loading="btnLoading"
:data="rowData"
border
show-overflow
class="el-table-element"
stripe
height="400px"
highlight-current-row
row-id="rowIndex"
>
<!-- <el-table-column type="checkbox" width="40" /> -->
<el-table-column label="物料编码" align="center" prop="goodsCode" min-width="120" />
<el-table-column label="物料名称" align="center" prop="goodsName" min-width="150" />
<el-table-column label="送检数量" align="center" prop="esQty" min-width="150">
<template #header>
<span><i style="color: red">*</i>送检数量</span>
</template>
<template #default="scope">
<!-- <el-input v-model="scope.row.esQty" placeholder="请输入" /> -->
<el-input-number v-model="scope.row.esQty" :min="0" label="请输入"></el-input-number>
</template>
</el-table-column>
<el-table-column label="送检部门" align="center" prop="esDeptId" min-width="150">
<template #header>
<span><i style="color: red">*</i>送检部门</span>
</template>
<template #default="scope">
<el-select
v-model="scope.row.esDeptId"
clearable
filterable
@change="deptChange(scope.row)"
>
<el-option
v-for="(item, index) in deplList"
:key="index"
:label="item.deptName"
:value="item.id"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="炉批号" align="center" prop="stovePiNo" min-width="100" />
<el-table-column label="型号/牌号" align="center" prop="specifications" min-width="100" />
<el-table-column label="生产标识" align="center" min-width="100" prop="quantityLevel" />
<el-table-column label="检验编号" align="center" prop="checkoutCode" width="100" />
<el-table-column label="供方代码" align="center" prop="splyCode" width="100" />
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import { getDeplList } from '@/api/flowManagement/index';
import { save } from '@/api/storeManagement/matureSubmission';
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
rowData: {
type: Array,
default: () => [],
},
},
data() {
return {
openShow: false,
deplList: [],
};
},
mounted() {
this.openShow = this.showDialog;
console.log('rowData', this.rowData);
this.getDeplLists();
},
methods: {
//
deptChange(row) {
let sel = this.deplList.filter(item => item.id == row.esDeptId)[0];
row.esDept = sel.deptName;
},
//
getDeplLists() {
getDeplList().then(res => {
let data = res.data.data;
data.forEach(item => {
if (item.deptName == '热表分厂') {
this.deplList = item.children || [];
}
});
});
},
closeDialog() {
this.openShow = false;
this.$emit('closeDialog');
},
submit() {
if (!this.rowData || this.rowData.length === 0) {
this.$message.warning('没有可提交的数据');
return;
}
// 2.
for (let i = 0; i < this.rowData.length; i++) {
const row = this.rowData[i];
// (esQty)
// el-input-number 0 0
// 0 null/undefined0 !row.esQty
if (row.esQty === null || row.esQty === undefined || row.esQty === '') {
this.$message.error(`${i + 1} 行数据的“送检数量”不能为空`);
return; //
}
// (esDeptId)
if (!row.esDeptId) {
this.$message.error(`${i + 1} 行数据的“送检部门”不能为空`);
return; //
}
}
// 3.
console.log('校验通过,准备提交数据:', this.rowData);
save(this.rowData)
.then(res => {
this.$message.success('送检成功');
this.closeDialog();
})
.catch(err => {
this.closeDialog();
});
// TODO:
// submitInspection(this.rowData).then(res => {
// if (res.data.code === 200) {
// this.$message.success('');
// this.closeDialog();
// }
// });
// this.$message.success('');
// this.closeDialog();
},
},
};
</script>
<style lang="scss" scoped></style>

@ -1,9 +1,22 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" v-model:search="search" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" <avue-crud
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" :option="option"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" v-model:search="search"
@refresh-change="refreshChange" @on-load="onLoad"> :table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left> <template #menu-left>
<!-- 批量送检 对接erp中的数据 --> <!-- 批量送检 对接erp中的数据 -->
<el-button type="primary" @click="allocationFun()">批量送检</el-button> <el-button type="primary" @click="allocationFun()">批量送检</el-button>
@ -18,25 +31,38 @@
<template #menu="scope"> <template #menu="scope">
<!-- <el-button type="text" @click="handle(scope.row.tbId)">调拨</el-button> --> <!-- <el-button type="text" @click="handle(scope.row.tbId)">调拨</el-button> -->
</template> </template>
</avue-crud> </avue-crud>
<!-- 到期送检 -->
<inspectionDialog
ref="inspectionDialog"
@closeDialog="closeDialog"
:showDialog="inspectionShow"
:rowData="rowData"
v-if="inspectionShow"
/>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList} from "@/api/storeManagement/matureSubmission" import { getList } from '@/api/storeManagement/matureSubmission';
import inspectionDialog from './InspectionDialog.vue';
export default { export default {
components: {
inspectionDialog,
},
data() { data() {
return { return {
inspectionShow: false,
selectionList: [], selectionList: [],
loading: false, loading: false,
search: { search: {
days:30 days: 30,
}, },
option: { option: {
height: 'auto', height: 'auto',
calcHeight: 32, calcHeight: 32,
tip: false, tip: false,
// size: 'medium',
simplePage: true, simplePage: true,
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
@ -90,7 +116,6 @@ export default {
{ {
label: '物料编码', label: '物料编码',
prop: 'goodsCode', prop: 'goodsCode',
// bind: 'coGoods.goodsCode',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -100,27 +125,16 @@ export default {
{ {
label: '物料名称', label: '物料名称',
prop: 'goodsName', prop: 'goodsName',
// bind: 'coGoods.goodsName',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
search: false, search: false,
width: 120, width: 120,
}, },
// {
// label: '',
// prop: 'shName',
// // bind: 'stRealtimeStock.coStorehouse.shName',
// sortable: true,
// filter: true,
// span: 12,
// search: false,
// width: 120,
// },
{ {
label: '所属仓库', label: '所属仓库',
prop: 'shName', prop: 'shName',
// bind: 'stRealtimeStock.storageLocation.location',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -131,7 +145,6 @@ export default {
{ {
label: '炉批号', label: '炉批号',
prop: 'stovePiNo', prop: 'stovePiNo',
// bind: 'stovePiNo',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -141,7 +154,6 @@ export default {
{ {
label: '检验编号', label: '检验编号',
prop: 'checkCode', prop: 'checkCode',
// bind: 'checkCode',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -151,7 +163,6 @@ export default {
{ {
label: '质量等级', label: '质量等级',
prop: 'quantityLevel', prop: 'quantityLevel',
// bind: 'quantityLevel',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -188,7 +199,6 @@ export default {
{ {
label: '送检人', label: '送检人',
prop: 'esMan', prop: 'esMan',
// bind: 'userName',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -197,75 +207,77 @@ export default {
}, },
{ {
label: '临期天数', label: '临期天数',
prop:"expireDays", prop: 'expireDays',
width:120 width: 120,
}, },
{ {
label: '到期状态', label: '到期状态',
prop: 'expireStatus', prop: 'expireStatus',
// bind: 'wsMan.userName',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
search: false, search: true,
width: 120, width: 120,
fixed: 'right',
type: 'select', type: 'select',
dicData: [ dicData: [
{ {
label: '到期', label: '即将到期',
value: 0 value: 0,
}, },
{ {
label: '已期', label: '已期',
value: 1 value: 1,
} },
] ],
}, },
{ {
label: '送检状态', label: '送检状态',
prop: 'applyFor', prop: 'applyFor',
// bind: 'wsMan.userName',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
search: true, search: true,
width: 120, width: 120,
type: 'select', type: 'select',
fixed: 'right',
dicData: [ dicData: [
{ {
label: '未送检', label: '未送检',
value: false value: false,
}, },
{ {
label: '已送检', label: '已送检',
value: true value: true,
}
]
}, },
],
]
}, },
form: { ],
}, },
form: {},
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
query:{} query: {},
} rowData:[]
};
}, },
methods: { methods: {
closeDialog() {
this.inspectionShow = false;
this.onLoad(this.page, this.query);
},
searchChange(params, done) { searchChange(params, done) {
this.query = params this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad() this.onLoad();
done() done();
}, },
searchReset() { searchReset() {
this.query = {} this.query = {};
this.onLoad() this.onLoad();
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
@ -273,17 +285,32 @@ export default {
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
}, },
warehousing() { warehousing() {},
warehousingLog() {},
},
warehousingLog() {
},
searchData(type) { searchData(type) {
this.query.expireStatus = type this.query.expireStatus = type;
this.onLoad() this.onLoad();
}, },
allocationFun(arId) { //
allocationFun() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
const allUninspected = this.selectionList.every(item => item.applyFor === false);
if (!allUninspected) {
this.$message.error('只能对“未送检”的数据进行批量送检,请检查选中项');
return;
}
this.selectionList.forEach(item => {
item.esDept = '' //
item.esQty = '' //
item.esDeptId='' //id
});
this.rowData = this.selectionList
this.inspectionShow = true
// this.$confirm('', '', { // this.$confirm('', '', {
// confirmButtonText: '', // confirmButtonText: '',
// cancelButtonText: '', // cancelButtonText: '',
@ -320,66 +347,25 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {});
})
}, },
// //
selectionChange(list) { selectionChange(list) {
this.selectionList = list; this.selectionList = list;
}, },
onLoad() { onLoad() {
this.loading = true this.loading = true;
getList({ getList({
current: this.page.currentPage, current: this.page.currentPage,
size: this.page.pageSize, size: this.page.pageSize,
...this.query ...this.query,
}).then(res => { }).then(res => {
this.data = res.data.data.records this.data = res.data.data.records;
console.log('data-----------',this.data) this.page.total = res.data.data.total;
this.page.total = res.data.data.total this.loading = false;
this.loading = false });
}) },
// this.data = [ },
// { };
// "wsCode": "34544554",
// "goodsCode": "876788",
// "goodsName": "",
// "shName": "",
// "location": "()",
// "stovePiNo": "87889",
// "checkCode": "8767677",
// "quantityLevel": "",
// "wsQty": 89,
// "wsDept": "",
// "wsTime": "2025-10-09",
// "userName": "",
// "status": "",
// "statusTitle": ""
// },
// {
// "wsCode": "34544554",
// "goodsCode": "876788",
// "goodsName": "",
// "shName": "",
// "location": "",
// "stovePiNo": "87889",
// "checkCode": "8767677",
// "quantityLevel": "",
// "wsQty": 89,
// "wsDept": "",
// "wsTime": "2025-10-09",
// "userName": "",
// "status": "",
// "statusTitle": ""
// }
// ]
// this.page.total = this.data.length
// this.loading = false
// setTimeout(() => {
// this.selectionClear()
// }, 500)
}
}
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
Loading…
Cancel
Save