This commit is contained in:
zds
2022-11-15 21:30:50 +08:00
parent 328449b1cc
commit 0fe2c3c013
26 changed files with 424 additions and 150 deletions

View File

@@ -11,34 +11,17 @@
label-width="80px"
label-suffix=":"
>
<!-- <el-form-item label="桶类型">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-select
v-model="query.storagevehicle_type"
clearable
size="mini"
placeholder="请选桶类型"
class="filter-item"
style="width: 230px;"
@change="hand"
>
<el-option
v-for="item in dict.MD_BUCKET_TYPE"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>-->
<el-form-item label="生成日期">
<el-date-picker
v-model="query.createTime"
type="daterange"
@input="onInput()"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
@change="mytoQuery"
/>
</el-form-item>
@@ -214,6 +197,7 @@ import { download } from '@/api/data'
import { downloadFile } from '@/utils'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
import crudBucketrecord from "@/api/wms/basedata/master/bucketrecord";
import Date from '@/utils/datetime'
const defaultForm = { bagrecord_id: null, bag_id: null, material_id: null, pcsn: null, qty_unit_id: null, qty_unit_name: null, storage_qty: null, seqno: null, remark: null, waste_type: null, return_person: null, print_times: null, status: null, input_optid: null, input_optname: null, input_time: null, bucketunique: null, makeup_optid: null, makeup_optname: null, makeup_time: null, print_type: null }
export default {
@@ -248,20 +232,22 @@ export default {
{ 'code': '02', 'name': '组桶' },
{ 'code': '03', 'name': '清洗' }
],
open: true,
query_flag: true,
permission: {
},
rules: {
}}
},
created() {
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
if (this.open) {
this.open = false
return false
} else {
return true
if (this.query_flag) {
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
this.query_flag = false
}
},
hand(value) {
@@ -288,6 +274,19 @@ export default {
})
}
},
onInput() {
this.$forceUpdate()
},
mytoQuery(array1){
if(array1 === null){
this.crud.query.begin_time = ''
this.crud.query.end_time = ''
}else{
this.crud.query.begin_time = array1[0]
this.crud.query.end_time = array1[1]
}
this.crud.toQuery()
},
print: function() {
const _selectData = this.$refs.table.selection
for (let i = 0; i < _selectData.length; i++) {

View File

@@ -48,11 +48,12 @@
<el-date-picker
v-model="query.createTime"
type="daterange"
@input="onInput()"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
@change="mytoQuery"
/>
</el-form-item>
@@ -160,7 +161,7 @@
</div>
</el-dialog>
<!--表格渲染-->
<el-table :max-height="590" ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table ref="table" v-loading="crud.loading" :max-height="590" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column v-permission="['admin','productplanproc:edit','productplanproc:del']" fixed="right" label="操作" width="70px" align="center">
<template slot-scope="scope">
@@ -203,6 +204,7 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
import Date from '@/utils/datetime'
const defaultForm = { bucket_record_id: null, bucketunique: null, storagevehicle_type: null, material_id: null, pcsn: null, ivt_level: null, is_active: null, quality_scode: null, qty_unit_id: null, qty_unit_name: null, storage_qty: null, record_order: null, bag_qty: null, remark: null, print_times: null, status: null, create_id: null, create_name: null, create_time: null, storagevehicle_id: null, storagevehicle_code: null, makeup_optid: null, makeup_optname: null, makeup_time: null, instor_optid: null, instor_optname: null, instor_time: null, outstor_optid: null, outstor_optname: null, outstor_time: null, instor_optid2: null, instor_optname2: null, instor_time2: null, print_type: null }
export default {
@@ -236,7 +238,7 @@ export default {
return {
StatusList: [],
TypeList: [],
open: true,
query_flag: true,
QualityList: [],
IvtList: [],
permission: {
@@ -258,15 +260,15 @@ export default {
crudBucketrecord.getIvtList().then(res => {
this.IvtList = res
})
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
if (this.open) {
this.open = false
return false
} else {
return true
if (this.query_flag) {
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
this.query_flag = false
}
},
hand(value) {
@@ -300,6 +302,19 @@ export default {
}
}
},
onInput() {
this.$forceUpdate()
},
mytoQuery(array1){
if(array1 === null){
this.crud.query.begin_time = ''
this.crud.query.end_time = ''
}else{
this.crud.query.begin_time = array1[0]
this.crud.query.end_time = array1[1]
}
this.crud.toQuery()
},
formatIsName(row, column) {
if (row.is_active === '1') {
return '是'

View File

@@ -85,7 +85,7 @@
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
<el-form-item label="方案编码" prop="inspection_scheme_code">
<el-input v-model="form.inspection_scheme_code" style="width: 370px;" />
<el-input v-model="form.inspection_scheme_code" style="width: 370px;" :disabled="true" placeholder="系统生成" />
</el-form-item>
<el-form-item label="方案名称" prop="inspection_scheme_name">
<el-input v-model="form.inspection_scheme_name" style="width: 370px;" />
@@ -216,9 +216,6 @@ export default {
inspection_item_type: null,
permission: {},
rules: {
inspection_scheme_code: [
{ required: true, message: '检验方案编码不能为空', trigger: 'blur' }
],
inspection_scheme_name: [
{ required: true, message: '检验方案名称不能为空', trigger: 'blur' }
],

View File

@@ -1,21 +1,21 @@
<template>
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
style="padding-top: 0px;"
title="小线试验维护"
v-loading.fullscreen.lock="fullscreenLoading"
:visible.sync="dialogVisible"
append-to-body
fullscreen
@close="close"
@open="open"
>
<el-row :gutter="20">
<el-row :gutter="20">
<el-col :span="20" style="border: 1px solid white">
<span />
</el-col>
<el-col :span="4">
<span>
<el-button icon="el-icon-check" size="mini" type="primary" @click="mysubmitCU">保存</el-button>
<el-button icon="el-icon-check" size="mini" type="primary" @click="mysubmitCU">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="dialogVisible = false">关闭</el-button>
</span>
</el-col>
@@ -122,7 +122,7 @@
<el-input-number
v-model="form.CJZB00001"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
@@ -133,29 +133,15 @@
<el-input-number
v-model="form.CJZB00002"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-divider></el-divider>
<el-form-item label="验收牌号" prop="mark_id">
<el-select
v-model="form.mark_id"
placeholder="验收牌号"
style="width: 210px"
class="filter-item"
:disabled="crud.status.view > 0"
@change="storChange3"
>
<el-option
v-for="item in boms"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
<el-divider />
<el-form-item label="验收牌号" prop="mark_code">
<el-input v-model="form.mark_code" placeholder="验收牌号" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="试验批号" prop="accept_pcsn">
<label slot="label">试验批号:</label>
@@ -224,14 +210,14 @@
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="开单人" align="center">
<el-input v-model="form.create_name" style="width: 210px" disabled />
<el-input v-model="form.create_name" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="开单日期" align="center">
<el-input v-model="form.create_time" style="width: 210px" disabled />
@@ -280,7 +266,7 @@
</el-table-column>
<el-table-column prop="dtl_pcsn" label="批次" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.dtl_pcsn" placeholder="批次" :disabled="scope.row.is_thw" />
<el-input v-model="scope.row.dtl_pcsn" placeholder="批次" :disabled="scope.row.is_thw" />
</template>
</el-table-column>
</el-table>
@@ -304,6 +290,7 @@ const defaultForm = {
CJZB00004: 0,
CJZB00007: 0,
mark_id: '',
mark_code: '',
create_name: '',
create_time: (new Date()).strftime('%F', 'zh'),
accept_pcsn: '',
@@ -435,6 +422,7 @@ export default {
this.tableData = []
this.$emit('AddChanged')
this.$emit('update:dialogShow', false)
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
} else {
crudacceptformula.update(this.form).then(res => {
@@ -442,6 +430,7 @@ export default {
this.tableData = []
this.$emit('AddChanged')
this.$emit('update:dialogShow', false)
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}
},
@@ -453,7 +442,18 @@ export default {
this.tableData = res
})
crudacceptformula.getPCSNs({ 'material_id': this.form.material_id }).then(res => {
this.PCSNs = res
this.PCSNs = res.ja
this.form.mark_id = res.jo.id
this.form.mark_code = res.jo.code
this.form.accept_qty = res.jo.accept_qty
this.form.c_balance = res.jo2.c_balance
this.form.ball_rate = res.jo2.ball_rate
this.form.liquid_rate = res.jo2.liquid_rate
this.form.ball_time = res.jo2.ball_time
this.form.ball_speed = res.jo2.ball_speed
this.form.ball_qty = this.form.ball_rate * this.form.accept_qty
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty
})
crudacceptformula.getPCSNid(this.form).then(res => {
this.form.inspection_id = res.inspection_id
@@ -466,20 +466,11 @@ export default {
this.form.CJZB00004 = res.CJZB00004
this.form.manufactor = res.manufactor
})
crudacceptformula.getBom({ 'mark_id': this.form.mark_id }).then(res => {
this.form.c_balance = res.c_balance
this.form.ball_rate = res.ball_rate
this.form.liquid_rate = res.liquid_rate
this.form.ball_time = res.ball_time
this.form.ball_speed = res.ball_speed
this.form.ball_qty = this.form.ball_rate * this.form.accept_qty
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty
})
}
},
storChange(row) {
crudacceptformula.getPCSNs({ 'material_id': row }).then(res => {
this.PCSNs = res
this.PCSNs = res.ja
this.form.inspection_id = ''
this.form.CJZB00007 = '0'
this.form.CJZB00001 = '0'
@@ -488,6 +479,17 @@ export default {
this.form.CJZB00021 = '0'
this.form.CJZB00020 = '0'
this.form.CJZB00004 = '0'
this.form.mark_id = res.jo.id
this.form.mark_code = res.jo.code
this.form.accept_qty = res.jo.accept_qty
this.form.c_balance = res.jo2.c_balance
this.form.ball_rate = res.jo2.ball_rate
this.form.liquid_rate = res.jo2.liquid_rate
this.form.ball_time = res.jo2.ball_time
this.form.ball_speed = res.jo2.ball_speed
this.form.ball_qty = this.form.ball_rate * this.form.accept_qty
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty
})
},
storChange2(row) {

View File

@@ -109,7 +109,7 @@
<el-input-number
v-model="form.CJZB00001"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
@@ -120,7 +120,7 @@
<el-input-number
v-model="form.CJZB00002"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
@@ -128,21 +128,8 @@
</el-form-item>
</el-form>
<el-form ref="form2" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="150px" label-suffix=":">
<el-form-item label="验收牌号" prop="mark_id">
<el-select
v-model="form.mark_id"
placeholder="验收牌号"
style="width: 210px"
class="filter-item"
disabled
>
<el-option
v-for="item in boms"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
<el-form-item label="验收牌号" prop="mark_code">
<el-input v-model="form.mark_code" placeholder="验收牌号" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="试验批号" prop="accept_pcsn">
<label slot="label">试验批号:</label>
@@ -210,7 +197,7 @@
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
@@ -341,7 +328,18 @@ export default {
this.tableData = res
})
crudacceptformula.getPCSNs({ 'material_id': this.form.material_id }).then(res => {
this.PCSNs = res
this.PCSNs = res.ja
this.form.mark_id = res.jo.id
this.form.mark_code = res.jo.code
this.form.accept_qty = res.jo.accept_qty
this.form.c_balance = res.jo2.c_balance
this.form.ball_rate = res.jo2.ball_rate
this.form.liquid_rate = res.jo2.liquid_rate
this.form.ball_time = res.jo2.ball_time
this.form.ball_speed = res.jo2.ball_speed
this.form.ball_qty = this.form.ball_rate * this.form.accept_qty
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty
})
crudacceptformula.getPCSNid(this.form).then(res => {
this.form.inspection_id = res.inspection_id
@@ -354,15 +352,6 @@ export default {
this.form.CJZB00004 = res.CJZB00004
this.form.manufactor = res.manufactor
})
crudacceptformula.getBom({ 'mark_id': this.form.mark_id }).then(res => {
this.form.c_balance = res.c_balance
this.form.ball_rate = res.ball_rate
this.form.liquid_rate = res.liquid_rate
this.form.ball_time = res.ball_time
this.form.ball_speed = res.ball_speed
this.form.ball_qty = this.form.ball_rate * this.form.accept_qty
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty
})
},
getSummaries(param) {
const { columns, data } = param

View File

@@ -80,12 +80,37 @@
<el-input-number
v-model="form.total_value"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="标准重量(g)" prop="accept_qty">
<label slot="label">标准重量(g):</label>
<el-input-number
v-model="form.accept_qty"
:controls="false"
:precision="3"
:min="0"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="对应碳化钨" prop="material_id">
<el-select
v-model="form.material_id"
placeholder="对应碳化钨"
style="width: 210px"
class="filter-item"
>
<el-option
v-for="item in THWs"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="明细数">
<el-input v-model="form.tableData.length" :disabled="true" style="width: 210px;" />
</el-form-item>
@@ -164,14 +189,18 @@
<script>
import crudacceptformula from '@/api/wms/pf/acceptformula'
const defaultForm = {
mark_code: '',
material_id: '',
c_balance: 0,
liquid_rate: 0,
ball_rate: 0,
ball_speed: 0,
ball_time: 0,
detail_count: 0,
accept_qty: 1000,
material_code: '',
total_value: 0,
remark: '',
@@ -197,11 +226,18 @@ export default {
dialogVisible: false,
dtlMaterShow: false,
nowrow: {},
THWs: [],
nowindex: '',
rules: {
mark_code: [
{ required: true, message: '牌号不能为空', trigger: 'blur' }
],
material_id: [
{ required: true, message: '对应碳化钨不能为空', trigger: 'blur' }
],
accept_qty: [
{ required: true, message: '标准重量不能为空', trigger: 'blur' }
],
c_balance: [
{ required: true, message: '碳平衡不能为空', trigger: 'blur' }
],
@@ -227,6 +263,11 @@ export default {
}
}
},
created() {
crudacceptformula.getTHWs().then(res => {
this.THWs = res
})
},
methods: {
[CRUD.HOOK.beforeSubmit]() {
if (this.form.tableData.length === 0) {

View File

@@ -73,12 +73,39 @@
<el-input-number
v-model="form.total_value"
:controls="false"
:precision="4"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="标准重量(g)" prop="accept_qty">
<label slot="label">标准重量(g):</label>
<el-input-number
v-model="form.accept_qty"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="对应碳化钨" prop="material_id">
<el-select
v-model="form.material_id"
placeholder="对应碳化钨"
style="width: 210px"
disabled
class="filter-item"
>
<el-option
v-for="item in THWs"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="明细数">
<el-input v-model="tableData.length" disabled style="width: 210px;" />
</el-form-item>
@@ -122,6 +149,7 @@
import { crud } from '@crud/crud'
import crudacceptmark from '@/api/wms/pf/acceptmark'
import crudacceptformula from '@/api/wms/pf/acceptformula'
export default {
name: 'ViewDialog',
@@ -140,6 +168,7 @@ export default {
return {
dialogVisible: false,
form: {},
THWs: [],
tableData: []
}
},
@@ -155,6 +184,11 @@ export default {
}
}
},
created() {
crudacceptformula.getTHWs().then(res => {
this.THWs = res
})
},
methods: {
open() {
// 编辑之后获取明细

View File

@@ -14,13 +14,22 @@
>
<el-form-item label="验收牌号">
<el-input
v-model="query.material_code"
v-model="query.mark_code"
size="mini"
clearable
placeholder="请输入验收牌号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="碳化钨">
<el-input
v-model="query.material_code"
size="mini"
clearable
placeholder="请输入碳化钨编码、名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
</div>
@@ -47,6 +56,9 @@
<el-table-column prop="ball_rate" label="球料比" width="60" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_speed" label="球磨转速(RPM)" width="120px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_time" label="研磨时间(h)" width="90px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="accept_qty" label="标准重量(g)" width="90px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="material_code" label="碳化钨编码" width="120" align="center" />
<el-table-column prop="material_name" label="碳化钨名称" width="120" align="center" />
<el-table-column prop="detail_count" label="明细数" align="center" min-width="60" />
<el-table-column prop="remark" label="备注" align="center" min-width="135" />
<el-table-column prop="create_name" label="创建人" align="center" min-width="80" />