出入库 按钮控制

出入库 按钮控制
pull/1/head
siontion 9 months ago
parent 64bcbf0f94
commit e43c66500b

@ -3,7 +3,8 @@
<template #header> <template #header>
<span v-text="dialogTitle"></span> <span v-text="dialogTitle"></span>
</template> </template>
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading"> <el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading"
v-bind:disabled="isShowBtnOther">
<!-- 基础信息 --> <!-- 基础信息 -->
<el-card class="hl-card-info"> <el-card class="hl-card-info">
<template #header> <template #header>
@ -184,7 +185,8 @@
</el-button> </el-button>
<el-button link type="primary" @click="handlefuke(scope.$index, scope.row)">复制</el-button> --> <el-button link type="primary" @click="handlefuke(scope.$index, scope.row)">复制</el-button> -->
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)"> <el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)"
v-bind:disabled="isShowBtnOther">
删除 删除
</el-button> </el-button>
</template> </template>
@ -206,9 +208,8 @@
<el-col> <el-col>
<el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :limit="10" :action="uploadUrl" <el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :limit="10" :action="uploadUrl"
:headers="{ 'Authorization': 'Bearer ' + getAccessToken(), 'tenant-id': getTenantId() }" name="files" :headers="{ 'Authorization': 'Bearer ' + getAccessToken(), 'tenant-id': getTenantId() }" name="files"
:show-file-list="false" :auto-upload="false" :show-file-list="false" :auto-upload="false" :data="matUploadData" :on-change="matUploadChange"
:data="matUploadData" class="upload-file-uploader">
:on-change="matUploadChange" class="upload-file-uploader">
<el-button type="primary"> <el-button type="primary">
<Icon icon="ep:upload-filled" />上传 <Icon icon="ep:upload-filled" />上传
</el-button> </el-button>
@ -227,7 +228,8 @@
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template #default="scope"> <template #default="scope">
<el-button link type="danger" size="small" <el-button link type="danger" size="small"
@click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)"> @click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)"
v-bind:disabled="isShowBtnOther">
删除 删除
</el-button> </el-button>
<el-button link type="primary" size="small" v-if="isShow" <el-button link type="primary" size="small" v-if="isShow"
@ -395,6 +397,12 @@ const handleStatus = (async (num) => {
default: default:
break break
} }
//
if (query.type === 'review') {
isShowBtnGroup.value = false;
isShowBtnCancel.value = false;
isShowBtnOther.value = true;
}
reload(); reload();
}) })
const userList = ref<UserApi.UserVO[]>([]) // const userList = ref<UserApi.UserVO[]>([]) //
@ -606,6 +614,8 @@ const handleMatCode = async (scope, matid) => {
const isShowBtnGroup = ref(true) const isShowBtnGroup = ref(true)
const isShowBtnCancel = ref(false) const isShowBtnCancel = ref(false)
const isShowBtnOther = ref(false)
const btnWhClickable = ref(false)
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
@ -622,6 +632,8 @@ onMounted(async () => {
dialogTitle.value = t('action.' + query.type) dialogTitle.value = t('action.' + query.type)
dialogTitle.value = query.type === 'review'?'查看':dialogTitle.value
isShow.value = query.type == "create" ? false : true isShow.value = query.type == "create" ? false : true
//------------------- //-------------------
@ -648,6 +660,12 @@ onMounted(async () => {
default: default:
break break
} }
//
if (query.type === 'review') {
isShowBtnGroup.value = false;
isShowBtnCancel.value = false;
isShowBtnOther.value = true;
}
// //
const queryParamsRg = reactive({ const queryParamsRg = reactive({

@ -126,7 +126,8 @@
<el-table-column prop="rgId" width="140" label="出库库区" required> <el-table-column prop="rgId" width="140" label="出库库区" required>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`${scope.$index}.rgId`" :rules="subFormRules.rgId" class="mb-0px!"> <el-form-item :prop="`${scope.$index}.rgId`" :rules="subFormRules.rgId" class="mb-0px!">
<el-select v-model="scope.row.rgId" placeholder="" style="width: 100%" @change="handleRg(scope)" disabled=""> <el-select v-model="scope.row.rgId" placeholder="" style="width: 100%" @change="handleRg(scope)"
disabled="">
<el-option v-for="dict in rgList" :key="dict.id" :label="dict.rgName" :value="dict.id" /> <el-option v-for="dict in rgList" :key="dict.id" :label="dict.rgName" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -188,9 +189,8 @@
<el-col> <el-col>
<el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :limit="10" :action="uploadUrl" <el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :limit="10" :action="uploadUrl"
:headers="{ 'Authorization': 'Bearer ' + getAccessToken(), 'tenant-id': getTenantId() }" name="files" :headers="{ 'Authorization': 'Bearer ' + getAccessToken(), 'tenant-id': getTenantId() }" name="files"
:show-file-list="false" :auto-upload="false" :show-file-list="false" :auto-upload="false" :data="matUploadData" :on-change="matUploadChange"
:data="matUploadData" class="upload-file-uploader">
:on-change="matUploadChange" class="upload-file-uploader">
<el-button type="primary"> <el-button type="primary">
<Icon icon="ep:upload-filled" />上传 <Icon icon="ep:upload-filled" />上传
</el-button> </el-button>
@ -375,6 +375,12 @@ const handleStatus = (async (num) => {
default: default:
break break
} }
//
if (query.type === 'review') {
isShowBtnGroup.value = false;
isShowBtnCancel.value = false;
isShowBtnOther.value = true;
}
reload() reload()
}) })
const userList = ref<UserApi.UserVO[]>([]) // const userList = ref<UserApi.UserVO[]>([]) //
@ -443,9 +449,8 @@ const submitForm = async () => {
var hasRestNum = true var hasRestNum = true
formData.value.matItemDOList.forEach((rest) => { formData.value.matItemDOList.forEach((rest) => {
if(matCurrentData.find((mat)=>{ mat.matId == rest.matId && mat.pnId == rest.pnId && mat.matRest<rest.matRest})) if (matCurrentData.find(mat => mat.matId == rest.matId && mat.pnId == rest.pnId && mat.matRest < Number(rest.storageOkQty))) {
{ hasRestNum = false
hasRestNum = fasle
} }
}) })
if (!hasRestNum) { if (!hasRestNum) {
@ -652,6 +657,7 @@ onMounted(async () => {
dialogTitle.value = t('action.' + query.type) dialogTitle.value = t('action.' + query.type)
dialogTitle.value = query.type === 'review'?'查看':dialogTitle.value
isShow.value = query.type == "create" ? false : true isShow.value = query.type == "create" ? false : true

Loading…
Cancel
Save