Browse Source

feat: update bug

master
TengXF 4 months ago
parent
commit
7704dfd1b1
  1. 1
      src/pages/mes/reworkBatch/create.vue
  2. 36
      src/pages/mes/reworkBatch/index.vue
  3. 13
      src/pages/mes/reworkSingle/create.vue
  4. 51
      src/pages/mes/reworkSingle/index.vue

1
src/pages/mes/reworkBatch/create.vue

@ -121,6 +121,7 @@
timestamp: true,
})
const form = ref({
status:'1',
reworkAction:'',
reworkPersoncode:'',
processCode:'',

36
src/pages/mes/reworkBatch/index.vue

@ -20,8 +20,9 @@
<view>处理状态</view>
<view>
<u-tag text="待处理" type="warning" mode="light" shape="circle" v-if="item.status==1" :style="{ width: '65px' }" />
<!-- <u-tag text="处理中" type="primary" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" /> -->
<u-tag text="已完成" type="success" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" />
<u-tag text="处理中" type="primary" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" />
<u-tag text="已完成" type="success" mode="light" shape="circle" v-if="item.status==3" :style="{ width: '65px' }" />
<u-tag text="已终止" type="error" mode="light" shape="circle" v-if="item.status==-1" :style="{ width: '65px' }" />
</view>
</view>
<view class="dec">
@ -49,17 +50,11 @@
<view>返修结果</view><view>{{item.reworkResult}}</view>
</view>
<view class="dec">
<view v-if="item.status==1">
<u-button size="medium" type="primary" @click="handleItem(item)" >去处理</u-button>
</view>
<view v-if="item.status==2">
<u-button size="medium" type="error" @click="handleRefuse(item)" >退回</u-button>
<!-- <u-button size="medium" type="warning" @click="handleSuspend(item)" >终止</u-button>
<u-button size="medium" type="success" @click="handleSuccess(item)" >完成</u-button> -->
</view>
<view v-if="item.status==3">
<u-button size="medium" type="error" @click="handleRefuse(item)" >退回</u-button>
</view>
<u-button v-if="item.status==1" size="medium" type="primary" @click="handleItem(item)" >去处理</u-button>
<u-button v-if="item.status==2" size="medium" type="warning" @click="handleRefuse(item)" >退回</u-button>
<u-button v-if="item.status==2" size="medium" type="error" @click="handleSuspend(item)" >终止</u-button>
<u-button v-if="item.status==2" size="medium" type="success" @click="handleSuccess(item)" >完成</u-button>
<u-button v-if="item.status==3" size="medium" type="warning" @click="handleRefuse(item)" >退回</u-button>
</view>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
@ -96,8 +91,8 @@
import * as reworkBatchApi from "@/api/mes/reworkBatch/reworkBatchApi.ts"
const { proxy } = getCurrentInstance()
const paramData = ref()
// const tabsList = ref([{name:''},{name:''},{name:''}])
const tabsList = ref([{name:'待处理'},{name:'已完成'}])
const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}])
// const tabsList = ref([{name:''},{name:''}])
const reworkPersoncode = ref()
const showType = ref(false)
const current = ref(0)
@ -151,7 +146,7 @@
function handleSuspend(index){
proxy.$modal.confirm('确定提交吗').then(() => {
paramData.value = index
changeStatus(1)
changeStatus(-1)
})
}
//
@ -171,8 +166,8 @@
//
function changeStatus(val){
paramData.value.status = val
proxy.$modal.loading('加载中')
paramData.value.status = val
reworkBatchApi.update(paramData.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data) {
@ -194,8 +189,13 @@
}
function tabsChange(curr){
if(curr == 3 ){
params.value.status = -1
}else{
params.value.status = (curr + 1)
}
current.value = curr
params.value.status = (curr + 1)
params.value.pageNo = 1
params.value.pageSize = 5
list.value = []

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

@ -3,10 +3,10 @@
<view>
<u-form :model="form">
<view>
<u-form-item label="产品编码" prop="productCode">
<u-form-item label="产品编码" prop="productionCode">
<view>
<!-- <u-input v-model="form.productName" type="select" @click="showProduct = true" placeholder="请选择产品编码"/> -->
<u-input v-model="form.productCode" />
<u-input v-model="form.productionCode" />
</view>
</u-form-item>
</view>
@ -109,10 +109,11 @@
timestamp: true,
})
const form = ref({
status:'1',
reworkAction:'',
reworkPersoncode:'',
processCode:'',
productCode:'',
productionCode:'',
productName:'',
stationCode:'',
offlineReson:'',
@ -134,7 +135,7 @@
//
function handleSubmit(){
//
if(form.value.productCode=='' && form.value.productCode.trim() == ''){
if(form.value.productionCode=='' && form.value.productionCode.trim() == ''){
proxy.$modal.showToast('请先选择产品')
return
}
@ -172,7 +173,7 @@
}
//
function selectProduct(index){
form.value.productCode = index[0].value
form.value.productionCode = index[0].value
form.value.productName = index[0].label
showProduct.value = false
}
@ -244,7 +245,7 @@
form.value.planCode = paramData.value.planMasterCode
form.value.processCode = paramData.value.workingNode
form.value.stationCode = paramData.value.currentWorkstation
form.value.productCode = paramData.value.currentWorkstation
form.value.productionCode = paramData.value.productCode
}
})

51
src/pages/mes/reworkSingle/index.vue

@ -20,8 +20,9 @@
<view>处理状态</view>
<view>
<u-tag text="待处理" type="warning" mode="light" shape="circle" v-if="item.status==1" :style="{ width: '65px' }" />
<!-- <u-tag text="处理中" type="primary" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" /> -->
<u-tag text="已完成" type="success" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" />
<u-tag text="处理中" type="primary" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" />
<u-tag text="已完成" type="success" mode="light" shape="circle" v-if="item.status==3" :style="{ width: '65px' }" />
<u-tag text="已终止" type="error" mode="light" shape="circle" v-if="item.status==-1" :style="{ width: '65px' }" />
</view>
</view>
<view class="dec">
@ -43,17 +44,11 @@
<view>返修结果</view><view>{{item.reworkResult}}</view>
</view>
<view class="dec">
<view v-if="item.status==1">
<u-button size="medium" type="primary" @click="handleItem(item)" >去处理</u-button>
</view>
<view v-if="item.status==2">
<u-button size="medium" type="error" @click="handleRefuse(item)" >退回</u-button>
<!-- <u-button size="medium" type="warning" @click="handleSuspend(item)" >终止</u-button>
<u-button size="medium" type="success" @click="handleSuccess(item)" >完成</u-button> -->
</view>
<view v-if="item.status==3">
<u-button size="medium" type="error" @click="handleRefuse(item)" >退回</u-button>
</view>
<u-button v-if="item.status==1" class="btn" size="medium" type="primary" @click="handleItem(item)" >去处理</u-button>
<u-button v-if="item.status==2" class="btn" size="medium" type="warning" @click="handleRefuse(item)" >退回</u-button>
<u-button v-if="item.status==2" class="btn" size="medium" type="error" @click="handleSuspend(item)" >终止</u-button>
<u-button v-if="item.status==2" class="btn" size="medium" type="success" @click="handleSuccess(item)" >完成</u-button>
<u-button v-if="item.status==3" class="btn" size="medium" type="warning" @click="handleRefuse(item)" >退回</u-button>
</view>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
@ -90,8 +85,8 @@
import * as reworkSingleApi from "@/api/mes/reworkSingle/reworkSingleApi.ts"
const { proxy } = getCurrentInstance()
const paramData = ref()
// const tabsList = ref([{name:''},{name:''},{name:''}])
const tabsList = ref([{name:'待处理'},{name:'已完成'}])
const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}])
// const tabsList = ref([{name:''},{name:''}])
const reworkPersoncode = ref()
const showType = ref(false)
const current = ref(0)
@ -131,21 +126,22 @@
}
//
function handleReceive(){
if(reworkPersoncode.value != '' && reworkPersoncode.value.trim() != ''){
if(reworkPersoncode.value == '' && reworkPersoncode.value.trim() == ''){
proxy.$modal.showToast('请输入返修人员')
reworkPersoncode.value = null
return;
}
else{
paramData.value.reworkPersoncode=reworkPersoncode.value
changeStatus(2)
showType.value = false
}
else{
proxy.$modal.showToast('请输入返修人员')
reworkPersoncode.value = null
}
}
//
function handleSuspend(index){
proxy.$modal.confirm('确定提交吗').then(() => {
paramData.value = index
changeStatus(1)
changeStatus(-1)
})
}
//
@ -165,8 +161,8 @@
//
function changeStatus(val){
paramData.value.status = val
proxy.$modal.loading('加载中')
paramData.value.status = val
reworkSingleApi.update(paramData.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data) {
@ -188,8 +184,13 @@
}
function tabsChange(curr){
if(curr == 3 ){
params.value.status = -1
}else{
params.value.status = (curr + 1)
}
current.value = curr
params.value.status = (curr + 1)
params.value.pageNo = 1
params.value.pageSize = 5
list.value = []
@ -228,6 +229,10 @@
</script>
<style lang="scss" scoped>
.btn{
margin-left:5px;
width:20px
}
.container{
background: #f5f5f5;
min-height: 100vh;

Loading…
Cancel
Save