| | |
| | | }) |
| | | } |
| | | |
| | | export function fetchRecordsList(mId) { |
| | | return request({ |
| | | url: '/mes/productionSchedul/pageRecords/'+mId, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function fetchScheduleById(id) { |
| | | return request({ |
| | | url: '/mes/productionSchedul/selTime/'+id, |
| | |
| | | v-if="options.multiSelect && !isEdit" |
| | | style="width: 55px;" |
| | | :selectable="selectHandle" |
| | | |
| | | > |
| | | </el-table-column> |
| | | <!--单选框--> |
| | |
| | | //需要合并的字段集合 |
| | | mergeSpanArr: { |
| | | type: Array, |
| | | default: [] |
| | | default: ()=>{ |
| | | return [] |
| | | } |
| | | }, |
| | | toolbarMaxLength: { |
| | | type: Number, |
| | |
| | | <el-dropdown-item |
| | | :command="item.command" |
| | | v-for="item in orderTypeArr" |
| | | :key="item.value" |
| | | :disabled="item.disabled" |
| | | >{{ item.label }}</el-dropdown-item |
| | | > |
| | |
| | | <el-dropdown-item |
| | | :command="item.command" |
| | | v-for="item in stateTagArr" |
| | | :key="item.value" |
| | | :disabled="item.disabled" |
| | | >{{ item.label }}</el-dropdown-item |
| | | > |
| | |
| | | label: '自动新增', |
| | | command: 'AUTO', |
| | | disabled: false, |
| | | permitArr: ['01pending','04completed'] |
| | | permitArr: ['04completed'] |
| | | }) |
| | | } |
| | | this.getSysParam(sysParam.IS_REPORT_OPERATION) |
| | |
| | | this.stateTagArr[i].disabled = true |
| | | } |
| | | } |
| | | for (var i = 0; i < this.stateTagArr.length; i++) { |
| | | for (var i = 0; i < this.orderTypeArr.length; i++) { |
| | | if ( |
| | | uniqueStateArr.every((val) => |
| | | this.orderTypeArr[i].permitArr.length <= 0 |
| | |
| | | : this.orderTypeArr[i].permitArr.includes(val) |
| | | ) |
| | | ) { |
| | | this.orderTypeArr[i].disabled = false |
| | | } else { |
| | | this.orderTypeArr[i].disabled = true |
| | | } else { |
| | | this.orderTypeArr[i].disabled = false |
| | | } |
| | | } |
| | | this.masterPlanSelection = val |
| | |
| | | :ajaxFun="ajaxFun" |
| | | :paramObj="queryParams" |
| | | :mergeSpanArr="spanArr" |
| | | :selColValArr="paramSelArr" |
| | | :selCol="paramSelCol" |
| | | ref="ttable"> |
| | | <template #toolbar> |
| | | <el-dropdown @command="changeTable"> |
| | |
| | | </div> |
| | | </el-card> |
| | | </el-dialog> |
| | | <!-- 查看变更记录 --> |
| | | <el-dialog |
| | | title="变更记录" |
| | | :visible.sync="showRecordsDialog" |
| | | width="60%"> |
| | | <el-table border :data="recordsList"> |
| | | <el-table-column type="index" width="50" label="序号" align="center"/> |
| | | <el-table-column prop="createTime" min-width="120" show-overflow-tooltip label="操作时间" align="center"/> |
| | | <el-table-column prop="createUser" min-width="120" show-overflow-tooltip label="操作人" align="center"/> |
| | | <el-table-column prop="recordType" min-width="120" show-overflow-tooltip label="操作类型" align="center"/> |
| | | <el-table-column prop="oldRecord" min-width="200" show-overflow-tooltip label="旧值" align="center"/> |
| | | <el-table-column prop="newRecord" min-width="200" show-overflow-tooltip label="新值" align="center"/> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | fetchScheduleList, |
| | | fetchRecordsList, |
| | | fetchScheduleById, |
| | | fillTime, |
| | | deleteSchedul, |
| | |
| | | } from '@/api//plan/productionschedul' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { mapGetters } from 'vuex' |
| | | import { remote } from '@/api/admin/dict' |
| | | export default { |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | state: false |
| | | }, |
| | | showRecordsDialog: false, |
| | | recordsList: [], |
| | | paramSelArr: [false], |
| | | paramSelCol: 'hasEdit', |
| | | ajaxFun: fetchScheduleList, |
| | | prelang: 'productSchedul', |
| | | options: { |
| | |
| | | isRefresh: true, // 是否显示刷新按钮 |
| | | isShowHide: true, // 是否显示显影按钮H |
| | | isSearch: true, // 高级查询按钮 |
| | | defaultOrderBy: { column: 'createdTime', direction: 'desc' }, |
| | | defaultOrderBy: { column: 'time', direction: 'desc' }, |
| | | cancelRunCreated: false, |
| | | tableCellMerge: true |
| | | }, |
| | |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | | width: 100, |
| | | minWidth: 100 |
| | | width: 150, |
| | | minWidth: 150 |
| | | } |
| | | }, |
| | | dropdownTitleStyle: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | getProductionSchedulStaffDict(){ |
| | | const _than = this |
| | | remote('productionschedul_staff').then((response) => { |
| | | if (response.status === 200) { |
| | | response.data.data.map((ele)=>{ |
| | | _than.productionSchedulStaffOptions.push(ele.value) |
| | | }) |
| | | } else { |
| | | _than.productionSchedulStaffOptions = [] |
| | | } |
| | | }) |
| | | showChangeRecords(row){ |
| | | this.recordsList = [] |
| | | if(row){ |
| | | fetchRecordsList(row.mid).then((res)=>{ |
| | | if(res.status===200){ |
| | | this.recordsList = res.data.data.records |
| | | } |
| | | }).catch((error)=>{ |
| | | console.error(error); |
| | | }) |
| | | } |
| | | this.showRecordsDialog = true |
| | | }, |
| | | showOperator(){ |
| | | this.table.operator = [{ |
| | | text: '变更记录', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.showChangeRecords, |
| | | }] |
| | | if(this.showUnDownTable){ |
| | | if(this.permissions.plan_productionschedul_edit){ |
| | | this.table.operator = [{ |
| | | this.table.operator.push({ |
| | | text: '编辑', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.editHandle |
| | | }] |
| | | fun: this.editHandle, |
| | | show: { |
| | | key: 'hasEdit', |
| | | val: [true] |
| | | } |
| | | }) |
| | | } |
| | | if(this.permissions.plan_productionschedul_del){ |
| | | if(this.table.operator == null){ |
| | | this.table.operator = [{ |
| | | text: '删除', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }] |
| | | }else{ |
| | | this.table.operator.push({ |
| | | text: '删除', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }) |
| | | } |
| | | this.table.operator.push({ |
| | | text: '删除', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle, |
| | | show: { |
| | | key: 'hasEdit', |
| | | val: [true] |
| | | } |
| | | }) |
| | | } |
| | | }else{ |
| | | this.table.operator = null |
| | | } |
| | | }, |
| | | handleClickCell(row){ |
| | |
| | | updateState(ids).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("更新成功") |
| | | this.getUnFinishedData() |
| | | this.getFinishedData() |
| | | this.getDataList() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error); |