|
@ -49,8 +49,7 @@ |
|
|
:MaxResultCount="MaxResultCountDetails" |
|
|
:MaxResultCount="MaxResultCountDetails" |
|
|
@alterResultCountDetails="alterResultCountDetails" |
|
|
@alterResultCountDetails="alterResultCountDetails" |
|
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|
|
@buttonClick="currenDrawerButtonClick" |
|
|
@buttonClick="currenDrawerButtonClick"> |
|
|
> |
|
|
|
|
|
<template v-if="currentTagName == 'hz' "> |
|
|
<template v-if="currentTagName == 'hz' "> |
|
|
<!-- @buttonClick="buttonClick" --> |
|
|
<!-- @buttonClick="buttonClick" --> |
|
|
<el-table-column |
|
|
<el-table-column |
|
@ -71,25 +70,26 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</template> |
|
|
</template> |
|
|
</curren-Drawer> |
|
|
</curren-Drawer> |
|
|
|
|
|
<!-- 检验弹窗 --> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="检验" |
|
|
:title="isBatchInspect ? '批量检验' : '检验'" |
|
|
:visible.sync="inspectShow" |
|
|
:visible.sync="inspectShow" |
|
|
top="5vh" |
|
|
top="5vh" |
|
|
width="88%" |
|
|
width="88%" |
|
|
:modal-append-to-body="false" |
|
|
:modal-append-to-body="false" |
|
|
:append-to-body="true" |
|
|
:append-to-body="true" |
|
|
:show-close="false" |
|
|
:show-close="false"> |
|
|
> |
|
|
|
|
|
<el-row :gutter="24"> |
|
|
<el-row :gutter="24"> |
|
|
<el-col :span="14" > |
|
|
<el-col :span="14" > |
|
|
<curren-Form |
|
|
<curren-Form |
|
|
|
|
|
ref="inspectForm_Ref" |
|
|
class="handleForm" |
|
|
class="handleForm" |
|
|
size="medium" |
|
|
size="medium" |
|
|
:searchData="inspectFormData" |
|
|
:searchData="inspectFormData" |
|
|
:searchForm="inspectForm" |
|
|
:searchForm="inspectForm" |
|
|
:searchHandle="inspectHandle" |
|
|
:searchHandle="inspectHandle" |
|
|
:rules="inspectRules" |
|
|
:rules="inspectRules" |
|
|
@submitForm="inspectFormClick(arguments)" |
|
|
@submitForm="isBatchInspect ? inspectFormBtachClick(arguments) : inspectFormClick(arguments)" |
|
|
> |
|
|
> |
|
|
<currenTable |
|
|
<currenTable |
|
|
class="jyTable" |
|
|
class="jyTable" |
|
@ -144,8 +144,7 @@ |
|
|
width="50%" |
|
|
width="50%" |
|
|
:modal-append-to-body="false" |
|
|
:modal-append-to-body="false" |
|
|
:append-to-body="true" |
|
|
:append-to-body="true" |
|
|
:show-close="false" |
|
|
:show-close="false"> |
|
|
> |
|
|
|
|
|
<curren-Form |
|
|
<curren-Form |
|
|
class="handleForm" |
|
|
class="handleForm" |
|
|
size="medium" |
|
|
size="medium" |
|
@ -156,6 +155,7 @@ |
|
|
> |
|
|
> |
|
|
</curren-Form> |
|
|
</curren-Form> |
|
|
</el-dialog> --> |
|
|
</el-dialog> --> |
|
|
|
|
|
<!-- 质检详情 --> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="质检详情" |
|
|
title="质检详情" |
|
|
v-loading="loading" |
|
|
v-loading="loading" |
|
@ -191,6 +191,7 @@ |
|
|
<el-col :span="8"> |
|
|
<el-col :span="8"> |
|
|
<el-button type="primary" @click="query">查询</el-button> |
|
|
<el-button type="primary" @click="query">查询</el-button> |
|
|
<el-button type="primary" @click="reset">重置</el-button> |
|
|
<el-button type="primary" @click="reset">重置</el-button> |
|
|
|
|
|
<el-button type="warning" @click="batchInspectHandle">批量不合格</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</template> |
|
|
</template> |
|
@ -199,46 +200,99 @@ |
|
|
prop="details" |
|
|
prop="details" |
|
|
> |
|
|
> |
|
|
<umyTable |
|
|
<umyTable |
|
|
|
|
|
ref="inspectNoticeDetails_table_ref" |
|
|
:setUTableHeight="470" |
|
|
:setUTableHeight="470" |
|
|
:tableData="inspectNoticeDetailsFormData.details" |
|
|
:tableData="inspectNoticeDetailsFormData.details" |
|
|
:tableColumns="inspectNoticeDetailsTableColumns" |
|
|
:tableColumns="inspectNoticeDetailsTableColumns" |
|
|
:tableLoading = "inspectNoticeDetailsTableLoading" |
|
|
:tableLoading = "inspectNoticeDetailsTableLoading" |
|
|
:isShowIndex="true" |
|
|
:isShowIndex="true" |
|
|
:selectionTable="false" |
|
|
:selectionTable="true" |
|
|
:cellClassName="cellClassName" |
|
|
:cellClassName="cellClassName" |
|
|
:tableBorder="true" |
|
|
:tableBorder="true" |
|
|
:tableAlign="'center'" |
|
|
:tableAlign="'center'" |
|
|
:tableHeaderAlign="'center'" |
|
|
:tableHeaderAlign="'center'" |
|
|
@buttonClick="inspectDetailsButtonClick" |
|
|
@buttonClick="inspectDetailsButtonClick" |
|
|
|
|
|
@handleSelectionChange="handleSelectDetailZJ" |
|
|
> |
|
|
> |
|
|
</umyTable> |
|
|
</umyTable> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
|
</curren-Form> |
|
|
</curren-Form> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<pdf |
|
|
<pdf |
|
|
:urlPDF="urlPDF" |
|
|
:urlPDF="urlPDF" |
|
|
:base64PDF="base64PDF" |
|
|
:base64PDF="base64PDF" |
|
|
:title="titlePDF" |
|
|
:title="titlePDF" |
|
|
v-if="isShowPDF" |
|
|
v-if="isShowPDF" |
|
|
:isShowPDF="isShowPDF" |
|
|
:isShowPDF="isShowPDF" |
|
|
:loadingPDF="loadingPDF" |
|
|
:loadingPDF="loadingPDF" |
|
|
@closePDF="closePDF" |
|
|
@closePDF="closePDF" |
|
|
:showDownLoad="true" |
|
|
:showDownLoad="true" |
|
|
></pdf> |
|
|
></pdf> |
|
|
|
|
|
<!-- 拆箱弹窗 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="拆箱" |
|
|
|
|
|
v-loading="devanLoading" |
|
|
|
|
|
:visible.sync="devanShow" |
|
|
|
|
|
top="10vh" |
|
|
|
|
|
width="800px" |
|
|
|
|
|
:modal-append-to-body="false" |
|
|
|
|
|
:append-to-body="true" |
|
|
|
|
|
:show-close="false"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<el-form :inline="true" :model="devanForm" class="demo-form-inline"> |
|
|
|
|
|
<el-form-item label="拆出数量"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
type="number" |
|
|
|
|
|
v-model="devanForm.qty" |
|
|
|
|
|
placeholder="拆出数量" |
|
|
|
|
|
oninput="value = parseInt(value.replace(/[^\d]/g, ''))" |
|
|
|
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<!-- <currenTableFlex |
|
|
|
|
|
style="width:500px;margin:0 auto" |
|
|
|
|
|
:flexTableData="flexTableData" |
|
|
|
|
|
:flexSearchOptions="editOptions" |
|
|
|
|
|
:flexTableColumns="flexTableColumns" |
|
|
|
|
|
:showAddBtn="true" |
|
|
|
|
|
:showAllDeleteButton="true" |
|
|
|
|
|
></currenTableFlex> --> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="devanCancelHandel">取 消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="devanSureHandel">确定拆箱</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import { getPageList, fileStorage, getListByItemcode, getDetailed,getFilestore } from "@/api/wms-api" |
|
|
import { |
|
|
import { completeSummaryDetailStatus, setDetailDefaultOkStatus, setDetailOkStatus, setDetailNookStatus } from "@/api/wms-job" |
|
|
getPageList, |
|
|
|
|
|
fileStorage, |
|
|
|
|
|
getListByItemcode, |
|
|
|
|
|
getDetailed, |
|
|
|
|
|
getFilestore, |
|
|
|
|
|
InspectSplitPackingk |
|
|
|
|
|
} from "@/api/wms-api" |
|
|
|
|
|
import { postSplitPackingInspect,postInventoryLabelCode_count } from "@/api/wms-core" |
|
|
|
|
|
import { |
|
|
|
|
|
completeSummaryDetailStatus, |
|
|
|
|
|
setDetailDefaultOkStatus, |
|
|
|
|
|
setDetailOkStatus, |
|
|
|
|
|
setDetailNookStatus, |
|
|
|
|
|
setBatchDetailStatus |
|
|
|
|
|
} from "@/api/wms-job" |
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" |
|
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" |
|
|
import { mixins } from "@/mixins/mixins" |
|
|
import { mixins } from "@/mixins/mixins" |
|
|
import currenDescriptions from "@/components/currenDescriptions" |
|
|
import currenDescriptions from "@/components/currenDescriptions" |
|
|
|
|
|
import currenTableFlex from "@/components/currenTableFlex" |
|
|
import pdf from "@/components/pdf" |
|
|
import pdf from "@/components/pdf" |
|
|
|
|
|
import store from '@/store' |
|
|
import zh from '@/lang/zh' |
|
|
import zh from '@/lang/zh' |
|
|
let _Names = zh.ColumsNames // 业务字段 |
|
|
let _Names = zh.ColumsNames // 业务字段 |
|
|
|
|
|
|
|
@ -253,6 +307,7 @@ export default { |
|
|
], |
|
|
], |
|
|
components: { |
|
|
components: { |
|
|
currenDescriptions, |
|
|
currenDescriptions, |
|
|
|
|
|
currenTableFlex, |
|
|
pdf |
|
|
pdf |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
@ -263,7 +318,19 @@ export default { |
|
|
uploadShow: false, |
|
|
uploadShow: false, |
|
|
supplierShow: false, |
|
|
supplierShow: false, |
|
|
inspectShow: false, |
|
|
inspectShow: false, |
|
|
|
|
|
// 拆箱表格信息 |
|
|
|
|
|
// flexTableData:[{qty:null}], |
|
|
|
|
|
devanForm:{qty:null}, |
|
|
|
|
|
// 拆箱表格头部信息 |
|
|
|
|
|
// flexTableColumns:[ |
|
|
|
|
|
// {type:'inputNumber', label: "数量", prop: "qty", width:"auto",min:1 }, |
|
|
|
|
|
// ], |
|
|
|
|
|
devanShow:false,//拆箱弹窗 |
|
|
|
|
|
devanLoading:false,//拆箱弹窗加载 |
|
|
|
|
|
devanCurrentRow:null,//拆箱当条行数据 |
|
|
|
|
|
devanCurrentPackInfo:null,//拆箱当条行箱码对应信息 |
|
|
inspectNoticeDetailsShow: false, |
|
|
inspectNoticeDetailsShow: false, |
|
|
|
|
|
summaryCurrentRow:null, |
|
|
loading:false, |
|
|
loading:false, |
|
|
// 作业指导书loading |
|
|
// 作业指导书loading |
|
|
guideBookLoading:false, |
|
|
guideBookLoading:false, |
|
@ -275,6 +342,7 @@ export default { |
|
|
masterID: '', |
|
|
masterID: '', |
|
|
// 明细table表中记录的rowid,方便合格不合格后数据更新 |
|
|
// 明细table表中记录的rowid,方便合格不合格后数据更新 |
|
|
rowId: '', |
|
|
rowId: '', |
|
|
|
|
|
rowReceiveQty: null, |
|
|
// pdf预览路径 |
|
|
// pdf预览路径 |
|
|
urlPDF: '', |
|
|
urlPDF: '', |
|
|
// 纯base64(去掉data:application/pdf;base64,) |
|
|
// 纯base64(去掉data:application/pdf;base64,) |
|
@ -350,27 +418,9 @@ export default { |
|
|
// inspectUserName: null, |
|
|
// inspectUserName: null, |
|
|
// receiveUom: null, |
|
|
// receiveUom: null, |
|
|
}, |
|
|
}, |
|
|
inspectForm: [ |
|
|
inspectForm: [], |
|
|
{ type: "input", label: _Names.itemCode, prop: "itemCode", disabled: true, colSpan: 12 }, |
|
|
inspectHandle: [], |
|
|
{ type: "input", label: "物品名称", prop: "itemName", disabled: true, colSpan: 12 }, |
|
|
inspectRules: {}, |
|
|
{ type: "input", label: "箱码", prop: "packingCode", disabled: true, colSpan: 12 }, |
|
|
|
|
|
{ type: "select", label: "外观", prop: "appearance", options: "inspectAppearanceStatus", colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "尺寸", prop: "volume", colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "重量", prop: "weight", colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "检验数量", prop: "inspectQty", colSpan: 12 }, |
|
|
|
|
|
{ type: "button", label: "其他", buttonText: "添加", click: (val) => { this.inspectAddTable(val) }, colSpan: 24 }, |
|
|
|
|
|
], |
|
|
|
|
|
inspectHandle: [ |
|
|
|
|
|
{ label: "合格", name: "hege", type:"success" }, |
|
|
|
|
|
{ label: "不合格", name: "buhege", type:"danger" }, |
|
|
|
|
|
{ label: "取消", name: "cancel" }, |
|
|
|
|
|
], |
|
|
|
|
|
inspectRules: { |
|
|
|
|
|
appearance: { required: true, trigger: "blur", message: "不可为空" }, |
|
|
|
|
|
// volume: { required: true, trigger: "blur", message: "不可为空" }, |
|
|
|
|
|
// weight: { required: true, trigger: "blur", message: "不可为空" }, |
|
|
|
|
|
inspectQty: { required: true, trigger: "blur", message: "不可为空" }, |
|
|
|
|
|
}, |
|
|
|
|
|
inspectOptions:{}, |
|
|
inspectOptions:{}, |
|
|
inspectDetailsTableColumns:[ |
|
|
inspectDetailsTableColumns:[ |
|
|
{ type: "input", label: "名称", prop: "name", width:'100%' }, |
|
|
{ type: "input", label: "名称", prop: "name", width:'100%' }, |
|
@ -479,7 +529,7 @@ export default { |
|
|
{ type: "input", label: "不合格数量", prop: "failedQty", disabled: true, colSpan: 8 }, |
|
|
{ type: "input", label: "不合格数量", prop: "failedQty", disabled: true, colSpan: 8 }, |
|
|
{ type: "input", label: "合格数量", prop: "goodQty", disabled: true, colSpan: 8 }, |
|
|
{ type: "input", label: "合格数量", prop: "goodQty", disabled: true, colSpan: 8 }, |
|
|
{ type: "select", label: "ABC类", prop: "abcClass", options: "abcClass", clearable: true, filterable: true, disabled: true, allowCreate: true, colSpan: 8 }, |
|
|
{ type: "select", label: "ABC类", prop: "abcClass", options: "abcClass", clearable: true, filterable: true, disabled: true, allowCreate: true, colSpan: 8 }, |
|
|
{ type: "uploadList", label: "检验报告", prop: "formFile", limit: 1, picExt: ".pdf", colSpan: 12 }, |
|
|
{ type: "uploadList", label: "供应商自检报告", prop: "formFile", limit: 1, picExt: ".pdf", colSpan: 12 }, |
|
|
], |
|
|
], |
|
|
inspectNoticeDetailsRules: { |
|
|
inspectNoticeDetailsRules: { |
|
|
// formFile: { required: true, trigger: "change", message: "不可为空" }, |
|
|
// formFile: { required: true, trigger: "change", message: "不可为空" }, |
|
@ -496,8 +546,20 @@ export default { |
|
|
// { label: "单位", prop: "receiveUom", width:'100%' }, |
|
|
// { label: "单位", prop: "receiveUom", width:'100%' }, |
|
|
{ label: "收货数量", prop: "receiveQty", width:'100%' }, |
|
|
{ label: "收货数量", prop: "receiveQty", width:'100%' }, |
|
|
{ label: "状态", prop: "detailInspectStatus", type: "filter", filters: "detailInspectStatus", width:'100%' }, |
|
|
{ label: "状态", prop: "detailInspectStatus", type: "filter", filters: "detailInspectStatus", width:'100%' }, |
|
|
{ type: "button", label: "检验", prop: "buttonHide",alwaysShow:true, width:'100%' }, |
|
|
{ type: "button", |
|
|
{ type: "button", label: "清除检验", alwaysShow:true,width:'100%' }, |
|
|
label: "拆箱", |
|
|
|
|
|
alwaysShow:true, |
|
|
|
|
|
width:'130px', |
|
|
|
|
|
hasButton:((scope,item)=>{ |
|
|
|
|
|
if(scope.row.detailInspectStatus != 1){ |
|
|
|
|
|
return false |
|
|
|
|
|
}else{ |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
{ type: "button", label: "检验", prop: "buttonHide",alwaysShow:true, width:'130px' }, |
|
|
|
|
|
{ type: "button", label: "清除检验", alwaysShow:true,width:'150px' }, |
|
|
], |
|
|
], |
|
|
//查询质检详情-表单数据 |
|
|
//查询质检详情-表单数据 |
|
|
QueryDetailsFormData: { |
|
|
QueryDetailsFormData: { |
|
@ -527,12 +589,84 @@ export default { |
|
|
name: 'mx', |
|
|
name: 'mx', |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
|
|
|
// 是否是批量检验 |
|
|
|
|
|
isBatchInspect:false, |
|
|
|
|
|
selectedDetailZJ:[], |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
mounted () { |
|
|
this.paging(); |
|
|
this.paging(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 节点根据是否批量判断显示 |
|
|
|
|
|
initDomIfBatch(){ |
|
|
|
|
|
this.initInspectRules() |
|
|
|
|
|
this.initInspectHandle() |
|
|
|
|
|
this.initInspectForm() |
|
|
|
|
|
}, |
|
|
|
|
|
// 检验表单数据格式化 |
|
|
|
|
|
initInspectForm(){ |
|
|
|
|
|
if(this.isBatchInspect){ |
|
|
|
|
|
this.inspectForm = [ |
|
|
|
|
|
{ type: "input", label: _Names.itemCode, prop: "itemCode", disabled: true, colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "物品名称", prop: "itemName", disabled: true, colSpan: 12 }, |
|
|
|
|
|
{ type: "select", label: "外观", prop: "appearance", options: "inspectAppearanceStatus", colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "重量", prop: "weight", colSpan: 12 }, |
|
|
|
|
|
{ type: "button", label: "其他", buttonText: "添加", click: (val) => { this.inspectAddTable(val) }, colSpan: 24 }, |
|
|
|
|
|
] |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.inspectForm = [ |
|
|
|
|
|
{ type: "input", label: _Names.itemCode, prop: "itemCode", disabled: true, colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "物品名称", prop: "itemName", disabled: true, colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "箱码", prop: "packingCode", disabled: true, colSpan: 12 }, |
|
|
|
|
|
{ type: "select", label: "外观", prop: "appearance", options: "inspectAppearanceStatus", colSpan: 12 }, |
|
|
|
|
|
// { type: "input", label: "尺寸", prop: "volume", colSpan: 12 }, |
|
|
|
|
|
{ type: "input", label: "重量", prop: "weight", colSpan: 12 }, |
|
|
|
|
|
{ type: "inputNumber", label: "检验数量", prop: "inspectQty", colSpan: 12 }, |
|
|
|
|
|
{ type: "button", label: "其他", buttonText: "添加", click: (val) => { this.inspectAddTable(val) }, colSpan: 24 }, |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 检验表单验证格式化 |
|
|
|
|
|
initInspectRules(){ |
|
|
|
|
|
if(this.isBatchInspect){ |
|
|
|
|
|
this.inspectRules = {} |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.inspectRules = { |
|
|
|
|
|
appearance: { required: true, trigger: "blur", message: "不可为空" }, |
|
|
|
|
|
inspectQty: [ |
|
|
|
|
|
{ required: true, trigger: "blur", message: "不可为空" }, |
|
|
|
|
|
{ |
|
|
|
|
|
type: "number", |
|
|
|
|
|
trigger: ["blur"], |
|
|
|
|
|
validator: (rule, value, callback) => { |
|
|
|
|
|
if(Number(value) > Number(this.rowReceiveQty) || Number(value) <= 0){ |
|
|
|
|
|
return callback(new Error(`数量必须大于0且不能大于收货数量${this.rowReceiveQty}`)) |
|
|
|
|
|
}else{ |
|
|
|
|
|
callback() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 检验表单按钮格式化 |
|
|
|
|
|
initInspectHandle(){ |
|
|
|
|
|
if(this.isBatchInspect){ |
|
|
|
|
|
this.inspectHandle=[ |
|
|
|
|
|
{ label: "批量不合格", name: "batchBuhege", type:"danger" }, |
|
|
|
|
|
{ label: "取消", name: "batchcancel" }, |
|
|
|
|
|
] |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.inspectHandle=[ |
|
|
|
|
|
{ label: "合格", name: "hege", type:"success" }, |
|
|
|
|
|
{ label: "不合格", name: "buhege", type:"danger" }, |
|
|
|
|
|
{ label: "取消", name: "cancel" }, |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
// 抽屉内部按钮 |
|
|
// 抽屉内部按钮 |
|
|
currenDrawerButtonClick(val,index, label,item){ |
|
|
currenDrawerButtonClick(val,index, label,item){ |
|
|
if(item.prop == "inspectReport"){ |
|
|
if(item.prop == "inspectReport"){ |
|
@ -596,7 +730,7 @@ export default { |
|
|
this.tableData = res.items |
|
|
this.tableData = res.items |
|
|
this.totalCount = res.totalCount |
|
|
this.totalCount = res.totalCount |
|
|
if (res.items.length > 0 ) { |
|
|
if (res.items.length > 0 ) { |
|
|
this.inlineDialog(res.items[0]) |
|
|
// this.inlineDialog(res.items[0]) |
|
|
} else { |
|
|
} else { |
|
|
this.$errorMsg(val + '发货单没有检验任务') |
|
|
this.$errorMsg(val + '发货单没有检验任务') |
|
|
} |
|
|
} |
|
@ -607,13 +741,17 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 汇总table按钮 |
|
|
// 检验详情按钮 |
|
|
buttonClick(row) { |
|
|
async buttonClick(row) { |
|
|
// 判断状态为完成情况下,不可点击 |
|
|
// 判断状态为完成情况下,不可点击 |
|
|
if (row.summaryInspectStatus == 2) { |
|
|
if (row.summaryInspectStatus == 2) { |
|
|
this.$message.error('已完成质检') |
|
|
this.$message.error('已完成质检') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
let _fleshDeatils = await getDetailed(this.propsData.id, this.URL) |
|
|
|
|
|
this.tableDataDetails = JSON.parse(JSON.stringify(_fleshDeatils)) |
|
|
|
|
|
let _fleshSummarys = _fleshDeatils.summaryDetails.filter(item=>{return item.id == row.id}) |
|
|
|
|
|
this.summaryCurrentRow = _fleshSummarys[0] |
|
|
// 展现 质检详情窗口 |
|
|
// 展现 质检详情窗口 |
|
|
this.Loading.appMainLoading = true |
|
|
this.Loading.appMainLoading = true |
|
|
setTimeout(()=>{ |
|
|
setTimeout(()=>{ |
|
@ -668,7 +806,7 @@ export default { |
|
|
// inspectUserPhone: null, |
|
|
// inspectUserPhone: null, |
|
|
// stdPackUom: null, |
|
|
// stdPackUom: null, |
|
|
} |
|
|
} |
|
|
this.$listAssign(this.inspectNoticeDetailsFormData, row) |
|
|
this.$listAssign(this.inspectNoticeDetailsFormData, this.summaryCurrentRow) |
|
|
let findRs = this.tableDataDetails.details.filter(item => ( |
|
|
let findRs = this.tableDataDetails.details.filter(item => ( |
|
|
item.itemCode == row.itemCode |
|
|
item.itemCode == row.itemCode |
|
|
)) |
|
|
)) |
|
@ -727,18 +865,79 @@ export default { |
|
|
inspectButtonClick(row, index, label) { |
|
|
inspectButtonClick(row, index, label) { |
|
|
this.inspectFormData.details.splice(row.$index, 1) |
|
|
this.inspectFormData.details.splice(row.$index, 1) |
|
|
}, |
|
|
}, |
|
|
// 质检详情-检验按钮 table中按钮 |
|
|
async resetInspectForm(row) { |
|
|
inspectDetailsButtonClick(row, index, label) { |
|
|
let _fleshDeatils = await getDetailed(this.propsData.id, this.URL) |
|
|
// console.log('质检详情-检验按钮 table中按钮', row) |
|
|
let _fleshRow = _fleshDeatils.details.filter(item=>{return item.id == row.id})[0] |
|
|
this.masterID = this.propsData.id |
|
|
// this.inspectFormData.inspectQty = null |
|
|
|
|
|
// this.$refs.inspectForm_Ref.resetCurrenForm() |
|
|
|
|
|
let _detailTable = '[]' |
|
|
|
|
|
if(_fleshRow.otherPropertyJson && _fleshRow.otherPropertyJson != '' && _fleshRow.otherPropertyJson != 'null'){ |
|
|
|
|
|
_detailTable = JSON.parse(JSON.stringify(_fleshRow.otherPropertyJson)) |
|
|
|
|
|
} |
|
|
|
|
|
this.inspectFormData = JSON.parse(JSON.stringify(_fleshRow)) |
|
|
|
|
|
this.inspectFormData.details = JSON.parse(_detailTable) |
|
|
|
|
|
// 默认合格时候检查数量默认赋值 |
|
|
|
|
|
if(_fleshRow.detailInspectStatus == 1){ |
|
|
|
|
|
this.inspectFormData.appearance = '' |
|
|
|
|
|
this.inspectFormData.volume = '' |
|
|
|
|
|
this.inspectFormData.weight = '' |
|
|
|
|
|
this.inspectFormData.otherPropertyJson = '[]' |
|
|
|
|
|
this.inspectFormData.details = [] |
|
|
|
|
|
this.inspectFormData.inspectQty = _fleshRow.receiveQty |
|
|
|
|
|
} |
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
this.$refs.inspectForm_Ref.clearValidate() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
resetInspectFormBatch(){ |
|
|
|
|
|
this.inspectFormData = JSON.parse(JSON.stringify(this.selectedDetailZJ[0])) |
|
|
this.inspectFormData.appearance = '' |
|
|
this.inspectFormData.appearance = '' |
|
|
this.inspectFormData.volume = '' |
|
|
this.inspectFormData.volume = '' |
|
|
this.inspectFormData.weight = '' |
|
|
this.inspectFormData.weight = '' |
|
|
this.inspectFormData.inspectQty = '' |
|
|
this.inspectFormData.otherPropertyJson = '[]' |
|
|
this.inspectFormData.details = [] |
|
|
this.inspectFormData.details = [] |
|
|
this.$listAssign(this.inspectFormData, row) |
|
|
this.inspectFormData.inspectQty = 0 |
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
this.$refs.inspectForm_Ref.clearValidate() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 质检详情-检验按钮 table中按钮 |
|
|
|
|
|
inspectDetailsButtonClick(row, index, label) { |
|
|
|
|
|
// console.log('质检详情-检验按钮 table中按钮', row) |
|
|
|
|
|
this.masterID = this.propsData.id |
|
|
// console.log('质检详情-检验按钮 label', label) |
|
|
// console.log('质检详情-检验按钮 label', label) |
|
|
if (label == '检验') { |
|
|
if(label == '拆箱'){ |
|
|
|
|
|
this.devanCurrentRow = row |
|
|
|
|
|
let params = { |
|
|
|
|
|
condition: { |
|
|
|
|
|
filters: [ |
|
|
|
|
|
{ |
|
|
|
|
|
logic: "And", |
|
|
|
|
|
column: "code", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: row.packingCode |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
Sorting: "", |
|
|
|
|
|
SkipCount: 0, |
|
|
|
|
|
MaxResultCount: 20 |
|
|
|
|
|
} |
|
|
|
|
|
this.Loading.appMainLoading = true |
|
|
|
|
|
// 获取箱码相关信息 |
|
|
|
|
|
getPageList(params, "label/inventory-label").then(res => { |
|
|
|
|
|
this.devanCurrentPackInfo = res.items[0] |
|
|
|
|
|
this.Loading.appMainLoading = false |
|
|
|
|
|
this.devanShow = true |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
this.$errorMsg("获取箱数据失败,请重试!") |
|
|
|
|
|
this.Loading.appMainLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
else if (label == '检验') { |
|
|
|
|
|
this.isBatchInspect = false |
|
|
|
|
|
this.initDomIfBatch() |
|
|
|
|
|
this.rowReceiveQty = row.receiveQty |
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/item-guide-book').then(res => { |
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/item-guide-book').then(res => { |
|
|
if (res.length > 0) { |
|
|
if (res.length > 0) { |
|
|
this.guideBookData = res[0] |
|
|
this.guideBookData = res[0] |
|
@ -746,11 +945,13 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.guideBookData = [] |
|
|
this.guideBookData = [] |
|
|
this.blobName = '' |
|
|
this.blobName = '' |
|
|
document.getElementById("uploadPictureCardGuideBook").innerHTML = '' |
|
|
if(document.getElementById("uploadPictureCardGuideBook"))document.getElementById("uploadPictureCardGuideBook").innerHTML = '' |
|
|
} |
|
|
} |
|
|
|
|
|
this.resetInspectForm(row) |
|
|
this.inspectShow = true |
|
|
this.inspectShow = true |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
|
|
|
this.resetInspectForm(row) |
|
|
this.inspectShow = true |
|
|
this.inspectShow = true |
|
|
}) |
|
|
}) |
|
|
this.rowId = row.id |
|
|
this.rowId = row.id |
|
@ -761,7 +962,7 @@ export default { |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.inspectNoticeDetailsTableLoading = true |
|
|
this.inspectNoticeDetailsTableLoading = true |
|
|
setDetailDefaultOkStatus({detailId: this.inspectFormData.id}, this.masterID).then(res => { |
|
|
setDetailDefaultOkStatus({detailId: row.id}, this.masterID).then(res => { |
|
|
this.$message.success('成功清除检验!') |
|
|
this.$message.success('成功清除检验!') |
|
|
// 更新数据============================================================ |
|
|
// 更新数据============================================================ |
|
|
// this.$listAssign(this.inspectNoticeDetailsFormData, res) |
|
|
// this.$listAssign(this.inspectNoticeDetailsFormData, res) |
|
@ -799,6 +1000,36 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 批量操作表格选择 |
|
|
|
|
|
handleSelectDetailZJ(val){ |
|
|
|
|
|
this.selectedDetailZJ = val; |
|
|
|
|
|
}, |
|
|
|
|
|
// 批量不合格操作 |
|
|
|
|
|
batchInspectHandle(){ |
|
|
|
|
|
this.isBatchInspect = true |
|
|
|
|
|
this.initDomIfBatch() |
|
|
|
|
|
if(!this.selectedDetailZJ || this.selectedDetailZJ.length <= 0){ |
|
|
|
|
|
this.$warningMsg("至少选择一条数据") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
let row = this.selectedDetailZJ[0] |
|
|
|
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/item-guide-book').then(res => { |
|
|
|
|
|
if (res.length > 0) { |
|
|
|
|
|
this.guideBookData = res[0] |
|
|
|
|
|
this.guideBookDatePicture(res[0].pictureBlobName) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.guideBookData = [] |
|
|
|
|
|
this.blobName = '' |
|
|
|
|
|
if(document.getElementById("uploadPictureCardGuideBook"))document.getElementById("uploadPictureCardGuideBook").innerHTML = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.resetInspectFormBatch() |
|
|
|
|
|
this.inspectShow = true |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
this.resetInspectFormBatch() |
|
|
|
|
|
this.inspectShow = true |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 检验详情 底部按钮 |
|
|
// 检验详情 底部按钮 |
|
|
formClick(val){ |
|
|
formClick(val){ |
|
|
if (val[0] == 0) { |
|
|
if (val[0] == 0) { |
|
@ -827,10 +1058,8 @@ export default { |
|
|
// 判断检验数量是否满足 要求质检数量 |
|
|
// 判断检验数量是否满足 要求质检数量 |
|
|
// let jyslSum = 0 |
|
|
// let jyslSum = 0 |
|
|
// this.inspectNoticeDetailsFormData.details.forEach(element => { |
|
|
// this.inspectNoticeDetailsFormData.details.forEach(element => { |
|
|
// console.log('element.inspectQty',element.inspectQty) |
|
|
|
|
|
// jyslSum += element.inspectQty == undefined?0:element.inspectQty |
|
|
// jyslSum += element.inspectQty == undefined?0:element.inspectQty |
|
|
// }) |
|
|
// }) |
|
|
// console.log(jyslSum) |
|
|
|
|
|
if (this.inspectNoticeDetailsFormData.inspectQty < this.inspectNoticeDetailsFormData.sampleQty) { |
|
|
if (this.inspectNoticeDetailsFormData.inspectQty < this.inspectNoticeDetailsFormData.sampleQty) { |
|
|
this.$message.error('实际检验数量小于要求检验数量,请继续检验!'); |
|
|
this.$message.error('实际检验数量小于要求检验数量,请继续检验!'); |
|
|
return |
|
|
return |
|
@ -850,7 +1079,6 @@ export default { |
|
|
bytes: arrayBuffer.substring(arrayBuffer.lastIndexOf(',')+1,arrayBuffer.length) |
|
|
bytes: arrayBuffer.substring(arrayBuffer.lastIndexOf(',')+1,arrayBuffer.length) |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
console.log(830,{id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, that.inspectNoticeDetailsFormData) |
|
|
|
|
|
completeSummaryDetailStatus( |
|
|
completeSummaryDetailStatus( |
|
|
{id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, |
|
|
{id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, |
|
|
that.inspectNoticeDetailsFormData, |
|
|
that.inspectNoticeDetailsFormData, |
|
@ -858,24 +1086,27 @@ export default { |
|
|
// 更新数据============================================================ |
|
|
// 更新数据============================================================ |
|
|
that.inspectNoticeDetailsShow = false |
|
|
that.inspectNoticeDetailsShow = false |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
getDetailed(that.propsData.id, that.URL).then(res => { |
|
|
getDetailed(that.propsData.id, that.URL).then(res1 => { |
|
|
that.propsData = res |
|
|
that.propsData = res1 |
|
|
}) |
|
|
}) |
|
|
that.paging() |
|
|
that.paging() |
|
|
that.$message.success('成功完成检验!') |
|
|
that.$message.success('成功完成检验!') |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
that.loading = false |
|
|
that.loading = false |
|
|
that.$message.error('检验失败,请重试!') |
|
|
that.$message.error('检验失败,请重试!') |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
completeSummaryDetailStatus({id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, that.inspectNoticeDetailsFormData).then(res => { |
|
|
completeSummaryDetailStatus( |
|
|
|
|
|
{id: that.masterID, summaryDetailId: that.inspectNoticeDetailsFormData.id }, |
|
|
|
|
|
that.inspectNoticeDetailsFormData |
|
|
|
|
|
).then(res => { |
|
|
// 更新数据============================================================ |
|
|
// 更新数据============================================================ |
|
|
that.inspectNoticeDetailsShow = false |
|
|
that.inspectNoticeDetailsShow = false |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
getDetailed(that.propsData.id, that.URL).then(res => { |
|
|
getDetailed(that.propsData.id, that.URL).then(res1 => { |
|
|
that.propsData = res |
|
|
that.propsData = res1 |
|
|
}) |
|
|
}) |
|
|
that.paging() |
|
|
that.paging() |
|
|
that.$message.success('成功完成检验!') |
|
|
that.$message.success('成功完成检验!') |
|
@ -985,6 +1216,41 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
// 批量不合格检验 底部按钮:批量不合格,取消 |
|
|
|
|
|
inspectFormBtachClick(val){ |
|
|
|
|
|
let _detailIdList = [] |
|
|
|
|
|
this.selectedDetailZJ.forEach(item=>{_detailIdList.push(item.id)}) |
|
|
|
|
|
if (val[0] == 0) { |
|
|
|
|
|
// 不合格 |
|
|
|
|
|
val[1].validate((valid) => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
let otherPropertyJson = JSON.stringify(this.inspectFormData.details) |
|
|
|
|
|
this.inspectFormData.otherPropertyJson = otherPropertyJson |
|
|
|
|
|
this.inspectFormData.detailInspectStatus = 3 //不合格状态 |
|
|
|
|
|
this.inspectFormData.guidList = _detailIdList.join(",") |
|
|
|
|
|
this.inspectFormData.id = this.propsData.id |
|
|
|
|
|
this.Loading.appMainLoading = true |
|
|
|
|
|
setBatchDetailStatus(this.inspectFormData).then(res=>{ |
|
|
|
|
|
this.Loading.appMainLoading = false |
|
|
|
|
|
this.inspectShow = false |
|
|
|
|
|
this.buttonClick(this.summaryCurrentRow) |
|
|
|
|
|
this.paging() |
|
|
|
|
|
this.selectedDetailZJ = [] |
|
|
|
|
|
this.$refs.inspectNoticeDetails_table_ref.clearSelection(); |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
this.Loading.appMainLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$errorMsg('请按照提示继续操作') |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
else if (val[0] == 1) { |
|
|
|
|
|
this.inspectShow = false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
// 检验 table添加按钮 |
|
|
// 检验 table添加按钮 |
|
|
inspectAddTable(val) { |
|
|
inspectAddTable(val) { |
|
|
this.editFormData = this.inspectFormData |
|
|
this.editFormData = this.inspectFormData |
|
@ -1046,11 +1312,11 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//设置指定行、列、具体单元格颜色 |
|
|
//设置指定行、列、具体单元格颜色 |
|
|
cellClassName({row, column, rowIndex, columnIndex}){ |
|
|
cellClassName({row, column, rowIndex, columnIndex}){ |
|
|
if (row.detailInspectStatus == 1 && columnIndex === 5) { |
|
|
if (row.detailInspectStatus == 1 && columnIndex === 6) { |
|
|
return 'cell-class-mrhg' //默认合格 |
|
|
return 'cell-class-mrhg' //默认合格 |
|
|
} else if (row.detailInspectStatus == 2 && columnIndex === 5) { |
|
|
} else if (row.detailInspectStatus == 2 && columnIndex === 6) { |
|
|
return 'cell-class-hg'//合格 |
|
|
return 'cell-class-hg'//合格 |
|
|
} else if (row.detailInspectStatus == 3 && columnIndex === 5) { |
|
|
} else if (row.detailInspectStatus == 3 && columnIndex === 6) { |
|
|
return 'cell-class-nohg'//不合格 |
|
|
return 'cell-class-nohg'//不合格 |
|
|
}else{ |
|
|
}else{ |
|
|
return '' |
|
|
return '' |
|
@ -1059,6 +1325,164 @@ export default { |
|
|
currenTabsChange(row){ |
|
|
currenTabsChange(row){ |
|
|
this.currentTagName = row.name |
|
|
this.currentTagName = row.name |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 拆箱事件 |
|
|
|
|
|
postSplitPackingHandle(newPackData){ |
|
|
|
|
|
this.devanLoading = true |
|
|
|
|
|
let _params = { |
|
|
|
|
|
number:this.propsData.number, |
|
|
|
|
|
fromPackingCode:this.devanCurrentRow.packingCode, |
|
|
|
|
|
fromQty:this.devanCurrentRow.receiveQty, |
|
|
|
|
|
toPackingCode:newPackData[0].code, |
|
|
|
|
|
toQty:Number(this.devanForm.qty) |
|
|
|
|
|
} |
|
|
|
|
|
let _data = { |
|
|
|
|
|
useOnTheWayLocation: false, |
|
|
|
|
|
requestNumber: null, |
|
|
|
|
|
worker: store.getters.name.userName, |
|
|
|
|
|
jobNumber: null, |
|
|
|
|
|
remark: null, |
|
|
|
|
|
extraProperties: this.devanCurrentRow.extraProperties || null, |
|
|
|
|
|
activeDate: new Date(), |
|
|
|
|
|
confirmed: true, |
|
|
|
|
|
confirmTime: new Date(), |
|
|
|
|
|
details: [{ |
|
|
|
|
|
fromLocationCode: this.devanCurrentRow.locationCode, |
|
|
|
|
|
fromLocationErpCode: this.devanCurrentRow.locationErpCode, |
|
|
|
|
|
fromLot: this.devanCurrentRow.lot, |
|
|
|
|
|
fromPackingCode: this.devanCurrentRow.packingCode, |
|
|
|
|
|
fromWarehouseCode: this.devanCurrentRow.warehouseCode, |
|
|
|
|
|
itemCode: this.devanCurrentRow.itemCode, |
|
|
|
|
|
itemName: this.devanCurrentRow.itemName, |
|
|
|
|
|
toLocationCode: this.devanCurrentRow.locationCode, |
|
|
|
|
|
toLocationErpCode: this.devanCurrentRow.locationErpCode, |
|
|
|
|
|
toLot: this.devanCurrentRow.lot, |
|
|
|
|
|
toPackingCode: newPackData[0].code, |
|
|
|
|
|
toWarehouseCode: this.devanCurrentRow.warehouseCode, |
|
|
|
|
|
uom: this.devanCurrentRow.uom, |
|
|
|
|
|
itemDesc1: this.devanCurrentRow.itemDesc1, |
|
|
|
|
|
onTheWayLocationCode: "", |
|
|
|
|
|
expireDate: this.devanCurrentRow.expireDate, |
|
|
|
|
|
fromLocationArea: this.devanCurrentRow.locationArea, |
|
|
|
|
|
itemDesc2: this.devanCurrentRow.itemDesc2, |
|
|
|
|
|
fromLocationGroup: this.devanCurrentRow.locationGroup, |
|
|
|
|
|
toLocationArea: this.devanCurrentRow.locationArea, |
|
|
|
|
|
reason: null, |
|
|
|
|
|
fromStatus: this.devanCurrentRow.status, |
|
|
|
|
|
stdPackQty: this.devanCurrentRow.stdPackQty, |
|
|
|
|
|
arriveDate: this.devanCurrentRow.arriveDate, |
|
|
|
|
|
toContainerCode: this.devanCurrentRow.containerCode, |
|
|
|
|
|
produceDate: this.devanCurrentRow.produceDate, |
|
|
|
|
|
supplierBatch: this.devanCurrentRow.supplierBatch, |
|
|
|
|
|
toStatus: this.devanCurrentRow.status, |
|
|
|
|
|
toLocationGroup: this.devanCurrentRow.locationGroup, |
|
|
|
|
|
qty: Number(this.devanForm.qty), |
|
|
|
|
|
remark: null, |
|
|
|
|
|
fromContainerCode: this.devanCurrentRow.containerCode, |
|
|
|
|
|
}], |
|
|
|
|
|
type: "SplitPacking" |
|
|
|
|
|
} |
|
|
|
|
|
postSplitPackingInspect(_params,_data) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
this.devanCancelHandel() |
|
|
|
|
|
let _url = this.detailURL ? this.detailURL : this.URL |
|
|
|
|
|
getDetailed(this.propsData.id, _url).then(res => { |
|
|
|
|
|
// 前端分页处理 |
|
|
|
|
|
this.tableDataDetails = JSON.parse(JSON.stringify(res)) |
|
|
|
|
|
let linshiTableDataDetails = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|
|
|
|
|
this.totalCountDetails = res.details.length |
|
|
|
|
|
// 删除除当前页面最大数以外数据 |
|
|
|
|
|
linshiTableDataDetails.details.splice(this.MaxResultCountDetails,this.totalCountDetails); |
|
|
|
|
|
this.propsData = linshiTableDataDetails |
|
|
|
|
|
this.buttonClick(this.summaryCurrentRow) |
|
|
|
|
|
this.devanLoading = false |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
this.devanLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(err=>{ |
|
|
|
|
|
this.devanLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 拆箱取消 |
|
|
|
|
|
devanCancelHandel(){ |
|
|
|
|
|
this.devanForm = {qty:null} |
|
|
|
|
|
this.devanShow = false |
|
|
|
|
|
this.devanLoading = false |
|
|
|
|
|
}, |
|
|
|
|
|
// 拆箱确定 |
|
|
|
|
|
devanSureHandel(){ |
|
|
|
|
|
// if(this.flexTableData.length <= 0){ |
|
|
|
|
|
// this.$errorMsg("请添加拆箱数据") |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// let _noNumber = 0 |
|
|
|
|
|
// let _allNumber = 0 |
|
|
|
|
|
// // 拆箱数量最大值限制 |
|
|
|
|
|
// this.flexTableData.forEach(item=>{ |
|
|
|
|
|
// if(!item.qty || item.qty == 0){ |
|
|
|
|
|
// _noNumber ++ |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// _allNumber += Number(item.qty) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// if(Number(_noNumber) > 0){ |
|
|
|
|
|
// this.$errorMsg(`单条拆分数量必须大于0,请修改数量`) |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// if(Number(_allNumber) > Number(this.devanCurrentRow.goodQty)){ |
|
|
|
|
|
// this.$errorMsg(`拆箱总数必须小于${this.devanCurrentRow.goodQty},请修改数量`) |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
if(!this.devanForm.qty || Number(this.devanForm.qty) <=0 || Number(this.devanForm.qty) >= Number(this.devanCurrentRow.receiveQty)){ |
|
|
|
|
|
this.$errorMsg(`拆箱数必须大于0且小于${this.devanCurrentRow.receiveQty},请修改数量`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
// 先生成箱码 |
|
|
|
|
|
let _creatPackData = { |
|
|
|
|
|
itemCode: this.devanCurrentPackInfo.itemCode || null, |
|
|
|
|
|
itemName: this.devanCurrentPackInfo.itemName || null, |
|
|
|
|
|
itemDesc1: this.devanCurrentPackInfo.itemDesc1 || null, |
|
|
|
|
|
itemDesc2: this.devanCurrentPackInfo.itemDesc2 || null, |
|
|
|
|
|
lot: this.devanCurrentPackInfo.lot || null, |
|
|
|
|
|
supplierBatch: this.devanCurrentPackInfo.supplierBatch || null, |
|
|
|
|
|
arriveDate: this.devanCurrentPackInfo.arriveDate || null, |
|
|
|
|
|
produceDate: this.devanCurrentPackInfo.produceDate || null, |
|
|
|
|
|
expireDate: this.devanCurrentPackInfo.expireDate || null, |
|
|
|
|
|
stdPackQty: Number(this.devanCurrentPackInfo.stdPackQty) || 0, |
|
|
|
|
|
uom: this.devanCurrentPackInfo.uom || null, |
|
|
|
|
|
qty: Number(this.devanForm.qty), |
|
|
|
|
|
labelStatus: this.devanCurrentPackInfo.labelStatus,//标签状态 |
|
|
|
|
|
recommendLocationCode: this.devanCurrentPackInfo.recommendLocationCode || null, |
|
|
|
|
|
locationErpCode: this.devanCurrentPackInfo.locationErpCode || null, |
|
|
|
|
|
containerCode: this.devanCurrentPackInfo.containerCode || null, |
|
|
|
|
|
supplierCode: this.devanCurrentPackInfo.supplierCode || null, |
|
|
|
|
|
poNumber: this.devanCurrentPackInfo.poNumber || null, |
|
|
|
|
|
rpNumber: this.devanCurrentPackInfo.rpNumber || null, |
|
|
|
|
|
asnNumber: this.devanCurrentPackInfo.asnNumber || null, |
|
|
|
|
|
qLevel: this.devanCurrentPackInfo.qLevel || null, |
|
|
|
|
|
qualityFile: this.devanCurrentPackInfo.qualityFile || null, |
|
|
|
|
|
prodLine: this.devanCurrentPackInfo.prodLine || null, |
|
|
|
|
|
team: this.devanCurrentPackInfo.team || null, |
|
|
|
|
|
shift: this.devanCurrentPackInfo.shift || null, |
|
|
|
|
|
specifications: this.devanCurrentPackInfo.specifications || null, |
|
|
|
|
|
supplierName: this.devanCurrentPackInfo.supplierName || null, |
|
|
|
|
|
supplierSimpleName: this.devanCurrentPackInfo.supplierSimpleName || null, |
|
|
|
|
|
supplierItemCode: this.devanCurrentPackInfo.supplierItemCode || null, |
|
|
|
|
|
supplierItemName: this.devanCurrentPackInfo.supplierItemName || null, |
|
|
|
|
|
labelType: this.devanCurrentPackInfo.labelType || null, |
|
|
|
|
|
planArriveDate: this.devanCurrentPackInfo.planArriveDate || null, |
|
|
|
|
|
remark:null, |
|
|
|
|
|
} |
|
|
|
|
|
// 生成标签(接口) |
|
|
|
|
|
this.devanLoading = true |
|
|
|
|
|
postInventoryLabelCode_count({count:1}, _creatPackData) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
this.postSplitPackingHandle(res) |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(err => { |
|
|
|
|
|
this.devanLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|