Browse Source

feat: update 打包问题修改

master
TengXF 5 months ago
parent
commit
292d8ceb00
  1. 28
      src/pages.json
  2. 319
      src/pages/mes/productBackline/detail.vue
  3. 305
      src/pages/mes/reworkSingle/create.vue
  4. 2
      src/pages/mes/workScheduling/completeHandle.vue

28
src/pages.json

@ -2003,13 +2003,13 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/mes/productBackline/detail",
"style": {
"navigationBarTitleText": "产品返线登记详情",
"enablePullDownRefresh": true
}
},
// {
// "path": "pages/mes/productBackline/detail",
// "style": {
// "navigationBarTitleText": "产品返线登记详情",
// "enablePullDownRefresh": true
// }
// },
{
"path": "pages/mes/productBackline/handle",
"style": {
@ -2031,13 +2031,13 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/mes/reworkSingle/create",
"style": {
"navigationBarTitleText": "创建返工返修登记",
"enablePullDownRefresh": true
}
},
// {
// "path": "pages/mes/reworkSingle/create",
// "style": {
// "navigationBarTitleText": "创建返工返修登记",
// "enablePullDownRefresh": true
// }
// },
{
"path": "pages/mes/reworkBatch/index",
"style": {

319
src/pages/mes/productBackline/detail.vue

@ -1,319 +0,0 @@
<template>
<!-- 详情 -->
<view class="detail-container">
<view class="info">
<view class="title">
<view>产品返线登记详情</view>
</view>
<!-- 主数据 -->
<view class="dec">
<view class="dec-item">
<view>返线编码</view>
<view>{{paramData.backlineBillno}}</view>
</view>
<view class="dec-item">
<view>离线编码</view>
<view>{{paramData.offlineCode}}</view>
</view>
<view class="dec-item">
<view>计划编码</view>
<view>{{paramData.planCode}}</view>
</view>
<view class="dec-item">
<view>工单编码</view>
<view>{{paramData.workBillno}}</view>
</view>
<view class="dec-item">
<view>产品编码</view>
<view>{{paramData.productCode}}</view>
</view>
<view class="dec-item">
<view>工序编码</view>
<view>{{paramData.processCode}}</view>
</view>
<view class="dec-item">
<view>工位编码</view>
<view>{{paramData.stationCode}}</view>
</view>
<view class="dec-item">
<view>离线原因</view>
<view>{{paramData.offlineReson}}</view>
</view>
<view class="dec-item">
<view>质检人员</view>
<view>{{paramData.checkPersonCode}}</view>
</view>
</view>
</view>
<view class="footer">
<view class="btns">
<button class="reset" @click="reject">驳回</button>
<button class="sure" @click="submitForm" :loading='loading' :disabled='loading'>提交</button>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
</template>
<script setup lang="ts">
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
ref,
getCurrentInstance
} from 'vue'
import * as productOfflineApi from "@/api/mes/productBackline/productBacklineApi.ts"
const { proxy } = getCurrentInstance()
const paramData = ref()
const data = ref({})
const subList = ref([])
const loading = ref(false)
const from = ref()//13
function getShowDetail() {
productOfflineApi.orderDayPage().then((res) => {
subList.value = res.data.list
}).catch(() => { })
}
//
function submitForm() {
proxy.$modal.confirm('确定提交吗').then(() => {
proxy.$modal.loading('加载中')
loading.value = true
productOfflineApi.orderDayPage().then((res) => {
proxy.$modal.closeLoading()
if (res.data) {
proxy.$modal.showToast('成功')
setTimeout(() => {
proxy.$tab.navigateBack()
loading.value = false
}, 1500)
} else {
proxy.$modal.showToast('失败')
loading.value = false
}
}).catch(() => {
proxy.$modal.closeLoading()
loading.value = false
})
})
}
//
function reject(item) {
proxy.$modal.confirm('确定驳回申请吗?').then(() => {
proxy.$modal.loading('加载中')
loading.value = true
orderDayPlan.orderDayPage().then(async (res) => {
if (res.data) {
proxy.$modal.showToast('成功')
setTimeout(() => {
proxy.$tab.navigateBack()
loading.value = false
}, 1500)
} else {
proxy.$modal.showToast('失败')
loading.value = false
}
}).catch(() => {
proxy.$modal.closeLoading()
loading.value = false
})
})
}
onLoad((option) => {
if (option.obj) {
paramData.value = JSON.parse(option.obj); // paramData
}
if (option.type) type.value = option.type;
if (option.from) from.value = option.from;
if (option.number) {
number.value = option.number;
}
console.log(paramData.value)
})
onShow(() => {
getShowDetail()
})
</script>
<style lang="scss" scoped>
.detail-container {
min-height: 100vh;
background: white;
}
.line {
background: #f5f5f5;
height: 20rpx;
}
.info {
background: white;
}
.tab {
border-bottom: 1px solid #e4e4e4;
}
.title {
display: flex;
align-items: center;
padding: 20rpx 30rpx;
border-bottom: 1px solid #e4e4e4;
view {
&:nth-child(1) {
flex: 1;
border-left: 10rpx solid #409eff;
padding-left: 20rpx;
font-weight: bold;
}
}
}
.dec {
padding: 30rpx;
.dec-item {
padding-bottom: 30rpx;
display: flex;
view {
&:nth-child(1) {
width: 160rpx;
}
&:nth-child(2) {
color: #888888;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
}
.dec2 {
padding: 10rpx 30rpx;
display: flex;
view {
&:nth-child(1) {
width: 180rpx;
}
&:nth-child(2) {
color: #888888;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
.items {
border-radius: 12rpx;
background: #F5F5F5;
padding-bottom: 20rpx;
.items-name {
padding: 20rpx;
border-bottom: 1px solid #dedede;
}
.items-dec {
padding: 0px 20rpx;
margin-top: 20rpx;
}
}
.list {
padding: 20rpx;
.item {
display: flex;
margin-bottom: 20rpx;
.item-box {
border-radius: 12rpx;
border: 1px solid #dedede;
border-radius: 12rpx;
flex: 1;
width: 0rpx;
}
.spare-title {
padding: 20rpx 30rpx;
border-bottom: 1px solid #e4e4e4;
display: flex;
.title-txt {
color: #409eff;
font-size: 30rpx;
font-weight: bold;
flex: 1;
}
}
.dec {
color: #9c9c9c;
padding: 0rpx 30rpx 20rpx;
}
}
}
.add-btn {
display: flex;
justify-content: flex-start;
align-items: center;
}
.footer {
position: fixed;
bottom: 0px;
left: 0px;
width: 100%;
z-index: 22;
}
.btns {
display: flex;
button {
flex: 1;
}
.sure {
background: #409eff;
color: white;
border-radius: 0px;
&::after {
border: 1px solid #409eff;
border-radius: 0px;
}
}
.reset {
// background: #F5F5F5;
background: #ff7a45; /* 使用浅蓝色作为背景色 */
border-radius: 0px;
&::after {
border-radius: 0px;
}
}
}
</style>

305
src/pages/mes/reworkSingle/create.vue

@ -1,305 +0,0 @@
<template>
<!-- 列表展示标准模版 -->
<view>
<u-form :model="form">
<view>
<u-form-item label="产品编码" prop="productionCode">
<view>
<!-- <u-input v-model="form.productName" type="select" @click="showProduct = true" placeholder="请选择产品编码"/> -->
<u-input v-model="form.productionCode" />
</view>
</u-form-item>
</view>
<view>
<u-form-item label="工作类型" prop="reworkTypeName">
<view>
<u-input v-model="form.reworkTypeName" type="select" @click="showReworkType = true" placeholder="请选择工作类型"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="是否替换" prop="replaceFlagName">
<view>
<u-input v-model="form.replaceFlagName" type="select" @click="showReplaceFlag = true" placeholder="请选择是否有替换件"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="返修动作" prop="reworkAction">
<view>
<u-input v-model="form.reworkAction" placeholder="请输入返修动作"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="返修人员" prop="reworkPersoncode">
<view>
<u-input v-model="form.reworkPersoncode" placeholder="请输入返修人员"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="返修时间" prop="reworkStr" >
<view>
<u-input v-model="form.reworkStr" type="select" @click="showReworkTime = true" placeholder="请选择返修时间"/>
</view>
</u-form-item>
</view>
<view class="btns">
<button class="sure" @click="handleSubmit" :loading='loading' :disabled='loading'>提交处理</button>
</view>
</u-form>
<!-- <view class="footer">
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> -->
</view>
<view>
<u-select v-model="showProduct" :list="productList" @confirm="selectProduct"></u-select>
</view>
<view>
<u-select v-model="showReworkType" :list="reworkTypeList" @confirm="selectReworkType"></u-select>
</view>
<view>
<u-select v-model="showReplaceFlag" :list="replaceFlagList" @confirm="selectReplaceFlag"></u-select>
</view>
<view>
<u-picker v-model="showReworkTime" mode="time" :params="reworkTimeParams" @confirm="selectReworkTime"></u-picker>
</view>
</template>
<script setup lang="ts">
import requestButton from '@/mycomponents/button/requestButton.vue'
/*初始化*/
import {
onLoad,
onShow,
onReachBottom
} from '@dcloudio/uni-app'
import {
ref,
getCurrentInstance
} from 'vue'
/*引入API*/
import * as reworkSingleApi from "@/api/mes/reworkSingle/reworkSingleApi.ts"
const { proxy } = getCurrentInstance()
const loading = ref(false)
/*列表数据集*/
const list = ref([])
const productItem = ref()
const showProduct = ref(false)
const showReworkType = ref(false)
const showReplaceFlag = ref(false)
const showReworkTime = ref(false)
const paramData = ref()
const productList = ref([{label:'产品1',value: '111',name:'产品'},{label:'产品2',value: '222',name:'产品'}])
const reworkTypeList = ref([{label:'返工',value: '1'},{label:'返修',value: '2'}])
const replaceFlagList = ref([{label:'是',value: '1'},{label:'否',value: '2'}])
const reworkTimeParams =ref({
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true,
timestamp: true,
})
const form = ref({
status:'1',
reworkAction:'',
reworkPersoncode:'',
processCode:'',
productionCode:'',
productName:'',
stationCode:'',
offlineReson:'',
productDestination:'',
reworkType:'',
reworkTypeName:'',
replaceFlag:'',
replaceFlagName:'',
reworkTime:'',
reworkStr:''
})
/*分页参数*/
const params = ref({
pageNo: 1,
pageSize: 50,
flagDo:3
})
//
function handleSubmit(){
//
if(form.value.productionCode=='' && form.value.productionCode.trim() == ''){
proxy.$modal.showToast('请先选择产品')
return
}
if(form.value.reworkType=='' && form.value.reworkType.trim() == ''){
proxy.$modal.showToast('请先选择工作类型')
return
}
if(form.value.replaceFlag =='' && form.value.replaceFlag.trim() == ''){
proxy.$modal.showToast('请先选择是否有替换件')
return
}
//
proxy.$modal.confirm('确定提交处理吗').then(() => {
proxy.$modal.loading('加载中')
loading.value = true
reworkSingleApi.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
})
})
}
//
function selectProduct(index){
form.value.productionCode = index[0].value
form.value.productName = index[0].label
showProduct.value = false
}
//
function selectReworkType(index){
form.value.reworkType = index[0].value
form.value.reworkTypeName = index[0].label
showReworkType.value = false
}
//
function selectReplaceFlag(index){
form.value.replaceFlag = index[0].value
form.value.replaceFlagName = index[0].label
showReplaceFlag.value = false
}
//
function selectReworkTime(index){
const dateStr = `${index.year}-${index.month}-${index.day} ${index.hour}:${index.minute}:${index.second}`
form.value.reworkStr = dateStr
form.value.reworkTime = index.timestamp + '000'
console.log(form.value.reworkTime)
showReworkTime.value = false
}
function getworkSchedulingPage() {
reworkSingleApi.getworkSchedulingPage(params.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = res.data.list
productList.value = transList(res.data.list)
} else {
proxy.$modal.closeLoading()
}
}).catch(() => {
proxy.$modal.closeLoading()
})
}
function transList(data) {
const productList = data.map(item => {
return {
"label": item.productName,
"value": item.productCode
};
});
return productList;
}
function findProductByCode(productCode) {
productItem.value = list.value.find(item => item.productCode === productCode);
form.value.workBillno = productItem.value.schedulingCode
form.value.planCode = productItem.value.planMasterCode
form.value.processCode = productItem.value.workingNode
form.value.stationCode = productItem.value.currentWorkstation
}
/*是否显示"没有更多了"*/
// const status = ref('loadmore')
/*通用方法*/
onLoad((option) => {
if (option.obj) {
paramData.value = JSON.parse(decodeURIComponent(option.obj)); // paramData
form.value.workBillno = paramData.value.schedulingCode
form.value.planCode = paramData.value.planMasterCode
form.value.processCode = paramData.value.workingNode
form.value.stationCode = paramData.value.currentWorkstation
form.value.productionCode = paramData.value.productCode
}
})
onShow(() => {
// params.value.pageNo = 1
// list.value = []
// status.value = 'loadmore'
// getworkSchedulingPage()
})
onReachBottom(() => {
// getList()
})
</script>
<style lang="scss" scoped>
.footer {
position: fixed;
bottom: 0px;
left: 0px;
width: 100%;
z-index: 22;
}
.btns {
display: flex;
button {
flex: 1;
}
.sure {
background: #409eff;
color: white;
border-radius: 0px;
&::after {
border: 1px solid #409eff;
border-radius: 0px;
}
}
.reset {
background: #ff7a45;
border-radius: 0px;
&::after {
border-radius: 0px;
}
}
}
</style>

2
src/pages/mes/workScheduling/completeHandle.vue

@ -159,7 +159,7 @@
})
//
function getPageChildren(){
workSchedulingListApi.getCurrentWorkerList(nodeInfo.value).then((res) => {
workSchedulingListApi.getWorkerList(nodeInfo.value).then((res) => {
if (res.data) {
workerList.value = transList(res.data)
} else {

Loading…
Cancel
Save