|
|
@ -1,12 +1,12 @@ |
|
|
|
<template> |
|
|
|
<!-- 列表展示标准模版 --> |
|
|
|
<view> |
|
|
|
<view class="detail-container"> |
|
|
|
<u-form :model="form"> |
|
|
|
<view> |
|
|
|
<u-form-item label="产品编码" prop="productCode"> |
|
|
|
<view> |
|
|
|
<u-input v-model="form.productCode" type="select" @click="showProduct = true" placeholder="请选择产品编码"/> |
|
|
|
<!-- <u-input v-model="form.productCode" disabled="true"/> --> |
|
|
|
<u-input v-model="form.productCode" disabled="true" placeholder="请选择产品编码"/> |
|
|
|
<!-- <u-input v-model="form.productCode" type="select" @click="showProduct = true" disabled="true"/> --> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
</view> |
|
|
@ -45,6 +45,13 @@ |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<u-form-item label="质检人员" prop="checkPersonCode"> |
|
|
|
<view> |
|
|
|
<u-input v-model="form.checkPersonCode" /> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<u-form-item label="离线原因" prop="offlineReson"> |
|
|
|
<view> |
|
|
@ -52,16 +59,18 @@ |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
</view> |
|
|
|
</u-form> |
|
|
|
<view class="footer"> |
|
|
|
<view class="btns"> |
|
|
|
<button class="sure" @click="handleSubmit" :loading='loading' :disabled='loading'>提交处理</button> |
|
|
|
</view> |
|
|
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|
|
|
</u-form> |
|
|
|
<!-- <view class="footer" > |
|
|
|
<view class="btns"> |
|
|
|
<button class="sure" @click="handleSubmit" :loading='loading' :disabled='loading'>提交处理</button> |
|
|
|
</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><u-select v-model="showProduct" :list="productList" @confirm="selectProduct"></u-select></view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -95,6 +104,7 @@ |
|
|
|
offlineReson:'', |
|
|
|
productDestination:'', |
|
|
|
name:'', |
|
|
|
checkPersonCode:'' |
|
|
|
}) |
|
|
|
/*分页参数*/ |
|
|
|
const params = ref({ |
|
|
@ -104,7 +114,27 @@ |
|
|
|
}) |
|
|
|
// 提交处理请求函数 |
|
|
|
function handleSubmit(){ |
|
|
|
if(form.value.productCode!=''){ |
|
|
|
if(form.value.productDestination == ''){ |
|
|
|
proxy.$modal.showToast('产品去向不能为空') |
|
|
|
setTimeout(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}, 1000) |
|
|
|
return ; |
|
|
|
} |
|
|
|
if(form.value.checkPersonCode == ''){ |
|
|
|
proxy.$modal.showToast('质检人员不能为空') |
|
|
|
setTimeout(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}, 1000) |
|
|
|
return ; |
|
|
|
} |
|
|
|
if(form.value.offlineReson == ''){ |
|
|
|
proxy.$modal.showToast('离线原因不能为空') |
|
|
|
setTimeout(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
}, 1000) |
|
|
|
return ; |
|
|
|
} |
|
|
|
proxy.$modal.confirm('确定提交处理吗').then(() => { |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
loading.value = true |
|
|
@ -126,10 +156,6 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
else{ |
|
|
|
proxy.$modal.showToast('请先选择产品编码') |
|
|
|
} |
|
|
|
} |
|
|
|
// 选择产品回调函数 |
|
|
|
function selectProduct(index){ |
|
|
|
form.value.productCode = index[0].value |
|
|
@ -203,6 +229,10 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.detail-container { |
|
|
|
min-height: 100vh; |
|
|
|
background: white; |
|
|
|
} |
|
|
|
|
|
|
|
.footer { |
|
|
|
position: fixed; |
|
|
|