opt:提交用料出库
This commit is contained in:
@@ -30,6 +30,14 @@ public interface MdPbStoragevehicleextMapper extends BaseMapper<MdPbStoragevehic
|
|||||||
*/
|
*/
|
||||||
IPage<JSONObject> getCanuseIvt(Page<JSONObject> page, @Param("param") Map whereJson);
|
IPage<JSONObject> getCanuseIvt(Page<JSONObject> page, @Param("param") Map whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取可用库存分页查询
|
||||||
|
* @param page 分页条件
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
* @return IPage<JSONObject>
|
||||||
|
*/
|
||||||
|
IPage<JSONObject> getOrderDtl(Page<JSONObject> page, @Param("param") Map whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据批次和物料查看可用库存总和
|
* 根据批次和物料查看可用库存总和
|
||||||
* @param pcsn
|
* @param pcsn
|
||||||
|
|||||||
@@ -56,6 +56,45 @@
|
|||||||
ORDER BY ext.create_time Desc
|
ORDER BY ext.create_time Desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOrderDtl" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT
|
||||||
|
form.id as storagevehicleext_id,
|
||||||
|
form.code as source_bill_code,
|
||||||
|
form.source_form_date,
|
||||||
|
form.id as source_billdtl_id,
|
||||||
|
form.form_type as source_bill_type,
|
||||||
|
material.material_id,
|
||||||
|
material.material_code,
|
||||||
|
material.material_name,
|
||||||
|
form.unit_id as qty_unit_id,
|
||||||
|
form.unit_name as qty_unit_name,
|
||||||
|
form.qty,
|
||||||
|
form.stor_name
|
||||||
|
FROM
|
||||||
|
pm_form_data form
|
||||||
|
INNER JOIN md_me_materialbase material ON material.material_code = form.material_code
|
||||||
|
<where>
|
||||||
|
form.status = '10'
|
||||||
|
and form.form_type = '1001'
|
||||||
|
AND form.is_finish = '0'
|
||||||
|
<if test="param.stor_id != null and param.stor_id != ''">
|
||||||
|
AND
|
||||||
|
form.stor_id LIKE #{param.stor_id}
|
||||||
|
</if>
|
||||||
|
<if test="param.code != null and param.code != ''">
|
||||||
|
AND
|
||||||
|
form.code LIKE #{param.code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.material_code != null and param.material_code != ''">
|
||||||
|
AND
|
||||||
|
material.material_code LIKE #{param.material_code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
ORDER BY form.create_time Desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="queryAllByPage" resultType="com.alibaba.fastjson.JSONObject">
|
<select id="queryAllByPage" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
SELECT
|
SELECT
|
||||||
ext.group_id as storagevehicleext_id,
|
ext.group_id as storagevehicleext_id,
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ public class OutBillController {
|
|||||||
return new ResponseEntity<>(TableDataInfo.build(iOutBillService.getCanuseIvt(whereJson,page)),HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(iOutBillService.getCanuseIvt(whereJson,page)),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getOrderDtl")
|
||||||
|
@Log("获取可用库存物料")
|
||||||
|
public ResponseEntity<Object> getOrderDtl(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(iOutBillService.getOrderDtl(whereJson,page)),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Log("修改出库单")
|
@Log("修改出库单")
|
||||||
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ public interface IOutBillService extends IService<IOStorInv> {
|
|||||||
*/
|
*/
|
||||||
IPage<JSONObject> getCanuseIvt(Map whereJson, PageQuery page);
|
IPage<JSONObject> getCanuseIvt(Map whereJson, PageQuery page);
|
||||||
|
|
||||||
|
IPage<JSONObject> getOrderDtl(Map whereJson, PageQuery page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改出库单
|
* 修改出库单
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -173,6 +173,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
whereJson);
|
whereJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<JSONObject> getOrderDtl(Map whereJson, PageQuery page) {
|
||||||
|
return mdPbStoragevehicleextMapper.getOrderDtl(new Page<>(page.getPage() + 1, page.getSize()),
|
||||||
|
whereJson);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(JSONObject whereJson) {
|
public void update(JSONObject whereJson) {
|
||||||
String iostorinv_id = (String) whereJson.get("iostorinv_id");
|
String iostorinv_id = (String) whereJson.get("iostorinv_id");
|
||||||
@@ -272,7 +278,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
map.put("iostorinv_id", iostorinv_id);
|
map.put("iostorinv_id", iostorinv_id);
|
||||||
map.put("bill_code", bill_code);
|
map.put("bill_code", bill_code);
|
||||||
map.put("biz_date", map.getString("biz_date").substring(0, 10));
|
map.put("biz_date", map.getString("biz_date").substring(0, 10));
|
||||||
String bill_type = (String) map.get("bill_type");
|
|
||||||
map.put("io_type", IOSEnum.IO_TYPE.code("出库"));
|
map.put("io_type", IOSEnum.IO_TYPE.code("出库"));
|
||||||
map.put("detail_count", array.size() + "");
|
map.put("detail_count", array.size() + "");
|
||||||
map.put("create_mode", IOSEnum.CREATE_MODE.code("PC产生"));
|
map.put("create_mode", IOSEnum.CREATE_MODE.code("PC产生"));
|
||||||
@@ -303,6 +308,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
ioStorInvDtl.put("iostorinv_id", iostorinv_id);
|
ioStorInvDtl.put("iostorinv_id", iostorinv_id);
|
||||||
ioStorInvDtl.put("seq_no", (i + 1) + "");
|
ioStorInvDtl.put("seq_no", (i + 1) + "");
|
||||||
ioStorInvDtl.put("material_id", row.getString("material_id"));
|
ioStorInvDtl.put("material_id", row.getString("material_id"));
|
||||||
|
ioStorInvDtl.put("material_code", row.getString("material_code"));
|
||||||
ioStorInvDtl.put("pcsn", row.getString("pcsn"));
|
ioStorInvDtl.put("pcsn", row.getString("pcsn"));
|
||||||
ioStorInvDtl.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
|
ioStorInvDtl.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
|
||||||
ioStorInvDtl.put("qty_unit_id", row.get("qty_unit_id"));
|
ioStorInvDtl.put("qty_unit_id", row.get("qty_unit_id"));
|
||||||
@@ -311,6 +317,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
ioStorInvDtl.put("remark", row.getString("remark"));
|
ioStorInvDtl.put("remark", row.getString("remark"));
|
||||||
ioStorInvDtl.put("assign_qty", "0");
|
ioStorInvDtl.put("assign_qty", "0");
|
||||||
ioStorInvDtl.put("unassign_qty", row.get("qty"));
|
ioStorInvDtl.put("unassign_qty", row.get("qty"));
|
||||||
|
ioStorInvDtl.put("source_billdtl_id", row.getString("source_billdtl_id"));
|
||||||
|
ioStorInvDtl.put("source_bill_code", row.getString("source_bill_code"));
|
||||||
|
ioStorInvDtl.put("source_bill_type", row.getString("source_bill_type"));
|
||||||
|
|
||||||
ioStorInvDtlMapper.insert(ioStorInvDtl.toJavaObject(IOStorInvDtl.class));
|
ioStorInvDtlMapper.insert(ioStorInvDtl.toJavaObject(IOStorInvDtl.class));
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function add(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/deviceinfo',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function del(ids) {
|
|
||||||
return request({
|
|
||||||
url: 'api/deviceinfo/',
|
|
||||||
method: 'delete',
|
|
||||||
data: ids
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function edit(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/deviceinfo',
|
|
||||||
method: 'put',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function changeActive(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/deviceinfo/changeActive',
|
|
||||||
method: 'put',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default { add, edit, del, changeActive }
|
|
||||||
@@ -1,304 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!--工具栏-->
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="80px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="模糊搜索">
|
|
||||||
<el-input
|
|
||||||
v-model="query.search"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入设备编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
||||||
<crudOperation :permission="permission" />
|
|
||||||
<!--表单组件-->
|
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0 || crud.status.view" :title="crud.status.title" width="700px">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设备编码" prop="device_code">
|
|
||||||
<el-input v-model.trim="form.device_code" :disabled="crud.status.edit > 0" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设备名称" prop="device_name">
|
|
||||||
<el-input v-model.trim="form.device_name" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设备规格">
|
|
||||||
<el-input v-model.trim="form.device_specification" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设备型号">
|
|
||||||
<el-input v-model.trim="form.device_model" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供应商">
|
|
||||||
<el-input v-model.trim="form.manufacturer" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="外部编码">
|
|
||||||
<el-input v-model.trim="form.extend_code" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="是否启用" prop="is_active">
|
|
||||||
<el-radio v-model="form.is_active" :disabled="crud.status.view > 0" label="0">否</el-radio>
|
|
||||||
<el-radio v-model="form.is_active" :disabled="crud.status.view > 0" label="1">是</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
<el-input v-model.trim="form.remark" type="textarea" style="width: 530px;" :disabled="crud.status.view > 0" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
||||||
<el-button :disabled="crud.status.view > 0" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="device_code" label="设备编码" />
|
|
||||||
<el-table-column prop="device_name" label="设备名称" min-width="120" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="extend_code" label="外部编码" />
|
|
||||||
<el-table-column prop="device_model" label="设备型号" />
|
|
||||||
<el-table-column prop="device_specification" label="设备规格" />
|
|
||||||
<el-table-column prop="is_active" label="是否启用">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-switch
|
|
||||||
v-model="scope.row.is_used"
|
|
||||||
active-color="#409EFF"
|
|
||||||
inactive-color="#F56C6C"
|
|
||||||
active-value="1"
|
|
||||||
inactive-value="0"
|
|
||||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="manufacturer" label="供应商" />
|
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
|
||||||
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<udOperation
|
|
||||||
:data="scope.row"
|
|
||||||
:permission="permission"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import crudDeviceinfo from '@/views/wms/basedata/deviceInfo/deviceinfo'
|
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import udOperation from '@crud/UD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
|
|
||||||
const defaultForm = { device_id: null, device_code: null, device_name: null, device_model: null, device_specification: null, device_attribute_scode: null, is_produceuse: null, manufacturer: null, remark: null, is_active: '1', extend_code: null, workprocedure_id: null, workprocedure_code: null, workprocedure_name: null, create_id: null, create_name: null, create_time: null, is_delete: null, devicebill_id: null, device_capacity_qty: null, honor_time: null }
|
|
||||||
export default {
|
|
||||||
name: 'Deviceinfo',
|
|
||||||
dicts: [],
|
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
||||||
cruds() {
|
|
||||||
return CRUD({ title: '设备信息维护',
|
|
||||||
url: 'api/deviceinfo',
|
|
||||||
idField: 'device_id',
|
|
||||||
sort: 'device_id,desc',
|
|
||||||
crudMethod: { ...crudDeviceinfo },
|
|
||||||
optShow: {
|
|
||||||
add: true,
|
|
||||||
edit: false,
|
|
||||||
del: false,
|
|
||||||
download: false,
|
|
||||||
reset: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
permission: {
|
|
||||||
},
|
|
||||||
workProcedureList: [],
|
|
||||||
rules: {
|
|
||||||
device_name: [
|
|
||||||
{ required: true, message: '设备名称不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
is_used: [
|
|
||||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
device_code: [
|
|
||||||
{ required: true, message: '设备编码不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
hand(value) {
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
changeEnabled(data, val) {
|
|
||||||
let msg = '此操作将停用设备,是否继续!'
|
|
||||||
if (val !== '1') {
|
|
||||||
msg = '此操作将启用设备,是否继续!'
|
|
||||||
}
|
|
||||||
this.$confirm(msg, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
crudDeviceinfo.edit(data).then(res => {
|
|
||||||
this.crud.toQuery()
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
}).catch(() => {
|
|
||||||
data.is_used = !data.is_used
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
::v-deep {
|
|
||||||
|
|
||||||
.vue-treeselect__menu {
|
|
||||||
|
|
||||||
overflow-x: auto !important;
|
|
||||||
|
|
||||||
width: 300px;
|
|
||||||
|
|
||||||
max-height: 300px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__label {
|
|
||||||
|
|
||||||
overflow: unset;
|
|
||||||
|
|
||||||
text-overflow: unset;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__control {
|
|
||||||
|
|
||||||
height: 20px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-item-container,
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
height: 30px;
|
|
||||||
|
|
||||||
line-height: 24px;
|
|
||||||
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__limit-tip,
|
|
||||||
|
|
||||||
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
|
||||||
|
|
||||||
.vue-treeselect__input-container {
|
|
||||||
|
|
||||||
padding-top: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
// margin-bottom: 15px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__input {
|
|
||||||
|
|
||||||
height: 18px !important;
|
|
||||||
|
|
||||||
line-height: 18px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect div,
|
|
||||||
|
|
||||||
.vue-treeselect span {
|
|
||||||
|
|
||||||
box-sizing: content-box;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选中后的溢出隐藏
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-label {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
width: 140px;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__value-container {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
height: 32px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="queryDtl()"
|
@click="queryOrderDtl()"
|
||||||
>
|
>
|
||||||
用料清单物料
|
用料清单物料
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -142,12 +142,11 @@
|
|||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center" />
|
<el-table-column prop="material_code" label="物料编码" width="190" align="center" />
|
||||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150px" show-overflow-tooltip />
|
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150px" show-overflow-tooltip />
|
||||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" width="150px" align="center" />
|
<el-table-column prop="plan_qty" label="数量" width="150" align="center" />
|
||||||
<el-table-column prop="plan_qty" label="出库重量" width="150" align="center" />
|
|
||||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
<el-table-column prop="source_bill_code" label="用料清单号" :min-width="flexWidth('source_bill_code',crud.data,'用料清单号')" />
|
||||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
|
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
|
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
|
||||||
@@ -155,12 +154,14 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
||||||
|
<AddOrderDtl :dialog-show.sync="dtlShow2" :stor-id="storId" @tableChanged="tableChanged" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud, form } from '@crud/crud'
|
import CRUD, { crud, form } from '@crud/crud'
|
||||||
import AddDtl from '@/views/wms/st/outbill/AddDtl'
|
import AddDtl from '@/views/wms/st/outbill/AddDtl'
|
||||||
|
import AddOrderDtl from '@/views/wms/st/outbill/AddOrderDtl'
|
||||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||||
|
|
||||||
@@ -181,7 +182,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: { AddDtl },
|
components: { AddDtl, AddOrderDtl },
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
@@ -194,13 +195,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dtlShow: false,
|
dtlShow: false,
|
||||||
materType: '',
|
dtlShow2: false,
|
||||||
materShow: false,
|
|
||||||
flagnow: false,
|
flagnow: false,
|
||||||
nowrow: {},
|
|
||||||
nowindex: '',
|
|
||||||
storlist: [],
|
storlist: [],
|
||||||
invtypelist: [],
|
|
||||||
storId: null,
|
storId: null,
|
||||||
rules: {
|
rules: {
|
||||||
stor_id: [
|
stor_id: [
|
||||||
@@ -250,6 +247,22 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
queryOrderDtl(index, row) {
|
||||||
|
if (this.form.bill_type === '') {
|
||||||
|
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.form.stor_id === '') {
|
||||||
|
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.form.bill_type !== '1001') {
|
||||||
|
this.crud.notify('请选择用料出库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.storId = this.form.stor_id
|
||||||
|
this.dtlShow2 = true
|
||||||
|
},
|
||||||
queryDtl(index, row) {
|
queryDtl(index, row) {
|
||||||
if (this.form.bill_type === '') {
|
if (this.form.bill_type === '') {
|
||||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
@@ -259,6 +272,10 @@ export default {
|
|||||||
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.form.bill_type !== '1009') {
|
||||||
|
this.crud.notify('请选择手工出库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.storId = this.form.stor_id
|
this.storId = this.form.stor_id
|
||||||
this.dtlShow = true
|
this.dtlShow = true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
<el-table-column prop="qty" label="重量" :formatter="crud.formatNum3" :min-width="flexWidth('qty',crud.data,'重量')" />
|
<el-table-column prop="qty" label="重量" :formatter="crud.formatNum3" :min-width="flexWidth('qty',crud.data,'重量')" />
|
||||||
<el-table-column prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" :min-width="flexWidth('frozen_qty',crud.data,'冻结数量')" />
|
<el-table-column prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" :min-width="flexWidth('frozen_qty',crud.data,'冻结数量')" />
|
||||||
<el-table-column prop="qty_unit_name" label="重量单位" :min-width="flexWidth('qty_unit_name',crud.data,'重量单位')" />
|
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -176,7 +176,7 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
this.rows = this.$refs.table.selection
|
this.rows = this.$refs.table.selection
|
||||||
if (this.rows.length <= 0) {
|
if (this.rows.length <= 0) {
|
||||||
this.$message('请先勾选仓位')
|
this.$message('请先勾选记录')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
|||||||
161
nladmin-ui/src/views/wms/st/outbill/AddOrderDtl.vue
Normal file
161
nladmin-ui/src/views/wms/st/outbill/AddOrderDtl.vue
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="用料清单选择"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
width="1000px"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="仓库">
|
||||||
|
<el-select
|
||||||
|
v-model="query.stor_id"
|
||||||
|
:disabled="true"
|
||||||
|
placeholder="仓库"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 210px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in storlist"
|
||||||
|
:key="item.stor_id"
|
||||||
|
:label="item.stor_name"
|
||||||
|
:value="item.stor_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用料清单">
|
||||||
|
<el-input
|
||||||
|
v-model="query.code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="用料清单模糊查询"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.material_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="物料"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
:data="crud.data"
|
||||||
|
style="width: 100%;"
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="source_form_date" label="日期" :min-width="flexWidth('source_form_date',crud.data,'日期')" />
|
||||||
|
<el-table-column prop="source_bill_code" label="用料清单号" :min-width="flexWidth('source_bill_code',crud.data,'用料清单号')" />
|
||||||
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
|
<el-table-column prop="qty" label="订单数量" :formatter="crud.formatNum3" :min-width="flexWidth('qty',crud.data,'订单数量')" />
|
||||||
|
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||||
|
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AddOrderDtl',
|
||||||
|
components: { rrOperation, pagination },
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '库存物料',
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
reset: true,
|
||||||
|
download: false
|
||||||
|
},
|
||||||
|
url: 'api/checkoutbill/getOrderDtl',
|
||||||
|
idField: 'storagevehicleext_id',
|
||||||
|
sort: 'storagevehicleext_id,desc'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
dicts: [],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
storId: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
storlist: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
sect: {},
|
||||||
|
rows: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.crud.resetQuery(false)
|
||||||
|
crudBsrealstorattr.getStor().then(res => {
|
||||||
|
this.storlist = res
|
||||||
|
})
|
||||||
|
this.query.stor_id = this.storId
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
this.rows = this.$refs.table.selection
|
||||||
|
if (this.rows.length <= 0) {
|
||||||
|
this.$message('请先勾选记录')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
Reference in New Issue
Block a user