add:增加单据手动同步功能
This commit is contained in:
@@ -8,6 +8,14 @@ export function add(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function syncFeedBack(data) {
|
||||
return request({
|
||||
url: 'api/pmFormData/syncFeedBack',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
@@ -37,6 +45,7 @@ export function getParentFormTypes(desc) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getParentFormTypesByDesc(desc) {
|
||||
return request({
|
||||
url: 'api/bmFormStruc/getParentFormTypes/' + desc,
|
||||
@@ -51,4 +60,4 @@ export function getSonFormData(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getFormType, getParentFormTypes, getParentFormTypesByDesc, getSonFormData }
|
||||
export default { add, edit, del, getFormType, getParentFormTypes, getParentFormTypesByDesc, getSonFormData, syncFeedBack }
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
type="success"
|
||||
icon="el-icon-s-operation"
|
||||
:disabled="!currentRow"
|
||||
@click="syncFeekBack"
|
||||
@click="syncFeedBack"
|
||||
>
|
||||
手动回传
|
||||
</el-button>
|
||||
@@ -161,7 +161,7 @@
|
||||
<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 label="ERP回传数据" show-overflow-tooltip width="210">
|
||||
<template slot-scope="scope">{{ scope.row.form_data}}</template>
|
||||
<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="创建时间" />
|
||||
@@ -201,7 +201,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
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 UploadDialog from './UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
dicts: ['base_data'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
statusEnums: [ 'FORM_STATUS' ],
|
||||
statusEnums: ['FORM_STATUS'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '表单数据',
|
||||
@@ -331,8 +331,15 @@ export default {
|
||||
this.$refs.viewDialog.setForm(row)
|
||||
}
|
||||
},
|
||||
syncFeekBack(row) {
|
||||
console.log(this.currentRow)
|
||||
syncFeedBack(row) {
|
||||
crudFormData.syncFeedBack(JSON.stringify(this.currentRow))
|
||||
.then(res => {
|
||||
debugger
|
||||
this.crud.notify(res) // 使用后端返回的消息
|
||||
})
|
||||
.catch(error => {
|
||||
this.crud.notify('回传失败', error.message || '网络请求错误', 'error')
|
||||
})
|
||||
},
|
||||
handleDtlCurrentChange(val) {
|
||||
console.log(val)
|
||||
|
||||
Reference in New Issue
Block a user