rev:优化BUG
This commit is contained in:
Binary file not shown.
@@ -103,9 +103,11 @@ public class SemirealrawmaterialServiceImpl implements SemirealrawmaterialServic
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
String relation_id = param.getString("relation_id");
|
||||
String raw_material_id = param.getString("raw_material_id");
|
||||
String raw_material_id = param.getString("material_id");
|
||||
String rate_qty = param.getString("rate_qty");
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("raw_material_id", raw_material_id);
|
||||
map.put("rate_qty", rate_qty);
|
||||
map.put("update_optid", currentUserId);
|
||||
map.put("update_optname", nickName);
|
||||
map.put("update_time", DateUtil.now());
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
class.class_name,
|
||||
po.total_qty - po.instor_qty AS need_qty
|
||||
po.qty - po.instor_qty AS need_qty
|
||||
FROM
|
||||
pcs_if_purchaseorder po
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = po.material_id
|
||||
@@ -28,38 +28,40 @@
|
||||
and (mb.material_code = #{query.material_search} OR mb.material_name = #{query.material_search})
|
||||
</if>
|
||||
</where>
|
||||
order by po.id desc
|
||||
</select>
|
||||
|
||||
<select id="queryAll" resultType="java.util.Map">
|
||||
SELECT
|
||||
po.*,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
class.class_name
|
||||
FROM
|
||||
pcs_if_purchaseorder po
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = po.material_id
|
||||
LEFT JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
|
||||
<where>
|
||||
po.is_delete = '0'
|
||||
<if test="query.status == '0'.toString()">
|
||||
and po.status = '10'
|
||||
</if>
|
||||
<if test="query.status == '1'.toString()">
|
||||
and po.status > '10'
|
||||
</if>
|
||||
<if test="query.start_time != null">
|
||||
and po.ask_time >= #{query.start_time}
|
||||
</if>
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= po.ask_time
|
||||
</if>
|
||||
<if test="query.bill_code != null and query.bill_code != ''">
|
||||
and mst.bill_code = #{query.bill_code}
|
||||
</if>
|
||||
<if test="query.material_search != null and query.material_search != ''">
|
||||
and (mb.material_code = #{query.material_search} OR mb.material_name = #{query.material_search})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
SELECT
|
||||
po.*,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
class.class_name
|
||||
FROM
|
||||
pcs_if_purchaseorder po
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = po.material_id
|
||||
LEFT JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
|
||||
<where>
|
||||
po.is_delete = '0'
|
||||
<if test="query.status == '0'.toString()">
|
||||
and po.status = '10'
|
||||
</if>
|
||||
<if test="query.status == '1'.toString()">
|
||||
and po.status > '10'
|
||||
</if>
|
||||
<if test="query.start_time != null">
|
||||
and po.ask_time >= #{query.start_time}
|
||||
</if>
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= po.ask_time
|
||||
</if>
|
||||
<if test="query.bill_code != null and query.bill_code != ''">
|
||||
and mst.bill_code = #{query.bill_code}
|
||||
</if>
|
||||
<if test="query.material_search != null and query.material_search != ''">
|
||||
and (mb.material_code = #{query.material_search} OR mb.material_name = #{query.material_search})
|
||||
</if>
|
||||
</where>
|
||||
order by po.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -59,6 +59,11 @@ public class PdmBiDevice implements Serializable {
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 物料系列
|
||||
*/
|
||||
private String product_series;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
<if test="query.workprocedure_code != null and query.workprocedure_code != ''">
|
||||
and pro.workprocedure_code = #{query.workprocedure_code}
|
||||
</if>
|
||||
<if test="query.workprocedure_codes != null and query.workprocedure_codes != ''">
|
||||
and pro.workprocedure_code IN #{query.workprocedure_codes}
|
||||
</if>
|
||||
<if test="query.product_area != null and query.product_area != ''">
|
||||
and ShiftOrder.product_area = #{query.product_area}
|
||||
</if>
|
||||
|
||||
@@ -22,6 +22,7 @@ public class WorkorderQuery extends BaseQuery<PdmProduceWorkorder> {
|
||||
private String material;
|
||||
private String order_status;
|
||||
private String workprocedure_code;
|
||||
private String workprocedure_codes;
|
||||
private String sale_id;
|
||||
private String shift_type_scode;
|
||||
private String product_series;
|
||||
|
||||
@@ -23,11 +23,11 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_xc}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:zjhl_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_xc}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:zjhl_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:Root.123456}
|
||||
# password: ${DB_PWD:root}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:root}
|
||||
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
|
||||
@@ -2,39 +2,41 @@
|
||||
<div v-loading.fullscreen.lock="fullscreenLoading" class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<span style="line-height:36px;text-align: center">物料类别:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadChildNodes"
|
||||
:options="classes1"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
模糊查询:
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
placeholder="输入物料编码或名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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="物料类别"">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadChildNodes"
|
||||
:options="classes1"
|
||||
offsetHeight = "30px;"
|
||||
style="width: 200px; height: 30px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
placeholder="输入物料编码或名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
@@ -60,19 +62,19 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 200px;" />
|
||||
<el-input v-model="form.material_code" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" style="width: 200px;" />
|
||||
<el-input v-model="form.material_name" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="规格" prop="material_spec">
|
||||
<label slot="label">规 格</label>
|
||||
<el-input v-model="form.material_spec" style="width: 200px;" />
|
||||
<el-input v-model="form.material_spec" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -80,12 +82,12 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="型号" prop="material_model">
|
||||
<label slot="label">型 号</label>
|
||||
<el-input v-model="form.material_model" style="width: 200px;" />
|
||||
<el-input v-model="form.material_model" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="外部标识" prop="ext_id">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
<el-input v-model="form.ext_id" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -135,13 +137,13 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
||||
<el-table-column prop="material_model" label="物料型号" />
|
||||
<el-table-column prop="class_name" label="物料分类" width="140" />
|
||||
<el-table-column prop="unit_name" label="计量单位" />
|
||||
<el-table-column prop="product_series_name" label="系列" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="160"/>
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_spec" label="物料规格" width="140"/>
|
||||
<el-table-column prop="material_model" label="物料型号"/>
|
||||
<el-table-column prop="class_name" label="物料分类" width="140"/>
|
||||
<el-table-column prop="unit_name" label="计量单位"/>
|
||||
<el-table-column prop="product_series_name" label="系列"/>
|
||||
<el-table-column label="启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -154,8 +156,9 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column prop="update_optname" label="修改人"/>
|
||||
<el-table-column prop="update_time" label="修改时间"
|
||||
:min-width="flexWidth('update_time',crud.data,'修改时间')"/>
|
||||
<el-table-column
|
||||
v-permission="['admin','Materialbase:edit','Materialbase:del']"
|
||||
fixed="right"
|
||||
@@ -172,7 +175,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
<Dialog :dialog-show.sync="dialogShow"/>
|
||||
</div>
|
||||
@@ -180,13 +183,13 @@
|
||||
|
||||
<script>
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import CRUD, {crud, form, header, presenter} 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'
|
||||
import Dialog from '@/views/wms/masterdata_manage/master/material/Dialog'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudMdPbMeasureunit from '@/api/wms/basedata/master/mdPbMeasureunit'
|
||||
@@ -229,16 +232,16 @@ export default {
|
||||
name: 'Materialbase',
|
||||
// 数据字典
|
||||
dicts: ['is_used'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect, Dialog },
|
||||
components: {pagination, crudOperation, rrOperation, udOperation, Treeselect, Dialog},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '物料',
|
||||
optShow: { add: true, reset: true },
|
||||
optShow: {add: true, reset: true},
|
||||
url: 'api/Materialbase',
|
||||
idField: 'material_id',
|
||||
sort: 'material_id,desc',
|
||||
crudMethod: { ...crudMaterialbase }
|
||||
crudMethod: {...crudMaterialbase}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
@@ -253,28 +256,28 @@ export default {
|
||||
permission: {},
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'blur' }
|
||||
{required: true, message: '物料编码不能为空', trigger: 'blur'}
|
||||
],
|
||||
material_name: [
|
||||
{ required: true, message: '物料名称不能为空', trigger: 'blur' }
|
||||
{required: true, message: '物料名称不能为空', trigger: 'blur'}
|
||||
],
|
||||
material_type_id: [
|
||||
{ required: true, message: '物料分类不能为空', trigger: 'blur' }
|
||||
{required: true, message: '物料分类不能为空', trigger: 'blur'}
|
||||
],
|
||||
create_id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
create_time: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
{required: true, message: '是否启用不能为空', trigger: 'blur'}
|
||||
],
|
||||
material_height_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -404,10 +407,10 @@ export default {
|
||||
})
|
||||
},
|
||||
// 获取子节点数据
|
||||
loadChildNodes({ action, parentNode, callback }) {
|
||||
loadChildNodes({action, parentNode, callback}) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
crudClassstandard.getClass({pid: parentNode.id}).then(res => {
|
||||
parentNode.children = res.content.map(function (obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
@@ -423,6 +426,17 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.treeselect-main {
|
||||
width: 204px;
|
||||
line-height: 28px;
|
||||
.vue-treeselect__placeholder {
|
||||
line-height: 28px;
|
||||
}
|
||||
.vue-treeselect__control {
|
||||
height: 28px !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
@@ -49,29 +49,29 @@
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55"/>
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i/></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="material_code" label="原材料编码" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="原材料名称" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="原材料规格" show-overflow-tooltip />
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="class_code" label="分类编码" />
|
||||
<el-table-column prop="class_name" label="物料分类" />
|
||||
<el-table-column prop="material_code" label="原材料编码" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="原材料名称" min-width="200" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_spec" label="原材料规格" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_model" label="型号"/>
|
||||
<el-table-column prop="class_code" label="分类编码"/>
|
||||
<el-table-column prop="class_name" label="物料分类"/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
min-width="100"
|
||||
prop="product_series_name"
|
||||
label="系列"
|
||||
/>
|
||||
<el-table-column prop="unit_name" label="计量单位" />
|
||||
<el-table-column prop="unit_name" label="计量单位"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
@@ -82,19 +82,28 @@
|
||||
<script>
|
||||
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import CRUD, {header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudSemirealrawmaterial from '@/api/wms/basedata/master/semirealrawmaterial'
|
||||
|
||||
export default {
|
||||
name: 'SelectRawMaterialDialog',
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
components: {rrOperation, pagination, Treeselect},
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/Materialbase', crudMethod: { ...crudMaterialbase }, optShow: {}})
|
||||
return CRUD({
|
||||
title: '物料',
|
||||
url: 'api/Materialbase',
|
||||
query: {
|
||||
class_idStr: '1503644349995552768',
|
||||
material_type_id: '1503644349995552768'
|
||||
},
|
||||
crudMethod: { ...crudMaterialbase },
|
||||
optShow: {}}
|
||||
)
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['product_series'],
|
||||
@@ -183,23 +192,13 @@ export default {
|
||||
this.$emit('tableChanged3', this.tableRadio)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
crudSemirealrawmaterial.updateRawmaterial({ relation_id: this.relation_id, raw_material_id: this.tableRadio.material_id }).then(res => {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged3', this.tableRadio)
|
||||
})
|
||||
} else {
|
||||
crudSemirealrawmaterial.updateRawmaterial({ relation_id: this.relation_id, raw_material_id: '' }).then(res => {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged3', this.tableRadio)
|
||||
})
|
||||
}
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged3', this.tableRadio)
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
loadClass({action, parentNode, callback}) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
crudClassstandard.getClass({pid: parentNode.id}).then(res => {
|
||||
parentNode.children = res.content.map(function (obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
|
||||
@@ -3,11 +3,45 @@
|
||||
<!-- 半成品列表-->
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">模糊搜索</label>
|
||||
<el-input v-model="query.search" clearable size="small" placeholder="输入编码或者名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation />
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">模糊搜索</label>
|
||||
<el-input v-model="query.search" clearable size="small" placeholder="输入编码或者名称" style="width: 200px;"
|
||||
class="filter-item" @keyup.enter.native="crud.toQuery"/>
|
||||
<rrOperation/>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="selectRawMaterialDialog2"
|
||||
title="扩展属性维护"
|
||||
width="1000px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_code">
|
||||
<el-input
|
||||
v-model="form.material_code"
|
||||
style="width: 280px;"
|
||||
clearable
|
||||
placeholder="点击进行选择物料"
|
||||
@focus="selectRawMaterialDialog = true"
|
||||
@clear="form.material_id =''"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所需原料(g)" prop="rate_qty">
|
||||
<el-input-number v-model.number="form.rate_qty" style="width: 280px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="selectRawMaterialDialog2 = false">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="submit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -20,42 +54,55 @@
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="material_code" label="半成品编码" :min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="半成品名称" :min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="半成品规格" :min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="class_name" label="半成品系列" :min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="ymaterial_code" label="对应原材料编码" :min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="ymaterial_name" label="对应原材料名称" :min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="ymaterial_spec" label="对应原材料规格" :min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="yclass_name" label="对应原材料系列" :min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="半成品编码" :min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="半成品名称" :min-width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_spec" label="半成品规格" :min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="class_name" label="半成品系列" :min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column prop="ymaterial_code" label="对应原材料编码" :min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="ymaterial_name" label="对应原材料名称" :min-width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="ymaterial_spec" label="对应原材料规格" :min-width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="yclass_name" label="对应原材料系列" :min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="rate_qty" label="所需原料(g)" :min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addMaterial(scope.row)">添加原材料</el-button>
|
||||
<el-button type="text" size="small" @click="addMaterial(scope.row)">扩展属性维护</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<SelectRawMaterialDialog ref="selectRawMaterialDialog" :dialog-show.sync="selectRawMaterialDialog" @tableChanged3="tableChanged3"/>
|
||||
<pagination/>
|
||||
<SelectRawMaterialDialog ref="selectRawMaterialDialog" :dialog-show.sync="selectRawMaterialDialog"
|
||||
@tableChanged3="tableChanged3"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudSemirealrawmaterial from '@/api/wms/basedata/master/semirealrawmaterial'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import SelectRawMaterialDialog from './SelectRawMaterialDialog'
|
||||
|
||||
const defaultForm = { relation_id: null, semi_material_id: null, raw_material_id: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
const defaultForm = {
|
||||
relation_id: null,
|
||||
semi_material_id: null,
|
||||
raw_material_id: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Semirealrawmaterial',
|
||||
components: { pagination, crudOperation, rrOperation, SelectRawMaterialDialog },
|
||||
components: {pagination, crudOperation, rrOperation, SelectRawMaterialDialog},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '半成品对应原材料', url: 'api/semirealrawmaterial', idField: 'relation_id', sort: 'relation_id,desc',
|
||||
return CRUD({
|
||||
title: '半成品对应原材料', url: 'api/semirealrawmaterial', idField: 'relation_id', sort: 'relation_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
@@ -63,28 +110,52 @@ export default {
|
||||
download: false,
|
||||
reset: false
|
||||
},
|
||||
crudMethod: { ...crudSemirealrawmaterial }})
|
||||
crudMethod: {...crudSemirealrawmaterial}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectRawMaterialDialog: false,
|
||||
permission: {
|
||||
selectRawMaterialDialog2: false,
|
||||
form: {
|
||||
material_code: '',
|
||||
material_id: '',
|
||||
relation_id: '',
|
||||
rate_qty: ''
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
permission: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addMaterial(row) {
|
||||
this.$refs.selectRawMaterialDialog.setForm(row.relation_id)
|
||||
this.selectRawMaterialDialog = true
|
||||
this.$refs.selectRawMaterialDialog.crud.toQuery()
|
||||
this.form.relation_id = row.relation_id
|
||||
this.selectRawMaterialDialog2 = true
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
tableChanged3() {
|
||||
tableChanged3(row) {
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
},
|
||||
submit() {
|
||||
if (this.form.relation_id === '') {
|
||||
this.crud.notify('请选择一条要设置的半成品', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.material_id === '') {
|
||||
this.crud.notify('请设置物料', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.rate_qty === '') {
|
||||
this.crud.notify('请设置重量比例', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudSemirealrawmaterial.updateRawmaterial(this.form).then(res => {
|
||||
this.selectRawMaterialDialog2 = false
|
||||
})
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,6 +201,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import crudSemirealrawmaterial from "@/api/wms/basedata/master/semirealrawmaterial";
|
||||
|
||||
const defaultForm = {
|
||||
inspection_item_id: null,
|
||||
|
||||
@@ -121,6 +121,17 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品系列">
|
||||
<treeselect
|
||||
v-model="form.product_series"
|
||||
:options="classes3"
|
||||
:multiple="true"
|
||||
:auto-load-root-options="false"
|
||||
:load-options="loadChildNodes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产物料规格">
|
||||
<el-input v-model="form.spec" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
@@ -212,6 +223,9 @@ import pagination from '@crud/Pagination'
|
||||
import DeviceItemDialog from '@/views/wms/pdm/device/DeviceItemDialog'
|
||||
import DeviceInfoDialog from '@/views/wms/pdm/device/DeviceInfoDialog'
|
||||
import CopyDialog from '@/views/wms/pdm/device/CopyDialog'
|
||||
import crudClassstandard from "@/api/wms/basedata/master/classstandard"
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||
|
||||
const defaultForm = {
|
||||
device_code: null,
|
||||
@@ -219,6 +233,7 @@ const defaultForm = {
|
||||
product_area: 'A1',
|
||||
workprocedure_id: null,
|
||||
ext_code: null,
|
||||
product_series: null,
|
||||
material_id: null,
|
||||
workorder_code: null,
|
||||
device_code2: null,
|
||||
@@ -241,7 +256,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Device',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DeviceItemDialog, CopyDialog, DeviceInfoDialog },
|
||||
components: {Treeselect, pagination, crudOperation, rrOperation, udOperation, DeviceItemDialog, CopyDialog, DeviceInfoDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['is_used', 'IS_OR_NOT', 'product_area'],
|
||||
cruds() {
|
||||
@@ -268,7 +283,7 @@ export default {
|
||||
permission: {
|
||||
},
|
||||
trueorfalse: [ { value: true, label: '是' }, { value: false, label: '否' }],
|
||||
|
||||
classes3: [],
|
||||
workList: [],
|
||||
tableLabel: [],
|
||||
rules: {
|
||||
@@ -310,6 +325,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getWorkprocedure()
|
||||
this.initClass3()
|
||||
},
|
||||
methods: {
|
||||
changeHeader(search, workprocedure_id) {
|
||||
@@ -323,6 +339,26 @@ export default {
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
initClass3() {
|
||||
const param = {
|
||||
parent_class_code: '07'
|
||||
}
|
||||
crudClassstandard.getClassType(param).then(res => {
|
||||
const data = res.content
|
||||
this.buildTree(data)
|
||||
this.classes3 = data
|
||||
})
|
||||
},
|
||||
buildTree(classes) {
|
||||
classes.forEach(data => {
|
||||
if (data.children) {
|
||||
this.buildTree(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
data.children = null // 重点代码
|
||||
}
|
||||
})
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.device_code + ', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -372,6 +408,22 @@ export default {
|
||||
const d = JSON.parse(JSON.stringify(data))
|
||||
this.$refs.copyChiled.setForm(d)
|
||||
},
|
||||
// 获取子节点数据
|
||||
loadChildNodes({action, parentNode, callback}) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({pid: parentNode.id}).then(res => {
|
||||
parentNode.children = res.content.map(function (obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="class_name" label="物料类别" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="total_qty" label="重量" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="qty" label="重量" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="need_qty" label="待入重量" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
||||
</el-table>
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
||||
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductOut/AddDtl'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import crudProductOut from '@/views/wms/storage_manage/rawproduct/rawProductOut/rawproductout'
|
||||
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
||||
|
||||
@@ -59,15 +59,12 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_order_name" label="日期"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="customer_name" label="单据号"/>
|
||||
<el-table-column width="200" prop="customer_description" label="供应商"/>
|
||||
<el-table-column show-overflow-tooltip prop="package_box_sn" width="250" label="物料编号"/>
|
||||
<el-table-column show-overflow-tooltip width="100" prop="quanlity_in_box" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="container_name" label="物料类别"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sap_pcsn" label="批次"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_name" label="重量"/>
|
||||
<el-table-column show-overflow-tooltip width="170" prop="product_description" label="待入重量"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="planproducestart_date" label="日期"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="workorder_code" label="单据号"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号"/>
|
||||
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="pcsn" label="批次"/>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="plan_qty" label="重量"/>
|
||||
<el-table-column show-overflow-tooltip prop="width" label="重量单位"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -97,7 +94,7 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '用户',
|
||||
url: '/api/in/rawAssist/getBillDtl',
|
||||
url: '/api/produceWorkorder',
|
||||
crudMethod: {},
|
||||
optShow: {
|
||||
reset: true
|
||||
@@ -130,7 +127,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.bill_type = '0001'
|
||||
return true
|
||||
},
|
||||
objectSpanMethod({row, column, rowIndex, columnIndex}) {
|
||||
@@ -155,13 +151,9 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
crudProductIn.queryBoxMater(this.rows).then(res => {
|
||||
this.rows = res
|
||||
this.$emit('tableChanged', this.rows)
|
||||
})
|
||||
this.$emit('tableChanged', this.rows)
|
||||
// this.form = this.$options.data().form
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user