优化
This commit is contained in:
@@ -275,6 +275,7 @@ public class DailyplanServiceImpl implements DailyplanService {
|
|||||||
new_jo.put("planstart_time",jo.getString("planstart_date").substring(0,10)+" 08:00:00");
|
new_jo.put("planstart_time",jo.getString("planstart_date").substring(0,10)+" 08:00:00");
|
||||||
new_jo.put("planend_time",jo.getString("planend_date").substring(0,10)+" 23:59:59");
|
new_jo.put("planend_time",jo.getString("planend_date").substring(0,10)+" 23:59:59");
|
||||||
new_jo.put("status","10");
|
new_jo.put("status","10");
|
||||||
|
new_jo.put("create_mode","03");
|
||||||
new_jo.put("source_bill_id",jo.getString("dailyplan_id"));
|
new_jo.put("source_bill_id",jo.getString("dailyplan_id"));
|
||||||
new_jo.put("source_bill_type",jo.getString("workorder_type"));
|
new_jo.put("source_bill_type",jo.getString("workorder_type"));
|
||||||
new_jo.put("source_bill_code",jo.getString("plan_code"));
|
new_jo.put("source_bill_code",jo.getString("plan_code"));
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
|
|||||||
for(int i=0;i<pcsn_num;i++){
|
for(int i=0;i<pcsn_num;i++){
|
||||||
JSONObject jo = this.createPcsn(json);
|
JSONObject jo = this.createPcsn(json);
|
||||||
pcsn = jo.getString("pcsn");
|
pcsn = jo.getString("pcsn");
|
||||||
JSONObject old = mstTab.query("is_delete='0' and status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"'").uniqueResult(0);
|
JSONObject old = mstTab.query("is_delete='0' and material_id='"+material_id+"' and pcsn='"+pcsn+"'").uniqueResult(0);
|
||||||
if(old!=null){
|
if(old!=null){
|
||||||
throw new BadRequestException("已存在相同产品和批次的未完成工令!");
|
throw new BadRequestException("已存在相同产品牌号和批次的工令!");
|
||||||
}
|
}
|
||||||
json.put("pcsn", pcsn);
|
json.put("pcsn", pcsn);
|
||||||
String product_series_id = json.getString("product_series_id");
|
String product_series_id = json.getString("product_series_id");
|
||||||
@@ -146,9 +146,9 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
|
|||||||
String material_id = whereJson.getString("material_id");
|
String material_id = whereJson.getString("material_id");
|
||||||
String pcsn = whereJson.getString("pcsn");
|
String pcsn = whereJson.getString("pcsn");
|
||||||
String workorder_id = whereJson.getString("workorder_id");
|
String workorder_id = whereJson.getString("workorder_id");
|
||||||
JSONObject old = mstTab.query("is_delete='0' and status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"' and workorder_id<>'"+workorder_id+"'").uniqueResult(0);
|
JSONObject old = mstTab.query("is_delete='0' and material_id='"+material_id+"' and pcsn='"+pcsn+"' and workorder_id<>'"+workorder_id+"'").uniqueResult(0);
|
||||||
if(old!=null){
|
if(old!=null){
|
||||||
throw new BadRequestException("已存在相同产品和批次的未完成工令!");
|
throw new BadRequestException("已存在相同产品牌号和批次的工令!");
|
||||||
}
|
}
|
||||||
String product_series_id = whereJson.getString("product_series_id");
|
String product_series_id = whereJson.getString("product_series_id");
|
||||||
if (StrUtil.isEmpty(product_series_id)) {
|
if (StrUtil.isEmpty(product_series_id)) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
输入.device_id TYPEAS s_string
|
输入.device_id TYPEAS s_string
|
||||||
输入.pcsn TYPEAS s_string
|
输入.pcsn TYPEAS s_string
|
||||||
输入.device_code TYPEAS s_string
|
输入.device_code TYPEAS s_string
|
||||||
|
输入.create_mode TYPEAS s_string
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
--这边列出来的临时表就会在运行期动态创建
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
@@ -83,6 +83,9 @@
|
|||||||
OPTION 输入.status <> ""
|
OPTION 输入.status <> ""
|
||||||
WorkOrder.status = 输入.status
|
WorkOrder.status = 输入.status
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.create_mode <> ""
|
||||||
|
WorkOrder.create_mode = 输入.create_mode
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.workorder_type <> ""
|
OPTION 输入.workorder_type <> ""
|
||||||
WorkOrder.workorder_type = 输入.workorder_type
|
WorkOrder.workorder_type = 输入.workorder_type
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -142,6 +145,9 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.pcsn <> ""
|
OPTION 输入.pcsn <> ""
|
||||||
WorkOrder.pcsn like 输入.pcsn
|
WorkOrder.pcsn like 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.create_mode <> ""
|
||||||
|
WorkOrder.create_mode = 输入.create_mode
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.workorder_type <> ""
|
OPTION 输入.workorder_type <> ""
|
||||||
WorkOrder.workorder_type = 输入.workorder_type
|
WorkOrder.workorder_type = 输入.workorder_type
|
||||||
|
|||||||
Binary file not shown.
@@ -137,6 +137,7 @@ const defaultForm = {
|
|||||||
pcsn:'',
|
pcsn:'',
|
||||||
org_id:'',
|
org_id:'',
|
||||||
status: '10',
|
status: '10',
|
||||||
|
create_mode: '01',
|
||||||
product_series_id:'',
|
product_series_id:'',
|
||||||
workorder_qty: '500',
|
workorder_qty: '500',
|
||||||
workorder_type: '01',
|
workorder_type: '01',
|
||||||
|
|||||||
@@ -169,6 +169,22 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="生成方式" prop="create_mode">
|
||||||
|
<el-select
|
||||||
|
v-model="form.create_mode"
|
||||||
|
placeholder=""
|
||||||
|
style="width: 210px"
|
||||||
|
class="filter-item"
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_CREATE_MODE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="出粉率" prop="product_rate">
|
<el-form-item label="出粉率" prop="product_rate">
|
||||||
<label slot="label">出粉率(%):</label>
|
<label slot="label">出粉率(%):</label>
|
||||||
<el-input v-model="form.product_rate" style="width: 210px" disabled />
|
<el-input v-model="form.product_rate" style="width: 210px" disabled />
|
||||||
@@ -246,7 +262,7 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dicts: ['workorder_status', 'workorder_type', 'product_series', 'finish_type'],
|
dicts: ['workorder_status', 'workorder_type', 'product_series', 'finish_type', 'ST_CREATE_MODE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
|||||||
@@ -76,7 +76,23 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="生成方式">
|
||||||
|
<el-select
|
||||||
|
v-model="query.create_mode"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="生成方式"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_CREATE_MODE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="所属组织">
|
<el-form-item label="所属组织">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.org_id"
|
v-model="query.org_id"
|
||||||
@@ -245,6 +261,7 @@
|
|||||||
<el-table-column min-width="100" prop="source_bill_type" :formatter="workorder_typeFormat2" label="源类型" />
|
<el-table-column min-width="100" prop="source_bill_type" :formatter="workorder_typeFormat2" label="源类型" />
|
||||||
<el-table-column prop="source_bill_code" label="来源单据编号" min-width="100" />
|
<el-table-column prop="source_bill_code" label="来源单据编号" min-width="100" />
|
||||||
<el-table-column min-width="90" prop="workprocedure_id" label="当前工序" :formatter="seriesFormat2" />
|
<el-table-column min-width="90" prop="workprocedure_id" label="当前工序" :formatter="seriesFormat2" />
|
||||||
|
<el-table-column :formatter="create_modeFormat" min-width="170" prop="create_mode" label="生成方式" />
|
||||||
<el-table-column prop="startwork_name" min-width="80" label="开工人"/>
|
<el-table-column prop="startwork_name" min-width="80" label="开工人"/>
|
||||||
<el-table-column prop="endwork_name" min-width="80" label="完工人"/>
|
<el-table-column prop="endwork_name" min-width="80" label="完工人"/>
|
||||||
<el-table-column prop="create_name" min-width="80" label="创建人"/>
|
<el-table-column prop="create_name" min-width="80" label="创建人"/>
|
||||||
@@ -292,7 +309,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['workorder_status', 'workorder_type', 'product_series', 'workorder_type2'],
|
dicts: ['workorder_status', 'workorder_type', 'product_series', 'workorder_type2', 'ST_CREATE_MODE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
@@ -392,6 +409,9 @@ export default {
|
|||||||
stateFormat(row) {
|
stateFormat(row) {
|
||||||
return this.dict.label.workorder_status[row.status]
|
return this.dict.label.workorder_status[row.status]
|
||||||
},
|
},
|
||||||
|
create_modeFormat(row) {
|
||||||
|
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||||
|
},
|
||||||
bill_typeFormat(row) {
|
bill_typeFormat(row) {
|
||||||
return this.dict.label.workorder_type[row.workorder_type]
|
return this.dict.label.workorder_type[row.workorder_type]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -75,6 +75,23 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="生成方式">
|
||||||
|
<el-select
|
||||||
|
v-model="query.create_mode"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="生成方式"
|
||||||
|
class="filter-item"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_CREATE_MODE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="批次">
|
<el-form-item label="批次">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.pcsn"
|
v-model="query.pcsn"
|
||||||
@@ -136,6 +153,7 @@
|
|||||||
<el-table-column prop="pcsn" min-width="130" label="批次"/>
|
<el-table-column prop="pcsn" min-width="130" label="批次"/>
|
||||||
<el-table-column prop="workorder_qty" min-width="100" label="重量" :formatter="crud.formatNum3"/>
|
<el-table-column prop="workorder_qty" min-width="100" label="重量" :formatter="crud.formatNum3"/>
|
||||||
<el-table-column prop="bill_qty" min-width="100" label="开单总重量" :formatter="crud.formatNum3" />
|
<el-table-column prop="bill_qty" min-width="100" label="开单总重量" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column :formatter="create_modeFormat" min-width="170" prop="create_mode" label="生成方式" />
|
||||||
<el-table-column prop="qty_unit_name" min-width="100" label="单位"/>
|
<el-table-column prop="qty_unit_name" min-width="100" label="单位"/>
|
||||||
<el-table-column prop="formula_time" min-width="150" label="开单时间"/>
|
<el-table-column prop="formula_time" min-width="150" label="开单时间"/>
|
||||||
<el-table-column prop="formula_name" min-width="150" label="开单人"/>
|
<el-table-column prop="formula_name" min-width="150" label="开单人"/>
|
||||||
@@ -176,7 +194,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['workorder_status', 'workorder_type', 'product_series'],
|
dicts: ['workorder_status', 'workorder_type', 'product_series', 'ST_CREATE_MODE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
@@ -279,6 +297,9 @@ export default {
|
|||||||
this.changeShow = true
|
this.changeShow = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
create_modeFormat(row) {
|
||||||
|
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||||
|
},
|
||||||
autoAll(){
|
autoAll(){
|
||||||
this.checkrows = this.$refs.table.selection
|
this.checkrows = this.$refs.table.selection
|
||||||
autoformula.autoAll({rows:this.checkrows}).then(res => {
|
autoformula.autoAll({rows:this.checkrows}).then(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user