Merge remote-tracking branch 'origin/master'
| | |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function deleteSchedul(mId) { |
| | | return request({ |
| | | url: '/mes/productionSchedul/'+mId, |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | export function updateSchedul(data) { |
| | | return request({ |
| | | url: '/mes/productionSchedul/updateByMId', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | }, |
| | | created() { |
| | | this.sysTitle = localStorage.getItem('SYSTEM_LOGO_TITLE') |
| | | console.log('userInfouserInfo', this.userInfo) |
| | | // this.getLogoInfo() |
| | | }, |
| | | methods: { |
| | |
| | | @selection-change="selectionRow" |
| | | :table-loading="loading"> |
| | | <template #menu="{ row, index }"> |
| | | <el-button type="text" icon="el-icon-edit" size="small" @click="editHandle(row, index)">编辑</el-button> |
| | | <el-button type="text" icon="el-icon-delete" size="small" @click="deleteHandle(row, index)">删除</el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | <el-button type="primary" @click="confirmEditSchedul">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="编辑" |
| | | :visible.sync="editDialogVisible" |
| | | width="50%"> |
| | | <el-form :model="editForm" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产情况:"> |
| | | <el-input style="width:100%" placeholder="请输入生产情况" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产程度:"> |
| | | <el-input style="width:100%" placeholder="请输入生产程度" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editDialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmEdit()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | fetchScheduleList, |
| | | fetchScheduleById, |
| | | fillTime |
| | | fillTime, |
| | | deleteSchedul, |
| | | updateSchedul |
| | | } from '@/api//plan/productionschedul' |
| | | import TableForm from './template-form' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | editForm:{ |
| | | id: null, |
| | | productionRoutine: null, |
| | | productionStatus: null, |
| | | }, |
| | | editDialogVisible: false, |
| | | dialogVisible: false, |
| | | scheduleList: [], |
| | | scheduleEditList: [], |
| | |
| | | selection: true, |
| | | columnBtn: false, |
| | | index: true, |
| | | rowKey: 'product', |
| | | indexFixed: false, |
| | | selectionFixed: false, |
| | | rowKey: 'mid', |
| | | indexLabel: '序号', |
| | | menuAlign: 'center', |
| | | menuWidth: 100, |
| | | menuWidth: 130, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | addBtn: false, |
| | |
| | | this.rowCalc() |
| | | }, |
| | | watch:{ |
| | | |
| | | editDialogVisible(newVal){ |
| | | if(!newVal){ |
| | | this.editForm = { |
| | | id: null, |
| | | productionRoutine: null, |
| | | productionStatus: null, |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | |
| | | beforeDestroy() { |
| | | }, |
| | | methods: { |
| | | confirmEdit(){ |
| | | const _than = this |
| | | updateSchedul(this.editForm).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.$message.success("更新成功") |
| | | _than.editDialogVisible = false |
| | | _than.getData() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error); |
| | | }) |
| | | }, |
| | | editHandle(row,index){ |
| | | if(row){ |
| | | this.editForm.id = row.mid |
| | | this.editForm.productionRoutine = row.productionRoutine |
| | | this.editForm.productionStatus = row.productionStatus |
| | | this.editDialogVisible = true |
| | | } |
| | | }, |
| | | openEditDialog(){ |
| | | this.scheduleEditList = JSON.parse(JSON.stringify(this.scheduleList)) |
| | | this.dialogVisible = true |
| | |
| | | confirmEditSchedul(){ |
| | | let data = this.scheduleEditList |
| | | let orderObj = this.multipleSelection[0] |
| | | console.log("data---",data) |
| | | console.log("orderObj-----",orderObj) |
| | | let obj = { |
| | | "documentActualTime": data[0].actualTime, |
| | | "documentPlanTime": data[0].planTime, |
| | |
| | | "productType": orderObj.productType, |
| | | "projectName": orderObj.projectName |
| | | } |
| | | console.log("obj----->>>",obj); |
| | | fillTime(obj).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("更新成功") |
| | |
| | | } |
| | | }, |
| | | selectionRow(val){ |
| | | console.log(val); |
| | | if (val.length > 1) { |
| | | const preVal = val.shift(); |
| | | this.$refs.crud.toggleRowSelection(preVal, false); |
| | |
| | | }, |
| | | // 删除 |
| | | deleteHandle(row,index) { |
| | | this.$confirm('是否确认删除', '提示', { |
| | | const _than = this |
| | | _than.$confirm('是否确认删除', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(function() { |
| | | |
| | | deleteSchedul(row.mid).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.$message.success("删除成功") |
| | | _than.getData() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }) |
| | | }, |
| | | //动态合并方法 |
| | |
| | | * 配置参考: |
| | | * https://cli.vuejs.org/zh/config/ |
| | | */ |
| | | //const url = 'http://192.168.2.7:9999' |
| | | const url = 'http://192.168.2.7:9999' |
| | | //const url = 'http://192.168.32.45:9999' |
| | | // const url = 'http://192.168.0.23:9999' |
| | | |
| | | const url = 'http://localhost:9999' |
| | | // const url = 'http://localhost:9999' |
| | | |
| | | |
| | | const localUrl = 'http://localhost:8089' |
| | |
| | | }, |
| | | // eslint-disable-next-line |
| | | configureWebpack: (config) => { |
| | | // if (process.env.NODE_ENV === 'production') { |
| | | // // 仅在生产环境下启用该配置 |
| | | // return { |
| | | // plugins: [ |
| | | // /*new MonacoWebpackPlugin({ |
| | | // languages: ['javascript', 'css', 'html', 'json'] |
| | | // }),*/ |
| | | // new CompressionWebpackPlugin({ |
| | | // filename: '[path].gz[query]', |
| | | // algorithm: 'gzip', |
| | | // test: new RegExp( |
| | | // '\\.(' + productionGzipExtensions.join('|') + ')$' |
| | | // ), |
| | | // threshold: 1024, // 只有大小大于该值的资源会被处理,当前配置为对于超过1k的数据进行处理,不足1k的可能会越压缩越大 |
| | | // minRatio: 0.99, // 只有压缩率小于这个值的资源才会被处理 |
| | | // deleteOriginalAssets: true // 删除原文件 |
| | | // }) |
| | | // ] |
| | | // } |
| | | // } |
| | | if (process.env.NODE_ENV === 'production') { |
| | | // 仅在生产环境下启用该配置 |
| | | return { |
| | | plugins: [ |
| | | /*new MonacoWebpackPlugin({ |
| | | languages: ['javascript', 'css', 'html', 'json'] |
| | | }),*/ |
| | | new CompressionWebpackPlugin({ |
| | | filename: '[path].gz[query]', |
| | | algorithm: 'gzip', |
| | | test: new RegExp( |
| | | '\\.(' + productionGzipExtensions.join('|') + ')$' |
| | | ), |
| | | threshold: 1024, // 只有大小大于该值的资源会被处理,当前配置为对于超过1k的数据进行处理,不足1k的可能会越压缩越大 |
| | | minRatio: 0.99, // 只有压缩率小于这个值的资源才会被处理 |
| | | deleteOriginalAssets: true // 删除原文件 |
| | | }) |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | // 配置转发代理 |
| | | devServer: { |