Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
dd23f78323
  1. 6
      package.json
  2. 4
      src/api/production/generateReport.js
  3. 56
      src/views/modules/autoPrint/autoPrintStock.vue
  4. 207
      src/views/modules/production/closeSchedule.vue
  5. 11
      src/views/modules/production/generateReport.vue
  6. 4
      src/views/modules/production/print_stock_label.js
  7. 29
      src/views/modules/production/print_transNo_label.js
  8. 29
      src/views/modules/production/soscheduleRouting.vue
  9. 7
      src/views/modules/production/stockPrint.vue

6
package.json

@ -1,8 +1,8 @@
{
"name": "gaotao-fast-vue",
"name": "xujie-vue",
"version": "1.2.2",
"description": "gaotao-fast-vue基于vue、element-ui构建开发,实现gaotao-fast后台管理前端功能,提供一套更优的前端解决方案。",
"author": "daxiong.yang <daxiong.yang@qq.com>",
"description": "xujie-vue基于vue、element-ui构建开发,实现xujie-java后台管理前端功能,提供一套更优的前端解决方案。",
"author": "zhuangzhuang.yang <zhuangzhuang.yang@xujie.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0",

4
src/api/production/generateReport.js

@ -23,3 +23,7 @@ export const updatePrintStock= data => createAPI(`dailyPlan/updatePrintStock`, '
export const searchSeqNo= data => createAPI(`dailyPlan/searchSeqNo`, 'post', data);
//保存开始时间
export const startSeqNo= data => createAPI(`dailyPlan/startSeqNo`, 'post', data);
//保存开始时间
export const circulationSchedule= data => createAPI(`dailyPlan/circulationSchedule`, 'post', data);
export const closeSchedule= data => createAPI(`dailyPlan/closeSchedule`, 'post', data);

56
src/views/modules/autoPrint/autoPrintStock.vue

@ -0,0 +1,56 @@
<template>
<div class="mod-config">
<h1>自动打印库存标签</h1>
</div>
</template>
<script>
let autoPrint = '' //
import {
productionBlankingBoard,
} from '@/api/board.js'
export default {
name: 'productionBlankingBoard',
data () {
return {
}
},
mounted () {
},
methods: {
refreshTable () {
autoPrint = setInterval(() => {
this.printStock()
}, 3000)
},
printStock(){
},
},
}
</script>
<style >
.board2 .el-table .cell {
line-height: 13px;
font-size: 12px;
height: 13px;
padding: 0px;
}
.board2 .el-table .success-row {
background: #1bb61b;
}
.board2 .el-table .false-row {
/*background: #cbcb14;*/
background: #db1212;
}
.board2 .el-table .yellow-row{
background: #ffff00;
}
</style>

207
src/views/modules/production/closeSchedule.vue

@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -20px;">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item :label="'生产订单号'">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item>
@ -63,6 +63,13 @@
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'是否关闭'">
<el-select v-model="searchData.closedFlag" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
<download-excel
@ -154,6 +161,13 @@
min-width="80"
label="合格数量">
</el-table-column>
<el-table-column
prop="closedFlag"
header-align="center"
align="left"
min-width="80"
label="是否关闭">
</el-table-column>
<el-table-column
prop="timeRequired"
header-align="center"
@ -210,16 +224,100 @@
min-width="100"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="circulationSeqNo"
header-align="center"
align="right"
min-width="90"
label="流转派工单号">
</el-table-column>
<el-table-column
prop="circulationQty"
header-align="center"
align="right"
min-width="80"
label="流转数量">
</el-table-column>
</el-table>
<el-dialog title="流转派工单" :close-on-click-modal="false" v-drag :visible.sync="circulationFlag" width="600px">
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: -5px;">
<el-form-item :label="'派工单号:'">
<el-input v-model="circulationData.seqNo" ref="start" type="number" style="width: 130px;" readonly></el-input>
</el-form-item>
<el-form-item :label="'派工日期:'">
<!-- <el-input v-model="circulationData.sScheduledDate" ref="start" type="number" style="width: 130px;" readonly></el-input>-->
<el-date-picker
style="width: 130px"
v-model="circulationData.sScheduledDate"
type="date"
value-format="yyyy-MM-dd"
readonly
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'未完成数量:'">
<el-input v-model="circulationData.circulationQty" ref="start" type="number" style="width: 130px;" readonly></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: 5px;">
<el-form-item :label="'流转日期:'">
<el-date-picker
style="width: 130px"
v-model="circulationData.circulationDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="派工机台:">
<el-select v-model="circulationData.sResourceID" style="width: 130px"
placeholder="请选择">
<el-option
v-for="(item,index) in availableResourceList"
:key="index"
:label="item.ResouceDesc"
:value="item.ResourceID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="派工班次:">
<el-select v-model="circulationData.sShiftNo" style="width: 130px"
placeholder="请选择">
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</el-form-item>
<el-form-item label="派工人员:">
<el-select v-model="circulationData.operatorId" style="width: 130px"
placeholder="请选择">
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorID">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="doCirculation()">流转</el-button>
<el-button type="primary" @click="circulationFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getWorkCenterOperatorList,
getAvailableResourceList,
} from "@/api/production.js"
import {
getSOScheduleRoutingData
, cancelJob
, cancelJob,
circulationSchedule,
closeSchedule
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
import {
@ -238,6 +336,18 @@
readonlyFlag: false,
disabled: false
},
circulationData:{
site:'',
seqNo:'',
sScheduledDate:'',
circulationQty:'',
circulationDate:'',
sResourceID:'',
sShiftNo:'',
operatorId:'',
},
availableResourceList:[],
operatorIdList:[],
saveHeaderData: {
site: '',
seqNo: '',
@ -311,6 +421,7 @@
operatorName:'',
sResourceID:'',
sShiftNo:'',
closedFlag:'',
},
photoUrl:'',
sopData:{
@ -327,6 +438,7 @@
showviewer: false,
url: '',
height2:600,
circulationFlag:false,
}
},
mounted () {
@ -397,23 +509,70 @@
return Y + M + D + H + MM + S
},
circulation(row){
this.getWorkCenterOperatorList(row);
this.getAvailableResourceList(row);
this.circulationData.seqNo=row.seqNo;
this.circulationData.sScheduledDate=row.sScheduledDate;
this.circulationData.circulationQty=row.qtyRequired-row.qtyApprove;
this.circulationData.site=row.site;
this.circulationData.circulationDate='';
this.circulationData.sResourceID='';
this.circulationData.sShiftNo='';
this.circulationData.operatorId='';
this.circulationFlag=true;
},
cancelJob(row){
if(row.qtyReported>0){
this.$alert('该派工单已经有报工无法取消!', '错误', {
doCirculation(){
if(this.circulationData.circulationDate==''||this.circulationData.circulationDate==null){
this.$alert('请选择流转日期!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.circulationData.sResourceID==''||this.circulationData.sResourceID==null){
this.$alert('请选择机台!', '错误', {
confirmButtonText: '确定'
})
return false
return false;
}
this.$confirm(`确定取消此派工单`, '提示', {
if(this.circulationData.sShiftNo==''||this.circulationData.sShiftNo==null){
this.$alert('请选择班次!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.circulationData.operatorId==''||this.circulationData.operatorId==null){
this.$alert('请选择操作员!', '错误', {
confirmButtonText: '确定'
})
return false;
}
circulationSchedule(this.circulationData).then(({data}) => {
if (data && data.code === 0) {
this.circulationFlag=false;
this.search ();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
closeSchedule(row){
this.$confirm(`确定关闭此派工单`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelJob(row).then(({data}) => {
closeSchedule(row).then(({data}) => {
if (data && data.code === 0) {
this.search ();
this.search();
this.$message({
message: '操作成功',
type: 'success',
@ -421,18 +580,34 @@
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
toPrint(row){
let array=[];
let data={
seqNo:row.seqNo,
getWorkCenterOperatorList(row){
let inData={
site:row.site,
workCenterNo:row.sWorkCenterNo,
}
array.push(data)
printSeqNoLabel(array)
getWorkCenterOperatorList(inData).then(({data}) => {
this.operatorIdList = data.rows;
})
},
getAvailableResourceList(row){
let inData={
site:row.site,
orderNo:row.orderNo,
itemNo:row.itemNo,
}
getAvailableResourceList(inData).then(({data}) => {
this.availableResourceList = data.rows;
})
},
},
created () {
}

11
src/views/modules/production/generateReport.vue

@ -418,6 +418,9 @@
</template>
<script>
import {
printTransNoLabel,
} from "@/views/modules/production/print_transNo_label.js"
import {
getSOScheduleRoutingData
, saveGenerateReportForSchedule,
@ -612,6 +615,14 @@
this.$message.success(data.msg)
this.setUp.reviewFlag = false
this.search()
if(data.transNo!=null&&data.transNo!=""){
let indata={
transNo:data.transNo,
}
let inList=[];
inList.push(indata)
printTransNoLabel(inList);
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

4
src/views/modules/production/print_stock_label.js

@ -87,9 +87,9 @@ export function printMaterialLabel(printList) {
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_LINE(186,2,187,374,0,1);
}
// LODOP.PRINT_DESIGN();
LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
LODOP.PRINT();
// LODOP.PRINT();
console.log("操作成功!")
}
}

29
src/views/modules/production/print_transNo_label.js

@ -0,0 +1,29 @@
/*调用js打印标签*/
import getLodop from '@/utils/LodopFuncs.js'
/*打印材料卷标签*/
export function printTransNoLabel(printList) {
const LODOP = getLodop()
if (LODOP) {
//LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
LODOP.SET_PRINTER_INDEXA("小标签打印机");
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,1000,1000,"");
LODOP.ADD_PRINT_TEXT(52,21,72,35,"入库通知单号:"+printData.transNo);
LODOP.SET_PRINT_STYLEA(0,"FontName","黑体");
LODOP.SET_PRINT_STYLEA(0,"FontSize",9);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-5);
LODOP.ADD_PRINT_BARCODE(3,31,86,61,"QRCode",printData.transNo);
}
LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
// LODOP.PRINT();
console.log("操作成功!")
}
}

29
src/views/modules/production/soscheduleRouting.vue

@ -63,6 +63,13 @@
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'是否关闭'">
<el-select v-model="searchData.closedFlag" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
<download-excel
@ -154,6 +161,13 @@
min-width="80"
label="合格数量">
</el-table-column>
<el-table-column
prop="closedFlag"
header-align="center"
align="left"
min-width="80"
label="是否关闭">
</el-table-column>
<el-table-column
prop="timeRequired"
header-align="center"
@ -210,6 +224,20 @@
min-width="100"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="circulationSeqNo"
header-align="center"
align="right"
min-width="90"
label="流转派工单号">
</el-table-column>
<el-table-column
prop="circulationQty"
header-align="center"
align="right"
min-width="80"
label="流转数量">
</el-table-column>
</el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -311,6 +339,7 @@
operatorName:'',
sResourceID:'',
sShiftNo:'',
closedFlag:'',
},
photoUrl:'',
sopData:{

7
src/views/modules/production/stockPrint.vue

@ -22,10 +22,10 @@
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">物料编码</a></span>
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'生产订单号 '">
<el-form-item :label="'生产订单号:'">
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'是否打印'">
<el-form-item :label="'是否打印:'">
<el-select filterable v-model="searchData.printFlag" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="Y"></el-option>
@ -165,6 +165,7 @@
startDate:new Date(),
endDate:'',
printFlag:'N',
seqNo:'',
},
photoUrl:'',
sopData:{
@ -236,7 +237,7 @@
printStock(row){
let array=[];
let data={
seqNo:row.site+'|'+row.partNo+'|'+row.wareHouseId+'|'+row.batchNo+'|'+row.locationId+'|'+row.qty,
seqNo:row.site+'|'+row.partNo+'|'+row.wareHouseId+'|'+row.batchNo+'|'+row.locationId,
site:row.site,
wareHouseId:row.wareHouseId,
batchNo:row.wareHouseId,

Loading…
Cancel
Save