opt:1.优化单据回传查询;2.优化用料单实时查询,实时更新;
3.优化失败单据回传字段序列化顺序混乱; 4.手动同步数量限制,模糊搜索;
This commit is contained in:
@@ -60,4 +60,12 @@ export function getSonFormData(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getFormType, getParentFormTypes, getParentFormTypesByDesc, getSonFormData, syncFeedBack }
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/pmFormData/confirmStatus',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getFormType, getParentFormTypes, getParentFormTypesByDesc, getSonFormData, syncFeedBack, confirm }
|
||||
|
||||
@@ -56,6 +56,16 @@
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入批次"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="analyseData">
|
||||
<el-date-picker
|
||||
v-model="query.datepick"
|
||||
@@ -88,6 +98,17 @@
|
||||
>
|
||||
手动回传
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="!currentRow"
|
||||
@click="confirm"
|
||||
>
|
||||
处理完成
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<el-dialog
|
||||
@@ -124,7 +145,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批号" prop="pcsn">
|
||||
<el-form-item label="批次" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -154,7 +175,12 @@
|
||||
@selection-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
||||
<el-table-column
|
||||
prop="code"
|
||||
label="单据编码"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('code',crud.data,'单据编码')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link v-if="scope.row.hasChildren" type="warning" @click="toView(scope.row)">{{
|
||||
scope.row.code
|
||||
@@ -171,21 +197,31 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />
|
||||
<!-- <el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="unit_id" label="单位" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="source_form_id" label="源单编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="source_form_type" label="源单类型" show-overflow-tooltip width="130" />
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
|
||||
<el-table-column
|
||||
prop="material_code"
|
||||
label="物料编码"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('material_code',crud.data,'物料编码')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
:min-width="flexWidth('material_name',crud.data,'物料名称')"
|
||||
/>
|
||||
<!-- <el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<!-- <el-table-column prop="unit_id" label="单位" show-overflow-tooltip width="120" />-->
|
||||
|
||||
<!-- <el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />-->
|
||||
<el-table-column prop="create_time" label="创建时间" width="140" />
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="210" />
|
||||
<el-table-column label="ERP回传数据" show-overflow-tooltip width="210">
|
||||
<template slot-scope="scope">{{ scope.row.form_data }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="210" />
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column prop="source_form_type" label="源单类型" show-overflow-tooltip width="130" />
|
||||
<el-table-column prop="source_form_id" label="源单编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
||||
<el-table-column
|
||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
||||
@@ -223,6 +259,7 @@ import pagination from '@crud/Pagination'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import ViewDialog from './ViewDialog'
|
||||
import crudClassstandard from '@/views/wms/base_manage/class_standard/classstandard'
|
||||
import crudbucketrecord from '@/views/wms/md_manage/group_dick/groupdick'
|
||||
// import UploadDialog from './UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -362,10 +399,19 @@ export default {
|
||||
this.$refs.viewDialog.setForm(row)
|
||||
}
|
||||
},
|
||||
syncFeedBack(row) {
|
||||
crudFormData.syncFeedBack(JSON.stringify(this.currentRow))
|
||||
syncFeedBack() {
|
||||
if (this.currentRow.length === 0) {
|
||||
this.crud.notify('请选择一行单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.currentRow.length > 1) {
|
||||
this.crud.notify('请确认只选择一行单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const param = {}
|
||||
param.data = this.currentRow
|
||||
crudFormData.syncFeedBack(param)
|
||||
.then(res => {
|
||||
debugger
|
||||
this.crud.notify(res) // 使用后端返回的消息
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -373,12 +419,21 @@ export default {
|
||||
})
|
||||
},
|
||||
handleDtlCurrentChange(val) {
|
||||
console.log(val)
|
||||
if (val.length == 1) {
|
||||
this.currentRow = val[0]
|
||||
} else {
|
||||
this.currentRow = null
|
||||
this.currentRow = val
|
||||
}, confirm() {
|
||||
if (this.currentRow.length === 0) {
|
||||
this.crud.notify('请选择一行单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = this.currentRow.map(row => row.id)
|
||||
// 构造参数
|
||||
const param = {
|
||||
data: ids // 将提取的 id 数组赋值给 param.data
|
||||
}
|
||||
crudFormData.confirm(param).then(res => {
|
||||
this.crud.notify('单据处理成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user