|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<div class="headTitle">京源环保生产管理系统</div>
|
|
|
|
|
|
|
|
|
|
<div class="chartBox chartBox1">
|
|
|
|
|
<div class="title">派工信息</div>
|
|
|
|
|
<div class="title">生产派工</div>
|
|
|
|
|
<div class="chart">
|
|
|
|
|
<div class="whiteTable">
|
|
|
|
|
<el-table
|
|
|
|
@ -14,6 +14,7 @@
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
ref="planTable"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@current-change="getDetail"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="序号"
|
|
|
|
@ -21,6 +22,11 @@
|
|
|
|
|
width="50"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="任务编号"
|
|
|
|
|
prop="dispatchCode"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="派工单号"
|
|
|
|
|
prop="planCode"
|
|
|
|
@ -78,13 +84,13 @@
|
|
|
|
|
SOP预览
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
<!--el-button
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="getDetail(scope)"
|
|
|
|
|
@click="getDetail(scope.row)"
|
|
|
|
|
>
|
|
|
|
|
明细
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -151,7 +157,6 @@
|
|
|
|
|
<div class="chart">
|
|
|
|
|
<div class="whiteTable">
|
|
|
|
|
<el-table
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@current-change="getMaterialInstall"
|
|
|
|
|
:cell-style="{textAlign:'center'}"
|
|
|
|
|
:data="tableData1"
|
|
|
|
@ -159,7 +164,7 @@
|
|
|
|
|
:max-height="19.13 * vw"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
ref="table"
|
|
|
|
|
|
|
|
|
|
highlight-current-row
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="序号"
|
|
|
|
@ -214,7 +219,7 @@
|
|
|
|
|
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small"
|
|
|
|
|
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="getMaterials(scope.row) "
|
|
|
|
|
>
|
|
|
|
@ -240,7 +245,8 @@
|
|
|
|
|
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"
|
|
|
|
|
v-if="(scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED)
|
|
|
|
|
&& finalProcessFlag ==='1'"
|
|
|
|
|
>
|
|
|
|
|
条码
|
|
|
|
|
</el-button>
|
|
|
|
@ -315,7 +321,8 @@
|
|
|
|
|
|
|
|
|
|
<!-- 申请领料信息对话框 -->
|
|
|
|
|
<el-dialog title="申请领料" :visible.sync="dialogVisible" append-to-body>
|
|
|
|
|
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData" v-if="dialogVisible"></apply-raw-outstock>
|
|
|
|
|
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData"
|
|
|
|
|
v-if="dialogVisible"></apply-raw-outstock>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
|
|
|
|
@ -382,7 +389,8 @@
|
|
|
|
|
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
|
|
|
|
|
</el-form-item-->
|
|
|
|
|
<el-form-item label="物料条码">
|
|
|
|
|
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode" suffix-icon="el-icon-full-screen">
|
|
|
|
|
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode"
|
|
|
|
|
suffix-icon="el-icon-full-screen">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
@ -392,7 +400,8 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="数量" prop="planAmount">
|
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1" style="width: 260px"></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 label="退库类型" prop="taskType">
|
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
|
|
|
|
@ -476,7 +485,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import Chart from '@/components/board/Chart'
|
|
|
|
|
import PrintPage from '@/views/mes/barcode/endProductIndex'
|
|
|
|
|
import PrintPage from '@/views/board/barcode/workshopBarcode'
|
|
|
|
|
import {monitorSerialData} from "@/utils/serial"
|
|
|
|
|
import WorkshopNotice from "@/components/workshopNotice/index.vue";
|
|
|
|
|
import {noticeData} from "@/utils/notice"
|
|
|
|
@ -495,11 +504,12 @@ import {
|
|
|
|
|
} from '@/api/board'
|
|
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
import applyRawOutstock from "@/views/board/common/applyRawOutstock.vue";
|
|
|
|
|
import {getNowDateTime} from "@/utils/ruoyi";
|
|
|
|
|
|
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
|
|
|
export default {
|
|
|
|
|
name: 'Board1',
|
|
|
|
|
dicts: ['mes_plan_detail_status', 'wms_raw_return_task_type',"mes_safe_flag"],
|
|
|
|
|
dicts: ['mes_plan_detail_status', 'wms_raw_return_task_type', "mes_safe_flag"],
|
|
|
|
|
components: {
|
|
|
|
|
'apply-raw-outstock': applyRawOutstock,
|
|
|
|
|
Chart,
|
|
|
|
@ -527,9 +537,10 @@ export default {
|
|
|
|
|
totalNum3: 0,
|
|
|
|
|
nowNum4: 1,
|
|
|
|
|
totalNum4: 0,
|
|
|
|
|
materialBomId:null,
|
|
|
|
|
materialBomId: null,
|
|
|
|
|
planId: null,
|
|
|
|
|
nowMaterial: null,
|
|
|
|
|
finalProcessFlag:null,
|
|
|
|
|
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
|
|
|
|
|
searchMaterialValue: '',
|
|
|
|
|
warehouseList: [],
|
|
|
|
@ -578,14 +589,16 @@ export default {
|
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
PLAN_DETAIL_STATUS:{
|
|
|
|
|
TO_START : '1',
|
|
|
|
|
STARTED : '2',
|
|
|
|
|
FINISHED : '3',
|
|
|
|
|
ABNORMAL_FINISHED : '9'
|
|
|
|
|
PLAN_DETAIL_STATUS: {
|
|
|
|
|
TO_START: '1',
|
|
|
|
|
STARTED: '2',
|
|
|
|
|
FINISHED: '3',
|
|
|
|
|
ABNORMAL_FINISHED: '9'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
productPlanData:{}
|
|
|
|
|
productPlanData: {},
|
|
|
|
|
|
|
|
|
|
reloadFlag: "0",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -598,18 +611,23 @@ export default {
|
|
|
|
|
// duration: 0
|
|
|
|
|
// });
|
|
|
|
|
// }, 60 * 1000)
|
|
|
|
|
getProductPlans({pageNum: 1, pageSize: 5}).then(e => {
|
|
|
|
|
getProductPlans({pageNum: 1, pageSize: 5}).then(async e => {
|
|
|
|
|
this.tableData = e.rows
|
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
|
this.nowMaterial = e.rows?.[0]?.materialName
|
|
|
|
|
this.materialBomId = e.rows?.[0]?.materialBomId
|
|
|
|
|
this.saleOrderId = e.rows?.[0]?.saleOrderId
|
|
|
|
|
this.$refs.planTable.setCurrentRow(e.rows?.[0]);
|
|
|
|
|
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => {
|
|
|
|
|
this.tableData1 = res.rows
|
|
|
|
|
this.totalNum3 = Math.ceil(res.total / 5)
|
|
|
|
|
this.$refs.table.setCurrentRow(res.rows[0]);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let queryRow = {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 5,
|
|
|
|
|
planId: e.rows?.[0]?.planId,
|
|
|
|
|
materialName: e.rows?.[0]?.materialName,
|
|
|
|
|
materialBomId: e.rows?.[0]?.materialBomId,
|
|
|
|
|
saleOrderId: e.rows?.[0]?.saleOrderId,
|
|
|
|
|
saleType: e.rows?.[0]?.saleType
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await this.getDetail(queryRow);
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -715,12 +733,10 @@ export default {
|
|
|
|
|
startProductPlanDetail({
|
|
|
|
|
planDetailId: e.planDetailId
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
this.getDetail({row: {planId: e.planId}})
|
|
|
|
|
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
|
|
|
|
|
this.tableData = e.rows
|
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.$modal.msgSuccess("开始成功");
|
|
|
|
|
e.realBeginTime = getNowDateTime();
|
|
|
|
|
e.planDetailStatus = this.PLAN_DETAIL_STATUS.STARTED;
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
@ -731,7 +747,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (e.planDetailStatus === '2') {
|
|
|
|
|
this.$confirm('是否完成计划', '确认', {
|
|
|
|
|
this.$confirm('是否完成生产明细', '确认', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'success'
|
|
|
|
@ -739,12 +755,12 @@ export default {
|
|
|
|
|
completeProductPlanDetail({
|
|
|
|
|
planDetailId: e.planDetailId
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
this.getDetail({row: {planId: e.planId}})
|
|
|
|
|
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
|
|
|
|
|
this.tableData = e.rows
|
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.$modal.msgSuccess("完成成功");
|
|
|
|
|
e.realEndTime = getNowDateTime();
|
|
|
|
|
e.planDetailStatus = this.PLAN_DETAIL_STATUS.FINISHED;
|
|
|
|
|
let currentProductPlan = this.tableData.filter(item => item.planId === e.planId)
|
|
|
|
|
currentProductPlan[0].completeAmount += 1;
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
@ -756,39 +772,30 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 生成/获取明细
|
|
|
|
|
async getDetail(e) {
|
|
|
|
|
this.planId = e.row.planId
|
|
|
|
|
this.materialBomId = e.row.materialBomId
|
|
|
|
|
this.nowMaterial = e.row.materialName
|
|
|
|
|
this.saleOrderId = e.row.saleOrderId
|
|
|
|
|
this.nowNum3 = 1
|
|
|
|
|
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => {
|
|
|
|
|
async getDetail(row) {
|
|
|
|
|
if (this.reloadFlag !== "1" && this.planId === row.planId) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.reloadFlag = "0";
|
|
|
|
|
this.planId = row.planId
|
|
|
|
|
this.materialBomId = row.materialBomId
|
|
|
|
|
this.nowMaterial = row.materialName
|
|
|
|
|
this.saleOrderId = row.saleOrderId
|
|
|
|
|
this.saleType = row.saleType
|
|
|
|
|
this.finalProcessFlag = row.finalProcessFlag
|
|
|
|
|
|
|
|
|
|
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: row.planId}).then(res => {
|
|
|
|
|
if (res.rows.length === 0) {
|
|
|
|
|
this.$confirm('是否生成计划明细', '确认', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'success'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
insertProductPlanDetails({
|
|
|
|
|
"planId": e.row.planId,
|
|
|
|
|
}).then(val => {
|
|
|
|
|
getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: e.row.planId}).then(res => {
|
|
|
|
|
this.tableData1 = res.rows
|
|
|
|
|
this.totalNum3 = Math.ceil(res.total / 5)
|
|
|
|
|
this.$refs.table.setCurrentRow(res.rows[0]);
|
|
|
|
|
})
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: `生成完成`
|
|
|
|
|
});
|
|
|
|
|
insertProductPlanDetails({
|
|
|
|
|
"planId": row.planId,
|
|
|
|
|
}).then(val => {
|
|
|
|
|
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: row.planId}).then(res => {
|
|
|
|
|
this.tableData1 = res.rows
|
|
|
|
|
this.totalNum3 = Math.ceil(res.total / 5)
|
|
|
|
|
this.$refs.table.setCurrentRow(res.rows[0]);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消'
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.tableData1 = res.rows
|
|
|
|
|
this.$refs.table.setCurrentRow(res.rows[0]);
|
|
|
|
@ -797,7 +804,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async getMaterialInstall(e){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async getMaterialInstall(e) {
|
|
|
|
|
this.info = e
|
|
|
|
|
this.nowNum2 = 1
|
|
|
|
|
this.nowNum4 = 1
|
|
|
|
@ -842,6 +851,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
print(val) {
|
|
|
|
|
this.PrintData = val
|
|
|
|
|
this.PrintData.barcodeType = '3';//成品码
|
|
|
|
|
this.printModel = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -896,7 +906,7 @@ export default {
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
planId: null,
|
|
|
|
|
planDetailId: null,
|
|
|
|
|
planDetailCode:null,
|
|
|
|
|
planDetailCode: null,
|
|
|
|
|
checkAmount: 1
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("materialConfirmForm");
|
|
|
|
@ -908,7 +918,7 @@ export default {
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
planId: scope.row.planId,
|
|
|
|
|
planDetailId: scope.row.planDetailId,
|
|
|
|
|
planDetailCode:scope.row.planDetailCode,
|
|
|
|
|
planDetailCode: scope.row.planDetailCode,
|
|
|
|
|
checkAmount: 1
|
|
|
|
|
};
|
|
|
|
|
this.materialConfirmVisible = true;
|
|
|
|
@ -1072,7 +1082,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
firstConnectSerial() {
|
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
|
this.$confirm('请连接条码枪', '提示', {
|
|
|
|
@ -1093,7 +1102,7 @@ export default {
|
|
|
|
|
this.productInstockForm.materialBarcode = this.serialData;
|
|
|
|
|
} else if (this.returnModelVisible) {
|
|
|
|
|
this.returnModelForm.materialBarcode = this.serialData;
|
|
|
|
|
} else if(this.materialConfirmVisible){
|
|
|
|
|
} else if (this.materialConfirmVisible) {
|
|
|
|
|
this.materialConfirmForm.materialBarcode = this.serialData;
|
|
|
|
|
}
|
|
|
|
|
// console.log(this.serialData)
|
|
|
|
@ -1142,6 +1151,7 @@ export default {
|
|
|
|
|
/deep/ .el-table .cell {
|
|
|
|
|
color: #fff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .current-row .cell {
|
|
|
|
|
color: #000
|
|
|
|
|
}
|
|
|
|
|