Browse Source

feat: update 返工返修单件模式,批量模式,人员改为选择模式

master
TengXF 6 months ago
parent
commit
608f00f6c6
  1. 48
      src/pages/mes/reworkBatch/index.vue
  2. 51
      src/pages/mes/reworkSingle/index.vue

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

@ -64,15 +64,22 @@
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
<requestButton @goScan='openScanDetailPopup'></requestButton> <requestButton @goScan='openScanDetailPopup'></requestButton>
</view> </view>
<u-popup v-model="showType" mode="bottom" border-radius="14" length="30%"> <!-- <u-popup v-model="showType" mode="bottom" border-radius="14" length="30%">
<view style="margin-top: 30px; margin-left: 30px;"> <view style="margin-top: 30px; margin-left: 30px;">
<u-input v-model="reworkPersoncode" placeholder="请输入返工返修人员" /> <u-input v-model="reworkPersoncode" placeholder="请输入返工返修人员" />
</view> </view>
<view class="btns"> <view class="btns">
<u-button class="sure" @click="handleReceive">确定</u-button> <u-button class="sure" @click="handleReceive()">确定</u-button>
</view>
</u-popup> -->
<view>
<u-popup v-model="showWorker" mode="bottom" border-radius="14" length="30%">
<view>
<u-select v-model="showWorker" mode="mutil-column-auto" :list="workerList" @confirm="confirmSelectWorker"></u-select>
</view> </view>
</u-popup> </u-popup>
</view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -89,6 +96,7 @@
} from 'vue' } from 'vue'
/*引入API*/ /*引入API*/
import * as reworkBatchApi from "@/api/mes/reworkBatch/reworkBatchApi.ts" import * as reworkBatchApi from "@/api/mes/reworkBatch/reworkBatchApi.ts"
import * as productOfflineApi from "@/api/mes/productOffline/productOfflineApi.ts"
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const paramData = ref() const paramData = ref()
const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}]) const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}])
@ -102,6 +110,14 @@
pageSize: 10, pageSize: 10,
status: 1 status: 1
}) })
const teamParams = ref({
teamGroup:'1',
pageNo: 1,
pageSize: 50,
status: 1
})
const showWorker = ref(false)
const workerList = ref([])
/*是否显示"没有更多了"*/ /*是否显示"没有更多了"*/
const status = ref('loadmore') const status = ref('loadmore')
/*列表数据集*/ /*列表数据集*/
@ -126,12 +142,12 @@
} }
// //
function handleItem(index){ function handleItem(index){
reworkPersoncode.value = null
paramData.value = index paramData.value = index
showType.value = true showWorker.value = true
} }
// //
function handleReceive(){ function handleReceive(){
console.log(reworkPersoncode.value)
if(reworkPersoncode.value != '' && reworkPersoncode.value.trim() != ''){ if(reworkPersoncode.value != '' && reworkPersoncode.value.trim() != ''){
paramData.value.reworkPersoncode=reworkPersoncode.value paramData.value.reworkPersoncode=reworkPersoncode.value
changeStatus(2) changeStatus(2)
@ -139,7 +155,7 @@
} }
else{ else{
proxy.$modal.showToast('请输入返修人员') proxy.$modal.showToast('请输入返修人员')
reworkPersoncode.value = null reworkPersoncode.value = ''
} }
} }
// //
@ -220,12 +236,34 @@
proxy.$modal.closeLoading(); proxy.$modal.closeLoading();
}, 500); }, 500);
} }
//
function getPageChildren(){
productOfflineApi.getPageChildren(teamParams.value).then((res) => {
console.log(res)
if (res.data) {
console.log(res.data)
workerList.value = res.data
} else {
}
}).catch(() => {
})
}
//
function confirmSelectWorker(val){
console.log(val)
paramData.value.reworkPersoncode = val[1].value
proxy.$modal.confirm('确定提交吗').then(() => {
changeStatus(2)
})
}
/*通用方法*/ /*通用方法*/
onShow(() => { onShow(() => {
params.value.pageNo = 1 params.value.pageNo = 1
list.value = [] list.value = []
status.value = 'loadmore' status.value = 'loadmore'
getList() getList()
getPageChildren()
}) })
onReachBottom(() => { onReachBottom(() => {
getList() getList()

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

@ -29,10 +29,10 @@
<view>产品编码</view><view>{{item.productionCode}}</view> <view>产品编码</view><view>{{item.productionCode}}</view>
</view> </view>
<view class="dec"> <view class="dec">
<view>工作类型</view><view>{{item.status == '1'?'返工' :'返修'}}</view> <view>工作类型</view><view>{{item.reworkType == '1'?'返工' :'返修'}}</view>
</view> </view>
<view class="dec"> <view class="dec">
<view>是否有替换件</view><view>{{item.replaceFlag == 'TRUE'?'是' :'否'}}</view> <view>是否有替换件</view><view>{{item.replaceFlag == '1'?'是' :'否'}}</view>
</view> </view>
<view class="dec"> <view class="dec">
<view>返修人员</view><view>{{item.reworkPersoncode}}</view> <view>返修人员</view><view>{{item.reworkPersoncode}}</view>
@ -58,6 +58,7 @@
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
<requestButton @goScan='openScanDetailPopup'></requestButton> <requestButton @goScan='openScanDetailPopup'></requestButton>
</view> </view>
<!-- <view>
<u-popup v-model="showType" mode="bottom" border-radius="14" length="30%"> <u-popup v-model="showType" mode="bottom" border-radius="14" length="30%">
<view style="margin-top: 30px; margin-left: 30px;"> <view style="margin-top: 30px; margin-left: 30px;">
@ -67,6 +68,16 @@
<u-button class="sure" @click="handleReceive">确定</u-button> <u-button class="sure" @click="handleReceive">确定</u-button>
</view> </view>
</u-popup> </u-popup>
</view> -->
<view>
<u-popup v-model="showWorker" mode="bottom" border-radius="14" length="30%">
<view>
<u-select v-model="showWorker" mode="mutil-column-auto" :list="workerList" @confirm="confirmSelectWorker"></u-select>
</view>
</u-popup>
</view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -83,6 +94,7 @@
} from 'vue' } from 'vue'
/*引入API*/ /*引入API*/
import * as reworkSingleApi from "@/api/mes/reworkSingle/reworkSingleApi.ts" import * as reworkSingleApi from "@/api/mes/reworkSingle/reworkSingleApi.ts"
import * as productOfflineApi from "@/api/mes/productOffline/productOfflineApi.ts"
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const paramData = ref() const paramData = ref()
const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}]) const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}])
@ -96,6 +108,14 @@
pageSize: 10, pageSize: 10,
status: 1 status: 1
}) })
const teamParams = ref({
teamGroup:'1',
pageNo: 1,
pageSize: 50,
status: 1
})
const showWorker = ref(false)
const workerList = ref([])
/*是否显示"没有更多了"*/ /*是否显示"没有更多了"*/
const status = ref('loadmore') const status = ref('loadmore')
/*列表数据集*/ /*列表数据集*/
@ -120,9 +140,8 @@
} }
// //
function handleItem(index){ function handleItem(index){
reworkPersoncode.value = null
paramData.value = index paramData.value = index
showType.value = true showWorker.value = true
} }
// //
function handleReceive(){ function handleReceive(){
@ -215,12 +234,36 @@
proxy.$modal.closeLoading(); proxy.$modal.closeLoading();
}, 500); }, 500);
} }
//
function getPageChildren(){
productOfflineApi.getPageChildren(teamParams.value).then((res) => {
console.log(res)
if (res.data) {
console.log(res.data)
workerList.value = res.data
} else {
}
}).catch(() => {
})
}
//
function confirmSelectWorker(val){
console.log(val)
paramData.value.reworkPersoncode = val[1].value
proxy.$modal.confirm('确定提交吗').then(() => {
changeStatus(2)
})
}
/*通用方法*/ /*通用方法*/
onShow(() => { onShow(() => {
params.value.pageNo = 1 params.value.pageNo = 1
list.value = [] list.value = []
status.value = 'loadmore' status.value = 'loadmore'
getList() getList()
getPageChildren()
}) })
onReachBottom(() => { onReachBottom(() => {
getList() getList()

Loading…
Cancel
Save