Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
a919f40241
  1. 4
      src/main.js
  2. 31
      src/utils/common.js
  3. 2
      src/views/modules/board/SORoutingBoardForBaoZhuang.vue
  4. 2
      src/views/modules/print/print_outBox_label.js
  5. 8
      src/views/modules/production/closeSchedule.vue
  6. 29
      src/views/modules/production/generateReport.vue
  7. 12
      src/views/modules/production/scheduleForSOTask.vue
  8. 12
      src/views/modules/production/scheduleForShopOrder.vue
  9. 4
      src/views/modules/production/soscheduleRouting.vue

4
src/main.js

@ -18,7 +18,7 @@ import './directives'
import decimalUtil from '@/utils/decimalUtil' import decimalUtil from '@/utils/decimalUtil'
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import getLodop from '@/utils/LodopFuncs.js' import getLodop from '@/utils/LodopFuncs.js'
import { debounce,throttle} from '@/utils/common.js'
Vue.component('downloadExcel', JsonExcel) Vue.component('downloadExcel', JsonExcel)
@ -36,6 +36,8 @@ Vue.prototype.isAuth = isAuth // 权限方法
Vue.prototype.decimalUtil = decimalUtil // 计算 Vue.prototype.decimalUtil = decimalUtil // 计算
Vue.prototype.dayjs = dayjs //时间格式化插件 2021-11-02 Vue.prototype.dayjs = dayjs //时间格式化插件 2021-11-02
Vue.prototype.getLodop = getLodop // 打印 Vue.prototype.getLodop = getLodop // 打印
Vue.prototype.debounce = debounce // 防抖
Vue.prototype.throttle = throttle // 限流
// 保存整站vuex本地储存初始状态 // 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state) window.SITE_CONFIG['storeState'] = cloneDeep(store.state)

31
src/utils/common.js

@ -0,0 +1,31 @@
// 防抖
export function debounce(fn, wait = 3000) {
let timer = null;
return function () {
console.log(wait)
let args = arguments;
let that = this;
if (timer) {
clearTimeout(timer)
}
timer = setTimeout(function () {
timer = null;
fn.apply(that, args)
}, wait)
}
}
// 节流
export function throttle(fn, wait = 3000) {
let timer = null;
return function () {
if (timer != null) return;
let args = arguments;
let that = this;
clearTimeout(timer)
fn.apply(that, args)
timer = setTimeout(function () {
timer = null;
}, wait)
}
}

2
src/views/modules/board/SORoutingBoardForBaoZhuang.vue

@ -43,7 +43,7 @@
header-align="center" header-align="center"
align="left" align="left"
min-width="30" min-width="30"
label="包装袋">
label="包">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="partNo" prop="partNo"

2
src/views/modules/print/print_outBox_label.js

@ -17,7 +17,7 @@ export function printOutBoxLabel(printList) {
LODOP.ADD_PRINT_RECT(60,5,551,270,0,1); LODOP.ADD_PRINT_RECT(60,5,551,270,0,1);
LODOP.ADD_PRINT_TEXT(3,35,496,50,printData.siteName ); LODOP.ADD_PRINT_TEXT(3,35,496,50,printData.siteName );
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial Black"); LODOP.SET_PRINT_STYLEA(0,"FontName","Arial Black");
LODOP.SET_PRINT_STYLEA(0,"FontSize",24);
LODOP.SET_PRINT_STYLEA(0,"FontSize",22);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2); LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(45,25,44,20,"Date:"); LODOP.ADD_PRINT_TEXT(45,25,44,20,"Date:");

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

@ -9,7 +9,7 @@
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
<span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码</a></span> <span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码</a></span>
<el-input v-model="searchData.sWorkCenterNo" style="width: 130px"></el-input>
<el-input v-model="searchData.sWorkCenterNo" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span> <span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span>
@ -561,6 +561,11 @@
}) })
return false; return false;
} }
this.$confirm(`是否流转?流转后需要重新打印新派工单!`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
circulationSchedule(this.circulationData).then(({data}) => { circulationSchedule(this.circulationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.circulationFlag=false; this.circulationFlag=false;
@ -578,6 +583,7 @@
}) })
} }
}) })
})
}, },
closeSchedule(row){ closeSchedule(row){
this.$confirm(`确定关闭此派工单`, '提示', { this.$confirm(`确定关闭此派工单`, '提示', {

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

@ -89,8 +89,8 @@
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button @click="openStart()" style="margin-left: 0px;margin-top:0px" type="primary">派工单开始</el-button> <el-button @click="openStart()" style="margin-left: 0px;margin-top:0px" type="primary">派工单开始</el-button>
<el-button @click="openScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单报工</el-button> <el-button @click="openScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单报工</el-button>
<el-button @click="stopScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单暂停</el-button>
<el-button @click="continueScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单继续</el-button>
<el-button @click="stopScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单异常暂停 </el-button>
<el-button @click="continueScan()" style="margin-left: 0px;margin-top:0px" type="primary">派工单异常继续</el-button>
<download-excel <download-excel
:fields="exportDataStandard" :fields="exportDataStandard"
:data="tableData" :data="tableData"
@ -387,7 +387,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top"> <el-form :inline="true" label-position="top">
<el-form-item label="本工序报工数">
<!-- <el-form-item label="本工序报工数">-->
<el-form-item label="本订单已报工数">
<el-input style="width: 130px;" :disabled="setUp.disabled" v-model="qty1"></el-input> <el-input style="width: 130px;" :disabled="setUp.disabled" v-model="qty1"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上工序报工数"> <el-form-item label="上工序报工数">
@ -396,7 +397,7 @@
<el-form-item label="单位重量"> <el-form-item label="单位重量">
<el-input style="width: 130px;" disabled v-model="qty3"></el-input> <el-input style="width: 130px;" disabled v-model="qty3"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="派工单数量">
<el-form-item label="派工单数量">
<el-input style="width: 130px;" disabled v-model="saveHeaderData.qtyRequire"></el-input> <el-input style="width: 130px;" disabled v-model="saveHeaderData.qtyRequire"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -407,9 +408,9 @@
<el-form-item label="不合格数量" > <el-form-item label="不合格数量" >
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" @blur="qtyReportedBlur()"></el-input> <el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" @blur="qtyReportedBlur()"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="返工数量" >-->
<!-- <el-input type="number" style="width: 178px;" v-model="saveHeaderData.qtyRework" @blur="qtyReworkBlur()"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="模数" >
<el-input type="number" style="width: 178px;" v-model="moQty" @blur="moQtyBlur()"></el-input>
</el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top"> <el-form :inline="true" label-position="top">
@ -431,7 +432,10 @@
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.boxWeight" @blur="boxWeightBlur()"></el-input> <el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.boxWeight" @blur="boxWeightBlur()"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="停机原因"> <el-form-item label="停机原因">
<el-input style="width: 370px;" v-model="saveHeaderData.shutdownReason"></el-input>
<el-input style="width: 178px;" v-model="saveHeaderData.shutdownReason"></el-input>
</el-form-item>
<el-form-item label="理论数量">
<el-input type="number" class="input_left" style="width: 178px;" disabled v-model="saveHeaderData.liLunQty" ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;"> <fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;">
@ -564,6 +568,7 @@
KGRework:'', KGRework:'',
approveFlag:false, approveFlag:false,
abnormalList:[], abnormalList:[],
moQty:'',
saveHeaderData: { saveHeaderData: {
boxWeight:0, boxWeight:0,
qtyRequire:'', qtyRequire:'',
@ -594,6 +599,7 @@
orderRef1:'', orderRef1:'',
scheduleType:'', scheduleType:'',
userId:'', userId:'',
liLunQty:'',
}, },
scanSeqNo:'', scanSeqNo:'',
stopModalFlag:false, stopModalFlag:false,
@ -1022,6 +1028,8 @@
this.saveHeaderData.boxWeight=0; this.saveHeaderData.boxWeight=0;
this.qty1=''; this.qty1='';
this.qty2 =''; this.qty2 ='';
this.moQty ='';
this.liLunQty ='';
this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
@ -1068,6 +1076,11 @@
this.KGReported='' this.KGReported=''
} }
}, },
moQtyBlur(){
if(this.cavity&&this.cavity!=0&&this.cavity!='erp未维护数据'&&this.moQty!=''){
this.saveHeaderData.liLunQty=(this.cavity*this.moQty).toFixed(1)
}
},
qtyApproveBlur(){ qtyApproveBlur(){
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyApprove!=''){ if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyApprove!=''){
if(this.saveHeaderData.boxWeight!=null&&this.saveHeaderData.boxWeight!='') { if(this.saveHeaderData.boxWeight!=null&&this.saveHeaderData.boxWeight!='') {

12
src/views/modules/production/scheduleForSOTask.vue

@ -626,12 +626,12 @@
}, },
openScheduleModel(row){ openScheduleModel(row){
if (row.lotSize-row.scheduledQty == 0) {
this.$alert('该订单已派工完毕!', '错误', {
confirmButtonText: '确定'
})
return false
}
// if (row.lotSize-row.scheduledQty == 0) {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
if (row.qtyfinished == 0) { if (row.qtyfinished == 0) {
this.$alert('该日计划尚未打料完成!', '错误', { this.$alert('该日计划尚未打料完成!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'

12
src/views/modules/production/scheduleForShopOrder.vue

@ -659,12 +659,12 @@
}, },
openScheduleModel(row){ openScheduleModel(row){
if (row.lotSize-row.scheduledQty == 0) {
this.$alert('该订单已派工完毕!', '错误', {
confirmButtonText: '确定'
})
return false
}
// if (row.lotSize-row.scheduledQty == 0) {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
this.schedulingModalData = { this.schedulingModalData = {
remark:'', remark:'',
weightFactor: row.weightFactor, weightFactor: row.weightFactor,

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

@ -479,6 +479,10 @@
onClose: () => { onClose: () => {
} }
}) })
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
} }
}) })
}) })

Loading…
Cancel
Save