| | |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <TableColumnSettings |
| | | :list1="tableColumnSettingsArray" |
| | | @tableColumnUpdate="tableColumnUpdate" |
| | | /> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | :key="tableTimeStampKey" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | border |
| | |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | v-for="item in tableColumnSettingsArray" |
| | | v-if="item.show" |
| | | :key="item.id" |
| | | :sortable="item.sortable" |
| | | :prop="item.prop" |
| | | :min-width="item.minWidth" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | show-tooltip-when-overflow |
| | | label="物料编码" |
| | | min-width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | | label="物料名称" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="物料规格" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="uom_name" |
| | | label="单位" |
| | | width="75" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="stocktypename" |
| | | label="存货类型" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.stocktypename">{{ row.stocktypename }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="materialtypename"--> |
| | | <!-- label="物料类别"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="stck_name" |
| | | label="仓库名称" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.stck_name">{{ row.stck_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="maxqty" |
| | | label="库存上限" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.maxqty">{{ row.maxqty }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="minqty" |
| | | label="库存下限" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.minqty">{{ row.minqty }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | show-tooltip-when-overflow |
| | | label="创建人员" |
| | | sortable="custom" |
| | | width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | label="工艺路线" |
| | | width="80" |
| | | show-tooltip-when-overflow |
| | | prop="proute_id" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <div v-if="!row[item.prop]">/</div> |
| | | <div v-else-if="item.prop==='proute_id'"> |
| | | <i |
| | | v-if="row.proute_id==='Y'" |
| | | v-if="row[item.prop]==='Y'" |
| | | :style="{color:$store.state.settings.theme}" |
| | | class="el-icon-share" |
| | | @click="routeClick(row)" |
| | | /> |
| | | <i |
| | | v-if="row.proute_id==='N'" |
| | | v-if="row[item.prop]==='N'" |
| | | style="color:rgb(180 ,181, 185)" |
| | | class="el-icon-share" |
| | | @click="routeClick(row)" |
| | | /> |
| | | </div> |
| | | <div v-else-if="item.prop==='is_batchno'||item.prop==='is_fifo'||item.prop==='is_incheck'||item.prop==='is_outcheck'"> |
| | | <div v-if="row[item.prop]==='Y'"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | 是 |
| | | </div> |
| | | <div v-if="row[item.prop]==='N'"> |
| | | <i class="el-icon-info" style="margin-right: 2px" /> |
| | | 否 |
| | | </div> |
| | | </div> |
| | | <div v-else>{{ row[item.prop] }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" |
| | |
| | | />高级设置: |
| | | </div> |
| | | </template> |
| | | <div style="display: flex;flex-direction: column;height: 140px; align-content: center;justify-content: space-between"> |
| | | <div |
| | | style="display: flex;flex-direction: column;height: 140px; align-content: center;justify-content: space-between" |
| | | > |
| | | <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end"> |
| | | <div> |
| | | <el-tooltip |
| | |
| | | content="" |
| | | placement="top" |
| | | > |
| | | <div slot="content" style="width: 300px">启用管理后库存数量会按标签分开显示,需要做采购到货才能入库,且生产发料需要扫码标签进行发料,不启用批次管理的不需要采购到货,可以直接选择物料采购入库,且入库后会合并显示该物料的库存,生产发料则按库位进行出库。</div> |
| | | <div slot="content" style="width: 300px"> |
| | | 启用管理后库存数量会按标签分开显示,需要做采购到货才能入库,且生产发料需要扫码标签进行发料,不启用批次管理的不需要采购到货,可以直接选择物料采购入库,且入库后会合并显示该物料的库存,生产发料则按库位进行出库。 |
| | | </div> |
| | | <i class="el-icon-question" :style="{color:$store.state.settings.theme}" /> |
| | | </el-tooltip> |
| | | </div> |
| | |
| | | import { validateCode } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | |
| | | export default { |
| | | name: 'CHDA', |
| | | components: { |
| | | Pagination |
| | | Pagination, TableColumnSettings |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | |
| | | storehouseArr: [], // 所属仓库数组 |
| | | storehouseArr2: [], // 所属仓库数组对话框 |
| | | tableData: [], |
| | | tableColumnSettingsArray: [ |
| | | { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // 隐藏列 show: false隐藏,true显示 |
| | | { minWidth: 25, width: 50, prop: 'RowNum', label: '序号', id: 2, show: true, fixed: 'left', sortable: false }, // custom |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partcode', |
| | | label: '物料编码', |
| | | id: 3, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partname', |
| | | label: '物料名称', |
| | | id: 4, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partspec', |
| | | label: '物料规格', |
| | | id: 5, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 80, |
| | | prop: 'uom_name', |
| | | label: '单位', |
| | | id: 6, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'stocktypename', |
| | | label: '存货类型', |
| | | id: 7, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'stck_name', |
| | | label: '仓库名称', |
| | | id: 8, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'maxqty', |
| | | label: '库存上限', |
| | | id: 9, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'minqty', |
| | | label: '库存下限', |
| | | id: 10, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'lm_user', |
| | | label: '创建人员', |
| | | id: 11, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 160, |
| | | prop: 'lm_date', |
| | | label: '创建时间', |
| | | id: 12, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 80, |
| | | prop: 'proute_id', |
| | | label: '工艺路线', |
| | | id: 13, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: false |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 80, |
| | | prop: 'is_batchno', |
| | | label: '批次管理', |
| | | id: 14, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: false |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 80, |
| | | prop: 'is_fifo', |
| | | label: '先进先出', |
| | | id: 15, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: false |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 80, |
| | | prop: 'is_incheck', |
| | | label: '入厂检验', |
| | | id: 16, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: false |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 80, |
| | | prop: 'is_outcheck', |
| | | label: '出厂检验', |
| | | id: 17, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: false |
| | | } |
| | | ], |
| | | tableTimeStampKey: new Date().getTime(), // 表格key |
| | | |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | id: '', // 物料id |
| | |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | | } |
| | | this.tableTimeStampKey = new Date().getTime() |
| | | this.$refs.tableDataRef.doLayout() |
| | | }, |
| | | handleRequest() { |
| | | this.getInventoryFileSelect().then(res => { |
| | | if (res.code === '200') { |