| | |
| | | // 节拍工价查询 |
| | | export function BeatRateSearch(data) { |
| | | return request({ |
| | | url: 'BasicSetting/BeatRateSearch', |
| | | url: 'BasicSetting/BeatRateSearchNew', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="产品名称/编码" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.partcode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | <el-form-item label="产品编码" style=" display: flex;"> |
| | | |
| | | @change="partChange" |
| | | > |
| | | <!-- @focus="getPartSelect"--> |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | <el-input v-model="form.partcode" placeholder="请输入" style="width: 200px" /> |
| | | |
| | | <!-- <el-select--> |
| | | <!-- v-model="form.partcode"--> |
| | | <!-- filterable--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="partChange"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in partArr"--> |
| | | <!-- :key="item.partcode"--> |
| | | <!-- :label="item.partname+'/'+item.partcode"--> |
| | | <!-- :value="item.partcode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="form.partname" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号" style=" display: flex;"> |
| | | <el-input v-model="form.partspec" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="mesSetting.route" |
| | | label="工艺路线" |
| | | style="display: flex;" |
| | | > |
| | | <el-select |
| | | v-model="form.routecode" |
| | | filterable |
| | | :disabled="form.partcode===''" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="routeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in routeArr" |
| | | :key="item.route_code" |
| | | :label="item.route_name" |
| | | :value="item.route_code" |
| | | /> |
| | | </el-select> |
| | | <el-input v-model="form.routename" placeholder="请输入" style="width: 200px" /> |
| | | <!-- <el-select--> |
| | | <!-- v-model="form.routecode"--> |
| | | <!-- filterable--> |
| | | <!-- :disabled="form.partcode===''"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="routeChange"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in routeArr"--> |
| | | <!-- :key="item.route_code"--> |
| | | <!-- :label="item.route_name"--> |
| | | <!-- :value="item.route_code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | <el-form-item label="关联工序" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.stepcode" |
| | | :disabled="mesSetting.route?form.routecode==='':form.partcode===''" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in stepArr" |
| | | :key="item.step_code" |
| | | :label="item.step_name" |
| | | :value="item.step_code" |
| | | /> |
| | | </el-select> |
| | | <el-form-item v-show="isExpandForm" label="工序名称" style=" display: flex;"> |
| | | <el-input v-model="form.stepname" placeholder="请输入" style="width: 200px" /> |
| | | <!-- <el-select--> |
| | | <!-- v-model="form.stepcode"--> |
| | | <!-- :disabled="mesSetting.route?form.routecode==='':form.partcode===''"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in stepArr"--> |
| | | <!-- :key="item.step_code"--> |
| | | <!-- :label="item.step_name"--> |
| | | <!-- :value="item.step_code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | |
| | | <!--按工序--> |
| | |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | /> |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | |
| | | :key="tableTimeStampArrayKey" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | |
| | | <div v-else-if="item.prop==='eqp_value'||item.prop==='stand_value'"> |
| | | {{ row[item.prop] }} 秒 |
| | | </div> |
| | | <div v-else-if="item.prop==='unprice'">{{ row[item.prop] }}</div> |
| | | <div v-else>{{ row[item.prop] }}</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | |
| | | <el-form ref="dialogForm" inline :model="dialogForm" label-width="100px"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px" /> |
| | | <el-form-item prop="partcode" label="产品名称/编码"> |
| | | <el-select |
| | | v-show="operation==='add'" |
| | | v-model="dialogForm.partcode" |
| | | filterable |
| | | style="width: 220px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | @change="partDialogChange" |
| | | > |
| | | <!-- @focus="getPartSelect2"--> |
| | | <el-option |
| | | v-for="item in partArr2" |
| | | :key="item.partcode" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | <el-input |
| | | v-show="operation!=='add'" |
| | | v-model="editPartName" |
| | | disabled |
| | | style="width: 220px" |
| | | /> |
| | | <el-button |
| | | v-if="operation==='add'" |
| | | v-waves |
| | | type="primary" |
| | | style="width: 200px" |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="selectSuitpart" |
| | | >选择物料 |
| | | </el-button> |
| | | |
| | | <!-- <el-select--> |
| | | <!-- v-show="operation==='add'"--> |
| | | <!-- v-model="dialogForm.partcode"--> |
| | | <!-- filterable--> |
| | | <!-- style="width: 220px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- @change="partDialogChange"--> |
| | | <!-- >--> |
| | | <!-- <!– @focus="getPartSelect2"–>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in partArr2"--> |
| | | <!-- :key="item.partcode"--> |
| | | <!-- :label="item.partname+'/'+item.partcode"--> |
| | | <!-- :value="item.partcode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- <el-input--> |
| | | <!-- v-show="operation!=='add'"--> |
| | | <!-- v-model="editPartName"--> |
| | | <!-- disabled--> |
| | | <!-- style="width: 220px"--> |
| | | <!-- />--> |
| | | </el-form-item> |
| | | <div v-if="dialogForm.partcode.toString().trim().length>0" style="height: 34px;"> |
| | | {{ operation=='add'?"已选择":"" }} {{ dialogForm.partcode }} {{ dialogForm.partname }} |
| | | </div> |
| | | <el-form-item v-if="mesSetting.route" prop="routecode" label="工艺路线"> |
| | | <el-select |
| | | v-show="operation==='add'" |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--选择物料--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="dialogForm.suitobject==='P'?'选择物料':'选择物料类别'" |
| | | :visible.sync="dialogVisibleSuitobject" |
| | | width="1460px" |
| | | :close-on-click-modal="false" |
| | | top="5vh" |
| | | @closed="handleCloseSuitobject" |
| | | @close="handleCloseSuitobject" |
| | | > |
| | | |
| | | <div style="display: flex"> |
| | | <div style="width: 300px;margin-right: 20px;background:#fff"> |
| | | |
| | | <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;"> |
| | | <div style="display: flex;"> |
| | | <div |
| | | style="width: 5px;height: 100%;border-radius: 5px;" |
| | | :style="{background:$store.state.settings.theme}" |
| | | /> |
| | | <div style="margin-left: 8px;">存货档案</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-tree |
| | | ref="treeLeftRef" |
| | | style="padding: 10px;overflow: auto;height: 600px;" |
| | | :data="treeLeft" |
| | | node-key="code" |
| | | highlight-current |
| | | :props="defaultPropsLeft" |
| | | :default-expand-all="true" |
| | | :expand-on-click-node="false" |
| | | @node-click="getTMaterielData" |
| | | /> |
| | | </div> |
| | | <div |
| | | style=" width:calc(100% - 300px);" |
| | | > |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="suitobjectForm" |
| | | :model="suitobjectForm" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="存货编码" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partcode" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货名称" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partname" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货规格" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partspec" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | </div> |
| | | <div class="bodySearchReset"> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | >查询 |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | type="info" |
| | | icon="el-icon-refresh" |
| | | @click="resetSuitobject" |
| | | >重置 |
| | | </el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef3" |
| | | class="tableFixed" |
| | | :data="suitobjectTableData" |
| | | height="520" |
| | | border |
| | | row-class-name="custom-row" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | row-key="partcode" |
| | | @row-click="rowClick2" |
| | | > |
| | | |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="dialogForm.partcode" |
| | | :label="row.partcode" |
| | | style="color: transparent;padding-left: 10px;" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="70" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="存货编码" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="存货名称" |
| | | show-tooltip-when-overflow |
| | | min-width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="规格型号" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.partspec ? row.partspec : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idinventoryclassname" |
| | | label="所属类别" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <!--分页--> |
| | | <pagination |
| | | :total="suitobjectTotal" |
| | | :page.sync="suitobjectForm.page" |
| | | :limit.sync="suitobjectForm.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancelSuitobject">返 回</el-button> |
| | | <el-button |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirmSuitobject" |
| | | >确 认</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | |
| | | import { TMaterielClassTree, TMaterielData } from '@/api/ProductModel' |
| | | import arrayToTree from 'array-to-tree' |
| | | export default { |
| | | name: 'MeterPrice', |
| | | components: { |
| | |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mesSetting: JSON.parse(localStorage.getItem('mesSetting')), |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | partcode: '', // 产品编码 |
| | | routecode: '', // 工艺路线编码 |
| | | stepcode: '', // 工序编码 |
| | | partname: '', |
| | | partspec: '', |
| | | routename: '', // 工艺路线编码 |
| | | stepname: '', // 工序编码 |
| | | |
| | | prop: 'partcode', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | |
| | | editPartName: '', // 编辑时产品名称 |
| | | editRouteName: '', // 编辑时工艺路线名称 |
| | | editStepName: '', // 编辑时加工工序名称 |
| | | operation: '' |
| | | operation: '', |
| | | |
| | | dialogVisibleSuitobject: false, |
| | | treeLeft: [ |
| | | { |
| | | code: '-1', |
| | | name: '全部' |
| | | } |
| | | ], // 左侧树 |
| | | treeLeftArr: [], |
| | | defaultPropsLeft: { |
| | | children: 'children', |
| | | label: 'name' |
| | | }, |
| | | |
| | | suitobjectTableData: [], |
| | | suitobjectForm: { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | }, |
| | | suitobjectTotal: 0 |
| | | |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | selectSuitpart() { |
| | | this.dialogVisibleSuitobject = true |
| | | this.$nextTick(() => { |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }) |
| | | }, |
| | | handleCloseSuitobject() { |
| | | this.suitobjectForm = { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | } |
| | | }, |
| | | dialogVisibleCancelSuitobject() { |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | async dialogVisibleConfirmSuitobject() { |
| | | await this.partDialogChange(this.dialogForm.partcode) |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | rowClick2(row, event, column) { |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.partname = this.suitobjectTableData.find(i => i.partcode === row.partcode).partname |
| | | // this.dialogForm.partspec = this.partcodeArr.find(i => i.partcode === row.partcode).partspec |
| | | }, |
| | | |
| | | resetSuitobject() { |
| | | this.suitobjectForm.inventoryclasscode = '' |
| | | this.suitobjectForm.partcode = '' |
| | | this.suitobjectForm.partname = '' |
| | | this.suitobjectForm.partspec = '' |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }, |
| | | async getTMaterielClassTree() { |
| | | const res = await TMaterielClassTree() |
| | | res.data.forEach(i => { |
| | | i.idparent = i.idparent ? i.idparent : '-1' |
| | | }) |
| | | this.treeLeftArr = res.data |
| | | this.treeLeftArr.forEach(e => { |
| | | e.name = e.code + ' ' + e.name |
| | | }) |
| | | this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), { |
| | | parentProperty: 'idparent', |
| | | customID: 'code', |
| | | childrenProperty: 'children' |
| | | }) |
| | | }, |
| | | async getTMaterielData(node) { |
| | | const result = this.getChildrenCodeMethod(node, []) |
| | | if (result.includes('-1')) { |
| | | result.shift() |
| | | } |
| | | this.suitobjectForm.inventoryclasscode = result.join(',') |
| | | const res = await TMaterielData(this.suitobjectForm) |
| | | |
| | | this.suitobjectTableData = res.data |
| | | this.suitobjectTotal = res.count |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef3.doLayout() |
| | | }) |
| | | }, |
| | | // 递归取子集的所有code |
| | | getChildrenCodeMethod(node, result) { |
| | | result.push(node.code) |
| | | if (node.children && node.children.length > 0) { |
| | | node.children.forEach(i => { |
| | | this.getChildrenCodeMethod(i, result) |
| | | }) |
| | | } |
| | | return result |
| | | }, |
| | | |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | |
| | | this.getBeatRateSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getPartSelect() |
| | | this.getTMaterielClassTree() |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // 重置 |
| | | reset() { |
| | | this.form.partcode = '' |
| | | this.form.routecode = '' |
| | | this.form.stepcode = '' |
| | | this.form.partname = '' |
| | | this.form.partspec = '' |
| | | this.form.routename = '' |
| | | this.form.stepname = '' |
| | | |
| | | this.getBeatRateSearch() |
| | | }, |
| | | async partDialogChange(val) { |
| | |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.editPartName = row.partname |
| | | this.dialogForm.partname = row.partname |
| | | this.editRouteName = row.route_name |
| | | this.editStepName = row.stepname |
| | | |
| | |
| | | this.stepDialogArr = [] |
| | | |
| | | this.$refs.dialogForm.clearValidate() |
| | | this.getBeatRateSearch() |
| | | // this.getBeatRateSearch() |
| | | }, |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 195 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | if (window.innerHeight < 769) { |
| | | this.tableHeight = this.tableHeight - 40 |
| | | } |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .elTableDiv { |
| | | ::v-deep .el-radio__label { |
| | | display: none !important; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | |
| | | <span>浙江优步体育用品股份有限公司</span> |
| | | </div> |
| | | |
| | | <div class="kb_headTime kb_header_text" style="top: 35px;left: 828px"> |
| | | <span>车间数字化看板</span> |
| | | <!-- <div class="kb_headTime kb_header_text" style="top: 35px;left: 828px">--> |
| | | <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px"> |
| | | <!-- <span>车间数字化看板</span>--> |
| | | <span>{{ title }}数字化看板</span> |
| | | </div> |
| | | |
| | | <div class="kb_headTime" style="top: 35px;right: 25px"> |
| | |
| | | WorkShopProduceBottomRightData, |
| | | WorkShopProduceTopData |
| | | } from '@/api/kanbanManager' |
| | | import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData' |
| | | |
| | | export default { |
| | | name: 'Cjsc', |
| | |
| | | columnWidth: [200, 140, 350, 350, 130, 130, 130, 130, 130, 130, 130], |
| | | align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'] |
| | | // carousel: 'page' |
| | | } |
| | | }, |
| | | wkshopcode: '', |
| | | title: '' |
| | | |
| | | } |
| | | }, |
| | |
| | | }, 1000 * 60 * 120) |
| | | }, |
| | | async mounted() { |
| | | const res = await PrentOrganizationNoCompany() |
| | | |
| | | if (window.location.hash.indexOf('?') !== -1) { |
| | | const code = window.location.hash.split('?')[1].split('=')[1] |
| | | this.title = res.data.find(i => i.torg_code === code).torg_name |
| | | this.wkshopcode = code |
| | | } |
| | | |
| | | await this.getWorkShopProduceTopData() |
| | | setInterval(() => { |
| | | this.getWorkShopProduceTopData() |
| | |
| | | }, |
| | | methods: { |
| | | async getWorkShopProduceTopData() { |
| | | WorkShopProduceTopData({ wkshopcode: '1' }).then(res => { |
| | | WorkShopProduceTopData({ wkshopcode: this.wkshopcode }).then(res => { |
| | | const flag = this.compareArrays(this.configTableTop.data, res.data) |
| | | if (!flag) { |
| | | this.configTableTop.data = res.data.map(i => |
| | |
| | | // { code: '04', name: '喷漆' }, |
| | | // { code: '05', name: '组装成品' } |
| | | |
| | | { code: '1', name: '生产部' } |
| | | { code: this.wkshopcode, name: '生产部' } |
| | | ] |
| | | |
| | | const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: temp.map(i => i.code).join(',') }) |
| | | // this.cjzl03_xData = res4.data['101,001'].map(i => i.click_date) |
| | | // this.cjzl03_yData = res4.data['101,001'].map(i => i.count) |
| | | |
| | | const a = res4.data['1'].map(i => i.click_date) // echarts横坐标 |
| | | const a = res4.data[this.wkshopcode].map(i => i.click_date) // echarts横坐标 |
| | | const b = temp.map(i => i.name)// legendData值 |
| | | const c = [ |
| | | // res4.data['01'].map(i => i.count), |
| | |
| | | // res4.data['03'].map(i => i.count), |
| | | // res4.data['04'].map(i => i.count), |
| | | // res4.data['05'].map(i => i.count) |
| | | res4.data['1'].map(i => i.count) |
| | | res4.data[this.wkshopcode].map(i => i.count) |
| | | ]// 纵坐标值 |
| | | |
| | | loadEcharts('cjzl03', cjzl03(a, b, c)) |
| | |
| | | // { code: '04', name: '喷漆' }, |
| | | // { code: '05', name: '组装成品' } |
| | | |
| | | { code: '1', name: '生产部' } |
| | | { code: this.wkshopcode, name: '生产部' } |
| | | ] |
| | | const res5 = await WorkShopProduceBottomRightData({ wkshopcode: temp.map(i => i.code).join(',') }) |
| | | this.RightBottom = res5.data |
| | |
| | | }, 1000 * 40) |
| | | |
| | | const temp2 = [ |
| | | { wkshp_code: 'CJ001', wkshp_name: '金工车间' }, |
| | | { wkshp_code: 'YBCS003', wkshp_name: '优步生产部' } |
| | | { wkshp_code: '1001', wkshp_name: '金工车间' }, |
| | | { wkshp_code: '1003', wkshp_name: '装配车间' } |
| | | ] |
| | | |
| | | // 左下 生产订单 |
| | |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | row-key="partcode" |
| | | @sort-change="sortChange" |
| | | @select="handleSelectionChange" |
| | | @select-all="handleAllChange" |
| | | > |
| | |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="存货编码" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="存货名称" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="规格型号" |
| | | |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.partspec ? row.partspec : '/' }} |
| | |
| | | <el-table-column |
| | | prop="idinventoryclassname" |
| | | label="所属类别" |
| | | sortable="custom" |
| | | /> |
| | | |
| | | </el-table> |
| | |
| | | > |
| | | |
| | | <el-form inline label-width="110px" style="display:flex"> |
| | | |
| | | <el-form-item label="工单号"> |
| | | <el-input v-model="rowData.wo_code" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | |
| | | style="width: 100%;height: 80vh" |
| | | frameborder="0" |
| | | /> |
| | | |
| | | <!-- <pdf--> |
| | | <!-- v-for="item in numPages"--> |
| | | <!-- :key="item"--> |
| | |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="产品信息" prop="partcode"> |
| | | <el-select |
| | | v-model="dialogForm.partcode" |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | @change="partcodeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in partcodeArr" |
| | | :key="item.partcode" |
| | | :label="item.partname+' / '+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="selectSuitpart" |
| | | >选择物料 |
| | | </el-button> |
| | | <div v-if="dialogForm.partcode.toString().trim().length>0"> |
| | | 已选择{{ dialogForm.partcode }} {{ dialogForm.partname }} |
| | | </div> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.partcode"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- filterable--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- @change="partcodeChange"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in partcodeArr"--> |
| | | <!-- :key="item.partcode"--> |
| | | <!-- :label="item.partname+' / '+item.partcode"--> |
| | | <!-- :value="item.partcode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="mesSetting.route" |
| | |
| | | :on-exceed="handleExceed" |
| | | :auto-upload="false" |
| | | :multiple="false" |
| | | accept=".mp4,.pdf,.png,.jpeg,.jpg" |
| | | > |
| | | <!-- accept=".mp4,.pdf,.png,.jpeg,.jpg"--> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--选择物料--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="dialogForm.suitobject==='P'?'选择物料':'选择物料类别'" |
| | | :visible.sync="dialogVisibleSuitobject" |
| | | width="1460px" |
| | | :close-on-click-modal="false" |
| | | top="5vh" |
| | | @closed="handleCloseSuitobject" |
| | | @close="handleCloseSuitobject" |
| | | > |
| | | |
| | | <div style="display: flex"> |
| | | <div style="width: 300px;margin-right: 20px;background:#fff"> |
| | | |
| | | <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;"> |
| | | <div style="display: flex;"> |
| | | <div |
| | | style="width: 5px;height: 100%;border-radius: 5px;" |
| | | :style="{background:$store.state.settings.theme}" |
| | | /> |
| | | <div style="margin-left: 8px;">存货档案</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-tree |
| | | ref="treeLeftRef" |
| | | style="padding: 10px;overflow: auto;height: 600px;" |
| | | :data="treeLeft" |
| | | node-key="code" |
| | | highlight-current |
| | | :props="defaultPropsLeft" |
| | | :default-expand-all="true" |
| | | :expand-on-click-node="false" |
| | | @node-click="getTMaterielData" |
| | | /> |
| | | </div> |
| | | <div |
| | | style=" width:calc(100% - 300px);" |
| | | > |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="suitobjectForm" |
| | | :model="suitobjectForm" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="存货编码" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partcode" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货名称" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partname" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货规格" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partspec" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | </div> |
| | | <div class="bodySearchReset"> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | >查询 |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | type="info" |
| | | icon="el-icon-refresh" |
| | | @click="resetSuitobject" |
| | | >重置 |
| | | </el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef3" |
| | | class="tableFixed" |
| | | :data="suitobjectTableData" |
| | | height="520" |
| | | border |
| | | row-class-name="custom-row" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | row-key="partcode" |
| | | @row-click="rowClick2" |
| | | > |
| | | |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="dialogForm.partcode" |
| | | :label="row.partcode" |
| | | style="color: transparent;padding-left: 10px;" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="70" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="存货编码" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="存货名称" |
| | | show-tooltip-when-overflow |
| | | min-width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="规格型号" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.partspec ? row.partspec : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idinventoryclassname" |
| | | label="所属类别" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <!--分页--> |
| | | <pagination |
| | | :total="suitobjectTotal" |
| | | :page.sync="suitobjectForm.page" |
| | | :limit.sync="suitobjectForm.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancelSuitobject">返 回</el-button> |
| | | <el-button |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirmSuitobject" |
| | | >确 认</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { ProcessSopAddSeave, ProcessSopDeleteSeave, ProcessSopSearch, ProcessSopMaxVersion } from '@/api/SopManager' |
| | | import waves from '@/directive/waves' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import { PartSelect } from '@/api/ProductModel' |
| | | import { PartSelect, TMaterielClassTree, TMaterielData } from '@/api/ProductModel' |
| | | import { PartSelectRpute, RouteSelectStep } from '@/api/basicSettings' |
| | | import arrayToTree from 'array-to-tree' |
| | | |
| | | export default { |
| | | name: 'SopRoute', |
| | |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | partcode: '', // 设备类型编码 |
| | | partname: '', // |
| | | |
| | | route: '', // 物料编码 |
| | | stepcode: '', |
| | | defilename: '', |
| | |
| | | { code: 'P002', name: '检验指导书' }, |
| | | { code: 'P003', name: '图纸' } |
| | | ], |
| | | mesSetting: JSON.parse(localStorage.getItem('mesSetting')) |
| | | mesSetting: JSON.parse(localStorage.getItem('mesSetting')), |
| | | |
| | | dialogVisibleSuitobject: false, |
| | | treeLeft: [ |
| | | { |
| | | code: '-1', |
| | | name: '全部' |
| | | } |
| | | ], // 左侧树 |
| | | treeLeftArr: [], |
| | | defaultPropsLeft: { |
| | | children: 'children', |
| | | label: 'name' |
| | | }, |
| | | |
| | | suitobjectTableData: [], |
| | | suitobjectForm: { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | }, |
| | | suitobjectTotal: 0 |
| | | |
| | | } |
| | | }, |
| | |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | this.getProcessSopSearch() |
| | | this.getPartSelect() |
| | | // this.getPartSelect() |
| | | this.getTMaterielClassTree() |
| | | }, |
| | | created() { |
| | | this.getProcessSopSearch() |
| | | this.getPartSelect() |
| | | // this.getPartSelect() |
| | | this.getTMaterielClassTree() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | selectSuitpart() { |
| | | this.dialogVisibleSuitobject = true |
| | | this.$nextTick(() => { |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }) |
| | | }, |
| | | handleCloseSuitobject() { |
| | | this.suitobjectForm = { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | } |
| | | }, |
| | | dialogVisibleCancelSuitobject() { |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | async dialogVisibleConfirmSuitobject() { |
| | | await this.partcodeChange(this.dialogForm.partcode) |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | rowClick2(row, event, column) { |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.partname = this.suitobjectTableData.find(i => i.partcode === row.partcode).partname |
| | | // this.dialogForm.partspec = this.partcodeArr.find(i => i.partcode === row.partcode).partspec |
| | | }, |
| | | |
| | | resetSuitobject() { |
| | | this.suitobjectForm.inventoryclasscode = '' |
| | | this.suitobjectForm.partcode = '' |
| | | this.suitobjectForm.partname = '' |
| | | this.suitobjectForm.partspec = '' |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }, |
| | | async getTMaterielClassTree() { |
| | | const res = await TMaterielClassTree() |
| | | res.data.forEach(i => { |
| | | i.idparent = i.idparent ? i.idparent : '-1' |
| | | }) |
| | | this.treeLeftArr = res.data |
| | | this.treeLeftArr.forEach(e => { |
| | | e.name = e.code + ' ' + e.name |
| | | }) |
| | | this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), { |
| | | parentProperty: 'idparent', |
| | | customID: 'code', |
| | | childrenProperty: 'children' |
| | | }) |
| | | }, |
| | | async getTMaterielData(node) { |
| | | const result = this.getChildrenCodeMethod(node, []) |
| | | if (result.includes('-1')) { |
| | | result.shift() |
| | | } |
| | | this.suitobjectForm.inventoryclasscode = result.join(',') |
| | | const res = await TMaterielData(this.suitobjectForm) |
| | | |
| | | this.suitobjectTableData = res.data |
| | | this.suitobjectTotal = res.count |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef3.doLayout() |
| | | }) |
| | | }, |
| | | // 递归取子集的所有code |
| | | getChildrenCodeMethod(node, result) { |
| | | result.push(node.code) |
| | | if (node.children && node.children.length > 0) { |
| | | node.children.forEach(i => { |
| | | this.getChildrenCodeMethod(i, result) |
| | | }) |
| | | } |
| | | return result |
| | | }, |
| | | |
| | | async getPartSelect() { |
| | | const { data: res } = await PartSelect() |
| | | this.partcodeArr = res |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .elTableDiv { |
| | | ::v-deep .el-radio__label { |
| | | display: none !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |
| | | |
| | | </style> |
| | |
| | | label="产品名称/编码" |
| | | prop="partcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.partcode" |
| | | filterable |
| | | :disabled="operation!=='add'" |
| | | :popper-append-to-body="false" |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="partcodeChangeDialog" |
| | | > |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="selectSuitpart" |
| | | >选择物料</el-button> |
| | | <div v-if="dialogForm.partcode.toString().trim().length>0"> |
| | | 已选择{{ dialogForm.partcode }} {{ dialogForm.partname }} |
| | | </div> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.partcode"--> |
| | | <!-- filterable--> |
| | | <!-- :disabled="operation!=='add'"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="partcodeChangeDialog"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in partArr"--> |
| | | <!-- :key="item.partcode"--> |
| | | <!-- :label="item.partname+'/'+item.partcode"--> |
| | | <!-- :value="item.partcode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-if="operation!=='add'" label="产品名称" prop="partname">--> |
| | | <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />--> |
| | |
| | | label="产品名称" |
| | | prop="partcode" |
| | | > |
| | | <div style="width: 200px;">{{ partArr.find(item => item.partcode === i.partcode).partname }}</div> |
| | | <div style="width: 200px;">{{ suitobjectTableData.find(item => item.partcode === i.partcode).partname }}</div> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="产品编码" |
| | |
| | | |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | | <div style="width: 200px;">{{ |
| | | partArr.find(item => item.partcode === i.partcode).partspec ? partArr.find(item => item.partcode === i.partcode).partspec : '/' |
| | | suitobjectTableData.find(item => item.partcode === i.partcode).partspec ? suitobjectTableData.find(item => item.partcode === i.partcode).partspec : '/' |
| | | }} |
| | | </div> |
| | | </el-form-item> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--选择物料--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="dialogForm.suitobject==='P'?'选择物料':'选择物料类别'" |
| | | :visible.sync="dialogVisibleSuitobject" |
| | | width="1460px" |
| | | :close-on-click-modal="false" |
| | | top="5vh" |
| | | @closed="handleCloseSuitobject" |
| | | @close="handleCloseSuitobject" |
| | | > |
| | | |
| | | <div style="display: flex"> |
| | | <div style="width: 300px;margin-right: 20px;background:#fff"> |
| | | |
| | | <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;"> |
| | | <div style="display: flex;"> |
| | | <div |
| | | style="width: 5px;height: 100%;border-radius: 5px;" |
| | | :style="{background:$store.state.settings.theme}" |
| | | /> |
| | | <div style="margin-left: 8px;">存货档案</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-tree |
| | | ref="treeLeftRef" |
| | | style="padding: 10px;overflow: auto;height: 600px;" |
| | | :data="treeLeft" |
| | | node-key="code" |
| | | highlight-current |
| | | :props="defaultPropsLeft" |
| | | :default-expand-all="true" |
| | | :expand-on-click-node="false" |
| | | @node-click="getTMaterielData" |
| | | /> |
| | | </div> |
| | | <div |
| | | style=" width:calc(100% - 300px);" |
| | | > |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="suitobjectForm" |
| | | :model="suitobjectForm" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="存货编码" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partcode" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货名称" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partname" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货规格" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partspec" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | </div> |
| | | <div class="bodySearchReset"> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | >查询 |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | type="info" |
| | | icon="el-icon-refresh" |
| | | @click="resetSuitobject" |
| | | >重置 |
| | | </el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef3" |
| | | class="tableFixed" |
| | | :data="suitobjectTableData" |
| | | height="520" |
| | | border |
| | | row-class-name="custom-row" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | row-key="partcode" |
| | | @row-click="rowClick2" |
| | | > |
| | | |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="dialogForm.partcode" |
| | | :label="row.partcode" |
| | | style="color: transparent;padding-left: 10px;" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="70" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="存货编码" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="存货名称" |
| | | show-tooltip-when-overflow |
| | | min-width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="规格型号" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.partspec ? row.partspec : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idinventoryclassname" |
| | | label="所属类别" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <!--分页--> |
| | | <pagination |
| | | :total="suitobjectTotal" |
| | | :page.sync="suitobjectForm.page" |
| | | :limit.sync="suitobjectForm.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancelSuitobject">返 回</el-button> |
| | | <el-button |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirmSuitobject" |
| | | >确 认</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch, |
| | | UpdateMesOrderStepSearch |
| | | } from '@/api/WorkOrder' |
| | | import { PartSelect } from '@/api/ProductModel' |
| | | import { PartSelect, TMaterielClassTree, TMaterielData } from '@/api/ProductModel' |
| | | import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData' |
| | | import Sortable from 'sortablejs' |
| | | import ElDragSelect from '@/components/DragSelect' |
| | |
| | | import DateType from '@/components/DateType' |
| | | import { PartSelectRpute, PartSelectRputeList, RouteSelectStep, RouteSelectStepList } from '@/api/basicSettings' |
| | | import { DeviceSopSearch } from '@/api/DeviceManager' |
| | | import arrayToTree from 'array-to-tree' |
| | | |
| | | export default { |
| | | name: 'WorkOrderList', |
| | |
| | | partCode: '', |
| | | |
| | | dialogVisibleBatchUpdate: false, // 批量修改 |
| | | formData3: [] |
| | | formData3: [], |
| | | |
| | | dialogVisibleSuitobject: false, |
| | | treeLeft: [ |
| | | { |
| | | code: '-1', |
| | | name: '全部' |
| | | } |
| | | ], // 左侧树 |
| | | treeLeftArr: [], |
| | | defaultPropsLeft: { |
| | | children: 'children', |
| | | label: 'name' |
| | | }, |
| | | |
| | | suitobjectTableData: [], |
| | | suitobjectForm: { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | }, |
| | | suitobjectTotal: 0 |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | // }) |
| | | }, |
| | | methods: { |
| | | selectSuitpart() { |
| | | this.dialogVisibleSuitobject = true |
| | | this.$nextTick(() => { |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }) |
| | | }, |
| | | handleCloseSuitobject() { |
| | | this.suitobjectForm = { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | } |
| | | }, |
| | | dialogVisibleCancelSuitobject() { |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | dialogVisibleConfirmSuitobject() { |
| | | this.dialogForm.routecode = '' |
| | | |
| | | if (this.mesSetting.route) { |
| | | this.getPartcodeChangeDialog() |
| | | } else { |
| | | this.getBasicProcessData() |
| | | } |
| | | |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | rowClick2(row, event, column) { |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.partname = this.suitobjectTableData.find(i => i.partcode === row.partcode).partname |
| | | this.dialogForm.partspec = this.suitobjectTableData.find(i => i.partcode === row.partcode).partspec |
| | | }, |
| | | |
| | | resetSuitobject() { |
| | | this.suitobjectForm.inventoryclasscode = '' |
| | | this.suitobjectForm.partcode = '' |
| | | this.suitobjectForm.partname = '' |
| | | this.suitobjectForm.partspec = '' |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }, |
| | | async getTMaterielClassTree() { |
| | | const res = await TMaterielClassTree() |
| | | res.data.forEach(i => { |
| | | i.idparent = i.idparent ? i.idparent : '-1' |
| | | }) |
| | | this.treeLeftArr = res.data |
| | | this.treeLeftArr.forEach(e => { |
| | | e.name = e.code + ' ' + e.name |
| | | }) |
| | | this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), { |
| | | parentProperty: 'idparent', |
| | | customID: 'code', |
| | | childrenProperty: 'children' |
| | | }) |
| | | }, |
| | | async getTMaterielData(node) { |
| | | const result = this.getChildrenCodeMethod(node, []) |
| | | if (result.includes('-1')) { |
| | | result.shift() |
| | | } |
| | | this.suitobjectForm.inventoryclasscode = result.join(',') |
| | | const res = await TMaterielData(this.suitobjectForm) |
| | | |
| | | this.suitobjectTableData = res.data |
| | | this.suitobjectTotal = res.count |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef3.doLayout() |
| | | }) |
| | | }, |
| | | // 递归取子集的所有code |
| | | getChildrenCodeMethod(node, result) { |
| | | result.push(node.code) |
| | | if (node.children && node.children.length > 0) { |
| | | node.children.forEach(i => { |
| | | this.getChildrenCodeMethod(i, result) |
| | | }) |
| | | } |
| | | return result |
| | | }, |
| | | |
| | | mesqtyInputChange(val) { |
| | | if (this.stepTableData && this.stepTableData.length > 0) { |
| | | this.stepTableData.forEach(i => { |
| | |
| | | if (res.code === '200') { |
| | | this.getSelect() |
| | | this.getPrentOrganizationNoCompany() |
| | | this.getTMaterielClassTree() |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | async getSelect() { |
| | | // 获取产品信息 |
| | | const { data: res1 } = await PartSelect() |
| | | this.partArr = res1 |
| | | // const { data: res1 } = await PartSelect() |
| | | // this.partArr = res1 |
| | | |
| | | // 获取组织 |
| | | const { data: res2 } = await PrentOrganization() |
| | |
| | | this.routecodeArr = res |
| | | |
| | | // if (this.mesSetting.route) { // 按工艺路线走模式 |
| | | this.dialogForm.routecode = this.partArr.find(item => item.partcode === this.dialogForm.partcode).default_route |
| | | this.dialogForm.routecode = this.suitobjectTableData.find(item => item.partcode === this.dialogForm.partcode).default_route |
| | | if (this.dialogForm.routecode && !this.sourceType) { |
| | | await this.routecodeChange() |
| | | } else { |