提交添加货位管理中删料是的确认界面

master
Comair 2 years ago
parent 5e25fe4ef1
commit 26d0cf5280
  1. 8
      src/api/wcs/location.js
  2. 30
      src/views/wcs/configuration/index.vue
  3. 91
      src/views/wcs/location/index.vue

@ -16,6 +16,14 @@ export function getLocation(id) {
method: 'get' method: 'get'
}) })
} }
// 查询货位信息详细lo
export function handleDelOrAddBox(params) {
return request({
url: '/wcs/location/handleDelOrAddBox',
params: params,
method: 'post'
})
}
// 新增货位信息 // 新增货位信息
export function addLocation(data) { export function addLocation(data) {

@ -131,19 +131,19 @@ export default {
} }
}, },
}, },
{ // {
label: "通信状态", // label: "",
prop: "communicationStatus", // prop: "communicationStatus",
istrue: true, // istrue: true,
filter(row, value) { // filter(row, value) {
if(row.communicationStatus === "0"){ // if(row.communicationStatus === "0"){
return "未连接"; // return "";
}else if(row.communicationStatus === "1"){ // }else if(row.communicationStatus === "1"){
return "已连接"; // return "";
} // }
}, // },
//
}, // },
{ {
label: "创建时间", label: "创建时间",
prop: "createTime", prop: "createTime",
@ -176,7 +176,7 @@ export default {
name: "切离", name: "切离",
event: "handleCutOff", event: "handleCutOff",
hidden(value) { hidden(value) {
if (value.equipmentStatus === '2') { if (value.equipmentStatus === '2' && value.equipmentName != 'WCS') {
return false; return false;
} else { } else {
return true; return true;
@ -186,7 +186,7 @@ export default {
name: "恢复", name: "恢复",
event: "handleCutIn", event: "handleCutIn",
hidden(value) { hidden(value) {
if (value.equipmentStatus === '1') { if (value.equipmentStatus === '1' && value.equipmentName != 'WCS') {
return false; return false;
} else { } else {
return true; return true;

@ -166,13 +166,21 @@
v-hasPermi="['wcs:location:edit']" v-hasPermi="['wcs:location:edit']"
>修改 >修改
</el-button> </el-button>
<el-button <el-button v-if="scope.row.boxId !== '' && scope.row.boxId !== null"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelBox(scope.row)"
v-hasPermi="['wcs:location:remove']" 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>
<el-button <el-button
size="mini" size="mini"
@ -237,7 +245,7 @@
v-for="dict in dict.type.location_type" v-for="dict in dict.type.location_type"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="Number(dict.value)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -253,7 +261,7 @@
v-for="dict in dict.type.location_status" v-for="dict in dict.type.location_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="Number(dict.value)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -271,27 +279,36 @@
<el-form-item label="列" prop="locationColumn"> <el-form-item label="列" prop="locationColumn">
<el-input v-model="form.locationColumn" placeholder="请输入列"/> <el-input v-model="form.locationColumn" placeholder="请输入列"/>
</el-form-item> </el-form-item>
<el-form-item label="锁定标识" prop="lockFlag"> <!-- <el-form-item label="锁定标识" prop="lockFlag">-->
<el-select <!-- <el-select-->
v-model="form.lockFlag" <!-- v-model="form.lockFlag"-->
placeholder="锁定标识" <!-- placeholder="锁定标识"-->
clearable <!-- clearable-->
style="width: 240px" <!-- style="width: 240px"-->
> <!-- >-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.lock_flag_dict" <!-- v-for="dict in dict.type.lock_flag_dict"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
@ -299,6 +316,7 @@
import { import {
listLocation, listLocation,
getLocation, getLocation,
handleDelOrAddBox,
delLocation, delLocation,
verifyLocation, verifyLocation,
addLocation, addLocation,
@ -330,6 +348,7 @@ export default {
title: '', title: '',
// //
open: false, open: false,
addBoxType: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -340,6 +359,8 @@ export default {
locationType: null, locationType: null,
locationStatus: null locationStatus: null
}, },
addBoxId: null,
locationCode: '',
// //
form: {}, form: {},
// //
@ -380,6 +401,10 @@ export default {
this.open = false this.open = false
this.reset() this.reset()
}, },
cancelAddBox() {
this.addBoxType = false
this.addBoxId = null;
},
// //
reset() { reset() {
this.form = { this.form = {
@ -431,6 +456,32 @@ export default {
this.title = '修改货位信息' 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() { submitForm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {

Loading…
Cancel
Save