Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66e8bc0a52 | ||
|
|
81e061d08b | ||
| 256bbeb705 | |||
|
|
7ef0b48117 | ||
| 3befba7767 | |||
| c670c32515 | |||
| 1689c0fc6e | |||
| 9638599dce | |||
| 7497e41d52 | |||
| 7e08cb4aba | |||
| c313a28435 |
@@ -85,3 +85,10 @@ export function delEmployeeLineRel(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function getEmployeeByCode(code) {
|
||||
return request({
|
||||
url: '/basic/employee/getEmpByCode/' + code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
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,
|
||||
})
|
||||
}
|
||||
@@ -39,3 +39,10 @@ export function uploadAvatar(data) {
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
||||
|
||||
export function getUserInfo(id) {
|
||||
return request({
|
||||
url: '/system/user/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "MES",
|
||||
"appid" : "__UNI__66F7FE2",
|
||||
"description" : "",
|
||||
"versionName": "3.4.2",
|
||||
"versionCode": 342,
|
||||
"versionName" : "3.4.9",
|
||||
"versionCode" : 349,
|
||||
"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>
|
||||
|
||||
@@ -78,7 +73,6 @@ export default {
|
||||
bind(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("绑定成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -107,7 +101,6 @@ export default {
|
||||
unBind(_this.formData.locationCode).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("解绑成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -122,13 +115,41 @@ export default {
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.formData = {
|
||||
locationCode: null,
|
||||
batchNo: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -79,7 +75,6 @@ export default {
|
||||
addDeliveryTask(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
_this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -89,11 +84,22 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.formData.srcLocationCode = null;
|
||||
this.formData.destLocationCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</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,12 +67,11 @@ 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();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -100,7 +95,6 @@ export default {
|
||||
cancel(arr).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("取消成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -112,16 +106,36 @@ export default {
|
||||
});
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: null,
|
||||
srcLocationCode: null,
|
||||
taskTyp: null,
|
||||
robotType: null,
|
||||
ctnrTyp: null,
|
||||
};
|
||||
this.destLocationCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
||||
@@ -71,7 +66,6 @@ export default {
|
||||
addDeliveryTask(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -81,10 +75,21 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.formData.srcLocationCode = null;
|
||||
this.formData.destLocationCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
217
pages/mes/jobReport/commissionRecord.vue
Normal file
217
pages/mes/jobReport/commissionRecord.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<view class="form-container">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules" label-width="80" label-align="right">
|
||||
<uni-forms-item label="作业编码" name="pwoJobCode">
|
||||
<uni-easyinput @confirm="searchData" suffixIcon="scan" @iconClick="scanBar" type="text"
|
||||
v-model="formData.pwoJobCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="工单编码" name="pwoCode">
|
||||
<uni-easyinput type="text" v-model="formData.pwoCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品编码" name="ptNoTar">
|
||||
<uni-easyinput type="text" v-model="formData.ptNoTar" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品名称" name="ptTitleTar">
|
||||
<uni-easyinput type="text" v-model="formData.ptTitleTar" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制程编码" name="opCode">
|
||||
<uni-easyinput type="text" v-model="formData.opCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制程名称" name="opTitle">
|
||||
<uni-easyinput type="text" v-model="formData.opTitle" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="开始时间" name="startTime">
|
||||
<uni-datetime-picker type="datetime" v-model="formData.startTime" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="结束时间" name="endTime">
|
||||
<uni-datetime-picker type="datetime" v-model="formData.endTime" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="操作人员" name="staff">
|
||||
<uni-easyinput type="text" v-model="formData.staff" @confirm="searchStaff" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="调试单价" name="programmingDebuggingUnitPrice">
|
||||
<uni-easyinput type="text" v-model="formData.programmingDebuggingUnitPrice" />
|
||||
</uni-forms-item>
|
||||
<uni-row>
|
||||
<uni-col :span="12">
|
||||
<uni-forms-item label="调机时长" name="timeTake" class="form-col">
|
||||
<uni-easyinput type="text" v-model="timeTake" />
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-forms-item label="时间单位" name="timeUnit" class="form-col">
|
||||
<uni-data-select v-model="timeUnit" :localdata="unitOptions" placeholder="选择时间单位" />
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</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";
|
||||
import { getEmployeeByCode } from "@/api/basic/employee.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.employee.empName);
|
||||
},
|
||||
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;
|
||||
getEmployeeByCode(_this.formData.staff).then(async res => {
|
||||
if(res.data != null){
|
||||
_this.$set(_this.formData, "staff", res.data.name);
|
||||
}else{
|
||||
_this.$modal.msg("未查询到该员工!");
|
||||
}
|
||||
})
|
||||
},
|
||||
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}`;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.form-container {
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.uni-forms-item {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
</style>
|
||||
@@ -8,8 +8,7 @@
|
||||
v-model="workOrderCode" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品入库任务单" :labelWidth='80' name="productInTaskCode">
|
||||
<uni-combox :candidates="productInTaskCodeList" emptyTips="无" @input="fetchTaskInfo"
|
||||
v-model="formData.productInTaskCode"></uni-combox>
|
||||
<uni-easyinput @change="fetchTaskInfo" v-model="formData.productInTaskCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="上架员" :labelWidth='80' name="shelfPutBy">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanPutBy" v-model="formData.shelfPutBy" type="text" />
|
||||
@@ -106,13 +105,6 @@ import { listLocation } from '@/api/basic/location';
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
// 获取任务单编码列表
|
||||
listTask({
|
||||
pageNum: 1,
|
||||
pageSize: 25
|
||||
}).then(res => {
|
||||
this.productInTaskCodeList = res.rows.map(item => item.productInTaskCode);
|
||||
});
|
||||
// 获取部门列表
|
||||
listDepartment().then((res) => {
|
||||
this.dptList = res.rows
|
||||
@@ -133,7 +125,6 @@ export default {
|
||||
show: false,
|
||||
materialLabel: null,
|
||||
workOrderCode: '',
|
||||
productInTaskCodeList: [],
|
||||
legalLocation: true,
|
||||
dptList: [],
|
||||
empList: [],
|
||||
@@ -190,27 +181,10 @@ export default {
|
||||
methods: {
|
||||
// 工单改变
|
||||
handleChangeWorkOrderCode() {
|
||||
// 重置任务单列表
|
||||
this.productInTaskCodeList = [];
|
||||
// 重置任务单编码
|
||||
this.formData.productInTaskCode = '';
|
||||
// 重置明细
|
||||
this.formData.wmsProductInDetailList = [];
|
||||
|
||||
// 获取任务单列表
|
||||
this.fetchTaskList();
|
||||
},
|
||||
// 获取任务单列表
|
||||
fetchTaskList() {
|
||||
if (!this.workOrderCode) return;
|
||||
|
||||
listTask({
|
||||
workOrderCode: this.workOrderCode
|
||||
}).then(async res => {
|
||||
this.productInTaskCodeList = res.rows.map(item => item.productInTaskCode);
|
||||
}).catch(err => {
|
||||
console.error(`获取工单号为${this.workOrderCode}的产品入库任务单列表失败,详情:${err}`);
|
||||
});
|
||||
},
|
||||
// 扫描工单号
|
||||
scanWorkOrderCode() {
|
||||
@@ -337,16 +311,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
selectTypeList() {
|
||||
listTask({
|
||||
pageNum: 1,
|
||||
pageSize: 25
|
||||
}).then(async res => {
|
||||
for (var i in res.rows) {
|
||||
this.productInTaskCodeList.push(res.rows[i].productInTaskCode);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 依次获取推荐库位
|
||||
async fetchLocation(taskDetail) {
|
||||
const promises = taskDetail.map(async (item) => {
|
||||
@@ -389,7 +353,7 @@ export default {
|
||||
|
||||
// 根据任务单 id 获取任务单明细
|
||||
await getTask(taskId).then(res => {
|
||||
taskDetail = res.data.wmsProductInTaskDetailList
|
||||
taskDetail = res.data.wmsProductInTaskDetailList.filter(item => item.notInNumber);
|
||||
}).catch(err => {
|
||||
console.error(`获取入库任务单 id 为${taskId}的任务单明细失败,详情:${err}`);
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="header">
|
||||
<table>
|
||||
<tr>
|
||||
<td>物料代码:</td>
|
||||
<td>物料编码:</td>
|
||||
<td>
|
||||
<uni-easyinput placeholder="请输入内容" :focus="PTfocus" v-model="PTCode" primaryColor="red" @confirm="getCode"
|
||||
prefixIcon="scan" @iconClick="scanClick('primary')" />
|
||||
@@ -38,7 +38,7 @@
|
||||
<td>
|
||||
<uni-easyinput :key="keyBol" class="uni-mt-5" v-model="form.recommend" disabled>
|
||||
<template #right>
|
||||
<uni-icons custom-prefix="iconfont" type="icon-fuzhi" size="40" @click="iconClick"></uni-icons>
|
||||
<uni-icons custom-prefix="iconfont" type="icon-fuzhi" size="40" @click="handleCopy"></uni-icons>
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
</td>
|
||||
@@ -134,14 +134,11 @@ export default {
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 图标点击事件
|
||||
* 复制库位
|
||||
*/
|
||||
iconClick(value) {
|
||||
const _self = this;
|
||||
// const arr =
|
||||
_self.form = Object.assign({}, _self.form, {
|
||||
storageLocationBarcode: value || _self.form.recommend
|
||||
})
|
||||
handleCopy() {
|
||||
this.form.storageLocationBarcode = this.form.recommend;
|
||||
this.keyBol = !this.keyBol;
|
||||
},
|
||||
/**
|
||||
* 扫描收货单明细标签
|
||||
|
||||
@@ -28,7 +28,11 @@
|
||||
</view>
|
||||
<uni-popup ref="popup" type="bottom" border-radius="10px 10px 0 0" background-color="#fff">
|
||||
<scroll-view scroll-y class="err-logs-container" v-if="errorLogs.length">
|
||||
<uni-section :title="'共有' + errorLogs.length + '条错误记录'" type="line" />
|
||||
<uni-section :title="'共有' + errorLogs.length + '条错误记录'" type="line">
|
||||
<template v-slot:right>
|
||||
<u-button size="mini" text="清空" @click="removeAllErrLogs"></u-button>
|
||||
</template>
|
||||
</uni-section>
|
||||
<uni-card v-for="(err, index) in errorLogs" :key="err.pieceBarcode">
|
||||
<template #title>
|
||||
<view class="err-logs-card__title">
|
||||
@@ -194,6 +198,9 @@ export default {
|
||||
removeErrPiece(pieceBarcode) {
|
||||
this.errorLogs = this.errorLogs.filter(i => i.pieceBarcode !== pieceBarcode);
|
||||
},
|
||||
removeAllErrLogs() {
|
||||
this.errorLogs = [];
|
||||
},
|
||||
// 通过销售单号获取任务单明细
|
||||
async fetchDetail() {
|
||||
//当输入值明显不合法时不执行后续操作
|
||||
|
||||
@@ -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": "合并标签",
|
||||
|
||||
Reference in New Issue
Block a user