代码更新
This commit is contained in:
@@ -74,4 +74,12 @@ public class RawfoilworkorderController {
|
|||||||
rawfoilworkorderService.compelEnd(whereJson);
|
rawfoilworkorderService.compelEnd(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log("称重")
|
||||||
|
@ApiOperation("称重")
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||||
|
rawfoilworkorderService.confirm(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,4 +78,11 @@ public interface RawfoilworkorderService {
|
|||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
*/
|
*/
|
||||||
void compelEnd(JSONObject whereJson);
|
void compelEnd(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 称重
|
||||||
|
*
|
||||||
|
* @param whereJson /
|
||||||
|
*/
|
||||||
|
void confirm(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,4 +208,19 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
|
|||||||
tab.update(json);
|
tab.update(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void confirm(JSONObject whereJson) {
|
||||||
|
WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
|
||||||
|
String productin_qty = whereJson.getString("productin_qty");
|
||||||
|
|
||||||
|
JSONObject jsonRaw = tab.query("workorder_id = '" + whereJson.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(productin_qty)) {
|
||||||
|
jsonRaw.put("productin_qty",0);
|
||||||
|
} else {
|
||||||
|
jsonRaw.put("productin_qty",whereJson.getDoubleValue("productin_qty"));
|
||||||
|
}
|
||||||
|
tab.update(jsonRaw);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="称重"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:before-close="handleClose"
|
||||||
|
width="500px"
|
||||||
|
destroy-on-close
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
|
||||||
|
<el-form-item label="重量" prop="productin_qty">
|
||||||
|
<el-input-number v-model="form1.productin_qty" :min="0" :controls="false" :precision="3" style="width: 250px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="close">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import crudRawfoilworkorder from '@/views/wms/pdm/order/rawfoilworkorder/rawfoilworkorder'
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
export default {
|
||||||
|
name: 'SunShowDialog',
|
||||||
|
mixins: [crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.form1 = this.openParam
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form1: {},
|
||||||
|
dialogVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.form1 = {}
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
crudRawfoilworkorder.confirm(this.form1).then(res => {
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.close()
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -95,6 +95,17 @@
|
|||||||
>
|
>
|
||||||
强制结束
|
强制结束
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
:disabled="crud.selections.length !== 1"
|
||||||
|
@click="weigh"
|
||||||
|
>
|
||||||
|
称重
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -236,11 +247,13 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<Dialog :dialog-show.sync="dialogShow" :open-param="openParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudRawfoilworkorder from '@/views/wms/pdm/order/rawfoilworkorder/rawfoilworkorder'
|
import crudRawfoilworkorder from '@/views/wms/pdm/order/rawfoilworkorder/rawfoilworkorder'
|
||||||
|
import Dialog from '@/views/wms/pdm/order/rawfoilworkorder/Dialog'
|
||||||
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 rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -276,7 +289,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'Rawfoilworkorder',
|
name: 'Rawfoilworkorder',
|
||||||
dicts: ['product_area', 'product_status'],
|
dicts: ['product_area', 'product_status'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation, Dialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -296,6 +309,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
openParam: null,
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
container_name: [
|
container_name: [
|
||||||
@@ -346,6 +361,11 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
weigh() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
this.openParam = _selectData[0]
|
||||||
|
this.dialogShow = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,4 +32,12 @@ export function compelEnd(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, compelEnd }
|
export function confirm(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/rawfoilworkorder/confirm',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, compelEnd, confirm }
|
||||||
|
|||||||
Reference in New Issue
Block a user