生产设备修改
This commit is contained in:
@@ -41,6 +41,7 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
param.put("flag", "1");
|
param.put("flag", "1");
|
||||||
param.put("search", whereJson.get("search"));
|
param.put("search", whereJson.get("search"));
|
||||||
param.put("workprocedure_id", whereJson.get("workprocedure_id"));
|
param.put("workprocedure_id", whereJson.get("workprocedure_id"));
|
||||||
|
param.put("product_area", whereJson.get("product_area"));
|
||||||
JSONObject jsonObject = WQL.getWO("QUERY_DEVICE").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "device_code asc");
|
JSONObject jsonObject = WQL.getWO("QUERY_DEVICE").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "device_code asc");
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
@@ -120,8 +121,7 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONArray getWorkprocedure() {
|
public JSONArray getWorkprocedure() {
|
||||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
||||||
final JSONArray resultJSONArray = wo.query("is_used = '0'").getResultJSONArray(0);
|
return wo.query("is_used = '1'").getResultJSONArray(0);
|
||||||
return resultJSONArray;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.search TYPEAS s_string
|
输入.search TYPEAS s_string
|
||||||
输入.workprocedure_id TYPEAS s_string
|
输入.workprocedure_id TYPEAS s_string
|
||||||
|
输入.product_area TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -54,6 +55,9 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.workprocedure_id <> ""
|
OPTION 输入.workprocedure_id <> ""
|
||||||
(device.workprocedure_id = 输入.workprocedure_id)
|
(device.workprocedure_id = 输入.workprocedure_id)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
device.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
|
|||||||
@@ -3,26 +3,51 @@
|
|||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
<!-- 搜索 -->
|
<el-form
|
||||||
<label class="el-form-item-label">模糊搜索</label>
|
:inline="true"
|
||||||
<el-input
|
class="demo-form-inline"
|
||||||
v-model="query.search"
|
label-position="right"
|
||||||
clearable
|
label-width="90px"
|
||||||
size="small"
|
label-suffix=":"
|
||||||
placeholder="请输入设备编码或名称"
|
>
|
||||||
style="width: 220px;"
|
<el-form-item label="生产区域">
|
||||||
class="filter-item"
|
<el-select
|
||||||
/>
|
v-model="query.product_area"
|
||||||
<label class="el-form-item-label">所属工序</label>
|
clearable
|
||||||
<el-select v-model="query.workprocedure_id" filterable clearable size="small" placeholder="所属工序" class="filter-item" style="width: 220px" @change="changeHeader(query.search, query.workprocedure_id)">
|
filterable
|
||||||
<el-option
|
size="mini"
|
||||||
v-for="item in workList"
|
placeholder="区域类型"
|
||||||
:key="item.workprocedure_id"
|
class="filter-item"
|
||||||
:label="item.workprocedure_name"
|
@change="crud.toQuery()"
|
||||||
:value="item.workprocedure_id"
|
>
|
||||||
/>
|
<el-option
|
||||||
</el-select>
|
v-for="item in dict.product_area"
|
||||||
<rrOperation :crud="crud" />
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模糊搜索">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入设备编码或名称"
|
||||||
|
class="filter-item"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属工序">
|
||||||
|
<el-select v-model="query.workprocedure_id" filterable clearable size="small" placeholder="所属工序" class="filter-item" style="width: 220px" @change="changeHeader(query.search, query.workprocedure_id)">
|
||||||
|
<el-option
|
||||||
|
v-for="item in workList"
|
||||||
|
:key="item.workprocedure_id"
|
||||||
|
:label="item.workprocedure_name"
|
||||||
|
:value="item.workprocedure_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation :crud="crud" />
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission">
|
||||||
@@ -196,9 +221,16 @@ export default {
|
|||||||
name: 'Device',
|
name: 'Device',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, DeviceItemDialog, CopyDialog, DeviceInfoDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, DeviceItemDialog, CopyDialog, DeviceInfoDialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
dicts: ['is_used', 'IS_OR_NOT'],
|
dicts: ['is_used', 'IS_OR_NOT', 'product_area'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '生产设备', url: 'api/device', idField: 'device_code', sort: 'device_code,desc',
|
return CRUD({
|
||||||
|
title: '生产设备',
|
||||||
|
url: 'api/device',
|
||||||
|
idField: 'device_code',
|
||||||
|
sort: 'device_code,desc',
|
||||||
|
query: {
|
||||||
|
product_area: 'A1'
|
||||||
|
},
|
||||||
optShow: {
|
optShow: {
|
||||||
add: true,
|
add: true,
|
||||||
edit: false,
|
edit: false,
|
||||||
@@ -206,7 +238,8 @@ export default {
|
|||||||
reset: true,
|
reset: true,
|
||||||
download: false
|
download: false
|
||||||
},
|
},
|
||||||
crudMethod: { ...crudDevice }})
|
crudMethod: { ...crudDevice }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -296,6 +329,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getWorkprocedure() { // 获取工序下拉框
|
getWorkprocedure() { // 获取工序下拉框
|
||||||
crudDevice.getWorkprocedure().then(res => {
|
crudDevice.getWorkprocedure().then(res => {
|
||||||
|
console.log(res)
|
||||||
this.workList = res
|
this.workList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user