rq 4 years ago
parent
commit
e780aafba9
  1. 2
      src/api/production/generateReport.js
  2. 30
      src/views/modules/production/dailyPlan.vue
  3. 26
      src/views/modules/production/dailyPlanReport.vue
  4. 43
      src/views/modules/production/generateReport.vue
  5. 27
      src/views/modules/production/scheduleForSOTask.vue
  6. 28
      src/views/modules/production/scheduleForShopOrder.vue
  7. 92
      src/views/modules/production/soscheduleRouting.vue
  8. 7
      src/views/modules/sys/user.vue

2
src/api/production/generateReport.js

@ -12,3 +12,5 @@ export const getSOScheduleRoutingData = data => createAPI(`dailyPlan/getSOSchedu
// 获取生产报告信息
export const saveGenerateReportForSchedule = data => createAPI(`dailyPlan/saveGenerateReportForSchedule`, 'post', data);
export const cancelJob = data => createAPI(`dailyPlan/cancelJob`, 'post', data);

30
src/views/modules/production/dailyPlan.vue

@ -76,7 +76,8 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'物料编码:'">
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">物料编码</a></span>
<el-input v-model="searchData.partNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'排产情况:'">
@ -306,6 +307,8 @@
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -319,9 +322,12 @@
delPlan,
savePlans
} from '@/api/production.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
name: 'productionDispatch',
components: {
Chooselist
},
data () {
return {
@ -383,7 +389,8 @@
planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(so.scheduling_size,0),3)'
},
// table
height: 200
height: 200,
tagNo:'',
}
},
mounted () {
@ -392,6 +399,23 @@
})
},
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 () {
this.getData()
},

26
src/views/modules/production/dailyPlanReport.vue

@ -7,7 +7,8 @@
<el-form-item :label="'订单号:'">
<el-input v-model="searchData.orderRef1" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料编码 :'">
<el-form-item >
<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="'计划日期:'">
@ -172,6 +173,8 @@
<el-button type="primary" @click="reportsModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -183,8 +186,12 @@
dailyPlanReportsSave
} from "@/api/production.js"
import decimalUtil from '../../../utils/decimalUtil'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
name: 'dailyPlanReport',
components: {
Chooselist
},
data () {
return {
reportsModalFlag:false,
@ -215,6 +222,7 @@
},
dataListSelections:[],
tagNo:'',
}
},
mounted() {
@ -223,6 +231,22 @@
})
},
methods: {
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
}
},
selectionChangeHandle (val) {
this.dataListSelections = val
},

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

@ -48,10 +48,12 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'操作员姓名'">
<el-form-item >
<span slot="label" style="" @click="getBaseList(26)"><a herf="#">操作员姓名</a></span>
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'机台ID'">
<el-form-item >
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台ID</a></span>
<el-input v-model="searchData.sResourceID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'班次'">
@ -564,34 +566,33 @@
this.$nextTick(() => {
let strVal = ''
if (val === 24) {
strVal = this.searchData.workCenterNo
} else if (val === 26) {
this.operatorType = type
if (type === 1) {
strVal = this.saveHeaderData.operatorId
} else if (type === 2) {
strVal = this.saveHeaderData.operatorId2
}
strVal = this.searchData.sWorkCenterNo
}
if (val === 5) {
strVal = this.searchData.partNo
}
if (val === 26) {
strVal = this.searchData.operatorName
}
if (val === 88) {
strVal = this.searchData.sResourceID
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
console.log(val)
if (this.tagNo === 24) {
this.searchData.workCenterNo = val.WorkCenterNo
} else if (this.tagNo === 26) {
if (this.operatorType === 1) {
this.saveHeaderData.operatorId = val.OperatorID
this.saveHeaderData.operatorName = val.OperatorName
} else if (this.operatorType === 2) {
this.saveHeaderData.operatorId2 = val.OperatorID
this.saveHeaderData.operatorIdName2 = val.OperatorName
}
} else if (this.tagNo === 5) {
this.searchData.sWorkCenterNo = val.WorkCenterNo
} else if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
}
if (this.tagNo === 26) {
this.searchData.operatorName = val.OperatorName
}
if (this.tagNo === 88) {
this.searchData.sResourceID = val.ResourceID
}
},
initReportModal (row) {
this.setUp.reviewFlag = true

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

@ -42,7 +42,8 @@
</el-select>
</el-form-item>
<el-form-item :label="'物料编码:'">
<el-form-item >
<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="'派工情况:'">
@ -366,6 +367,7 @@
<!-- <el-button type="primary" :disabled="bannersBut" @click="saveBanners()">确定</el-button>-->
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -376,9 +378,12 @@
getAvailableResourceList,
scheduleForSOTask,
} from "@/api/production.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
name: 'scheduleForSOTask',
components: {
Chooselist
},
data () {
return {
// start
@ -444,6 +449,7 @@
availableResourceList: [],
schedulingModalTableData: [],
operatorIdList:[],
tagNo:'',
}
},
mounted() {
@ -452,6 +458,23 @@
})
},
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(){
getSOTastRoutingData(this.searchData).then(({data}) => {
this.tableData = data.rows;

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

@ -79,7 +79,8 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'物料编码:'">
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">物料编码</a></span>
<el-input v-model="searchData.partNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'派工情况:'">
@ -419,6 +420,7 @@
<!-- <el-button type="primary" :disabled="bannersBut" @click="saveBanners()">确定</el-button>-->
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -429,9 +431,12 @@
getAvailableResourceList,
scheduleForShopOrder,
} from "@/api/production.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
name: 'searchDailyPlan',
components: {
Chooselist
},
data () {
return {
// start
@ -501,6 +506,8 @@
availableResourceList: [],
schedulingModalTableData: [],
operatorIdList:[],
tagNo:'',
}
},
mounted() {
@ -509,6 +516,23 @@
})
},
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(){
getShopOrderRoutingData(this.searchData).then(({data}) => {
this.tableData = data.rows;

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

@ -48,10 +48,12 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'操作员姓名'">
<el-form-item >
<span slot="label" style="" @click="getBaseList(26)"><a herf="#">操作员姓名</a></span>
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'机台ID'">
<el-form-item >
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台ID</a></span>
<el-input v-model="searchData.sResourceID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'班次'">
@ -85,16 +87,16 @@
:data="tableData"
border
style="width: 100%">
<!-- <el-table-column-->
<!-- prop=""-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- min-width="50"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope" class="foo_container">-->
<!-- <a type="text" size="small" @click="initReportModal(scope.row)">报告</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop=""
header-align="center"
align="center"
min-width="60"
label="操作">
<template slot-scope="scope" class="foo_container">
<a type="text" size="small" @click="cancelJob(scope.row)">取消派工单</a>
</template>
</el-table-column>
<el-table-column
prop="seqNo"
header-align="center"
@ -216,7 +218,7 @@
<script>
import {
getSOScheduleRoutingData
, saveGenerateReportForSchedule
, cancelJob
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
@ -337,34 +339,33 @@
this.$nextTick(() => {
let strVal = ''
if (val === 24) {
strVal = this.searchData.workCenterNo
} else if (val === 26) {
this.operatorType = type
if (type === 1) {
strVal = this.saveHeaderData.operatorId
} else if (type === 2) {
strVal = this.saveHeaderData.operatorId2
}
strVal = this.searchData.sWorkCenterNo
}
if (val === 5) {
strVal = this.searchData.partNo
}
if (val === 26) {
strVal = this.searchData.operatorName
}
if (val === 88) {
strVal = this.searchData.sResourceID
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
console.log(val)
if (this.tagNo === 24) {
this.searchData.workCenterNo = val.WorkCenterNo
} else if (this.tagNo === 26) {
if (this.operatorType === 1) {
this.saveHeaderData.operatorId = val.OperatorID
this.saveHeaderData.operatorName = val.OperatorName
} else if (this.operatorType === 2) {
this.saveHeaderData.operatorId2 = val.OperatorID
this.saveHeaderData.operatorIdName2 = val.OperatorName
}
} else if (this.tagNo === 5) {
this.searchData.sWorkCenterNo = val.WorkCenterNo
} else if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
}
if (this.tagNo === 26) {
this.searchData.operatorName = val.OperatorName
}
if (this.tagNo === 88) {
this.searchData.sResourceID = val.ResourceID
}
},
search () {
@ -392,7 +393,32 @@
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
return Y + M + D + H + MM + S
},
cancelJob(row){
if(row.qtyReported>0){
this.$alert('该派工单已经有报工无法取消!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.$confirm(`确定取消此派工单`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelJob(row).then(({data}) => {
if (data && data.code === 0) {
this.search ();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
}
})
})
}
},
created () {

7
src/views/modules/sys/user.vue

@ -21,6 +21,13 @@
align="center"
label="用户名">
</el-table-column>
<el-table-column
prop="site"
header-align="center"
align="center"
width="80"
label="工厂编号">
</el-table-column>
<el-table-column
prop="email"
header-align="center"

Loading…
Cancel
Save