|
|
@ -69,13 +69,7 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
SOP预览
|
|
|
|
SOP预览
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="print(scope.row)"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
条码打印
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
@ -212,15 +206,14 @@
|
|
|
|
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
|
|
|
|
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
|
|
|
|
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small"
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
@click="getMaterials(scope) "
|
|
|
|
@click="getMaterials(scope) "
|
|
|
|
>
|
|
|
|
>
|
|
|
|
领料
|
|
|
|
领料
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
|
|
|
|
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
@click="handleMaterialConfirmForm(scope)"
|
|
|
|
@click="handleMaterialConfirmForm(scope)"
|
|
|
@ -231,8 +224,17 @@
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
@click="returnMaterial(scope)"
|
|
|
|
@click="returnMaterial(scope)"
|
|
|
|
|
|
|
|
v-if="scope.row.planDetailStatus !== PLAN_DETAIL_STATUS.TO_START"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
退料
|
|
|
|
退库
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
@click="print(scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
条码
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -394,7 +396,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
|
|
|
|
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
|
|
|
|
<div style="height: auto;">
|
|
|
|
<div style="height: auto;">
|
|
|
|
<PrintPage :defineData="PrintData"/>
|
|
|
|
<PrintPage :defineData="PrintData" v-if="printModel"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button @click="printModel = false">关闭</el-button>
|
|
|
|
<el-button @click="printModel = false">关闭</el-button>
|
|
|
@ -407,7 +409,7 @@
|
|
|
|
width="40%">
|
|
|
|
width="40%">
|
|
|
|
<el-form ref="productInstockForm" :model="productInstockForm" :rules="productInstockRules" label-width="80px">
|
|
|
|
<el-form ref="productInstockForm" :model="productInstockForm" :rules="productInstockRules" label-width="80px">
|
|
|
|
<el-form-item label="成品条码" prop="materialBarcode">
|
|
|
|
<el-form-item label="成品条码" prop="materialBarcode">
|
|
|
|
<el-input v-model="productInstockForm.materialBarcode"></el-input>
|
|
|
|
<el-input v-model="productInstockForm.materialBarcode" suffix-icon="el-icon-camera"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@ -428,11 +430,14 @@
|
|
|
|
<el-form-item v-if="false" label="明细ID" prop="planDetailId">
|
|
|
|
<el-form-item v-if="false" label="明细ID" prop="planDetailId">
|
|
|
|
<el-input v-model="materialConfirmForm.planDetailId"></el-input>
|
|
|
|
<el-input v-model="materialConfirmForm.planDetailId"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="明细编号" prop="planDetailCode">
|
|
|
|
|
|
|
|
<el-input v-model="materialConfirmForm.planDetailCode" disabled></el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料条码" prop="materialBarcode">
|
|
|
|
<el-form-item label="物料条码" prop="materialBarcode">
|
|
|
|
<el-input v-model="materialConfirmForm.materialBarcode"></el-input>
|
|
|
|
<el-input v-model="materialConfirmForm.materialBarcode" suffix-icon="el-icon-camera"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="数量" prop="checkAmount">
|
|
|
|
<el-form-item label="数量" prop="checkAmount">
|
|
|
|
<el-input v-model="materialConfirmForm.checkAmount"></el-input>
|
|
|
|
<el-input v-model="materialConfirmForm.checkAmount" disabled></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@ -441,40 +446,38 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="returnModelVisible" title="退料" width="25%">
|
|
|
|
<el-dialog :visible.sync="returnModelVisible" title="申请退库" width="400">
|
|
|
|
<el-form ref="returnModelForm" :model="returnModelForm" :rules="returnModelFormRules" label-width="80px">
|
|
|
|
<el-form ref="returnModelForm" :model="returnModelForm" label-width="80px" :rules="returnModelFormRules">
|
|
|
|
<el-form-item label="计划编号">
|
|
|
|
<el-form-item label="计划编号">
|
|
|
|
<el-input v-model="returnModelForm.planCode" autocomplete="off" disabled></el-input>
|
|
|
|
<el-input v-model="returnModelForm.planCode" autocomplete="off" disabled></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
<el-input v-model="returnModelForm.planDetailCode" autocomplete="off" disabled></el-input>
|
|
|
|
<el-input v-model="returnModelForm.planDetailCode" autocomplete="off" disabled></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="成品">
|
|
|
|
<!--el-form-item label="成品">
|
|
|
|
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
|
|
|
|
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item-->
|
|
|
|
<el-form-item label="物料条码">
|
|
|
|
<el-form-item label="物料条码">
|
|
|
|
<el-input v-model="returnModelForm.materialBarcode" class="input-with-select" placeholder="请输入内容"
|
|
|
|
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode" suffix-icon="el-icon-camera">
|
|
|
|
@blur="setReturnModelForm">
|
|
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
<el-select v-model="returnModelForm.warehouseId" :disabled="!returnModelForm.materialBarcode"
|
|
|
|
<el-select v-model="returnModelForm.warehouseId" placeholder="请选择仓库"
|
|
|
|
placeholder="请选择仓库">
|
|
|
|
style="width: 260px">
|
|
|
|
<el-option v-for="i in WarehousesList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
|
<el-option :label="i.label" :key="i.value" :value="i.value" v-for="i in WarehousesList"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="数量">
|
|
|
|
<el-form-item label="数量" prop="planAmount">
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" :min="1" controls-position="right"></el-input-number>
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1" style="width: 260px"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="退库类型" prop="taskType">
|
|
|
|
<el-form-item label="退库类型" prop="taskType">
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型">
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
|
|
|
|
<el-option v-for="i in dict.type.wms_raw_return_task_type" :key="i.value" :label="i.label"
|
|
|
|
<el-option :label="i.label" :key="i.value" :value="i.value"
|
|
|
|
:value="i.value"></el-option>
|
|
|
|
v-for="i in dict.type.wms_raw_return_task_type"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="申请原因">
|
|
|
|
<el-form-item label="申请原因">
|
|
|
|
<el-input v-model="returnModelForm.applyReason" autocomplete="off" type="textarea"></el-input>
|
|
|
|
<el-input type="textarea" v-model="returnModelForm.applyReason" autocomplete="off"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button @click="returnModelVisible = false">取 消</el-button>
|
|
|
|
<el-button @click="returnModelVisible = false">取 消</el-button>
|
|
|
@ -547,6 +550,7 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import Chart from '@/components/board/Chart'
|
|
|
|
import Chart from '@/components/board/Chart'
|
|
|
|
import PrintPage from '@/views/mes/barcode/endProductIndex'
|
|
|
|
import PrintPage from '@/views/mes/barcode/endProductIndex'
|
|
|
|
|
|
|
|
import {monitorSerialData} from "@/utils/serial"
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
getStockTotal,
|
|
|
|
getStockTotal,
|
|
|
@ -572,6 +576,7 @@ export default {
|
|
|
|
Chart,
|
|
|
|
Chart,
|
|
|
|
PrintPage
|
|
|
|
PrintPage
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mixins: [monitorSerialData],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
info: {},
|
|
|
|
info: {},
|
|
|
@ -620,7 +625,8 @@ export default {
|
|
|
|
materialBarcode: null,
|
|
|
|
materialBarcode: null,
|
|
|
|
planId: null,
|
|
|
|
planId: null,
|
|
|
|
planDetailId: null,
|
|
|
|
planDetailId: null,
|
|
|
|
checkAmount: null
|
|
|
|
planDetailCode: null,
|
|
|
|
|
|
|
|
checkAmount: 1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
materialConfirmRules: {
|
|
|
|
materialConfirmRules: {
|
|
|
|
materialBarcode: [
|
|
|
|
materialBarcode: [
|
|
|
@ -634,14 +640,25 @@ export default {
|
|
|
|
taskType: [
|
|
|
|
taskType: [
|
|
|
|
{required: true, message: '请选择退库类型', trigger: 'change'}
|
|
|
|
{required: true, message: '请选择退库类型', trigger: 'change'}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
planAmount: [
|
|
|
|
|
|
|
|
{required: true, message: '请输入数量', trigger: 'change'}
|
|
|
|
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
headers: {
|
|
|
|
headers: {
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLAN_DETAIL_STATUS:{
|
|
|
|
|
|
|
|
TO_START : '1',
|
|
|
|
|
|
|
|
STARTED : '2',
|
|
|
|
|
|
|
|
FINISHED : '3',
|
|
|
|
|
|
|
|
ABNORMAL_FINISHED : '9'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.firstConnectSerial();
|
|
|
|
// setInterval(() => {
|
|
|
|
// setInterval(() => {
|
|
|
|
// this.$notify.info({
|
|
|
|
// this.$notify.info({
|
|
|
|
// title: '通知',
|
|
|
|
// title: '通知',
|
|
|
@ -666,7 +683,7 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
|
|
async logout() {
|
|
|
|
async logout() {
|
|
|
|
this.$confirm('确定注销并退出系统吗?', '提示', {
|
|
|
|
this.$confirm('确定退出系统吗?', '提示', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
@ -951,6 +968,19 @@ export default {
|
|
|
|
handleProductInstock() {
|
|
|
|
handleProductInstock() {
|
|
|
|
this.resetProductInstock();
|
|
|
|
this.resetProductInstock();
|
|
|
|
this.productInstockVisible = true;
|
|
|
|
this.productInstockVisible = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
|
|
|
|
this.$confirm('请连接条码枪', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '连接',
|
|
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
console.log("dddd")
|
|
|
|
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -977,20 +1007,36 @@ export default {
|
|
|
|
materialBarcode: null,
|
|
|
|
materialBarcode: null,
|
|
|
|
planId: null,
|
|
|
|
planId: null,
|
|
|
|
planDetailId: null,
|
|
|
|
planDetailId: null,
|
|
|
|
checkAmount: null
|
|
|
|
planDetailCode:null,
|
|
|
|
|
|
|
|
checkAmount: 1
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("materialConfirmForm");
|
|
|
|
this.resetForm("materialConfirmForm");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 成品入库按钮操作 */
|
|
|
|
/** 扫描确认按钮操作 */
|
|
|
|
handleMaterialConfirmForm(scope) {
|
|
|
|
handleMaterialConfirmForm(scope) {
|
|
|
|
this.materialConfirmForm = {
|
|
|
|
this.materialConfirmForm = {
|
|
|
|
materialBarcode: null,
|
|
|
|
materialBarcode: null,
|
|
|
|
planId: scope.row.planId,
|
|
|
|
planId: scope.row.planId,
|
|
|
|
planDetailId: scope.row.planDetailId,
|
|
|
|
planDetailId: scope.row.planDetailId,
|
|
|
|
checkAmount: null
|
|
|
|
planDetailCode:scope.row.planDetailCode,
|
|
|
|
|
|
|
|
checkAmount: 1
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.materialConfirmVisible = true;
|
|
|
|
this.materialConfirmVisible = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
|
|
|
|
this.$confirm('请连接条码枪', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '连接',
|
|
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
console.log("dddd")
|
|
|
|
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1012,6 +1058,28 @@ export default {
|
|
|
|
returnMaterial(e) {
|
|
|
|
returnMaterial(e) {
|
|
|
|
this.returnModelVisible = true
|
|
|
|
this.returnModelVisible = true
|
|
|
|
this.returnModelForm = {materialName: this.nowMaterial, ...e.row}
|
|
|
|
this.returnModelForm = {materialName: this.nowMaterial, ...e.row}
|
|
|
|
|
|
|
|
this.setReturnModelForm();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
|
|
|
|
this.$confirm('请连接条码枪', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '连接',
|
|
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
|
|
// beforeClose:async(action,instance,done)=>{
|
|
|
|
|
|
|
|
// if(action==='confirm'){
|
|
|
|
|
|
|
|
// }else{
|
|
|
|
|
|
|
|
// this.connectSerialPort();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
console.log("dddd")
|
|
|
|
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setReturnModelForm() {
|
|
|
|
setReturnModelForm() {
|
|
|
|
getWarehouses({
|
|
|
|
getWarehouses({
|
|
|
@ -1024,16 +1092,15 @@ export default {
|
|
|
|
value: v.warehouseId,
|
|
|
|
value: v.warehouseId,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.returnModelForm.warehouseId = e.data[0]?.warehouseId
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
returnModelConfirm() {
|
|
|
|
returnModelConfirm() {
|
|
|
|
this.$refs.returnModelForm.validate((valid) => {
|
|
|
|
this.$refs.returnModelForm.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
let data = {}
|
|
|
|
let data = [this.returnModelForm]
|
|
|
|
let keys = ['warehouseId', 'planCode', 'planDetailCode', 'productId', 'materialBarcode', 'planAmount', 'taskType', 'applyReason']
|
|
|
|
|
|
|
|
keys.forEach(v => {
|
|
|
|
|
|
|
|
data[v] = this.returnModelForm[v]
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
applyRawReturn(data).then(v => {
|
|
|
|
applyRawReturn(data).then(v => {
|
|
|
|
if (v.code === 200) {
|
|
|
|
if (v.code === 200) {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
@ -1115,6 +1182,34 @@ export default {
|
|
|
|
return ['png', 'jpg', 'jpeg'].includes(name.toLowerCase())
|
|
|
|
return ['png', 'jpg', 'jpeg'].includes(name.toLowerCase())
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
firstConnectSerial() {
|
|
|
|
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
|
|
|
|
this.$confirm('请连接条码枪', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '连接',
|
|
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setSerialData() {
|
|
|
|
|
|
|
|
if (this.productInstockVisible) {
|
|
|
|
|
|
|
|
this.productInstockForm.materialBarcode = this.serialData;
|
|
|
|
|
|
|
|
} else if (this.returnModelVisible) {
|
|
|
|
|
|
|
|
this.returnModelForm.materialBarcode = this.serialData;
|
|
|
|
|
|
|
|
} else if(this.materialConfirmVisible){
|
|
|
|
|
|
|
|
this.materialConfirmForm.materialBarcode = this.serialData;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// console.log(this.serialData)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|