diff --git a/src/api/mes/qaForm/index.ts b/src/api/mes/qaForm/index.ts
new file mode 100644
index 0000000..e6a0271
--- /dev/null
+++ b/src/api/mes/qaForm/index.ts
@@ -0,0 +1,8 @@
+import http from '../../http'
+
+
+export function create(data) {
+ return http.post('/mes/work-scheduling-qaform/create',data)
+}
+
+
diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts
index 9d65dbf..eb11c1f 100644
--- a/src/api/mes/workScheduling/index.ts
+++ b/src/api/mes/workScheduling/index.ts
@@ -32,6 +32,10 @@ export function getWorkSchedulingPage(params) {
return http.get('/mes/workScheduling/page', {params})
}
+export function getWorkSchedulingInfo(number) {
+ return http.get('/mes/workScheduling/get?id=' + number)
+}
+
export function getWorkSchedulingDetail(number) {
//return http.get('/eam/item-apply-request-main/appGetByNumber?number=' + number)
return http.get('/mes/work-scheduling-detail/get-info?schedulingCode=' + number)
diff --git a/src/pages/mes/workScheduling/reportWorkQualityInspection.vue b/src/pages/mes/workScheduling/reportWorkQualityInspection.vue
index d0cba79..ba29628 100644
--- a/src/pages/mes/workScheduling/reportWorkQualityInspection.vue
+++ b/src/pages/mes/workScheduling/reportWorkQualityInspection.vue
@@ -11,37 +11,37 @@
检验质检单
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -49,33 +49,36 @@
检测信息
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+ 提交
+
@@ -103,35 +106,27 @@
任务编号:
- {{ data.schedulingCode }}
-
-
- 任务名称:
- {{ data.schedulingCode }}
-
-
- 站点名称:
- {{ data.schedulingCode }}
+ {{ number }}
- 工艺路线:
- {{ data.schedulingCode }}
+ 工序编号:
+ {{ nodeCode }}
- 工序名称:
- {{ data.schedulingCode }}
+ 领取人工号:
+ {{ receivePerson }}
- 工序编号:
- {{ data.schedulingCode }}
+ 领取工位:
+ {{ receiveWorkstation }}
- 班组:
- {{ data.schedulingCode }}
+ 工作设备:
+ {{ receiveDevice }}
- 任务负责人:
- {{ data.schedulingCode }}
+ 计划数量:
+ {{ planCount }}
@@ -140,55 +135,52 @@
工单信息
+
+ 主计划编号:
+ {{ data.planMasterCode }}
+
工单编号:
{{ data.schedulingCode }}
- 工单名称:
- {{ data.schedulingCode }}
+ 产品编号:
+ {{ data.productCode }}
产品名称:
- {{ data.schedulingCode }}
+ {{ data.productName }}
- 产品编号:
- {{ data.schedulingCode }}
+ 车间编号:
+ {{ data.workroomCode }}
- 规格型号:
- {{ data.schedulingCode }}
+ 产线编号:
+ {{ data.lineCode }}
- 产品类型:
- {{ data.schedulingCode }}
+ 工艺路线编码:
+ {{ data.prouteCode }}
- 单位:
- {{ data.schedulingCode }}
+ 工单模式:
+ {{ data.formType }}
- BOM:
- {{ data.schedulingCode }}
-
-
-
-
-
-
-
+ 批次号:
+ {{ data.batchCode }}
-
- 提交
-
-
-
-
+
+
+
+
+
+
@@ -204,38 +196,173 @@ import {
} from 'vue'
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts'
+import * as qaFormApi from '@/api/mes/qaForm/index.ts'
const {proxy} = getCurrentInstance()
const number = ref('')
const data = ref({})
const loading = ref(false)
-
const tabsList = ref([{name:'质检信息'},{name:'报工信息'},{name:'任务信息'},{name:'工单信息'}])
const current = ref(0)
+const showQaFormType = ref(false)
+const qaFormTypeList = ref([{label:'首检',value: '1'},{label:'人工',value: '2'}])
+const showQaTime = ref(false)
+const qaTimeParams =ref({
+ year: true,
+ month: true,
+ day: true,
+ hour: true,
+ minute: true,
+ second: true,
+ timestamp: true,
+ })
+
+//任务信息:job_mes_work_scheduling_detail
+const planCount = ref('0')
+const nodeCode = ref('')
+const receivePerson = ref('')
+const receiveWorkstation = ref('')
+const receiveDevice = ref('')
+
+//工单信息:job_mes_work_scheduling
+const schedulingId = ref('')
+
const form = ref({
- batchNo: ''
+ batchNo: '',
+ schedulingCode:'',
+ nodeCode:'',
+ qaFormNo:'',
+ qaFormName:'',
+ qaFormType:'',
+ qaTimes:'',
+ remark:'',
+ qaCount:'',
+ qaCountPassed:'',
+ qaCountNotpassed:'',
+ qaPassRate:'',
+ qaStatus:'',
})
+function selectQaFormType(index){
+ form.value.qaFormType = index[0].value
+ form.value.qaFormType = index[0].label
+ showQaFormType.value = false
+}
+
+function selectReworkTime(index){
+ const dateStr = `${index.year}-${index.month}-${index.day} ${index.hour}:${index.minute}:${index.second}`
+ form.value.qaTimes = dateStr
+ showQaTime.value = false
+}
+
+
function getWorkSchedulingDetail() {
- workSchedulingListApi.getWorkSchedulingDetail(number.value).then((res) => {
- console.log(number.value)
+ workSchedulingListApi.getWorkSchedulingInfo(schedulingId.value).then((res) => {
+ console.log(res.data)
data.value = res.data
}).catch(() => {
})
}
+function calculatePass(){
+ const calculateQaCount = ref(0)
+ const calculateQaCountPassed = ref(0)
+ if(form.value.qaCount == ''){
+ calculateQaCount.value = 0
+ }else{
+ calculateQaCount.value = form.value.qaCount
+ }
+ if(form.value.qaCountPassed == ''){
+ calculateQaCountPassed.value = 0
+ }else{
+ calculateQaCountPassed.value = form.value.qaCountPassed
+ }
+ form.value.qaCountNotpassed = calculateQaCount.value - calculateQaCountPassed.value
+
+ form.value.qaPassRate = ((calculateQaCountPassed.value / form.value.qaCount) * 100).toFixed(2) +"%"
+}
+
+function submitQaForm(){
+ if(form.value.qaFormNo == ''||form.value.qaFormName == ''||form.value.qaFormType == ''||
+ form.value.qaTime == ''||form.value.qaTimes == ''||form.value.qaCount == ''||
+ form.value.qaCountPassed == ''||form.value.qaCountNotpassed == ''||form.value.qaPassRate == ''
+ ){
+ proxy.$modal.alert("还有未填项");
+ return
+ }
+ if(/^\d+$/.test(form.value.qaCount.trim())){
+ console.log(/^\d+$/.test(form.value.qaCount.trim()))
+ }else{
+ proxy.$modal.alert("检查数量请输入正确的数字");
+ return
+ }
+ if(/^\d+$/.test(form.value.qaCountPassed.trim())){
+ console.log(/^\d+$/.test(form.value.qaCountPassed.trim()))
+ }else{
+ proxy.$modal.alert("合格数量请输入正确的数字");
+ return
+ }
+ if(form.value.qaCount > planCount.value){
+ proxy.$modal.alert("检查数量不能大于计划数量");
+ return
+ }
+ if(form.value.qaCountPassed > planCount.value){
+ proxy.$modal.alert("合格数量不能大于计划数量");
+ return
+ }
+ if(form.value.qaCountPassed > form.value.qaCount){
+ proxy.$modal.alert("合格数量不能大于检测数量数量");
+ return
+ }
+
+ console.log(form.value)
+ proxy.$modal.confirm("是否确认提交").then(()=>{
+ proxy.$modal.loading('加载中')
+ loading.value = true
+ //报工质检状态完成
+ form.value.qaStatus = '1'
+ qaFormApi.create(form.value).then((res) => {
+ proxy.$modal.closeLoading()
+ if (res.data) {
+ proxy.$modal.showToast('成功')
+ setTimeout(() => {
+ proxy.$tab.navigateBack()
+ loading.value = false
+ proxy.$modal.closeLoading()
+ }, 1000)
+ } else {
+ proxy.$modal.showToast('失败')
+ loading.value = false
+ proxy.$modal.closeLoading()
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
+ loading.value = false
+ })
+ })
+}
+
onLoad((option) => {
- console.log(JSON.parse(option.obj).schedulingCode)
- if (option.obj) {
- number.value = JSON.parse(option.obj).schedulingCode
-
- }
+ console.log(JSON.parse(option.obj))
+ if (option.obj) {
+ number.value = JSON.parse(option.obj).schedulingCode
+ form.value.nodeCode = JSON.parse(option.obj).nodeCode
+ form.value.schedulingCode = JSON.parse(option.obj).schedulingCode
+ //任务信息
+ nodeCode.value = JSON.parse(option.obj).nodeCode
+ planCount.value = JSON.parse(option.obj).planCount
+ receivePerson.value = JSON.parse(option.obj).receivePerson
+ receiveWorkstation.value = JSON.parse(option.obj).receiveWorkstation
+ receiveDevice.value = JSON.parse(option.obj).receiveDevice
+ //工单ID
+ schedulingId.value = JSON.parse(option.obj).id
+ }
})
onShow(() => {
- //getWorkSchedulingDetail()
+ getWorkSchedulingDetail()
})
diff --git a/src/pages/mes/workScheduling/workScheduling.vue b/src/pages/mes/workScheduling/workScheduling.vue
index 1365021..05e93dc 100644
--- a/src/pages/mes/workScheduling/workScheduling.vue
+++ b/src/pages/mes/workScheduling/workScheduling.vue
@@ -13,14 +13,14 @@
- {{item.planMaserCode}}
+ {{item.planMasterCode}}
{{`${$time.formatDate(item.createTime)}`}}
- 日计划单号:{{ item.planMaserCode }}
+ 日计划单号:{{ item.planMasterCode }}
任务工单号:{{ item.schedulingCode }}
@@ -206,7 +206,7 @@ onReachBottom(() => {
//打开明细
function openDetail(item, index) {
- proxy.$tab.navigateTo(`/pages/mes/workScheduling/workSchedulingDetail?schedulingCode=${item.schedulingCode}`)
+ proxy.$tab.navigateTo(`/pages/mes/workScheduling/workSchedulingDetail?obj=${JSON.stringify(item)}`)
}
//打开Bom检查
diff --git a/src/pages/mes/workScheduling/workSchedulingDetail.vue b/src/pages/mes/workScheduling/workSchedulingDetail.vue
index 479064f..4d29c13 100644
--- a/src/pages/mes/workScheduling/workSchedulingDetail.vue
+++ b/src/pages/mes/workScheduling/workSchedulingDetail.vue
@@ -4,91 +4,100 @@
-
-
- 生产工序任务明细
-
-
-
- 工单号:
- {{ data.schedulingCode }}
-
-
- 状态:
- {{ data.status }}
-
-
- 工序编号:
- {{ data.nodeCode }}
-
-
- 工位验证编码组:
- {{ data.workstationValidate }}
-
-
- 设备验证编码组:
- {{ data.deviceValidate }}
-
-
- 人员验证组:
- {{ data.personValidate }}
+
+
+
+ 生产工序任务明细
+
+
+
+ 工单号:
+ {{ item.schedulingCode }}
+
+
+ 状态:
+ {{ item.status }}
+
+
+ 工序编号:
+ {{ item.nodeCode }}
+
+
+ 工位验证编码组:
+ {{ item.workstationValidate }}
+
+
+ 设备验证编码组:
+ {{ item.deviceValidate }}
+
+
+ 人员验证组:
+ {{ item.personValidate }}
+
+
+ 物料验证组:
+ {{ item.materialValidate }}
+
+
+ 计划数量:
+ {{ item.planCount }}
+
+
+ 报工人编号:
+ {{ item.reportPerson }}
+
+
+ 领取人工号:
+ {{ item.receivePerson }}
+
+
+ 报工数量:
+ {{ item.reportCount }}
+
+
+ 报工类型:
+ {{ item.reportType }}
+
+
+ 合格数量:
+ {{ item.qualifiedCount }}
+
+
+ 不合格数量:
+ {{ item.unqualifiedCount }}
+
+ 领取工位:
+ {{ item.receiveWorkstation }}
+
+
+ 工作设备编码:
+ {{ item.receiveDevice }}
+
+
+ 报工质检状态:
+ {{ item.qaStatus }}
+
+
+
+ 创建时间:
+ {{ `${$time.formatDate(item.createTime)}` }}
+
+
+
+ 报工质检
+
+
+ 报工
+
-
- 物料验证组:
- {{ data.materialValidate }}
-
-
- 计划数量:
- {{ data.planCount }}
-
-
- 报工人编号:
- {{ data.reportPerson }}
-
-
- 领取人工号:
- {{ data.receivePerson }}
-
-
- 报工数量:
- {{ data.reportCount }}
-
-
- 报工类型:
- {{ data.reportType }}
-
-
- 合格数量:
- {{ data.qualifiedCount }}
-
-
- 不合格数量:
- {{ data.unqualifiedCount }}
-
- 领取工位:
- {{ data.receiveWorkstation }}
-
-
- 工作设备编码:
- {{ data.receiveDevice }}
-
-
-
- 创建时间:
- {{ `${$time.formatDate(data.createTime)}` }}
-
-
-
- 报工质检
-
-
+
@@ -96,7 +105,8 @@