rev:质检模块和原材料入库优化
This commit is contained in:
@@ -39,5 +39,4 @@ export function getDtl(data) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default { add, edit, del, saveData, getDtl }
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="18" style="border: 1px solid white">
|
||||
<span />
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span>
|
||||
@@ -44,9 +44,9 @@
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料编码">
|
||||
<el-form-item label="质检单号">
|
||||
<el-input
|
||||
v-model="form1.material_code"
|
||||
v-model="form1.inspection_code"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
@@ -62,43 +62,41 @@
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号">
|
||||
<label slot="label">批 号:</label>
|
||||
<el-form-item label="采购订单">
|
||||
<el-input
|
||||
v-model="form1.pcsn"
|
||||
v-model="form1.source_bill_code"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="样品编号">
|
||||
<el-form-item label="重量">
|
||||
<el-input
|
||||
v-model="form1.sample_code"
|
||||
v-model="form1.qty"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="烧结炉号">
|
||||
<el-input
|
||||
v-model="form1.other_device_no"
|
||||
<el-form-item>
|
||||
<label slot="label">结 果:</label>
|
||||
<el-select
|
||||
v-model="form1.result"
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
placeholder="结果"
|
||||
class="filter-item"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="烧结温度">
|
||||
<el-input
|
||||
v-model="form1.other_device_wd"
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
/>
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.qc_result"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<label slot="label">等 级:</label>
|
||||
@@ -112,88 +110,17 @@
|
||||
:disabled="form1.bill_status === '99'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_IVT_LEVEL"
|
||||
v-for="item in dict.qc_grade"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<label slot="label">重 损:</label>
|
||||
<el-input
|
||||
v-model="form1.weightlost"
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<label slot="label">结 论:</label>
|
||||
<el-select
|
||||
v-model="form1.result"
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
placeholder="结论"
|
||||
class="filter-item"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QC_RESULT_LHZJD"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form1.result==='07'" label="改料编码">
|
||||
<el-input
|
||||
v-model="form1.change_material_code"
|
||||
prefix-icon="el-icon-search"
|
||||
placeholder="请选择物料"
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
clearable
|
||||
@clear="cleanMater"
|
||||
@focus="materShow=true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form1.result==='07'" label="改料名称">
|
||||
<el-input
|
||||
v-model="form1.change_material_name"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form1.result==='07'" label="改用批号">
|
||||
<el-input
|
||||
v-model="form1.change_pcsn"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="金相备注">
|
||||
<el-input
|
||||
v-model="form1.metallography_remark"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
style="width: 380px;"
|
||||
rows="2"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检验备注">
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="form1.remark"
|
||||
:disabled="form1.bill_status === '99'"
|
||||
placeholder="合格白色,超出标准范围红色"
|
||||
style="width: 380px;"
|
||||
rows="2"
|
||||
type="textarea"
|
||||
@@ -253,26 +180,6 @@
|
||||
width="100"
|
||||
:formatter="crud.formatQlNum4"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="down_limit_value"
|
||||
label="下限临界值(≤)"
|
||||
width="100"
|
||||
:formatter="crud.formatQlNum4"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="up_limit_value"
|
||||
label="上限临界值(≥)"
|
||||
width="100"
|
||||
:formatter="crud.formatQlNum4"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="false"
|
||||
prop="is_ok"
|
||||
label="是否合格"
|
||||
width="155"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="value"
|
||||
width="155px"
|
||||
@@ -304,34 +211,22 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="item_remark"
|
||||
label="项点备注"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="false"
|
||||
prop="form_remark"
|
||||
label="表单备注"
|
||||
width="160"
|
||||
/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code="'05'" @tableChanged2="tableChanged2" />
|
||||
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code="'05'" @tableChanged2="tableChanged2"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import CRUD, {crud} from '@crud/crud'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst'
|
||||
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst/physicalMst'
|
||||
|
||||
export default {
|
||||
name: 'Dialog1',
|
||||
dicts: ['QL_TEST_POINTTYPE', 'QC_RESULT_LHZJD', 'ST_IVT_LEVEL'],
|
||||
components: { MaterDtl },
|
||||
dicts: ['QL_TEST_POINTTYPE', 'qc_grade', 'qc_result'],
|
||||
components: {MaterDtl},
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
visiable1: {
|
||||
@@ -381,19 +276,20 @@ export default {
|
||||
}
|
||||
crudPhysicalMst.getResult(param).then(res => {
|
||||
this.form1 = res
|
||||
if (res.grade === '') {
|
||||
this.form1.grade = '01'
|
||||
const rows = this.form1.tableData
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
const row = rows[i]
|
||||
this.$set(row, 'value', row.value)
|
||||
}
|
||||
if (res.grade === '' || !res.grade) {
|
||||
this.form1.grade = '1'
|
||||
}
|
||||
})
|
||||
},
|
||||
hand() {
|
||||
|
||||
},
|
||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||
cellStyle({row, column, rowIndex, columnIndex}) {
|
||||
// https://blog.csdn.net/qq_41648113/article/details/109337781
|
||||
// https://blog.csdn.net/Akatsuki233/article/details/100311040
|
||||
// https://blog.csdn.net/qq_45414633/article/details/107795124
|
||||
|
||||
const inspection_type = row.inspection_type
|
||||
const is_limit_remark = row.is_limit_remark
|
||||
const value = parseFloat(row.value)
|
||||
@@ -434,18 +330,18 @@ export default {
|
||||
computerResult() {
|
||||
const rows = this.form1.tableData
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].up_limit !== '') {
|
||||
if (!rows[i].up_limit && rows[i].inspection_type === '02') {
|
||||
if (rows[i].value === undefined) {
|
||||
this.crud.notify('有标准项点未输入完', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.form1.result = '01'
|
||||
this.$set(this.form1, 'result', '1')
|
||||
var remark = ''
|
||||
for (var row of rows) {
|
||||
if (row.is_ok === '0') {
|
||||
this.form1.result = '02'
|
||||
this.$set(this.form1, 'result', '2')
|
||||
} else {
|
||||
if (row.is_limit_remark === '1' && row.form_remark) {
|
||||
remark += row.form_remark.replace('\n', '') + ','
|
||||
@@ -453,24 +349,17 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
this.form1.remark = remark
|
||||
this.$set(this.form1, 'remark', remark)
|
||||
|
||||
if (this.form1.metallography_remark !== '') {
|
||||
this.form1.result = ''
|
||||
return this.crud.notify('金相异常,需人工判定', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
if (this.form1.result === '01') return this.crud.notify('计算结果为合格', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
if (this.form1.result === '02') return this.crud.notify('计算结果为不合格', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
if (this.form1.result === '1') return this.crud.notify('计算结果为合格', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
if (this.form1.result === '2') return this.crud.notify('计算结果为不合格', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
},
|
||||
format_inspection_item_type(row, column) {
|
||||
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
debugger
|
||||
const msg = '是否继续!'
|
||||
|
||||
const data = this.form1.tableData
|
||||
var flag = 0
|
||||
for (var row of data) {
|
||||
|
||||
@@ -11,35 +11,6 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="质检单号">
|
||||
<el-input
|
||||
v-model="query.inspection_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入质检单号"
|
||||
style="width: 210px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据类型">
|
||||
<el-select
|
||||
v-model="query.inspection_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 210px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QC_INV_TYPE_LHD"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
@@ -51,10 +22,32 @@
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="质检单号">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入质检单号"
|
||||
style="width: 210px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单号">
|
||||
<el-input
|
||||
v-model="query.source_bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入质检单号"
|
||||
style="width: 210px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
v-model="query.material_search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入物料编码或名称"
|
||||
@@ -63,20 +56,6 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="批号">
|
||||
<label slot="label">批 号:</label>
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入物料批号"
|
||||
style="width: 210px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
@@ -88,29 +67,18 @@
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
v-for="item in dict.QC_BILL_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="copyAdd(crud.selections[0])"
|
||||
>
|
||||
复制新增
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -122,6 +90,17 @@
|
||||
>
|
||||
结果录入
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="info"
|
||||
icon="el-icon-position"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
size="mini"
|
||||
@click="confirm"
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -129,21 +108,13 @@
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
width="600px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-input v-if="false" v-model="form.material_id" />
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-input v-if="false" v-model="form.material_id"/>
|
||||
|
||||
<el-form-item label="质检单号" prop="inspection_code">
|
||||
<el-input v-model.trim="form.inspection_code" placeholder="系统生成" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料" prop="material_name">
|
||||
<el-input v-model.trim="form.material_name" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="pcsn">
|
||||
<el-input v-model.trim="form.pcsn" style="width: 370px;" />
|
||||
<el-input v-model.trim="form.inspection_code" placeholder="系统生成" disabled style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" prop="inspection_type">
|
||||
<el-select
|
||||
@@ -152,21 +123,27 @@
|
||||
placeholder="单据类型"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QC_INV_TYPE_LHD"
|
||||
v-for="item in dict.QC_INSPECTION_SCHEME_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.inspection_type==='30'" label="关联单号" prop="inspection_id_gu">
|
||||
<el-input v-model.trim="form.inspection_id_gu" clearable style="width: 370px;" @focus="RelevancyShow=true" />
|
||||
<el-form-item label="源单号" prop="source_bill_code">
|
||||
<el-input v-model.trim="form.source_bill_code" disabled class="input-with-select" style="width: 370px;">
|
||||
<el-button slot="append" icon="el-icon-search" @click="querySale"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料" prop="material_name">
|
||||
<el-input v-model.trim="form.material_name" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量(KG)" prop="qty">
|
||||
<el-input v-model.trim="form.qty" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model.trim="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
||||
<el-input v-model.trim="form.remark" style="width: 370px;" rows="2" type="textarea"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -183,25 +160,19 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="inspection_id" label="理化质检单标识" />
|
||||
<el-table-column prop="inspection_code" label="质检单号" width="135" />
|
||||
<el-table-column min-width="100" show-overflow-tooltip prop="inspection_type" label="单据类型" :formatter="format_inspection_type" />
|
||||
<el-table-column prop="bill_status" label="单据状态" :formatter="formatStatus" />
|
||||
<el-table-column v-if="false" prop="biz_date" label="业务日期" />
|
||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批号" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="is_effective" label="是否有效" :formatter="format_is_active" />
|
||||
<el-table-column prop="result" label="结果" :formatter="format_result" />
|
||||
<el-table-column prop="remark" show-overflow-tooltip label="备注" />
|
||||
<el-table-column prop="input_optname" label="创建人" />
|
||||
<el-table-column prop="input_time" label="创建时间" width="135" />
|
||||
<el-table-column prop="check_optname" label="检验人" />
|
||||
<el-table-column prop="check_time" label="检验时间" width="135" />
|
||||
<el-table-column prop="confirm_optname" label="结论判定人" min-width="100" />
|
||||
<el-table-column prop="confirm_time" label="结论判定时间" width="135" />
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="inspection_code" label="质检单号" width="135"/>
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="qty" label="数量" min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column prop="bill_status" label="单据状态" :formatter="formatStatus"/>
|
||||
<el-table-column prop="result" label="结果" :formatter="format_result"/>
|
||||
<el-table-column prop="remark" show-overflow-tooltip label="备注"/>
|
||||
<el-table-column prop="source_bill_code" show-overflow-tooltip label="源单号"/>
|
||||
<el-table-column prop="create_name" label="创建人"/>
|
||||
<el-table-column prop="create_time" label="创建时间" width="135"/>
|
||||
<el-table-column prop="confirm_optname" label="确认人" min-width="100"/>
|
||||
<el-table-column prop="confirm_time" label="确认时间" width="135"/>
|
||||
<el-table-column label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -214,27 +185,25 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
|
||||
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @tableChanged2="tableChanged2" />
|
||||
<Dialog1 :visiable1.sync="visiable1" :inspection-id="inspection_id" />
|
||||
<RelevancyDialog :dialog-show.sync="RelevancyShow" @RelevancyChanged="RelevancyChanged" />
|
||||
<BillDtl :dialog-show.sync="materShow" @setMaterValue="tableChanged2"/>
|
||||
<Dialog1 :visiable1.sync="visiable1" :inspection-id="inspection_id"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst/physicalMst'
|
||||
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 crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
||||
import Dialog1 from './Dialog1'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import RelevancyDialog from '@/views/wms/ql_manage/physicalMst/RelevancyDialog'
|
||||
|
||||
const defaultForm = {
|
||||
inspection_id: null,
|
||||
@@ -242,12 +211,16 @@ const defaultForm = {
|
||||
inspection_type: null,
|
||||
inspection_id_gu: null,
|
||||
material_id: null,
|
||||
pcsn: null
|
||||
material_code: null,
|
||||
material_name: null,
|
||||
source_bill_code: null,
|
||||
qty: 0,
|
||||
source_bill_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'PhysicalMst',
|
||||
dicts: ['QC_INV_TYPE_LHD', 'IS_OR_NOT', 'QC_RESULT_LHZJD'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, DateRangePicker, Dialog1, RelevancyDialog },
|
||||
name: 'QualityTest',
|
||||
dicts: [ 'qc_result', 'QC_INSPECTION_SCHEME_TYPE', 'QC_BILL_STATUS'],
|
||||
components: {pagination, crudOperation, rrOperation, udOperation, BillDtl, DateRangePicker, Dialog1 },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -262,7 +235,7 @@ export default {
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
crudMethod: { ...crudPhysicalMst }
|
||||
crudMethod: {...crudPhysicalMst}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
@@ -272,34 +245,24 @@ export default {
|
||||
materialType: [],
|
||||
visiable1: false,
|
||||
inspection_id: null,
|
||||
statusList: [],
|
||||
permission: {
|
||||
add: ['admin', 'user:add'],
|
||||
edit: ['admin', 'user:edit'],
|
||||
del: ['admin', 'user:del']
|
||||
},
|
||||
RelevancyShow: false,
|
||||
rules: {
|
||||
inspection_type: [
|
||||
{ required: true, message: '质检单类型不能为空', trigger: 'blur' }
|
||||
{required: true, message: '质检单类型不能为空', trigger: 'blur'}
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
{required: true, message: '业务日期不能为空', trigger: 'blur'}
|
||||
],
|
||||
pcsn: [
|
||||
{ required: true, message: '批号不能为空', trigger: 'blur' }
|
||||
{required: true, message: '批号不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPhysicalMst.getStatus().then(res => {
|
||||
this.statusList = res
|
||||
})
|
||||
crudPhysicalMst.getMaterialType().then(res => {
|
||||
this.materialType = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
@@ -317,7 +280,7 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
queryMater() {
|
||||
querySale() {
|
||||
this.materShow = true
|
||||
},
|
||||
resultEnter(data) {
|
||||
@@ -327,45 +290,21 @@ export default {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
format_inspection_type(row, column) {
|
||||
return this.dict.label.QC_INV_TYPE_LHD[row.inspection_type]
|
||||
},
|
||||
formatStatus(row, column) {
|
||||
for (const item of this.statusList) {
|
||||
if (item.value === row.bill_status) {
|
||||
return item.label
|
||||
}
|
||||
}
|
||||
},
|
||||
format_is_active(row, column) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_effective]
|
||||
return this.dict.label.QC_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
format_result(row, column) {
|
||||
return this.dict.label.QC_RESULT_LHZJD[row.result]
|
||||
return this.dict.label.qc_result[row.result]
|
||||
},
|
||||
tableChanged2(row) {
|
||||
tableChanged2(rows) {
|
||||
const row = rows[0]
|
||||
debugger
|
||||
// 新增一行物料时,给行进行赋值
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
const data = {
|
||||
'materOpt_code': '01',
|
||||
'material_id': row.material_id
|
||||
}
|
||||
crudPhysicalMst.isMaterType(data).then(res => {
|
||||
const param = res.param
|
||||
if (param === '10') {
|
||||
this.form.inspection_type = '10'
|
||||
} else if (param === '20') {
|
||||
this.form.inspection_type = '20'
|
||||
} else if (param === '30') {
|
||||
this.form.inspection_type = '30'
|
||||
}
|
||||
})
|
||||
},
|
||||
RelevancyChanged(rows) {
|
||||
const row = rows[0]
|
||||
this.form.inspection_id_gu = row.inspection_id
|
||||
this.form.source_bill_id = row.id
|
||||
this.form.source_bill_code = row.po_code
|
||||
},
|
||||
confirm() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
|
||||
@@ -10,16 +10,16 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/physicalMst/',
|
||||
method: 'delete',
|
||||
url: 'api/physicalMst/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/physicalMst',
|
||||
method: 'put',
|
||||
url: 'api/physicalMst/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export function saveResult(data) {
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: 'api/physicalMst/confirm',
|
||||
method: 'put',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -96,4 +96,4 @@ export function getStatus(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getResult, saveResult, confirm, setValid, copyAdd, isMaterType, getStatus, getMaterialType }
|
||||
export default { add, edit, del, getResult, saveResult, confirm, setValid, copyAdd, getStatus }
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl, BillDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -310,7 +310,7 @@ export default {
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
|
||||
return this.dict.label.ST_INV_RAW_IN_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
<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"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属仓库">
|
||||
<el-select
|
||||
v-model="query.stor_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="所属仓库"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<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']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="仓位编码">
|
||||
<el-input
|
||||
v-model="query.struct_search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="仓位编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_search"
|
||||
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"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库名称" />
|
||||
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="ivt_qty" label="库存数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, header, presenter } 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 DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
|
||||
|
||||
export default {
|
||||
name: 'RawProductIvt',
|
||||
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '原材料库存',
|
||||
optShow: { add: false, reset: true },
|
||||
idField: 'stockrecord_id',
|
||||
url: '/api/stIvtStructivtYl/getAllRawIvt',
|
||||
crudMethod: { ...ProductIvt }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
storlist: [],
|
||||
storId: null
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del
|
||||
}
|
||||
@@ -59,10 +59,11 @@
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
@change="billTypeChange"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_OUT_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -158,6 +159,7 @@
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
:disabled="bill_btn"
|
||||
size="mini"
|
||||
@click="insertBill()"
|
||||
>
|
||||
@@ -168,6 +170,7 @@
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
:disabled="mater_btn"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
@@ -265,14 +268,14 @@ const defaultForm = {
|
||||
remark: '',
|
||||
biz_date: new Date(),
|
||||
create_mode: '',
|
||||
tableData: []
|
||||
tableData: [],
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { StructIvt, MaterDtl, BillDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -287,6 +290,8 @@ export default {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
billShow: false,
|
||||
bill_btn:true,
|
||||
mater_btn:true,
|
||||
struct_id: '',
|
||||
sect_id: '',
|
||||
opendtlParam: null,
|
||||
@@ -359,6 +364,18 @@ export default {
|
||||
row.struct_id = this.struct_id
|
||||
}
|
||||
},
|
||||
billTypeChange(value){
|
||||
if (value === '21'){
|
||||
this.bill_btn = false
|
||||
this.mater_btn = true
|
||||
}else if (value === '23'){
|
||||
this.bill_btn = true
|
||||
this.mater_btn = false
|
||||
}else {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
}
|
||||
},
|
||||
storChange(value) {
|
||||
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
||||
this.sects = res.content
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_OUT_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_OUT_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -305,7 +305,7 @@ export default {
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_OUT_TYPE[row.bill_type]
|
||||
return this.dict.label.ST_INV_RAW_OUT_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
|
||||
Reference in New Issue
Block a user