add:物料信息导入
This commit is contained in:
@@ -48,15 +48,25 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" >
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- type="success"-->
|
||||
<!-- icon="el-icon-position"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="synchronize()"-->
|
||||
<!-- >-->
|
||||
<!-- 同步-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
type="warning"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="synchronize()"
|
||||
@click="uploadShow = true"
|
||||
>
|
||||
同步
|
||||
导入
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
@@ -202,6 +212,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<UploadDialog :dialog-show.sync="uploadShow" @tableChanged3="tableChanged3" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -214,6 +225,8 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import UploadDialog from './UploadDialog'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
material_id: null,
|
||||
@@ -240,7 +253,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'MdBaseMaterial',
|
||||
dicts: ['vehicle_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect, UploadDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -258,6 +271,7 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
uploadShow: false,
|
||||
fullscreenLoading: false,
|
||||
workShopList: []
|
||||
}
|
||||
@@ -284,6 +298,9 @@ export default {
|
||||
this.workShopList = res
|
||||
})
|
||||
},
|
||||
tableChanged3() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 获取子节点数据
|
||||
loadChildNodes({ action, parentNode, callback }) {
|
||||
// if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
|
||||
@@ -32,4 +32,12 @@ export function synchronize(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, synchronize }
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: 'api/mdBaseMaterial/excelImport',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, synchronize, excelImport }
|
||||
|
||||
Reference in New Issue
Block a user