| | |
| | | > |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <div style="display: flex"> |
| | | <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=8')">导入</el-button> |
| | | <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步存货档案</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | <el-table-column |
| | | prop="partname" |
| | | label="存货名称" |
| | | width="110" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | |
| | | } from '@/api/ProductModel' |
| | | import arrayToTree from 'array-to-tree' |
| | | import { UnitSerch } from '@/api/GeneralBasicData' |
| | | import { SaveSearchMateriel_Info } from '@/api/ErpSyncMes' |
| | | |
| | | export default { |
| | | name: 'RoleList', |
| | |
| | | this.dialogForm.idUnitBySale = mainUnitCode |
| | | this.dialogForm.idunitbymanufacture = mainUnitCode |
| | | } |
| | | }, |
| | | // 同步ERP |
| | | syncERP() { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在同步ERP,请稍等...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | |
| | | SaveSearchMateriel_Info().then(res => { |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | this.getTMaterielClassTree() |
| | | loading.close() |
| | | this.$notify.success('同步成功!') |
| | | }, 2000) |
| | | } |
| | | // else if (res.code === '300') { |
| | | // setTimeout(() => { |
| | | // loading.close() |
| | | // this.$message.error('同步失败!') |
| | | // }, 10000) |
| | | // } |
| | | }).catch(e => { |
| | | loading.close() |
| | | }) |
| | | } |
| | | } |
| | | } |