add:统计分析

This commit is contained in:
zhangzhiqiang
2023-10-07 09:58:37 +08:00
parent acd4fe5a48
commit d20e5f8282
4 changed files with 29 additions and 32 deletions

View File

@@ -40,8 +40,8 @@ public class StIvtStructivtDailyController {
@PostMapping("/sync")
@Log("同步日库区")
@SaIgnore
public ResponseEntity<Object> sync(@RequestBody String[] structivts){
stIvtStructivtDailyService.dailyStructivt(structivts);
public ResponseEntity<Object> sync(@RequestBody String[] ids){
stIvtStructivtDailyService.dailyStructivt(ids);
return new ResponseEntity<>(HttpStatus.OK);
}

View File

@@ -19,7 +19,7 @@ export function sync(param) {
return request({
url: 'api/structivtDaily/sync',
method: 'post',
param
data: param
})
}
@@ -30,4 +30,4 @@ export function edit(data) {
data
})
}
export default { add, edit, del,sync }
export default { add, edit, del, sync }

View File

@@ -39,22 +39,21 @@
type="warning"
icon="el-icon-check"
size="mini"
:disabled="confirm_flag"
@click="sync"
>
同步
</el-button>
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="warning"-->
<!-- icon="el-icon-check"-->
<!-- size="mini"-->
<!-- :disabled="confirm_flag"-->
<!-- @click="sync"-->
<!-- >-->
<!-- 导出-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="warning"-->
<!-- icon="el-icon-check"-->
<!-- size="mini"-->
<!-- :disabled="confirm_flag"-->
<!-- @click="sync"-->
<!-- >-->
<!-- 导出-->
<!-- </el-button>-->
</crudOperation>
<!--表格渲染-->
<el-table
@@ -78,8 +77,8 @@
<el-table-column prop="ivt_qty" label="库存总数" width="150" />
<el-table-column prop="frozen_qty" label="冻结总数" width="150" />
<el-table-column prop="warehousing_qty" label="待入总数" width="150" />
<el-table-column prop="qty_unit_id" label="单位" width="150" :formatter="formatUnit"/>
<el-table-column prop="create_time" label="统计日期" width="150" fixed="right" align="center"></el-table-column>
<el-table-column prop="qty_unit_id" label="单位" width="150" :formatter="formatUnit" />
<el-table-column prop="create_time" label="统计日期" width="150" fixed="right" align="center" />
</el-table>
<!--分页组件-->
<pagination />
@@ -97,7 +96,6 @@ import rrOperation from '@crud/RR.operation'
import crudMdPbMeasureunit from '@/api/wms/basedata/master/mdPbMeasureunit'
import { downloadFile } from '@/utils'
const defaultForm = {
struct_id: null,
cascader: null,
@@ -173,7 +171,7 @@ export default {
}
}
return {
measure_unit:[],
measure_unit: [],
sects: [],
downloadLoading: false,
permission: {
@@ -181,7 +179,7 @@ export default {
edit: ['admin', 'dept:edit'],
del: ['admin', 'dept:del']
},
trueorfalse: [ { value: true, label: '是' }, { value: false, label: '否' }]
trueorfalse: [{ value: true, label: '是' }, { value: false, label: '否' }]
}
},
created() {
@@ -193,8 +191,8 @@ export default {
})
},
methods: {
sync(){
dailyStructivt.sync({'structivts':'st_ivt_structivt_bcp'}).then(result => {
sync() {
dailyStructivt.sync(Array.of('st_ivt_structivt_bcp', 'st_ivt_structivt_cp', 'st_ivt_structivt_yl')).then(result => {
this.crud.notify('同步成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => { })
},
@@ -234,7 +232,7 @@ export default {
this.query.sect_id = val[1]
}
this.crud.toQuery()
},
}
}
}
</script>

View File

@@ -144,7 +144,7 @@
import CRUD, { form, crud } from '@crud/crud'
import crudProductRoute from '@/api/productprocessroute'
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'
@@ -161,7 +161,7 @@ const defaultForm = {
export default {
name: 'AddDialog',
dicts: ['product_area'],
components: {Treeselect },
components: { Treeselect },
mixins: [form(defaultForm), crud()],
props: {
dialogShow: {
@@ -307,7 +307,6 @@ export default {
this.deviceList.forEach(row => {
res.check_list.forEach(selected => {
if (selected.device_code === row.device_code) {
this.$refs.multipleTable.toggleRowSelection(row, true)
}
})
@@ -317,7 +316,7 @@ export default {
}
},
getRoute() {
// 查询原料库的仓库
// 查询原料库的仓库
crudProductRoute.getRoute({}).then(res => {
this.routeList = res
})
@@ -326,10 +325,10 @@ export default {
this.form.tableData.push({ workprocedure_no: '', is_check: '1' })
},
// 获取子节点数据
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
}
@@ -343,7 +342,7 @@ export default {
},
delLine() {
this.form.tableData.splice(-1)
},
}
}
}
</script>