Browse Source

0412 新看板

master
ruanqi 1 year ago
parent
commit
57f701d762
  1. 3
      src/api/production.js
  2. 13
      src/views/modules/production/scheduleForSOTask.vue
  3. 826
      src/views/modules/production/scheduleForVPShopOrder.vue
  4. 11
      src/views/modules/production/soscheduleRouting.vue

3
src/api/production.js

@ -47,6 +47,7 @@ export const getWorkCenterOperatorList=data => createAPI(`dailyPlan/getWorkCente
export const getAvailableResourceList=data => createAPI(`dailyPlan/getAvailableResourceList`, 'post', data);
export const scheduleForShopOrder=data => createAPI(`dailyPlan/scheduleForShopOrder`, 'post', data);
export const scheduleForVPShopOrder=data => createAPI(`dailyPlan/scheduleForVPShopOrder`, 'post', data);
export const scheduleForSOTask=data => createAPI(`dailyPlan/scheduleForSOTask`, 'post', data);
export const saveHunlianTask=data => createAPI(`dailyPlan/saveHunlianTask`, 'post', data);
@ -75,3 +76,5 @@ export const getAllDepartment= data => createAPI(`dailyPlan/getAllDepartment`, '
export const updateTV=data => createAPI(`dailyPlan/updateTV`, 'post', data);
export const getTvList=data => createAPI(`dailyPlan/getTvList`, 'post', data);
export const updateWorkStation=data => createAPI(`dailyPlan/updateWorkStation`, 'post', data);
export const getShopOrderRoutingVPData=data => createAPI(`dailyPlan/getShopOrderRoutingVPData`, 'post', data);

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

@ -163,6 +163,13 @@
min-width="90"
label="是否打料完成">
</el-table-column>
<el-table-column
prop="vpFinishFlag"
header-align="center"
align="left"
min-width="90"
label="VP是否完成">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
@ -683,6 +690,12 @@
})
return false
}
if (row.vpFinishFlag === 'N') {
this.$alert('该日计划尚未完成组件!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.schedulingModalData = {
remark:'',
weightFactor: row.weightFactor,

826
src/views/modules/production/scheduleForVPShopOrder.vue

@ -0,0 +1,826 @@
<template>
<div class="mod-config">
<el-form :inline="true" v-model="searchData">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" >
<el-form-item :label="'工厂编码:'">
<el-input v-model="searchData.site" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'VP订单号:'">
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'硫化周计划号:'">
<el-input v-model="searchData.liuhuaTaskNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'硫化周计划日期:'">
<el-date-picker
style="width: 120px"
v-model="searchData.startDate1"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 120px"
v-model="searchData.endDate1"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">硫化产品编码</a></span>
<el-input v-model="searchData.liuhuaPartNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'硫化规格型号:'">
<el-input v-model="searchData.liuhuaPartDescSpec" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">VP物料编码</a></span>
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'VP规格型号:'">
<el-input v-model="searchData.partDescription" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 24px" type="primary">查询</el-button>
<!-- <download-excel-->
<!-- :fields="exportDataStandard"-->
<!-- :data="tableData"-->
<!-- type="xlsx"-->
<!-- :name="exportName"-->
<!-- :header="exportHeader"-->
<!-- :footer="exportFooter"-->
<!-- :defaultValue="exportDefaultValue"-->
<!-- :fetch="createExportData"-->
<!-- :before-generate="startDownload"-->
<!-- :before-finish="finishDownload"-->
<!-- worksheet="导出信息"-->
<!-- class="el-button el-button&#45;&#45;primar·y el-button&#45;&#45;medium">-->
<!-- {{'导出'}}-->
<!-- </download-excel>-->
</el-form-item>
</el-form>
</el-form>
<el-table
:height="height"
:data="tableData"
border
:row-class-name="tableRowClassName"
style="width: 100%">
<el-table-column
prop=""
fixed="left"
header-align="center"
align="center"
width="60"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="openScheduleModel(scope.row)">派工</a>
</template>
</el-table-column>
<el-table-column
prop="liuhuaTaskNo"
header-align="center"
align="left"
width="140"
label="硫化周计划号">
</el-table-column>
<el-table-column
prop="needDate"
header-align="center"
align="left"
width="80"
label="周计划日期">
</el-table-column>
<el-table-column
prop="liuhuaPartNo"
header-align="center"
align="left"
width="100"
label="硫化产品编码">
</el-table-column>
<el-table-column
prop="liuhuaPartDescSpec"
header-align="center"
align="left"
width="160"
label="硫化产品型号">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
width="100"
label="组合件编码">
</el-table-column>
<el-table-column
prop="partDescription"
header-align="center"
align="left"
width="160"
label="组合件规格型号">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
align="right"
width="50"
label="工序">
</el-table-column>
<el-table-column
prop="operationDesc"
header-align="center"
align="left"
width="100"
label="工序名称">
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
width="100"
label="组合件生产订单">
</el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
width="100"
label="组合件需求数量">
</el-table-column>
<el-table-column
prop="weight"
header-align="center"
align="right"
width="100"
label="组合件重量">
</el-table-column>
<el-table-column
prop="erpStatus"
header-align="center"
align="center"
width="100"
label="硫化单ERP状态">
</el-table-column>
<el-table-column
prop="liuhuaOrderNo"
header-align="center"
align="center"
width="120"
label="硫化生产订单号">
</el-table-column>
</el-table>
<el-dialog title="派工" :close-on-click-modal="false" v-drag :visible.sync="scheduledModalFlag" width="850px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="订单号:">
<el-input v-model="schedulingModalData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工厂编号:">
<el-input v-model="schedulingModalData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="要求完工日期:">
<el-input v-model="schedulingModalData.needDate" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="订单数量:">
<el-input v-model="schedulingModalData.lotSize" disabled style="width: 120px"></el-input>
</el-form-item>
<!-- <el-form-item label="待派工数:">-->
<!-- <el-input v-model="schedulingModalData.qtyToSchedule" disabled style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="可派工数:">-->
<!-- <el-input v-model="schedulingModalData.qty1" disabled style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="本次累计派工数量:">
<el-input v-model="schedulingModalData.sumQty" type="number" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="重量系数:">
<el-input v-model="schedulingModalData.weightFactor" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="产品编码:">
<el-input v-model="schedulingModalData.partNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="产品名称:">
<el-input v-model="schedulingModalData.partDescription" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工序号:">
<el-input v-model="schedulingModalData.itemNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工序名称:">
<el-input v-model="schedulingModalData.operationDesc" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="加工中心:">
<el-input v-model="schedulingModalData.workCenterNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="上工序报工数:">
<el-input v-model="schedulingModalData.lastApproveQty" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="派工机台:">-->
<!-- <el-select v-model="schedulingModalData.resourceId" style="width: 120px"-->
<!-- placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="(item,index) in availableResourceList"-->
<!-- :key="index"-->
<!-- :label="item.ResourceID+'-'+item.ResouceDesc"-->
<!-- :value="item.ResourceID"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="派工班次:">-->
<!-- <el-select v-model="schedulingModalData.shiftNo" style="width: 120px"-->
<!-- placeholder="请选择">-->
<!-- <el-option label="白班" value="白班"></el-option>-->
<!-- <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="schedulingModalData.operatorId" style="width: 120px"-->
<!-- placeholder="请选择">-->
<!-- <el-option v-for="item in operatorIdList" :key="item.operatorID" :label="item.operatorName"-->
<!-- :value="item.operatorID">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="派工备注:">
<el-input v-model="schedulingModalData.remark" style="width: 657px"></el-input>
<!-- <el-button type="primary" @click="addPlans()" style="margin-left: 10px;">添加</el-button>-->
<el-button type="primary" @click="saveSchedule()">保存</el-button>
</el-form-item>
</el-form>
<div class="rq ">
<el-table
height="200"
:data="schedulingModalTableData"
border
:row-style="{height: '25px'}"
style="width: 100%">
<el-table-column
prop="scheduleDate"
header-align="center"
align="left"
min-width="100"
label="派工日期">
<template slot-scope="scope">
<el-date-picker
style="width: 95%"
class="sl-input"
v-model="scope.row.scheduleDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="materialWeight"-->
<!-- header-align="center"-->
<!-- align="right"-->
<!-- min-width="80"-->
<!-- label="半成品数量">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.materialWeight" type="number" :disabled="materialWeightFactorFlag" @blur="materialWeightBlur(scope.row)"-->
<!-- style="width:98%"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="scheduleQty"
header-align="center"
align="right"
min-width="80"
label="派工数量">
<template slot-scope="scope">
<el-input v-model="scope.row.scheduleQty" type="number" disabled placeholder="请输入数量"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop="weight"
header-align="center"
align="right"
min-width="80"
label="转化重量">
<template slot-scope="scope">
<el-input v-model="scope.row.weight" type="number" disabled placeholder="请输入重量"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop="resourceId"
header-align="center"
align="left"
min-width="80"
label="派工机台">
<template slot-scope="scope">
<el-select v-model="scope.row.resourceId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResourceID+'-'+item.ResouceDesc"
:value="item.ResourceID">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="shiftNo"
header-align="center"
align="left"
min-width="80"
label="派工班次">
<template slot-scope="scope">
<el-select v-model="scope.row.shiftNo" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
<el-option label="加班" value="加班"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="shiftNo"
header-align="center"
align="left"
min-width="80"
label="派工类型">
<template slot-scope="scope">
<el-select v-model="scope.row.jobType" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option label="计件" value="计件"></el-option>
<el-option label="计时" value="计时"></el-option>
<el-option label="外协" value="外协"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="operatorId"
header-align="center"
align="right"
min-width="80"
label="派工人员">
<template slot-scope="scope">
<el-select v-model="scope.row.operatorId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorID">
</el-option>
</el-select>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop=""-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="60"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope" class="foo_container">-->
<!-- <a type="text" size="small" @click="splitScheduleTable(scope.$index)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="scheduledModalFlag = false">取消</el-button>
<!-- <el-button type="primary" :disabled="bannersBut" @click="saveBanners()">确定</el-button>-->
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getShopOrderRoutingVPData,
getWorkCenterOperatorList,
getAvailableResourceList,
scheduleForShopOrder,
getSPBomQtyAssembly,
} from "@/api/production.js"
import {
searchLastApproveQty,
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
name: 'searchDailyPlan',
components: {
Chooselist
},
data () {
return {
// start
exportData: [],
exportDataStandard: {
"生产订单号": "orderNo",
"工序号": "itemNo",
"工序名称": "operationDesc",
"物料编码": "partNo",
"物料名称": "partDescription",
"加工中心": "workCenterNo",
"状态": "status",
"计划开工日期": "planStartDate",
"要求完工日期": "needDate",
"订单数量": "lotSize",
"已派工数量": "scheduledQty",
"已报工数量": "qtyReported",
"合格数量": "qtyApprove",
"录入时间": "enterDate",
"录入人": "userName",
"排产时间": "lastTime",
"调机时间": "machSetupTime",
"单位产出量": "machRunFactor",
"产出单位": "factorUnit",
"让步接收数":"defectiveQty",
},
exportName: "生产订单工序列表"+this.getStrDate(),
exportHeader: ["生产订单工序列表"],
exportFooter: [],
exportDefaultValue: "",
// end
height:200,
tableData:[],
date1:'',
searchData: {
site: '',
orderNo: '',
startDate1: new Date(),
endDate1: '',
liuhuaTaskNo: '',
liuhuaPartNo: '',
liuhuaPartDescSpec: '',
partNo: '',
partDescription:'',
userId:this.$store.state.user.name,
},
weightFactorFlag:false,
materialWeightFactorFlag:false,
schedulingModalData: {
remark:'',
weightFactor:'',
orderNo: '',
site: '',
needDate: '',
lotSize: '',
partNo: '',
partDescription: '',
itemNo: '',
operationDesc: '',
workCenterNo: '',
scheduleDate: '',
scheduleQty: '',
resourceId: '',
shiftNo: '',
sumQty: '',
operatorId:'',
efficiency:'',
liuhuaTaskNo:'',
lastApproveQty:'',
partPlanQty:'',
qtyAssembly:'',
},
scheduledModalFlag: false,
availableResourceList: [],
schedulingModalTableData: [],
operatorIdList:[],
tagNo:'',
}
},
mounted() {
this.$nextTick(()=>{
this.height = window.innerHeight - 220;
})
},
methods: {
// S
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 5) {
strVal = this.searchData.partNo
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
}
},
search(){
getShopOrderRoutingVPData(this.searchData).then(({data}) => {
this.tableData = data.rows;
})
},
createExportData() {
return this.tableData;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
getStrDate() {
let dd = new Date();
let Y = dd.getFullYear();
let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//100
let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//100
let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours();
let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes();
let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds();
return Y + M + D + H + MM + S;
},
openScheduleModel(row){
// if (row.lotSize-row.scheduledQty == 0) {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
this.schedulingModalData = {
remark:'',
weightFactor: row.weightFactor,
partPlanQty: row.partPlanQty,
orderNo: row.orderNo,
site: row.site,
needDate: row.needDate,
lotSize: row.qtyRequired,
liuhuaTaskNo: row.liuhuaTaskNo,
partNo: row.partNo,
partDescription: row.partDescription,
itemNo: row.itemNo,
operationDesc: row.operationDesc,
workCenterNo: row.workCenterNo,
efficiency:row.efficiency,
scheduleDate: '',
scheduleQty: '',
resourceId: '',
shiftNo: '',
operatorId:'',
sumQty: 0,
lastApproveQty:null,
weight:row.weight,
qtyAssembly:'',
repairSOFlag:row.repairSOFlag,
}
this.materialWeightFactorFlag=true
if(this.schedulingModalData.weightFactor==null||this.schedulingModalData.weightFactor==''||this.schedulingModalData.weightFactor=='0'){
this.weightFactorFlag=true;
this.schedulingModalData.weightFactor='ERP未维护数据'
}else {
this.weightFactorFlag=false;
}
this.schedulingModalTableData = []
this.getAvailableResourceList(row)
this.getWorkCenterOperatorList(row);
let inData={
site:row.site,
orderNo:row.orderNo,
itemNo:row.itemNo,
}
searchLastApproveQty(inData).then(({data}) => {
if(data.code===0&&data.row.lastApproveQty!=null) {
this.schedulingModalData.lastApproveQty = data.row.lastApproveQty;
}
})
this.scheduledModalFlag = true
this.addPlans()
},
addPlans () {
let data={
scheduleQty: this.schedulingModalData.lotSize,
weight: this.schedulingModalData.weight,
resourceId: this.schedulingModalData.resourceId,
shiftNo: this.schedulingModalData.shiftNo,
scheduleDate: null,
operatorId:this.schedulingModalData.operatorId,
liuhuaTaskNo:this.schedulingModalData.liuhuaTaskNo,
createBy:this.$store.state.user.name,
jobType:'',
}
// if(this.schedulingModalData.partPlanQty!=null&&this.schedulingModalData.partPlanQty!=''&&this.schedulingModalData.partPlanQty!=0){
// data.scheduleQty=this.schedulingModalData.partPlanQty;
// if(this.schedulingModalData.weightFactor==null||this.schedulingModalData.weightFactor==''||this.schedulingModalData.weightFactor=='0'){
// }else {
// data.weight=Math.round( data.scheduleQty*this.schedulingModalData.weightFactor)
// }
// if(!this.materialWeightFactorFlag){
// data.materialWeight=(data.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1)
// }
// }
this.schedulingModalTableData.push(data)
this.changeSum();
},
changeSum () {
let sum = 0
if (this.schedulingModalTableData.length > 0) {
for (let i = 0; i < this.schedulingModalTableData.length; i++) {
if (this.schedulingModalTableData[i].scheduleQty != '' && this.schedulingModalTableData[i].scheduleQty != null) {
sum += Number(this.schedulingModalTableData[i].scheduleQty)
}
}
}
this.schedulingModalData.sumQty = sum
},
splitScheduleTable (index) {
this.schedulingModalTableData.splice(index, 1)
this.changeSum()
},
getWorkCenterOperatorList(row){
let inData={
site:row.site,
workCenterNo:row.workCenterNo,
}
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;
})
},
saveSchedule(){
if(this.schedulingModalTableData.length==0){
this.$alert('请添加派工记录!', '错误', {
confirmButtonText: '确定'
})
return false
}
let flag=false;
for (let i = 0; i <this.schedulingModalTableData.length; i++) {
if(''==this.schedulingModalTableData[i].scheduleQty||this.schedulingModalTableData[i].scheduleQty==null){
this.$alert('存在派工记录没有填写派工数量!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.schedulingModalTableData[i].scheduleQty<=0){
this.$alert('派工数量必须大于0!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.schedulingModalTableData[i].jobType==''||this.schedulingModalTableData[i].jobType==null){
this.$alert('请选择派工类型!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(''==this.schedulingModalTableData[i].resourceId||this.schedulingModalTableData[i].resourceId==null){
this.$alert('存在派工记录没有选择机台!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(''==this.schedulingModalTableData[i].shiftNo||this.schedulingModalTableData[i].shiftNo==null){
this.$alert('存在派工记录没有选择班次!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(''==this.schedulingModalTableData[i].scheduleDate||this.schedulingModalTableData[i].scheduleDate==null){
this.$alert('存在派工记录没有填写日期!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(''==this.schedulingModalTableData[i].operatorId||this.schedulingModalTableData[i].operatorId==null){
this.$alert('存在派工记录没有选择操作员!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.schedulingModalTableData[i].scheduleDate>this.schedulingModalData.needDate){
flag=true;
}
}
if(flag){
this.$confirm(`派工日期晚于周计划日期,是否继续`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doSchedule();
})
}else {
this.doSchedule();
}
},
doSchedule(){
let indata={
orderNo: this.schedulingModalData.orderNo,
site: this.schedulingModalData.site,
needDate: this.schedulingModalData.needDate,
partNo: this.schedulingModalData.partNo,
itemNo: this.schedulingModalData.itemNo,
workCenterNo: this.schedulingModalData.workCenterNo,
sumQty: this.schedulingModalData.sumQty,
scheduleDetail:this.schedulingModalTableData,
efficiency:this.schedulingModalData.efficiency,
remark:this.schedulingModalData.remark,
repairSOFlag:this.schedulingModalData.repairSOFlag,
}
scheduleForShopOrder(indata).then(({data}) => {
if (data && data.code === 0) {
this.scheduledModalFlag = false
this.search()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
materialWeightBlur(row){
row.scheduleQty=(row.materialWeight/this.schedulingModalData.qtyAssembly).toFixed(1)
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){
row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1)
}
},
scheduleQtyBlur(row){
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){
row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1)
if(!this.materialWeightFactorFlag){
row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1)
}
}
if(row.scheduleQty==''){
row.weight=''
row.materialWeight=''
}
},
weightBlur(row){
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.weight!=''){
row.scheduleQty=(row.weight/this.schedulingModalData.weightFactor).toFixed(1)
if(!this.materialWeightFactorFlag){
row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1)
}
}
if(row.weight==''){
row.scheduleQty=''
row.materialWeight=''
}
},
tableRowClassName ({row, rowIndex}) {
if (row.lastStartDate == this.dayjs().format('YYYY-MM-DD')) {
return 'success-row'
}
return ''
},
},
created() {
}
}
</script>
<style >
.el-table .success-row {
background: #1bb61b;
}
</style>

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

@ -84,6 +84,9 @@
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item label="VP组件对应周计划" >
<el-input v-model="searchData.taskOrderNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
<download-excel
@ -355,6 +358,13 @@
min-width="80"
label="流转数量">
</el-table-column>
<el-table-column
prop="taskOrderNo"
header-align="center"
align="left"
min-width="150"
label="VP组件对应周计划">
</el-table-column>
</el-table>
<!--模具使用记录-->
<el-dialog :close-on-click-modal="false" title="模具使用记录" :visible.sync="toolHistDialog" width="60%">
@ -490,6 +500,7 @@
sShiftNo:'',
closedFlag:'',
repairSOFlag:'',
taskOrderNo:'',
},
photoUrl:'',
sopData:{

Loading…
Cancel
Save