|
|
|
|
@ -166,13 +166,21 @@ |
|
|
|
|
v-hasPermi="['wcs:location:edit']" |
|
|
|
|
>修改 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
<el-button v-if="scope.row.boxId !== '' && scope.row.boxId !== null" |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
|
@click="handleDelBox(scope.row)" |
|
|
|
|
v-hasPermi="['wcs:location:remove']" |
|
|
|
|
>删除 |
|
|
|
|
>删料 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button v-if="!(scope.row.boxId !== '' && scope.row.boxId !== null)" |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleAddBox(scope.row)" |
|
|
|
|
v-hasPermi="['wcs:location:remove']" |
|
|
|
|
>建料 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
@ -237,7 +245,7 @@ |
|
|
|
|
v-for="dict in dict.type.location_type" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
:value="Number(dict.value)" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
@ -253,7 +261,7 @@ |
|
|
|
|
v-for="dict in dict.type.location_status" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
:value="Number(dict.value)" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
@ -271,27 +279,36 @@ |
|
|
|
|
<el-form-item label="列" prop="locationColumn"> |
|
|
|
|
<el-input v-model="form.locationColumn" placeholder="请输入列"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="锁定标识" prop="lockFlag"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.lockFlag" |
|
|
|
|
placeholder="锁定标识" |
|
|
|
|
clearable |
|
|
|
|
style="width: 240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in dict.type.lock_flag_dict" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="锁定标识" prop="lockFlag">--> |
|
|
|
|
<!-- <el-select--> |
|
|
|
|
<!-- v-model="form.lockFlag"--> |
|
|
|
|
<!-- placeholder="锁定标识"--> |
|
|
|
|
<!-- clearable--> |
|
|
|
|
<!-- style="width: 240px"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- <el-option--> |
|
|
|
|
<!-- v-for="dict in dict.type.lock_flag_dict"--> |
|
|
|
|
<!-- :key="dict.value"--> |
|
|
|
|
<!-- :label="dict.label"--> |
|
|
|
|
<!-- :value="dict.value"--> |
|
|
|
|
<!-- />--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
</el-form> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="建账" :visible.sync="addBoxType" width="500px" append-to-body> |
|
|
|
|
<el-input v-model="addBoxId" placeholder="请输入boxID"/> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" @click="submitAddBox">确 定</el-button> |
|
|
|
|
<el-button @click="cancelAddBox">取 消</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
@ -299,6 +316,7 @@ |
|
|
|
|
import { |
|
|
|
|
listLocation, |
|
|
|
|
getLocation, |
|
|
|
|
handleDelOrAddBox, |
|
|
|
|
delLocation, |
|
|
|
|
verifyLocation, |
|
|
|
|
addLocation, |
|
|
|
|
@ -330,6 +348,7 @@ export default { |
|
|
|
|
title: '', |
|
|
|
|
// 是否显示弹出层 |
|
|
|
|
open: false, |
|
|
|
|
addBoxType: false, |
|
|
|
|
// 查询参数 |
|
|
|
|
queryParams: { |
|
|
|
|
pageNum: 1, |
|
|
|
|
@ -340,6 +359,8 @@ export default { |
|
|
|
|
locationType: null, |
|
|
|
|
locationStatus: null |
|
|
|
|
}, |
|
|
|
|
addBoxId: null, |
|
|
|
|
locationCode: '', |
|
|
|
|
// 表单参数 |
|
|
|
|
form: {}, |
|
|
|
|
// 表单校验 |
|
|
|
|
@ -380,6 +401,10 @@ export default { |
|
|
|
|
this.open = false |
|
|
|
|
this.reset() |
|
|
|
|
}, |
|
|
|
|
cancelAddBox() { |
|
|
|
|
this.addBoxType = false |
|
|
|
|
this.addBoxId = null; |
|
|
|
|
}, |
|
|
|
|
// 表单重置 |
|
|
|
|
reset() { |
|
|
|
|
this.form = { |
|
|
|
|
@ -431,6 +456,32 @@ export default { |
|
|
|
|
this.title = '修改货位信息' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** 删料或者按钮操作 */ |
|
|
|
|
handleDelBox(row) { |
|
|
|
|
|
|
|
|
|
this.$modal.confirm('是否确认删除boxID" ' + row.boxId + ' "吗?').then(function() { |
|
|
|
|
return handleDelOrAddBox({locationCode: "",boxId: row.boxId}); |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList() |
|
|
|
|
this.$modal.msgSuccess('删除成功') |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}, |
|
|
|
|
// 建料 |
|
|
|
|
handleAddBox(row) { |
|
|
|
|
this.locationCode = row.locationCode; |
|
|
|
|
this.addBoxType = true; |
|
|
|
|
}, |
|
|
|
|
submitAddBox() { |
|
|
|
|
if(this.addBoxId.trim() === null || this.addBoxId.trim() === ""){ |
|
|
|
|
this.$modal.msgError('boxID不能为空'); |
|
|
|
|
} |
|
|
|
|
handleDelOrAddBox({locationCode: this.locationCode,boxId: this.addBoxId}).then(response => { |
|
|
|
|
this.locationCode = null; |
|
|
|
|
this.addBoxId = null; |
|
|
|
|
this.addBoxType = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
submitForm() { |
|
|
|
|
this.$refs['form'].validate(valid => { |
|
|
|
|
|