更新代码
This commit is contained in:
@@ -52,4 +52,13 @@ export function getRegion() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion }
|
||||
|
||||
export function changeUsed(data) {
|
||||
return request({
|
||||
url: 'api/point/changeUsed',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed }
|
||||
|
||||
@@ -48,4 +48,5 @@ export function getPointTypeSelectById(id) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default { add, edit, del, changeActive, getPointStatusSelectById, getPointTypeSelectById }
|
||||
|
||||
27
lms/nladmin-ui/src/api/wms/st/bill.js
Normal file
27
lms/nladmin-ui/src/api/wms/st/bill.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/regionio',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/regionio/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/regionio',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
@@ -134,6 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -147,7 +148,13 @@ export default {
|
||||
dicts: ['io_type', 'st_bill_status'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '养生区入库管理', url: 'api/cppoint/getCppRegionInquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
||||
return CRUD({
|
||||
title: '养生区入库管理',
|
||||
url: 'api/regionio',
|
||||
idField: 'qty_unit_id',
|
||||
sort: 'qty_unit_id,desc',
|
||||
crudMethod: { ...crudBill }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -168,6 +175,8 @@ export default {
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.query.io_type = '1'
|
||||
this.query.io_region = "'CPQYA01'"
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,29 +126,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeEnableOn(crud.selections)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeEnableOff(crud.selections)">
|
||||
禁用
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||
@@ -311,18 +289,6 @@ export default {
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
changeEnableOn(data) {
|
||||
crudCppoint.changeUsedOn(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
changeEnableOff(data) {
|
||||
crudCppoint.changeUsedOff(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -147,7 +148,13 @@ export default {
|
||||
dicts: ['io_type', 'st_bill_status'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '成品区出库管理', url: 'api/cppoint/getCppRegionOutquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
||||
return CRUD({
|
||||
title: '成品区出库管理',
|
||||
url: 'api/regionio',
|
||||
idField: 'qty_unit_id',
|
||||
sort: 'qty_unit_id,desc',
|
||||
crudMethod: { ...crudBill }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -168,6 +175,8 @@ export default {
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.query.io_type = '2'
|
||||
this.query.io_region = "'CPQYA01'"
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,19 +24,5 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function changeUsedOn(data) {
|
||||
return request({
|
||||
url: 'api/cppoint/changeUsedOn',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function changeUsedOff(data) {
|
||||
return request({
|
||||
url: 'api/cppoint/changeUsedOff',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeUsedOn, changeUsedOff }
|
||||
export default { add, edit, del }
|
||||
|
||||
@@ -88,27 +88,43 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否启用">
|
||||
<el-select
|
||||
<el-switch
|
||||
v-model="query.is_used"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否启用"
|
||||
class="filter-item"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
active-color="#C0CCDA"
|
||||
inactive-color="#409EFF"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_used"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, 1)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, 0)">
|
||||
禁用
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -280,7 +296,6 @@ export default {
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
|
||||
crudMethod: { ...crudPoint }
|
||||
})
|
||||
},
|
||||
@@ -374,6 +389,15 @@ export default {
|
||||
this.pointTypesList = res
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
changeUsed(data, flag) { // 更改启用状态
|
||||
const param = {}
|
||||
param.data = data
|
||||
param.used = flag
|
||||
crudPoint.changeUsed(param).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,13 +20,34 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="块-排-列">
|
||||
<el-cascader
|
||||
<el-form-item label="块">
|
||||
<el-input
|
||||
v-model="query.block_num"
|
||||
clearable
|
||||
v-model="locations"
|
||||
:options="locationsOptions"
|
||||
placeholder="请选择标签"
|
||||
@change="hand"
|
||||
size="mini"
|
||||
style="width: 185px;"
|
||||
placeholder="块"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排">
|
||||
<el-input
|
||||
v-model="query.row_num"
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 185px;"
|
||||
placeholder="排"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="列">
|
||||
<el-input
|
||||
v-model="query.col_num"
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 185px;"
|
||||
placeholder="列"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位状态">
|
||||
@@ -105,29 +126,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeEnableOn(crud.selections)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close"
|
||||
slot="right"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeEnableOff(crud.selections)">
|
||||
禁用
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||
@@ -280,14 +279,9 @@ export default {
|
||||
is_lock: [
|
||||
{ required: true, message: '是否锁定不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
locations: [],
|
||||
locationsOptions: []
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getLocationsOptions()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
@@ -299,23 +293,6 @@ export default {
|
||||
this.query.locationsOptions = this.locations[0] + '/' + this.locations[1] + '/' + this.locations[2]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getLocationsOptions() {
|
||||
crudYsapoint.arrangementTree().then(res => {
|
||||
this.locationsOptions = res
|
||||
})
|
||||
},
|
||||
changeEnableOn(data) {
|
||||
crudYsapoint.changeUsedOn(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
changeEnableOff(data) {
|
||||
crudYsapoint.changeUsedOff(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,26 +24,4 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function arrangementTree() {
|
||||
return request({
|
||||
url: 'api/ysapoint/blockRowCol/tree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function changeUsedOn(data) {
|
||||
return request({
|
||||
url: 'api/ysapoint/changeUsedOn',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function changeUsedOff(data) {
|
||||
return request({
|
||||
url: 'api/ysapoint/changeUsedOff',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, arrangementTree, changeUsedOn, changeUsedOff }
|
||||
export default { add, edit, del }
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -147,7 +148,7 @@ export default {
|
||||
dicts: ['io_type', 'st_bill_status'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '养生区入库管理', url: 'api/ysapoint/getYsqRegionInquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
||||
return CRUD({ title: '养生区入库管理', url: 'api/regionio', idField: 'qty_unit_id', sort: 'qty_unit_id,desc', crudMethod: { ...crudBill }})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -168,6 +169,8 @@ export default {
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.query.io_type = '1'
|
||||
this.query.io_region = "'YSQA01', 'YSAQKTPQ01'"
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBill from '@/api/wms/st/bill'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -147,7 +148,13 @@ export default {
|
||||
dicts: ['io_type', 'st_bill_status'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '养生区入库管理', url: 'api/ysapoint/getYsqRegionOutquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
||||
return CRUD({
|
||||
title: '养生区入库管理',
|
||||
url: 'api/regionio',
|
||||
idField: 'qty_unit_id',
|
||||
sort: 'qty_unit_id,desc',
|
||||
crudMethod: { ...crudBill }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -168,6 +175,8 @@ export default {
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.query.io_type = '2'
|
||||
this.query.io_region = "'YSQA01', 'YSAQKTPQ01'"
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user