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