Compare commits
3 Commits
256bbeb705
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66e8bc0a52 | ||
|
|
81e061d08b | ||
|
|
7ef0b48117 |
@@ -1,46 +1,45 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="作业编码:" :labelWidth='90' name="pwoJobCode">
|
||||
<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="工单:" :labelWidth='90' name="pwoCode">
|
||||
<uni-forms-item label="工单编码" name="pwoCode">
|
||||
<uni-easyinput type="text" v-model="formData.pwoCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品编码:" :labelWidth='90' name="ptNoTar">
|
||||
<uni-forms-item label="产品编码" name="ptNoTar">
|
||||
<uni-easyinput type="text" v-model="formData.ptNoTar" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="产品名称:" :labelWidth='90' name="ptTitleTar">
|
||||
<uni-forms-item label="产品名称" name="ptTitleTar">
|
||||
<uni-easyinput type="text" v-model="formData.ptTitleTar" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制程编码:" :labelWidth='90' name="opCode">
|
||||
<uni-forms-item label="制程编码" name="opCode">
|
||||
<uni-easyinput type="text" v-model="formData.opCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制程名称:" :labelWidth='90' name="opTitle">
|
||||
<uni-forms-item label="制程名称" 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 label="开始时间" name="startTime">
|
||||
<uni-datetime-picker type="datetime" v-model="formData.startTime" />
|
||||
</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 label="结束时间" name="endTime">
|
||||
<uni-datetime-picker type="datetime" v-model="formData.endTime" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="人员:" :labelWidth='90' name="staff">
|
||||
<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="调机时长:" :labelWidth='90' name="timeTake" class="form-col">
|
||||
<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="时间单位:" :labelWidth='90' name="timeUnit" class="form-col">
|
||||
<uni-forms-item label="时间单位" name="timeUnit" class="form-col">
|
||||
<uni-data-select v-model="timeUnit" :localdata="unitOptions" placeholder="选择时间单位" />
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
@@ -53,7 +52,9 @@
|
||||
<script>
|
||||
import { addRecord } from "@/api/mes/mesMachineSetUpRecord.js";
|
||||
import { listPwoJob } from "@/api/mes/jobReport.js";
|
||||
import { getEmployeeByCode } from "@/api/basic/employee.js"
|
||||
import { getUserInfo } from "@/api/system/user.js";
|
||||
import { getEmployeeByCode } from "@/api/basic/employee.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -202,5 +203,15 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<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() {
|
||||
//当输入值明显不合法时不执行后续操作
|
||||
|
||||
Reference in New Issue
Block a user