parent
e182b977e3
commit
934b5fe63d
7 changed files with 271 additions and 7 deletions
@ -0,0 +1,36 @@ |
||||
import request from '@/axios'; |
||||
|
||||
// 查询流程卡号
|
||||
export const pdaLoadCardNo = (cardNo) => { |
||||
return request({ |
||||
url: `/blade-desk/pdaLoad/loadSubOrder/${cardNo}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
// 子件入库保存
|
||||
export const pdaSaveSubOrder = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/pdaSave/saveSubOrder', |
||||
method: 'POST', |
||||
data: params |
||||
}) |
||||
} |
||||
|
||||
// 获取仓库列表 /stStorehouse/page
|
||||
export const getStorehouseList = (params) => { |
||||
return request({ |
||||
url: '/blade-wms/stStorehouse/page', |
||||
method: 'get', |
||||
params: params |
||||
}) |
||||
} |
||||
|
||||
// 获取库位列表 /stStorageLocation/list
|
||||
export const getStorageLocationList = (params) => { |
||||
return request({ |
||||
url: '/blade-wms/stStorageLocation/list', |
||||
method: 'get', |
||||
params: params |
||||
}) |
||||
} |
||||
@ -0,0 +1,201 @@ |
||||
<template> |
||||
<div> |
||||
<el-card class="box-card" shadow="never"> |
||||
<div slot="header" class="clearfix"> |
||||
<el-form ref="form" :model="formData" :rules="rules" inline label-width="80px"> |
||||
<el-row :gutter="12"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="流程卡号" prop="cardNo" label-width="100px"> |
||||
<el-input |
||||
ref="codeFocus" |
||||
v-model="formData.cardNo" |
||||
placeholder="请扫描流程卡" |
||||
@keyup.enter.native="codeKeyUp" |
||||
/> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="6"> |
||||
<el-form-item label="仓库" prop="shId" label-width="60px"> |
||||
<!-- <el-select |
||||
v-model="formData.shId" |
||||
filterable |
||||
placeholder="请选择仓库" |
||||
@change="storeHouse" |
||||
> |
||||
<el-option |
||||
v-for="item in storeHouseOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value" |
||||
/> |
||||
</el-select> --> |
||||
<jhSelect |
||||
v-model="formData.shId" |
||||
placeholder="请搜索选择" |
||||
api-url="/blade-wms/stStorehouse/page" |
||||
echo-api="/blade-wms/stStorehouse/page" |
||||
echoParamsKey="ids" |
||||
echo-method="get" |
||||
api-method="get" |
||||
list-key="records" |
||||
total-key="total" |
||||
label-key="shName" |
||||
value-key="id" |
||||
search-key="id" |
||||
:debounce-time="500" |
||||
@change="(val,item) => storeHouse(val,item)" |
||||
/> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="6"> |
||||
<el-form-item label="库位" prop="cslId" label-width="60px"> |
||||
<jhSelect |
||||
v-model="formData.cslId" |
||||
placeholder="请搜索选择" |
||||
api-url="/blade-wms/stStorageLocation/list" |
||||
echo-api="/blade-wms/stStorageLocation/list" |
||||
echoParamsKey="ids" |
||||
echo-method="get" |
||||
api-method="get" |
||||
list-key="records" |
||||
total-key="total" |
||||
label-key="specifications" |
||||
value-key="id" |
||||
search-key="id" |
||||
:debounce-time="500" |
||||
:disabled="!formData.shId" |
||||
:params="{ shId: formData.shId }" |
||||
@change="(val,item) => storeHouse(val,item)" |
||||
/> |
||||
<!-- <el-select |
||||
v-model="formData.cslId" |
||||
:disabled="!formData.shId" |
||||
filterable |
||||
placeholder="请选择库位" |
||||
> |
||||
<el-option |
||||
v-for="item in locationOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value" |
||||
/> |
||||
</el-select> --> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
</el-form> |
||||
</div> |
||||
<div class="text item"> |
||||
<el-descriptions |
||||
:column="3" |
||||
label-width="100px" |
||||
:content-style="{ 'min-width': '120px' }" |
||||
class="margin-top" |
||||
border |
||||
> |
||||
<el-descriptions-item> |
||||
<template #label> 流程卡号 </template> |
||||
{{ tableObj.cardNo }} |
||||
</el-descriptions-item> |
||||
<el-descriptions-item> |
||||
<template #label> 车间订单号 </template> |
||||
{{ tableObj.woCode }} |
||||
</el-descriptions-item> |
||||
<el-descriptions-item> |
||||
<template #label> 批次 </template> |
||||
{{ tableObj.batchNo }} |
||||
</el-descriptions-item> |
||||
|
||||
<el-descriptions-item> |
||||
<template #label> 零件号 </template> |
||||
{{ tableObj.partCode }} |
||||
</el-descriptions-item> |
||||
<el-descriptions-item> |
||||
<template #label> 工序名称 </template> |
||||
{{ tableObj.ppsName }} |
||||
</el-descriptions-item> |
||||
|
||||
<el-descriptions-item> |
||||
<template #label> 加工班组 </template> |
||||
{{ tableObj.tsName }} |
||||
</el-descriptions-item> |
||||
<el-descriptions-item> |
||||
<template #label> 数量 </template> |
||||
{{ tableObj.makeQty }} |
||||
</el-descriptions-item> |
||||
</el-descriptions> |
||||
</div> |
||||
<span style="text-align: center; display: block; margin: 20px 0px 10px 0px"> |
||||
<el-button slot="right" type="primary" @click="onSubmit">入 库</el-button> |
||||
</span> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import { pdaLoadCardNo, pdaSaveSubOrder ,getStorageLocationList} from '@/api/zhgd-work/childWarehousing'; |
||||
|
||||
export default { |
||||
name: 'ChildWarehousing', |
||||
data() { |
||||
return { |
||||
formData: { |
||||
cardNo: null, |
||||
shId: null, |
||||
wpId: null, |
||||
cslId: null, |
||||
}, |
||||
rules: { |
||||
cardNo: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入卡号', |
||||
}, |
||||
], |
||||
shId: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择仓库', |
||||
}, |
||||
], |
||||
cslId: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择库位', |
||||
}, |
||||
], |
||||
}, |
||||
tableObj: {}, |
||||
storeHouseOptions: [], |
||||
locationOptions: [], |
||||
}; |
||||
}, |
||||
mounted() { |
||||
}, |
||||
methods: { |
||||
codeKeyUp() { |
||||
if (this.formData.cardNo) { |
||||
pdaLoadCardNo(this.formData.cardNo).then(res => { |
||||
this.tableObj = res.data.data; |
||||
this.formData.wpId = res.data.data.wpId; |
||||
}); |
||||
} |
||||
}, |
||||
onSubmit() { |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
pdaSaveSubOrder(this.formData).then(res => { |
||||
this.$message.success('入库成功'); |
||||
this.tableObj = {}; |
||||
this.formData = { |
||||
cardNo: null, |
||||
shId: null, |
||||
wpId: null, |
||||
cslId: null, |
||||
}; |
||||
}); |
||||
} |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
Loading…
Reference in new issue