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