锁定出库弹窗

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) { export function addLockstockOut(data) {
return request({ return request({
// url: '/wms/lock/addLockstockOut',
url: 'wms/stock/lock/addLockstockOut', url: 'wms/stock/lock/addLockstockOut',
method: 'post', method: 'post',
data: data data: data

@ -104,13 +104,10 @@ export default {
this.closeDialog() this.closeDialog()
}, },
toQuery() { toQuery() {
// this.paging.page = 1;
// this.queryTable();
if (Object.prototype.toString.call(val) === '[object Object]') { if (Object.prototype.toString.call(val) === '[object Object]') {
this.paging.size = val.size this.paging.size = val.size
this.queryTable() this.queryTable()
} else { } else {
// console.log(val)
this.paging.page = val this.paging.page = val
this.queryTable() this.queryTable()
} }
@ -128,7 +125,10 @@ export default {
listLock(obj) listLock(obj)
.then((res) => { .then((res) => {
if (res.code === 200) { 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.paging.total = res.total
} }
this.loading = false this.loading = false

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

@ -69,7 +69,6 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@handleUpdate="handleUpdate" @handleUpdate="handleUpdate"
@handleselection="handleselection" @handleselection="handleselection"
@handleDetail="handleDetail"
style="margin-top:50px" style="margin-top:50px"
> >
</heavy-table> </heavy-table>
@ -103,47 +102,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </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 <el-form-item
label="需求量" label="需求量"
prop="ptPart" prop="ptPart"
@ -156,7 +115,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
<span></span> <span></span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div <div
@ -176,9 +135,7 @@
<script> <script>
// import { queryStoragePlan, IniteminCancel, queryIteminPlan, InPlanCancel } from '@/api/wms/busFunctions/inManagement/planInStore' // import { queryStoragePlan, IniteminCancel, queryIteminPlan, InPlanCancel } from '@/api/wms/busFunctions/inManagement/planInStore'
import { lockStockQty, getLockstockOutList, getLockstockBatch, addLockstockOut } from '@/api/wms/busFunctions/reportForms/lockInStock' import { lockStockQty, getLockstockOutList, 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 moment from 'moment' import moment from 'moment'
export default { export default {
name: 'LockInstock', name: 'LockInstock',
@ -266,7 +223,7 @@ export default {
fixed: 'right', fixed: 'right',
buttons: [ buttons: [
{ {
name: '叫料出库', name: '锁定出库',
event: 'handleUpdate' event: 'handleUpdate'
} }
] ]
@ -318,28 +275,15 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 50 pageSize: 50
// ttPart: ''
// type: 'in'
// loName: null
}, },
// //
form: {}, form: {},
// //
rules: { rules: {}
devNo: [{ required: true, trigger: 'blur', message: '请输入设备编码' }],
devName: [{ required: true, trigger: 'blur', message: '请输入设备名称' }],
devType: [{ required: true, trigger: 'change', message: '请选择设备类型' }]
}
} }
}, },
created() { created() {
this.getList() 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: { methods: {
// //
@ -397,8 +341,6 @@ export default {
reset() { reset() {
this.form = { this.form = {
id: null 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') ;(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, pageNum: 1,
pageSize: 50 pageSize: 50
} }
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
// //
handleDetail(row) { handleUpdate(row) {
this.open = true this.$confirm('确定锁定出库吗?', '确认', {
// this.$router.push({ path: '/wms/busFunctions/reportForms/lockInstock/lockDetail/index', query: { ptPart: row.ptPart, batch: row.batch } }) 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)) let tempRow = JSON.parse(JSON.stringify(row))
this.reset() this.reset()
let data = { let data = {
id: tempRow.id, id: tempRow.id,
batch: tempRow.batch, batch: tempRow.batch,
// ptPart: tempRow.taskPath,
lockNo: tempRow.lockNo, lockNo: tempRow.lockNo,
lockId: tempRow.lockId lockId: tempRow.lockId
// taskPath:''
// containerCode: tempRow.tempRow
} }
this.form = data this.form = data
this.open = true this.open = true
// this.title = ''
}, },
submitForm() { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {

Loading…
Cancel
Save