rev:仓储基础管理维护
This commit is contained in:
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr',
|
||||
url: 'api/structattr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr/',
|
||||
url: 'api/structattr/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr',
|
||||
url: 'api/structattr',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: 'api/stIvtStructattr/stIvtStructattr',
|
||||
url: 'api/structattr/changeActive',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -34,7 +34,7 @@ export function changeActive(data) {
|
||||
|
||||
export function getSectCascader(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructattr/getSectCascader',
|
||||
url: '/api/structattr/getSectCascader',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
||||
@change="changeEnabled(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -213,12 +213,12 @@ const defaultForm = {
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
floor_no: null,
|
||||
is_used: '',
|
||||
is_used: true,
|
||||
ext_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'Sectattr',
|
||||
dicts: ['st_sect_type', 'is_used'],
|
||||
dicts: ['st_sect_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -294,18 +294,20 @@ export default {
|
||||
},
|
||||
// 改变状态
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
return is_used === true
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
changeEnabled(data) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
if (data.is_used === false) {
|
||||
msg = '此操作将启用,是否继续!'
|
||||
}
|
||||
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
data.is_used = !data.is_used
|
||||
crudSectattr.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
@@ -313,6 +315,7 @@ export default {
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
||||
@change="changeEnabled(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -292,7 +292,7 @@ const defaultForm = {
|
||||
front_ground_color: null,
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
is_used: null,
|
||||
is_used: true,
|
||||
is_zdepth: null,
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
@@ -306,7 +306,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_HEIGHT_TYPE', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
|
||||
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -427,18 +427,20 @@ export default {
|
||||
},
|
||||
// 改变状态
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
return is_used === true
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用,是否继续!'
|
||||
changeEnabled(data) {
|
||||
let msg = '此操作将停用,是否继续2!'
|
||||
if (data.is_used === false) {
|
||||
msg = '此操作将启用,是否继续2!'
|
||||
}
|
||||
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
data.is_used = !data.is_used
|
||||
crudStructattr.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user