Browse Source

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

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

50
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>
<requestButton @goScan='openScanDetailPopup'></requestButton>
</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;">
<u-input v-model="reworkPersoncode" placeholder="请输入返工返修人员" />
</view>
<view class="btns">
<u-button class="sure" @click="handleReceive">确定</u-button>
<u-button class="sure" @click="handleReceive()">确定</u-button>
</view>
</u-popup>
</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>
</u-popup>
</view>
</template>
<script setup lang="ts">
@ -89,6 +96,7 @@
} from 'vue'
/*引入API*/
import * as reworkBatchApi from "@/api/mes/reworkBatch/reworkBatchApi.ts"
import * as productOfflineApi from "@/api/mes/productOffline/productOfflineApi.ts"
const { proxy } = getCurrentInstance()
const paramData = ref()
const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}])
@ -102,6 +110,14 @@
pageSize: 10,
status: 1
})
const teamParams = ref({
teamGroup:'1',
pageNo: 1,
pageSize: 50,
status: 1
})
const showWorker = ref(false)
const workerList = ref([])
/*是否显示"没有更多了"*/
const status = ref('loadmore')
/*列表数据集*/
@ -126,12 +142,12 @@
}
//
function handleItem(index){
reworkPersoncode.value = null
paramData.value = index
showType.value = true
showWorker.value = true
}
//
function handleReceive(){
console.log(reworkPersoncode.value)
if(reworkPersoncode.value != '' && reworkPersoncode.value.trim() != ''){
paramData.value.reworkPersoncode=reworkPersoncode.value
changeStatus(2)
@ -139,7 +155,7 @@
}
else{
proxy.$modal.showToast('请输入返修人员')
reworkPersoncode.value = null
reworkPersoncode.value = ''
}
}
//
@ -220,12 +236,34 @@
proxy.$modal.closeLoading();
}, 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(() => {
params.value.pageNo = 1
list.value = []
status.value = 'loadmore'
getList()
getPageChildren()
})
onReachBottom(() => {
getList()

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

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

Loading…
Cancel
Save