Browse Source

【nev-pc】高拍仪联调暂存

ag_report_nev
安虹睿 11 months ago
parent
commit
a75d1d0410
  1. 2
      fe/PC/public/config.js
  2. 1
      fe/PC/src/App.vue
  3. 11
      fe/PC/src/api/wms-api.js
  4. 18
      fe/PC/src/views/login/index.vue
  5. 45
      fe/PC/src/views/rawMaterialManage/quality/InspectRequest_new.vue
  6. 562
      fe/PC/src/views/rawMaterialManage/quality/InspectRequest_old.vue

2
fe/PC/public/config.js

@ -24,8 +24,6 @@ window.SITE_CONFIG['versionUrl'] = 'http://dev.ccwin-in.com:60070'
window.SITE_CONFIG['companyName'] = '长春一汽富维东阳汽车塑料零部件(安徽)有限公司' window.SITE_CONFIG['companyName'] = '长春一汽富维东阳汽车塑料零部件(安徽)有限公司'
//pad-kitting组包页面刷新时间(毫秒) //pad-kitting组包页面刷新时间(毫秒)
window.SITE_CONFIG['padKittingPackUpdate'] = 180000 window.SITE_CONFIG['padKittingPackUpdate'] = 180000
// 高拍仪获取地址
window.SITE_CONFIG['grabimageURL'] = 'http://192.168.0.150:38088/video=grabimage'
// 接口看板地址 // 接口看板地址
window.SITE_CONFIG['interfaceBoardUrl'] = 'http://dev.ccwin-in.com:60090/' window.SITE_CONFIG['interfaceBoardUrl'] = 'http://dev.ccwin-in.com:60090/'
// 主子表 // 主子表

1
fe/PC/src/App.vue

@ -31,7 +31,6 @@ localStorage.setItem('MOrDFasterUrl_store',window.SITE_CONFIG['MOrDFasterUrl_sto
localStorage.setItem('MOrDFasterUrl_job',window.SITE_CONFIG['MOrDFasterUrl_job']) localStorage.setItem('MOrDFasterUrl_job',window.SITE_CONFIG['MOrDFasterUrl_job'])
localStorage.setItem('MOrDFasterUrl_inventory',window.SITE_CONFIG['MOrDFasterUrl_inventory']) localStorage.setItem('MOrDFasterUrl_inventory',window.SITE_CONFIG['MOrDFasterUrl_inventory'])
localStorage.setItem('pageHasMOrDList',window.SITE_CONFIG['pageHasMOrDList']) localStorage.setItem('pageHasMOrDList',window.SITE_CONFIG['pageHasMOrDList'])
localStorage.setItem('grabimageURL',window.SITE_CONFIG['grabimageURL'])
</script> </script>
<style lang="scss"> <style lang="scss">

11
fe/PC/src/api/wms-api.js

@ -753,17 +753,6 @@ export async function createImportExcelByFE(url,data) {
}) })
} }
// 获取高拍仪
export function getGrabimagePost() {
return request({
url: localStorage.getItem('grabimageURL'),
method: 'get',
headers: {
responseType: 'html'
},
})
}
// 三方库-关闭任务 // 三方库-关闭任务
export function postCloseJob(id,url) { export function postCloseJob(id,url) {
return request({ return request({

18
fe/PC/src/views/login/index.vue

@ -1,5 +1,7 @@
<template> <template>
<div class="login-container"> <div class="login-container">
<!-- <iframe v-show="false" id="myIframe" src='http://192.168.1.75:33336/video/index.html' style="z-index:200;background:#fff;width:100px;height:100px;position:fixed;left:0"></iframe>
<el-button style="z-index:200;position:fixed;right:0" @click="getBase64">获取base64</el-button> -->
<img class="loginLogoImg" src="../../../public/login_logo.png" alt=""> <img class="loginLogoImg" src="../../../public/login_logo.png" alt="">
<div class="login-form-wrapper"> <div class="login-form-wrapper">
<div class="left"></div> <div class="left"></div>
@ -137,21 +139,27 @@ export default {
}); });
}, },
mounted () { mounted () {
window.showInfoFromJava = this.showInfoFromJava
if (this.loginForm.username === '') { if (this.loginForm.username === '') {
this.$refs.username.focus() this.$refs.username.focus()
} else if (this.loginForm.password === '') { } else if (this.loginForm.password === '') {
this.$refs.password.focus() this.$refs.password.focus()
} }
// window.addEventListener('message', function(event) {
// // if (event.origin === 'http://iframe-domain.com') { // iframe
// var result = event.data; //
// console.log(result)
// // }
// });
}, },
destroyed () { destroyed () {
// window.removeEventListener('storage', this.afterQRScan) // window.removeEventListener('storage', this.afterQRScan)
}, },
methods: { methods: {
showInfoFromJava(msg){ // getBase64(){
console.log("showInfoFromJava") // //
alert(msg) // var iframeWindow = document.getElementById('myIframe').contentWindow;
}, // iframeWindow.postMessage('callMyFunction', '*');
// },
checkCapslock (e) { checkCapslock (e) {
const { key } = e const { key } = e
this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z') this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z')

45
fe/PC/src/views/rawMaterialManage/quality/InspectRequest_new.vue

@ -1,5 +1,7 @@
<template> <template>
<div class="page-box InspectNoticePage" v-loading="Loading.appMainLoading"> <div class="page-box InspectNoticePage" v-loading="Loading.appMainLoading">
<iframe v-show="false" id="getGrabimageIframe" src='http://192.168.1.75:33336/video/index.html' style="z-index:200;background:#fff;width:100px;height:100px;position:fixed;left:0"></iframe>
<tablePagination <tablePagination
:currenButtonData="currenButtonData" :currenButtonData="currenButtonData"
:tableData="tableData" :tableData="tableData"
@ -276,7 +278,6 @@ import {
getDetailed, getDetailed,
getFilestore, getFilestore,
InspectSplitPackingk, InspectSplitPackingk,
getGrabimagePost
} from "@/api/wms-api" } from "@/api/wms-api"
import { postSplitPackingInspect,postInventoryLabelCode_count } from "@/api/wms-core" import { postSplitPackingInspect,postInventoryLabelCode_count } from "@/api/wms-core"
import { import {
@ -602,38 +603,24 @@ export default {
}; };
}, },
mounted () { mounted () {
this.paging(); this.paging();
let _this = this
window.addEventListener('message', function(event) {
// todo:
// if (event.origin === 'http://iframe-domain.com') { // iframe
var result = event.data; //
_this.fileBase64 = 'data:image/png;base64,'+result
_this.inspectNoticeDetailsForm[11].url = _this.fileBase64
_this.inspectNoticeDetailsForm[11].srcList = [_this.fileBase64]
console.log(615,_this.fileBase64)
// }
});
}, },
methods: { methods: {
// //
getGrabimage(){ getGrabimage(){
this.fileBase64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MjY1MjNDOERBOTYxMUU5QUZDQkVFNjczQkJCQzA4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1MjY1MjNDOURBOTYxMUU5QUZDQkVFNjczQkJCQzA4RCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjUyNjUyM0M2REE5NjExRTlBRkNCRUU2NzNCQkJDMDhEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjUyNjUyM0M3REE5NjExRTlBRkNCRUU2NzNCQkJDMDhEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8++MAjQQAAAuBJREFUeNrsmEtoE1EUhv87MxoSY6pYi4+a1sY2VCmhqJiFIsRHViK4EKEoWAW3ggsLEeuqlK7UbhVcuXAhtN1JNkqRVgqCGFutYK0LC0XbJvVFTK7npq0kaRJMMo4z4z3wZ5F53PvNPeefc4f5OpOgaCb1ko6SPLB2xElRUhdpUqMfP2mEtAH2CLFAp0ghUlChnx4bwWWHYOpRltPSrnFcsUHNlQq3ApuHBJSAElACSkAJ+D8DatVc7FgD3L+qIrCTVXT92CRHR18KqbRJV7BpC6sYTsS+Zpa5h3lTVIe5aZqswX9Xg4WifzCNZ2840nl1pdKjPNzGcCGsWBdw/APHrYHijvF0nCO8l6G+lhkGqOvj3FzDMs5aLFwOoGYds+4K1tLWeeC6ihdThf2o3Qesd1q8BndtYyQbm0y5cTLIEPSvTtvEN2BoNI0fSZMBzi4A72Z4wWO+rQyb8r4AXSzhqiITeh+kzQM4twiEr/1E/Gvh4xvdwJM+DU7Hn92vsa56Q9LVRT9+5kXhVh7A7AK3bg227mA4G1Iw9pYXdNGDexi8dRZ+TTCae3dHeUlxmxqDe9HcOmv3Mdy9rNrDRWPTq9M69p5aPQ5zAs7MLU2Q501QoYVta2TU7eT+f/OSipdTuecLt1WYCQFXXPTL9+Iu+phc1JXlos61wP4WZo0aFC5aDC7bRRuyjOZTHBh+xX/v6sWRQBN02wjrCrjby3D+mILR15Ry+e8jmu8hctGGPBe9cieF4Vju2W7qV5/3a+aswciZ8lw0FGCYnkXO/vEAtW6MmdRkyo1zRxSS/GRhPGDL9qV6+5vhrwe6TiuZsSpuPnydyYpeqUPdKlq9xrRd4lPIiRspY1fQY+CnB4+LGZ+inBu3K6hmrIoBB0f06xdLhRhDjGV4DdreRSWgBJSAElACSkAJaA3AuI35FgVg1MaAjwRghDRvQzjBFBGAE6Qg6SEpYQOwxDKLYJr4JcAAgnO65/3FDNAAAAAASUVORK5CYII=' var iframeWindow = document.getElementById('getGrabimageIframe').contentWindow;
this.inspectNoticeDetailsForm[11].url = this.fileBase64 iframeWindow.postMessage('callMyFunction', '*');
this.inspectNoticeDetailsForm[11].srcList = [this.fileBase64]
// let _data = {
// make_uuid:"1",
// image_process_info:{
// cut_type:"0",
// split_page:"0"
// },
// image_storage_info:{
// max_file_size:"400000"
// },
// watermark:{
// pos:"3",
// fontsize:"50",
// color:"red"
// }
// }
// getGrabimagePost().then(res=>{
// })
// axios.post('http://192.168.0.150:38088/video=grabimage',_data)
// .then(response => {
// console.log(625,response.data);
// })
// .catch(error => {
// console.error(628,error);
// });
}, },
// //
clearGrabimage(){ clearGrabimage(){

562
fe/PC/src/views/rawMaterialManage/quality/InspectRequest_old.vue

@ -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: '',
// tablerowid便 // tablerowid便
rowId: '', rowId: '',
rowReceiveQty: null,
// pdf // pdf
urlPDF: '', urlPDF: '',
// base64data:application/pdf;base64, // base64data: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>

Loading…
Cancel
Save