代码更新
This commit is contained in:
@@ -72,4 +72,12 @@ export function isMaterType(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getResult, saveResult, confirm, setValid, copyAdd, isMaterType }
|
||||
export function hpySync(data) {
|
||||
return request({
|
||||
url: 'api/physicalMst/hpySync',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getResult, saveResult, confirm, setValid, copyAdd, isMaterType, hpySync }
|
||||
|
||||
145
mes/qd/src/views/wms/ql/physicalMstConfirm/PhySyncDialog.vue
Normal file
145
mes/qd/src/views/wms/ql/physicalMstConfirm/PhySyncDialog.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="理化同步"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="inspection_code" label="单据编码" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="inspection_type" label="单据类型" width="130px" :formatter="formatType"/>
|
||||
<el-table-column show-overflow-tooltip prop="biz_date" label="业务日期" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="confirm_optcode" label="确认人编码" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="confirm_time" label="确认时间" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="check_result" label="结果" width="130px" :formatter="formatResult"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="hpySync">同 步</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudPhysicalMst from '@/api/wms/ql/physicalMst'
|
||||
|
||||
export default {
|
||||
name: 'DeviceDialog',
|
||||
dicts: ['QC_RESULT_LHZJD'],
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: 'erp理化信息',
|
||||
optShow: {},
|
||||
url: 'api/physicalMst/erpPhyQuery',
|
||||
idField: 'inspection_id',
|
||||
sort: '',
|
||||
crudMethod: { ...crudPhysicalMst }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
// this.crud.resetQuery()
|
||||
// this.$emit('update:dialogShow', false)
|
||||
this.$parent._data.phySyncShow = false
|
||||
},
|
||||
formatType(row) {
|
||||
if (row.inspection_type === '10') {
|
||||
return '原料碳化钨'
|
||||
} else if (row.inspection_type === '20') {
|
||||
return '原料碳钴粉'
|
||||
} else if (row.inspection_type === '30') {
|
||||
return '成品混合料'
|
||||
}
|
||||
},
|
||||
formatResult(row) {
|
||||
return this.dict.label.QC_RESULT_LHZJD[row.check_result]
|
||||
},
|
||||
hpySync() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData.length === 0) {
|
||||
return this.crud.notify('请至少选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudPhysicalMst.hpySync(data).then(res => {
|
||||
this.close()
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -144,6 +144,16 @@
|
||||
>
|
||||
设置有效
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="phySyncShow = true"
|
||||
>
|
||||
理化同步
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -242,7 +252,7 @@
|
||||
<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" />
|
||||
|
||||
<PhySyncDialog :dialog-show.sync="phySyncShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -258,6 +268,7 @@ import Dialog1 from './Dialog1'
|
||||
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import RelevancyDialog from '@/views/wms/ql/physicalMst/RelevancyDialog'
|
||||
import PhySyncDialog from '@/views/wms/ql/physicalMstConfirm/PhySyncDialog'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -279,7 +290,8 @@ export default {
|
||||
MaterDtl,
|
||||
DateRangePicker,
|
||||
Dialog1,
|
||||
RelevancyDialog
|
||||
RelevancyDialog,
|
||||
PhySyncDialog
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -311,6 +323,7 @@ export default {
|
||||
del: ['admin', 'user:del']
|
||||
},
|
||||
RelevancyShow: false,
|
||||
phySyncShow: false,
|
||||
rules: {
|
||||
inspection_type: [
|
||||
{ required: true, message: '质检单类型不能为空', trigger: 'blur' }
|
||||
|
||||
Reference in New Issue
Block a user