小料开单

This commit is contained in:
zds
2022-10-13 09:22:39 +08:00
parent fc84da7153
commit 5b6111a4fd
18 changed files with 3119 additions and 3 deletions

View File

@@ -0,0 +1,495 @@
<template>
<el-dialog
style="padding-top: 0px;"
:title="crud.status.title"
append-to-body
fullscreen
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
>
<el-row v-show="crud.status.cu > 0" :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" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
</span>
</el-col>
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="150px" label-suffix=":">
<el-form-item label="实验序号" prop="formula_code">
<el-input v-model="form.formula_code" placeholder="系统生成" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="物料" prop="material_id">
<el-select
v-model="form.material_id"
placeholder="物料"
style="width: 210px"
class="filter-item"
:disabled="crud.status.view > 0"
@change="storChange"
>
<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="批号" prop="inspection_id">
<el-select
v-model="form.inspection_id"
clearable
size="mini"
placeholder="批号"
class="filter-item"
@change="storChange2"
>
<el-option
v-for="item in PCSNs"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="生产厂家" prop="manufactor">
<el-input v-model="form.manufactor" placeholder="生产厂家" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="CT(%)" prop="CJZB00004">
<label slot="label">CT(%):</label>
<el-input-number
v-model="form.CJZB00004"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="Cr3C2" prop="CJZB00021">
<label slot="label">Cr3C2:</label>
<el-input-number
v-model="form.CJZB00021"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="氧含量" prop="CJZB00007">
<label slot="label">氧含量:</label>
<el-input-number
v-model="form.CJZB00007"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="VC(%)" prop="CJZB00020">
<label slot="label">VC(%):</label>
<el-input-number
v-model="form.CJZB00020"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="CF(%)" prop="CJZB00006">
<label slot="label">CF(%):</label>
<el-input-number
v-model="form.CJZB00006"
:controls="false"
:precision="0"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="FSSS(μm)" prop="CJZB00001">
<label slot="label">FSSS(μm):</label>
<el-input-number
v-model="form.CJZB00001"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="BET(/g)" prop="CJZB00002">
<label slot="label">BET(㎡/g):</label>
<el-input-number
v-model="form.CJZB00002"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
</el-form>
<el-form ref="form2" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" 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="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-form-item>
<el-form-item label="试验批号" prop="accept_pcsn">
<label slot="label">试验批号:</label>
<el-input v-model="form.accept_pcsn" style="width: 210px" disabled class="input-with-select">
<el-button slot="append" @click="createPcsn">生成</el-button>
</el-input>
</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"
@change="storChange4"
/>
</el-form-item>
<el-form-item label="碳平衡" prop="c_balance">
<label slot="label">碳平衡:</label>
<el-input-number
v-model="form.c_balance"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="溶剂量(ml)" prop="liquid_qty">
<label slot="label">溶剂量(ml):</label>
<el-input-number
v-model="form.liquid_qty"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="合金球(KG)" prop="ball_qty">
<label slot="label">合金球(KG):</label>
<el-input-number
v-model="form.ball_qty"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球磨转速(RPM)" prop="ball_speed">
<label slot="label">球磨转速(RPM):</label>
<el-input-number
v-model="form.ball_speed"
:controls="false"
:precision="0"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="研磨时间(H)" prop="ball_time">
<label slot="label">研磨时间(H):</label>
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="开单人" align="center">
<el-input v-model="form.create_name" placeholder="开单人" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="开单日期" align="center">
<el-input v-model="form.create_time" placeholder="开单人" style="width: 210px" disabled />
</el-form-item>
</el-form>
<div class="crud-opts2" style="margin-bottom: 5px;">
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="insertdtl"
>
开单计算
</el-button>
</span>
</div>
<el-table
ref="table"
:data="form.tableData"
style="width: 100%;"
size="mini"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="material_code" label="物料编码" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="formula_qty" label="重量" align="center">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.formula_qty"
size="mini"
:controls="false"
:precision="4"
:max="100"
:min="0"
:disabled="scope.row.edit"
/>
</template>
</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="批次" />
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import Date from '@/utils/datetime'
const defaultForm = {
formula_code: '',
material_id: '',
inspection_id: '',
CJZB00001: 0,
CJZB00002: 0,
CJZB00006: 0,
CJZB00020: 0,
CJZB00021: 0,
CJZB00004: 0,
CJZB00007: 0,
mark_id: '',
create_name: '',
create_time: (new Date()).strftime('%F', 'zh'),
accept_pcsn: '',
accept_qty: 1000,
c_balance: 0,
ball_rate: 0,
liquid_rate: 0,
ball_qty: 0,
liquid_qty: 0,
ball_time: 0,
ball_speed: 0,
tableData: []
}
import crudacceptformula from '@/api/wms/pf/acceptformula'
import CRUD, { form, crud } from '@crud/crud'
export default {
name: 'AddDialog',
components: {},
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
dtlMaterShow: false,
nowrow: {},
nowindex: '',
boms: [],
THWs: [],
PCSNs: [],
rules: {
material_id: [
{ required: true, message: '物料不能为空', trigger: 'blur' }
],
inspection_id: [
{ required: true, message: '批号不能为空', trigger: 'blur' }
],
mark_id: [
{ required: true, message: '验收牌号不能为空', trigger: 'blur' }
],
accept_pcsn: [
{ required: true, message: '试验批号不能为空', trigger: 'blur' }
],
accept_qty: [
{ required: true, message: '试验重量不能为空', trigger: 'blur' }
]
}
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
created() {
crudacceptformula.getBoms().then(res => {
this.boms = res
})
crudacceptformula.getTHWs().then(res => {
this.THWs = res
})
},
methods: {
[CRUD.HOOK.beforeSubmit]() {
if (!this.form.mark_id) {
this.crud.notify('验收牌号不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!this.form.accept_pcsn) {
this.crud.notify('试验批号不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.form.accept_qty <= 0) {
this.crud.notify('试验重量不能为0', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.form.tableData.length === 0) {
this.crud.notify('开单明细不能为空', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
},
[CRUD.HOOK.afterToEdit]() {
// 编辑之后获取明细
crudacceptformula.getDtl({ 'mark_id': this.form.mark_id }).then(res => {
this.form.tableData = res
})
},
storChange(row) {
crudacceptformula.getPCSNs({ 'material_id': row }).then(res => {
this.PCSNs = res
this.form.inspection_id = ''
this.form.CJZB00007 = '0'
this.form.CJZB00001 = '0'
this.form.CJZB00002 = '0'
this.form.CJZB00006 = '0'
this.form.CJZB00021 = '0'
this.form.CJZB00020 = '0'
this.form.CJZB00004 = '0'
})
},
storChange2(row) {
crudacceptformula.getPCSN({ 'inspection_id': row }).then(res => {
this.form.CJZB00007 = res.CJZB00007
this.form.CJZB00001 = res.CJZB00001
this.form.CJZB00002 = res.CJZB00002
this.form.CJZB00006 = res.CJZB00006
this.form.CJZB00021 = res.CJZB00021
this.form.CJZB00020 = res.CJZB00020
this.form.CJZB00004 = res.CJZB00004
})
},
storChange3(row) {
crudacceptformula.getBom({ 'mark_id': row }).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 / 100.0
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty / 100.0
})
},
storChange4(row) {
this.form.ball_qty = this.form.ball_rate * this.form.accept_qty / 100.0
this.form.liquid_qty = this.form.liquid_rate * this.form.accept_qty / 100.0
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$emit('update:dialogShow', false)
},
handleEdit(index, row) {
// 判断是否可以关闭编辑状态
if (!row.edit) {
if (parseFloat(row.standard_rate) <= 0) {
this.crud.notify('标准值必须大于0', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!row.material_code) {
this.crud.notify('物料不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
row.edit = !row.edit
this.form.tableData.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
},
insertdtl() {
this.form.tableData.push({ material_id: '', material_code: '', material_name: '', standard_rate: '0', seqno: '', edit: false })
},
createPcsn() {
crudacceptformula.createPcsn().then(res => {
this.form.accept_pcsn = res.accept_pcsn
})
}
}
}
</script>
<style scoped>
.crud-opts2 {
padding: 4px 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -0,0 +1,343 @@
<template>
<el-dialog
style="padding-top: 0px;"
:title="crud.status.title"
append-to-body
fullscreen
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
>
<el-row v-show="crud.status.cu > 0" :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" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
</span>
</el-col>
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="150px" label-suffix=":">
<el-form-item label="实验序号" prop="formula_code">
<el-input v-model="form.formula_code" placeholder="系统生成" style="width: 210px" disabled>
</el-input>
</el-form-item>
<el-form-item label="物料" prop="material_id">
<el-select
v-model="form.material_id"
placeholder="物料"
style="width: 210px"
class="filter-item"
:disabled="crud.status.view > 0"
>
<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="批号" prop="inspection_id">
<el-select
v-model="form.inspection_id"
clearable
size="mini"
placeholder="批号"
class="filter-item"
>
<el-option
v-for="item in PCSNs"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="生产厂家" prop="manufactor">
<el-input v-model="form.manufactor" placeholder="生产厂家" style="width: 210px" disabled>
</el-input>
</el-form-item>
<el-form-item label="CT(%)" prop="c_balance">
<label slot="label">CT(%):</label>
<el-input-number
v-model="form.c_balance"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="Cr3C2" prop="c_balance">
<label slot="label">Cr3C2:</label>
<el-input-number
v-model="form.liquid_rate"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="氧含量" prop="c_balance">
<label slot="label">氧含量:</label>
<el-input-number
v-model="form.ball_rate"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="VC(%)" prop="c_balance">
<label slot="label">VC(%):</label>
<el-input-number
v-model="form.ball_speed"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="CF(%)" prop="c_balance">
<label slot="label">CF(%):</label>
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="0"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="FSSS(μm)">
<label slot="label">FSSS(μm):</label>
<el-input-number
v-model="form.total_value"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="BET(/g)">
<label slot="label">BET(㎡/g):</label>
<el-input-number
v-model="form.total_value2"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="明细数">
<el-input v-model="form.tableData.length" :disabled="true" style="width: 210px;" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
</el-form-item>
</el-form>
<div class="crud-opts2" style="margin-bottom: 5px;">
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="insertdtl"
>
开单计算
</el-button>
</span>
</div>
<el-table
ref="table"
:data="form.tableData"
style="width: 100%;"
size="mini"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="material_code" label="物料编码" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="standard_rate" label="标准值%" align="center">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.standard_rate"
size="mini"
:controls="false"
:precision="4"
:max="100"
:min="0"
:disabled="scope.row.edit"
/>
</template>
</el-table-column>
<el-table-column prop="seqno" label="顺序号" align="center" />
</el-table>
</el-dialog>
</template>
<script>
const defaultForm = {
formula_code: '',
material_id: '',
inspection_id: '',
c_balance: 0,
liquid_rate: 0,
ball_rate: 0,
ball_speed: 0,
ball_time: 0,
detail_count: 0,
manufactor: '',
total_value: 0,
total_value2: 0,
remark: '',
tableData: []
}
import crudacceptformula from '@/api/wms/pf/acceptformula'
import CRUD, { form, crud } from '@crud/crud'
export default {
name: 'AddDialog',
components: {},
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
dtlMaterShow: false,
nowrow: {},
boms: [],
THWs: [],
PCSNs: [],
nowindex: '',
rules: {
material_id: [
{ required: true, message: '牌号不能为空', trigger: 'blur' }
],
inspection_id: [
{ required: true, message: '批次不能为空', trigger: 'blur' }
],
c_balance: [
{ required: true, message: '碳平衡不能为空', trigger: 'blur' }
],
liquid_rate: [
{ required: true, message: '液料比不能为空', trigger: 'blur' }
],
ball_rate: [
{ required: true, message: '球料比不能为空', trigger: 'blur' }
],
ball_speed: [
{ required: true, message: '球磨转速不能为空', trigger: 'blur' }
],
ball_time: [
{ required: true, message: '研磨时间不能为空', trigger: 'blur' }
]
}
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
created() {
crudacceptformula.getBoms().then(res => {
this.boms = res
})
crudacceptformula.getTHWs().then(res => {
this.THWs = res
})
crudacceptformula.getPCSNs().then(res => {
this.PCSNs = res
})
},
methods: {
[CRUD.HOOK.beforeSubmit]() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
},
[CRUD.HOOK.afterToEdit]() {
// 编辑之后获取明细
crudacceptformula.getDtl({ 'mark_id': this.form.mark_id }).then(res => {
this.form.tableData = res
})
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$emit('update:dialogShow', false)
},
handleEdit(index, row) {
// 判断是否可以关闭编辑状态
if (!row.edit) {
if (parseFloat(row.standard_rate) <= 0) {
this.crud.notify('标准值必须大于0', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!row.material_code) {
this.crud.notify('物料不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
row.edit = !row.edit
this.form.tableData.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
},
insertdtl() {
}
}
}
</script>
<style scoped>
.crud-opts2 {
padding: 4px 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -0,0 +1,188 @@
<template>
<el-dialog
style="padding-top: 0px;"
title="小线实验牌号详情"
:visible.sync="dialogVisible"
append-to-body
fullscreen
@open="open"
@close="close"
>
<el-form ref="form" 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_code">
<el-input v-model="form.mark_code" placeholder="牌号" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="碳平衡" prop="c_balance">
<label slot="label">碳平衡:</label>
<el-input-number
v-model="form.c_balance"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="液料比" prop="c_balance">
<label slot="label">液料比:</label>
<el-input-number
v-model="form.liquid_rate"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球料比" prop="c_balance">
<label slot="label">球料比:</label>
<el-input-number
v-model="form.ball_rate"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球磨转速(RPM)" prop="c_balance">
<label slot="label">球磨转速(RPM):</label>
<el-input-number
v-model="form.ball_speed"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="研磨时间(H)" prop="c_balance">
<label slot="label">研磨时间(H):</label>
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="0"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="标准值合计(%)">
<label slot="label">标准值合计(%):</label>
<el-input-number
v-model="form.total_value"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="明细数">
<el-input v-model="tableData.length" disabled style="width: 210px;" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" disabled />
</el-form-item>
</el-form>
<el-table
ref="table"
:data="tableData"
style="width: 100%;"
size="mini"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="material_code" label="物料编码" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="standard_rate" label="标准值%" align="center">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.standard_rate"
size="mini"
:controls="false"
:precision="4"
:max="100"
:min="0"
disabled
/>
</template>
</el-table-column>
<el-table-column prop="seqno" label="顺序号" align="center" />
</el-table>
</el-dialog>
</template>
<script>
import { crud } from '@crud/crud'
import crudacceptmark from '@/api/wms/pf/acceptmark'
export default {
name: 'ViewDialog',
components: {},
mixins: [crud()],
props: {
dialogShow: {
type: Boolean,
default: false
},
rowmst: {
type: Object
}
},
data() {
return {
dialogVisible: false,
form: {},
tableData: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
rowmst: {
handler(newValue) {
this.form = newValue
}
}
},
methods: {
open() {
// 编辑之后获取明细
crudacceptmark.getDtl({ 'mark_id': this.form.mark_id }).then(res => {
this.tableData = res
// 计算合计值
let all = 0
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
row.edit = true
this.tableData.splice(i, 1, row)
all = all + parseFloat(row.standard_rate)
}
this.form.total_value = all
})
},
close() {
this.$emit('update:dialogShow', false)
this.form = {}
this.tableData = []
this.$emit('AddChanged')
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -0,0 +1,217 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
size="mini"
label-width="80px"
label-suffix=":"
>
<el-form-item label="工令日期">
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@input="onInput()"
@change="mytoQuery"
/>
</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>
<el-form-item label="碳化钨批号">
<el-input
v-model="query.material_pcsn"
size="mini"
clearable
placeholder="请输入碳化钨批号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="实验序号">
<el-input
v-model="query.formula_code"
size="mini"
clearable
placeholder="请输入实验序号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="验收牌号">
<el-select
v-model="query.mark_id"
clearable
size="mini"
placeholder="验收牌号"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in boms"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="试验批号">
<el-input
v-model="query.accept_pcsn"
size="mini"
clearable
placeholder="请输入试验批号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="warning"
icon="el-icon-check"
size="mini"
>
打印
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="45" />
<el-table-column v-permission="[]" label="操作" fixed="right" width="120px" align="center">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
<el-table-column prop="formula_code" width="120px" label="实验序号" align="center">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.formula_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="material_code" label="碳化钨编码" width="120px" align="center" />
<el-table-column prop="material_name" label="碳化钨名称" width="120px" align="center" />
<el-table-column prop="material_pcsn" label="碳化钨批次" width="120px" align="center" />
<el-table-column prop="mark_code" label="验收牌号" width="120px" align="center" />
<el-table-column prop="accept_pcsn" label="试验批号" width="120px" align="center" />
<el-table-column prop="detail_count" label="明细数" align="center" min-width="60" />
<el-table-column prop="accept_qty" label="重量" align="center" min-width="80" :formatter="crud.formatNum3" />
<el-table-column prop="confirm_qty" label="开单重量" align="center" min-width="80" :formatter="crud.formatNum3" />
<el-table-column prop="remark" label="备注" align="center" min-width="135" />
<el-table-column prop="create_name" label="创建人" align="center" min-width="80" />
<el-table-column prop="create_time" label="创建时间" min-width="135" align="center" />
<el-table-column prop="update_optname" label="修改人" align="center" min-width="80" />
<el-table-column prop="update_time" label="修改时间" min-width="135" align="center" />
</el-table>
<!--分页组件-->
<pagination />
</div>
<AddDialog />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
</div>
</template>
<script>
import crudacceptformula from '@/api/wms/pf/acceptformula'
import CRUD, { presenter, header, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/pf/acceptformula/AddDialog'
import ViewDialog from '@/views/wms/pf/acceptformula/ViewDialog'
import Date from '@/utils/datetime'
export default {
name: 'Acceptformula',
components: { AddDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({
title: '碳化钨小线验收试验',
url: 'api/acceptformula',
idField: 'formula_id',
sort: 'create_time desc',
crudMethod: { ...crudacceptformula },
optShow: {
add: true,
del: false,
edit: false,
reset: true
}
})
},
data() {
return {
permission: {
},
mstrow: {},
boms: [],
viewShow: false,
query_flag: true,
rules: {
}}
},
created() {
crudacceptformula.getBoms().then(res => {
this.boms = res
})
this.crud.query.createTime = [new Date(), new Date()]
},
methods: {
hand(value) {
this.crud.toQuery()
},
[CRUD.HOOK.beforeRefresh]() {
if (this.query_flag) {
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
this.query_flag = false
}
},
onInput() {
this.$forceUpdate()
},
toView(index, row) {
this.mstrow = row
this.viewShow = true
},
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()
},
querytable() {
this.crud.toQuery()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,343 @@
<template>
<el-dialog
style="padding-top: 0px;"
:title="crud.status.title"
append-to-body
fullscreen
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
>
<el-row v-show="crud.status.cu > 0" :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" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
</span>
</el-col>
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="150px" label-suffix=":">
<el-form-item label="牌号" prop="mark_code">
<el-input v-model="form.mark_code" placeholder="牌号" style="width: 210px" >
</el-input>
</el-form-item>
<el-form-item label="碳平衡" prop="c_balance">
<label slot="label">碳平衡:</label>
<el-input-number
v-model="form.c_balance"
:controls="false"
:precision="3"
:min="0"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="液料比" prop="c_balance">
<label slot="label">液料比:</label>
<el-input-number
v-model="form.liquid_rate"
:controls="false"
:precision="3"
:min="0"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球料比" prop="c_balance">
<label slot="label">球料比:</label>
<el-input-number
v-model="form.ball_rate"
:controls="false"
:precision="3"
:min="0"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球磨转速(RPM)" prop="c_balance">
<label slot="label">球磨转速(RPM):</label>
<el-input-number
v-model="form.ball_speed"
:controls="false"
:precision="3"
:min="0"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="研磨时间(H)" prop="c_balance">
<label slot="label">研磨时间(H):</label>
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="0"
:min="0"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="标准值合计(%)">
<label slot="label">标准值合计(%):</label>
<el-input-number
v-model="form.total_value"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="明细数">
<el-input v-model="form.tableData.length" :disabled="true" style="width: 210px;" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
</el-form-item>
</el-form>
<div class="crud-opts2" style="margin-bottom: 5px;">
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="crud.status.view > 0"
@click="insertdtl"
>
添加一行
</el-button>
</span>
</div>
<el-table
ref="table"
:data="form.tableData"
style="width: 100%;"
size="mini"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="material_code" label="物料编码" align="center">
<template slot-scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryDtlMater(scope.$index, scope.row)" />
</el-input>
<span v-show="scope.row.edit">{{ scope.row.material_code }}</span>
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="standard_rate" label="标准值%" align="center">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.standard_rate"
size="mini"
:controls="false"
:precision="4"
:max="100"
:min="0"
:disabled="scope.row.edit"
/>
</template>
</el-table-column>
<el-table-column prop="seqno" label="顺序号" align="center" />
<el-table-column v-if="crud.status.cu > 0" v-permission="['admin','productbom:edit','productbom:del']" align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delOne(scope.$index, form.tableData)" />
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button v-show="scope.row.edit" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
</template>
</el-table-column>
</el-table>
<MaterDtl
:dialog-show.sync="dtlMaterShow"
:is-single="true"
:mater-opt-code="'04'"
@tableChanged2="tableChanged2"
/>
</el-dialog>
</template>
<script>
const defaultForm = {
mark_code: '',
c_balance: 0,
liquid_rate: 0,
ball_rate: 0,
ball_speed: 0,
ball_time: 0,
detail_count: 0,
material_code: '',
total_value: 0,
remark: '',
tableData: []
}
import crudacceptmark from '@/api/wms/pf/acceptmark'
import CRUD, { form, crud } from '@crud/crud'
import MaterDtl from '@/views/wms/pub/MaterDialog'
export default {
name: 'AddDialog',
components: { MaterDtl },
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
dtlMaterShow: false,
nowrow: {},
nowindex: '',
rules: {
mark_code: [
{ required: true, message: '牌号不能为空', trigger: 'blur' }
],
c_balance: [
{ required: true, message: '碳平衡不能为空', trigger: 'blur' }
],
liquid_rate: [
{ required: true, message: '液料比不能为空', trigger: 'blur' }
],
ball_rate: [
{ required: true, message: '球料比不能为空', trigger: 'blur' }
],
ball_speed: [
{ required: true, message: '球磨转速不能为空', trigger: 'blur' }
],
ball_time: [
{ required: true, message: '研磨时间不能为空', trigger: 'blur' }
]
}
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
[CRUD.HOOK.beforeSubmit]() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.form.total_value < 100) {
this.crud.notify('标准合计值不足100', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
},
[CRUD.HOOK.afterToEdit]() {
// 编辑之后获取明细
crudacceptmark.getDtl({ 'mark_id': this.form.mark_id }).then(res => {
this.form.tableData = res
// 计算合计值
let all = 0
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
row.edit = true
this.form.tableData.splice(i, 1, row)
all = all + parseFloat(row.standard_rate)
}
this.form.total_value = all
})
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$emit('update:dialogShow', false)
},
handleEdit(index, row) {
// 判断是否可以关闭编辑状态
if (!row.edit) {
if (parseFloat(row.standard_rate) <= 0) {
this.crud.notify('标准值必须大于0', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!row.material_code) {
this.crud.notify('物料不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if ((this.form.total_value + parseFloat(row.standard_rate)) > 100) {
this.crud.notify('标准合计值不能超过100', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
row.edit = !row.edit
this.form.tableData.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
this.form.total_value = 0
this.form.tableData.forEach((item) => {
if (item.edit) {
this.form.total_value = this.form.total_value + parseFloat(item.standard_rate)
}
})
},
insertdtl() {
this.form.tableData.push({ material_id: '', material_code: '', material_name: '', standard_rate: '0', seqno: '', edit: false })
},
delOne(index, rows) {
this.form.total_value = parseFloat(this.form.total_value) - parseFloat(rows[index].standard_rate)
if (this.form.total_value < 0) {
this.form.total_value = 0
}
rows.splice(index, 1)
},
queryDtlMater(index, row) {
this.dtlMaterShow = true
this.nowindex = index
this.nowrow = row
},
tableChanged2(row) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === row.material_id) {
this.crud.notify('不允许添加相同物料!')
return false
}
}
this.nowrow.material_id = row.material_id
this.nowrow.material_code = row.material_code
this.nowrow.material_name = row.material_name
this.nowrow.standard_rate = '0'
this.nowrow.edit = false
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
}
}
}
</script>
<style scoped>
.crud-opts2 {
padding: 4px 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -0,0 +1,188 @@
<template>
<el-dialog
style="padding-top: 0px;"
title="小线实验牌号详情"
:visible.sync="dialogVisible"
append-to-body
fullscreen
@open="open"
@close="close"
>
<el-form ref="form" 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_code">
<el-input v-model="form.mark_code" placeholder="牌号" style="width: 210px" disabled />
</el-form-item>
<el-form-item label="碳平衡" prop="c_balance">
<label slot="label">碳平衡:</label>
<el-input-number
v-model="form.c_balance"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="液料比" prop="c_balance">
<label slot="label">液料比:</label>
<el-input-number
v-model="form.liquid_rate"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球料比" prop="c_balance">
<label slot="label">球料比:</label>
<el-input-number
v-model="form.ball_rate"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="球磨转速(RPM)" prop="c_balance">
<label slot="label">球磨转速(RPM):</label>
<el-input-number
v-model="form.ball_speed"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="研磨时间(H)" prop="c_balance">
<label slot="label">研磨时间(H):</label>
<el-input-number
v-model="form.ball_time"
:controls="false"
:precision="0"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="标准值合计(%)">
<label slot="label">标准值合计(%):</label>
<el-input-number
v-model="form.total_value"
:controls="false"
:precision="4"
:min="0"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="明细数">
<el-input v-model="tableData.length" disabled style="width: 210px;" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" disabled />
</el-form-item>
</el-form>
<el-table
ref="table"
:data="tableData"
style="width: 100%;"
size="mini"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="material_code" label="物料编码" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="standard_rate" label="标准值%" align="center">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.standard_rate"
size="mini"
:controls="false"
:precision="4"
:max="100"
:min="0"
disabled
/>
</template>
</el-table-column>
<el-table-column prop="seqno" label="顺序号" align="center" />
</el-table>
</el-dialog>
</template>
<script>
import { crud } from '@crud/crud'
import crudacceptmark from '@/api/wms/pf/acceptmark'
export default {
name: 'ViewDialog',
components: {},
mixins: [crud()],
props: {
dialogShow: {
type: Boolean,
default: false
},
rowmst: {
type: Object
}
},
data() {
return {
dialogVisible: false,
form: {},
tableData: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
rowmst: {
handler(newValue) {
this.form = newValue
}
}
},
methods: {
open() {
// 编辑之后获取明细
crudacceptmark.getDtl({ 'mark_id': this.form.mark_id }).then(res => {
this.tableData = res
// 计算合计值
let all = 0
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
row.edit = true
this.tableData.splice(i, 1, row)
all = all + parseFloat(row.standard_rate)
}
this.form.total_value = all
})
},
close() {
this.$emit('update:dialogShow', false)
this.form = {}
this.tableData = []
this.$emit('AddChanged')
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -0,0 +1,120 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
size="mini"
label-width="80px"
label-suffix=":"
>
<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>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="45" />
<el-table-column v-permission="[]" label="操作" fixed="right" width="120px" align="center">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
<el-table-column prop="mark_code" width="150px" label="牌号" align="center">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.mark_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="c_balance" label="碳平衡" width="90px" align="center" :formatter="crud.formatQlNum4" />
<el-table-column prop="liquid_rate" label="液料比" width="60" align="center" :formatter="crud.formatNum2" />
<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="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" />
<el-table-column prop="create_time" label="创建时间" min-width="135" align="center" />
<el-table-column prop="update_optname" label="修改人" align="center" min-width="80" />
<el-table-column prop="update_time" label="修改时间" min-width="135" align="center" />
</el-table>
<!--分页组件-->
<pagination />
</div>
<AddDialog />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
</div>
</template>
<script>
import crudacceptmark from '@/api/wms/pf/acceptmark'
import CRUD, { presenter, header, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/pf/acceptmark/AddDialog'
import ViewDialog from '@/views/wms/pf/acceptmark/ViewDialog'
export default {
name: 'Acceptmark',
components: { AddDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({
title: '小线实验牌号维护',
url: 'api/acceptmark',
idField: 'mark_id',
sort: 'create_time desc',
crudMethod: { ...crudacceptmark },
optShow: {
add: true,
del: false,
edit: false,
reset: true
}
})
},
data() {
return {
permission: {
},
mstrow: {},
viewShow: false,
rules: {
}}
},
methods: {
hand(value) {
this.crud.toQuery()
},
toView(index, row) {
this.mstrow = row
this.viewShow = true
},
querytable() {
this.crud.toQuery()
}
}
}
</script>
<style scoped>
</style>