From eab8f94c0ef6eb5842528d3ce5ec21eb14501c7b Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 19 Jun 2024 11:20:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E8=B4=AD=E9=85=8D?= =?UTF-8?q?=E4=BB=B6=E9=A1=B5=E9=9D=A2=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partsAcceptance/component/addParts.vue | 43 ++++---- .../partsAcceptance/component/home.vue | 14 ++- .../newPurchase/partsAcceptance/index.vue | 102 ++++++++++++------ 3 files changed, 103 insertions(+), 56 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue index 2d296a4f..af13397d 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue @@ -7,6 +7,7 @@ size="small" :inline="true" label-width="80px" + :disabled="isView || isAccept" > @@ -24,7 +24,6 @@ style="width: 240px" value-format="yyyy-MM-dd" type="date" - :disabled="isDisabled" :picker-options="pickerOptions" placeholder="请选择到货日期" > @@ -35,7 +34,6 @@ filterable placeholder="请选择采购员" style="width: 240px" - :disabled="isDisabled" > @@ -86,7 +84,6 @@ placeholder="配件厂家" clearable filterable - :disabled="isDisabled" style="width: 240px" @change="changeSupplier" > @@ -117,7 +114,7 @@ plain icon="el-icon-plus" size="mini" - v-if="!isDisabled" + v-if="isAdd || isEdit" @click="handleSave" >保存 @@ -128,7 +125,7 @@ plain icon="el-icon-plus" size="mini" - v-if="isCheck" + v-if="isAccept" :disabled="multiple" @click="handleListCheck" v-hasPermi="['newPurchase:parts:notice:accept:batch']" @@ -195,7 +192,7 @@ @@ -207,7 +204,7 @@ @@ -227,7 +224,7 @@ placeholder="厂家" clearable style="width: 180px" - :disabled="isCheck || isView" + :disabled="isView || isAccept" > @@ -39,40 +36,81 @@ export default { partsTaskId: '', isView: false, isEdit: false, - isCheck: false, - isDisabled: false, + isAdd: false, + isAccept: false, + // isCheck: false, + // isDisabled: false, } }, methods: { /* 新增配件 */ - addParts() { - this.pageContent = '新增配件' - this.isShowComponent = 'AddParts' - }, - /* 查询配件 */ - queryParts(taskId) { - this.partsTaskId = taskId - this.isView = true - this.isDisabled = true - this.isShowComponent = 'AddParts' - }, + // addParts() { + // this.pageContent = '新增配件' + // this.isShowComponent = 'AddParts' + // }, + // /* 查询配件 */ + // queryParts(taskId) { + // this.partsTaskId = taskId + // this.isView = true + // this.isDisabled = true + // this.isShowComponent = 'AddParts' + // }, /* 新增 修改保存成功 */ partsSaveSuccess() { this.isShowComponent = 'Home' }, - /* 编辑配件 */ - editParts(taskId) { - this.partsTaskId = taskId - this.isView = true - this.isEdit = true - this.isShowComponent = 'AddParts' - }, - /* 验收配件 */ - acceptParts(taskId) { - this.partsTaskId = taskId - this.isView = true - this.isDisabled = true - this.isCheck = true + // /* 编辑配件 */ + // editParts(taskId) { + // this.partsTaskId = taskId + // this.isView = true + // this.isEdit = true + // this.isShowComponent = 'AddParts' + // }, + // /* 验收配件 */ + // acceptParts(taskId) { + // this.partsTaskId = taskId + // this.isView = true + // this.isDisabled = true + // this.isCheck = true + // this.isShowComponent = 'AddParts' + // }, + + // 新增 编辑 查看 验收事件 + handleParts(type, taskId) { + switch (type) { + case 1: + this.pageContent = '新增配件' + this.partsTaskId = null + this.isAdd = true + this.isEdit = false + this.isView = false + this.isAccept = false + break + case 2: + this.pageContent = '编辑配件' + this.partsTaskId = taskId + this.isEdit = true + this.isAdd = false + this.isView = false + this.isAccept = false + break + case 3: + this.pageContent = '配件详情' + this.partsTaskId = taskId + this.isEdit = false + this.isAdd = false + this.isView = true + this.isAccept = false + break + case 4: + this.pageContent = '配件验收' + this.partsTaskId = taskId + this.isEdit = false + this.isAdd = false + this.isAccept = true + break + } + this.isShowComponent = 'AddParts' }, /* 返回按钮 */