| | |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-office-building" @click="office">单位</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-office-building" @click="office">单位</el-button>--> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="syncSeaveSearchUnit" |
| | | >同步计量单位 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="syncInventoryFileSelect" |
| | | >同步存货档案 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="syncStockTypeSelect" |
| | | >同步存货类型 |
| | | </el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | </div> |
| | | <el-divider /> |
| | |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="物料编码" |
| | | min-width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | min-width="160" |
| | | label="物料名称" |
| | | sortable="custom" |
| | | /> |
| | |
| | | prop="stocktypename" |
| | | label="存货类型" |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="materialtypename"--> |
| | |
| | | prop="stck_name" |
| | | label="仓库名称" |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="maxqty" |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <i v-if="row.proute_id==='Y'" class="el-icon-share" @click="routeClick(row)" /> |
| | | <i v-if="row.proute_id==='N'" style="color: #E4E7ED" class="el-icon-share" @click="routeClick(row)" /> |
| | | <i v-if="row.proute_id==='N'" style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { |
| | | AddUpdateOrganization, |
| | | DeleteOrganization |
| | | } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { WareHouseSelect } from '@/api/wlgl' |
| | | import { |
| | | AddUpdateInventoryFile, DeleteInventoryFile, InventoryFileAssociationRoute, |
| | |
| | | UomSearch, UomSelect |
| | | } from '@/api/zzmx' |
| | | import $ from 'jquery' |
| | | import { SeaveSearchInventory, SeaveSearchInventoryClass, SeaveSearchUnit } from '@/api/ErpSyncMes' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | // 同步计量单位 |
| | | async syncSeaveSearchUnit() { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在同步计量单位,请稍等...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | const res = await SeaveSearchUnit() |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | // this.getInventoryFileSelect() |
| | | this.officeTableData = res.data |
| | | console.log(this.officeTableData, 9) |
| | | loading.close() |
| | | this.$message.success('同步成功!') |
| | | }, 2000) |
| | | } else { |
| | | setTimeout(() => { |
| | | loading.close() |
| | | this.$message.error('同步失败!') |
| | | }, 10000) |
| | | } |
| | | }, |
| | | // 同步存货档案 |
| | | async syncInventoryFileSelect() { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在同步存货档案,请稍等...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | const res = await SeaveSearchInventory() |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | this.getInventoryFileSelect() |
| | | loading.close() |
| | | this.$message.success('同步成功!') |
| | | }, 2000) |
| | | } else { |
| | | setTimeout(() => { |
| | | loading.close() |
| | | this.$message.error('同步失败!') |
| | | }, 10000) |
| | | } |
| | | }, |
| | | // 同步存货类型 |
| | | async syncStockTypeSelect() { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在同步存货类型,请稍等...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | const res = await SeaveSearchInventoryClass() |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | this.getStockTypeSelect() |
| | | loading.close() |
| | | this.$message.success('同步成功!') |
| | | }, 2000) |
| | | } else { |
| | | setTimeout(() => { |
| | | loading.close() |
| | | this.$message.error('同步失败!') |
| | | }, 10000) |
| | | } |
| | | }, |
| | | async getInventoryFileSelect() { |
| | | const res = await InventoryFileSelect(this.form) |
| | | this.tableData = res.data |
| | |
| | | }, |
| | | // 对话框确认 |
| | | dialogVisibleConfirm() { |
| | | if (this.defaultroute_codeArr.length > 0 && this.defaultroute_code === '') { |
| | | return this.$message.info('默认工艺路线不能为空!') |
| | | } |
| | | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |