| | |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :table="table" |
| | | :uploadInfo="uploadInfo" |
| | | :ajaxFun="ajaxFun" |
| | | :prelang="prelang" |
| | | :options="options" |
| | |
| | | <el-form-item prop="name" label="模具名称"> |
| | | <el-input v-model="editRow.name" placeholder="请输入模具名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="drawingNo" label="模具图号"> |
| | | <el-input v-model="editRow.drawingNo" placeholder="请输入模具图号"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | |
| | | export default { |
| | | data(){ |
| | | return { |
| | | diaPrintTab: false, |
| | | editRules: { |
| | | code: [{required:true,message:'请输入模具编号',trigger:'blur'}], |
| | | name: [{required:true,message:'请输入模具名称',trigger:'blur'}] |
| | |
| | | code: null, |
| | | name: null, |
| | | }, |
| | | uploadInfo: { |
| | | // 是否展示上传EXCEL以及对应的url |
| | | isShow: true, |
| | | url: '/mes/mould/upload', |
| | | download: true, |
| | | fileName: '模具统计表' |
| | | }, |
| | | dialogVisible: false, |
| | | ajaxFun: fetchList, |
| | | prelang: 'moudle', |
| | | multipleSelection: [], |
| | | dataListLoading: false, |
| | | options: { |
| | | height: 300, // 默认高度-为了表头固定 |
| | |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'createUser', |
| | | label: '责任人', |
| | | prop: 'drawingNo', |
| | | label: '模具图号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'model', |
| | | label: '模具型号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'workShop', |
| | | label: '车间', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'select', |
| | | formatter: this.workShopFormatter, |
| | | optList: () => { |
| | | return this.workshopList |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'shelfNo', |
| | | label: '货架号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'erpOrder', |
| | | label: 'ERP订单号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'texture', |
| | | label: '材质', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'supplier', |
| | | label: '供应商', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'userTime', |
| | | label: '投入使用日期', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'date', |
| | | formatter: this.formatDateTime |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'serviceLife', |
| | | label: '使用寿命', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'number', |
| | | label: '已使用次数', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'person', |
| | | label: '责任人', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | |
| | | { |
| | | minWidth: '140px', |
| | | prop: 'createTime', |
| | |
| | | minWidth: 100 |
| | | }, |
| | | }, |
| | | workshopList: [] |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | components: { |
| | | ttable, |
| | | TableForm |
| | | }, |
| | | watch: { |
| | | dialogVisible(newVal){ |
| | |
| | | fun: this.addOrUpdateHandle |
| | | }) |
| | | } |
| | | if(this.permissions.equipment_mould_lableprint){ |
| | | this.table.toolbar.push({ |
| | | text: '标签打印', |
| | | type: 'primary', |
| | | fun: this.lableprint |
| | | }) |
| | | } |
| | | if(this.permissions.equipment_mould_del){ |
| | | this.table.operator = [{ |
| | | text: '删除', |
| | |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | this.table.operator = arr.length>0 ? arr : null |
| | | remote('work_shop').then((response) => { |
| | | if (response.data.code === 0) { |
| | | this.workshopList = response.data.data |
| | | } else { |
| | | this.workshopList = [] |
| | | } |
| | | }) |
| | | }, |
| | | mounted(){ |
| | | |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | deleteHandle(row){ |
| | | this.$confirm('是否确认删除模具名称为' + row.name, '提示', { |
| | | confirmButtonText: '确定', |
| | |
| | | this.$message.success('删除成功') |
| | | this.getData() |
| | | }) |
| | | }, |
| | | lableprint(){ |
| | | |
| | | }, |
| | | confirmSaveOrUpdateMould(){ |
| | | this.$refs.editForm.validate(valid=>{ |
| | |
| | | } |
| | | }) |
| | | }, |
| | | workShopFormatter(row, column, cellValue) { |
| | | this.workshopList.forEach((obj) => { |
| | | if (obj.value == cellValue) { |
| | | cellValue = obj.label |
| | | } |
| | | }) |
| | | return cellValue |
| | | }, |
| | | addOrUpdateHandle(row){ |
| | | if(row){ |
| | | this.editRow = row |