锁定出库弹窗

master
Mr.sun 2 years ago
parent b5497f29b5
commit bfcbcfe9ec
  1. 1
      src/api/wms/busFunctions/reportForms/lockInStock.js
  2. 8
      src/views/libraryManage/inventoryLock/examine/extract.vue
  3. 144
      src/views/libraryManage/inventoryLock/examine/index.vue
  4. 94
      src/views/libraryManage/lockOutStore/index.vue

@ -70,7 +70,6 @@ export function getLockstockBatch(data) {
//叫料确认
export function addLockstockOut(data) {
return request({
// url: '/wms/lock/addLockstockOut',
url: 'wms/stock/lock/addLockstockOut',
method: 'post',
data: data

@ -104,13 +104,10 @@ export default {
this.closeDialog()
},
toQuery() {
// this.paging.page = 1;
// this.queryTable();
if (Object.prototype.toString.call(val) === '[object Object]') {
this.paging.size = val.size
this.queryTable()
} else {
// console.log(val)
this.paging.page = val
this.queryTable()
}
@ -128,7 +125,10 @@ export default {
listLock(obj)
.then((res) => {
if (res.code === 200) {
this.tableData = res.rows
console.log(res.rows)
this.tableData = res.rows.filter((item) => {
return item.orderStatus !== 'out'
})
this.paging.total = res.total
}
this.loading = false

@ -2,7 +2,10 @@
<!-- 产品锁定审核 -->
<div class="app-container">
<div class="search-box">
<el-form :inline="true" :model="enterForm">
<el-form
:inline="true"
:model="enterForm"
>
<el-form-item label="单据编号">
<el-input
v-model="enterForm.orderNo"
@ -11,33 +14,40 @@
></el-input>
</el-form-item>
<el-form-item label="单据状态">
<el-radio-group v-model="orderStatus" disabled>
<el-radio-group
v-model="orderStatus"
disabled
>
<el-radio label="unLock">待解锁</el-radio>
<el-radio label="lock">待锁定</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="queryTable">搜索</el-button>
<el-button
type="primary"
@click="queryTable"
>搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="opt-box">
<div class="opt-box-right">
<el-button type="primary" @click="addLocation">提取</el-button>
<el-button
type="primary"
@click="addLocation"
>提取</el-button>
<el-button
type="primary"
@click="saveLocation"
:disabled="orderStatus !== 'lock'"
>锁定</el-button
>
>锁定</el-button>
<el-button
:disabled="orderStatus !== 'unLock'"
@click="delLocation"
type="primary"
>解锁</el-button
>
>解锁</el-button>
</div>
</div>
@ -60,37 +70,37 @@
</div>
</template>
<script>
import { getTableHeader } from "@/api/system/table";
import { tableConfig } from "./config.js";
import extract from "./extract.vue";
import { lockOrUnLock, list } from "@/api/libraryManage/inventoryLock";
import { getTableHeader } from '@/api/system/table'
import { tableConfig } from './config.js'
import extract from './extract.vue'
import { lockOrUnLock, list } from '@/api/libraryManage/inventoryLock'
export default {
components: { extract },
dicts: ["goods_unit"],
dicts: ['goods_unit'],
data() {
return {
enterForm: {
orderNo: "",
orderNo: ''
},
orderStatus: "",
orderStatus: '',
queryData: [],
goodsData: [],
handleSelect: [],
tableConfig: {
config: [],
config: []
},
tableForm: {
config: [],
},
};
config: []
}
}
},
async created() {
// this.tableConfig = tableConfig.call(this);
getTableHeader("busin_lock_audit_list").then((res) => {
this.tableConfig = tableConfig.call(this);
let propList = this.updatePropList(res.data, this.tableConfig.config);
this.tableConfig.config = propList;
});
getTableHeader('busin_lock_audit_list').then((res) => {
this.tableConfig = tableConfig.call(this)
let propList = this.updatePropList(res.data, this.tableConfig.config)
this.tableConfig.config = propList
})
},
watch: {},
mounted() {},
@ -98,7 +108,7 @@ export default {
//
addLocation() {
// if (!this.enterForm.orderNo) return this.$message("!");
this.$refs.extract.dialogVisible = true;
this.$refs.extract.dialogVisible = true
},
// SD20220600002
async getExtractInfo(dataList) {
@ -107,78 +117,88 @@ export default {
// });
// ids
const { rows } = await list({ orderNo: dataList[0].orderNo });
this.tableForm.config = rows;
const { rows } = await list({ orderNo: dataList[0].orderNo })
this.tableForm.config = rows
this.goodsData = this.tableForm.config;
this.goodsData = this.tableForm.config
if (this.tableForm.config) {
//Init Lock
if (this.tableForm.config[0].orderStatus === "init") {
this.orderStatus = "lock";
} else if (this.tableForm.config[0].orderStatus === "lock") {
this.orderStatus = "unLock";
if (this.tableForm.config[0].orderStatus === 'init') {
this.orderStatus = 'lock'
} else if (this.tableForm.config[0].orderStatus === 'lock') {
this.orderStatus = 'unLock'
}
}
},
//
async queryTable() {
this.queryData = [];
this.queryData = []
this.goodsData.forEach((element) => {
if (element.orderNo === this.enterForm.orderNo) {
this.queryData.push(element);
this.queryData.push(element)
}
});
this.tableForm.config = this.queryData;
})
this.tableForm.config = this.queryData
},
//
resetQuery() {
this.enterForm = {};
this.enterForm = {}
},
//
handleselection(val) {
this.handleSelect = val.map((ele) => ele.id);
this.handleSelect = val.map((ele) => ele.id)
},
//
saveLocation() {
this.$confirm("是否确认锁定所选明细?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认锁定所选明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.lockOrUnLock("lock");
});
this.lockOrUnLock('lock')
this.$message({
message: '锁定成功!',
type: 'success'
})
})
},
//
delLocation() {
this.$confirm("是否确认解锁所选明细?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认解锁所选明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.lockOrUnLock("unLock");
});
this.lockOrUnLock('unLock')
this.$message({
message: '解锁成功!',
type: 'success'
})
})
},
lockOrUnLock(status) {
this.loading = true;
let ids = this.tableForm.config.map((ele) => ele.id);
this.loading = true
let ids = this.tableForm.config.map((ele) => ele.id)
let obj = {
orderStatus: status,
ids: ids,
};
ids: ids
}
lockOrUnLock(obj)
.then((res) => {
if (res.code === 200) {
this.tableData = res.rows;
this.paging.total = res.total;
this.tableData = res.rows
this.paging.total = res.total
}
this.loading = false;
this.loading = false
})
.catch(() => {
this.loading = false;
});
},
},
};
this.loading = false
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

@ -69,7 +69,6 @@
@current-change="handleCurrentChange"
@handleUpdate="handleUpdate"
@handleselection="handleselection"
@handleDetail="handleDetail"
style="margin-top:50px"
>
</heavy-table>
@ -103,47 +102,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item
label="批次号"
prop="batch"
>
<el-select
v-model="form.batch"
style="width:80%;"
placeholder="请选择"
clearable
>
<el-option
v-for="item in lockstockBatch"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item
label="叫料位置"
prop="trolleyType"
>
<el-select
v-model="form.station"
style="width: 80%;"
placeholder="请选择叫料工位"
>
<el-option
v-for="item in dict.type.production_pay_into"
:key="item.value"
:label="item.label"
:value="Number(item.value)"
>
</el-option>
</el-select>
</el-form-item> -->
<el-form-item
label="需求量"
prop="ptPart"
@ -156,7 +115,7 @@
size="small"
@keyup.enter.native="handleQuery"
/>
<span></span>
<span></span>
</el-form-item>
</el-form>
<div
@ -176,9 +135,7 @@
<script>
// import { queryStoragePlan, IniteminCancel, queryIteminPlan, InPlanCancel } from '@/api/wms/busFunctions/inManagement/planInStore'
import { lockStockQty, getLockstockOutList, getLockstockBatch, addLockstockOut } from '@/api/wms/busFunctions/reportForms/lockInStock'
import { getItemDataBreakCat } from '@/api/wms/busFunctions/storeManager/sysStock'
// import { stationList } from '@/api/wms/busFunctions/outManagement/productCall.js'
import { lockStockQty, getLockstockOutList, addLockstockOut } from '@/api/wms/busFunctions/reportForms/lockInStock'
import moment from 'moment'
export default {
name: 'LockInstock',
@ -266,7 +223,7 @@ export default {
fixed: 'right',
buttons: [
{
name: '叫料出库',
name: '锁定出库',
event: 'handleUpdate'
}
]
@ -318,28 +275,15 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 50
// ttPart: ''
// type: 'in'
// loName: null
},
//
form: {},
//
rules: {
devNo: [{ required: true, trigger: 'blur', message: '请输入设备编码' }],
devName: [{ required: true, trigger: 'blur', message: '请输入设备名称' }],
devType: [{ required: true, trigger: 'change', message: '请选择设备类型' }]
}
rules: {}
}
},
created() {
this.getList()
// getItemDataBreakCat({ pageSize: 999, pageNum: 1 }).then((response) => {
// this.BreakCatList = response.data
// })
// getLockstockBatch({ pageSize: 999, pageNum: 1 }).then((response) => {
// this.lockstockBatch = response.data
// })
},
methods: {
//
@ -397,8 +341,6 @@ export default {
reset() {
this.form = {
id: null
// logicAreaName: nulls
// value1: [moment().locale('zh-cn').format('yyyy-MM-DD 07:30:00'), moment().locale('zh-cn').format('yyyy-MM-DD 31:30:00')]
}
;(this.value1 = [moment().locale('zh-cn').format('yyyy-MM-DD 07:15:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 07:15:00')]), this.resetForm('form')
},
@ -412,35 +354,39 @@ export default {
pageNum: 1,
pageSize: 50
}
this.$refs.queryForm.resetFields()
this.resetForm('queryForm')
this.handleQuery()
},
//
handleDetail(row) {
this.open = true
// this.$router.push({ path: '/wms/busFunctions/reportForms/lockInstock/lockDetail/index', query: { ptPart: row.ptPart, batch: row.batch } })
handleUpdate(row) {
this.$confirm('确定锁定出库吗?', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addLockstockOut({ lockId: row.lockId }).then((response) => {
this.$modal.msgSuccess('锁定出库成功')
this.open = false
if (this.paging.total % 10 === 1) {
this.queryParams.pageNum == 1 ? this.queryParams.pageNum : (this.queryParams.pageNum = this.queryParams.pageNum - 1)
}
this.getList()
})
})
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate1(row) {
let tempRow = JSON.parse(JSON.stringify(row))
this.reset()
let data = {
id: tempRow.id,
batch: tempRow.batch,
// ptPart: tempRow.taskPath,
lockNo: tempRow.lockNo,
lockId: tempRow.lockId
// taskPath:''
// containerCode: tempRow.tempRow
}
this.form = data
this.open = true
// this.title = ''
},
submitForm() {
this.$refs['form'].validate((valid) => {

Loading…
Cancel
Save