diff --git a/src/api/repair/stockOperate/stockOperate.js b/src/api/repair/stockOperate/stockOperate.js index 23d957c..a2a1685 100644 --- a/src/api/repair/stockOperate/stockOperate.js +++ b/src/api/repair/stockOperate/stockOperate.js @@ -2,6 +2,7 @@ import request from '@/utils/request' const preUrl = "/repair/so" +// 采购单\领料单 新增 export function createRepairSo(data){ return request({ url: preUrl + "/create", @@ -9,3 +10,11 @@ export function createRepairSo(data){ data }) } + +export function getRepairSoPage(params){ + return request({ + url: preUrl + "/page", + method: "get", + params + }) +} diff --git a/src/views/repair/Components/StaffChoose.vue b/src/views/repair/Components/StaffChoose.vue index a5301bb..223f742 100644 --- a/src/views/repair/Components/StaffChoose.vue +++ b/src/views/repair/Components/StaffChoose.vue @@ -10,6 +10,12 @@ import {getStaffList} from "@/api/company/staff"; export default { name: "StaffChoose", + props:{ + value: { + type: Object, + defaultValue: null + } + }, data() { return { staffList: [], @@ -19,7 +25,14 @@ export default { watch:{ staffSelected(val) { const staff = this.staffList.find(item => item.id === val); - this.$emit("selected", staff); + this.$emit("input", staff); + }, + value(newVal){ + if (newVal){ + this.staffSelected = newVal.id + }else { + this.staffSelected = null + } } }, mounted() { diff --git a/src/views/repair/Components/SupplierChoose.vue b/src/views/repair/Components/SupplierChoose.vue index 85ff8b9..7011d0f 100644 --- a/src/views/repair/Components/SupplierChoose.vue +++ b/src/views/repair/Components/SupplierChoose.vue @@ -11,16 +11,29 @@ import {getBaseSupplierList} from "@/api/repair/supplier"; export default { name: "SupplierChoose", + props: { + value: { + type: Object, + defaultValue: null + } + }, data() { return { supplierSelected: undefined, supplierList: null } }, - watch:{ + watch: { supplierSelected(val) { - const supplier = this.supplierList.find(item => item.id === val); - this.$emit("selected", supplier); + const supplier = this.supplierList.find(item => item.id === val) + this.$emit("input", supplier); + }, + value(newVal) { + if (newVal) { + this.supplierSelected = newVal.id + } else { + this.supplierSelected = null + } } }, mounted() { diff --git a/src/views/repair/Components/WarehouseChoose.vue b/src/views/repair/Components/WarehouseChoose.vue index 7dad376..0b0fcb7 100644 --- a/src/views/repair/Components/WarehouseChoose.vue +++ b/src/views/repair/Components/WarehouseChoose.vue @@ -51,7 +51,8 @@ export default { return JSON.parse(JSON.stringify(result)) }, handleNodeClick(node){ - this.$emit("selected", node) + this.$emit("input", node.name) + this.$emit("change") this.warehouseSelected = node.name this.$refs.selectTree.blur() } diff --git a/src/views/repair/stockOperate/Components/SoIndex.vue b/src/views/repair/stockOperate/Components/SoIndex.vue index ad3f7d9..edd98f3 100644 --- a/src/views/repair/stockOperate/Components/SoIndex.vue +++ b/src/views/repair/stockOperate/Components/SoIndex.vue @@ -12,7 +12,7 @@ - + @@ -25,7 +25,7 @@ + :value="item.value"/> @@ -55,19 +55,19 @@ {{ scope.$index + 1 }} - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + +