7 Commits

Author SHA1 Message Date
3befba7767 版本修改 2026-01-06 17:56:55 +08:00
c670c32515 修改权限配置 2026-01-06 17:55:49 +08:00
1689c0fc6e 版本号错误 2026-01-06 17:09:39 +08:00
9638599dce 版本号修改 2026-01-06 17:07:51 +08:00
7497e41d52 调机记录需求变更 2026-01-06 17:04:59 +08:00
7e08cb4aba 调机记录 2026-01-04 11:51:56 +08:00
c313a28435 调机记录 2026-01-04 11:51:05 +08:00
11 changed files with 428 additions and 66 deletions

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request'
export function addRecord(data) {
return request({
url: '/mes/mesMachineSetupRecord',
method: 'post',
data: data,
})
}

View File

@@ -3,39 +3,46 @@ import request from '@/utils/request'
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
params: data
})
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
params: data
})
}
// 查询用户个人信息
export function getUserProfile() {
return request({
url: '/system/user/profile',
method: 'get'
})
return request({
url: '/system/user/profile',
method: 'get'
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
url: '/system/user/profile',
method: 'put',
data: data
})
return request({
url: '/system/user/profile',
method: 'put',
data: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return upload({
url: '/system/user/profile/avatar',
name: data.name,
filePath: data.filePath
})
return upload({
url: '/system/user/profile/avatar',
name: data.name,
filePath: data.filePath
})
}
export function getUserInfo(id) {
return request({
url: '/system/user/' + id,
method: 'get'
})
}

View File

@@ -2,8 +2,8 @@
"name": "MES",
"appid": "__UNI__66F7FE2",
"description": "",
"versionName": "3.4.2",
"versionCode": 342,
"versionName": "3.4.6",
"versionCode": 346,
"transformPx": false,
"sassImplementationName": "node-sass",
"app-plus": {

View File

@@ -828,6 +828,12 @@
"navigationBarTitleText": "新增模具"
}
},
{
"path": "pages/mes/jobReport/commissionRecord",
"style": {
"navigationBarTitleText": "调机记录"
}
},
{
"path": "pages/wms/purchase/quickStorage",
"style": {

View File

@@ -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>

View File

@@ -5,15 +5,11 @@
<uni-easyinput type="text" v-model="formData.srcLocationCode" />
</uni-forms-item>
<uni-forms-item label="目的货位:" :labelWidth='90' name="destLocationCode">
<uni-easyinput suffixIcon="scan" @iconClick="scanDestLocationUuid" type="text" @blur="searchSrcLocation"
<uni-easyinput suffixIcon="scan" @iconClick="scanDestLocationUuid" type="text" @@confirm="searchSrcLocation"
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>

View File

@@ -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">

View File

@@ -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>

View File

@@ -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>

View File

@@ -0,0 +1,254 @@
<template>
<view class="form-container">
<uni-forms ref="form" :modelValue="formData" :rules="rules">
<uni-forms-item label="作业编码:" :labelWidth='90' name="pwoJobCode">
<uni-easyinput @confirm="searchData" 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="startTime">
<view>
<uni-datetime-picker type="datetime" v-model="formData.startTime" />
</view>
</uni-forms-item>
<uni-forms-item label="结束时间:" :labelWidth='90' name="endTime">
<view>
<uni-datetime-picker type="datetime" v-model="formData.endTime" />
</view>
</uni-forms-item>
<uni-forms-item label="人员:" :labelWidth='90' name="staff">
<uni-easyinput type="text" v-model="formData.staff" @confirm="searchStaff" />
</uni-forms-item>
<uni-forms-item label="调试单价:" :labelWidth='90' name="programmingDebuggingUnitPrice">
<uni-easyinput type="text" v-model="formData.programmingDebuggingUnitPrice" />
</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.js";
import { listPwoJob } from "@/api/mes/jobReport.js";
import { getUserInfo } from "@/api/system/user.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: '秒' }
],
}
},
created() {
this.$set(this.formData, "staff", this.$store.state.user.name);
},
methods: {
scanBar() {
const _this = this;
uni.scanCode({
scanType: ['barCode', 'qrCode'],
success: function(res) {
_this.$set(_this.formData, "pwoJobCode", res.result);
_this.scanBarCode(_this.formData.pwoJobCode);
}
});
},
searchStaff() {
const _this = this;
getUserInfo(_this.formData.staff).then(async res => {
_this.$set(_this.formData, "staff", res.data.userName);
})
},
searchData() {
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.$set(_this.formData, "pwoCode", job.pwoCode);
_this.$set(_this.formData, "ptNoTar", job.ptNoTar);
_this.$set(_this.formData, "ptTitleTar", job.ptTitleTar);
_this.$set(_this.formData, "opCode", job.opCode);
_this.$set(_this.formData, "opTitle", job.opTitle);
}
})
}
},
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.$set(this.formData, "pwoCode", job.pwoCode);
this.$set(this.formData, "ptNoTar", job.ptNoTar);
this.$set(this.formData, "ptTitleTar", job.ptTitleTar);
this.$set(this.formData, "opCode", job.opCode);
this.$set(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();
if (!_this.formData.startTime) {
_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>

View File

@@ -281,6 +281,14 @@
"style": {
"navigationBarTitleText": "班产报工"
}
}, {
"path": "/pages/mes/jobReport/commissionRecord",
"permission": "mes:mesMachineSetupRecord:list",
"icon": "icon-gongdan",
"color": "linear-gradient(#95D097,#7BC47D)",
"style": {
"navigationBarTitleText": "调机记录"
}
}]
}, {
"name": "合并标签",