Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e08cb4aba | |||
| c313a28435 |
9
api/mes/mesMachineSetUpRecord.js
Normal file
9
api/mes/mesMachineSetUpRecord.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/mes/mesMachineSetupRecord',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
"name": "MES",
|
||||
"appid": "__UNI__66F7FE2",
|
||||
"description": "",
|
||||
"versionName": "3.4.2",
|
||||
"versionCode": 342,
|
||||
"versionName": "3.4.4",
|
||||
"versionCode": 344,
|
||||
"transformPx": false,
|
||||
"sassImplementationName": "node-sass",
|
||||
"app-plus": {
|
||||
|
||||
@@ -828,6 +828,12 @@
|
||||
"navigationBarTitleText": "新增模具"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mes/jobReport/commissionRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "调机记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/wms/purchase/quickStorage",
|
||||
"style": {
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="page-wrap">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="货位号:" name="locationCode">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanLocationCodeUuid" type="text"
|
||||
v-model="formData.locationCode" />
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanLocationCodeUuid" v-model="formData.locationCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="批次号:" name="batchNo">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBatchNoUuid" type="text" v-model="formData.batchNo" />
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBatchNoUuid" v-model="formData.batchNo" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<uni-row :gutter="10">
|
||||
<uni-col :span="12">
|
||||
<u-button type="success" @click="handleBind">绑定</u-button>
|
||||
</uni-col>
|
||||
<uni-col :span="12">
|
||||
<u-button type="primary" @click="handleUnBind">解绑</u-button>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<view class="btns">
|
||||
<u-button type="primary" @click="handleBind" class="sub-btn">绑定</u-button>
|
||||
<u-button type="warning" @click="handleUnBind" class="pri-btn">解绑</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -131,4 +126,39 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
padding-bottom: 60px;
|
||||
/* 给按钮留位置 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.btns {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
background: #fff;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
::v-deep .uni-easyinput__content-input {
|
||||
height: 80rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btns .sub-btn,
|
||||
.btns .pri-btn {
|
||||
width: 47%;
|
||||
height: 60rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -9,11 +9,7 @@
|
||||
v-model="formData.destLocationCode" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<uni-row :gutter="10">
|
||||
<uni-col>
|
||||
<u-button type="success" @click="handleCall">呼叫</u-button>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<u-button type="success" @click="handleCall">呼叫</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -96,4 +92,20 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
::v-deep .uni-easyinput__content-input {
|
||||
height: 80rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
min-height: 80rpx !important;
|
||||
}
|
||||
|
||||
.u-button {
|
||||
height: 10% !important;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="title">
|
||||
<view class="text-cut">任务类型 : {{item.taskType}}</view>
|
||||
<view>
|
||||
<button type="primary" size="mini" @click="choose(item)" style="float: right;">选择任务</button>
|
||||
<button type="primary" size="large" @click="choose(item)" style="float: right;">选择任务</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="page-wrap">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="发货点位:" :labelWidth='100' name="srcLocationCode">
|
||||
<uni-easyinput type="text" v-model="formData.srcLocationCode" />
|
||||
@@ -14,14 +14,10 @@
|
||||
<uni-easyinput type="text" v-model="formData.ctnrTyp" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<uni-row :gutter="10">
|
||||
<uni-col :span="12">
|
||||
<u-button type="success" @click="handleDelivery">配送</u-button>
|
||||
</uni-col>
|
||||
<uni-col :span="12">
|
||||
<u-button type="primary" @click="handleCancle">取消</u-button>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<view class="btns">
|
||||
<u-button type="primary" @click="handleDelivery" class="sub-btn">配送</u-button>
|
||||
<u-button type="warning" @click="handleCancle" class="pri-btn">取消</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -71,7 +67,7 @@ export default {
|
||||
handleDelivery() {
|
||||
const _this = this;
|
||||
this.$refs.form.validate().then(res => {
|
||||
if (_this.formData.srcLocationCode && this.formData.robotType) {
|
||||
if (_this.formData.srcLocationCode && _this.formData.robotType) {
|
||||
_this.$modal.loading('提交中')
|
||||
delivery(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
@@ -124,4 +120,34 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.btns {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
background: #fff;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
::v-deep .uni-easyinput__content-input {
|
||||
height: 80rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .uni-select {
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.btns .sub-btn,
|
||||
.btns .pri-btn {
|
||||
width: 47%;
|
||||
height: 60rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -2,18 +2,13 @@
|
||||
<view>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="发货点位:" :labelWidth='90' name="srcLocationCode">
|
||||
<uni-easyinput type="text" suffixIcon="scan" @iconClick="scanSrcLocationUuid"
|
||||
v-model="formData.srcLocationCode" />
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanSrcLocationUuid" v-model="formData.srcLocationCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="目的点位:" :labelWidth='90' name="destLocationCode">
|
||||
<uni-easyinput type="text" v-model="formData.destLocationCode" />
|
||||
<uni-easyinput v-model="formData.destLocationCode" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<uni-row :gutter="10">
|
||||
<uni-col>
|
||||
<u-button type="success" @click="handleCall">呼叫</u-button>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<u-button type="primary" @click="handleCall">呼叫</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -87,4 +82,19 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .uni-easyinput__content-input {
|
||||
height: 80rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.u-button {
|
||||
height: 10% !important;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
</style>
|
||||
209
pages/mes/jobReport/commissionRecord.vue
Normal file
209
pages/mes/jobReport/commissionRecord.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<view class="form-container">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="作业编码:" :labelWidth='90' name="pwoJobCode">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" type="text" v-model="formData.pwoJobCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="工单:" :labelWidth='90' name="pwoCode">
|
||||
<uni-easyinput type="text" v-model="formData.pwoCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品编码:" :labelWidth='90' name="ptNoTar">
|
||||
<uni-easyinput type="text" v-model="formData.ptNoTar" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品名称:" :labelWidth='90' name="ptTitleTar">
|
||||
<uni-easyinput type="text" v-model="formData.ptTitleTar" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制程编码:" :labelWidth='90' name="opCode">
|
||||
<uni-easyinput type="text" v-model="formData.opCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制程名称:" :labelWidth='90' name="opTitle">
|
||||
<uni-easyinput type="text" v-model="formData.opTitle" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="结束时间:" :labelWidth='90' name="endTime">
|
||||
<view class="example-body">
|
||||
<uni-datetime-picker type="datetime" v-model="formData.endTime" />
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<view class="form-row">
|
||||
<uni-forms-item label="调机时长:" :labelWidth='90' name="timeTake" class="form-col">
|
||||
<uni-easyinput type="text" v-model="timeTake" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="时间单位:" :labelWidth='90' name="timeUnit" class="form-col">
|
||||
<uni-data-select v-model="timeUnit" :localdata="unitOptions" placeholder="选择时间单位" />
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="submit">提交</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addRecord } from "@/api/mes/mesMachineSetUpRecord";
|
||||
import { listPwoJob } from "@/api/mes/jobReport.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
machineAdjustmentDuration: null,
|
||||
},
|
||||
timeTake: null,
|
||||
timeUnit: 'h',
|
||||
rules: {
|
||||
pwoJobCode: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请扫描作业编码!'
|
||||
}]
|
||||
}
|
||||
},
|
||||
unitOptions: [
|
||||
{ value: 'h', text: '小时' },
|
||||
{ value: 'm', text: '分钟' },
|
||||
{ value: 's', text: '秒' }
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.pwoJobCode = res.result;
|
||||
_this.scanBarCode(_this.formData.pwoJobCode);
|
||||
}
|
||||
});
|
||||
},
|
||||
scanBarCode() {
|
||||
const _this = this;
|
||||
if (_this.formData.pwoJobCode) {
|
||||
let obj = {
|
||||
code: _this.formData.pwoJobCode
|
||||
}
|
||||
listPwoJob(obj).then(async res => {
|
||||
let jobs = res.rows;
|
||||
if (jobs.length == 0) {
|
||||
_this.$modal.msg("未检索到该作业编码相关的信息!");
|
||||
} else {
|
||||
let job = jobs[0];
|
||||
_this.formData.pwoCode = job.pwoCode;
|
||||
_this.formData.ptNoTar = job.ptNoTar;
|
||||
_this.formData.ptTitleTar = job.ptTitleTar;
|
||||
_this.formData.opCode = job.opCode;
|
||||
_this.formData.opTitle = job.opTitle;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
const _this = this;
|
||||
this.$refs.form.validate().then(res => {
|
||||
if (_this.timeTake && _this.timeUnit && _this.formData.endTime) {
|
||||
_this.changeTime();
|
||||
_this.formData.startTime = _this.getCurrentDatetime();
|
||||
const isLegal = new Date(_this.formData.startTime).getTime() < new Date(_this.formData.endTime).getTime();
|
||||
if (!isLegal) {
|
||||
_this.$modal.msg("结束时间不能早于开始时间");
|
||||
return;
|
||||
}
|
||||
_this.$modal.loading('提交中')
|
||||
addRecord(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
})
|
||||
} else {
|
||||
_this.$modal.msg("请将信息补充完整");
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTime() {
|
||||
const _this = this;
|
||||
if (_this.timeUnit === 'h') {
|
||||
_this.formData.machineAdjustmentDuration = _this.timeTake * 60 * 60;
|
||||
} else if (_this.timeUnit === 'm') {
|
||||
_this.formData.machineAdjustmentDuration = _this.timeTake * 60;
|
||||
} else {
|
||||
_this.formData.machineAdjustmentDuration = _this.timeTake;
|
||||
}
|
||||
},
|
||||
getCurrentDatetime() {
|
||||
const now = new Date();
|
||||
// 年(4位)
|
||||
const year = now.getFullYear();
|
||||
// 月(补零,2位)
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
// 日(补零,2位)
|
||||
const day = String(now.getDate()).padStart(2, '0');
|
||||
// 时(补零,2位)
|
||||
const hour = String(now.getHours()).padStart(2, '0');
|
||||
// 分(补零,2位)
|
||||
const minute = String(now.getMinutes()).padStart(2, '0');
|
||||
// 秒(补零,2位)
|
||||
const second = String(now.getSeconds()).padStart(2, '0');
|
||||
|
||||
// 拼接为 "YYYY-MM-DD HH:mm" 格式
|
||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
||||
},
|
||||
reset() {
|
||||
this.timeTake = null;
|
||||
this.timeUnit = 'h';
|
||||
this.formData = {
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
pwoJobCode: null,
|
||||
pwoCode: null,
|
||||
ptNoTar: null,
|
||||
ptTitleTar: null,
|
||||
opCode: null,
|
||||
opTitle: null,
|
||||
machineAdjustmentDuration: null
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.form-container {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
/* 两个项之间的间距 */
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
/* 与上下表单项保持默认间距 */
|
||||
}
|
||||
|
||||
/* 并列项平分宽度 */
|
||||
.form-col {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* 可选:统一并列项的label样式(避免对齐错乱) */
|
||||
:deep(.form-col .uni-forms-item__label) {
|
||||
width: 80px !important;
|
||||
/* 固定label宽度 */
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* 其他表单项保持默认样式,无需额外修改 */
|
||||
:deep(.uni-forms-item) {
|
||||
margin-bottom: 80px;
|
||||
/* 统一所有表单项的底部间距 */
|
||||
}
|
||||
|
||||
.u-button {
|
||||
height: 10% !important;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -281,6 +281,14 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "班产报工"
|
||||
}
|
||||
}, {
|
||||
"path": "/pages/mes/jobReport/commissionRecord",
|
||||
"permission": "mes:pwoReport:add",
|
||||
"icon": "icon-gongdan",
|
||||
"color": "linear-gradient(#95D097,#7BC47D)",
|
||||
"style": {
|
||||
"navigationBarTitleText": "调机记录"
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
"name": "合并标签",
|
||||
|
||||
Reference in New Issue
Block a user