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"
>
验收删除
@@ -271,7 +268,7 @@
size="mini"
type="text"
icon="el-icon-delete"
- v-if="isShow"
+ v-if="isAdd"
@click="handleDelete(scope.row)"
>删除
@@ -414,13 +411,13 @@ export default {
return false
},
},
- isCheck: {
+ isAdd: {
type: Boolean,
default: () => {
return false
},
},
- isDisabled: {
+ isAccept: {
type: Boolean,
default: () => {
return false
@@ -428,6 +425,7 @@ export default {
},
partsTaskId: {
type: [String, Number],
+ default: () => null,
},
},
data() {
@@ -587,15 +585,20 @@ export default {
// }
this.taskId = this.partsTaskId
+
+ // 如果传入了 taskId 则需要查询详情
+ if (this.partsTaskId) {
+ this.getTaskInfo()
+ }
},
mounted() {
this.getUserList()
this.supplierInfoList()
this.getAccessoryTree()
- if (this.isView) {
- this.getTaskInfo()
- }
+ // if (this.isView) {
+ // this.getTaskInfo()
+ // }
},
methods: {
/** 查询用户列表--采购员 */
diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/home.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/home.vue
index 5410f9e8..9edecaff 100644
--- a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/home.vue
+++ b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/home.vue
@@ -534,7 +534,9 @@ export default {
// path: '/store/newBuy/newAccessoryAccept',
// query,
// })
- this.$emit('editParts', row.taskId)
+ // this.$emit('editParts', row.taskId)
+
+ this.$emit('handleParts', 2, row.taskId)
},
/** 查看按钮操作 */
handleView(row) {
@@ -544,7 +546,8 @@ export default {
// query,
// })
- this.$emit('queryParts', row.taskId)
+ // this.$emit('queryParts', row.taskId)
+ this.$emit('handleParts', 3, row.taskId)
},
/** 验收按钮操作 */
handleCheck(row) {
@@ -553,7 +556,8 @@ export default {
// path: '/store/newBuy/newAccessoryAccept',
// query,
// })
- this.$emit('acceptParts', row.taskId)
+ // this.$emit('acceptParts', row.taskId)
+ this.$emit('handleParts', 4, row.taskId)
},
/** 提交按钮 */
submitForm: function () {
@@ -600,7 +604,9 @@ export default {
// path: '/store/newBuy/newAccessoryAccept',
// query,
// })
- this.$emit('addParts')
+ // this.$emit('addParts')
+
+ this.$emit('handleParts', 1)
},
/** 删除按钮操作 */
handleDelete(row) {
diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/index.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/index.vue
index b3a6db78..33928bae 100644
--- a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/index.vue
+++ b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/index.vue
@@ -11,13 +11,10 @@
:partsTaskId="partsTaskId"
:isView="isView"
:isEdit="isEdit"
- :isCheck="isCheck"
- :isDisabled="isDisabled"
- @addParts="addParts"
- @queryParts="queryParts"
- @editParts="editParts"
- @acceptParts="acceptParts"
+ :isAdd="isAdd"
+ :isAccept="isAccept"
@partsSaveSuccess="partsSaveSuccess"
+ @handleParts="handleParts"
/>
@@ -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'
},
/* 返回按钮 */