手持机平库入 新增,修改,删除库存记录
This commit is contained in:
@@ -25,6 +25,13 @@ export function addInJob(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function rkSurepk(data) {
|
||||
return request({
|
||||
url: '/pda/rkSurepk',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据托盘条码获取物料信息
|
||||
export function getTaskDetail(data) {
|
||||
|
||||
@@ -86,6 +86,16 @@
|
||||
v-hasPermi="['job:mydoJob:manualCompleted']"
|
||||
>手动完成</el-button><!--手动完成-->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="openEditTrayDialog"
|
||||
>修改托盘码</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -106,6 +116,8 @@
|
||||
<el-table-column label="任务号" align="left" prop="taskNo" />
|
||||
<el-table-column label="托盘码" align="left" prop="trayCode" width="140" />
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140" />
|
||||
<el-table-column label="重量" align="left" prop="lineId" />
|
||||
<el-table-column label="容量" align="left" prop="workshopId" />
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" />
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/>
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/>
|
||||
@@ -176,6 +188,24 @@
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="400px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="任务ID">
|
||||
<el-input v-model="form.jobId" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务号">
|
||||
<el-input v-model="form.taskNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘码" prop="trayCode">
|
||||
<el-input v-model="form.trayCode" placeholder="请输入托盘码" />
|
||||
</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>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -258,8 +288,12 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 99,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
rules: {
|
||||
trayCode: [
|
||||
{ required: true, message: "托盘码不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -394,6 +428,37 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
openEditTrayDialog() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError("请选择要修改的任务");
|
||||
return;
|
||||
}
|
||||
if (this.ids.length > 1) {
|
||||
this.$modal.msgError("一次只能修改一条任务");
|
||||
return;
|
||||
}
|
||||
const jobId = this.ids[0];
|
||||
const row = this.mydoJobList.find(item => item.jobId === jobId);
|
||||
if (!row) {
|
||||
this.$modal.msgError("未找到选中任务数据");
|
||||
return;
|
||||
}
|
||||
this.form = Object.assign({}, row);
|
||||
this.title = "修改任务托盘码";
|
||||
this.open = true;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
updateMydoJob(this.form).then(() => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('job/mydoJob/export', {
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="容量" prop="workshopId">
|
||||
<el-input
|
||||
v-model="formData.workshopId"
|
||||
placeholder="请输入容量"
|
||||
clearable
|
||||
:style="{width: '15%'}"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单" prop="stockinDetailId">
|
||||
<el-input
|
||||
v-model="formData.stockinDetailId"
|
||||
@@ -89,6 +98,7 @@ export default {
|
||||
warehouseId: undefined,
|
||||
trayCode: undefined,
|
||||
stockinDetailId: undefined,
|
||||
workshopId: undefined
|
||||
},
|
||||
detailLoading: false,
|
||||
detailOpen: false,
|
||||
|
||||
@@ -16,18 +16,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="formData.trayCode"
|
||||
:maxlength="8"
|
||||
show-word-limit
|
||||
placeholder="请输入条码"
|
||||
clearable
|
||||
:style="{width: '15%'}"
|
||||
@change="handleTrayChange"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单" prop="stockinDetailId">
|
||||
<el-input
|
||||
v-model="formData.stockinDetailId"
|
||||
@@ -39,19 +27,9 @@
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-card style="margin-top: 16px;">
|
||||
<div slot="header">托盘已绑定物料</div>
|
||||
<el-table v-if="trayMaterials && trayMaterials.length" :data="trayMaterials" size="small">
|
||||
<el-table-column label="子单编码" align="left" prop="stockinDetailId"/>
|
||||
<el-table-column label="物料名称" align="left" prop="productName"/>
|
||||
<el-table-column label="数量" align="right" prop="quantity"/>
|
||||
</el-table>
|
||||
<el-empty v-else description="暂无数据"></el-empty>
|
||||
</el-card>
|
||||
<el-form-item size="large">
|
||||
<el-button type="primary" @click="submitForm">确认入库</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
@@ -77,7 +55,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getStockInDetail} from '@/api/in/stockInDetail'
|
||||
import { bindTray ,getTrayInfo ,addInJobpk} from '@/api/rf/rf'
|
||||
import {rkSurepk, getTrayInfo, addInJobpk} from '@/api/rf/rf'
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
@@ -89,11 +67,11 @@ export default {
|
||||
warehouseId: undefined,
|
||||
trayCode: undefined,
|
||||
stockinDetailId: undefined,
|
||||
inQuantity: null
|
||||
},
|
||||
detailLoading: false,
|
||||
detailOpen: false,
|
||||
detailRow: null,
|
||||
inQuantity: null,
|
||||
trayMaterials: [],
|
||||
warehouseOptions:[],
|
||||
queryWarehouseParams:{
|
||||
@@ -143,15 +121,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async handleTrayChange() {
|
||||
const code = (this.formData.trayCode || '').toString().trim()
|
||||
if (!code) {
|
||||
this.trayMaterials = []
|
||||
return
|
||||
}
|
||||
const res = await getTrayInfo(code)
|
||||
this.trayMaterials = res.data || res.rows || []
|
||||
},
|
||||
async handleQueryDetail() {
|
||||
const id = (this.formData.stockinDetailId || '').toString().trim()
|
||||
if (!id) return
|
||||
@@ -170,20 +139,6 @@ export default {
|
||||
this.detailLoading = false
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
if (!this.formData.warehouseId){
|
||||
this.$message.error('请输入仓库号')
|
||||
return
|
||||
}
|
||||
if (!this.formData.trayCode){
|
||||
this.$message.error('请输入托盘码')
|
||||
return
|
||||
}
|
||||
addInJobpk(this.formData).then(() => {
|
||||
this.$message.success('入库成功')
|
||||
this.resetForm()
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs['elForm'].resetFields()
|
||||
this.trayMaterials = []
|
||||
@@ -204,24 +159,19 @@ export default {
|
||||
this.$message.error('入库数量不能超过剩余数量')
|
||||
return
|
||||
}
|
||||
if (!this.formData.trayCode){
|
||||
this.$message.error('请输入托盘码')
|
||||
return
|
||||
}
|
||||
if (!this.formData.warehouseId){
|
||||
this.$message.error('请输入仓库号')
|
||||
return
|
||||
}
|
||||
const payload = {
|
||||
trayCode: this.formData.trayCode,
|
||||
stockinDetailId: this.formData.stockinDetailId,
|
||||
inQuantity: qty,
|
||||
warehouseId: this.formData.warehouseId
|
||||
}
|
||||
bindTray(payload).then(() => {
|
||||
this.$message.success('绑定成功')
|
||||
rkSurepk(payload).then(() => {
|
||||
this.detailOpen = false
|
||||
this.handleTrayChange()
|
||||
this.resetForm()
|
||||
this.$message.success('入库成功')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,14 +89,14 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="spec">
|
||||
<!-- <el-form-item label="规格型号" prop="spec">
|
||||
<el-input
|
||||
v-model="queryParams.spec"
|
||||
placeholder="请输入规格型号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
|
||||
@@ -122,6 +122,7 @@
|
||||
<el-table-column label="列" align="center" prop="theColumn"/>
|
||||
<el-table-column label="层" align="center" prop="theFloor"/>
|
||||
<el-table-column label="重量" align="center" prop="theType"/>
|
||||
<el-table-column label="容量" align="center" prop="theTypeName"/>
|
||||
<el-table-column label="部门" align="center" prop="model">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.model"/>
|
||||
@@ -606,10 +607,10 @@ export default {
|
||||
methods: {
|
||||
getDeptDictOptions(row) {
|
||||
const wid = String(row && row.warehouseId != null ? row.warehouseId : "").padStart(2, "0")
|
||||
if (wid === "01") {
|
||||
if (wid === "01" ) {
|
||||
return this.dict.type.sl_dept || []
|
||||
}
|
||||
if (wid === "02") {
|
||||
if (wid === "02" || wid === "03") {
|
||||
return this.dict.type.el_dept || []
|
||||
}
|
||||
return this.dict.type.sl_dept || []
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" />
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="160"/>
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="合同号" align="center" prop="orderId" />
|
||||
@@ -111,6 +111,8 @@
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="规格型号" align="center" prop="netWeight" />
|
||||
<el-table-column label="重量" align="center" prop="theType" />
|
||||
<el-table-column label="容量" align="center" prop="theTypeName" />
|
||||
<el-table-column label="库存数量" align="center" prop="quantity" width="80" />
|
||||
<!-- <el-table-column label="来源" align="center" prop="spare1" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
Reference in New Issue
Block a user